:root { --accent: #75d5cd; --quiet: #aaa5b1; }
body { background-image: none; }
.game-wrap { max-width: 1180px; }
.topbar { border-bottom: 1px solid var(--line); padding: 24px 0; }
.topbar .brand .circ { border-color: var(--accent); }
.topbar nav a { font-size: 11px; }
.masthead { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 48px 0 32px; }
.eyebrow { font: 10px/1.6 var(--mono); text-transform: uppercase; letter-spacing: .16em; color: var(--quiet); margin: 0 0 12px; }
h1 { font: 400 clamp(64px, 10vw, 112px)/.95 var(--display); letter-spacing: -.035em; margin: 0; }
h1 span { color: var(--accent); }
.definition { margin: 0 0 5px; color: var(--quiet); font: 11px/1.9 var(--mono); }
.definition i { color: var(--ink); font-family: var(--serif); font-size: 16px; }
.chapter-line { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line); padding: 12px 0; font: 10px/1.6 var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.chapter-line span:first-child { color: var(--accent); }
.chapter-line span:last-child { color: var(--quiet); }
.game-layout { display: grid; grid-template-columns: 1.12fr 1fr; }
.story-column { min-width: 0; border-right: 1px solid var(--line); padding: 0 36px 30px 0; }
.scene { height: 210px; position: relative; display: grid; place-items: center; overflow: hidden; }
.apparition { display: none; width: 150px; height: 150px; position: relative; opacity: .8; transition: opacity 1s; }
.scene[data-phase="2"] .apparition, .scene[data-phase="3"] .apparition { display: block; }
.post-office { position: relative; width: 270px; height: 160px; opacity: .8; }
.office-window { position: absolute; top: 10px; left: 26px; width: 80px; height: 90px; border: 1px solid #77716c; background: repeating-linear-gradient(112deg, transparent 0 19px, #94908a18 20px 21px, transparent 22px 33px); }
.office-window::before, .office-window::after { content: ""; position: absolute; background: #77716c; }
.office-window::before { width: 1px; height: 100%; left: 50%; }
.office-window::after { height: 1px; width: 100%; top: 48%; }
.office-desk { position: absolute; height: 1px; left: 0; right: 0; bottom: 24px; background: #77716c; }
.envelope { position: absolute; width: 95px; height: 52px; bottom: 35px; right: 25px; border: 1px solid #a59e91; background: #1c1b1c; transform: rotate(-8deg); }
.envelope::before { content: ""; position: absolute; top: 8px; right: 8px; width: 14px; height: 17px; border: 1px dashed #a59e91; }
.envelope::after { content: ""; position: absolute; left: 10px; top: 29px; width: 42px; height: 1px; background: #a59e9160; box-shadow: 0 5px #a59e9140; }
.teacup { position: absolute; width: 29px; height: 31px; bottom: 25px; left: 64px; border: 1px solid #99938a; border-radius: 0 0 7px 7px; background: var(--bg); }
.teacup::after { content: ""; position: absolute; right: -11px; top: 5px; width: 9px; height: 15px; border: 1px solid #99938a; border-radius: 0 7px 7px 0; }
.scene[data-phase="2"] .post-office, .scene[data-phase="3"] .post-office { display: none; }
#game[data-phase="0"] .entry.fragment, #game[data-phase="1"] .entry.fragment { font: italic 17px/1.6 var(--serif); border-color: #77716c; color: #c5c0cc; }
.request { margin: 0 0 20px; padding: 17px 18px; border-left: 1px solid #77716c; background: #ffffff03; }
.request h3 { font: 400 20px/1.4 var(--serif); margin: 0 0 8px; }
.request p { margin: 0; font: italic 16px/1.6 var(--serif); color: #bfb8ae; }
.orbit { position: absolute; inset: 0; border: 1px solid #75d5cd25; border-radius: 50%; transition: transform 1s, border-color 1s; }
.orbit-one { inset: 12px; border-style: dashed; animation: revolve 100s linear infinite; }
.orbit-two { inset: 40px; border-color: #75d5cd45; }
.orbit-three { inset: -20px; border-color: #75d5cd0d; }
.light { position: absolute; inset: 65px; border-radius: 50%; background: #d7efea; box-shadow: 0 0 30px 5px #75d5cd22, 0 0 80px 15px #75d5cd0c; animation: breathe 6s ease-in-out infinite; }
.scene-caption { position: absolute; bottom: 8px; color: var(--quiet); font: 9px/1.5 var(--mono); letter-spacing: .12em; }
.reflection { position: absolute; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; opacity: 0; transition: opacity 1.5s; }
.r-one { top: 9px; left: 70px; }.r-two { top: 60px; right: -1px; }.r-three { bottom: 16px; right: 20px; }.r-four { bottom: 16px; left: 20px; }.r-five { top: 60px; left: -1px; }
.scene[data-phase="1"] .orbit-two { transform: translate(5px, -2px); border-style: dashed; }
.scene[data-phase="2"] .orbit-one { border-color: var(--accent); }
.scene[data-phase="3"] .orbit-two { transform: scale(1.8); }
.scene[data-danger="true"] .light { background: #ff9b8e; box-shadow: 0 0 35px 8px #ff9b8e25; }
.transcript { height: 286px; overflow-y: auto; padding: 18px 18px 12px 0; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; mask-image: linear-gradient(to bottom, transparent, #000 16px); }
.entry { font: 18px/1.55 var(--serif); color: #c5c0cc; margin: 0 0 17px; animation: arrive .4s ease both; overflow-wrap: anywhere; }
.entry .entry-num { display: block; color: var(--quiet); font: 9px/1.6 var(--mono); letter-spacing: .04em; margin-bottom: 4px; }
.entry.fragment { font-family: var(--mono); font-size: 11px; line-height: 1.9; border-left: 1px solid #75d5cd65; padding-left: 13px; color: var(--accent); }
.entry.warning { color: #ffb5a7; }
.entry:last-child { color: var(--ink); }
.latest { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.choice-column { padding: 34px 0 30px 36px; min-width: 0; }
h2 { font: 400 30px/1.2 var(--display); margin: 0 0 10px; }
.choice-head > p { color: var(--quiet); font-size: 15px; line-height: 1.55; margin: 0 0 25px; max-width: 39ch; }
button { font: inherit; color: inherit; cursor: pointer; }
.actions { display: grid; gap: 10px; }
.actions.unfolded { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.actions.unfolded .action:last-child:nth-child(odd) { grid-column: 1 / -1; }
.actions.unfolded .action-title { font-size: 19px; }
.action { width: 100%; text-align: left; border: 1px solid var(--line-2); border-radius: 3px; padding: 17px 18px; background: #111116; display: grid; grid-template-columns: 1fr auto; column-gap: 12px; transition: border-color .15s, background .15s; }
.action:hover:not(:disabled) { border-color: var(--accent); background: #151e20; }
.action:active:not(:disabled) { background: #1a2a2b; }
.action .action-title { font: 21px/1.2 var(--serif); }
.action .arrow { color: var(--accent); font: 18px/1.4 var(--mono); }
.action small { grid-column: 1 / -1; color: var(--quiet); font: 11px/1.7 var(--mono); margin-top: 6px; }
.action .cost { color: #c3d9d5; margin-top: 10px; font-size: 10px; }
.action:disabled { cursor: not-allowed; background: #0c0c12; border-color: var(--line); }
.action:disabled .action-title { color: #aaa4b1; }
.action:disabled .arrow { color: var(--quiet); }
.action:disabled small { color: #99939f; }
.action:disabled .cost { color: #c0a49b; }
.time-note { color: var(--quiet); font: 10px/1.8 var(--mono); margin: 16px 0 0; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 15px 0; margin-bottom: 22px; }
.metric-label { display: flex; justify-content: space-between; gap: 8px; font: 10px/1.8 var(--mono); color: var(--quiet); }
.metric-label b { color: var(--ink); font-weight: 400; }
.meter { height: 2px; background: var(--line); margin-top: 6px; }
.meter span { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.metric.danger .meter span { background: #ff9b8e; }
.metric.danger b { color: #ffb5a7; }
.resource-value { color: var(--accent); font: 25px/1.4 var(--display); }
#projects { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 22px; }
.section-label { margin: 0 0 14px; font: 10px/1.6 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }
#projects .action + .action { margin-top: 10px; }
#projects .action-title, .route .action-title { font-size: 18px; }
.possibilities { border-top: 1px solid var(--line-2); padding: 30px 0 10px; }
.possibilities-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.possibilities-head p { color: var(--quiet); font: 10px/1.8 var(--mono); margin: 0; }
.routes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.route { min-width: 0; }
.route + .route { border-left: 1px solid var(--line); padding-left: 28px; }
.route h3 { font: 400 28px/1.2 var(--display); margin: 6px 0 10px; }
.route .motif { font: 9px/1.7 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--accent); }
.route .route-desc { font-size: 16px; line-height: 1.5; color: var(--quiet); min-height: 72px; }
.steps { display: flex; gap: 5px; margin: 16px 0; }
.steps span { height: 2px; background: var(--line-2); flex: 1; }
.steps .done { background: var(--accent); }
.route .action { padding: 14px; }
.route .route-complete { color: var(--accent); font: 11px/1.8 var(--mono); }
.finales { margin-top: 24px; display: grid; gap: 10px; }
.finales .action { border-color: #75d5cd70; }
.utilities { border-top: 1px solid var(--line); margin-top: 25px; padding: 16px 0; display: flex; flex-wrap: wrap; gap: 15px; justify-content: space-between; align-items: center; }
.utilities > span { font: 10px/1.6 var(--mono); color: var(--quiet); }
.utilities > div { display: flex; gap: 22px; }
.utilities button { border: 0; background: none; padding: 7px 0; font: 10px/1.6 var(--mono); color: var(--quiet); text-decoration: underline; text-underline-offset: 4px; }
.utilities button:hover { color: var(--ink); }
.game-footer { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: var(--quiet); font: 9px/1.8 var(--mono); border-top: 1px solid var(--line); padding: 24px 0 30px; margin-top: 16px; }
.ending { padding: 45px 0 25px; max-width: 640px; margin: auto; }
.ending h2 { font-size: clamp(42px, 7vw, 64px); margin-bottom: 25px; }
.ending p { color: #c5c0cc; font-size: 19px; }
.ending .last-line { color: var(--accent); font-style: italic; margin: 32px 0; }
.ending .action { max-width: 350px; }
dialog { width: min(540px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); border: 1px solid var(--line-2); border-radius: 4px; background: #111118; color: var(--ink); padding: 30px; }
dialog::backdrop { background: #030308cf; backdrop-filter: blur(5px); }
dialog > p { color: var(--quiet); font-size: 17px; }
dialog h2 { font-size: 36px; }
.dialog-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
dialog button { border: 1px solid var(--line-2); background: #181822; border-radius: 3px; font: 11px/1.5 var(--mono); padding: 12px 15px; min-height: 44px; }
#accept-confirm { border-color: var(--accent); color: var(--accent); }
#archive-list { display: grid; gap: 0; margin: 20px 0; }
.archive-entry { border-top: 1px solid var(--line); padding: 14px 0; }
.archive-entry b { display: block; font: 400 21px/1.5 var(--serif); }
.archive-entry small { color: var(--quiet); font: 10px/1.8 var(--mono); }
button:focus-visible, a:focus-visible, .transcript:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
[hidden] { display: none !important; }
@keyframes revolve { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { opacity: .5; transform: scale(.7); } }
@keyframes arrive { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (min-width: 900px) { .story-column { position: sticky; top: 15px; align-self: start; } }
@media (max-width: 760px) {
  .masthead { padding: 35px 0 27px; }.definition { font-size: 9px; }
  .game-layout { grid-template-columns: 1fr; }.story-column { border-right: 0; padding: 0; }
  .scene { height: 155px; }.apparition { transform: scale(.75); }.scene-caption { bottom: 0; }
  .transcript { height: 220px; padding-right: 8px; }.entry { font-size: 17px; }
  .choice-column { border-top: 1px solid var(--line); padding: 25px 0 12px; }
  .choice-head > p { max-width: none; margin-bottom: 18px; }
  .routes { grid-template-columns: 1fr; gap: 25px; }
  .route + .route { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 25px; }
  .route .route-desc { min-height: 0; margin: 10px 0; }.route .action { padding: 17px; }
  .topbar { padding: 18px 0; }.topbar nav a { font-size: 10px; }
}
@media (max-width: 390px) { .definition { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
