/* Token pass 2 — theme design-tokens v0.2.0. Dark dusk app, warm ember/gold. */
:root {
  color-scheme: dark;
  --bg: #120b24;
  --card: #221741;
  --elev: #2b1e52;
  --ink: #fff8f0;
  --muted: #b9aed4;
  --line: rgba(255, 180, 120, 0.14);
  --ember: #ff6b4a;
  --coral: #f43f5e;
  --mint: #3ecf8e;
  --gold: #f5b942;
  --violet: #8b5cf6;
  --shadow: 0 24px 50px rgba(18, 11, 36, 0.45);
  --font: "Nunito", "Inter", "Segoe UI", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 100% -8%, rgba(255, 107, 74, 0.22), transparent 55%),
    radial-gradient(700px 360px at -5% 12%, rgba(245, 185, 66, 0.14), transparent 50%),
    radial-gradient(600px 300px at 40% 100%, rgba(139, 92, 246, 0.1), transparent 55%),
    var(--bg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; }
a { color: var(--gold); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(18, 11, 36, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 0.55rem;
  background: linear-gradient(145deg, #f43f5e, #8b5cf6);
  color: white;
  font-size: 0.8rem;
  box-shadow: 0 0 18px rgba(255, 93, 115, 0.35);
}

.top-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.ghost-link {
  display: none;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--muted);
}

.pill {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(240, 198, 116, 0.42);
  border-radius: 999px;
  padding: 0.32rem 0.6rem;
  white-space: nowrap;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.85rem 0.85rem 2rem;
}

.stage {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.phone {
  position: relative;
  width: min(100%, 400px);
  margin: 0 auto;
  background: linear-gradient(180deg, var(--elev), var(--bg) 55%);
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  box-shadow: var(--shadow);
  padding: 0.55rem 0.7rem 0.4rem;
  overflow: hidden;
}

.phone-notch {
  width: 34%;
  height: 0.34rem;
  margin: 0.15rem auto 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.phone-top-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-chip {
  appearance: none;
  border: 1px solid rgba(240, 198, 116, 0.42);
  background: rgba(0, 0, 0, 0.22);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.32rem 0.58rem;
  cursor: pointer;
  line-height: 1;
}

.filter-chip.ghost {
  min-width: 1.9rem;
  padding-left: 0.45rem;
  padding-right: 0.45rem;
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
}

.filter-chip.on {
  color: var(--gold);
  border-color: rgba(245, 185, 66, 0.7);
  box-shadow: 0 0 0 1px rgba(245, 185, 66, 0.18);
}

.card.filtered {
  display: none !important;
}

/* Beat theme cream form styles — filter panel must stay readable on dusk. */
.filter-sheet {
  align-content: start !important;
  justify-items: stretch !important;
  padding: 0.85rem !important;
  z-index: 55;
}

.filter-sheet .filter-panel {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0.85rem 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(245, 185, 66, 0.28);
  background: #1a1033;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  text-align: left;
}

.filter-sheet .match-kicker {
  margin: 0 0 0.2rem;
  color: var(--gold);
}

.filter-sheet .filter-lead {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
}

.filter-sheet .filter-form {
  width: 100% !important;
  max-width: none !important;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.65rem;
  text-align: left;
}

.filter-sheet .filter-span {
  grid-column: 1 / -1;
}

.filter-sheet .filter-field,
.filter-sheet .filter-check {
  min-width: 0;
}

@media (max-width: 340px) {
  .filter-sheet .filter-form {
    grid-template-columns: 1fr;
  }
}

.filter-sheet .filter-field {
  display: grid;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #f0e6ff;
}

.filter-sheet .filter-form select,
.filter-sheet .filter-form input[type="number"] {
  width: 100% !important;
  min-height: 2.2rem;
  border-radius: 0.75rem !important;
  border: 1px solid rgba(255, 180, 120, 0.28) !important;
  background: #120b24 !important;
  color: #fff8f0 !important;
  padding: 0.55rem 0.75rem !important;
  font-size: 0.92rem !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
}

.filter-sheet .filter-form select option {
  background: #120b24;
  color: #fff8f0;
}

.filter-age-pair {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.filter-age-pair input {
  flex: 1;
  margin-bottom: 0 !important;
  border-radius: 0.75rem !important;
}

.filter-check {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #f0e6ff;
}

.filter-check input {
  width: 1.05rem !important;
  height: 1.05rem;
  margin: 0 !important;
  accent-color: var(--ember);
}

.filter-note {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
}

.filter-actions {
  width: 100% !important;
  max-width: none !important;
  margin-top: 0.15rem;
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-sheet .filter-actions .text-btn {
  flex: 1 1 6.5rem;
  padding: 0.55rem 0.7rem;
}

.deck-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin-top: 0.85rem;
}

.phone-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.1rem 0.2rem 0.55rem;
  font-weight: 750;
}

.rank-chip {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1a1033;
  background: linear-gradient(90deg, var(--gold), #f5b942);
  border-radius: 999px;
  padding: 0.28rem 0.5rem;
}

.deck {
  position: relative;
  height: min(54dvh, 460px);
  min-height: 340px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.card {
  position: absolute;
  inset: 0;
  border-radius: 1.25rem;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
  user-select: none;
  cursor: grab;
  touch-action: none;
  will-change: transform;
}

.card:active { cursor: grabbing; }
.card.behind-1 { transform: scale(0.965) translateY(10px); }
.card.behind-2 { transform: scale(0.93) translateY(18px); opacity: 0.82; }
.card.hidden { opacity: 0; pointer-events: none; }

.card-face {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0;
  position: relative;
  background: #1a1033;
}

/* Top scrim so Example + rank stay readable on the art. */
.card-face::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 28%;
  background: linear-gradient(180deg, rgba(18, 11, 36, 0.62), transparent);
  pointer-events: none;
  z-index: 1;
}

/* Bottom scrim rises from the bottom third. Text sits on this, not on a circle. */
.card-face::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(18, 11, 36, 0.94));
  pointer-events: none;
  z-index: 1;
}

/* Full-bleed: the art IS the card. No orb, no circle crop, no letter disc. */
.card-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 22%;
  z-index: 0;
  pointer-events: none;
  border-radius: 0;
}

.tone-a { background: linear-gradient(165deg, #6a3044 0%, #24344a 48%, #1a1020 100%); }
.tone-b { background: linear-gradient(165deg, #1e4658 0%, #5a3050 52%, #1a1814 100%); }
.tone-c { background: linear-gradient(165deg, #5a3a22 0%, #2a2450 55%, #14241f 100%); }
.tone-d { background: linear-gradient(165deg, #3d2458 0%, #204048 50%, #241418 100%); }
.tone-e { background: linear-gradient(165deg, #4a2840 0%, #1f3a3a 50%, #201018 100%); }
.tone-f { background: linear-gradient(165deg, #2a3858 0%, #4a2850 55%, #181420 100%); }

.card-top {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  pointer-events: none;
}

.badge, .stamp, .rank-tag {
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 2;
}

.badge, .rank-tag {
  position: static;
}

.badge {
  font-size: 0.6rem;
  color: #fff8f0;
  background: rgba(18, 11, 36, 0.55);
  border: 1px solid rgba(255, 248, 240, 0.22);
  border-radius: 999px;
  padding: 0.22rem 0.48rem;
}

.rank-tag {
  font-size: 0.6rem;
  color: #1a1033;
  background: linear-gradient(90deg, var(--gold), #f5b942);
  border-radius: 999px;
  padding: 0.22rem 0.48rem;
}

.card-rank-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.28rem;
  max-width: 70%;
}

.card-rank-stack .heeps-tested-badge {
  display: block;
  max-width: 16rem;
  margin: 0;
  padding: 0.28rem 0.42rem;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
  text-align: right;
  color: #241a38;
  background: #fff8f0;
  border-radius: 0.55rem;
}

.likes-you {
  position: static;
  display: inline-block;
  margin-top: 0.45rem;
  z-index: 2;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #06281c;
  background: #3ecf8e;
  border-radius: 999px;
  padding: 0.22rem 0.48rem;
}

.stamp {
  position: absolute;
  top: 1.55rem;
  opacity: 0;
  font-size: 1.4rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.45rem;
  border: 3px solid currentColor;
  z-index: 3;
}

.stamp.like { left: 0.85rem; color: var(--ember); transform: rotate(-12deg); }
.stamp.nope { right: 0.85rem; color: var(--coral); transform: rotate(12deg); }
.stamp.super { left: 50%; top: 42%; transform: translateX(-50%) rotate(-6deg); color: var(--gold); }

.card-meta {
  position: relative;
  z-index: 2;
  padding: 0 0.95rem 0.95rem;
  color: #fff8f0;
}

.card-meta .prompt {
  margin: 0.28rem 0 0;
  font-size: 0.95rem;
  font-weight: 650;
  color: #fff8f0;
}

.card-meta h2 {
  margin: 0;
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  color: #fff8f0;
  line-height: 1.05;
}

.card-meta .sub {
  margin: 0.18rem 0 0;
  color: #fff8f0;
  font-size: 0.88rem;
}

.card-meta .photo-locked {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: rgba(255, 248, 240, 0.78);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.tags span {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.actions {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.85rem;
  padding: 0.35rem 0 0.2rem;
}

.act {
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--elev);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.28);
}

.act:active { transform: scale(0.96); }
.nope-btn { color: var(--coral); }
.super-btn { color: var(--gold); width: 3rem; height: 3rem; font-size: 1.05rem; }
.like-btn { color: var(--ember); width: 3.9rem; height: 3.9rem; font-size: 1.55rem; }

.hint {
  margin: 0.15rem 0 0.35rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
}

.hint.tight { margin-top: 0.45rem; }

.sheet-panel {
  height: auto;
  min-height: min(42dvh, 320px);
  padding: 0.35rem 0.15rem 1.4rem;
  overflow: visible;
}

#panelRank {
  padding-bottom: 1.65rem;
}

.empty {
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 1rem;
  padding: 1.1rem 1rem;
  color: var(--muted);
}

.prompt {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 650;
}

.empty .prompt { color: var(--ink); }

.match-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.match-list li {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0.9rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  cursor: pointer;
}

.match-list small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.avatar, .match-avatars span, .you-avatar {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 999px;
  background: linear-gradient(145deg, #f43f5e, #8b5cf6);
  font-weight: 800;
}

.rank-intro {
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0.35rem;
  display: grid;
  gap: 0.55rem;
  height: auto;
  overflow: visible;
}

.rank-list li {
  display: grid;
  gap: 0.15rem;
  padding: 0.6rem 0.7rem;
  border-radius: 0.8rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
}

.rank-list li[data-tier="spark"] { border-left: 3px solid #f5b942; }
.rank-list li[data-tier="ember"] { border-left: 3px solid #ff6b4a; }
.rank-list li[data-tier="flame"] { border-left: 3px solid #f43f5e; }
.rank-list li[data-tier="beacon"] { border-left: 3px solid #8b5cf6; }
.rank-list li[data-tier="phoenix"] { border-left: 3px solid #f5b942; }
.rank-list li[data-tier="vip"] { border-left: 3px solid #f5b942; background: linear-gradient(90deg, rgba(245,185,66,.2), transparent 72%); }

.rname { font-weight: 800; color: var(--gold); }
.rdesc { color: var(--muted); font-size: 0.84rem; }

.chat-thread {
  display: grid;
  gap: 0.55rem;
  max-height: min(42dvh, 320px);
  overflow: auto;
  padding: 0.2rem 0.15rem 0.5rem;
}

.bubble {
  max-width: 88%;
  padding: 0.65rem 0.8rem;
  border-radius: 1rem;
  font-size: 0.9rem;
  line-height: 1.35;
}

.bubble.them {
  justify-self: start;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-bottom-left-radius: 0.25rem;
}

.bubble.you {
  justify-self: end;
  background: linear-gradient(135deg, rgba(255, 107, 74, 0.34), rgba(245, 185, 66, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom-right-radius: 0.25rem;
}

.chat-compose {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.chat-compose input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  padding: 0.7rem 0.9rem;
  outline: none;
}

.chat-compose input:focus {
  border-color: rgba(255, 107, 74, 0.55);
}

.send-btn {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(145deg, #f43f5e, #8b5cf6);
  cursor: pointer;
  font-weight: 800;
}

.you-lead {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.you-preview {
  position: relative;
  height: min(42dvh, 340px);
  min-height: 250px;
  margin: 0 0 0.85rem;
}

.you-preview .card {
  cursor: default;
  touch-action: manipulation;
}

.you-preview .stamp {
  display: none;
}

.card-points {
  margin: 0.22rem 0 0;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
}

.you-card {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.you-avatar {
  width: 3.2rem;
  height: 3.2rem;
  font-size: 1.2rem;
}

.you-name {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.you-meta {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.you-stats {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

.you-stats li {
  text-align: center;
  padding: 0.55rem 0.3rem;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  display: grid;
  gap: 0.1rem;
}

.you-stats strong { font-size: 0.95rem; }
.you-stats span { color: var(--muted); font-size: 0.68rem; }

.match-sheet {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 0.45rem;
  padding: 1.4rem;
  background:
    radial-gradient(420px 240px at 50% 28%, rgba(255, 107, 74, 0.32), transparent 70%),
    rgba(18, 11, 36, 0.95);
}

.match-sheet[hidden] { display: none; }

a.card-profile {
  display: inline-block;
  margin-top: 0.5rem;
  position: relative;
  z-index: 4;
  pointer-events: auto;
  border: 1px solid rgba(255, 248, 240, 0.45);
  background: rgba(18, 11, 36, 0.55);
  color: #fff8f0;
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  font-weight: 800;
  font-size: 0.75rem;
  text-decoration: none;
  cursor: pointer;
}

.profile-sheet {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.45rem 0.35rem 0.4rem;
  background: rgba(18, 11, 36, 0.97);
}

.profile-sheet[hidden] { display: none; }

.profile-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
}

.profile-bar .text-btn {
  padding: 0.45rem 0.7rem;
  font-size: 0.75rem;
  text-decoration: none;
  text-align: center;
}

.profile-sheet iframe {
  flex: 1;
  width: 100%;
  min-height: 320px;
  border: 0;
  background: #fff8f3;
  border-radius: 0.9rem;
}

.match-kicker {
  margin: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 800;
}

.match-avatars { display: flex; gap: 0.4rem; margin: 0.3rem 0; }
.match-sheet h2 { margin: 0; font-size: 1.7rem; letter-spacing: -0.04em; }
.match-sheet p { margin: 0; color: var(--muted); max-width: 18rem; }

.match-actions {
  display: grid;
  gap: 0.45rem;
  width: min(100%, 16rem);
  margin-top: 0.35rem;
}

.text-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.72rem 1.1rem;
  font-weight: 800;
  cursor: pointer;
}

a.text-btn {
  display: block;
  text-align: center;
  text-decoration: none;
}

.text-btn.solid {
  background: #fff8f0;
  color: #1a1033;
}

.text-btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.tabbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  margin-top: 0.15rem;
}

.tabbar button {
  background: transparent;
  border: 0;
  padding: 0.7rem 0 calc(0.7rem + var(--safe-b));
  color: var(--muted);
  font-size: 0.68rem;
  cursor: pointer;
}

.tabbar .on { color: white; font-weight: 800; }

.line-btn { color: var(--gold); width: 3rem; height: 3rem; font-size: 1.05rem; }

.actions[hidden],
.chat-tools[hidden],
.deck-empty[hidden],
.deck[hidden] {
  display: none !important;
}

.pin-sheet h2 { margin: 0; font-size: 1.45rem; letter-spacing: -0.03em; }
.pin-sheet p { margin: 0; color: var(--muted); max-width: 18rem; }

.deck-empty .text-btn { margin-top: 0.85rem; }

.chat-tools {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.tool-btn, .icon-choice, .pad-key {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.nudge {
  margin: 0 0 0.45rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.75rem;
  background: rgba(240, 198, 116, 0.12);
  border: 1px solid rgba(240, 198, 116, 0.35);
  color: #f5b942;
  font-size: 0.8rem;
}

.nudge[hidden] { display: none; }

.bubble.system {
  justify-self: center;
  max-width: 95%;
  text-align: center;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: var(--muted);
  font-size: 0.78rem;
}

.discreet {
  margin: 0 0 0.85rem;
  padding: 0.7rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.discreet .rdesc { display: block; margin: 0.2rem 0 0.55rem; }

.icon-row {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.icon-choice.on {
  color: #1a1033;
  background: linear-gradient(90deg, var(--gold), #f5b942);
  border-color: transparent;
}

.pin-demo { width: 100%; }

.match-quote {
  margin: 0.15rem 0;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-left: 3px solid var(--gold);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.4rem;
  color: var(--ink);
  font-size: 0.92rem;
  max-width: 18rem;
  text-align: left;
}

.match-quote[hidden] { display: none; }

.mini-sheet, .pin-sheet {
  position: absolute;
  inset: 0;
  z-index: 46;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 0.55rem;
  padding: 1.2rem;
  background: rgba(18, 11, 36, 0.96);
  overflow: auto;
}

.mini-sheet[hidden], .pin-sheet[hidden] { display: none; }

.filter-sheet.mini-sheet {
  overflow: hidden;
  align-content: start;
  justify-items: stretch;
  padding: 0.65rem 0.75rem 1.15rem;
}

.filter-sheet.mini-sheet form,
.filter-sheet .filter-actions.match-actions {
  width: 100% !important;
  max-width: none !important;
}

.pin-sheet { z-index: 60; }

.line-prompt {
  margin: 0;
  font-weight: 700;
  max-width: 18rem;
}

.mini-sheet form, .pin-sheet .match-actions, .mini-sheet .match-actions {
  width: min(100%, 16rem);
}

.mini-sheet input {
  width: 100%;
  margin-bottom: 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  padding: 0.7rem 0.9rem;
  outline: none;
}

.pin-dots {
  margin: 0.2rem 0;
  letter-spacing: 0.35em;
  font-size: 1.2rem;
  min-height: 1.6rem;
}

.pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  width: min(100%, 14rem);
}

.pad-key {
  height: 2.7rem;
  border-radius: 0.8rem;
  font-size: 1rem;
}

.pad-key:disabled {
  opacity: 0;
  cursor: default;
}

.aside { max-width: 38rem; }

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--coral);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.85rem, 5vw, 3.05rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.lead { color: var(--muted); font-size: 1.04rem; }

.promises {
  margin: 0.25rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.promises li { margin: 0.32rem 0; }

.callout {
  margin-top: 1.15rem;
  padding: 1rem 1.05rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.callout h2 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.callout ol {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.callout li { margin: 0.35rem 0; }

.status-grid {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.status-grid > div {
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}

.status-grid h3 {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.status-grid ul {
  margin: 0;
  padding-left: 1.05rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-grid li { margin: 0.25rem 0; }

.fine {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 1rem;
}

.fine code, .foot code {
  font-size: 0.78em;
  color: #fff8f0;
}

.foot {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.75rem;
}

@media (min-width: 900px) {
  main { padding: 1.4rem 1.2rem 2.5rem; }
  .ghost-link { display: inline; }
  .stage {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2.6rem;
    align-items: start;
  }
  .phone { position: sticky; top: 4.5rem; margin: 0; }
  .deck { height: 460px; min-height: 0; }
  .sheet-panel { height: auto; min-height: 0; }
  .status-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .stage.stage-home {
    display: grid;
    grid-template-columns: 400px 1fr;
    grid-template-areas:
      "phone aside"
      "marquee marquee";
    gap: 1.1rem 2.6rem;
    align-items: start;
  }
  .stage.stage-home .phone {
    grid-area: phone;
    position: relative;
    top: auto;
    margin: 0;
  }
  .stage.stage-home .aside {
    grid-area: aside;
    max-width: none;
  }
  .stage.stage-home .heeps-new-members {
    grid-area: marquee;
    min-width: 0;
    width: 100%;
  }
}
.stage .heeps-new-members h2 { color: #fff8f0; }

@media (max-width: 899px) {
  .stage { display: flex; }
  .phone { order: -1; width: 100%; }
}

@media (max-width: 640px) {
  .deck {
    height: min(46dvh, 380px);
    min-height: 260px;
  }
  .actions {
    margin-top: 1rem;
    gap: 1rem;
  }
}
