@font-face { font-family: Overpass; src: url('../assets/Overpass-VariableFont_wght.ttf') format('truetype'); font-style: normal; font-weight: 100 900; font-display: swap; }
:root { font-family: Overpass, Arial, sans-serif; color: #f5f5f1; background: #252729; -webkit-font-smoothing: antialiased; font-synthesis: none; }
* { box-sizing: border-box; }
html, body, #app { width: 100%; height: 100%; margin: 0; overflow: hidden; }
button { font: inherit; }
.fa-icon { display: inline-block; flex: none; width: 1em; height: 1em; vertical-align: middle; }
.game { position: fixed; inset: 0; overflow: hidden; isolation: isolate; background: #252729; touch-action: none; }
#board { position: absolute; inset: 0; display: block; z-index: 0; touch-action: none; }
.hud-top { position: absolute; z-index: 2; top: calc(env(safe-area-inset-top) + 29px); left: 20px; right: 20px; display: flex; justify-content: center; align-items: center; pointer-events: none; }
.level-title { color: #f5f5f1; font-size: clamp(25px,7vw,32px); font-weight: 800; letter-spacing: -.045em; line-height: 1; white-space: nowrap; }
.level-title strong { font-weight: 800; }
.tip-box { display: flex; align-items: stretch; width: min(360px, calc(100vw - 32px)); min-height: 44px; overflow: hidden; border: 1px solid #d9dfdf; border-radius: 2px; background: #f6f7f5; color: #202223; text-align: left; box-shadow: 0 5px 18px rgba(0,0,0,.22); pointer-events: none; }
.tip-box__icon { display: flex; align-items: center; justify-content: center; flex: 0 0 44px; background: var(--ui-blue); color: #fff; }
.tip-box__icon .fa-icon { width: 21px; height: 21px; }
.tip-box__text { align-self: center; padding: 10px 12px 10px 13px; }
.first-hint { position: absolute; z-index: 2; top: calc(env(safe-area-inset-top) + 74px); left: 50%; transform: translateX(-50%); font-size: 14px; font-weight: 650; line-height: 1.35; transition: opacity .16s ease; }
.first-hint[hidden] { display: none; }
.first-hint.is-covered { opacity: 0; }
.menu-button { position: absolute; right: 0; top: -8px; pointer-events: auto; }
.menu-button .fa-icon { font-size: 25px; }
.undo-button { position: absolute; z-index: 2; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 24px); transform: translateX(-50%); width: 64px; height: 64px; }
.undo-button .fa-icon { font-size: 32px; }
.undo-button:hover:not(:disabled) { transform: translateX(-50%) scale(1.1); }
.undo-button:disabled { opacity: .28; cursor: default; }
.message { position: absolute; z-index: 4; top: calc(env(safe-area-inset-top) + 74px); left: 50%; transform: translate(-50%,-6px); font-size: 13px; font-weight: 700; line-height: 1.35; opacity: 0; transition: opacity .2s, transform .2s; }
.message .tip-box__icon { background: var(--ui-amber); }
.message.visible { opacity: 1; transform: translate(-50%,0); }
.options, .win { position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 30px; background: #202223; }
.options[hidden], .win[hidden] { display: none !important; }
.menu-back { position: fixed; z-index: 20; top: calc(env(safe-area-inset-top) + 16px); left: 20px; color: #b9c4c7; font-size: 31px; }
.menu-back:hover:not(:disabled) { color: #fff; filter: drop-shadow(0 0 5px rgba(255,255,255,.36)); }
.menu-back:focus-visible { outline-offset: 1px; }
.options-panel { width: min(100%, 370px); }
.options-panel h2 { margin: 0 0 24px 2px; color: #f5f5f1; font-size: 27px; line-height: 1.1; letter-spacing: -.035em; font-weight: 800; }
.options-panel p { margin: 0; color: #c4ccce; font-size: 14px; line-height: 1.45; }
.options-panel > .menu-intro { margin: 0 2px 18px; }
.menu-section { padding: 16px; border: 1px solid #3d4649; border-radius: 2px; background: #1a1e20; }
.menu-section + .menu-section { margin-top: 18px; }
.menu-section h3 { margin: 0 0 12px; color: #f5f5f1; font-size: 18px; line-height: 1.2; letter-spacing: -.02em; font-weight: 800; }
.menu-section p { margin: 0 0 14px; }
.menu-field-label { display: block; margin: 0 0 8px; color: #b6c0c2; font-size: 13px; font-weight: 700; }
.menu-section .ui-button + .ui-button { margin-top: 10px; }
.menu-section + .ui-button { margin-top: 16px; }
.share-menu { overflow-y: auto; align-items: safe center; }
.share-menu .options-panel { padding-block: 20px; }
.share-menu textarea { display: block; width: 100%; min-height: 70px; padding: 11px 12px; resize: none; border: 1px solid #647074; border-radius: 2px; background: #303436; color: #f5f5f1; font: 600 13px/1.4 Overpass, Arial, sans-serif; overflow-wrap: anywhere; }
.share-menu .share-status { margin-top: 10px; color: #a8d2eb; font-size: 13px; }
.share-menu .share-status:empty { display: none; }
.reset-confirm { z-index: 12; }
.reset-confirm .menu-section p { margin: 0; }
.options-panel > .ui-button + .ui-button { margin-top: 12px; }
#reset-progress { margin-top: 24px; }
.debug-menu { overflow-y: auto; align-items: safe center; }
.debug-menu .options-panel { padding-block: 26px; }
#debug-title:focus { outline: none; }
.debug-menu .menu-section p { margin-bottom: 14px; }
.debug-jump-row { display: flex; flex-direction: column; gap: 12px; }
.debug-jump-row input { display: block; width: 100%; min-width: 0; min-height: 52px; padding: 8px 12px; border: 1px solid var(--ui-border); border-radius: 2px; background: var(--ui-surface); color: var(--ui-ink); font: 700 18px Overpass, Arial, sans-serif; text-align: center; appearance: textfield; }
.debug-jump-row input::-webkit-inner-spin-button, .debug-jump-row input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.debug-jump-row input:focus-visible { outline: 2px solid #e4eaeb; outline-offset: 2px; }
.journey-map { overflow-y: auto; align-items: safe center; }
.journey-map .options-panel { padding-block: 26px; }
.journey-track { position: relative; display: flex; flex-direction: column; gap: 4px; }
.journey-track::before { content: ''; position: absolute; top: 16px; bottom: 16px; left: 14px; width: 2px; background: #465257; }
.journey-step { position: relative; display: flex; align-items: center; gap: 9px; min-height: 48px; color: #aeb9bb; }
.journey-step__marker { position: relative; z-index: 1; display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border: 2px solid #59666a; border-radius: 50%; background: #1a1e20; color: #aeb9bb; font-size: 13px; font-weight: 800; }
.journey-step__marker .fa-icon { width: 12px; height: 12px; }
.journey-step.is-discovered .journey-step__marker { border-color: var(--ui-blue); background: var(--ui-blue); color: #fff; }
.journey-step__art { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 48px; }
.journey-step__art svg { display: block; width: 38px; height: 48px; }
.journey-step__copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.journey-step__copy strong { color: inherit; font-size: 14px; line-height: 1.15; }
.journey-step.is-discovered .journey-step__copy strong { color: var(--ui-ink); }
.journey-step__copy small { font-size: 12px; line-height: 1.2; }
.journey-step__help { max-width: 27ch; margin-top: 3px; color: #e0e8e9; line-height: 1.35 !important; }
.journey-map .menu-section .journey-next { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #3d4649; font-size: 13px; }
.mechanic-unlocked { position: absolute; inset: 0; z-index: 11; display: flex; align-items: center; justify-content: center; padding: 22px; background: rgba(17, 20, 22, .82); text-align: center; }
.mechanic-unlocked[hidden] { display: none !important; }
.unlock-confetti { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.unlock-panel { position: relative; z-index: 1; width: min(360px, 100%); padding: 30px 24px 26px; border: 1px solid #465257; border-radius: 2px; background: #252729; box-shadow: 0 20px 55px rgba(0,0,0,.35); }
.unlock-eyebrow { margin: 0 0 16px; color: #b8c3c6; font-size: 13px; font-weight: 800; letter-spacing: .025em; }
.unlock-art { display: grid; place-items: center; height: 98px; }
.unlock-art .journey-step__art, .unlock-art .journey-step__art svg { width: 76px; height: 96px; }
.unlock-panel h2 { margin: 14px 0 4px; color: #f5f5f1; font-size: clamp(28px, 8vw, 36px); line-height: 1.1; letter-spacing: -.035em; }
.unlock-level { margin: 0 0 18px; color: #b8c3c6; font-size: 14px; font-weight: 700; }
.unlock-description { margin: 0 0 26px; color: #e0e8e9; font-size: 16px; line-height: 1.4; }
.unlock-panel > .ui-button + .ui-button { margin-top: 10px; }
#mechanic-toggles { border-block: 1px solid #3d4649; }
.mechanic-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 54px; padding: 7px 2px; border: 0; border-bottom: 1px solid #3d4649; background: transparent; color: var(--ui-ink); text-align: left; font: 700 15px/1.2 Overpass, Arial, sans-serif; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .18s ease, transform .2s cubic-bezier(.2,.8,.2,1); }
.mechanic-switch:last-child { border-bottom: 0; }
.mechanic-switch:hover { background: #252b2e; transform: scale(1.015); }
.mechanic-switch:focus-visible { outline: 2px solid #e4eaeb; outline-offset: -2px; }
.mechanic-copy { display: flex; flex-direction: column; gap: 2px; }
.mechanic-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; color: #adb7ba; font-size: 11px; letter-spacing: 0; font-weight: 600; }
.mechanic-meta small { font: inherit; }
.mechanic-switch__track { display: flex; align-items: center; flex: none; width: 42px; height: 24px; padding: 3px; border-radius: 12px; background: #596468; transition: background .18s ease; }
.mechanic-switch__thumb { width: 18px; height: 18px; border-radius: 50%; background: #f5f5f1; transition: transform .18s ease; }
.mechanic-switch[aria-checked="true"] .mechanic-switch__track { background: var(--ui-blue); }
.mechanic-switch[aria-checked="true"] .mechanic-switch__thumb { transform: translateX(18px); }
#debug-play { margin-top: 16px; }
.option-trailing { display: flex; align-items: center; gap: 12px; font-size: .85em; letter-spacing: 0; font-weight: 700; }
@media (hover: none) { .mechanic-switch:hover { transform: none; } }
.win { z-index: 9; padding: 0; overflow: hidden; background: transparent; text-align: center; }
.win-liquid { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
.win-panel { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; width: min(360px, calc(100vw - 44px)); padding: 34px 22px 30px; background: #252729; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 16px 48px rgba(0,0,0,.16); opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; pointer-events: none; }
.win.is-ready .win-panel { opacity: 1; transform: translateY(0); pointer-events: auto; }
.win h1 { font-size: clamp(51px,14vw,76px); line-height: 1; letter-spacing: -.065em; margin: 0 0 18px; }
.outcome-level { margin: 0 0 30px; font-size: 17px; font-weight: 700; color: #c5cacb; }
.win-panel > .ui-button + .ui-button { margin-top: 8px; }
.loss { position: absolute; inset: 0; z-index: 9; display: flex; align-items: center; justify-content: center; padding: 22px; overflow: hidden; text-align: center; }
.loss[hidden] { display: none !important; }
.loss-swirl { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.loss-panel { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; width: min(390px, 100%); padding: 34px 22px 30px; background: #252729; border: 1px solid rgba(255,255,255,.13); box-shadow: 0 20px 55px rgba(0,0,0,.24); opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s ease; pointer-events: none; }
.loss.is-ready .loss-panel { opacity: 1; transform: translateY(0); pointer-events: auto; }
.loss h1 { margin: 0 0 18px; font-size: clamp(43px, 12vw, 62px); line-height: 1; letter-spacing: -.06em; }
.loss-panel > .ui-button + .ui-button { margin-top: 8px; }
@media (max-width: 370px) { .hud-top { left: 14px; right: 14px; } .level-title { font-size: 25px; } }
@media (max-width: 440px) { .options { overflow-y: auto; align-items: safe center; padding: calc(env(safe-area-inset-top) + 76px) 22px calc(env(safe-area-inset-bottom) + 24px); } }
@media (max-height: 650px) { .hud-top { top: calc(env(safe-area-inset-top) + 12px); } .first-hint, .message { top: calc(env(safe-area-inset-top) + 62px); } .first-hint { font-size: 13px; } .undo-button { bottom: calc(env(safe-area-inset-bottom) + 10px); } }
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
