/* Content is accessible even when scripts or optional effects fail. */
#preloader { display: none !important; }
.reveal:not(.reveal-pending) { opacity: 1; transform: none; }
img { max-width: 100%; }
img[width][height] { height: auto; }
@media (prefers-reduced-motion: reduce) {
 *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
 .reveal { opacity: 1 !important; transform: none !important; }
 #webgl-canvas, #hero-3d-model, #ae-3d-model { display: none; }
}

.masonry-container { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; translate: none; box-sizing: border-box; }
.masonry-container .image-item { margin: 0; align-self: start; }
.masonry-container .image-item img { display: block; width: 100%; height: auto; }
@media(max-width:900px) { .masonry-container { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:540px) { .masonry-container { grid-template-columns:minmax(0,1fr); padding:12px; } }

/* The primary heading must paint immediately, rather than waiting 1.5 seconds. */
.hero h1 { opacity: 1; animation: none; }

/* Preserve native touch scrolling and avoid GPU-heavy decoration on phones. */
@media (max-width: 900px), (pointer: coarse), (prefers-reduced-motion: reduce) {
 #webgl-canvas, #hero-3d-model, #ae-3d-model { display: none !important; }
 .stars-layer, .stars-extra { animation: none !important; }
 .hero1-parallax-wrapper { transform: none !important; }
}
.light-effects #webgl-canvas, .light-effects #hero-3d-model, .light-effects #ae-3d-model { display:none !important; }

/* A playing video is unobstructed until tapped; keyboard focus stays usable. */
.video-item.is-playing:not(.show-controls) .play-btn:not(:focus-visible) {
 opacity:0; visibility:visible; pointer-events:none;
}
.video-item.is-playing .play-btn:focus-visible {
 opacity:1; visibility:visible; pointer-events:auto;
 outline:2px solid white; outline-offset:4px;
}
.hover-image { position:fixed; width:min(330px,calc(100vw - 16px)); height:auto; aspect-ratio:1; }



/* Gentle artwork feedback; independent hover transforms preserve scroll reveals. */
.artwork-motion {
 position:relative;
 outline:1px solid transparent;
 outline-offset:2px;
 transition:translate .35s cubic-bezier(.22,1,.36,1), scale .35s cubic-bezier(.22,1,.36,1), outline-color .3s ease;
}
.reveal.reveal-pending { opacity:1; transform:none; }
.artwork-motion::before { display:none; }
/* Preserve the original design colours and edges, including thumbnail text. */
main .thumbnail:hover img { transform:none; filter:none; }
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
 .artwork-motion:not(.reveal-pending):hover,
 .artwork-motion:focus-within {
  outline-color:rgba(100,220,142,.65);
  translate:0 -4px;
  scale:1.012;
 }
 .artwork-motion.artwork-compare:hover,
 .artwork-motion.artwork-compare:focus-within { translate:none; scale:1; }
}
@media (prefers-reduced-motion:reduce) {
 .artwork-motion, .reveal.reveal-pending { opacity:1; transform:none; translate:none; scale:1; }
}
@media print {
 .artwork-motion, .reveal.reveal-pending { opacity:1!important; transform:none!important; translate:none!important; scale:1!important; outline:none!important; }
}

/* Mixed image ratios stack without leaving empty grid rows. */
.masonry-container { display:block; columns:3; column-gap:15px; }
.masonry-container > .image-item { display:inline-block; vertical-align:top; width:100%; margin:0 0 15px; break-inside:avoid; box-sizing:border-box; }
@media(max-width:900px) { .masonry-container { columns:2; } }
@media(max-width:540px) { .masonry-container { columns:1; } }

/* Keep navigation readable over artwork while scrolling. */
body > header {
 background:linear-gradient(110deg,#0b261d,#102f24 60%,#0a2119);
 min-height:74px;
 padding:18px 28px;
 box-sizing:border-box;
 border-bottom:1px solid rgba(177,220,196,.16);
 box-shadow:0 6px 22px rgba(0,0,0,.18);
 -webkit-backdrop-filter:none;
 backdrop-filter:none;
}
body > header #anim-logo-h { margin:0 0 0 24px; }
body > header nav ul li a { color:#cde0d5; }
body > header nav ul li a:hover,
body > header nav ul li a[aria-current="page"] { color:#fff; }
@media(max-width:768px) {
 body > header { min-height:68px; }
 body > header #anim-logo-h { margin:0 0 0 16px; }
 body > header nav > ul { background:#102b21; border-bottom:1px solid rgba(177,220,196,.16); }
}

/* Comparison cards have neutral controls and hover feedback without an outline. */
.image-showcase .artwork-compare,
.image-showcase .artwork-compare:hover,
.image-showcase .artwork-compare:focus-within { outline:none; border:0; translate:none; scale:1; align-self:flex-start; }
.image-showcase .compare { border:0; transition:filter .25s ease; }
.image-showcase .compare__separator { background:rgba(255,255,255,.85); }
.image-showcase .compare__icon { background-color:#171717; border:1px solid rgba(255,255,255,.7); }
.image-showcase .compare:has(.compare__input:focus-visible) { outline:2px solid #fff; outline-offset:-2px; }
@media(hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
 .artwork-compare:hover .compare { filter:brightness(1.035); }
}

/* Explicit graphics layout: each column follows its own image heights. */
.masonry-container.graphics-gallery { display:block; columns:3; column-gap:15px; }
.masonry-container.graphics-gallery > .image-item { display:inline-block; width:100%; margin:0 0 15px; vertical-align:top; break-inside:avoid; }
@media(max-width:900px) { .masonry-container.graphics-gallery { columns:2; } }
@media(max-width:540px) { .masonry-container.graphics-gallery { columns:1; } }

/* A full-size clipped layer avoids resizing a large image on every input. */
.image-showcase .compare__mask { width:100%; clip-path:inset(0 calc(100% - var(--mask-width)) 0 0); border:0; transition:none; }
.image-showcase .compare__image-two { width:100%; height:100%; max-width:none; }
.image-showcase .compare__separator { transition:none; }
.compare__input { touch-action:pan-y; }
.compare__icon { left:50%; }
@media(prefers-reduced-motion:no-preference) {
 .compare:not(.is-dragging) .compare__mask { transition:clip-path .12s ease-out; }
 .compare:not(.is-dragging) .compare__separator { transition:left .12s ease-out; }
}

/* Black navigation with a moving neon wash and a crisp luminous edge. */
body > header {
 background:#050906;
 animation:none;
 isolation:isolate;
 border-bottom:1px solid rgba(30,194,77,.12);
 box-shadow:0 8px 24px rgba(0,0,0,.25);
}
/* Render the opaque colour field directly, without a quantized blur layer.
   Equal tile edges preserve the continuous forward-only motion. */
body > header::before, footer.site-footer::before {
 content:""; display:block; position:absolute; inset:0; width:auto; height:auto; transform:none; z-index:-1; pointer-events:none;
 background:linear-gradient(90deg,#030604 0%,#050b07 18%,#08180d 36%,#0a2210 48%,#081a0d 60%,#050c07 80%,#030604 100%);
 background-size:200% 100%; background-repeat:repeat-x;
 filter:none;
 animation:header-neon-flow 9s linear infinite;
}
@supports (background:linear-gradient(90deg in srgb-linear,#000,#fff)) {
 body > header::before, footer.site-footer::before {
  background-image:linear-gradient(90deg in srgb-linear,#030604 0%,#050b07 18%,#08180d 36%,#0a2210 48%,#081a0d 60%,#050c07 80%,#030604 100%);
 }
}
body > header::after {
 content:""; position:absolute; bottom:-1px; left:0; right:0; height:1.5px; pointer-events:none;
 background:linear-gradient(90deg,transparent 8%,rgba(30,194,77,.2) 32%,rgba(30,194,77,.5) 42%,rgba(30,194,77,.28) 52%,transparent 76%);
 background-size:200% 100%; background-repeat:repeat-x;
 animation:header-neon-flow 9s linear infinite;
}
@keyframes header-neon-flow { from{background-position:200% 50%} to{background-position:0% 50%} }
body > header #anim-logo-h { filter:none; }
body > header nav ul li a, body > header .nav-toggle { color:#e7f0e7; }
body > header nav ul li a:hover, body > header nav ul li a[aria-current="page"] { color:#1ec24d; }
body > header nav ul li a::after { background:#99ff4c; }
body > main { padding-top:clamp(30px,4vw,58px); }
.portfolio-intro { max-width:1240px; margin:0 auto; padding:16px 24px 38px; text-align:center; }
.portfolio-intro .intro-eyebrow { margin:0 0 22px; color:#b1d4bd; font-size:11px; font-weight:600; line-height:1.5; letter-spacing:.22em; }
.portfolio-intro .page-title__title { width:100%; max-width:1180px; margin:0 auto 24px; font-size:clamp(32px,5.8vw,76px); line-height:1.08; text-wrap:balance; letter-spacing:-.025em; }
.portfolio-intro .page-title__divider { width:100%; max-width:650px; margin:0 auto; color:#a8b4ad; font-size:16px; line-height:1.7; text-wrap:pretty; }
.portfolio-intro .page-title__divider strong { display:block; margin-bottom:7px; color:#f0f5f1; font-size:clamp(18px,2vw,23px); line-height:1.4; font-weight:500; }
.portfolio-intro .page-title__divider span { display:block; }
.portfolio-intro::after { content:""; display:block; width:52px; height:2px; margin:28px auto 0; background:linear-gradient(90deg,#c4ff61,#2de889); }
.portfolio-intro + .sonic-feature { margin-top:16px; }
@media(max-width:768px) {
 body > header nav > ul { background:linear-gradient(145deg,#060a07,#0a170e); border-bottom:1px solid rgba(30,194,77,.2); }
 .portfolio-intro { padding:12px 20px 26px; }
 .portfolio-intro .intro-eyebrow { margin-bottom:16px; font-size:9px; letter-spacing:.18em; }
 .portfolio-intro .page-title__title { margin-bottom:20px; }
 .portfolio-intro .page-title__divider { font-size:14px; line-height:1.65; }
 .portfolio-intro::after { margin-top:24px; }
}
@media(prefers-reduced-motion:reduce) { body > header::before, body > header::after { animation:none; } }

/* Fit the available page width, including browsers with a visible scrollbar. */
html, body { min-width:0; }

/* Old cached reveal classes must never leave content hidden. */
.reveal.visible.scroll-reveal-ready { opacity:1; transform:none; }

/* Navigation feedback is colour-only; keyboard focus stays clearly visible. */
body > header nav ul li a::after { display:none; }
body > header nav ul li a,
body > header nav ul li a[aria-current="page"] { color:#fff; text-decoration:none; }
body > header nav ul li a:hover,
body > header nav ul li a:focus-visible { color:#1ec24d; }

/* A shared closing invitation, with the same black/neon palette as the work. */
footer.site-footer {
 padding:0 32px; margin-top:48px; text-align:left; z-index:1;
 position:relative; isolation:isolate; background:#050906;
 border-top:1px solid rgba(30,194,77,.22); backdrop-filter:none;
}
.footer-inner { width:100%; max-width:1200px; margin:0 auto; }
.footer-invite { display:grid; grid-template-columns:1.6fr 1fr; align-items:center; gap:48px; padding:40px 0 34px; border-bottom:1px solid #243027; }
.footer-kicker { display:flex; align-items:center; gap:9px; margin:0 0 16px; color:#a4b4a8; font-size:10px; font-weight:600; letter-spacing:.2em; line-height:1.5; }
.footer-kicker span { width:6px; height:6px; border-radius:50%; background:#1ec24d; box-shadow:0 0 12px #1ec24d40; }
.footer-invite h2 { margin:0; color:#f3f6f2; font-family:var(--font-heading); font-size:clamp(28px,3.7vw,48px); line-height:1.2; letter-spacing:-.035em; }
.footer-invite h2 em { color:#1ec24d; font-style:normal; }
.footer-action { justify-self:end; }
.footer-action p { margin:0 0 16px; color:#aab9ae; font-size:16px; line-height:1.65; }
.site-footer a { text-decoration:none; transition:color .25s ease,background-color .25s ease,transform .25s ease; }
.site-footer a:focus-visible { outline:2px solid #1ec24d; outline-offset:5px; }
.site-footer .footer-project-link { display:inline-flex; align-items:center; gap:16px; min-height:52px; padding:0 17px; width:fit-content; border-radius:5px; background:#1ec24d; color:#10170c; font-size:15px; font-weight:700; }
.footer-project-link span { font-family:Arial,sans-serif; font-size:25px; }
.site-footer .footer-project-link:hover { background:#43d46c; transform:translateY(-2px); }
.footer-details { display:grid; grid-template-columns:2fr 1fr 1fr; gap:48px; padding:24px 0; }
.footer-identity img { display:block; width:150px; height:auto; margin-bottom:16px; }
.footer-identity p { margin:0 0 8px; color:#d0dbd3; font-size:14px; line-height:1.6; }
.footer-identity > span { color:#8f9f93; font-size:13px; }
.footer-links { display:flex; flex-direction:column; align-items:flex-start; gap:0; }
.footer-links p { margin:0 0 12px; color:#1ec24d; font-size:12px; font-weight:700; letter-spacing:.12em; }
.footer-links a { display:flex; align-items:center; gap:12px; min-height:36px; color:#e4ece5; font-size:14px; }
.footer-links a:hover, .footer-base a:hover { color:#1ec24d; }
.footer-links a span { color:#9eaf9e; }
.footer-base { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px 24px; border-top:1px solid #243027; padding:14px 0; }
.footer-base p { margin:0; color:#8f9f93; font-size:11px; line-height:1.6; }
.footer-base a { color:#b9c8bc; }
.footer-top { display:inline-flex; align-items:center; min-height:32px; gap:14px; font-size:12px; }
.footer-top span { font-size:18px; }
@media(max-width:768px) {
 footer.site-footer { padding:0 24px; margin-top:32px; }
 .footer-invite { grid-template-columns:1fr; gap:22px; padding:30px 0 24px; }
 .footer-invite h2 { font-size:clamp(27px,6vw,42px); }
 .footer-action { justify-self:start; }
 .footer-action p { font-size:14px; margin-bottom:16px; }
 .footer-kicker { margin-bottom:14px; font-size:9px; }
 .footer-details { grid-template-columns:1fr 1fr; gap:22px 20px; padding:22px 0; }
 .footer-identity { grid-column:1/-1; }
 .footer-links a { min-height:44px; }
 .footer-base { align-items:flex-start; flex-direction:column; gap:6px; padding:12px 0; }
}

.footer-identity .footer-profession {
 display:flex; flex-wrap:wrap; gap:3px 9px; width:fit-content; max-width:100%;
 margin:0 0 12px; padding:7px 0 7px 12px; border-left:2px solid #1ec24d;
 color:#eff8f1; font-size:17px; font-weight:600; line-height:1.5;
}
.footer-profession span:last-child { color:#1ec24d; }
@media(max-width:768px) { .footer-identity .footer-profession { font-size:16px; } }

@media(prefers-reduced-motion:reduce) { footer.site-footer::before { animation:none; } }



/* Vector arrows stay monochrome on iOS instead of becoming emoji. */
.ui-arrow { display:inline-block; width:18px; height:18px; flex-shrink:0; vertical-align:middle; }
.footer-project-link .ui-arrow { width:20px; height:20px; }
.footer-links .ui-arrow { width:15px; height:15px; color:#9eaf9e; }
.footer-top .ui-arrow { width:17px; height:17px; }

/* Two image columns on phones; comparison sliders retain their own layout. */
@media(max-width:600px) {
 .image-showcase .mobile-pair-gallery {
  display:block; columns:2; column-gap:10px; width:100%; padding:0;
 }
 .image-showcase .mobile-pair-gallery > .image-item {
  display:inline-block; width:100%; max-width:100%!important;
  margin:0 0 10px!important; vertical-align:top; break-inside:avoid;
  box-sizing:border-box;
 }
 .image-showcase .mobile-pair-gallery > .image-item img { width:100%; height:auto; display:block; }
 .image-showcase .mobile-pair-gallery .image-overlay { font-size:13px; padding:8px; }
 .portfolio-container.mobile-pair-gallery {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px;
  width:100%; padding:12px; box-sizing:border-box;
 }
 .portfolio-container.mobile-pair-gallery .thumbnail { width:100%; min-width:0; margin:0; }
 .portfolio-container.mobile-pair-gallery .caption { font-size:11px; line-height:1.4; padding:8px 4px; }
 #clothing-showcase > .clothing-showcase { display:contents; }
 #clothing-showcase { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 #clothing-showcase .image-item { width:100%; max-width:100%!important; margin:0!important; align-self:start; }
 #clothing-showcase .image-item img { width:100%; height:auto; display:block; }
}

/* Remove the image baseline gap without changing the logo's horizontal position. */
body > header .header__logo, body > header .header__logo > a { display:flex; align-items:center; flex-shrink:0; line-height:0; }
body > header #anim-logo-h { display:block; }

@media(max-width:600px) {
 .image-showcase .mobile-masonry, .image-showcase .masonry-container.mobile-masonry {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); columns:auto; gap:10px;
  align-items:start;
 }
 .mobile-masonry > .gallery-column { display:flex; flex-direction:column; gap:10px; min-width:0; }
 .mobile-masonry > .gallery-column > .image-item {
  display:block; flex:none; width:100%; max-width:100%; margin:0; box-sizing:border-box;
 }
}
/* Mobile galaxy uses a small 2D canvas, not the desktop 3D engine. */
html.mobile-galaxy #webgl-canvas { display:block!important; }
@media(prefers-reduced-motion:reduce) { html.mobile-galaxy #webgl-canvas { display:none!important; } }

/* Still portrait: an asymmetric crop frame, with no motion or decorative border. */
.about-layout .about-portrait {
 position:relative; top:auto; width:100%; max-width:440px; margin:0 auto;
 border:0; outline:0; background:none; box-shadow:none; animation:none; transition:none;
 transform:none; translate:none; scale:none;
}
.about-portrait picture { display:block; width:100%; }
.about-portrait picture img {
 display:block; width:100%; max-height:none; height:auto; margin:0;
 border-radius:48px 12px 48px 12px; border:0; outline:0;
 animation:none; transition:none; transform:none;
}
.about-layout .about-right { position:relative; min-width:0; }
.about-right .about-name { margin-top:0; }
@media(max-width:768px) {
 .about-layout { gap:32px; }
 .about-layout .about-portrait { position:static; }
 .about-portrait picture img { border-radius:32px 8px 32px 8px; }
}
body > header nav ul li a[aria-current="page"] { font-weight:400; }


.hover-image { border-radius:16px; overflow:hidden; box-shadow:0 12px 40px #0009; }
.hover-image img { animation:none; object-fit:cover; }
.hover-text:focus-visible,.role-badge:focus-visible { outline:2px solid #1ec24d; outline-offset:5px; }
.role-badge { cursor:pointer; }
.role-badge,.role-badge:hover { transform:none; }
.role-badge.is-active { background:rgba(30,194,77,.15); color:#1ec24d; border-color:#1ec24d; box-shadow:0 0 24px rgba(30,194,77,.28); }
.role-badge.is-active svg { color:#1ec24d; opacity:1; filter:drop-shadow(0 0 5px #1ec24d88); transform:none; }
@media(hover:hover) and (pointer:fine) {
 .role-badge:hover { background:rgba(30,194,77,.15); color:#1ec24d; border-color:#1ec24d; box-shadow:0 0 24px rgba(30,194,77,.28); }
 .role-badge:hover svg { color:#1ec24d; opacity:1; filter:drop-shadow(0 0 5px #1ec24d88); transform:none; }
}


@media(hover:none), (pointer:coarse) {
 .role-badge:not(.is-active):hover { color:#fff; background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.15); box-shadow:none; }
 .role-badge:not(.is-active):hover svg { color:inherit; opacity:.7; transform:none; filter:none; }
 .role-badge:not(.is-active):hover::before { opacity:0; }
}

/* Category cards retain movement without a coloured frame. */
main .thumbnail, main .thumbnail.artwork-motion:hover, main .thumbnail.artwork-motion:focus-within { border:0; outline:none; }
main .thumbnail a:focus-visible { outline:2px solid #fff; outline-offset:-3px; }

/* Small, staged invitation; the resting heading is always readable. */
.footer-invite .footer-word { display:inline-block; }
.footer-invite .footer-word:nth-of-type(2) { --word-delay:100ms; }
.footer-invite .footer-word:nth-of-type(3) { --word-delay:200ms; }
.footer-invite h2 em { display:inline-block; transform:rotate(-5deg); transform-origin:50% 65%; }
.site-footer .footer-project-link { position:relative; isolation:isolate; overflow:hidden; }
.site-footer .footer-project-link::before {
 content:""; position:absolute; inset:0; pointer-events:none; z-index:-1;
 background:linear-gradient(105deg,transparent 30%,rgba(255,255,255,.28) 50%,transparent 70%);
 transform:translateX(-140%);
}
.site-footer .footer-project-link:active { transform:scale(.97); }
@media(prefers-reduced-motion:no-preference) {
 .site-footer.footer-revealed .footer-word { animation:footer-word-arrive .8s cubic-bezier(.22,1,.36,1) var(--word-delay,0ms) both; }
 .site-footer.footer-in-view h2 em { animation:footer-bold-float 4.8s ease-in-out infinite; }
 .site-footer.footer-in-view .footer-project-link::before { animation:footer-button-shine 5.5s ease-in-out infinite; }
 .site-footer.footer-in-view .footer-project-link .ui-arrow { animation:footer-arrow-nudge 5.5s ease-in-out infinite; }
}
@keyframes footer-word-arrive { from{opacity:0;transform:translateY(18px)} to{opacity:1;transform:translateY(0)} }
@keyframes footer-bold-float { 0%,100%{transform:rotate(-5deg) translateY(0)} 50%{transform:rotate(-3deg) translateY(-3px)} }
@keyframes footer-button-shine { 0%,64%{transform:translateX(-140%)} 90%,100%{transform:translateX(140%)} }
@keyframes footer-arrow-nudge { 0%,65%,100%{transform:translate(0,0)} 78%{transform:translate(3px,-3px)} }

/* Stable columns avoid fragmented image layers in Safari during scroll reveals. */
.image-showcase .masonry-container.stable-masonry {
 display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); columns:auto;
 gap:15px; align-items:start;
}
.stable-masonry > .gallery-column { display:flex; flex-direction:column; gap:15px; min-width:0; }
.stable-masonry > .gallery-column > .image-item { display:block; flex:none; width:100%; max-width:100%; margin:0!important; box-sizing:border-box; }
.stable-masonry img { display:block; width:100%; height:auto; }
@media(max-width:900px) {
 .image-showcase .masonry-container.stable-masonry { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
 .image-showcase .masonry-container.stable-masonry { gap:10px; }
 .image-showcase .masonry-container.graphics-gallery { columns:1; }
 .image-showcase .masonry-container.graphics-gallery.stable-masonry { grid-template-columns:minmax(0,1fr); }
 .stable-masonry > .gallery-column { gap:10px; }
}

/* Crossfade the cached image so white and red lettering both ease into brand green. */
main .thumbnail a { position:relative; display:block; line-height:0; }
main .thumbnail a > img { display:block; }
main .thumbnail a > img.category-hover-colour,
main .thumbnail:hover a > img.category-hover-colour {
 position:absolute; inset:0; width:100%; height:100%; pointer-events:none;
 filter:url("#category-green-tint"); opacity:0;
 transition:opacity .42s cubic-bezier(.22,.61,.36,1); transform:none;
}
@media (hover:hover) and (pointer:fine) {
 main .thumbnail a:hover > img.category-hover-colour { opacity:1; }
}
@media (prefers-reduced-motion:reduce) {
 main .thumbnail a > img.category-hover-colour { transition:none; }
}
/* One lightweight cosmic scene replaces the old layered star renderers. */
html.cosmic-galaxy #webgl-canvas { display:block!important; }
html.cosmic-galaxy .stars-layer { display:none; }

/* Explicit canvas dimensions preserve spherical planets during mobile pinch zoom. */
html.cosmic-galaxy #webgl-canvas { max-width:none!important; max-height:none!important; }

/* Small opt-in for browsers that require motion access; it never covers artwork. */
.cosmic-tilt-toggle { display:block; width:max-content; max-width:100%; min-height:44px; margin:18px auto; padding:8px 14px; border:1px solid #34513f; border-radius:24px; background:#07100bbf; color:#bed0c4; font:500 11px/1.3 system-ui,sans-serif; letter-spacing:.04em; cursor:pointer; touch-action:manipulation; }
.cosmic-entry > .cosmic-tilt-toggle { position:absolute; bottom:max(18px,env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); margin:0; }
.cosmic-tilt-toggle[aria-pressed="true"] { color:#1ec24d; }
.cosmic-tilt-toggle:focus-visible { outline:2px solid #1ec24d; outline-offset:4px; }
.cosmic-tilt-toggle[hidden] { display:none!important; }

/* Native modal keeps the motion choice accessible and separate from the entry button. */
.cosmic-tilt-prompt { position:fixed; inset:0; margin:auto; height:max-content; width:min(340px,calc(100vw - 40px)); max-height:calc(100dvh - 48px); overflow:auto; box-sizing:border-box; padding:26px 22px 22px; border:1px solid #284b34; border-radius:18px; background:#08120d; color:#edf5ef; font-family:system-ui,sans-serif; }
.cosmic-tilt-prompt::backdrop { background:rgba(0,5,2,.72); }
.cosmic-tilt-prompt .tilt-prompt-label { color:#9bb2a2; font-size:9px; letter-spacing:.16em; }
.cosmic-tilt-prompt h2 { margin:18px 0 12px; font:700 clamp(23px,6vw,28px)/1.18 system-ui,sans-serif; letter-spacing:-.035em; }
.cosmic-tilt-prompt h2 span { color:#19bd4a; }
.cosmic-tilt-prompt p { margin:0 0 22px; color:#afbeb4; font-size:13px; line-height:1.6; }
.tilt-prompt-actions { display:flex; gap:10px; }
.tilt-prompt-actions button { flex:1; min-height:44px; padding:10px 12px; border:1px solid #34483b; border-radius:9px; background:transparent; color:#d1ded6; font:600 12px/1.3 system-ui,sans-serif; cursor:pointer; touch-action:manipulation; }
.tilt-prompt-actions [data-tilt-accept] { background:#19bd4a; border-color:#19bd4a; color:#031207; }
.tilt-prompt-actions button:focus-visible { outline:2px solid #eaf5ec; outline-offset:3px; }
