/* Magic Dekaron website: the one stylesheet every page uses (portal.css adds the character / world map pieces).
   Tokens first, then base, layout, components, then the page sections. Dark by design (a game site). */
:root {
  --bg: #07060b;
  --bg-2: #0d0b14;
  --panel: #12101b;
  --panel-2: #191524;
  --panel-3: #221c31;
  --line: rgba(226, 184, 102, .18);
  --line-strong: rgba(226, 184, 102, .42);
  --line-soft: rgba(255, 255, 255, .07);
  --text: #eee8f6;
  --text-dim: #aea6be;
  --text-faint: #736c85;
  --gold: #e2b866;
  --gold-bright: #f7dc9c;
  --gold-deep: #9a6d2c;
  --violet: #a68bff;
  --violet-bright: #c9b8ff;
  --violet-deep: #3b2470;
  --ok: #62d394;
  --warn: #f0c060;
  --err: #ff8080;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --glow: 0 0 0 1px rgba(166, 139, 255, .25), 0 10px 40px rgba(110, 70, 220, .22);
  --font-display: "Cinzel", "Trajan Pro", "Palatino Linotype", "Book Antiqua", Palatino, Constantia, Georgia, serif;
  --font-body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --wrap: 1200px;
  --header-h: 72px;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); font: 400 1rem/1.65 var(--font-body);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(110, 70, 220, .16), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(226, 184, 102, .06), transparent 60%);
  background-attachment: fixed;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
figure { margin: 0; }
a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: #fff3cf; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .02em; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.8rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.25rem; }
code { font-family: Consolas, "Cascadia Mono", monospace; font-size: .9em; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-soft); border-radius: 5px; padding: .08em .4em; color: var(--gold-bright); }
:focus-visible { outline: 2px solid var(--violet-bright); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(166, 139, 255, .45); color: #fff; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--gold); color: #120d04; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.section { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.section.tight { padding: clamp(36px, 5vw, 64px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.section-head h2 { margin: 0; }
.section-head .lead { max-width: 520px; margin: 0; }
.lead { color: var(--text-dim); font-size: 1.1rem; }
.hint { color: var(--text-faint); font-size: .86rem; margin: 10px 0 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--violet-bright); font: 600 .78rem/1 var(--font-body); letter-spacing: .22em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: linear-gradient(90deg, transparent, var(--violet)); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.divider { height: 1px; border: 0; margin: 0; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; height: var(--header-h); background: rgba(7, 6, 11, .72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line-soft); }
.header-inner { width: min(1320px, 100% - 32px); height: 100%; margin-inline: auto; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); flex-shrink: 0; }
.brand:hover { color: var(--text); }
.sigil { width: 38px; height: 38px; color: var(--gold); filter: drop-shadow(0 0 10px rgba(166, 139, 255, .35)); transition: transform .6s ease; }
.brand:hover .sigil { transform: rotate(60deg); }
.sigil .ring, .sigil .tri { fill: none; stroke: currentColor; stroke-width: 2; }
.sigil .ring.thin { stroke-width: .8; opacity: .55; }
.sigil .tri { stroke-width: 1.6; }
.sigil .core { fill: var(--violet); }
.brand-word { display: flex; flex-direction: column; line-height: 1; font-family: var(--font-display); text-transform: uppercase; }
.brand-magic { font-size: .66rem; letter-spacing: .5em; color: var(--violet-bright); margin-bottom: 4px; }
.brand-name { font-size: 1.32rem; letter-spacing: .14em; color: var(--gold-bright); }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav > a { padding: 8px 12px; border-radius: 8px; color: var(--text-dim); font-size: .94rem; font-weight: 500; white-space: nowrap; transition: color .2s, background .2s; }
.site-nav > a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.site-nav > a[aria-current="page"] { color: var(--gold-bright); background: rgba(226, 184, 102, .08); }
.site-nav > a.nav-discord { display: inline-flex; align-items: center; gap: 7px; color: var(--violet-bright); }
.site-nav > a.nav-discord:hover { color: #fff; background: rgba(166, 139, 255, .12); }
.nav-discord svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.header-auth { display: flex; align-items: center; gap: 8px; margin-left: 14px; padding-left: 16px; border-left: 1px solid var(--line-soft); }
.header-user { display: inline-flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: .9rem; }
.header-user .avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--violet-deep), #6e46dc); color: #fff; font-weight: 700; font-size: .85rem; text-transform: uppercase; }
.nav-toggle { display: none; margin-left: auto; align-items: center; gap: 10px; background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 12px; font: inherit; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .25s, opacity .25s; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; } .nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 1420px) {   /* below this the links no longer fit in one row: the menu button takes over */
  .nav-toggle { display: inline-flex; }
  .site-nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 14px 16px 22px; background: rgba(9, 8, 14, .97); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); transform: translateY(-12px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s; max-height: calc(100vh - var(--header-h)); overflow: auto; }
  .site-nav.open { transform: none; opacity: 1; visibility: visible; }
  .site-nav > a { padding: 12px 14px; font-size: 1.02rem; }
  .header-auth { margin: 10px 0 0; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 22px; border-radius: 10px; border: 1px solid transparent; font: 600 .95rem/1.2 var(--font-body); letter-spacing: .02em; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .15s ease, box-shadow .2s, background .2s, color .2s, border-color .2s; }
.btn:active { transform: translateY(1px); }
.btn-primary { color: #1a1206; background: linear-gradient(180deg, #f7dc9c, #d9a957 55%, #b98a3f); box-shadow: 0 8px 26px rgba(226, 184, 102, .25), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-primary:hover { color: #1a1206; box-shadow: 0 10px 34px rgba(226, 184, 102, .4), inset 0 1px 0 rgba(255, 255, 255, .6); transform: translateY(-1px); }
.btn-violet { color: #fff; background: linear-gradient(180deg, #8d6bff, #5a37c8); box-shadow: 0 8px 26px rgba(110, 70, 220, .35), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-violet:hover { color: #fff; transform: translateY(-1px); }
.btn-ghost { color: var(--text); background: rgba(255, 255, 255, .03); border-color: var(--line); }
.btn-ghost:hover { color: var(--gold-bright); border-color: var(--line-strong); background: rgba(226, 184, 102, .06); }
.btn-sm { padding: 8px 14px; font-size: .86rem; border-radius: 8px; }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn .arrow { transition: transform .2s; } .btn:hover .arrow { transform: translateX(3px); }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-bright); font-weight: 600; }
.text-link::after { content: "\2192"; transition: transform .2s; }
.text-link:hover::after { transform: translateX(3px); }

/* ---------- cards and panels ---------- */
.card { position: relative; padding: 28px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01)), var(--panel); border: 1px solid var(--line-soft); box-shadow: var(--shadow); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card.glow:hover { border-color: rgba(166, 139, 255, .35); box-shadow: var(--glow); }
.card .icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px; color: var(--gold-bright); background: linear-gradient(135deg, rgba(166, 139, 255, .22), rgba(226, 184, 102, .1)); border: 1px solid rgba(166, 139, 255, .3); }
.card .icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card p { color: var(--text-dim); }
.panel { padding: 28px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line-soft); }
.panel + .panel { margin-top: 20px; }
.panel-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; font-size: 1.15rem; color: var(--gold-bright); }
.panel-title .sub { font: 400 .88rem var(--font-body); color: var(--text-dim); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--text-dim); background: rgba(255, 255, 255, .05); border: 1px solid var(--line-soft); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); }
.pill.online { color: #c9f5da; border-color: rgba(98, 211, 148, .35); background: rgba(98, 211, 148, .08); }
.pill.online .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(98, 211, 148, .18); animation: pulse 2s infinite; }
.pill.offline .dot { background: var(--err); }
.pill.violet { color: var(--violet-bright); border-color: rgba(166, 139, 255, .35); background: rgba(166, 139, 255, .08); }
.pill.gold { color: var(--gold-bright); border-color: var(--line); background: rgba(226, 184, 102, .07); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(98, 211, 148, 0); } }
.badge { display: inline-block; padding: 3px 9px; border-radius: 6px; font-family: var(--font-body); font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(255, 255, 255, .06); color: var(--text-dim); }
.badge.ok { background: rgba(98, 211, 148, .12); color: var(--ok); }
.badge.now { background: rgba(166, 139, 255, .14); color: var(--violet-bright); }
.badge.next { background: rgba(226, 184, 102, .1); color: var(--gold); }

/* ---------- page hero (inner pages) ---------- */
.page-hero { position: relative; padding: clamp(64px, 9vw, 120px) 0 clamp(40px, 6vw, 72px); overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line-soft); }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--hero-image, none) center / cover no-repeat; opacity: .35; }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7, 6, 11, .55), var(--bg) 92%), radial-gradient(700px 300px at 20% 30%, rgba(110, 70, 220, .25), transparent 70%); }
.page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); max-width: 22ch; }
.page-hero .lead { max-width: 640px; font-size: 1.15rem; }
.hero-evolution { --hero-image: url("/img/stage-hall.jpg"); }
.hero-features { --hero-image: url("/img/nature-jungle.jpg"); }
.hero-download { --hero-image: url("/img/nature-after.jpg"); }
.hero-rankings { --hero-image: url("/img/stage-forest.jpg"); }
.hero-community { --hero-image: url("/img/world-camp.jpg"); }
.hero-map { --hero-image: url("/img/bigmap.jpg"); }
.hero-account { --hero-image: url("/img/stage-magician.jpg"); }
.hero-support { --hero-image: url("/img/hero-throne.jpg"); }
.hero-work { --hero-image: url("/img/stage-hall.jpg"); }
.hero-drops { --hero-image: url("/img/world-camp.jpg"); }
.breadcrumb { margin: 0 0 14px; color: var(--text-faint); font-size: .9rem; }
.breadcrumb a { color: var(--text-dim); } .breadcrumb a:hover { color: var(--gold-bright); }

/* ---------- home hero ---------- */
.hero { position: relative; min-height: min(92vh, 920px); display: flex; align-items: flex-end; padding: 120px 0 72px; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
@media (min-width: 1000px) { .hero-bg { left: 14%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 32%); mask-image: linear-gradient(90deg, transparent, #000 32%); } }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; transform: scale(1.04); animation: drift 30s ease-in-out infinite alternate; }
@keyframes drift { to { transform: scale(1.1) translateY(-1.5%); } }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7, 6, 11, .92) 0%, rgba(7, 6, 11, .55) 45%, rgba(7, 6, 11, .1) 75%), linear-gradient(0deg, var(--bg) 0%, rgba(7, 6, 11, 0) 40%); }
@media (max-width: 999px) { .hero::after { background: linear-gradient(0deg, var(--bg) 6%, rgba(7, 6, 11, .78) 50%, rgba(7, 6, 11, .25)); } }
.hero-content { max-width: 720px; }
.hero h1 { margin-bottom: 20px; text-transform: uppercase; letter-spacing: .04em; line-height: 1.02; text-shadow: 0 4px 40px rgba(0, 0, 0, .6); }
.hero h1 .magic { display: block; font-size: .36em; letter-spacing: .62em; color: var(--violet-bright); margin-bottom: .35em; }
.hero h1 .name { background: linear-gradient(180deg, #fff6dc, var(--gold) 70%, var(--gold-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: clamp(1.08rem, 1.6vw, 1.3rem); color: #d6cfe4; max-width: 600px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 26px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- pillars / statements ---------- */
.statement { max-width: 860px; margin: 0 auto; text-align: center; }
.statement h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); }
.statement .lead { margin-inline: auto; max-width: 680px; }
.big-quote { font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.35; color: var(--text); }
.big-quote em { font-style: normal; color: var(--gold-bright); }
.pillar-num { font: 600 .8rem var(--font-body); letter-spacing: .2em; color: var(--text-faint); margin-bottom: 12px; display: block; }

/* ---------- split feature rows ---------- */
.feature-row { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.feature-row + .feature-row { margin-top: clamp(64px, 9vw, 112px); }
.feature-row.flip { grid-template-columns: 1fr 1.15fr; }
.feature-row.flip .feature-media { order: 2; }
.feature-text h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.feature-text p { color: var(--text-dim); }
.feature-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.feature-list li { position: relative; padding-left: 28px; color: var(--text); }
.feature-list + p { margin-top: 18px; }
.feature-list li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 12px; transform: rotate(45deg); border: 1.5px solid var(--gold); background: rgba(166, 139, 255, .35); }
@media (max-width: 860px) { .feature-row, .feature-row.flip { grid-template-columns: 1fr; } .feature-row.flip .feature-media { order: 0; } }
.shot { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #000; aspect-ratio: 16 / 9; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.shot:hover img { transform: scale(1.03); }
.shot figcaption, .caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 18px 14px; font-size: .86rem; color: #ddd5ea; background: linear-gradient(0deg, rgba(0, 0, 0, .85), transparent); }
.media-stack { display: grid; gap: 14px; }
.download-hero > .media-stack { grid-template-rows: 1fr auto; }   /* beside a taller card the picture grows (no gap) */
.download-hero > .media-stack > .shot { aspect-ratio: auto; min-height: 220px; }
.media-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- before / after slider ---------- */
.compare { --pos: 50%; position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); aspect-ratio: 16 / 9; background: #000; user-select: none; touch-action: pan-y; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare .compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare .compare-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--gold-bright); box-shadow: 0 0 16px rgba(247, 220, 156, .8); pointer-events: none; }
.compare .compare-handle { position: absolute; top: 50%; left: var(--pos); width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; display: grid; place-items: center; background: rgba(12, 10, 18, .85); border: 2px solid var(--gold-bright); color: var(--gold-bright); font-size: 1rem; pointer-events: none; box-shadow: 0 6px 24px rgba(0, 0, 0, .5); }
.compare input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare input[type="range"]:focus-visible ~ .compare-handle { outline: 2px solid var(--violet-bright); outline-offset: 3px; }
.compare .tag { position: absolute; top: 14px; padding: 6px 12px; border-radius: 8px; font: 700 .72rem var(--font-body); letter-spacing: .14em; text-transform: uppercase; background: rgba(0, 0, 0, .65); pointer-events: none; }
.compare .tag.left { left: 14px; color: var(--text-dim); }
.compare .tag.right { right: 14px; color: var(--gold-bright); }
.compare-note { margin-top: 12px; color: var(--text-faint); font-size: .88rem; text-align: center; }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.gallery .shot { grid-column: span 4; }
.gallery .shot.wide { grid-column: span 8; grid-row: span 2; aspect-ratio: auto; }
@media (max-width: 860px) { .gallery .shot, .gallery .shot.wide { grid-column: span 12; aspect-ratio: 16 / 9; grid-row: auto; } }

/* ---------- classes explorer ---------- */
.classes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .classes { grid-template-columns: 1fr; } }
.class-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .class-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.class-tile { position: relative; padding: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-soft); background: var(--panel-2); cursor: pointer; aspect-ratio: 6 / 5; transition: border-color .2s, transform .2s, box-shadow .2s; }
.class-tile img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.75) brightness(.8); transition: filter .2s; }
.class-tile span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-size: .68rem; line-height: 1.15; color: #fff; text-align: center; background: linear-gradient(0deg, rgba(0, 0, 0, .9), transparent); }
.class-tile:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.class-tile:hover img, .class-tile[aria-pressed="true"] img { filter: none; }
.class-tile[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 8px 24px rgba(226, 184, 102, .25); }
.class-detail { padding: 30px; border-radius: var(--radius); background: radial-gradient(500px 240px at 100% 0, rgba(110, 70, 220, .2), transparent 70%), var(--panel); border: 1px solid var(--line); min-height: 100%; }
.class-head { display: flex; gap: 20px; align-items: center; margin-bottom: 18px; }
.class-head img { width: 120px; border-radius: 10px; border: 1px solid var(--line); }
.class-head h3 { font-size: 1.7rem; margin: 6px 0 4px; color: var(--gold-bright); }
.class-head .meta { color: var(--text-dim); font-size: .9rem; }
.stat-bars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; margin: 18px 0; }
.stat-bar { font-size: .82rem; color: var(--text-dim); }
.stat-bar .row { display: flex; justify-content: space-between; margin-bottom: 4px; }
.stat-bar .row b { color: var(--text); }
.stat-bar .track { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.stat-bar .fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--violet), var(--gold)); width: 0; transition: width .5s ease; }
.class-intro { color: var(--text-dim); font-size: .95rem; max-height: 220px; overflow: auto; padding-right: 6px; }

/* ---------- roadmap / timeline ---------- */
.progress-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 40px; }
@media (max-width: 760px) { .progress-strip { grid-template-columns: 1fr; } }
.progress-card { padding: 22px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line-soft); }
.progress-card strong { display: block; font: 600 2.2rem/1 var(--font-display); color: var(--gold-bright); margin-bottom: 6px; }
.progress-card span { color: var(--text-dim); font-size: .92rem; }
.timeline { position: relative; display: grid; gap: 18px; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 10px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg, var(--ok), var(--violet) 60%, rgba(226, 184, 102, .25)); border-radius: 2px; }
.milestone { position: relative; padding: 20px 22px; border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--line-soft); }
.milestone::before { content: ""; position: absolute; left: -31px; top: 24px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--bg); background: var(--text-faint); box-shadow: 0 0 0 2px var(--text-faint); }
.milestone.done::before { background: var(--ok); box-shadow: 0 0 0 2px var(--ok); }
.milestone.now::before { background: var(--violet); box-shadow: 0 0 0 2px var(--violet), 0 0 16px var(--violet); }
.milestone.next::before { background: var(--bg); box-shadow: 0 0 0 2px var(--gold-deep); }
.milestone h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1.08rem; margin: 0 0 6px; }
.milestone p { margin: 0; color: var(--text-dim); font-size: .95rem; }
.milestone .when { margin-left: auto; font: 500 .8rem var(--font-body); color: var(--text-faint); }
.roadmap-group + .roadmap-group { margin-top: 42px; }
.roadmap-group > h3 { font-size: 1.3rem; margin-bottom: 16px; }

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; gap: 16px; list-style: none; padding: 0; margin: 0; }
.steps > li { counter-increment: step; position: relative; padding: 20px 22px 20px 74px; border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--line-soft); }
.steps > li::before { content: counter(step); position: absolute; left: 20px; top: 18px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 700 1rem var(--font-display); color: #1a1206; background: linear-gradient(180deg, var(--gold-bright), var(--gold)); }
.steps > li h3 { font-size: 1.05rem; margin-bottom: 4px; }
.steps > li p { margin: 0; color: var(--text-dim); }
.step-cards .card { padding-top: 64px; }
.step-cards .card .pillar-num { position: absolute; top: 24px; left: 28px; }

/* ---------- download ---------- */
.download-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: stretch; }
@media (max-width: 900px) { .download-hero { grid-template-columns: 1fr; } }
.download-card { padding: 32px; border-radius: var(--radius); background: radial-gradient(600px 300px at 0 0, rgba(166, 139, 255, .2), transparent 70%), var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 18px; }
.download-card h2 { margin: 0; font-size: 1.9rem; }
.download-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.download-facts div { padding: 12px 14px; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line-soft); }
.download-facts dt { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); }
.download-facts dd { margin: 4px 0 0; font-weight: 600; }
.mirror-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--text-faint); font-size: .86rem; }
.req-table { width: 100%; border-collapse: collapse; }
.req-table th, .req-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.req-table th { width: 34%; color: var(--text-dim); font-weight: 500; }

/* ---------- support and work with us ---------- */
.role-card .badge { position: absolute; top: 28px; right: 28px; }
.role-card .feature-list { margin-top: 14px; font-size: .94rem; }
.apply-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 960px) { .apply-layout { grid-template-columns: 1fr; } }
.apply-done, .done-panel { text-align: center; padding: 20px 6px 8px; }
.apply-done .icon, .done-panel .icon { width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; color: #1a1206; background: linear-gradient(180deg, var(--gold-bright), var(--gold)); }
.done-panel .icon.alert { color: #2b0c0c; background: linear-gradient(180deg, #ffc2b8, var(--err)); }
.apply-done:focus, .done-panel:focus { outline: none; }
.apply-done p, .done-panel p { color: var(--text-dim); max-width: 520px; margin-inline: auto; }

/* ---------- forms ---------- */
.auth-shell { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--header-h)); }
@media (max-width: 900px) { .auth-shell { grid-template-columns: 1fr; } .auth-art { min-height: 260px; } }
.auth-art { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: flex-end; padding: clamp(28px, 5vw, 64px); }
.auth-art img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.auth-art::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(7, 6, 11, .95), rgba(7, 6, 11, .15) 70%), linear-gradient(90deg, transparent 60%, var(--bg)); }
.auth-art h2 { max-width: 14ch; }
.auth-art p { color: #d6cfe4; max-width: 420px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: clamp(28px, 5vw, 64px) 16px; }
.auth-card { width: min(440px, 100%); }
.auth-card h1 { font-size: 2.1rem; margin-bottom: 6px; }
.auth-card > p { color: var(--text-dim); }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 7px; font-size: .9rem; font-weight: 600; color: var(--text); }
.field .hint { margin-top: 6px; font-size: .82rem; color: var(--text-faint); }
.input, .field input, .field textarea, .field select { width: 100%; padding: 13px 14px; border-radius: 10px; border: 1px solid var(--line-soft); background: rgba(0, 0, 0, .35); color: var(--text); font: inherit; transition: border-color .2s, box-shadow .2s, background .2s; }
.field textarea { min-height: 160px; resize: vertical; line-height: 1.55; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(166, 139, 255, .22); background: rgba(0, 0, 0, .5); }
.field input[inputmode="numeric"] { letter-spacing: .35em; font-family: Consolas, monospace; }
.form-msg { display: none; margin: 0 0 18px; padding: 12px 14px; border-radius: 10px; font-size: .92rem; }
.form-msg.ok, .form-msg.error, .form-msg.info { display: block; }
.form-msg.ok { color: #c9f5da; background: rgba(98, 211, 148, .1); border: 1px solid rgba(98, 211, 148, .3); }
.form-msg.error { color: #ffd0d0; background: rgba(255, 128, 128, .1); border: 1px solid rgba(255, 128, 128, .3); }
.form-msg.info { color: var(--violet-bright); background: rgba(166, 139, 255, .08); border: 1px solid rgba(166, 139, 255, .25); }
.form-foot { margin-top: 22px; text-align: center; color: var(--text-dim); font-size: .92rem; }
.server-note { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; margin-bottom: 20px; border-radius: 10px; background: rgba(166, 139, 255, .07); border: 1px solid rgba(166, 139, 255, .2); font-size: .86rem; color: var(--text-dim); }
.server-note strong { color: var(--text); }
.field .optional { font-weight: 400; color: var(--text-faint); }
.field [aria-invalid="true"] { border-color: rgba(255, 128, 128, .6); }
.field input:disabled { opacity: .55; cursor: not-allowed; }
/* account email and password recovery (signup, login, verify-email, forgot-password, reset-password, account) */
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.label-row label { margin-bottom: 0; }
.label-row a { font-size: .86rem; }
.form-lead { color: var(--text-dim); font-size: .92rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.done-actions { margin: 8px 0 0; }
.mail-resend { margin: -6px 0 22px; }
.mail-resend .hint { margin-top: 8px; text-align: center; }
.mail-tips { margin: 4px 0 24px; font-size: .92rem; }
.mail-tips li { color: var(--text-dim); }
.mail-address { overflow-wrap: anywhere; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.check-grid legend { padding: 0; margin-bottom: 9px; font-size: .9rem; font-weight: 600; color: var(--text); }
.chip-check { position: relative; display: inline-flex; }
.chip-check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip-check span { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .04); color: var(--text-dim); font-size: .86rem; transition: color .2s, border-color .2s, background .2s; }
.chip-check input:hover + span { border-color: var(--line); color: var(--text); }
.chip-check input:checked + span { color: var(--gold-bright); border-color: var(--line-strong); background: rgba(226, 184, 102, .1); }
.chip-check input:checked + span::before { content: "\2713\00a0"; }
.chip-check input:focus-visible + span { outline: 2px solid var(--violet-bright); outline-offset: 2px; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 18px; padding: 14px; border-radius: 10px; background: rgba(166, 139, 255, .06); border: 1px solid rgba(166, 139, 255, .2); color: var(--text-dim); font-size: .9rem; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--gold); }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }   /* the bot trap: people never see it */

/* ---------- tables, lists, states ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line-soft); background: var(--panel); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { text-align: left; padding: 14px 16px; font: 600 .74rem var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.rank { display: inline-grid; place-items: center; min-width: 32px; height: 32px; border-radius: 50%; font-weight: 700; color: var(--text-dim); }
.rank.r1 { color: #241703; background: linear-gradient(180deg, #ffe7a6, #d9a54b); }
.rank.r2 { color: #18181c; background: linear-gradient(180deg, #f0f0f5, #a9aab8); }
.rank.r3 { color: #1f1006; background: linear-gradient(180deg, #f2c49b, #b0703c); }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 28px; }
@media (max-width: 700px) { .podium { grid-template-columns: 1fr; } }
.podium .card { text-align: center; padding: 26px 20px; }
.podium .card img { width: 96px; margin: 0 auto 12px; border-radius: 10px; border: 1px solid var(--line); }
.podium .card h3 { margin: 6px 0 2px; color: var(--gold-bright); }
.podium .card .num { font: 600 1.6rem var(--font-display); color: var(--text); }
.empty-state { padding: 48px 24px; text-align: center; border-radius: var(--radius); background: var(--panel); border: 1px dashed var(--line); color: var(--text-dim); }
.empty-state .icon { font-size: 2rem; margin-bottom: 8px; color: var(--gold); }
.empty-state h3 { color: var(--text); margin-bottom: 6px; }
.empty-state p { margin: 0 auto; max-width: 480px; }
.empty-state .btn { margin-top: 18px; }
.skeleton { padding: 30px; border-radius: var(--radius); color: var(--text-faint); background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- account ---------- */
.account-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.account-head .avatar { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font: 700 1.6rem var(--font-display); color: #fff; background: linear-gradient(135deg, var(--violet-deep), #7a52ee); box-shadow: var(--glow); text-transform: uppercase; }
.account-head h1 { margin: 0; font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.account-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 960px) { .account-layout { grid-template-columns: 1fr; } }
.char-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.char-card { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-soft); color: var(--text); transition: border-color .2s, transform .2s; }
a.char-card:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-2px); }
.char-card img { width: 72px; border-radius: 8px; border: 1px solid var(--line-soft); }
.char-card strong { display: block; font-family: var(--font-display); font-size: 1.05rem; color: var(--gold-bright); }
.char-card small { display: block; color: var(--text-dim); font-size: .84rem; }
.pin-state { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 14px 0 16px; }
.pin-state .mail-address { color: var(--text); font-weight: 600; }
.panel-title + .hint { margin: 0 0 16px; }
.mail-pending { margin: 0 0 16px; }
.panel-step { margin-bottom: 24px; border-color: var(--line-strong); background: radial-gradient(700px 260px at 0 0, rgba(226, 184, 102, .1), transparent 70%), var(--panel); box-shadow: var(--glow); }
.panel-step h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); color: var(--gold-bright); }
.panel-step > p { color: var(--text-dim); max-width: 760px; }
.step-form { display: grid; grid-template-columns: repeat(2, minmax(0, 230px)) auto; gap: 0 16px; align-items: end; justify-content: start; }
.step-form .btn { margin-bottom: 18px; }
@media (max-width: 640px) { .step-form { grid-template-columns: 1fr; } .step-form .btn { width: 100%; } }
.pin-forms form { display: grid; gap: 0; }

/* ---------- forum ---------- */
.forum-list { display: grid; gap: 12px; }
.forum-row { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 20px 22px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-soft); color: var(--text); transition: border-color .2s, background .2s; }
.forum-row:hover { color: var(--text); border-color: var(--line-strong); background: var(--panel-2); }
.forum-row .ficon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(166, 139, 255, .12); color: var(--violet-bright); font-size: 1.2rem; }
.forum-row .name { font: 600 1.08rem var(--font-display); color: var(--gold-bright); }
.forum-row .desc, .forum-row .meta { color: var(--text-dim); font-size: .9rem; }
.forum-row .count { text-align: right; color: var(--text-faint); font-size: .82rem; }
.forum-row .count b { display: block; font-size: 1.2rem; color: var(--text); }
.post { display: grid; grid-template-columns: 180px 1fr; gap: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-soft); background: var(--panel); margin-bottom: 14px; }
.post .author { padding: 18px; background: var(--panel-2); border-right: 1px solid var(--line-soft); font-weight: 600; color: var(--gold-bright); word-break: break-word; }
.post .author .when { margin-top: 6px; font-weight: 400; font-size: .8rem; color: var(--text-faint); }
.post .op { display: inline-block; margin-top: 6px; }
.post .body { padding: 18px 20px; white-space: pre-wrap; word-break: break-word; color: var(--text); }
@media (max-width: 640px) { .post { grid-template-columns: 1fr; } .post .author { border-right: 0; border-bottom: 1px solid var(--line-soft); } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details { border-radius: 12px; background: var(--panel); border: 1px solid var(--line-soft); padding: 0 20px; }
.faq details[open] { border-color: var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-dim); margin: 0 0 18px; }

/* ---------- call to action band ---------- */
.cta-band { position: relative; overflow: hidden; isolation: isolate; padding: clamp(64px, 9vw, 120px) 0; text-align: center; border-top: 1px solid var(--line-soft); }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("/img/stage-magician.jpg") center / cover; opacity: .28; }
.cta-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(600px 300px at 50% 50%, rgba(110, 70, 220, .3), transparent 70%), linear-gradient(180deg, var(--bg), rgba(7, 6, 11, .6) 50%, var(--bg)); }
.cta-band h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
.cta-band .actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

/* ---------- footer ---------- */
.site-footer { margin-top: auto; border-top: 1px solid var(--line-soft); background: linear-gradient(180deg, var(--bg-2), #050408); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.footer-brand p { color: var(--text-dim); max-width: 380px; margin-top: 16px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h3 { font: 700 .74rem var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px; }
.footer-col a { color: var(--text-dim); } .footer-col a:hover { color: var(--gold-bright); }
.footer-note { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line-soft); color: var(--text-faint); font-size: .82rem; }
.footer-note p { margin: 0; max-width: 760px; }

/* ---------- reveal on scroll (layout.js adds .in; without JS everything is visible) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
