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

:root { --ink: #18221e; --muted: #66746c; --paper: #f2efe5; --line: #c5c9bd; --acid: #e0f06d; --rust: #b65334; --blue: #2e5960; --shadow: #d7d8ca; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: #dadbd0; font-family: 'Space Grotesk', system-ui, sans-serif; }
body:before { content: ''; position: fixed; inset: 0; pointer-events: none; opacity: .24; background-image: radial-gradient(#718078 0.7px, transparent 0.7px); background-size: 5px 5px; }
.shell { width: min(1120px, calc(100% - 36px)); margin: 0 auto; padding: 44px 0 28px; }
.masthead { display: grid; grid-template-columns: 1fr auto; align-items: end; border-bottom: 2px solid var(--ink); padding-bottom: 24px; }
.eyebrow, .panel-label, .scene-meta, footer, button, .command-form input { font-family: 'DM Mono', monospace; letter-spacing: .09em; }
.eyebrow { grid-column: 1 / -1; color: var(--rust); font-size: 11px; font-weight: 500; margin-bottom: 12px; }
h1 { margin: 0; font-size: clamp(52px, 9vw, 104px); letter-spacing: -.09em; line-height: .75; font-weight: 700; }
.dek { max-width: 260px; margin: 0 0 0 auto; color: var(--muted); font-size: 15px; line-height: 1.35; }
.game-frame { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; margin-top: 24px; align-items: start; }
.main-column { min-width: 0; }
.scene-panel, .sidebar, .command-panel { background: var(--paper); border: 1px solid var(--line); box-shadow: 5px 5px 0 var(--shadow); }
.scene-panel { min-height: 0; padding: 14px; display: flex; flex-direction: column; }
.scene-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; padding: 1px 2px 11px; }
.scene-art { position: relative; overflow: hidden; flex: 1; min-height: 365px; background: #799899; image-rendering: pixelated; }
.scene-art.image-art { flex: 0 0 auto; aspect-ratio: 3 / 2; min-height: 0; }
.scene-art.image-art { background-size: 100% 100%; background-position: center; background-repeat: no-repeat; }
.scene-art.image-art .state-overlay { position: absolute; z-index: 6; display: block; pointer-events: none; }
.scene-art.image-art .item-object { overflow: visible; z-index: 7; }
.scene-art.image-art .item-object img { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.scene-art.image-art .cottage-book img { transform: scaleY(.62); transform-origin: 50% 86%; filter: brightness(.82) saturate(.8) contrast(.92); }
.scene-art.image-art .cottage-jar img { filter: brightness(.8) saturate(.7) contrast(.88); opacity: .95; }
.scene-art.image-art .cottage-cloth img { transform: scaleY(.72); transform-origin: 50% 86%; filter: brightness(.78) saturate(.7) contrast(.9); }
.scene-art.image-art .cottage-cloth-draped img { object-fit: fill; filter: brightness(.86) saturate(.8); }
.scene-art.image-art .cottage-sandpaper-flat img, .scene-art.image-art .village-orange-flower img { object-fit: fill; }
.scene-art.image-art .village-orange-flower img { filter: brightness(.8) saturate(.7); }
.scene-art.image-art .item-object[data-blended="true"] { opacity: .72; filter: saturate(.62) brightness(.88) sepia(.08) drop-shadow(0 1px 0 rgba(38,48,42,.35)); }
.scene-art.image-art .fallen-apple { z-index: 6; }
.scene-art.image-art .spark-moth { z-index: 7; filter: drop-shadow(0 0 8px rgba(224,240,109,.7)); }
.scene-art.image-art .mouse { left: 66%; top: 54%; width: 21%; height: 35%; background: url("assets/art/marsh-mouse.png") center / contain no-repeat; }
.scene-art.image-art .mouse:before, .scene-art.image-art .mouse:after { content: none; }
.scene-art:after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(transparent 50%, rgba(17,37,38,.08) 50%); background-size: 100% 6px; mix-blend-mode: multiply; }
.scene-caption { border-top: 1px solid var(--line); padding: 17px 3px 2px; }
.scene-caption h2 { margin: 0 0 5px; font-size: 25px; letter-spacing: -.04em; }
.scene-caption p { color: var(--muted); margin: 0; font-size: 14px; line-height: 1.45; }
.sidebar { padding: 19px 18px; }
.panel-block { padding-bottom: 21px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.panel-block:last-child { border: 0; margin: 0; padding: 0; }
.objective-card { border: 1px solid var(--line); background: #ebe9dc; padding: 12px; margin-bottom: 20px; font: 11px/1.35 'DM Mono', monospace; }
.objective-card .panel-label { margin-bottom: 8px; }
.objective-card.complete { color: var(--ink); border-color: var(--ink); background: var(--acid); }
.objective-card.complete .panel-label { color: var(--ink); }
.panel-label { color: var(--rust); font-size: 10px; margin-bottom: 14px; }
.status-row { display: flex; justify-content: space-between; font-family: 'DM Mono', monospace; font-size: 10px; margin: 9px 0; }
.status-row strong { font-weight: 500; }
.meter { height: 5px; background: #d9d9cc; }
.meter i { display: block; width: 0; height: 100%; background: var(--rust); transition: width .3s ease; }
.island-map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; background: #bfc4b6; padding: 3px; }
.map-cell { min-height: 42px; padding: 5px 4px; background: #e3e1d4; color: var(--muted); font: 9px/1.1 'DM Mono', monospace; text-transform: uppercase; }
.map-cell.fog { background: #d3d4c8; color: transparent; }
.map-cell.visited { color: var(--ink); background: #c8d0ba; }
.map-cell.current { color: var(--acid); background: var(--ink); }
.map-cell small { display: block; margin-top: 4px; opacity: .7; font-size: 8px; }
.compass { display: grid; grid-template: repeat(3, 36px) / repeat(3, minmax(38px, 1fr)); gap: 4px; max-width: 190px; margin: 14px auto 0; }
.compass button { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 5px; font-family: 'DM Mono', monospace; }
.compass button span { color: var(--rust); font-size: 17px; line-height: 1; }
.compass button small { font-size: 9px; }
.compass-north { grid-area: 1 / 2; }
.compass-west { grid-area: 2 / 1; }
.compass-centre { grid-area: 2 / 2; place-self: center; color: var(--blue); font-size: 12px; }
.compass-east { grid-area: 2 / 3; }
.compass-south { grid-area: 3 / 2; }
.inventory { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.inventory li { display: flex; gap: 8px; align-items: center; font-family: 'DM Mono', monospace; font-size: 11px; }
.inventory li:before { content: '◆'; color: var(--blue); font-size: 8px; }
.inventory .empty { color: var(--muted); font-style: italic; }
.inventory .empty:before { color: var(--line); }
.attempts-block summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.attempts-block summary::-webkit-details-marker { display: none; }
.attempts-block summary .panel-label { margin: 0; }
.attempts-block summary strong { min-width: 24px; padding: 3px 5px; text-align: center; color: var(--paper); background: var(--rust); font: 10px/1 'DM Mono', monospace; }
.attempts-note { margin: 11px 0 10px; color: var(--muted); font: 10px/1.4 'DM Mono', monospace; }
.attempt-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.attempt-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 9px; align-items: baseline; font: 10px/1.25 'DM Mono', monospace; }
.attempt-list li strong { color: var(--ink); font-weight: 500; }
.attempt-list li span { color: var(--rust); }
.attempt-list li small { grid-column: 1 / -1; overflow: hidden; color: var(--muted); font: 9px/1.25 'DM Mono', monospace; text-overflow: ellipsis; white-space: nowrap; }
.attempt-list .empty { display: block; color: var(--muted); font-style: italic; }
.attempts-block button { margin-top: 11px; }
.achievements-block summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.achievements-block summary::-webkit-details-marker { display: none; }
.achievements-block summary .panel-label { margin: 0; }
.achievements-block summary strong { min-width: 34px; padding: 3px 5px; text-align: center; color: var(--paper); background: var(--blue); font: 10px/1 'DM Mono', monospace; }
.achievements-note { margin: 11px 0 10px; color: var(--muted); font: 10px/1.4 'DM Mono', monospace; }
.achievement-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.achievement-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 7px; font: 10px/1.25 'DM Mono', monospace; }
.achievement-list li strong { grid-column: 1 / -1; font-weight: 500; }
.achievement-list li span { color: var(--muted); }
.achievement-list li small { color: var(--rust); font: 9px/1.25 'DM Mono', monospace; }
.achievement-list li.locked { opacity: .62; }
.achievement-list li.unlocked strong { color: var(--ink); }
.line.achievement { color: var(--rust); font-weight: 500; }
.quick-words, .suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
button { color: var(--ink); background: transparent; border: 1px solid var(--line); padding: 8px 9px; font-size: 9px; cursor: pointer; transition: background .15s, color .15s, transform .15s; }
button:hover, button:focus-visible { outline: none; background: var(--ink); color: var(--acid); transform: translateY(-1px); }
.command-panel { margin-top: 14px; padding: 14px; }
.transcript { height: 132px; overflow-y: auto; padding: 5px 5px 13px; font-family: 'DM Mono', monospace; font-size: 12px; line-height: 1.55; }
.line { margin-bottom: 8px; }
.line.command { color: var(--rust); }
.line.system { color: var(--ink); }
.line.hint { color: var(--muted); }
.command-form { display: flex; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; }
.prompt-mark { color: var(--rust); font-family: 'DM Mono', monospace; font-weight: 500; font-size: 16px; }
.command-form input { flex: 1; min-width: 0; margin-left: 9px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; letter-spacing: .02em; }
.command-form input::placeholder { color: #92998f; }
.command-form button { margin-left: 10px; background: var(--ink); color: var(--acid); border-color: var(--ink); }
.suggestions { margin-top: 10px; }
footer { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 9px; margin-top: 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.scene-art:before { content: ''; position: absolute; inset: 0; z-index: 5; pointer-events: none; background: radial-gradient(ellipse at center, transparent 45%, rgba(17,37,38,.2) 100%); mix-blend-mode: multiply; }
/* The supplied scene plates are the complete composition; fill the frame so the
   image fallback colour never becomes visible as letterboxing. */
.scene-art.image-art[data-art] { background-size: 100% 100% !important; background-position: center !important; background-repeat: no-repeat !important; background-color: #6f8276 !important; }
@media (max-width: 750px) { .shell { width: min(100% - 22px, 600px); padding-top: 24px; } .masthead { display: block; } .dek { margin: 17px 0 0; max-width: 330px; } .game-frame { grid-template-columns: 1fr; } .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } .panel-block { margin: 0; } .help-block { grid-column: 1 / -1; } .scene-panel { min-height: 0; } footer { flex-direction: column; gap: 8px; } }
