:root {
  --bg: #11110f;
  --bg-elev: #1a1916;
  --ink: #f3eee6;
  --ink-soft: #c8c2b8;
  --ink-faint: #8d887e;
  --line: #2c2a26;
  --chip: #1c1b18;
  --volt: #c8ff3d;
  --volt-ink: #11110f;
  --rust: #c45c32;
  --jeremy: #c4622d;
  --david: #3a5c5c;
  --love: var(--volt);
  --maybe: var(--ink);
  --pass: var(--rust);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --radius: 24px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --pad: 16px;
  --max: 560px;
  --chrome-pad: 12px;
  --vote: 72px;
  color-scheme: dark;
  accent-color: var(--volt);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100dvh;
  min-height: 100svh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  padding: 0;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

button,
select,
a,
textarea {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 50;
  background: var(--volt);
  color: var(--volt-ink);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
}

.skip-link:focus {
  top: calc(12px + env(safe-area-inset-top));
}

.app-chrome,
main,
.site-footer {
  width: min(100%, var(--max));
  margin-inline: auto;
}

.app-chrome {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: calc(10px + env(safe-area-inset-top)) var(--pad) 10px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.chrome-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

h1 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}

.rank-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.rank-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--volt);
  color: var(--volt-ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.rank-pill[hidden] {
  display: none !important;
}

.left-count {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.who-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.who-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}

.who-btn[aria-pressed="true"] {
  color: var(--ink);
}

.who-btn[aria-pressed="true"] .who-name {
  box-shadow: inset 0 -2px 0 var(--volt);
}

.who-rule {
  width: 1px;
  height: 22px;
  background: var(--line);
  margin: 0 6px;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}

.avatar.jeremy { background: var(--jeremy); }
.avatar.david { background: var(--david); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  background: var(--chip);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  pointer-events: none;
  user-select: none;
}

.chips svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
}

.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.tabs {
  display: flex;
  gap: 2px;
}

.tabs button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  min-height: 44px;
  padding: 0 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: inset 0 -2px 0 transparent;
}

.tabs button[aria-selected="true"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--volt);
}

.count {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--volt);
  color: var(--volt-ink);
  font-size: 11px;
  font-weight: 800;
  align-items: center;
  justify-content: center;
}

.count[hidden],
.count:empty {
  display: none !important;
}

.sort-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sort-row[hidden] {
  display: none !important;
}

.sort-row label {
  font-size: 12px;
  color: var(--ink-faint);
  font-weight: 600;
}

.sort-row select {
  appearance: none;
  min-height: 44px;
  max-width: 132px;
  padding: 0 32px 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-elev) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23f3eee6' d='M1 1l5 5 5-5'/></svg>") no-repeat right 12px center;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}

main {
  padding: 8px var(--pad) 28px;
}

.search-notes {
  display: none;
}

.card {
  background: transparent;
  overflow: visible;
}

.card.is-sample .hero {
  outline: 2px dashed color-mix(in srgb, var(--volt) 55%, var(--line));
  outline-offset: -6px;
}

.hero {
  position: relative;
  height: calc(100dvh - 10.5rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  min-height: 420px;
  background: #1c1b18;
  overflow: hidden;
  border-radius: var(--radius);
}

body:has(#listings-view:not([hidden])) .site-footer {
  display: none;
}

.flag-chip {
  position: absolute;
  top: 52px;
  left: 14px;
  z-index: 2;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--rust);
  color: #fff;
}

.more {
  margin: 4px 4px 20px;
}

.more summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

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

.more[open] summary {
  color: var(--ink);
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #242320, #171614);
  color: var(--ink-soft);
  font-size: 1.2rem;
  font-weight: 700;
}

.hero-fallback.sample {
  background:
    repeating-linear-gradient(
      -18deg,
      #242320,
      #242320 18px,
      #1c1b18 18px,
      #1c1b18 36px
    );
}

.sample-banner {
  position: absolute;
  inset: 14px auto auto 14px;
  z-index: 3;
  background: var(--volt);
  color: var(--volt-ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  padding: 7px 10px;
  border-radius: 6px;
}

.deal-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 999px;
  letter-spacing: 0.06em;
  background: var(--volt);
  color: var(--volt-ink);
  text-transform: uppercase;
}

.card.is-sample .deal-badge {
  top: 48px;
}

.dom {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  padding: 8px 12px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero-grad {
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(
    to top,
    rgb(17 17 15 / 0.96) 0%,
    rgb(17 17 15 / 0.72) 42%,
    rgb(17 17 15 / 0) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.hero-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px 102px;
}

.hero-copy {
  min-width: 0;
}

.hero-year {
  margin: 0;
  font-size: clamp(2rem, 8vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.9;
}

.hero-model {
  margin: 2px 0 0;
  font-size: clamp(2.35rem, 11vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.84;
  text-transform: uppercase;
}

.hero-trim {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 550;
}

.hero-price {
  text-align: right;
  flex-shrink: 0;
}

.price {
  display: block;
  font-size: clamp(1.85rem, 8vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--volt);
  font-variant-numeric: tabular-nums;
}

.typ {
  display: block;
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.votes {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 3;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  pointer-events: none;
}

.vote {
  pointer-events: auto;
  appearance: none;
  width: var(--vote);
  height: var(--vote);
  min-width: 56px;
  min-height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.vote svg {
  width: 34px;
  height: 34px;
}

.vote.love {
  background: var(--volt);
  border: 0;
  color: var(--volt-ink);
}

.vote.love svg {
  fill: currentColor;
}

.vote.maybe {
  background: transparent;
  border: 2px solid var(--ink);
  color: var(--ink);
  font-size: 28px;
  font-weight: 650;
  line-height: 1;
}

.vote.pass {
  background: transparent;
  border: 2px solid var(--rust);
  color: var(--rust);
}

.vote.pass svg {
  fill: none;
  stroke: currentColor;
}

.vote[aria-pressed="true"].love {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--volt) 45%, transparent);
}

.vote[aria-pressed="true"].maybe {
  background: color-mix(in srgb, var(--ink) 14%, transparent);
}

.vote[aria-pressed="true"].pass {
  background: color-mix(in srgb, var(--rust) 18%, transparent);
}

.vote:focus-visible,
.details-trigger:focus-visible,
.sheet-close:focus-visible,
.who-btn:focus-visible,
.tabs button:focus-visible,
.sort-row select:focus-visible,
.listing-link:focus-visible,
.text-btn:focus-visible,
.copy-btn:focus-visible,
.who-buttons button:focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 3px;
}

.card-body {
  padding: 16px 4px 8px;
}

.kicker {
  margin: 0 0 10px;
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trim {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin: 0 0 16px;
}

.stat {
  min-width: 0;
}

.stat dt {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 650;
}

.stat dd {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 600;
}

.color-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  flex-shrink: 0;
}

.notes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.note h3 {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.note.flags p {
  color: #e08a72;
}

.listing-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  background: var(--bg-elev);
}

.listing-link:hover {
  border-color: color-mix(in srgb, var(--volt) 40%, var(--line));
}

.feedback {
  margin-top: 4px;
  margin-bottom: 8px;
}

.comment label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.comment textarea {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg-elev);
  caret-color: var(--volt);
}

.empty {
  margin-top: 24px;
  padding: 36px 20px;
  text-align: center;
  background: var(--bg-elev);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.empty h2 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.empty p {
  margin: 10px 0 0;
  color: var(--ink-soft);
}

.picks-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.picks-head h2 {
  margin: 0;
  font-size: 1.4rem;
}

.picks-head p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.copy-btn,
.picks-actions button {
  appearance: none;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.picks-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.pick-group {
  margin-top: 22px;
}

.pick-group h3 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.pick {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.pick .name {
  margin: 0;
  font-weight: 700;
  font-size: 16px;
}

.pick .meta {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.pick .note {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--ink);
}

.pick-empty {
  color: var(--ink-faint);
  font-size: 14px;
  margin: 0;
}

.site-footer {
  margin-top: 8px;
  padding: 0 var(--pad) 28px;
  color: var(--ink-faint);
  font-size: 12px;
}

.site-footer p {
  margin: 0 0 4px;
}

.text-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 0;
  min-height: 44px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  z-index: 30;
  box-shadow: var(--shadow);
}

.score-panel {
  margin: 0 0 16px;
  padding: 14px;
  background: var(--bg-elev);
  border-radius: 16px;
  border: 1px solid var(--line);
}

.score-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.deal-pill {
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--volt);
  color: var(--volt-ink);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.score-head .pct { font-size: 13px; font-weight: 600; color: var(--ink); }
.score-head .conf { font-size: 12px; color: var(--ink-faint); }

.score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin-bottom: 10px;
}

.score-stat dt {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.score-stat dd {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.score-stat .of {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-faint);
  margin-left: 2px;
}

.score-note { margin: 0 0 8px; font-size: 13px; color: var(--ink-soft); }
.score-hint { margin: 0; font-size: 12px; color: var(--ink-faint); }

.who-chooser {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  padding-top: calc(24px + env(safe-area-inset-top));
  background: var(--bg);
}

.who-chooser[hidden] {
  display: none !important;
}

.who-card {
  width: min(100%, 430px);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 22px 22px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 700;
}

.who-card h2 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.who-card > p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.who-buttons {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.who-buttons button {
  appearance: none;
  min-height: 64px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.who-buttons button:hover,
.who-buttons button:focus-visible {
  border-color: var(--volt);
}

.who-buttons .avatar {
  width: 36px;
  height: 36px;
  font-size: 15px;
}

.pick .who-tag {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--volt);
}

.pick .vote-label {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.deck {
  position: relative;
  min-height: min(62dvh, 760px);
}

.deck-stage {
  position: relative;
}

.deck-stage .card {
  position: relative;
  z-index: 2;
  transform-origin: 50% 80%;
}

.deck-peek {
  position: absolute;
  inset: 10px 8px -10px;
  z-index: 1;
  border-radius: var(--radius);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  opacity: 0.7;
  pointer-events: none;
}

.card.fly-love {
  will-change: transform, opacity;
  animation: fly-right 0.38s ease-in forwards;
}

.card.fly-pass {
  will-change: transform, opacity;
  animation: fly-left 0.38s ease-in forwards;
}

.card.fly-maybe {
  will-change: transform, opacity;
  animation: fly-up 0.38s ease-in forwards;
}

@keyframes fly-right {
  to {
    transform: translateX(130%) rotate(14deg);
    opacity: 0;
  }
}

@keyframes fly-left {
  to {
    transform: translateX(-130%) rotate(-14deg);
    opacity: 0;
  }
}

@keyframes fly-up {
  to {
    transform: translateY(-120%) rotate(4deg);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card.fly-love,
  .card.fly-pass,
  .card.fly-maybe {
    animation-duration: 0.01ms;
  }
}

.done {
  margin-top: 8px;
  padding: 8px 0 18px;
}

.done > h2 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.done > p {
  margin: 8px 0 0;
  color: var(--ink-soft);
}

.done .pick-group {
  margin-top: 20px;
}

.pick[data-open-id] {
  cursor: pointer;
}

.pick[data-open-id]:hover,
.pick[data-open-id]:focus-visible {
  border-color: color-mix(in srgb, var(--volt) 40%, var(--line));
}

@media (max-width: 420px) {
  h1 {
    font-size: 0.86rem;
    letter-spacing: 0.14em;
  }

  .who-btn {
    padding: 0 2px;
    gap: 6px;
    font-size: 13px;
  }

  .hero-meta {
    padding-bottom: 102px;
  }
}

@media (min-width: 720px) {
  :root {
    --max: 640px;
    --pad: 20px;
  }

  .hero {
    height: min(68dvh, 720px);
  }
}

/* Full-screen app shell — photo is the page */
html, body {
  height: 100%;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: calc(8px + env(safe-area-inset-top)) 16px 0;
  background: var(--bg);
}

.topbar .brand-block {
  gap: 6px;
}

.topbar h1 {
  font-size: 0.92rem;
  letter-spacing: 0.18em;
}

.chips {
  flex: 0 0 auto;
  margin: 8px 16px 0;
  gap: 6px;
}

.chips li {
  padding: 5px 10px;
  font-size: 11px;
  min-height: 0;
}

.constraint-row {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 16px 0;
}

.constraint-row .chips {
  margin: 0;
  flex: 1 1 auto;
}

.sort-compact {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.sort-compact[hidden] {
  display: none !important;
}

.sort-compact label {
  font-size: 11px;
  color: var(--ink-faint);
  font-weight: 700;
}

.sort-compact select {
  appearance: none;
  min-height: 32px;
  max-width: 118px;
  padding: 0 28px 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23f3eee6' d='M1 1l5 5 5-5'/></svg>") no-repeat right 10px center;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

main {
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px 12px 0;
  width: 100%;
  max-width: none;
}

#listings-view,
.deck,
.deck-stage,
.card.deck-card {
  height: 100%;
}

.deck {
  min-height: 0;
  height: 100%;
}

.hero {
  height: 100%;
  min-height: 0;
  max-height: none;
}

.hero .votes {
  bottom: 28px;
}

.hero-meta {
  padding-bottom: 184px;
}

.details-trigger {
  appearance: none;
  position: absolute;
  left: 50%;
  bottom: 112px;
  z-index: 7;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 124px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgb(243 238 230 / 0.5);
  border-radius: 999px;
  background: rgb(17 17 15 / 0.82);
  color: var(--ink);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.details-trigger svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgb(0 0 0 / 0.64);
}

.details-sheet {
  position: fixed;
  left: max(8px, env(safe-area-inset-left));
  right: max(8px, env(safe-area-inset-right));
  bottom: calc(58px + env(safe-area-inset-bottom));
  z-index: 31;
  display: flex;
  flex-direction: column;
  max-height: min(74dvh, 650px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px 24px 16px 16px;
  background: var(--bg-elev);
  box-shadow: 0 -18px 50px rgb(0 0 0 / 0.55);
}

.details-sheet[hidden],
.sheet-backdrop[hidden] {
  display: none !important;
}

.sheet-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 10px 12px 10px 20px;
  border-bottom: 1px solid var(--line);
}

.sheet-head h2,
.sheet-eyebrow {
  margin: 0;
}

.sheet-head h2 {
  font-size: 1.25rem;
  line-height: 1.15;
}

.sheet-eyebrow {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.sheet-close {
  appearance: none;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--chip);
  color: var(--ink);
  cursor: pointer;
}

.sheet-close svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.sheet-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px calc(18px + env(safe-area-inset-bottom));
}

.sheet-scroll .card-body {
  padding: 18px 0 8px;
}

.dock {
  flex: 0 0 auto;
  padding: 4px 8px calc(8px + env(safe-area-inset-bottom));
  background: var(--bg);
}

.dock .tabs {
  width: 100%;
  justify-content: space-around;
}

.who-chooser {
  background: rgb(17 17 15 / 0.92);
}

.who-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 24px;
}

.app-chrome,
.site-footer,
.app-bar {
  display: none !important;
}

#picks-view,
#ours-view {
  height: 100%;
  overflow: auto;
  padding-bottom: 12px;
}

.card.deck-card {
  position: relative;
}

@media (max-height: 700px) {
  .hero-meta {
    padding-bottom: 174px;
  }

  .details-trigger {
    bottom: 106px;
  }

  .hero .votes {
    bottom: 22px;
  }
}

/* Mock-matched edge-to-edge deck */
:root { --topbar-h: 64px; --dock-h: 78px; --vote: 62px; }

.topbar {
  min-height: var(--topbar-h);
  align-items: center;
  padding: env(safe-area-inset-top) 14px 0;
  background: linear-gradient(115deg, #161613, #090909 75%);
}

.topbar .brand-block { flex-direction: row; align-items: center; gap: 14px; }
.topbar h1 { font-size: 12px; letter-spacing: .27em; }
.topbar .rank-meta { gap: 10px; min-height: 32px; }
.rank-pill { height: 28px; min-width: 42px; font-size: 13px; border-radius: 10px; }
.left-count { font-size: 14px; font-weight: 500; }
.who-switch { gap: 10px; }
.who-btn { min-height: 44px; width: 44px; padding: 0; justify-content: center; }
.who-btn .avatar { width: 36px; height: 36px; font-size: 16px; font-weight: 700; }
.who-btn[aria-pressed="true"] .avatar { box-shadow: 0 0 0 2px var(--volt); }
.who-name, .who-rule { display: none; }

.constraint-row { display: none !important; }
main { padding: 0; }
.deck-stage, .card.deck-card, .hero { border-radius: 0; }
.deck-peek { display: none; }
.hero img { object-position: center 40%; }

.deal-badge, .flag-chip, .dom { border-radius: 12px; }
.deal-badge { top: 18px; left: 14px; padding: 8px 12px; font-size: 12px; letter-spacing: .02em; }
.flag-chip { top: 58px; left: 14px; padding: 8px 12px; font-size: 12px; letter-spacing: .02em; }
.dom { top: 18px; right: 12px; padding: 8px 12px; font-size: 13px; }
.hero-grad { height: 57%; background: linear-gradient(to top, #090909 4%, rgb(9 9 9 / .9) 32%, transparent 100%); }
.hero-meta { align-items: flex-end; padding: 0 14px 150px; gap: 8px; }
.hero-copy { flex: 1 1 auto; overflow: hidden; }
.hero-model { margin: 0; font-size: clamp(25px, 7.9vw, 34px); line-height: 1; letter-spacing: -.035em; text-transform: none; white-space: nowrap; }
.hero-trim { margin-top: 7px; color: #bbb8b4; font-size: clamp(12px, 3.5vw, 15px); white-space: nowrap; }
.hero-price .price { font-size: clamp(25px, 7.7vw, 34px); }
.hero-price .typ { margin-top: 5px; font-size: 13px; color: #aaa7a2; }

.details-trigger { bottom: 91px; min-width: 104px; min-height: 44px; padding: 0 14px; border-color: rgb(255 255 255 / .38); background: rgb(23 23 21 / .62); font-size: 14px; font-weight: 650; }
.hero .votes { bottom: 17px; left: 50%; right: auto; width: min(278px, 76vw); transform: translateX(-50%); justify-content: space-between; }
.vote { width: var(--vote); height: var(--vote); }
.vote svg { width: 31px; height: 31px; }
.vote.maybe { font-size: 27px; border-color: #e8e2d8; background: rgb(20 20 18 / .35); }
.vote.pass { background: rgb(20 20 18 / .35); }

.dock { min-height: var(--dock-h); padding: 5px 8px calc(6px + env(safe-area-inset-bottom)); background: linear-gradient(105deg, #171714, #090909); border-radius: 22px 22px 0 0; }
.dock .tabs { height: 100%; }
.dock .tabs button { position: relative; flex: 1; min-height: 62px; padding: 3px 0 0; flex-direction: column; justify-content: center; gap: 1px; box-shadow: none; color: #b9b4ac; font-size: 12px; font-weight: 500; }
.dock .tabs button[aria-selected="true"] { color: var(--volt); box-shadow: none; }
.dock .tabs svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.dock #tab-ours svg { fill: currentColor; stroke: none; }
.dock .count { position: absolute; top: 3px; left: calc(50% + 13px); }

.sheet-backdrop { z-index: 8; background: rgb(0 0 0 / .52); bottom: var(--dock-h); }
.details-sheet { left: 0; right: 0; bottom: var(--dock-h); z-index: 31; max-height: min(61dvh, 540px); border: 1px solid #34332f; border-bottom: 0; border-radius: 22px 22px 0 0; background: radial-gradient(circle at 35% 0, #25251f, #161714 58%, #11120f); box-shadow: 0 -14px 35px rgb(0 0 0 / .5); }
.sheet-grabber { flex: 0 0 auto; width: 40px; height: 5px; margin: 8px auto 2px; border-radius: 999px; background: #777872; }
.sheet-head { min-height: 58px; padding: 5px 14px 7px 22px; border: 0; }
.sheet-head h2 { flex: 1; min-width: 0; font-size: 22px; letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-price { color: var(--volt); font-size: 20px; font-weight: 800; white-space: nowrap; }
.sheet-close { flex-basis: 38px; width: 38px; height: 38px; margin-left: 5px; border: 1px solid #6b6963; background: transparent; }
.sheet-close svg { width: 21px; height: 21px; }
.sheet-scroll { padding: 0 16px 16px; }
.sheet-scroll .card-body { padding: 4px 0 12px; }
.sheet-scroll .notes { gap: 0; }
.sheet-scroll .note { padding: 0 7px 13px; margin-bottom: 12px; border-bottom: 1px solid #3a3935; }
.sheet-scroll .note h3 { margin: 0 0 5px; color: #aaa7a1; font-size: 11px; letter-spacing: .15em; }
.sheet-scroll .note p { color: #f2efea; font-size: 15px; line-height: 1.35; }
.sheet-scroll .note.flags h3 { color: #ed7147; }
.sheet-scroll .note.flags { border: 0; padding-bottom: 0; }
.sheet-scroll .note.flags p { padding: 8px 10px; border: 1px solid rgb(196 92 50 / .2); border-radius: 7px; background: rgb(196 92 50 / .16); color: #e5b1a1; }
.listing-link { justify-content: flex-start; gap: 13px; min-height: 50px; margin-top: 2px; padding: 0 13px; border-color: #67655f; border-radius: 9px; background: rgb(255 255 255 / .035); font-size: 15px; }
.listing-link svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.listing-link span { flex: 1; }
.listing-link b { font-size: 32px; line-height: 1; font-weight: 300; }
.feedback { margin: 10px 0 0; }
.comment { display: flex; align-items: center; gap: 10px; }
.comment input { flex: 1; min-width: 0; min-height: 46px; border: 1px solid #5e5d57; border-radius: 9px; padding: 0 12px; background: rgb(255 255 255 / .035); color: var(--ink); font: inherit; font-size: 16px; }
.comment input::placeholder { color: #94928d; }
.comment button { appearance: none; min-width: 58px; min-height: 44px; border: 0; background: transparent; color: var(--volt); font: inherit; font-size: 15px; cursor: pointer; }
.card.details-open .hero .votes { position: fixed; z-index: 32; top: calc(var(--topbar-h) + 82px); bottom: auto; }
.card.details-open .details-trigger { display: none; }

@media (min-width: 600px) {
  .topbar, main, .dock { width: min(100%, 760px); margin-inline: auto; }
  .details-sheet { width: min(100%, 760px); margin-inline: auto; }
}
