@font-face{font-family:PondPixel;src:url('assets/press-start-2p.ttf') format('truetype');font-weight:400;font-display:swap}
:root{color-scheme:dark;--ink:#f2e8c6;--sage:#a4bd77;--water:#03251e;--leaf:#8db76a}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--water)}
body{font-family:PondPixel,'Courier New',monospace;color:var(--ink);-webkit-tap-highlight-color:transparent}
button,a{touch-action:manipulation}
button{font:inherit}
button[hidden],[hidden]{display:none!important}
button,a{-webkit-user-select:none;user-select:none}
button{color:inherit;cursor:pointer}
:focus-visible{outline:2px solid #f5d878;outline-offset:7px}
::selection{background:#526e40;color:#fff7dc}
#pond{position:relative;display:grid;place-items:center;isolation:isolate;min-height:100svh;height:100dvh;min-height:max(540px,100svh);overflow:hidden}
.pond-art,.pond-art img,#plants,#life,.water-shade{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.pond-art{z-index:-6;background:var(--water)}
.pond-art img{object-fit:cover;object-position:center;image-rendering:auto}
#plants{z-index:-4}
#life{z-index:-3}
.water-shade{z-index:-2;background:radial-gradient(ellipse 31% 35% at 50% 48%,rgba(0,23,18,.23),transparent 100%)}
.hero{text-align:center;display:flex;align-items:center;flex-direction:column;margin-top:-24px;padding:60px 24px 60px;pointer-events:none;max-width:100%;}
/* Use the original prototype's Press Start 2P lettering with the pond palette. */
.wordmark{--logo-width:clamp(280px,30.5vw,510px);display:flex;align-items:center;justify-content:center;width:var(--logo-width);aspect-ratio:6.1;max-width:88vw;font-family:PondPixel,monospace;font-size:calc(var(--logo-width) / 7);font-weight:700;line-height:1;letter-spacing:0;white-space:nowrap;color:#89af64}
.wordmark span:last-child{color:#f4d277}
h1{font-family:'Courier New',Courier,monospace;font-size:clamp(30px,2.4vw,40px);line-height:1.35;font-weight:400;letter-spacing:0;margin:35px 0;white-space:nowrap}
.phase{font-size:12px;line-height:1.8;font-weight:400;letter-spacing:0;color:var(--sage);margin:0 0 30px;animation:phase-blink 2.8s ease-in-out infinite}
@keyframes phase-blink{0%,45%,100%{opacity:1}65%,80%{opacity:.15}}
.follow{position:relative;display:flex;align-items:center;justify-content:center;min-width:270px;min-height:56px;padding:9px 30px;background:rgba(1,29,22,.5);box-shadow:inset 0 0 0 1px #b2ca8070;border:1px solid #99b872;color:var(--ink);text-decoration:none;font-family:'Courier New',Courier,monospace;font-size:26px;font-weight:400;letter-spacing:0;line-height:1;pointer-events:auto;transition:background .18s,border-color .18s,box-shadow .18s}
.follow:hover,.follow:focus-visible{background:#153e2c;border-color:#d1dc9b;box-shadow:inset 0 0 0 1px #b2ca8070,0 0 28px #91b46115}
.follow:active{background:#244931}
.pond-controls{position:absolute;left:max(27px,env(safe-area-inset-left));right:max(27px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:16px;pointer-events:none}
.utility{display:inline-flex;align-items:center;justify-content:center;gap:10px;background:transparent;border:0;padding:10px 4px;min-height:44px;pointer-events:auto;opacity:.88;font-family:inherit;font-size:10px;line-height:1.6;transition:opacity .2s}
.utility:hover{opacity:1}
.sound{justify-self:start;width:44px;padding:10px;gap:0}
.lore-trigger{justify-self:end;color:#d4d899;text-decoration:underline;text-underline-offset:6px;text-decoration-color:#8b9b5866}
.lore-trigger:hover{text-decoration-color:currentColor}
.speaker{width:21px;height:21px;flex:none}
.sound-waves{display:none}
.sound[aria-pressed=true] .sound-waves{display:block}
.sound[aria-pressed=true] .sound-slash{display:none}
.discovery-secret{position:absolute;z-index:1;width:54px;height:54px;border:0;border-radius:50%;background:transparent;padding:0;touch-action:manipulation}
.discovery-secret::after{content:'';position:absolute;inset:-8px;border-radius:50%;background:radial-gradient(circle,rgba(249,218,153,.17),transparent 68%);opacity:0;transition:opacity .3s}
.discovery-secret:hover::after,.discovery-secret:focus-visible::after{opacity:1}
.secret-message{position:absolute;z-index:2;left:24px;right:24px;bottom:76px;margin:0;text-align:center;font-family:'Courier New',Courier,monospace;font-size:14px;line-height:1.6;letter-spacing:.08em;color:#dfd39b;opacity:0;transform:translateY(5px);transition:opacity .7s,transform .7s;pointer-events:none}
.secret-message.is-visible{opacity:.9;transform:translateY(0)}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:600px){
 #pond{min-height:max(520px,100svh)}
 .hero{margin-top:0;padding:70px 16px 85px}
 .wordmark{--logo-width:min(82vw,365px)}
 h1{font-size:clamp(24px,6.9vw,34px);line-height:1.4;margin:30px 0 29px}
 .phase{font-size:10px;margin-bottom:27px}
 .follow{font-size:23px;min-width:214px;min-height:54px}
 .pond-controls{left:19px;right:17px;bottom:max(13px,env(safe-area-inset-bottom));gap:3px 16px;grid-template-columns:1fr 1fr}
 .utility{font-size:8px;gap:6px}
 .speaker{width:18px;height:18px}
 .secret-message{bottom:98px;font-size:11px;letter-spacing:.04em}
 .water-shade{background:radial-gradient(ellipse 62% 31% at 50% 48%,rgba(0,23,18,.23),transparent 100%)}
}

/* Court-file lore: native modal focus/keyboard handling, live pond underneath. */
html.lore-open{overflow:hidden}
.lore-dialog{inset:0;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:24px;border:0;background:transparent;color:var(--ink);overflow:hidden}
.lore-dialog[open]{display:grid;place-items:center}
.lore-dialog::backdrop{background:rgba(0,13,10,.67)}
.lore-panel{width:min(700px,100%);height:min(720px,calc(100dvh - 48px));max-height:100%;display:grid;grid-template-rows:auto minmax(0,1fr) auto;background:linear-gradient(145deg,rgba(31,54,32,.28),transparent 40%),rgba(4,28,21,.97);border:1px solid #778755;box-shadow:inset 0 0 0 5px #122c2170,0 24px 100px #0009;overflow:hidden}
.lore-header{position:relative;padding:28px 34px 22px;border-bottom:1px solid #7d8e4a3b}
.lore-kicker{margin:0 50px 19px 0;color:#a5b77e;font-size:8px;line-height:1.9;letter-spacing:.04em}
.lore-kicker span{color:#536b49;margin:0 7px}
.lore-close{position:absolute;right:17px;top:15px;width:44px;height:44px;display:grid;place-items:center;background:transparent;border:1px solid transparent;color:#b7bf91;font-family:'Courier New',monospace;font-size:30px;line-height:1}
.lore-close:hover{border-color:#75834c;background:#193626;color:var(--ink)}
#lore-title{margin:0;font-family:'Courier New',Courier,monospace;font-size:32px;font-weight:400;line-height:1.15;letter-spacing:-.025em}
#lore-title span{color:#edce7d}
#lore-title:focus,.lore-body h3:focus{outline:none}
.lore-body{overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:27px 34px 24px;scrollbar-color:#5e764c #0d241b;scrollbar-width:thin;font-family:'Courier New',Courier,monospace;font-size:17px;line-height:1.65;color:#d6d8b8}
.lore-body p{margin:0 0 16px}
.lore-body p:last-child{margin-bottom:0}
.lore-body .lore-eyebrow{font-family:PondPixel,monospace;color:#91a36d;font-size:8px;line-height:1.7;margin-bottom:16px}
.lore-body h3{font-family:PondPixel,monospace;font-size:13px;line-height:1.8;font-weight:400;color:#eee5be;margin:0 0 23px}
.lore-body strong{color:#eee5be;font-weight:700}
.lore-body .lore-last-line{color:#e5ce89;border-left:2px solid #8f9850;padding-left:15px;margin-top:22px}
.lore-footer{padding:18px 34px 20px;border-top:1px solid #7d8e4a3b;background:#061e17}
.lore-nav{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px}
.lore-back,.lore-next,.lore-full-toggle{font-family:'Courier New',Courier,monospace;font-size:15px;background:transparent;color:#dbe0b6;border:0;min-height:44px;padding:10px 0}
.lore-back{justify-self:start;padding-right:18px}
.lore-back:disabled{opacity:.3;cursor:default}
.lore-back:not(:disabled):hover,.lore-full-toggle:hover{color:#f0d47e;text-decoration:underline;text-underline-offset:4px}
.lore-next{justify-self:end;border:1px solid #919e62;background:#1b3524;color:#eee0ad;padding:9px 17px;white-space:nowrap}
.lore-next:hover{background:#29432b;border-color:#d1ce89}
.lore-progress{display:flex;gap:5px}
.lore-progress span{height:3px;width:15px;background:#33492e}
.lore-progress .is-current{background:#e0c879}
.lore-footnote{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px}
.lore-full-toggle{font-size:13px;min-height:36px;color:#a5b887;text-align:left;padding:6px 0}
.lore-footnote>span{font-size:7px;color:#7d8e68;white-space:nowrap}
@media(max-width:600px){
 .lore-dialog{padding:12px}
 .lore-panel{height:min(760px,calc(100dvh - 24px))}
 .lore-header{padding:23px 22px 18px}
 .lore-kicker{font-size:6px;line-height:2;margin-bottom:16px}
 .lore-kicker span{margin:0 3px}
 #lore-title{font-size:27px}
 .lore-close{right:9px;top:9px}
 .lore-body{padding:24px 22px;font-size:16px;line-height:1.65}
 .lore-body h3{font-size:11px;line-height:1.9;margin-bottom:20px}
 .lore-body .lore-eyebrow{font-size:7px}
 .lore-footer{padding:14px 22px 13px}
 .lore-nav{gap:10px}
 .lore-progress{gap:4px}
 .lore-progress span{width:10px}
 .lore-back,.lore-next{font-size:13px}
 .lore-next{padding:9px 12px}
 .lore-footnote{margin-top:6px}
 .lore-full-toggle{font-size:12px}
 .lore-footnote>span{font-size:6px}
}
@media(max-height:540px){
 .lore-dialog{padding:10px}
 .lore-panel{height:calc(100dvh - 20px)}
 .lore-header{padding:16px 24px 13px}
 .lore-kicker{margin-bottom:9px;font-size:7px}
 #lore-title{font-size:24px}
 #lore-title br{display:none}
 #lore-title span{margin-right:8px}
 .lore-body{padding:18px 24px}
 .lore-footer{padding:9px 24px}
 .lore-footnote{margin-top:0}
}
@media(max-height:540px) and (min-width:601px){
 #pond{min-height:400px}
 .hero{padding:30px 16px 65px;margin-top:0}
 .wordmark{--logo-width:260px}
 h1{font-size:32px;margin:20px 0 16px}
 .phase{margin-bottom:17px;font-size:10px}
 .follow{min-height:45px;min-width:190px;font-size:26px}
 .pond-controls{bottom:8px}
}
/* The memorial uses the same quiet, stationary silhouettes as the game. */
/* Floor-level memorial, under foliage and every living swimmer. Positions and
   breakpoints match the main game's scene-pond-identity / scene-memorial. */
#memories{position:absolute;left:max(20px,4%);top:max(152px,17%);width:280px;height:170px;z-index:-5;pointer-events:none}
.memorial-shadow{position:absolute;display:grid;place-items:center;width:36px;height:32px;transform:translate(-50%,-50%)}
.memorial-shadow svg{overflow:visible;filter:drop-shadow(0 1px 1px #6a806a40)}
.memorial-shadow-fill{fill:#001710;stroke:none}
.memorial-shadow-outline{fill:none;stroke:#68765b80;stroke-width:.3;stroke-linecap:square}
#pond{touch-action:none}
#pond.is-stirring{cursor:grabbing}
@media(max-width:1000px) and (min-width:700px){#memories{top:190px}}
@media(max-width:699px){
 #memories{left:20px;top:175px;width:min(300px,calc(100vw - 40px));height:138px}
 .memorial-shadow{width:30px;height:26px}.memorial-shadow svg{max-width:36px;scale:.85}
}
@media(min-width:700px) and (max-width:950px) and (max-height:500px){#memories{top:130px}}
@media(prefers-reduced-motion:reduce) and (hover:none) and (pointer:coarse){.phase{animation:none}.secret-message,.utility,.follow{transition:none}}
