/* Pleasant Valley: the page around the 3D view. Almost nothing on screen while you walk. */
:root { --ink: #f4ecd8; --dim: rgba(244, 236, 216, .72); --panel: rgba(24, 30, 26, .72); --accent: #e0a23c; --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1d2a24; color: var(--ink); font-family: var(--serif); touch-action: none; user-select: none; -webkit-user-select: none; overscroll-behavior: none; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }
.kicker { margin: 0; letter-spacing: .32em; text-transform: uppercase; font-size: .72rem; color: var(--dim); }
h1 { margin: .15em 0 .3em; font-weight: normal; font-style: italic; font-size: clamp(2.2rem, 8vw, 3.8rem); }

#loading { position: fixed; inset: 0; z-index: 20; display: grid; place-content: center; text-align: center; background: #1d2a24; transition: opacity .8s; padding: 24px; }
#loading.done { opacity: 0; pointer-events: none; }
#bar { width: min(70vw, 320px); height: 4px; margin: 14px auto; border-radius: 4px; background: rgba(244, 236, 216, .18); overflow: hidden; }
#barFill { display: block; width: 0; height: 100%; background: var(--accent); transition: width .25s; }
#loadMsg { margin: 0; font-style: italic; color: var(--dim); }
#loadMsg.err { color: #ffb4a0; font-style: normal; }

#title { position: fixed; inset: 0; z-index: 15; display: grid; place-items: center; padding: 18px; background: radial-gradient(ellipse at center, rgba(20, 26, 22, .25), rgba(20, 26, 22, .7)); }
.card { max-width: 560px; text-align: center; padding: clamp(20px, 5vw, 38px); border-radius: 22px; background: var(--panel); backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); box-shadow: 0 14px 60px rgba(0, 0, 0, .45); }
.sub { margin: 0 0 1.2em; line-height: 1.55; font-size: clamp(1rem, 3.3vw, 1.15rem); }
#playBtn { font: italic 1.25rem var(--serif); color: #2a1c08; background: linear-gradient(#f0bd62, #dc9a34); border: 0; border-radius: 999px; padding: .6em 1.9em; box-shadow: 0 6px 22px rgba(224, 162, 60, .4); cursor: pointer; }
#playBtn:hover, #playBtn:focus-visible { filter: brightness(1.08); outline: 2px solid #fff; }
#how { list-style: none; margin: 1.4em 0 0; padding: 0; font-size: .92rem; line-height: 1.7; color: var(--dim); }
#how b { color: var(--ink); font-weight: normal; }
#how .touch { display: none; }
body.touch #how .touch { display: block; }
body.touch #how .keys { display: none; }

/* a soft darkening towards the corners, like an old lens */
body::after { content: ""; position: fixed; inset: 0; z-index: 5; pointer-events: none; background: radial-gradient(ellipse at center, transparent 58%, rgba(20, 14, 8, .34) 100%); }
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#place { position: absolute; left: 50%; bottom: max(26px, calc(env(safe-area-inset-bottom) + 14px)); transform: translate(-50%, 8px); text-align: center; padding: .5em 1.3em .55em; border-radius: 14px; background: var(--panel); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .9s, transform .9s; max-width: 92vw; }
#place.show { opacity: 1; transform: translate(-50%, 0); }
#placeName { display: block; font-weight: normal; font-style: italic; font-size: clamp(1.15rem, 4vw, 1.6rem); }
#placeSub { display: block; margin-top: .15em; letter-spacing: .22em; text-transform: uppercase; font-size: .68rem; color: var(--dim); }
#say { position: absolute; left: 50%; bottom: max(104px, calc(env(safe-area-inset-bottom) + 96px)); transform: translateX(-50%); max-width: 88vw; text-align: center; font-style: italic; font-size: clamp(1rem, 3.6vw, 1.3rem); color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 0 14px rgba(0, 0, 0, .7); opacity: 0; transition: opacity .7s; }
#say.show { opacity: 1; }
#soundBtn { position: absolute; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); width: 40px; height: 40px; border-radius: 50%; border: 0; color: var(--ink); background: var(--panel); font-size: 1.05rem; pointer-events: auto; cursor: pointer; }
#soundBtn.off { opacity: .5; text-decoration: line-through; }
#timeBtn { position: absolute; top: max(12px, env(safe-area-inset-top)); right: calc(max(12px, env(safe-area-inset-right)) + 50px); width: 40px; height: 40px; border-radius: 50%; border: 0; color: var(--ink); background: var(--panel); font-size: 1.05rem; pointer-events: auto; cursor: pointer; }
#stick { position: fixed; left: 0; top: 0; width: 132px; height: 132px; margin: -66px 0 0 -66px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .1); opacity: 0; transition: opacity .2s; }
#stick.on { opacity: 1; }
#knob { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px; border-radius: 50%; background: rgba(255, 255, 255, .8); box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
@media (max-height: 460px) { .sub { display: none; } h1 { font-size: 2rem; } #how { margin-top: .8em; font-size: .82rem; } }
