/* =========================================
   Date Me — Editorial Romance design system
   ========================================= */

:root {
  --ivory: #FAF5EE;
  --ivory-2: #F2EADC;
  --aubergine: #2A1A2F;
  --aubergine-2: #4A2D52;
  --coral: #E36B5C;
  --coral-deep: #C9523F;
  --rose: #D9A6A0;
  --sage: #7A8F7A;
  --gold: #D6A85F;
  --paper: #FAF5EE;
  --ink: #2A1A2F;
  --ink-soft: #5A4759;
  --ink-mute: #8A7686;
  --line: rgba(42, 26, 47, 0.12);
  --line-strong: rgba(42, 26, 47, 0.25);
  --surface: #FFFDF8;
  --surface-2: #F2EADC;
  --shadow-soft: 0 1px 2px rgba(42, 26, 47, .06), 0 8px 24px rgba(42, 26, 47, .08);
  --shadow-card: 0 24px 60px -20px rgba(42, 26, 47, .35), 0 6px 18px rgba(42, 26, 47, .12);
  --primary: var(--coral);
  --primary-text: #fff;
  --grain-opacity: .045;
  --radius-card: 28px;
  --radius-pill: 999px;
  --radius-soft: 14px;
}

html[data-theme="dark"] {
  --paper: #15101A;
  --ink: #F4ECE0;
  --ink-soft: #C6B6BD;
  --ink-mute: #8A7686;
  --line: rgba(244, 236, 224, 0.10);
  --line-strong: rgba(244, 236, 224, 0.22);
  --surface: #1E1626;
  --surface-2: #281C32;
  --aubergine: #F4ECE0;
  --aubergine-2: #E0CFD8;
  --coral: #F4A988;
  --coral-deep: #E18C6B;
  --rose: #C68C90;
  --sage: #9DB29D;
  --primary: var(--coral);
  --primary-text: #1F1326;
  --shadow-soft: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.5);
  --shadow-card: 0 24px 60px -20px rgba(0,0,0,.6), 0 6px 18px rgba(0,0,0,.35);
  --grain-opacity: .07;
}
html[data-theme="dark"] .deck-actions button.like { color: #1F1326; }
html[data-theme="dark"] .chat-compose button { color: #1F1326; }
html[data-theme="dark"] .bubble.out { color: #1F1326; }
html[data-theme="dark"] .new-match .av { background: linear-gradient(135deg, var(--coral), var(--coral-deep)); }
html[data-theme="dark"] .match-overlay h2 em { color: var(--coral); }
html[data-theme="dark"] .dm-row .meta-r .unread { color: #1F1326; }
/* Buttons must keep their own text color regardless of the global anchor color in dark mode. */
html[data-theme] .btn { color: var(--primary-text); }
html[data-theme] .btn.ghost { color: var(--ink); }
html[data-theme] .btn.dark { color: var(--paper); }
html[data-theme] .icon-btn { color: var(--ink); }

* { box-sizing: border-box; }

/* The hidden HTML attribute must always trump display rules from class selectors. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Manrope', 'Inter Tight', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 80% 60% at 80% -10%, rgba(227,107,92,.18), transparent 60%),
    radial-gradient(ellipse 60% 50% at 0% 110%, rgba(122,143,122,.18), transparent 60%),
    var(--paper);
  background-attachment: fixed;
  position: relative;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(ellipse 80% 60% at 80% -10%, rgba(244,169,136,.18), transparent 60%),
    radial-gradient(ellipse 60% 50% at 0% 110%, rgba(157,178,157,.14), transparent 60%),
    var(--paper);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: var(--grain-opacity);
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

h1, h2, h3, h4, h5, .display {
  font-family: 'Fraunces', 'Georgia', 'Cambria', 'Times New Roman', serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
  margin: 0;
  font-variation-settings: "opsz" 144, "SOFT" 80;
}

h1 { font-size: clamp(2.4rem, 8vw, 4rem); font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
h3 { font-size: 1.5rem; font-weight: 500; }
h4 { font-size: 1.2rem; }

em, .italic-serif {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
}

p { margin: 0 0 1em; color: var(--ink); }
a { color: var(--coral-deep); text-decoration: none; }
a:hover { color: var(--coral); }

html[data-theme="dark"] a { color: var(--coral); }

.phone {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  height: 100dvh;
  background: var(--surface);
  box-shadow: 0 40px 80px -20px rgba(42, 26, 47, .3), 0 8px 24px rgba(42, 26, 47, .14);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 700px) {
  .phone {
    height: calc(100dvh - 48px);
    margin: 24px auto;
    border-radius: 36px;
  }
}

.topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  z-index: 10;
  backdrop-filter: saturate(140%) blur(6px);
}

.brand {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.6rem;
  letter-spacing: -.02em;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.brand .amp { color: var(--coral); }

.topbar-actions { display: flex; gap: 8px; }

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .15s, background .15s;
}
.icon-btn:hover { background: var(--rose); color: var(--ink); }
.icon-btn:active { transform: scale(.95); }
.icon-btn svg { width: 18px; height: 18px; }

.bottomnav {
  flex-shrink: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 4px env(safe-area-inset-right) calc(4px + env(safe-area-inset-bottom)) env(safe-area-inset-left);
  z-index: 10;
}
.bottomnav a {
  display: flex; align-items: center; justify-content: center;
  padding: 14px 4px;
  color: var(--ink-mute);
  position: relative;
  text-decoration: none;
}
.bottomnav a.active { color: var(--coral); }
.bottomnav a.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 3px;
  background: var(--coral);
  border-radius: 2px;
}
.bottomnav a svg { width: 26px; height: 26px; }
.bottomnav .badge {
  position: absolute; top: 8px; right: calc(50% - 22px);
  background: var(--coral);
  color: var(--primary-text);
  font-size: .65rem;
  font-weight: 700;
  border-radius: 999px;
  min-width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

.appmain {
  flex: 1;
  padding: 12px 20px 12px;
  min-height: 0;
  overflow-y: auto;
}
.appmain.no-scroll {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.btn {
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  background: var(--coral);
  color: var(--primary-text);
  font-weight: 700;
  letter-spacing: .02em;
  font-size: .95rem;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  box-shadow: 0 6px 18px -6px rgba(227, 107, 92, .55);
}
.btn:hover { background: var(--coral-deep); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.full { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.dark { background: var(--ink); color: var(--paper); }
.btn.dark:hover { background: var(--aubergine-2); }
.btn.sm { padding: 9px 16px; font-size: .85rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: .82rem;
  font-weight: 600;
  border: 1px solid var(--line);
}
.chip.lg { padding: 10px 14px; font-size: .9rem; }
.chip.tone-rose { background: var(--rose); color: var(--ink); border-color: transparent; }
.chip.tone-coral { background: var(--coral); color: var(--primary-text); border-color: transparent; }
.chip.tone-sage { background: var(--sage); color: #fff; border-color: transparent; }
.chip.selectable { cursor: pointer; }
.chip.selected { background: var(--coral); color: #fff; border-color: var(--coral); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .label {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: .95rem;
  color: var(--ink-soft);
}
input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="date"],
select, textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 14px 16px;
  border-radius: var(--radius-soft);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  outline: none;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(227,107,92,.15);
}
::placeholder { color: var(--ink-mute); }
.hint { font-size: .82rem; color: var(--ink-mute); margin-top: 2px; }
.err { font-size: .82rem; color: var(--coral-deep); margin-top: 2px; }

.card-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.deck {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.deck-empty {
  text-align: center;
  padding: 40px 24px;
  color: var(--ink-mute);
}
.swipecard {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow-card);
  touch-action: none;
  user-select: none;
  cursor: grab;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s;
  will-change: transform;
}
.swipecard.dragging { transition: none; cursor: grabbing; }
.swipecard .photos {
  position: absolute; inset: 0;
}
.swipecard .photos img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  opacity: 0;
  transition: opacity .15s;
}
.swipecard .photos img.active { opacity: 1; }
.swipecard .photo-progress {
  position: absolute; top: 14px; left: 14px; right: 14px;
  display: flex; gap: 4px;
  z-index: 3;
}
.swipecard .photo-progress span {
  flex: 1; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,.35);
}
.swipecard .photo-progress span.active { background: #fff; }
.swipecard .photo-tap {
  position: absolute; top: 0; bottom: 25%;
  width: 35%;
  z-index: 2;
}
.swipecard .photo-tap.left { left: 0; }
.swipecard .photo-tap.right { right: 0; }
.swipecard .gradient {
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 55%;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,.78));
  z-index: 1;
  pointer-events: none;
}
.swipecard .meta {
  position: absolute;
  left: 22px; right: 22px; bottom: 22px;
  z-index: 4;
  color: #fff;
}
.swipecard .meta h2 {
  color: #fff;
  font-size: 1.7rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
}
.swipecard .meta .age { font-weight: 300; opacity: .9; }
.swipecard .meta .sub {
  font-size: .86rem;
  opacity: .88;
  margin-top: 4px;
}
.swipecard .meta .bio {
  font-size: .85rem;
  opacity: .85;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.swipecard .meta .ints {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 8px;
}
.swipecard .meta .ints span {
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  font-size: .75rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 500;
}
.swipecard .open-profile {
  position: absolute;
  bottom: 22px;
  right: 22px;
  z-index: 5;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.swipecard .stamp {
  position: absolute;
  top: 36px;
  font-weight: 800;
  font-size: 2.2rem;
  padding: 6px 18px;
  border-radius: 10px;
  opacity: 0;
  transition: opacity .12s;
  z-index: 6;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-family: 'Manrope', sans-serif;
  pointer-events: none;
}
.swipecard .stamp.like {
  left: 26px;
  color: #2e9b6a;
  border: 3px solid #2e9b6a;
  background: rgba(46,155,106,.15);
  transform: rotate(-12deg);
}
.swipecard .stamp.pass {
  right: 26px;
  color: var(--coral-deep);
  border: 3px solid var(--coral-deep);
  background: rgba(201,82,63,.12);
  transform: rotate(12deg);
}

.deck-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 8px 0 4px;
}
.deck-actions button {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .12s, background .15s;
}
.deck-actions button:hover { transform: translateY(-2px); }
.deck-actions button.like {
  background: var(--coral);
  color: var(--primary-text);
  width: 76px; height: 76px;
}
.deck-actions button.pass {
  background: var(--ink);
  color: var(--paper);
}
.deck-actions svg { width: 26px; height: 26px; }
.deck-actions .like svg { width: 32px; height: 32px; }

.swipe-counter {
  flex-shrink: 0;
  text-align: center;
  font-size: .72rem;
  color: var(--ink-mute);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 6px;
}

.dm-list { display: flex; flex-direction: column; gap: 4px; }
.dm-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-radius: 14px;
  transition: background .15s;
  cursor: pointer;
  color: var(--ink);
}
.dm-row:hover { background: var(--surface-2); }
.dm-avatar {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-2);
}
.dm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dm-row .name { font-weight: 700; color: var(--ink); }
.dm-row .preview { font-size: .88rem; color: var(--ink-mute); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.dm-row .meta-r { margin-left: auto; text-align: right; }
.dm-row .meta-r .time { font-size: .72rem; color: var(--ink-mute); letter-spacing: .05em; }
.dm-row .meta-r .unread {
  display: inline-block;
  margin-top: 4px;
  background: var(--coral);
  color: #fff;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 8px;
}

.new-matches {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  align-items: flex-start;
  flex-shrink: 0;
  min-height: 96px;
}
.new-matches::-webkit-scrollbar { display: none; }
.new-match {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 64px; min-width: 64px; cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.new-match .av {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--rose));
  padding: 3px;
  flex-shrink: 0;
}
.new-match .av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.new-match .nm { font-size: .72rem; color: var(--ink); font-weight: 600; text-align: center; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky; top: 0; z-index: 5;
}
.chat-header img.av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.chat-header .info { line-height: 1.1; }
.chat-header .info .nm { font-weight: 700; font-size: .98rem; }
.chat-header .info .status { font-size: .72rem; color: var(--ink-mute); }
.chat-header .back { color: var(--ink); flex-shrink: 0; }
.chat-header .back svg { width: 20px; height: 20px; stroke-width: 2.4; }

.chat-body {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  background: var(--paper);
}
.bubble {
  max-width: 76%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: .95rem;
  line-height: 1.4;
  position: relative;
  word-wrap: break-word;
}
.bubble.in {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--ink);
  border-bottom-left-radius: 6px;
}
.bubble.out {
  align-self: flex-end;
  background: var(--coral);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.bubble .ts {
  display: block;
  font-size: .68rem;
  margin-top: 4px;
  opacity: .65;
}
.bubble.out .ts { color: rgba(255,255,255,.85); }
.bubble .read-mark { margin-left: 6px; font-weight: 600; }
.typing-row { display: flex; gap: 4px; align-items: center; padding-left: 12px; height: 18px; }
.typing-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink-mute);
  animation: tDot 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: .15s; }
.typing-dot:nth-child(3) { animation-delay: .3s; }
@keyframes tDot {
  0%, 60%, 100% { opacity: .25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.chat-compose {
  display: flex; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.chat-compose input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
}
.chat-compose button {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--coral);
  color: #fff;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.chat-compose button[disabled] { opacity: .4; cursor: not-allowed; }

.profile-cover { position: relative; height: 320px; overflow: hidden; }
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-cover .grad { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 45%, rgba(0,0,0,.7)); }
.profile-cover .back {
  position: absolute; top: 14px; left: 14px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  color: #1F1326;
  display: inline-flex; align-items: center; justify-content: center;
  z-index: 3;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  border: none;
  transition: transform .15s;
}
.profile-cover .back:hover { transform: scale(1.05); }
.profile-cover .back svg { width: 22px; height: 22px; stroke-width: 2.5; }
.profile-body { padding: 18px 22px 96px; }
.profile-body h1 { font-size: 2rem; }
.profile-body .sub { color: var(--ink-mute); margin: 4px 0 16px; }
.profile-body section { margin-top: 22px; }
.profile-body h4 {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photo-grid img { width: 100%; height: 200px; object-fit: cover; border-radius: 12px; }

.landing {
  position: relative; z-index: 2;
  max-width: 540px; margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 48px;
}
.landing-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.landing-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 30px 0 18px;
  position: relative;
}
.landing-hero .tag {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--coral-deep);
  margin-bottom: 12px;
}
.landing-hero h1 {
  font-size: clamp(3.2rem, 14vw, 5.6rem);
  letter-spacing: -.04em;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  margin-bottom: 14px;
}
.landing-hero h1 em { color: var(--coral); }
.landing-hero p {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 32ch;
  margin-bottom: 28px;
}
.landing .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.landing-marquee {
  display: flex; gap: 12px;
  margin: 26px -24px 4px;
  padding: 0 24px 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.landing-marquee::-webkit-scrollbar { display: none; }
.mini-card {
  flex: 0 0 220px;
  height: 280px;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  scroll-snap-align: center;
  box-shadow: var(--shadow-card);
  transition: transform .35s ease;
  background: var(--surface-2);
}
.mini-card:nth-child(odd) { transform: rotate(-1.2deg); }
.mini-card:nth-child(even) { transform: rotate(.8deg); }
.mini-card img { width: 100%; height: 100%; object-fit: cover; }
.mini-card .ovl {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,.6));
}
.mini-card .ovl span {
  position: absolute; left: 14px; bottom: 14px;
  color: #fff; font-family: 'Fraunces', serif; font-style: italic; font-size: 1.4rem;
}

.feat-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 32px;
}
.feat {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.feat .num {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 2rem;
  color: var(--coral);
  line-height: 1;
}
.feat .ttl { font-weight: 700; color: var(--ink); }
.feat .desc { font-size: .9rem; color: var(--ink-mute); margin-top: 4px; }

.row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.row:last-child { border-bottom: none; }
.row .lbl { font-weight: 600; color: var(--ink); }
.row .sub { color: var(--ink-mute); font-size: .85rem; }
.toggle {
  width: 48px; height: 28px;
  background: var(--line-strong);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.toggle::after {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  background: #fff;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform .2s;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.toggle.on { background: var(--coral); }
.toggle.on::after { transform: translateX(20px); }

.admin-wrap {
  position: relative; z-index: 2;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}
.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-header h1 { font-size: 2.4rem; }
.admin-nav {
  display: flex; gap: 4px; flex-wrap: wrap;
  margin-bottom: 22px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.admin-nav a {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: .9rem;
}
.admin-nav a.active { background: var(--ink); color: var(--paper); }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}
.stat .lbl { font-size: .76rem; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-mute); font-weight: 600; }
.stat .val { font-family: 'Fraunces', serif; font-size: 2.4rem; margin-top: 6px; line-height: 1; color: var(--ink); }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: auto; }
table.admin {
  width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 600px;
}
table.admin th, table.admin td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
table.admin th {
  font-weight: 700;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-mute);
  background: var(--surface-2);
}
table.admin tr:last-child td { border-bottom: none; }
.pill-dot {
  display: inline-flex; align-items: center; gap: 6px;
}
.pill-dot::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sage);
}
.pill-dot.banned::before { background: var(--coral); }

.text-mute { color: var(--ink-mute); }
.text-center { text-align: center; }
.muted-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line-strong), transparent);
  margin: 18px 0;
}
.tiny { font-size: .76rem; color: var(--ink-mute); letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: .9rem;
  margin-bottom: 14px;
}
.alert.err { background: rgba(201,82,63,.12); color: var(--coral-deep); }
.alert.ok { background: rgba(122,143,122,.16); color: var(--sage); }

.match-overlay {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(42, 26, 47, .85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.match-overlay.show { opacity: 1; pointer-events: auto; }
.match-overlay .inner {
  background: var(--surface);
  border-radius: 28px;
  padding: 32px 28px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  position: relative;
  transform: scale(.95);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.match-overlay.show .inner { transform: scale(1); }
.match-overlay h2 {
  font-size: 2.4rem;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  margin-bottom: 8px;
}
.match-overlay h2 em { color: var(--coral); }
.match-pair {
  display: flex; justify-content: center;
  margin: 18px 0;
}
.match-pair img {
  width: 100px; height: 100px;
  border-radius: 50%; object-fit: cover;
  border: 4px solid var(--surface);
}
.match-pair img:first-child { margin-right: -20px; transform: rotate(-5deg); }
.match-pair img:last-child { transform: rotate(5deg); }

.row-gap-8 { display: flex; gap: 8px; flex-wrap: wrap; }
.row-gap-12 { display: flex; gap: 12px; flex-wrap: wrap; }
.col-gap-12 { display: flex; flex-direction: column; gap: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.dropzone {
  display: block;
  width: 100%;
  border: 1.5px dashed var(--line-strong);
  border-radius: 18px;
  padding: 28px 22px;
  text-align: center;
  cursor: pointer;
  background: var(--surface-2);
  transition: background .15s, border-color .15s, transform .12s;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 1rem;
}
.dropzone strong {
  display: block;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--ink);
}
.dropzone:hover { background: var(--rose); color: var(--ink); border-color: var(--coral); transform: translateY(-1px); }
.dropzone:active { transform: translateY(0); }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.thumb { position: relative; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .rm {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: .8rem;
  border: none;
}
.thumb.primary::after {
  content: "Main";
  position: absolute; left: 6px; top: 6px;
  background: var(--coral);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .04em;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .5s ease both; }
.fade-up:nth-child(2) { animation-delay: .08s; }
.fade-up:nth-child(3) { animation-delay: .16s; }
.fade-up:nth-child(4) { animation-delay: .24s; }
.fade-up:nth-child(5) { animation-delay: .32s; }

.step-indicator {
  display: flex; gap: 6px;
  margin-bottom: 18px;
}
.step-indicator span {
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--line-strong);
}
.step-indicator span.active { background: var(--coral); }
.step-indicator span.done { background: var(--sage); }

.step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.step-actions .btn { min-width: 140px; }
.step-actions #finishBtn {
  background: linear-gradient(135deg, var(--coral), var(--coral-deep));
  font-size: 1rem;
  padding: 16px 26px;
  flex: 1;
  box-shadow: 0 10px 28px -8px rgba(227,107,92,.6);
}
.step-actions #finishBtn:hover { transform: translateY(-2px); }

.filter-section { margin-bottom: 22px; }
.filter-section h4 { margin-bottom: 10px; }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row .vlabel { width: 56px; text-align: center; font-weight: 700; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--line-strong);
  border-radius: 999px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px;
  background: var(--coral);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--surface);
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px;
  background: var(--coral);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--surface);
}

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