*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#172a21;color:#fffaf0}body{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;min-height:100svh}button{cursor:pointer;font:inherit}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #f0d398;outline-offset:5px}.landscape,.shade{position:fixed;inset:0;width:100%;height:100%;height:100dvh}.landscape{object-fit:cover;object-position:50% 47%}.shade{background:linear-gradient(180deg,#0c1a1c55,#0c1a1c20 26%,#0b1c1966 65%,#071b18b0);pointer-events:none;transition:opacity 1.5s}header{position:absolute;z-index:1;top:0;left:0;width:100%;padding:36px 5vw;display:flex;justify-content:space-between;align-items:center}.brand{color:inherit;text-decoration:none;font-size:21px;letter-spacing:2px}.brand span{display:block;font-size:8px;letter-spacing:4px;margin-top:6px;opacity:.7}.edition{font-size:11px;letter-spacing:1px;opacity:.8}main{position:relative;min-height:100svh;display:grid;place-items:center;padding:130px 24px 110px}.welcome,.ending{text-align:center;max-width:620px;text-shadow:0 2px 25px #001b1499}.eyebrow{font-size:11px;letter-spacing:4px;opacity:.8;margin-bottom:28px}h1,h2{font-family:'Batang',Georgia,serif;font-weight:400}h1{font-size:clamp(48px,7vw,80px);letter-spacing:10px;margin:0 0 30px 10px}.greeting{font-size:15px;line-height:2.1;font-weight:300;margin-bottom:38px}.primary{border:1px solid #fffa;background:#f8f4e9e8;color:#253f35;border-radius:2px;min-width:230px;min-height:56px;padding:15px 25px;font-size:13px;text-align:left}.primary span{float:right}.primary:hover{background:#fffaf0}.hint{font-size:10px;opacity:.75;margin-top:19px;line-height:1.8}.quiet,.glass{color:#fffaf0;background:#112f2460;border:1px solid #ffffff50;min-height:46px;padding:12px 23px;border-radius:3px;font-size:12px}.quiet{background:transparent}.rest-controls{position:fixed;z-index:3;bottom:max(28px,env(safe-area-inset-bottom));left:0;right:0;display:flex;justify-content:space-between;padding:0 5vw}.sound-panel{position:fixed;z-index:4;right:5vw;bottom:94px;width:min(380px,calc(100vw - 32px));background:#f4f2e9;color:#284036;padding:24px;border-radius:8px;box-shadow:0 15px 70px #001a1240}.panel-top{display:flex;align-items:center;justify-content:space-between;gap:20px}.panel-top h2{font-family:inherit;font-size:15px;margin:0}.panel-top button{border:0;background:transparent;min-height:44px;padding:10px;color:inherit;font-size:12px}.sound-panel>p{font-size:12px;color:#607266;line-height:1.7}.sounds{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:18px 0}.sounds button{min-height:46px;border:1px solid #cbd3c6;color:#3b5848;background:transparent;border-radius:4px;font-size:12px;padding:8px 3px}.sounds button[aria-pressed=true]{background:#345543;color:#fff;border-color:#345543}.volume{display:flex;align-items:center;gap:18px;font-size:12px}.volume input{flex:1;min-width:0;min-height:44px;accent-color:#436c51}#audio-status{min-height:40px}.sound-panel .candidate{font-size:10px;color:#687564}.ending h2{font-size:clamp(28px,5vw,46px);line-height:1.8;margin:0 0 35px}.end-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}footer{position:absolute;bottom:24px;left:5vw;right:5vw;display:flex;justify-content:space-between;align-items:center;font-size:10px;opacity:.8}footer button{border:0;color:inherit;background:transparent;font-size:10px;min-height:44px;padding:10px}dialog{border:1px solid #cbd3c6;border-radius:8px;max-width:560px;width:calc(100% - 32px);max-height:85dvh;background:#f4f2e9;color:#284036;padding:24px;font-size:12px;line-height:1.9}dialog::backdrop{background:#071b1880}dialog a{color:#315c49}.image-error{position:fixed;top:100px;left:20px;right:20px;text-align:center;font-size:12px;background:#172a21;padding:12px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}body.resting .shade{opacity:.18}body.resting main{padding:0}body.resting{overflow:hidden}[hidden]{display:none!important}@media(max-width:600px){header{padding:26px 24px}.edition{font-size:9px}.greeting{font-size:13px}h1{margin-bottom:25px}.eyebrow{font-size:10px;letter-spacing:3px}footer{left:24px;right:20px;bottom:max(12px,env(safe-area-inset-bottom));gap:10px}footer>span{max-width:160px;line-height:1.7}.rest-controls{padding:0 20px}.sound-panel{right:16px;bottom:90px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}@media(max-height:500px){main{padding:90px 20px 70px}.eyebrow{margin:10px}h1{font-size:38px;margin-bottom:10px}.greeting{margin:10px 0 15px}.hint{margin:10px}.sound-panel{bottom:70px;max-height:70dvh;overflow:auto}}
footer{pointer-events:none}footer button{pointer-events:auto}@media(max-height:500px){.ending h2{font-size:26px;line-height:1.5;margin-bottom:18px}.ending .eyebrow{margin:10px 0 16px}.ending .primary{min-height:48px}}

/* Quiet controls stay at the edge of the landscape. */
.sound-panel .sounds{grid-template-columns:repeat(3,minmax(0,1fr))}.sounds button[data-sound="silent"]{grid-column:1/-1;order:2;min-height:44px}.sound-panel .sounds button{min-width:0}
.landscape{opacity:0;pointer-events:none;transition:opacity 1.6s ease-in-out}.landscape.scene-front{opacity:1}body.departed .landscape.scene-front{opacity:0}.scene-status{position:fixed;bottom:88px;left:20px;right:20px;text-align:center;color:#fff6dd;font-size:11px;pointer-events:none}.scene-status:empty{display:none}
.glass{border-radius:40px;background:#1d3026b8;border-color:#f8f3dc45;box-shadow:0 5px 25px #00180c20;min-width:88px}
.glass:hover{background:#2e4437e6}.primary{border-radius:40px}
.sound-panel{background:#223128f5;color:#fffbed;border:1px solid #e6e2cd50;border-radius:28px;padding:26px 28px;box-shadow:0 18px 70px #00170c55;max-height:calc(100dvh - 130px);overflow:auto;scrollbar-color:#c7bd94 #ffffff10;overscroll-behavior:contain}
@supports(backdrop-filter:blur(20px)){.sound-panel,.glass{backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}.sound-panel{background:linear-gradient(135deg,#3d443bd9,#1f2d25e8)}}
.panel-top h2{font-size:20px;font-weight:500;letter-spacing:-.3px}.panel-top button{border-radius:50%;background:#ffffff10;font-size:24px;width:44px;line-height:1;padding:8px}
.sound-panel>p{color:#e5e7d9}.sound-panel .candidate{color:#ccd3c3}.sounds{gap:8px;margin:24px 0}
.sounds button{background:#ffffff08;border-color:#eff0df30;color:#efefdf;border-radius:16px;min-height:52px}
.sounds button:hover{background:#ffffff15}.sounds button[aria-pressed=true]{background:#c7bc85;color:#253329;border-color:#d5cba0}
.volume{display:grid;grid-template-columns:auto minmax(60px,1fr) 32px;gap:12px;color:#eeeddf}.volume input{width:100%;accent-color:#c7bc85}.volume output{font-size:11px;text-align:right;font-variant-numeric:tabular-nums}
.landscape{transition:opacity 1.2s}.ending{animation:arrive 1.2s ease-out}.farewell{font-size:13px;line-height:1.9;color:#72816e;margin:0 0 30px}
body.departed{background:#eef0e5;color:#354c42}body.departed .landscape,body.departed .shade{opacity:0}body.departed header,body.departed footer{display:none}
body.departed .ending{text-shadow:none}body.departed .eyebrow{color:#89937f}body.departed .ending h2{font-size:clamp(26px,4vw,38px);margin-bottom:20px;line-height:1.7}
body.departed .primary{background:#3b5147;color:#fff9e9;border-color:#3b5147;min-width:200px}body.departed .quiet{color:#596e5d;border-color:#b7c0ad;border-radius:40px}
@keyframes arrive{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(max-width:600px){.sound-panel{padding:22px;border-radius:24px;bottom:92px;max-height:calc(100dvh - 116px)}.sounds button{font-size:11px}.rest-controls{bottom:max(24px,env(safe-area-inset-bottom))}.farewell{font-size:12px}.ending .end-actions{gap:12px}}
@media(max-height:500px){.sound-panel{bottom:78px;max-height:calc(100dvh - 94px);padding:18px 22px}.sound-panel .sounds{margin:12px 0}.sound-panel #audio-status{min-height:0}.sound-panel .candidate{display:none}.sound-panel .panel-top h2{font-size:17px}body.departed .ending h2{font-size:25px;line-height:1.4;margin-bottom:12px}.farewell{margin-bottom:16px}.ending .eyebrow{margin:5px 0 12px}body.departed main{padding:30px 20px}}
