:root {
  color-scheme: dark;
  --ink: #f7f4ff;
  --muted: #aaa4bc;
  --dim: #756f88;
  --bg: #080610;
  --bg-soft: #0d0a19;
  --panel: rgba(20, 15, 35, .82);
  --panel-solid: #141020;
  --line: rgba(255, 255, 255, .09);
  --line-bright: rgba(188, 119, 255, .35);
  --violet: #a85cff;
  --violet-2: #e452ff;
  --cyan: #5ee7ff;
  --blue: #5579ff;
  --emerald: #4df0a5;
  --gold: #ffd166;
  --danger: #ff637d;
  --shadow: 0 24px 80px rgba(0, 0, 0, .42);
  --radius: 22px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Arial Black", Impact, var(--font);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100%; overflow-x: hidden; color: var(--ink); background:
  radial-gradient(circle at 78% -10%, rgba(115, 67, 229, .18), transparent 36%),
  radial-gradient(circle at -10% 38%, rgba(34, 154, 219, .08), transparent 34%),
  linear-gradient(180deg, #090713 0%, #080610 56%, #0b0814 100%); font-family: var(--font); line-height: 1.5; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
code, kbd { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
::selection { color: #fff; background: rgba(168, 92, 255, .65); }

.ambient { position: fixed; z-index: -3; width: 38rem; height: 38rem; border-radius: 50%; filter: blur(120px); opacity: .12; pointer-events: none; }
.ambient-one { top: 22rem; right: -25rem; background: var(--violet-2); }
.ambient-two { top: 70rem; left: -30rem; background: var(--cyan); }
.noise { position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: .11; background-image: repeating-linear-gradient(115deg, transparent 0 79px, rgba(255,255,255,.015) 80px), repeating-linear-gradient(25deg, transparent 0 109px, rgba(166,92,255,.012) 110px); }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 1000; padding: 10px 14px; border-radius: 10px; color: #080610; background: #fff; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; border: 0!important; }

.topbar { position: sticky; top: 0; z-index: 100; height: 78px; padding: 0 max(20px, env(safe-area-inset-left)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); background: rgba(8, 6, 16, .72); backdrop-filter: blur(22px) saturate(145%); }
.brand { justify-self: start; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 0 14px rgba(235, 56, 255, .34)); }
.brand-word { font-family: var(--display); font-size: 17px; letter-spacing: .9px; }
.brand-word span { color: var(--violet-2); }
.brand-beta { padding: 2px 5px; border: 1px solid rgba(94, 231, 255, .22); border-radius: 5px; color: var(--cyan); font-size: 8px; font-weight: 900; letter-spacing: 1px; }
.desktop-nav { display: flex; align-items: center; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.025); }
.nav-link { position: relative; padding: 9px 14px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 700; cursor: pointer; transition: .2s ease; }
.nav-link:hover { color: var(--ink); background: rgba(255,255,255,.045); }
.nav-link.is-active { color: #fff; background: linear-gradient(135deg, rgba(168,92,255,.22), rgba(94,231,255,.08)); box-shadow: inset 0 0 0 1px rgba(186, 115, 255, .2); }
.nav-link.is-active::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 16px; height: 2px; border-radius: 2px; background: var(--violet-2); transform: translateX(-50%); box-shadow: 0 0 12px var(--violet-2); }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: rgba(255,255,255,.035); cursor: pointer; transition: .2s ease; }
.icon-button:hover { color: #fff; border-color: var(--line-bright); background: rgba(168,92,255,.1); }
.profile-orb { position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(190, 103, 255, .45); border-radius: 50%; color: #fff; background: radial-gradient(circle at 35% 30%, #d950ff, #6942df 45%, #171128 70%); box-shadow: 0 0 22px rgba(169, 72, 255, .2), inset 0 0 12px rgba(255,255,255,.18); cursor: pointer; }
.profile-orb::after { content: ""; position: absolute; inset: -4px; border: 1px dashed rgba(94,231,255,.24); border-radius: 50%; }
.orb-level { font-size: 12px; font-weight: 900; }

.view { display: none; min-height: calc(100vh - 78px); padding-bottom: 90px; animation: viewIn .36s ease both; }
.view.is-active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hero { min-height: 660px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr); align-items: center; gap: 44px; padding-block: 68px 48px; }
.hero-copy { position: relative; z-index: 2; }
.eyebrow, .kicker { color: #c5b8d8; font-size: 11px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; }
.pulse-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.pulse-dot::after { content: ""; position: absolute; inset: -5px; border: 1px solid rgba(94,231,255,.4); border-radius: 50%; animation: pulse 2s ease infinite; }
@keyframes pulse { 50% { transform: scale(1.35); opacity: 0; } }
h1, h2, h3, p { margin-top: 0; }
.hero h1, .page-hero h1 { margin-bottom: 22px; font-family: var(--display); font-size: clamp(52px, 6.7vw, 92px); line-height: .96; letter-spacing: -3.8px; text-transform: uppercase; text-wrap: balance; }
.hero h1 span, .page-hero h1 span { color: transparent; background: linear-gradient(90deg, var(--violet-2), #9c65ff 55%, var(--cyan)); background-clip: text; -webkit-background-clip: text; filter: drop-shadow(0 0 22px rgba(187, 72, 255, .12)); }
.hero-lede, .page-hero p { max-width: 650px; margin-bottom: 30px; color: var(--muted); font-size: 17px; line-height: 1.78; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 11px 18px; border: 1px solid transparent; border-radius: 13px; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button-primary { color: white; border-color: rgba(218, 109, 255, .45); background: linear-gradient(135deg, #a337e6, #6652ef 56%, #3485df); box-shadow: 0 12px 32px rgba(113, 59, 214, .26), inset 0 1px rgba(255,255,255,.22); }
.button-primary:hover { box-shadow: 0 16px 42px rgba(136, 67, 240, .34), inset 0 1px rgba(255,255,255,.25); }
.button-ghost { border-color: var(--line); color: var(--ink); background: rgba(255,255,255,.035); }
.button-ghost:hover { border-color: var(--line-bright); background: rgba(168,92,255,.08); }
.button-icon { color: var(--cyan); }
.hero-proof { display: flex; align-items: center; gap: 14px; margin-top: 34px; color: var(--dim); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; }
.hero-proof b { color: #fff; }
.hero-proof i { width: 3px; height: 3px; border-radius: 50%; background: var(--dim); }

.hero-art { position: relative; min-height: 520px; display: grid; place-items: center; isolation: isolate; }
.hero-art::before { content: ""; position: absolute; width: 86%; height: 86%; border-radius: 50%; background: radial-gradient(circle, rgba(155,68,255,.18) 0, rgba(84,96,255,.07) 38%, transparent 70%); filter: blur(8px); }
.hero-art img { position: relative; z-index: 3; width: min(94%, 500px); filter: drop-shadow(0 28px 55px rgba(0,0,0,.58)) drop-shadow(0 0 24px rgba(225,52,255,.18)); animation: dragonFloat 6s ease-in-out infinite; }
@keyframes dragonFloat { 50% { transform: translateY(-10px) rotate(1deg); } }
.dragon-halo { position: absolute; border-radius: 50%; border: 1px solid rgba(184, 87, 255, .13); }
.halo-a { width: 84%; height: 84%; animation: spin 30s linear infinite; }
.halo-a::before, .halo-a::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 16px var(--cyan); }
.halo-a::before { top: 10%; left: 18%; }.halo-a::after { bottom: 8%; right: 22%; background: var(--violet-2); box-shadow: 0 0 16px var(--violet-2); }
.halo-b { width: 102%; height: 102%; border-style: dashed; border-color: rgba(94,231,255,.08); animation: spin 50s linear reverse infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dragon-runes { position: absolute; top: 4%; right: 0; color: rgba(174,157,206,.32); font-family: monospace; font-size: 9px; letter-spacing: 2px; transform: rotate(90deg) translateX(60%); transform-origin: right top; }
.floating-cube { position: absolute; right: 3%; bottom: 17%; z-index: 5; width: 54px; height: 54px; transform: rotate(-8deg); filter: drop-shadow(0 12px 16px rgba(0,0,0,.4)); }
.cube-face { position: absolute; border: 2px solid #090712; background-size: 18px 18px; }
.cube-front { inset: 14px 10px 0 0; background: repeating-linear-gradient(90deg, transparent 0 16px, #090712 16px 18px), repeating-linear-gradient(0deg, transparent 0 16px, #090712 16px 18px), #8549ee; transform: skewY(-8deg); }
.cube-top { left: 7px; right: 2px; top: 1px; height: 15px; background: #5ee7ff; transform: skewX(-42deg); }
.cube-right { top: 9px; right: -2px; width: 12px; bottom: 4px; background: #e850ff; transform: skewY(-48deg); }
.ember { position: absolute; z-index: 5; width: 4px; height: 4px; border-radius: 50%; background: var(--violet-2); box-shadow: 0 0 12px var(--violet-2); animation: ember 4s ease-in-out infinite; }
.ember-1 { left: 10%; bottom: 24%; }.ember-2 { right: 16%; top: 25%; animation-delay: -1.2s; }.ember-3 { left: 24%; top: 16%; animation-delay: -2.4s; }
@keyframes ember { 50% { transform: translateY(-18px) scale(.5); opacity: .25; } }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(26,20,43,.88), rgba(14,11,25,.9)); box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.025); }
.dashboard-grid { display: grid; grid-template-columns: 1.45fr .75fr; gap: 18px; margin-top: -12px; }
.quest-panel { padding: 28px 30px; background: radial-gradient(circle at 92% 16%, rgba(168,92,255,.16), transparent 30%), linear-gradient(145deg, rgba(25,19,43,.9), rgba(14,11,25,.92)); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel h2, .section-heading h2, .notation-banner h2, .history-heading h2 { margin-bottom: 8px; font-family: var(--display); font-size: clamp(22px, 3vw, 34px); line-height: 1.08; letter-spacing: -1px; text-transform: uppercase; }
.quest-panel p { max-width: 620px; color: var(--muted); }
.quest-flame { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(234,80,255,.28); border-radius: 15px; color: var(--violet-2); background: rgba(191,64,255,.09); box-shadow: 0 0 20px rgba(196,71,255,.1); }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.075); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet-2), var(--cyan)); box-shadow: 0 0 14px rgba(123,171,255,.4); transition: width .4s ease; }
.quest-progress-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; margin: 22px 0 15px; }
.quest-progress-row strong { color: var(--cyan); font-size: 12px; }
.text-button { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; color: #d5baff; background: none; font-weight: 800; text-decoration: none; cursor: pointer; }
.text-button:hover { color: #fff; }
.text-button span { color: var(--cyan); }
.streak-panel { display: flex; align-items: center; gap: 20px; padding: 28px; }
.streak-icon { display: grid; place-items: center; flex: 0 0 auto; width: 70px; height: 70px; border: 1px solid rgba(255,209,102,.18); border-radius: 22px; color: var(--gold); background: radial-gradient(circle, rgba(255,164,50,.17), transparent 72%); font-size: 32px; text-shadow: 0 0 18px rgba(255,170,56,.55); }
.streak-panel strong { display: block; margin: 2px 0; font-family: var(--display); font-size: 30px; }
.streak-panel small { display: block; color: var(--dim); }

.section-block { padding-top: 95px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 26px; }
.section-heading h2 { margin-bottom: 0; font-size: clamp(34px, 4vw, 52px); }
.section-heading p { max-width: 390px; margin-bottom: 4px; color: var(--muted); }
.path-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.path-card { position: relative; min-height: 440px; display: flex; flex-direction: column; padding: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(160deg, rgba(24,19,38,.9), rgba(12,10,20,.96)); transition: transform .25s ease, border-color .25s ease; }
.path-card::after { content: ""; position: absolute; top: -100px; right: -100px; width: 240px; height: 240px; border-radius: 50%; background: var(--path-glow, rgba(168,92,255,.12)); filter: blur(40px); pointer-events: none; }
.path-card:hover { transform: translateY(-5px); border-color: rgba(192,111,255,.28); }
.path-card.is-featured { border-color: rgba(178,96,255,.42); box-shadow: 0 26px 80px rgba(97,43,181,.2), inset 0 1px rgba(255,255,255,.03); }
.path-hatchling { --path-glow: rgba(94,231,255,.11); }.path-drake { --path-glow: rgba(218,64,255,.17); }.path-elder { --path-glow: rgba(255,209,102,.1); }
.recommended { position: absolute; top: 0; left: 0; right: 0; padding: 7px; color: white; background: linear-gradient(90deg, #7632d5, #5d52e9, #297fb2); font-size: 9px; font-weight: 900; letter-spacing: 1.5px; text-align: center; }
.is-featured .path-top { margin-top: 13px; }
.path-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.path-glyph { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid var(--line-bright); border-radius: 16px; color: var(--cyan); background: rgba(104,66,167,.11); font-size: 24px; }
.path-count { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.025); font-size: 10px; font-weight: 800; }
.path-card h3 { position: relative; z-index: 1; margin: 7px 0 10px; font-family: var(--display); font-size: 30px; line-height: 1.05; text-transform: uppercase; }
.path-card p { position: relative; z-index: 1; color: var(--muted); font-size: 14px; }
.path-card ul { position: relative; z-index: 1; display: grid; gap: 8px; margin: 5px 0 25px; padding: 0; color: #d1cbdc; font-size: 13px; list-style: none; }
.path-card li::before { content: "◆"; margin-right: 8px; color: var(--cyan); font-size: 7px; vertical-align: 2px; }
.path-card .button { position: relative; z-index: 1; width: 100%; margin-top: auto; }
.path-button { border-color: var(--line); background: rgba(255,255,255,.03); }

.notation-banner { margin-top: 90px; padding: 34px 38px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 50px; align-items: center; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(120deg, rgba(24,18,39,.9), rgba(17,14,28,.82)), repeating-linear-gradient(90deg, transparent 0 39px, rgba(255,255,255,.02) 40px); }
.notation-banner h2 { margin: 5px 0 8px; }
.notation-banner p { margin: 0; color: var(--muted); }
.notation-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.notation-chips span { display: grid; gap: 4px; padding: 13px 8px; border: 1px solid var(--line); border-radius: 13px; color: var(--dim); background: rgba(0,0,0,.18); font-size: 10px; text-align: center; }
.notation-chips b { color: #fff; font: 800 19px/1 monospace; }
.ad-shell { padding-top: 46px; }
.ad-slot { min-height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 15px; border: 1px dashed rgba(255,255,255,.09); border-radius: 17px; color: var(--dim); background: rgba(255,255,255,.015); text-align: center; }
.ad-slot span { color: #615b6f; font-size: 8px; font-weight: 900; letter-spacing: 2px; }
.ad-slot p { margin: 4px 0 0; font-size: 11px; }
.ad-slot:has(ins) p, .ad-slot:has(ins) > span { display: none; }

.page-hero { display: grid; grid-template-columns: 1.35fr .65fr; gap: 60px; align-items: end; padding-block: 76px 38px; }
.page-hero h1 { margin: 12px 0 20px; font-size: clamp(48px, 6vw, 76px); }
.page-hero p { margin-bottom: 0; }
.compact-hero { padding-top: 70px; }
.vault-progress { align-self: center; padding: 26px; }
.vault-progress strong { display: block; margin: 6px 0 14px; font-family: var(--display); font-size: 42px; }
.vault-progress small { display: block; margin-top: 10px; color: var(--dim); }
.filter-bar { position: sticky; top: 90px; z-index: 25; display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: rgba(13,10,23,.86); backdrop-filter: blur(20px); box-shadow: 0 12px 35px rgba(0,0,0,.2); }
.search-wrap { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 180px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.2); }
.search-wrap span { color: var(--cyan); font-size: 20px; }
.search-wrap input { width: 100%; padding: 10px 0; border: 0; outline: 0; color: #fff; background: transparent; }
.search-wrap input::placeholder { color: #676174; }
.collection-tabs { display: flex; gap: 5px; }
.filter-chip { padding: 9px 11px; border: 1px solid transparent; border-radius: 10px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; }
.filter-chip span { color: var(--dim); font-size: 9px; }
.filter-chip.is-active { color: #fff; border-color: rgba(180,91,255,.28); background: rgba(145,68,223,.14); }
.select-wrap select, .trainer-select select { padding: 10px 34px 10px 12px; border: 1px solid var(--line); border-radius: 11px; outline: 0; color: #ddd7e8; background: #151020; cursor: pointer; }
.mastery-legend { display: flex; align-items: center; justify-content: flex-end; gap: 7px; padding-block: 20px 14px; color: var(--dim); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; }
.mastery-legend span { margin-right: 8px; color: var(--muted); }
.mastery-legend i { width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; }
.dot-new { background: #5c5768; }.dot-seen { background: var(--violet-2); box-shadow: 0 0 8px var(--violet-2); }.dot-training { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }.dot-mastered { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }

.algorithm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.algorithm-card { --state: #5c5768; position: relative; display: grid; grid-template-rows: auto auto 1fr auto; min-height: 430px; overflow: hidden; border: 1px solid var(--line); border-radius: 21px; background: linear-gradient(160deg, rgba(23,18,37,.94), rgba(12,10,20,.97)); transition: border-color .2s ease, transform .2s ease; }
.algorithm-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--state) 48%, transparent); }
.algorithm-card[data-status="seen"] { --state: var(--violet-2); }.algorithm-card[data-status="training"] { --state: var(--cyan); }.algorithm-card[data-status="mastered"] { --state: var(--emerald); }
.algorithm-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--state); box-shadow: 0 0 14px var(--state); opacity: .85; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 0; }
.card-header h2 { margin: 4px 0 0; font-family: var(--display); font-size: 24px; text-transform: uppercase; }
.difficulty-badge { padding: 5px 7px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: rgba(255,255,255,.025); font-size: 8px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; }
.case-zone { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; padding: 14px 20px 12px; }
.case-cycle { width: 100%; padding: 12px 8px 8px; border: 1px solid rgba(255,255,255,.04); border-radius: 16px; background: radial-gradient(circle, color-mix(in srgb, var(--state) 10%, transparent), transparent 68%); cursor: pointer; }
.case-cycle:hover { border-color: color-mix(in srgb, var(--state) 30%, transparent); }
.case-cycle .status-label { display: block; margin-top: 7px; color: var(--state); font-size: 9px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; }
.recognition { color: var(--muted); font-size: 12px; line-height: 1.55; }
.recognition b { display: block; margin-bottom: 3px; color: #eee8fa; }

.cube-case { --s: 12px; position: relative; width: calc(var(--s) * 5); height: calc(var(--s) * 5); margin: auto; }
.face-grid { position: absolute; top: var(--s); left: var(--s); display: grid; grid-template-columns: repeat(3, var(--s)); grid-template-rows: repeat(3, var(--s)); gap: 2px; padding: 2px; border: 1px solid #393244; border-radius: 4px; background: #08070c; transform: rotate(-4deg); box-shadow: 0 10px 18px rgba(0,0,0,.38); }
.sticker { border-radius: 2px; background: #2b2732; box-shadow: inset 0 1px rgba(255,255,255,.06); }
.sticker.y { background: #ffd83d; box-shadow: inset 0 1px #fff7a2, 0 0 7px rgba(255,216,61,.18); }.sticker.r { background: #ef4e63; }.sticker.g { background: #3ad58c; }.sticker.b { background: #4389ff; }.sticker.o { background: #ff9238; }.sticker.w { background: #eee9f2; }
.rail { position: absolute; display: flex; gap: 2px; }
.rail span { display: block; width: var(--s); height: 4px; border-radius: 1px; background: #2b2732; }
.rail-top { top: 6px; left: calc(var(--s) + 3px); transform: rotate(-4deg); }.rail-bottom { bottom: 5px; left: calc(var(--s) - 1px); transform: rotate(-4deg); }
.rail-left, .rail-right { flex-direction: column; }
.rail-left span, .rail-right span { width: 4px; height: var(--s); }
.rail-left { left: 5px; top: calc(var(--s) + 1px); transform: rotate(-4deg); }.rail-right { right: 5px; top: calc(var(--s) - 2px); transform: rotate(-4deg); }
.rail span.y { background: #ffd83d; }.rail span.r { background: #ef4e63; }.rail span.g { background: #3ad58c; }.rail span.b { background: #4389ff; }.rail span.o { background: #ff9238; }.rail span.w { background: #eee9f2; }
.algorithm-box { margin: 0 20px 16px; padding: 14px; border: 1px solid rgba(255,255,255,.055); border-radius: 13px; background: rgba(0,0,0,.2); }
.algorithm-box span { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; color: var(--dim); font-size: 9px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.algorithm-box .custom-mark { color: var(--cyan); }
.algorithm-box code { display: block; color: #f4ecff; font-size: 14px; font-weight: 700; line-height: 1.55; overflow-wrap: anywhere; }
.card-actions { display: grid; grid-template-columns: 1fr auto; border-top: 1px solid var(--line); }
.card-actions button { padding: 13px 16px; border: 0; color: var(--muted); background: transparent; font-size: 11px; font-weight: 800; cursor: pointer; }
.card-actions button:hover { color: #fff; background: rgba(255,255,255,.025); }
.card-actions button + button { border-left: 1px solid var(--line); }
.empty-algorithms { grid-column: 1 / -1; padding: 70px 20px; border: 1px dashed var(--line); border-radius: 20px; color: var(--muted); text-align: center; }

.trainer-heading { align-items: center; }
.trainer-select { display: grid; gap: 7px; color: var(--dim); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.trainer-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; }
.trainer-stage { min-height: 610px; padding: 28px; text-align: center; background: radial-gradient(circle at 50% 36%, rgba(145,70,229,.12), transparent 35%), linear-gradient(145deg, rgba(24,18,41,.94), rgba(12,10,21,.97)); }
.trainer-meta { display: flex; justify-content: space-between; color: var(--dim); font-size: 9px; font-weight: 900; letter-spacing: 1.4px; }
.streak-mini b { color: var(--gold); }
.trainer-case { min-height: 255px; display: grid; place-items: center; }
.trainer-case .cube-case { --s: 30px; transform: scale(1.1); }
.trainer-answer h2 { margin: 7px 0 14px; font-family: var(--display); font-size: 36px; text-transform: uppercase; }
.trainer-answer code { display: inline-block; min-height: 46px; padding: 11px 16px; border: 1px solid rgba(94,231,255,.16); border-radius: 12px; color: var(--cyan); background: rgba(0,0,0,.2); font-size: 17px; font-weight: 800; }
.trainer-answer code.is-hidden { color: #4b4655; letter-spacing: 4px; filter: blur(1px); user-select: none; }
.trainer-answer p { max-width: 540px; margin: 14px auto 20px; color: var(--muted); }
.reveal-button { min-width: 210px; }
.recall-buttons { grid-template-columns: repeat(3, 1fr); gap: 9px; max-width: 520px; margin: 0 auto; }
.recall-buttons:not([hidden]) { display: grid; }
.recall-buttons button { display: grid; gap: 4px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: rgba(255,255,255,.025); font-size: 11px; font-weight: 800; cursor: pointer; }
.recall-buttons button:hover { color: #fff; border-color: var(--line-bright); }
.recall-buttons span { color: var(--cyan); font-size: 18px; }
.trainer-sidebar { display: grid; align-content: start; gap: 16px; }
.trainer-sidebar .panel { padding: 24px; }
.trainer-sidebar h3 { margin: 8px 0; font-family: var(--display); font-size: 24px; text-transform: uppercase; }
.trainer-sidebar p { margin: 0; color: var(--muted); font-size: 13px; }
.trainer-stats { display: grid; gap: 14px; }
.trainer-stats div { display: flex; align-items: end; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.trainer-stats div:last-child { padding-bottom: 0; border: 0; }
.trainer-stats span { color: var(--dim); font-size: 11px; }.trainer-stats strong { font-family: var(--display); font-size: 25px; }

.timer-shell { padding-top: 60px; }
.timer-topline { display: flex; align-items: end; justify-content: space-between; margin-bottom: 22px; }
.timer-topline h1 { margin: 4px 0 0; font-family: var(--display); font-size: 52px; line-height: 1; text-transform: uppercase; }
.inspection-toggle { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.inspection-toggle input { position: absolute; opacity: 0; }
.inspection-toggle span { position: relative; width: 36px; height: 20px; border: 1px solid var(--line); border-radius: 20px; background: #201a2a; }
.inspection-toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--dim); transition: .2s ease; }
.inspection-toggle input:checked + span { border-color: rgba(94,231,255,.28); background: rgba(94,231,255,.1); }.inspection-toggle input:checked + span::after { left: 19px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.timer-arena { padding: 26px 34px 30px; text-align: center; background: radial-gradient(circle at 50% 55%, rgba(106,62,216,.13), transparent 42%), linear-gradient(145deg, rgba(23,18,39,.92), rgba(12,10,20,.96)); }
.scramble-row { display: flex; align-items: center; justify-content: center; gap: 9px; }
.scramble-row .kicker { margin-right: 4px; }
.scramble-row .icon-button { width: 28px; height: 28px; border-radius: 8px; font-size: 11px; }
.scramble { display: block; max-width: 890px; margin: 15px auto 26px; color: #d9d2e5; font-size: clamp(13px, 2vw, 18px); font-weight: 700; line-height: 1.65; }
.timer-display { width: 100%; padding: 18px 10px; border: 0; outline: 0; color: #fff; background: transparent; font-family: var(--display); font-size: clamp(76px, 13vw, 148px); line-height: 1; letter-spacing: -7px; text-shadow: 0 0 50px rgba(156,96,255,.12); cursor: pointer; transition: color .12s ease, transform .12s ease; }
.timer-display.is-holding { color: var(--danger); }.timer-display.is-ready { color: var(--emerald); transform: scale(1.015); }.timer-display.is-running { color: var(--cyan); }
.timer-instruction { margin-bottom: 25px; color: var(--dim); font-size: 11px; }
.timer-instruction kbd { margin-right: 6px; padding: 4px 7px; border: 1px solid var(--line); border-bottom-color: rgba(255,255,255,.18); border-radius: 6px; color: var(--muted); background: rgba(255,255,255,.035); font-size: 9px; }
.timer-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.timer-stats div { padding: 20px 12px 0; border-right: 1px solid var(--line); }.timer-stats div:last-child { border: 0; }
.timer-stats span { display: block; margin-bottom: 3px; color: var(--dim); font-size: 9px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; }
.timer-stats strong { font-family: var(--display); font-size: 23px; }
.history-heading { display: flex; align-items: end; justify-content: space-between; margin: 42px 0 14px; }
.history-heading h2 { margin: 4px 0 0; }
.danger-text { color: var(--danger); }
.time-history { overflow: hidden; }
.empty-state { padding: 40px; color: var(--dim); text-align: center; }.empty-state span { font-size: 30px; }.empty-state p { margin: 7px 0 0; }
.time-row { display: grid; grid-template-columns: 55px 110px 1fr auto; gap: 18px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.time-row:last-child { border: 0; }
.time-row .solve-index { color: var(--dim); font-size: 11px; }.time-row strong { font-family: var(--display); font-size: 20px; }.time-row code { overflow: hidden; color: #777083; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }.time-row button { border: 0; color: var(--dim); background: none; cursor: pointer; }.time-row button:hover { color: var(--danger); }

.level-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 18px; padding: 22px; }
.level-card > .kicker { grid-column: 1 / -1; }
.level-number { display: grid; place-items: center; width: 68px; height: 68px; border: 1px solid rgba(229,80,255,.3); border-radius: 50%; color: white; background: radial-gradient(circle at 40% 34%, #b540e9, #5447cc 58%, #161022); font-family: var(--display); font-size: 29px; box-shadow: 0 0 25px rgba(169,62,229,.16); }
.level-card strong, .level-card small { display: block; }.level-card strong { margin-bottom: 2px; font-family: var(--display); font-size: 21px; text-transform: uppercase; }.level-card small { margin-bottom: 10px; color: var(--dim); }
.progress-overview { display: grid; grid-template-columns: 1.5fr repeat(3, .65fr); gap: 15px; }
.mastery-ring-card { display: flex; align-items: center; gap: 22px; padding: 24px; }
.mastery-ring { --p: 0%; flex: 0 0 auto; width: 122px; height: 122px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--violet-2) var(--p), rgba(255,255,255,.065) 0); box-shadow: 0 0 30px rgba(160,63,236,.12); }
.mastery-ring::before { content: ""; grid-area: 1/1; width: 94px; height: 94px; border-radius: 50%; background: #100c1a; }
.mastery-ring div { position: relative; grid-area: 1/1; text-align: center; }.mastery-ring strong, .mastery-ring span { display: block; }.mastery-ring strong { font-family: var(--display); font-size: 26px; }.mastery-ring span { color: var(--dim); font-size: 9px; text-transform: uppercase; }
.mastery-ring-card h2 { margin: 7px 0; font-size: 25px; }.mastery-ring-card p { margin: 0; color: var(--muted); font-size: 12px; }
.stat-tile { display: flex; flex-direction: column; justify-content: center; min-height: 170px; padding: 20px; }
.stat-icon { display: grid; place-items: center; width: 35px; height: 35px; margin-bottom: 18px; border-radius: 10px; background: rgba(255,255,255,.04); }.stat-icon.violet { color: var(--violet-2); }.stat-icon.cyan { color: var(--cyan); }.stat-icon.gold { color: var(--gold); }
.stat-tile > span:not(.stat-icon) { color: var(--dim); font-size: 10px; text-transform: uppercase; }.stat-tile strong { margin-top: 4px; font-family: var(--display); font-size: 29px; }.stat-tile small { color: var(--dim); font-size: 12px; }
.progress-columns { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; margin-top: 16px; }
.collection-progress, .next-actions { padding: 27px; }
.collection-row { display: grid; grid-template-columns: 140px 1fr 54px; gap: 14px; align-items: center; margin-top: 22px; }
.collection-row b { font-size: 12px; }.collection-row small { color: var(--dim); font-size: 10px; text-align: right; }
.next-actions > button { width: 100%; display: grid; grid-template-columns: 38px 1fr auto; gap: 13px; align-items: center; padding: 16px 0; border: 0; border-bottom: 1px solid var(--line); color: inherit; background: none; text-align: left; cursor: pointer; }.next-actions > button:last-child { border: 0; }.next-actions > button:hover b { color: var(--cyan); }
.action-icon { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; color: var(--violet-2); font-size: 10px; font-weight: 900; }.next-actions b, .next-actions small { display: block; }.next-actions b { font-size: 12px; }.next-actions small { margin-top: 2px; color: var(--dim); font-size: 10px; }.next-actions i { color: var(--cyan); font-style: normal; }
.data-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 22px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; }.data-controls p { margin: 0; color: var(--dim); font-size: 11px; }.danger-button { color: #ff9bab; border-color: rgba(255,99,125,.18); }

.mobile-nav { display: none; }
.modal { width: min(520px, calc(100% - 28px)); padding: 0; border: 1px solid rgba(183,99,255,.28); border-radius: 23px; color: var(--ink); background: #14101f; box-shadow: 0 30px 100px rgba(0,0,0,.7); }
.modal::backdrop { background: rgba(4,3,8,.78); backdrop-filter: blur(8px); }
.modal form { position: relative; padding: 30px; }
.modal h2 { margin: 8px 0; font-family: var(--display); font-size: 30px; text-transform: uppercase; }.modal p { color: var(--muted); font-size: 13px; }.modal label:not(.setting-row) { display: block; margin: 20px 0 7px; color: var(--muted); font-size: 11px; font-weight: 800; }.modal input:not([type="checkbox"]) { width: 100%; padding: 13px 14px; border: 1px solid var(--line-bright); border-radius: 12px; outline: 0; color: #fff; background: #0b0813; font-family: monospace; }.modal input:not([type="checkbox"]):focus { box-shadow: 0 0 0 3px rgba(168,92,255,.13); }.modal small { display: block; margin-top: 8px; color: var(--dim); }.modal small code { color: #b9afc8; }
.modal-close { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: rgba(255,255,255,.025); font-size: 22px; cursor: pointer; }.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.setting-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--line); cursor: pointer; }.setting-row b, .setting-row small { display: block; }.setting-row b { font-size: 13px; }.setting-row small { margin-top: 2px; color: var(--dim); font-size: 10px; }.setting-row input { position: absolute; opacity: 0; }.setting-row i { position: relative; flex: 0 0 auto; width: 38px; height: 21px; border-radius: 30px; background: #292333; }.setting-row i::after { content: ""; position: absolute; top: 4px; left: 4px; width: 13px; height: 13px; border-radius: 50%; background: #7b7487; transition: .2s ease; }.setting-row input:checked + i { background: rgba(94,231,255,.15); }.setting-row input:checked + i::after { left: 21px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.privacy-note { display: flex; gap: 12px; margin: 22px 0; padding: 14px; border: 1px solid rgba(77,240,165,.12); border-radius: 13px; color: var(--emerald); background: rgba(77,240,165,.045); }.privacy-note p { margin: 0; }.privacy-note b { display: block; color: #dff9ed; }
.toast { position: fixed; right: 20px; bottom: 24px; z-index: 500; max-width: min(360px, calc(100% - 40px)); padding: 13px 16px; border: 1px solid rgba(94,231,255,.25); border-radius: 13px; color: #e9fbff; background: rgba(15,12,25,.94); box-shadow: 0 16px 45px rgba(0,0,0,.45); opacity: 0; transform: translateY(16px); pointer-events: none; transition: .25s ease; }.toast.is-visible { opacity: 1; transform: none; }

body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { scroll-behavior: auto!important; animation-duration: .01ms!important; animation-iteration-count: 1!important; transition-duration: .01ms!important; }
.android-app .ad-shell { display: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

@media (max-width: 1040px) {
  .desktop-nav { gap: 0; }.nav-link { padding-inline: 10px; }
  .hero { grid-template-columns: 1.05fr .75fr; }.hero-art { min-height: 440px; }.hero-art img { width: 118%; max-width: none; }
  .path-grid { grid-template-columns: repeat(2, 1fr); }.path-card:last-child { grid-column: 1 / -1; min-height: 350px; }
  .algorithm-grid { grid-template-columns: repeat(2, 1fr); }
  .progress-overview { grid-template-columns: repeat(3, 1fr); }.mastery-ring-card { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .topbar { height: 68px; grid-template-columns: 1fr auto; }.desktop-nav { display: none; }.brand img { width: 42px; height: 42px; }.brand-word { font-size: 15px; }
  .view { min-height: calc(100vh - 68px); padding-bottom: 120px; }
  .mobile-nav { position: fixed; z-index: 100; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); padding: 7px; border: 1px solid var(--line); border-radius: 20px; background: rgba(13,10,22,.9); backdrop-filter: blur(22px); box-shadow: 0 15px 50px rgba(0,0,0,.5); }
  .mobile-nav button { display: grid; place-items: center; gap: 2px; padding: 7px 3px; border: 0; border-radius: 12px; color: var(--dim); background: transparent; font-size: 8px; font-weight: 800; }.mobile-nav button span { font-size: 17px; }.mobile-nav button.is-active { color: #fff; background: rgba(158,73,239,.14); }.mobile-nav button.is-active span { color: var(--cyan); }
  .hero { min-height: 0; grid-template-columns: 1fr; padding-top: 60px; }.hero-copy { text-align: center; }.hero .eyebrow, .hero-actions, .hero-proof { justify-content: center; }.hero-lede { margin-inline: auto; }.hero-art { min-height: 430px; max-width: 530px; width: 100%; margin: -30px auto 0; grid-row: 1; opacity: .76; }.hero-art img { width: min(90%, 460px); }.hero-copy { grid-row: 2; margin-top: -80px; }
  .dashboard-grid { grid-template-columns: 1fr; margin-top: 50px; }
  .section-heading { display: block; }.section-heading p { margin-top: 10px; }
  .notation-banner { grid-template-columns: 1fr; gap: 25px; }.notation-chips { grid-template-columns: repeat(5, 1fr); }
  .page-hero { grid-template-columns: 1fr; gap: 18px; padding-top: 55px; }.page-hero h1 { font-size: clamp(44px, 10vw, 70px); }.vault-progress { width: 100%; }
  .filter-bar { top: 78px; flex-wrap: wrap; }.search-wrap { flex-basis: 100%; }.collection-tabs { flex: 1; overflow-x: auto; }.filter-chip { white-space: nowrap; }
  .trainer-layout { grid-template-columns: 1fr; }.trainer-sidebar { grid-template-columns: 1fr 1fr; }
  .progress-columns { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 24px, 1180px); }
  .brand-beta, #installButton { display: none!important; }
  .hero { padding-top: 35px; }.hero-art { min-height: 360px; }.hero-copy { margin-top: -65px; }.hero h1 { font-size: clamp(45px, 14vw, 67px); letter-spacing: -2.4px; }.hero-lede { font-size: 15px; }.hero-actions { display: grid; }.hero-proof { flex-wrap: wrap; gap: 8px; font-size: 9px; }
  .dashboard-grid { margin-top: 36px; }.quest-panel, .streak-panel { padding: 22px; }
  .section-block { padding-top: 70px; }.path-grid { grid-template-columns: 1fr; }.path-card:last-child { grid-column: auto; min-height: 420px; }
  .notation-banner { margin-top: 65px; padding: 25px; }.notation-chips { grid-template-columns: repeat(3, 1fr); }
  .filter-bar { padding: 8px; }.collection-tabs { order: 3; width: 100%; }.select-wrap { flex: 1; }.select-wrap select { width: 100%; }
  .mastery-legend { justify-content: flex-start; overflow-x: auto; white-space: nowrap; }
  .algorithm-grid { grid-template-columns: 1fr; }.algorithm-card { min-height: 400px; }.case-zone { grid-template-columns: 145px 1fr; }
  .trainer-heading { padding-bottom: 20px; }.trainer-select select { width: 100%; }.trainer-stage { min-height: 560px; padding: 22px 14px; }.trainer-case { min-height: 230px; }.trainer-case .cube-case { --s: 25px; }.trainer-answer h2 { font-size: 30px; }.trainer-answer code { font-size: 14px; }.trainer-sidebar { grid-template-columns: 1fr; }
  .timer-shell { padding-top: 40px; }.timer-topline { align-items: flex-start; }.timer-topline h1 { font-size: 42px; }.timer-arena { padding: 22px 14px 20px; }.timer-display { letter-spacing: -4px; }.timer-stats { grid-template-columns: repeat(2, 1fr); }.timer-stats div:nth-child(2) { border-right: 0; }.timer-stats div:nth-child(n+3) { border-top: 1px solid var(--line); padding-top: 15px; margin-top: 15px; }.scramble { min-height: 72px; }.time-row { grid-template-columns: 38px 80px 1fr; gap: 10px; }.time-row code { display: none; }
  .progress-overview { grid-template-columns: 1fr; }.mastery-ring-card { display: grid; grid-template-columns: auto 1fr; }.stat-tile { min-height: 125px; }.progress-columns { margin-top: 12px; }.collection-row { grid-template-columns: 105px 1fr 40px; }.data-controls { align-items: stretch; flex-direction: column; }
  .modal form { padding: 26px 20px; }.modal-actions { flex-direction: column-reverse; }.modal-actions .button { width: 100%; }
  .toast { left: 12px; right: 12px; bottom: 100px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto!important; animation-duration: .01ms!important; animation-iteration-count: 1!important; transition-duration: .01ms!important; }
}
