/* =========================================================================
   Indie Next Fest
   Brand tokens, base, shared components, pages. Figma source of truth:
   "Indie Next Fest — Brand Identity" (logo variants, palette, type, shapes).
   ========================================================================= */

/* ---------- Fonts (self-hosted, SIL Open Font License: see /fonts/OFL-*.txt) ---------- */
@font-face { font-family: "Fredoka"; font-style: normal; font-display: swap; font-weight: 300 700; src: url(/fonts/fredoka-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fredoka"; font-style: normal; font-display: swap; font-weight: 300 700; src: url(/fonts/fredoka-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/fonts/inter-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  /* Brand palette */
  --c-purple: #7657FF;        /* Playground Purple: buttons, links, active */
  --c-purple-hover: #5E3FF0;
  --c-purple-ink: #5B3DE0;    /* purple text on light backgrounds (AA) */
  --c-purple-soft: #F1EDFF;
  --c-ink: #29243B;           /* Midnight Ink: headings and text */
  --c-coral: #FF8585;         /* Game Coral */
  --c-lime: #BCEB75;          /* Pixel Lime */
  --c-cyan: #79DDE8;          /* Dream Cyan */
  --c-yellow: #FFD477;        /* Level Up Yellow */
  --c-cream: #F7F5EF;         /* Cloud Cream */
  --c-white: #FFFFFF;         /* Pure White */
  --c-lavender: #EAE6F2;      /* Soft Lavender */

  /* Semantic (the admin theme overrides these) */
  --bg: var(--c-cream);
  --surface: var(--c-white);
  --surface-2: var(--c-lavender);
  --text: var(--c-ink);
  --heading: var(--c-ink);
  --muted: #5A5470;
  --line: #E4DFEC;
  --primary: var(--c-purple);
  --primary-hover: var(--c-purple-hover);
  --on-primary: #fff;
  --link: var(--c-purple-ink);
  --field-bg: #fff;
  --field-line: #D9D3E6;
  --focus: var(--c-purple);

  /* Type */
  --font-display: "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-hero: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem);   /* 40 → 68px */
  --fs-h1: clamp(2.1rem, 1.6rem + 2vw, 3.25rem);
  --fs-h2: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);     /* 28 → 40px */
  --fs-card: clamp(1.125rem, 1.05rem + .3vw, 1.25rem); /* 18 → 20px */
  --fs-body: 1rem;
  --fs-meta: .875rem;

  /* Shape and depth */
  --r-sm: 10px;
  --r-card: 16px;
  --r-lg: 24px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(41, 36, 59, .06), 0 2px 8px rgba(41, 36, 59, .05);
  --shadow-md: 0 6px 20px rgba(41, 36, 59, .08);
  --shadow-lg: 0 18px 48px rgba(41, 36, 59, .14);

  /* Layout and motion */
  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(56px, 7vw, 96px);
  --dur: 200ms;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* The admin tool stays dark. */
.theme-admin {
  --bg: #12161d;
  --surface: #1b2230;
  --surface-2: #263045;
  --text: #e6e9ef;
  --heading: #f4f5f8;
  --muted: #8f9bb0;
  --line: #263045;
  --primary: #8f7bff;
  --primary-hover: #a597ff;
  --on-primary: #120d2b;
  --link: #a898ff;
  --field-bg: #0f131a;
  --field-line: #33405a;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-body)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--heading); font-weight: 600; line-height: 1.15; letter-spacing: -.005em; }
h1 { font-size: var(--fs-h1); font-weight: 700; margin: 0 0 12px; }
h2 { font-size: var(--fs-h2); margin: 0 0 12px; }
h3 { font-size: var(--fs-card); margin: 0 0 6px; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--c-yellow); color: var(--c-ink); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.full-bleed { width: 100vw; margin-left: calc(50% - 50vw); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: var(--r-pill); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; color: var(--on-primary); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-meta); }
.hint { color: var(--muted); font-size: var(--fs-meta); margin: 6px 0 0; }
.pre { white-space: pre-wrap; }
form.inline { display: inline; margin: 0; }
.link-button { background: none; border: 0; padding: 0; color: var(--link); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 22px;
  border: 2px solid var(--primary); border-radius: var(--r-pill);
  background: var(--primary); color: var(--on-primary);
  font: 600 .95rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.button:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(118, 87, 255, .28); }
.button:active { transform: translateY(0); }
.button .arrow { transition: transform var(--dur) var(--ease); }
.button:hover .arrow { transform: translateX(3px); }
.button-lg { min-height: 52px; padding: 13px 28px; font-size: 1rem; }
.button-small { min-height: 36px; padding: 6px 14px; font-size: .875rem; }
.button-block { width: 100%; }
.button-outline, .button-secondary { background: transparent; color: var(--link); border-color: var(--primary); }
.button-outline:hover, .button-secondary:hover { background: var(--c-purple-soft); color: var(--c-purple-ink); border-color: var(--primary); box-shadow: none; }
.theme-admin .button-secondary:hover { background: rgba(143, 123, 255, .14); color: var(--link); }
.button-danger { background: #ff7a7a; border-color: #ff7a7a; color: #2a0b0b; }
.button-danger:hover { background: #ff9393; border-color: #ff9393; color: #2a0b0b; box-shadow: none; }
.button-light { background: #fff; border-color: #fff; color: var(--c-purple-ink); }
.button-light:hover { background: var(--c-yellow); border-color: var(--c-yellow); color: var(--c-ink); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.button-ghost-light { background: transparent; border-color: rgba(255, 255, 255, .7); color: #fff; }
.button-ghost-light:hover { background: rgba(255, 255, 255, .14); border-color: #fff; color: #fff; box-shadow: none; }
.button-steam { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }
.button-steam:hover { background: #3a3352; border-color: #3a3352; color: #fff; box-shadow: var(--shadow-md); }
.button-community { background: #5865f2; border-color: #5865f2; color: #fff; }
.button-community:hover { background: #4752c4; border-color: #4752c4; color: #fff; box-shadow: 0 6px 16px rgba(88, 101, 242, .3); }

/* ---------- Badges, tags, chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
  padding: 4px 12px; border-radius: var(--r-pill);
  font: 600 .8rem/1.3 var(--font-body); letter-spacing: .01em; color: var(--c-ink); background: var(--c-lavender);
}
.badge-live { background: var(--c-coral); }
.badge-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c-ink); animation: pulse 1.8s ease-in-out infinite; }
.badge-upcoming { background: var(--c-yellow); }
.badge-ended { background: var(--c-lavender); }
.badge-demo { background: var(--c-lime); }
.badge-on-purple { background: var(--c-yellow); }
@keyframes pulse { 50% { opacity: .35; } }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.tag { display: inline-block; background: var(--surface-2); color: var(--text); border-radius: var(--r-pill); padding: 3px 10px; font-size: .78rem; font-weight: 500; }
.tag-demo { background: var(--c-lime); color: var(--c-ink); }
.tag-theme { background: var(--c-purple-soft); color: var(--c-purple-ink); }
.theme-admin .tag-theme { background: #3a2c63; color: #e6e1ff; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 600 .8rem/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--c-purple-ink); }
.eyebrow .sparkle { color: var(--c-yellow); }
.eyebrow-pill { background: var(--c-lime); color: var(--c-ink); padding: 6px 14px; border-radius: var(--r-pill); letter-spacing: .04em; }
.eyebrow-pill .sparkle { color: var(--c-ink); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; }
.theme-brand .site-header { border-bottom-color: rgba(41, 36, 59, .06); }
.theme-admin .site-header { background: #1b2230; border-bottom-color: #263045; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--heading); flex: 0 0 auto; border-radius: 10px; }
.logo:hover { color: var(--heading); }
.logo-symbol { display: block; flex: 0 0 auto; transition: transform 300ms var(--ease); }
.logo:hover .logo-symbol { transform: rotate(-8deg) scale(1.05); }
.logo-wordmark { display: flex; flex-direction: column; font: 700 1.2rem/.9 var(--font-display); text-transform: uppercase; letter-spacing: .01em; }
.logo-on-dark { color: #fff; }
.logo-on-dark:hover { color: #fff; }

.site-nav { display: flex; align-items: center; gap: 20px; flex: 1 1 auto; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0 0 0 8px; padding: 0; }
.nav-links a { display: block; padding: 8px 12px; border-radius: var(--r-pill); color: var(--text); font-weight: 500; text-decoration: none; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.nav-links a:hover { background: var(--surface-2); color: var(--heading); }
.nav-search { position: relative; margin-left: auto; display: flex; align-items: center; }
.nav-search input { width: 190px; height: 40px; padding: 0 40px 0 16px; border-radius: var(--r-pill); border: 1px solid var(--field-line); background: var(--field-bg); color: var(--text); font: inherit; font-size: .9rem; transition: width var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.nav-search input:focus { width: 230px; border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(118, 87, 255, .2); }
.nav-search button { position: absolute; right: 4px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.nav-search button:hover { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-signin { font-weight: 600; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.user { display: inline-flex; align-items: center; gap: 10px; font-size: .92rem; }
.user a.user-name { color: var(--text); font-weight: 600; text-decoration: none; }
.nav-admin { font-weight: 600; }
.avatar { border-radius: 50%; }
.button-cta { white-space: nowrap; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--heading); cursor: pointer; place-items: center; }

@media (max-width: 1080px) {
  .header-inner { min-height: 64px; flex-wrap: wrap; }
  .nav-toggle { display: grid; }
  .site-nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 14px; padding: 8px 0 20px; }
  html:not(.js) .site-nav, .site-nav.is-open { display: flex; }
  .nav-links { flex-direction: column; margin: 0; }
  .nav-links a { padding: 12px 14px; font-size: 1.05rem; }
  .nav-search { margin-left: 0; }
  .nav-search input, .nav-search input:focus { width: 100%; height: 46px; }
  .nav-actions { flex-wrap: wrap; justify-content: space-between; }
}

/* ---------- Footer ---------- */
.site-footer { margin-top: var(--section); background: var(--c-ink); color: #D8D3E6; border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 56px 0 28px; }
.theme-admin .site-footer { background: #0c0f14; border-top: 1px solid #263045; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-brand p { margin: 16px 0 0; max-width: 360px; }
.footer-title { font: 600 .8rem/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: #fff; margin: 4px 0 12px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-nav a { color: #D8D3E6; text-decoration: none; }
.footer-nav a:hover { color: var(--c-yellow); }
.footer-legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .82rem; color: #A9A2BE; }
.footer-legal p { margin: 0; }
.site-footer :focus-visible { outline-color: var(--c-yellow); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Sections ---------- */
.home-section { margin-top: var(--section); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; }
.section-head h2 .muted { font-weight: 500; }
.see-more { font-weight: 600; text-decoration: none; white-space: nowrap; }
.empty-note { padding: 24px; border: 2px dashed var(--line); border-radius: var(--r-card); text-align: center; }
.page-hero { padding: clamp(40px, 6vw, 72px) 0 8px; max-width: 820px; }
.page-hero .lead, .lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: var(--muted); max-width: 680px; }
.panel { background: var(--surface); border-radius: var(--r-card); padding: 24px 28px; margin: 24px 0; box-shadow: var(--shadow-sm); }
.theme-admin .panel { box-shadow: none; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.blob { position: absolute; border-radius: 48% 52% 44% 56% / 55% 45% 55% 45%; }
.blob-a { width: min(720px, 70vw); height: min(620px, 60vw); right: -8%; top: -6%; background: var(--c-lavender); }
.blob-b { width: 200px; height: 160px; left: -60px; top: 30%; background: var(--c-purple-soft); }
.hero-inner { max-width: var(--wrap); margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--gutter) clamp(48px, 6vw, 88px); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-title { font-size: var(--fs-hero); line-height: 1.02; letter-spacing: -.015em; margin: 18px 0 18px; max-width: 12ch; }
.hero-title .hl { color: var(--c-purple); position: relative; white-space: nowrap; }
.hero-title .hl::after { content: ""; position: absolute; left: 2%; right: 2%; bottom: .04em; height: .14em; border-radius: 99px; background: var(--c-yellow); z-index: -1; }
.hero-lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); color: var(--muted); max-width: 520px; margin-bottom: 28px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 32px; }

.fest-status { display: inline-flex; align-items: flex-start; gap: 14px; padding: 14px 20px 14px 14px; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-md); max-width: 100%; }
.fest-status .badge { flex: 0 0 auto; margin-top: 2px; }
.fest-status-text p { margin: 0; }
.fest-status-name { font: 600 1.1rem/1.3 var(--font-display); color: var(--heading); }
.fest-status-name a { color: inherit; text-decoration: none; }
.fest-status-name a:hover { color: var(--c-purple-ink); }
.fest-status-when { font-size: var(--fs-meta); color: var(--muted); }
.fest-status .countdown { font-weight: 700; color: var(--c-purple-ink); font-variant-numeric: tabular-nums; }
.countdown:empty { display: none; }

/* Hero art: rounded game windows with floating shapes */
.hero-art { position: relative; aspect-ratio: 1 / .86; }
.art-window { position: absolute; display: block; background: #fff; border-radius: 22px; padding: 8px; box-shadow: var(--shadow-lg); border: 3px solid var(--c-ink); transition: transform 260ms var(--ease), box-shadow 260ms var(--ease); }
.art-window img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; background: var(--c-lavender); }
.window-bar { display: flex; gap: 6px; padding: 2px 6px 8px; }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--c-coral); }
.window-bar i:nth-child(2) { background: var(--c-yellow); }
.window-bar i:nth-child(3) { background: var(--c-lime); }
.art-window-0 { width: 74%; left: 0; top: 6%; transform: rotate(-4deg); z-index: 2; }
.art-window-1 { width: 50%; right: 0; top: 0; transform: rotate(5deg); z-index: 1; }
.art-window-2 { width: 54%; right: 2%; bottom: 0; transform: rotate(3deg); z-index: 3; }
.art-window-solo { width: 88%; left: 6%; top: 10%; }
.art-window:hover { transform: rotate(0) translateY(-4px); box-shadow: 0 24px 60px rgba(41, 36, 59, .22); z-index: 4; }
.art-window-empty .window-placeholder { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 14px; background: var(--c-cream); }
.deco { position: absolute; pointer-events: none; z-index: 5; animation: float 7s ease-in-out infinite; }
.deco-sparkle { color: var(--c-yellow); left: -4%; bottom: 16%; }
.deco-cross { width: 26px; height: 26px; right: 46%; top: -2%; background: linear-gradient(var(--c-purple), var(--c-purple)) center / 100% 7px no-repeat, linear-gradient(var(--c-purple), var(--c-purple)) center / 7px 100% no-repeat; border-radius: 4px; transform: rotate(45deg); animation-delay: -2s; }
.deco-circle { width: 22px; height: 22px; border-radius: 50%; background: var(--c-cyan); right: -2%; top: 46%; animation-delay: -4s; }
.deco-tile { width: 54px; height: 54px; border-radius: 14px; background: var(--c-lime); left: 30%; bottom: -3%; transform: rotate(-14deg); animation-delay: -1s; }
.deco-triangle { width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-bottom: 24px solid var(--c-coral); right: 8%; top: 36%; animation-delay: -3s; }
@keyframes float { 50% { translate: 0 -10px; } }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { max-width: 560px; width: 100%; margin: 0 auto; }
  .blob-a { width: 90vw; height: 70vw; right: -30%; top: auto; bottom: -10%; }
}
@media (max-width: 520px) {
  .hero-ctas .button { flex: 1 1 auto; }
  .fest-status { display: flex; }
  .deco-sparkle { left: 0; }
}

/* ---------- Register / newsletter ---------- */
.register {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: center;
  background: var(--surface); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow-md); margin-top: 8px;
}
.register h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin: 0 0 10px; }
.register-copy p:last-child { margin: 0; }
.register-actions { display: flex; flex-direction: column; gap: 12px; }
.register-deco { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.register-deco .sparkle { position: absolute; right: 18px; top: 16px; color: var(--c-yellow); }
.rd-circle { position: absolute; width: 120px; height: 120px; border-radius: 50%; background: var(--c-purple-soft); left: -40px; bottom: -50px; }
.rd-tile { position: absolute; width: 40px; height: 40px; border-radius: 12px; background: var(--c-cyan); opacity: .5; right: 40%; top: -18px; transform: rotate(20deg); }
.or { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--muted); font-size: .85rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.signup-form label { font-weight: 600; font-size: .95rem; }
.signup-row { display: flex; gap: 8px; margin-top: 8px; }
.signup-row input { flex: 1; min-width: 0; height: 48px; padding: 0 18px; border-radius: var(--r-pill); border: 1px solid var(--field-line); background: var(--field-bg); color: var(--text); font: inherit; }
.signup-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(118, 87, 255, .2); }
.signup-row .button { min-height: 48px; }
.registered { margin: 0; }
.register .alert { margin: 0; }
.showcase-cta { text-align: center; margin: 32px 0 0; }
.showcase-creators { text-align: center; margin: 12px 0 0; }
.stay-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-top: var(--section); align-items: stretch; }
.stay-row .register { grid-template-columns: 1fr; align-content: center; margin: 0; }
.register + .community { margin-top: 20px; }
.fest-hero + .register { margin-top: 28px; }
.stay-row .community { margin: 0; flex-direction: column; align-items: flex-start; justify-content: center; }
@media (max-width: 900px) {
  .register, .stay-row { grid-template-columns: 1fr; }
  .signup-row { flex-direction: column; }
  .signup-row input { flex: none; }
}

/* ---------- Game cards ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.game-tile {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); color: var(--text); text-decoration: none;
  border-radius: var(--r-card); box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
a.game-tile:hover, .game-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--text); }
.tile-media { position: relative; display: block; overflow: hidden; background: var(--surface-2); }
.tile-media img, .tile-placeholder { display: block; width: 100%; height: auto; aspect-ratio: 460 / 215; object-fit: cover; background: var(--surface-2); transition: transform 400ms var(--ease); }
.game-tile:hover .tile-media img { transform: scale(1.04); }
.tile-placeholder { background: linear-gradient(135deg, var(--c-lavender), var(--c-purple-soft)); }
.tile-badge { position: absolute; left: 10px; top: 10px; box-shadow: var(--shadow-sm); }
.tile-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.tile-name, .game-tile a.tile-name { font: 600 var(--fs-card)/1.25 var(--font-display); color: var(--heading); text-decoration: none; }
.tile-meta { color: var(--muted); font-size: var(--fs-meta); }
.tile-cta { margin-top: auto; padding-top: 10px; color: var(--link); font-weight: 600; font-size: .92rem; }
.tile-cta .arrow { display: inline-block; transition: transform var(--dur) var(--ease); }
.game-tile:hover .tile-cta .arrow { transform: translateX(4px); }
.tile-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; }

/* Single game card (developer preview, admin review) */
.game-card { background: var(--surface); border-radius: var(--r-card); overflow: hidden; max-width: 460px; box-shadow: var(--shadow-sm); }
.theme-admin .game-card { box-shadow: none; border: 1px solid var(--line); }
.game-card img { width: 100%; display: block; aspect-ratio: 460 / 215; object-fit: cover; }
.game-card-body { padding: 14px 18px 18px; }
.game-card-body p { margin: 6px 0; }
.game-card h3 { margin: 4px 0; }

/* ---------- Featured (highlights) ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.feature-card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-media { display: block; overflow: hidden; }
.feature-media img, .feature-media .tile-placeholder { display: block; width: 100%; height: auto; aspect-ratio: 460 / 215; object-fit: cover; transition: transform 400ms var(--ease); }
.feature-card:hover .feature-media img { transform: scale(1.04); }
.feature-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.feature-body h3 { margin: 0; }
.feature-body h3 a { color: var(--heading); text-decoration: none; }
.feature-body h3 a:hover { color: var(--c-purple-ink); }
.feature-body p { margin: 0; }
.feature-meta { color: var(--muted); font-size: var(--fs-meta); }
.feature-desc { font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feature-actions { margin-top: auto !important; padding-top: 6px; }

/* ---------- Genre cards ---------- */
.genre-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.genre-card {
  --tone: var(--c-lavender);
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px; min-height: 150px; height: 100%;
  padding: 20px; border-radius: 20px; background: var(--tone); color: var(--c-ink); text-decoration: none;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
a.genre-card:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: var(--shadow-md); color: var(--c-ink); }
.genre-card::after { content: ""; position: absolute; width: 110px; height: 110px; border-radius: 50%; right: -36px; bottom: -40px; background: rgba(255, 255, 255, .28); }
.genre-icon { margin-bottom: auto; transition: transform 300ms var(--ease); }
a.genre-card:hover .genre-icon { transform: rotate(-12deg) scale(1.1); }
.genre-name { font: 600 1.2rem/1.2 var(--font-display); margin-top: 18px; }
.genre-count { font-size: var(--fs-meta); opacity: .8; }
.tone-coral { --tone: var(--c-coral); }
.tone-purple { --tone: var(--c-purple); color: #fff; }
a.tone-purple:hover { color: #fff; }
.tone-cyan { --tone: var(--c-cyan); }
.tone-lime { --tone: var(--c-lime); }
.tone-yellow { --tone: var(--c-yellow); }
.tone-lavender { --tone: var(--c-lavender); }
@media (max-width: 1080px) { .genre-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .genre-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .genre-card { min-height: 128px; padding: 16px; } }

/* ---------- Browse tabs and chips ---------- */
.tabs { margin-bottom: 24px; }
.tab-list { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 16px; background: var(--surface-2); border-radius: var(--r-pill); max-width: 100%; overflow-x: auto; }
.tab { background: none; border: 0; border-radius: var(--r-pill); color: var(--muted); font: 600 .92rem var(--font-body); padding: 9px 18px; cursor: pointer; white-space: nowrap; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.tab:hover { color: var(--heading); }
.tab.is-active { background: var(--surface); color: var(--heading); box-shadow: var(--shadow-sm); }
html:not(.js) .tab-list { display: none; }
.js .tab-panel-title { display: none; }
.tab-panel-title { font-size: 1rem; margin: 16px 0 8px; color: var(--muted); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: .92rem; font-weight: 500; transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.chip:hover { border-color: var(--primary); color: var(--heading); }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.chip-count { color: var(--muted); font-size: .8rem; }
.chip.is-active .chip-count { color: inherit; opacity: .85; }
.active-filter { display: flex; align-items: center; gap: 8px; }
.chip-clear { padding: 4px 12px; font-size: .85rem; }

/* ---------- How it works ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step { position: relative; background: var(--surface); border-radius: 20px; padding: 28px 26px 26px; box-shadow: var(--shadow-sm); }
.step h3 { margin: 16px 0 6px; font-size: 1.35rem; }
.step p { margin: 0; color: var(--muted); }
.step-num { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; font: 700 1.4rem/1 var(--font-display); color: var(--c-ink); }
.step-purple .step-num { background: var(--c-purple); color: #fff; }
.step-coral .step-num { background: var(--c-coral); border-radius: 50%; }
.step-cyan .step-num { background: var(--c-cyan); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Event banner ---------- */
.event-banner, .fest-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--c-purple); color: #fff; border-radius: var(--r-lg);
}
.event-banner { margin-top: var(--section); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: clamp(28px, 5vw, 56px); }
.event-banner h2, .fest-hero h1 { color: #fff; }
.event-banner h2 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.75rem); font-weight: 700; margin: 14px 0 10px; max-width: 20ch; }
.event-lead { font-size: 1.1rem; max-width: 520px; }
.event-fest { margin: 20px 0 24px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .25); }
.event-fest p { margin: 0 0 6px; }
.event-name { font: 600 1.5rem/1.2 var(--font-display); }
.event-dates { opacity: .95; }
.event-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.event-games { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.event-games li:nth-child(odd) { transform: translateY(14px) rotate(-2deg); }
.event-games li:nth-child(even) { transform: rotate(2deg); }
.event-games a { display: block; border-radius: 14px; overflow: hidden; border: 3px solid #fff; box-shadow: 0 12px 30px rgba(20, 10, 60, .3); transition: transform var(--dur) var(--ease); }
.event-games a:hover { transform: translateY(-4px) scale(1.02); }
.event-games img { display: block; width: 100%; height: auto; aspect-ratio: 460 / 215; object-fit: cover; }
.event-deco { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.event-deco .sparkle { position: absolute; color: var(--c-yellow); }
.ev-sparkle-a { right: 6%; top: 10%; }
.ev-sparkle-b { left: 46%; bottom: 14%; color: var(--c-coral) !important; }
.ev-circle { position: absolute; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .08); left: -70px; bottom: -90px; }
.ev-tile { position: absolute; width: 70px; height: 70px; border-radius: 18px; background: var(--c-cyan); opacity: .85; right: -18px; bottom: 18%; transform: rotate(18deg); }
.ev-triangle { position: absolute; width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent; border-bottom: 28px solid var(--c-lime); left: 40%; top: 8%; transform: rotate(12deg); }
.event-banner :focus-visible, .fest-hero :focus-visible { outline-color: var(--c-yellow); }

/* Countdown tiles */
.countdown-boxes { display: flex; gap: 8px; margin: 14px 0 0; }
.cd-box { display: flex; flex-direction: column; align-items: center; min-width: 62px; padding: 8px 6px 6px; border-radius: 14px; background: #fff; color: var(--c-ink); }
.cd-num { font: 700 1.6rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.cd-label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 4px; }
@media (max-width: 820px) { .event-banner { grid-template-columns: 1fr; } }

/* Fest page hero */
.fest-hero { margin-top: 32px; padding: clamp(32px, 6vw, 72px) clamp(24px, 5vw, 56px); background-size: cover; background-position: center; }
.fest-hero.has-image { background-color: var(--c-ink); }
.fest-hero.has-image .event-deco { display: none; }
.fest-hero h1 { font-size: var(--fs-h1); margin: 14px 0 8px; max-width: 18ch; }
.fest-hero .lead { color: #fff; opacity: .95; }
.fest-hero .dates { font-weight: 600; margin: 0; }

/* ---------- Community and developer strip ---------- */
.community {
  margin-top: var(--section); display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: clamp(24px, 4vw, 36px); border-radius: var(--r-lg); background: var(--c-lavender); position: relative; overflow: hidden;
}
.community::after { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 40px; background: rgba(255, 255, 255, .5); right: -50px; top: -60px; transform: rotate(20deg); }
.community-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: #5865f2; color: #fff; flex: 0 0 auto; }
.community-copy { flex: 1 1 320px; position: relative; z-index: 1; }
.community-copy h2 { margin: 0 0 6px; font-size: clamp(1.4rem, 1.2rem + .6vw, 1.75rem); }
.community-copy p { margin: 0; }
.community .button { position: relative; z-index: 1; }
.theme-admin .community { background: var(--surface); }

/* Modal (Discord ask after applying) */
.modal {
  border: 0; border-radius: var(--r-lg); padding: clamp(24px, 5vw, 36px); width: min(480px, calc(100vw - 32px));
  background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(41, 36, 59, .28); text-align: center;
  position: fixed; inset: 0; margin: auto; height: fit-content; z-index: 50;
}
.modal::backdrop { background: rgba(41, 36, 59, .55); }
.modal h2 { margin: 16px 0 8px; font-size: clamp(1.35rem, 1.2rem + .5vw, 1.6rem); }
.modal p { margin: 0 0 20px; }
.modal-icon { margin: 0 auto; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.modal-actions form, .modal-actions .button { width: 100%; }
.modal-actions form .button { width: 100%; }
.modal-close-form { position: absolute; top: 10px; right: 10px; margin: 0; }
.modal-close { background: transparent; border: 0; font-size: 1.75rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 10px; border-radius: 10px; }
.modal-close:hover { background: var(--c-purple-soft); color: var(--text); }

/* Honeypot field for bots: hidden from people and screen readers */
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.join-strips { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.join-strips .dev-strip { margin-top: 0; }
@media (max-width: 860px) { .join-strips { grid-template-columns: 1fr; } }
.dev-strip { margin-top: 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 24px 28px; border-radius: var(--r-lg); border: 2px dashed var(--field-line); }
.dev-strip h2 { margin: 0 0 4px; font-size: 1.35rem; }
.dev-strip p { margin: 0; }

/* ---------- Forms, alerts, tables ---------- */
.form { display: flex; flex-direction: column; max-width: 680px; }
.form h2 { margin-bottom: 4px; }
.form label { margin-top: 18px; font-weight: 600; }
.form input[type=text], .form input[type=email], .form input[type=url], .form textarea, .form select,
select, input[type=datetime-local], .themes-form input, .review-form textarea, .search-form input {
  margin-top: 6px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--field-line);
  background: var(--field-bg); color: var(--text); font: inherit;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.form input:focus, .form textarea:focus, select:focus, input[type=datetime-local]:focus, .themes-form input:focus, .review-form textarea:focus, .search-form input:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(118, 87, 255, .22);
}
.form .checkbox { font-weight: 400; display: flex; gap: 10px; align-items: center; }
.form .checkbox input { width: 18px; height: 18px; accent-color: var(--primary); }
.form button { margin-top: 22px; align-self: flex-start; }
.form .button-secondary { margin-top: 10px; }
.search-form { display: flex; gap: 10px; margin-top: 20px; max-width: 620px; }
.search-form input { flex: 1; min-width: 0; margin: 0; height: 52px; border-radius: var(--r-pill); padding: 0 22px; font-size: 1.05rem; }
.search-form .button { min-height: 52px; }

.alert { border-radius: 14px; padding: 12px 18px; margin: 16px 0; border: 1px solid transparent; }
.alert p { margin: 4px 0; }
.alert-error { background: #FFE9E9; border-color: #FFC2C2; color: #6B1F27; }
.alert-success { background: #ECF9DA; border-color: #C9EB9C; color: #24461A; }
.alert-info { background: #EFEBFF; border-color: #D5CBFF; color: #34266E; }
.theme-admin .alert-error { background: #3a1d22; border-color: #7a2f39; color: var(--text); }
.theme-admin .alert-success { background: #183223; border-color: #2f6b45; color: var(--text); }

.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--r-card); overflow: hidden; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.status { font-weight: 600; }
.status-pending { color: #9A6A00; }
.status-accepted { color: #2E7D32; }
.status-rejected { color: #C62828; }
.theme-admin .status-pending { color: #f5c451; }
.theme-admin .status-accepted { color: #4cd964; }
.theme-admin .status-rejected { color: #ff7a7a; }

/* ---------- Fest list ---------- */
.list-title { font-size: 1.5rem; margin-top: 40px; }
.fest-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.fest-row { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; background: var(--surface); border-radius: var(--r-card); padding: 20px 24px; box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.fest-row:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.fest-row .fest-name { font: 600 1.3rem/1.2 var(--font-display); color: var(--heading); text-decoration: none; }
.fest-row .fest-name:hover { color: var(--c-purple-ink); }
.fest-row .badge { justify-self: start; }
.fest-row p { grid-column: 1 / -1; margin: 0; }

/* ---------- Game page ---------- */
.crumbs { margin: 28px 0 0; font-size: var(--fs-meta); }
.crumbs a { text-decoration: none; font-weight: 600; }
.game-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; flex-wrap: wrap; padding-top: 16px; }
.game-head h1 { margin: 0 0 6px; }
.game-head .muted { margin: 0 0 12px; }
.game-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.media-frame { margin: 24px 0 16px; background: #fff; border: 3px solid var(--c-ink); border-radius: 22px; padding: 8px; box-shadow: var(--shadow-md); }
.media-frame .trailer { margin: 0; border-radius: 14px; }
.trailer { width: 100%; border-radius: var(--r-card); margin: 16px 0; background: #000; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.shots a { display: block; border-radius: 12px; overflow: hidden; transition: transform var(--dur) var(--ease); }
.shots a:hover { transform: translateY(-3px); }
.shots img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.game-body { display: grid; grid-template-columns: 1fr 300px; gap: 40px; margin-top: 32px; }
.about { line-height: 1.7; }
.about img { max-width: 100%; height: auto; border-radius: 12px; }
.about h1, .about h2, .about h3 { font-size: 1.3rem; margin-top: 1.4em; }
.facts { align-self: start; position: sticky; top: 96px; margin: 0; }
.facts p { margin: 0 0 16px; }
.facts strong { font-family: var(--font-display); font-weight: 600; }
@media (max-width: 820px) { .game-body { grid-template-columns: 1fr; } .facts { position: static; } }

/* ---------- About ---------- */
.about-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1000px) and (min-width: 721px) { .about-cols { grid-template-columns: 1fr 1fr; } }
.about-cols .panel { margin: 0; }
.about-cols h2 { font-size: 1.6rem; }
.about-note { margin-top: 32px; }
.who { display: flex; gap: 28px; align-items: center; background: var(--surface); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow-sm); }
.who h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.who p { max-width: 640px; }
.who p:last-child { margin: 0; }
.who-mark { flex: 0 0 auto; display: grid; place-items: center; width: 120px; height: 120px; border-radius: 28px; background: var(--c-lavender); }
@media (max-width: 720px) { .about-cols { grid-template-columns: 1fr; } .who { flex-direction: column; align-items: flex-start; } }

/* ---------- Admin ---------- */
.admin-nav { display: flex; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.admin-nav a { padding: 6px 14px; border-radius: var(--r-pill); text-decoration: none; color: var(--text); background: var(--surface); }
.admin-nav a:hover { background: var(--surface-2); color: var(--heading); }
.theme-admin h1 { font-size: 2rem; margin-top: 16px; }
.queue-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.queue-tab { padding: 10px 16px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 600; }
.queue-tab:hover { color: var(--heading); }
.queue-tab.is-active { color: var(--heading); border-bottom-color: var(--c-purple); }
.queue-tab .count { display: inline-block; min-width: 1.6em; padding: 0 6px; margin-left: 4px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text); font-size: 0.85em; text-align: center; }
.recheck-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.upcoming-section .section-head p { max-width: 560px; }
.filters { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.review { display: grid; grid-template-columns: 360px 1fr; gap: 24px; scroll-margin-top: 96px; }
.review-details h2 { margin-top: 0; font-size: 1.5rem; }
.review dl { display: grid; grid-template-columns: 160px 1fr; gap: 6px 12px; margin: 0 0 16px; }
.review dt { color: var(--muted); }
.review dd { margin: 0; }
.review-form { display: flex; flex-direction: column; gap: 6px; }
.review-buttons { display: flex; gap: 10px; margin: 8px 0; flex-wrap: wrap; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.two-cols > div { display: flex; flex-direction: column; }
.curation { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.themes-form label { font-weight: 600; }
.themes-form input { flex: 1; min-width: 0; margin-top: 0; }
.themes-form .signup-row input { height: auto; border-radius: 12px; }
@media (max-width: 760px) { .review { grid-template-columns: 1fr; } .two-cols { grid-template-columns: 1fr; } }

/* ---------- Motion preferences ---------- */
/* ---------- Footer legal links ---------- */
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; }
.footer-legal-links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0; }
.footer-legal-links a { color: #D8D3E6; }
.footer-legal-links a:hover { color: var(--c-yellow); }

/* ---------- Cookie banner and settings ---------- */
.cookie-banner { position: fixed; z-index: 60; left: var(--gutter); right: var(--gutter); bottom: 16px; display: flex; justify-content: flex-start; pointer-events: none; }
.cookie-banner[hidden] { display: none; }
.cookie-card { pointer-events: auto; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); color: var(--text); border: 2px solid var(--c-ink); border-radius: var(--r-lg); box-shadow: 6px 6px 0 var(--c-purple), var(--shadow-lg); padding: 20px 22px; }
.cookie-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cookie-head h2 { margin: 0; font-size: 1.3rem; flex: 1; }
.cookie-head h2:focus { outline: none; }
.cookie-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c-yellow); color: var(--c-ink); flex: none; }
.cookie-close { background: transparent; border: 0; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 10px; border-radius: 10px; }
.cookie-close:hover { background: var(--c-purple-soft); color: var(--text); }
.cookie-card > p { font-size: .92rem; margin: 0 0 14px; color: var(--muted); }
.cookie-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cookie-actions .button { width: 100%; padding-left: 12px; padding-right: 12px; }
.cookie-form .cookie-actions { grid-template-columns: repeat(3, 1fr); }
.cookie-quick { margin: 0; }
.cookie-details { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.cookie-details summary { cursor: pointer; font-weight: 600; color: var(--link); padding: 4px 0; list-style-position: inside; }
.cookie-details[open] summary { margin-bottom: 8px; }
.cookie-details .cookie-form .cookie-actions { grid-template-columns: 1fr; }
.cookie-details .cookie-form .cookie-actions .button[value="reject"],
.cookie-details .cookie-form .cookie-actions .button[value="accept"] { display: none; }
.cookie-form { margin: 0; }
.cookie-options { border: 0; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.cookie-option { display: flex; gap: 14px; align-items: center; justify-content: space-between; background: var(--c-cream); border-radius: var(--r-card); padding: 12px 14px; }
.cookie-option-text { display: grid; gap: 2px; cursor: pointer; }
div.cookie-option-text { cursor: default; }
.cookie-option-name { font-weight: 600; }
.cookie-option-desc { font-size: .84rem; color: var(--muted); line-height: 1.45; }
.cookie-always { flex: none; font-size: .78rem; font-weight: 600; background: var(--c-lime); color: var(--c-ink); padding: 4px 10px; border-radius: var(--r-pill); white-space: nowrap; }
.cookie-saved { margin: 10px 0 0; font-size: .875rem; color: var(--c-purple-ink); font-weight: 600; min-height: 1px; }
.cookie-saved:empty { margin: 0; }
.switch { position: relative; flex: none; width: 46px; height: 28px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch-track { position: absolute; inset: 0; border-radius: var(--r-pill); background: #CFC8DD; transition: background-color var(--dur) var(--ease); }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(41, 36, 59, .3); transition: transform var(--dur) var(--ease); }
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 520px) {
  .cookie-banner { left: 8px; right: 8px; bottom: 8px; }
  .cookie-card { padding: 16px; box-shadow: 4px 4px 0 var(--c-purple), var(--shadow-lg); }
  .cookie-form .cookie-actions { grid-template-columns: 1fr; }
}

/* ---------- Privacy page ---------- */
.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; margin-top: 24px; }
.legal-toc { position: sticky; top: 24px; margin: 0; padding: 20px 22px; }
.legal-toc-title { font-size: 1rem; margin: 0 0 8px; }
.legal-toc ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: .92rem; }
.legal { max-width: 760px; }
.legal section { scroll-margin-top: 24px; margin-bottom: 40px; }
.legal h2 { font-size: clamp(1.4rem, 1.2rem + .7vw, 1.85rem); }
.legal h3 { margin-top: 24px; scroll-margin-top: 24px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal-cards { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.legal-cards li { margin: 0; background: var(--surface); border-radius: var(--r-card); padding: 18px; box-shadow: var(--shadow-sm); font-size: .93rem; border-top: 6px solid var(--c-cyan); }
.legal-cards li:nth-child(2) { border-top-color: var(--c-lime); }
.legal-cards li:nth-child(3) { border-top-color: var(--c-coral); }
.legal-cards strong { display: block; font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; }
.legal-address { background: var(--surface); border-radius: var(--r-card); padding: 16px 20px; box-shadow: var(--shadow-sm); }
.table-wrap { overflow-x: auto; margin: 0 0 16px; border-radius: var(--r-card); box-shadow: var(--shadow-sm); }
.legal-table { width: 100%; min-width: 520px; border-collapse: collapse; background: var(--surface); font-size: .92rem; }
.legal-table th, .legal-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--c-lavender); }
.legal-table tr:last-child td { border-bottom: 0; }
.legal code { font-size: .88em; background: var(--c-purple-soft); color: var(--c-purple-ink); padding: 2px 6px; border-radius: 6px; }
.cookie-settings-panel { scroll-margin-top: 24px; }
.cookie-settings-panel h3 { margin-top: 0; }
mark.placeholder { background: var(--c-yellow); color: var(--c-ink); padding: 1px 6px; border-radius: 6px; font-weight: 600; }
@media (max-width: 900px) {
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .legal-toc { position: static; }
  .legal-cards { grid-template-columns: 1fr; }
}

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

/* ---------- Discover Match (swipe cards) ---------- */
.discover { max-width: 460px; margin: 0 auto; padding-top: clamp(12px, 3vw, 32px); display: flex; flex-direction: column; align-items: stretch; }
.discover-head { text-align: center; margin-bottom: 14px; }
.discover-head .eyebrow { margin-bottom: 4px; }
.discover-title { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem); margin: 0 0 4px; }
.discover-help { margin: 0; }
.discover-help .key { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 6px; background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 700; color: var(--heading); }
.deck-wrap { position: relative; height: clamp(400px, calc(100svh - 290px), 620px); }
.deck { position: relative; height: 100%; }

.swipe-card {
  position: absolute; inset: 0; display: none; flex-direction: column; overflow: hidden;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
  transition: transform 280ms var(--ease), opacity 280ms var(--ease);
  --like: 0; --pass: 0; --super: 0;
}
/* Without JS only the top card shows; with JS the next two peek out behind it. */
.swipe-card:first-child { display: flex; z-index: 3; }
.js .swipe-card:nth-child(2) { display: flex; z-index: 2; transform: translateY(12px) scale(.95); pointer-events: none; }
.js .swipe-card:nth-child(3) { display: flex; z-index: 1; transform: translateY(24px) scale(.9); opacity: .7; pointer-events: none; }
.swipe-card.is-dragging { transition: none; cursor: grabbing; }
.swipe-card.is-leaving { pointer-events: none; opacity: 0; transition: transform 300ms ease-in, opacity 300ms ease-in; }
.swipe-card:focus-visible { outline-offset: 4px; border-radius: var(--r-lg); }

.swipe-media { position: relative; flex: 1 1 auto; min-height: 120px; background: var(--surface-2); }
.swipe-media img, .swipe-media .tile-placeholder { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; pointer-events: none; }
.swipe-body { flex: 0 0 auto; padding: 14px 20px 16px; display: flex; flex-direction: column; gap: 8px; }
.swipe-name { font-size: clamp(1.3rem, 1.15rem + .6vw, 1.6rem); margin: 0; line-height: 1.1; }
.swipe-by { margin: -4px 0 0; }
.swipe-desc { margin: 0; font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.swipe-more { align-self: flex-start; font-weight: 600; font-size: .9rem; }

.stamp {
  position: absolute; top: 22px; padding: 4px 14px; border: 4px solid currentColor; border-radius: 12px;
  font: 700 1.9rem/1 var(--font-display); text-transform: uppercase; letter-spacing: .04em;
  background: rgba(255, 255, 255, .85); opacity: 0; pointer-events: none;
}
.stamp-like { left: 20px; color: #2f7d16; transform: rotate(-14deg); opacity: var(--like); }
.stamp-pass { right: 20px; color: #c62f3a; transform: rotate(14deg); opacity: var(--pass); }
.stamp-super { left: 50%; bottom: 22px; top: auto; color: var(--c-purple-ink); transform: translateX(-50%) rotate(-4deg); opacity: var(--super); }

.deck-controls { display: flex; justify-content: center; align-items: center; gap: 22px; margin: 26px 0 10px; }
.deck-controls[hidden] { display: none; }
.swipe-btn {
  display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%;
  border: 0; background: var(--surface); box-shadow: var(--shadow-md); cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.swipe-btn:hover { transform: translateY(-2px) scale(1.05); box-shadow: var(--shadow-lg); }
.swipe-btn:active { transform: scale(.92); }
.swipe-btn-pass { color: #d23a47; }
.swipe-btn-like { color: var(--c-purple); }
.swipe-btn-super { width: 54px; height: 54px; color: var(--c-ink); background: var(--c-yellow); }
.swipe-btn-pass:hover { background: #FFE9E9; }
.swipe-btn-like:hover { background: var(--c-purple-soft); }
.swipe-btn-sm { width: 52px; height: 52px; }
.swipe-btn-sm.swipe-btn-super { width: 44px; height: 44px; }
.discover-count { text-align: center; color: var(--muted); margin: 6px 0 0; }
.discover-count span { font-weight: 700; color: var(--heading); }

.deck-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px 24px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.deck-empty[hidden] { display: none; }
.deck-empty h2 { font-size: 1.6rem; margin: 10px 0 8px; }
.deck-empty-icon { color: var(--c-yellow); }
.deck-empty-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 8px 0 0; }
.deck-empty-actions form[hidden] { display: none; }

/* Details sheet: slides up from the bottom on phones, a centered card on wide screens. */
.swipe-sheet {
  width: min(640px, 100%); max-width: 100%; max-height: min(88svh, 900px); margin: auto auto 0; padding: 0;
  border: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg); display: none; flex-direction: column; overflow: hidden;
}
.swipe-sheet[open] { display: flex; animation: sheet-up 260ms var(--ease); }
.swipe-sheet::backdrop { background: rgba(41, 36, 59, .55); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-inner { position: relative; overflow-y: auto; overscroll-behavior: contain; padding: 0 0 12px; }
.sheet-close { position: sticky; top: 10px; float: right; margin: 10px 10px -54px 0; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--c-ink); box-shadow: var(--shadow-md); cursor: pointer; }
.sheet-content { padding: 0 20px; }
.sheet-content > .sheet-header { display: block; width: calc(100% + 40px); max-width: none; margin: 0 -20px 16px; height: auto; aspect-ratio: 460 / 215; object-fit: cover; }
.sheet-title { font-size: 1.6rem; margin: 0 0 4px; }
.sheet-content .tags { margin: 10px 0 16px; }
.sheet-shots { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px 16px; padding: 0 20px 6px; }
.sheet-shots img { flex: 0 0 86%; width: 86%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; scroll-snap-align: center; background: var(--surface-2); }
.sheet-about { font-size: .95rem; }
.sheet-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 8px; }
.sheet-actions { display: flex; justify-content: center; align-items: center; gap: 20px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
@media (min-width: 700px) {
  .swipe-sheet { margin: auto; border-radius: var(--r-lg); }
}
@media (max-width: 520px) {
  .discover { padding-top: 8px; }
  .discover-head { margin-bottom: 10px; }
  .discover-help { display: none; }
  .deck-wrap { height: clamp(340px, calc(100svh - 270px), 620px); }
  .deck-controls { margin: 20px 0 6px; }
  .swipe-btn { width: 60px; height: 60px; }
  .swipe-btn-super { width: 50px; height: 50px; }
}

/* Home page: Discover Match promo */
.match-promo {
  margin-top: var(--section); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 32px;
  background: var(--c-ink); color: #EDEAF5; border-radius: var(--r-lg); padding: clamp(28px, 5vw, 56px); position: relative; overflow: hidden; isolation: isolate;
}
.match-promo h2 { color: #fff; font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); margin: 10px 0 12px; }
.match-promo .eyebrow { color: var(--c-ink); }
.match-promo p { max-width: 46ch; }
.match-promo .button { margin-top: 8px; }
.match-promo :focus-visible { outline-color: var(--c-yellow); }
.match-legend { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.match-legend li { display: flex; align-items: center; gap: 10px; }
.match-legend .dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .1); font-weight: 700; flex: 0 0 auto; }
.match-legend .dot-pass { color: #ff9a9a; }
.match-legend .dot-like { color: var(--c-lime); }
.match-legend .dot-super { color: var(--c-yellow); }
.match-stack { position: relative; height: 340px; max-width: 300px; width: 100%; margin: 0 auto; }
.match-stack .mini-card { position: absolute; inset: 0; border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); display: flex; flex-direction: column; }
.match-stack .mini-card img, .match-stack .mini-card .tile-placeholder { flex: 1 1 auto; width: 100%; min-height: 0; object-fit: cover; aspect-ratio: auto; }
.match-stack .mini-card span.mini-name { padding: 12px 14px; font: 600 1.05rem/1.2 var(--font-display); color: var(--c-ink); }
.match-stack .mini-card:nth-child(1) { transform: rotate(-9deg) translate(-34px, 10px); }
.match-stack .mini-card:nth-child(2) { transform: rotate(7deg) translate(30px, 4px); }
.match-stack .mini-card:nth-child(3) { transform: rotate(-1deg); animation: mini-swipe 4.5s var(--ease) infinite; }
@keyframes mini-swipe { 0%, 55% { transform: rotate(-1deg); } 70% { transform: translate(26px, -6px) rotate(6deg); } 85%, 100% { transform: rotate(-1deg); } }
.match-stack .match-heart { position: absolute; right: -6px; bottom: 26px; z-index: 5; width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; background: var(--c-purple); color: #fff; box-shadow: 0 10px 24px rgba(118, 87, 255, .5); }
@media (max-width: 820px) {
  .match-promo { grid-template-columns: 1fr; }
  .match-stack { height: 280px; max-width: 240px; order: -1; margin-bottom: 8px; }
}
.match-note { margin: 12px 0 0; opacity: .8; }

/* ---------- Sign in, sign up, account ---------- */
.auth-card { max-width: 460px; margin: 40px auto; display: flex; flex-direction: column; gap: 14px; }
.auth-card h1 { margin: 0; font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); }
.auth-card p { margin: 0; }
.auth-card .alert { margin: 0; }
.auth-providers { display: flex; flex-direction: column; gap: 10px; }
.auth-providers .button { gap: 10px; }
.auth-form { max-width: none; }
.auth-form label:first-of-type { margin-top: 4px; }
.auth-form .button-block { align-self: stretch; }
.auth-switch { text-align: center; color: var(--muted); }
.button-google { background: #fff; border-color: var(--field-line); color: var(--c-ink); }
.button-google:hover { background: #f4f2fb; border-color: var(--c-ink); color: var(--c-ink); box-shadow: var(--shadow-md); }
.form input[type=password] {
  margin-top: 6px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--field-line);
  background: var(--field-bg); color: var(--text); font: inherit;
}
.signin-methods { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.signin-methods li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.signin-methods li:last-child { border-bottom: 0; }
.signin-methods strong { min-width: 170px; }
.discover-early { display: inline-block; margin: 10px 0 0; padding: 6px 14px; border-radius: var(--r-pill); background: var(--c-yellow); color: var(--c-ink); font-weight: 600; }
@media (max-width: 520px) {
  .discover-early { margin-top: 6px; padding: 4px 12px; }
  .discover[data-guest] .deck-wrap { height: clamp(320px, calc(100svh - 310px), 620px); }
}
