/* ==========================================================================
   IconLi — galactic luxury icon library
   Layout: fluid 24-column grid (.g24 + .s-* / .md-s-* / .lg-s-* / .xl-s-*)
   Pages:  landing + docs use .container (contained); icons page uses .wrap (full width)
   ========================================================================== */

:root {
  --bg: #06061a;
  --bg-2: #0d0d2a;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.08);
  --surface-solid: #11112e;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.18);
  --text: #f0eef9;
  --text-2: #b4b1d0;
  --text-3: #9592b8; /* ≥ 4.5:1 on --bg */
  --icon: #f1eefc;
  --accent: #9a88ff;
  --accent-ink: #b9adff;
  --accent-2: #4be1c8;
  --gold: #f2d6a2;
  --danger: #ff7d97;
  --glow: 0 0 0 1px rgba(154, 136, 255, 0.4), 0 10px 40px -10px rgba(154, 136, 255, 0.55);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  --radius: 18px;
  --gutter: clamp(12px, 1.4vw, 24px);
  --pad: clamp(16px, 3.2vw, 48px);
  --container: 1240px;
  --nav-h: 84px;
  --tb-h: 76px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #f6f4fb;
  --bg-2: #ecebf7;
  --surface: rgba(20, 16, 60, 0.04);
  --surface-2: rgba(20, 16, 60, 0.075);
  --surface-solid: #ffffff;
  --line: rgba(20, 16, 60, 0.11);
  --line-2: rgba(20, 16, 60, 0.2);
  --text: #16142e;
  --text-2: #4c4870;
  --text-3: #625e86; /* ≥ 4.5:1 on --bg */
  --icon: #212226;
  --accent: #5b42f0;
  --accent-ink: #4a32d8;
  --accent-2: #066a5a;
  --gold: #8a5f16;
  --danger: #c3274a;
  --glow: 0 0 0 1px rgba(91, 66, 240, 0.3), 0 10px 40px -12px rgba(91, 66, 240, 0.35);
  --shadow: 0 30px 70px -30px rgba(40, 30, 110, 0.35);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; height: 0; background: transparent; }
/* inner scrollers (code, tables, rows): thin thumb, transparent rail */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text) 26%, transparent) transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; background: transparent; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text) 26%, transparent); border-radius: 6px; }
html { scrollbar-width: none; }
.ov-scroll { scrollbar-width: none; }
.ov-scroll::-webkit-scrollbar { width: 0; height: 0; background: transparent; }
.ov-thumb { position: fixed; z-index: 95; width: 6px; border-radius: 6px; background: color-mix(in srgb, var(--text) 32%, transparent); opacity: 0; transition: opacity 0.4s var(--ease), width 0.2s var(--ease), background 0.2s; touch-action: none; cursor: grab; }
.ov-thumb.show { opacity: 1; }
.ov-thumb:hover, .ov-thumb.drag { width: 9px; background: color-mix(in srgb, var(--text) 55%, transparent); opacity: 1; }
.ov-thumb.drag { cursor: grabbing; }
.ov-thumb.in-drawer { z-index: 65; }
@media (hover: none) { .ov-thumb { pointer-events: none; width: 4px; } }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; transition: background 0.6s var(--ease), color 0.6s var(--ease); }
body.menu-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
p a, li a, td a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
code { font-family: var(--mono); font-size: 0.9em; padding: 0.1em 0.4em; border-radius: 6px; background: var(--surface-2); }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 700; transform: translateY(-150%); transition: transform 0.3s var(--ease); }
.skip:focus { transform: none; }
.ui-ic { display: inline-grid; place-items: center; flex: none; line-height: 0; }

/* ---------- 24-column grid ---------- */
.container { width: 100%; max-width: calc(var(--container) + var(--pad) * 2); margin-inline: auto; padding-inline: var(--pad); }
.wrap { width: 100%; padding-inline: var(--pad); }
.g24 { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: var(--gutter); }
.s-24 { grid-column: span 24; } .s-12 { grid-column: span 12; }
@media (min-width: 768px) {
  .md-s-24 { grid-column: span 24; } .md-s-16 { grid-column: span 16; } .md-s-12 { grid-column: span 12; } .md-s-8 { grid-column: span 8; } .md-s-6 { grid-column: span 6; }
}
@media (min-width: 1100px) {
  .lg-s-24 { grid-column: span 24; } .lg-s-19 { grid-column: span 19; } .lg-s-16 { grid-column: span 16; } .lg-s-14 { grid-column: span 14; } .lg-s-13 { grid-column: span 13; }
  .lg-s-12 { grid-column: span 12; } .lg-s-11 { grid-column: span 11; } .lg-s-10 { grid-column: span 10; } .lg-s-8 { grid-column: span 8; } .lg-s-6 { grid-column: span 6; } .lg-s-5 { grid-column: span 5; }
}
@media (min-width: 1600px) { .xl-s-4 { grid-column: span 4; } .xl-s-20 { grid-column: span 20; } }

/* ---------- Galaxy background ---------- */
#space { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.nebula { position: fixed; inset: -20vmax; z-index: 0; pointer-events: none; filter: blur(60px); opacity: 0.9; }
.nebula i { position: absolute; border-radius: 50%; mix-blend-mode: screen; animation: drift 38s var(--ease) infinite alternate; }
.nebula i:nth-child(1) { width: 60vmax; height: 60vmax; left: 8%; top: 4%; background: radial-gradient(circle, rgba(118, 84, 255, 0.35), transparent 62%); }
.nebula i:nth-child(2) { width: 50vmax; height: 50vmax; right: 2%; top: 20%; background: radial-gradient(circle, rgba(46, 210, 190, 0.18), transparent 60%); animation-duration: 46s; animation-delay: -12s; }
.nebula i:nth-child(3) { width: 46vmax; height: 46vmax; left: 30%; bottom: 0; background: radial-gradient(circle, rgba(242, 190, 120, 0.12), transparent 60%); animation-duration: 54s; animation-delay: -20s; }
:root[data-theme='light'] .nebula { opacity: 0.55; }
:root[data-theme='light'] .nebula i { mix-blend-mode: multiply; }
@keyframes drift { to { transform: translate3d(6vmax, -4vmax, 0) scale(1.12); } }
main, header, footer, .lib-shell { position: relative; z-index: 1; }

/* ---------- Nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 40; padding: 14px var(--pad); }
.nav .nav-inner { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 8px 0 16px; border-radius: 999px; border: 1px solid transparent; transition: background 0.5s var(--ease), border-color 0.5s; }
.nav.contained .nav-inner { max-width: var(--container); margin-inline: auto; }
.nav.scrolled .nav-inner, .nav.solid .nav-inner { background: color-mix(in srgb, var(--bg) 78%, transparent); border-color: var(--line); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; font-size: 18px; }
.brand-mark { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #8f7bff, #4be1c8); box-shadow: 0 6px 24px -6px #8f7bff; color: #fff; }
.brand em { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 21px; color: var(--gold); }
.nav-links { display: flex; gap: 2px; margin-left: 14px; }
.nav-links a { padding: 8px 14px; border-radius: 999px; color: var(--text-2); font-weight: 500; font-size: 14px; transition: color 0.3s, background 0.3s; }
.nav-links a:hover, .nav-links a[aria-current='page'] { color: var(--text); background: var(--surface-2); }
.nav-spacer { flex: 1; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease); flex: none; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--line-2); }
.icon-btn:active { transform: scale(0.94); }
#menuBtn { display: none; }
.menu-panel { position: fixed; z-index: 39; inset: 0; padding: calc(var(--nav-h) + 8px) var(--pad) 24px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); display: flex; flex-direction: column; gap: 6px; }
.menu-panel a { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 16px; font-size: 20px; font-weight: 600; border: 1px solid var(--line); background: var(--surface); }
.menu-panel a[aria-current='page'] { border-color: var(--accent); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 14px; white-space: nowrap; transition: transform 0.4s var(--ease), background 0.3s, box-shadow 0.4s, border-color 0.3s; }
.btn:hover { background: var(--surface-2); transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-primary { border: 0; color: #120d2a; background: linear-gradient(135deg, #fff 0%, #f2d6a2 55%, #e7c288 100%); box-shadow: 0 10px 40px -12px rgba(242, 214, 162, 0.7); }
.btn-primary:hover { background: linear-gradient(135deg, #fff 0%, #f2d6a2 55%, #e7c288 100%); box-shadow: 0 16px 50px -12px rgba(242, 214, 162, 0.9); }
:root[data-theme='light'] .btn-primary, :root[data-theme='light'] .btn-primary:hover { color: #fff; background: linear-gradient(135deg, #2a2160, #5b42f0); box-shadow: 0 10px 34px -12px rgba(91, 66, 240, 0.7); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }

/* ---------- Landing ---------- */
.hero { min-height: 100svh; display: flex; align-items: center; padding-top: 120px; padding-bottom: 60px; overflow-x: clip; }
.hero .g24 { align-items: center; width: 100%; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--text-2); }
.eyebrow b { padding: 3px 10px; border-radius: 999px; background: linear-gradient(135deg, #6a52ff, #0b8f7a); color: #fff; font-weight: 600; font-size: 12px; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(46px, 7vw, 108px); line-height: 0.96; letter-spacing: -0.02em; margin: 26px 0 22px; }
.hero h1 em, .sec-head h2 em { font-style: italic; background: linear-gradient(120deg, var(--gold) 10%, var(--text) 50%, var(--accent) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.06em; }
.lead { font-size: clamp(16px, 1.3vw, 19px); color: var(--text-2); max-width: 560px; margin: 0 0 32px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.stats { display: flex; flex-wrap: wrap; gap: clamp(20px, 3vw, 44px); margin: 48px 0 0; padding: 0; list-style: none; }
.stat b { display: block; font-family: var(--serif); font-size: clamp(32px, 3.4vw, 46px); font-weight: 400; line-height: 1; }
.stat span { font-size: 12px; color: var(--text-3); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }

.orbit { position: relative; aspect-ratio: 1; width: min(100%, 560px); margin-inline: auto; }
.orbit .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line); animation: spin 90s linear infinite; }
.orbit .ring:nth-child(2) { inset: 14%; animation-duration: 70s; animation-direction: reverse; }
.orbit .ring:nth-child(3) { inset: 30%; animation-duration: 55s; }
.orbit .sat { position: absolute; width: 56px; height: 56px; margin: -28px; display: grid; place-items: center; border-radius: 18px; background: color-mix(in srgb, var(--surface-solid) 72%, transparent); border: 1px solid var(--line-2); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow); color: var(--icon); animation: spin 90s linear infinite reverse; }
.orbit .ring:nth-child(2) .sat { animation-duration: 70s; animation-direction: normal; }
.orbit .ring:nth-child(3) .sat { animation-duration: 55s; }
.orbit .core { position: absolute; inset: 40%; border-radius: 32%; display: grid; place-items: center; background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.3), transparent 50%), linear-gradient(135deg, #8f7bff, #3b2bb0 60%, #4be1c8); box-shadow: 0 0 120px 10px rgba(143, 123, 255, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.25); color: #fff; animation: float 8s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-10px); } }

.marquee { padding: 10px 0 30px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 12px; width: max-content; animation: slide 70s linear infinite; padding: 6px 0; }
.marquee-track.rev { animation-direction: reverse; animation-duration: 80s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.mq { width: 64px; height: 64px; flex: none; display: grid; place-items: center; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); color: var(--icon); }
@keyframes slide { to { transform: translateX(-50%); } }

section { scroll-margin-top: 96px; }
.sec { padding-block: clamp(70px, 9vw, 130px); }
.sec-head { margin-bottom: clamp(28px, 4vw, 52px); max-width: 760px; }
.kicker { display: inline-block; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.sec-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4.6vw, 68px); line-height: 1.02; letter-spacing: -0.015em; margin: 14px 0; }
.sec-head p { color: var(--text-2); margin: 0; font-size: 17px; }

.card { border-radius: 26px; border: 1px solid var(--line); background: var(--surface); padding: clamp(22px, 2.6vw, 36px); position: relative; overflow: hidden; }
.card.glow::after { content: ''; position: absolute; width: 60%; aspect-ratio: 1; right: -18%; top: -40%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 28%, transparent), transparent 65%); pointer-events: none; }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.6vw, 36px); margin: 12px 0 10px; line-height: 1.08; }
.card p { color: var(--text-2); margin: 0 0 16px; }
.card .feat-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: var(--icon); background: var(--surface-2); border: 1px solid var(--line); }
.bento .card { min-height: 220px; }
.style-trio { display: flex; gap: 14px; margin-top: 18px; }
.style-trio figure { margin: 0; flex: 1; text-align: center; padding: 16px 8px 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); color: var(--icon); }
.style-trio figcaption { font-size: 12px; color: var(--text-3); margin-top: 6px; font-weight: 600; }

.pg-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.pg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pg-cell { display: grid; place-items: center; gap: 8px; aspect-ratio: 1.1; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); color: var(--icon); padding: 10px; }
.pg-cell small { font-size: 12px; color: var(--text-3); }

.showcase { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.sc { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); transition: transform 0.5s var(--ease), background 0.3s, border-color 0.3s; }
.sc:hover { transform: translateY(-3px); background: var(--surface-2); border-color: var(--line-2); }
.sci { display: flex; gap: 10px; color: var(--icon); }
.sct b { display: block; font-weight: 700; font-size: 15px; }
.sct span { font-size: 13px; color: var(--text-3); }

.codebox { border-radius: 20px; border: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs [role='tab'] { border: 0; background: none; padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; min-height: 36px; }
.tabs [role='tab'][aria-selected='true'] { background: var(--surface-2); color: var(--text); }
.code-pane { position: relative; }
.code-pane pre { margin: 0; padding: 20px 20px 20px; overflow-x: auto; font: 13px/1.7 var(--mono); color: var(--text); white-space: pre; }
.code-pane .btn { position: absolute; top: 10px; right: 10px; }
.code-pane pre { padding-right: 96px; }
.tok-t { color: var(--accent-ink); } .tok-a { color: var(--accent-2); } .tok-s { color: var(--gold); } .tok-c { color: var(--text-3); }
.live { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 18px 20px; border-top: 1px solid var(--line); color: var(--icon); }
.live .muted { margin-right: auto; }

.opts { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 22px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.select { min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-solid); font-size: 13px; font-weight: 600; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.muted { color: var(--text-3); font-size: 13px; }
.progress { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 16px; opacity: 0; transition: opacity 0.3s; }
.progress.on { opacity: 1; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--gold)); transition: width 0.2s; }
.lic-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 12px; }
.lic-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.lic-list li .ui-ic { margin-top: 2px; color: var(--accent-2); }
.lic-list li.no .ui-ic { color: var(--danger); }
.credit-box { display: flex; gap: 10px; align-items: center; padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); font: 13px/1.4 var(--mono); }
.credit-box code { flex: 1; min-width: 0; overflow-wrap: anywhere; background: none; padding: 0; }
.faq { display: grid; gap: 10px; }
.faq details { border-radius: 18px; border: 1px solid var(--line); background: var(--surface); padding: 0 20px; }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; color: var(--text-3); transition: transform 0.4s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--text-2); }

/* Footer */
.site-footer { padding: 56px 0 40px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 14px; }
.site-footer h2 { margin: 0 0 12px; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-2); font-weight: 700; font-family: var(--font); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; transition: color 0.3s; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.site-footer .fine { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; }

/* ---------- Controls (shared) ---------- */
.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); position: relative; }
.seg button { position: relative; z-index: 1; border: 0; background: none; min-height: 38px; padding: 0 14px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--text-2); transition: color 0.3s, background 0.3s; }
.seg button[aria-pressed='true'] { color: var(--text); }
.seg.plain button[aria-pressed='true'] { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg .pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); transition: left 0.45s var(--ease), width 0.45s var(--ease); }
.ctrl { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--text-2); }
.ctrl output { min-width: 30px; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
.swatches { display: flex; gap: 6px; align-items: center; }
.sw { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--line-2); padding: 0; transition: transform 0.3s var(--ease), box-shadow 0.3s; cursor: pointer; }
.sw:hover { transform: scale(1.12); }
.sw[aria-pressed='true'], .sw.on { box-shadow: 0 0 0 2px var(--accent-ink); }
.sw.custom { position: relative; overflow: hidden; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); }
.sw.custom input { position: absolute; inset: -6px; opacity: 0; cursor: pointer; }
.sw.custom:focus-within { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.sw.grad { background: linear-gradient(135deg, #f2d6a2, #8f7bff); }
input[type='range'] { -webkit-appearance: none; appearance: none; width: 96px; height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--accent) var(--p, 50%), var(--line-2) var(--p, 50%)); outline: none; cursor: pointer; }
input[type='range']:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 6px; }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent), 0 2px 8px rgba(0, 0, 0, 0.4); transition: transform 0.2s; }
input[type='range']::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent); }
input[type='range']:active::-webkit-slider-thumb { transform: scale(1.2); }

/* ---------- Icons page (full width) ---------- */
.lib-shell { padding-top: var(--nav-h); }
.lib-head { padding: 24px 0 18px; }
.lib-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4vw, 56px); line-height: 1; margin: 6px 0 8px; }
.lib-head p { margin: 0; color: var(--text-2); }
.lib-body { align-items: start; }
.sidebar { position: sticky; top: calc(var(--nav-h) + 8px); max-height: calc(100vh - var(--nav-h) - 24px); overflow-y: auto; padding: 4px 6px 24px 0; }
.sidebar h2 { margin: 6px 12px 10px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.cat { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 6px 10px; border: 0; border-radius: 12px; background: none; text-align: left; color: var(--text-2); font-size: 14px; font-weight: 500; transition: background 0.3s, color 0.3s; }
.cat:hover { background: var(--surface); color: var(--text); }
.cat[aria-pressed='true'] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.cat .cn { flex: 1; min-width: 0; }
.cat .cnt { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.cat .ci { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--surface); color: var(--icon); flex: none; }
.sidebar .side-foot { margin: 18px 10px 0; padding: 14px; border-radius: 16px; border: 1px dashed var(--line-2); font-size: 12.5px; color: var(--text-3); }
.sidebar .side-foot a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

.toolbar { position: sticky; top: var(--nav-h); z-index: 20; padding: 10px; margin-bottom: 14px; border-radius: 20px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search { position: relative; flex: 1 1 260px; min-width: 0; }
.search > .ui-ic { position: absolute; left: 16px; top: 0; bottom: 0; color: var(--text-3); pointer-events: none; }
.search input { width: 100%; height: 48px; padding: 0 52px 0 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); outline: none; font-size: 15px; transition: border-color 0.3s, box-shadow 0.3s, background 0.3s; }
.search input::placeholder { color: var(--text-3); }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); background: var(--surface-2); }
.kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 12px var(--mono); padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--text-3); }
.tune { display: contents; }
#tuneBtn { display: none; }
.chips { display: none; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; width: 100%; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 600; }
.chip[aria-pressed='true'] { background: var(--text); color: var(--bg); border-color: var(--text); }

.result-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 4px 2px 14px; }
.result-head h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 30px; }
.result-head span { color: var(--text-3); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--cell, 108px), 1fr)); gap: 10px; padding-bottom: 20px; }
.tile { position: relative; aspect-ratio: 1; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--icon); content-visibility: auto; contain-intrinsic-size: 108px 108px; transition: transform 0.5s var(--ease), background 0.35s, border-color 0.35s, box-shadow 0.5s var(--ease); overflow: hidden; }
.tile::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.tile:hover, .tile:focus-within { transform: translateY(-3px); background: var(--surface-2); border-color: var(--line-2); box-shadow: var(--glow); }
.tile:hover::before { opacity: 1; }
.tile-main { position: absolute; inset: 0; width: 100%; border: 0; background: none; color: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 14px 8px 10px; border-radius: inherit; }
.tile-main:focus-visible { outline-offset: -3px; }
.tile .ic { display: grid; place-items: center; flex: 1; width: 100%; min-height: 0; }
.tile .ic svg { display: block; max-width: 100%; max-height: 100%; transition: transform 0.5s var(--ease); }
.tile:hover .ic svg { transform: scale(1.12); }
.tile .nm { font-size: 11.5px; color: var(--text-3); text-align: center; line-height: 1.25; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile:hover .nm, .tile:focus-within .nm { color: var(--text); }
.tile .sig { position: absolute; top: 9px; right: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); pointer-events: none; }
.tile .qc { position: absolute; top: 6px; left: 6px; width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--surface-solid) 85%, transparent); display: grid; place-items: center; opacity: 0; transform: scale(0.85); transition: opacity 0.3s, transform 0.3s var(--ease); color: var(--text); }
.tile:hover .qc, .tile:focus-within .qc { opacity: 1; transform: none; }
@media (hover: none) { .tile .qc { opacity: 1; transform: none; width: 28px; height: 28px; } }
.empty { grid-column: 1 / -1; padding: 80px 20px; text-align: center; color: var(--text-2); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.more-row { display: flex; justify-content: center; padding: 6px 0 40px; }

/* Drawer */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(3, 3, 14, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity 0.5s var(--ease); }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; z-index: 61; top: 12px; right: 12px; bottom: 12px; width: min(460px, calc(100vw - 24px)); border-radius: 26px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--surface-solid) 95%, transparent); backdrop-filter: blur(30px) saturate(1.5); -webkit-backdrop-filter: blur(30px) saturate(1.5); box-shadow: var(--shadow); transform: translateX(calc(100% + 30px)); transition: transform 0.6s var(--ease); display: flex; flex-direction: column; overflow: hidden; }
.drawer.open { transform: none; }
.drawer-scroll { overflow: auto; flex: 1; min-height: 0; padding: 20px; overscroll-behavior: contain; }
.d-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.d-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.1; }
.d-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 16px; }
.tag { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.tag.gold { color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, transparent); }
.stage-sticky { position: sticky; top: -20px; z-index: 3; margin: 0 -20px; padding: 20px 20px 14px; background: linear-gradient(var(--surface-solid) 88%, transparent); }
.stage-sticky + .token-row { margin-top: 0; }
.stage { position: relative; aspect-ratio: 1.65; border-radius: 20px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 65%), repeating-conic-gradient(var(--surface-2) 0 25%, transparent 0 50%) 50% / 20px 20px, var(--surface-solid); transition: background 0.4s; }
.stage.stage-light { background: #f4f2fb; }
.stage.stage-dark { background: #16142e; }
.stage .preview { display: grid; place-items: center; }
.stage .preview svg { max-width: 70%; max-height: 70%; display: block; }
.stage .dims { position: absolute; left: 14px; bottom: 12px; font-size: 12px; color: var(--text-3); }
.stage.stage-light .dims { color: #5a567c; } .stage.stage-dark .dims { color: #b4b1d0; }
.token-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); font: 13px var(--mono); }
.token-row code { flex: 1; background: none; padding: 0; overflow-wrap: anywhere; }
.variants { display: flex; gap: 8px; margin: 14px 0 4px; overflow-x: auto; padding: 3px 3px 6px; }
.variant { flex: none; width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--icon); transition: border-color 0.3s, background 0.3s; }
.variant[aria-pressed='true'] { border-color: var(--accent); background: var(--surface-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.field { margin-top: 18px; }
.field > label, .field > .lbl { display: flex; justify-content: space-between; align-items: center; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); font-weight: 700; margin-bottom: 10px; }
.field > label output { letter-spacing: 0; text-transform: none; font-size: 13px; color: var(--text); }
.field input[type='range'] { width: 100%; }
.colorbox { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px 0 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.colorbox input[type='color'] { width: 28px; height: 28px; border: 0; padding: 0; background: none; border-radius: 50%; overflow: hidden; cursor: pointer; }
.colorbox input[type='color']::-webkit-color-swatch-wrapper { padding: 0; }
.colorbox input[type='color']::-webkit-color-swatch { border: 0; border-radius: 50%; }
.colorbox input[type='text'] { width: 84px; border: 0; background: none; outline: none; font-size: 13px; font-variant-numeric: tabular-nums; text-transform: uppercase; }
.colorbox:focus-within { border-color: var(--accent); }
.switch { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--line-2); border: 0; transition: background 0.3s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.4s var(--ease); }
.switch[aria-checked='true'] { background: var(--accent); }
.switch[aria-checked='true']::after { transform: translateX(18px); }
.actions { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 8px; padding: 14px 20px 20px; border-top: 1px solid var(--line); }
.actions .btn { grid-column: span 12; padding: 0 10px; }
.actions .btn.wide { grid-column: span 24; }
.credit-note { font-size: 12.5px; color: var(--text-3); margin-top: 18px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-2); }
.credit-note b { color: var(--gold); }
.code { margin: 0; max-height: 120px; overflow: auto; font: 12px/1.5 var(--mono); color: var(--text-2); padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; word-break: break-all; }

/* ---------- Docs page ---------- */
.docs { padding-top: calc(var(--nav-h) + 30px); padding-bottom: 60px; }
.docs .toc { position: sticky; top: calc(var(--nav-h) + 20px); align-self: start; }
.docs .toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.docs .toc a { display: block; padding: 7px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--text-2); font-size: 14px; text-decoration: none; }
.docs .toc a:hover { color: var(--text); border-left-color: var(--accent); }
.doc h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5vw, 72px); line-height: 1; margin: 12px 0 16px; }
.doc h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3vw, 40px); margin: 64px 0 12px; line-height: 1.1; }
.doc h3 { font-size: 17px; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--text-2); }
.doc .codebox { margin: 16px 0; }
.note { padding: 14px 16px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); background: color-mix(in srgb, var(--gold) 8%, transparent); color: var(--text-2); font-size: 14px; }
.note b { color: var(--text); }
.table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); margin: 16px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); background: var(--surface); }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }
.finder { display: grid; gap: 12px; }
.finder .search { flex: none; }
.finder-results { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.finder-results button { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 12px var(--mono); text-align: left; }
.finder-results button:hover { background: var(--surface-2); }
.finder-results button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 90; transform: translate(-50%, 30px); opacity: 0; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow); transition: transform 0.5s var(--ease), opacity 0.4s; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* Reveal (see site.js): blocks start slightly low and transparent, then settle when they enter view */
.rv { opacity: 0; transform: translateY(26px) scale(0.985); transition: opacity 0.85s var(--ease), transform 0.95s var(--ease) !important; }
.rv.in { opacity: 1; transform: none; }
#nav.rv { transform: translateY(-14px); }

/* ---------- Responsive ---------- */
@media (max-width: 1099px) {
  .nav-links, .nav .btn-dl { display: none; }
  #menuBtn { display: grid; }
  .sidebar, .docs .toc { display: none; }
  .chips { display: flex; }
  .orbit { width: min(86%, 440px); margin-top: 30px; }
  .bento .card { min-height: 0; }
}
@media (max-width: 767px) {
  :root { --nav-h: 72px; }
  body { font-size: 14.5px; }
  .nav { padding: 10px 12px; }
  .nav .nav-inner { padding: 0 6px 0 12px; height: 52px; }
  .hero { padding-top: 100px; min-height: 0; }
  .orbit .sat { width: 42px; height: 42px; margin: -21px; border-radius: 13px; }
  .orbit .sat svg { width: 20px; height: 20px; }
  .stats { margin-top: 32px; }
  .lib-head { padding: 16px 0 10px; }
  .lib-head p { display: none; }
  .toolbar { padding: 8px; border-radius: 18px; gap: 8px; }
  .search { flex: 1 1 0; }
  #tuneBtn { display: grid; width: 48px; height: 48px; border-radius: 14px; }
  #tuneBtn[aria-expanded='true'] { background: var(--surface-2); border-color: var(--accent); }
  .toolbar .seg { flex: 1 1 100%; }
  .toolbar .seg button { flex: 1; padding: 0 6px; }
  .tune { display: none; width: 100%; gap: 8px; flex-wrap: wrap; }
  .tune.open { display: flex; }
  .tune .ctrl { flex: 1 1 calc(50% - 4px); justify-content: space-between; }
  .tune .ctrl input[type='range'] { flex: 1; min-width: 0; }
  .tune .ctrl.color { flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; }
  .tune .ctrl.color::-webkit-scrollbar { display: none; }
  .kbd { display: none; }
  .search input { padding-right: 14px; }
  .grid { --cell: 92px; gap: 8px; }
  .tile { border-radius: 14px; }
  .tile .nm { font-size: 10.5px; }
  .drawer { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 90svh; border-radius: 24px; transform: translateY(calc(100% + 20px)); }
  .stage { aspect-ratio: 2; }
  .actions { padding: 10px 12px 12px; gap: 6px; }
  .style-trio { gap: 8px; }
  .credit-box { flex-wrap: wrap; }
  .code-pane pre { padding-right: 20px; padding-top: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}

/* ==========================================================================
   Splash (home page): front-view rows of glass icon tiles, then the IconLi reveal
   ========================================================================== */
html.is-loading #nav, html.is-loading main, html.is-loading .site-footer, html.is-loading .marquee { opacity: 0; }
html.is-loading body { overflow: hidden; }
.splash { display: none; }
html.show-intro .splash { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(70% 60% at 50% 45%, #15123a 0%, #0a0920 55%, #05051a 100%);
  transition: opacity 0.8s var(--ease), transform 0.9s var(--ease), filter 0.8s var(--ease); }
:root[data-theme='light'] html.show-intro .splash, html.show-intro[data-theme='light'] .splash { background: radial-gradient(70% 60% at 50% 45%, #ffffff 0%, #f1eefb 55%, #e7e3f6 100%); }
html .splash.gone, html.show-intro .splash.gone { display: none; }
.splash.out { opacity: 0; transform: scale(1.04); filter: blur(6px); pointer-events: none; }
.splash::before { content: ''; position: absolute; inset: -20%; pointer-events: none; background:
  radial-gradient(35% 30% at 25% 30%, rgba(143, 123, 255, 0.28), transparent 70%),
  radial-gradient(30% 28% at 78% 70%, rgba(75, 225, 200, 0.16), transparent 70%),
  radial-gradient(28% 24% at 60% 20%, rgba(242, 214, 162, 0.14), transparent 70%); animation: aurora 18s ease-in-out infinite alternate; }
.splash::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(55% 50% at 50% 50%, transparent 25%, rgba(5, 5, 26, 0.92) 100%); }
:root[data-theme='light'] .splash::after { background: radial-gradient(55% 50% at 50% 50%, transparent 25%, rgba(231, 227, 246, 0.95) 100%); }
@keyframes aurora { to { transform: translate3d(4%, -3%, 0) rotate(6deg); } }

.sp-field { position: absolute; inset: -6% -10%; opacity: var(--field, 1); filter: blur(calc((1 - var(--field, 1)) * 12px)); transition: opacity 0.35s linear, filter 0.35s linear;
  mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); }
.sp-plane { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.sp-row { display: flex; gap: 22px; width: max-content; will-change: transform; }
.sp-row:nth-child(even) { margin-left: -60px; }
.sp-box { position: relative; flex: none; width: 104px; height: 104px; border-radius: 30px; display: grid; place-items: center; color: #f1eefc;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)) padding-box, linear-gradient(160deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.04) 45%, rgba(143, 123, 255, 0.35)) border-box;
  border: 1px solid transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 24px 50px -24px rgba(0, 0, 0, 0.8); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
:root[data-theme='light'] .sp-box { color: #212226; background: linear-gradient(160deg, #ffffff, #f6f4fd) padding-box, linear-gradient(160deg, #ffffff, rgba(143, 123, 255, 0.35)) border-box; box-shadow: inset 0 1px 0 #fff, 0 24px 50px -26px rgba(60, 40, 140, 0.35); }
.sp-box.accent { background: linear-gradient(150deg, #9a88ff, #4a37c9 70%) padding-box, linear-gradient(150deg, #d9d1ff, #4a37c9) border-box; color: #fff; box-shadow: 0 0 60px -10px rgba(143, 123, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.sp-box.gold { background: linear-gradient(150deg, #fff4dc, #e3bb7c 75%) padding-box, linear-gradient(150deg, #fff, #c99a52) border-box; color: #2a1f08; box-shadow: 0 0 60px -14px rgba(242, 214, 162, 0.7), inset 0 1px 0 #fff; }
.sp-box.dim { opacity: 0.55; }

.sp-center { position: relative; z-index: 2; display: grid; justify-items: center; text-align: center; padding: 24px; opacity: var(--center, 0); transform: translateY(calc((1 - var(--center, 0)) * 24px)) scale(calc(0.94 + var(--center, 0) * 0.06)); }
.sp-mark { position: relative; width: 92px; height: 92px; border-radius: 30px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #8f7bff, #4be1c8); box-shadow: 0 18px 60px -12px #8f7bff, 0 0 110px 6px rgba(143, 123, 255, 0.35); }
.sp-mark::before { content: ''; position: absolute; inset: -9px; border-radius: 38px; padding: 1.5px; background: conic-gradient(from var(--spin, 0deg), transparent 0 55%, rgba(242, 214, 162, 0.95) 70%, rgba(255, 255, 255, 0.9) 75%, transparent 85%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: ringSpin 3.2s linear infinite; }
@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes ringSpin { to { --spin: 360deg; } }
.sp-name { margin: 26px 0 6px; font-weight: 700; font-size: clamp(46px, 7vw, 88px); letter-spacing: -0.035em; line-height: 1; display: flex; }
.sp-name .ch { display: inline-block; opacity: calc(var(--center, 0) * 1.2 - var(--i) * 0.06); transform: translateY(calc((1 - var(--center, 0)) * 18px + var(--i) * (1 - var(--center, 0)) * 4px)); }
.sp-name em { font-family: var(--serif); font-style: italic; font-weight: 400; background: linear-gradient(120deg, #f2d6a2, #fff6e2 50%, #e3bb7c); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.06em; }
.sp-motto { margin: 8px 0 30px; font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.4vw, 28px); color: var(--text-2); letter-spacing: 0.01em; }
.sp-bar { position: relative; width: min(280px, 62vw); height: 2px; border-radius: 2px; background: color-mix(in srgb, var(--text) 14%, transparent); overflow: visible; opacity: var(--bar, 0); transition: opacity 0.4s; }
.sp-bar i { position: relative; display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #8f7bff, #4be1c8, #f2d6a2); }
.sp-bar i::after { content: ''; position: absolute; right: -5px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: #fff6e2; box-shadow: 0 0 16px 4px rgba(242, 214, 162, 0.85); }
.sp-pct { margin-top: 14px; font: 600 11px var(--mono); letter-spacing: 0.3em; color: var(--text-3); opacity: var(--bar, 0); }
.sp-hint { position: absolute; z-index: 2; bottom: 34px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: 0.26em; text-transform: uppercase; font-weight: 600; color: var(--text-2); opacity: var(--hint, 0); white-space: nowrap; }
.sp-mouse { width: 22px; height: 34px; border-radius: 12px; border: 1.5px solid currentColor; display: grid; justify-items: center; padding-top: 6px; }
.sp-mouse i { width: 3px; height: 7px; border-radius: 3px; background: currentColor; animation: wheel 1.6s var(--ease) infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(9px); opacity: 0; } 100% { opacity: 0; } }
.sp-skip { position: absolute; z-index: 3; top: 18px; right: 18px; opacity: var(--hint, 0); }

@media (max-width: 767px) {
  .sp-box { width: 78px; height: 78px; border-radius: 24px; }
  .sp-plane, .sp-row { gap: 16px; }
  .sp-hint { bottom: 26px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .sp-field, .splash::before { display: none; animation: none; }
  .sp-mark::before { animation: none; }
}
