/* Match the original practice wordmark, including its real ū glyph. */
@font-face{font-family:"Ku Wordmark";font-style:normal;font-weight:300;font-display:block;src:url("../fonts/cormorant-latin.woff2") format("woff2");unicode-range:U+004B}
@font-face{font-family:"Ku Wordmark";font-style:normal;font-weight:300;font-display:block;src:url("../fonts/cormorant-latin-ext-300.woff2") format("woff2");unicode-range:U+016B}
:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color-scheme:dark;--ink:#e6e7da;--muted:#a1b5b4;--line:#c2d8ce30;--glass:#182b2d70;--header-height:calc(62px + env(safe-area-inset-top));font-synthesis:none;-webkit-font-smoothing:antialiased}
*{box-sizing:border-box}[hidden]{display:none!important}html{background:var(--surface-color,#0b191f)}body{margin:0;background:var(--surface-color,#0b191f);color:var(--ink);overflow:hidden}button,a,input{-webkit-tap-highlight-color:transparent}button,input{font:inherit}button,a{touch-action:manipulation}button{color:inherit;cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid #aeceb6;outline-offset:5px}button:disabled{opacity:.25;cursor:default}a{color:inherit}button{border:0;background:none}body[data-view=world]{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.app-shell{height:100vh;height:100dvh}.app-shell>main{position:absolute;inset:0}.site-header{position:absolute;z-index:5;top:0;left:0;right:0;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;height:var(--header-height);padding:env(safe-area-inset-top) max(36px,env(safe-area-inset-right)) 0 max(36px,env(safe-area-inset-left));pointer-events:none}.site-header>*{pointer-events:auto}.site-header>.wordmark{justify-self:start}.site-header>.header-actions{justify-self:end;display:flex;gap:10px}.wordmark{display:inline-flex;align-items:center;min-height:44px;font:300 36px/1.1 "Ku Wordmark",serif;text-decoration:none;letter-spacing:.08em;min-width:48px;opacity:.62;transition:opacity .2s}.wordmark:hover,.wordmark:focus-visible{opacity:.9}.view-switch{display:flex;align-items:center;padding:4px;border:1px solid var(--line);border-radius:30px;background:var(--glass);backdrop-filter:blur(18px)}.view-switch button{min-height:42px;min-width:90px;border-radius:30px;font-size:12px;color:var(--muted)}.view-switch .is-active{background:#c5d5ce18;color:var(--ink)}.round{display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--line);border-radius:50%;font-size:20px;background:var(--glass);backdrop-filter:blur(12px)}#help-toggle{font:17px Georgia,serif}.universe,#world-view,#planet-canvas,#micro-layer,#world-canvas{position:absolute;inset:0;width:100%;height:100%}.universe{overflow:hidden;touch-action:none}#planet-canvas{display:block;pointer-events:none}#micro-layer{opacity:0;pointer-events:none;transform-origin:50% 50%;will-change:opacity,transform}#world-canvas{display:block;touch-action:none}#world-view{isolation:isolate}.world-heading{position:absolute;top:max(126px,calc(100px + env(safe-area-inset-top)));left:max(42px,env(safe-area-inset-left));right:30px;pointer-events:none}.eyebrow{margin:0 0 14px;font-size:10px;letter-spacing:.23em;text-transform:uppercase;color:var(--muted)}h1{font:400 clamp(30px,4vw,58px)/1.08 Georgia,serif;margin:0;letter-spacing:-.04em}.world-heading>p:last-child{font-size:12px;color:var(--muted);line-height:1.7;margin:16px 0 0;max-width:270px}.field-status{position:absolute;bottom:30px;left:42px;right:42px;display:flex;gap:9px;align-items:center;font-size:10px;color:var(--muted);pointer-events:none}.status-dot{width:4px;height:4px;border-radius:50%;background:#a8bfaa}.version{margin-left:auto;font-size:9px;letter-spacing:.16em;text-transform:uppercase}.bottom-hud{position:absolute;bottom:max(66px,calc(44px + env(safe-area-inset-bottom)));left:50%;width:min(410px,calc(100% - 40px));transform:translateX(-50%);text-align:center;pointer-events:none}.bottom-hud button,.bottom-hud input{pointer-events:auto}.context-hint{min-height:42px;display:grid;place-items:center;font-size:11px;color:var(--muted);line-height:1.6;margin:0 10px 14px}#field-instruction{margin:0}#atom-inspector{padding:8px 18px;border-radius:24px;background:var(--glass);backdrop-filter:blur(12px);display:flex;flex-direction:column;color:var(--ink)}#inspection-detail{font-size:10px;color:var(--muted)}.camera-controls{display:flex;align-items:center;justify-content:center}.scale-stops{display:flex;justify-content:space-between;width:100%;gap:8px}.scale-stops button{min-height:44px;min-width:72px;flex:1;font-size:12px;color:var(--muted);padding:4px 8px}.scale-stops button[aria-pressed=true]{color:var(--ink)}.enter-world{font-size:12px;letter-spacing:.03em;min-height:44px;margin-top:10px;border-bottom:1px solid var(--line);padding:8px 10px}.enter-world span{margin-left:18px}.enter-world:disabled{visibility:hidden}.hints-off #field-instruction{visibility:hidden}#help-panel,#profile-panel{position:absolute;z-index:10;right:max(22px,env(safe-area-inset-right));top:calc(86px + env(safe-area-inset-top));width:min(370px,calc(100% - 32px));max-height:calc(100dvh - 112px - env(safe-area-inset-top));overflow:auto;background:#ecf0e8f5;color:#374c46;border:1px solid #ffffff40;border-radius:22px;padding:16px 24px 24px;box-shadow:0 20px 80px #0003;backdrop-filter:blur(24px);user-select:text;-webkit-user-select:text}.help-heading{display:flex;justify-content:space-between;align-items:center;font-size:9px;letter-spacing:.12em}.help-heading .round{background:none;border-color:#465e4c25;color:#374c46}.help-heading+h2{font:27px Georgia,serif;font-weight:400;margin:16px 0}#help-panel p,#profile-panel p{font-size:12px;line-height:1.75;color:#62746a}#help-panel .fine-print,#profile-panel .fine-print{font-size:10px;color:#78877d}#help-panel a,#profile-panel a{font-size:11px}#practice-link{background:#425e50;color:#f1f5ec;min-height:44px;border-radius:26px;padding:10px 18px;margin:8px 0 12px}.hint-setting{display:flex;align-items:center;gap:8px;font-size:11px;padding:8px 0}.hint-setting input{width:20px;height:20px;accent-color:#627d67}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}#world-error{position:absolute;top:45%;width:100%;text-align:center}#save-note{position:absolute;z-index:20;bottom:5px;left:20px;right:20px;font-size:11px;background:#f4e5c9;color:#604f36;padding:12px;border-radius:10px}body[data-scale=micro]{--ink:#3d514a;--muted:#71847a;--line:#546e5f35;--glass:#edf1e47a;color-scheme:light}body[data-scale=micro] .world-heading{opacity:.65}body[data-scale=micro] h1{font-size:32px}body[data-scale=micro] #place-detail{display:none}body[data-view=practice]{color-scheme:dark;background:#191919}#practice-view{position:absolute;inset:var(--header-height) 0 0;z-index:2;background:#191919}#practice-view,.practice-frame-wrap{display:flex;flex:1;min-width:0;min-height:0}.practice-frame-wrap{position:relative}#game-frame{width:100%;height:100%;border:0}#practice-loading{position:absolute;inset:0;display:grid;place-items:center;background:#191919;color:var(--muted);font-size:12px;pointer-events:none}
@media(max-width:620px){.site-header{padding-left:max(20px,env(safe-area-inset-left));padding-right:max(20px,env(safe-area-inset-right))}.wordmark{font-size:30px}.view-switch button{min-width:76px;min-height:38px}.world-heading{top:calc(112px + env(safe-area-inset-top));left:25px;right:25px}h1{font-size:37px}.world-heading>p:last-child{font-size:11px;max-width:200px;margin-top:12px}.eyebrow{font-size:9px}.field-status{left:25px;right:25px;bottom:max(21px,calc(14px + env(safe-area-inset-bottom)));font-size:9px}.version{font-size:8px}.bottom-hud{bottom:max(48px,calc(36px + env(safe-area-inset-bottom)))}.context-hint{font-size:10px;margin-bottom:6px}.enter-world{margin-top:2px}body[data-scale=micro] .world-heading{top:103px}body[data-scale=micro] h1{font-size:26px}}
@media(max-height:560px){.world-heading{top:88px}.world-heading>p:last-child{display:none}h1{font-size:30px}.bottom-hud{bottom:24px;left:auto;right:25px;transform:none;width:300px}.enter-world{display:none}.field-status{bottom:16px}.version{display:none}.context-hint{margin-bottom:0}#help-panel,#profile-panel{top:70px;max-height:calc(100dvh - 80px)}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

@media(max-width:620px) and (max-height:700px){.world-heading{top:96px}.world-heading h1{font-size:31px}.world-heading>p:last-child{display:none}.eyebrow{margin-bottom:10px}}

/* Close-up leaves the centre entirely available to the hand. */
#exit-world{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;font-size:12px;letter-spacing:.03em}
/* Planet overlays retain their own placement. At molecular scale the HUD
   becomes a single grid; its empty areas pass gestures through to the world. */
.world-hud { display: contents; }
body[data-scale=micro] .enter-world { display: none; }

/* Let the close-up belong to the molecules; help stays one tap away. */
body[data-scale=micro] .world-heading,body[data-scale=micro] #field-instruction{display:none}
/* World / Practice switch is nearly invisible, like the camera controls: no
   capsule, no outline, a faint pill under the active tab. The owner liked the
   original for exactly that and asked for it only a touch more visible
   (30.10.2026): opacity .64 -> .78, pill #aabeb410 -> #aabeb41c. A solid
   white pill was a blot. Practice is dark like the world, so one style. */
.view-switch{background:transparent;border-color:transparent;backdrop-filter:none;opacity:.78;transition:opacity .2s}
.view-switch .is-active{background:#aabeb41c}
.view-switch:hover,.view-switch:focus-within{opacity:1}
body[data-view=world] .camera-controls{opacity:.62;transition:opacity .2s}
body[data-view=world] .camera-controls:hover,body[data-view=world] .camera-controls:focus-within,body[data-scale=micro] .camera-controls{opacity:1}
#exit-world{color:var(--muted);background:transparent;border-color:transparent;backdrop-filter:none;opacity:.62;transition:opacity .2s}
#exit-world:focus-visible{opacity:1}
@media (hover:hover) and (pointer:fine){#exit-world:hover{opacity:1}}

body[data-scale=planet] .universe,body[data-scale=space] .universe{cursor:grab}body[data-scale=planet] .universe:active,body[data-scale=space] .universe:active{cursor:grabbing}.universe:focus-visible{outline:1px solid var(--line);outline-offset:-5px}

/* An arrival phrase, then the whole field is free again. */
body[data-scale=micro].micro-arrival .world-heading{display:block;opacity:1}
body[data-scale=micro].micro-arrival #place-label{display:block}
body[data-scale=micro].micro-arrival #place-detail{display:none}
body[data-scale=micro].micro-arrival #place-label,body[data-scale=micro].micro-arrival #world-title{opacity:0;animation:world-arrival 5.5s ease-in-out both}
@keyframes world-arrival{0%{opacity:0;transform:translateY(5px)}20%,48%{opacity:.58;transform:translateY(0)}100%{opacity:0;transform:translateY(-3px)}}
@media(prefers-reduced-motion:reduce){body[data-scale=micro].micro-arrival .world-heading{display:none}}

/* One opaque viewport backdrop for the scene and Safari's edge tint sampling.
   It has no filter/opacity and remains present across world/practice switches. */
.app-shell{position:fixed;inset:0;background-color:var(--surface-color,#0b191f)}

/* Keep both viewports laid out: hiding an iframe with display:none resizes its
   canvases and cards on every visit. The bridge still pauses physics/time/audio.
   Inert removes the outgoing view from input and keyboard focus immediately. */
#world-view,#practice-view{opacity:1;visibility:visible;transition:opacity .18s ease,visibility 0s}
#world-view[hidden],#practice-view[hidden]{opacity:0;visibility:hidden;pointer-events:none;transition:opacity .18s ease,visibility 0s .18s}
#world-view[hidden]{display:block!important}
#practice-view[hidden]{display:flex!important}

/* Desktop composition reserves separate areas for copy, globe and controls. */
@media(min-width:701px){
 body[data-scale=planet] .world-heading{width:clamp(140px,calc(50vw - min(24vw,25vh) - 72px),300px);right:auto}
 body[data-scale=planet] h1{font-size:clamp(28px,3vw,40px);line-height:1.12;letter-spacing:-.025em}
 body[data-scale=planet] .world-heading>p:last-child{margin-top:12px;font-size:11px}
 body[data-scale=planet] .bottom-hud{bottom:24px;left:50%;right:auto;transform:translateX(-50%);width:410px}
 body[data-scale=planet] .context-hint{position:absolute;left:calc(50% - 50vw + 42px);bottom:92px;width:min(230px,calc(50vw - 265px));min-height:0;margin:0;text-align:left;display:block;font-size:10px}
}

/* NASA sky is drawn in WebGL; brightness lives in sky-renderer.js, not here. */
#star-field{position:absolute;inset:0;pointer-events:none;overflow:hidden;mix-blend-mode:screen}
.sky-map{position:absolute;inset:0;width:100%;height:100%}
.sky-fallback{background-size:cover;background-position:center;filter:brightness(.5)}

/* Return note: fades in on the hint line, holds, then fades out (planet.js awayNote). */
#field-instruction.away-note{animation:away-note 7s ease both}
@keyframes away-note{0%{opacity:0}12%{opacity:1}86%{opacity:1}100%{opacity:0}}
/* Dev panel (planet.js): dev-only return test and sky variants, collapsed by default. */
.dev-panel{position:absolute;z-index:6;top:calc(var(--header-height) + 4px);right:max(20px,env(safe-area-inset-right));display:flex;flex-direction:column;align-items:flex-end;gap:6px;max-width:calc(100vw - 40px)}
.dev-toggle,.dev-row button{min-height:30px;padding:0 10px;border:1px solid var(--line);border-radius:15px;font-size:10px;color:var(--ink);background:var(--glass);backdrop-filter:blur(12px)}
.dev-body{display:flex;flex-direction:column;gap:6px;padding:10px 12px;border:1px solid var(--line);border-radius:18px;background:var(--glass);backdrop-filter:blur(12px)}
.dev-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-size:10px;color:var(--muted)}
.dev-row span{min-width:96px}
.dev-row button{background:none}
.dev-row button[aria-pressed=true]{background:#c5d5ce22;border-color:#c5d5ce66}
.dev-row button:disabled{opacity:.3}
body[data-view=practice] .dev-panel{display:none}

/* Profile */
#profile-toggle svg{display:block}
#profile-panel h2{font:27px Georgia,serif;font-weight:400;margin:16px 0 6px;overflow-wrap:anywhere}
.profile-facts{margin:18px 0;display:grid;gap:10px}
.profile-facts div{display:flex;justify-content:space-between;gap:16px;border-bottom:1px solid #465e4c18;padding-bottom:8px;font-size:12px}
.profile-facts dt{color:#78877d}.profile-facts dd{margin:0;color:#374c46;text-align:right}
.profile-action{display:inline-flex;align-items:center;justify-content:center;line-height:20px;text-align:center;background:#425e50;color:#f1f5ec!important;min-height:44px;border-radius:26px;padding:12px 18px;margin:8px 0 4px;text-decoration:none;font-size:12px!important}
#profile-account{display:flex;flex-direction:column;align-items:flex-start;gap:2px}
.profile-link{min-height:40px;padding:0;font-size:12px;color:#62746a;text-decoration:underline;text-underline-offset:3px}
.profile-danger{color:#8a5a4c}
#profile-error{color:#8a5a4c!important}
@media (max-width: 620px) {
  .site-header > .header-actions { gap: 8px; }
  .site-header > .header-actions .round { width: 44px; height: 44px; }
  .site-header > .view-switch button { min-height: 44px; }
}
@media (max-height: 560px) {
  #help-panel, #profile-panel {
    top: calc(var(--header-height) + 6px);
    max-height: calc(100dvh - var(--header-height) - max(8px, env(safe-area-inset-bottom)) - 6px);
  }
}

/* The once-a-day line over practice: quiet, never in the way of a gesture. */
#practice-note{position:absolute;left:50%;top:22%;transform:translate(-50%,8px);width:min(420px,calc(100% - 48px));margin:0;padding:16px 22px;border-radius:20px;background:#f8f7f1e6;color:#4d5c52;font:17px/1.55 Georgia,serif;text-align:center;box-shadow:0 12px 50px #3b4a3f14;pointer-events:none;opacity:0;transition:opacity 1.2s ease,transform 1.2s ease}
#practice-note.is-shown{opacity:1;transform:translate(-50%,0)}
@media(prefers-reduced-motion:reduce){#practice-note{transition:none;transform:translate(-50%,0)}}

/* The session ends with the last scene dissolving into the living world. */
body.practice-return #world-view,body.practice-return #practice-view{transition:opacity 2.2s ease,visibility 0s}
body.practice-return #practice-view[hidden]{transition:opacity 2.2s ease,visibility 0s 2.2s}
@media(prefers-reduced-motion:reduce){body.practice-return #world-view,body.practice-return #practice-view{transition:none}}
