/* Parchment skin using the supplied local sprite pack. */
@font-face { font-family: 'Nunito'; src: url('assets/fonts/Nunito-Variable.ttf') format('truetype'); font-style: normal; font-weight: 200 1000; font-display: swap; }
@font-face { font-family: 'Zen Maru Gothic'; src: url('assets/fonts/ZenMaruGothic-Haiku.ttf') format('truetype'); font-style: normal; font-weight: 500; font-display: swap; }
:root { --ink: #46351f; --muted: #8b7652; --paper: #efd6a0; --line: #c5a470; --sans: Georgia, 'Times New Roman', serif; }
.pixel-icon { display: inline-block; width: 24px; height: 24px; object-fit: contain; image-rendering: pixelated; flex-shrink: 0; }
.topbar, .wallet, .world-toolbar button, .camera-controls button, .resource-block, .workshop, dialog, .title-actions button {
  border: 10px solid transparent; border-image: url('assets/sprite-pack/ui/parchment_panel.png') 6 fill stretch;
  background: none; box-shadow: 2px 4px 0 #142c2540; color: var(--ink); image-rendering: pixelated;
}
.topbar { top: 14px; left: 16px; width: 242px; padding: 2px 8px 4px; gap: 0; align-items: stretch; }
.topbar::after { content: ''; position: absolute; width: 24px; height: 48px; background: url('assets/sprite-pack/ui/leaf_sprig.png') center / contain no-repeat; pointer-events: none; image-rendering: pixelated; }
.topbar::after { right: -7px; top: -8px; transform: rotate(160deg); }
.brand { justify-content: center; color: var(--ink); text-shadow: none; font: bold 32px/1.05 var(--sans); letter-spacing: -.6px; }
.location-tag { position: static; display: flex; justify-content: center; margin: 5px 0 9px; color: #5e482e; font: bold 13px var(--sans); letter-spacing: 0; text-shadow: none; white-space: nowrap; gap: 6px; }
.lake-health { width: auto; margin: 0; padding: 7px 0 0; background: none; border: 0; border-top: 1px solid #b9975c80; box-shadow: none; }
.health-label { justify-content: flex-start; color: var(--ink); font: bold 15px var(--sans); letter-spacing: 0; gap: 5px; }
.health-label strong { margin: 0; color: inherit; font-size: inherit; }
.health-label .pixel-icon { width: 24px; height: 21px; margin-right: 3px; }
.health-track { border: 1px solid #977e4b; border-radius: 6px; background: #b7a47766; height: 9px; margin-top: 7px; }
.health-track > span { background: #879b59; }
.health-track i { display: none; }
.wallet { position: absolute; left: 1px; top: calc(100% + 13px); margin: 0; padding: 0 9px 0 3px; min-width: 97px; height: 39px; gap: 7px; border-width: 7px; }
.wallet strong { font: bold 21px var(--sans); }
.wallet > span:last-child { display: none; }
.wallet .pixel-icon { width: 23px; height: 23px; }
.world-toolbar { top: 15px; right: 16px; gap: 9px; }
.world-toolbar button { height: 39px; border-width: 7px; }
.world-toolbar button:hover, .world-toolbar button[aria-expanded=true] { background: none; filter: brightness(1.07); color: #443b20; }
.workshop-toggle { font: bold 17px var(--sans); padding: 0 4px; gap: 4px; }
.workshop-toggle kbd { display: none; }
.world-toolbar .pixel-icon { width: 21px; height: 21px; }
.icon-button { width: 39px; font: bold 23px var(--sans); }
.sound-slash { color: #573c22; left: 9px; top: -4px; font-size: 28px; }
.sound-on .sound-slash { display: none; }
.camera-controls { top: 209px; left: 18px; gap: 4px; }
.camera-controls button { border-width: 6px; height: 29px; min-width: 29px; padding: 0 3px; font-size: 18px; }
.camera-controls button:hover:not(:disabled) { background: none; filter: brightness(1.1); }
.camera-controls #zoom-reset { font-size: 10px; }
.survival-hud { bottom: 27px; right: 17px; width: 171px; gap: 6px; }
.resource-block { padding: 1px 3px 2px; border-width: 8px; }
.resource-heading { color: var(--ink); font-family: var(--sans); }
.resource-heading > span { display: flex; align-items: center; }
.resource-heading .pixel-icon { width: 25px; height: 25px; }
.resource-name { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.resource-heading strong { color: var(--ink); font: bold 17px var(--sans); white-space: nowrap; }
.resource-track { height: 3px; margin-top: 2px; background: #9d895144; }
.stamina-track > span { background: #839957; }
.bag-track > span { background: #ad8e4d; }
.resource-foot { display: none; }
.lake-chat { left: 19px; bottom: 26px; width: min(300px, 25vw); }
.chat-message { font-family: Arial, sans-serif; font-size: 11px; }
.chat-log { max-height: 110px; }
.controls-hint { bottom: 5px; font: 9px Arial, sans-serif; color: #d5d5aa; }
.workshop { top: 70px; right: 17px; border-width: 12px; max-height: calc(100dvh - 90px); }
.workshop-heading { background: none; border-bottom-color: #c0a36c; padding: 13px 14px; }
.workshop-heading h2, dialog h2 { color: var(--ink); font-family: var(--sans); }
.workshop-heading .eyebrow { color: #897346; }
.eyebrow { color: #947a4b; font-size: 8px; }
.popup-close { color: #684d2b; background: none; border-color: #bda16c; box-shadow: none; }
.sidebar-tabs { background: none; }
.sidebar-content { background: none; }
.equipment-row { border-bottom-color: #b99b5f55; }
.equipment-icon { background: #b4b77733; border-color: #b5a771; }
.equipment-name { font: bold 15px var(--sans); }
.sidebar-footer { background: #c8a87033; border-color: #b79c62; }
.boat-card { background: #c7bb8340; border-color: #b2a16c; }
.boat-card h3, .journal-intro h3 { font-family: var(--sans); }
.title-screen { --sans: 'Nunito', 'Trebuchet MS', sans-serif; background: radial-gradient(ellipse at center, #102d2570, #102b24e0 95%); }
.title-emblem { width: 40px; height: 80px; margin: auto; font-size: 0; background: url('assets/sprite-pack/ui/leaf_sprig.png') center / contain no-repeat; image-rendering: pixelated; }
.title-name { font: 700 17px var(--sans); letter-spacing: 3px; color: #efdbab; }
.title-screen h1 { font: 500 clamp(18px, 2.8vw, 33px)/1.7 var(--sans); letter-spacing: 0; color: #f5e7bf; text-shadow: 0 2px 7px #10291e99; }
.title-actions button { font: bold 22px var(--sans); padding: 5px 8px; }
.title-actions button > span { color: #826942; font-size: 11px; }
.title-actions button:hover:not(:disabled) { background: none; filter: brightness(1.08); border-color: transparent; }
.title-actions button:disabled { color: #796a4a; background: none; border-color: transparent; opacity: .6; }
@media (max-width: 1000px) {
  .lake-chat { bottom: 133px; width: 270px; }
  .survival-hud { bottom: 133px; }
}
@media (max-width: 680px) {
  .topbar { top: 10px; left: 10px; width: 181px; padding: 1px 4px 4px; border-width: 8px; }
  .brand { font-size: 26px; }
  .location-tag { font-size: 11px; margin: 4px 0 7px; gap: 4px; }
  .lake-health { width: auto; margin: 0; padding: 5px 0 0; }
  .health-label { font-size: 12px; }
  .health-label strong { font-size: inherit; }
  .wallet { top: calc(100% + 10px); height: 33px; min-width: 86px; }
  .wallet strong { font-size: 17px; }
  .wallet .pixel-icon { width: 20px; height: 20px; }
  .world-toolbar { top: 10px; right: 10px; gap: 4px; }
  .world-toolbar button { width: 32px; height: 32px; border-width: 5px; padding: 0; }
  .world-toolbar .tool-label { display: none; }
  .camera-controls { top: 179px; left: 11px; }
  .lake-chat { bottom: 124px; left: 12px; width: calc(100% - 170px); min-width: 130px; }
  .chat-log { max-height: 98px; }
  .chat-message { font-size: 10px; }
  .survival-hud { bottom: 124px; right: 11px; width: 141px; }
  .resource-block { padding: 0 2px; border-width: 7px; }
  .resource-heading strong { font-size: 14px; }
  .resource-heading .pixel-icon { width: 23px; height: 23px; }
  .workshop { right: 10px; top: 52px; width: min(354px, calc(100% - 20px)); max-height: calc(100dvh - 63px); }
  .touch-controls { bottom: 225px; right: 15px; }
}
@media (max-width: 360px) {
  .topbar { width: 151px; }
  .brand { font-size: 23px; }
  .health-label { font-size: 10px; gap: 2px; }
  .health-label .pixel-icon { width: 20px; }
  .title-screen h1 { font-size: 18px; }
}

/* Touch-first play: the lake, a thumbstick, and one small menu. */
#mobile-menu-toggle, #mobile-joystick, .mobile-menu-label { display: none; }
#mobile-menu[hidden], #mobile-toast[hidden] { display: none; }
.mobile-play .lake-chat,
.mobile-play .controls-hint, .mobile-play .cast-readout { display: none; }
.mobile-play .topbar { top: max(10px, env(safe-area-inset-top)); left: max(10px, env(safe-area-inset-left)); gap: 5px; max-width: calc(100% - 74px - env(safe-area-inset-right)); flex-wrap: nowrap; }
.mobile-play .topbar .lake-health { min-width: 65px; padding: 5px 8px; }
.mobile-play .topbar .health-label { font-size: 14px; }
.mobile-play .topbar .health-label .pixel-icon, .mobile-play .restored-caption { display: none; }
.mobile-play .topbar .health-track { margin-top: 3px; }
.mobile-play .topbar .wallet { min-height: 37px; padding: 5px 7px; gap: 4px; }
.mobile-play .topbar .wallet strong { font-size: 14px; }
.mobile-play .topbar .wallet .pixel-icon { width: 16px; height: 16px; }
.mobile-play .wallet-divider { margin: 0 2px; height: 16px; }
.mobile-play #mobile-menu-toggle { display: grid; place-items: center; position: absolute; top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); z-index: 9; width: 42px; height: 40px; padding: 0; color: #f2f0d5; border: 1px solid #d7e9c052; border-radius: 10px; background: #254f46c2; backdrop-filter: blur(9px); box-shadow: inset 0 1px #eff9d927; }
.mobile-play #mobile-menu-toggle[aria-expanded=true] { background: #71967dd9; }
.mobile-play #mobile-menu { position: absolute; z-index: 8; top: calc(max(10px, env(safe-area-inset-top)) + 48px); right: max(10px, env(safe-area-inset-right)); width: min(290px, calc(100vw - 20px)); max-height: calc(100dvh - 78px - env(safe-area-inset-bottom)); overflow-y: auto; padding: 12px; border: 1px solid #c7dfb65c; border-radius: 14px; background: #173e35ed; backdrop-filter: blur(16px); box-shadow: 0 8px 30px #102c2966; }
.mobile-play #mobile-menu .world-toolbar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mobile-play #mobile-menu .world-toolbar button { display: flex; gap: 7px; width: auto; min-width: 0; min-height: 46px; height: auto; padding: 9px 8px; font: 700 15px/1.3 var(--sans); justify-content: center; }
.mobile-play #mobile-menu .world-toolbar .tool-label, .mobile-play #mobile-menu .mobile-menu-label { display: inline; }
.mobile-play #mobile-menu .world-toolbar kbd { display: none; }
.mobile-play #mobile-menu .camera-controls { position: static; display: flex; justify-content: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #c7dfb630; }
.mobile-play #mobile-menu .camera-controls button { min-width: 46px; height: 42px; }
.mobile-play #mobile-menu .world-toolbar .sound-slash { left: 12px; top: 7px; }
.mobile-play #mobile-joystick { display: grid; place-items: center; position: absolute; right: max(18px, env(safe-area-inset-right)); bottom: calc(max(22px, env(safe-area-inset-bottom)) + 8px); z-index: 4; width: 108px; height: 108px; border: 1px solid #d5e6bc45; border-radius: 50%; background: radial-gradient(circle, #c6d5ae0a 35%, #224c3c33 36%, #acc6a21a 70%); box-shadow: inset 0 0 0 7px #d6e7bd0a; touch-action: none; user-select: none; -webkit-user-select: none; }
.joystick-guide { color: #eff4cf4d; font-size: 80px; pointer-events: none; }
#joystick-knob { position: absolute; width: 44px; height: 44px; border: 1px solid #e8efd579; border-radius: 50%; background: #b9cda86b; box-shadow: 0 2px 10px #183c3540, inset 0 1px #f7f5db4d; pointer-events: none; }
#mobile-joystick.active #joystick-knob { background: #d1e0b4ad; }
.mobile-play #mobile-toast { position: absolute; bottom: calc(max(24px, env(safe-area-inset-bottom)) + 124px); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 8px 12px; border-radius: 9px; background: #163d35e8; color: #f7f2d9; font: 700 14px/1.4 var(--sans); text-align: center; pointer-events: none; z-index: 5; }
.mobile-play .workshop { top: calc(max(10px, env(safe-area-inset-top)) + 48px); right: max(10px, env(safe-area-inset-right)); width: min(390px, calc(100vw - 20px)); max-height: calc(100dvh - 78px - env(safe-area-inset-bottom)); }
.mobile-play.workshop-open #mobile-joystick, .mobile-play.lake-complete #mobile-joystick { display: none; }
.title-open #mobile-menu-toggle, .title-open #mobile-menu { visibility: hidden; }
.mobile-help { display: none; }
.touch-play #help-dialog .how-to, .touch-play #help-dialog .help-note { display: none; }
.touch-play #help-dialog .mobile-help { display: block; }
.mobile-play .speech-bubble { display: none; }

/* The same object marker changes only color when E becomes available. */
.world-arrow { position: absolute; z-index: 3; width: 32px; height: 40px; color: #f8dd95; transform: translate(-50%, -100%); margin-top: -8px; pointer-events: none; filter: drop-shadow(0 3px 4px #112e2c99); }
.world-arrow[data-status="ready"] { color: #fff; }
.guidance-float { display: block; animation: guidance-float 2s ease-in-out infinite; }
.world-arrow svg { display: block; transform-origin: center; }
@keyframes guidance-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .guidance-float { animation: none; } }
@media (max-height: 520px) and (min-width: 681px) {
  .topbar { width: 210px; top: 10px; }
  .brand { font-size: 25px; }
  .location-tag { margin: 4px 0; }
  .camera-controls { top: 186px; }
  .lake-chat { bottom: 24px; width: 210px; }
  .chat-log { max-height: 73px; }
  .survival-hud { bottom: 24px; width: 150px; }
  .title-emblem { display: none; }
}
@media (max-height: 520px) and (max-width: 680px) {
  .topbar { width: 151px; padding: 0 3px 2px; }
  .brand { font-size: 21px; }
  .location-tag { font-size: 10px; margin: 3px 0; }
  .health-label { font-size: 10px; }
  .health-label .pixel-icon { width: 18px; height: 18px; }
  .health-track { margin-top: 3px; height: 6px; }
  .camera-controls { top: 10px; left: 171px; }
  .camera-controls button { height: 26px; min-width: 26px; border-width: 5px; }
  .lake-chat { bottom: 114px; width: 200px; }
  .chat-log { max-height: 42px; }
  .survival-hud { bottom: 114px; width: 133px; }
  .resource-block { border-width: 5px; }
  .resource-heading .pixel-icon { width: 19px; height: 19px; }
  .resource-heading strong { font-size: 12px; }
  .touch-controls { bottom: 165px; right: 155px; }
}
/* A quiet, line-by-line exchange between the two versions of the verse. */
.title-screen { display: flex; flex-direction: column; align-items: center; padding-bottom: 19px; }
.title-content { flex-shrink: 0; margin: auto 0; }
.title-screen h1 > .haiku-line { display: grid; place-items: center; white-space: normal; }
.haiku-line { --line-delay: 0s; }
.haiku-line:nth-child(2) { --line-delay: 1.5s; }
.haiku-line:nth-child(3) { --line-delay: 3s; }
.haiku-line > span { grid-area: 1 / 1; white-space: nowrap; }
.haiku-english { animation: haiku-english 24s ease-in-out var(--line-delay) infinite both; }
.haiku-japanese { opacity: 0; font-family: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif; font-weight: 500; letter-spacing: .12em; animation: haiku-japanese 24s ease-in-out var(--line-delay) infinite both; }
/* Hold, crossfade for three seconds, then return in the same line order. */
@keyframes haiku-english {
  0%, 16.6667% { opacity: 1; }
  29.1667%, 66.6667% { opacity: 0; }
  79.1667%, 100% { opacity: 1; }
}
@keyframes haiku-japanese {
  0%, 16.6667% { opacity: 0; }
  29.1667%, 66.6667% { opacity: 1; }
  79.1667%, 100% { opacity: 0; }
}
.title-footer { flex-shrink: 0; width: 100%; margin-top: 26px; }
.title-links { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 13px; font: 12px/1.7 var(--sans); }
.title-links a { color: #d2d2ac; text-decoration: none; text-underline-offset: 4px; }
.title-links a:hover { color: #f5e7bf; text-decoration: underline; }
.title-links > span { color: #90a481; }
.title-motto { margin: 9px 0 0; color: #b7c39f; font: 11px/1.6 var(--sans); letter-spacing: .35px; }
@media (max-width: 500px) {
  .title-footer { margin-top: 23px; }
  .title-links { font-size: 11px; gap: 11px; }
  .title-motto { max-width: 290px; margin: 9px auto 0; font-size: 10px; }
}
@media (max-height: 550px) {
  .title-screen { padding-bottom: 12px; }
  .title-content { padding: 5px 0; }
  .title-name { margin: 0 0 12px; }
  .title-screen h1 { font-size: clamp(16px, 2.2vw, 22px); line-height: 1.6; }
  .title-rule { margin: 12px 0 15px; }
  .title-actions button { font-size: 17px; padding: 5px 8px; }
  .title-footer { margin-top: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .haiku-english, .haiku-japanese { animation: none; opacity: 1; }
  .haiku-line > .haiku-japanese { grid-area: 2 / 1; color: #c7ceaa; font-size: .65em; line-height: 1.5; margin: 0 0 .4em; }
}

/* A light glass HUD keeps the lake in focus. All sizes here are screen pixels. */
.topbar { top: 16px; left: 16px; width: auto; max-width: calc(100vw - 32px); padding: 0; border: 0; border-image: none; background: none; box-shadow: none; display: flex; flex-direction: row; align-items: center; gap: 10px; }
.topbar::after { display: none; }
.topbar .lake-health, .topbar .wallet, .world-toolbar button, .camera-controls button {
  border: 1px solid #d7e9c052; border-image: none; border-radius: 10px;
  background: linear-gradient(135deg, #cae4c926, #2c685b5c 55%, #9cb48e24);
  backdrop-filter: blur(9px) saturate(1.2); -webkit-backdrop-filter: blur(9px) saturate(1.2);
  color: #eef0d1; box-shadow: inset 0 1px #eff9d927, 0 3px 12px #102d2926;
}
.topbar .lake-health { padding: 9px 12px; margin: 0; width: 150px; }
.topbar .health-label { color: #e4ebc8; font: 600 12px 'Nunito', sans-serif; }
.topbar .health-label .pixel-icon { width: 19px; height: 19px; }
.topbar .health-track { height: 3px; margin-top: 5px; border: 0; background: #102c254d; }
.topbar .wallet { position: static; height: 47px; min-width: 0; gap: 7px; padding: 7px 10px; margin: 0; }
.topbar .wallet strong { font: 700 15px 'Nunito', sans-serif; white-space: nowrap; }
.topbar .wallet .pixel-icon { width: 21px; height: 21px; }
.topbar .wallet #wallet-bag { display: flex; align-items: center; gap: 5px; }
.wallet-divider { width: 1px; height: 20px; margin: 0 4px; background: #e5ebce40; }
.world-toolbar { top: 16px; right: 16px; gap: 7px; }
.world-toolbar button { height: 38px; padding: 0 10px; font: 600 13px 'Nunito', sans-serif; }
.world-toolbar .icon-button { width: 36px; padding: 0; font-size: 20px; }
.world-toolbar button:hover, .world-toolbar button[aria-expanded=true], .camera-controls button:hover:not(:disabled) { color: #fff5d8; background: #84aa8b4d; filter: none; }
.world-toolbar .sound-slash { color: #eef0d1; left: 8px; top: -2px; }
.camera-controls { top: 76px; left: 16px; gap: 4px; }
.camera-controls button { height: 28px; min-width: 28px; padding: 0 5px; font: 18px 'Nunito', sans-serif; }
.camera-controls #zoom-reset { font-size: 10px; }
#world-prompts { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
.world-prompt { position: absolute; transform: translate(-50%, -100%); white-space: nowrap; padding: 5px 9px; border: 1px solid #dce5ba66; border-radius: 6px; background: #f3edcbe6; color: #425840; font: 700 11px/1.3 'Nunito', sans-serif; box-shadow: 0 2px 6px #173c3240; }
.world-prompt.accent { background: #f6efce; }
#stamina-indicator { position: absolute; transform: translate(-50%, -100%); margin-top: -8px; width: 48px; height: 7px; border: 1px solid #e4e7c58c; border-radius: 4px; background: #173a32c9; padding: 1px; box-shadow: 0 1px 5px #10292166; pointer-events: none; z-index: 3; }
#overhead-stamina-fill { display: block; height: 100%; border-radius: 2px; }
#stamina-indicator.exhausted { animation: stamina-warning .24s ease-in-out 6 alternate; border-color: #ff9f8c; }
@keyframes stamina-warning { from { box-shadow: 0 0 0 2px #ff695944; filter: brightness(1); } to { box-shadow: 0 0 12px 4px #ff6b5dcc; filter: brightness(1.7); } }
#ending-note { position: absolute; bottom: 9%; left: 50%; transform: translateX(-50%); width: min(460px, 90vw); text-align: center; color: #f0edce; text-shadow: 0 2px 10px #193b2b; pointer-events: none; animation: ending-arrives 2.5s ease-out both; }
#ending-note > span { font: 700 10px 'Nunito', sans-serif; letter-spacing: .22em; }
#ending-note h1 { font: 600 28px/1.3 'Nunito', sans-serif; margin: 10px 0; }
#ending-note p { font: 14px/1.6 'Nunito', sans-serif; }
@keyframes ending-arrives { from { opacity: 0; } to { opacity: 1; } }
.lake-complete .controls-hint, .lake-complete .touch-controls, .lake-complete .lake-chat { display: none; }
@media (max-width: 760px) {
  .topbar { top: 10px; left: 10px; gap: 6px; }
  .topbar .lake-health { width: 126px; padding: 7px 9px; }
  .topbar .wallet { height: 43px; padding: 5px 7px; gap: 4px; }
  .topbar .wallet strong { font-size: 13px; }
  .world-toolbar { top: 63px; right: 10px; gap: 5px; }
  .world-toolbar button { height: 33px; padding: 0 8px; font-size: 12px; }
  .world-toolbar .icon-button { width: 31px; padding: 0; }
  .camera-controls { top: 64px; left: 10px; }
  .workshop { top: 103px; max-height: calc(100dvh - 120px); }
}
@media (prefers-reduced-motion: reduce) {
  #ending-note, #stamina-indicator.exhausted { animation: none; }
  #stamina-indicator.exhausted { box-shadow: 0 0 9px 3px #ff6b5d; }
}

/* Readable screen-space type: map zoom never participates in these sizes. */
:root {
  --sans: 'Nunito', 'Trebuchet MS', sans-serif;
  --ui-text: clamp(16px, calc(.85rem + .3vw), 22px);
  --ui-small: clamp(14px, calc(.75rem + .18vw), 18px);
  --ui-heading: clamp(20px, calc(1rem + .4vw), 28px);
}
body { font-size: var(--ui-text); }
.topbar .health-label { font-size: var(--ui-small); color: #f3f5df; }
.topbar .lake-health { width: auto; min-width: 150px; }
.topbar .wallet strong { font-size: var(--ui-text); }
.topbar .wallet { height: auto; min-height: 48px; }
.world-toolbar button { height: 44px; padding: 0 .65em; font-size: var(--ui-text); }
.world-toolbar .icon-button { width: 40px; padding: 0; font-size: 24px; }
.camera-controls button { height: 36px; min-width: 36px; font-size: 24px; }
.camera-controls #zoom-reset { font-size: var(--ui-small); }
.camera-controls button { display: grid; place-items: center; }
#ending-note #ending-time { font: 700 var(--ui-text)/1.5 var(--sans); font-variant-numeric: tabular-nums; margin-top: 16px; }
.world-prompt { width: max-content; max-width: min(32rem, calc(100% - 24px)); padding: .45em .7em; white-space: normal; text-align: center; font: 800 var(--ui-text)/1.4 var(--sans); color: #294330; background: #faf1d9f5; border-color: #d7dfb9; box-shadow: 0 2px 8px #102e3266; }
.world-prompt.accent { background: #fff5d9; }
.cast-readout { max-width: min(28rem, calc(100% - 24px)); padding: .5em .7em; font: 700 var(--ui-text)/1.4 var(--sans); color: #faf4da; background: #173e33f2; white-space: normal; text-align: center; }
.controls-hint { bottom: 10px; width: max-content; max-width: calc(100% - 24px); white-space: normal; text-align: center; font: 600 var(--ui-small)/1.4 var(--sans); color: #f1efdb; opacity: 1; }
.controls-hint kbd { font: 800 var(--ui-small)/1.4 var(--sans); }
.lake-chat { width: clamp(280px, 28vw, 420px); }
#lake-chat .chat-heading { width: max-content; max-width: 100%; gap: 8px; color: #f1edda; font: 800 var(--ui-small)/1.4 var(--sans); letter-spacing: .03em; }
.chat-heading button, #chat-form button { height: auto; min-height: 30px; padding: 3px 7px; font: 700 var(--ui-small)/1.4 var(--sans); color: #f4f2dc; }
.chat-log { max-height: min(180px, 24dvh); background: linear-gradient(90deg, #12382ceb, #12382cc2); border-radius: 6px; }
.chat-message { padding-left: 0; font: 600 var(--ui-text)/1.5 var(--sans); color: #f1f0de; }
.chat-message time { position: static; margin-right: 7px; font: 500 var(--ui-small)/1.5 var(--sans); color: #c7d5ba; opacity: 1; }
.chat-speaker { color: #d4e4b8; font-weight: 800; }
.speech-bubble { max-width: min(320px, calc(100vw - 32px)); font: 600 var(--ui-text)/1.5 var(--sans); }
.friend-name { font: 700 var(--ui-small)/1.4 var(--sans); padding: 3px 7px; }
.workshop { width: clamp(370px, 32vw, 520px); max-width: calc(100vw - 24px); }
.workshop-heading h2, .journal-intro h3 { font: 800 var(--ui-heading)/1.3 var(--sans); letter-spacing: 0; }
.workshop .eyebrow, .notes-heading { font: 800 var(--ui-small)/1.4 var(--sans); letter-spacing: .03em; }
.sidebar-tabs button { font-size: var(--ui-text); }
.equipment-row { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; }
.equipment-name { font: 800 var(--ui-text)/1.4 var(--sans); }
.equipment-info p { font: 600 var(--ui-text)/1.5 var(--sans); color: #504a32; overflow-wrap: anywhere; }
.level { display: block; margin: 3px 0 0; font: 700 var(--ui-small)/1.4 var(--sans); color: #555e3b; }
.upgrade-button, .price, .boat-card button { font: 800 var(--ui-text)/1.4 var(--sans); }
.upgrade-button:disabled, .boat-card button:disabled { color: #596246; }
.boat-card p, .boat-requirement, .journal-intro p, .journal-stats > div, .journal-stats dd, .milestone-row, .field-note p { font: 600 var(--ui-text)/1.5 var(--sans); color: #504a32; }
.boat-card h3 { font: 800 var(--ui-heading)/1.3 var(--sans); }
.sidebar-footer > span, .sidebar-footer button { font-size: var(--ui-small); color: #535a3a; }
.sidebar-footer { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
dialog { width: 560px; max-width: calc(100vw - 24px); overflow-y: auto; font: 600 var(--ui-text)/1.5 var(--sans); }
dialog h2 { font: 800 var(--ui-heading)/1.3 var(--sans); letter-spacing: 0; }
dialog p, .friends-dialog p, .friends-dialog label, .how-to p, .how-to strong, .help-note, .dialog-primary, .dialog-actions button { font-size: var(--ui-text); line-height: 1.5; color: #3f4d32; }
.dialog-primary { color: #fff8e5; }
.eyebrow, .how-to li > span { font-size: var(--ui-small); }
.title-actions button > span, .title-links, .title-motto { font-size: var(--ui-small); }
#ending-note > span { font-size: var(--ui-small); }
#ending-note p { font-size: var(--ui-text); }
@media (max-width: 760px) {
  .topbar { gap: 6px; }
  .topbar .lake-health { min-width: 0; padding: 7px 9px; }
  .topbar .wallet { min-height: 46px; padding: 5px 7px; }
  .topbar .wallet .pixel-icon { width: 18px; height: 18px; }
  .world-toolbar { top: 70px; gap: 5px; }
  .camera-controls { top: 70px; }
  .world-toolbar button { height: 38px; padding: 0 8px; }
  .world-toolbar .icon-button { width: 34px; padding: 0; }
  #friends-button { width: auto; min-width: 38px; padding: 0 8px; }
  #friends-button:after { font-size: var(--ui-text); }
  .world-toolbar .tool-label { display: none; }
  .lake-chat { left: 12px; bottom: 170px; width: min(320px, calc(100vw - 24px)); }
  .workshop { top: 120px; right: 12px; width: calc(100vw - 24px); max-height: calc(100dvh - 132px); }
  .sidebar-content { padding: 0 10px; }
  .equipment-row { grid-template-columns: minmax(0, 1fr) auto; }
  .equipment-icon { display: none; }
  .workshop-heading { padding: 10px; }
  .sidebar-tabs { gap: 18px; padding: 12px 10px 0; }
  .controls-hint kbd { display: inline; }
}
@media (max-width: 420px) {
  .topbar { flex-wrap: wrap; max-width: calc(100vw - 20px); }
  .topbar .health-label { gap: 3px; }
  .topbar .health-label .pixel-icon { display: none; }
  .topbar .wallet { gap: 4px; }
  .wallet-divider { margin: 0 2px; }
  .world-toolbar { top: 66px; right: 10px; }
  .camera-controls { top: 66px; gap: 3px; }
  .camera-controls button { min-width: 28px; height: 36px; padding: 0 3px; }
  .camera-controls #zoom-reset { min-width: 45px; }
  .world-toolbar .icon-button { width: 30px; }
  .world-toolbar button { padding: 0 5px; }
  #friends-button { padding: 0 6px; }
  .world-toolbar { gap: 4px; }
  .controls-hint { width: calc(100vw - 24px); }
}
@media (max-width: 360px) {
  .camera-controls { top: 112px; }
  .topbar .wallet .pixel-icon { width: 16px; height: 16px; }
}
/* The atlas is a temporary expedition picker; the playing screen stays clear. */
#world-dialog { width: min(1040px, calc(100vw - 24px)); max-width: 1040px; max-height: calc(100dvh - 24px); padding: 28px; overflow-y: auto; color: #f0ebc7; background: #183d38f5; border: 1px solid #a4c4a380; border-radius: 20px; font-size: 18px; }
#world-dialog h2, #world-dialog h3 { color: #f5eac6; margin: 4px 0 12px; }
#world-dialog .world-intro { color: #d0dec1; margin: 0 0 12px; }
#world-map { display: block; width: 100%; max-height: 280px; background: #173f42; border: 1px solid #9cb99750; border-radius: 14px; }
.atlas-land { fill: #638365; stroke: #9fbd8a; stroke-width: .5; }
#world-map circle { fill: #d6b677; stroke: #fff3c2; stroke-width: 2; cursor: pointer; }
#world-map circle.selected { fill: #f6e3a1; stroke: white; stroke-width: 3; r: 10; }
#world-map circle.restored { fill: #81cdb7; }
#world-map circle:focus { outline: none; stroke: white; stroke-width: 4; }
.world-atlas-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 18px; }
#world-dialog label { color: #e5e9c6; display: block; margin-bottom: 8px; }
#world-search { width: 100%; padding: 12px; color: #f5edce; background: #ffffff10; border: 1px solid #b5cda560; border-radius: 8px; font: inherit; }
#world-list { display: grid; gap: 6px; margin-top: 10px; max-height: 270px; overflow-y: auto; }
#world-dialog button:not(.dialog-close), #next-destination { padding: 10px 15px; border: 1px solid #b5cda570; border-radius: 8px; background: #88ae7f20; color: #f5eccd; font: inherit; cursor: pointer; min-height: 44px; }
#world-list button { text-align: left; }
#world-list button[aria-pressed="true"] { background: #a5c48b38; border-color: #d5d6a4; }
#world-dialog button:disabled { opacity: .5; cursor: wait; }
#destination-shape { width: 100%; height: 155px; background: #24483e; border-radius: 10px; }
.atlas-water { fill: #6eaaa3; stroke: #d5d19f; stroke-width: 12; fill-rule: evenodd; }
.atlas-camp { fill: #a9b97b; stroke: #dfd2a0; stroke-width: 9; }
.atlas-area { fill: #547e7c99; stroke: #d9e8c5; stroke-width: 7; cursor: pointer; }
.atlas-area.in-progress { fill: #d8bd6e99; }
.atlas-area.restored { fill: #9fce86cc; }
.atlas-area.selected, .atlas-area:focus { stroke: #fff2b4; stroke-width: 17; outline: none; }
#lake-area-counts { color: #e1e9c9; font-weight: 700; }
#area-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
#area-list button { text-align: left; font-size: 15px !important; }
#area-list button[aria-pressed="true"] { border-color: #eee0a3; background: #a7c28f42; }
#area-list .original-lake { grid-column: 1 / -1; opacity: .8; }
#world-dialog.area-selecting #world-map { max-height: 145px; }
#world-dialog.area-selecting #destination-shape { height: 130px; }
#destination-progress, #destination-hint { margin: 8px 0; font-size: 17px; line-height: 1.4; color: #e0e7c9; }
#world-dialog .eyebrow { color: #d5c78f; }
#world-status { padding-top: 12px; color: #d6dfc1; font-size: 17px; }
#world-dialog .world-credit { color: #bbccb3; font-size: 14px; line-height: 1.5; margin-bottom: 0; }
#world-dialog a { color: #e3dcaa; }
#next-destination { margin-top: 12px; background: #2e574be8; pointer-events: auto; }
@media (max-width: 600px) {
  #world-dialog { padding: 22px 16px; width: calc(100vw - 12px); max-height: calc(100dvh - 12px); }
  #world-dialog h2 { font-size: 28px; }
  #world-map { max-height: 140px; }
  #world-dialog.area-selecting #world-map { max-height: 80px; }
  #world-dialog.area-selecting #destination-shape { height: 110px; }
  .world-atlas-bottom { grid-template-columns: 1fr; gap: 16px; }
  #world-list { max-height: 110px; }
  #destination-shape { height: 110px; }
  #next-destination { font-size: 17px; }
}
#ending-continue { pointer-events: auto; padding: 11px 16px; min-height: 44px; border: 1px solid #c5d8b282; border-radius: 10px; color: #f1edcc; background: #29564bcf; font: 700 var(--ui-text)/1.4 var(--sans); cursor: pointer; }
#ending-continue kbd { margin-right: 8px; }
.mobile-play #ending-continue kbd { display: none; }
#keepsake-journal { margin: 22px 0; }
#keepsake-journal h3 { font: 800 var(--ui-heading)/1.3 var(--sans); margin: 0 0 8px; }
#keepsake-journal > p, #keepsake-journal article p { font: 600 var(--ui-text)/1.5 var(--sans); color: #514d35; }
.keepsake-list { display: grid; gap: 12px; margin-top: 18px; }
.keepsake-list article { display: flex; align-items: flex-start; gap: 12px; padding: 14px 10px; border: 1px solid #a6956970; border-radius: 9px; background: #ffffff16; }
.keepsake-list canvas { width: 44px; height: 44px; image-rendering: pixelated; flex-shrink: 0; }
.keepsake-list article[data-status="hidden"] canvas { opacity: .35; filter: grayscale(1); }
.keepsake-list article[data-status="pending"] { border-color: #9f8545; }
.keepsake-list article[data-status="saved"] { border-color: #6d865c; }
.keepsake-list h4 { margin: 0 0 5px; font: 800 var(--ui-text)/1.3 var(--sans); }
.keepsake-list strong { font: 700 var(--ui-small)/1.4 var(--sans); color: #4b613f; }
.keepsake-list article p { margin: 7px 0 0; }
#find-toast { position: absolute; z-index: 8; top: 112px; left: 50%; transform: translateX(-50%); width: min(390px, calc(100% - 32px)); padding: 14px 18px; border: 1px solid #c4d7b277; border-radius: 12px; background: #234d43e8; box-shadow: 0 4px 16px #15362e40; color: #f2edcd; pointer-events: none; }
#find-toast strong, #find-toast span { display: block; font: 700 var(--ui-text)/1.4 var(--sans); }
#find-toast span { margin-top: 4px; font-weight: 600; }
.mobile-play #find-toast { top: 76px; }
#ending-note { padding: 18px 20px; bottom: 6%; border: 1px solid #bdd1ab70; border-radius: 16px; background: #1d443be6; backdrop-filter: blur(8px); box-shadow: 0 6px 24px #15372d33; }
#ending-note button { max-width: 100%; margin: 8px 4px 0; }
