:root { --ink: #1d2925; --paper: #f4f0e8; --acid: #d5ed57; --coral: #f07e66; --muted: #7e8980; --line: rgba(29,41,37,.2); --mono: 'DM Mono', monospace; --serif: 'Fraunces', Georgia, serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 14px; }
button, a { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; background: radial-gradient(circle at 75% 15%, #3c4c3d 0, transparent 28%), linear-gradient(135deg, #1d2925 0%, #25342e 55%, #394639 100%); overflow: hidden; }
.topbar { height: 78px; padding: 0 5vw; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(244,240,232,.18); font-size: 11px; letter-spacing: .11em; }
.wordmark { color: var(--paper); text-decoration: none; font-weight: 500; }
.topbar-meta { display: flex; align-items: center; gap: 15px; color: #bcc8af; }
.live-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 5px rgba(213,237,87,.12); }
.reset-button { color: #bcc8af; border: 0; border-left: 1px solid rgba(244,240,232,.2); background: transparent; padding: 8px 0 8px 15px; font-size: 10px; letter-spacing: .1em; }
.lang-link { color: #bcc8af; text-decoration: none; border-left: 1px solid rgba(244,240,232,.2); padding-left: 15px; }
.lang-link:hover { color: var(--acid); }
.intro-screen, .experience, .end-screen { max-width: 1360px; margin: auto; padding: clamp(70px, 11vw, 150px) 8vw; }
.intro-screen { min-height: calc(100vh - 78px); display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 10vw; align-items: center; }
.eyebrow, .scene-kicker, .rail-label { color: var(--acid); font-size: 11px; letter-spacing: .15em; margin: 0 0 30px; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: 0; }
h1 { max-width: 700px; font-size: clamp(54px, 7.7vw, 116px); line-height: .91; margin: 0 0 42px; }
h1 em { color: var(--acid); font-style: normal; }
.intro-lede { max-width: 485px; color: #c8d0bf; line-height: 1.7; margin: 0 0 42px; }
.content-note { max-width: 560px; color: var(--paper); font-size: 13px; line-height: 1.7; margin: -30px 0 46px; border: 1px solid rgba(240,126,102,.55); border-left: 4px solid var(--coral); background: rgba(240,126,102,.09); padding: 18px 20px; }
.case-picker { max-width: 650px; margin-bottom: 30px; }
.case-label { color: var(--acid); font-size: 10px; letter-spacing: .14em; margin: 0 0 12px; }
.case-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.case-option { min-height: 90px; text-align: left; color: #bac5b5; border: 1px solid rgba(244,240,232,.22); background: rgba(244,240,232,.04); padding: 12px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-content: start; transition: border .2s, background .2s, color .2s; }
.case-option strong { color: var(--coral); font-weight: 400; font-size: 11px; grid-row: span 2; }
.case-option span { font-size: 10px; letter-spacing: .06em; }
.case-option small { color: #869487; font-size: 10px; margin-top: 7px; grid-column: 2; }
.case-option:hover, .case-option.selected { border-color: var(--acid); background: rgba(213,237,87,.11); color: var(--paper); }
.start-button { display: inline-flex; align-items: center; gap: 42px; border: 1px solid var(--acid); background: var(--acid); color: var(--ink); padding: 17px 18px; font-size: 11px; letter-spacing: .09em; transition: transform .2s, background .2s; }
.start-button b { font-size: 18px; font-weight: 400; line-height: 10px; }
.start-button:hover { transform: translate(4px, -4px); background: #e4f77c; }
.intro-aside { align-self: end; padding-bottom: 18px; color: #a5b19f; font-size: 10px; letter-spacing: .12em; line-height: 1.8; }
.clock-face { width: 145px; height: 145px; border: 1px solid rgba(244,240,232,.4); border-radius: 50%; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--paper); font-size: 26px; margin-bottom: 34px; position: relative; }
.clock-face:after { content: ''; position: absolute; width: 1px; height: 55px; background: var(--coral); transform: rotate(32deg); bottom: 25px; left: 73px; transform-origin: bottom; }
.aside-line { width: 100%; height: 1px; background: rgba(244,240,232,.25); margin-bottom: 18px; }
.hidden { display: none !important; }
.experience { min-height: calc(100vh - 78px); padding-top: 70px; display: grid; grid-template-columns: 260px minmax(0, 720px); gap: clamp(45px, 10vw, 150px); align-items: center; }
.status-rail { color: #c8d0bf; min-height: 450px; display: flex; flex-direction: column; }
.rail-heading { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .13em; }
.rail-heading strong { color: var(--acid); font-weight: 400; font-size: 16px; letter-spacing: 0; }
.capacity-bar { height: 5px; background: rgba(244,240,232,.16); margin: 16px 0 15px; overflow: hidden; }
.capacity-bar span { display: block; height: 100%; width: 72%; background: var(--acid); transition: width .5s, background .5s; }
.rail-note { color: #a5b19f; line-height: 1.55; font-size: 11px; margin: 0; }
.rail-divider { height: 1px; background: var(--line); margin: 38px 0 28px; }
.rail-label { font-size: 10px; margin-bottom: 16px; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid rgba(244,240,232,.2); }
.timeline li { color: #7e8980; font-size: 11px; padding: 0 0 17px 18px; position: relative; }
.timeline li:before { content: ''; position: absolute; left: -4px; top: 2px; width: 7px; height: 7px; border-radius: 50%; background: #59665c; }
.timeline li.active { color: var(--paper); }
.timeline li.active:before { background: var(--coral); box-shadow: 0 0 0 4px rgba(240,126,102,.15); }
.timeline li.done:before { background: var(--acid); }
.timeline li.done { color: #a5b19f; }
.sensory-log { margin-top: auto; }
.sensory-log #signalLog { min-height: 37px; color: var(--coral); font-size: 11px; line-height: 1.6; }
.quiet-signal { color: #687568; }
.scene-panel { position: relative; background: var(--paper); color: var(--ink); min-height: 580px; display: flex; flex-direction: column; box-shadow: 18px 18px 0 rgba(11,18,15,.15); animation: arrive .7s ease both; }
.scene-header, .scene-footer { display: flex; justify-content: space-between; padding: 20px 26px; color: #758078; font-size: 10px; letter-spacing: .13em; border-bottom: 1px solid var(--line); }
.scene-footer { border-top: 1px solid var(--line); border-bottom: 0; margin-top: auto; }
.scene-body { padding: 54px clamp(26px, 6vw, 78px); }
.scene-kicker { color: #a34e3f; margin-bottom: 22px; }
.scene-body h2 { font-size: clamp(36px, 4vw, 58px); line-height: .98; margin: 0 0 25px; max-width: 570px; }
.scene-text { max-width: 540px; line-height: 1.7; color: #53605a; margin: 0 0 32px; }
.choice-list { display: grid; gap: 10px; }
.choice { width: 100%; text-align: left; border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 20px; line-height: 1.4; transition: border .2s, background .2s, transform .2s; }
.choice span:last-child { color: #a34e3f; font-size: 11px; white-space: nowrap; }
.choice:hover, .choice:focus-visible { background: #e8e3d7; border-color: var(--ink); transform: translateX(5px); outline: none; }
.microcopy { color: #899189; font-size: 10px; margin: 24px 0 0; }
.end-screen { min-height: calc(100vh - 78px); padding-top: 12vh; }
.end-screen h2 { font-size: clamp(54px, 8vw, 110px); line-height: .9; max-width: 700px; margin: 0 0 35px; }
.end-screen > p:not(.eyebrow) { max-width: 500px; line-height: 1.7; color: #c8d0bf; margin-bottom: 45px; }
.end-stats { display: flex; gap: 55px; border-top: 1px solid var(--line); max-width: 700px; padding-top: 25px; margin-bottom: 52px; }
.end-stats div { display: grid; gap: 10px; }
.end-stats span { font-size: 10px; color: #a5b19f; letter-spacing: .1em; }
.end-stats strong { font: 500 34px var(--serif); color: var(--acid); }
@keyframes arrive { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* --- SYSTEM STYLES: sensory, dopamine, thoughts, overlays --- */

.blur-word { filter: blur(2.5px); opacity: .55; letter-spacing: .04em; }
.scene-text, .scene-body h2 { transition: filter .6s; }

.capacity-bar.dopamine-bar span { background: #8fd0e8; }
.dopamine-heading { margin-top: 22px; }
.dopamine-heading strong { color: #8fd0e8; }

.stress-tag { float: right; color: var(--coral); }
.stress-tag b { font-weight: 400; }

.ambient-log { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 16px; }
#ambientFeed { display: flex; flex-direction: column; gap: 7px; max-height: 170px; overflow: hidden; }
.ambient-line { font-size: 10px; line-height: 1.5; color: #687568; animation: static-in .5s ease both; }
.ambient-line.intensity-2 { color: #a5b19f; }
.ambient-line.intensity-3 { color: var(--coral); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
@keyframes static-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }

.choice.veiled { opacity: 0; animation: unveil 1.1s ease forwards; }
@keyframes unveil { to { opacity: 1; } }
.choice.veiled:hover { opacity: 1; }

.thought-block { border: 1px dashed var(--coral); background: rgba(240,126,102,.07); padding: 16px 18px; margin-bottom: 12px; animation: static-in .4s ease both; }
.thought-text { color: #a34e3f; font-style: italic; margin: 0 0 12px; }
.thought-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.thought-actions button { border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 9px 14px; font-size: 10px; letter-spacing: .08em; transition: background .2s, border .2s; }
.thought-actions button:hover { background: #e8e3d7; border-color: var(--ink); }
.thought-actions button[data-act="engage"] { border-color: var(--coral); color: #a34e3f; }

.event-overlay { position: absolute; inset: 0; background: rgba(244,240,232,.96); display: flex; align-items: center; justify-content: center; z-index: 5; animation: arrive .4s ease both; }
.event-card { padding: 40px clamp(26px, 6vw, 70px); max-width: 560px; }
.event-kicker { color: #a34e3f; font-size: 10px; letter-spacing: .15em; margin: 0 0 20px; }
.event-card h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 3vw, 36px); line-height: 1.05; margin: 0 0 26px; }
.event-card.lockout h3 { color: #a34e3f; }
.event-actions { display: grid; gap: 10px; }
.event-actions button { text-align: left; border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 14px 16px; line-height: 1.4; transition: background .2s, border .2s, transform .2s; }
.event-actions button:hover { background: #e8e3d7; border-color: var(--ink); transform: translateX(5px); }
.event-actions .drift-btn { border-style: dashed; color: #a34e3f; font-style: italic; }
.event-note { color: #899189; font-size: 10px; margin: 18px 0 0; }

.fatigue-report { border: 1px solid var(--line); border-left: 3px solid var(--coral); padding: 26px 30px; max-width: 560px; margin-bottom: 35px; }
.fatigue-label { color: #a5b19f; font-size: 10px; letter-spacing: .15em; margin: 0 0 12px; }
.fatigue-number { font: 500 clamp(52px, 7vw, 88px)/1 var(--serif); color: var(--acid); display: block; margin-bottom: 18px; }
.fatigue-bar { height: 5px; background: rgba(244,240,232,.16); margin-bottom: 14px; overflow: hidden; }
.fatigue-bar span { display: block; height: 100%; width: 0; background: var(--coral); transition: width 1.2s ease; }
.fatigue-tier { color: var(--paper); font-size: 12px; margin: 0; }

.stats-legend { max-width: 700px; border: 1px solid var(--line); margin-bottom: 52px; }
.stats-legend summary { cursor: pointer; padding: 18px 22px; color: var(--acid); font-size: 11px; letter-spacing: .13em; list-style: none; transition: background .2s; }
.stats-legend summary::-webkit-details-marker { display: none; }
.stats-legend summary:before { content: '+ '; color: #7e8980; }
.stats-legend[open] summary:before { content: '\\2013 '; }
.stats-legend summary:hover { background: rgba(244,240,232,.04); }
.stats-legend ul { list-style: none; margin: 0; padding: 4px 22px 24px; display: grid; gap: 14px; }
.stats-legend li { display: grid; grid-template-columns: 180px 1fr; gap: 18px; font-size: 11px; line-height: 1.65; color: #c8d0bf; }
.stats-legend li b { color: var(--paper); font-weight: 400; }

.afterword { border: 1px solid rgba(143,208,232,.45); border-left: 4px solid #8fd0e8; background: rgba(143,208,232,.06); padding: 44px 46px; max-width: 760px; margin: 70px 0 60px; box-shadow: 14px 14px 0 rgba(11,18,15,.18); }
.afterword-title { color: #8fd0e8; font-size: 14px; letter-spacing: .2em; margin: 0 0 30px; }
.afterword ul { margin: 0 0 28px; padding: 0; list-style: none; display: grid; gap: 22px; }
.afterword li { color: #c8d0bf; font-size: 15px; line-height: 1.75; padding-left: 26px; position: relative; }
.afterword li:before { content: '—'; position: absolute; left: 0; color: #8fd0e8; }
.afterword li b { color: var(--paper); font-weight: 500; }
.afterword-close { color: var(--paper); font-family: var(--serif); font-size: 19px; line-height: 1.55; margin: 0; border-top: 1px solid rgba(143,208,232,.35); padding-top: 26px; }

.why-block { border-color: rgba(213,237,87,.45); border-left-color: var(--acid); background: rgba(213,237,87,.05); box-shadow: 14px 14px 0 rgba(11,18,15,.18); }
.why-block .afterword-title { color: var(--acid); }
.why-block li:before { color: var(--acid); }

.aside-em { color: var(--coral); font-style: normal; }

@media (max-width: 760px) { .ambient-log { display: none; } .end-stats { gap: 18px; } .afterword { padding: 30px 24px; margin: 50px 0 45px; } .afterword li { font-size: 13px; } .afterword-close { font-size: 16px; } .stats-legend li { grid-template-columns: 1fr; gap: 4px; } }
@media (max-width: 760px) { .topbar { padding: 0 22px; } .wordmark { font-size: 10px; } .topbar-meta { gap: 8px; font-size: 9px; } .reset-button { padding-left: 8px; } .intro-screen, .experience, .end-screen { padding: 55px 22px; } .intro-screen { display: block; } .case-options { grid-template-columns: 1fr; } .case-option { min-height: 0; grid-template-columns: 32px 1fr; } .intro-aside { margin-top: 65px; } .clock-face { width: 90px; height: 90px; font-size: 18px; margin-bottom: 20px; } .clock-face:after { height: 33px; left: 45px; bottom: 17px; } .experience { display: flex; flex-direction: column; align-items: stretch; gap: 35px; } .status-rail { min-height: 0; } .rail-divider { margin: 24px 0 18px; } .timeline { display: flex; gap: 0; border-left: 0; border-top: 1px solid rgba(244,240,232,.2); padding-top: 14px; } .timeline li { flex: 1; padding: 14px 4px 0 0; font-size: 9px; } .timeline li:before { left: 0; top: -4px; } .sensory-log { display: none; } .scene-panel { min-height: 570px; } .scene-body { padding: 38px 25px; } .scene-footer { font-size: 8px; } .end-stats { gap: 20px; flex-wrap: wrap; } }