/* rejects — glass over wallpaper. Nothing else. */

:root {
  --glass: rgba(46, 34, 30, 0.74);       /* her uniform's warm brown-black */
  --glass-bar: rgba(38, 28, 25, 0.78);
  --stroke: rgba(255, 238, 214, 0.16);
  --gloss: rgba(255, 238, 214, 0.28);    /* specular edge, warm */
  --fg: #f3e9dc;
  --dim: #b9a898;
  --accent: #f0be4a;                     /* the yellow hair ribbon */
  --light-rgb: 255, 238, 214;
  --accent-rgb: 240, 190, 74;
  --shadow-rgb: 60, 38, 24;
  --panel-rgb: 40, 30, 27;
  --overlay-rgb: 34, 24, 20;
  --canvas: #f7f4f1;
  --radius: 12px;
  --font: "JetBrains Mono", "Cascadia Mono", "Courier New", monospace;
}

:root[data-theme="lavender"] {
  --glass: rgba(41, 32, 55, 0.76);
  --glass-bar: rgba(34, 27, 47, 0.82);
  --stroke: rgba(239, 230, 255, 0.22);
  --gloss: rgba(249, 245, 255, 0.34);
  --fg: #f7f2ff;
  --dim: #c7badb;
  --accent: #d7b9f4;
  --light-rgb: 245, 239, 255;
  --accent-rgb: 215, 185, 244;
  --shadow-rgb: 39, 27, 57;
  --panel-rgb: 36, 29, 49;
  --overlay-rgb: 30, 23, 43;
  --canvas: #f8f5fc;
}

:root[data-theme="sea-glass"] {
  --glass: rgba(30, 45, 59, 0.78);
  --glass-bar: rgba(24, 38, 51, 0.84);
  --stroke: rgba(222, 243, 243, 0.22);
  --gloss: rgba(245, 252, 250, 0.32);
  --fg: #f1f7f7;
  --dim: #b9cdd1;
  --accent: #8ddbd6;
  --light-rgb: 232, 247, 246;
  --accent-rgb: 141, 219, 214;
  --shadow-rgb: 21, 35, 48;
  --panel-rgb: 25, 41, 54;
  --overlay-rgb: 19, 31, 43;
  --canvas: #f7fbfa;
  --coral-rgb: 235, 143, 151;
}

:root[data-theme="witchlight"] {
  --glass: rgba(43, 34, 57, 0.78);
  --glass-bar: rgba(35, 28, 48, 0.84);
  --stroke: rgba(238, 229, 255, 0.23);
  --gloss: rgba(250, 245, 255, 0.34);
  --fg: #f7f2ff;
  --dim: #c8bdd8;
  --accent: #a9c9f4;
  --light-rgb: 244, 237, 255;
  --accent-rgb: 169, 201, 244;
  --shadow-rgb: 31, 23, 43;
  --panel-rgb: 37, 30, 50;
  --overlay-rgb: 28, 22, 39;
  --canvas: #f5f0fa;
}

:root[data-side="female"][data-theme="female-quiet-dusk"] {
  --glass: rgba(51, 43, 54, 0.78);
  --glass-bar: rgba(42, 35, 46, 0.84);
  --stroke: rgba(245, 229, 235, 0.23);
  --gloss: rgba(255, 245, 248, 0.32);
  --fg: #f7eef1;
  --dim: #cfbbc4;
  --accent: #d7a6b7;
  --light-rgb: 247, 232, 238;
  --accent-rgb: 215, 166, 183;
  --shadow-rgb: 50, 38, 50;
  --panel-rgb: 43, 36, 48;
  --overlay-rgb: 37, 30, 41;
  --canvas: #f3edec;
}

:root[data-side="female"][data-theme="female-ivory"] {
  --glass: rgba(47, 37, 58, 0.79);
  --glass-bar: rgba(39, 30, 50, 0.85);
  --stroke: rgba(246, 231, 239, 0.24);
  --gloss: rgba(255, 246, 250, 0.34);
  --fg: #fbf2f6;
  --dim: #d2c0d1;
  --accent: #e7a6bb;
  --light-rgb: 250, 237, 244;
  --accent-rgb: 231, 166, 187;
  --shadow-rgb: 46, 34, 54;
  --panel-rgb: 39, 31, 50;
  --overlay-rgb: 32, 25, 42;
  --canvas: #f8f3f4;
}

:root[data-side="female"][data-theme="female-sakura"] {
  --glass: rgba(65, 37, 58, 0.8);
  --glass-bar: rgba(54, 30, 49, 0.86);
  --stroke: rgba(255, 229, 243, 0.25);
  --gloss: rgba(255, 243, 249, 0.34);
  --fg: #fff1f7;
  --dim: #dfbdcf;
  --accent: #f0a9cf;
  --light-rgb: 255, 235, 246;
  --accent-rgb: 240, 169, 207;
  --shadow-rgb: 75, 38, 66;
  --panel-rgb: 52, 31, 48;
  --overlay-rgb: 43, 25, 40;
  --canvas: #fff5fa;
}

:root[data-side="female"][data-theme="female-moonlight"] {
  --glass: rgba(47, 43, 65, 0.79);
  --glass-bar: rgba(38, 35, 55, 0.85);
  --stroke: rgba(239, 232, 255, 0.24);
  --gloss: rgba(250, 247, 255, 0.34);
  --fg: #f7f3ff;
  --dim: #c9c0dc;
  --accent: #d6a9df;
  --light-rgb: 244, 239, 255;
  --accent-rgb: 214, 169, 223;
  --shadow-rgb: 43, 38, 63;
  --panel-rgb: 38, 34, 54;
  --overlay-rgb: 31, 28, 46;
  --canvas: #f7f5fb;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body {
  font-family: var(--font);
  color: var(--fg);
  overflow: hidden;
  background: var(--canvas); /* matches the wallpaper's own backdrop while it loads */
}

::selection { background: rgba(var(--accent-rgb), 0.35); }

/* ---------- wallpaper ---------- */
.wallpaper {
  position: fixed;
  inset: 0;
  background: var(--wall, url("main/witch_right_aligned_v2.png")) 80% center / cover no-repeat, var(--canvas);
}

/* soft light over the art: breaks up the flat white without hiding the girl */
.wallpaper::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(75% 90% at 18% 50%, rgba(var(--accent-rgb), 0.11), transparent 62%),
    radial-gradient(130% 130% at 50% 50%, transparent 52%, rgba(var(--shadow-rgb), 0.14) 100%),
    radial-gradient(circle at 1.5px 1.5px, rgba(var(--shadow-rgb), 0.055) 1px, transparent 1.6px) 0 0 / 22px 22px;
  pointer-events: none;
}

/* ---------- top bar ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 11.5px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 60%), var(--glass-bar);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-bottom: 1px solid var(--stroke);
  z-index: 10;
}
.topbar__brand { color: var(--accent); font-weight: 600; letter-spacing: 0.4px; }
.topbar__clock { font-variant-numeric: tabular-nums; }
.topbar__side { display: flex; align-items: center; gap: 10px; }

/* refresh arrow: rotates on click */
.topbar__spin {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.topbar__spin:hover { color: var(--accent); background: rgba(var(--light-rgb), 0.08); }
.topbar__spin:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.topbar__spin svg { width: 13px; height: 13px; }
.topbar__spin.spinning svg { animation: spin-once 0.6s cubic-bezier(.2, .8, .2, 1); }
@keyframes spin-once { to { transform: rotate(-360deg); } }

/* background switcher, bottom right */
.bg-switch {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  background: var(--glass-bar);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  color: var(--dim);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(var(--shadow-rgb), 0.25);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.bg-switch:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.45); transform: translateY(-2px); }
.bg-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bg-switch svg { width: 15px; height: 15px; }

/* ---------- stage: keeps the card in the empty left side of the art ---------- */
.stage {
  position: fixed;
  inset: 36px 0 0 0;
  display: flex;
  align-items: center;
  padding-left: clamp(24px, 12vw, 220px);
}

/* ---------- profile cards ---------- */
.cards { display: flex; flex-direction: column; gap: 14px; }
.cards[hidden] { display: none; }
.card {
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(330px, calc(100vw - 32px));
  padding: 16px 22px;
  background: linear-gradient(160deg, rgba(var(--light-rgb), 0.14) 0%, rgba(var(--light-rgb), 0) 42%), var(--glass);
  border: 1px solid var(--stroke);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  box-shadow:
    inset 0 1px 0 var(--gloss),
    0 1px 2px rgba(var(--shadow-rgb), 0.14),
    0 10px 24px rgba(var(--shadow-rgb), 0.22),
    0 28px 56px rgba(var(--shadow-rgb), 0.26);
}
/* sheen sweep on hover */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(var(--light-rgb), 0.16) 50%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 0.8s ease;
  pointer-events: none;
}
.card--link:hover::after { transform: translateX(130%); }
.card__pfp {
  width: 68px;
  height: 68px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--stroke);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}
.card__name { font-size: 17px; font-weight: 600; letter-spacing: 0.3px; }

/* ---------- mobile: center the card, shift the art so she stays visible ---------- */
@media (max-width: 700px) {
  .wallpaper { background-position: 98% center; }
  .stage { padding: 0 16px 24px; align-items: flex-end; justify-content: center; }
}

/* ======================================================================
   interaction + profile panel
   ====================================================================== */

/* clickable cards */
.card--link {
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.25s cubic-bezier(.2, .8, .2, 1), border-color 0.25s, box-shadow 0.25s;
}
.card--link:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow:
    inset 0 1px 0 var(--gloss),
    0 6px 14px rgba(var(--shadow-rgb), 0.16),
    0 22px 44px rgba(var(--shadow-rgb), 0.30),
    0 40px 80px rgba(var(--shadow-rgb), 0.30),
    0 0 0 1px rgba(var(--accent-rgb), 0.20),
    0 0 36px rgba(var(--accent-rgb), 0.18);
}
.card--link:active { transform: translateY(-1px) scale(0.99); }
.card--link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* overlay: dims + softly blurs the page behind the open panel */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 56px 16px 16px;
  background: rgba(var(--overlay-rgb), 0.38);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* cards underneath are clickable the instant it starts closing */
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}
.overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.35s ease, visibility 0s;
}

.panel {
  position: relative;
  width: min(400px, 100%);
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 44px 32px 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: linear-gradient(160deg, rgba(var(--light-rgb), 0.14) 0%, rgba(var(--light-rgb), 0) 40%), rgba(var(--panel-rgb), 0.9);
  border: 1px solid var(--stroke);
  border-radius: 28px;
  box-shadow: inset 0 1px 0 var(--gloss), 0 30px 80px rgba(var(--shadow-rgb), 0.5);
  transform: translateY(26px) scale(0.96);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(.2, .9, .2, 1), opacity 0.35s ease;
}
.panel[hidden] { display: none; }
.overlay.open .panel { transform: none; opacity: 1; }

/* contents rise in one after another, once */
.panel > * {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.5s cubic-bezier(.2, .8, .2, 1);
}
.overlay.open .panel > * { opacity: 1; transform: none; }
.overlay.open .panel > :nth-child(2) { transition-delay: 0.10s; }
.overlay.open .panel > :nth-child(3) { transition-delay: 0.16s; }
.overlay.open .panel > :nth-child(4) { transition-delay: 0.22s; }
.overlay.open .panel > :nth-child(5) { transition-delay: 0.28s; }
.overlay.open .panel > :nth-child(6) { transition-delay: 0.34s; }
.overlay.open .panel > :nth-child(7) { transition-delay: 0.40s; }
.overlay.open .panel > :nth-child(8) { transition-delay: 0.46s; }
.overlay.open .panel > :nth-child(9) { transition-delay: 0.52s; }
.overlay.open .panel > :nth-child(10) { transition-delay: 0.58s; }

/* theme picker: header near the top, list of pill rows below */
#panel-themes { padding-top: 26px; }
#panel-themes .panel__name {
  margin-top: 0;
  font-size: 24px;
  color: var(--fg);
  text-shadow: none;
}
#panel-themes .panel__name::before { content: "\201C"; color: var(--dim); }
#panel-themes .panel__name::after  { content: "\201D"; color: var(--dim); }
.theme-grid {
  margin-top: 18px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.theme-thumb {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(var(--light-rgb), 0.04);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.theme-thumb:hover { transform: translateY(-2px); border-color: rgba(var(--accent-rgb), 0.45); background: rgba(var(--light-rgb), 0.07); }
.theme-thumb.active { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.4), 0 6px 16px rgba(var(--accent-rgb), 0.15); }
.theme-thumb img { flex: none; width: 88px; height: 56px; border-radius: 8px; object-fit: cover; border: 1px solid var(--stroke); }
.theme-thumb__info { min-width: 0; }
.theme-thumb__name { display: block; font-size: 13px; font-weight: 600; color: var(--fg); }
.theme-thumb__desc { display: block; margin-top: 2px; font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.panel__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: rgba(var(--light-rgb), 0.06);
  color: var(--dim);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.panel__close:hover { background: rgba(var(--light-rgb), 0.14); color: var(--fg); transform: rotate(90deg); }
.panel__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.panel__pfp {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--stroke);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.45),
    0 0 0 6px rgba(var(--accent-rgb), 0.10),
    0 0 32px rgba(var(--accent-rgb), 0.12);
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.overlay.open .panel__pfp { animation: float 5s ease-in-out 1.2s infinite; }
.panel__name {
  margin-top: 18px;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-size: 34px;
  letter-spacing: 0.6px;
  color: var(--accent);
  text-shadow: 0 2px 14px rgba(var(--accent-rgb), 0.22);
}

/* quote line */
.panel__quote {
  margin-top: 7px;
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.2px;
  color: var(--fg);
  opacity: 0.55;
}

/* badges */
.badges { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.badge {
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--dim);
  padding: 4px 11px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(var(--light-rgb), 0.04);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.badge:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.4); transform: translateY(-2px); }

/* now playing */
.np {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 6px 16px 6px 8px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(var(--light-rgb), 0.05);
  transition: border-color 0.2s;
}
.np:hover { border-color: rgba(var(--light-rgb), 0.3); }
/* play button becomes the album cover when spotify is live; a note icon otherwise */
.np__btn {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.14);
  cursor: pointer;
  overflow: hidden;
  transition: background 0.2s, transform 0.2s;
}
.np__btn:hover { background: rgba(var(--accent-rgb), 0.28); transform: scale(1.06); }
:root[data-theme="sea-glass"] .np__btn { background: rgba(var(--coral-rgb), 0.16); }
:root[data-theme="sea-glass"] .np__btn:hover { background: rgba(var(--coral-rgb), 0.3); }
.np__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.np__btn::before {
  content: "\266A"; /* music note */
  font-size: 13px;
  color: var(--accent);
}
.np__btn:has(.np__art:not([hidden]))::before { content: none; }
.np__art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.np__art[hidden] { display: none; }
.np.playing .np__art { animation: np-spin 8s linear infinite; }
@keyframes np-spin { to { transform: rotate(360deg); } }
.np__text { font-size: 11px; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* volume */
.vol {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(var(--light-rgb), 0.05);
  font-size: 11px;
  color: var(--dim);
}
.vol__pct { width: 3.2ch; text-align: right; color: var(--fg); font-variant-numeric: tabular-nums; }
.vol__slider {
  --v: 50%;
  width: 130px;
  height: 4px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 2px;
  background: linear-gradient(to right, var(--accent) var(--v), rgba(var(--light-rgb), 0.18) var(--v));
  outline: none;
  cursor: pointer;
}
.vol__slider::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 0; transition: transform 0.15s; }
.vol__slider:hover::-webkit-slider-thumb { transform: scale(1.3); }
.vol__slider::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 0; }
.vol__slider:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* about */
.panel__about {
  margin-top: 26px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--fg);
  max-width: 32ch;
}

/* socials */
.socials { margin-top: 22px; display: flex; gap: 10px; }
.social {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  background: rgba(var(--light-rgb), 0.05);
  color: var(--dim);
  transition: transform 0.2s, color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.social:hover {
  transform: translateY(-3px);
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.1);
  box-shadow: 0 8px 18px rgba(var(--accent-rgb), 0.15);
}
.social:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.social svg { width: 15px; height: 15px; fill: currentColor; }

@media (prefers-reduced-motion: reduce) {
  .overlay, .panel, .panel > *, .card--link { transition-duration: 0.01s; transition-delay: 0s !important; }
  .np.playing .np__art { animation: none; }
  .overlay.open .panel__pfp { animation: none; }
}

/* ---------- staggered intro ---------- */
@keyframes in-wall { from { opacity: 0; } to { opacity: 1; } }
@keyframes in-bar  { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes in-card { from { opacity: 0; transform: translateY(12px) scale(0.985); } to { opacity: 1; transform: none; } }

.intro .wallpaper { animation: in-wall 0.8s ease-out both; }
.intro .topbar    { animation: in-bar 0.4s cubic-bezier(.2, .8, .2, 1) 0.05s both; }
.intro .cards > :nth-child(1) { animation: in-card 0.65s cubic-bezier(.2, .8, .2, 1) 0.15s both; }
.intro .cards > :nth-child(2) { animation: in-card 0.65s cubic-bezier(.2, .8, .2, 1) 0.35s both; }
.intro .cards > :nth-child(3) { animation: in-card 0.65s cubic-bezier(.2, .8, .2, 1) 0.55s both; }
.intro .cards > :nth-child(4) { animation: in-card 0.65s cubic-bezier(.2, .8, .2, 1) 0.75s both; }
.intro .cards > :nth-child(5) { animation: in-card 0.65s cubic-bezier(.2, .8, .2, 1) 0.95s both; }

@media (prefers-reduced-motion: reduce) {
  .intro .wallpaper, .intro .topbar, .intro .cards > * { animation: none; }
  .cards > * { animation: none; }
}

/* ======================================================================
   hero title, footer line, profile flip buttons
   (all colours come from the existing theme variables, so every
   [data-theme] works with no per-theme overrides)
   ====================================================================== */

/* title + tagline above the cards */
.hero { margin-bottom: 30px; }
.hero__title {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(44px, min(6.4vw, 9vh), 92px);
  line-height: 1;
  letter-spacing: -0.5px;
  color: rgb(var(--shadow-rgb));
}
.hero__tag {
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(var(--shadow-rgb), 0.74);
}
.hero__rule {
  display: block;
  width: 64px;
  height: 2px;
  margin-top: 18px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--accent), rgba(var(--accent-rgb), 0));
}
.intro .hero { animation: in-card 0.65s cubic-bezier(.2, .8, .2, 1) 0.15s both; }

/* footer line, bottom left, lined up with the cards */
.site-foot {
  position: fixed;
  left: clamp(24px, 12vw, 220px);
  bottom: 22px;
  z-index: 1;
  font-size: 10px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: rgba(var(--shadow-rgb), 0.62);
  pointer-events: none;
}

/* prev / next buttons beside the open profile panel.
   200px = half of the .panel width (400px); keep them in sync if the panel width changes. */
.panel-nav {
  position: absolute;
  top: calc(50% + 20px);
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: rgba(var(--panel-rgb), 0.78);
  color: var(--fg);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.panel-nav--prev { left: calc(50% - 200px - 74px); }
.panel-nav--next { right: calc(50% - 200px - 74px); }
.panel-nav:hover {
  transform: translateY(-50%) scale(1.08);
  background: rgba(var(--panel-rgb), 0.92);
  border-color: rgba(var(--accent-rgb), 0.5);
}
.panel-nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* not enough room -> drop the decorations (they would collide with the cards / her face) */
@media (max-height: 640px) { .hero { display: none; } }
@media (max-height: 760px) { .site-foot { display: none; } }
@media (max-width: 700px)  { .hero, .site-foot { display: none; } }
@media (max-width: 640px)  { .panel-nav { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .intro .hero { animation: none; }
  .panel-nav { transition-duration: 0.01s; }
}

/* ---------- not found page ---------- */
.error-page { overflow: hidden; }
.error-stage {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 76px 20px 32px;
}
.error-card {
  width: min(440px, 100%);
  padding: 42px 38px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.12), transparent 48%), rgba(var(--panel-rgb), 0.82);
  color: var(--fg);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(var(--accent-rgb), 0.14), 0 28px 70px rgba(var(--shadow-rgb), 0.38);
  backdrop-filter: blur(24px) saturate(1.25);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  animation: error-card-in 0.65s cubic-bezier(.2, .8, .2, 1) both;
}
.error-card__code {
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
}
.error-card__code span { opacity: 0.55; }
.error-card__title {
  margin-top: 22px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 38px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.15;
}
.error-card__message {
  max-width: 34ch;
  margin-top: 14px;
  color: var(--fg);
  font-size: 12px;
  line-height: 1.8;
  opacity: 0.78;
}
.error-card__home {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding: 11px 15px;
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--fg);
  font-size: 11px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.error-card__home:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.2);
}
.error-card__home:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
@keyframes error-card-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 520px) { .error-card { padding: 34px 26px; } }
@media (prefers-reduced-motion: reduce) { .error-card { animation: none; } }

/* ======================================================================
   discord presence (presence.js)
   ====================================================================== */

/* status dot pinned to the bottom-right of the card avatar
   (offsets derive from .card padding 22px/16px + .card__pfp 68px) */
.card__dot {
  position: absolute;
  left: 72px;
  top: 66px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2.5px solid rgb(var(--panel-rgb));
  background: #747f8d;
  transition: background 0.3s;
  z-index: 1;
}

/* status colours (discord's own palette) */
.card__dot.is-online,  .panel__dot.is-online  { background: #43b581; }
.card__dot.is-idle,    .panel__dot.is-idle    { background: #faa61a; }
.card__dot.is-dnd,     .panel__dot.is-dnd     { background: #f04747; }
.card__dot.is-offline, .panel__dot.is-offline { background: #747f8d; }

/* avatar + status orb share a positioning context */
.pfp-wrap { position: relative; width: 104px; height: 104px; }

/* bigger dot on the panel avatar, bottom-right like discord's own profile */
.panel__dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 4px solid rgb(var(--panel-rgb));
  background: #747f8d;
  transition: background 0.3s;
  z-index: 2;
}

/* ---- music bar: cleaner pill ---- */
.np {
  padding: 7px 18px 7px 8px;
  gap: 11px;
  width: min(320px, 100%);
}
.np__art {
  width: 30px;
  height: 30px;
  border: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.np__text {
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  letter-spacing: 0.2px;
}
.np__bar {
  flex: none;
  width: 40px;
  height: 3px;
  border-radius: 2px;
  background: rgba(var(--light-rgb), 0.14);
  overflow: hidden;
}
.np__bar[hidden] { display: none; }
.np__bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: var(--accent);
  transition: width 1s linear;
}

/* narrow windows: let the bar shrink gracefully instead of clipping text */
@media (max-width: 460px) {
  .np { width: 100%; gap: 8px; padding-right: 12px; }
  .np__bar { display: none; }
  .np__text { font-size: 10.5px; }
  .panel__dot { width: 22px; height: 22px; border-width: 3px; }
}

/* ======================================================================
   cursor glow (cursor.js) — tinted by the active theme's accent
   ====================================================================== */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 9999;
  will-change: transform;
  width: 220px;
  height: 220px;
  margin: -110px 0 0 -110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.10) 0%, rgba(var(--accent-rgb), 0.04) 38%, transparent 68%);
}
.cursor-on .cursor-glow { opacity: 1; }
.cursor-hot .cursor-glow { background: radial-gradient(circle, rgba(var(--accent-rgb), 0.16) 0%, rgba(var(--accent-rgb), 0.06) 38%, transparent 68%); }

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-glow { display: none; }
}

/* spotify mode additions inside the music bar */
.np__bar {
  flex: none;
  width: 52px;
  height: 3px;
  border-radius: 2px;
  background: rgba(var(--light-rgb), 0.16);
  overflow: hidden;
}
.np__bar[hidden] { display: none; }
.np__bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.4s linear;
}
