/* bbnames — design tokens & shared styles */

:root {
  /* ===== Direction: Terracotta (default) ===== */
  --bg: #f6ede1;
  --surface: #fbf5ea;
  --surface-2: #efe3cf;
  --ink: #3a2419;
  --ink-2: #5a3b2b;
  --ink-3: #8a6b57;
  --line: #dcc8ad;
  --line-2: #c5ac8a;
  --accent: #b55a35;
  --accent-ink: #7a3a1f;
  --accent-soft: #f3d9ca;
  --warm: #6b8058;
  --warm-soft: #dde5cc;
  --gender-f: #c08a8a;
  --gender-m: #6d8fa8;
  --shadow-color: rgba(0, 0, 0, 0.08);
  --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --page-px: 32px;
}

/* ===== Dark mode: auto-detect ===== */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1512;
    --surface: #231e19;
    --surface-2: #2d2620;
    --ink: #e8ddd0;
    --ink-2: #c4b5a3;
    --ink-3: #8a7b6b;
    --line: #3a3028;
    --line-2: #4d4035;
    --accent: #d97b54;
    --accent-ink: #f0a882;
    --accent-soft: #3a2518;
    --warm: #8ca86e;
    --warm-soft: #2a3020;
    --gender-f: #d4a0a0;
    --gender-m: #8cadc6;
    --shadow-color: rgba(0, 0, 0, 0.3);
  }
}

/* ===== Dark mode: manual override ===== */

[data-theme="dark"] {
  --bg: #1a1512;
  --surface: #231e19;
  --surface-2: #2d2620;
  --ink: #e8ddd0;
  --ink-2: #c4b5a3;
  --ink-3: #8a7b6b;
  --line: #3a3028;
  --line-2: #4d4035;
  --accent: #d97b54;
  --accent-ink: #f0a882;
  --accent-soft: #3a2518;
  --warm: #8ca86e;
  --warm-soft: #2a3020;
  --gender-f: #d4a0a0;
  --gender-m: #8cadc6;
  --shadow-color: rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }

body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}

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

input, textarea { font: inherit; color: inherit; }

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

/* ===== Layout ===== */

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 2px;
  cursor: pointer;
}

.brand .dot { color: var(--accent); }

.nav {
  display: flex;
  gap: 22px;
  font-size: 13px;
  color: var(--ink-2);
}

.nav a { padding: 4px 2px; border-bottom: 1px solid transparent; transition: border-color .15s; cursor: pointer; }

.nav a:hover, .nav a.active { border-bottom-color: var(--ink); color: var(--ink); }

.nav-more { position: relative; }

.nav-more-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 2px; border-bottom: 1px solid transparent; transition: border-color .15s; cursor: pointer; font-size: 13px; color: var(--ink-2); background: none; border-top: none; border-left: none; border-right: none; font-family: inherit; }

.nav-more-btn:hover, .nav-more-btn.active { border-bottom-color: var(--ink); color: var(--ink); }

.nav-more-dropdown { position: absolute; top: calc(100% + 8px); left: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 4px 0; min-width: 140px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); z-index: 60; }

.nav-more-dropdown a { display: block; padding: 8px 16px; font-size: 13px; color: var(--ink-2); border-bottom: none; }

.nav-more-dropdown a:hover, .nav-more-dropdown a.active { color: var(--ink); background: var(--surface); border-bottom: none; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 13px; color: var(--ink-2); }

.preferences-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; transition: background .15s, color .15s; color: var(--ink-3); }

.preferences-icon:hover { background: var(--surface-2); color: var(--ink); }

.shortlist-count { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; }

.shortlist-count svg { width: 13px; height: 13px; }

.matches-count { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--accent); border-radius: 999px; background: var(--accent-soft, var(--surface)); color: var(--accent); font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; cursor: pointer; text-decoration: none; }

.connect-link { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px dashed var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 12px; font-family: var(--mono); letter-spacing: 0.04em; text-decoration: none; cursor: pointer; transition: border-color .15s, color .15s; }

.connect-link:hover { border-color: var(--accent); color: var(--accent); }

.connect-status { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft, var(--surface)); border: 1px solid var(--accent); color: var(--accent); font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-decoration: none; transition: background .15s; }

.connect-status:hover { background: var(--accent); color: var(--bg); }

.connect-banner { padding: 24px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface); }

.container { max-width: 1280px; margin: 0 auto; padding: 32px; }

/* ===== Typography ===== */

.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.display .last-name {
  font-size: 0.45em;
  margin-top: 4px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.meta {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-2);
  font-size: 14px;
}

/* ===== Name card ===== */

.name-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 18px 20px 16px;
  position: relative;
  transition: border-color .15s, background .15s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 128px;
}

.name-card:hover {
  border-color: var(--line-2);
  background: var(--surface-2);
}

.name-card--saved {
  border-color: var(--warm);
  background: var(--warm-soft);
}

.name-card--saved:hover {
  border-color: var(--warm);
  background: color-mix(in srgb, var(--warm-soft) 70%, var(--surface-2));
}

.name-card--saved .divider {
  background: color-mix(in srgb, var(--warm) 30%, var(--line));
}

.name-card .name {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.015em;
  margin: 0;
  padding-right: 36px;
}

.last-name {
  display: block;
  font-weight: 300;
  color: var(--ink-3);
  font-size: 0.6em;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.name-card .divider { height: 1px; background: var(--line); margin: 10px 0 8px; }

.name-card .meta-line {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.name-card .heart {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--ink-3);
  transition: color .15s, background .15s, transform .15s;
}

.name-card .heart:hover { color: var(--warm); background: var(--warm-soft); }

.name-card .heart.saved { color: var(--warm); }

.name-card .heart.saved svg { fill: var(--warm); }

.name-card .heart:active { transform: scale(0.88); }

.name-card .exclude-btn {
  position: absolute;
  bottom: 12px;
  right: 14px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s, color .15s, border-color .15s;
}

.name-card:hover .exclude-btn { opacity: 1; }

.name-card .exclude-btn:hover { color: var(--ink); border-color: var(--ink-3); }

.name-card .rank-tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-top: auto;
  padding-top: 8px;
}

/* ===== Chip ===== */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  background: var(--surface);
  color: var(--ink-2);
  transition: all .12s;
  white-space: nowrap;
}

.chip:hover { border-color: var(--line-2); color: var(--ink); }

.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

/* ===== Search bar ===== */

.search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: border-color .15s;
}

.search:focus-within { border-color: var(--ink); }

.search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
}

.search input::placeholder { color: var(--ink-3); font-style: italic; }

.search .kbd {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

/* ===== Buttons ===== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 13px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--bg);
  transition: all .15s;
  letter-spacing: 0.01em;
}

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

.btn.ghost { background: transparent; color: var(--ink); }

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

/* ===== Chip x ===== */

.chip .x { font-size: 14px; line-height: 1; margin-right: -2px; opacity: 0.7; }

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

.dim { color: var(--ink-3); }

/* Gender dots */

.gdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: middle; margin-right: 6px; }

.gdot.f { background: var(--gender-f); }

.gdot.m { background: var(--gender-m); }

.gdot.u { background: var(--accent); }

/* Gender left-border accent on cards & rows */

.gender-f { border-left: 4px solid var(--gender-f); }

.gender-m { border-left: 4px solid var(--gender-m); }

.gender-u { border-left: 4px solid var(--accent); }

/* Scroll niceties */

::-webkit-scrollbar { width: 10px; height: 10px; }

::-webkit-scrollbar-track { background: transparent; }

::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; border: 2px solid var(--bg); }

/* Fade-in */

@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.fadein { animation: fadein .3s ease both; }

/* Match celebration */

@keyframes match-pop {
  0%   { opacity: 0; transform: scale(0.85) translateY(12px); }
  60%  { opacity: 1; transform: scale(1.04) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.match-new { animation: match-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

.match-banner { padding: 16px 24px; text-align: center; font-family: var(--serif); font-size: 20px; font-style: italic; color: var(--accent); background: var(--accent-soft, var(--surface)); border: 1px solid var(--accent); margin-top: 24px; cursor: pointer; }

/* Section label */

.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 40px 0 20px;
}

.section-label .line { flex: 1; height: 1px; background: var(--line); }

.section-label .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ===== Collection card ===== */

.collection-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 28px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  min-height: 200px;
  position: relative;
  transition: border-color .15s, background .15s;
  cursor: pointer;
}

.collection-card:hover {
  background: var(--surface-2);
  border-color: var(--line-2);
}

/* ===== Search dropdown ===== */

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px;
  z-index: 10;
}

.search-dropdown-item {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  cursor: pointer;
}

.search-dropdown-item:hover {
  background: var(--surface-2);
}

/* ===== Layout grid classes ===== */

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

.grid-name-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: end; }

.grid-meaning { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; }

.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }

.grid-collections { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.grid-footer-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }

/* ===== Site footer ===== */

.site-footer { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 24px var(--page-px); font-family: var(--mono); font-size: 12px; letter-spacing: 0.05em; color: var(--ink-3); }

.site-footer a { color: var(--ink-3); text-decoration: none; transition: color .15s; }

.site-footer a:hover { color: var(--ink); }

.site-footer-dot { opacity: 0.4; }

/* ===== Mobile nav ===== */

.nav-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; }

.mobile-menu { display: none; }

.mobile-menu-separator { height: 1px; background: var(--line); margin: 4px 0; }

/* ===== Theme toggle ===== */

.theme-toggle { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background .15s; color: var(--ink-3); }

.theme-toggle:hover { background: var(--surface-2); color: var(--ink); }

/* ===== Bottom sheet ===== */

.bottom-sheet-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4);
  z-index: 100; opacity: 0; transition: opacity .25s;
}

.bottom-sheet-backdrop.open { opacity: 1; }

.bottom-sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg); border-top-left-radius: 16px; border-top-right-radius: 16px;
  max-height: 85vh; z-index: 101;
  transform: translateY(100%); transition: transform .3s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex; flex-direction: column;
}

.bottom-sheet.open { transform: translateY(0); }

.bottom-sheet-handle {
  width: 36px; height: 4px; border-radius: 2px; background: var(--line-2);
  margin: 10px auto 6px; flex-shrink: 0;
}

.bottom-sheet-content { overflow-y: auto; padding: 8px var(--page-px) 32px; flex: 1; }

/* ===== Filter trigger (mobile) ===== */

.filter-trigger { display: none; }

/* ===== Editable label ===== */

.editable-label { border-bottom: 1px dashed transparent; cursor: text; transition: border-color .15s; }

.editable-label:hover { border-bottom-color: var(--line-2); }

/* ===== Touch device overrides ===== */

@media (hover: none) {
  .name-card .exclude-btn {
    opacity: 1;
    position: static;
    margin-top: auto;
    padding: 10px 16px;
    align-self: flex-start;
  }
  .editable-label { border-bottom-color: var(--line); }
}

/* ===== Swipe card gestures ===== */

.swipe-card-wrapper {
  position: relative;
  overflow: visible;
}

.swipe-indicator {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  z-index: 2;
  border-radius: 4px;
}

.swipe-indicator--save {
  right: 0;
  color: var(--warm, #c08a8a);
}

.swipe-indicator--exclude {
  left: 0;
  color: var(--ink-3);
}

/* ===== Mobile action bar ===== */

.mobile-action-bar {
  display: none;
}

/* ===== Responsive: tablet and below ===== */

@media (max-width: 768px) {
  .mobile-action-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    padding: 8px var(--page-px) calc(8px + env(safe-area-inset-bottom, 0px));
    align-items: center;
    justify-content: space-around;
    gap: 8px;
  }
  .mobile-action-bar button,
  .mobile-action-bar a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    min-height: 44px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--ink-2);
    text-decoration: none;
  }
  .mobile-action-bar button:active,
  .mobile-action-bar a:active {
    color: var(--ink);
  }
  .toast { bottom: 80px !important; }

  :root, [data-theme="dark"] { --page-px: 16px; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --page-px: 16px; } }

  .container { padding: 20px var(--page-px); }
  .topbar-inner { padding: 10px var(--page-px); gap: 12px; }
  .brand { font-size: 19px; }

  /* Nav becomes hamburger */
  .nav { display: none; }
  .topbar-right .name-count { display: none; }
  .topbar-right .preferences-icon { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu {
    display: none; flex-direction: column;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--page-px) 16px;
  }
  .mobile-menu.open { display: flex; }
  .mobile-menu a {
    display: flex; align-items: center;
    padding: 14px 8px; font-size: 15px; color: var(--ink-2);
    border-bottom: 1px solid var(--line);
  }
  .mobile-menu a.active { color: var(--ink); font-weight: 500; }
  .mobile-menu .mobile-menu-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 14px; gap: 16px;
  }

  /* Grid collapses */
  .grid-hero { grid-template-columns: 1fr; gap: 32px; }
  .grid-name-hero { grid-template-columns: 1fr; gap: 24px; }
  .grid-meaning { grid-template-columns: 1fr; gap: 24px; }
  .grid-2col { grid-template-columns: 1fr; gap: 24px; }
  .grid-collections { grid-template-columns: 1fr; }
  .grid-footer-features { grid-template-columns: 1fr; gap: 24px; }

  /* Tap targets */
  .chip { padding: 10px 16px; }
  .nav a { padding: 12px 8px; }
  .name-card .exclude-btn { padding: 10px 16px; }

  /* Filter panel becomes bottom sheet trigger */
  .filter-panel { display: none; }
  .filter-trigger { display: flex; }
  .sort-desktop { display: none !important; }

  /* Name of the day aside */
  .grid-hero aside { padding-left: 0; padding-top: 24px; }
  .grid-hero aside .notd-border { display: none; }

  /* Collection card */
  .collection-card { min-height: auto; padding: 20px; }
}

/* ===== Swipe page ===== */

.swipe-page {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.swipe-page ~ .site-footer {
  display: none;
}

.swipe-filters {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  max-width: 720px;
  margin: 0 auto;
  padding: 32px var(--page-px) 80px;
  width: 100%;
}

.swipe-arena {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px var(--page-px) 32px;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.swipe-progress {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 12px;
}

.swipe-progress-bar {
  flex: 1;
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.swipe-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .2s;
}

.swipe-top-controls {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  min-height: 36px;
}

.swipe-control-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  color: var(--ink-3);
  border-radius: 8px;
  transition: color .15s, background .15s;
}

.swipe-control-btn:hover {
  color: var(--ink);
  background: var(--surface);
}

.swipe-card-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  padding: 8px 0;
}

/* Swipe card */

.swipe-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 40px 32px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  border-left: 4px solid var(--line);
  text-align: center;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}

.swipe-card:active { cursor: grabbing; }

.swipe-card.gender-f { border-left-color: var(--gender-f); }

.swipe-card.gender-m { border-left-color: var(--gender-m); }

.swipe-card.gender-u { border-left-color: var(--accent); }

.swipe-card-name {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 12px;
  color: var(--ink);
}

.swipe-card-name .last-name {
  font-size: 0.5em;
  margin-top: 6px;
}

.swipe-card .divider {
  width: 40px;
  height: 1px;
  background: var(--line);
  margin: 0 auto 12px;
}

.swipe-card-meta {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 8px;
}

.swipe-card-meaning {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 12px;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.swipe-card-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-top: auto;
}

/* Swipe overlay indicators */

.swipe-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
  border-radius: 16px;
}

.swipe-card-overlay--like {
  color: var(--warm);
  background: color-mix(in srgb, var(--warm) 8%, transparent);
}

.swipe-card-overlay--dislike {
  color: var(--ink-3);
  background: color-mix(in srgb, var(--ink-3) 8%, transparent);
}

/* Action buttons */

.swipe-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px 0 16px;
}

.swipe-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
  transition: transform .15s, border-color .15s, background .15s, color .15s;
  position: relative;
}

.swipe-action-btn:hover {
  transform: scale(1.08);
}

.swipe-action-btn:active {
  transform: scale(0.95);
}

.swipe-action-btn--like {
  color: var(--warm);
  border-color: var(--warm);
}

.swipe-action-btn--like:hover {
  background: color-mix(in srgb, var(--warm) 10%, var(--surface));
}

.swipe-action-btn--skip {
  color: var(--ink-3);
  width: 52px;
  height: 52px;
}

.swipe-action-btn--skip:hover {
  color: var(--ink-2);
}

.swipe-action-btn--dislike {
  color: var(--ink-3);
  border-color: var(--ink-3);
}

.swipe-action-btn--dislike:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink-3) 10%, var(--surface));
}

.swipe-kbd {
  position: absolute;
  bottom: -22px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  white-space: nowrap;
}

/* Done state */

.swipe-done {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px var(--page-px);
  text-align: center;
}

/* Responsive: mobile swipe page */

@media (max-width: 768px) {
  .swipe-card-name { font-size: 40px; }
  .swipe-card { padding: 32px 24px 24px; }
  .swipe-action-btn { width: 56px; height: 56px; }
  .swipe-action-btn--skip { width: 48px; height: 48px; }
  .swipe-kbd { display: none; }
  .swipe-arena { padding-bottom: 24px; }
}

/* ===== Responsive: small phones ===== */

@media (max-width: 480px) {
  .display { font-size: clamp(32px, 10vw, 52px) !important; }
  .swipe-card-name { font-size: 36px; }
}

/* ===== Filter dropdowns ===== */

.filter-dropdown {
  position: relative;
}

.filter-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  background: var(--surface);
  transition: all .12s;
  white-space: nowrap;
}

.filter-dropdown-btn:hover { border-color: var(--line-2); color: var(--ink); }

.filter-dropdown-btn.has-active { border-color: var(--ink); color: var(--ink); }

.filter-dropdown-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.filter-dropdown-chevron {
  transition: transform .15s;
}

.filter-dropdown-chevron.open {
  transform: rotate(180deg);
}

.filter-dropdown-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 24px var(--shadow-color);
  padding: 10px;
  z-index: 50;
  min-width: 200px;
  max-width: 360px;
  animation: fadein .12s;
}

.filter-dropdown-search {
  width: 100%;
  padding: 6px 10px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  font-size: 12px;
  color: var(--ink);
  outline: none;
}

.filter-dropdown-search:focus { border-color: var(--ink-3); }

.filter-dropdown-search::placeholder { color: var(--ink-3); }

.filter-dropdown-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
}

/* ===== Flag popover ===== */

.flag-popover-anchor {
  position: relative;
}

.flag-popover {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px var(--shadow-color);
  padding: 8px 12px;
  white-space: nowrap;
  flex-direction: column;
  gap: 2px;
  z-index: 100;
  pointer-events: none;
}

.flag-popover::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--line);
}

.flag-popover-anchor:hover .flag-popover {
  display: flex;
}