/* ---------- tokens ---------- */
:root {
  --bg: #f6f7fb;
  --bg-elev: #ffffff;
  --bg-soft: #eef0f7;
  --band: #eff1f8;
  --text: #11131a;
  --muted: #586074;
  --border: #e1e4ee;
  --brand-1: #7c5cff;
  --brand-2: #1fb6e8;
  --accent: #6345f2;
  --success: #13863d;
  --success-text: #ffffff;
  --danger: #d92d20;
  --ring: rgba(124, 92, 255, 0.32);
  --glow-1: rgba(124, 92, 255, 0.20);
  --glow-2: rgba(31, 182, 232, 0.16);
  --shadow: 0 14px 34px -18px rgba(17, 19, 40, 0.28);
  --radius: 14px;
  --radius-lg: 22px;
  --grad: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  --btn-grad: linear-gradient(135deg, #6a46ff, #2563eb);
  --container: 1160px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090a10;
    --bg-elev: #11131b;
    --bg-soft: #181b26;
    --band: #0e1018;
    --text: #eceef5;
    --muted: #9aa2b5;
    --border: #252a3a;
    --accent: #9a86ff;
    --success: #22c55e;
    --success-text: #04170b;
    --danger: #f87171;
    --ring: rgba(154, 134, 255, 0.4);
    --glow-1: rgba(124, 92, 255, 0.24);
    --glow-2: rgba(31, 182, 232, 0.14);
    --shadow: 0 18px 44px -20px rgba(0, 0, 0, 0.75);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #090a10;
  --bg-elev: #11131b;
  --bg-soft: #181b26;
  --band: #0e1018;
  --text: #eceef5;
  --muted: #9aa2b5;
  --border: #252a3a;
  --accent: #9a86ff;
  --success: #22c55e;
  --success-text: #04170b;
  --danger: #f87171;
  --ring: rgba(154, 134, 255, 0.4);
  --glow-1: rgba(124, 92, 255, 0.24);
  --glow-2: rgba(31, 182, 232, 0.14);
  --shadow: 0 18px 44px -20px rgba(0, 0, 0, 0.75);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { text-wrap: balance; }
code { font: 600 0.88em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg-soft); padding: 2px 6px; border-radius: 6px; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i.fill { fill: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 12px; z-index: 100; background: var(--bg-elev); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 16px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 14px; border: 0;
  font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, filter .15s ease, background-color .15s ease;
}
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: var(--btn-grad); color: #fff; box-shadow: 0 10px 24px -12px #6a46ff; }
.btn-success { background: var(--success); color: var(--success-text); }
.btn-ghost { background: var(--bg-soft); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { filter: none; background: var(--border); }
.btn-ghost-dark { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .22); }
.btn-sm { height: 38px; padding: 0 14px; border-radius: 11px; font-size: 14px; gap: 6px; }
.btn-sm .i { width: 18px; height: 18px; }
.btn[disabled], .icon-btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 12px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-soft); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 9px; }
.nav-links { display: flex; gap: 4px; margin-left: 10px; }
.nav-links a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--bg-soft); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .menu-btn { display: inline-grid; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0; margin: 0;
    flex-direction: column; padding: 8px 16px 16px; background: var(--bg-elev); border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
}

/* ---------- hero + link box ---------- */
.hero { position: relative; isolation: isolate; padding: 76px 0 60px; text-align: center; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -160px; width: 1200px; height: 680px; transform: translateX(-50%);
  background:
    radial-gradient(460px 280px at 32% 42%, var(--glow-1), transparent 70%),
    radial-gradient(420px 260px at 68% 34%, var(--glow-2), transparent 70%);
  pointer-events: none;
}
.hero-sm { padding: 56px 0 36px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg-elev);
  color: var(--muted); font-size: 13px; font-weight: 600;
}
.eyebrow .i { width: 16px; height: 16px; color: var(--accent); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 22%, transparent); }
.hero h1 { font-size: clamp(34px, 6.2vw, 62px); line-height: 1.04; letter-spacing: -.035em; margin: 20px auto 14px; max-width: 860px; font-weight: 850; }
.hero-sm h1 { font-size: clamp(32px, 5vw, 50px); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(16px, 2.1vw, 19px); color: var(--muted); max-width: 640px; margin: 0 auto; }

.linkbox-wrap { max-width: 780px; margin: 34px auto 0; }
.linkbox {
  display: flex; align-items: center; gap: 10px; padding: 10px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.linkbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring), var(--shadow); }
.linkbox-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 6px 0 14px; border-radius: 14px; background: var(--bg-soft); }
.linkbox-field > .i { color: var(--muted); }
.linkbox-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-size: 16px; }
.linkbox-field input::placeholder { color: var(--muted); opacity: .85; }
.paste-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; flex: none;
  border-radius: 10px; border: 1px solid var(--border); background: var(--bg-elev); font-weight: 600; font-size: 14px; cursor: pointer;
}
.paste-btn .i { width: 16px; height: 16px; }
.paste-btn:hover { background: var(--bg-soft); }
.linkbox-actions { display: flex; gap: 10px; }
.linkbox-actions .btn { height: 52px; }
.field-error { min-height: 22px; margin: 10px 0 0; color: var(--danger); font-size: 14px; font-weight: 600; }
.field-error:empty { min-height: 0; margin: 0; }
.works-with { margin: 18px 0 0; color: var(--muted); font-size: 14.5px; }
.works-with a { color: var(--accent); font-weight: 600; }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .linkbox { flex-direction: column; align-items: stretch; }
  .linkbox-actions .btn { flex: 1; }
  .paste-btn span { display: none; }
  .paste-btn { width: 38px; padding: 0; justify-content: center; }
}

/* ---------- sections ---------- */
.section { padding: 76px 0; }
.section-tight { padding: 8px 0 24px; }
.section.alt { background: var(--band); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(26px, 4vw, 38px); line-height: 1.15; letter-spacing: -.025em; margin: 0 0 10px; }
.section-head p { margin: 0; color: var(--muted); }
.kicker { display: block; margin-bottom: 10px; color: var(--accent); font-weight: 750; font-size: 13px; letter-spacing: .09em; text-transform: uppercase; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; }
.step-num { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 16px; border-radius: 12px; background: var(--btn-grad); color: #fff; font-weight: 800; }
.step h3 { margin: 0 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; transition: transform .2s ease, border-color .2s ease; }
.feature:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.feature-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.feature h3 { margin: 0 0 6px; font-size: 16.5px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }
@media (max-width: 1000px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

.chips { list-style: none; margin: 0 auto; padding: 0; max-width: 900px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chips li { padding: 9px 16px; border-radius: 999px; background: var(--bg-elev); border: 1px solid var(--border); font: 600 14px ui-monospace, SFMono-Regular, Menlo, monospace; }

.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px; padding: 0 20px; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; cursor: pointer; list-style: none; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { color: var(--muted); transition: transform .2s ease; }
.faq details[open] summary .i { transform: rotate(90deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); }
.faq a { color: var(--accent); }

.cta { padding: 64px 0 84px; }
.cta-card { position: relative; overflow: hidden; padding: 48px 28px; border-radius: 28px; text-align: center; color: #fff; background: var(--btn-grad); }
.cta-card::after { content: ""; position: absolute; inset: auto -10% -60% auto; width: 420px; height: 420px; border-radius: 50%; background: rgba(255, 255, 255, .10); pointer-events: none; }
.cta-card h2 { margin: 0 0 8px; font-size: clamp(24px, 3.6vw, 34px); letter-spacing: -.02em; }
.cta-card p { margin: 0 0 22px; opacity: .9; }
.cta-card .btn { position: relative; z-index: 1; background: #fff; color: #1d1452; }

/* ---------- recent ---------- */
.recent { padding: 4px 0 28px; }
.recent-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.recent-head h2 { margin: 0; font-size: 18px; }
.recent-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.recent-item a { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px; text-decoration: none; }
.recent-item a:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.recent-thumb { position: relative; display: grid; place-items: center; flex: none; width: 76px; height: 46px; overflow: hidden; border-radius: 8px; background: var(--bg-soft); color: var(--muted); }
.recent-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.recent-text { min-width: 0; }
.recent-title { font-weight: 600; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recent-time { margin-top: 2px; font-size: 12.5px; color: var(--muted); }

/* ---------- watch page ---------- */
.watch { padding: 24px 0 64px; }
.watch .linkbox-wrap { max-width: none; margin: 0 0 20px; }
.linkbox.compact { padding: 8px; }
.linkbox.compact .linkbox-field, .linkbox.compact .linkbox-actions .btn { height: 46px; }
.watch-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.watch-grid.single { grid-template-columns: minmax(0, 1fr); }
.watch-grid.single .player-col { width: 100%; max-width: 1040px; margin: 0 auto; }
@media (max-width: 1020px) { .watch-grid { grid-template-columns: minmax(0, 1fr); } }

.player-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.player-wrap { position: relative; aspect-ratio: 16 / 9; background: #000; }
.player-wrap video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.overlay {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: #e8e9ef;
  overflow: auto; overscroll-behavior: contain;
  background: radial-gradient(circle at 50% 40%, #2a2150, #000 72%);
}
@media (max-width: 520px) { .overlay { padding: 14px; } }
.overlay-msg { max-width: 480px; }
.overlay-msg strong { display: block; margin-bottom: 6px; font-size: 18px; }
.overlay-msg p { margin: 0 0 16px; color: #babfcf; font-size: 14.5px; overflow-wrap: anywhere; }
.overlay-msg .spinner + p { margin: 0; }
.overlay-icon { width: 38px; height: 38px; margin: 0 auto 12px; color: #ffb4b4; }
.overlay-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.spinner { width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .18); border-top-color: #fff; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 520px) { .overlay-msg p { font-size: 13.5px; margin-bottom: 10px; } .overlay-icon { width: 28px; height: 28px; margin-bottom: 6px; } }

.player-meta { padding: 18px 20px 18px; }
.file-title { margin: 0; font-size: clamp(18px, 2.4vw, 22px); line-height: 1.3; letter-spacing: -.01em; overflow-wrap: anywhere; }
.file-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 6px; color: var(--muted); font-size: 14px; }
.file-sub:empty { display: none; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-weight: 700; font-size: 12px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.toolbar .spacer { flex: 1; }
.select-pill { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 6px 0 12px; border-radius: 11px; background: var(--bg-soft); border: 1px solid var(--border); font-size: 14px; font-weight: 600; cursor: pointer; }
.select-pill .i { width: 18px; height: 18px; color: var(--muted); }
.select-pill select { height: 100%; border: 0; outline: none; background: transparent; font-weight: 600; font-size: 14px; cursor: pointer; padding-right: 2px; }
.select-pill select option { background: var(--bg-elev); color: var(--text); }
.select-pill:focus-within { border-color: var(--accent); }
.shortcuts { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; color: var(--muted); font-size: 12.5px; }
.shortcuts .i { width: 16px; height: 16px; }
kbd { font: 600 11.5px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); }
@media (max-width: 760px) { .shortcuts { display: none; } }
@media (max-width: 560px) {
  .hide-sm { display: none; }
  .player-meta { padding: 14px 14px 16px; }
  .toolbar .spacer { display: none; }
}

.playlist-card { position: sticky; top: 84px; display: flex; flex-direction: column; max-height: calc(100vh - 104px); background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
@media (max-width: 1020px) { .playlist-card { position: static; max-height: 560px; } }
.playlist-head { padding: 16px 16px 12px; border-bottom: 1px solid var(--border); }
.playlist-head h2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; font-size: 16px; }
.playlist-head .count { color: var(--muted); font-weight: 600; font-size: 13px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.crumbs button { padding: 0; border: 0; background: none; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; }
.crumbs [aria-current] { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.playlist { list-style: none; margin: 0; padding: 8px; overflow: auto; display: grid; gap: 2px; align-content: start; }
.pl-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border: 0; border-radius: 12px; background: transparent; text-align: left; text-decoration: none; color: inherit; cursor: pointer; }
.pl-item:hover { background: var(--bg-soft); }
.pl-item[aria-current="true"] { background: color-mix(in srgb, var(--accent) 15%, transparent); }
.pl-item[aria-current="true"] .pl-name { color: var(--accent); }
.pl-item[aria-disabled="true"] { cursor: default; opacity: .6; }
.pl-item[aria-disabled="true"]:hover { background: transparent; }
.pl-thumb { position: relative; display: grid; place-items: center; flex: none; width: 104px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 9px; background: var(--bg-soft); color: var(--muted); }
.pl-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pl-text { min-width: 0; flex: 1; }
.pl-name { font-size: 14px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-meta { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.pl-dl { color: var(--muted); }
.pl-note { padding: 12px; color: var(--muted); font-size: 14px; }
.pl-note.err { color: var(--danger); }
.pl-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 14px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.switch input { width: 16px; height: 16px; accent-color: var(--accent); }

/* ---------- downloader ---------- */
.results { max-width: 920px; margin: 0 auto; }
.results-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.results-head h2 { margin: 0; font-size: 22px; }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.file-row { display: flex; align-items: center; gap: 14px; padding: 12px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px; }
.file-row .pl-thumb { width: 120px; }
.file-info { flex: 1; min-width: 0; }
.file-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) {
  .file-row { flex-wrap: wrap; }
  .file-row .pl-thumb { width: 96px; }
  .file-actions { width: 100%; }
  .file-actions .btn { flex: 1; }
}
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--border)); background: color-mix(in srgb, var(--danger) 8%, var(--bg-elev)); }
.alert .i { margin-top: 2px; color: var(--danger); }
.alert p { margin: 0; overflow-wrap: anywhere; }
.empty { padding: 32px 0; text-align: center; color: var(--muted); }
.sk-row { height: 82px; border-radius: 16px; background: linear-gradient(90deg, var(--bg-soft) 25%, var(--border) 37%, var(--bg-soft) 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; }
.sk-list { display: grid; gap: 10px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- prose pages ---------- */
.prose { max-width: 780px; padding-top: 56px; padding-bottom: 76px; }
.prose h1 { margin: 0 0 8px; font-size: clamp(30px, 5vw, 44px); letter-spacing: -.03em; line-height: 1.1; }
.prose .updated { margin: 0 0 28px; color: var(--muted); font-size: 17px; }
.prose h2 { margin: 34px 0 8px; font-size: 20px; }
.prose p, .prose li { color: var(--muted); }
.prose li { margin: 4px 0; }
.prose strong { color: var(--text); }
.prose a { color: var(--accent); }
.notfound { padding: 96px 20px; text-align: center; }
.notfound h1 { margin: 0 0 10px; font-size: clamp(32px, 6vw, 52px); letter-spacing: -.03em; }
.notfound .btn { margin-top: 26px; }

/* ---------- footer ---------- */
.footer { padding: 48px 0 28px; background: var(--bg-elev); border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.footer-about p { max-width: 340px; margin: 12px 0 0; color: var(--muted); font-size: 14.5px; }
.footer h4 { margin: 0 0 12px; font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer ul a { text-decoration: none; font-size: 15px; }
.footer ul a:hover { color: var(--accent); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.footer-bottom p { margin: 0; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 12px 16px;
  border-radius: 12px; background: #161821; color: #fff; font-size: 14.5px; box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .55);
  transition: opacity .2s ease, transform .2s ease;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast button { padding: 0; border: 0; background: none; color: #b4a7ff; font-weight: 700; cursor: pointer; white-space: nowrap; }

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