:root {
  --lacquer: #100C07;
  --lacquer-2: #8A6420;
  --bronze: #B8892F;
  --bronze-soft: #F1E3C2;
  --gold-hi: #F6DE9A;
  --gold: #D9B158;
  --gold-deep: #9C7128;
  --gold-grad: linear-gradient(135deg, #FFF4CF 0%, #EBC66E 38%, #C99A3E 62%, #F3D88C 100%);
  --stone: #F7F1E4;
  --paper: #FFFDF8;
  --ink: #1F1810;
  --mute: #6B5D47;
  --line: #E4D5B3;
  --pass: #2F7A4A;
  --pass-bg: #E5F0E5;
  --risk: #A8322A;
  --risk-bg: #F6E4E1;
  --warn: #8A5A12;
  --warn-bg: #F7EBD3;
  --on-lacquer: #F3EAD6;
  --shadow: 0 1px 2px rgba(60, 40, 10, .08), 0 10px 28px rgba(60, 40, 10, .08);
  --glow: 0 0 0 1px rgba(217, 177, 88, .55), 0 18px 60px -12px rgba(217, 177, 88, .45);
  --serif: "Noto Serif Thai", Georgia, serif;
  --sans: "Anuphan", "Sarabun", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --stone: #0E0B07; --paper: #18130C; --ink: #F1E7D2; --mute: #B3A584; --line: #3A2F1E;
    --lacquer: #0A0805; --lacquer-2: #D9B45E; --bronze: #E3C277; --bronze-soft: #3A2E18;
    --pass: #79C995; --pass-bg: #17301F; --risk: #EE8A80; --risk-bg: #3A1D1A; --warn: #E6B867; --warn-bg: #352A16;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
section[id] { scroll-margin-top: 110px; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--stone); color: var(--ink); font: 17px/1.7 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lacquer-2); text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { a { color: var(--bronze); } }
h1, h2, h3 { font-family: var(--serif); line-height: 1.3; margin: 0; font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin-bottom: 1.25rem; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--bronze); outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* buttons */
.btn { font: 600 1rem/1 var(--sans); border-radius: 10px; padding: 14px 20px; border: 1.5px solid transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.sm { padding: 9px 14px; font-size: .9rem; }
.btn.block { width: 100%; }
.btn.primary { background: var(--gold-grad); color: #2A1E0A; box-shadow: 0 6px 18px -6px rgba(201, 154, 62, .6), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn.primary:disabled { filter: saturate(.3); }
.btn.primary:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--lacquer-2); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* header */
.top { background: var(--lacquer); color: var(--on-lacquer); border-bottom: 1px solid rgba(217, 177, 88, .35); position: sticky; top: 0; z-index: 20; }
.top .brand { color: var(--on-lacquer); }
.top .brand svg { color: var(--gold) !important; }
.top .nav a, .top .nav .linkish { color: #BFB194; }
.top .nav a:hover, .top .nav .linkish:hover { color: var(--gold-hi); }
.top .btn.ghost { color: var(--on-lacquer); border-color: rgba(217, 177, 88, .5); }
.top .btn.ghost:hover { border-color: var(--gold); }
.top .nav a[aria-current] { color: var(--gold-hi); }
.top-in { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 1.15rem; letter-spacing: .01em; }
.brand svg { width: 28px; height: 28px; color: var(--lacquer-2); }
@media (prefers-color-scheme: dark) { .brand svg { color: var(--bronze); } }
.brand b, .brand-sm b { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: .95rem; }
.nav a, .nav .linkish { color: var(--mute); text-decoration: none; }
.nav a:hover, .nav .linkish:hover { color: var(--ink); }
.count { display: inline-block; min-width: 1.5em; padding: 0 6px; margin-left: 2px; border-radius: 99px; background: var(--bronze-soft); color: var(--ink); font-size: .78rem; text-align: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.dot { animation: pulse 2s ease-in-out infinite; }
.dot.ok { background: #6BCB8B; animation: ping 2.4s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(107, 203, 139, .55); } 80%, 100% { box-shadow: 0 0 0 7px rgba(107, 203, 139, 0); } }
@keyframes pulse { 50% { opacity: .45; } }
@media (max-width: 760px) { .nav a { display: none; } .nav { gap: 14px; } .top-in { gap: 12px; } }

/* hero */
.hero { background: var(--lacquer); color: var(--on-lacquer); padding: 56px 0 64px; position: relative; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; opacity: .22; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 90% at 85% 10%, rgba(217, 177, 88, .16), transparent 60%), linear-gradient(90deg, var(--lacquer) 32%, rgba(16, 12, 7, .55)); }
.hero { border-bottom: 1px solid rgba(217, 177, 88, .35); }
.hero-in { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: start; }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); font-weight: 700; letter-spacing: -.01em; margin-bottom: 20px; padding-bottom: .08em;
  background: linear-gradient(110deg, #E2B95E 0%, #FFF1C4 18%, #D9AA4C 36%, #F7DC92 52%, #B8862E 70%, #F3D58A 100%); background-size: 220% 100%; background-position: 0 0;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: gilt 2.6s cubic-bezier(.3, .1, .2, 1) .2s 1 both; }
@keyframes gilt { from { background-position: 100% 0; } to { background-position: 0 0; } }
.lead { font-size: 1.15rem; color: #D8CCB2; max-width: 34em; }
.facts { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 16px; max-width: 34em; }
.facts li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; color: #D8CCB2; font-size: .98rem; }
.facts strong { color: var(--on-lacquer); font-weight: 600; }
.facts svg { width: 24px; height: 24px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
@media (max-width: 900px) { .hero-in { grid-template-columns: 1fr; gap: 32px; } .hero { padding: 36px 0 40px; } }

/* scanner */
.scanner { background: var(--paper); color: var(--ink); border-radius: 18px; padding: 20px; box-shadow: var(--glow), 0 24px 60px rgba(0, 0, 0, .45); display: grid; gap: 16px; border-top: 3px solid var(--gold); }
.mode { display: grid; grid-template-columns: 1fr 1fr; background: var(--stone); border-radius: 12px; padding: 4px; }
.mode input { position: absolute; opacity: 0; pointer-events: none; }
.mode span { display: block; text-align: center; padding: 9px 8px; border-radius: 9px; font-weight: 600; font-size: .95rem; color: var(--mute); cursor: pointer; }
.mode input:checked + span { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.mode input:focus-visible + span { outline: 3px solid var(--bronze); }
.drop { position: relative; display: block; border: 2px dashed var(--line); border-radius: 14px; min-height: 260px; cursor: pointer; overflow: hidden; background: var(--stone); }
.drop:hover, .drop.over { border-color: var(--lacquer-2); }
.drop:focus-within { outline: 3px solid var(--bronze); outline-offset: 2px; }
.drop input, .slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px; padding: 20px; }
.drop-empty svg { width: 52px; height: 52px; fill: none; stroke: var(--lacquer-2); stroke-width: 2; margin-bottom: 6px; }
.drop-empty small { color: var(--mute); max-width: 24em; }
.drop-preview { width: 100%; height: 300px; object-fit: contain; background: #100C07; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slot { position: relative; aspect-ratio: 1; border: 1.5px dashed var(--line); border-radius: 12px; background: var(--stone); display: grid; place-items: end center; overflow: hidden; cursor: pointer; }
.slot:focus-within { outline: 3px solid var(--bronze); }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot span { position: relative; width: 100%; text-align: center; font-size: .85rem; font-weight: 600; padding: 6px; background: color-mix(in srgb, var(--paper) 88%, transparent); }
.slot.has { border-style: solid; border-color: var(--lacquer-2); }
.extra { display: grid; gap: 14px; }
.measure { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.measure label, .field { display: grid; gap: 6px; font-size: .88rem; color: var(--mute); font-weight: 500; }
input[type=number], input[type=password], input[type=text] { font: 1rem var(--sans); padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); width: 100%; }
input:focus { border-color: var(--lacquer-2); outline: none; }
.keynote { margin: 0; font-size: .92rem; color: var(--warn); background: var(--warn-bg); padding: 10px 12px; border-radius: 10px; }
.formerr { margin: 0; color: var(--risk); background: var(--risk-bg); padding: 10px 12px; border-radius: 10px; font-size: .95rem; }

/* progress */
.progress { padding: 40px 0; }
.progress-card { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 16px; padding: 28px; display: flex; gap: 28px; align-items: center; max-width: 620px; margin-inline: auto; }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--lacquer-2); animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.stages { margin: 0; padding-left: 1.2em; color: var(--mute); }
.stages li.on { color: var(--ink); font-weight: 600; }
.stages li.done { color: var(--pass); }

/* bands & sections */
.band { background: var(--paper); border-block: 1px solid var(--line); padding: 64px 0; }
.band h2::after, .films-head h2::after, .split h2::after { content: ""; display: block; width: 72px; height: 2px; margin-top: 12px; background: linear-gradient(90deg, var(--gold), transparent); }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps li { counter-increment: s; border-top: 2px solid var(--gold); padding-top: 16px; }
.steps li::before { content: counter(s); font-family: var(--serif); font-size: 2rem; font-weight: 700; background: linear-gradient(135deg, #D4A646, #8A6420); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; line-height: 1.1; margin-bottom: 10px; }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--mute); font-size: .97rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding: 64px 0; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 36px; } }
.limits { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.limits li { padding: 14px 16px; border-left: 4px solid var(--warn); background: var(--paper); border-radius: 0 10px 10px 0; color: var(--mute); }
.limits strong { display: block; color: var(--ink); }
.tips figure { margin: 0 0 18px; }
.tips img, .how-fig img { width: 100%; border-radius: 14px; box-shadow: 0 0 0 1px rgba(217, 177, 88, .45), 0 14px 34px -14px rgba(120, 80, 20, .55); }
.how-head { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: end; margin-bottom: 32px; }
.how-head p { color: var(--mute); margin: 0; }
.how-fig { margin: 0; }
@media (max-width: 860px) { .how-head { grid-template-columns: 1fr; gap: 20px; } .how-fig { max-width: 420px; } }
.tips ul { margin: 0; padding-left: 1.2em; color: var(--mute); display: grid; gap: 8px; }
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary { font-weight: 600; cursor: pointer; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--bronze); font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { color: var(--mute); margin: 10px 0 0; }

/* gold ribbon (marquee from the original site) */
.ribbon { background: #1A140B; border-bottom: 1px solid rgba(217, 177, 88, .3); overflow: hidden; color: #D9C9A2; font-size: .9rem; }
.ribbon-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.ribbon:hover .ribbon-track { animation-play-state: paused; }
.ribbon span { padding: 9px 0 9px 22px; white-space: nowrap; display: inline-flex; align-items: center; gap: 22px; }
.ribbon span::after { content: ""; width: 6px; height: 6px; transform: rotate(45deg); background: var(--gold); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* laser scan line (from the original site) */
.laser-host { position: relative; overflow: hidden; }
.laser-host::after { content: ""; position: absolute; left: 0; right: 0; height: 3px; top: 0; background: linear-gradient(90deg, transparent, #FFE7A3 20%, #FFF8E0 50%, #FFE7A3 80%, transparent); box-shadow: 0 0 14px 4px rgba(246, 210, 120, .65), 0 0 40px 10px rgba(217, 177, 88, .3); animation: scanLine 2.2s cubic-bezier(.4, 0, .2, 1) infinite; pointer-events: none; }
.drop.laser-host::after { animation-iteration-count: 2; animation-fill-mode: forwards; }
@keyframes scanLine { 0% { top: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 98%; opacity: 0; } }
/* expert-loupe inspection while the AI works */
.progress-card { max-width: 760px; }
.inspect { position: relative; width: 340px; aspect-ratio: 1; flex: none; border-radius: 16px; background: #0B0805; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(217, 177, 88, .55), 0 18px 40px -14px rgba(120, 80, 20, .6); }
.inspect-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: brightness(.62) saturate(.85);
  animation: breathe 9s ease-in-out infinite alternate; transform-origin: 50% 50%; }
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.12) translate(-1.5%, 1%); } }
.loupe { position: absolute; left: 0; top: 0; width: 46%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; z-index: 2; will-change: transform;
  box-shadow: 0 0 0 3px #E9C46A, 0 0 0 6px rgba(16, 12, 7, .85), 0 0 0 7px rgba(233, 196, 106, .6), 0 14px 34px rgba(0, 0, 0, .65); }
.loupe::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .28), transparent 34%), radial-gradient(circle, transparent 62%, rgba(0, 0, 0, .45) 100%); }
.loupe-view { position: absolute; inset: 0; background-repeat: no-repeat; background-color: #0B0805; }
.inspect-tag { position: absolute; left: 10px; bottom: 10px; z-index: 3; padding: 4px 10px; border-radius: 99px; font-size: .82rem;
  background: rgba(16, 12, 7, .82); color: #F6DE9A; border: 1px solid rgba(217, 177, 88, .5); }
.inspect.laser-host::after { z-index: 4; }
@media (max-width: 640px) { .progress-card { flex-direction: column; align-items: stretch; } .inspect { width: 100%; } }

/* quality check under the photo */
.qcheck { margin-top: -6px; padding: 10px 12px; border-radius: 10px; font-size: .92rem; display: grid; gap: 4px; }
.qcheck.ok { background: var(--pass-bg); color: var(--pass); }
.qcheck.warn { background: var(--warn-bg); color: var(--warn); }
.qcheck.bad { background: var(--risk-bg); color: var(--risk); }
.qcheck b { font-weight: 600; }
.qcheck ul { margin: 0; padding-left: 1.1em; }
.qcheck .linkish { font-weight: 600; }
.cam-open svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.camerr { padding: 12px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: .93rem; display: grid; gap: 8px; }
.camerr b { font-weight: 600; }
.camerr .btn { justify-self: start; }

/* guided camera */
dialog.cam { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 0; background: #000; color: #fff; }
.cam-stage { position: relative; width: 100%; height: 100%; overflow: hidden; }
.cam-stage video { width: 100%; height: 100%; object-fit: cover; }
.cam-guide { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.cam-guide i { width: min(62vw, 46vh); aspect-ratio: 3 / 4; border-radius: 22px; border: 2px solid rgba(246, 222, 154, .9); box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .22), inset 0 0 0 1px rgba(0, 0, 0, .25); transition: border-color .2s; }
.cam-guide.sharp i { border-color: #6BCB8B; }
.cam-top { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; background: linear-gradient(rgba(0, 0, 0, .45), transparent); font-size: 1rem; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.cam-top .x { color: #fff; }
.cam-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: grid; justify-items: center; gap: 16px; padding: 18px 16px 28px; background: linear-gradient(transparent, rgba(0, 0, 0, .5)); }
.cam-row { display: flex; align-items: center; justify-content: center; gap: 28px; width: 100%; }
.torch { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .7); background: rgba(0, 0, 0, .35); color: #fff; font-size: 1.3rem; cursor: pointer; }
.torch[aria-pressed=true] { background: #F6DE9A; color: #1F1810; border-color: #F6DE9A; }
.cam-spacer { width: 48px; }
.cam-meter { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; width: min(420px, 100%); font-size: .92rem; }
.cam-meter .meter { background: rgba(255, 255, 255, .2); }
.shutter { width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff; background: var(--gold-grad); cursor: pointer; }
.shutter:disabled { background: rgba(255, 255, 255, .25); cursor: not-allowed; }

/* craft films */
.films { padding: 64px 0; }
.films-head { max-width: 40em; margin-bottom: 28px; }
.films-head p { color: var(--mute); }
.film-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.film { margin: 0; }
.film video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; background: #100C07; display: block; box-shadow: 0 0 0 1px rgba(217, 177, 88, .45), 0 14px 34px -14px rgba(120, 80, 20, .55); }
.film figcaption { margin-top: 12px; color: var(--mute); font-size: .97rem; max-width: 36em; }
.film figcaption b { display: block; color: var(--ink); font-family: var(--serif); font-size: 1.1rem; font-weight: 600; margin-bottom: 2px; }
.films-note { margin: 24px 0 0; font-size: .88rem; color: var(--mute); }
@media (max-width: 720px) { .film-grid { grid-template-columns: 1fr; gap: 24px; } .films { padding: 48px 0; } }

/* footer */
.foot { padding: 40px 0 28px; color: #B9AB8C; font-size: .93rem; background: var(--lacquer); border-top: 1px solid rgba(217, 177, 88, .35); }
.foot a { color: var(--gold); }
.foot .brand-sm { color: var(--on-lacquer); }
.foot-in { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-in > div { max-width: 34em; }
.foot nav { display: grid; gap: 6px; }
.brand-sm { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); margin-bottom: 6px; }
.copy { margin-top: 24px; font-size: .85rem; }

/* dialogs */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(520px, 100% - 24px); background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
dialog.wide { width: min(820px, 100% - 24px); }
dialog::backdrop { background: rgba(10, 20, 16, .55); }
.dlg { padding: 22px; display: grid; gap: 14px; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; }
.dlg-head h2 { margin: 0; font-size: 1.4rem; }
.x { background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--mute); padding: 0 4px; }
.dlg p { margin: 0; color: var(--mute); }
.howkey { margin: 0; padding-left: 1.2em; color: var(--mute); }
.keymsg { min-height: 1.4em; font-size: .93rem; }
.keymsg.ok { color: var(--pass); } .keymsg.err { color: var(--risk); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* report */
.report { padding: 40px 0 56px; outline: none; }
.r-sheet { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: 18px; box-shadow: var(--shadow), 0 0 40px -14px rgba(217, 177, 88, .45); overflow: hidden; }
.r-head { padding: 24px 28px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; }
.r-kicker { color: var(--mute); font-size: .9rem; margin: 0 0 4px; }
.r-head h2 { font-size: clamp(1.4rem, 3.2vw, 2rem); margin: 0 0 6px; color: var(--gold-deep); }
@media (prefers-color-scheme: dark) { .r-head h2 { color: var(--gold-hi); } }
.r-verdict { margin: 0; font-weight: 600; }
.chip { display: inline-block; padding: 4px 12px; border-radius: 99px; font-size: .88rem; font-weight: 600; white-space: nowrap; }
.chip.pass { background: var(--pass-bg); color: var(--pass); }
.chip.risk { background: var(--risk-bg); color: var(--risk); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.r-conf { padding: 18px 28px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.r-conf-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.r-conf-row strong { font-family: var(--serif); font-size: 1.6rem; }
.meter { height: 10px; background: var(--stone); border-radius: 99px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: linear-gradient(90deg, #B8862E, #EBC66E); border-radius: 99px; }
.meter.lo > i { background: var(--risk); } .meter.mid > i { background: var(--warn); }
.r-conf small { color: var(--mute); }
.r-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.r-figure { padding: 24px 28px; border-right: 1px solid var(--line); }
.specimen { position: relative; border-radius: 12px; overflow: hidden; background: #100C07; box-shadow: inset 0 0 0 1px rgba(217, 177, 88, .4); }
.specimen img { width: 100%; height: auto; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; font: 700 .85rem/26px var(--sans); text-align: center; color: #fff; cursor: pointer; padding: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.pin.match { background: var(--pass); } .pin.mismatch { background: var(--risk); }
@media (prefers-color-scheme: dark) { .pin.match { background: #1F6E47; } .pin.mismatch { background: #A8322A; } }
.pin[aria-pressed=true] { outline: 3px solid #F5D78E; outline-offset: 2px; }
.views { display: flex; gap: 8px; margin-top: 12px; }
.views button { flex: 1; }
.views button[aria-pressed=true] { border-color: var(--lacquer-2); background: var(--stone); }
.quality { margin-top: 14px; font-size: .92rem; color: var(--mute); }
.quality .warnlist { color: var(--warn); margin: 4px 0 0; padding-left: 1.1em; }
.r-points { padding: 24px 28px; }
.r-points h3, .r-section h3 { margin-bottom: 12px; }
.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.point { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--paper); text-align: left; font: inherit; color: inherit; width: 100%; }
.point[aria-current=true] { border-color: var(--lacquer-2); box-shadow: inset 0 0 0 1px var(--lacquer-2); }
.point img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.point-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.point-name { font-weight: 600; }
.point p { margin: 4px 0 0; font-size: .92rem; color: var(--mute); }
.point .rule { font-size: .85rem; }
.r-section { padding: 24px 28px; border-top: 1px solid var(--line); }
.bars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }
.bar-row { display: grid; gap: 6px; font-size: .95rem; }
.bar-row div:first-child { display: flex; justify-content: space-between; }
.note { color: var(--mute); font-size: .93rem; margin: 12px 0 0; }
.agents { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.agent { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.agent-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-weight: 600; }
.agent p { margin: 0; color: var(--mute); font-size: .94rem; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.kv div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.kv dt { font-size: .82rem; color: var(--mute); }
.kv dd { margin: 2px 0 0; font-weight: 600; }
.price { display: grid; gap: 10px; }
.price-scale { position: relative; height: 12px; border-radius: 99px; background: linear-gradient(90deg, var(--bronze-soft), var(--bronze)); }
.price-scale i { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 3px solid var(--lacquer-2); transform: translate(-50%, -50%); }
.price-nums { display: flex; justify-content: space-between; font-size: .95rem; }
.price-nums strong { font-family: var(--serif); font-size: 1.35rem; }
.r-alert { margin: 0; padding: 14px 16px; border-radius: 12px; }
.r-alert.warn { background: var(--warn-bg); color: var(--warn); }
.r-alert.risk { background: var(--risk-bg); color: var(--risk); }
.r-alert a { color: inherit; font-weight: 600; }
.r-actions { padding: 20px 28px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; align-items: end; background: var(--stone); }
.r-actions .field { min-width: 180px; }
.r-actions .spacer { flex: 1; }
.r-foot { padding: 14px 28px; font-size: .86rem; color: var(--mute); border-top: 1px solid var(--line); }
@media (max-width: 860px) {
  .r-body { grid-template-columns: 1fr; } .r-figure { border-right: 0; border-bottom: 1px solid var(--line); }
  .r-head, .r-conf, .r-figure, .r-points, .r-section, .r-actions, .r-foot { padding-inline: 18px; }
  .bars, .agents { grid-template-columns: 1fr; } .kv { grid-template-columns: 1fr 1fr; }
  .r-head { grid-template-columns: 1fr; }
}

.desc-lead { font-size: 1.05rem; line-height: 1.8; margin: 0 0 14px; max-width: 46em; }
.desc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; margin: 0; }
.desc dt { font-family: var(--serif); font-weight: 600; color: var(--gold-deep); margin-bottom: 2px; }
@media (prefers-color-scheme: dark) { .desc dt { color: var(--gold-hi); } }
.desc dd { margin: 0; color: var(--mute); line-height: 1.75; }
@media (max-width: 860px) { .desc { grid-template-columns: 1fr; } }

.fb-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.fb-btns .btn[aria-pressed=true] { border-color: var(--gold); background: var(--bronze-soft); }
.fb-form { display: grid; gap: 12px; margin-top: 14px; max-width: 560px; }
.fb-form select, .fb-form textarea { font: 1rem var(--sans); padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); width: 100%; }
.fb-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; color: var(--mute); }
.fb-consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: #B8862E; flex: none; }
.fb-msg { margin: 10px 0 0; color: var(--pass); font-weight: 600; min-height: 1.2em; }

/* collection */
.col-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.col-sum div { background: var(--stone); border-radius: 10px; padding: 10px 12px; }
.col-sum span { font-size: .82rem; color: var(--mute); display: block; }
.col-sum strong { font-family: var(--serif); font-size: 1.15rem; }
.col-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-height: 55vh; overflow: auto; }
.col-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.col-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--stone); }
.col-item p { margin: 0; font-size: .88rem; color: var(--mute); }
.empty { text-align: center; color: var(--mute); padding: 28px 0; }

@media print {
  .top, .hero, .band, .split, .foot, .r-actions, .progress, .views, dialog { display: none !important; }
  body { background: #fff; color: #000; }
  .report { display: block !important; padding: 0; }
  .r-sheet { box-shadow: none; border: 0; }
}
