:root {
  --bg: #16130f;
  --bg2: #1f1b16;
  --card: #242019;
  --line: #3a342a;
  --text: #f3ede2;
  --muted: #a99f8f;
  --accent: #ffd23f;
  --accent-ink: #1b1608;
  --red: #ff5a3c;
  --green: #4fd18b;
  --cyan: #4fd3e6;
  --radius: 14px;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(1200px 600px at 50% -200px, #2a2318 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text); font: 16px/1.5 var(--sans);
}
a { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .4em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.01em; }
h1 em { color: var(--accent); font-style: italic; }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 .8em; }
button { font: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: .86rem; }
.center { text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 700; color: var(--accent); margin: 0 0 .5em; }
.lede { font-size: 1.08rem; color: #ddd4c4; max-width: 46em; }

/* ---- top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: 10px max(16px, env(safe-area-inset-left)); background: rgba(22, 19, 15, .86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark { width: 28px; height: 28px; color: var(--accent); }
.brand-name { font-family: var(--serif); font-weight: 700; letter-spacing: .08em; font-size: 1.12rem; }
.brand-name b { color: var(--accent); }
.top-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--text); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--bg2); border-color: var(--line); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .off { display: none; }
.icon-btn.is-off { color: var(--muted); }
.icon-btn.is-off .off { display: inline; }

.view { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 20px 16px 40px; outline: none; }
.footer { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 18px 16px 28px; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); }
.footer a { color: var(--muted); }
.boot { padding: 60px 0; text-align: center; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--text);
  font-weight: 650; text-decoration: none; cursor: pointer; transition: transform .08s, background .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: #5a5142; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #ffdc66; }
.btn.ghost { background: transparent; }
.btn.big { min-height: 54px; padding: 14px 26px; font-size: 1.08rem; }
.btn.icon { width: 44px; padding: 0; font-size: 1.4rem; line-height: 1; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn-row.center { justify-content: center; }
.link { font-size: .9rem; }

/* ---- cards ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.hero { padding: 18px 0 8px; }
.hero.center .btn-row { justify-content: center; }
.home .hero .btn { margin: 8px 0 14px; }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); font-size: .85rem; white-space: nowrap; }

.detective .det-top { display: flex; justify-content: space-between; align-items: flex-start; }
.detective h3 { font-size: 1.5rem; margin: 0; }
.xpbar { height: 8px; border-radius: 99px; background: var(--bg2); overflow: hidden; margin: 14px 0 6px; }
.xpbar span { display: block; height: 100%; background: linear-gradient(90deg, #e9a92c, var(--accent)); border-radius: 99px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.stat { background: var(--bg2); border-radius: 10px; padding: 10px; text-align: center; }
.stat strong { display: block; font-size: 1.4rem; font-family: var(--serif); }
.stat span { color: var(--muted); font-size: .8rem; }

.past { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
a.row:hover { border-color: var(--accent); }
.row.locked { opacity: .85; }
.row .go { color: var(--accent); font-weight: 650; white-space: nowrap; font-size: .9rem; }
.row .lock { color: var(--muted); white-space: nowrap; font-size: .9rem; }
.row .lock b { color: var(--text); font-variant-numeric: tabular-nums; }
.how-mini .mini-mission { color: var(--text); font-weight: 650; margin: 12px 0 18px; }
.how-mini ol { padding-inline-start: 1.35em; padding-inline-end: 0; margin: 0 0 18px; }
.how-mini li { margin: 0 0 16px; line-height: 1.6; }
.how-mini li strong { color: var(--accent); }
.how-mini li p { margin: 4px 0 0; color: #d9d0c0; }
.how-mini .mini-account { border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 16px; }

/* ---- play ---- */
.play { display: flex; flex-direction: column; gap: 10px; }
.play-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.play-head h2 { margin: 0 0 2px; }
.play-head .brief { color: #d9d0c0; margin: 0; max-width: 54em; }
.timer { position: relative; width: 60px; height: 60px; flex: none; }
.timer-svg { width: 60px; height: 60px; transform: rotate(-90deg); }
.timer-track { fill: none; stroke: var(--line); stroke-width: 4; }
.timer-ring { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 119.4; stroke-dashoffset: 0; transition: stroke-dashoffset .2s linear, stroke .2s; }
.timer-num { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.timer.low .timer-ring { stroke: var(--red); }
.timer.low .timer-num { color: var(--red); animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }

.hud { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .95rem; }
.marks { display: flex; gap: 6px; }
.marks span { width: 14px; height: 14px; border-radius: 50%; border: 2px dashed var(--accent); }
.marks span.used { border-style: solid; border-color: var(--line); background: var(--line); }
.coach { background: #2c2618; border: 1px solid #4b3f22; border-radius: 12px; padding: 12px 14px; min-height: 48px; }
.coach b { color: var(--accent); }

.stage-wrap { position: relative; width: 100%; max-width: min(100%, calc((100vh - 290px) * 1.778)); min-width: min(100%, 520px); margin: 0 auto; }
.stage {
  position: relative; width: 100%; overflow: hidden; border-radius: 12px; background: #000; touch-action: none;
  user-select: none; -webkit-user-select: none; cursor: crosshair; box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
}
.stage.zoomed { cursor: grab; }
.canvas { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.canvas img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.layer { position: absolute; inset: 0; pointer-events: none; }

.marker { position: absolute; width: 0; height: 0; transform: scale(var(--inv, 1)); }
.marker .ring { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(0, 0, 0, .55), inset 0 0 0 2px rgba(0, 0, 0, .35); }
.marker.pending .ring { border: 3px dashed var(--accent); animation: spin 6s linear infinite; background: rgba(255, 210, 63, .12); }
.marker.hit .ring { border-color: var(--green); background: rgba(79, 209, 139, .2); }
.marker.decoy .ring { border-color: var(--red); background: rgba(255, 90, 60, .2); }
.marker.miss .ring { border-color: rgba(255, 255, 255, .55); border-style: dotted; width: 30px; height: 30px; left: -15px; top: -15px; }
.marker .tag {
  position: absolute; left: 0; top: -40px; transform: translateX(-50%); white-space: nowrap; padding: 3px 9px; border-radius: 999px;
  font-size: .78rem; font-weight: 750; background: rgba(0, 0, 0, .78); color: #fff;
}
.marker.hit .tag { background: var(--green); color: #062314; }
.marker.decoy .tag { background: var(--red); color: #2a0700; }
.marker.miss .tag { opacity: 0; animation: fadeTag 1.8s ease; }
.marker.pop .ring { animation: pop .38s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeTag { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }

.controls { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; max-width: min(100%, calc((100vh - 290px) * 1.778)); min-width: min(100%, 520px); margin: 0 auto; }
.zoom, .confirm { display: flex; gap: 8px; align-items: center; }

.overlay { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 16px; border-radius: 12px; }
.card-overlay { background: rgba(10, 8, 6, .62); backdrop-filter: blur(2px); }
.ov-card { width: min(520px, 100%); max-height: 100%; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.ov-card.wide { width: min(680px, 100%); }
.rules { padding-left: 1.1em; margin: 0 0 6px; }
.rules li { margin: 7px 0; }
.lead { background: rgba(10, 8, 6, .9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.lead-inner { text-align: center; max-width: 560px; }
.lead-count { font-family: var(--serif); font-size: 4rem; font-weight: 800; color: var(--accent); line-height: 1; margin-top: 8px; }
.big-score { font-family: var(--serif); font-size: 3.2rem; font-weight: 800; line-height: 1; margin: 6px 0 10px; color: var(--accent); }
.big-score small { font-size: 1.1rem; color: var(--muted); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 750; background: var(--bg2); border: 1px solid var(--line); white-space: nowrap; }
.chip.t-common { color: #d9d2c4; }
.chip.t-uncommon { color: #7fe0a6; border-color: #2f5b40; }
.chip.t-rare { color: #7cc3ff; border-color: #2c4d6b; }
.chip.t-elusive { color: #d39bff; border-color: #563a73; }
.chip.t-legendary { color: #ffcf4a; border-color: #6e5716; background: #2e2610; }
.chip.trap { color: var(--red); border-color: #6b2b1f; }

/* ---- results ---- */
.photo-rows { display: flex; flex-direction: column; gap: 10px; }
.photo-row { display: grid; grid-template-columns: 112px 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; background: var(--bg2); }
.photo-row img { width: 112px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; }
.photo-row .chips { margin: 4px 0 0; }
.pr-score b { font-size: 1.3rem; font-family: var(--serif); }
.count-big { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; margin: 4px 0; }

/* ---- answers ---- */
.ans-fig { position: relative; margin: 10px 0 14px; border-radius: 12px; overflow: hidden; }
.ans-fig img { display: block; width: 100%; height: auto; }
.ans-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ans-wrong { fill: rgba(255, 90, 60, .12); stroke: var(--red); stroke-width: 4; }
.ans-decoy { fill: rgba(79, 211, 230, .08); stroke: var(--cyan); stroke-width: 3; stroke-dasharray: 10 7; }
.ans-mark { fill: none; stroke: #fff; stroke-width: 3; }
.ans-mark.hit { stroke: var(--green); }
.ans-mark.decoy { stroke: var(--red); fill: rgba(255, 90, 60, .4); }
.ans-labels { position: absolute; inset: 0; pointer-events: none; }
.ans-num { position: absolute; transform: translate(-50%, -115%); min-width: 26px; height: 26px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: var(--red); color: #fff; font-weight: 800; font-size: .85rem; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.ans-num.trap { background: var(--cyan); color: #032027; }
.ans-list { padding-left: 1.3em; margin: 0; }
.ans-list li { margin: 0 0 14px; }
.ans-list li::marker { color: var(--red); font-weight: 800; }
.ans-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.ans-title .chip { margin: 0; }
.got { font-size: .82rem; font-weight: 700; }
.got.yes { color: var(--green); }
.got.no { color: var(--muted); }
.traps { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 6px; }
.traps h4 { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--cyan); }
.traps ul { padding-left: 1.1em; margin: 0; }
.traps li { margin: 0 0 8px; color: #d9d0c0; }
.sources { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; font-size: .82rem; }
.sources a { color: var(--muted); }
.sources a::before { content: '↗ '; }
.how h3 { margin-top: 18px; }
.how h3:first-child { margin-top: 0; }

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; top: 72px; z-index: 50; transform: translate(-50%, -16px);
  max-width: min(92vw, 520px); padding: 12px 18px; border-radius: 12px; background: #000; color: #fff; border: 1px solid var(--line);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; text-align: center; font-weight: 600;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- small screens ---- */
@media (max-width: 700px) {
  .view { padding: 12px 10px 28px; }
  .card { padding: 16px; }
  .brand-name { font-size: 1rem; }
  .icon-btn { width: 36px; height: 36px; }
  .play-head .brief { font-size: .9rem; }
  .timer, .timer-svg { width: 52px; height: 52px; }
  .stage-wrap, .controls { max-width: 100%; min-width: 0; }
  .stage { border-radius: 8px; }
  .card-overlay, .lead { position: fixed; inset: 0; z-index: 40; border-radius: 0; }
  .photo-row { grid-template-columns: 84px 1fr auto; }
  .photo-row img { width: 84px; }
  .controls { flex-wrap: nowrap; gap: 6px; }
  .controls .btn { min-height: 40px; padding: 8px 11px; font-size: .9rem; }
  .controls .btn.icon { width: 40px; padding: 0; }
  .zoom, .confirm { gap: 6px; }
  .row { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- AI reconstruction label (on every scene image) ---- */
.ai-badge { position: absolute; right: 8px; bottom: 8px; z-index: 4; pointer-events: none; padding: 2px 7px; border-radius: 999px;
  background: rgba(10, 8, 6, .58); color: rgba(243, 237, 226, .92); font-size: .64rem; font-weight: 600; letter-spacing: .03em; }
.marker.edge-l .tag { transform: translateX(-22px); }
.marker.edge-r .tag { transform: translateX(calc(-100% + 22px)); }
.marker.edge-t .tag { top: 28px; }

/* ---- footer: links, language menu ---- */
.footer { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; }
.foot-links a { color: var(--text); text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot-fine { margin: 0; }
.lang-menu { position: relative; }
.lang-menu summary { cursor: pointer; list-style: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu ul { list-style: none; margin: 10px auto 0; padding: 10px; max-width: 560px; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.lang-menu li a { display: block; padding: 6px 8px; border-radius: 8px; color: var(--text); text-decoration: none; }
.lang-menu li a:hover, .lang-menu li a[aria-current] { background: var(--line); }

/* ---- static pages (how to play, about, legal) ---- */
.text-nav { gap: 14px; align-items: center; }
.text-nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem; }
.page { max-width: 820px; }
.prose { padding: 24px 26px 28px; line-height: 1.65; }
.prose h1 { font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0 0 .5em; }
.prose h2 { font-family: var(--serif); font-size: 1.35rem; margin: 1.6em 0 .4em; }
.prose h3 { font-size: 1.02rem; margin: 1.2em 0 .3em; }
.prose p, .prose li { color: #e6dfd2; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose a { color: var(--accent); }
.prose .btn { text-decoration: none; }
.prose address { font-style: normal; color: #e6dfd2; }
.prose .ranks li { margin: 2px 0; }

/* ---- right-to-left languages ---- */
[dir="rtl"] .hud, [dir="rtl"] .card-head, [dir="rtl"] .det-top { direction: rtl; }
[dir="rtl"] .stage, [dir="rtl"] .ans-fig { direction: ltr; }

/* ---- Reality Check / Reality Passport ---- */
:root { --paper: #2b251b; --paper-light: #3b3121; --seal: #e8bb57; }
button, a, input, textarea, progress { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.card, .hero, .card-head > *, .passport-top > *, .report-heading > * { min-width: 0; }
.card p, .card h1, .card h2, .card h3, .hero p, .hero h1, .btn, .row-main { overflow-wrap: anywhere; }
.btn { text-align: center; }
.card-head, .det-top { flex-wrap: wrap; }
.top-actions { align-items: center; flex-wrap: wrap; }
.passport-nav { width: auto; gap: 5px; padding-inline: 8px; font-size: .78rem; }
.passport-nav svg { width: 24px; height: 24px; }
.passport-nav .seal-edge, .passport-nav .seal-inner { stroke-width: 3; }
.passport-nav .seal-symbol { stroke-width: 4; }
.passport-nav[aria-current="page"] { border-color: var(--accent); background: var(--bg2); }
.report-navigation { margin-block: -4px 18px; }

.reality-report, .passport-card, .share-preview {
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(ellipse at 0 0, #4a382429, transparent 65%),
    repeating-linear-gradient(0deg, transparent, transparent 4px, #efcd7610 5px, transparent 6px),
    linear-gradient(140deg, #30291e, #211d16 75%);
  border-color: #635239; box-shadow: 0 16px 50px #0003;
}
.reality-report::before, .passport-card::before, .share-preview::before {
  content: ''; position: absolute; inset: 7px; border: 1px dashed #b49b6340;
  border-radius: 8px; z-index: -1; pointer-events: none;
}
.reality-report { padding: clamp(22px, 4vw, 42px); }
.report-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.report-heading h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); max-width: 17em; }
.report-heading .fine { margin-bottom: 0; }
.closure-mark { width: 82px; height: 82px; flex: none; color: var(--green); }
.closure-mark.t-common { color: #bcae8e; }
.closure-mark.t-rare { color: #7cc3ff; }
.closure-mark.t-elusive { color: #d39bff; }
.closure-mark.t-legendary { color: #ffd23f; }
.closure-track { fill: none; stroke: #5c503b; stroke-width: 3; }
.closure-arc { fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; }
.closure-crack { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; opacity: .7; }
.ov-card .closure-mark { display: block; margin: 8px auto 16px; animation: close-case .5s ease-out both; }
@keyframes close-case { from { opacity: 0; transform: scale(.78) rotate(-14deg); } to { opacity: 1; transform: none; } }
.report-metrics { display: grid; grid-template-columns: 1.2fr 1fr .8fr; gap: 14px; margin-bottom: 18px; }
.report-metric { padding: 18px 14px; border-block: 1px solid #75603e; border-inline-end: 1px solid #5c4a33; }
.report-metric:last-child { border-inline-end: 0; }
.report-metric strong { display: block; font-family: var(--serif); font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.report-metric span { display: block; font-size: .8rem; color: #c8bba4; margin-top: 7px; }
.report-metric.accent strong { color: var(--accent); }
.report-explainer { max-width: 65em; margin-bottom: 22px; color: #c8bba4; }
.report-scene-list { display: grid; gap: 0; }
.report-scene { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 15px 0; border-top: 1px solid #5a4b354f; }
.scene-number { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #74613d; border-radius: 50%; color: var(--seal); font-family: var(--serif); }
.report-scene-main > strong { font-family: var(--serif); font-size: 1.12rem; }
.report-scene-main .fine { margin: 2px 0 0; }
.report-scene-main .chips { margin: 5px 0 0; }
.report-scene-score { text-align: end; max-width: 10em; }
.report-scene-score strong { display: block; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.report-scene-score span { display: block; }
.report-confidential { margin: 20px 0 0; border-top: 1px solid #5a4b35; padding-top: 14px; }
.legacy-label { display: inline-block; padding: 5px 10px; border: 1px dashed #9c8761; border-radius: 6px; color: #e7d5b2; font-size: .84rem; }

.passport-card { padding: clamp(22px, 4vw, 36px); }
.passport-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.passport-top h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.passport-seal { width: 64px; height: 64px; color: var(--seal); flex: none; }
.seal-edge { fill: #e7c16408; stroke: currentColor; stroke-width: 1.8; stroke-dasharray: 3 2; }
.seal-inner { fill: none; stroke: currentColor; stroke-width: 1.2; }
.seal-symbol { fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.appearance-sticker { --seal: #91dca7; }
.appearance-explorer { --seal: #83cce9; }
.appearance-badge { --seal: #c6abf5; }
.appearance-inspector { --seal: #ffc66a; }
.appearance-legend { --seal: #ffd23f; background-color: #382a14; }
.passport-headline { display: grid; grid-template-columns: minmax(110px, .25fr) minmax(0, 1fr); gap: 26px; align-items: center; padding: 16px 0 20px; }
.streak-number { text-align: center; border-inline-end: 1px solid #6d593b; padding-inline-end: 22px; }
.streak-number strong { display: block; font: 800 clamp(3.5rem, 7vw, 5.8rem)/1 var(--serif); color: var(--seal); font-variant-numeric: tabular-nums; }
.streak-number span { display: block; color: #cfc2ab; font-size: .85rem; margin-top: 8px; }
.passport-goal h3 { font: 700 clamp(1.15rem, 3vw, 1.6rem)/1.3 var(--serif); }
.stamp-status { display: inline-block; font-size: .8rem; padding: 5px 10px; border: 1px solid #8f7950; border-radius: 8px; color: #e5c883; margin-bottom: 12px; }
.stamp-status.earned { background: #1b3526; color: #8ce6ae; border-color: #487552; }
.passport-retained { border-top: 1px solid #5c4d36; padding-top: 12px; color: #cfc2ab; }
.progress-numbers { color: #e9dfcd; font-size: .82rem; line-height: 1.5; margin: 8px 0; }
.passport-progress { display: block; width: 100%; height: 10px; border: 0; border-radius: 100px; overflow: hidden; background: #12100c; color: var(--seal); accent-color: var(--seal); }
.passport-progress::-webkit-progress-bar { background: #12100c; border-radius: 100px; }
.passport-progress::-webkit-progress-value { background: var(--seal); border-radius: 100px; }
.passport-progress::-moz-progress-bar { background: var(--seal); border-radius: 100px; }
.passport-goal .passport-progress { height: 13px; }
.milestone-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.milestone { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 12px; row-gap: 9px; align-items: start; border: 1px solid #655338; border-radius: 10px; padding: 16px; background: #14120e66; }
.milestone .passport-seal { width: 52px; height: 52px; }
.milestone-body h3 { font-family: var(--sans); font-size: .95rem; }
.milestone-body p { margin: 3px 0; }
.milestone-body .progress-numbers { font-size: .78rem; margin: 6px 0; }
.milestone > .btn, .milestone-state { grid-column: 2; justify-self: start; }
.milestone-state { font-size: .76rem; color: #c7b894; }
.milestone-state.earned { color: #85dfa7; }
.milestone.locked .passport-seal { color: #a89777; }
.milestone.unlocked { border-color: #746449; }
.milestone.is-selected { border-color: var(--seal); background: #e7c1640b; }
.appearance-select { min-height: 38px; font-size: .8rem; padding: 7px 12px; }
.appearance-select.selected { background: var(--seal); color: #16130f; opacity: 1; border-color: var(--seal); }
.compact .milestone-list { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.compact .milestone { display: flex; flex-direction: column; gap: 8px; padding: 14px 12px; }
.compact .milestone .passport-seal { width: 40px; height: 40px; }
.compact .milestone-body { width: 100%; }
.compact .milestone-state { margin-top: auto; }
.earned-note { border: 1px solid #66814d; background: #24341c; border-radius: 10px; padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 5px 12px; color: #d0edb8; }
.earned-note p { flex-basis: 100%; margin: 0; color: #b9c8ab; }

.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-block: 22px; }
.week-day { display: flex; flex-direction: column; align-items: center; justify-content: start; text-align: center; gap: 6px; padding: 14px 7px; background: #19160f; border: 1px dashed #65563d; border-radius: 10px; min-width: 0; }
.week-day.completed { border-style: solid; border-color: #52774d; background: #21312366; }
.week-weekday, .week-day time { font-size: .78rem; color: #d6c9b2; }
.week-day .passport-seal { width: 52px; height: 52px; color: #8cc49b; }
.empty-stamp { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1px dashed #5c503b; font-size: 2rem; color: #786b55; }
.week-status { font-size: .75rem; color: #b2a58f; }
.completed .week-status { color: #8ce6ae; }
.week-day .fine { font-size: .72rem; }
.weekly-total { padding-top: 12px; border-top: 1px solid var(--line); font-size: .9rem; color: #d9d0bd; }

.social-share { padding: clamp(20px, 4vw, 34px); }
.phrase-picker { border: 0; border-top: 1px solid var(--line); padding: 15px 0 0; margin: 22px 0 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.phrase-picker legend { padding-inline-end: 10px; color: #d7c9ae; font-size: .9rem; }
.phrase-option { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid #5d503b; border-radius: 8px; font-size: .85rem; cursor: pointer; min-height: 44px; }
.phrase-option:has(input:checked) { border-color: var(--accent); background: #e8b53414; color: #ffe5a0; }
.phrase-option input { accent-color: var(--accent); flex: none; }
.share-preview { padding: clamp(24px, 4vw, 38px); border: 1px solid #655338; border-radius: 8px; max-width: 700px; margin: 20px auto; }
.share-preview > .passport-seal { float: inline-end; margin-inline-start: 14px; margin-block-end: 14px; width: 58px; height: 58px; }
.share-preview h3 { font: 700 clamp(1.7rem, 3.5vw, 2.5rem)/1.22 var(--serif); }
.share-preview > p:not(.eyebrow):not(.preview-index) { color: #d2c4ab; }
.preview-index { font: 800 clamp(1.8rem, 4vw, 3rem)/1.3 var(--serif); color: var(--accent); margin-block: 22px 16px; clear: both; }
.preview-scenes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 22px 0; }
.preview-scenes > div { display: grid; gap: 4px; padding: 10px 5px; text-align: center; border-block: 1px solid #665339; min-width: 0; }
.preview-scenes span { font-size: .7rem; color: #c5b79e; overflow-wrap: anywhere; }
.preview-scenes strong { font-family: var(--serif); font-size: 1.3rem; color: #94dbac; }
.share-actions { justify-content: center; }
.share-status { text-align: center; margin-block: 14px 4px; min-height: 1.5em; }
.share-manual, .challenge-url { display: block; width: 100%; font: inherit; color: var(--text); background: #12100d; border: 1px solid #71603e; border-radius: 8px; padding: 12px; resize: vertical; }
.share-manual { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 12px; }
.clipboard-buffer { position: fixed; inset-inline-start: -9999px; top: 0; width: 1px; height: 1px; }
.challenge-opt-in { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 22px; display: flex; align-items: start; flex-wrap: wrap; gap: 12px 18px; }
.challenge-opt-in > p { flex: 1 1 240px; margin: 0; }
.challenge-link-area { width: 100%; display: grid; gap: 10px; }
.challenge-link-area p { margin: 0; }
.challenge-link-area .btn { justify-self: start; }
.challenge-url { font-size: .84rem; }
.challenge-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 18px; border: 1px solid #6b5b35; border-radius: 10px; background: #3a2d1455; }
.challenge-banner > div { flex: 1 1 220px; }
.challenge-banner p { margin: 3px 0 0; }
.challenge-banner .btn { font-size: .8rem; padding: 8px 12px; }
.comparison-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.comparison-side { border: 1px solid #54452f; border-radius: 10px; padding: 24px; background: #17140f; }
.comparison-side.mine { border-color: #778754; background: #25311d55; }
.comparison-index { font: 800 clamp(2.5rem, 5vw, 4rem)/1.1 var(--serif); color: var(--accent); margin-block: 18px 8px; }
.comparison-index small { font-size: 1rem; color: var(--muted); }
.challenge-passport { display: flex; gap: 20px; align-items: center; }
.free-zoom { max-width: 12em; text-align: end; }
.how-mini ol, .rules, .ans-list, .traps ul { padding-inline-start: 1.3em; padding-inline-end: 0; }
.chip { white-space: normal; overflow-wrap: anywhere; }
/* Static status instead of endless flashing/spinning; a single closure flourish is enough. */
.timer.low .timer-num, .marker.pending .ring { animation: none; }

@media (max-width: 900px) {
  .compact .milestone-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .week-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .topbar { gap: 8px; padding-inline: 10px; }
  .brand { gap: 6px; }
  .brand-name { font-size: .92rem; letter-spacing: .04em; }
  .brand-mark { width: 23px; height: 23px; }
  .top-actions { gap: 1px; flex-wrap: nowrap; }
  .top-actions .icon-btn { width: 32px; height: 36px; padding-inline: 3px; }
  .passport-nav span { display: none; }
  .report-heading { gap: 12px; align-items: flex-start; }
  .report-heading .closure-mark { width: 55px; height: 55px; }
  .report-heading h1 { font-size: 2rem; }
  .report-metrics { gap: 5px; grid-template-columns: 1.2fr 1fr .8fr; }
  .report-metric { padding: 14px 6px; }
  .report-metric strong { font-size: 2.3rem; }
  .report-metric span { font-size: .72rem; }
  .report-scene { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; }
  .scene-number { width: 26px; height: 26px; font-size: .8rem; }
  .report-scene-score { max-width: 5em; }
  .report-scene-score strong { font-size: 1.07rem; }
  .report-scene-main > strong { font-size: 1rem; }
  .passport-headline { grid-template-columns: 82px minmax(0, 1fr); gap: 16px; }
  .streak-number { padding-inline-end: 12px; }
  .streak-number strong { font-size: 3.4rem; }
  .streak-number span { font-size: .74rem; }
  .passport-top .passport-seal { width: 50px; height: 50px; }
  .milestone-list, .compact .milestone-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .milestone { display: flex; flex-direction: column; padding: 13px; }
  .milestone-body { width: 100%; }
  .milestone > .btn { margin-top: auto; }
  .preview-scenes { gap: 4px; }
  .preview-scenes strong { font-size: 1.05rem; }
  .preview-scenes span { font-size: .66rem; }
  .week-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .comparison-side { padding: 16px; }
  .comparison-side h3 { font-size: 1.1rem; }
  .comparison-side p { font-size: .82rem; }
  .comparison-side .comparison-index { font-size: 2.7rem; }
  .controls { flex-wrap: wrap; }
  .free-zoom { font-size: .75rem; }
}
@media (max-width: 360px) {
  .brand-name { font-size: .76rem; }
  .brand-mark { display: none; }
  .report-metric strong { font-size: 1.9rem; }
  .passport-headline { grid-template-columns: 1fr; }
  .streak-number { border-inline-end: 0; padding-inline-end: 0; text-align: start; }
  .streak-number strong, .streak-number span { display: inline; margin-inline-end: 8px; }
  .comparison-grid { grid-template-columns: 1fr; }
}
[dir="rtl"] .report-heading, [dir="rtl"] .report-scene, [dir="rtl"] .passport-headline,
[dir="rtl"] .milestone-list, [dir="rtl"] .week-grid, [dir="rtl"] .comparison-grid { direction: rtl; }
[dir="rtl"] .passport-progress { direction: rtl; }
@media (prefers-reduced-motion: reduce) {
  .ov-card .closure-mark, .closure-arc { animation: none !important; transition: none !important; }
}

.found-hud { display: inline-flex; align-items: center; gap: 6px; }
.hud .closure-mark { width: 30px; height: 30px; }
.closure-mark.found-closure { animation: close-case .45s ease-out both; }
@media (prefers-reduced-motion: reduce) { .closure-mark.found-closure { animation: none !important; } }

/* ---- Single-confirm reboot / actual rendered PNG sharing panel ---- */
.point-note { width: 100%; max-width: 60em; margin: 0 auto; padding: 10px 14px; border: 1px solid #665339; border-radius: 10px; background: #2c2618; text-align: center; color: #e7d7b9; }
.report-total { color: var(--accent); font-weight: 700; }
.ov-card > .btn { margin-block-start: 10px; margin-inline-end: 8px; }
.share-dialog { width: min(900px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); margin: auto; padding: clamp(16px, 3vw, 30px); border: 1px solid #806a3d; border-radius: 16px; color: var(--text); background: var(--card); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 24px 90px #0008; }
.share-dialog::backdrop { background: #0b0907d9; backdrop-filter: blur(4px); }
.share-dialog:not([open]) { display: none; }
.share-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.share-dialog-head h2 { margin: 0; }
.share-dialog-head .btn { flex: none; }
.share-dialog .phrase-picker { margin-block: 18px; }
.share-png-frame { min-height: 120px; max-height: min(60dvh, 720px); overflow: auto; border: 1px solid #655338; border-radius: 10px; background: #17140f; margin-block: 18px 12px; }
.share-png-frame[aria-busy="true"] { background: repeating-linear-gradient(135deg, #211d16, #211d16 16px, #292319 16px, #292319 32px); }
.share-png { display: block; width: 100%; max-width: 620px; height: auto; margin-inline: auto; }
.share-dialog .share-actions { margin-block: 16px 20px; }
.share-composers { padding-block: 16px; border-block: 1px solid var(--line); margin-block-end: 16px; }
.share-composers h3 { font-family: var(--sans); font-size: 1rem; }
.share-composers .btn-row { margin-block-start: 10px; }
.share-dialog .challenge-url { overflow: auto; }
.share-dialog .share-status { text-align: start; }
.share-dialog .btn, .share-dialog p { overflow-wrap: anywhere; }
[dir="rtl"] .share-dialog { direction: rtl; }
[dir="rtl"] .share-dialog-head, [dir="rtl"] .share-actions, [dir="rtl"] .share-composers { direction: rtl; }
@media (max-width: 600px) {
  .share-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 16px; border-radius: 12px; }
  .share-dialog-head { align-items: flex-start; }
  .share-dialog .share-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .share-dialog .share-actions .btn { width: 100%; padding: 10px 8px; }
  .share-composers .btn-row { display: grid; grid-template-columns: 1fr; }
  .share-png-frame { max-height: 52dvh; }
  .report-scene-score { max-width: 9em; }
  .point-note { font-size: .8rem; }
}

/* ---- Direct-score daily reports / fair same-edition comparisons ---- */
.report-primary { margin-block: 8px 22px; }
.report-primary .report-metric { border: 1px solid #806a3d; border-radius: 12px; background: #1a160d66; padding: clamp(16px, 3vw, 26px); }
.report-primary .report-metric strong { font-size: clamp(2rem, 7vw, 4.6rem); }
.report-primary .report-metric span { font-size: .95rem; font-weight: 700; }
.reality-report .report-metrics .report-metric strong { font-size: clamp(1.3rem, 3vw, 2.3rem); }
.scoring-edition { margin-block: 12px 20px; }
.scoring-edition p { margin-block: 8px 0; max-width: 66em; }
.share-scene-list { list-style: none; padding: 0; margin-block: 20px; }
.reality-report > .challenge-passport { margin-block: 22px; }
.reality-report > .challenge-passport p { margin: 0; }
.comparison-total { font: 800 clamp(1.8rem, 5vw, 3.6rem)/1.2 var(--serif); color: var(--accent); margin-block: 18px 8px; font-variant-numeric: tabular-nums; }
.comparison-secondary { margin-block-start: 14px; }
.comparison-gap { border-block: 1px solid #655338; margin-block: 20px 14px; padding-block: 14px; font-weight: 700; color: #e7d7b9; }
.comparison-table-wrap { max-width: 100%; overflow-x: auto; }
.comparison-photos { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: .9rem; }
.comparison-photos caption { text-align: start; font-weight: 700; padding-block: 8px 14px; }
.comparison-photos th, .comparison-photos td { text-align: start; padding: 12px 10px; border-bottom: 1px solid #54452f; overflow-wrap: anywhere; }
.comparison-photos thead th { color: #d5c3a0; font-size: .8rem; }
.comparison-photos tbody th { font-weight: 600; }
.comparison-photos td { font-variant-numeric: tabular-nums; }
.comparison-photos .gap-positive { color: #8ce6ae; }
.comparison-photos .gap-negative { color: #ffc19e; }
.edition-mismatch { border-color: #9c8761; }
[dir="rtl"] .report-primary, [dir="rtl"] .comparison-photos { direction: rtl; }
@media (max-width: 600px) {
  .reality-report .report-metrics { grid-template-columns: 1.3fr 1fr .7fr; }
  .reality-report .report-metrics .report-metric strong { font-size: 1.2rem; }
  .comparison-grid { gap: 8px; }
  .comparison-side { padding: 14px 10px; }
  .comparison-total { font-size: clamp(1.4rem, 5vw, 2rem); }
  .comparison-photos { font-size: .78rem; }
  .comparison-photos th, .comparison-photos td { padding: 10px 5px; }
  .comparison-photos thead th { font-size: .7rem; }
}

/* ---- Verified accounts / cookie-session login ---- */
.auth-status { min-height: 40px; padding: 8px 12px; font-size: .82rem; border-color: #74613d; }
.auth-status[aria-current="page"] { border-color: var(--accent); }
.auth-card { width: min(100%, 600px); margin: 24px auto; padding: clamp(20px, 5vw, 36px); }
.auth-card h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
.auth-card .lede { margin-block-end: 24px; }
.auth-providers { display: grid; gap: 10px; }
.auth-google { width: 100%; background: #f3ede2; color: #16130f; border-color: #f3ede2; }
.auth-google:hover { background: #fff9ef; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .84rem; margin: 8px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.auth-form { display: grid; gap: 10px; min-width: 0; }
.auth-form label { font-weight: 650; font-size: .9rem; }
.auth-form .fine { margin: 0 0 4px; }
.auth-form .btn-row { margin-block-start: 0; }
.auth-input { display: block; width: 100%; min-width: 0; min-height: 48px; padding: 12px 14px;
  border: 1px solid #74613d; border-radius: 10px; background: #16130f; color: var(--text); font: inherit; }
.auth-input::placeholder { color: #b7ac99; opacity: 1; }
.auth-input:disabled { opacity: .7; }
.auth-input:read-only { border-style: dashed; }
.auth-code { text-align: center; font: 650 1.6rem/1.5 var(--sans); letter-spacing: .28em; font-variant-numeric: tabular-nums; }
.auth-form.has-challenge { margin-block-end: 10px; }
.auth-message { min-height: 1.5em; margin-block: 12px 0; font-size: .9rem; color: var(--green); }
.auth-message:empty { min-height: 0; margin: 0; }
.auth-error, .account-card [role="alert"] { color: #ff9a85; }
.auth-provider-disabled { border-inline-start: 3px solid #807253; padding-inline-start: 12px; }
.auth-card > .fine { margin-block: 20px; }
.account-details { padding: 16px; margin-block: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.account-details dt { color: var(--muted); font-size: .8rem; }
.account-details dd { margin: 5px 0 0; overflow-wrap: anywhere; }
.auth-guest-cta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; border-style: dashed; border-color: #8a7140; background: #302719; }
.auth-guest-cta > div { flex: 1 1 270px; }
.auth-guest-cta p { margin-block: 6px 0; }
.auth-guest-cta .btn { flex: 0 1 auto; }
.passport-guest-locked .stamp-status { border-style: dashed; color: #ddd0b9; }
.passport-guest-locked .passport-progress { opacity: .5; }
.passport-guest-locked .milestone:not(.is-selected) .passport-seal { color: #8e8067; }
.passport-guest-locked .streak-number strong { color: #b8aa90; }
.auth-lock-note { border-inline-start: 3px solid #8a7140; padding-inline-start: 12px; margin-block: 18px 0; }
.auth-sync-note { margin-block: 16px 0; }
[dir="rtl"] .auth-card, [dir="rtl"] .auth-guest-cta { direction: rtl; text-align: start; }
[dir="rtl"] .auth-input { direction: ltr; }
@media (max-width: 600px) {
  .topbar { flex-wrap: wrap; }
  .top-actions { flex: 1 1 100%; justify-content: flex-end; }
  .top-actions .auth-status { order: -1; margin-inline-end: auto; max-width: calc(100% - 165px); }
  .auth-card { margin-block: 14px; }
  .auth-guest-cta { gap: 12px; }
}

/* ---- Home attendance / original material badge collection ---- */
:root { --badge-metal: #aebbc6; }
.seal-starter { --badge-metal: #aebbc6; }
.seal-sticker { --badge-metal: #cd9562; }
.seal-explorer { --badge-metal: #cbdde7; }
.seal-badge { --badge-metal: #f1c76b; }
.seal-inspector { --badge-metal: #c1e9ed; }
.seal-legend { --badge-metal: #dcc8ff; }
.badge-art { position: relative; display: inline-block; width: 64px; height: 64px; flex: none; vertical-align: middle; color: var(--badge-metal); }
.badge-art::before { content: ''; position: absolute; inset: 12%; background: linear-gradient(135deg, #fff2, #12141688 50%, #fff1); border: 1px solid #c6bba82e; border-radius: 12px; }
.badge-image, .badge-fallback { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.badge-image { opacity: 0; filter: drop-shadow(0 5px 5px #0006); }
.badge-art.has-art .badge-image { opacity: 1; }
.badge-art.has-art .badge-fallback { visibility: hidden; }
.badge-silhouette { fill: #2d3031; fill-rule: evenodd; stroke: currentColor; stroke-width: 2.5; stroke-linejoin: round; }
.passport-nav .badge-art { width: 26px; height: 26px; }
.home-first-row { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 24px; align-items: stretch; margin-block: 10px 24px; }
.home-first-row > * { min-width: 0; margin: 0; }
.home .daily-hero { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(20px, 3vw, 38px); border: 1px solid #544936; border-radius: 18px; background: radial-gradient(ellipse at 0 0, #ffd23f0d, transparent 70%), linear-gradient(140deg, #282217, #1b1813); }
.daily-hero h1 { font-size: clamp(2.1rem, 4vw, 3.3rem); max-width: 12em; }
.daily-hero .lede { margin-block: 12px 16px; max-width: 29em; }
.home .daily-hero .btn { margin-block: 0 16px; }
.home-reset { margin: 0; }
.home-reset > span { display: block; margin-top: 4px; }
.attendance-dashboard { padding: 22px; border-radius: 18px; border-color: #77634b; background: radial-gradient(ellipse at 100% 0, #b5c7db0d, transparent 65%), linear-gradient(145deg, #2b2822, #1f1d19); }
.attendance-dashboard::before { border-style: solid; border-color: #b49b6320; border-radius: 12px; }
.attendance-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.attendance-heading h2 { font: 700 1.05rem/1.3 var(--sans); margin: 0; }
.attendance-heading .stamp-status { margin: 0; padding: 4px 8px; font-size: .72rem; }
.attendance-identity { display: flex; align-items: center; gap: 18px; padding-block: 18px 14px; }
.attendance-identity > .badge-art { width: 118px; height: 118px; }
.honor-copy { min-width: 0; }
.honor-copy .eyebrow { color: #bdb09b; font-size: .66rem; letter-spacing: .07em; }
.honor-copy h3 { font-size: clamp(1.25rem, 2.4vw, 1.9rem); }
.equipped-label { margin: 7px 0 0; color: #c4bcae; }
.attendance-current { display: grid; grid-template-columns: minmax(90px, .3fr) minmax(0, 1fr); gap: 20px; align-items: center; padding-block: 10px 14px; border-top: 1px solid #c6bba823; }
.attendance-current .streak-number { border-color: #c6bba82e; padding-inline-end: 16px; }
.attendance-current .streak-number strong { color: #f4d995; font: 800 clamp(3.2rem, 5.4vw, 4.2rem)/1 var(--sans); }
.attendance-current .streak-number span { margin-block-start: 6px; font-size: .73rem; }
.attendance-current .passport-goal h3 { font: 650 .97rem/1.4 var(--sans); margin: 0; }
.attendance-current .progress-numbers { margin-block: 6px 8px; font-size: .76rem; }
.attendance-current .passport-progress { height: 9px; accent-color: #e8bb57; color: #e8bb57; }
.attendance-current .passport-progress::-webkit-progress-value { background: #e8bb57; }
.attendance-current .passport-progress::-moz-progress-bar { background: #e8bb57; }
.honor-retained { color: #d0c6b4; padding-block-start: 8px; margin-block-end: 5px; font-size: .76rem; }
.attendance-rule { margin: 0; font-size: .74rem; color: #b4aa98; }
.attendance-login { min-height: 40px; margin-block-start: 12px; font-size: .82rem; }
.badge-collection { padding: 24px; border-color: #5c5141; border-radius: 18px; background: linear-gradient(150deg, #29241c, #211e19); }
.badge-collection > .fine { max-width: 80em; }
.badge-collection .pill { font-size: .76rem; white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
.badge-ladder { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-block: 22px 18px; }
.badge-tile { display: flex; flex-direction: column; align-items: stretch; min-width: 0; padding: 12px; border: 1px solid #655b4d; border-radius: 12px; background: linear-gradient(155deg, #ffffff07, #00000019); }
.badge-tile-art { position: relative; display: grid; place-items: center; min-height: 124px; border: 1px solid #ffffff10; border-radius: 8px; margin-block-end: 12px; background: radial-gradient(ellipse at 50% 38%, #ffffff10, transparent 70%), repeating-linear-gradient(135deg, transparent, transparent 10px, #ffffff02 10px, #ffffff02 11px); box-shadow: inset 0 1px 0 #ffffff10, inset 0 -1px 0 #0008; }
.badge-tile-art::before, .badge-tile-art::after { content: ''; position: absolute; width: 10px; height: 10px; border-color: var(--badge-metal); border-style: solid; opacity: .7; }
.badge-tile-art::before { inset-block-start: 6px; inset-inline-start: 6px; border-width: 1px 0 0 1px; }
.badge-tile-art::after { inset-block-end: 6px; inset-inline-end: 6px; border-width: 0 1px 1px 0; }
.badge-tile .badge-art { width: 110px; height: 110px; max-width: 100%; }
.badge-state { display: block; font-size: .65rem; color: #bab0a0; margin-block-end: 8px; }
.badge-state.earned { color: #aadebd; }
.badge-tile h3 { color: #eee5d6; font: 750 .95rem/1.3 var(--sans); min-height: 2.6em; margin-block-end: 6px; }
.badge-threshold { font-size: .74rem; margin-block-end: 6px; }
.badge-earned-note { font-size: .71rem; color: #c9bfaf; margin-block: 6px 14px; }
.badge-tile .milestone-progress { margin-block-end: 14px; }
.badge-tile .progress-numbers { font-size: .7rem; line-height: 1.45; }
.badge-tile .passport-progress { height: 6px; }
.badge-tile .appearance-select { width: 100%; min-height: 42px; margin-block-start: auto; padding: 8px 6px; font-size: .76rem; }
.badge-tile .appearance-select.selected { background: #e8bb5719; border-color: #e8bb5788; color: #f3d998; }
.badge-tile.is-selected { border-color: #e8bb57b3; background: linear-gradient(155deg, #e8bb5710, #00000019); }
.badge-tile.locked { border-style: dashed; }
.badge-tile.locked .badge-art { opacity: .65; }
.badge-tile.locked .badge-state::before { content: '◇ '; }
.badge-tile.unlocked .badge-state::before { content: '✓ '; }
.collection-retained { margin-block-end: 0; padding-block-start: 10px; border-top: 1px solid var(--line); }
.home-week-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; }
.home-week-row > .card { margin-block: 0 16px; }
.home-week-row .social-share { display: flex; flex-direction: column; justify-content: center; padding: 22px; }
.home-week-row .social-share .btn { align-self: flex-start; font-size: .93rem; padding-inline: 18px; }
.week-compact .week-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-block: 16px; }
.week-compact .week-day { padding: 10px 4px; gap: 5px; }
.week-compact .week-day .badge-art, .week-compact .empty-stamp { width: 38px; height: 38px; }
.week-compact .week-weekday, .week-compact .week-day time { font-size: .66rem; }
.week-compact .week-status { font-size: .64rem; overflow-wrap: anywhere; }
.week-compact .weekly-total { font-size: .77rem; margin: 0; }
[dir="rtl"] .badge-tile-art::before { border-width: 1px 1px 0 0; }
[dir="rtl"] .badge-tile-art::after { border-width: 0 0 1px 1px; }
@media (max-width: 1050px) {
  .badge-ladder { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .badge-tile h3 { min-height: 0; }
  .badge-tile-art { min-height: 144px; }
  .badge-tile .badge-art { width: 134px; height: 134px; }
}
@media (max-width: 760px) {
  .home-first-row { grid-template-columns: 1fr; gap: 12px; margin-block: 0 16px; }
  .home .daily-hero { padding: 16px 18px; }
  .daily-hero h1 { font-size: 1.9rem; max-width: none; margin-block-end: 0; }
  .daily-hero .lede { font-size: .91rem; line-height: 1.4; margin-block: 8px 12px; }
  .home .daily-hero .btn { min-height: 46px; padding: 10px 20px; font-size: .98rem; margin-block-end: 10px; }
  .home-reset { font-size: .72rem; }
  .home-reset > span { display: inline; margin-inline-start: 6px; }
  .attendance-dashboard { padding: 16px; }
  .attendance-heading h2 { font-size: .96rem; }
  .attendance-identity { gap: 14px; padding-block: 12px 8px; }
  .attendance-identity > .badge-art { width: 94px; height: 94px; }
  .honor-copy h3 { font-size: 1.3rem; }
  .equipped-label { font-size: .74rem; }
  .attendance-current { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding-block: 10px; }
  .attendance-current .streak-number strong { font-size: 3.1rem; }
  .attendance-current .streak-number span { display: block; font-size: .67rem; margin-inline-end: 0; }
  .attendance-current .streak-number { text-align: center; border-inline-end: 1px solid #c6bba82e; padding-inline-end: 12px; }
  .attendance-current .passport-goal h3 { font-size: .86rem; }
  .honor-retained, .attendance-rule { font-size: .7rem; }
  .badge-collection { padding: 18px; }
  .badge-collection .card-head { gap: 8px; }
  .badge-collection h2 { font-size: 1.5rem; }
  .badge-ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-block-start: 16px; }
  .badge-tile { padding: 11px; }
  .badge-tile-art { min-height: 126px; }
  .badge-tile .badge-art { width: 116px; height: 116px; }
  .badge-tile h3 { font-size: .9rem; }
  .home-week-row { grid-template-columns: 1fr; gap: 0; }
  .week-compact { padding: 16px 12px; }
  .week-compact .week-grid { gap: 4px; }
  .week-compact .week-day { padding: 8px 2px; }
  .week-compact .week-day .badge-art, .week-compact .empty-stamp { width: 28px; height: 28px; }
  .week-compact .week-weekday, .week-compact .week-day time, .week-compact .week-status { font-size: .6rem; }
}
@media (max-width: 360px) {
  .daily-hero h1 { font-size: 1.65rem; }
  .home .daily-hero { padding: 14px; }
  .attendance-identity > .badge-art { width: 82px; height: 82px; }
  .honor-copy h3 { font-size: 1.14rem; }
  .attendance-heading .stamp-status { font-size: .64rem; }
  .badge-tile-art { min-height: 106px; }
  .badge-tile .badge-art { width: 96px; height: 96px; }
}

/* ---- Owner-only finished-photo score spectrum (never part of a share card) ---- */
.score-spectrum { min-width: 0; margin-block: 12px 16px; }
.spectrum-count { margin-block-end: 6px; font-weight: 650; }
.spectrum-values { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 10px; }
.spectrum-values .spectrum-value { color: var(--text); background: var(--bg2); border-color: var(--line); font-variant-numeric: tabular-nums; }
.spectrum-note { margin: 0; line-height: 1.5; }
.spectrum-review > .spectrum-note { margin-block: 8px 16px; }
.spectrum-scenes { display: grid; gap: 10px; }
.spectrum-scene { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.spectrum-scene h3 { font-size: 1.06rem; margin-block-end: 8px; }
.spectrum-own-score { margin: 0; font-weight: 700; }
.spectrum-scene .score-spectrum { margin-block: 8px 0; }
.spectrum-scene .spectrum-values { margin-block-end: 0; }
[dir="rtl"] .score-spectrum, [dir="rtl"] .spectrum-review { direction: rtl; text-align: start; }

/* Keep the continuation controls outside the scrolling summary body. Scope excludes tutorial/shares. */
.scene-summary { min-height: 0; overflow: hidden; grid-template-rows: minmax(0, 1fr); }
.scene-summary-card { display: flex; flex-direction: column; min-height: 0; max-height: 100%; overflow: hidden; padding: 0; }
.scene-summary-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 22px; }
.scene-summary-body p, .scene-summary-body h2, .scene-summary-body .eyebrow { overflow-wrap: anywhere; }
.scene-summary-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; flex-shrink: 0; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--card); }
.scene-summary-actions .btn { min-width: 0; width: 100%; margin: 0; }
@media (max-width: 700px), (max-height: 600px) {
  .scene-summary { position: fixed; inset: 0; z-index: 40; border-radius: 0; padding: 12px; padding-block-start: max(12px, env(safe-area-inset-top)); padding-block-end: max(12px, env(safe-area-inset-bottom)); }
  .scene-summary-card { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .scene-summary-body { padding: 16px; }
  .scene-summary-body .big-score { font-size: clamp(1.8rem, 7vw, 3.2rem); }
  .scene-summary-actions { padding: 12px 16px; gap: 8px; }
}
