:root {
  color-scheme: dark;
  --ink: #edf0ff;
  --muted: #aeb8d8;
  --canvas: #080c1d;
  --panel: rgba(18, 26, 58, 0.88);
  --panel-soft: rgba(33, 45, 91, 0.52);
  --line: rgba(177, 191, 255, 0.19);
  --violet: #8e91ff;
  --amber: #f0c466;
  --danger: #ffacb5;
  --safe: #9ce4ca;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 86% -12%, rgba(104, 93, 218, 0.3), transparent 32rem), radial-gradient(circle at -8% 46%, rgba(210, 158, 70, 0.12), transparent 28rem), var(--canvas); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, .disabled { cursor: not-allowed; opacity: 0.48; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 99; top: -60px; left: 16px; color: #121936; background: var(--amber); padding: 10px 14px; border-radius: 9px; }
.skip-link:focus { top: 16px; }
.site-header { max-width: 1180px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 24px 14px; display: flex; justify-content: space-between; align-items: center; }
.brand { color: var(--ink); text-decoration: none; letter-spacing: -0.04em; font-size: 1.12rem; display: flex; align-items: center; gap: 10px; font-weight: 770; }
.brand small { display: block; color: var(--amber); letter-spacing: 0.15em; font-size: 0.47rem; margin-top: 1px; }
.brand-mark { height: 34px; width: 34px; display: inline-grid; place-items: center; color: #10152f; background: linear-gradient(145deg, var(--violet), var(--amber)); border-radius: 11px 11px 11px 3px; font-weight: 900; }
.quiet-button, .text-button, .card-link { border: 0; color: var(--ink); background: transparent; text-decoration: underline; text-underline-offset: 4px; }
.quiet-button { color: var(--muted); font-size: 0.86rem; }
main { max-width: 1180px; margin: 0 auto; padding: 0 24px 40px; }
.nav-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 22px; scrollbar-width: none; }
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tab { flex: 0 0 auto; background: transparent; border: 1px solid transparent; color: var(--muted); padding: 9px 13px; border-radius: 999px; font-size: 0.87rem; }
.nav-tab.active { color: var(--ink); border-color: var(--line); background: rgba(130, 139, 255, 0.12); }
.panel { border: 1px solid var(--line); background: linear-gradient(135deg, rgba(30, 40, 83, 0.92), rgba(12, 17, 42, 0.88)); box-shadow: var(--shadow); border-radius: 26px; }
.hero { padding: clamp(32px, 7vw, 76px); overflow: hidden; position: relative; }
.hero::after { content: ""; pointer-events: none; width: 320px; height: 320px; position: absolute; right: -100px; bottom: -140px; border: 1px solid rgba(240,196,102,.28); border-radius: 50%; box-shadow: 0 0 0 28px rgba(142,145,255,.06), 0 0 0 58px rgba(240,196,102,.04); }
.eyebrow { color: var(--amber); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.71rem; font-weight: 760; }
.status-dot { height: 7px; width: 7px; display: inline-block; border-radius: 50%; background: var(--safe); margin-right: 4px; box-shadow: 0 0 12px var(--safe); }
.divider { color: var(--muted); padding: 0 4px; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 790px; font-size: clamp(2.2rem, 6vw, 5rem); letter-spacing: -0.065em; line-height: 0.96; margin: 16px 0 20px; }
h2 { letter-spacing: -0.035em; }
.lead { color: var(--muted); max-width: 630px; line-height: 1.6; font-size: clamp(1rem, 2.2vw, 1.16rem); }
.hero-actions, .timer-actions, .summary-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
.primary-button, .secondary-button { min-height: 46px; border-radius: 13px; padding: 0 18px; border: 1px solid transparent; font-weight: 730; transition: transform 140ms ease, background 140ms ease; }
.primary-button:hover, .secondary-button:hover:not(:disabled) { transform: translateY(-1px); }
.primary-button { background: linear-gradient(135deg, var(--violet), #6970dd); color: #fff; box-shadow: 0 9px 22px rgba(100, 105, 223, 0.27); }
.secondary-button { color: var(--ink); background: rgba(165, 178, 255, 0.1); border-color: var(--line); }
.public-notice, .photo-warning { max-width: 690px; margin-top: 32px; padding: 14px 16px; background: rgba(240, 196, 102, 0.09); border-left: 3px solid var(--amber); color: #e7dcba; font-size: 0.89rem; line-height: 1.55; }
.mission-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.mission-card { min-height: 230px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel-soft); display: flex; flex-direction: column; align-items: flex-start; }
.mission-card h2 { font-size: 1.22rem; margin: 22px 0 10px; }
.mission-card p { color: var(--muted); line-height: 1.55; flex: 1; }
.card-number { color: var(--amber); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.76rem; }
.card-link { padding: 0; font-weight: 700; }
.case-layout { display: grid; grid-template-columns: 0.86fr 1.14fr; gap: 18px; }
.case-intro, .case-workspace, .focus-view, .photo-view, .summary-view { padding: clamp(24px, 4vw, 42px); }
.case-intro p { color: var(--muted); line-height: 1.65; }
.audio-button { color: var(--amber); padding: 0; font-weight: 650; }
.evidence-strip { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); line-height: 1.5; font-size: .88rem; }
.evidence-strip span { display: block; color: var(--amber); font-size: .65rem; letter-spacing: .12em; font-weight: 800; margin-bottom: 6px; }
.question-index { color: var(--amber); text-transform: uppercase; letter-spacing: .13em; font-size: .72rem; font-weight: 750; }
.question-index span { color: var(--muted); }
.case-workspace h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); line-height: 1.08; margin: 15px 0 32px; }
label { display: block; font-size: .9rem; font-weight: 700; margin: 18px 0 8px; }
input, textarea { width: 100%; color: var(--ink); background: rgba(7, 11, 28, .64); border: 1px solid rgba(181, 194, 255, .32); border-radius: 12px; padding: 13px 14px; }
textarea { line-height: 1.5; resize: vertical; }
.answer-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.field-help { color: var(--muted); font-size: .84rem; line-height: 1.45; margin: 9px 0 0; }
.hint-actions { margin: 22px 0 0; }
.hint-box { border: 1px solid rgba(240,196,102,.26); background: rgba(240,196,102,.08); color: #e6ddbd; padding: 15px; margin-top: 14px; border-radius: 13px; line-height: 1.5; }
.hint-box strong { color: var(--amber); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.hint-box p { margin: 8px 0 0; }
.feedback { padding: 14px; margin-top: 16px; border-radius: 12px; line-height: 1.55; }
.feedback.correct { background: rgba(84, 183, 145, .14); border: 1px solid rgba(138,226,194,.32); color: #c7f2df; }
.feedback.retry, .feedback.empty { background: rgba(160, 178, 255, .12); border: 1px solid var(--line); color: #dbe1ff; }
.explanation-block { margin-top: 22px; padding-top: 10px; border-top: 1px solid var(--line); }
.explanation-block .secondary-button { margin-top: 11px; }
.focus-view { text-align: center; max-width: 770px; margin: 0 auto; }
.focus-view .lead { margin: 0 auto; }
.timer { margin: 34px auto; width: min(100%, 380px); padding: 30px; border: 1px solid rgba(142,145,255,.4); border-radius: 22px; background: radial-gradient(circle, rgba(142,145,255,.22), rgba(142,145,255,.03) 65%); }
.timer span { display: block; font: 700 clamp(4rem, 13vw, 7rem)/.9 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.09em; }
.timer small { color: var(--muted); display: block; margin-top: 13px; }
.timer-actions { justify-content: center; }
.focus-note { text-align: left; max-width: 560px; margin: 34px auto 0; border-left: 3px solid var(--violet); padding: 5px 0 5px 15px; color: var(--muted); line-height: 1.6; }
.focus-note strong { color: var(--ink); }
.focus-note p { margin: 6px 0 0; }
.focus-note em { color: var(--amber); font-style: normal; }
.photo-view, .summary-view { max-width: 800px; margin: 0 auto; }
.check-line { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; color: var(--muted); line-height: 1.45; }
.check-line input { width: 19px; height: 19px; margin-top: 1px; }
.photo-actions { margin: 12px 0 18px; }
.upload-button { display: inline-flex; align-items: center; }
#photo-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.photo-preview { display: grid; grid-template-columns: 156px 1fr; gap: 16px; margin: 14px 0 16px; padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: rgba(7, 11, 28, .42); }
.photo-preview img { width: 156px; height: 118px; object-fit: cover; border-radius: 10px; }
.photo-preview p { color: var(--muted); font-size: .88rem; }
.danger-link { color: var(--danger); padding: 0; }
.summary-note { color: #dce3ff; background: rgba(142,145,255,.11); border: 1px solid rgba(142,145,255,.25); border-radius: 15px; padding: 22px; line-height: 1.65; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 18px; background: rgba(3, 5, 15, .74); backdrop-filter: blur(9px); }
.safety-modal { position: relative; width: min(100%, 620px); padding: clamp(25px, 6vw, 43px); border: 1px solid rgba(255,172,181,.36); border-radius: 23px; color: var(--ink); background: #191a37; box-shadow: var(--shadow); }
.safety-modal h2 { font-size: clamp(1.6rem, 5vw, 2.4rem); line-height: 1.05; margin: 15px 0; }
.safety-modal p, .safety-modal li { color: #d1d7ef; line-height: 1.6; }
.safety-modal ul { padding-left: 20px; margin: 18px 0 25px; }
.safety-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 50%; background: var(--danger); color: #31111a; font-weight: 900; }
.close-button { position: absolute; right: 13px; top: 10px; border: 0; background: transparent; color: var(--muted); font-size: 2rem; }
footer { color: #8390b7; text-align: center; padding: 32px 8px 0; font-size: .75rem; }
#toast { position: fixed; z-index: 19; bottom: 22px; left: 50%; transform: translateX(-50%); width: min(calc(100% - 32px), 640px); text-align: center; color: #fff; font-size: .9rem; line-height: 1.4; }
#toast:not(:empty) { background: #242855; border: 1px solid var(--line); border-radius: 13px; padding: 12px 16px; box-shadow: var(--shadow); }
@media (max-width: 760px) { .site-header, main { padding-left: 16px; padding-right: 16px; } .quiet-button { font-size: .78rem; } .hero { padding: 31px 25px; } .mission-grid, .case-layout { grid-template-columns: 1fr; } .mission-card { min-height: 190px; } .case-layout { gap: 14px; } .answer-row { grid-template-columns: 1fr; } .answer-row .primary-button { width: 100%; } .photo-preview { grid-template-columns: 1fr; } .photo-preview img { width: 100%; height: 180px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; } }
