﻿/* ==========================================================
   anidub.io â€“ Global styles
   Purple + black theme, layout modelled on dublaj.io
   ========================================================== */

:root {
  /* Colors â€” gunmetal gray + red chroma */
  --bg: #0d0d0f;
  --bg-elevated: #141416;
  --bg-card: #1a1a1d;
  --bg-card-hover: #212125;
  --border: #2b2b30;
  --border-strong: #3b3b42;
  --text: #f5f5f6;
  --text-muted: #a4a4ac;
  --text-dim: #6e6e77;
  --accent-rgb: 255, 45, 61;
  --accent: rgb(var(--accent-rgb));
  --accent-hover: #ff5566;
  --accent-soft: rgba(var(--accent-rgb), 0.13);
  --accent-glow: rgba(var(--accent-rgb), 0.45);
  --danger: #ff4d4d;

  /* Typography */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* Layout */
  --container: 1200px;
  --gutter: 16px;
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 64px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Ambient red lighting behind everything, for a lit gunmetal look. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 40% at 82% -5%, rgba(var(--accent-rgb), 0.10), transparent 60%),
    radial-gradient(55% 45% at 0% 100%, rgba(var(--accent-rgb), 0.06), transparent 60%);
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main {
  flex: 1;
}

.section {
  padding: 96px 0;
}

/* Skip rendering work for sections still far below the fold. */
.section:not(.hero-adjacent) {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

.section + .section {
  border-top: 1px solid var(--border);
}

/* ---------- Typography ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.headline {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.section-head > p {
  color: var(--text-muted);
  max-width: 320px;
  text-align: right;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
}

h2 {
  font-size: 1.4rem;
  font-weight: 600;
}

.muted {
  color: var(--text-muted);
}

.mono {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.placeholder {
  color: var(--text-muted);
  padding: 48px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  text-align: center;
  margin: 48px 0;
}

.page-title {
  padding: 48px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.page-title p {
  color: var(--text-muted);
  margin-top: 6px;
  max-width: 560px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-light {
  background: var(--text);
  color: #0a0a0f;
}

.btn-light:hover {
  background: #fff;
}

.btn-outline {
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.btn-ghost {
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--bg-card);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.85rem;
}

.icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
}

.icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(var(--accent-rgb), 0.12), 0 8px 30px -12px rgba(0, 0, 0, 0.7);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Logo: "AD" monogram + wordmark. The tile stays dark, "anidub" stays white,
   and the accent parts (AD letters + ·io) follow the chosen theme colour. */
.logo {
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-right: 10px;
  border-radius: 9px;
  background: linear-gradient(150deg, #1a1622, #050507);
  border: 1px solid #2c2540;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  color: var(--accent-hover);
  box-shadow: 0 0 18px -6px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.logo-text {
  display: inline-flex;
  align-items: baseline;
}

.logo .dot {
  color: var(--accent);
  margin: 0 1px;
}

.logo .tld {
  color: var(--accent);
}

.footer-brand .logo-mark {
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  border-radius: 11px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  transition: color 0.15s, background 0.15s;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
}

.nav a.active {
  background: var(--accent-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header-actions .btn-x {
  width: 36px;
  height: 34px;
  padding: 0;
}

/* Crawlable, user-facing directory for the site's primary destinations. */
.site-directory {
  padding-bottom: 40px;
}

.site-directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.site-directory-grid a {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 112px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color 0.18s, transform 0.18s, background 0.18s;
}

.site-directory-grid a:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.52);
  background: var(--bg-elevated);
}

.site-directory-grid strong {
  color: var(--text);
  font-size: 1rem;
}

.site-directory-grid span {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border-strong);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 64px var(--gutter) 40px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.footer-brand .logo {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.footer-brand p {
  max-width: 260px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.social {
  display: flex;
  gap: 8px;
}

.social a {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}

.social a:hover {
  border-color: var(--accent);
  color: var(--text);
}

.social svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.footer-col h4 {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
  margin-bottom: 18px;
}

.footer-col a {
  display: block;
  padding: 5px 0;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ==========================================================
   Utilities
   ========================================================== */

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.small {
  font-size: 0.875rem;
}

.headline-sm {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
}

.section-lead {
  color: var(--text-muted);
  max-width: 440px;
  margin-top: 16px;
}

.section-more {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ==========================================================
   Components
   ========================================================== */

/* ---------- Panel (glassy dark box) ---------- */

.panel {
  background: rgba(15, 15, 22, 0.72);
  border: 1px solid var(--border);
  border-radius: 4px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ---------- Badges ---------- */

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.75);
  color: var(--text);
}

.badge-adult {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.badge-accent {
  background: var(--accent);
  color: #fff;
}

.duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.78);
}

/* ---------- 16:9 thumbnail ---------- */

.thumb {
  --h: 265;
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 20% 10%, hsl(var(--h) 75% 45% / 0.55), transparent 60%),
    radial-gradient(90% 80% at 90% 100%, hsl(calc(var(--h) + 40) 80% 35% / 0.5), transparent 60%),
    linear-gradient(135deg, hsl(var(--h) 35% 14%), #0b0b10 80%);
  isolation: isolate;
}

.thumb::after {
  /* subtle scanlines for an "on-screen" feel */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
  pointer-events: none;
}

.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.3s;
}

/* Darkens the bottom for the duration badge and adds a light purple tint to match the theme */
.thumb-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(10, 10, 15, 0.75), transparent 45%),
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.18), transparent 60%);
  transition: background-color 0.3s;
}

.scene-card:hover .thumb-shade {
  background-color: rgba(10, 10, 15, 0.35);
}

.thumb-source {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  font-weight: 900;
  font-size: clamp(1rem, 2.2vw, 1.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.16);
  transition: transform 0.4s ease, color 0.3s;
}

.thumb-cta {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -40%);
  opacity: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.2s;
}

/* ---------- Scene card + grid ---------- */

.scene-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 16px;
}

.scene-card {
  display: block;
  min-width: 0;
}

.scene-card .thumb {
  margin-bottom: 12px;
  outline: 1px solid transparent;
  transition: outline-color 0.2s, box-shadow 0.2s;
}

.scene-card:hover .thumb {
  outline-color: var(--accent);
  box-shadow: 0 8px 32px -8px var(--accent-glow);
}

.scene-card:hover .thumb img,
.scene-card:hover .thumb-source {
  transform: scale(1.05);
}

.scene-card:hover .thumb-source {
  color: rgba(255, 255, 255, 0.08);
}

.scene-card:hover .thumb-cta,
.scene-card:focus-visible .thumb-cta {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.scene-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Favourite heart (on cards) ---------- */

.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.15s, transform 0.15s, background 0.15s, color 0.15s;
}

.scene-card:hover .fav-btn,
.fav-btn.is-fav,
.fav-btn:focus-visible {
  opacity: 1;
  transform: scale(1);
}

.fav-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: fill 0.15s, stroke 0.15s;
}

.fav-btn:hover {
  background: rgba(0, 0, 0, 0.75);
}

.fav-btn.is-fav {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.fav-btn.is-fav svg {
  fill: var(--accent);
  stroke: var(--accent);
}

/* Favourite toggle button (scene detail) */
.fav-toggle .fav-ic {
  width: 16px;
  height: 16px;
  display: inline-flex;
}

.fav-toggle .fav-ic svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.fav-toggle.is-fav {
  border-color: var(--accent);
  color: var(--accent-hover);
}

.fav-toggle.is-fav .fav-ic svg {
  fill: var(--accent);
  stroke: var(--accent);
}

/* ---------- Play button ---------- */

.play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.play-btn svg {
  width: 24px;
  height: 24px;
  fill: #fff;
  margin-left: 3px;
}

a:hover > .play-btn {
  background: var(--accent);
  transform: translate(-50%, -50%) scale(1.06);
}

/* ---------- Skip link ---------- */

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2000;
  transform: translateY(-160%);
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: transform 0.15s;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Cookie / storage notice ---------- */

.cookie-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1500;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 20px 50px -18px rgba(0, 0, 0, 0.8);
}

.cookie-bar p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cookie-bar a {
  color: var(--accent-hover);
  text-decoration: underline;
}

.cookie-bar .btn {
  flex: 0 0 auto;
}

@media (max-width: 560px) {
  .cookie-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}

/* ---------- Stats strip ---------- */

.stats-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
}

.stat {
  padding: 28px 16px;
  text-align: center;
}

.stat strong {
  display: block;
  font-family: "Space Grotesk", var(--font);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--accent-hover);
  line-height: 1;
  margin-bottom: 6px;
}

.stat span {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

@media (max-width: 560px) {
  .stats-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat {
    padding: 22px 12px;
  }
}

/* ---------- FAQ ---------- */

.faq {
  margin-top: 36px;
  max-width: 800px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: color 0.15s;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 1.3rem;
  color: var(--accent);
  transition: transform 0.2s;
  flex: 0 0 auto;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary:hover {
  color: var(--accent-hover);
}

.faq-item p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--text-muted);
  font-size: 0.93rem;
}

/* ==========================================================
   Home page
   ========================================================== */

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding: 96px 0 120px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 120%, #24090d 0%, var(--bg) 62%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.5;
  will-change: transform;
  animation: drift 22s ease-in-out infinite alternate;
}

/* When the hero scrolls out of view, stop all its looping animations. */
.hero.paused *,
.hero.paused .hero-glow {
  animation-play-state: paused !important;
}

.hero-glow-1 {
  width: 520px;
  height: 520px;
  left: -120px;
  top: -80px;
  background: var(--accent);
}

.hero-glow-2 {
  width: 460px;
  height: 460px;
  right: -140px;
  bottom: -60px;
  background: rgba(var(--accent-rgb), 0.6);
  opacity: 0.4;
  animation-duration: 22s;
  animation-direction: alternate-reverse;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(80px, 60px) scale(1.15); }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(var(--accent-rgb), 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}

.hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  padding: 0 var(--gutter);
  opacity: 0.35;
  mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
}

.hero-wave span {
  flex: 1;
  max-width: 6px;
  height: var(--bar-h);
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, var(--accent), transparent);
  transform-origin: bottom;
  animation: wave 1.6s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% { transform: scaleY(0.35); }
  50%      { transform: scaleY(1); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-rotator {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 48px;
}

.rotator-word {
  display: inline-block;
  color: var(--text);
  font-weight: 700;
  padding: 0 4px;
  border-bottom: 2px solid var(--accent);
  transition: opacity 0.3s, transform 0.3s;
}

.rotator-word.out {
  opacity: 0;
  transform: translateY(8px);
}

.hero-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  max-width: 920px;
  margin: 0 auto;
  text-align: left;
}

/* Enter a room */

.room-panel {
  padding: 26px;
  border-radius: 14px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(var(--accent-rgb), 0.10), transparent 55%),
    rgba(18, 18, 21, 0.72);
}

.room-panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.room-panel-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  color: var(--accent-hover);
  box-shadow: 0 0 22px -6px var(--accent-glow);
}

.room-panel-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.room-panel-head .mono {
  color: var(--accent-hover);
  margin-bottom: 3px;
}

.room-lead {
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
}

.room-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.room-btn {
  padding: 14px 14px;
}

.room-btn-ic {
  width: 16px;
  height: 16px;
  display: inline-flex;
}

.room-btn-ic svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.join-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.join-form input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--mono);
  font-size: 1rem;
  letter-spacing: 0.3em;
  padding: 10px 14px;
  text-transform: uppercase;
}

.join-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.join-error {
  color: var(--danger);
  font-size: 0.85rem;
  min-height: 0;
  margin-top: 6px;
}

.join-error:empty {
  display: none;
}

.room-perks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 20px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.room-perks li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.room-perks li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

/* How to play slider */

.howto-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.howto-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 14px;
}

.howto-head .eyebrow {
  margin: 0;
}

.howto-progress {
  height: 2px;
  background: var(--border);
}

.howto-progress span {
  display: block;
  height: 100%;
  width: 25%;
  background: var(--accent);
  transition: width 0.4s ease;
}

.howto-slides {
  position: relative;
  flex: 1;
  min-height: 170px;
}

.howto-slide {
  position: absolute;
  inset: 0;
  display: flex;
  gap: 16px;
  padding: 24px 24px;
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.35s, transform 0.35s;
  pointer-events: none;
}

.howto-slide.active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.howto-slide h3 {
  font-size: 1.2rem;
  margin: 2px 0 6px;
}

.howto-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--accent);
}

.howto-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.howto-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.howto-arrow {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  color: var(--text-muted);
  transition: color 0.15s, border-color 0.15s;
}

.howto-arrow:hover {
  color: var(--text);
  border-color: var(--accent);
}

.howto-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.howto-dot {
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--border-strong);
  transition: width 0.25s, background 0.25s;
}

.howto-dot.active {
  width: 24px;
  background: var(--accent);
}

/* REC indicator */

.rec-indicator {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(460px, calc(100% - 48px));
  padding: 7px 12px;
  border: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.8);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.rec-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-hover);
}

.rec-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: blink 1.2s steps(2, start) infinite;
}

@keyframes blink {
  to { visibility: hidden; }
}

.rec-line {
  padding: 0 12px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.rec-time {
  color: var(--text-dim);
}

/* ---------- Scene of the week ---------- */

.sotw {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    radial-gradient(120% 100% at 100% 0%, var(--accent-soft), transparent 55%),
    var(--bg-card);
}

.sotw-media {
  border-radius: 10px;
  width: 100%;
}

.sotw-info .headline {
  margin: 6px 0 6px;
}

.sotw-source {
  color: var(--accent-hover);
  margin-bottom: 12px;
}

.sotw-info .muted {
  margin-bottom: 20px;
}

.sotw-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 820px) {
  .sotw {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ---------- Four steps ---------- */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 56px;
}

.step {
  position: relative;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.step-marker {
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.step h3 {
  font-size: 1.05rem;
  margin: 6px 0 8px;
}

.step .muted {
  font-size: 0.9rem;
}

/* ---------- Dub of the day ---------- */

.dotd {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 64px;
  align-items: start;
}

.dotd-text .headline {
  margin-bottom: 14px;
}

.dotd-text .muted {
  max-width: 320px;
  margin-bottom: 24px;
}

.dotd-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-card);
}

.dotd-media {
  border-radius: 0;
}

.dotd-media .thumb-source {
  font-size: clamp(1.4rem, 4vw, 2.6rem);
}

.dotd-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.dotd-info h3 {
  font-size: 1rem;
  margin-bottom: 2px;
}

/* ---------- Discord CTA ---------- */

.discord-cta {
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(var(--accent-rgb), 0.14), transparent 60%);
}

.discord-badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  color: var(--accent-hover);
}

.discord-badge svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.discord-cta h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  margin-bottom: 8px;
}

.discord-cta .muted {
  margin-bottom: 24px;
}

/* ==========================================================
   Scenes listing page
   ========================================================== */

.page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.page-actions .dice {
  font-size: 1rem;
}

.suggest-cta {
  margin-top: 56px;
  padding: 28px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
}

.suggest-cta p {
  color: var(--text-muted);
  margin-bottom: 14px;
}

.filters {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.search-box {
  position: relative;
  max-width: 420px;
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--text-dim);
  stroke-width: 2;
  stroke-linecap: round;
}

.search-box input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  padding: 11px 14px 11px 40px;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.filter-label {
  flex: 0 0 64px;
  color: var(--text-dim);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-btn {
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.chip-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.chip-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* 18+ toggle */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  transition: background 0.2s, border-color 0.2s;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.2s, background 0.2s;
}

.switch input:checked + .switch-track {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.switch input:checked + .switch-track::after {
  transform: translateX(18px);
  background: var(--accent);
}

.switch input:focus-visible + .switch-track {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.switch-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Grouped results */
.scene-group {
  margin-bottom: 48px;
}

.group-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 20px;
}

.group-head h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.group-head .mono {
  color: var(--text-dim);
}

.empty {
  text-align: center;
  padding: 80px 0;
}

.empty .headline {
  margin-bottom: 8px;
}

/* ==========================================================
   Create a room page
   ========================================================== */

/* Share box (room code + invite link) */
.share-box {
  padding: 24px 28px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background:
    radial-gradient(120% 100% at 0% 0%, var(--accent-soft), transparent 55%),
    var(--bg-card);
  margin-bottom: 20px;
}

.share-box .eyebrow {
  margin-bottom: 16px;
}

.share-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px 28px;
  margin-bottom: 14px;
}

.share-field {
  min-width: 0;
}

.share-field > .mono {
  display: block;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.share-value {
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-value code {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-value .btn {
  flex: 0 0 auto;
}

.room-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-top: 8px;
}

/* Invite landing page */
.join-screen {
  max-width: 520px;
  margin: 0 auto;
  padding: 96px 0;
  text-align: center;
}

.join-screen h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin: 10px 0 8px;
}

.join-screen .muted {
  margin-bottom: 24px;
}

.join-screen #join-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.join-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--border-strong);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  margin-bottom: 24px;
}

.join-error-state .join-spinner {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .share-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.room-col {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
}

.room-col-join {
  border-color: var(--border-strong);
  background:
    radial-gradient(120% 80% at 100% 0%, var(--accent-soft), transparent 60%),
    var(--bg-card);
}

.room-col h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 4px 0 10px;
}

.room-col .muted {
  margin-bottom: 20px;
}

.room-hint {
  margin-top: 14px;
  color: var(--text-dim);
}

.code-form {
  display: flex;
  gap: 8px;
}

.code-form input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--mono);
  font-size: 1.1rem;
  letter-spacing: 0.25em;
  padding: 12px 16px;
  text-transform: uppercase;
}

.code-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.code-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 10px;
  min-height: 1px;
}

.code-error:empty {
  display: none;
}

@media (max-width: 820px) {
  .room-cols {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   Room invite page
   ========================================================== */

.invite-page-body {
  overflow-x: hidden;
  background:
    radial-gradient(680px 420px at 50% 28%, rgba(var(--accent-rgb), 0.10), transparent 72%),
    var(--bg);
}

.invite-main {
  display: flex;
  align-items: center;
  padding: 64px 0 88px;
}

.invite-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.invite-card {
  position: relative;
  width: 100%;
  max-width: 720px;
  overflow: hidden;
  padding: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.055), transparent 38%),
    var(--bg-elevated);
  box-shadow: 0 36px 100px -38px rgba(0, 0, 0, 0.95), 0 0 64px -42px var(--accent-glow);
}

.invite-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.75;
}

.invite-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 7px 10px;
  border: 1px solid rgba(92, 214, 132, 0.22);
  border-radius: 999px;
  background: rgba(92, 214, 132, 0.07);
}

.invite-status .mono {
  color: #8cdaa7;
  letter-spacing: 0.11em;
}

.invite-status-dot,
.invite-player-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5cd684;
  box-shadow: 0 0 10px rgba(92, 214, 132, 0.65);
}

.invite-status-dot {
  animation: invite-pulse 2s ease-in-out infinite;
}

@keyframes invite-pulse {
  50% { opacity: 0.45; box-shadow: 0 0 4px rgba(92, 214, 132, 0.3); }
}

.invite-host {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.invite-host strong {
  color: var(--text);
}

.invite-avatar {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  object-fit: cover;
  object-position: center 28%;
  border: 2px solid rgba(var(--accent-rgb), 0.48);
  border-radius: 50%;
  background: var(--bg-card);
  box-shadow: 0 0 18px -6px var(--accent-glow);
}

.invite-card > h1 {
  max-width: 540px;
  font-size: clamp(2.15rem, 6vw, 3.65rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.invite-lead {
  max-width: 580px;
  margin: 16px 0 28px;
  font-size: 1rem;
}

.invite-scene {
  display: grid;
  grid-template-columns: 210px 1fr;
  align-items: center;
  gap: 20px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(8, 8, 10, 0.46);
}

.invite-scene-thumb {
  border-radius: 9px;
}

.invite-scene-copy {
  min-width: 0;
}

.invite-scene-copy .mono {
  color: var(--accent-hover);
}

.invite-scene-copy h2 {
  margin: 5px 0 4px;
  font-size: 1.1rem;
  font-weight: 750;
  line-height: 1.28;
}

.invite-scene-copy p {
  font-size: 0.85rem;
}

.invite-scene-copy > a {
  display: inline-flex;
  margin-top: 10px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 650;
}

.invite-scene-copy > a:hover {
  color: var(--accent-hover);
}

.invite-room-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 22px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(8, 8, 10, 0.36);
}

.invite-room-meta > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 15px 18px;
}

.invite-room-meta > div + div {
  border-left: 1px solid var(--border);
}

.invite-room-meta .mono {
  font-size: 0.62rem;
  letter-spacing: 0.13em;
}

.invite-room-meta strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
}

.invite-code {
  font-family: var(--mono);
  letter-spacing: 0.12em;
}

.invite-actions {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
}

.invite-actions svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.invite-join svg {
  transition: transform 0.18s ease;
}

.invite-join:hover svg {
  transform: translateX(3px);
}

.invite-join.is-opening {
  pointer-events: none;
  opacity: 0.78;
}

#copy-invite.is-copied {
  border-color: rgba(92, 214, 132, 0.5);
  color: #8cdaa7;
  background: rgba(92, 214, 132, 0.07);
}

.invite-launcher-note {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 0.76rem;
  text-align: center;
}

.invite-launcher-note a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.invite-launcher-note a:hover {
  color: var(--text);
}

.invite-footnote {
  margin-top: 18px;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.invite-footnote span {
  margin-right: 6px;
  color: var(--accent);
}

@media (max-width: 640px) {
  .invite-main {
    align-items: flex-start;
    padding: 28px 0 56px;
  }

  .invite-card {
    padding: 26px 20px 22px;
    border-radius: 16px;
  }

  .invite-card > h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .invite-scene {
    grid-template-columns: 116px 1fr;
    gap: 13px;
    padding: 10px;
  }

  .invite-scene-copy h2 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.94rem;
  }

  .invite-scene-copy p,
  .invite-scene-copy > a {
    display: none;
  }

  .invite-room-meta {
    grid-template-columns: 1fr 1fr;
  }

  .invite-actions {
    grid-template-columns: 1fr;
  }

  .invite-footnote {
    text-align: center;
  }
}

@media (max-width: 520px) {
  .invite-page-body .header-inner {
    gap: 6px;
  }
}

/* ==========================================================
   Sign in page
   ========================================================== */

.auth-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
  max-width: 900px;
  margin: 0 auto;
  padding: 64px 0 96px;
}

.auth-card {
  padding: 40px 36px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(var(--accent-rgb), 0.10), transparent 55%),
    var(--bg-elevated);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), 0 0 50px -24px var(--accent-glow);
  text-align: center;
}

.auth-logo {
  font-size: 1.5rem;
  display: inline-block;
  margin-bottom: 28px;
}

.auth-card h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.auth-card > .muted {
  margin-bottom: 28px;
}

/* Email/password form on the auth card */
.auth-card #email-form {
  text-align: left;
  margin-bottom: 12px;
}

.auth-card #email-form .field {
  margin-bottom: 14px;
}

.field-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin: 6px 2px 0;
}

.auth-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin: 0 0 12px;
  min-height: 1px;
}

.auth-error:empty {
  display: none;
}

.auth-submit {
  width: 100%;
}

.auth-forgot {
  margin: -4px 0 14px;
  font-size: 0.85rem;
}

.auth-switch {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.linklike {
  color: var(--accent-hover);
  font-weight: 600;
  text-decoration: underline;
  font-size: inherit;
}

.linklike:hover {
  color: var(--accent);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 4px 0 16px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  background: #fff;
  color: #1f1f1f;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.12s, box-shadow 0.15s;
}

.google-btn:hover {
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
  transform: translateY(-1px);
}

.google-ic {
  display: inline-flex;
  background: #fff;
  border-radius: 3px;
}

.auth-status {
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--accent-hover);
  min-height: 1px;
  opacity: 0;
  transition: opacity 0.2s;
}

.auth-status.show {
  opacity: 1;
}

.auth-terms {
  margin-top: 24px;
  font-size: 0.8rem;
}

.auth-terms a {
  color: var(--text-muted);
  text-decoration: underline;
}

.auth-terms a:hover {
  color: var(--text);
}

.auth-aside {
  padding: 40px 32px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-aside .eyebrow {
  margin-bottom: 20px;
}

.auth-perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.auth-perks li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.ap-ic {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  color: var(--accent-hover);
}

.ap-ic svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-perks strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.auth-perks span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

@media (max-width: 780px) {
  .auth-wrap {
    grid-template-columns: 1fr;
    max-width: 460px;
    padding-top: 40px;
  }

  .auth-aside {
    order: -1;
    padding: 28px;
  }
}

.auth-wrap-single {
  grid-template-columns: 1fr;
  max-width: 480px;
}

/* Header accent colour picker */
.theme-menu-wrap {
  position: relative;
}

.theme-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  transition: border-color 0.15s, background 0.15s;
}

.theme-btn:hover,
.theme-btn[aria-expanded="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px -1px var(--accent-glow);
}

.theme-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 14px;
  z-index: 200;
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.8), 0 0 40px -20px var(--accent-glow);
  animation: acct-pop 0.16s ease;
}

.theme-menu-title {
  color: var(--text-dim);
  margin-bottom: 12px;
}

.theme-menu .swatches {
  margin-bottom: 12px;
}

.theme-menu-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .theme-menu {
    position: fixed;
    top: calc(var(--header-h) + 6px);
    right: 12px;
    left: auto;
    width: min(240px, calc(100vw - 24px));
  }
}

/* Account chip + dropdown in the header (preview username) */
.acct {
  position: relative;
}

.acct-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s;
}

.acct-chip:hover,
.acct-chip[aria-expanded="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.acct-caret {
  width: 14px;
  height: 14px;
  display: inline-flex;
  color: var(--text-muted);
  transition: transform 0.18s;
}

.acct-caret svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.acct-chip[aria-expanded="true"] .acct-caret {
  transform: rotate(180deg);
}

.acct-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.8), 0 0 40px -20px var(--accent-glow);
  z-index: 200;
  animation: acct-pop 0.16s ease;
}

@keyframes acct-pop {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

.acct-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.acct-avatar-lg {
  width: 36px;
  height: 36px;
  font-size: 1rem;
}

.acct-menu-id {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.acct-menu-id strong {
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acct-menu-id .mono {
  color: var(--text-dim);
}

.acct-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  padding: 10px 10px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.13s, color 0.13s;
}

.acct-item:hover {
  background: var(--bg-card);
  color: var(--text);
}

.acct-ic {
  width: 18px;
  height: 18px;
  display: inline-flex;
  color: var(--text-dim);
}

.acct-item:hover .acct-ic {
  color: var(--accent-hover);
}

.acct-ic svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.acct-sep {
  height: 1px;
  background: var(--border);
  margin: 6px 4px;
}

.acct-signout {
  color: #ff6b6b;
}

.acct-signout:hover {
  background: rgba(255, 77, 77, 0.1);
  color: #ff8080;
}

.acct-signout:hover .acct-ic {
  color: #ff8080;
}

.acct-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), rgba(var(--accent-rgb), 0.5));
}

.acct-name {
  font-size: 0.9rem;
}

/* Linked account confirmation on the username step */
.linked-account {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  margin-bottom: 28px;
}

.linked-avatar {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}

.linked-avatar svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.linked-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.linked-text strong {
  font-size: 0.92rem;
}

.linked-text .mono {
  color: var(--text-dim);
}

.linked-check {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent-hover);
}

.linked-check svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Username input */
.username-field {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.username-field.is-ok {
  border-color: #2ecc71;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.14);
}

.username-field.is-bad {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.14);
}

.username-field .at {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 1.05rem;
}

.username-field input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  padding: 13px 6px;
  outline: none;
}

.username-state {
  font-weight: 700;
}

.username-field.is-ok .username-state {
  color: #2ecc71;
}

.username-field.is-bad .username-state {
  color: var(--danger);
}

.username-hint {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 10px 2px 0;
  text-align: left;
}

.username-hint.good {
  color: #2ecc71;
}

.username-hint.bad {
  color: var(--danger);
}

.username-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  margin: 20px 0;
}

.up-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), rgba(var(--accent-rgb), 0.5));
}

.up-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.up-text strong {
  font-size: 1rem;
}

.up-text .mono {
  color: var(--text-dim);
}

.username-submit {
  width: 100%;
  margin-top: 8px;
}

.auth-preview-note {
  margin-top: 22px;
  padding: 12px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
}

.auth-preview-note p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ==========================================================
   Profile page
   ========================================================== */

.profile-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.profile-avatar {
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), rgba(var(--accent-rgb), 0.5));
  box-shadow: 0 0 30px -8px var(--accent-glow);
}

.profile-id {
  flex: 1;
  min-width: 0;
}

.profile-id h1 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
}

.profile-id .mono {
  color: var(--text-dim);
  margin: 2px 0 12px;
}

.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.profile-stats strong {
  color: var(--text);
}

.profile-block {
  margin-bottom: 56px;
}

.profile-block .section-head {
  margin-bottom: 24px;
}

/* ==========================================================
   Settings page
   ========================================================== */

.settings {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 0 96px;
}

.settings-head {
  margin-bottom: 32px;
}

.settings-head h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 6px;
}

.settings-section {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
  padding: 8px 20px;
  margin-bottom: 20px;
}

.settings-section > h2 {
  font-size: 0.72rem;
  font-family: var(--mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--border);
  margin: 0 0 4px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.settings-row + .settings-row {
  border-top: 1px solid var(--border);
}

.settings-label {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.settings-label strong {
  display: block;
  font-size: 0.98rem;
}

.settings-desc {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

.settings-note {
  color: var(--text-dim);
  font-size: 0.72rem;
  text-align: center;
  margin-top: 8px;
}

.danger-text {
  color: #ff6b6b;
}

.btn-danger {
  background: rgba(255, 77, 77, 0.12);
  border: 1px solid rgba(255, 77, 77, 0.4);
  color: #ff6b6b;
}

.btn-danger:hover:not([disabled]) {
  background: var(--danger);
  color: #fff;
}

.settings-row-col {
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.theme-picker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--sw);
  border: 2px solid transparent;
  box-shadow: 0 0 0 1px var(--border-strong);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}

.swatch:hover {
  transform: scale(1.12);
}

.swatch.active {
  border-color: var(--bg);
  box-shadow: 0 0 0 2px var(--sw), 0 0 14px -2px var(--sw);
}

.custom-color {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
}

.custom-color:hover {
  border-color: var(--accent);
  color: var(--text);
}

.custom-color input[type="color"] {
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  cursor: pointer;
}

.custom-color input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.custom-color input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
}

.settings-empty {
  text-align: center;
  padding: 120px 0;
}

.settings-empty .headline {
  margin-bottom: 10px;
}

.settings-empty .muted {
  margin-bottom: 26px;
}

@media (max-width: 560px) {
  .settings-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================
   Requests & suggestions form
   ========================================================== */

.suggest-wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 56px 0 96px;
}

.suggest-wrap .doc-head {
  padding-bottom: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.suggest-wrap .doc-head h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.suggest-wrap .lead {
  color: var(--text-muted);
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 8px;
}

.field .opt {
  color: var(--text-dim);
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  padding: 12px 14px;
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239a9aad' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* honeypot hidden from people */
.hp {
  position: absolute;
  left: -5000px;
}

.suggest-msg {
  margin-top: 12px;
  font-size: 0.88rem;
  min-height: 1px;
}

.suggest-msg.good {
  color: #2ecc71;
}

.suggest-msg.bad {
  color: var(--danger);
}

.suggest-msg:empty {
  display: none;
}

.suggest-done {
  text-align: center;
  padding: 40px 0;
}

.done-ic {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  color: var(--accent-hover);
}

.done-ic svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.suggest-done h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.suggest-done-cta {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.suggest-note {
  margin-top: 28px;
  font-size: 0.85rem;
  text-align: center;
}

.suggest-note a {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ==========================================================
   Content / legal pages
   ========================================================== */

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 0 96px;
}

.doc-head {
  padding-bottom: 28px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.doc-head h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.doc-head .lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 620px;
}

.doc-body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 40px 0 12px;
}

.doc-body h2:first-child {
  margin-top: 0;
}

.doc-body p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.doc-body ul {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.doc-body li {
  position: relative;
  color: var(--text-muted);
  padding-left: 22px;
  margin-bottom: 10px;
}

.doc-body li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--accent);
}

.doc-body a {
  color: var(--accent-hover);
}

.doc-body a:hover {
  text-decoration: underline;
}

.doc-body strong {
  color: var(--text);
}

.doc-updated {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 8px;
}

.doc-note {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--bg-card);
  margin: 24px 0;
}

.doc-note p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* About page extras */
.about-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0 8px;
}

.about-value {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}

.about-value h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.about-value p {
  font-size: 0.9rem;
  margin: 0;
}

/* Contact page */
.contact-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.contact-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  transition: border-color 0.15s;
}

.contact-card:hover {
  border-color: var(--accent);
}

.contact-card .c-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  color: var(--accent-hover);
}

.contact-card .c-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.contact-card h3 {
  font-size: 1rem;
  margin-bottom: 3px;
}

.contact-card p {
  margin: 0;
  font-size: 0.88rem;
}

@media (max-width: 640px) {
  .about-values,
  .contact-methods {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   Dubs pages
   ========================================================== */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.tab {
  padding: 12px 18px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--text);
  border-color: var(--accent);
}

/* Featured dub */
.featured-dub {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 40px;
}

.featured-media {
  border-radius: 8px;
  width: 100%;
  border: none;
  padding: 0;
  cursor: pointer;
}

.featured-info h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 6px 0 6px;
}

.featured-info .muted {
  margin-bottom: 16px;
}

.featured-stats {
  display: flex;
  gap: 16px;
  color: var(--text-dim);
  margin: 16px 0 20px;
}

/* Voice chips */
.voice-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.voice-chip {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  color: var(--accent-hover);
}

/* Toolbar */
.dubs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.dubs-toolbar #dub-count {
  color: var(--text-dim);
}

/* Past winners hall of fame (Dub of the Day) */
.winners-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.winner-row {
  display: grid;
  grid-template-columns: 52px 96px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 10px 16px 10px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.winner-row:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateX(2px);
}

.winner-date {
  color: var(--accent-hover);
  font-size: 0.72rem;
  text-align: center;
}

.winner-thumb {
  width: 96px;
  border-radius: 6px;
}

.winner-thumb .play-btn {
  width: 32px;
  height: 32px;
}

.winner-thumb .play-btn svg {
  width: 13px;
  height: 13px;
}

.winner-info {
  min-width: 0;
}

.winner-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.winner-voices {
  display: block;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.winner-likes {
  color: var(--text-muted);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .winner-row {
    grid-template-columns: 72px 1fr auto;
    gap: 12px;
  }

  .winner-date {
    display: none;
  }
}

/* Dub grid + cards */
.dub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 20px;
}

.dub-card {
  text-align: left;
  padding: 0;
  display: block;
  cursor: pointer;
}

.dub-card .thumb {
  margin-bottom: 12px;
  outline: 1px solid transparent;
  transition: outline-color 0.2s, box-shadow 0.2s;
}

.dub-card:hover .thumb {
  outline-color: var(--accent);
  box-shadow: 0 8px 32px -8px var(--accent-glow);
}

.dub-card:hover .play-btn {
  background: var(--accent);
  transform: translate(-50%, -50%) scale(1.06);
}

.dub-card-body {
  display: block;
}

.dub-card-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 4px;
}

.dub-voices {
  display: block;
  color: var(--accent-hover);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dub-stats {
  display: flex;
  gap: 12px;
  color: var(--text-dim);
}

/* Dub viewer modal */
body.modal-open {
  overflow: hidden;
}

.dub-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 8, 12, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: gate-fade 0.2s ease;
}

.dub-modal-card {
  position: relative;
  width: 100%;
  max-width: 760px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
  animation: gate-pop 0.25s ease;
}

.dub-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dub-close:hover {
  background: var(--accent);
}

.dub-player {
  border-radius: 0;
}

.dub-novideo {
  position: absolute;
  inset: auto 0 16px 0;
  z-index: 2;
  text-align: center;
  color: var(--text-muted);
}

.dub-meta {
  padding: 24px;
}

.dub-meta h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 4px 0 4px;
}

.dub-voice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 20px 0;
}

.dub-voice-list .mono {
  color: var(--text-dim);
}

.dub-meta-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.dub-meta-stats div {
  background: var(--bg-card);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dub-meta-stats strong {
  font-size: 1.3rem;
  font-weight: 700;
}

.dub-meta-stats .mono {
  color: var(--text-dim);
}

/* Dub of the day hero */
.dotd-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 24px;
}

.dotd-hero-media {
  border-radius: 10px;
  width: 100%;
  border: none;
  padding: 0;
  cursor: pointer;
}

.dotd-hero-info h2 {
  margin: 8px 0 10px;
}

.dotd-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.section-block {
  margin-top: 72px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

/* ==========================================================
   Scene detail page
   ========================================================== */

.scene-page {
  padding-top: 32px;
  padding-bottom: 96px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.breadcrumb a:hover {
  color: var(--text);
}

.breadcrumb .current {
  color: var(--text);
}

.breadcrumb span {
  color: var(--text-dim);
}

.scene-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: start;
}

.scene-player {
  border-radius: 8px;
}

.scene-player .play-btn {
  width: 76px;
  height: 76px;
}

.scene-side h1 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 6px;
}

.scene-source {
  color: var(--accent-hover);
  margin-bottom: 24px;
}

.scene-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
}

.scene-stats div {
  background: var(--bg-card);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scene-stats .mono {
  color: var(--text-dim);
}

.scene-stats strong {
  font-size: 1.3rem;
  font-weight: 700;
}

.scene-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.chip {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-muted);
}

.chip-adult {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text);
}

.scene-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.scene-note {
  max-width: 420px;
}

.scene-how {
  margin-top: 72px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.scene-how .steps {
  margin-top: 40px;
}

.scene-related {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.share-ic {
  width: 15px;
  height: 15px;
  display: inline-flex;
}

.share-ic svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Prev / next scene navigation */
.scene-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 48px;
}

.scene-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  transition: border-color 0.15s, background 0.15s;
  min-width: 0;
}

.scene-nav-link:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.scene-nav-link .mono {
  color: var(--accent-hover);
  font-size: 0.72rem;
}

.scene-nav-link strong {
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scene-nav-next {
  text-align: right;
}

@media (max-width: 560px) {
  .scene-nav {
    grid-template-columns: 1fr;
  }
  .scene-nav-next {
    text-align: left;
  }
}

/* Age gate */
.agegate {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 8, 12, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: gate-fade 0.2s ease;
}

.agegate-card {
  width: 100%;
  max-width: 400px;
  text-align: center;
  padding: 34px 28px 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.85);
  animation: gate-pop 0.25s ease;
}

.agegate-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  color: var(--accent-hover);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 1.05rem;
}

.agegate-card h2 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.agegate-card .muted {
  font-size: 0.92rem;
  margin-bottom: 24px;
}

.agegate-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.not-found {
  text-align: center;
  padding: 120px 0;
}

.not-found .headline {
  margin: 12px 0 12px;
}

.not-found .muted {
  margin-bottom: 28px;
}

/* ==========================================================
   Launcher gate
   ========================================================== */

body.gate-open {
  overflow: hidden;
}

/* Blur everything behind the gate */
body.gate-open main,
body.gate-open .site-header,
body.gate-open .site-footer {
  filter: blur(9px) saturate(0.9);
  pointer-events: none;
  user-select: none;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 8, 12, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: gate-fade 0.25s ease;
}

@keyframes gate-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.gate-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 36px 32px 28px;
  text-align: center;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8), 0 0 60px -20px var(--accent-glow);
  animation: gate-pop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

@keyframes gate-pop {
  from { transform: translateY(14px) scale(0.97); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.gate-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  color: var(--accent-hover);
}

.gate-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gate-card .eyebrow {
  margin-bottom: 10px;
}

.gate-card h2 {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}

.gate-card .muted {
  font-size: 0.92rem;
  margin-bottom: 24px;
}

.gate-scene {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  margin-bottom: 24px;
}

.gate-thumb {
  width: 92px;
  flex: 0 0 auto;
  border-radius: 6px;
}

.gate-scene-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.gate-scene-text strong {
  font-size: 0.95rem;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gate-scene-text .mono {
  color: var(--text-dim);
}

.gate-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.btn-lg {
  padding: 14px 22px;
  font-size: 1rem;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.gate-soon {
  color: var(--text-dim);
  font-size: 0.72rem;
  margin: -2px 0 2px;
}

.gate-meta {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---------- Mobile ---------- */

@media (max-width: 1024px) {
  .scene-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .dub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .scene-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .featured-dub,
  .dotd-hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .dub-meta-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 520px) {
  .dub-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .hero-panels {
    grid-template-columns: minmax(0, 1fr);
    max-width: 520px;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 40px;
  }

  .dotd {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .scene-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    min-height: auto;
    padding: 64px 0 96px;
  }

  .rec-indicator {
    left: var(--gutter);
    right: var(--gutter);
    max-width: none;
    bottom: 16px;
  }
}

@media (max-width: 480px) {
  .scene-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .room-actions {
    grid-template-columns: 1fr;
  }

  .dotd-info {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 900px) {
  .site-directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-top {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .header-inner {
    gap: 12px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 8px var(--gutter) 16px;
    display: none;
  }

  .nav.open {
    display: flex;
  }

  .header-actions .btn-x,
  .header-actions .btn-discord {
    display: none;
  }

  .section {
    padding: 64px 0;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-head > p {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .site-directory-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }
}
