@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Oswald:wght@500;600;700&display=swap');

:root { font-family: 'DM Sans', sans-serif; background: #101813; color: #e9e7d9; color-scheme: dark; --muted: #b0b5a7; --line: #344138; --accent: #cfdd94; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }
[hidden] { display: none !important; }
:is(button, a, input):focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
::selection { background: var(--accent); color: #172016; }
.skip-link { position: fixed; top: -90px; left: 16px; background: var(--accent); color: #172016; padding: 14px; z-index: 10; }
.skip-link:focus { top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px clamp(20px, 5vw, 80px); border-bottom: 1px solid var(--line); }
.brand { font-family: 'Oswald', sans-serif; font-size: 29px; color: var(--accent); display: flex; gap: 14px; align-items: center; }
.brand span { font-family: 'DM Sans', sans-serif; font-size: 10px; letter-spacing: 2px; color: #e9e7d9; }
.edition, .eyebrow { font-size: 9px; letter-spacing: 2px; line-height: 1.8; }
.edition { color: var(--muted); }
.quiet-button { background: transparent; border: 1px solid var(--line); border-radius: 3px; color: #e9e7d9; padding: 10px 15px; min-height: 44px; font-size: 12px; }
.quiet-button:hover { background: #ffffff0a; border-color: #72806b; }
.quiet-button span { margin-left: 18px; }
.intro { position: relative; isolation: isolate; overflow: hidden; min-height: min(780px, 90svh); padding: clamp(64px, 9vw, 130px) 24px 30px; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.forest-art { position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 50% 18%, #61715a55, #18251b99 45%, #101813 85%); }
.moon { width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #f0edcc50, #c1c3a521); position: absolute; top: 55px; left: calc(50% - 75px); box-shadow: 0 0 100px #f3efc715; }
.forest-art > i { position: absolute; bottom: 0; left: 7%; width: 25px; height: 96%; background: #070e09; transform: rotate(6deg); opacity: .55; }
.forest-art > i:before, .forest-art > i:after { content: ''; position: absolute; height: 10px; width: 100px; background: #070e09; left: -85px; top: 25%; transform: rotate(42deg); }
.forest-art > i:after { left: 10px; top: 40%; transform: rotate(-40deg); }
.forest-art > i:nth-of-type(2) { left: 18%; width: 12px; height: 78%; transform: rotate(-5deg); opacity: .28; }
.forest-art > i:nth-of-type(3) { left: 30%; width: 7px; height: 55%; opacity: .17; }
.forest-art > i:nth-of-type(4) { left: 72%; width: 8px; height: 65%; opacity: .2; }
.forest-art > i:nth-of-type(5) { left: 84%; width: 18px; height: 92%; transform: rotate(-6deg); opacity: .4; }
.forest-art > i:nth-of-type(6) { left: 97%; width: 30px; height: 115%; }
.fog { position: absolute; inset: 0; background: linear-gradient(transparent 40%, #101813 95%); }
.intro-content { position: relative; max-width: 1000px; width: 100%; margin: auto; }
.intro .eyebrow { color: #d6d9b9; }
h1 { font-family: 'Oswald', Impact, sans-serif; font-size: clamp(48px, 14vw, 185px); line-height: 1.15; letter-spacing: -.045em; font-weight: 500; margin: 22px 0; text-shadow: 0 4px 40px #0005; }
h1 span { color: var(--accent); }
.intro-copy { font-family: Georgia, serif; font-size: clamp(16px, 2vw, 21px); line-height: 1.8; color: #c5c9b9; font-style: italic; }
#start-form { width: min(100%, 440px); margin: 34px auto 0; text-align: left; }
#start-form label { font-size: 8px; letter-spacing: 1.8px; color: var(--muted); }
.start-controls { display: flex; gap: 10px; margin-top: 10px; }
input { min-width: 0; width: 100%; background: #162118; border: 1px solid #526049; color: #efeedf; padding: 14px; border-radius: 3px; font-size: 16px; }
input::placeholder { color: #a2ab97; }
.primary-button { display: inline-flex; justify-content: center; align-items: center; gap: 24px; padding: 14px 22px; min-height: 48px; background: var(--accent); color: #1b2918; border: 1px solid var(--accent); border-radius: 3px; font-weight: 600; font-size: 12px; }
.primary-button:hover:not(:disabled) { background: #e3edb5; }
.start-controls button { flex-shrink: 0; }
.runtime-status { margin-top: 18px; font-size: 11px; color: var(--accent); line-height: 1.7; }
.runtime-note { margin: 12px auto 0; max-width: 450px; color: var(--muted); font-size: 10px; line-height: 1.9; }
.load-error { color: #f1b7a2; margin: 20px auto; max-width: 460px; font-size: 12px; line-height: 1.8; }
.load-error button { margin-top: 12px; }
.intro-footer { display: flex; justify-content: space-between; gap: 14px; max-width: 1000px; width: 100%; margin: 70px auto 0; border-top: 1px solid var(--line); padding-top: 22px; color: var(--muted); font-size: 8px; letter-spacing: 1.7px; }
.game-screen { max-width: 1200px; padding: 35px clamp(18px, 4vw, 60px) 65px; margin: auto; }
.game-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.game-topline .eyebrow { color: var(--muted); }
.game-topline strong { color: #e9e7d9; font-weight: 500; letter-spacing: .5px; margin-left: 12px; overflow-wrap: anywhere; }
.game-layout { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0, 2.5fr); gap: clamp(24px, 5vw, 70px); }
.status-block { padding: 25px 0; border-top: 1px solid var(--line); }
.status-block .eyebrow { color: var(--muted); font-size: 8px; }
.health-number { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 14px; }
.health-number span:first-child { font-size: 45px; line-height: 1; font-family: 'Oswald', sans-serif; color: var(--accent); }
.health-number span:last-child { font-size: 13px; color: var(--muted); }
progress { width: 100%; height: 5px; border: 0; background: #36412d; accent-color: var(--accent); display: block; }
progress::-webkit-progress-bar { background: #36412d; }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
.status-block > p { font-size: 11px; color: var(--muted); line-height: 1.7; margin-top: 12px; }
.status-block .location { color: #e9e7d9; font-size: 16px; text-transform: capitalize; }
#enemy-status { color: #f1b7a2; }
#inventory { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
#inventory li { border: 1px solid #46533c; padding: 9px 11px; border-radius: 3px; font-size: 12px; line-height: 1.6; }
#inventory strong { display: block; text-transform: capitalize; font-weight: 500; }
#inventory span { display: block; color: var(--muted); font-size: 10px; }
.story-panel { min-width: 0; padding: clamp(20px, 3.5vw, 45px); background: #18221b; border: 1px solid #3a4739; border-radius: 4px; align-self: start; }
.story-topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 25px; border-bottom: 1px solid #394637; margin-bottom: 30px; }
.scene-label { color: var(--accent); font-size: 9px; letter-spacing: 2px; }
.chapter-mark { color: #778666; font-size: 28px; }
#narrative { font-family: Georgia, serif; font-size: clamp(18px, 2vw, 23px); line-height: 1.8; color: #e3e4d3; }
#narrative p { margin-bottom: 16px; white-space: pre-line; overflow-wrap: anywhere; }
#prompt { font-size: clamp(22px, 3vw, 31px); line-height: 1.3; font-weight: 500; margin: 30px 0 20px; letter-spacing: -.8px; overflow-wrap: anywhere; }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice { display: flex; align-items: center; gap: 14px; padding: 15px; min-height: 52px; text-align: left; border-radius: 3px; background: #ffffff04; color: #e9e7d9; border: 1px solid #4d5c43; font-size: 13px; line-height: 1.6; }
.choice:hover { background: #cfdd9412; border-color: var(--accent); }
.choice-number { width: 22px; flex-shrink: 0; color: #c0ca9c; font-family: monospace; font-size: 11px; }
.choice-arrow { margin-left: auto; color: var(--accent); }
.game-hint { color: var(--muted); font-size: 10px; line-height: 1.7; margin-top: 25px; }
.game-error { font-size: 12px; color: #f1b7a2; line-height: 1.8; margin-top: 20px; }
.ending-panel { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; margin-top: 25px; }
.ending-panel .eyebrow { color: var(--accent); }
.footer { padding: 25px clamp(20px, 5vw, 80px); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; letter-spacing: 1px; line-height: 1.8; }
dialog { width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); background: #1d2a20; color: #e9e7d9; border: 1px solid #53634b; border-radius: 5px; padding: clamp(20px, 4vw, 35px); overflow: auto; }
dialog::backdrop { background: #060d08cc; backdrop-filter: blur(6px); }
dialog h2 { font-size: 25px; font-weight: 500; line-height: 1.3; }
dialog p, dialog li { margin-top: 18px; font-size: 13px; line-height: 1.8; color: #c0c8b5; }
dialog ul { padding-left: 18px; }
.dialog-heading { display: flex; align-items: start; gap: 20px; justify-content: space-between; }
.dialog-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: end; margin-top: 25px; }
.noscript { margin: 25px; padding: 20px; border: 1px solid #a77765; color: #f1b7a2; }
@media (max-width: 700px) {
  .edition { display: none; }
  .intro { min-height: 0; padding-top: 70px; }
  .intro .eyebrow { font-size: 8px; letter-spacing: 1.3px; }
  .intro-footer { letter-spacing: .8px; font-size: 7px; margin-top: 45px; }
  .game-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .survivor-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 25px; }
  .status-block { padding-block: 18px; }
  .inventory-block { grid-column: 1 / -1; }
  #inventory { flex-direction: row; flex-wrap: wrap; }
  #inventory li { flex: 1 1 125px; }
  .health-number span:first-child { font-size: 35px; }
  .story-topline { padding-bottom: 15px; margin-bottom: 22px; }
  .footer { font-size: 7px; }
}
@media (max-width: 400px) {
  .masthead { padding-inline: 16px; gap: 12px; }
  .brand span { font-size: 8px; letter-spacing: 1px; }
  .quiet-button { font-size: 11px; padding-inline: 10px; }
  .quiet-button span { margin-left: 7px; }
  .start-controls { flex-direction: column; }
  .intro { padding-inline: 18px; }
  .intro-footer { flex-wrap: wrap; justify-content: center; }
  #narrative { font-size: 18px; }
  .game-topline { flex-wrap: wrap; }
  .scene-label { font-size: 8px; letter-spacing: 1px; }
  .choice { padding: 12px; gap: 8px; }
}
@media (max-width: 280px) {
  .masthead { flex-wrap: wrap; }
  .survivor-panel { grid-template-columns: 1fr; }
  h1 { font-size: 18vw; }
  .intro-copy { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { scroll-behavior: auto !important; } }
