:root {
  color-scheme: light;
  --bg: #fff; --paper: #f3f5f5; --card: #fff; --ink: #26262a; --muted: #5f6369; --line: #e3e6e8; --hair: #edf0f1;
  --y: #fabb3c; --y-soft: #fdeec9; --c: #3ec8e6; --ct: #e3f6fb; --cd: #0b7b99;
  --accent: #26262a; --accent-hover: #3d3d41; --accent-ink: #fff; --accent-deep: #0b7b99; --chip: #0f7f9c;
  --bad: #b3202b; --good: #0f6b4c; --warn: #8a5a00; --focus: #0b7b99;
  --spectrum: none;
  --body: Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
  --header: 68px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 12px); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 400 15.5px/1.6 var(--body); }
body.lock { overflow: hidden; }
main { flex: 1; min-width: 0; outline: none; }
a { color: inherit; }
h1, h2, h3, p, figure, ol, ul { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { padding: 0; border: 0; background: none; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }
.wrap.page { padding-bottom: 72px; }
em { font-style: normal; color: var(--accent-deep); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 600; }
.skip:focus { top: 8px; }

/* Nút */
.pill-dark, .pill-red, .pill-line, .btn-teal, .btn-line { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 22px; border: 1.5px solid transparent; border-radius: 999px; font: 600 14.5px/1.2 var(--body); text-decoration: none; white-space: nowrap; transition: background-color .15s, border-color .15s; }
.pill-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill-dark:hover { background: #343840; border-color: #343840; }
.pill-red, .btn-teal { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pill-red:hover, .btn-teal:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.pill-line, .btn-line { background: var(--paper); border-color: #cfccc4; color: var(--ink); }
.pill-line:hover, .btn-line:hover { border-color: var(--ink); }
.btn-teal.wide { width: 100%; }
button:disabled { opacity: .55; cursor: not-allowed; }
.link-button { display: inline-flex; align-items: center; min-height: 40px; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #b9b6ad; }
.link-button:hover { text-decoration-color: var(--ink); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 14px; font-weight: 600; }
.link-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.link-arrow:hover { color: var(--accent-deep); }
.round-btn, .icon-act { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 1.5px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); text-decoration: none; }
.round-btn:hover, .icon-act:hover { border-color: var(--ink); }
.round-btn svg, .icon-act svg, .stage-nav svg, .dlg-close svg, .rc-likes svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Thanh trên */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--ink); color: #e8ece9; }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--spectrum); }
.hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(1180px, 100%); height: var(--header); margin: 0 auto; padding: 0 24px; }
.site-header .wordmark { color: #fff; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.wordmark b { font-weight: 700; }
.wheel { flex: none; width: 26px; height: 26px; border-radius: 50%; background: conic-gradient(#ff5a5f, #ffb020, #2ecc71, #18a8f0, #7a5cff, #ff5a5f); -webkit-mask: radial-gradient(circle, transparent 6.5px, #000 7.5px); mask: radial-gradient(circle, transparent 6.5px, #000 7.5px); }
.wordmark.on-dark { color: #fff; }
.hd-right { display: flex; align-items: center; gap: 10px; }
.hd-add { min-height: 40px; padding: 6px 18px; }
.avatar { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; }
.avatar.big { width: 56px; height: 56px; font-size: 22px; }
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(22, 24, 28, .5); }
.scrim[hidden], .drawer[hidden] { display: none; }
.drawer { position: fixed; z-index: 50; top: 0; bottom: 0; right: 0; display: flex; flex-direction: column; gap: 8px; width: min(88vw, 340px); padding: 14px 20px 24px; overflow-y: auto; background: var(--paper); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.drawer-nav { display: grid; margin: 8px 0; }
.drawer-nav a { padding: 14px 4px; border-bottom: 1px solid var(--hair); font-size: 17px; font-weight: 600; text-decoration: none; }
.drawer-auth { display: grid; gap: 10px; margin-top: 8px; }
.drawer-user { display: grid; font-weight: 600; }
.drawer-user small { font-weight: 400; color: var(--muted); }
.drawer-lang { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 20px; color: var(--muted); font-weight: 500; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.lang { display: inline-flex; overflow: hidden; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); }
.lang button { min-width: 42px; min-height: 36px; font-size: 13px; font-weight: 600; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.lang.on-dark { border-color: rgba(255, 255, 255, .35); background: transparent; }
.lang.on-dark button { color: #cfd3d8; }
.lang.on-dark button[aria-pressed="true"] { background: var(--surface); color: var(--ink); }

/* Đầu trang */
.hero { padding: 48px 0 56px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
.eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.hero h1 { margin-top: 14px; font-size: clamp(30px, 3.8vw, 46px); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
.hero-sub { max-width: 46ch; margin-top: 16px; color: var(--muted); font-size: 16.5px; line-height: 1.6; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-cta.center { justify-content: center; }
.works { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 24px; color: var(--muted); font-size: 13.5px; }
.chip-sm { min-height: 32px; padding: 3px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 13px; font-weight: 600; color: var(--ink); }
.chip-sm:hover { border-color: var(--ink); }
.hero-cards { position: relative; height: 400px; }
.hc { position: absolute; width: 250px; padding: 10px 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.hc1 { left: 4%; top: 0; transform: rotate(-3deg); z-index: 1; }
.hc2 { right: 2%; top: 64px; transform: rotate(3deg); }
.hc .rc-photo, .hc .rc h3, .hc .rc-by { pointer-events: none; }

/* Khối nội dung */
.block { padding: 40px 0 12px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.sec-head h2, .center-title, .cta-end h2, .send-band h2, .made-by b { letter-spacing: -.01em; }
.sec-head h2 { font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; line-height: 1.2; }
.center-title { margin-bottom: 8px; text-align: center; font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; line-height: 1.25; }
.center-sub { margin-bottom: 20px; text-align: center; color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; }
.block .hint { margin-top: 12px; }

/* Thẻ công thức */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 28px 20px; }
.grid.grid-6 { grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); }
.grid.spaced { margin-top: 20px; }
.rc { position: relative; display: flex; flex-direction: column; min-width: 0; }
.rc-photo { position: relative; }
.photo { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px 10px 0 0; background: var(--hair); }
.photo img, .photo svg { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.rc:hover .photo img, .rc:hover .photo svg { transform: scale(1.03); }
.rc-likes { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .94); font-size: 12.5px; font-weight: 600; }
.rc-likes svg { width: 14px; height: 14px; fill: #d6244a; stroke: #d6244a; }
.rc h3 { margin-top: 12px; font-size: 16px; font-weight: 600; line-height: 1.3; }
.rc-link { text-decoration: none; }
.rc-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.rc-link:focus-visible { outline: none; }
.rc:has(.rc-link:focus-visible) { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 10px; }
.rc:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.rc-by { margin-top: 2px; color: var(--muted); font-size: 13.5px; }
.rc-cam { align-self: flex-start; margin-top: 8px; padding: 1px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 12px; font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .photo img, .photo svg { transition: none; } .rc:hover .photo img, .rc:hover .photo svg { transform: none; } }

.cam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cam-tile { display: grid; gap: 2px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); text-align: left; }
.cam-tile:hover { border-color: var(--ink); }
.cam-tile b { font-size: 17px; font-weight: 700; }
.cam-tile small { color: var(--muted); font-size: 13px; }
.moods { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.mood { padding: 10px 24px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 15px; font-weight: 600; }
.mood:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.send-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 40px; border-radius: 14px; background: var(--ink); color: #fff; }
.send-band .eyebrow { color: #b8bcc4; }
.send-band h2 { margin: 10px 0 12px; font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; line-height: 1.2; }
.send-band h2 em { color: #a9cfc7; }
.send-band p { max-width: 44ch; margin-bottom: 20px; color: #cfd3d8; }
.steps { list-style: none; padding: 0; display: grid; gap: 10px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 14px; padding: 14px 16px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 14px; counter-increment: step; }
.steps li::before { content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); color: var(--ink); font-weight: 700; }
.steps b { font-weight: 600; }
.steps span { color: #b8bcc4; font-size: 14px; }
.creator-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.creator-card { display: grid; justify-items: start; gap: 2px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); text-decoration: none; }
.creator-card:hover { border-color: var(--ink); }
.creator-card b { margin-top: 8px; font-size: 17px; font-weight: 700; }
.creator-card small { color: var(--muted); }
.avatar-lg { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 20px; font-weight: 700; }
.avatar-lg.big { width: 72px; height: 72px; font-size: 28px; }
.cstats { display: flex; gap: 18px; margin-top: 12px; }
.cstats i { display: grid; font-style: normal; color: var(--muted); font-size: 12.5px; }
.cstats b { color: var(--ink); font-size: 17px; font-weight: 700; }
.faq { display: grid; gap: 10px; }
.faq details, .howto { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.faq summary, .howto summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 54px; padding: 12px 20px; list-style: none; cursor: pointer; font-weight: 600; }
.faq summary::-webkit-details-marker, .howto summary::-webkit-details-marker { display: none; }
.faq summary::after, .howto summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--hair); font-size: 18px; }
.faq details[open] summary::after, .howto[open] summary::after { content: "–"; }
.faq details p, .howto p { padding: 0 20px 18px; color: var(--muted); font-size: 14.5px; max-width: 70ch; }
.cta-end { margin-top: 56px; padding: 56px 0 72px; text-align: center; }
.cta-end h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 700; line-height: 1.2; }

/* Thư viện */
.page-title { padding-top: 36px; font-size: clamp(26px, 3.2vw, 36px); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.page-lead { margin-top: 8px; max-width: 60ch; color: var(--muted); }
.filter-bar { display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 12px; margin: 22px 0 14px; }
.filter-bar .filters { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
#toggle-filters { display: none; }
input, select, textarea { width: 100%; min-height: 52px; padding: 11px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper); font-size: 15.5px; }
input:hover, select:hover, textarea:hover { border-color: #c8c5bc; }
input[type="search"] { padding-left: 18px; }
textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
select { -webkit-appearance: none; appearance: none; padding-right: 44px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2316181c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 18px center / 16px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
label input, label select, label textarea { color: var(--ink); font-weight: 400; }
.seg-row { display: flex; gap: 8px; margin: 0 -2px; padding: 2px 2px 12px; overflow-x: auto; scrollbar-width: none; }
.seg-row::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 4px 18px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 14px; font-weight: 600; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.result-line { display: flex; align-items: center; justify-content: space-between; min-height: 40px; margin-bottom: 8px; color: var(--muted); font-size: 14px; }
.empty { display: grid; justify-items: start; gap: 14px; padding: 40px 0; color: var(--muted); }
.empty[hidden] { display: none; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 14px; color: var(--muted); font-size: 13.5px; }
.crumbs a, .crumbs button { font-size: inherit; text-decoration: none; }
.crumbs a:hover, .crumbs button:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 500; }

/* Trang chi tiết */
.stage { position: relative; }
.stage-photo { aspect-ratio: 16 / 8; max-height: 64vh; width: 100%; overflow: hidden; border-radius: 12px; background: var(--hair); }
.stage-photo img, .stage-photo svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.stage-nav { position: absolute; top: 50%; display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; background: rgba(255, 255, 255, .95); }
.stage-nav.prev { left: 14px; } .stage-nav.next { right: 14px; }
.credit-line { margin-top: 10px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.credit-line a { text-decoration: underline; text-underline-offset: 2px; }
.detail-head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; padding: 28px 0 8px; }
.cam-chip { padding: 1px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 12px; font-weight: 600; }
.detail-head h1 { margin-top: 8px; font-size: clamp(26px, 3vw, 38px); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; }
.byline { margin-top: 6px; color: var(--muted); }
.byline a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tags button { padding: 3px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 13px; font-weight: 500; }
.tags button:hover { border-color: var(--ink); }
.lead { max-width: 54ch; margin-top: 16px; font-size: 16.5px; line-height: 1.6; }
.dh-side { display: grid; align-content: start; gap: 14px; }
.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.icon-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-act[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.icon-act[aria-pressed="true"] svg { fill: currentColor; }
.icon-act.fav[aria-pressed="true"] { background: #d6244a; border-color: #d6244a; }
.icon-act.danger { color: var(--bad); }
.menu-wrap { position: relative; }
.pop { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; display: grid; min-width: 250px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.pop[hidden] { display: none; }
.pop button { padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; text-align: left; }
.pop button:hover, .pop button:focus-visible { background: var(--hair); }
.stat-line { display: flex; gap: 20px; color: var(--muted); font-size: 14px; }
.stat-line b { color: var(--ink); font-size: 18px; font-weight: 700; }
.specs { padding-top: 32px; }
.spec-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.spec-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 10px 22px; border-top: 1px solid var(--hair); color: var(--muted); font-weight: 500; }
.spec-row:first-child { border-top: 0; }
.spec-row b { color: var(--ink); font-size: 15.5px; font-weight: 600; text-align: right; }
.adj-title { margin: 24px 0 12px; font-size: 14px; font-weight: 600; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.tile { position: relative; display: grid; gap: 2px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.tile b { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: 13px; }
.spec-row input, .tile input { display: none; width: 20px; height: 20px; min-height: 0; accent-color: var(--ink); }
.manual .spec-row, .manual .tile { cursor: pointer; }
.manual .spec-row input { display: block; flex: none; margin-right: 4px; }
.manual .spec-row span { margin-right: auto; }
.manual .tile input { display: block; position: absolute; right: 12px; top: 12px; }
.manual :is(.spec-row, .tile):has(input:checked) :is(b, span) { opacity: .4; text-decoration: line-through; }
.made-by { display: flex; align-items: center; gap: 16px; margin-top: 32px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.made-by div { display: grid; flex: 1; min-width: 0; }
.made-by small { color: var(--muted); }
.send-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; margin-top: 24px; padding: 28px; border-radius: 12px; background: var(--ink); color: #fff; }
.send-card .eyebrow { color: #b8bcc4; }
.send-card h2 { margin: 8px 0; font-size: 22px; font-weight: 700; }
.send-card p { color: #cfd3d8; font-size: 14.5px; }
.howto { margin-top: 24px; }
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 20px; }
.shot img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; }
.shot figcaption { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.shot figcaption b { color: var(--ink); font-weight: 600; }
.shot figcaption em { font: 600 12px var(--body); color: var(--accent-deep); }
.shot-add { display: grid; justify-items: start; gap: 10px; padding: 22px; border: 1px dashed #c8c5bc; border-radius: 12px; background: var(--paper); }
.shot-add h3 { font-size: 17px; font-weight: 700; }
.shot-add p { max-width: 60ch; color: var(--muted); }
.rules { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.rules li { padding: 2px 12px; border-radius: 999px; background: var(--hair); font-size: 12.5px; font-weight: 600; }
#shot-form { width: min(460px, 100%); margin-top: 6px; }
.creator-head { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-bottom: 8px; }
.creator-head h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; }

/* Đọc từ ảnh, biểu mẫu */
.drop { position: relative; display: grid; place-items: center; align-content: center; gap: 6px; min-height: 240px; padding: 24px; border: 1.5px dashed #b9b6ad; border-radius: 12px; background: var(--paper); color: var(--muted); text-align: center; cursor: pointer; font-size: 14px; }
.drop:hover, .drop.over { border-color: var(--ink); color: var(--ink); }
.drop:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.drop strong { color: var(--ink); font-size: 18px; font-weight: 700; }
.drop input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; }
.reader { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; padding-top: 24px; align-items: start; }
.reader-photo { display: block; width: 100%; max-height: 420px; object-fit: contain; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.note-photo { max-height: 220px; margin-top: 10px; }
.editor { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr); gap: 20px; align-items: start; padding-top: 22px; }
.panel { padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.stack { display: grid; gap: 14px; }
.panel h2 { font-size: 17px; font-weight: 700; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 12px; }
.fields .wide { grid-column: 1 / -1; }
.field-title { grid-column: 1 / -1; padding-top: 10px; font-size: 14px; font-weight: 700; color: var(--accent-deep); }
.preview-row { display: flex; flex-wrap: wrap; gap: 8px; }
.preview-row img { width: 72px; height: 90px; object-fit: cover; border-radius: 10px; }
.settings.flat { padding: 20px 22px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.settings-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.settings h2 { font-size: 20px; font-weight: 700; }
.setting-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.setting { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; min-height: 48px; border-top: 1px solid var(--hair); color: var(--muted); font-size: 14px; }
.setting b { color: var(--ink); font-weight: 600; text-align: right; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.actions.flush { margin-top: 0; }
.notice { padding: 10px 16px; border-left: 3px solid var(--warn); border-radius: 4px 12px 12px 4px; background: #fbf3e0; font-size: 14px; }
.notice.bad { border-color: var(--bad); background: #fbe7e8; }
.notice.good { border-color: var(--good); background: #e3f4ec; }
.notice ul { margin: 4px 0 0; padding-left: 18px; }
.gap { margin-top: 12px; }
.check { display: flex; align-items: flex-start; gap: 10px; color: var(--ink); font-size: 14.5px; font-weight: 400; line-height: 1.45; }
.check input { flex: none; width: 20px; height: 20px; min-height: 0; margin-top: 2px; accent-color: var(--ink); }
.radios { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.radios legend { margin-bottom: 6px; padding: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.form-stack { display: grid; gap: 14px; }
.acct { display: flex; align-items: center; gap: 14px; margin: 16px 0 8px; }
.acct p { display: grid; }
.acct small { color: var(--muted); }

/* Hộp thoại */
dialog { position: fixed; width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 26px; border: 0; border-radius: 12px; background: var(--paper); color: var(--ink); overflow-y: auto; }
dialog::backdrop { background: rgba(22, 24, 28, .6); }
dialog h2 { padding-right: 52px; font-size: 22px; font-weight: 700; line-height: 1.25; }
dialog ol { padding-left: 20px; margin: 12px 0; }
dialog .notice, dialog .actions { margin-top: 16px; }
#report-form textarea { min-height: 120px; }
.dlg-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; }
.dlg-close:hover { background: var(--hair); }
.seg { display: grid; grid-template-columns: 1fr 1fr; margin: 16px 0; padding: 4px; border-radius: 999px; background: var(--hair); }
.seg button { min-height: 40px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); outline: 1px solid var(--line); }
.slots { display: grid; gap: 8px; margin: 14px 0; }
.slot { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: center; min-height: 48px; padding: 7px 16px; border: 1.5px solid var(--line); border-radius: 12px; font-weight: 500; cursor: pointer; }
.slot:has(input:checked) { border-color: var(--ink); background: var(--bg); }
.slot input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; }
.slot:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.slot b { font-weight: 700; }
.slot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; }
#toast.show { opacity: 1; }
@media (prefers-reduced-motion: no-preference) { #toast { transition: opacity .16s; } }

/* Chân trang */
.site-footer { margin-top: 24px; background: #14161a; color: #fff; }
.site-footer .wrap { padding-top: 56px; padding-bottom: 28px; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.foot-brand { display: grid; justify-items: start; align-content: start; gap: 16px; }
.foot-brand p { max-width: 38ch; margin: 0; color: #a9aeb6; font-size: 14.5px; line-height: 1.65; }
.foot-col { display: grid; justify-items: start; align-content: start; gap: 2px; }
.foot-col h2 { margin: 0 0 10px; color: #fff; font-size: 14px; font-weight: 700; }
.foot-col a, .foot-link { display: inline-flex; align-items: center; min-height: 34px; color: #a9aeb6; font-size: 14.5px; text-align: left; text-decoration: none; }
.foot-col a:hover, .foot-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot-text { max-width: 32ch; margin: 0 0 10px; color: #a9aeb6; font-size: 14px; line-height: 1.6; }
.foot-bottom { display: flex; justify-content: space-between; gap: 24px; margin-top: 48px; padding-top: 22px; border-top: 1px solid #2a2d33; color: #8a9099; font-size: 13px; }
.foot-bottom p { margin: 0; }
.site-footer :focus-visible, .send-band :focus-visible, .send-card :focus-visible { outline-color: #fff; }

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero-cards { height: 340px; max-width: 520px; }
  .detail-head { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .send-band, .send-card, .reader, .editor { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .foot-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  :root { --header: 58px; }
  .wrap, .hd { padding-inline: 16px; }
  .hd-add { display: none; }
  .wordmark { font-size: 17px; }
  .hero { padding: 28px 0 36px; }
  .hero h1 { font-size: 28px; }
  .hero-sub { font-size: 15.5px; }
  .hero-cta .pill-dark, .hero-cta .pill-line { flex: 1 1 100%; }
  .hero-cards { display: none; }
  .block { padding-top: 30px; }
  .grid, .grid.grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .rc h3 { font-size: 14.5px; }
  .rc-by { font-size: 12.5px; }
  .cam-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mood { padding: 9px 20px; }
  .send-band { padding: 24px 20px; }
  .send-card { padding: 22px 18px; }
  .filter-bar { grid-template-columns: minmax(0, 1fr) auto; }
  #toggle-filters { display: inline-flex; min-height: 52px; }
  .filter-bar .filters { display: none; grid-template-columns: minmax(0, 1fr); }
  .filter-bar .filters.open { display: grid; }
  .stage-photo { aspect-ratio: 4 / 3; border-radius: 12px; }
  .stage-nav { width: 40px; height: 40px; margin-top: -20px; }
  .action-row .pill-red { flex: 1 1 100%; }
  .pop { right: auto; left: 0; min-width: min(250px, 80vw); }
  .spec-row { padding: 10px 16px; }
  .setting-grid { grid-template-columns: minmax(0, 1fr); }
  .made-by { flex-wrap: wrap; }
  .foot-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .foot-bottom { flex-direction: column; gap: 8px; }
  .wrap.page { padding-bottom: 48px; }
  .panel { padding: 18px; }
  dialog { padding: 22px 18px; }
  #toast { bottom: 16px; }
}

.hd-nav { display: flex; align-items: center; gap: 4px; margin-right: auto; margin-left: 28px; }
.hd-nav a { padding: 8px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.hd-nav a:hover, .hd-nav a[aria-current] { background: var(--hair); color: var(--ink); }
.hd-lang button { min-width: 38px; min-height: 32px; }
#menu-btn { display: none; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 36px; align-items: start; padding-top: 4px; }
.dg-left { min-width: 0; }
.dg-right { min-width: 0; position: sticky; top: calc(var(--header) + 16px); max-height: calc(100vh - var(--header) - 32px); overflow-y: auto; padding-right: 2px; scrollbar-width: thin; }
.dg-right h1 { margin-top: 8px; font-size: clamp(26px, 2.8vw, 34px); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.dg-right .action-row { margin-top: 16px; }
.dg-right .stat-line { margin-top: 14px; }
.dg-right .specs { padding-top: 18px; }
.dg-right .link-button { margin-top: 10px; }
.dg-left .stage-photo { aspect-ratio: 4 / 3; max-height: none; border-radius: 12px; }
.dg-left .lead { margin-top: 16px; }
.dg-left .made-by { margin-top: 20px; }
@media (max-width: 1000px) {
  .hd-nav, .hd-lang { display: none; }
  #menu-btn { display: inline-grid; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .dg-right { position: static; max-height: none; overflow: visible; }
}

/* Mẫu C */
.site-header .hd-nav a { color: #aab4af; }
.site-header .hd-nav a:hover, .site-header .hd-nav a[aria-current] { background: #2a3430; color: #fff; }
.site-header .lang { border-color: #3a4640; background: transparent; }
.site-header .lang button { color: #aab4af; }
.site-header .lang button[aria-pressed="true"] { background: var(--surface); color: var(--ink); }
.site-header .hd-add { background: var(--surface); border-color: #fff; color: var(--ink); }
.site-header .hd-add:hover { background: #dfe6e2; border-color: #dfe6e2; }
.site-header .round-btn { background: #2a3430; border-color: #2a3430; color: #fff; }
.site-header .round-btn:hover { border-color: #fff; }
.site-header .avatar { background: var(--surface); color: var(--ink); }
.pill-red { color: #fff; }
.pill-line { background: transparent; border-color: #9aa5a0; }
.chip-sm, .cam-tile, .creator-card, .faq details, .howto, .panel, .settings.flat { background: var(--paper); border-color: transparent; }
.cam-tile:hover, .creator-card:hover { border-color: var(--ink); }
.mood, .chip, .tags button { background: var(--paper); border-color: transparent; }
.chip[aria-pressed="true"], .mood:hover { background: var(--ink); color: #fff; }
input, select, textarea, .drop { background: var(--card); border-color: transparent; }
select { background-color: var(--card); }
.rc { background: var(--paper); border-radius: 10px; overflow: hidden; }
.rc:hover .photo img, .rc:hover .photo svg { transform: none; }
.rc-photo { position: relative; }
.cam { position: absolute; left: 12px; bottom: 12px; z-index: 1; padding: 4px 12px; border-radius: 99px; background: rgba(23, 32, 29, .86); color: #fff; font-size: 12.5px; font-weight: 700; line-height: 1.4; }
.rc-body { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px 12px 14px 14px; flex: 1; }
.rc-text { min-width: 0; }
.rc h3 { margin: 0; font-size: 16px; font-weight: 700; }
.rc-by { margin-top: 2px; }
.rc-acts { position: relative; z-index: 2; display: flex; gap: 4px; flex: none; }
.bm { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ink); }
.bm:hover { background: var(--hair); }
.bm svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bm[aria-pressed="true"] { background: var(--ink); color: #fff; }
.bm[aria-pressed="true"] svg { fill: currentColor; }
.bm.fav[aria-pressed="true"] { background: #d6244a; }
.rc:has(.rc-link:focus-visible) { border-radius: 10px; }
.grid { gap: 22px 18px; }
.stage .cam { bottom: 14px; left: 14px; }
.count { position: absolute; right: 14px; bottom: 14px; z-index: 1; padding: 4px 10px; border-radius: 99px; background: rgba(23, 32, 29, .86); color: #fff; font-size: 12.5px; font-weight: 700; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: thin; }
.thumbs button { flex: none; width: 76px; height: 56px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 8px; opacity: .72; }
.thumbs button[aria-pressed="true"] { border-color: var(--ink); opacity: 1; }
.thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.chipcard { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 10px; background: var(--chip); color: #fff; }
.chipcard .sw { flex: none; width: 56px; height: 56px; border-radius: 8px; }
.chipcard small { display: block; font-size: 12.5px; font-weight: 600; opacity: .85; }
.chipcard b { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.chipcard > span:last-child { margin-left: auto; padding: 3px 10px; border-radius: 99px; background: rgba(255, 255, 255, .18); font-size: 13px; font-weight: 700; }
.dg-right h1 { margin-top: 16px; }
.byline { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.av-sm { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; }
.panel.specs { padding: 6px 18px 14px; border-radius: 10px; margin-top: 18px; }
.specs .sec-head { margin: 8px 0 0; }
.specs .sec-head h2 { font-size: 17px; }
.sec { margin: 14px 0 2px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.spec-row { padding: 9px 0; min-height: 0; border-top: 0; border-bottom: 1px solid var(--line); }
.spec-row:last-of-type { border-bottom: 0; }
.sl { display: grid; grid-template-columns: 104px minmax(0, 1fr) 36px; align-items: center; gap: 12px; padding: 8px 0; color: var(--muted); font-size: 14px; font-weight: 500; }
.sl b { color: var(--ink); font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.sl input { display: none; }
.bar { position: relative; height: 6px; border-radius: 99px; background: #cdd3d0; }
.bar::before { content: ""; position: absolute; left: var(--z, 50%); top: -4px; width: 2px; height: 14px; background: #93a09a; }
.bar i { position: absolute; top: 50%; width: 16px; height: 16px; border: 3px solid var(--paper); border-radius: 50%; background: var(--ink); transform: translate(-50%, -50%); }
.manual .sl { grid-template-columns: 24px 104px minmax(0, 1fr) 36px; cursor: pointer; }
.manual .sl input { display: block; width: 20px; height: 20px; min-height: 0; accent-color: var(--ink); }
.manual .sl:has(input:checked) :is(b, span) { opacity: .4; text-decoration: line-through; }
.dg-left .stage-photo { border-radius: 10px; }
@media (max-width: 700px) { .rc-body { padding: 10px 8px 10px 10px; } .rc h3 { font-size: 14.5px; } .bm { width: 34px; height: 34px; } .sl { grid-template-columns: 92px minmax(0, 1fr) 34px; } .manual .sl { grid-template-columns: 24px 92px minmax(0, 1fr) 34px; } }
@media (max-width: 700px) {
  .rc-acts { position: absolute; top: 8px; right: 8px; gap: 6px; }
  .rc-acts .bm { background: rgba(238, 240, 238, .94); }
  .rc-acts .bm:hover { background: var(--surface); }
  .rc-acts .bm[aria-pressed="true"] { background: var(--ink); }
  .rc-acts .bm.fav[aria-pressed="true"] { background: #d6244a; }
  .rc-body { padding: 10px 12px 12px; }
}

/* Bản logo: sáng, vàng dùng ít */
.site-header { background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); }
.site-header::after { display: none; }
.hd { height: var(--header); gap: 12px; }
.lg { width: 38px; height: 38px; border-radius: 10px; display: block; flex: none; }
.site-header .wordmark, .wordmark { color: var(--ink); font-size: 18px; font-weight: 800; }
.site-header .hd-nav { margin-left: 18px; }
.site-header .hd-nav a { color: var(--muted); border-radius: 0; padding: 22px 14px; position: relative; font-weight: 600; }
.site-header .hd-nav a:hover { background: none; color: var(--ink); }
.site-header .hd-nav a[aria-current] { background: none; color: var(--ink); }
.site-header .hd-nav a[aria-current]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 12px; height: 3px; border-radius: 3px; background: var(--y); }
.site-header .lang { border-color: var(--line); background: var(--surface); }
.site-header .lang button { color: var(--muted); }
.site-header .lang button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.site-header .round-btn { background: var(--surface); border-color: var(--line); color: var(--ink); }
.site-header .round-btn:hover { border-color: var(--ink); }
.site-header .avatar { background: var(--y); color: var(--ink); }
.hd-user { display: none; }
.hd-login, .hd-signup { min-height: 42px; padding: 6px 20px; }
.pill-dark, .pill-red, .pill-line, .btn-teal, .btn-line { font-weight: 700; font-size: 14px; }
.pill-line { background: var(--surface); border-color: var(--ink); }
.pill-line:hover { background: var(--paper); }
.pill-red { color: #fff; }
.mood:hover, .chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.chip-sm, .cam-tile, .creator-card, .faq details, .howto, .panel, .settings.flat, .mood, .chip, .tags button { background: var(--paper); border-color: transparent; }
.cam-tile:hover, .creator-card:hover, .chip-sm:hover { border-color: var(--ink); }
input, select, textarea, .drop { background: var(--surface); border: 1.5px solid var(--line); }
input:focus, select:focus, textarea:focus { border-color: var(--ink); }
.rc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.rc .photo { border-radius: 0; }
.cam { background: rgba(255, 255, 255, .95); color: var(--ink); }
.bm { color: var(--ink); }
.bm[aria-pressed="true"] { background: var(--y); color: var(--ink); }
.bm.fav[aria-pressed="true"] { background: #fde0e6; color: #d6244a; }
.bm.fav[aria-pressed="true"] svg { fill: #d6244a; }
.icon-act[aria-pressed="true"] { background: var(--y); border-color: var(--y); color: var(--ink); }
.icon-act.fav[aria-pressed="true"] { background: #fde0e6; border-color: #fde0e6; color: #d6244a; }
.icon-act.fav[aria-pressed="true"] svg { fill: #d6244a; }
em { color: var(--cd); }

/* Đầu trang chủ */
.hero2 { padding: 36px 0 12px; }
.hero2-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.h2-copy h1 { font-size: clamp(30px, 3.9vw, 48px); line-height: 1.12; font-weight: 800; letter-spacing: -.025em; text-wrap: balance; }
.h2-copy .hero-sub { max-width: 46ch; margin-top: 16px; color: var(--muted); font-size: 16px; }
.find { display: flex; align-items: center; gap: 10px; margin-top: 26px; height: 58px; padding: 0 7px 0 18px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--surface); }
.find svg { flex: none; width: 21px; height: 21px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.find input { flex: 1; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; background: transparent; }
.find input:focus { outline: none; }
.find:focus-within { outline: 3px solid var(--c); outline-offset: 2px; }
.find .pill-dark { min-height: 44px; }
.h2-copy .works { margin-top: 18px; }
.h2-mosaic { display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; height: 440px; padding: 14px; border-radius: 28px; background: var(--ct); }
.mz { position: relative; display: block; overflow: hidden; border-radius: 18px; text-decoration: none; }
.mz1 { grid-row: span 2; }
.mz .photo { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.mz .photo img, .mz .photo svg { transition: transform .4s ease; }
.mz:hover .photo img, .mz:hover .photo svg { transform: scale(1.04); }
.mz .cap { position: absolute; left: 10px; right: 10px; bottom: 10px; display: grid; padding: 8px 14px; border-radius: 12px; background: rgba(255, 255, 255, .96); }
.mz .cap b { font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.mz .cap small { color: var(--muted); font-size: 12.5px; }
.mz .cam { top: 10px; bottom: auto; left: 10px; }
.mz:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.cats { padding: 28px 0 0; }
.cat-row { display: flex; gap: 34px; justify-content: center; overflow-x: auto; padding: 4px 4px 10px; scrollbar-width: none; }
.cat-row::-webkit-scrollbar { display: none; }
.cat { flex: none; display: grid; justify-items: center; gap: 10px; width: 108px; font-size: 14px; font-weight: 700; }
.circ { display: block; width: 96px; height: 96px; overflow: hidden; border-radius: 50%; background: var(--hair); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--line); transition: box-shadow .15s; }
.circ img, .circ svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.cat:hover .circ { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--y); }

/* Khối nạp vào máy: sáng */
.send-band, .send-card { background: var(--ct); color: var(--ink); }
.send-band .eyebrow, .send-card .eyebrow { color: var(--cd); }
.send-band p, .send-card p { color: #3d5560; }
.send-band h2 em { color: var(--cd); }
.steps li { border-color: #bfe6f0; background: var(--surface); }
.steps li::before { background: var(--y); color: var(--ink); }
.steps span { color: var(--muted); }
.send-band :focus-visible, .send-card :focus-visible { outline-color: var(--ink); }
.send-band .pill-red { background: var(--ink); }

/* Chân trang: sáng */
.site-footer { background: var(--paper); color: var(--ink); margin-top: 32px; }
.site-footer .wordmark.on-dark { color: var(--ink); }
.foot-brand p, .foot-col a, .foot-link, .foot-text { color: var(--muted); }
.foot-col h2 { color: var(--ink); }
.foot-col a:hover, .foot-link:hover { color: var(--ink); }
.foot-bottom { border-top-color: var(--line); color: var(--muted); }
.lang.on-dark { border-color: var(--line); background: var(--surface); }
.lang.on-dark button { color: var(--muted); }
.lang.on-dark button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.site-footer :focus-visible { outline-color: var(--ink); }
.chipcard { background: var(--ct); color: var(--ink); }
.chipcard small { color: var(--cd); opacity: 1; }
.chipcard > span:last-child { background: var(--surface); }
.count, .cam { color: var(--ink); }
.count { background: rgba(255, 255, 255, .95); }
.av-sm, .avatar-lg { background: var(--y); color: var(--ink); }
.bar i { background: var(--y); box-shadow: 0 0 0 1.5px var(--ink); border-color: #fff; }
.thumbs button[aria-pressed="true"] { border-color: var(--y); }
@media (max-width: 1000px) {
  .hero2-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .h2-mosaic { height: 360px; }
  .hd-login, .hd-signup, .hd-lang { display: none; }
  .hd-user { display: inline-grid; }
  .cat-row { justify-content: flex-start; }
}
@media (max-width: 700px) {
  .hero2 { padding-top: 20px; }
  .h2-mosaic { height: 300px; padding: 10px; gap: 8px; border-radius: 22px; }
  .find { height: 54px; }
  .cat-row { gap: 20px; }
  .circ { width: 80px; height: 80px; }
  .cat { width: 90px; font-size: 13px; }
}

.hd-nav a { white-space: nowrap; }
@media (max-width: 1160px) {
  .hd-nav, .hd-lang { display: none; }
  #menu-btn { display: inline-grid; }
}
@media (min-width: 1161px) { #menu-btn { display: none; } }
@media (max-width: 1160px) and (min-width: 1001px) { .hd-login, .hd-signup { display: inline-flex; } .hd-user { display: none; } }
@media (min-width: 1001px) {
  .dg-left { position: sticky; top: calc(var(--header) + 16px); max-height: calc(100vh - var(--header) - 32px); overflow-y: auto; scrollbar-width: none; }
  .dg-right { position: static; max-height: none; overflow: visible; }
}

/* Kiểu 2: ảnh toàn khung */
.banner { position: relative; display: flex; align-items: flex-end; min-height: 500px; overflow: hidden; border-radius: 28px; background: var(--hair); }
.banner .photo { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.banner .cam { top: 16px; bottom: auto; left: 16px; }
.banner-card { position: relative; width: min(540px, calc(100% - 32px)); margin: 20px; padding: 28px 28px 24px; border-radius: 22px; background: var(--surface); }
.banner-card h1 { font-size: clamp(26px, 3vw, 38px); }
.banner-card .hero-sub { font-size: 15px; }
.banner-cap { position: absolute; right: 18px; bottom: 18px; display: grid; padding: 9px 16px; border-radius: 14px; background: rgba(255, 255, 255, .96); text-decoration: none; }
.banner-cap .cap { display: grid; }
.banner-cap b { font-size: 14px; }
.banner-cap small { color: var(--muted); font-size: 12.5px; }

/* Kiểu 3: nền ấm nhạt, thẻ nằm đè lên */
.h3 { padding-top: 0; }
.h3-band { padding: 52px 0 96px; background: #fff3d6; text-align: center; }
.h3 .h2-copy h1 { max-width: 18ch; margin: 0 auto; }
.h3 .h2-copy .hero-sub { margin-inline: auto; }
.h3 .find { max-width: 640px; margin-inline: auto; }
.h3 .works { justify-content: center; }
.h3 .chip-sm { background: var(--surface); }
.h3-cards { margin-top: -64px; position: relative; }

/* Kiểu 4: nền xanh ngọc nhạt, ba khung dọc */
.h4 { margin-top: 0; padding: 44px 0 52px; background: var(--ct); }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.pt { position: relative; display: block; overflow: hidden; border-radius: 20px; aspect-ratio: 3 / 4.2; text-decoration: none; }
.pt:nth-child(2) { margin-top: 36px; }
.pt .photo { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.pt .cam { top: 10px; bottom: auto; left: 10px; }
.pt .cap { position: absolute; left: 8px; right: 8px; bottom: 8px; display: grid; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .96); }
.pt .cap b { font-size: 13.5px; line-height: 1.25; }
.pt .cap small { color: var(--muted); font-size: 12px; }
.h4 .chip-sm { background: var(--surface); }
.h4 + .cats { padding-top: 32px; }
@media (max-width: 700px) {
  .banner { min-height: 560px; border-radius: 22px; }
  .banner-card { margin: 12px; padding: 20px 18px; }
  .banner-cap { display: none; }
  .h3-band { padding: 32px 0 80px; }
  .trio { gap: 8px; }
  .pt:nth-child(2) { margin-top: 20px; }
  .pt .cap small { display: none; }
  .h4 { padding: 28px 0 36px; }
}

/* Tông sáng dịu, bớt trắng chói */
:root { --bg: #f5f3ee; --paper: #ebe8e0; --card: #fffdf8; --line: #e0dccf; --hair: #ebe7dc; }
body { background: var(--bg); }
.site-header { background: rgba(251, 250, 246, .94); backdrop-filter: blur(10px); }
.site-header .lang, .site-header .round-btn, .pill-line, .find, .chip-sm, .h3 .chip-sm, .steps li { background: var(--card); }
input, select, textarea, .drop { background: var(--card); }
.rc { background: var(--card); transition: border-color .15s; }
.rc:hover { border-color: var(--ink); }
.h3-band { background: #f8e7bd; }
.send-band, .send-card { background: #e0f0f2; }
.site-footer { background: #ebe8e0; }
.manual-or { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.stage-photo { position: relative; overflow: hidden; }
.stage-photo::before { content: ""; position: absolute; inset: -24px; background: var(--bg) center / cover; filter: blur(26px) saturate(1.1); opacity: 0; }
.stage-photo.port::before { opacity: 1; }
.stage-photo img { position: relative; }
.stage-photo.port img { object-fit: contain; }
.filter-bar .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
select.on { border-color: var(--ink); background-color: var(--y-soft); font-weight: 600; }
@media (max-width: 1000px) { .filter-bar .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .filter-bar .filters { grid-template-columns: minmax(0, 1fr); } }

/* Gợi ý tìm kiếm */
.sg-host { position: relative; }
.suggest { position: absolute; z-index: 40; max-height: 380px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); text-align: left; }
.suggest[hidden] { display: none; }
.suggest [role="option"] { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; width: 100%; padding: 7px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); text-align: left; }
.suggest [role="option"]:hover, .suggest [role="option"][aria-selected="true"] { background: var(--hair); }
.suggest button[role="option"] { display: block; padding: 11px 12px; font-weight: 700; color: var(--cd); }
.sg-ph { display: block; width: 52px; height: 40px; overflow: hidden; border-radius: 8px; background: var(--hair); }
.sg-ph .photo, .sg-ph img, .sg-ph svg { display: block; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; object-fit: cover; }
.sg-t { display: grid; min-width: 0; }
.sg-t b { font-size: 14.5px; font-weight: 700; }
.sg-t small { color: var(--muted); font-size: 12.5px; }
.sg-none { padding: 14px 12px; color: var(--muted); font-size: 14px; }

/* So sánh, bộ sưu tập */
.cmp-tray { position: fixed; left: 50%; bottom: 16px; z-index: 60; display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 24px); padding: 10px 14px 10px 20px; border: 1px solid var(--ink); border-radius: 999px; background: var(--card); font-size: 14px; font-weight: 600; transform: translateX(-50%); }
.cmp-names { overflow: hidden; max-width: 34ch; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-weight: 500; }
.cmp-tray .pill-dark { min-height: 38px; padding: 4px 18px; }
.cmp-grid { display: grid; grid-template-columns: minmax(110px, .6fr) 1fr 1fr; gap: 16px; align-items: start; }
.cmp-head { margin: 22px 0 8px; }
.cmp-col { display: grid; gap: 4px; }
.cmp-col .photo { border-radius: 12px; }
.cmp-col h2 { margin-top: 6px; font-size: 18px; font-weight: 700; }
.cmp-col p { color: var(--muted); font-size: 14px; }
.cmp-row { align-items: center; padding: 11px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.cmp-row b { color: var(--ink); font-weight: 700; }
.cmp-row.diff { background: var(--y-soft); border-radius: 8px; }
.coll-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.coll-row:hover { background: var(--hair); }
.coll-row input { width: 18px; height: 18px; min-height: 0; accent-color: var(--ink); }
.coll-new { display: flex; gap: 6px; padding: 8px 6px 4px; border-top: 1px solid var(--line); margin-top: 6px; }
.coll-new input { min-height: 40px; padding: 6px 12px; font-size: 14px; }
.coll-new .pill-dark { min-height: 40px; padding: 4px 16px; }
@media (max-width: 700px) { .cmp-grid { grid-template-columns: minmax(80px, .5fr) 1fr 1fr; gap: 8px; } .cmp-row { font-size: 13px; padding: 9px 6px; } .cmp-tray { padding: 8px 10px 8px 14px; gap: 8px; } .cmp-names { display: none; } }
.crop-box { display: grid; gap: 10px; margin: 0; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 12px; }
.crop-box legend { padding: 0 6px; color: var(--muted); font-size: 13px; font-weight: 600; }

/* Hộp đăng nhập, đăng ký */
#auth { width: min(880px, calc(100vw - 24px)); padding: 0; overflow: hidden; }
.auth-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); min-height: 560px; }
.auth-side { display: flex; flex-direction: column; gap: 18px; padding: 32px 28px; background: var(--ct); }
.auth-side h3 { margin-top: 18px; font-size: 24px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.auth-side ul { display: grid; gap: 16px; margin: 6px 0 0; padding: 0; list-style: none; }
.auth-side li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start; color: #34484f; font-size: 14.5px; }
.auth-side li svg { width: 32px; height: 32px; padding: 7px; border-radius: 10px; background: var(--surface); fill: none; stroke: var(--ink); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.auth-main { display: grid; align-content: start; gap: 12px; padding: 32px 34px 26px; }
.auth-main h2 { padding-right: 40px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.auth-sub { color: var(--muted); margin-top: -6px; }
.g-slot { display: grid; gap: 10px; min-height: 44px; }
.g-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 46px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 15px; font-weight: 600; }
.g-btn:hover { border-color: var(--ink); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 70px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); padding: 6px 12px; border-radius: 999px; color: var(--cd); font-size: 13px; font-weight: 700; }
.pw-toggle:hover { background: var(--hair); }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: -4px; }
.meter i { height: 5px; border-radius: 99px; background: var(--line); }
.meter i.on { background: #d6244a; }
.meter[data-score="2"] i.on { background: var(--y); }
.meter[data-score="3"] i.on, .meter[data-score="4"] i.on { background: #2e9b66; }
.switch { text-align: center; color: var(--muted); font-size: 14px; }
.hint.demo { text-align: center; font-size: 12px; }
@media (max-width: 760px) { .auth-grid { grid-template-columns: 1fr; min-height: 0; } .auth-side { display: none; } .auth-main { padding: 26px 20px 20px; } }

/* Tài khoản của tôi */
.acct-head { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding-top: 30px; }
.acct-head > div { flex: 1; min-width: 200px; }
.acct-title { padding-top: 0; font-size: clamp(24px, 3vw, 32px); }
.acct-stats { margin-top: 6px; }
.acct-stats .cam-tile b { font-size: 26px; }
.acct-h { margin: 28px 0 14px; font-size: 20px; font-weight: 800; }
.acct-panel { padding-top: 6px; }
.acct-forms { display: grid; gap: 18px; max-width: 560px; margin-top: 12px; }
.panel .msg:empty { display: none; }
.danger-zone { border: 1px solid #efc4c8; background: #fdf3f4; }
.danger-btn { border-color: var(--bad); color: var(--bad); }
.danger-btn:hover { background: var(--bad); color: #fff; }
.shot figcaption { display: grid; gap: 2px; }

/* Rê chuột vào ảnh công thức: phóng nhẹ */
.rc .photo, .pt .photo, .mz .photo, .banner .photo { overflow: hidden; }
.rc .photo img, .rc .photo svg, .pt .photo img, .pt .photo svg { transition: transform .6s cubic-bezier(.2, .7, .2, 1); will-change: transform; }
.rc:hover .photo img, .rc:hover .photo svg, .rc:focus-within .photo img, .rc:focus-within .photo svg, .pt:hover .photo img, .pt:hover .photo svg { transform: scale(1.07); }
.rc .cam { transition: transform .3s ease; }
.rc:hover .cam { transform: translateY(-2px); }
.circ img, .circ svg { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.cat:hover .circ img, .cat:hover .circ svg { transform: scale(1.12); }
@media (prefers-reduced-motion: reduce) {
  .rc .photo img, .rc .photo svg, .pt .photo img, .pt .photo svg, .circ img, .circ svg, .rc .cam { transition: none; }
  .rc:hover .photo img, .rc:hover .photo svg, .rc:focus-within .photo img, .rc:focus-within .photo svg, .pt:hover .photo img, .pt:hover .photo svg, .cat:hover .circ img, .cat:hover .circ svg, .rc:hover .cam { transform: none; }
}
.report-row.done { opacity: .6; }

/* Tìm kiếm trên đầu trang */
.hd-search { display: flex; align-items: center; gap: 8px; width: 250px; height: 42px; margin-left: auto; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--card); }
.hd-search:focus-within { border-color: var(--ink); }
.hd-search svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.hd-search input { flex: 1; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; background: transparent; font-size: 14px; }
.hd-search input:focus { outline: none; }
.hd-search-toggle { display: none; }
@media (max-width: 1160px) {
  .hd-search { display: none; }
  .hd-search.open { display: flex; position: fixed; z-index: 29; top: var(--header); left: 0; right: 0; width: auto; height: auto; margin: 0; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--card); }
  .hd-search.open input { height: 40px; }
  .hd-search-toggle { display: inline-grid; margin-left: auto; }
}

/* Trang công thức gọn */
.back { display: inline-flex; align-items: center; gap: 6px; margin: 22px 0 14px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.back:hover { color: var(--ink); }
.back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dg-right .sub { margin-top: 4px; color: var(--muted); font-size: 15px; font-weight: 600; }
.dg-right .lead { margin-top: 14px; font-size: 15.5px; }
button.stage-photo { display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; }
.card2 { margin-top: 16px; padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.card2 h2 { margin-bottom: 12px; font-size: 15px; font-weight: 800; }
.card2 .sec-head { margin-bottom: 12px; }
.card2 .sec-head h2 { margin: 0; }
.author { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 14px; align-items: center; }
.author > div { display: grid; }
.author small { color: var(--muted); font-size: 12.5px; }
.author b { font-size: 16px; font-weight: 800; }
.author .stat-line { grid-column: 1 / -1; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.tiles2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile2 { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--paper); }
.tile2 .ti { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface); color: var(--ink); }
.tile2 .ti svg { width: 22px; height: 22px; }
.tile2 small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.tile2 b { display: block; font-size: 14.5px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
@media (max-width: 440px) { .tiles2 { grid-template-columns: minmax(0, 1fr); } }

/* Xem ảnh lớn */
dialog.lb { position: fixed; inset: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: rgba(14, 15, 17, .96); color: #fff; overflow: hidden; }
dialog.lb::backdrop { background: transparent; }
.lb img { position: absolute; inset: 0; margin: auto; max-width: 94vw; max-height: 86vh; object-fit: contain; }
.lb-x, .lb-nav { position: absolute; z-index: 2; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; }
.lb-x:hover, .lb-nav:hover { background: rgba(255, 255, 255, .28); }
.lb-x { top: 16px; right: 16px; }
.lb-nav { top: 50%; margin-top: -23px; }
.lb-nav.prev { left: 16px; }
.lb-nav.next { right: 16px; }
.lb-x svg, .lb-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-count { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-size: 14px; font-weight: 600; opacity: .85; }
@media (max-width: 700px) { .lb-nav { display: none; } }

/* Chuyển giữa nhập tay và thêm nhanh */
.mode-seg { display: inline-flex; margin: 22px 0 6px; padding: 4px; border-radius: 999px; background: var(--paper); }
.mode-seg a { padding: 9px 18px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 700; text-decoration: none; }
.mode-seg a[aria-current] { background: var(--ink); color: #fff; }

/* Logo ứng dụng */
.plogo { display: inline-grid; flex: none; place-items: center; overflow: hidden; border-radius: 8px; background: var(--surface); vertical-align: middle; }
.plogo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.plogo.xs { width: 20px; height: 20px; margin-right: 8px; border-radius: 5px; }
.plogo.sm { width: 22px; height: 22px; margin-right: 8px; border-radius: 6px; }
.plogo.md { width: 40px; height: 40px; margin-bottom: 8px; border-radius: 10px; }
.plogo.big { width: 64px; height: 64px; border: 1px solid var(--line); border-radius: 14px; font-size: 24px; }
.chip .plogo { vertical-align: -5px; }

/* Công thức của thành viên */
.mine-card { position: relative; }
.status-badge { position: absolute; z-index: 3; top: 10px; right: 10px; padding: 3px 12px; border-radius: 999px; background: var(--surface); font-size: 12.5px; font-weight: 700; }
.status-badge.s-pending { background: var(--y); color: var(--ink); }
.status-badge.s-rejected { background: #fbe7e8; color: var(--bad); }
.status-badge.s-published { background: #e3f4ec; color: var(--good); }

/* Trang quản trị */
.adm { padding-top: 6px; }
.adm-list { display: grid; gap: 10px; margin-top: 8px; }
.adm-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.adm-row img, .adm-noimg { flex: none; width: 64px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--hair); }
.adm-main { display: grid; flex: 1; min-width: 200px; }
.adm-main small { color: var(--muted); font-size: 13px; }
.adm-acts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.adm-acts .btn-teal, .adm-acts .btn-line { min-height: 38px; padding: 4px 16px; font-size: 13.5px; }
.adm-acts select { width: auto; min-height: 38px; padding: 4px 36px 4px 12px; }
.adm-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 10px; }
.adm-media figure { display: grid; gap: 4px; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.adm-media img { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 8px; object-fit: cover; background: var(--hair); }
.adm-media figcaption { display: grid; gap: 2px; }
.adm-media small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.adm-logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 10px; }
.adm-logo { display: grid; justify-items: start; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.adm-up { min-height: 38px; padding: 4px 16px; font-size: 13.5px; cursor: pointer; }
.adm-tag input { flex: 0 1 220px; min-height: 42px; }
.adm-seo-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.6fr); gap: 8px; margin-bottom: 8px; }
.adm .panel { margin-top: 14px; }
@media (max-width: 800px) { .adm-seo-row { grid-template-columns: minmax(0, 1fr); } }
.cam-tile .plogo.md { display: grid; }

/* iPhone tự phóng to trang khi ô nhập chữ nhỏ hơn 16px: giữ mọi ô nhập từ 16px trở lên */
input, select, textarea,
.hd-search input, .find input, .pw-wrap input, .coll-new input, .adm-tag input, .adm-seo-row input, .suggest input { font-size: 16px; }

/* Nội dung dựng sẵn cho Google: ẩn khỏi mắt người cho tới khi ứng dụng tải xong, tránh nháy một giây */
main[data-pre] > * { visibility: hidden; }

/* Xem ảnh lớn: nút nhỏ gọn, có nút tới lui cả trên điện thoại */
dialog.lb { height: 100vh; height: 100dvh; outline: none; }
.lb-x, .lb-nav { width: 40px; height: 40px; background: rgba(0, 0, 0, .45); backdrop-filter: blur(6px); }
.lb-x { top: max(12px, env(safe-area-inset-top)); right: 12px; }
.lb-nav { margin-top: -20px; }
.lb-nav.prev { left: 8px; }
.lb-nav.next { right: 8px; }
.lb-x svg, .lb-nav svg { width: 20px; height: 20px; }
.lb-x:focus-visible, .lb-nav:focus-visible { outline: 2px solid #fff; outline-offset: 0; }
@media (max-width: 700px) {
  .lb-nav { display: grid; }
  .lb img { max-width: 100vw; max-height: 80vh; max-height: 80dvh; }
  .lb-count { bottom: calc(env(safe-area-inset-bottom) + 90px); }
}

/* ===== Giao diện mềm: bo góc rộng, màu dịu, chuyển động nhẹ (lớp ghi đè cuối cùng) ===== */
:root {
  --bg: #f6f7f6; --paper: #fff; --card: #fff;
  --ink: #23272b; --muted: #5d646a; --line: #e5e8e7; --hair: #eff1f0;
  --y: #f4b942; --y-soft: #fbf0d4; --ct: #e6f4f7; --cd: #0d7490; --accent-deep: #0d7490;
  --r-sm: 12px; --r-md: 16px; --r-lg: 22px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --lift: 0 14px 30px -18px rgba(28, 40, 44, .32);
}
html { scroll-behavior: smooth; }
::selection { background: var(--y-soft); color: var(--ink); }
body { background: var(--bg); -webkit-font-smoothing: antialiased; }
:focus-visible { outline-width: 2px; outline-offset: 3px; border-radius: 6px; }

/* Nút: chuyển màu êm, nhấn xuống rất nhẹ */
.pill-dark, .pill-red, .pill-line, .btn-teal, .btn-line, .chip, .chip-sm, .mood, .round-btn, .icon-act, .lang button, .tags button {
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), transform .2s var(--ease), box-shadow .25s var(--ease);
}
.pill-dark, .pill-red, .btn-teal { background: var(--ink); border-color: var(--ink); }
.pill-dark:hover, .pill-red:hover, .btn-teal:hover { background: #3a4046; border-color: #3a4046; box-shadow: 0 8px 18px -12px rgba(28, 40, 44, .55); }
.pill-line, .btn-line { background: var(--surface); border-color: var(--line); }
.pill-line:hover, .btn-line:hover { background: var(--ct); border-color: #b9dbe4; }
.pill-dark:active, .pill-red:active, .btn-teal:active, .pill-line:active, .btn-line:active, .chip:active { transform: scale(.98); }
.chip, .chip-sm, .mood { background: var(--surface); border-color: var(--line); }
.chip:hover, .chip-sm:hover, .mood:hover { background: var(--ct); border-color: #b9dbe4; color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.round-btn:hover, .icon-act:hover { background: var(--ct); border-color: #b9dbe4; }
.link-button { text-decoration-color: #c9ced1; transition: text-decoration-color .2s var(--ease), color .2s var(--ease); }
.link-button:hover { color: var(--cd); text-decoration-color: var(--cd); }
.link-arrow { transition: color .2s var(--ease), gap .2s var(--ease); }
.link-arrow:hover { gap: 9px; }

/* Thẻ: nền trắng, viền mảnh, nhấc lên nhẹ khi rê chuột */
.rc, .hc, .panel, .spec-card, .settings.flat, .made-by, .creator-card, .card2, .cam-tile, .tile, .tile2, .faq details, .howto, .pop, .mine-card {
  border-color: var(--line);
}
.rc, .creator-card, .cam-tile, .card2, .mine-card { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease); }
.rc { border-radius: var(--r-md); }
.rc:hover { transform: translateY(-3px); box-shadow: var(--lift); border-color: #d7dcdb; }
.creator-card:hover, .cam-tile:hover { transform: translateY(-2px); box-shadow: var(--lift); border-color: #d7dcdb; }
.rc:hover h3 { text-decoration: none; color: var(--cd); }
.rc h3 { transition: color .25s var(--ease); }
.photo { border-radius: var(--r-md) var(--r-md) 0 0; }
.photo img, .photo svg { transition: transform .7s var(--ease); }
.rc:hover .photo img, .rc:hover .photo svg { transform: scale(1.035); }
.rc:has(.rc-link:focus-visible) { border-radius: var(--r-md); }
.hc, .panel, .spec-card, .settings.flat, .made-by, .creator-card, .card2, .faq details, .howto, .pop, .reader-photo, .shot-add, .drop, .mine-card { border-radius: var(--r-md); }
.cam-tile, .tile, .tile2 { border-radius: var(--r-sm); }
.send-band, .send-card { border-radius: var(--r-lg); background: var(--ct); color: var(--ink); }
dialog { border-radius: var(--r-lg); }
.faq details { transition: border-color .25s var(--ease), background-color .25s var(--ease); }
.faq details:hover { border-color: #cfd6d5; }
.faq summary::after, .howto summary::after { transition: background-color .25s var(--ease); }
.faq summary:hover::after, .howto summary:hover::after { background: var(--ct); }

/* Ô nhập: trắng, bo mềm, viền xanh nhạt khi chọn */
input, select, textarea { border-radius: var(--r-sm); background-color: var(--surface); border-color: var(--line); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
input:hover, select:hover, textarea:hover { border-color: #cdd3d2; }
input:focus, select:focus, textarea:focus { border-color: var(--cd); box-shadow: 0 0 0 3px rgba(13, 116, 144, .14); outline: none; }

/* Điều hướng và đầu trang */
.site-header { background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); }
.site-header .hd-nav a { transition: color .2s var(--ease); }
.site-header .hd-nav a:hover { color: var(--cd); }
.site-header .hd-add { transition: background-color .25s var(--ease), transform .2s var(--ease); }
.site-footer { background: var(--surface); color: var(--ink); border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rc, .creator-card, .cam-tile, .card2, .mine-card, .pill-dark, .pill-red, .pill-line, .btn-teal, .btn-line, .chip { transition: none; }
  .rc:hover, .creator-card:hover, .cam-tile:hover { transform: none; }
  .rc:hover .photo img, .rc:hover .photo svg { transform: none; }
}
@media (hover: none) { .rc:hover, .creator-card:hover, .cam-tile:hover { transform: none; box-shadow: none; } }
.stage-photo, .gal-main, .gallery img { border-radius: var(--r-md); }
.stage-nav { transition: background-color .25s var(--ease), transform .2s var(--ease); }
.stage-nav:hover { background: var(--surface); transform: scale(1.06); }
@media (prefers-reduced-motion: reduce) { .stage-nav:hover { transform: none; } }

/* Nút thích / lưu: khi bật vẫn thấy biểu tượng (trước đó nền và biểu tượng cùng một màu) */
.bm, .rc-acts .bm { transition: background-color .25s var(--ease), color .25s var(--ease), transform .2s var(--ease); }
.bm:active { transform: scale(.92); }
.bm[aria-pressed="true"], .rc-acts .bm[aria-pressed="true"] { background: var(--y); color: var(--ink); }
.bm[aria-pressed="true"] svg { fill: currentColor; stroke: currentColor; }
.bm.fav[aria-pressed="true"], .rc-acts .bm.fav[aria-pressed="true"] { background: #fde3e8; color: #d6244a; }
.bm.fav[aria-pressed="true"] svg { fill: #d6244a; stroke: #d6244a; }
.bm[aria-pressed="true"]:hover, .rc-acts .bm[aria-pressed="true"]:hover { filter: brightness(.97); }

/* Khung ảnh chính theo tỉ lệ ảnh: ảnh dọc không còn bị thu nhỏ giữa hai dải mờ */
.stage-photo { max-height: 72vh; }
@media (max-width: 700px) { .stage-photo { max-height: 78vh; } }
.lead { white-space: pre-line; }
textarea[name="note"] { min-height: 110px; resize: vertical; line-height: 1.55; }

/* Ảnh trên thẻ lớn hơn để thấy rõ màu: vuông trên máy tính, 4:5 (dọc) trên điện thoại */
.grid .photo, .rc .photo { aspect-ratio: 1 / 1; }
@media (max-width: 700px) {
  .grid { gap: 16px 12px; }
  .grid .photo, .rc .photo { aspect-ratio: 4 / 5; }
}

/* ===== Thông tin máy ảnh dạng hàng ngang, bảng thông số gọn hơn ===== */
.gear { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.gear li { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 14px 6px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.gear .ti { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--hair); color: var(--ink); }
.gear .ti svg { width: 16px; height: 16px; }
.gear small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.2; }
.gear b { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.card2 { padding: 14px 14px 12px; }
.card2 h2 { margin-bottom: 8px; }
.card2 .sec-head { margin-bottom: 8px; }
.tiles2 { gap: 6px; }
.tile2 { gap: 10px; padding: 7px 10px; }
.tile2 .ti { width: 32px; height: 32px; border-radius: 9px; }
.tile2 .ti svg { width: 19px; height: 19px; }
.tile2 small { font-size: 11.5px; }
.tile2 b { font-size: 14px; }
.grp { margin: 12px 0 6px; font-size: 13px; font-weight: 800; color: var(--cd); }
.card2 .grp:first-of-type { margin-top: 2px; }
@media (max-width: 440px) { .tiles2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile2 { padding: 6px 8px; gap: 8px; } .tile2 .ti { width: 28px; height: 28px; } .tile2 .ti svg { width: 17px; height: 17px; } }

/* ===== Thanh menu dưới trên điện thoại ===== */
.tabbar { display: none; }
@media (max-width: 700px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .tabbar { position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 2px; min-height: 48px; padding: 4px 2px; color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.2; text-decoration: none; transition: color .2s var(--ease); }
  .tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar [aria-current="page"] { color: var(--ink); }
  .tabbar [aria-current="page"] svg { stroke-width: 2.2; }
  .tabbar .tab-add { color: var(--ink); }
  .tabbar .tab-add i { display: grid; place-items: center; width: 46px; height: 46px; margin-top: -18px; border-radius: 50%; background: var(--y); color: var(--ink); box-shadow: 0 8px 18px -8px rgba(28, 40, 44, .45); transition: transform .2s var(--ease); }
  .tabbar .tab-add:active i { transform: scale(.94); }
  .tabbar .tab-add svg { width: 24px; height: 24px; stroke-width: 2.2; }
  #toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .site-header .hd-add { display: none; }
}


/* Danh sách ảnh trong form: đổi vị trí và xóa từng ảnh */
.preview-row .pv { position: relative; width: 96px; height: 120px; border-radius: var(--r-sm); overflow: hidden; background: var(--hair); }
.preview-row .pv img { width: 100%; height: 100%; border-radius: 0; }
.pv-cover { position: absolute; left: 6px; top: 6px; padding: 1px 8px; border-radius: 999px; background: var(--y); color: var(--ink); font-size: 11px; font-weight: 700; }
.pv-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 4px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.pv-bar button { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--ink); transition: background-color .2s var(--ease), opacity .2s; }
.pv-bar button:hover { background: var(--surface); }
.pv-bar button:disabled { opacity: .35; cursor: default; }
.pv-bar button[data-pv="del"]:hover { background: #fde3e8; color: #b3202b; }
.pv-bar svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Trang chủ: chọn theo máy ảnh / giả lập phim, danh sách tác giả gọn */
.pick-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { display: inline-flex; align-items: baseline; gap: 8px; min-height: 40px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; transition: background-color .25s var(--ease), border-color .25s var(--ease), transform .2s var(--ease); }
.pick b { font-weight: 700; }
.pick small { color: var(--muted); font-size: 12px; font-weight: 600; }
.pick:hover { background: var(--ct); border-color: #b9dbe4; }
.pick:active { transform: scale(.98); }
.pick-sub { margin: 18px 0 10px; color: var(--muted); font-size: 13px; font-weight: 700; }
.creator-row { display: flex; flex-wrap: wrap; gap: 10px; }
.creator-pill { display: inline-flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 18px 8px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; transition: background-color .25s var(--ease), border-color .25s var(--ease); }
.creator-pill:hover { background: var(--ct); border-color: #b9dbe4; }
.creator-pill .av-sm { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--y); color: var(--ink); font-size: 14px; font-weight: 700; }
.creator-pill b { display: block; font-size: 14px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.creator-pill small { display: block; color: var(--muted); font-size: 12px; line-height: 1.25; }
@media (max-width: 700px) {
  .creator-row, .pick-row { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scroll-padding-inline: 16px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .creator-row::-webkit-scrollbar, .pick-row::-webkit-scrollbar { display: none; }
  .creator-pill, .pick { flex: none; scroll-snap-align: start; }
}

/* Số lượt yêu thích cạnh nút tim trên thẻ */
.bm-n { font-size: 12.5px; font-weight: 700; line-height: 1; }
.bm-n:empty { display: none; }
.bm.fav:has(.bm-n:not(:empty)) { display: inline-flex; align-items: center; justify-content: center; width: auto; min-width: 36px; padding: 0 10px; gap: 5px; border-radius: 999px; }

/* Ảnh người dùng chụp bằng công thức */
.shots { margin-top: 28px; }
.shots .sec-head { margin-bottom: 10px; }
.shots .sec-head h2 small { margin-left: 6px; color: var(--muted); font-size: 14px; font-weight: 600; }
.shots .pill-line { min-height: 38px; padding: 4px 16px; font-size: 13.5px; }
.shots .pill-line svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.shot-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.shot2 { position: relative; margin: 0; min-width: 0; }
.shot2-img { display: block; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--r-sm); background: var(--hair); cursor: zoom-in; }
.shot2-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.shot2-img:hover img { transform: scale(1.04); }
.shot2 figcaption { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.shot2 figcaption span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot2 figcaption em { flex: none; padding: 1px 8px; border-radius: 999px; background: var(--y-soft); color: var(--ink); font-size: 11.5px; font-style: normal; font-weight: 700; }
.shot2-del { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--ink); transition: background-color .2s var(--ease), color .2s var(--ease); }
.shot2-del:hover { background: #fde3e8; color: #b3202b; }
.shot2-del svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.shot-form { display: grid; gap: 10px; max-width: 460px; margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.shot-form[hidden] { display: none; }
.shot-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.shot-form .btn-teal { justify-self: start; }
@media (max-width: 700px) { .shot-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .shot2 figcaption { font-size: 11.5px; } }

/* Giãn khoảng cách trang công thức cho thoáng (cân bằng lại so với bản gọn) */
.detail-grid { gap: 44px; }
.dg-left .thumbs { margin-top: 14px; }
.dg-left .credit-line { margin-top: 14px; }
.card2 { margin-top: 20px; padding: 18px 20px 16px; }
.card2 h2, .card2 .sec-head { margin-bottom: 12px; }
.tiles2 { gap: 10px; }
.tile2 { gap: 12px; padding: 10px 14px; }
.tile2 .ti { width: 34px; height: 34px; }
.gear { margin-top: 18px; gap: 10px 12px; }
.grp { margin: 18px 0 8px; }
.shots { margin-top: 56px; padding-top: 4px; }
.shots .sec-head { margin-bottom: 16px; }
.shot-row { gap: 16px; }
.block:has(#rel-title) { padding-top: 48px; }
@media (max-width: 700px) {
  .detail-grid { gap: 28px; }
  .card2 { padding: 16px 16px 14px; }
  .tiles2 { gap: 8px; }
  .tile2 { padding: 8px 10px; }
  .shots { margin-top: 40px; }
  .shot-row { gap: 10px; }
}
@media (max-width: 440px) { .tile2 { gap: 8px; padding: 8px 10px; } }
.shot2 figcaption { display: grid; gap: 2px; }
.shot2 figcaption > div { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.shot2-cap { color: var(--ink); font-size: 13px; font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Màn hình cần đăng nhập (Thêm công thức, Quản trị) */
.gate { display: grid; justify-items: center; gap: 14px; max-width: 560px; margin: 36px auto 0; padding: 36px 32px 28px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); text-align: center; }
.gate-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--y); color: var(--ink); }
.gate-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gate h1 { font-size: clamp(22px, 3vw, 28px); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.gate-lead { max-width: 44ch; color: var(--muted); }
.gate-steps { display: grid; gap: 10px; width: 100%; margin: 8px 0 4px; padding: 0; list-style: none; counter-reset: gs; text-align: left; }
.gate-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 12px; align-items: start; padding: 10px 14px; border-radius: var(--r-sm); background: var(--bg); counter-increment: gs; }
.gate-steps li::before { content: counter(gs); grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.gate-steps b { font-size: 14px; font-weight: 700; }
.gate-steps span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.gate-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.gate-actions:empty { display: none; }
.gate-back { color: var(--muted); font-size: 13.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #c9ced1; transition: color .2s var(--ease); }
.gate-back:hover { color: var(--cd); }
@media (max-width: 700px) {
  .gate { margin-top: 16px; padding: 28px 18px 22px; }
  .gate-actions { width: 100%; }
  .gate-actions > * { flex: 1 1 100%; }
}

/* Ảnh đại diện */
.avatar { overflow: hidden; }
.avatar img, .avatar-lg img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-lg { overflow: hidden; }
.avatar-row { display: flex; align-items: center; gap: 18px; }
.avatar-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.avatar-acts .btn-line { cursor: pointer; }
.avatar-acts .btn-line svg { width: 18px; height: 18px; }
.acct-head { margin-bottom: 20px; }
/* Nút Google do Google vẽ trong khung riêng: căn giữa và cho rộng bằng biểu mẫu (tối đa 400px) */
.g-slot { justify-items: center; }
.g-slot > div { max-width: 100%; }
/* Avatar tác giả (ảnh thành viên hoặc logo của trang) */
.av-sm, .avatar-lg { overflow: hidden; }
.av-sm img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
/* Logo của trang cũng cắt tròn như mọi avatar khác, phóng nhẹ để lấp đầy vòng tròn */
.is-logo img { object-fit: cover; transform: scale(1.12); }

/* Chọn thẻ chủ đề */
.tag-picker { display: grid; gap: 8px; }
.tg-h { margin-top: 6px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.tg-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tg-row .chip, .tg-row .pick { min-height: 36px; padding: 4px 14px; font-size: 13.5px; }
.adm-presets .pick { cursor: default; }
.adm-presets .pick:hover { background: var(--surface); border-color: var(--line); }

/* Nút thẻ: căn giữa theo chiều dọc, khoảng cách các nhóm đều nhau */
.pick, .tg-row .chip { display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1.2; }
.pick b, .pick small { line-height: 1.2; }
.tg-h { margin: 16px 0 8px; }
.tg-h:first-child { margin-top: 4px; }
.tag-picker { gap: 0; }
.tag-picker .field-title { margin-bottom: 2px; }
.tag-picker > label { margin-top: 16px; }
.tag-picker > .hint { margin-top: 8px; }
.adm-presets .tg-row { margin-bottom: 4px; }

/* Trang đăng công thức: chia khối rõ ràng, phần phụ thu gọn */
.fsec { display: grid; gap: 14px; }
.fsec + .fsec { margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--line); }
.fsec-h { font-size: 16px; font-weight: 800; letter-spacing: -.005em; }
.fsec-h small { margin-left: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.fsec-h2 { margin-top: 8px; color: var(--cd); font-size: 13px; font-weight: 800; }
.fsec-h2:first-child { margin-top: 0; }
.fmore > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; list-style: none; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--ink); transition: color .2s var(--ease); }
.fmore > summary::-webkit-details-marker { display: none; }
.fmore > summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--hair); font-size: 15px; line-height: 1; transition: background-color .2s var(--ease); }
.fmore[open] > summary::before { content: "–"; }
.fmore > summary:hover { color: var(--cd); }
.fmore > summary small { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.fmore[open] > summary { margin-bottom: 14px; }
.fextra { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); }
.fextra + .fsec, .fsec + .fextra { margin-top: 26px; }
.fsec.fextra { padding-top: 16px; border-top: 1px solid var(--line); }
.tag-picker { display: grid; gap: 12px; }
.tag-picker .fmore { margin-top: 2px; }
.tag-picker .tg-h:first-of-type { margin-top: 0; }
.crop-box { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); display: grid; gap: 10px; }

/* Bảng chỉnh: bấm từng thông số để đánh dấu đã chỉnh */
button.tile2 { display: flex; align-items: center; width: 100%; border: 1px solid transparent; text-align: left; cursor: pointer; transition: background-color .25s var(--ease), border-color .25s var(--ease); }
button.tile2:hover { border-color: var(--line); }
.tile-txt { display: block; flex: 1; min-width: 0; }
.tile2 .ck { flex: none; width: 22px; height: 22px; margin-left: auto; border: 1.5px solid #c9ced1; border-radius: 50%; background: var(--surface) center / 13px no-repeat; transition: background-color .25s var(--ease), border-color .25s var(--ease); }
.tile2[aria-pressed="true"] { background: var(--ct); border-color: #b9dbe4; }
.tile2[aria-pressed="true"] .ck { border-color: var(--cd); background-color: var(--cd); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E"); }
.sec-acts { display: flex; align-items: center; gap: 14px; }
.sec-head h2 small { margin-left: 6px; color: var(--cd); font-size: 13px; font-weight: 700; }
.set-hint { margin: -4px 0 10px; }

/* Phần "Thông tin thêm" khi đóng không còn khoảng trống thừa bên dưới */
.fextra { gap: 0; align-items: center; }
.fextra[open] { gap: 0; }
.fextra > summary { align-items: center; }
.fextra[open] > summary { margin-bottom: 14px; }

/* Mặc định chỉ xem; chỉ khi bấm "Đánh dấu khi chỉnh" mới hiện ô tích */
#settings:not(.tick) .tile2 { cursor: default; pointer-events: none; }
#settings:not(.tick) .tile2 .ck { display: none; }
#settings:not(.tick) .tile2[aria-pressed="true"] { background: var(--paper); border-color: transparent; }
#settings.tick .tile2 { cursor: pointer; }
#set-mode[aria-pressed="true"] { color: var(--cd); text-decoration-color: var(--cd); }
[hidden] { display: none !important; }
.card2 .sec-head .sec-acts, .card2 .sec-head h2 { white-space: nowrap; }
.sec-acts .link-button { min-height: 32px; }

/* Safari: giữ bo góc ảnh chính và không để hàng ảnh nhỏ co lại khi ảnh chưa tải xong */
.stage-photo { isolation: isolate; clip-path: inset(0 round var(--r-md)); -webkit-transform: translateZ(0); }
.thumbs { min-height: 60px; }
.thumbs button { background: var(--hair); }

/* Cột thông số cuộn cùng trang (không còn khung cuộn riêng), để rê chuột vào ảnh hay thông số đều cuộn giống nhau */
.dg-right { position: static; max-height: none; overflow: visible; padding-right: 0; }

/* Mục ảnh người dùng: tiêu đề tự xuống dòng, nút không tràn khung khi màn hình hẹp */
.shots .sec-head { flex-wrap: wrap; gap: 10px 16px; }
.shots .sec-head h2 { flex: 1 1 200px; min-width: 0; white-space: normal; }
.shots .pill-line { flex: none; }
html, body { overflow-x: clip; }

/* Trang công thức (máy tính): cả trang cuộn chung, chỉ khung ảnh bên trái đứng yên khi cuộn thông số bên phải */
@media (min-width: 901px) {
  .dg-left { position: sticky; top: calc(var(--header) + 16px); align-self: start; }
  .dg-left .stage-photo { max-height: max(320px, calc(100vh - var(--header) - 200px)); }
}

/* ===== Header nổi bo tròn và footer khối nổi (mẫu D + phương án 1) ===== */
:root { --header: 84px; }
.site-header { position: sticky; top: 0; z-index: 30; padding: 10px 16px 0; background: none !important; border: 0 !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.site-header::after { display: none; }
.hd { width: min(1180px, 100%); height: 64px; margin: 0 auto; padding: 0 10px 0 12px; gap: 12px; background: rgba(255, 255, 255, .94); border: 1px solid var(--line); border-radius: 999px; -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); }
.hd .lg { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.site-header .hd-nav { margin-left: 8px; gap: 4px; }
.site-header .hd-nav a { padding: 9px 16px; border-radius: 999px; color: var(--muted); }
.site-header .hd-nav a::after { display: none !important; }
.site-header .hd-nav a:hover { background: var(--hair); color: var(--ink); }
.site-header .hd-nav a[aria-current] { background: var(--hair); color: var(--ink); }
.hd-search { width: 220px; height: 42px; background: var(--bg); border-color: transparent; }
.hd-search:focus-within { background: var(--surface); border-color: var(--cd); }
.hd-cta { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; background: var(--y); color: var(--ink); font-size: 14.5px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background-color .25s var(--ease), transform .2s var(--ease); }
.hd-cta svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; }
.hd-cta:hover { background: #f0ad24; }
.hd-cta:active { transform: scale(.97); }
.hd-login { min-height: 44px; padding: 6px 22px; }
@media (max-width: 1100px) { .hd-search { width: 170px; } }
@media (max-width: 700px) {
  :root { --header: 72px; }
  .site-header { padding: 8px 12px 0; }
  .hd { height: 56px; padding: 0 8px 0 10px; }
  .hd .lg { width: 38px; height: 38px; }
  .hd-cta { display: none; }
}
/* Footer: dải mời đóng góp và khối trắng bo góc lớn */
.site-footer { margin-top: 56px; padding: 0 0 28px; background: none; border: 0; color: var(--ink); }
.site-footer .wrap { padding-top: 0; padding-bottom: 0; }
.foot-cta { display: flex; align-items: center; justify-content: space-between; gap: 18px 24px; flex-wrap: wrap; margin-bottom: 16px; padding: 26px 32px; border-radius: 28px; background: var(--y-soft); }
.foot-cta b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.foot-cta span { display: block; margin-top: 2px; color: #6a5b33; font-size: 14.5px; }
.btn-dark { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background-color .25s var(--ease), transform .2s var(--ease); }
.btn-dark svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; }
.btn-dark:hover { background: #3a4046; }
.btn-dark:active { transform: scale(.97); }
.foot-card { padding: 36px 36px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; }
.foot-card .foot-top { gap: 36px; }
.foot-card .foot-bottom { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 700px) {
  .site-footer { margin-top: 40px; }
  .foot-cta { padding: 22px 20px; border-radius: 24px; }
  .foot-cta .btn-dark { width: 100%; }
  .foot-card { padding: 24px 20px 16px; border-radius: 24px; }
}
/* Dải vàng trang chủ chạy lên phía sau header nổi */
.hero2.h3 .h3-band { margin-top: calc(-1 * var(--header)); padding-top: calc(var(--header) + 40px); }
@media (max-width: 700px) { .hero2.h3 .h3-band { padding-top: calc(var(--header) + 20px); } }
.foot-cta .btn-dark span { display: inline; margin: 0; color: #fff; font-size: inherit; }
@media (max-width: 700px) { .foot-card .foot-top .foot-col:last-child { grid-column: 1 / -1; } .foot-card .foot-text { max-width: none; } }

/* Ô nhập nằm bên trong khung tìm kiếm: không tự có viền, bóng hay nền; khung ngoài mới đổi viền khi chọn */
.find input, .find input:hover, .find input:focus,
.hd-search input, .hd-search input:hover, .hd-search input:focus { border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: none; }
.find, .hd-search { transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease); }
.find:focus-within { outline: none; border-color: var(--cd); box-shadow: 0 0 0 3px rgba(13, 116, 144, .16); }
.hd-search:focus-within { background: var(--surface); border-color: var(--cd); box-shadow: 0 0 0 3px rgba(13, 116, 144, .14); }

/* Khoảng cách phía trên chân trang: gọn, đồng bộ với các khối khác */
.wrap.page { padding-bottom: 32px; }
.site-footer { margin-top: 24px; }
@media (max-width: 700px) { .wrap.page { padding-bottom: 24px; } .site-footer { margin-top: 16px; } }

/* Safari tự vẽ ô tìm kiếm kiểu riêng (nền và viền xám bên trong): tắt hẳn để chỉ còn khung của trang */
input[type="search"], .find input, .hd-search input { -webkit-appearance: none; appearance: none; background-color: transparent; background-image: none; }
input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-results-button, input[type="search"]::-webkit-search-results-decoration { -webkit-appearance: none; display: none; }
.find input[type="search"], .hd-search input[type="search"] { border: 0; box-shadow: none; outline: none; -webkit-box-shadow: none; }
.find input:-webkit-autofill, .hd-search input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #fff inset; }
.pick.mine { border-color: var(--cd); background: var(--ct); }
.pick.mine small { color: var(--cd); }

/* Máy ảnh của tôi: hình thân máy, bảng ô C1–C7 */
.camart svg { display: block; width: 100%; height: auto; }
.cam-tab { display: grid; gap: 16px; max-width: 720px; }
.cam-hero { display: flex; align-items: center; gap: 20px; flex-direction: row; }
.cam-hero .camart { width: 200px; flex: none; }
.cam-hero small, .camcard small { display: block; color: var(--muted); font-size: 13px; }
.cam-prev-name { font-size: 18px; }
.pickset { display: grid; gap: 8px; }
.pickset .lbl { font-size: 13px; color: var(--muted); }
.pickset .opts { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent; background: linear-gradient(135deg, var(--sw2) 0 40%, var(--sw) 40% 100%); box-shadow: 0 0 0 1px rgba(0,0,0,.12); cursor: pointer; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.cslot { display: grid; grid-template-columns: 34px 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.cslot:first-child { border-top: 0; }
.slot-k { font-size: 15px; }
.slot-ph { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--line); display: block; }
.slot-ph .photo, .slot-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cslot select { min-width: 0; width: 100%; }
.cslot .btn-line[disabled] { opacity: .4; cursor: default; }
.camcard { display: flex; align-items: center; gap: 16px; padding: 14px 18px; background: var(--paper); border-radius: 14px; width: fit-content; max-width: 100%; margin-bottom: 20px; }
.camcard .camart { width: 120px; flex: none; }
.camcard b { font-size: 16px; }
.creator-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 8px 0 14px; }
.creator-bar .acct-h { margin: 0; }
.sort-sel { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
@media (max-width: 560px) { .cam-hero { flex-direction: column; align-items: flex-start; } .cam-hero .camart { width: 100%; max-width: 260px; } .cslot { grid-template-columns: 30px 40px minmax(0, 1fr); } .cslot .btn-line { grid-column: 2 / -1; } }
.rc-author { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 13px; font-weight: 600; color: var(--ink); min-width: 0; }
.rc-author span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-author .av-sm { width: 24px; height: 24px; font-size: 11px; flex: none; }
.sort-sel span { white-space: nowrap; } .sort-sel select { width: auto; min-width: 140px; }

/* Nền hero trang chủ: gradient ấm, vài vệt sáng, ảnh mẫu nghiêng hai bên, ô tìm kiếm nổi */
.h3-band { position: relative; overflow: hidden; background: radial-gradient(900px 420px at 50% -10%, #fff6dc 0, transparent 70%), radial-gradient(520px 360px at 8% 90%, #f6cf86 0, transparent 70%), radial-gradient(520px 360px at 95% 20%, #f3b98a 0, transparent 70%), #f8e7bd; }
.h3-band::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(120,80,20,.13) 1px, transparent 1.4px); background-size: 22px 22px; mask-image: linear-gradient(#000, transparent 85%); -webkit-mask-image: linear-gradient(#000, transparent 85%); pointer-events: none; }
.h3-main { position: relative; z-index: 2; }
.h3-deco { position: absolute; inset: 0; pointer-events: none; }
.dc { position: absolute; display: block; width: 150px; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; border: 5px solid #fff; box-shadow: 0 14px 30px rgba(90,55,10,.22); }
.dc .photo { display: block; width: 100%; height: 100%; }
.dc .photo img, .dc .photo svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.dc em { position: absolute; left: 8px; bottom: 8px; font-style: normal; font-size: 11px; font-weight: 700; background: rgba(255,255,255,.92); color: #1c1f23; padding: 2px 8px; border-radius: 999px; }
.dc1 { left: 3%; top: 70px; transform: rotate(-8deg); }
.dc2 { left: 13%; top: 190px; width: 120px; transform: rotate(6deg); }
.dc3 { left: 1%; top: 330px; width: 110px; transform: rotate(-4deg); }
.dc4 { right: 3%; top: 60px; transform: rotate(7deg); }
.dc5 { right: 14%; top: 190px; width: 120px; transform: rotate(-6deg); }
.dc6 { right: 1%; top: 330px; width: 110px; transform: rotate(5deg); }
.dc7, .dc8 { display: none; }
.h3 .find { background: var(--surface); border: 0; box-shadow: 0 10px 30px rgba(120,70,10,.18), 0 0 0 4px rgba(255,255,255,.55); }
.h3 .chip-sm { box-shadow: 0 2px 8px rgba(120,70,10,.12); border: 0; }
.h3-band h1 { text-shadow: 0 1px 0 rgba(255,255,255,.5); }
@media (max-width: 1180px) { .dc2, .dc5, .dc3, .dc6 { display: none; } .dc1, .dc4 { width: 110px; top: 60px; } }
@media (max-width: 820px) { .dc { display: none; } .h3-band { background: radial-gradient(520px 300px at 50% -10%, #fff6dc 0, transparent 70%), radial-gradient(360px 260px at 90% 100%, #f3b98a 0, transparent 70%), #f8e7bd; } }

/* Hero kiểu ảnh polaroid trên nền giấy kem */
.h3-band { background: radial-gradient(700px 320px at 50% 0, var(--hero-hi) 0, transparent 70%), var(--hero-bg); min-height: 430px; }
.h3-band::before { display: none; }
.h3-band h1 { color: var(--ink); text-shadow: none; }
.h3-band .hero-sub { color: var(--muted); }
.dc { width: 150px; aspect-ratio: auto; border: 0; border-radius: 3px; background: var(--surface); padding: 8px 8px 34px; box-shadow: 0 12px 24px rgba(60,40,10,.22); overflow: visible; }
.dc .photo { aspect-ratio: 1; height: auto; overflow: hidden; display: block; }
.dc em { left: 0; right: 0; bottom: 9px; text-align: center; background: none; padding: 0; font-size: 11.5px; font-weight: 700; color: #444; }
.dc1 { left: 4%; top: 80px; transform: rotate(-9deg); }
.dc2 { left: 15%; top: auto; bottom: 36px; width: 120px; transform: rotate(6deg); }
.dc4 { right: 4%; top: 84px; transform: rotate(8deg); }
.dc5 { right: 15%; top: auto; bottom: 36px; width: 120px; transform: rotate(-6deg); }
.h3 .find { box-shadow: 0 6px 20px rgba(60,40,10,.2); border: 0; }
@media (max-width: 1180px) { .dc2, .dc5 { display: none; } .dc1, .dc4 { display: block; width: 120px; top: 70px; } }
@media (max-width: 820px) { .dc, .dc1, .dc4 { display: none; } .h3-band { min-height: 0; background: radial-gradient(520px 260px at 50% 0, var(--hero-hi) 0, transparent 70%), var(--hero-bg); } }

/* ===== Thiết kế phẳng, đồng bộ toàn site =====
   Bề mặt trắng, viền mảnh, không đổ bóng, bo góc cùng cỡ. Hover đổi màu viền, không nhấc thẻ. */
:root { --surface: #fff; --hover: #f1ece0; --hero-bg: #efe6d6; --hero-hi: #fbf4e6; --strong: #23272b; --on-strong: #fff; --bg: #f6f4ee; --paper: #fff; --card: #fff; --line: #e6e1d4; --hair: #eee9dd; --lift: none; --flat-line: #e6e1d4; --flat-line-hi: #1c1f23; }
body { background: var(--bg); }
.rc, .hc, .panel, .spec-card, .settings.flat, .made-by, .creator-card, .card2, .cam-tile, .tile, .tile2, .faq details, .howto, .pop, .mine-card, .camcard { background: var(--surface); border: 1px solid var(--flat-line); box-shadow: none; }
.tile2 { background: var(--surface); }
.rc:hover, .creator-card:hover, .cam-tile:hover, .card2:hover, .mine-card:hover { transform: none; box-shadow: none; border-color: var(--flat-line-hi); }
.rc .photo img, .rc .photo svg { transform: none !important; }
.rc:hover .photo img { transform: none !important; }
.chip, .chip-sm, .mood, .tags button, .pill-line, .btn-line, .lang, .round-btn, .creator-pill { background: var(--surface); border: 1px solid var(--flat-line); box-shadow: none; }
.chip:hover, .chip-sm:hover, .mood:hover, .tags button:hover, .pill-line:hover, .btn-line:hover, .creator-pill:hover { border-color: var(--flat-line-hi); background: var(--surface); }
.chip[aria-pressed="true"], .chip[aria-selected="true"], .chip.on, .chip-sm.on, .mood.on, .tags button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill-dark:hover, .pill-red:hover, .btn-teal:hover { box-shadow: none; }
input, select, textarea { background-color: var(--surface); border: 1px solid var(--flat-line); box-shadow: none; }
input:focus, select:focus, textarea:focus { border-color: var(--flat-line-hi); box-shadow: none; }
.find, .hd-search { background: var(--surface); border: 1px solid var(--flat-line); box-shadow: none; }
.find:focus-within, .hd-search:focus-within { border-color: var(--flat-line-hi); box-shadow: none; }
.site-header, .hd, .header-pill { box-shadow: none; }
.circ, .cat:hover .circ { box-shadow: none; border: 1px solid var(--flat-line); }
.cat:hover .circ { border-color: var(--flat-line-hi); }
.swatch, .swatch[aria-pressed="true"] { box-shadow: none; border: 2px solid #fff; outline: 1px solid var(--flat-line); }
.swatch[aria-pressed="true"] { outline: 2px solid var(--ink); }
/* hero */
.h3 .find { box-shadow: none; border: 1px solid var(--flat-line); }
.h3 .chip-sm { box-shadow: none; border: 1px solid var(--flat-line); }
.dc { box-shadow: none; border: 1px solid #ddd3bd; border-radius: 6px; }
.h3-band { background: var(--hero-bg); }
.h3-band::before { display: none; }
/* dialog, menu nổi: chỉ viền */
dialog, .pop, .menu, .sug, .suggest { box-shadow: none; border: 1px solid var(--flat-line); }
dialog::backdrop { background: rgba(28, 31, 35, .45); }
@media (hover: none) { .rc:hover { border-color: var(--flat-line); } }
/* Sửa: hover không đổi viền đen; ô tìm kiếm ở trang thư viện nền trắng */
:root { --flat-line-hi: #cfc8b6; }
.rc:hover, .creator-card:hover, .cam-tile:hover, .card2:hover, .mine-card:hover, .chip:hover, .chip-sm:hover, .mood:hover, .tags button:hover, .pill-line:hover, .btn-line:hover, .creator-pill:hover, .cat:hover .circ { border-color: var(--flat-line); }
input#q[type="search"] { background-color: var(--surface); border: 1px solid var(--flat-line); }
input#q[type="search"]:focus { border-color: #cfc8b6; }
/* Hover dịu: nền be ấm hiện dần, nút bấm lún nhẹ, thẻ chỉ đổi màu tiêu đề và sáng ảnh */
.chip, .chip-sm, .mood, .tags button, .pill-line, .btn-line, .creator-pill, .lang, .round-btn, .cam-tile, .pick, .cat, .bm, .hd-cta, .pill-dark, .btn-teal, .pill-red, nav a, .site-header a { transition: background-color .22s ease, color .22s ease, border-color .22s ease, transform .12s ease; }
.chip:not([aria-pressed="true"]):not([aria-selected="true"]):hover, .chip-sm:hover, .mood:hover, .tags button:not([aria-pressed="true"]):hover, .pill-line:hover, .btn-line:hover, .creator-pill:hover, .cam-tile:hover, .pick:hover { background: var(--hover); border-color: var(--flat-line); }
.chip[aria-pressed="true"]:hover, .chip[aria-selected="true"]:hover { background: #3a3f46; border-color: #3a3f46; }
.pill-dark:hover, .btn-teal:hover, .pill-red:hover { background: #3a3f46; border-color: #3a3f46; }
.bm:hover { background: var(--hover); }
.site-header nav a:hover, .site-header .nav a:hover { background: var(--hover); }
.pill-dark:active, .btn-teal:active, .pill-line:active, .btn-line:active, .chip:active, .chip-sm:active, .bm:active { transform: scale(.97); }
.rc:hover, .creator-card:hover { background: var(--surface); border-color: var(--flat-line); }
.rc:hover h3, .rc:hover .rc-link { color: #8a5a14; }
.rc .photo img, .rc .photo svg { transition: filter .3s ease; }
.rc:hover .photo img, .rc:hover .photo svg { filter: brightness(1.05) saturate(1.05); transform: none !important; }
.cat:hover .circ { border-color: var(--flat-line); }
.cat:hover span:last-child { color: #8a5a14; }
.link-arrow:hover, .link-button:hover { color: #8a5a14; }
.dc2, .dc5 { bottom: 120px; }
.glink-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--flat-line); border-radius: 14px; font-weight: 500; }

/* ===== Giao diện tối ===== */
:root[data-theme="dark"] { color-scheme: dark; --bg: #121416; --paper: #1b1e22; --card: #1b1e22; --surface: #1b1e22; --ink: #eceef0; --muted: #a0a7ae; --line: #2b3036; --hair: #23272c; --flat-line: #2e3339; --flat-line-hi: #3d444b; --hover: #262b30; --hero-bg: #26231d; --hero-hi: #322d24; --strong: #eceef0; --on-strong: #14161a; --y-soft: #3a3020; --ct: #16303a; --accent: #eceef0; --accent-hover: #fff; --accent-ink: #14161a; --accent-deep: #5cc8e3; --cd: #5cc8e3; --chip: #5cc8e3; --focus: #5cc8e3; }
:root[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
:root[data-theme="dark"] :is(.skip, .pill-dark, .pill-red, .btn-teal, .btn-dark, .avatar, .avatar-lg, .av-sm, .lang button[aria-pressed="true"], .mood:hover, .chip[aria-pressed="true"], .chip[aria-selected="true"], .chip.on, .chip-sm.on, .mood.on, .tags button[aria-pressed="true"], .icon-act[aria-pressed="true"], .bm[aria-pressed="true"], .mode-seg a[aria-current], .find b) { background: var(--strong); border-color: var(--strong); color: var(--on-strong); }
:root[data-theme="dark"] :is(.pill-dark, .pill-red, .btn-teal, .btn-dark):hover { background: #fff; border-color: #fff; }
:root[data-theme="dark"] .chip[aria-pressed="true"]:hover, :root[data-theme="dark"] .chip[aria-selected="true"]:hover { background: #fff; border-color: #fff; }
:root[data-theme="dark"] .pill-line, :root[data-theme="dark"] .btn-line { color: var(--ink); }
:root[data-theme="dark"] .rc:hover h3, :root[data-theme="dark"] .rc:hover .rc-link, :root[data-theme="dark"] .cat:hover span:last-child, :root[data-theme="dark"] .link-arrow:hover, :root[data-theme="dark"] .link-button:hover { color: var(--y); }
:root[data-theme="dark"] .find span, :root[data-theme="dark"] .find { color: var(--ink); }
:root[data-theme="dark"] input::placeholder, :root[data-theme="dark"] textarea::placeholder { color: #7d848b; }
:root[data-theme="dark"] .hero-sub, :root[data-theme="dark"] .try, :root[data-theme="dark"] .works span { color: var(--muted); }
:root[data-theme="dark"] .dc { background: #f4f0e6; border-color: #3a352b; }
:root[data-theme="dark"] .dc em { color: #3a352b; }
:root[data-theme="dark"] .site-header, :root[data-theme="dark"] .hd { border-color: var(--flat-line); }
:root[data-theme="dark"] .site-footer { background: #0d0f11; }
:root[data-theme="dark"] img, :root[data-theme="dark"] video { filter: brightness(.92); }
:root[data-theme="dark"] .camart svg, :root[data-theme="dark"] .photo svg { filter: none; }
:root[data-theme="dark"] .notice { background: var(--hover); color: var(--ink); }
:root[data-theme="dark"] .notice.good { background: #12301f; color: #8fe0b4; }
:root[data-theme="dark"] .notice.bad { background: #3a1a1c; color: #ffb0b5; }
:root[data-theme="dark"] dialog { background: var(--surface); color: var(--ink); }
/* nút đổi giao diện */
.theme-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--flat-line); background: var(--surface); color: var(--ink); transition: background-color .2s ease; }
.theme-btn:hover { background: var(--hover); }
.theme-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .i-sun { display: none; } :root[data-theme="dark"] .theme-btn .i-sun { display: block; } :root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (max-width: 720px) { .hd-right .theme-btn { display: none; } }
/* tối: các lớp nền trắng bán trong suốt */
:root[data-theme="dark"] :is(.site-header, .hd) { background: rgba(27, 30, 34, .94); }
:root[data-theme="dark"] :is(.rc-likes, .stage-nav, .count, .pv-bar button, .shot2-del, .cam) { background: rgba(27, 30, 34, .92); color: var(--ink); }
:root[data-theme="dark"] :is(.mz .cap, .pt .cap, .banner-cap) { background: rgba(27, 30, 34, .94); }
:root[data-theme="dark"] .tabbar { background: rgba(27, 30, 34, .97); border-color: var(--flat-line); }
:root[data-theme="dark"] .h3 .find { box-shadow: none; }
:root[data-theme="dark"] .h3-band h1 { text-shadow: none; }
.name-dup { color: var(--bad); font-weight: 600; }
body.on-home .hd-search, body.on-home #search-btn, body.on-home .hd-search-toggle { display: none !important; }
body.on-home .hd-right { margin-left: auto; }

/* ===== Bỏ viền: tách lớp bằng màu nền, không dùng đường kẻ ===== */
:root { --flat-line: transparent; --flat-line-hi: transparent; --field: #f2efe7; --hover: #ece8dd; }
:root[data-theme="dark"] { --flat-line: transparent; --flat-line-hi: transparent; --field: #252a30; --hover: #2a3036; }
.hd, .site-header { border-color: transparent; }
.tabbar { border-top-color: var(--hair); }
/* ô nhập và nút viền nằm trên nền trắng: dùng nền xám be nhạt thay cho viền */
input, select, textarea, input#q[type="search"] { background-color: var(--field); border-color: transparent; }
input:focus, select:focus, textarea:focus, input#q[type="search"]:focus { border-color: transparent; background-color: var(--field); box-shadow: inset 0 0 0 2px var(--ink); }
.find, .hd-search { background: var(--surface); border-color: transparent; }
.find:focus-within, .hd-search:focus-within { border-color: transparent; box-shadow: none; }
.hd-search { background: var(--field); }
.h3 .find, .h3 .chip-sm { border: 0; }
.pill-line, .btn-line { background: var(--field); border-color: transparent; }
.pill-line:hover, .btn-line:hover { background: var(--hover); }
.panel :is(.chip, .chip-sm, .mood, .tags button), .card2 :is(.chip, .chip-sm), .acct-panel :is(.chip) { background: var(--field); }
.panel :is(.chip, .chip-sm, .mood, .tags button):hover { background: var(--hover); }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { border-color: transparent; }
.round-btn, .lang, .theme-btn { background: var(--field); border-color: transparent; }
.lang button[aria-pressed="true"] { background: var(--strong); }
.rc, .creator-card, .cam-tile, .card2, .mine-card, .panel, .camcard, .faq details, .howto { border-color: transparent; }
.cam-tile { background: var(--surface); }
.dc { border-color: transparent; }
.circ, .swatch { border-color: transparent; outline: 0; }
.swatch[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.glink-banner, dialog, .pop, .menu, .sug, .suggest { border-color: transparent; }
.cslot { border-top-color: var(--hair); }
/* Sửa màu ô nhập: trên nền trang thì trắng; trong khung trắng thì xám be; ô tìm ở thanh đầu giữ màu khi bấm vào */
input, select, textarea, input#q[type="search"] { background-color: var(--surface); }
input:focus, select:focus, textarea:focus, input#q[type="search"]:focus { background-color: var(--surface); }
:is(.panel, .card2, dialog, .acct-panel .settings, .settings.flat, .pop) :is(input, select, textarea) { background-color: var(--field); }
:is(.panel, .card2, dialog, .settings.flat, .pop) :is(input, select, textarea):focus { background-color: var(--field); }
.hd-search, .hd-search:hover, .hd-search:focus-within { background: var(--field); border-color: transparent; box-shadow: none; }
.hd-search:focus-within { box-shadow: inset 0 0 0 2px var(--ink); }
.hd-search input, .hd-search input:focus { background: transparent; box-shadow: none; }
.find input, .find input:focus { background: transparent; box-shadow: none; }
:root[data-theme="dark"] .hd-search, :root[data-theme="dark"] .hd-search:focus-within { background: var(--field); }
/* Chân trang: bỏ mọi viền */
.site-footer, .foot-card, .foot-cta, .foot-card .foot-bottom, .foot-bottom { border: 0 !important; }
.foot-card .foot-bottom { margin-top: 22px; }
.lang, .lang.on-dark, .site-header .lang { border: 0 !important; background: var(--field); }
.lang.on-dark button { color: var(--ink); }

/* Dễ đọc hơn: chữ gợi ý trong ô đậm hơn, nhãn ô rõ hơn, nền ô nhạt hơn một chút */
:root { --field: #f4f1ea; --ph: #5c626a; --label: #2f343a; }
:root[data-theme="dark"] { --field: #252a30; --ph: #98a0a8; --label: #d6dade; }
input::placeholder, textarea::placeholder, :root[data-theme="dark"] input::placeholder, :root[data-theme="dark"] textarea::placeholder { color: var(--ph); opacity: 1; }
input, select, textarea { color: var(--ink); font-size: 15.5px; }
.hd-search input::placeholder, .find input::placeholder { color: var(--ph); opacity: 1; }
label { color: var(--label); font-weight: 600; font-size: 14px; }
:is(.panel, .card2, dialog, .settings.flat, .pop) :is(input, select, textarea) { box-shadow: inset 0 0 0 1px rgba(40, 36, 28, .10); }
:root[data-theme="dark"] :is(.panel, .card2, dialog, .settings.flat, .pop) :is(input, select, textarea) { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
:is(.panel, .card2, dialog, .settings.flat, .pop) :is(input, select, textarea):focus { box-shadow: inset 0 0 0 2px var(--ink); }
.hint, .field-hint, small { color: var(--muted); }
