:root {
  --navy-0: #040b12;
  --navy-1: #07121f;
  --navy-2: #0c1b2b;
  --navy-3: #13283b;
  --paper: #eee1c2;
  --paper-2: #dac9a2;
  --ink: #17212a;
  --muted: #8190a0;
  --cream: #fff3da;
  --red: #8d292e;
  --red-2: #b44748;
  --cyan: #6cc7d6;
  --green: #6ca57a;
  --line: rgba(255,255,255,.12);
  --shadow: 0 24px 70px rgba(0,0,0,.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(circle at 50% 0%, #173047 0%, var(--navy-1) 38%, var(--navy-0) 100%); color: #edf2f5; }
body { min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(108,199,214,.55); outline-offset: 2px; }
.app-shell { width: min(100%, 560px); min-height: 100vh; margin: 0 auto; position: relative; overflow: hidden; background: linear-gradient(180deg, rgba(7,18,31,.96), rgba(4,11,18,.99)); box-shadow: 0 0 90px rgba(0,0,0,.35); }
.screen { min-height: 100vh; padding: max(22px, env(safe-area-inset-top)) 22px max(28px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; position: relative; isolation: isolate; }
.screen::before { content:""; position:absolute; inset:0; z-index:-2; background: radial-gradient(circle at 12% 16%, rgba(108,199,214,.08), transparent 28%), linear-gradient(135deg, transparent 72%, rgba(141,41,46,.09)); }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; }
.brand { display:flex; align-items:center; gap:10px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; font-size:13px; }
.brand-mark { width:34px; height:34px; border:1px solid rgba(255,243,218,.25); border-radius:10px; display:grid; place-items:center; color:var(--cream); background:#0d2031; }
.alpha { border:1px solid rgba(108,199,214,.38); color:var(--cyan); border-radius:999px; padding:6px 9px; font-size:11px; letter-spacing:.1em; text-transform:uppercase; }
.kicker { color:var(--cyan); font-size:12px; letter-spacing:.18em; text-transform:uppercase; font-weight:800; }
h1,h2,h3,p { margin:0; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 10vw, 58px); line-height:.95; letter-spacing:-.035em; color:var(--cream); }
h2 { font-family: Georgia, "Times New Roman", serif; font-size:32px; line-height:1.02; color:var(--cream); }
h3 { font-size:17px; }
.lead { font-size:17px; line-height:1.55; color:#c8d0d8; }
.muted { color:var(--muted); line-height:1.5; }
.spacer { flex:1; min-height:16px; }
.btn { min-height:52px; border:0; border-radius:14px; padding:14px 17px; font-weight:800; transition:transform .12s ease, background .12s ease; display:flex; align-items:center; justify-content:center; gap:10px; text-align:center; }
.btn:active { transform:translateY(1px); }
.btn-primary { background:linear-gradient(180deg, #a43b40, #7e242a); color:#fff8ec; box-shadow:0 12px 28px rgba(141,41,46,.27); }
.btn-secondary { background:#102437; color:#eaf1f5; border:1px solid rgba(255,255,255,.12); }
.btn-ghost { background:transparent; color:#bcc9d3; border:1px solid rgba(255,255,255,.12); }
.btn:disabled { opacity:.4; cursor:not-allowed; transform:none; box-shadow:none; }
.button-stack { display:grid; gap:10px; }
.card { border:1px solid rgba(255,255,255,.1); background:linear-gradient(180deg, rgba(19,40,59,.92), rgba(10,24,38,.92)); border-radius:20px; padding:18px; box-shadow:var(--shadow); }
.paper { color:var(--ink); background:linear-gradient(135deg, #f3e8ca, #e0cfaa); border-radius:12px 20px 16px 10px; padding:20px; position:relative; box-shadow:0 18px 40px rgba(0,0,0,.25); }
.paper::after { content:""; position:absolute; inset:0; pointer-events:none; opacity:.22; border-radius:inherit; background:repeating-linear-gradient(0deg, transparent 0 4px, rgba(71,55,31,.025) 5px); }
.paper .kicker { color:#7b262c; }
.case-number { font-family:ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing:.16em; font-size:12px; font-weight:800; }
.case-hero { min-height:290px; display:flex; flex-direction:column; justify-content:flex-end; overflow:hidden; position:relative; border-radius:22px; border:1px solid rgba(255,255,255,.12); background:#0c1b2b; box-shadow:var(--shadow); }
.case-hero img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.62; filter:saturate(.7) contrast(1.05); }
.case-hero::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg, transparent 22%, rgba(4,11,18,.4) 52%, rgba(4,11,18,.97) 100%); }
.case-hero-content { position:relative; z-index:1; padding:22px; }
.case-hero h2 { font-size:38px; }
.form-label { display:block; color:#c9d3da; font-weight:700; margin-bottom:8px; }
.input { width:100%; min-height:54px; padding:13px 15px; border-radius:13px; border:1px solid rgba(255,255,255,.15); background:#081522; color:#f4f7f8; font-size:17px; }
.code-input { text-transform:uppercase; letter-spacing:.25em; text-align:center; font-size:24px; font-weight:900; }
.code-box { text-align:center; padding:24px 18px; }
.code { font-size:clamp(38px,12vw,58px); letter-spacing:.16em; font-weight:900; color:var(--cream); font-family:ui-monospace, SFMono-Regular, Menlo, monospace; }
.copyline { font-size:13px; color:var(--muted); margin-top:8px; }
.member-list { display:grid; gap:10px; }
.member { display:flex; align-items:center; gap:12px; border:1px solid var(--line); background:#0a1927; border-radius:15px; padding:12px; }
.avatar { width:44px; height:44px; border-radius:50%; display:grid; place-items:center; font-weight:900; background:linear-gradient(145deg, #24435b, #102132); border:1px solid rgba(108,199,214,.28); color:#dff8fb; flex:0 0 auto; }
.member-main { min-width:0; flex:1; }
.member-name { font-weight:800; }
.member-meta { color:var(--muted); font-size:13px; margin-top:2px; }
.status { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:#aebac4; }
.dot { width:8px; height:8px; border-radius:50%; background:#516170; }
.dot.on { background:var(--green); box-shadow:0 0 0 4px rgba(108,165,122,.1); }
.role-seal { width:132px; height:132px; border-radius:50%; margin:12px auto; display:grid; place-items:center; background:radial-gradient(circle, #183a52 0%, #0a1d2d 70%); border:2px solid rgba(108,199,214,.35); box-shadow:0 0 0 12px rgba(108,199,214,.035); font:900 50px/1 Georgia,serif; color:var(--cream); }
.clue-card { overflow:hidden; padding:0; }
.clue-art { height:180px; background:#0b1721; overflow:hidden; }
.clue-art img { width:100%; height:100%; object-fit:cover; opacity:.72; filter:saturate(.65) contrast(1.08); }
.clue-body { padding:18px; }
.private-badge { display:inline-flex; gap:7px; align-items:center; border:1px solid rgba(180,71,72,.42); color:#f1b7b8; background:rgba(141,41,46,.15); padding:7px 10px; border-radius:999px; font-size:11px; font-weight:900; letter-spacing:.09em; text-transform:uppercase; }
.quote { border-left:3px solid var(--red-2); padding-left:14px; font-family:Georgia,serif; font-size:21px; line-height:1.35; color:var(--ink); }
.evidence-list { display:grid; gap:11px; }
.evidence { border:1px solid rgba(255,255,255,.11); border-radius:16px; background:#0b1b2a; padding:14px; position:relative; }
.evidence.shared::before { content:""; position:absolute; left:-11px; top:24px; width:11px; border-top:2px solid var(--red-2); opacity:.6; }
.evidence-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.evidence-summary { color:#c1ccd5; font-size:14px; line-height:1.5; margin-top:8px; }
.connection-list { display:grid; gap:10px; counter-reset:item; }
.connection { padding:13px 14px; border-radius:12px; background:rgba(238,225,194,.07); border:1px solid rgba(238,225,194,.13); color:#dce4e9; line-height:1.45; }
.theory-list { display:grid; gap:10px; }
.theory { width:100%; text-align:left; border:1px solid rgba(255,255,255,.12); background:#0b1a28; color:#ecf1f4; border-radius:16px; padding:16px; }
.theory.selected { border-color:var(--red-2); background:rgba(141,41,46,.16); box-shadow:inset 0 0 0 1px rgba(180,71,72,.3); }
.theory-title { font-weight:900; }
.theory p { color:#9daeba; line-height:1.4; margin-top:6px; }
.vote-row { display:flex; justify-content:space-between; align-items:center; margin-top:10px; font-size:12px; color:#9eabb5; }
.progress { height:8px; background:#08131e; border-radius:999px; overflow:hidden; margin-top:7px; }
.progress > span { display:block; height:100%; background:linear-gradient(90deg, var(--cyan), #b2e5ec); border-radius:inherit; }
.success-stamp { width:120px; height:120px; border:5px double #527e5d; color:#527e5d; border-radius:50%; display:grid; place-items:center; margin:0 auto; transform:rotate(-7deg); font-weight:950; text-align:center; letter-spacing:.08em; font-size:14px; }
.reward-number { font:700 64px/1 Georgia,serif; color:var(--cream); text-align:center; }
.small-actions { display:flex; gap:8px; flex-wrap:wrap; }
.small-btn { min-height:42px; padding:9px 12px; border-radius:12px; border:1px solid rgba(255,255,255,.11); background:#0a1927; color:#cbd6dd; font-weight:700; }
.screen-count { font:700 11px/1 ui-monospace,monospace; color:#6f8291; letter-spacing:.12em; }
.toast { position:fixed; left:50%; bottom:24px; z-index:50; transform:translate(-50%, 18px); width:min(calc(100% - 32px), 480px); padding:13px 15px; border-radius:13px; background:#eef0e8; color:#15202a; box-shadow:0 18px 50px rgba(0,0,0,.35); opacity:0; pointer-events:none; transition:.2s ease; font-weight:700; }
.toast.show { opacity:1; transform:translate(-50%, 0); }
.warning { padding:12px 14px; border-radius:12px; border:1px solid rgba(180,71,72,.35); background:rgba(141,41,46,.12); color:#f0c2c3; line-height:1.45; }
.good { color:#b8dfc2; }
.divider { height:1px; background:var(--line); margin:3px 0; }
@media (min-width: 720px) {
  body { padding:28px 0; }
  .app-shell, .screen { min-height:780px; }
  .app-shell { border-radius:28px; border:1px solid rgba(255,255,255,.09); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior:auto!important; transition:none!important; } }
