:root{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;color:#f7eafc;background:#110c20}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 40% 0,#38234e,#110c20 65%)}header{display:flex;justify-content:space-between;align-items:center;padding:14px 24px;border-bottom:3px solid #a37dc2;gap:12px;flex-wrap:wrap}header strong{font-size:18px;color:#ffd97e}header small{display:block;color:#bcb0cf;font-size:10px;margin-top:6px;letter-spacing:1px}nav{display:flex;gap:8px;flex-wrap:wrap}button{cursor:pointer;background:#332345;border:2px solid #8c6fa6;color:#fff1fb;font:700 12px ui-monospace,monospace;padding:10px;border-radius:4px}button:hover,button:focus-visible{background:#674a86;outline:2px solid #ffdf8a}main{max-width:1450px;margin:20px auto;padding:0 15px;display:grid;grid-template-columns:minmax(0,960px) minmax(220px,1fr);gap:18px}.gamewrap{min-width:0}.hud,.below{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;padding:11px;background:#23152e;border:2px solid #755c8b;font-weight:bold;font-size:12px}.hud span:nth-child(2){color:#ff8f9e}.hud span:nth-child(3){color:#ffe08a}canvas{width:100%;height:auto;display:block;image-rendering:pixelated;background:#17162e;border:3px solid #a37dc2;touch-action:none}.below{font-size:11px;color:#c6b6d6}aside{background:#241830;border:2px solid #6f547f;padding:18px;line-height:1.65;align-self:start}aside h2{font-size:18px;color:#ffd88c}aside h3{font-size:13px;color:#ddc3ff}aside p{font-size:13px}aside a{display:block;margin:10px 0;color:#9ce7ff;overflow-wrap:anywhere}aside button{margin-top:10px;width:100%}#missionStatus{border:1px dashed #82679b;padding:10px;font-size:12px}.overlay{position:fixed;inset:0;background:#080711d9;display:flex;align-items:center;justify-content:center;padding:20px;z-index:10}.hidden{display:none}.modal{position:relative;background:#241833;border:4px solid #b691d1;box-shadow:10px 10px 0 #080610;padding:25px;max-width:680px;width:100%;max-height:85vh;overflow:auto;line-height:1.65}.modal h2{color:#ffdb8d;margin-top:0}.modal h3{color:#c9a9fa}.modal p,.modal li{font-size:14px}.modal button{margin:5px}.close{position:absolute;right:8px;top:8px}.choice{display:block;width:100%;text-align:left;margin:9px 0!important}.touch{display:none;justify-content:space-between;margin-top:12px;gap:10px}.touch button{min-width:58px;min-height:48px;touch-action:none}.pad{display:flex;flex-direction:column;gap:4px;align-items:center}.pad>div{display:flex;gap:4px}footer{text-align:center;color:#9e91ad;font-size:11px;padding:25px}@media(max-width:1050px){main{grid-template-columns:1fr}aside{order:2}.touch{display:flex}}@media(max-width:500px){header{padding:12px}header strong{font-size:14px}.hud{font-size:10px}.below{font-size:9px}.touch button{min-width:50px}}

/* Celestial identity: tightly scoped, never enlarge inline symbols */
.celestial-brand-icon{width:25px!important;height:25px!important;max-width:25px!important;max-height:25px!important;object-fit:contain;vertical-align:middle;display:inline-block;flex:none;transform-origin:center;animation:none;filter:none}
header strong:hover .celestial-brand-icon,header strong:focus-within .celestial-brand-icon{animation:celestialFunkyFlash 920ms ease-in-out 1}
@keyframes celestialFunkyFlash{0%,100%{transform:rotate(0) scale(1);filter:none}20%{transform:perspective(120px) rotateY(-12deg) scale(1.09);filter:brightness(1.9) drop-shadow(0 0 5px #fff)}48%{transform:perspective(120px) rotateY(12deg) scale(1.15);filter:brightness(2.4) drop-shadow(0 0 10px #d7a7ff)}75%{transform:rotate(-4deg) scale(1.05);filter:brightness(1.5) drop-shadow(0 0 6px #ae73e8)}}
.celestial-inline-icon{display:inline-block!important;width:14px!important;height:14px!important;max-width:14px!important;max-height:14px!important;object-fit:contain;vertical-align:-2px;flex:none}
@media(prefers-reduced-motion:reduce){header strong:hover .celestial-brand-icon{animation:none}}

/* Audio control polish only */
#islandMusicMode{white-space:nowrap}#islandVolume{max-width:78px}#islandMusicMode:disabled,#islandVolume:disabled{opacity:.55;cursor:not-allowed}@media(max-width:600px){#islandMusicMode{font-size:11px}#islandVolume{width:55px!important}}

/* Exact Celestial Archive PNG branding, constrained in every context. */
img[src$="/Favicon.png"],img[src="assets/Favicon.png"]{width:14px!important;height:14px!important;max-width:14px!important;max-height:14px!important;object-fit:contain!important;vertical-align:middle!important;flex:none!important}
img.celestial-brand-icon{width:25px!important;height:25px!important;max-width:25px!important;max-height:25px!important}
#islandMusicMode{white-space:nowrap}#islandVolume{max-width:90px}


/* Exact Celestial Archive header-logo hover parity; supersedes previous Funky flash only. */
/* Celestial Archive exact logo-only hover: one 920ms tilt, no continuous spinning. */
.celestial-brand-icon{display:inline-block;width:25px;height:25px;object-fit:contain;vertical-align:middle;transform-origin:50% 50%;backface-visibility:hidden;filter:drop-shadow(0 0 5px rgba(158,130,156,.35));transition:transform 260ms cubic-bezier(.2,.75,.25,1),filter 260ms ease;}
header>div:first-child:hover .celestial-brand-icon,header>div:first-child:focus-within .celestial-brand-icon{filter:brightness(1.08) saturate(1.12) drop-shadow(0 0 2px rgba(255,255,255,.98)) drop-shadow(0 0 5px rgba(247,225,255,.95)) drop-shadow(0 0 10px rgba(205,160,218,.9)) drop-shadow(0 0 16px rgba(155,113,190,.62));animation:archiveCardExactGemTilt 920ms cubic-bezier(.22,.7,.25,1) both;}
@keyframes archiveCardExactGemTilt{
0%{transform:perspective(520px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) translateY(0) scale(1)}
18%{transform:perspective(520px) rotateX(5deg) rotateY(-8deg) rotateZ(-1.1deg) translateY(-1px) scale(1.035)}
36%{transform:perspective(520px) rotateX(-3deg) rotateY(6deg) rotateZ(1deg) translateY(0) scale(1.04)}
53%{transform:perspective(520px) rotateX(2deg) rotateY(-4deg) rotateZ(-.65deg) translateY(-.5px) scale(1.04)}
70%{transform:perspective(520px) rotateX(-1deg) rotateY(2.5deg) rotateZ(.35deg) translateY(0) scale(1.035)}
86%{transform:perspective(520px) rotateX(.5deg) rotateY(-1deg) rotateZ(-.15deg) translateY(0) scale(1.03)}
100%{transform:perspective(520px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) translateY(0) scale(1.03)}
}
@media(prefers-reduced-motion:reduce){header>div:first-child:hover .celestial-brand-icon,header>div:first-child:focus-within .celestial-brand-icon{animation:none;transform:none;}}
