html,
body {
  overflow-x: clip;
}

:root {
  /* QR codes always render dark-on-light, regardless of the theme. */
  --qr-paper: #ffffff;
  color-scheme: light;
  --bg: #f3eadb;
  --bg-elev: #fffaf0;
  --surface: #fffdf7;
  --surface-2: #eee3d1;
  --surface-3: #e6d8c2;
  --ink: #2c2823;
  --ink-soft: #4d453a;
  --muted: #5d4f40;
  --muted-2: #665847;
  --line: #dfd0b9;
  --line-strong: #cdbb9f;
  --field-line: #9e907a; /* 3:1 on --bg-elev; control edges only */
  --accent: #3f6449;
  --accent-deep: #2c4a35;
  --accent-soft: #e3ebd9;
  --terracotta: #9c4d2d;
  --terracotta-soft: #f3ddd0;
  --gold: #8a641f;
  --gold-soft: #f3e7c9;
  --brand-yellow: #d4a017;
  --success: #477a57;
  --danger: #a04436;
  --danger-soft: #f4dcd7;
  --coverage-waiting: #8b8073;
  --sidebar: #ede2d0;
  --chart-1: #9c4d2d;
  --chart-2: #8a641f;
  --chart-3: #3f6449;
  --chart-4: #477a57;
  --chart-5: #5f5a8a;
  --chart-6: #2f6b75;
  --chart-7: #8a4d6b;
  --chart-8: #6b6b2f;
  --chart-9: #7d4f2f;
  --chart-10: #3f5d8a;
  --chart-11: #6a4f8a;
  --motion-fast: 120ms;
  --motion-base: 180ms;
  --motion-slow: 240ms;
  --motion-shimmer: 1200ms;
  --ease-standard: cubic-bezier(.2, .8, .2, 1);
  --focus-ring-width: 2px;
  --focus-ring-offset: 3px;
  --focus-ring-color: var(--accent-deep);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --chart-12: #4f6b4f;
  --data-1: var(--chart-3);
  --data-2: var(--chart-2);
  --data-3: var(--chart-1);
  --data-4: var(--chart-5);
  /* Smallest sanctioned UI captions. The floor is 11px so dense tables and
     chips stay readable on a phone without squinting. */
  --type-caption: 11.5px;
  --type-caption-sm: 11px;
  --shadow-soft: 0 16px 40px -34px rgba(57, 44, 26, 0.55);
  --shadow-lift: 0 20px 34px -26px rgba(57, 44, 26, 0.5);
  --radius: 18px;
  --serif: "Fraunces", "Charter", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1d1915;
  --bg-elev: #262119;
  --surface: #2a241c;
  --surface-2: #332c23;
  --surface-3: #3d3428;
  --ink: #f1e7d5;
  --ink-soft: #d9cbb6;
  --muted: #cec0aa;
  --muted-2: #c2b29c;
  --line: #493d30;
  --line-strong: #6a5947;
  --field-line: #7c6852; /* 3:1 on --bg-elev; control edges only */
  --accent: #a9c39a;
  --accent-deep: #cfe0c2;
  --accent-soft: #333d2d;
  --terracotta: #efa17c;
  --terracotta-soft: #463026;
  --gold: #e0bd6a;
  --gold-soft: #3f3523;
  --success: #8fb89a;
  --danger: #e58f80;
  --danger-soft: #472b28;
  --coverage-waiting: #8f8579;
  --sidebar: #211c16;
  --chart-1: #efa17c;
  --chart-2: #e0bd6a;
  --chart-3: #a9c39a;
  --chart-4: #8fb89a;
  --chart-5: #b9b0e0;
  --chart-6: #8ccbd1;
  --chart-7: #d89ab7;
  --chart-8: #c7c77a;
  --chart-9: #d6a17f;
  --chart-10: #91b0dc;
  --chart-11: #b9a0d8;
  --chart-12: #9dbb9d;
  --data-1: var(--chart-3);
  --data-2: var(--chart-2);
  --data-3: var(--chart-1);
  --data-4: var(--chart-5);
  --shadow-soft: 0 18px 40px -30px rgba(0, 0, 0, 0.9);
  --shadow-lift: 0 22px 38px -24px rgba(0, 0, 0, 0.85);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--line-strong) 62%, transparent);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .015em;
  line-height: 1.2;
  text-transform: none;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .72;
}

.status-pill.is-success {
  border-color: color-mix(in srgb, var(--success) 32%, var(--line));
  background: color-mix(in srgb, var(--success) 10%, var(--surface));
  color: var(--accent-deep);
}

.status-pill.is-warning {
  border-color: color-mix(in srgb, var(--gold) 34%, var(--line));
  background: color-mix(in srgb, var(--gold-soft) 58%, var(--surface));
  color: var(--gold);
}

.status-pill.is-danger {
  border-color: color-mix(in srgb, var(--danger) 34%, var(--line));
  background: color-mix(in srgb, var(--danger-soft) 56%, var(--surface));
  color: var(--danger);
}

.status-pill.is-neutral {
  color: var(--muted);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1000px 560px at 6% -12%, color-mix(in srgb, var(--gold) 11%, transparent), transparent 60%),
    radial-gradient(900px 620px at 104% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 58%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .022;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

[data-theme="dark"] body::after {
  opacity: .045;
  mix-blend-mode: screen;
}

#view-content {
  animation: view-in 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.cover::after,
.detail-cover::after,
.cover-ribbon-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

[data-theme="dark"] .cover::after,
[data-theme="dark"] .detail-cover::after,
[data-theme="dark"] .cover-ribbon-card::after {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

body.modal-open {
  overflow: hidden;
}

::selection {
  background: color-mix(in srgb, var(--gold) 35%, transparent);
}

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

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

button {
  cursor: pointer;
}

h1, h2, h3, h4, p {
  margin: 0;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 12px;
  z-index: 500;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  font: inherit;
  font-size: 12px;
}

.skip-link:focus {
  top: 10px;
}

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

.state-code {
  text-transform: uppercase;
}

.icon {
  flex: 0 0 auto;
  vertical-align: -0.18em;
}


/* Self-hosted variable fonts: Fraunces (titles) and DM Sans (body).
 * One file per subset/style covers every weight the stylesheet asks for
 * (400/500/550/600/650/700/750/800), and the Google Fonts request is gone so
 * first paint no longer waits on a third-party round trip.
 */

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/dm-sans-normal-variable-latin-ext.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/dm-sans-normal-variable-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/fraunces-italic-variable-latin-ext.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/fraunces-italic-variable-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/fraunces-normal-variable-latin-ext.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/fraunces-normal-variable-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- shell ---------- */

.app-shell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  align-content: start;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 26px 20px 20px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(var(--line) 0.65px, transparent 0.7px) 0 0 / 16px 16px,
    var(--sidebar);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--bg-elev);
  background: #1b3a34;
  box-shadow: 0 8px 18px -10px color-mix(in srgb, #1b3a34 70%, transparent);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-word {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.brand-word em {
  color: var(--terracotta);
  font-style: italic;
}

.brand-tagline {
  padding: 7px 6px 0 54px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 34px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.nav-link:hover {
  background: color-mix(in srgb, var(--surface) 48%, transparent);
  color: var(--ink);
}

.nav-link.active {
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 650;
}

.nav-label-short {
  display: none;
}

[data-theme="dark"] .nav-link.active {
  color: var(--accent-deep);
}

.nav-link.active .icon {
  stroke-width: 2;
}

.nav-count {
  margin-left: auto;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  color: var(--muted);
  font-size: 10.5px;
  text-align: center;
}

.nav-link.active .nav-count {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent-deep);
}

.nav-link.has-admin-alert .nav-count {
  background: var(--danger-soft);
  color: var(--danger);
}

.sidebar-spacer {
  flex: 1;
  min-height: 28px;
}

.sync-status {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}

.sync-line {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}

.sync-line strong {
  font-weight: 650;
}

.sync-meta {
  margin-left: auto;
  color: var(--muted);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.sync-detail {
  margin: 5px 0 10px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.sync-status-compact {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
}

.sync-compact-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.sync-compact-row .status-dot {
  margin-top: 5px;
}

.sync-compact-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 1 1 auto;
}

.sync-compact-copy strong {
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
}

.sync-compact-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-compact-button {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
}

.sync-compact-note {
  margin: 0 0 0 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.sync-compact-note a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
}

.status-dot.ok {
  background: var(--success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 14%, transparent);
}

.status-dot.error {
  background: var(--danger);
}

.status-dot.idle {
  background: var(--gold);
}

.sync-meter {
  height: 4px;
  margin: 0 0 10px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}

.sync-meter progress {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

.sync-meter progress::-webkit-progress-bar {
  background: var(--surface-2);
  border-radius: inherit;
}

.sync-meter progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: inherit;
}

.sync-meter progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: inherit;
}

.sync-step-list {
  display: grid;
  gap: 3px;
  margin: 0 0 8px;
}

.sync-step {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.35;
}

.sync-step em {
  margin-left: auto;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.sync-step-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--line-strong);
}

.sync-step.running {
  color: var(--ink);
  font-weight: 650;
}

.sync-step.running .sync-step-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

.sync-step.done .sync-step-dot {
  background: var(--success);
}

.sync-step.error .sync-step-dot {
  background: var(--danger);
}

.sync-step.skipped {
  opacity: 0.7;
}

.sync-footline {
  margin: 0 0 9px;
  color: var(--muted-2);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
}

.offline-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  margin-bottom: 14px;
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line));
  border-radius: 11px;
  background: var(--gold-soft);
  color: var(--ink-soft);
  font-size: 11px;
}

.offline-banner[hidden] {
  display: none;
}

.offline-banner .icon {
  width: 14px;
  height: 14px;
  color: var(--gold);
}

.offline-banner small {
  color: var(--muted);
  font-size: 10px;
}

.toast-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;
}

.toast-action {
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.sync-banner {
  display: none;
}

.sync-spinner {
  width: 13px;
  height: 13px;
  border: 1.8px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

.sync-spinner.small {
  width: 11px;
  height: 11px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.sync-now-btn.is-syncing .icon,
.run-canary.is-syncing .icon {
  animation: spin 0.8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .sync-now-btn.is-syncing .icon,
  .run-canary.is-syncing .icon {
    animation: none;
  }
}

.sidebar-preferences {
  padding: 12px 2px 0;
}

.sidebar-preferences summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

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

/* A closed <details> hides its body natively, but this one is a flex/grid item
   whose body still laid out: on a phone the currency and language selects hung
   193px past a 34px summary and pushed the page 151px wide. Hiding it explicitly
   keeps the closed state inert. */
.sidebar-preferences:not([open]) > .sidebar-extras {
  display: none;
}

.sidebar-extras {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0 2px;
}

.sidebar-app {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sidebar-app:empty {
  display: none;
}

.sidebar-action {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  color: var(--ink-soft);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.sidebar-action:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  background: var(--surface);
}

.sidebar-action:disabled {
  cursor: wait;
  opacity: 0.65;
}

.sidebar-action .icon {
  width: 14px;
  height: 14px;
  flex: none;
}

.mobile-search-link,
.mobile-more-link {
  display: none;
}

.mobile-more-link {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  cursor: pointer;
}

.sidebar-search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  width: 100%;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.sidebar-search-trigger:hover {
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.sidebar-search-trigger .icon {
  width: 14px;
  height: 14px;
}

.sidebar-search-trigger span {
  flex: 1;
}

.sidebar-search-trigger kbd,
.command-field kbd,
.command-result kbd {
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted-2);
  font: inherit;
  font-size: var(--type-caption-sm);
}

.command-price {
  color: var(--accent-deep);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.command-close {
  display: none;
  flex: 0 0 auto;
}

.command-hint-touch {
  display: none;
}

.command-palette {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 18px 20px;
}

.command-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 12, .35);
  backdrop-filter: blur(3px);
}

.command-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  /* The palette shell pads 12vh above the dialog: size against that offset so
     the field, the hint and the results all fit inside the viewport. */
  height: min(620px, calc(100dvh - 14vh - 40px));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: 0 30px 80px -30px rgba(20, 16, 12, .65);
}

.command-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}

.command-field .icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.command-field input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 15px;
}

.command-field input:focus {
  border: 0;
  box-shadow: none;
}

@media (max-width: 640px) {
  .command-field > kbd,
  .command-hint-keyboard {
    display: none;
  }

  .command-close {
    display: grid;
    width: 44px;
    height: 44px;
    margin: -5px -6px -5px 0;
  }

  .command-hint-touch {
    display: inline;
  }
}

/* The dialog wraps the listbox in an unstyled div; without this the wrapper
   kept its content height, so the last command ("Find a setting") sat cut at the
   bottom edge and nothing scrolled. */
#command-results {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.command-results {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
  overscroll-behavior: contain;
}

.command-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 8px 18px 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
}

.command-hint kbd {
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-elev);
  font-size: var(--type-caption-sm);
}

.command-section + .command-section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.command-label {
  padding: 2px 7px 4px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.command-empty-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.command-empty-group {
  grid-column: 1 / -1;
  margin: 3px 0 0;
  padding-bottom: 1px;
}

.command-empty-group:first-child {
  margin-top: 0;
}

.command-suggestion {
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.command-suggestion:hover,
.command-suggestion:focus-visible {
  border-color: var(--line-strong);
}

.command-empty-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 2px 0 7px;
  padding: 9px 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
}

.command-empty-art {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.command-empty-art .icon {
  width: 16px;
  height: 16px;
}

.command-empty-head > div {
  display: grid;
  gap: 1px;
}

.command-empty-head .command-label {
  padding: 0;
  color: var(--ink-soft);
  font-size: var(--type-caption-sm);
}

.command-empty-head > div > span {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.command-result {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.command-result:hover,
.command-result:focus-visible,
.command-result.active {
  background: var(--accent-soft);
  color: var(--ink);
}

.command-result > .icon {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--muted);
}

/* The title and its metadata stack; the title itself must stay one inline run,
   because the search highlight is a <mark> inside it. As a grid, the mark became
   its own cell and every result read "Barrage" over ": Earned Authority". */
.command-result > span:not(.person-avatar):not(.command-initials) {
  display: grid;
  flex: 1;
  gap: 1px;
  min-width: 0;
}

.command-title {
  display: block;
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-result small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.command-result > img {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 5px;
  object-fit: cover;
}

.command-initials {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  font-size: 11px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cover-ink, var(--accent)) 18%, transparent);
}

.command-result .person-avatar {
  flex-basis: 30px;
  width: 30px;
  height: 30px;
  font-size: 10px;
}

.command-result kbd {
  margin-left: auto;
}

.command-empty {
  padding: 10px 14px;
  color: var(--muted);
  font-size: 10.5px;
}

@media (max-width: 640px) {
  .sidebar-search-trigger {
    display: none;
  }

  .command-palette {
    padding: 8vh 10px 12px;
  }

  .command-field input {
    font-size: 16px;
  }
}

.sidebar-pickers {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
}

.sidebar-pickers .currency-control,
.sidebar-pickers .language-control {
  width: 100%;
  justify-content: space-between;
  height: 34px;
}

.sidebar-pickers .currency-control > .icon,
.sidebar-pickers .language-control > .icon {
  display: none;
}

.sidebar-pickers select {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  text-align-last: center;
}

.sidebar-pickers select option {
  text-align: center;
}

.theme-button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  color: var(--muted);
  flex: none;
}

.theme-button .icon {
  width: 15px;
  height: 15px;
}

.theme-button:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  background: var(--surface);
  color: var(--ink);
}

@media (min-width: 901px) {
  .sidebar-extras {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  .theme-button {
    order: 1;
  }

  .sidebar-pickers {
    order: 2;
    flex: 1 1 0;
    flex-direction: row;
    gap: 6px;
    min-width: 0;
  }

  .sidebar-pickers .currency-control,
  .sidebar-pickers .language-control {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
    height: 30px;
    padding: 0 6px;
    justify-content: flex-start;
  }

  .sidebar-pickers select {
    min-width: 0;
    max-width: 100%;
  }

  .sidebar-app {
    order: 3;
    flex: 1 1 100%;
  }
}

.main {
  min-width: 0;
}

.main-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 44px 90px;
}


#page-header .sync-header-button {
  min-height: 38px;
  padding: 0 12px;
  font-size: 11px;
}

.sync-now-label {
  white-space: nowrap;
}

.sync-mobile-menu {
  display: none;
  position: relative;
}

.sync-mobile-menu > summary {
  list-style: none;
  cursor: pointer;
}

.sync-mobile-menu > summary::-webkit-details-marker {
  display: none;
}

.sync-mobile-menu-status {
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.sync-mobile-menu > summary .icon:last-child {
  width: 11px;
  height: 11px;
  color: var(--muted);
  transition: transform var(--motion-fast) var(--ease-standard);
}

.sync-mobile-menu[open] > summary .icon:last-child {
  transform: rotate(180deg);
}

.sync-mobile-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 70;
  display: grid;
  min-width: 216px;
  gap: 3px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.sync-mobile-menu-panel button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.sync-mobile-menu-panel button:hover {
  background: var(--surface-2);
}

.sync-mobile-menu-panel button:disabled {
  cursor: not-allowed;
  opacity: .6;
}

@media (max-width: 640px) {
  #page-header .header-sync-status,
  #page-header .sync-header-button {
    display: none;
  }

  .sync-mobile-menu {
    display: inline-block;
  }
}

@media (max-width: 360px) {
  .sync-mobile-menu-status,
  .sync-mobile-menu > summary .icon:last-child {
    display: none;
  }

  .sync-mobile-menu > summary {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
  }
}

/* ---------- typography / header ---------- */

#page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 26px;
}

#page-header:empty {
  display: none;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 16px;
}

.header-sync-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.header-sync-status .status-dot {
  width: 6px;
  height: 6px;
}

.header-sync-status .icon {
  width: 11px;
  height: 11px;
  opacity: .62;
}

.header-sync-short { display: none; }

@media (max-width: 900px) {
  .header-sync-full { display: none; }
  .header-sync-short { display: inline; }
}

.sync-icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
}

.sync-icon-button .icon {
  width: 17px;
  height: 17px;
}

.currency-control,
.language-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 9px;
  border: 1px solid var(--field-line); /* the select inside is borderless */
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
}

.currency-control > .icon,
.language-control > .icon {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--muted);
}

.currency-control select,
.language-control select {
  height: 100%;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.currency-control select:focus,
.language-control select:focus {
  border: 0;
  box-shadow: none;
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 290px;
  margin: 9px auto 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1 1 0;
  height: 1px;
  background: var(--line);
}

.auth-or span {
  flex: 0 0 auto;
}

.auth-recovery-link {
  display: block;
  margin: 8px auto 0;
  padding: 3px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.auth-recovery-link:hover {
  color: var(--ink-soft);
}

/* The eyebrow and the language picker share one line above the heading. The
   picker used to sit on its own row between the heading and the sentence that
   explains the page, which split the reading order for a control that belongs to
   the card's chrome, not to its message. */
.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.auth-top .eyebrow {
  margin-bottom: 0;
}

.public-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---------- controls ---------- */

/* A <span class="btn btn-primary is-disabled"> stands in for a button whose URL
   failed validation. Without this it looked and hovered exactly like a live one. */
.btn.is-disabled,
.btn.is-disabled:hover {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: background var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible,
.icon-btn:focus-visible,
.game-card:focus-visible,
.bgg-result:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fbf7ed;
  box-shadow: 0 9px 20px -14px color-mix(in srgb, var(--accent-deep) 70%, transparent);
}

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

[data-theme="dark"] .btn-primary {
  color: #1d2419;
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  color: var(--ink-soft);
}

.btn-ghost:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.btn-soft {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.btn-soft:hover {
  background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface-2));
}

.btn-small {
  padding: 6px 10px;
  font-size: 11px;
}

.btn-block {
  width: 100%;
}

.btn.is-active {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: background 130ms ease, color 130ms ease, transform 130ms ease;
}

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

/* WCAG 1.4.11: a field edge needs 3:1; --line is 1.46:1. */
input,
select,
textarea {
  border: 1px solid var(--field-line);
  border-radius: 10px;
  background: var(--bg-elev);
  color: var(--ink);
  outline: none;
  transition: border-color 130ms ease, box-shadow 130ms ease, background 130ms ease;
}

textarea {
  padding: 9px 10px;
  line-height: 1.45;
}

select option {
  background: #fffdf7;
  color: #2c2823;
}

input:focus,
select:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-2);
}

input[type="search"]::-webkit-search-cancel-button {
  opacity: 0.5;
}

input[type="number"] {
  font-variant-numeric: tabular-nums;
}

input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  margin: 0;
}

.paper {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.muted {
  color: var(--muted);
}


.sync-icon-button {
  position: relative;
}

.sync-icon-button > .icon {
  position: relative;
  z-index: 1;
}

.sync-icon-button .sync-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---------- page pieces ---------- */

.filter-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-2);
  padding: var(--space-3);
  margin-bottom: 18px;
}

.filter-primary,
.filter-advanced {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-2);
  width: 100%;
}

.filter-primary {
  container-type: inline-size;
}

.filter-row-break {
  flex: 0 0 100%;
  width: 100%;
  height: 0;
  margin: 0;
  padding: 0;
}

.wishlist-toolbar .filter-primary {
  row-gap: 6px;
}

.filter-primary .search-field {
  flex: 1 1 260px;
}

.filter-primary .filter-sort {
  flex: 0 1 180px;
  min-width: 145px;
}

.filter-primary .reset-filters {
  margin-left: 0;
}

.filter-advanced {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.filter-card.advanced-collapsed .filter-advanced {
  display: none;
}

.filter-sheet-backdrop,
.filter-sheet-head,
.filter-sheet-actions,
.filter-sheet-grabber {
  display: none;
}

.filter-presets {
  display: grid;
  gap: 7px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.filter-presets-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.filter-presets-head strong {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.filter-preset-save,
.filter-preset-chip button {
  min-height: 32px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.filter-presets-empty {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.filter-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.filter-preset-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.filter-preset-chip > button:first-child {
  border: 0;
  background: transparent;
}

.filter-preset-chip.is-pinned {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.filter-preset-more {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 999px 999px 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  letter-spacing: .04em;
  cursor: pointer;
}

.filter-preset-more[aria-expanded="true"] {
  background: var(--surface-3);
  color: var(--accent-deep);
}

.filter-preset-menu-panel {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.filter-preset-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.filter-preset-menu-head strong {
  color: var(--ink);
  font-size: 12px;
}

.filter-preset-menu-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}

.filter-preset-menu-close .icon {
  width: 11px;
  height: 11px;
}

.filter-preset-menu-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.filter-preset-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.filter-preset-action .icon {
  width: 12px;
  height: 12px;
}

.filter-preset-action:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.filter-preset-action.is-danger {
  color: var(--danger);
}

.filter-preset-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}

.filter-preset-import {
  cursor: pointer;
}

.filter-preset-import input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}


.filter-sheet-body {
  display: contents;
}

.filter-sheet-group,
.filter-sheet-group-fields {
  display: contents;
}

.filter-sheet-group-title {
  display: none;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 210px;
  min-width: 190px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg-elev);
  color: var(--muted);
}

.search-field:focus-within {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
}

.search-field input {
  width: 100%;
  padding: 9px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 12.5px;
}

.search-field input:focus {
  box-shadow: none;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 86px;
}

.filter-field > span {
  padding-left: 2px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.filter-field input,
.filter-field select {
  height: 36px;
  padding: 7px 9px;
  font-size: 12px;
}

.filter-field select {
  padding-right: 25px;
}

.filter-field.range-field {
  flex: 1 1 150px;
  min-width: 150px;
}

.year-range-field {
  flex: 1 1 220px;
  min-width: 0;
}

.year-range-field > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-left: 2px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.year-range-field output {
  color: var(--ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.dual-range {
  position: relative;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.dual-range-rail,
.dual-range-fill {
  position: absolute;
  top: 19px;
  height: 6px;
  border-radius: 999px;
  pointer-events: none;
}

.dual-range-rail {
  right: 9px;
  left: 9px;
  background: color-mix(in srgb, var(--line) 82%, var(--surface));
}

.dual-range-fill {
  left: calc(9px + (100% - 18px) * var(--from, 0));
  width: calc((100% - 18px) * var(--span, 1));
  background: var(--accent);
}

.dual-range input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 11px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
}

.dual-range input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: transparent;
}

.dual-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 1px 4px rgba(20, 18, 16, 0.3);
  cursor: grab;
  pointer-events: auto;
}

.dual-range input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: transparent;
}

.dual-range input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 1px 4px rgba(20, 18, 16, 0.3);
  cursor: grab;
  pointer-events: auto;
}

.dual-range input[data-filter="minYear"] {
  z-index: 2;
}

.dual-range input[data-filter="maxYear"] {
  z-index: 3;
}

.dual-range input[type="range"]:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .dual-range input[type="range"]::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
    margin-top: -11px;
  }

  .dual-range input[type="range"]::-moz-range-thumb {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 640px) {
  .range-field .range-number {
    width: 82px;
    height: 44px;
    font-size: 12px;
  }

  .year-range-field > span {
    gap: 4px;
    font-size: var(--type-caption-sm);
  }

  .year-range-field output {
    font-size: 10px;
  }
}

.filter-field.range-field > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.range-field output {
  color: var(--ink);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-transform: none;
}

.range-field .range-number {
  width: 74px;
  height: 28px;
  padding: 2px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-align: center;
  text-transform: none;
}

.range-field .range-number:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 1px;
}

.range-field input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.range-field input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0 var(--range-fill, 0%), color-mix(in srgb, var(--line) 82%, var(--surface)) var(--range-fill, 0%) 100%);
}

.range-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 1px 4px rgba(20, 18, 16, 0.3);
  cursor: grab;
}

.range-field input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 82%, var(--surface));
}

.range-field input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.range-field input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 1px 4px rgba(20, 18, 16, 0.3);
  cursor: grab;
}

.range-field input[type="range"]:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}

.store-filter-field {
  min-width: 170px;
}

.mechanic-filter-field {
  flex: 1 1 220px;
  min-width: 200px;
}

.players-field {
  flex: 0 1 105px;
  min-width: 92px;
}

.players-field input,
.players-field select {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

.players-field input::placeholder {
  color: var(--muted);
}

.players-field select {
  padding-right: 25px;
}

.mechanic-filter-menu {
  width: 340px;
}

.mechanic-filter-search {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 31px;
  margin: 8px 0 6px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-elev);
  color: var(--muted);
}

.mechanic-filter-search .icon {
  width: 13px;
  height: 13px;
  flex: none;
}

.mechanic-filter-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 11.5px;
}

.mechanic-mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 0 7px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
}

.mechanic-mode select {
  min-height: 27px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 10.5px;
}

.mechanic-filter-list {
  display: grid;
  max-height: 250px;
  gap: 1px;
  overflow: auto;
  overscroll-behavior: contain;
}

.mechanic-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 5px 6px;
  border-radius: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  cursor: pointer;
}

.mechanic-check[hidden],
.mechanic-filter-list:not(.show-all):not(.is-searching) .mechanic-check.is-extra {
  display: none;
}

.mechanic-more {
  width: 100%;
  margin-top: 5px;
  padding: 5px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.mechanic-more:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

.mechanic-check:hover {
  background: var(--surface-2);
}

.mechanic-check input {
  margin: 0;
  accent-color: var(--accent);
}

.mechanic-check small {
  color: var(--muted-2);
  font-size: var(--type-caption);
  font-variant-numeric: tabular-nums;
}

.mechanic-coverage {
  margin: 8px 0 0;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

@media (max-width: 640px) {
  .mechanic-filter-field {
    flex: 1 1 100%;
  }
  .players-field {
    flex: 1 1 90px;
  }
  .mechanic-filter-menu {
    width: min(340px, calc(100vw - 32px));
  }
}

.store-filter {
  position: relative;
}

.store-filter > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.store-filter > summary::-webkit-details-marker {
  display: none;
}

.store-filter > summary .icon {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--muted);
  transition: transform 140ms ease;
}

.store-filter[open] > summary {
  border-color: var(--line-strong);
}

.store-filter[open] > summary .icon {
  transform: rotate(180deg);
}

.store-filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  width: 280px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-lift);
}

.store-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.store-filter-head strong {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.store-filter-clear {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-deep);
  font: inherit;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.store-filter-clear:hover {
  color: var(--accent);
}

.store-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 10px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 2px;
}

.store-check {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 6px;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.2;
  cursor: pointer;
}

.store-check:hover {
  background: var(--surface-2);
}

.store-check input {
  flex: none;
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

/* Wishlist entries that target one edition say so on the card. */
.edition-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 1px 7px 1px 6px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--gold-soft);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edition-hint .icon {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
}

/* A wishlist row added in the last two weeks gets a quiet marker. */
.new-badge {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.toggle-field {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elev);
  color: var(--ink-soft);
  font-size: 11.5px;
  white-space: nowrap;
  cursor: pointer;
}

.toggle-field:hover {
  border-color: var(--line-strong);
}

.reset-filters {
  margin-left: auto;
}

.storeless-shelf {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px 24px;
  margin-bottom: 15px;
}

.storeless-shelf img {
  width: 86px;
  height: 86px;
  object-fit: contain;
  flex: none;
}

.storeless-shelf h2 {
  margin: 2px 0 5px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
}

.storeless-shelf p:not(.eyebrow) {
  max-width: 620px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12.5px;
}

.storeless-shelf .btn {
  text-decoration: none;
}

@media (max-width: 680px) {
  .storeless-shelf {
    align-items: flex-start;
    gap: 14px;
    padding: 17px;
  }
  .storeless-shelf img {
    width: 58px;
    height: 58px;
  }
  .storeless-shelf h2 {
    font-size: 19px;
  }
}

.shelf-summary {
  overflow: hidden;
  margin-bottom: 12px;
}

.shelf-summary-head {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
}

.shelf-summary-summary {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.shelf-summary-summary:hover {
  color: var(--accent-deep);
}

.shelf-summary-mark {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.shelf-summary-mark .icon {
  width: 16px;
  height: 16px;
}

.shelf-summary-title {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.shelf-summary-title .eyebrow {
  margin: 0;
}

.shelf-summary-title strong {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.05;
  letter-spacing: -.02em;
}

.shelf-summary-title small {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shelf-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;
}

.shelf-summary-chips > span,
.shelf-summary-chips > button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font: inherit;
  font-size: var(--type-caption);
  white-space: nowrap;
}

.shelf-summary-chips > button {
  cursor: pointer;
}

.shelf-summary-chips > span > .icon,
.shelf-summary-chips > button > .icon {
  width: 11px;
  height: 11px;
  color: var(--accent-deep);
}

.shelf-summary-chips > button:hover,
.shelf-summary-chips > button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  color: var(--accent-deep);
}

.shelf-summary-chips > button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.shelf-summary-chips b {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* The spark used to live inside <summary>; keeping a button out of the
   summary avoids nested interactive controls. */
.shelf-summary-shell {
  position: relative;
}

.shelf-summary-spark-slot {
  display: block;
  flex: 0 0 92px;
  width: 92px;
  height: 30px;
}

.shelf-summary-spark {
  position: absolute;
  top: 36px;
  right: 47px;
  z-index: 2;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 1px;
  width: 92px;
  height: 42px;
  padding: 2px 0 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transform: translateY(-50%);
}

.shelf-summary-spark:hover,
.shelf-summary-spark:focus-visible {
  background: var(--surface-2);
  outline: 0;
}

.shelf-summary-spark svg {
  display: block;
  width: 100%;
  min-height: 0;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shelf-summary-spark-caption {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 650;
  letter-spacing: .02em;
  line-height: 1;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shelf-summary-spark svg circle {
  fill: currentColor;
  stroke: none;
}

.shelf-summary-spark .shelf-summary-hit {
  fill: transparent;
  stroke: none;
  pointer-events: all;
}

.shelf-summary-spark-empty {
  display: block;
  width: 92px;
  height: 1px;
  margin-top: 11px;
  border-top: 1px dashed var(--line);
}

.shelf-summary-chevron {
  display: grid;
  flex: 0 0 22px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.shelf-summary-chevron:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.shelf-summary-chevron .icon {
  width: 14px;
  height: 14px;
  transition: transform 160ms ease;
}

.shelf-summary.is-open .shelf-summary-chevron .icon {
  transform: rotate(180deg);
}

.shelf-summary-body {
  display: grid;
  gap: 9px;
  padding: 0 11px 11px;
}

.shelf-summary-body[hidden] {
  display: none;
}

.shelf-summary-body .wishlist-coverage,
.shelf-summary-body .drop-radar {
  margin-bottom: 0;
}

@media (min-width: 900px) {
  .shelf-summary-body:has(#price-drop-radar .drop-radar) {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: stretch;
    gap: 10px 12px;
  }

  .shelf-summary-body:has(#price-drop-radar .drop-radar) > #shelf-map > .shelf-map,
  .shelf-summary-body:has(#price-drop-radar .drop-radar) > #price-drop-radar > .drop-radar {
    height: 100%;
  }

  .shelf-summary-body:has(#price-drop-radar .drop-radar) > .wishlist-coverage,
  .shelf-summary-body:has(#price-drop-radar .drop-radar) > .shelf-health,
  .shelf-summary-body:has(#price-drop-radar .drop-radar) > .shelf-action-alert,
  .shelf-summary-body:has(#price-drop-radar .drop-radar) > .alert-push-cta {
    grid-column: 1 / -1;
  }

  .shelf-summary-body:has(#price-drop-radar .drop-radar) > #shelf-map {
    grid-column: 1;
  }

  .shelf-summary-body:has(#price-drop-radar .drop-radar) > #price-drop-radar {
    grid-column: 2;
  }
}

/* The open summary already carries the total, priced count, largest drop and
   alert count; its body should not repeat them or the mini sparkline. */
.shelf-summary.is-open .shelf-summary-spark-slot,
.shelf-summary.is-open ~ .shelf-summary-spark {
  display: none;
}

@media (max-width: 640px) {
  .shelf-summary-head {
    flex-wrap: wrap;
    gap: 7px;
    padding: 10px 12px;
  }

  .shelf-summary-summary {
    flex: 1 1 calc(100% - 48px);
  }

  .shelf-summary-title {
    flex: 1 1 calc(100% - 48px);
  }

  .shelf-summary-chips {
    order: 4;
    width: 100%;
    margin-left: 44px;
  }

  .shelf-summary-spark {
    flex-basis: 64px;
    width: 64px;
  }

  .shelf-summary-spark-empty {
    width: 64px;
  }

  .shelf-summary-chevron {
    margin-left: auto;
  }
}

.shelf-map {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.shelf-map-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.shelf-map-head .eyebrow {
  margin: 0;
}

.shelf-map-head small {
  color: var(--muted);
  font-size: 10.5px;
}

.shelf-map-head-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.shelf-map-decade.is-passive {
  padding: 1px 6px;
  background: var(--surface-2);
  cursor: default;
}

.shelf-map-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.shelf-map-group {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.shelf-map-group > strong,
.shelf-map-decades > strong {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.shelf-map-bar {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 2px 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10.5px;
  text-align: left;
  cursor: pointer;
}

.shelf-map-bar:hover,
.shelf-map-bar:focus-visible {
  background: color-mix(in srgb, var(--surface-2) 65%, transparent);
}

.shelf-map-bar:disabled {
  color: var(--muted-2);
  cursor: default;
  opacity: .62;
}

.shelf-map-bar:disabled:hover {
  background: transparent;
}

.shelf-map-bar > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shelf-map-bar svg {
  display: block;
  width: 100%;
  height: 6px;
  overflow: hidden;
}

.shelf-map-bar-track {
  fill: color-mix(in srgb, var(--line) 65%, transparent);
}

.shelf-map-bar-fill {
  fill: color-mix(in srgb, var(--accent) 62%, var(--surface));
  transition: fill 140ms ease;
}

.shelf-map-bar[class*="tone-weight-"] .shelf-map-bar-fill {
  fill: color-mix(in srgb, var(--accent) 58%, var(--surface));
}

.shelf-map-bar[class*="tone-players-"] .shelf-map-bar-fill {
  fill: color-mix(in srgb, var(--gold) 54%, var(--surface));
}

.shelf-map-bar.is-active .shelf-map-bar-fill {
  fill: var(--accent-deep);
}

.shelf-map-bar.is-active .shelf-map-bar-fill {
  fill: var(--accent-deep);
}

.shelf-map-bar.is-active > span,
.shelf-map-bar.is-active > b {
  color: var(--accent-deep);
}

.shelf-map-bar b {
  color: var(--ink-soft);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.shelf-map-note {
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.35;
}

.shelf-map-decades {
  display: grid;
  gap: 4px;
}

.shelf-map-decades > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.shelf-map-decade {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10.5px;
  cursor: pointer;
}

.shelf-map-decade:hover,
.shelf-map-decade:focus-visible,
.shelf-map-decade.is-active {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.shelf-map-decade.is-muted {
  border-style: dashed;
  color: var(--muted-2);
  cursor: default;
}

.shelf-map-decade b {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .shelf-map-columns {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .shelf-map-bar {
    min-height: 44px;
    grid-template-columns: 82px minmax(0, 1fr) 22px;
  }

  .shelf-map-decade {
    min-height: 44px;
  }

  .shelf-map-decade.is-passive {
    min-height: 0;
  }
}

.collection-dashboard {
  display: grid;
  gap: 13px;
  margin-bottom: 12px;
  padding: 16px 18px;
}

.collection-dashboard.is-loading {
  min-height: 100px;
}

.collection-dashboard-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.collection-dashboard-head h2 {
  margin: 1px 0 2px;
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1;
}

.collection-title-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 8px;
}

.collection-title-line h2 {
  margin-bottom: 0;
}

.collection-dashboard-head small {
  color: var(--muted);
  font-size: 11px;
}

.collection-value {
  display: grid;
  justify-items: end;
  gap: 1px;
}

.collection-value strong {
  color: var(--accent-deep);
  font-family: var(--serif);
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1;
}

.collection-value small,
.collection-stats small {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.collection-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.collection-stats > span {
  display: grid;
  gap: 2px;
  padding: 0 9px;
  border-left: 1px solid var(--line);
}

.collection-stats > span:first-child {
  border-left: 0;
  padding-left: 0;
}

.collection-stats strong {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.collection-head-side {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.collection-head-side .text-action {
  font-size: 11px;
}

.collection-distribution {
  display: grid;
  gap: 9px;
}

.collection-band-chart {
  display: grid;
  gap: 8px;
}

.collection-band-bar {
  display: block;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.collection-band-track {
  fill: color-mix(in srgb, var(--line) 65%, transparent);
}

.collection-band-bar .band-1 { fill: var(--data-1); }
.collection-band-bar .band-2 { fill: var(--data-2); }
.collection-band-bar .band-3 { fill: var(--data-3); }
.collection-band-bar .band-4 { fill: var(--data-4); }

.collection-band-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 5px;
}

.collection-band-legend.is-single {
  grid-template-columns: 1fr;
}

.collection-band-legend.is-single .collection-band-key {
  grid-template-columns: 7px auto minmax(0, 1fr) auto;
}

.collection-band-legend.is-single .collection-band-key em {
  grid-column: auto;
}

.collection-band-key {
  display: grid;
  grid-template-columns: 7px auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 3px 1px;
  border: 0;
  background: transparent;
}

.collection-band-key i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--data-1);
}

.collection-band-key.band-2 i { background: var(--data-2); }
.collection-band-key.band-3 i { background: var(--data-3); }
.collection-band-key.band-4 i { background: var(--data-4); }

.collection-band-key b {
  color: var(--ink-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.collection-band-key small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-band-key em {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.collection-lower {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 12px;
  color: var(--muted);
  font-size: 11px;
}

.collection-lower > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.collection-lower .icon {
  width: 12px;
  height: 12px;
}

.collection-lower b {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.collection-decades {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px !important;
}

.collection-decade {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.collection-decade b {
  color: var(--ink-soft);
  font-size: 10.5px;
}

.collection-decade small {
  color: var(--muted);
  font-size: 10px;
}

.collection-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.collection-dashboard.is-mini .collection-columns {
  grid-template-columns: minmax(0, 1fr);
}

/* One or two games do not need a distribution chart, a details toggle, or a
   "Most valuable" header: keep the useful numbers on one quiet line and the
   single game row visible. */
.collection-dashboard.is-mini .collection-details-toggle,
.collection-dashboard.is-mini .collection-dashboard-details,
.collection-dashboard.is-mini .collection-column-head {
  display: none;
}

.collection-dashboard.is-mini .collection-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 8px 0;
  border-bottom: 0;
}

.collection-dashboard.is-mini .collection-stats > span,
.collection-dashboard.is-mini .collection-stats > span:first-child {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 0;
  border: 0;
}

.collection-dashboard.is-mini .collection-stats strong {
  font-size: 12px;
}

.collection-dashboard.is-mini .collection-stats small {
  font-size: var(--type-caption-sm);
  letter-spacing: .04em;
}

.collection-dashboard.is-mini .collection-columns {
  margin-top: 1px;
}

.collection-columns h3 {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.collection-game-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.collection-game-row:last-child {
  border-bottom: 0;
}

.collection-game-cover {
  width: 34px;
  height: 44px;
  overflow: hidden;
  border-radius: 4px;
}

.collection-game-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-game-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.collection-game-title {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.collection-game-copy strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-game-title strong {
  min-width: 0;
}

.collection-game-kind {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  max-width: 92px;
  padding: 1px 5px;
  overflow: hidden;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-game-kind .icon {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
}

.collection-game-kind.is-expansion {
  background: var(--gold-soft);
  color: color-mix(in srgb, var(--gold) 72%, var(--ink));
}

.collection-game-kind.is-accessory {
  background: var(--surface-2);
  color: var(--ink-soft);
}

.collection-game-copy small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.collection-game-price {
  color: var(--accent-deep);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .collection-dashboard {
    padding: 13px;
  }

  .collection-dashboard-head {
    align-items: flex-start;
  }

  .collection-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .collection-band-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collection-head-side {
    justify-items: end;
  }

  .collection-share {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  .collection-title-line {
    gap: 2px 4px;
  }

  .collection-title-line h2 {
    font-size: 27px;
  }

  .collection-title-line small {
    font-size: var(--type-caption-sm);
  }

  .collection-stats > span:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .collection-columns {
    grid-template-columns: 1fr;
  }
}

.shelf-value {
  display: grid;
  gap: 9px;
  margin-bottom: 14px;
  padding: 12px 16px;
}

.shelf-value-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.shelf-value-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.shelf-value-head .eyebrow {
  margin: 0 0 1px;
}

.shelf-value-head > div > span {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.shelf-value-compact-total {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.shelf-value-compact-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 10.5px;
}

.shelf-value-compact-drop {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.shelf-value-compact-drop .icon {
  width: 12px;
  height: 12px;
  color: var(--gold);
}

.shelf-value-compact-drop b {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.shelf-value-compact-row .shelf-health-pulse {
  flex: 1 1 210px;
  min-height: 0;
  padding-top: 0;
  border-top: 0;
}

.shelf-value-compact-row .shelf-health-pulse-mark {
  flex-basis: 22px;
  width: 22px;
  height: 22px;
}

.shelf-value-compact-row .shelf-health-pulse-copy strong {
  font-size: 12.5px;
}

.shelf-value-compact-row .shelf-health-pulse-copy small,
.shelf-value-compact-row .shelf-health-pulse .text-action {
  font-size: 10.5px;
}

.shelf-value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--line);
}

.shelf-value-grid > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
  padding: 7px 9px;
  background: var(--surface-2);
}

.shelf-value-grid strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shelf-value-grid small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shelf-health-pulse {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}

.shelf-health-pulse-mark {
  display: grid;
  flex: 0 0 26px;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.shelf-health-pulse.is-clean .shelf-health-pulse-mark {
  background: color-mix(in srgb, var(--success) 16%, var(--surface));
  color: var(--success);
}

.shelf-health-pulse-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.shelf-health-pulse-copy strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shelf-health-pulse-copy small {
  color: var(--muted);
  font-size: 11px;
}

.shelf-health-pulse .text-action {
  flex: 0 0 auto;
  font-size: 11px;
}

.shelf-health-pulse.is-loading {
  min-height: 42px;
}

@media (max-width: 640px) {
  .shelf-value-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shelf-value-grid strong {
    font-size: clamp(12px, 3.6vw, 14px);
    letter-spacing: -0.02em;
  }

  .shelf-value-grid small {
    line-height: 1.2;
    white-space: normal;
  }

  .drop-radar-head > span {
    display: none;
  }

  .drop-radar-list {
    grid-template-columns: minmax(0, 1fr);
  }

  html.single-game-shelf #price-drop-radar {
    display: none;
  }
}

.drop-radar {
  display: grid;
  gap: 9px;
  margin-bottom: 14px;
  padding: 12px 16px;
}

.drop-radar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.drop-radar-head .eyebrow {
  margin: 0;
}

.drop-radar-head > span {
  color: var(--muted);
  font-size: 10px;
}

.drop-radar-list {
  display: grid;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 7px;
}

.drop-radar-card {
  display: flex;
  min-width: 0;
  min-height: 58px;
  align-items: center;
  gap: 9px;
  padding: 7px 9px 7px 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.drop-radar-cover {
  flex: 0 0 auto;
  width: 34px;
  height: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.drop-radar-cover img,
.drop-radar-cover svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drop-radar-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
}

.drop-radar-copy strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.drop-radar-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drop-radar-percent {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 10px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) {
  .drop-radar-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
  }
}

@media (max-width: 640px) {
  .drop-radar-list {
    grid-template-columns: 1fr;
  }
}

.wishlist-coverage {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  padding: 12px 16px;
}

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

.coverage-head h2 {
  margin: 1px 0 0;
  font-size: 17px;
}

.coverage-head .eyebrow {
  margin: 0;
}

.coverage-percent {
  color: var(--accent-deep);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.coverage-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coverage-disclosure {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.coverage-disclosure-label {
  display: none;
}

.coverage-disclosure .icon {
  width: 14px;
  height: 14px;
  transition: transform 160ms ease;
}

.wishlist-coverage.summary-open .coverage-disclosure .icon {
  transform: rotate(180deg);
}

.coverage-meter {
  display: block;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
  clip-path: inset(0 round 999px);
}

.coverage-meter rect.priced { fill: var(--success); }
.coverage-meter rect.unpriced { fill: var(--gold); }
.coverage-meter rect.no_match { fill: var(--terracotta); }
.coverage-meter rect.waiting { fill: var(--coverage-waiting); }

.coverage-offer-total {
  display: inline-flex;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: pointer;
}

.coverage-offer-total:hover,
.coverage-offer-total.active {
  color: var(--accent-deep);
}

.coverage-offer-total.active {
  font-weight: 700;
}

.coverage-summary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
}

.coverage-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 14px;
  min-width: 0;
}

.coverage-legend .coverage-fact {
  justify-content: flex-start;
}

.coverage-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  justify-self: start;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: pointer;
}

.coverage-toggle .icon {
  width: 12px;
  height: 12px;
  transition: transform 160ms ease;
}

.wishlist-coverage.is-open .coverage-toggle .icon {
  transform: rotate(180deg);
}

.coverage-extra {
  display: none;
  padding-top: 5px;
  border-top: 1px dashed var(--line);
}

.wishlist-coverage.is-open .coverage-extra {
  display: grid;
  gap: 8px;
}

.coverage-extra-note {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.coverage-extra-note strong {
  color: var(--ink);
}

.new-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.new-filter-chip .icon {
  width: 13px;
  height: 13px;
}

.coverage-dot {
  display: inline-block;
  align-self: center;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
}

.coverage-dot.priced { background: var(--success); }
.coverage-dot.unpriced { background: var(--gold); }
.coverage-dot.no_match { background: var(--terracotta); }
.coverage-dot.waiting { background: var(--coverage-waiting); }

.coverage-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--muted);
  font-size: 11.5px;
}

.coverage-facts strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.wishlist-toolbar {
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
}

.wishlist-toolbar .filter-primary {
  align-items: center;
  gap: var(--space-2);
}

/* The placeholder names the search box; the caption only added a second row. */
.wishlist-toolbar .filter-search .filter-caption,
.wishlist-toolbar .filter-sort > span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wishlist-toolbar .filter-search {
  flex: 1 1 240px;
}

.wishlist-toolbar .filter-sort {
  flex: 0 1 164px;
}

@media (min-width: 1180px) {
  .wishlist-toolbar .filter-primary {
    flex-wrap: nowrap;
  }

  .wishlist-toolbar .filter-primary .filter-row-break {
    display: none;
  }
}

.shelf-scope-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}

.shelf-scope-cluster .shelf-scope-tabs {
  margin: 0;
}

.shelf-scope-hint {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.shelf-scope-tabs {
  display: inline-flex;
  gap: 3px;
  margin: 0 0 10px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, var(--bg));
}

.shelf-scope-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.shelf-scope-tab b {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.shelf-scope-tab:hover:not(:disabled) {
  color: var(--ink);
}

.shelf-scope-tab:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.shelf-scope-tab.is-active {
  background: var(--accent);
  color: var(--surface);
}

.shelf-scope-tab[data-ownership="wanted"].is-active {
  background: var(--terracotta);
}

.shelf-scope-tab[data-ownership="owned"].is-active {
  background: var(--success);
}

.shelf-scope-tab.is-active b {
  background: var(--surface);
  color: var(--accent-deep);
}

.shelf-scope-tab[data-ownership="wanted"].is-active b {
  color: var(--terracotta);
}

.shelf-scope-tab[data-ownership="owned"].is-active b {
  color: var(--success);
}

.shelf-history-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  margin-left: 4px;
  padding: 0 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10.5px;
  cursor: pointer;
}

.shelf-history-action b {
  color: color-mix(in srgb, var(--gold) 70%, var(--ink));
  font-size: 11px;
}

.shelf-history-action .icon {
  width: 13px;
  height: 13px;
}

.shelf-history-action .icon:last-child {
  width: 11px;
  height: 11px;
}

.shelf-history-action:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

@media (max-width: 640px) {
  .shelf-history-action {
    width: 100%;
    justify-content: center;
    margin: 7px 0 0;
  }
}

@media (max-width: 640px) {
  .shelf-scope-cluster {
    width: 100%;
  }

  .shelf-scope-tabs {
    width: 100%;
    margin-bottom: 0;
  }

  .shelf-scope-hint {
    margin: 0 2px;
  }

  .shelf-scope-tab {
    flex: 1;
    min-height: 44px;
    justify-content: center;
    padding-inline: 8px;
  }
}

.toolbar-note {
  margin-left: auto;
  padding: 0 3px 9px;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}

/* The review count is a button inside the note; without this reset it falls
   back to the UA border and background and breaks the shelf toolbar. */
button.toolbar-note {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-deep);
  font: inherit;
  font-size: 10.5px;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button.toolbar-note:hover {
  color: var(--ink);
  text-decoration-style: solid;
}

button.toolbar-note:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cover-ribbon-wrap {
  display: grid;
  gap: 5px;
  margin: 0 0 16px;
}

.cover-ribbon-wrap[hidden] {
  display: none;
}

.cover-ribbon-label {
  margin: 0;
  padding: 0 2px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cover-ribbon {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 78px;
  margin: 0;
  overflow: hidden;
  opacity: .82;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.cover-ribbon[hidden] {
  display: none;
}

.cover-ribbon-card {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 78px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: inherit;
  font: inherit;
  box-shadow: 0 10px 20px -18px rgba(44, 40, 35, 0.7);
  transform: rotate(-1.5deg);
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.cover-ribbon-card img {
  transition: transform 200ms ease;
}

@media (hover: hover) {
  .cover-ribbon-card:not(.skeleton):hover {
    z-index: 2;
    transform: translateY(-2px) rotate(0deg);
    border-color: var(--line-strong);
    box-shadow: 0 16px 26px -18px rgba(44, 40, 35, 0.8);
  }

  .cover-ribbon-card:not(.skeleton):hover img {
    transform: scale(1.035);
  }
}

.cover-ribbon-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cover-ribbon-card.skeleton {
  cursor: default;
}

.cover-ribbon-card:nth-child(even) {
  height: 70px;
  transform: rotate(1.5deg);
}

.cover-ribbon-card:nth-child(3n) {
  height: 64px;
  transform: rotate(-2.5deg);
}

.cover-ribbon-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- game cards ---------- */

.game-grid[aria-busy="true"] {
  opacity: 0.62;
  transition: opacity 120ms ease;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  /* Cards in a row read as one band: a card with four secondary stores used to
     grow past its neighbours and break that band. Stretching every cell keeps
     the top and bottom edges aligned whatever the store count. */
  align-items: stretch;
  gap: 12px;
}

.game-card {
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-content: start;
  gap: var(--space-4);
  min-height: 124px;
  height: 100%;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 10px 26px -28px rgba(57, 44, 26, 0.5);
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard), background var(--motion-fast) var(--ease-standard);
}

.game-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  box-shadow: var(--shadow-lift);
  background: var(--bg-elev);
}

/* Dense table view for shelves large enough that card chrome gets in the way. */
html.table-view #games-result.game-grid {
  display: block;
}

.game-table-head,
html.table-view #games-result .game-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1.5fr) minmax(230px, 1fr);
  align-items: center;
  gap: var(--space-3);
}

.game-table-head {
  padding: 4px 11px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.game-table-head span:first-child {
  grid-column: 1;
}

html.table-view #games-result .game-card {
  min-height: 76px;
  margin-bottom: var(--space-1);
  padding: 8px 11px;
  border-radius: 11px;
  transform: none;
}

html.table-view #games-result .game-card:hover {
  transform: none;
  background: var(--surface-2);
}

html.table-view #games-result .game-card .cover {
  grid-column: 1;
  grid-row: 1 / span 3;
  width: 48px;
  height: 64px;
}

html.table-view #games-result .game-card .game-main {
  display: contents;
}

html.table-view #games-result .game-card .game-top {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
}

html.table-view #games-result .game-card .game-meta {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
}

html.table-view #games-result .game-card .game-tags,
html.table-view #games-result .game-card .game-reasons {
  grid-column: 2;
  grid-row: 3;
  align-self: start;
}

html.table-view #games-result .game-card .game-designers {
  display: none;
}

html.table-view #games-result .game-card .card-price-area {
  grid-column: 3;
  grid-row: 1 / span 3;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

@media (max-width: 700px) {
  .game-table-head {
    display: none;
  }

  html.table-view #games-result .game-card {
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: start;
  }

  html.table-view #games-result .game-card .cover {
    grid-row: 1 / span 2;
  }

  html.table-view #games-result .game-card .card-price-area {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

.shelf-invite {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 124px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 54%, transparent);
  color: var(--ink);
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.shelf-invite:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 46%, var(--surface));
}

.shelf-invite-art {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.shelf-invite-art .icon {
  width: 18px;
  height: 18px;
}

.shelf-invite-copy {
  display: grid;
  gap: 3px;
}

.shelf-invite-copy strong {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -.02em;
}

.shelf-invite-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .shelf-invite {
    gap: 8px;
    padding: 12px;
    border-radius: 10px;
  }

  .shelf-invite-art {
    width: 30px;
    height: 30px;
  }

  .shelf-invite-art .icon {
    width: 15px;
    height: 15px;
  }

  .shelf-invite-copy strong {
    font-size: 15px;
  }

  .shelf-invite-copy small {
    font-size: 10px;
  }
}

.cover {
  position: relative;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted-2);
}

.cover img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.cover.image-broken img,
.image-broken img {
  display: none;
}

.game-main {
  min-width: 0;
}

.game-top {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.game-title {
  min-width: 0;
  max-height: calc(2 * 1.16em);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 19px;
  line-height: 1.16;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.game-meta > span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.game-designers {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-designer-link,
.game-designers-more {
  position: relative;
  z-index: 4;
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  text-underline-offset: 2px;
  pointer-events: auto;
  cursor: pointer;
}

.game-designers-more {
  color: var(--muted-2);
  text-decoration-style: dotted;
}

.game-designer-link:hover,
.game-designer-link:focus-visible,
.game-designers-more:hover,
.game-designers-more:focus-visible {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.game-designer-link:focus-visible,
.game-designers-more:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: 1px;
  border-radius: 2px;
}

@media (pointer: coarse) {
  .game-designers {
    overflow: visible;
    line-height: 1.45;
    white-space: normal;
  }

  .game-designer-link,
  .game-designers-more {
    display: inline-block;
    padding: 15px 2px;
    margin: -15px -2px;
  }

  .game-designers {
    font-size: 11.5px;
  }
}

.game-weight-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1;
}

.game-weight-wrap[hidden] {
  display: none;
}

.game-weight {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-soft);
  line-height: 1;
}

.game-weight .icon {
  width: 12px;
  height: 12px;
  color: var(--terracotta);
  stroke-width: 2.1;
}

.game-weight strong {
  color: var(--ink-soft);
  font-weight: 650;
}

.dot-sep {
  color: var(--muted-2);
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--gold);
  font-weight: 650;
}

.rating .icon {
  width: 12px;
  height: 12px;
}

.unmatched-text {
  color: var(--terracotta);
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.game-tags:empty {
  display: none;
}

.game-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.game-reason {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 650;
  line-height: 1.35;
  white-space: nowrap;
}

.game-reason.is-match {
  border-color: color-mix(in srgb, var(--accent) 25%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.game-reason .icon {
  width: 10px;
  height: 10px;
  stroke-width: 2;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 650;
  letter-spacing: 0.045em;
  line-height: 1.55;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag-link {
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
}

.tag-link:hover,
.tag-link:focus-visible {
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.tag-link .icon {
  width: 10px;
  height: 10px;
  margin-left: 1px;
}

.tag-wishlist {
  background: var(--terracotta-soft);
  color: var(--terracotta);
}

.tag-wishlist .icon {
  width: 10px;
  height: 10px;
  margin-right: 2px;
}

.tag-owned {
  background: color-mix(in srgb, var(--success) 12%, var(--surface));
  color: var(--success);
}

.tag-owned .icon {
  width: 10px;
  height: 10px;
  margin-right: 2px;
}

.tag-history {
  background: color-mix(in srgb, var(--gold) 15%, var(--surface));
  color: color-mix(in srgb, var(--gold) 72%, var(--ink));
}

.tag-history .icon {
  width: 10px;
  height: 10px;
  margin-right: 2px;
}

.cover-history-ribbon {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--gold) 28%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, var(--gold-soft));
  box-shadow: 0 2px 8px color-mix(in srgb, #000 14%, transparent);
  color: color-mix(in srgb, var(--gold) 74%, var(--ink));
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: .02em;
  line-height: 1.2;
  pointer-events: none;
}

.cover-history-ribbon .icon {
  width: 10px;
  height: 10px;
}

@media (max-width: 420px) {
  .cover-history-ribbon {
    width: 23px;
    height: 23px;
    justify-content: center;
    padding: 0;
    border-radius: 999px;
    font-size: 0;
  }

  .cover-history-ribbon .icon {
    width: 12px;
    height: 12px;
  }
}

html.compact-cards .cover-history-ribbon {
  width: 23px;
  height: 23px;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  font-size: 0;
}

html.compact-cards .cover-history-ribbon .icon {
  width: 12px;
  height: 12px;
}

.tag-source {
  background: var(--surface-2);
  color: var(--ink-soft);
  letter-spacing: 0.03em;
}

.tag-source-saved {
  background: color-mix(in srgb, var(--success) 12%, var(--surface));
  color: var(--success);
}

.tag-source .icon {
  width: 9px;
  height: 9px;
  margin-right: 2px;
}


.tag-warn {
  background: var(--danger-soft);
  color: var(--danger);
}

.game-card-open {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
}

.game-card-open:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: 2px;
}

.card-price-area {
  display: contents;
}

.price-row {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
  pointer-events: none;
}

.price-row .price-pill,
.price-row .more-prices {
  pointer-events: auto;
}


.collection-value-label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.game-card.is-owned .price-lead {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-2) 62%, var(--bg));
}

.game-card.is-owned .price-lead:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.game-card.is-owned .price-lead strong {
  color: var(--ink-soft);
}

.more-prices {
  position: relative;
  z-index: 3;
  margin-top: 6px;
  padding: 2px 7px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.more-prices:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.price-pill {
  display: inline-flex;
  /* The favicon is 14px, the store code 10px and the price 15px. Centring the
     boxes left their baselines at three heights, which reads as crooked. */
  align-items: baseline;
  gap: 5px;
  padding: 4px 8px 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elev) 70%, var(--surface-2));
  color: var(--ink);
  font-size: 11.5px;
  line-height: 1.3;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.price-pill:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.price-pill.empty {
  border-style: dashed;
  color: var(--muted-2);
  background: transparent;
  pointer-events: none;
}

.price-row-main {
  align-items: center;
  flex-wrap: nowrap;
  gap: 7px;
}

.price-signal-chips {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

html.shelf-view .game-card .price-signal-chips,
html.compact-cards .game-card .price-signal-chips {
  display: none;
}

.price-row-secondary {
  align-items: center;
  margin-top: 2px;
}

.price-row-secondary .quick-alert,
.price-row-secondary .more-prices {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-top: 0;
  padding-top: 3px;
  padding-bottom: 3px;
  font-size: 10.5px;
}

.price-lead {
  flex: 0 1 auto;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}

.price-lead-amount {
  display: grid;
  flex: 0 0 auto;
  align-content: center;
  justify-items: start;
  gap: 0;
}

.price-lead strong {
  flex: 0 0 auto;
  font-size: 16px;
}

/* The lead price used to show only a two-letter store code. A shopper who does
   not know every code had to open the card to learn who was selling. Compact
   layouts switch back to the code because the shelf column is too narrow. */
.price-lead .store-name {
  max-width: 20ch;
  overflow: hidden;
  font-size: 10.5px;
  letter-spacing: .01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-short {
  display: none;
}

.price-lead .stock-dot {
  flex: 0 0 auto;
  align-self: center;
}

.price-lead .stock-dot {
  display: block;
  margin: 0 2px;
}

.price-lead.at-good {
  border-color: color-mix(in srgb, var(--success) 40%, var(--line));
}

.price-lead-empty {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.price-row-visual {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-left: auto;
  min-width: 0;
  pointer-events: none;
}

.price-row-visual .price-spark {
  margin-left: 0;
}

.price-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elev) 72%, var(--surface-2));
  /* 11px on a cream pill: --muted reads washed out, --ink-soft does not. */
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.35;
  text-decoration: none;
  pointer-events: auto;
}

.price-chip:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.price-chip .store-favicon {
  width: 12px;
  height: 12px;
}

.price-chip.is-low {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.price-chip.is-stale {
  border-style: dashed;
  /* Opacity took the 11px label to 3.31:1. Keep the price readable and let the
     dashed edge and muted ink carry the stale state. */
  color: var(--muted);
}

.price-chip.is-stale .store-favicon {
  filter: grayscale(.35);
  opacity: .85;
}

.price-pill.price-secondary {
  flex-shrink: 0;
  padding: 3px 7px;
  font-size: 11px;
}

.price-pill.price-secondary strong {
  font-size: 11.5px;
}

.freshness-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.freshness-badge .icon {
  width: 11px;
  height: 11px;
}

.freshness-badge.is-fresh {
  border-color: color-mix(in srgb, var(--success) 34%, var(--line));
  color: var(--success);
}

.freshness-badge.is-stale {
  border-color: color-mix(in srgb, var(--terracotta) 40%, var(--line));
  color: var(--terracotta);
}

/* Tracked caps on a cream pill: --muted measures 7.2:1 and still reads as a
   hint next to the price it labels. Same call as .price-chip. */
.store {
  color: var(--ink-soft);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: 0.06em;
}

.store-favicon.is-fallback {
  padding: 1px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  object-fit: contain;
}

.store-favicon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  /* An image has no baseline of its own; sit it on the text's. */
  align-self: center;
  padding: 1px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, #2c2823 12%, transparent);
  object-fit: contain;
}

.price-pill strong {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-2);
}

.stock-dot.in {
  background: var(--success);
}

.stock-dot.out {
  background: var(--terracotta);
}

.stock-dot.unknown {
  background: var(--gold);
}

.drop-badge,
.low-badge,
.good-price-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: var(--type-caption-sm);
  font-weight: 750;
  line-height: 1.5;
}

.drop-badge {
  background: var(--terracotta-soft);
  color: var(--terracotta);
}

.low-badge {
  flex: 0 0 auto;
  max-width: 100%;
  overflow: hidden;
  background: var(--accent-soft);
  color: var(--accent-deep);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.good-price-badge {
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  background: color-mix(in srgb, var(--success) 14%, transparent);
  color: var(--ink);
}

.good-price-badge .icon {
  width: 10px;
  height: 10px;
  color: var(--success);
}

.low-badge-short {
  display: none;
}

.drop-badge .icon {
  width: 9px;
  height: 9px;
}

.price-pill.at-low {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

[data-theme="dark"] .price-pill:not(.empty) {
  border-color: #8f7d64;
  background: #eadfce;
  color: #2c2823;
}

[data-theme="dark"] .price-pill:not(.empty):hover {
  border-color: var(--accent);
  background: #f9efdf;
}

[data-theme="dark"] .price-pill:not(.empty) .store,
[data-theme="dark"] .price-pill.at-low {
  border-color: #6f8a65;
  /* The dark-theme pill is deliberately cream and sets its own ink, but .store
     kept the theme's light --ink-soft: 1.2:1, a code you cannot read next to a
     price you can. Follow the pill's ink instead of the theme's. */
  color: #2c2823;
}

/* The owned value chip is also cream in dark mode; its price must use the
   chip's dark ink instead of the theme's light --ink-soft. */
[data-theme="dark"] .game-card.is-owned .price-lead strong {
  color: #2c2823;
}

.outbox-failures {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.outbox-failure-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 7px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 10px;
}

.activity-archived {
  align-self: end;
  min-height: 35px;
}

.link-note {
  display: block;
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 10px;
  font-style: italic;
}

.load-more {
  display: flex;
  margin: 20px auto 0;
}

/* ---------- empty / skeleton ---------- */

.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 58px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 45%, transparent);
  text-align: center;
}

.empty-hobby {
  display: block;
  width: min(300px, 80%);
  margin: 0 auto 10px;
  opacity: .78;
}

.empty-illustration {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 4px;
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--muted);
}

.empty-illustration .icon {
  width: 28px;
  height: 28px;
}

.empty-state h3 {
  font-size: 23px;
}

.empty-state p {
  max-width: 410px;
  color: var(--muted);
  font-size: 12.5px;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

.empty-search-suggestions {
  width: 100%;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.empty-search-suggestions .recent-searches {
  justify-content: center;
  margin: 0;
}

.first-run {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 28px;
}

.first-run-art {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 22px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.first-run-art .icon {
  width: 38px;
  height: 38px;
}

.first-run h2 {
  font-size: 28px;
}

.first-run p {
  max-width: 520px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.skeleton {
  background: linear-gradient(100deg, var(--surface-2) 20%, color-mix(in srgb, var(--surface-2) 68%, var(--surface)) 42%, var(--surface-2) 64%);
  background-size: 180% 100%;
  animation: shimmer 2.4s ease-in-out infinite;
  border-radius: 8px;
}

.skeleton.line {
  height: 10px;
  margin: 7px 0;
}

.skeleton.line.wide { width: 72%; }
.skeleton.line.short { width: 42%; }
.skeleton.line.price { width: 54%; height: 18px; margin-top: 18px; }

.skeleton-card {
  pointer-events: none;
}

@keyframes shimmer {
  0%, 100% { background-position: 120% 0; }
  50% { background-position: 0% 0; }
}

.error-state .empty-illustration {
  background: var(--danger-soft);
  color: var(--danger);
}


.store-check[hidden] {
  display: none;
}

/* A one-game shelf does not need a full-width invitation cell beside the only
   card. Let the invitation read as a slim next step below the shelf. */
.game-grid.is-sparse .shelf-invite {
  grid-column: 1 / -1;
  align-self: start;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 12px 16px;
  gap: 12px;
}

.game-grid.is-sparse .shelf-invite-copy {
  gap: 1px;
}

@media (max-width: 640px) {
  .game-grid.is-sparse .shelf-invite {
    padding: 10px 12px;
    gap: 10px;
  }
}

/* Small shelves get one useful coverage fact and, when available, the alert
   prompt, instead of a dashboard whose numbers are all 0 or 1. */
.wishlist-coverage.is-compact {
  margin-bottom: 10px;
  padding: 8px 13px;
}

.coverage-compact-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.coverage-compact-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--accent-deep);
}

.coverage-compact-mark.is-priced {
  background: color-mix(in srgb, var(--success) 13%, var(--surface));
  color: var(--success);
}

.coverage-compact-mark .icon {
  width: 14px;
  height: 14px;
}

.coverage-compact-copy {
  min-width: 0;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.coverage-compact-alert {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: var(--muted);
}

.coverage-compact-alert > .icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.coverage-compact-action {
  min-height: 30px;
  padding: 3px 9px;
  font-size: 10.5px;
}

.coverage-compact-action-short {
  display: none;
}

.coverage-compact-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.coverage-compact-dismiss .icon {
  width: 13px;
  height: 13px;
}

.coverage-compact-dismiss:hover {
  background: var(--surface-2);
  color: var(--ink);
}

@media (max-width: 640px) {
  .coverage-compact-row {
    flex-wrap: wrap;
    gap: 6px 8px;
  }

  .coverage-compact-alert {
    margin-left: auto;
    justify-content: flex-end;
    gap: 0;
  }

  .coverage-compact-alert > .icon {
    display: none;
  }

  .coverage-compact-action,
  .coverage-compact-dismiss {
    min-height: 44px;
  }

  .coverage-compact-action-long {
    display: none;
  }

  .coverage-compact-action-short {
    display: inline;
  }

  .coverage-compact-dismiss {
    width: 44px;
    height: 44px;
  }
}

.shelf-tools-toggle {
  display: none;
}

@media (max-width: 640px) {
  .wishlist-toolbar.is-small-shelf .shelf-tools-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    padding: 4px 9px;
    border-color: var(--line);
    color: var(--ink-soft);
    font-size: 10.5px;
  }

  .wishlist-toolbar.is-small-shelf:not(.tools-open) .filter-search,
  .wishlist-toolbar.is-small-shelf:not(.tools-open) .filter-sort {
    display: none;
  }

  .wishlist-toolbar.is-small-shelf.tools-open .shelf-tools-toggle {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
    background: var(--accent-soft);
    color: var(--accent-deep);
  }
}

@media (max-width: 640px) {
  /* A two-game shelf keeps the compact toolbar; the layout switcher would be
     the only control left on a row of its own. Let Buscar/Selecionar/Filtros
     carry the whole shelf until the user opens search. */
  .wishlist-toolbar.has-mobile-filter.is-small-shelf .view-switcher {
    display: none;
  }

  .wishlist-toolbar.has-mobile-filter.is-small-shelf:not(.tools-open) .filter-primary {
    display: none;
  }
}

/* The single shelf card reads as deliberate when centered, with the invite
   spanning the row beneath it. */
.game-grid.is-sparse .game-card {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 385px);
}

.single-shelf-aside {
  display: none;
}

@media (min-width: 1024px) {
  .single-shelf-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 12px;
  }

  .single-shelf-main {
    min-width: 0;
  }

  .single-shelf-aside {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 10px;
    min-width: 0;
  }

  .single-shelf-aside #shelf-value,
  .single-shelf-aside .shelf-value {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .single-shelf-aside .shelf-value-grid > span {
    padding: 6px 7px;
  }

  .single-shelf-aside .shelf-value-grid strong {
    font-size: 15px;
    letter-spacing: -0.02em;
  }

  .single-shelf-aside .shelf-value-grid small {
    font-size: var(--type-caption-sm);
  }

  .single-shelf-main .game-grid.is-sparse .game-card {
    justify-self: start;
    width: min(100%, 760px);
  }

  .single-shelf-layout .game-grid.is-sparse .shelf-invite {
    display: none;
  }

  html.single-game-shelf .wishlist-coverage.is-compact {
    display: none;
  }

  .single-shelf-aside .shelf-invite {
    min-height: 0;
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 14px 16px;
  }

  .single-shelf-aside .shelf-invite-copy strong {
    font-size: 16px;
  }
}

.shelf-tools-toggle .icon:last-child {
  width: 12px;
  height: 12px;
  transition: transform 160ms ease;
}

.wishlist-toolbar.tools-open .shelf-tools-toggle .icon:last-child {
  transform: rotate(180deg);
}

.wishlist-toolbar.is-single-game .batch-mode-enter {
  display: none;
}

@media (max-width: 640px) {
  .discover-filters .shelf-tools-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    padding: 4px 9px;
    border-color: var(--line);
    color: var(--ink-soft);
    font-size: 10.5px;
  }

  .discover-filters .filter-primary > .shelf-tools-toggle,
  .discover-filters .filter-primary > .list-actions-menu > .list-actions-toggle,
  .discover-filters .filter-primary .discover-curation-toggle,
  .discover-filters .filter-primary > .filter-more-toggle {
    box-sizing: border-box;
    height: 44px;
    min-height: 44px;
    padding-block: 0;
  }

  .discover-filters:not(.tools-open) .filter-search,
  .discover-filters:not(.tools-open) .filter-sort {
    display: none;
  }

  .discover-filters.tools-open .shelf-tools-toggle {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
    background: var(--accent-soft);
    color: var(--accent-deep);
  }
}

.alert-coverage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 10px;
}

.alert-coverage > span,
.alert-coverage-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.alert-coverage-link {
  color: inherit;
  text-decoration: none;
}

.alert-coverage-link:hover {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.alert-coverage .icon {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

.alert-coverage .text-action {
  min-height: 30px;
  padding: 0;
  border: 0;
  color: var(--accent-deep);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  text-align: right;
  cursor: pointer;
}

@media (max-width: 640px) {
  .alert-coverage {
    align-items: flex-start;
    flex-direction: column;
  }

  .alert-coverage .text-action {
    min-height: 44px;
    text-align: left;
  }
}

.empty-taste-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: min(100%, 440px);
  margin-top: 12px;
}

.empty-taste-presets button {
  display: flex;
  min-height: 58px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font: inherit;
  font-size: var(--type-caption-sm);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.empty-taste-presets button:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--accent-deep);
}

.empty-taste-presets .icon {
  width: 17px;
  height: 17px;
  color: var(--accent-deep);
}

.empty-taste-presets button small {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

@media (max-width: 640px) {
  .empty-taste-presets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .empty-taste-presets button {
    min-height: 62px;
  }
}

/* ---------- Shelf health ---------- */

.shelf-health {
  margin: 10px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 72%, var(--bg));
}

.shelf-health-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shelf-health-mark {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.shelf-health.is-clean .shelf-health-mark {
  background: color-mix(in srgb, var(--success) 16%, var(--surface));
  color: var(--success);
}

.shelf-health.has-metadata .shelf-health-mark {
  background: color-mix(in srgb, var(--surface-2) 70%, var(--bg));
  color: var(--muted);
}

.shelf-health-head > div {
  min-width: 0;
  flex: 1;
}

.shelf-health-head strong {
  display: block;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.15;
}

.shelf-health-head small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.shelf-health-head .btn {
  flex: 0 0 auto;
}

.shelf-health.is-compact {
  padding: 10px 12px;
}

.shelf-health.is-compact .shelf-health-head strong {
  font-size: 15px;
}

.shelf-health-breakdown {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.shelf-health-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.shelf-health-group-label {
  flex: 0 0 auto;
  min-width: 64px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.shelf-health-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shelf-health-group .shelf-health-chips {
  margin: 0;
}

.shelf-health-chip.is-metadata {
  border-color: color-mix(in srgb, var(--gold) 30%, var(--line));
  background: color-mix(in srgb, var(--gold-soft) 30%, transparent);
}

.shelf-health-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
}

.shelf-health-chip b {
  color: var(--fg);
  font-size: 12px;
}

.shelf-health-chip.is-zero {
  border-style: dashed;
  color: var(--muted);
}

.shelf-health.is-loading .shelf-health-head {
  align-items: flex-start;
}

.shelf-health.is-loading .shelf-health-head > div {
  display: grid;
  gap: 5px;
}

.shelf-health.is-error .shelf-health-head {
  align-items: center;
}

.shelf-health-modal {
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
}

.shelf-health-scroll-cue {
  position: sticky;
  bottom: -1px;
  z-index: 3;
  height: 22px;
  margin: 0 -22px -22px;
  background: linear-gradient(to bottom, transparent, var(--surface) 78%);
  pointer-events: none;
}

.shelf-health-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.shelf-health-modal-head h2 {
  margin: 1px 0 2px;
  font-size: clamp(22px, 2.5vw, 30px);
  line-height: 1.05;
}

.health-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 10px 0 2px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.health-nav-wrap::before,
.health-nav-wrap::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  z-index: 1;
  width: 20px;
  pointer-events: none;
}

.health-nav-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--surface), transparent);
}

.health-nav-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--surface), transparent);
}

.health-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  background: transparent;
  scrollbar-width: thin;
}

.health-nav-item {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.health-nav-item::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--health-color, var(--accent));
}

.health-nav-item[data-target="health-no-offers"] { --health-color: var(--terracotta); }
.health-nav-item[data-target="health-stale"] { --health-color: var(--gold); }
.health-nav-item[data-target="health-duplicates"] { --health-color: var(--data-4); }
.health-nav-item[data-target="health-gtin"] { --health-color: var(--accent); }
.health-nav-item[data-target="health-cover"] { --health-color: var(--muted-2); }

.health-nav-item.is-active {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.health-nav-item:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.health-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 60px;
}

.health-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

details.health-meta > summary.health-section-head {
  list-style: none;
  cursor: pointer;
}

details.health-meta > summary.health-section-head::-webkit-details-marker {
  display: none;
}

.health-section-head .icon {
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform 130ms ease;
}

details.health-meta[open] > summary.health-section-head .icon {
  transform: rotate(180deg);
}

details.health-meta > .settings-footnote,
details.health-meta > .health-game,
details.health-meta > .health-more {
  margin-top: 4px;
}

.health-section-head h3 {
  margin: 0 auto 0 0;
  font-family: var(--serif);
  font-size: 18px;
}

.health-section-head > span {
  min-width: 26px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.health-section .settings-footnote {
  margin: 2px 0 6px;
}

.health-progress {
  display: grid;
  gap: 5px;
  margin: 9px 0 4px;
}

.health-progress-bar {
  display: block;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
}

.health-progress-track {
  fill: var(--line);
}

.health-progress-segment.is-offers,
.health-progress-legend .is-offers {
  --health-color: var(--terracotta);
}

.health-progress-segment.is-stale,
.health-progress-legend .is-stale {
  --health-color: var(--gold);
}

.health-progress-segment.is-duplicates,
.health-progress-legend .is-duplicates {
  --health-color: var(--data-4);
}

.health-progress-segment.is-gtin,
.health-progress-legend .is-gtin {
  --health-color: var(--accent);
}

.health-progress-segment.is-cover,
.health-progress-legend .is-cover {
  --health-color: var(--muted-2);
}

.health-progress-segment {
  fill: var(--health-color);
}

.health-progress-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  color: var(--muted);
  font-size: 10.5px;
}

.health-progress-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.health-progress-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--health-color);
}

.health-progress-legend b {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.health-game {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
}

.health-game:last-child {
  border-bottom: 0;
}

.health-game-open {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 9px;
  min-height: 56px;
  padding: 5px 2px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.health-game-cover {
  display: block;
  flex: 0 0 38px;
  width: 38px;
  height: 50px;
  overflow: hidden;
  border-radius: 4px;
}

.health-game-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.health-game-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.health-game-copy strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-game-copy small {
  color: var(--muted);
  font-size: 10px;
}

.health-game-primary {
  flex: 0 0 auto;
  min-height: 32px;
  padding-inline: 8px;
  white-space: nowrap;
}

.health-game-menu {
  position: relative;
  flex: 0 0 auto;
}

.health-game-menu-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--muted);
  list-style: none;
  cursor: pointer;
}

.health-game-menu-toggle::-webkit-details-marker {
  display: none;
}

.health-game-menu-toggle:hover,
.health-game-menu[open] .health-game-menu-toggle {
  color: var(--ink);
  background: var(--surface-2);
}

.health-game-menu-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 6;
  min-width: 190px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.health-game-menu-panel .health-game-remove {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  width: 100%;
  min-height: 44px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--danger);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.health-game-menu-panel .health-game-remove:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.health-merge {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 8px;
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 700;
}

.merge-review {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.merge-review-head h2 {
  margin: 2px 0 6px;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px);
}

.merge-review-head p:last-child {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
}

.merge-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.merge-review-card {
  display: grid;
  justify-items: center;
  min-width: 0;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 76%, var(--bg));
  text-align: center;
}

.merge-review-card.is-target {
  border-color: color-mix(in srgb, var(--success) 35%, var(--line));
  background: color-mix(in srgb, var(--success) 6%, var(--surface));
}

.merge-review-role {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.merge-review-cover {
  display: block;
  width: 72px;
  height: 96px;
  overflow: hidden;
  border-radius: 6px;
}

.merge-review-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.merge-review-card > strong {
  overflow-wrap: anywhere;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.1;
}

.merge-review-card > small {
  color: var(--muted);
  font-size: 11px;
}

.merge-review-arrow {
  color: var(--muted-2);
  font-size: 24px;
}

.merge-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 640px) {
  .merge-review {
    padding: 16px;
  }

  .merge-review-grid {
    grid-template-columns: 1fr;
  }

  .merge-review-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .merge-review-actions .btn {
    min-height: 44px;
  }
}

.health-duplicate {
  margin: 8px 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.health-duplicate > strong {
  display: block;
  padding: 2px 0 4px;
  font-size: 11px;
  color: var(--muted);
}

.health-more {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.health-footnote {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

@media (max-width: 640px) {
  .shelf-health {
    padding: 11px 12px;
  }

  .shelf-health-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .shelf-health-head .btn {
    min-height: 44px;
  }

  .health-nav-item {
    min-height: 44px;
  }

  .health-progress {
    gap: 6px;
  }

  .health-progress-bar {
    height: 8px;
  }

  .health-progress-legend {
    gap: 4px 10px;
    font-size: 12px;
  }

  .health-progress-legend i {
    width: 8px;
    height: 8px;
  }

  .settings-footnote.health-footnote {
    font-size: 12px;
    line-height: 1.45;
  }

  .health-game-menu-toggle,
  .health-game-primary {
    min-height: 44px;
  }

  .health-game-primary {
    padding-inline: 7px;
    font-size: 10px;
  }

  .shelf-health-modal {
    padding: 16px;
  }

  .shelf-health-scroll-cue {
    height: 20px;
    margin: 0 -16px -16px;
  }
}

/* A one-game shelf hides the sidebar at narrow widths to keep the card first,
   but the health pulse is part of the card's summary now. Show only that pulse
   below the card and keep plan/invite/alert out of the mobile flow. */
@media (max-width: 1023px) {
  html.single-game-shelf .single-shelf-aside {
    display: block;
  }

  html.single-game-shelf .single-shelf-aside > :not(#shelf-value) {
    display: none;
  }

  .single-shelf-aside .alert-coverage .text-action,
  .single-shelf-aside .shelf-action,
  .single-shelf-aside .shelf-invite {
    scroll-margin-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }

  .single-shelf-aside #shelf-value {
    gap: 6px;
    padding: 10px 14px;
  }

  .single-shelf-aside .shelf-value-head > div > span {
    display: none;
  }

  .single-shelf-aside .alert-coverage {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    padding-top: 6px;
  }

  .single-shelf-aside .alert-coverage .text-action {
    min-height: 32px;
  }
}

.first-game-prompt {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 10px 0 12px;
  padding: 14px 16px;
  border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 42%, var(--surface));
}

.first-game-prompt-copy {
  display: flex;
  flex: 1 1 360px;
  align-items: flex-start;
  gap: 10px;
}

.first-game-prompt-mark {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--accent-deep);
}

.first-game-prompt-mark .icon {
  width: 16px;
  height: 16px;
}

.first-game-prompt-copy .eyebrow {
  margin: 0 0 2px;
}

.first-game-prompt-copy strong {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: -.02em;
}

.first-game-prompt-copy p:last-child {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10.5px;
}

.first-game-prompt-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 640px) {
  .first-game-prompt-actions {
    width: 100%;
  }

  .first-game-prompt-actions .btn {
    flex: 1;
    min-height: 44px;
  }
}

/* A compact recap between the shelf value card and the game list. */
.shelf-changes {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding: 9px 12px;
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 32%, var(--surface));
}

.shelf-changes-mark {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.shelf-changes-mark .icon {
  width: 15px;
  height: 15px;
}

.shelf-changes-copy {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 10px;
  min-width: 0;
}

.shelf-changes-heading {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 6px;
}

.shelf-changes-copy strong {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.shelf-changes-date {
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.shelf-changes-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.3;
}

.shelf-changes-fact {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--muted) 42%, transparent);
  text-underline-offset: 2px;
  white-space: nowrap;
  cursor: pointer;
}

.shelf-changes-fact:hover {
  color: var(--accent-deep);
  text-decoration-color: currentColor;
}

.shelf-changes-fact.is-new {
  color: var(--accent-deep);
}

.shelf-changes-facts .icon {
  width: 12px;
  height: 12px;
  color: var(--accent-deep);
}

.shelf-changes-facts b {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.shelf-changes-dismiss {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.shelf-changes-dismiss:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.shelf-changes-dismiss .icon {
  width: 14px;
  height: 14px;
}

@media (max-width: 640px) {
  .shelf-changes {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .shelf-changes-copy {
    flex-basis: calc(100% - 86px);
  }

  .shelf-changes-copy strong {
    white-space: normal;
  }

  .shelf-changes-dismiss {
    width: 44px;
    height: 44px;
    margin-left: auto;
  }
}

@media (min-width: 641px) {
  .wishlist-toolbar.advanced-collapsed {
    position: sticky;
    top: 8px;
    z-index: 25;
    box-shadow: 0 12px 28px -24px color-mix(in srgb, var(--ink) 55%, transparent);
  }
}

.collection-column-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.collection-column-head h3 {
  margin: 0;
}

.collection-column-head .text-action {
  font-size: 10px;
}

.single-shelf-links {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.single-shelf-links > .shelf-action {
  flex: 1 1 0;
  min-width: 0;
  height: auto;
  min-height: 32px;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  text-align: left;
}

.single-shelf-links > .shelf-action:hover,
.single-shelf-links > .shelf-action:focus-visible {
  border: 0;
  background: transparent;
  color: var(--accent-deep);
}

.single-shelf-links .shelf-invite-art {
  display: none;
}

.single-shelf-links small {
  display: none;
}

.single-shelf-links strong {
  color: var(--accent-deep);
  font-size: 11px;
}

.single-shelf-links > .icon {
  width: 12px;
  height: 12px;
  color: var(--muted);
}

.shelf-value-notify {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 10.5px;
}

.shelf-value-notify > .icon {
  width: 13px;
  height: 13px;
  color: var(--accent-deep);
}

.shelf-value-notify > span {
  flex: 1 1 180px;
  min-width: 0;
}

.shelf-value-notify .text-action {
  min-height: 28px;
  font-size: 10.5px;
}

.shelf-value-notify-dismiss {
  flex: 0 0 auto;
  width: 28px;
  justify-content: center;
  padding: 0;
}

.shelf-value-notify-dismiss .icon {
  width: 12px;
  height: 12px;
}

.collection-dashboard-details {
  display: grid;
  gap: 13px;
  min-width: 0;
}

.collection-details-toggle {
  display: none;
}



@media (max-width: 640px) {
  .collection-dashboard-details {
    display: none;
  }

  .collection-dashboard-details.is-open {
    display: grid;
  }

  .collection-details-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    min-height: 38px;
    padding: 0;
    border: 0;
    border-top: 1px dashed var(--line);
    background: transparent;
    color: var(--accent-deep);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
  }

  .collection-details-toggle .icon {
    order: 2;
    width: 14px;
    height: 14px;
    margin-left: auto;
    color: var(--muted);
    transition: transform 140ms ease;
  }

  .collection-details-toggle[aria-expanded="true"] .icon {
    transform: rotate(180deg);
  }

  .collection-share {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }
}

.list-sort-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  margin: -4px 0 10px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent-soft) 24%, var(--surface));
  color: var(--muted);
  font-size: 10.5px;
}

.list-sort-summary .icon {
  width: 12px;
  height: 12px;
  color: var(--accent-deep);
}

.list-sort-summary b {
  color: var(--ink-soft);
  font-weight: 750;
}

.list-sort-summary .text-action {
  margin-left: auto;
  font-size: 10px;
}

/* Collection gaps */
.collection-gaps,
.collection-orphans {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.collection-orphan-list {
  display: grid;
  gap: 8px;
}

.collection-orphan {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--gold-soft) 28%, var(--surface));
}

.collection-orphan > .text-action {
  justify-self: start;
  gap: 4px;
  padding: 0 6px;
  font-size: 10.5px;
}

.collection-gaps-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.collection-gaps-head h3 {
  margin: 2px 0 0;
  font-size: 1rem;
  line-height: 1.2;
}

.collection-gaps-head > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold);
}

.collection-gaps-head > span .icon {
  width: 14px;
  height: 14px;
}

.collection-gap-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.collection-gap {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 42%, var(--surface));
}

.collection-gap-copy {
  display: grid;
  gap: 2px;
}

.collection-gap-copy strong {
  font-size: 0.86rem;
  line-height: 1.2;
}

.collection-gap-copy small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  line-height: 1.35;
}

.collection-gap-suggestion {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  gap: 8px;
  padding: 6px;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.collection-gap-suggestion:hover,
.collection-gap-suggestion:focus-visible {
  background: var(--surface-2);
}

.collection-gap-suggestion > .icon {
  width: 13px;
  height: 13px;
  color: var(--muted-2);
}

.collection-gap-cover {
  position: relative;
  display: block;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 7px;
}

.collection-gap-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-gap-suggestion-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.collection-gap-suggestion-copy small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.collection-gap-suggestion-copy strong {
  overflow: hidden;
  font-size: 0.82rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-gap-suggestion-copy em {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-gap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 6px 2px;
}

.collection-gap-actions .text-action {
  gap: 4px;
  font-size: 10.5px;
}

.collection-gap-actions .text-action:disabled {
  cursor: default;
  opacity: .62;
}

.collection-roulette-modal {
  max-width: 520px;
}

.collection-roulette-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 12px;
}

.collection-roulette-spin {
  width: 100%;
  justify-content: center;
}

.collection-roulette-result {
  margin-top: 14px;
}

.collection-roulette-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}

.collection-roulette-cover {
  display: block;
  width: 108px;
  height: 144px;
  overflow: hidden;
  border-radius: 10px;
}

.collection-roulette-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-roulette-copy {
  display: grid;
  align-content: center;
  min-width: 0;
  gap: 5px;
}

.collection-roulette-copy small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.collection-roulette-copy strong {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.1;
}

.collection-roulette-copy em {
  color: var(--muted);
  font-size: 10.5px;
  font-style: normal;
}

.collection-roulette-copy .btn {
  justify-self: start;
  margin-top: 3px;
}

@media (max-width: 640px) {
  .collection-roulette-filters {
    grid-template-columns: 1fr;
  }

  .collection-roulette-card {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .collection-roulette-cover {
    width: 84px;
    height: 112px;
  }
}

.collection-gap-empty {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.collection-dismissed-gaps {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.collection-dismissed-gaps summary {
  cursor: pointer;
}

.collection-dismissed-gaps ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.collection-dismissed-gaps li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
}

.collection-gaps-more {
  margin: 0;
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.collection-gaps.is-balanced {
  color: var(--accent-deep);
}

.collection-gaps.is-balanced .collection-gaps-head > span {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.collection-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.collection-roulette-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.collection-roulette-memory {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.collection-roulette-memory > div {
  display: grid;
  gap: 5px;
}

.collection-roulette-memory strong {
  font-size: var(--type-caption-sm);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.collection-roulette-memory [data-roulette-shortlist],
.collection-roulette-memory [data-roulette-history] {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.collection-roulette-history-item {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

/* ---------- deals ---------- */

.deal-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 13px;
  margin-bottom: 15px;
}

.deal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 5px;
}

.chip {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

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

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

.deal-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding-bottom: 5px;
}

.deal-count {
  color: var(--muted);
  font-size: 10.5px;
}

.deal-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  /* A one-line title and a two-line title sat at different heights in the same
     row. Matching the row height keeps the day group reading as a band. */
  align-items: stretch;
  gap: 9px;
}

/* The deal card is short (cover, one line of title, one price), so a two-column
   layout left half of every row empty. Three columns from 1024px keep the text
   line length readable and halve the scroll. */
@media (min-width: 1024px) {
  .deal-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* Three columns are narrower than two, so a long title needs a third line
     instead of an ellipsis in the middle of the name. */
  .deal-list .deal-name {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .deal-item {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 13px 14px;
  }

  .deal-item .deal-cover {
    width: 48px;
    height: 64px;
  }
}

.deal-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  height: 100%;
  gap: 15px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  container: deal-card / inline-size;
  transition: border-color 130ms ease, transform 130ms ease, box-shadow 130ms ease;
}

.deal-item:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.deal-drop {
  border-left: 3px solid var(--terracotta);
}

.deal-restock {
  border-left: 3px solid var(--success);
}

.deal-cover {
  width: 72px;
  height: 96px;
  border: 0;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 22px -20px rgba(44, 40, 35, 0.8);
  cursor: pointer;
}

.deal-item:hover .deal-cover img {
  transform: scale(1.04);
}

.deal-prices .drop-badge {
  border-radius: 4px 9px 9px 4px;
  padding-left: 8px;
  font-size: 10px;
  font-weight: 800;
}

.deal-main {
  min-width: 0;
}

.deal-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-width: 0;
}

.deal-type {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.deal-type .icon {
  width: 12px;
  height: 12px;
}

.deal-type.drop { color: var(--terracotta); }
.deal-type.restock { color: var(--success); }

.deal-time {
  flex: 0 0 auto;
  color: var(--muted-2);
  font-size: 10px;
  /* "há 23h" is one token: never let it wrap to a second line. */
  white-space: nowrap;
}

.deal-time::before {
  content: "·";
  margin-right: 4px;
}

.deal-name {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  text-overflow: ellipsis;
  white-space: normal;
}

.deal-name:hover {
  color: var(--accent);
}

.deal-prices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.deal-prices strong {
  font-size: 18px;
  line-height: 1.15;
}

.old-price {
  color: var(--muted-2);
  text-decoration: line-through;
}

.price-arrow {
  color: var(--muted-2);
}

.deal-store {
  color: var(--muted);
  font-size: 10px;
}

.deal-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.deal-link {
  padding: 6px 11px;
  font-size: 11px;
}

.deal-link-label {
  white-space: nowrap;
}

@container (max-width: 420px) {
  .deal-link {
    width: 26px;
    height: 26px;
    padding: 3px;
    gap: 0;
  }

  .deal-link-label {
    display: none;
  }
}

/* ---------- activity ---------- */

.next-sync-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  margin-bottom: 15px;
}

.next-sync-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--gold-soft);
  color: var(--gold);
}

.next-sync-card strong {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
}

.next-sync-card .eyebrow {
  margin-bottom: 2px;
}

.auto-status {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
}

.auto-status.on {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.auto-status.off {
  background: var(--surface-2);
  color: var(--muted);
}

.activity-calendar {
  display: grid;
  gap: 9px;
  margin-bottom: 12px;
  padding: 13px 15px;
}

.activity-calendar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.activity-calendar-head > div {
  display: grid;
  gap: 1px;
}

.activity-calendar-head .eyebrow {
  margin: 0;
}

.activity-calendar-head strong {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.1;
}

.activity-calendar-head small {
  color: var(--muted);
  font-size: 10.5px;
}

.activity-calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(180px, 1fr);
  align-items: start;
  gap: 18px;
}

.activity-calendar-heatmap {
  display: grid;
  gap: 4px;
  min-width: 0;
  max-width: 300px;
}

.activity-calendar-aside {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.activity-calendar-legend-title {
  margin: 0;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.activity-calendar-legend {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

.activity-calendar-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.activity-calendar-legend b {
  min-width: 14px;
  color: var(--ink-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.activity-calendar-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.activity-calendar-legend i.is-attention { background: var(--gold); }
.activity-calendar-legend i.is-error { background: var(--danger); }

.activity-calendar-today {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: -5px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

.activity-calendar-today i {
  width: 14px;
  height: 14px;
  border: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 5px;
  background: var(--surface-2);
}

.activity-calendar-readout {
  min-height: 1.35em;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.activity-calendar-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
}

.activity-calendar-summary > span {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  padding: 0 9px;
}

.activity-calendar-summary > span:first-child {
  padding-left: 0;
}

.activity-calendar-summary > span + span {
  border-left: 1px solid var(--line);
}

.activity-calendar-summary b {
  overflow: hidden;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-calendar-summary small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.activity-calendar-heat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
}

.activity-calendar-heat-label {
  margin-right: 2px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.activity-calendar-heat small {
  font-size: inherit;
}

.activity-calendar-heat i {
  width: 12px;
  height: 12px;
  border: 1px solid color-mix(in srgb, var(--success) 45%, var(--line));
  border-radius: 3px;
  background: color-mix(in srgb, var(--success) var(--heat), var(--surface));
}

.activity-calendar-heat i.is-level-1 { --heat: 12%; }
.activity-calendar-heat i.is-level-2 { --heat: 22%; }
.activity-calendar-heat i.is-level-3 { --heat: 34%; }
.activity-calendar-heat i.is-level-4 { --heat: 48%; }

.activity-calendar-months {
  margin: 0;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .05em;
  line-height: 1.2;
  text-transform: uppercase;
}

.activity-calendar-weekdays,
.activity-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.activity-calendar-weekdays span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: center;
  text-transform: uppercase;
}

.activity-calendar-day {
  --activity-heat: 6%;
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-2) 60%, transparent);
  color: var(--muted);
  font: 650 10px/1 var(--sans);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.activity-calendar-day.is-level-1 { --activity-heat: 12%; }
.activity-calendar-day.is-level-2 { --activity-heat: 22%; }
.activity-calendar-day.is-level-3 { --activity-heat: 34%; }
.activity-calendar-day.is-level-4 { --activity-heat: 48%; }

.activity-calendar-day.is-ok {
  border-color: color-mix(in srgb, var(--success) 25%, var(--line));
  background: color-mix(in srgb, var(--success) var(--activity-heat), var(--surface));
  color: var(--ink-soft);
}

.activity-calendar-day:hover {
  border-color: var(--line-strong);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
}

.activity-calendar-day.is-outside {
  border-color: transparent;
  background: transparent;
  pointer-events: none;
}

.activity-calendar-day i {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--success);
}

.activity-calendar-day.is-partial {
  border-color: color-mix(in srgb, var(--gold) 38%, var(--line));
  background: color-mix(in srgb, var(--gold) var(--activity-heat), var(--surface));
}

.activity-calendar-day.is-partial i { background: var(--gold); }

.activity-calendar-day.is-interrupted {
  border-color: color-mix(in srgb, var(--terracotta) 34%, var(--line));
  background: color-mix(in srgb, var(--terracotta) var(--activity-heat), var(--surface));
}

.activity-calendar-day.is-interrupted i { background: var(--terracotta); }

.activity-calendar-day.is-error {
  border-color: color-mix(in srgb, var(--danger) 36%, var(--line));
  background: color-mix(in srgb, var(--danger) var(--activity-heat), var(--surface));
}

.activity-calendar-day.is-error i { background: var(--danger); }

.activity-calendar-day.is-running {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
  background: color-mix(in srgb, var(--accent) var(--activity-heat), var(--surface));
}

.activity-calendar-day.is-running i { background: var(--accent); }

.activity-calendar-day.is-today {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 1px;
}

.activity-calendar-day.is-selected {
  border-color: var(--accent-deep);
  background: var(--accent-deep);
  color: var(--surface);
}

.activity-calendar-day.is-selected i { background: var(--surface); }

.activity-day-filter {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  padding: 9px 12px;
  color: var(--muted);
  font-size: 11px;
}

.activity-day-filter > .icon {
  width: 15px;
  height: 15px;
  color: var(--accent-deep);
}

.activity-day-filter .text-action {
  margin-left: auto;
}

@media (max-width: 640px) {
  .activity-calendar {
    padding: 12px;
  }

  .activity-calendar-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .activity-calendar-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .activity-calendar-heatmap {
    max-width: none;
  }

  .activity-calendar-day {
    height: 44px;
    min-height: 44px;
  }
}

.activity-recap {
  display: grid;
  gap: 12px;
  margin-bottom: 15px;
  padding: 15px 18px;
}

.activity-recap-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.activity-recap-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.activity-recap-head h2 {
  margin: 0;
  font-size: 18px;
}

.activity-recap-head .eyebrow {
  margin: 0 0 1px;
}

.activity-recap-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}

.activity-recap-grid > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  padding: 9px 11px;
  background: var(--surface-2);
}

.activity-recap-grid strong {
  font-family: var(--serif);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.activity-recap-grid small {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.activity-recap-grid .needs-attention {
  background: color-mix(in srgb, var(--gold-soft) 34%, var(--surface-2));
}

.activity-recap-grid .needs-attention strong {
  color: var(--gold);
}

@media (max-width: 640px) {
  .activity-recap {
    padding: 13px 14px;
  }

  .activity-recap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.activity-more {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.run-card {
  margin-bottom: 8px;
  overflow: hidden;
}

.run-card summary {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  list-style: none;
  cursor: pointer;
}

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

.run-card summary > .icon {
  margin-left: auto;
  color: var(--muted-2);
  transition: transform 160ms ease;
}

.run-card[open] summary > .icon {
  transform: rotate(180deg);
}

.run-status {
  min-width: 56px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.run-status.ok { background: var(--accent-soft); color: var(--accent-deep); }
.run-status.partial { background: var(--gold-soft); color: var(--ink-soft); }
.run-status.error { background: var(--danger-soft); color: var(--danger); }
.run-status.interrupted { background: var(--gold-soft); color: var(--ink-soft); }
.run-status.running { background: var(--surface-2); color: var(--accent); }

.run-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.run-kind {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
}

.run-glance {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
  margin-left: 2px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-glance b {
  color: var(--ink-soft);
  font-weight: 750;
}

.run-glance b.is-error {
  color: var(--danger);
}

.run-date {
  color: var(--muted);
  font-size: 11px;
}

.run-duration {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.run-body {
  padding: 0 16px 16px 16px;
  border-top: 1px dashed var(--line);
}

.run-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: start;
  gap: 14px;
}

.run-body-main {
  min-width: 0;
}

.run-summary-panel {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding-top: 12px;
}

.run-summary-panel .run-waterfall-summary {
  display: grid;
  align-items: start;
  gap: 3px;
  margin: 0;
  font-size: 10.5px;
}

.run-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.run-summary-grid > span {
  display: grid;
  gap: 1px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.run-summary-grid small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.run-summary-grid b {
  color: var(--ink-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
  .run-body-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .run-summary-panel {
    padding-top: 8px;
  }
}

@media (max-width: 640px) {
  .run-card summary {
    display: grid;
    grid-template-columns: 24px auto minmax(0, 1fr) 18px;
    grid-template-areas:
      "icon status kind chevron"
      "date date duration chevron";
    align-items: center;
    gap: 4px 8px;
    padding: 10px 12px;
  }

  .run-card summary > .run-icon { grid-area: icon; }
  .run-card summary > .run-status { grid-area: status; justify-self: start; min-width: 0; }
  .run-card summary > .run-kind { grid-area: kind; min-width: 0; overflow-wrap: anywhere; }
  .run-card summary > .run-glance { display: none; }
  .run-card summary > .run-date { grid-area: date; margin: 0; font-size: 10.5px; }
  .run-card summary > .run-duration { grid-area: duration; justify-self: end; margin: 0; font-size: 10px; }
  .run-card summary > .icon { grid-area: chevron; margin-left: 0; }
}

.run-steps {
  display: grid;
  gap: 7px;
  padding-top: 12px;
}

.run-step {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.step-icon {
  display: grid;
  place-items: center;
  height: 20px;
  color: var(--muted-2);
}

.run-step.done .step-icon { color: var(--success); }
.run-step.error .step-icon { color: var(--danger); }
.run-step.skipped .step-icon { color: var(--muted-2); }
.run-step.running .step-icon { color: var(--accent); }

.run-step strong {
  font-size: 12px;
  font-weight: 650;
}

.run-step p {
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
}

.run-waterfall-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 2px 0 1px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
}

.run-waterfall-summary b {
  color: var(--ink-soft);
  font-weight: 700;
}

.run-step-meter {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 460px;
  margin-top: 4px;
}

.run-step-meter progress {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  appearance: none;
}

.run-step-meter progress::-webkit-progress-bar {
  border-radius: inherit;
  background: var(--line);
}

.run-step-meter progress::-webkit-progress-value {
  border-radius: inherit;
  background: var(--accent);
}

.run-step-meter progress::-moz-progress-bar {
  border-radius: inherit;
  background: var(--accent);
}

.run-step.error .run-step-meter progress::-webkit-progress-value { background: var(--danger); }
.run-step.error .run-step-meter progress::-moz-progress-bar { background: var(--danger); }
.run-step.done .run-step-meter progress::-webkit-progress-value { background: var(--success); }
.run-step.done .run-step-meter progress::-moz-progress-bar { background: var(--success); }

.run-step-meter small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
}

.run-step-funnel {
  display: grid;
  gap: 2px;
  max-width: 460px;
  margin-top: 5px;
}

.run-step-funnel-stage {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.run-step-funnel-stage small {
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-step-funnel-stage progress {
  width: 100%;
  height: 4px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  appearance: none;
}

.run-step-funnel-stage progress::-webkit-progress-bar {
  border-radius: inherit;
  background: var(--line);
}

.run-step-funnel-stage progress::-webkit-progress-value {
  border-radius: inherit;
  background: var(--accent);
}

.run-step-funnel-stage progress::-moz-progress-bar {
  border-radius: inherit;
  background: var(--accent);
}

.run-step-funnel-stage.is-claimed progress::-webkit-progress-value { background: var(--gold); }
.run-step-funnel-stage.is-claimed progress::-moz-progress-bar { background: var(--gold); }
.run-step-funnel-stage.is-checked progress::-webkit-progress-value { background: var(--success); }
.run-step-funnel-stage.is-checked progress::-moz-progress-bar { background: var(--success); }
.run-step-funnel-stage.is-skipped progress::-webkit-progress-value { background: var(--muted-2); }
.run-step-funnel-stage.is-skipped progress::-moz-progress-bar { background: var(--muted-2); }

.run-step-funnel-stage b {
  color: var(--ink-soft);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.run-error {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11px;
}

.run-warnings {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.run-warnings p {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--muted);
  font-size: 10.5px;
}

.run-warnings .icon {
  width: 12px;
  height: 12px;
  color: var(--gold);
  margin-top: 2px;
}


/* One restart closing several runs is one event, stated once. */
.activity-burst {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-color: color-mix(in srgb, var(--terracotta) 35%, var(--line));
  background: color-mix(in srgb, var(--terracotta) 7%, var(--surface));
}

.activity-burst .icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--terracotta);
}

.activity-burst strong {
  display: block;
  font-size: 13px;
}

.activity-burst small {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .alert-filter-body .deal-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .alert-filter-body .deal-chips .chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    text-align: center;
  }

  .alert-filter-body .deal-chips .chip:first-child {
    grid-column: 1 / -1;
  }
}

/* ---------- settings ---------- */

.settings-toc {
  position: sticky;
  top: 12px;
  z-index: 4;
  display: flex;
  gap: 14px;
  margin: 0 0 16px;
  padding: 0 2px 4px;
  overflow-x: auto;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  scrollbar-width: none;
}

.settings-toc::-webkit-scrollbar { display: none; }

.settings-toc button {
  flex: 0 0 auto;
  padding: 8px 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  cursor: pointer;
  transition: color var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard), background var(--motion-fast) var(--ease-standard);
}

.settings-toc button:hover {
  border-bottom-color: var(--line-strong);
  color: var(--ink);
}

.settings-toc button.active {
  border-bottom-color: var(--accent);
  color: var(--accent-deep);
}

/* Moderation, backup and retention live under their own superadmin heading. */
.settings-toc-group {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.settings-toc-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 0 4px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.settings-toc-label .icon {
  width: 12px;
  height: 12px;
  color: var(--accent);
}

.settings-toc-sub {
  position: static;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

@media (min-width: 960px) {
  .settings-toc-group {
    margin-top: 4px;
  }
}

.settings-panel {
  --type-caption: 11px;
  --type-caption-sm: 10.5px;
}

.settings-fold[hidden] {
  display: none;
}

.settings-fold > summary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
  transition: border-color var(--motion-fast) var(--ease-standard), background var(--motion-fast) var(--ease-standard);
}

.settings-fold > summary::-webkit-details-marker {
  display: none;
}

.settings-fold > summary:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.settings-fold > summary .icon:first-child {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.settings-fold > summary small {
  margin-left: auto;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 500;
}

.settings-fold-dirty {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: color-mix(in srgb, var(--gold) 70%, var(--ink));
  font-size: var(--type-caption-sm);
  font-weight: 650;
}

.settings-fold-reset {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 28px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: var(--type-caption-sm);
  font-weight: 650;
  cursor: pointer;
}

.settings-fold-reset:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.settings-fold-reset .icon {
  width: 12px;
  height: 12px;
}

.settings-fold-dirty[hidden],
.settings-fold-reset[hidden] {
  display: none;
}

.settings-fold > summary .icon:last-child {
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: transform var(--motion-fast) var(--ease-standard);
}

.settings-fold[open] > summary .icon:last-child {
  transform: rotate(180deg);
}

.settings-fold[open] > summary {
  margin-bottom: 9px;
}

.settings-fold-body {
  display: grid;
  gap: var(--space-3);
}

@media (max-width: 640px) {
  .settings-fold > summary {
    padding: 8px 11px;
  }

  .settings-fold > summary small {
    display: none;
  }
}

.settings-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 13px;
}

.admin-panel {
  display: grid;
  gap: 13px;
}

.admin-panel .admin-inbox-banner {
  margin-bottom: 0;
}

@media (min-width: 1280px) {
  .admin-operations[open] .admin-operations-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 13px;
    grid-auto-flow: row dense;
  }

  .admin-operations-body > .settings-card {
    margin: 0;
  }

  .admin-operations-body > #settings-schedule,
  .admin-operations-body > #settings-health,
  .admin-operations-body > #settings-outbox,
  .admin-operations-body > #settings-schedulers,
  .admin-operations-body > #settings-price-anomalies,
  .admin-operations-body > #superadmin-retention {
    grid-column: 1 / -1;
  }
}

.admin-nav-back {
  display: inline-flex;
  width: fit-content;
  padding: 2px 4px;
  color: var(--muted);
  font-size: 11.5px;
  text-decoration: none;
}

.admin-nav-back:hover {
  color: var(--accent-deep);
}

.settings-card {
  min-width: 0;
  padding: 22px;
  scroll-margin-top: 68px;
}

.settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 17px;
}

.settings-head h2 {
  font-size: 25px;
}

.settings-head .eyebrow {
  margin-bottom: 3px;
}

.settings-status {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--type-caption-sm);
  white-space: nowrap;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-source-block {
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 34%, transparent);
}

.settings-source-block + .settings-source-block {
  margin-top: 10px;
}

.settings-source-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.settings-source-block-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -.01em;
}

.settings-source-block-head small {
  max-width: 32ch;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  line-height: 1.35;
  text-align: right;
}

.settings-source-block .settings-history-review {
  border: 0;
  padding: 0;
  background: transparent;
}

.settings-source-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 3px 5px 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--type-caption-sm);
  white-space: nowrap;
}

.settings-source-sync,
.settings-bgg-pick {
  display: grid;
  flex: 0 0 20px;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--accent-deep);
  cursor: pointer;
}

.settings-source-sync:hover,
.settings-bgg-pick:hover {
  background: var(--accent-soft);
}

.settings-source-sync .icon,
.settings-bgg-pick .icon {
  width: 12px;
  height: 12px;
}

.settings-bgg-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.settings-history-source .settings-source-block-head {
  align-items: center;
  margin-bottom: 0;
}

.settings-history-inline {
  display: flex;
  align-items: center;
  gap: 9px;
}

.settings-history-inline > span {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  white-space: nowrap;
}

.settings-history-inline b {
  color: var(--ink-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.settings-bgg-status-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-top: 7px;
  border-top: 1px dashed color-mix(in srgb, var(--line) 70%, transparent);
}

.settings-bgg-status {
  color: var(--ink-soft);
  font-size: var(--type-caption-sm);
  font-weight: 650;
}

.settings-bgg-status-row small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  text-align: right;
}

.settings-bgg-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.settings-bgg-counts span {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--muted);
  font-size: var(--type-caption-sm);
  white-space: nowrap;
}

.settings-bgg-counts b {
  color: var(--ink-soft);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
}

.settings-bgg-drop.is-importing {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 40%, var(--surface));
  pointer-events: none;
}

.settings-bgg-drop.is-importing > .icon {
  animation: settings-bgg-pulse 900ms ease-in-out infinite alternate;
}

@keyframes settings-bgg-pulse {
  to { opacity: .35; transform: translateY(1px); }
}

@media (max-width: 640px) {
  .settings-source-block {
    padding: 11px;
  }

  .settings-source-block-head {
    display: grid;
    gap: 2px;
  }

  .settings-source-block-head small {
    max-width: none;
    text-align: left;
  }

  .settings-source-status {
    justify-self: start;
  }

  .settings-history-inline {
    justify-content: space-between;
    width: 100%;
  }

  .settings-bgg-status-row {
    display: grid;
    gap: 2px;
  }

  .settings-bgg-status-row small {
    text-align: left;
  }

  .settings-bgg-counts {
    justify-content: flex-start;
  }
}

.settings-list-presets {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: -3px;
}

.settings-list-presets > span {
  margin-right: 2px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.settings-list-preset {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.settings-list-preset small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.settings-list-preset:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

.settings-list-status {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 700;
  letter-spacing: .02em;
}

.settings-list-status.is-ok {
  color: var(--success);
}

.settings-list-status.is-private,
.settings-list-status.is-not_found,
.settings-list-status.is-error {
  color: var(--danger);
}

.settings-list-status.is-empty,
.settings-list-status.is-skipped {
  color: var(--muted);
}

.settings-check-lists {
  margin-left: auto;
}

.settings-bgg-field {
  grid-column: 1 / -1;
}

.settings-bgg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-bgg-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 62px;
  padding: 10px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface-2) 40%, transparent);
}

.settings-bgg-drop.is-dragover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 62%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
}

.settings-bgg-drop > span {
  display: grid;
  justify-items: start;
  gap: 2px;
}

.settings-bgg-drop strong {
  color: var(--ink-soft);
  font-size: 12px;
}

.settings-bgg-drop small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.settings-history-review {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
  color: var(--muted);
  font-size: 11px;
}


.settings-advanced {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 72%, var(--bg));
}

.settings-advanced > summary {
  min-height: 34px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.settings-advanced-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}


.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field > span,
.checkbox-fieldset legend {
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 650;
}

.field em {
  color: var(--muted-2);
  font-size: var(--type-caption-sm);
  font-style: normal;
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 8px 10px;
  font-size: 12px;
}

.field textarea {
  resize: vertical;
  min-height: 68px;
  font-family: var(--sans);
  line-height: 1.45;
}

.field small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  line-height: 1.4;
}

.field .saved-note {
  color: var(--accent-deep);
}

.saved-note {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: var(--type-caption-sm);
  font-style: normal;
  font-weight: 700;
}

.checkbox-fieldset {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px 14px;
  margin: 0;
  padding: 0;
  border: 0;
}

.checkbox-fieldset legend {
  grid-column: 1 / -1;
  padding: 0;
}

.checkbox-fieldset .toggle-field {
  margin: 0;
}

.settings-toggle {
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
}

/* A toggle inside a labelled field sits in a narrow column; the base rule keeps
   labels on one line with nowrap, which squeezed the text into a 3-line stack. */
.field .settings-toggle,
.field > .toggle-field {
  width: 100%;
  margin-top: 0;
  white-space: normal;
}

.field .settings-toggle > span,
.field > .toggle-field > span {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.inline-input {
  display: flex;
  align-items: center;
  gap: 7px;
}

.inline-input input {
  width: 100px;
}

.inline-input span {
  color: var(--muted);
  font-size: 11px;
}

.passkey-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 4px;
}

.passkey-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.passkey-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.device-card {
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  box-shadow: 0 8px 18px -22px rgba(44, 40, 35, 0.45);
}

.device-card-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--accent-deep);
}

.device-card-icon .icon {
  width: 17px;
  height: 17px;
}

.device-card-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.device-card-copy strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.device-badge {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: var(--type-caption-sm);
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.settings-subscription-card {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 10px;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 72%, transparent), color-mix(in srgb, var(--accent-soft) 44%, var(--surface)));
}

.settings-subscription-copy {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.settings-subscription-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.settings-subscription-title strong {
  font-size: 13px;
}

.settings-subscription-copy > small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.settings-disclosure {
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.settings-disclosure > summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  color: var(--accent-deep);
  font-weight: 650;
  cursor: pointer;
}

.settings-disclosure > summary::-webkit-details-marker {
  display: none;
}

.settings-disclosure > summary .icon {
  width: 12px;
  height: 12px;
  transition: transform var(--motion-fast) var(--ease-standard);
}

.settings-disclosure[open] > summary .icon {
  transform: rotate(180deg);
}

.settings-disclosure > p {
  margin: 2px 0 0;
  line-height: 1.5;
}

.settings-subscription-mark {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent-deep);
}

.settings-subscription-mark .icon {
  width: 14px;
  height: 14px;
}

.settings-subscription-card > div {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 1px;
}

.settings-subscription-card strong {
  color: var(--ink-soft);
  font-size: 11px;
}

.settings-subscription-card small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.settings-danger-zone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--danger) 26%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--danger-soft) 30%, transparent);
}

.settings-danger-copy .eyebrow {
  margin: 0 0 1px;
  color: var(--danger);
  font-size: var(--type-caption-sm);
}

.settings-danger-copy p:last-child {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.settings-danger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.btn.danger {
  border-color: color-mix(in srgb, var(--danger) 34%, var(--line));
  color: var(--danger);
}

.btn.danger:hover {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.telegram-actions {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  align-items: center;
}

.ops-coverage {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.ops-coverage strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.ops-coverage .needs-attention {
  color: var(--ink);
  font-weight: 700;
}

/* Superadmin jump target: an outline alone vanished against card borders, so
   the highlight also lifts the card while it is active. */
.settings-card.is-highlighted {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent);
  transition: box-shadow 160ms ease;
}

@media (max-width: 800px) {
}

.notification-delivery {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.notification-channel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}

.notification-channel-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
}

.notification-channel-icon .icon {
  width: 15px;
  height: 15px;
}

.notification-channel.is-ok .notification-channel-icon {
  background: color-mix(in srgb, var(--success) 13%, var(--surface));
  color: var(--success);
}

.notification-channel.is-warn .notification-channel-icon {
  background: color-mix(in srgb, var(--gold) 15%, var(--surface));
  color: var(--gold);
}

.notification-channel.is-error .notification-channel-icon {
  background: color-mix(in srgb, var(--danger) 13%, var(--surface));
  color: var(--danger);
}

.notification-channel-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.notification-channel-copy small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 650;
}

.notification-channel-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-channel-copy > span {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  line-height: 1.3;
}

.notification-channel-dot {
  width: 7px;
  height: 7px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--success);
}

.notification-channel.is-warn .notification-channel-dot {
  background: var(--gold);
}

.notification-channel.is-error .notification-channel-dot {
  background: var(--danger);
}

.notification-channel-action {
  grid-column: 2 / -1;
  justify-self: start;
  margin-top: 2px;
}

.ops-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.ops-summary-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink-soft);
  text-align: left;
  cursor: pointer;
}

.ops-summary-item strong {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
}

.ops-summary-item span {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.ops-summary-item.needs-attention {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
}

.ops-summary-item.needs-attention strong {
  color: var(--danger);
}

/* Queued work, not an incident: the figure is real but nobody has to act on it,
   so it reads as a backlog rather than a warning. */
.ops-summary-item.is-queued strong {
  color: var(--muted);
  font-size: 20px;
}


@media (max-width: 800px) {
  .ops-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.notification-delivery { grid-template-columns: 1fr; }

.telegram-qr-panel {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.telegram-qr-panel img {
  flex: 0 0 auto;
  border-radius: 8px;
  /* A QR code must keep light-on-dark contrast in every theme. */
  background: var(--qr-paper);
}

.telegram-qr-panel > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.invite-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.invite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.invite-main {
  min-width: 0;
}

.invite-main > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.invite-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.invite-main small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.invite-status {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: var(--type-caption-sm);
  font-weight: 650;
}

.invite-status.used,
.invite-status.revoked {
  background: var(--surface);
  color: var(--muted);
}

.invite-status.pending {
  background: var(--gold-soft);
  color: var(--gold);
}

.invite-status.canceled,
.invite-status.none {
  background: var(--surface);
  color: var(--muted);
}

/* A failed payment wore the same green as an active subscription. */
.invite-status.past_due {
  background: var(--danger-soft);
  color: var(--danger);
}

.invite-plan {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: var(--type-caption-sm);
  font-weight: 650;
}

.invite-plan.free {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.invite-plan.paid {
  background: var(--gold-soft);
  color: var(--gold);
}

.invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 0 0 auto;
}

@media (max-width: 640px) {
  .invite-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

.file-button {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.settings-footnote {
  overflow-wrap: anywhere;
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.5;
}

.admin-next-ops {
  display: grid;
  gap: 7px;
  margin: 11px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 48%, transparent);
}

.admin-next-ops-label {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.admin-next-ops-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.admin-next-op {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.admin-next-op-icon {
  display: grid;
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.admin-next-op-icon .icon {
  width: 12px;
  height: 12px;
}

.admin-next-op-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.admin-next-op-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 650;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.admin-next-op-copy strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-next-op-copy > span {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-next-op-copy strong {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .admin-next-ops-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .admin-next-op {
    min-height: 50px;
  }
}

.pwa-head-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.pwa-showcase {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(240px, 1fr);
  align-items: center;
  gap: 22px;
  margin: 12px 0 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--surface-2) 48%, transparent);
}

.pwa-showcase-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.pwa-showcase-copy strong {
  color: var(--ink-soft);
  font-size: 11.5px;
}

.pwa-install-steps {
  display: grid;
  gap: 3px;
  margin: 0;
  padding-left: 17px;
  color: var(--muted);
  font-size: var(--type-caption);
  line-height: 1.4;
}

.pwa-showcase-copy .settings-actions {
  margin-top: 2px;
}

.pwa-install-benefits {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.pwa-install-benefits span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  color: var(--ink-soft);
  font-size: var(--type-caption);
  font-weight: 650;
}

.pwa-install-benefits .icon {
  width: 16px;
  height: 16px;
  color: var(--accent-deep);
}

@media (max-width: 640px) {
  .pwa-showcase {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }

  .pwa-install-benefits span {
    min-height: 38px;
  }

  .pwa-showcase-copy {
    grid-column: auto;
    padding-top: 11px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

.form-save-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px 11px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(10px);
}

.form-save-bar > span {
  color: var(--muted);
  font-size: 11px;
}


.metadata-meters {
  display: grid;
  gap: 10px;
}

.metadata-meter {
  display: grid;
  gap: 5px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
}

.metadata-meter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.metadata-meter-head span {
  color: var(--ink-soft);
  font-size: var(--type-caption-sm);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.metadata-meter-head strong {
  color: var(--accent-deep);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.metadata-progress {
  display: block;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  color: var(--accent);
  accent-color: var(--accent);
}

.metadata-progress::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--line);
}

.metadata-progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--accent);
}

.metadata-progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--accent);
}

.metadata-meter small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.metadata-pending,
.metadata-running {
  margin: 9px 0 0;
}

.metadata-running {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--accent-deep);
}

.metadata-running .icon {
  width: 13px;
  height: 13px;
  animation: spin .9s linear infinite;
}

@media (max-width: 720px) {
  .metadata-meters {
    gap: 8px;
  }
}
.admin-operations {
  display: grid;
  gap: 10px;
}

.admin-operations > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 700;
}

.admin-operations > summary::-webkit-details-marker {
  display: none;
}

.admin-operations > summary > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.admin-operations > summary .icon {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.admin-operations > summary small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 550;
}

.admin-operations[open] > summary {
  border-color: var(--line-strong);
}

.admin-operations-body {
  display: grid;
  gap: 13px;
}

/*
 * Eight cards share one group header, so they read as sections of a single
 * panel: no repeated outer padding, a hairline between cards and one label per
 * card. The cards themselves keep their internal spacing.
 */
.admin-operations-body > .settings-card {
  padding: 18px 20px;
  border-radius: 12px;
}

.admin-operations-body > .settings-card + .settings-card {
  border-top-color: var(--line-strong);
}

.admin-operations-body .settings-head {
  margin-bottom: 12px;
}

.admin-operations-body .settings-head h2 {
  font-size: clamp(19px, 1.6vw, 23px);
}

.admin-operations-body .retention-editor {
  margin: 10px 0;
}

@media (max-width: 720px) {
  .admin-operations-body > .settings-card {
    padding: 15px 14px;
  }

  /* Eight retention fields stack better as two columns on phones. */
  .admin-operations-body .retention-editor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .admin-operations > summary {
    padding: 10px 12px;
  }
}

@media (min-width: 641px) and (max-width: 959px) {
  .settings-toc {
    position: static;
  }
}

@media (min-width: 960px) {
  .settings-layout {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    align-items: start;
    gap: 18px;
  }

  .settings-panel {
    min-width: 0;
  }

  .settings-toc {
    position: sticky;
    top: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 8px;
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
  }

  .settings-toc button {
    width: 100%;
    padding: 8px 10px;
    border-bottom: 0;
    border-left: 2px solid transparent;
    border-radius: 8px;
    text-align: left;
    white-space: normal;
  }

  .settings-toc button:hover {
    border-left-color: var(--line-strong);
    background: var(--surface-2);
  }

  .settings-toc button.active {
    border-left-color: var(--accent);
    background: var(--accent-soft);
  }
}

/* Reflow at 320px and 200% zoom: labels and passkey rows must wrap inside the card. */
.settings-form .toggle-field.settings-toggle {
  max-width: 100%;
  white-space: normal;
}

.settings-form .toggle-field.settings-toggle > span {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 420px) {
  .settings-head {
    flex-wrap: wrap;
    gap: 8px;
  }

  .settings-head .settings-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .passkey-list,
  .passkey-row {
    min-width: 0;
    max-width: 100%;
  }

  .passkey-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .passkey-row .settings-status {
    white-space: normal;
  }
}

/* Shelf origins: one source card per import, with live count and share. */
.settings-origin-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.settings-origin-manage {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--accent-deep);
  font-size: var(--type-caption);
  font-weight: 650;
  cursor: pointer;
}

.settings-origin-manage .icon {
  width: 12px;
  height: 12px;
}

@media (max-width: 640px) {
  .settings-origin-head-actions {
    justify-content: flex-start;
    width: 100%;
  }
}

.origin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.origin-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.origin-card-ludopedia { --origin-color: var(--accent); }
.origin-card-bgg { --origin-color: var(--gold); }
.origin-card-manual { --origin-color: var(--success); }
.origin-card-legacy { --origin-color: var(--gold); }

.origin-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.origin-card .origin-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.origin-card-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.origin-card-title strong {
  color: var(--ink);
  font-size: 12px;
}

.origin-card-title strong span[data-origin-count] {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: var(--type-caption);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.origin-count-unit {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 600;
}

.origin-card-title small {
  color: var(--muted);
  font-size: var(--type-caption);
  line-height: 1.4;
}

.origin-card-title .origin-split {
  color: var(--accent-deep);
  font-size: var(--type-caption);
  font-weight: 650;
}

.origin-card-meter {
  display: flex;
  align-items: center;
  gap: 7px;
}

.origin-card-meter small {
  color: var(--muted);
  font-size: var(--type-caption);
  font-variant-numeric: tabular-nums;
}

.origin-share {
  flex: 1 1 auto;
  height: 4px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  appearance: none;
}

.origin-share::-webkit-progress-bar {
  border-radius: inherit;
  background: var(--line);
}

.origin-share::-webkit-progress-value {
  border-radius: inherit;
  background: var(--origin-color, var(--accent));
}

.origin-share::-moz-progress-bar {
  border-radius: inherit;
  background: var(--origin-color, var(--accent));
}

.origin-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.origin-card-foot small {
  color: var(--muted-2);
  font-size: var(--type-caption);
}

.origin-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.origin-card-actions .text-action + .text-action.danger {
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.origin-hidden {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--gold-soft) 32%, var(--surface));
}

.origin-hidden div {
  display: grid;
  gap: 2px;
}

.origin-hidden strong {
  font-size: 12px;
}

.origin-hidden small {
  color: var(--muted);
  font-size: var(--type-caption);
}

@media (max-width: 640px) {
  .origin-hidden {
    align-items: flex-start;
    flex-direction: column;
  }

  .origin-card-actions .text-action,
  .settings-origin-manage {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

.origin-inactive {
  display: grid;
  gap: 9px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}

.origin-inactive-head {
  display: grid;
  gap: 2px;
}

.origin-inactive-head .eyebrow {
  margin: 0;
}

.origin-inactive-head strong {
  font-family: var(--serif);
  font-size: 15px;
}

.origin-inactive-head small {
  color: var(--muted);
  font-size: var(--type-caption);
  line-height: 1.4;
}

.origin-inactive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 6px;
}

.origin-connect-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 130ms ease, background 130ms ease;
}

.origin-connect-card:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.origin-connect-card .origin-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
}

.origin-connect-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.origin-connect-copy strong {
  font-size: 11.5px;
}

.origin-connect-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.origin-connect-state {
  width: fit-content;
  max-width: 100%;
  margin-top: 2px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: var(--type-caption-sm);
  line-height: 1.25;
  font-weight: 650;
}

.origin-connect-arrow {
  color: var(--muted-2);
}

.origin-connect-arrow .icon {
  width: 13px;
  height: 13px;
  transform: rotate(-90deg);
}

@media (max-width: 640px) {
  .origin-connect-card {
    min-height: 58px;
  }
}

.origin-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent-deep);
}

.origin-icon .icon {
  width: 15px;
  height: 15px;
}

.origin-icon-ludopedia {
  background: color-mix(in srgb, var(--accent) 13%, var(--surface));
}

.origin-icon-bgg {
  background: color-mix(in srgb, var(--gold) 16%, var(--surface));
  color: var(--accent-deep);
}

.origin-icon-manual {
  background: color-mix(in srgb, var(--success) 13%, var(--surface));
  color: var(--success);
}

.origin-card-title .origin-health {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 650;
}

.origin-health i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.origin-health.is-ok { color: color-mix(in srgb, var(--success) 55%, var(--ink)); }
.origin-health.is-stale { color: var(--gold); }
.origin-health.is-manual { color: var(--accent-deep); }
.origin-health.is-legacy { color: var(--accent-deep); }
.origin-health.is-idle { color: var(--muted-2); }

[data-theme="dark"] .origin-health.is-ok {
  color: var(--success);
}

[data-theme="dark"] .backup-readiness > span.is-ok {
  background: color-mix(in srgb, var(--success) 12%, var(--surface-2));
}

[data-theme="dark"] .backup-readiness > span.is-warn {
  background: color-mix(in srgb, var(--gold) 12%, var(--surface-2));
}

[data-theme="dark"] .backup-readiness > span.is-bad {
  background: color-mix(in srgb, var(--danger) 12%, var(--surface-2));
}

.notification-delivery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  grid-column: 1 / -1;
  gap: 10px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.notification-test-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  color: var(--accent-deep);
}

.notification-test-all .icon {
  width: 13px;
  height: 13px;
}

.backup-readiness {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}

.backup-readiness > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 650;
}

.backup-readiness > span .icon {
  width: 12px;
  height: 12px;
}

.backup-readiness > span.is-ok {
  border-color: color-mix(in srgb, var(--success) 30%, var(--line));
  color: var(--accent-deep);
}

.backup-readiness > span.is-warn {
  border-color: color-mix(in srgb, var(--gold) 40%, var(--line));
  color: color-mix(in srgb, var(--gold) 65%, var(--ink));
}

.backup-readiness > span.is-bad {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
  color: color-mix(in srgb, var(--danger) 65%, var(--ink));
}

.notification-diagnostics {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 7px;
}

.notification-diagnostics > summary {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.notification-diagnostics > summary::-webkit-details-marker {
  display: none;
}

.notification-diagnostics > summary .icon {
  width: 13px;
  height: 13px;
}

.notification-diagnostics ul {
  display: grid;
  gap: 5px;
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
}

.notification-diagnostics li {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 6px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.notification-diagnostics li > span {
  color: var(--ink-soft);
  font-weight: 650;
}

.notification-diagnostics li > b {
  font-weight: 500;
}

.notification-diagnostics li > em {
  grid-column: 2;
  color: var(--danger);
  font-style: normal;
  overflow-wrap: anywhere;
}

.offline-queue {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface-2) 36%, transparent);
}

.offline-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-soft);
  font-size: var(--type-caption);
}

.offline-queue-head > span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.offline-queue ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.offline-queue li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.offline-queue li small {
  color: var(--muted-2);
  white-space: nowrap;
}

.session-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0 8px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.session-list-head .text-action {
  color: var(--danger);
}

/* App settings keep the install and notification basics visible; the offline
   storage panel is an advanced, collapsed disclosure at the end. */
.settings-app-storage {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.settings-app-storage > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 2px;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}

.settings-app-storage > summary::-webkit-details-marker {
  display: none;
}

.settings-app-storage-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.settings-app-storage-title .icon {
  width: 15px;
  height: 15px;
  color: var(--accent-deep);
}

.settings-app-storage > summary > .icon {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--muted);
  transition: transform 160ms ease;
}

.settings-app-storage[open] > summary > .icon {
  transform: rotate(180deg);
}

.settings-app-storage > .offline-cache {
  margin-top: 8px;
}

@media (max-width: 640px) {
  .settings-app-storage > summary {
    min-height: 44px;
  }
}

/* Support copy has a legibility floor even when the card is compact. */
.settings-card small,
.settings-head small,
.settings-status,
.settings-card .settings-footnote {
  font-size: var(--type-caption-sm);
}

.modal:has(.history-panel) {
  width: min(1080px, calc(100vw - 32px));
}

.history-panel {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  padding: 24px 26px 20px;
}

.history-panel-title {
  margin: 2px 0 0;
  padding-right: 34px;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.05;
}

.history-panel-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.history-panel-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.history-panel-summary b {
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0;
}

.history-source-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.history-source-filter .chip {
  min-height: 28px;
  padding: 0 8px;
  font-size: var(--type-caption-sm);
}

.history-source-filter .chip b {
  margin-left: 3px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.history-search {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 5px 4px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.history-search .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.history-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  outline: 0;
}

.history-groups {
  max-height: min(56vh, 520px);
  overflow: auto;
  border-top: 1px solid var(--line);
}

.history-source-group + .history-source-group {
  margin-top: 8px;
}

.history-source-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 2px 5px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.history-source-head b {
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.history-list {
  max-height: none;
  overflow: visible;
  border-top: 0;
}

.history-row {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  break-inside: avoid;
}

@media (min-width: 760px) {
  .history-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
    align-content: start;
  }
}

@media (min-width: 1000px) {
  .history-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.history-row-main {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.history-row-cover {
  position: relative;
  width: 36px;
  height: 46px;
  flex: 0 0 36px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--surface-2);
}

.history-row-cover img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-row-cover.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, color-mix(in srgb, var(--surface) 70%, transparent) 50%, transparent 80%);
  background-size: 200% 100%;
  animation: history-cover-shimmer 1.2s linear infinite;
}

.history-row-cover.is-missing {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface-2) 82%, transparent), transparent 70%),
    var(--surface-2);
}

@keyframes history-cover-shimmer {
  from { background-position: 180% 0; }
  to { background-position: -80% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .history-row-cover.is-loading::after {
    animation: none;
  }
}

.history-row-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.history-row-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-row-copy small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.history-row-remove {
  flex: 0 0 auto;
  color: var(--muted);
}

.history-row-remove:hover {
  color: var(--danger);
}

.history-panel-empty {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 28px 14px;
  color: var(--muted);
  text-align: center;
}

.history-panel-empty .icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.history-panel-empty p,
.history-panel-loading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.history-panel-empty small {
  max-width: 42ch;
  font-size: var(--type-caption-sm);
  line-height: 1.4;
}

.history-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 5px;
}

.history-panel-loading {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 28px;
}

@media (max-width: 640px) {
  .history-panel {
    width: 100%;
    padding: 18px 16px 16px;
  }

  .history-list {
    max-height: 52vh;
  }
}

.backup-summary {
  margin: 2px 0 6px;
  color: var(--ink-soft);
  font-size: var(--type-caption);
  line-height: 1.4;
}

.backup-details {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.backup-details > summary {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  color: var(--muted);
  font-size: var(--type-caption);
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}

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

.backup-details > summary .icon {
  width: 14px;
  height: 14px;
  transition: transform var(--motion-base) var(--ease-standard);
}

.backup-details[open] > summary .icon {
  transform: rotate(180deg);
}

.backup-details > summary:hover {
  color: var(--ink);
}

.backup-details-body {
  display: grid;
  gap: 4px;
  padding-bottom: 2px;
}

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: color-mix(in srgb, #221b13 72%, transparent);
  backdrop-filter: blur(5px);
  animation: fade-in var(--motion-fast) var(--ease-standard);
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  position: relative;
  width: min(1240px, calc(100vw - 56px));
  max-height: 90vh;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.55);
  animation: modal-in var(--motion-base) var(--ease-standard);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

.modal-scroll {
  max-height: 90vh;
  overflow-y: auto;
}

.modal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 260px;
  color: var(--muted);
  font-size: 13px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--ink-soft);
  font: 500 22px/1 var(--sans);
  cursor: pointer;
}

.modal-close:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.modal-head {
  position: relative;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(230px, 300px);
  gap: 24px;
  align-items: start;
  padding: 30px 32px 26px;
  overflow: hidden;
  background:
    radial-gradient(420px 220px at 0% 0%, color-mix(in srgb, var(--gold-soft) 68%, transparent), transparent 70%),
    color-mix(in srgb, var(--surface) 65%, var(--bg));
  border-bottom: 1px solid var(--line);
}

.modal-head-price {
  display: grid;
  align-self: center;
  gap: 7px;
  min-width: 0;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.modal-head-price .best-total-offer {
  width: 100%;
  padding-right: 32px;
}

.header-price-compact {
  display: none;
}

@media (max-width: 640px) {
  .modal.has-mobile-offer:has(.modal-mobile-offer:not(.is-hidden)) .modal-head-price {
    display: none;
  }
}

.header-price-full {
  display: block;
}

.header-price-signal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 7px;
  width: 100%;
  margin-top: 6px;
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: 10.5px;
  text-align: left;
  cursor: pointer;
}

.header-price-signal:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.header-price-signal b {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.header-price-signal b.is-down { color: var(--success); }
.header-price-signal b.is-up { color: var(--terracotta); }

.header-price-signal small {
  flex-basis: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-price-signal.is-buy {
  border-color: color-mix(in srgb, var(--success) 28%, var(--line));
  background: color-mix(in srgb, var(--success) 6%, var(--surface));
}

.header-price-signal.is-wait {
  border-color: color-mix(in srgb, var(--gold) 38%, var(--line));
  background: color-mix(in srgb, var(--gold-soft) 44%, var(--surface));
}

.header-price-signal.is-watch {
  border-style: dashed;
}

.header-price-signal.is-reading {
  justify-content: flex-start;
  gap: 5px;
  min-height: 0;
  margin-top: 3px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}

.header-price-signal.is-reading > span {
  flex: 0 1 auto;
}

.header-price-signal.is-reading .icon {
  width: 12px;
  height: 12px;
}

.header-price-signal.is-reading:hover {
  border: 0;
  background: transparent;
  color: var(--accent-deep);
}

.header-price-signal .header-price-recommendation {
  margin-left: 0;
}

@media (max-width: 640px) {
  .header-price-signal {
    min-height: 44px;
  }
}

.header-price-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
}

.header-price-open:hover {
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.header-price-open .icon {
  width: 12px;
  height: 12px;
}

.header-price-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 10px;
  color: var(--muted);
  font-size: 10px;
}

.header-price-facts .freshness-badge {
  margin-right: 0;
}

.header-price-fact-sep {
  color: var(--muted-2);
}

.modal-head-backdrop {
  position: absolute;
  inset: -30px;
  width: calc(100% + 60px);
  height: calc(100% + 60px);
  object-fit: cover;
  filter: blur(26px) saturate(0.75);
  opacity: 0.13;
  transform: scale(1.05);
  pointer-events: none;
}

.modal-head > :not(.modal-head-backdrop):not(.modal-close) {
  position: relative;
  z-index: 1;
}

.detail-cover {
  position: relative;
  display: grid;
  place-items: center;
  width: 120px;
  height: 154px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--muted-2);
  box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.8);
}

.detail-cover img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.detail-heading {
  min-width: 0;
  padding-top: 3px;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 7px;
}

.detail-heading h1 {
  padding-right: 38px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.detail-meta .icon {
  width: 13px;
  height: 13px;
  color: var(--gold);
}

.detail-designers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10.5px;
}

.detail-designers > span {
  font-weight: 700;
}

.detail-author {
  min-height: 24px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.detail-author:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.detail-author-item {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.detail-author-page {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}

.detail-author-page:hover,
.detail-author-page:focus-visible {
  background: var(--surface-2);
  color: var(--ink);
}

.detail-author-page .icon {
  width: 12px;
  height: 12px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.detail-share,
.detail-share-card {
  width: 38px;
  padding-inline: 0;
}

.detail-body {
  display: grid;
  gap: 18px;
  padding: 22px 30px 30px;
}

.domain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 380px));
  justify-content: start;
  gap: 12px;
}

.domain-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--bg-elev) 58%, var(--surface));
}

.domain-head {
  display: flex;
  align-items: center;
  gap: 7px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.store-badge.us {
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  color: var(--accent-deep);
}

.store-badge.br {
  background: var(--gold-soft);
  color: var(--ink-soft);
}

.store-badge.nk {
  background: var(--terracotta-soft);
  color: var(--terracotta);
}

.store-badge.zt {
  background: var(--surface-2);
  color: var(--ink-soft);
}

.store-badge.mc {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.store-badge.bn {
  background: var(--gold-soft);
  color: var(--ink-soft);
}

.store-badge.aru {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.store-badge.id {
  background: var(--terracotta-soft);
  color: var(--terracotta);
}

.store-badge.mmh {
  background: var(--gold-soft);
  color: var(--ink-soft);
}

.store-badge.trv {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.store-badge.she {
  background: var(--gold-soft);
  color: var(--ink-soft);
}

.store-badge.mth {
  background: var(--surface-3);
  color: var(--accent-deep);
}

.store-badge.gpl {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.store-badge.ply {
  background: var(--terracotta-soft);
  color: var(--terracotta);
}

.store-badge.ph {
  background: var(--surface-3);
  color: var(--accent-deep);
}

.store-badge.tg {
  background: var(--terracotta-soft);
  color: var(--terracotta);
}

.store-badge.mm {
  background: var(--surface-2);
  color: var(--ink-soft);
}

.store-badge.lp {
  background: var(--gold-soft);
  color: var(--ink-soft);
}

.store-badge .store-favicon {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

.store-badge.ml {
  background: var(--gold-soft);
  color: var(--ink-soft);
}

.store-badge.olx {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.detail-price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.detail-price .icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.detail-price-meta {
  color: var(--muted);
  font-size: 10.5px;
}

.chart-store-picker {
  display: contents;
}

.chart-store-picker-toggle {
  display: none;
}

@media (max-width: 640px) {
  .chart-store-picker {
    display: block;
    width: 100%;
  }

  .chart-store-picker-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    color: var(--ink-soft);
    font: inherit;
    font-size: 11px;
    text-align: left;
    cursor: pointer;
  }

  .chart-store-picker-toggle span {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chart-store-picker-toggle .icon:last-child {
    transition: transform 150ms ease;
  }

  .chart-store-picker.is-open .chart-store-picker-toggle .icon:last-child {
    transform: rotate(180deg);
  }

  .chart-store-picker .chart-stores {
    display: none;
    margin-top: 6px;
  }

  .chart-store-picker.is-open .chart-stores {
    display: flex;
    flex-wrap: wrap;
  }
}

.price-chart {
  width: 100%;
  height: auto;
  margin-top: 2px;
  overflow: visible;
}

.chart-clip-note {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.chart-clip-note .icon {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-top: 1px;
  color: var(--gold);
}

.chart-empty {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 78px;
  padding: 10px;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 10.5px;
}

.chart-empty-skeleton {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--line-strong);
  opacity: .55;
  pointer-events: none;
}

.chart-empty > .icon,
.chart-empty > span,
.chart-empty > .btn {
  position: relative;
  z-index: 1;
}

.chart-empty .icon {
  width: 14px;
  height: 14px;
}

.chart-controls {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.chart-controls[hidden],
.chart-data[hidden] {
  display: none;
}

.chart-store-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.chart-store-select select {
  width: 210px;
  max-width: 100%;
  height: 34px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: 10.5px;
}

@media (max-width: 640px) {
  .chart-store-select {
    width: 100%;
  }

  .chart-store-select select {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
  }
}

.chart-stores {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chart-store {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.chart-store:hover,
.chart-store.active {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.chart-ranges,
.chart-conditions {
  display: flex;
  flex: 0 0 auto;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.chart-range {
  padding: 4px 7px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
}

.chart-range.active {
  background: var(--surface);
  color: var(--ink);
}

.chart-source-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}

.chart-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chart-source .store-favicon {
  width: 13px;
  height: 13px;
  border-radius: 3px;
}

.chart-source b {
  color: var(--ink-soft);
  font-weight: 700;
}

button.chart-source {
  padding: 3px 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

button.chart-source:hover,
button.chart-source:focus-visible {
  border-color: var(--line);
  background: var(--surface);
}

.chart-source-swatch {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.chart-source-swatch.accent { background: var(--accent); }
.chart-source-swatch.chart-1 { background: var(--chart-1); }
.chart-source-swatch.chart-2 { background: var(--chart-2); }
.chart-source-swatch.chart-3 { background: var(--chart-3); }
.chart-source-swatch.chart-4 { background: var(--chart-4); }
.chart-source-swatch.chart-5 { background: var(--chart-5); }
.chart-source-swatch.chart-6 { background: var(--chart-6); }
.chart-source-swatch.chart-7 { background: var(--chart-7); }
.chart-source-swatch.chart-8 { background: var(--chart-8); }
.chart-source-swatch.chart-9 { background: var(--chart-9); }
.chart-source-swatch.chart-10 { background: var(--chart-10); }
.chart-source-swatch.chart-11 { background: var(--chart-11); }
.chart-source-swatch.chart-12 { background: var(--chart-12); }

.chart-band {
  fill: color-mix(in srgb, var(--accent) 12%, transparent);
  stroke: none;
}

.chart-good-band {
  fill: color-mix(in srgb, var(--success) 7%, transparent);
  pointer-events: none;
}

.chart-good-line {
  stroke: color-mix(in srgb, var(--success) 62%, var(--line));
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.chart-good-label {
  fill: var(--success);
  font-weight: 700;
  pointer-events: none;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3px;
}

.chart-event-shape {
  stroke: var(--surface);
  stroke-width: 1.5;
}

.chart-event.price_drop .chart-event-shape {
  fill: var(--terracotta);
}

.chart-event.restock .chart-event-shape {
  fill: var(--success);
}

.chart-event.out_of_stock .chart-event-shape {
  fill: none;
  stroke: var(--muted-2);
  stroke-width: 1.8;
}

.chart-events {
  margin-top: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 58%, var(--bg));
}

.chart-events > summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}

.chart-events > summary::-webkit-details-marker {
  display: none;
}

.chart-events > summary > .icon:first-child {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.chart-events > summary > span {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 10.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.chart-events > summary > .icon:last-child {
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: transform 140ms ease;
}

.chart-events[open] > summary {
  border-bottom: 1px solid var(--line);
}

.chart-events[open] > summary > .icon:last-child {
  transform: rotate(180deg);
}

.chart-event-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0;
  padding: 10px 12px 12px;
  color: var(--muted);
  font-size: 11px;
}

.chart-event-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chart-event-filter {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.chart-event-filter.active {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink-soft);
}

.chart-event-filter[aria-pressed="false"] {
  opacity: .55;
  text-decoration: line-through;
}

.chart-event-filter > span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.chart-event.is-hidden {
  display: none;
}

@media (max-width: 640px) {
  .chart-event-filter {
    min-height: 44px;
  }
}

.chart-event-swatch {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
}

.chart-event-swatch.price_drop {
  background: var(--terracotta);
}

.chart-event-swatch.restock {
  border-radius: 1px;
  background: var(--success);
}

.chart-event-swatch.price_drop {
  border-radius: 0;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.chart-event-swatch.out_of_stock {
  border: 1.5px solid var(--muted-2);
  background: transparent;
}

.price-memory {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 10px;
}

.price-memory strong {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.chart-tooltip {
  position: fixed;
  z-index: 120;
  max-width: 290px;
  padding: 5px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.35;
  pointer-events: none;
}

.chart-hit {
  cursor: crosshair;
}

.price-pill.stale {
  border-style: dashed;
}

.mute-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.mute-row .icon {
  width: 12px;
  height: 12px;
  vertical-align: -2px;
}

.best-total-offer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--ink-soft);
  font-size: 11px;
}

.best-total-offer strong {
  color: var(--accent-deep);
  font-size: 14px;
}

.best-total-label {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.listing-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
}

.text-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10.5px;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--muted) 40%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.text-action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
}

body.confirm-open {
  overflow: hidden;
}

.confirm-dialog-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10.5px;
}

.confirm-dialog-field input {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.confirm-dialog-field input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.confirm-dialog-error {
  margin: 0;
  color: var(--danger);
  font-size: 10.5px;
  line-height: 1.35;
}

.confirm-dialog-error[hidden] {
  display: none;
}

.confirm-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: color-mix(in srgb, #221b13 58%, transparent);
  backdrop-filter: blur(4px);
  animation: fade-in 140ms ease;
}

.confirm-dialog {
  display: grid;
  width: min(420px, 100%);
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lift);
  animation: modal-in var(--motion-base) var(--ease-standard);
}

.confirm-dialog p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

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

@media (max-width: 640px) {
  button.text-action,
  a.text-action {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

.text-action:hover {
  color: var(--accent-deep);
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.text-action.danger {
  color: var(--danger);
}

.text-action.danger:hover {
  color: var(--ink);
}

.detail-price-meta.stale {
  color: var(--gold);
}

.alert-section .alert-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  align-items: end;
  gap: 10px;
  margin-top: 8px;
}

.alert-section .alert-form .field {
  margin: 0;
}

.alert-section .alert-form .alert-actions {
  grid-column: 1 / -1;
}

.alert-section .alert-form .alert-more-options {
  grid-column: 1 / -1;
  margin-top: 2px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
}

.alert-more-options > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

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

.alert-more-options > summary .icon:first-child {
  width: 14px;
  height: 14px;
}

.alert-more-options > summary .icon:last-child {
  width: 13px;
  height: 13px;
  margin-left: auto;
  transition: transform 140ms ease;
}

.alert-more-options[open] > summary .icon:last-child {
  transform: rotate(180deg);
}

.alert-scope-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .alert-scope-grid {
    grid-template-columns: 1fr;
  }
}

.alert-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.alert-section .alert-drop-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.alert-section .alert-drop-form .field {
  flex: 1 1 92px;
  margin: 0;
}

.alert-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0;
}

.smart-target {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 9px 0;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 11px;
  background: color-mix(in srgb, var(--accent-soft) 44%, var(--surface));
}

.smart-target-mark {
  display: grid;
  flex: 0 0 26px;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent-deep);
}

.smart-target-mark .icon {
  width: 14px;
  height: 14px;
}

.smart-target-copy {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 1px;
}

.smart-target-copy strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.smart-target-copy p {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  line-height: 1.35;
}

.smart-target .btn {
  flex: 0 0 auto;
}

.block-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.block-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
}

.block-row:first-child {
  border-top: 0;
}

.block-row > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.block-row small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .block-row {
    grid-template-columns: 1fr auto;
  }

  .block-row > span {
    grid-column: 1 / -1;
  }
}

.security-settings {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

.security-settings > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.security-settings > summary .icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.settings-subhead {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.settings-subhead h3 {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.recovery-panel {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.recovery-codes {
  display: grid;
  justify-items: start;
  gap: 6px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: var(--gold-soft);
  color: var(--ink-soft);
  font-size: 10px;
}

.recovery-codes code {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.store-health-list {
  display: grid;
  gap: 8px;
  max-height: 380px;
  margin-top: 8px;
  padding-right: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.store-health-row {
  display: grid;
  grid-template-columns: minmax(160px, auto) 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.store-health-row:first-child {
  border-top: 0;
}

.store-health-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.store-health-copy strong {
  color: var(--ink-soft);
  font-size: 11px;
}

.store-health-copy small {
  color: var(--muted);
  font-size: 10px;
}

.store-health-error {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-price-warning {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--danger);
  font-size: 10px;
  font-weight: 650;
}

.store-price-qa summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  width: fit-content;
}

.store-price-qa ul {
  display: grid;
  gap: 4px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.store-price-qa li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 10px;
}

.store-price-qa a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.store-health-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  justify-content: flex-end;
  min-width: 0;
}

.store-health-actions small {
  min-width: 0;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .alert-section .alert-form {
    grid-template-columns: 1fr;
  }

  .store-health-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.chart-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10.5px;
}

.chart-summary-current {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.chart-summary-price {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-summary-change {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chart-summary strong {
  color: var(--ink);
  font-weight: 700;
}

.chart-summary .down {
  color: var(--success);
}

.chart-summary .up {
  color: var(--terracotta);
}

.chart-summary .chart-data-jump {
  margin-left: auto;
  font-size: 10px;
}

.chart-summary-good {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chart-summary-good i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

@media (max-width: 640px) {
  .chart-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 12px;
  }

  .chart-summary-current {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
  }

  .chart-summary .chart-data-jump {
    grid-column: 1 / -1;
    justify-self: start;
    min-height: 36px;
    margin-left: 0;
  }
}

.listing-card {
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.listing-card.primary {
  border-style: solid;
  border-color: color-mix(in srgb, var(--accent) 25%, var(--line));
}

.listing-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.stock-text {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.listing-price {
  margin-top: 5px;
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}


.listing-title {
  overflow-wrap: anywhere;
  word-break: break-word;

  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.35;
}

.listing-meta {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: var(--type-caption-sm);
}

.listing-card .btn {
  margin-top: 7px;
}

.detail-section {
  padding-top: 15px;
  border-top: 1px dashed var(--line);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.section-title h2 {
  font-size: 21px;
}

.match-section p {
  font-size: 11.5px;
}

.match-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
}

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

.match-summary span {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}

.match-summary small {
  color: var(--muted-2);
  font-size: 10px;
}

.match-summary .icon {
  margin-left: auto;
  color: var(--muted-2);
  transition: transform 150ms ease;
}

.match-section[open] .match-summary {
  margin-bottom: 8px;
}

.match-section[open] .match-summary .icon {
  transform: rotate(180deg);
}

.bgg-search-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.bgg-search-form .search-field {
  flex: 1;
}

.bgg-result {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elev);
  text-align: left;
}

.bgg-result:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.bgg-score {
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.bgg-result strong {
  display: block;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.2;
}

.bgg-result small {
  color: var(--muted);
  font-size: 10px;
}

.bgg-result > .icon {
  color: var(--muted-2);
}

.aliases {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.alias-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 10.5px;
}

.alias-chip small {
  color: var(--muted-2);
  font-size: 8px;
  text-transform: uppercase;
}

.event-list,
.attempt-list {
  display: grid;
  gap: 5px;
}

.event-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

/* An audit action is a URL such as /api/admin/invites/34/revoke: it has no
   spaces, so without this the row demanded 342px inside a 328px panel and
   widened the whole settings page on a phone. */
.event-row > span:not(.event-dot) {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.event-row small {
  flex: 0 1 auto;
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: var(--muted-2);
  font-size: var(--type-caption-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-2);
}

.event-dot.price_drop { background: var(--terracotta); }
.event-dot.restock { background: var(--success); }
.event-dot.new_listing { background: var(--accent); }
.event-dot.price_rise { background: var(--gold); }

.attempt-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 10.5px;
}

.attempt-row > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.attempt-row strong {
  font-weight: 650;
  text-transform: capitalize;
}

.attempt-row small {
  color: var(--muted-2);
  font-size: var(--type-caption-sm);
}


/* Shelf value history dialog */
.shelf-value-history {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.shelf-value-history:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
}

.shelf-value-history .icon {
  width: 13px;
  height: 13px;
}

.shelf-value-trend {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 10px;
}

.shelf-value-trend-label {
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.shelf-value-spark-wrap {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.shelf-value-spark {
  width: 100%;
  min-width: 0;
  height: 26px;
  color: var(--success);
}

.shelf-value-spark.is-down {
  color: var(--danger);
}

.shelf-value-spark path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.shelf-value-spark .shelf-value-spark-end {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.shelf-value-spark .shelf-value-spark-low {
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
}

.shelf-value-spark-dates {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2px 8px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.shelf-value-spark-low-legend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-soft);
  font-weight: 650;
}

.shelf-value-spark-low-legend i {
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}

.shelf-value-trend strong {
  color: var(--success);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.shelf-value-trend strong.is-down {
  color: var(--danger);
}

@media (max-width: 640px) {
  .shelf-value-history {
    min-height: 44px;
  }

  .shelf-value-trend {
    grid-template-columns: auto auto;
    gap: 6px 8px;
  }

  .shelf-value-trend-label {
    grid-column: 1;
    grid-row: 1;
  }

  .shelf-value-trend strong {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .shelf-value-spark-wrap {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

.shelf-history-modal {
  padding: 22px;
}

.shelf-history-head {
  padding-right: 42px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.shelf-history-head .eyebrow {
  margin-bottom: 2px;
}

.shelf-history-head h2 {
  margin: 0;
  font-size: 28px;
}

.chart-range-switch {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.chart-range-switch .chart-range {
  min-height: 28px;
  padding: 3px 9px;
}

.shelf-history-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px 0 6px;
}

.shelf-history-summary strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}

.shelf-history-summary > span {
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
}

.shelf-history-summary small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.shelf-history-chart-wrap {
  position: relative;
  margin-top: 4px;
}

.shelf-history-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.shelf-history-chart line {
  stroke: var(--line);
  stroke-width: 1;
  opacity: .7;
}

.shelf-history-chart text {
  fill: var(--muted);
  font-size: var(--type-caption-sm);
}

.shelf-history-chart .shelf-history-area {
  fill: color-mix(in srgb, var(--accent) 12%, transparent);
}

.shelf-history-chart .shelf-history-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shelf-history-chart .shelf-history-last {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 2;
}

.shelf-history-chart .shelf-history-dot {
  fill: var(--accent);
  opacity: .5;
}

.shelf-history-chart .shelf-history-hit {
  fill: transparent;
  stroke: transparent;
  cursor: crosshair;
  outline: none;
}

.shelf-history-chart .shelf-history-hit:focus {
  fill: color-mix(in srgb, var(--accent) 8%, transparent);
  stroke: var(--accent);
  stroke-width: 1;
}

.shelf-history-crosshair {
  position: absolute;
  top: 10%;
  bottom: 13%;
  width: 1px;
  background: var(--line-strong);
  pointer-events: none;
}

.shelf-history-tooltip {
  position: absolute;
  z-index: 2;
  max-width: min(240px, 80vw);
  padding: 5px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  color: var(--ink-soft);
  font-size: var(--type-caption-sm);
  line-height: 1.35;
  pointer-events: none;
  transform: translate(-50%, -100%);
}

.shelf-history-tooltip[hidden],
.shelf-history-crosshair[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .shelf-value-history {
    min-height: 44px;
  }

  .shelf-history-modal {
    padding: 16px;
  }

  .shelf-history-head h2 {
    font-size: 24px;
  }

  .shelf-history-summary {
    flex-wrap: wrap;
  }

  .shelf-history-summary strong {
    font-size: 23px;
  }

  .shelf-history-chart {
    margin-top: 8px;
  }
}

.share-card-modal {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.share-card-head .eyebrow {
  margin-bottom: 2px;
}

.share-card-head h2 {
  margin: 0;
  font-size: 28px;
}

.share-card-image {
  display: block;
  width: min(100%, 520px);
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.share-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

@media (max-width: 640px) {
  .share-card-modal {
    padding: 16px;
  }

  .share-card-head h2 {
    font-size: 24px;
  }

  .share-card-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 44px;
  }
}

.command-scopes {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 0 0 8px;
  scrollbar-width: none;
}

.command-scopes::-webkit-scrollbar {
  display: none;
}

.command-scope {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: 650 10px/1 var(--sans);
  cursor: pointer;
}

.command-scope span {
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.command-scope.is-active {
  border-color: var(--accent-deep);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.command-scope.is-active span {
  color: var(--accent-deep);
}

.command-mode-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 8px;
  padding: 7px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent-soft) 42%, transparent);
  color: var(--accent-deep);
  font-size: 10px;
  font-weight: 650;
}

.command-mode-hint .icon {
  width: 12px;
  height: 12px;
}

.listing-provenance {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  letter-spacing: .01em;
}

/* Recap detail modal: exact games behind each shelf-change count. */
.modal:has(.shelf-changes-modal) {
  width: min(560px, calc(100vw - 56px));
}

.shelf-changes-modal {
  padding: 26px;
}

.shelf-changes-modal .eyebrow {
  margin-bottom: 4px;
}

.shelf-changes-modal h2 {
  margin-bottom: 6px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.shelf-changes-summary {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.shelf-change-game-list {
  display: grid;
  gap: 6px;
  max-height: min(58vh, 560px);
  overflow-y: auto;
}

.shelf-change-game {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.shelf-change-game:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.shelf-change-cover {
  display: grid;
  place-items: center;
  width: 42px;
  height: 54px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface-2);
}

.shelf-change-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shelf-change-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.shelf-change-name {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shelf-change-detail {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--type-caption);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shelf-change-game > .icon {
  width: 15px;
  height: 15px;
  color: var(--muted-2);
}

.shelf-changes-modal-empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin: 12px 0;
  padding: 10px;
  color: var(--muted);
  text-align: center;
}

.shelf-changes-modal-empty .empty-art {
  width: 88px;
  height: 62px;
}

.shelf-changes-modal-empty p {
  margin: 0;
}

.shelf-changes-modal-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

@media (max-width: 640px) {
  .modal:has(.shelf-changes-modal) {
    width: calc(100vw - 28px);
  }

  .shelf-changes-modal {
    padding: 18px;
  }

  .shelf-changes-modal h2 {
    font-size: 23px;
  }
}

.detail-jump-count {
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-soft) 48%, transparent);
  color: var(--accent-deep);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1;
}

/* ---------- toasts ---------- */

#toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-lift);
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.4;
  pointer-events: auto;
  animation: toast-in 180ms ease;
}

.toast-icon {
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-top: 1px;
}

.toast-success .toast-icon { color: var(--success); }
.toast-warn .toast-icon { color: var(--gold); }
.toast-error .toast-icon { color: var(--danger); }

.toast-out {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 250ms ease, transform 250ms ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- fatal ---------- */

.fatal-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 100vh;
  padding: 30px;
  text-align: center;
}

.fatal-state h1 {
  font-size: 32px;
}

.fatal-state p {
  max-width: 440px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- short desktop viewports ---------- */

@media (max-height: 919px) and (min-width: 901px) {
  .sidebar { padding: 18px 16px 14px; }
  .brand-tagline { display: none; }
  .nav { margin-top: 18px; gap: 2px; }
  .nav-link { padding: 6px 8px; }
  .sidebar-spacer { min-height: 12px; }
  .sidebar-preferences { padding-top: 8px; }
  .sidebar-extras { padding-top: 5px; }
  .sidebar-action,
  .sidebar-pickers .currency-control,
  .sidebar-pickers .language-control { height: 30px; }
}

@media (max-height: 720px) and (min-width: 901px) {
  .main-inner { padding: 24px 36px 70px; }
  #page-header { margin-bottom: 16px; }
  .page-heading h1 { font-size: clamp(30px, 4vw, 42px); }
  .page-subtitle { margin-top: 6px; font-size: 12.5px; line-height: 1.4; }
  .header-actions { padding-top: 8px; }
  .filter-card,
  .wishlist-toolbar { padding: 10px; gap: 6px; }
  .cover-ribbon { height: 62px; margin-bottom: 12px; }
  .cover-ribbon-card { height: 62px; }
  .cover-ribbon-card:nth-child(even) { height: 56px; }
  .cover-ribbon-card:nth-child(3n) { height: 52px; }
}

/* ---------- responsive ---------- */

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 228px minmax(0, 1fr); }
  .main-inner { padding: 34px 28px 76px; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
}

@media (max-width: 900px) {

  /* Below 900px the 256px sidebar column squeezed the content to 134px and the
     whole page scrolled sideways. One column, sidebar on top. */
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 8px 12px;
    height: auto;
    padding: 11px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--sidebar) 94%, transparent);
    backdrop-filter: blur(12px);
    overflow: visible;
  }

  .brand { grid-column: 1; grid-row: 1; padding: 0; }
  .nav { grid-column: 2; grid-row: 1; }
  .sidebar-preferences {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 2px 0 0;
  }
  .sidebar-preferences summary {
    padding-bottom: 3px;
  }
  .sidebar-extras {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 3px 0 0;
  }
  .sidebar-app {
    flex-direction: row;
    gap: 4px;
    padding: 0;
  }
  .sidebar-pickers {
    flex-direction: row;
    justify-content: flex-end;
    gap: 6px;
    padding: 0;
  }
  .sidebar-pickers .currency-control,
  .sidebar-pickers .language-control {
    width: auto;
  }
  .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
  .brand-word { font-size: 17px; }
  .brand-tagline,
  .sidebar-spacer,
  #sidebar-sync,
  .cover-ribbon { display: none; }

  #sync-banner:not([hidden]) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
  }

  .sync-banner-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
  }

  .sync-banner-copy strong {
    font-size: 12px;
    font-weight: 650;
  }

  .sync-banner-copy span {
    overflow: hidden;
    color: var(--muted);
    font-size: 10.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sync-banner-meter {
    grid-column: 1 / -1;
    height: 3px;
    border-radius: 99px;
    background: var(--surface-2);
    overflow: hidden;
  }

  .sync-banner-meter progress {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: inherit;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
  }

  .sync-banner-meter progress::-webkit-progress-bar {
    background: var(--surface-2);
    border-radius: inherit;
  }

  .sync-banner-meter progress::-webkit-progress-value {
    background: linear-gradient(90deg, var(--accent), var(--gold));
    border-radius: inherit;
  }

  .sync-banner-meter progress::-moz-progress-bar {
    background: linear-gradient(90deg, var(--accent), var(--gold));
    border-radius: inherit;
  }

  .nav {
    flex-direction: row;
    justify-content: center;
    gap: 2px;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar { display: none; }

  .nav-link {
    gap: 6px;
    padding: 7px 9px;
    font-size: 11.5px;
    white-space: nowrap;
  }

  .nav-link .icon { width: 15px; height: 15px; }
  .nav-count { display: none; }

  .theme-button { width: 30px; height: 30px; padding: 3px; justify-content: center; }

  .main-inner { padding: 26px 20px 70px; }
  #page-header { flex-direction: column; gap: 14px; margin-bottom: 20px; }
  .header-actions { justify-content: flex-start; padding-top: 0; }
  .page-heading h1 { font-size: clamp(32px, 7vw, 42px); }
  .first-run { grid-template-columns: auto minmax(0, 1fr); }
  .first-run > .btn { grid-column: 2; justify-self: start; }
  .domain-grid { grid-template-columns: 1fr; }
  .chart-controls { flex-direction: column; }
  .modal-backdrop { padding: 14px; }
  .modal { width: 100%; }
  .modal-head { grid-template-columns: 90px minmax(0, 1fr); padding: 22px 20px 18px; }
  .modal-head-price { grid-column: 1 / -1; padding: 10px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .header-price-full,
  .header-price-facts { display: none; }
  .header-price-compact { display: flex; align-items: center; gap: 6px; min-width: 0; }
  .header-price-label { color: var(--muted); font-size: var(--type-caption); font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
  .header-price-compact strong { color: var(--accent-deep); font-family: var(--serif); font-size: 22px; letter-spacing: -.02em; }
  .header-price-store { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .header-price-open { margin-left: auto; }
  .detail-body { padding: 18px 20px 24px; }
  .modal-close { top: 10px; right: 10px; }
  .detail-heading h1 { padding-right: 28px; }
}

@media (max-width: 640px) {
  .main-inner { padding: 20px 13px 64px; }
  .sidebar { padding: 9px 12px; gap: 8px; grid-template-columns: auto minmax(0, 1fr) auto; }
  .brand-word { display: none; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-mark img { width: 100%; height: 100%; }
  .nav-link { min-width: 44px; min-height: 44px; justify-content: center; padding: 6px 7px; font-size: 10.5px; }
  .nav-link span:not(.nav-count) { display: none; }
  .nav-link .icon { width: 18px; height: 18px; }
  .nav { justify-content: flex-end; }
  .mobile-search-link {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 6px 7px;
    border: 0;
    background: transparent;
  }
  .theme-button { width: 44px; height: 44px; }
  .currency-control,
  .language-control { height: 40px; }
  .currency-control select,
  .language-control select { min-height: 40px; }
  .page-heading h1 { font-size: 32px; }
  .page-subtitle { font-size: 13px; }
  .header-actions .btn { padding: 8px 11px; font-size: 11px; }
  .currency-control,
  .language-control { height: 40px; padding: 0 7px; }
  .currency-control span,
  .language-control span { display: none; }
  .currency-control select,
  .language-control select { font-size: 11px; }
  .sidebar-pickers { gap: 4px; }
  .sidebar-action {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
  }
  .sidebar-action span {
    display: none;
  }
  .game-grid { grid-template-columns: 1fr; gap: 9px; }
  .game-card { grid-template-columns: 66px minmax(0, 1fr); padding: 12px; }
  .cover { width: 66px; height: 66px; border-radius: 11px; }
  .game-title { font-size: 17.5px; }
  .filter-card { padding: 11px; gap: 8px; }
  .search-field { flex-basis: 100%; }
  .filter-field { flex: 1 1 80px; }
  .store-filter-field { flex: 1 1 100%; }
  .store-filter-menu { width: min(320px, calc(100vw - 32px)); }
  .toggle-field { flex: 1 1 auto; justify-content: center; }
  .reset-filters { margin-left: 0; width: 100%; }
  .first-run { grid-template-columns: 1fr; padding: 20px; }
  .first-run-art { width: 56px; height: 56px; border-radius: 16px; }
  .first-run-art .icon { width: 26px; height: 26px; }
  .first-run h2 { font-size: 24px; }
  .first-run > .btn { grid-column: 1; }
  .deal-item { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .deal-cover { width: 56px; height: 75px; }
  .deal-side { flex-direction: column; gap: 2px; }
  .deal-link { display: none; }
  .deal-name { font-size: 16px; }
  .deal-controls { align-items: flex-end; }
  .field-grid { grid-template-columns: 1fr; }
  .settings-card { padding: 17px; }
  .settings-head { flex-direction: column; gap: 6px; }
  .settings-toc { top: 58px; margin-bottom: 12px; }
  .form-save-bar { flex-direction: column; align-items: stretch; }
  .form-save-bar .btn { width: 100%; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { max-height: 100vh; height: 100vh; border-radius: 0; border: 0; }
  .modal-scroll { max-height: 100vh; padding-bottom: env(safe-area-inset-bottom); }
  .modal-head { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding: 20px 16px 18px; }
  .modal-head-price { padding-top: 8px; }
  .modal-head-price .best-total-offer { padding: 10px 32px 10px 15px; }
  .header-price-facts { font-size: var(--type-caption-sm); }
  .detail-body { padding: 16px 16px 28px; }
  .detail-heading h1 { font-size: 27px; padding-right: 20px; }
  .detail-actions .btn { font-size: 11px; padding: 8px 11px; }
  .detail-price { font-size: 24px; }
  .settings-actions .btn { flex: 1 1 auto; }
}

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


@media (max-width: 520px) {
  .toast {
    flex-wrap: wrap;
  }
  .toast-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Peer-to-peer sale and trade board. The app introduces people; it is not an
   escrow, payment processor or arbitrator. */

.trade-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

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

.trade-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -.025em;
}

.trade-head .icon-btn {
  flex: 0 0 auto;
}

.trade-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  padding: 9px 11px;
  border: 1px dashed color-mix(in srgb, var(--gold) 42%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--gold-soft) 52%, transparent);
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.4;
}

.trade-disclaimer .icon {
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  margin-top: 1px;
  color: var(--gold);
}

.trade-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 2px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  align-self: stretch;
}

.trade-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 4px 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard);
}

.trade-tab b {
  color: inherit;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  opacity: .7;
}

.trade-tab:hover {
  border-bottom-color: var(--line-strong);
  color: var(--ink);
}

.trade-tab.is-active {
  border-bottom-color: var(--accent);
  color: var(--accent-deep);
}

.trade-body {
  min-width: 0;
}

.trade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 10px;
}

.trade-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition: transform var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard), background var(--motion-fast) var(--ease-standard);
}

.trade-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.trade-card.is-wanted {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 30%, var(--surface));
}

.trade-grid.is-gallery {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.trade-card.is-gallery {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 10px;
}

.trade-card.is-gallery .trade-cover-wrap {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
}

.trade-card.is-gallery .trade-cover {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

.trade-card.is-gallery .cover-art-mark {
  font-size: 42px;
}

.trade-card.is-gallery .cover-art-title {
  font-size: 10px;
}

.trade-card.is-gallery .trade-cover-safety {
  top: 7px;
  right: 7px;
  width: 28px;
  height: 28px;
}

.trade-card.is-gallery .trade-card-title h3 {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.trade-card.is-gallery .trade-card-actions {
  grid-column: 1;
  width: 100%;
  max-width: none;
}

.trade-card.is-gallery .trade-card-actions .btn {
  width: 100%;
  justify-content: center;
}

.trade-cover {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border-radius: 10px;
}

.trade-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trade-card-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.trade-card-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.trade-card-title h3 {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.015em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-card-by,
.trade-card-meta,
.trade-card-note {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-card-meta strong {
  color: var(--ink);
  font-weight: 700;
}

.trade-card-note {
  color: var(--ink-soft);
}

.trade-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  max-width: 170px;
}

.trade-card-actions .btn {
  margin: 0;
}

.trade-danger {
  color: var(--danger);
}

.trade-empty,
.trade-loading {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 24px 12px;
  color: var(--muted);
  text-align: center;
}

.trade-empty .empty-art {
  width: 92px;
  height: 64px;
  margin: 0 auto 2px;
}

.trade-empty p,
.trade-loading p {
  max-width: 46ch;
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
}

.trade-requests {
  display: grid;
  gap: 14px;
}

.trade-request-group {
  display: grid;
  gap: 7px;
}

.trade-request-group > .eyebrow {
  margin: 0;
}

.trade-request {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.trade-request.is-accepted {
  border-color: color-mix(in srgb, var(--success) 36%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 26%, var(--surface));
}

.trade-request-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.trade-request-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.trade-request-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.trade-request-top strong {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-request-copy p,
.trade-request-copy small {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.trade-request-message {
  color: var(--ink-soft) !important;
  font-style: italic;
}

.trade-status {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.trade-status.is-accepted {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.trade-status.is-expired,
.trade-status.is-declined {
  color: var(--muted-2);
}

/* Modals */

.modal:has(.trade-modal) {
  width: min(820px, calc(100vw - 48px));
}

.trade-modal {
  padding: 26px 28px 24px;
}

.trade-modal h1,
.trade-chat-modal h1 {
  margin: 4px 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -.03em;
}

.trade-modal-sub {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
}

.trade-form {
  display: grid;
  gap: var(--space-3);
}

.trade-listing-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-4);
}

.trade-listing-form > .filter-field:nth-of-type(5),
.trade-listing-form > .trade-logistics-fields,
.trade-listing-form > .trade-form-note,
.trade-listing-form > .confirm-dialog-actions {
  grid-column: 1 / -1;
}

.trade-listing-form .filter-field input,
.trade-listing-form .filter-field select {
  height: 40px;
  font-size: 13px;
}

.trade-listing-form .filter-field textarea {
  min-height: 88px;
}

.trade-listing-form .trade-logistics-fields .toggle-field {
  justify-self: start;
  min-width: 170px;
  background: var(--surface);
}

.trade-listing-form .confirm-dialog-actions {
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}

@media (max-width: 640px) {
  .modal:has(.trade-modal) {
    width: 100%;
  }

  .trade-modal {
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  }

  .trade-listing-form {
    grid-template-columns: 1fr;
  }

  .trade-listing-form > .filter-field:nth-of-type(5),
  .trade-listing-form > .trade-logistics-fields,
  .trade-listing-form > .trade-form-note,
  .trade-listing-form > .confirm-dialog-actions {
    grid-column: 1;
  }

  .trade-listing-form .trade-logistics-fields .toggle-field {
    min-width: 0;
    width: 100%;
  }
}

.trade-form .filter-field textarea {
  min-height: 72px;
  resize: vertical;
}

.trade-form-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.trade-form-note .icon {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  margin-top: 1px;
  color: var(--gold);
}

.trade-form .confirm-dialog-actions {
  margin-top: 4px;
}

.trade-chat-modal {
  display: grid;
  gap: 10px;
}

.trade-chat-messages {
  display: grid;
  gap: 8px;
  max-height: 44vh;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 44%, transparent);
}

.trade-message {
  display: grid;
  gap: 2px;
  max-width: 82%;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px 10px 10px 3px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.4;
}

.trade-message.is-mine {
  justify-self: end;
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 10px 10px 3px 10px;
  background: color-mix(in srgb, var(--accent-soft) 58%, var(--surface));
}

.trade-message strong {
  color: var(--ink);
  font-size: 9.5px;
  letter-spacing: .03em;
}

.trade-message small {
  color: var(--muted);
  font-size: 9px;
}

.trade-chat-empty {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.trade-chat-decision {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.trade-chat-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trade-chat-compose-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.trade-chat-compose-row .filter-field {
  flex: 1;
  min-width: 0;
}

.trade-chat-form textarea {
  min-height: 44px;
  resize: vertical;
}

/* Game detail offers */

.detail-trade-offers {
  display: grid;
  gap: 9px;
  margin: 0 18px 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 38%, transparent);
}

.detail-trade-offers .trade-grid {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

@media (max-width: 640px) {
  .trade-panel {
    padding: 14px;
  }

  .trade-head h2 {
    font-size: 21px;
  }

  .trade-grid {
    grid-template-columns: 1fr;
  }

  .trade-card,
  .trade-request {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .trade-cover {
    width: 60px;
    height: 60px;
  }

  .trade-card-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
    max-width: none;
  }

  .trade-card-actions .btn {
    flex: 1;
  }

  .trade-request-mark {
    width: 30px;
    height: 30px;
  }

  .trade-request .trade-card-actions {
    grid-column: 1 / -1;
  }

  .detail-trade-offers {
    margin: 0 12px 12px;
  }

  .trade-chat-compose-row {
    flex-wrap: wrap;
  }

  .trade-chat-compose-row .filter-field {
    flex: 1 0 100%;
  }

  .trade-chat-compose-row .btn {
    margin-left: auto;
  }
}

.trade-stats {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 10.5px;
}

.trade-stats .icon {
  width: 12px;
  height: 12px;
  color: var(--success);
}

.trade-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 9px;
}

.trade-card-logistics:empty {
  display: none;
}

.trade-card-logistics {
  color: var(--muted);
  font-size: 9.5px;
}

.trade-unread {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--surface);
  font-size: 9px;
  font-weight: 750;
}

.trade-request.has-unread {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
}

.trade-block {
  display: grid;
  flex: 0 0 26px;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.trade-block:hover {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink-soft);
}

.trade-block .icon {
  width: 12px;
  height: 12px;
}

.trade-chat-lifecycle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}

.trade-safety-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 9.5px;
  text-decoration: underline dotted;
  cursor: pointer;
}

.trade-safety-link:hover {
  color: var(--danger);
}

.trade-chat-result {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent-soft) 52%, transparent);
  color: var(--accent-deep);
  font-size: 10.5px;
  font-weight: 650;
}

.trade-chat-result.is-cancelled {
  background: var(--surface-2);
  color: var(--muted);
}

.trade-completion-actions {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.trade-completion-actions .btn {
  justify-content: flex-start;
}

.trade-logistics-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.trade-logistics-fields .trade-region {
  grid-column: 1 / -1;
}

.trade-notifications-modal {
  display: grid;
  gap: 10px;
}

.header-trade-bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.header-trade-bell:hover,
.header-trade-bell.has-unread {
  border-color: var(--line);
  background: var(--surface);
  color: var(--accent-deep);
}

.header-trade-bell .icon {
  width: 16px;
  height: 16px;
}

.header-trade-count {
  position: absolute;
  top: 1px;
  right: 0;
  display: grid;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  place-items: center;
  border-radius: 999px;
  background: var(--terracotta);
  color: #fffaf0;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
}

@media (max-width: 640px) {
  .trade-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .trade-filters::-webkit-scrollbar {
    display: none;
  }

  .trade-logistics-fields {
    grid-template-columns: 1fr;
  }

  .trade-logistics-fields .trade-region {
    grid-column: auto;
  }

  .header-trade-bell {
    width: 30px;
    height: 30px;
  }
}

.trade-market-controls {
  display: grid;
  gap: 7px;
  margin-bottom: 9px;
}

.trade-search {
  min-height: 38px;
}

.trade-card-rep {
  margin: 0;
  color: var(--muted);
  font-size: 9.5px;
}

.trade-confirmation-state {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
}

.trade-confirmation-state .icon {
  width: 12px;
  height: 12px;
}

.trade-confirmation-state.is-ready {
  color: var(--accent-deep);
  font-weight: 650;
}

.trade-history-count {
  color: var(--muted);
}

.trade-rating {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.trade-card-expiry {
  margin: 0;
  color: var(--muted);
  font-size: 9.5px;
}

.trade-load-more {
  display: flex;
  justify-content: center;
  padding: 10px 0 2px;
}

.trade-chat-reviews {
  display: grid;
  gap: 6px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.trade-review-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
}

.trade-review-line span {
  color: var(--fg);
}

.trade-review-rating,
.trade-review-tags {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.trade-review-rating legend,
.trade-review-tags legend {
  padding: 0 0 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.trade-review-rating label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.trade-review-rating input {
  accent-color: var(--gold);
}

.trade-review-rating span {
  color: var(--gold);
  letter-spacing: 1px;
}

.person-trade-reviews {
  display: grid;
  gap: 7px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.person-trade-review {
  display: grid;
  gap: 3px;
  font-size: 11px;
}

.person-trade-review > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: baseline;
}

.person-review-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
}

.person-review-tags span {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9.5px;
}

.person-trade-review > p {
  margin: 0;
  color: var(--muted);
}

.trade-message-image {
  display: block;
  max-width: min(240px, 100%);
  margin: 5px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.trade-message-image img {
  display: block;
  width: 100%;
  height: auto;
}

.trade-chat-photo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  cursor: pointer;
}

.trade-chat-photo input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.trade-chat-photo .icon {
  width: 16px;
  height: 16px;
}

.trade-chat-older {
  align-self: flex-start;
  margin-bottom: 6px;
}

.trade-saved-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.trade-saved-search {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}

.trade-saved-search button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}

.trade-saved-search button:last-child {
  padding-left: 2px;
}

.trade-saved-search .icon {
  width: 11px;
  height: 11px;
}

.trade-suspension-banner {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--error) 30%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--error) 7%, var(--surface));
}

.trade-suspension-banner > .icon {
  width: 18px;
  height: 18px;
  color: var(--error);
}

.trade-suspension-banner p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 11px;
}

.trade-suspension-banner small {
  color: var(--muted);
  font-size: 10px;
}

.trade-notifications-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.trade-advanced-filters summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.trade-advanced-filters .icon {
  width: 12px;
  height: 12px;
}

.trade-advanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 7px;
  padding-top: 7px;
}

.trade-advanced-grid input,
.trade-advanced-grid select {
  min-height: 32px;
}

.trade-admin-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.trade-admin-metrics > div {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.trade-admin-metrics small {
  color: var(--muted);
  font-size: 9px;
}

.trade-admin-metrics strong {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.trade-admin-priority {
  color: var(--warning);
}

.trade-admin-overdue {
  color: var(--error);
}

.person-review-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 5px;
}

.person-review-breakdown span {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9.5px;
}

.person-review-breakdown b {
  color: var(--fg);
}

.person-review-reply,
.trade-review-reply {
  color: var(--muted);
  font-size: 10px;
}

.person-review-reply strong,
.trade-review-reply strong {
  color: var(--fg);
}

/* Market card hierarchy */
.trade-card-price {
  margin: 1px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.trade-card-price strong {
  font-weight: 650;
}

.trade-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  min-width: 0;
  margin-top: 1px;
}

.trade-chip {
  max-width: 100%;
  overflow: hidden;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Compact saved-search alert rows */
.trade-search-alert {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.trade-search-alert .trade-cover {
  width: 44px;
  height: 44px;
  border-radius: 7px;
}

.trade-search-alert-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.trade-search-alert-copy small,
.trade-search-alert-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-search-alert-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Chat photo lightbox */
.trade-message-image {
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  cursor: zoom-in;
  font: inherit;
  text-align: left;
}

.trade-chat-empty.is-archived {
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
}

.trade-chat-empty.is-archived .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.trade-lightbox {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.trade-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 12, .84);
  backdrop-filter: blur(5px);
}

.trade-lightbox-figure {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  max-width: min(960px, 94vw);
  max-height: 94vh;
  margin: 0;
}

.trade-lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 24px 70px -28px rgba(0, 0, 0, .8);
}

.trade-lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  background: rgba(20, 16, 12, .82);
  color: #fff8ed;
  cursor: pointer;
}

.trade-lightbox figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #f5eadb;
  font-size: 11px;
}

.trade-lightbox figcaption > span {
  margin-right: auto;
}

.trade-lightbox figcaption a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  color: #fff8ed;
  text-decoration: underline dotted;
}

.trade-lightbox figcaption .icon {
  width: 14px;
  height: 14px;
}

body.photo-open {
  overflow: hidden;
}

.trade-empty .btn {
  margin-top: 6px;
}

.trade-empty-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin-top: 2px;
}

.trade-empty-links button,
.trade-empty-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px;
  border: 0;
  background: transparent;
  color: var(--accent-deep);
  font: inherit;
  font-size: var(--type-caption-sm);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.trade-empty-links .icon {
  width: 12px;
  height: 12px;
}

@media (max-width: 640px) {
  .trade-empty {
    gap: 6px;
    padding: 14px 8px;
  }

  .trade-empty .empty-art {
    width: 62px;
    height: 44px;
  }

  .trade-empty p {
    font-size: 11px;
  }

  .trade-grid.is-gallery {
    grid-template-columns: 1fr;
  }
}

/* Safety controls need a comfortable touch target. */
.trade-safety-link {
  font-size: 10.5px;
  padding: 3px 2px;
}

.trade-block {
  flex-basis: 32px;
  width: 32px;
  height: 32px;
}

.trade-block .icon {
  width: 14px;
  height: 14px;
}

[data-theme="dark"] .trade-card-by,
[data-theme="dark"] .trade-card-rep,
[data-theme="dark"] .trade-card-chips .trade-chip,
[data-theme="dark"] .trade-search-alert-copy small,
[data-theme="dark"] .trade-search-alert-copy span {
  color: var(--muted);
}

.trade-head-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.trade-publish-cta {
  width: 100%;
  margin: 8px 0 10px;
}

.trade-cover-wrap {
  position: relative;
  width: 76px;
  height: 76px;
}

.trade-card-safety {
  position: absolute;
  top: -5px;
  right: -5px;
  z-index: 4;
}

.trade-card-safety > summary {
  list-style: none;
  cursor: pointer;
}

.trade-card-safety > summary::-webkit-details-marker {
  display: none;
}

.trade-cover-safety {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--line-strong) 70%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--muted);
  box-shadow: 0 3px 10px -5px rgba(0, 0, 0, .45);
  backdrop-filter: blur(4px);
}

.trade-cover-safety .icon {
  width: 13px;
  height: 13px;
}

.trade-cover-safety:hover,
.trade-card-safety[open] .trade-cover-safety {
  color: var(--ink);
  background: var(--surface);
}

.trade-card-safety-panel {
  position: absolute;
  top: 0;
  left: calc(100% + 6px);
  z-index: 30;
  min-width: 176px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.trade-card-safety-action {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 44px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--danger);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.trade-card-safety-action:hover {
  background: var(--danger-soft);
}

.trade-mobile-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.trade-filter-open b {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 9px;
}

.trade-filter-sheet {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.trade-filter-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: color-mix(in srgb, #221b13 62%, transparent);
  backdrop-filter: blur(4px);
}

.trade-filter-sheet-panel {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(560px, 100%);
  max-height: min(86dvh, 760px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 18px 18px 0 0;
  background: var(--surface);
  box-shadow: 0 -24px 70px -30px rgba(0, 0, 0, .55);
  animation: trade-sheet-in var(--motion-base) var(--ease-standard);
}

@keyframes trade-sheet-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.trade-filter-sheet-handle {
  display: block;
  width: 38px;
  height: 4px;
  margin: -4px auto 8px;
  border-radius: 999px;
  background: var(--line-strong);
}

.trade-filter-active {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.trade-filter-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font: inherit;
  font-size: 9.5px;
  font-weight: 600;
  cursor: pointer;
}

.trade-filter-active-chip .icon {
  width: 12px;
  height: 12px;
}

.trade-filter-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.trade-filter-sheet-head strong {
  font-family: var(--serif);
  font-size: 20px;
}

.trade-filter-sheet-body {
  display: grid;
  gap: 8px;
}

.trade-filter-sheet-body .eyebrow {
  margin: 4px 0 0;
}

.trade-filter-sheet-body .trade-filters {
  margin: 0;
}

.trade-filter-sheet-actions {
  position: sticky;
  bottom: -14px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin: 12px -14px -14px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.trade-notifications-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 4px;
  margin: 8px 0;
  padding: 6px 0;
  background: var(--surface);
}

.trade-notifications-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 0 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10.5px;
  font-weight: 650;
  cursor: pointer;
  transition: color var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard);
}

.trade-notifications-tab b {
  color: inherit;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.trade-notifications-tab.is-active {
  border-bottom-color: var(--accent);
  color: var(--accent-deep);
}

.trade-notifications-empty {
  margin: 0;
  padding: 18px 10px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.trade-chat-photo-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.trade-chat-photo-preview[hidden] {
  display: none;
}

.trade-chat-photo-preview img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
}

.trade-chat-photo-preview .trade-safety-link {
  min-height: 32px;
}

.trade-loading .trade-skeleton-grid {
  width: 100%;
}

.trade-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 10px;
}

.trade-skeleton-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 90px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.trade-skeleton-cover,
.trade-skeleton-lines i,
.trade-skeleton-button,
.trade-notification-skeleton-row span,
.trade-notification-skeleton-row i,
.trade-notification-skeleton-row b,
.trade-notifications-skeleton .trade-notifications-tabs span {
  display: block;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--surface-2) 0%, color-mix(in srgb, var(--surface-2) 55%, var(--line)) 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: trade-shimmer var(--motion-shimmer) ease-in-out infinite;
}

.trade-skeleton-cover {
  width: 76px;
  height: 76px;
}

.trade-skeleton-lines {
  display: grid;
  gap: 6px;
}

.trade-skeleton-lines i {
  height: 8px;
}

.trade-skeleton-lines i:nth-child(2) {
  width: 64%;
}

.trade-skeleton-lines i:nth-child(3) {
  width: 46%;
  height: 14px;
}

.trade-skeleton-lines i:nth-child(4) {
  width: 62%;
  height: 10px;
}

.trade-skeleton-button {
  height: 28px;
}

.trade-notification-skeleton-list {
  display: grid;
  gap: 7px;
}

.trade-notification-skeleton-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 70px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.trade-notification-skeleton-row span {
  width: 44px;
  height: 44px;
}

.trade-notification-skeleton-row i {
  height: 10px;
}

.trade-notification-skeleton-row b {
  height: 26px;
}

.trade-notifications-skeleton .trade-notifications-tabs span {
  width: 88px;
  height: 32px;
  border-radius: 999px;
}

@keyframes trade-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

:where(.trade-card-safety > summary, .trade-filter-open, .trade-notifications-tab, .trade-lightbox-close, .trade-lightbox a, .person-safety-toggle, .backup-details > summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .trade-head {
    flex-wrap: wrap;
  }

  .trade-head-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .trade-safety-link {
    min-height: 44px;
    align-items: center;
    font-size: 11px;
  }

  .trade-block {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }

  .trade-cover-wrap {
    width: 60px;
    height: 60px;
  }

  .trade-lightbox {
    padding: 12px;
  }

  .trade-lightbox-figure img {
    max-height: 70vh;
  }

  .trade-lightbox-close {
    top: 4px;
    right: 4px;
  }

  .trade-search-alert {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .trade-search-alert .btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .trade-search-alert .trade-cover {
    width: 40px;
    height: 40px;
  }

  .trade-skeleton-grid {
    grid-template-columns: 1fr;
  }

  .trade-skeleton-card {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .trade-skeleton-cover {
    width: 60px;
    height: 60px;
  }

  .trade-skeleton-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trade-filter-sheet-panel {
    animation: none;
  }

  .trade-skeleton-cover,
  .trade-skeleton-lines i,
  .trade-skeleton-button,
  .trade-notification-skeleton-row span,
  .trade-notification-skeleton-row i,
  .trade-notification-skeleton-row b,
  .trade-notifications-skeleton .trade-notifications-tabs span {
    animation: none;
  }
}

/* Reciprocal matches and fair mode */
.tag-match {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: color-mix(in srgb, var(--accent-soft) 72%, var(--surface));
  color: var(--accent-deep);
}

.tag-match .icon {
  width: 11px;
  height: 11px;
}

.trade-card.is-match {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.trade-offer-picker {
  display: grid;
  gap: 8px;
}

.trade-offer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.trade-offer-row .icon-btn {
  margin-bottom: 2px;
}

.trade-offer-picker-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.trade-offer-picker-actions small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.trade-fair-modal {
  max-width: 480px;
}

.trade-fair-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trade-fair-progress {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.trade-fair-card {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.trade-fair-card.is-match {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
}

.trade-fair-cover {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-2);
}

.trade-fair-cover .trade-cover {
  display: block;
  width: 100%;
  height: 100%;
}

.trade-fair-copy {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
}

.trade-fair-copy h1 {
  font-size: clamp(1.25rem, 5vw, 1.65rem);
  line-height: 1.08;
}

.trade-fair-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.trade-fair-actions .btn {
  justify-content: center;
}

.trade-fair-match-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--accent-deep);
  font-size: var(--type-caption-sm);
  font-weight: 700;
}

.trade-fair-match-note .icon {
  width: 13px;
  height: 13px;
}

@media (max-width: 640px) {
  .trade-fair-modal .trade-fair-cover {
    aspect-ratio: 1 / 1;
  }

  .trade-fair-actions {
    grid-template-columns: 1fr 1fr;
  }

  .trade-fair-actions .btn-primary {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

/* Counterproposal */
.trade-counter-box {
  display: grid;
  gap: 6px;
  margin: 8px 0 2px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--gold) 26%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--gold-soft) 34%, transparent);
}

.trade-counter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.trade-counter-top strong {
  font-size: 11px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.trade-counter-box p {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.trade-counter-box > small {
  color: var(--muted);
  font-size: 10.5px;
}

.trade-counter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 3px;
}

.trade-counter-games {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
}

.trade-counter-games legend {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.trade-counter-cash {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 10px;
}

.trade-agreement {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.trade-agreement-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.trade-agreement-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.trade-agreement-items .is-done {
  color: var(--success);
}

.trade-agreement-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.trade-agreement-terms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px 14px;
  margin: 0;
  padding: 8px 10px;
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--surface) 70%, var(--bg));
}

.trade-agreement-terms div {
  display: grid;
  gap: 2px;
}

.trade-agreement-terms dt {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.trade-agreement-terms dd {
  margin: 0;
  font-size: var(--type-caption);
}

.trade-timeline {
  display: grid;
  gap: 2px;
  margin: 8px 0;
  padding: 10px 12px;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.trade-timeline li {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 5px 0 5px 2px;
}

.trade-timeline li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 20px;
  bottom: -5px;
  width: 1px;
  background: var(--border);
}

.trade-timeline-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.trade-timeline li div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.trade-timeline strong {
  font-size: var(--type-caption);
}

.trade-timeline span,
.trade-timeline small,
.trade-timeline time {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.trade-timeline time {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .trade-counter-cash {
    grid-template-columns: 1fr;
  }
}

/* ---------- account gate ---------- */

/* Two columns from 960px: the left one answers "what is this", the right one
   lets a returning account in without scrolling past the answer. */
.auth-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
  align-items: center;
  gap: 48px;
  width: min(1060px, 100%);
}

.auth-pitch {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 480px;
}

.auth-pitch .auth-brand {
  align-self: flex-start;
}

.auth-pitch-title {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.auth-pitch-lead {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

.auth-pitch-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.auth-pitch-list li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.auth-pitch-list .icon {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--accent);
}

.auth-pitch-list b {
  color: var(--ink);
  font-weight: 650;
}

.auth-pitch-covers {
  display: flex;
  gap: 0;
  padding: 4px 0 0 10px;
  margin-top: 10px;
}

.auth-pitch-covers img {
  width: 70px;
  height: 90px;
  margin-left: -10px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .42);
  transform-origin: center bottom;
}

.auth-pitch-covers img:first-child {
  margin-left: 0;
  transform: rotate(-4deg);
}

.auth-pitch-covers img:nth-child(2) {
  transform: translateY(3px) rotate(-2deg);
}

.auth-pitch-covers img:nth-child(3) {
  transform: translateY(-2px) rotate(1deg);
}

.auth-pitch-covers img:nth-child(4) {
  transform: translateY(4px) rotate(-1deg);
}

.auth-pitch-covers img:nth-child(5) {
  transform: translateY(1px) rotate(2deg);
}

.auth-pitch-covers img:nth-child(6) {
  transform: rotate(4deg);
}

@media (max-width: 959px) {
  .auth-main {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 22px;
  }

  .auth-pitch {
    max-width: 470px;
    text-align: center;
    align-items: center;
  }

  .auth-pitch-title {
    font-size: 27px;
  }

  .auth-pitch-list,
  .auth-pitch-covers {
    display: none;
  }
}

.auth-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 18px;
  overflow: hidden;
  padding: 32px 16px;
  background:
    radial-gradient(circle at 18% 12%, color-mix(in srgb, var(--accent-soft) 55%, transparent), transparent 42%),
    radial-gradient(circle at 82% 88%, color-mix(in srgb, var(--gold-soft) 60%, transparent), transparent 40%),
    var(--bg);
}

.auth-shell > * {
  position: relative;
  z-index: 1;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.auth-brand .brand-mark-detail {
  width: 56px;
  height: 56px;
  border-radius: 16px;
}

@media (max-width: 900px) {
  .auth-brand .brand-mark-detail { width: 48px; height: 48px; border-radius: 14px; }
}

@media (max-width: 640px) {
  .auth-brand .brand-mark-detail { width: 44px; height: 44px; border-radius: 13px; }
}

.auth-card {
  width: min(470px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow-lift);
}

.auth-card h1 {
  font-size: 39px;
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.auth-subtitle {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  margin: 18px 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.auth-tabs button {
  flex: 1;
  padding: 8px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
}

.auth-tabs button.active {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 4px 12px -9px rgba(44, 40, 35, 0.55);
}

.pwa-ok {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 14%, transparent);
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
}

.passkey-help {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.passkey-help[open] {
  /* The answer opens past the box bottom; the extra bottom padding keeps the
     last line inside it instead of hanging into the gap below. */
  padding: 10px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 62%, transparent);
}

/* One line under the recovery link: where the passkey lives and what to save.
   Three separate notes cost 109px of a 409px card and said the same thing. */
.auth-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 3px 5px;
  max-width: 290px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
  text-align: center;
}

.auth-footnote > span {
  flex: 1 1 0;
  min-width: 0;
}

.auth-footnote .icon {
  flex: none;
  width: 12px;
  height: 12px;
}

.auth-footnote strong {
  color: var(--ink-soft);
  font-weight: 600;
}

/* A closed <details>: the question is the summary, the answer opens under it. */
.passkey-help summary {
  padding: 5px 2px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.passkey-help summary::after {
  content: " +";
  color: var(--muted);
  font-family: var(--sans);
}

.passkey-help[open] summary::after {
  content: " \2212";
}

.passkey-help p {
  margin: 6px 0 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.auth-form .field input {
  padding: 11px 12px;
  font-size: 13px;
}

.auth-form .field small {
  line-height: 1.45;
}

.auth-submit {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
}

.auth-submit:disabled {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: none;
  opacity: 1;
  cursor: not-allowed;
}

.auth-error,
.auth-warning {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 14px;
  padding: 10px 11px;
  border-radius: 12px;
  font-size: 10.5px;
  line-height: 1.45;
}

.auth-warning {
  border: 1px solid color-mix(in srgb, var(--gold) 30%, var(--line));
  background: color-mix(in srgb, var(--gold-soft) 68%, var(--surface));
  color: var(--ink-soft);
}

.auth-warning > .icon {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: var(--gold);
}

.auth-warning strong,
.auth-warning span {
  display: block;
}

.auth-warning strong {
  margin-bottom: 1px;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
}

.auth-warning-compact {
  display: block;
  padding: 0;
}

.auth-warning-compact summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 11px;
  list-style: none;
  cursor: pointer;
}

.auth-warning-compact summary::-webkit-details-marker {
  display: none;
}

.auth-warning-compact summary > .icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--gold);
}

.auth-warning-compact summary > .icon:last-child {
  margin-left: auto;
  color: var(--muted);
  transition: transform 160ms ease;
}

.auth-warning-compact[open] summary > .icon:last-child {
  transform: rotate(180deg);
}

.auth-warning-compact p {
  margin: 0;
  padding: 0 11px 10px 34px;
  color: var(--ink-soft);
}

.auth-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.auth-first {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 11px;
  line-height: 1.45;
}

.auth-note,
.auth-foot {
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.55;
}

.auth-note strong {
  color: var(--muted);
  font-weight: 650;
}

/* Losing the device loses the passkey; this is the one warning worth reading
   before the account exists, so it reads as a caution, not a footnote. */
.auth-foot {
  margin-top: 0;
  text-align: center;
}

.billing-shell {
  min-height: 100vh;
  padding: 24px clamp(16px, 4vw, 54px) 44px;
  background:
    radial-gradient(circle at 8% 8%, color-mix(in srgb, var(--accent-soft) 58%, transparent), transparent 34%),
    radial-gradient(circle at 94% 88%, color-mix(in srgb, var(--gold-soft) 52%, transparent), transparent 36%),
    var(--bg);
}

.billing-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto 30px;
}

.billing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.billing-brand .brand-mark-detail {
  width: 46px;
  height: 46px;
  border-radius: 13px;
}

.billing-top-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
}

.billing-top-note .icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.billing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  align-items: start;
  gap: clamp(26px, 5vw, 76px);
  max-width: 1180px;
  margin: 0 auto;
}

.billing-pitch {
  padding-top: 24px;
}

.billing-mobile-overview {
  display: none;
}

.billing-pitch h1 {
  max-width: 11ch;
  margin-top: 8px;
  font-size: clamp(44px, 5.4vw, 74px);
  line-height: .96;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.billing-lede {
  max-width: 47ch;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.billing-perks {
  display: grid;
  gap: 12px;
  max-width: 430px;
  margin: 24px 0 22px;
  padding: 0;
  list-style: none;
}

.billing-perks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.billing-perks li > div {
  display: grid;
  gap: 1px;
  padding-top: 1px;
}

.billing-perks strong {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.billing-perks small {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.billing-perk-icon {
  display: grid;
  flex: 0 0 31px;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.billing-perk-icon .icon {
  width: 15px;
  height: 15px;
}

.billing-plan-card {
  max-width: 370px;
  padding: 15px 17px;
  border: 1px solid color-mix(in srgb, var(--accent) 23%, var(--line));
  border-radius: 17px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 76%, transparent), color-mix(in srgb, var(--accent-soft) 38%, var(--surface)));
  box-shadow: var(--shadow-soft);
}

.billing-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.billing-plan-status {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: .02em;
  text-transform: none;
}

.billing-plan-status.is-pending { background: var(--gold-soft); color: var(--gold); }
.billing-plan-status.is-active { background: var(--accent-soft); color: var(--accent-deep); }

.billing-plan-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 6px;
}

.billing-plan-price strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.billing-plan-price small {
  color: var(--muted);
  font-size: 10.5px;
}

.billing-plan-card p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.billing-form-step[hidden] {
  display: none;
}

.billing-form-step[data-billing-step-pane="details"]:not([hidden]) {
  display: grid;
  gap: 12px;
}

.billing-review-step {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--accent-soft) 28%, var(--surface));
}

.billing-review-step-head {
  display: grid;
  gap: 2px;
}

.billing-review-step-head h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 25px;
  letter-spacing: -.03em;
}

.billing-review-step-head > span {
  color: var(--muted);
  font-size: 11px;
}

.billing-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.billing-review-actions .btn-primary {
  flex: 1 1 210px;
}

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

.billing-form[data-billing-step="review"] .billing-mobile-bar {
  display: none;
}

.billing-review-trigger {
  width: 100%;
  margin-top: 10px;
}

.billing-review-note {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.billing-trust {
  display: grid;
  gap: 8px;
  max-width: 370px;
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--surface) 68%, transparent);
}

.billing-trust .eyebrow {
  margin: 0 0 2px;
}

.billing-trust-step {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.billing-trust-step > b {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 10px;
}

.billing-trust-step > span {
  display: grid;
  gap: 1px;
}

.billing-trust-step strong {
  color: var(--ink-soft);
  font-size: 11px;
}

.billing-trust-step small {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
}

.billing-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.billing-trust-badge .icon {
  width: 14px;
  height: 14px;
  color: var(--success);
}

.billing-checkout {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-lift);
}

.billing-checkout-head h2 {
  margin-top: 3px;
  font-size: clamp(27px, 2.8vw, 35px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.billing-checkout-head > p:last-child {
  max-width: 48ch;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.billing-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 18px 0 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface-2) 52%, transparent);
  list-style: none;
}

.billing-step {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 7px;
  border-radius: 9px;
  color: var(--muted);
}

.billing-step > span {
  display: grid;
  flex: 0 0 19px;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.billing-step > span .icon {
  width: 12px;
  height: 12px;
}

.billing-step strong {
  overflow: hidden;
  font-size: var(--type-caption-sm);
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.billing-step.is-current {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 4%, transparent);
}

.billing-step.is-current > span {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.billing-step.is-done {
  color: var(--accent-deep);
}

.billing-step.is-done > span {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.billing-form {
  gap: 15px;
}

.billing-fieldset {
  min-width: 0;
  margin: 0;
  padding: 10px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 42%, var(--surface));
}

.billing-fieldset legend {
  padding: 0 4px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.billing-fieldset legend + .field-grid {
  margin-top: 4px;
}

.billing-form .field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.billing-form .field > span {
  font-size: var(--type-caption-sm);
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.billing-form .field input {
  padding: 9px 10px;
  font-size: 12px;
}

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

.billing-payment .auth-submit {
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
}

.billing-payment-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid color-mix(in srgb, var(--gold) 24%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--gold-soft) 48%, var(--surface));
  color: var(--ink-soft);
}

.billing-payment-note > .icon {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--gold);
}

.billing-payment-note strong {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
}

.billing-payment-note p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}

.billing-pix-grid {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 35%, transparent);
}

.billing-pix-qr {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 9px;
  border-radius: 11px;
  background: #fff;
}

.billing-pix-qr img {
  display: block;
  width: 148px;
  height: 148px;
}

.billing-pix-qr small {
  color: #657c67;
  font-family: var(--sans);
  font-size: var(--type-caption-sm);
  line-height: 1.2;
  text-align: center;
}

.billing-payment .field textarea {
  min-height: 78px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.billing-payment .field .btn {
  align-self: flex-start;
  margin-top: 5px;
}

.billing-payment .field .btn.is-copied {
  border-color: color-mix(in srgb, var(--success) 34%, var(--line));
  background: color-mix(in srgb, var(--success) 10%, var(--surface));
  color: var(--accent-deep);
}

.billing-status-line {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  line-height: 1.45;
}

.billing-status-line b {
  color: var(--ink-soft);
  font-weight: 650;
}

.billing-active {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--success) 24%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--success) 8%, var(--surface));
  color: var(--ink-soft);
}

.billing-active > .icon {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  color: var(--success);
}

.billing-active strong {
  display: block;
  font-size: 12px;
}

.billing-active p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
}

.billing-loading {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10.5px;
}

.billing-loading .icon {
  width: 14px;
  height: 14px;
  animation: billing-spin 1.2s linear infinite;
}

@keyframes billing-spin {
  to { transform: rotate(360deg); }
}

.billing-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 10px;
}

.billing-session strong {
  color: var(--ink-soft);
  font-weight: 650;
}

.billing-manage {
  display: grid;
  gap: 12px;
  width: min(520px, 100%);
}

.billing-manage-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.billing-manage-mark {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.billing-manage-head h2 {
  margin-top: 2px;
  font-size: 28px;
  line-height: 1.05;
}

.billing-manage-head p:last-child {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

.billing-manage-facts {
  display: grid;
  gap: 3px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
}

.billing-manage-facts strong {
  color: var(--ink-soft);
}

.billing-manage-facts small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  line-height: 1.4;
}

.billing-manage-actions,
.billing-payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 4px;
}

.billing-manage-link {
  display: flex;
  justify-content: flex-end;
  margin: 2px 0 0;
}

@media (min-width: 981px) {
  .billing-pitch {
    align-self: stretch;
  }

  .billing-plan-card {
    position: sticky;
    top: 18px;
  }
}

@media (min-width: 981px) and (min-height: 850px) {
  .billing-pitch {
    position: sticky;
    top: 20px;
    align-self: start;
  }

  .billing-plan-card {
    position: static;
  }
}

@media (max-width: 980px) {
  .billing-layout {
    grid-template-columns: minmax(0, 1fr);
    max-width: 690px;
  }

  .billing-pitch {
    display: none;
  }

  .billing-mobile-overview {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--line);
  }

  .billing-mobile-plan {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 10px;
  }

  .billing-mobile-plan strong {
    color: var(--accent-deep);
    font-family: var(--serif);
    font-size: 27px;
    line-height: 1;
  }

  .billing-mobile-plan strong small {
    color: var(--muted);
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 600;
  }

  .billing-mobile-plan .billing-plan-status {
    margin-left: auto;
  }

  .billing-mobile-benefits summary {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 2px;
    color: var(--accent-deep);
    font-size: 11.5px;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
  }

  .billing-mobile-benefits summary::-webkit-details-marker {
    display: none;
  }

  .billing-mobile-benefits summary .icon {
    width: 14px;
    height: 14px;
    margin-left: auto;
    transition: transform 160ms ease;
  }

  .billing-mobile-benefits[open] summary .icon {
    transform: rotate(180deg);
  }

  .billing-mobile-benefits .billing-perks {
    margin-top: 8px;
  }

  .billing-pitch h1 {
    max-width: 14ch;
    font-size: clamp(40px, 7vw, 58px);
  }

  .billing-plan-card,
  .billing-trust {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .billing-shell {
    padding: 16px 12px 32px;
  }

  .billing-topbar {
    margin-bottom: 19px;
  }

  .billing-brand {
    font-size: 20px;
  }

  .billing-brand .brand-mark-detail {
    width: 39px;
    height: 39px;
    border-radius: 11px;
  }

  .billing-top-note {
    display: none;
  }

  .billing-pitch h1 {
    font-size: clamp(37px, 11vw, 48px);
  }

  .billing-lede {
    font-size: 13px;
  }

  .billing-checkout {
    padding: 18px 15px;
    border-radius: 20px;
  }

  .billing-form .field-grid {
    grid-template-columns: 1fr;
  }

  .billing-address-fieldset .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .billing-address-fieldset .field:nth-child(3),
  .billing-address-fieldset .field:nth-child(6),
  .billing-address-fieldset .field:nth-child(7) {
    grid-column: 1 / -1;
  }

  .billing-form {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .billing-form > .auth-submit {
    display: none;
  }

  .billing-mobile-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    box-shadow: 0 -12px 30px -24px rgba(44, 40, 35, .65);
    backdrop-filter: blur(12px);
  }

  .billing-mobile-copy {
    display: grid;
    min-width: 0;
    gap: 1px;
  }

  .billing-mobile-copy strong {
    color: var(--ink);
    font-family: var(--serif);
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
  }

  .billing-mobile-copy strong small {
    color: var(--muted);
    font-family: var(--sans);
    font-size: var(--type-caption-sm);
    font-weight: 500;
    letter-spacing: .01em;
  }

  .billing-mobile-bar .btn {
    min-height: 44px;
    white-space: nowrap;
  }

  .billing-pix-grid {
    grid-template-columns: 1fr;
  }

  .billing-pix-qr {
    justify-self: center;
    width: 180px;
  }

  .billing-step {
    gap: 3px;
    padding: 6px 4px;
  }

  .billing-step > span {
    flex-basis: 17px;
    width: 17px;
    height: 17px;
  }

  .billing-step strong {
    font-size: 8px;
  }

  .billing-session {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* ---------- people ---------- */

.auth-people-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
}

.public-shell {
  min-height: 100vh;
  padding: 24px 20px 50px;
  background:
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--accent-soft) 45%, transparent), transparent 35%),
    var(--bg);
}

.public-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1040px, 100%);
  margin: 0 auto 42px;
}

.public-content {
  width: min(1040px, 100%);
  margin: 0 auto;
}

.public-person-sticky {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 12;
  display: flex;
  width: min(1000px, calc(100vw - 32px));
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -8px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.public-person-sticky.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.public-sticky-avatar {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  font-size: 10px;
}

.public-sticky-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.public-sticky-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-sticky-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-sticky-actions {
  display: flex;
  margin-left: auto;
  gap: 2px;
}

.public-sticky-actions .icon-btn {
  width: 36px;
  height: 36px;
  min-height: 36px;
}

.public-content:has(.public-person-sticky.is-visible) .public-shelf-tools {
  top: 62px;
}

@media (max-width: 640px) {
  .public-person-sticky {
    top: 8px;
    width: calc(100vw - 20px);
    border-radius: 10px;
  }

  .public-content:has(.public-person-sticky.is-visible) .public-shelf-tools {
    top: 66px;
  }

  .public-sticky-actions .icon-btn,
  .public-sticky-actions .public-follow {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }
}

.public-content h1 {
  margin-top: 4px;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1;
}

.public-more {
  margin-top: 12px;
}

.public-back {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 11px;
}

.public-person-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.public-person-head h1 {
  margin: 2px 0 4px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.public-person-head .public-subtitle {
  margin: 0;
}

.public-person-head .person-avatar {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
}

.public-subtitle {
  max-width: 640px;
  margin: 14px 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.public-foot {
  width: min(1040px, 100%);
  margin: 28px auto 0;
  color: var(--muted-2);
  font-size: 10.5px;
}

.people-ssr-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  margin: 0 0 12px;
}

.people-ssr-controls label {
  display: grid;
  flex: 1 1 180px;
  gap: 4px;
  min-width: 0;
}

.people-ssr-controls input,
.people-ssr-controls select {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.people-search {
  max-width: 420px;
  margin: 0 0 12px;
}

.people-panel {
  position: relative;
  padding: 16px;
}

.public-shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}

.public-shelf-head .eyebrow {
  margin: 0;
}

.public-shelf-head > span {
  color: var(--muted);
  font-size: 10px;
}

.public-hero-breakdown {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  text-align: right;
}

.public-shelf-tools {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: -4px -16px 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
}

.public-shelf-tools .person-modal-filters {
  flex: 1 1 auto;
  margin: 0;
}

.public-shelf-tools .person-sort-field {
  margin: 0 0 0 auto;
}

.person-offer.active {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.person-offer span {
  font-variant-numeric: tabular-nums;
}

.person-sort-field {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.person-sort-field select {
  min-height: 34px;
  padding: 4px 26px 4px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.person-sort-field select:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 58%, transparent);
  outline-offset: 2px;
}

.person-modal-tools .person-sort-field {
  margin-bottom: 6px;
}

.public-filter-shell {
  display: contents;
}

.public-filter-toggle,
.public-filter-backdrop,
.public-filter-sheet-head {
  display: none;
}

.public-filter-controls {
  display: contents;
}

body.public-filter-open {
  overflow: hidden;
}

.public-filter-foot {
  display: none;
}

@media (max-width: 640px) {
  .public-hero-breakdown {
    text-align: left;
  }

  .public-shelf-tools {
    backdrop-filter: none;
    margin-inline: -12px;
    padding-inline: 12px;
  }

  .public-shelf-tools:has(.public-filter-shell.is-open) {
    z-index: 60;
  }

  .public-filter-shell {
    display: block;
    width: 100%;
  }

  .public-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface) 80%, var(--bg));
    color: var(--ink-soft);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
  }

  .public-filter-toggle .icon {
    width: 15px;
    height: 15px;
    color: var(--accent-deep);
  }

  .public-filter-toggle b {
    margin-left: auto;
    min-width: 21px;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--surface);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    text-align: center;
  }

  .public-shelf-tools.is-compact {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 5;
    justify-content: flex-end;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .people-panel:has(> .public-shelf-tools.is-compact) .public-top-finds-head {
    min-height: 44px;
    align-items: center;
    padding-right: 52px;
  }

  .people-panel:has(> .public-shelf-tools.is-compact):not(:has(> .public-top-finds)) .public-shelf-tools.is-compact {
    position: static;
    margin: 0 0 8px;
  }

  .public-shelf-tools.is-compact .public-filter-shell {
    width: auto;
  }

  .public-shelf-tools.is-compact .public-filter-toggle {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
    gap: 0;
  }

  .public-shelf-tools.is-compact .public-filter-toggle > span,
  .public-shelf-tools.is-compact .public-filter-toggle > b {
    display: none;
  }

  .public-filter-controls {
    display: none;
  }

  .public-filter-shell.is-open .public-filter-controls {
    position: fixed;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    z-index: 61;
    display: flex;
    max-height: min(82vh, 720px);
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 15px;
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 28px 70px -30px rgba(0, 0, 0, .65);
  }

  .public-filter-shell.is-open .public-filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: block;
    padding: 0;
    border: 0;
    background: color-mix(in srgb, #221b13 58%, transparent);
    backdrop-filter: blur(3px);
  }

  .public-filter-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -3px 0 2px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
  }

  .public-filter-grabber {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: var(--line-strong);
    transform: translateX(-50%);
  }

  .public-filter-close,
  .filter-sheet-close {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .public-filter-sheet-head strong {
    font-family: var(--serif);
    font-size: 22px;
  }

  .public-filter-shell.is-open .public-filter-foot {
    position: sticky;
    bottom: -15px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin: 2px -15px -15px;
    padding: 10px 15px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: var(--surface);
  }

  .public-filter-foot > span {
    flex: 1 1 100%;
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.35;
  }

  .public-filter-foot-actions {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 7px;
  }

  .public-filter-foot button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--ink-soft);
    font: inherit;
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
  }

  .public-filter-foot .btn-primary {
    flex: 1 1 auto;
    justify-content: center;
    border-color: var(--accent);
    background: var(--accent);
    color: var(--surface);
  }

  .public-filter-close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--ink-soft);
    cursor: pointer;
  }

  .public-filter-controls .person-scope-tabs {
    width: 100%;
    margin: 0;
  }

  .public-filter-controls .person-scope-tab {
    flex: 1;
    min-height: 44px;
    justify-content: center;
  }

  .public-filter-controls .person-modal-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
  }

  .public-filter-controls .person-offer,
  .public-filter-controls .person-scope {
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    white-space: normal;
  }

  .public-filter-controls .person-sort-field {
    width: 100%;
    min-height: 44px;
    margin: 0;
    justify-content: space-between;
  }

  .public-filter-controls .person-sort-field select {
    flex: 1;
    min-height: 44px;
  }

  .person-sort-field select {
    min-height: 44px;
  }
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  /* A person with no shared games left a short card beside a four-line one;
     stretching keeps the directory reading as a grid. */
  align-items: stretch;
  gap: 10px;
}

.public-shelf-dna {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: -6px 0 12px;
  padding: 10px 14px;
}

.public-dna-head {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
}

.public-dna-mark {
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.public-dna-mark .icon {
  width: 15px;
  height: 15px;
}

.public-dna-head > div {
  display: grid;
  gap: 1px;
}

.public-dna-head .eyebrow {
  margin: 0;
}

.public-dna-head strong {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.1;
}

.public-dna-head small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.public-dna-grid {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  min-width: 0;
}

.public-dna-item {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 52%, transparent);
}

.public-dna-item small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-dna-label-short {
  display: none;
}

.public-dna-item strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.public-dna-item strong em {
  margin-left: 1px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
}

.public-dna-item progress {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  appearance: none;
}

.public-dna-item progress::-webkit-progress-bar {
  border-radius: inherit;
  background: var(--line);
}

.public-dna-item progress::-webkit-progress-value {
  border-radius: inherit;
  background: var(--accent);
}

.public-dna-item progress::-moz-progress-bar {
  border-radius: inherit;
  background: var(--accent);
}

.public-dna-item.is-rating progress::-webkit-progress-value { background: var(--gold); }
.public-dna-item.is-rating progress::-moz-progress-bar { background: var(--gold); }
.public-dna-item.is-year progress::-webkit-progress-value { background: var(--terracotta); }
.public-dna-item.is-year progress::-moz-progress-bar { background: var(--terracotta); }

.public-dna-scale {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.public-dna-empty {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
}

@media (max-width: 640px) {
  .public-shelf-dna {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    margin: -4px 0 10px;
    padding: 9px 11px;
  }

  .public-dna-head {
    gap: 6px;
  }

  .public-dna-head .eyebrow,
  .public-dna-head small {
    display: none;
  }

  .public-dna-mark {
    width: 24px;
    height: 24px;
    border-radius: 7px;
  }

  .public-dna-head strong {
    font-size: 13px;
  }

  .public-dna-grid {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .public-dna-item {
    gap: 2px;
    padding: 7px 8px;
  }

  .public-dna-item.is-year,
  .public-dna-grid > .public-dna-item:only-child {
    grid-column: 1 / -1;
  }

  .public-dna-item small {
    font-size: 10px;
  }

  .public-dna-label-full {
    display: none;
  }

  .public-dna-label-short {
    display: inline;
  }

  .public-dna-item strong {
    font-size: 14px;
  }

  .public-dna-item strong em {
    font-size: var(--type-caption-sm);
  }

  .public-dna-item progress,
  .public-dna-scale {
    display: none;
  }
}

.person-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  container-name: person-card;
  container-type: inline-size;
  cursor: pointer;
  transition: border-color var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard);
}

.person-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.game-card:focus-within,
.person-card:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.person-open {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.person-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
}

.person-avatar-photo {
  position: relative;
  background: var(--surface-2);
  color: transparent;
}

.person-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  background: var(--surface-2);
}

.person-avatar.image-broken img {
  display: none;
}

.person-avatar-fallback {
  border: 1px solid color-mix(in srgb, var(--cover-ink, var(--accent)) 22%, var(--line));
}

.person-empty-shelf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  color: var(--muted);
  font-size: 11.5px;
}

.person-empty-shelf .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.person-card-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.person-card-top > .person-open {
  flex: 1 1 auto;
  min-width: 0;
}

.person-card-top-action {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  padding-top: 2px;
}

@container person-card (max-width: 430px) {
  .person-card-top-action .person-follow-compact {
    width: 30px;
    min-width: 30px;
    padding: 0;
    justify-content: center;
  }

  .person-card-top-action .person-follow-compact span {
    display: none;
  }
}

@media (max-width: 360px) {
  .person-card-top {
    gap: 6px;
  }

  .person-card-top > .person-open {
    gap: 8px;
  }

  .person-count {
    padding: 1px 5px;
    font-size: var(--type-caption-sm);
  }
}

.person-covers {
  display: flex;
  gap: 5px;
  height: 48px;
  overflow: hidden;
  opacity: .9;
}

.person-covers img {
  flex: 0 0 38px;
  width: 38px;
  height: 48px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 12px -10px rgba(44, 40, 35, 0.7);
}

.person-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.person-open-chevron {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 2;
  display: grid;
  width: 14px;
  height: 14px;
  place-items: center;
  color: var(--muted);
}

.person-open-chevron .icon {
  width: 14px;
  height: 14px;
  transform: rotate(-90deg);
}

.person-card:hover .person-open-chevron {
  color: var(--accent-deep);
}

/* The handle is the whole point of this directory, and ellipsis cut it at about
   nine characters ("@chernob…") while the card had empty space to spare. These
   are single unbroken words, so wrapping splits them anywhere ("@eduardoffr /
   aga"); fit-content scrolls to the size instead of cutting, and a long handle
   shrinks a step to fit on one line. */
.person-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: clamp(11.5px, 0.95vw, 18px);
}

.person-main span {
  color: var(--muted);
  font-size: 10.5px;
}

.person-ludopedia {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  color: var(--muted);
  font-size: 10px;
}

.person-ludopedia:hover {
  color: var(--accent);
}

.people-loading,
.people-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 38px 18px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.people-loading .sync-spinner {
  width: 22px;
  height: 22px;
}

.account-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-avatar {
  flex-basis: 44px;
  width: 44px;
  height: 44px;
  font-size: 15px;
}

.person-modal {
  display: flex;
  max-height: 90vh;
  flex-direction: column;
  overflow: hidden;
  padding: 22px;
}

.person-modal-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.person-modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.person-modal-head .person-avatar {
  flex-basis: 64px;
  width: 64px;
  height: 64px;
  font-size: 21px;
}

.person-modal-title h2 {
  font-size: 30px;
  line-height: 1.05;
}

.person-modal-title .muted {
  margin-top: 4px;
  font-size: 11px;
}

.person-games {
  display: grid;
  /* 210px forced four columns at 1440 and left 164px for a title. 280px keeps
     three readable columns on the public shelf while still allowing four on
     very wide panels. */
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.person-games.is-sparse {
  grid-template-columns: minmax(0, 1fr);
}

.public-shelf-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 460px;
  margin: 18px auto 2px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

.public-shelf-note .icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.public-shelf-note p {
  margin: 0;
  font-size: 11.5px;
}

.person-game {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.person-game.is-in-wishlist {
  border-color: color-mix(in srgb, var(--success) 58%, var(--line));
  background: color-mix(in srgb, var(--success) 6%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--success) 22%, transparent);
}

.person-game-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent-deep);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.person-game-save .icon {
  width: 16px;
  height: 16px;
}

.person-game-save:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.person-game-save:disabled {
  opacity: .55;
  cursor: wait;
}

.person-game-saved {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--success);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.person-game-saved .icon {
  width: 11px;
  height: 11px;
}

.person-game-owned,
.person-game-saved.is-owned {
  color: var(--muted);
  font-weight: 650;
}

.person-game-cover {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 9px;
  background: var(--surface-2);
}

.person-game-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person-game > div {
  flex: 1 1 auto;
  min-width: 0;
}

.person-game h3 {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.person-game .muted {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.person-game-designers {
  overflow: visible;
  font-size: 11px;
  line-height: 1.45;
  white-space: normal;
}

.public-author-page .public-author-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.public-author-page .person-games {
  margin-top: 8px;
}
.public-author-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}

.public-author-toolbar .is-active {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.author-alias-admin {
  margin: 0 0 14px;
  padding: 8px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  font-size: 11px;
}

.author-alias-admin > summary {
  cursor: pointer;
  color: var(--muted-2);
  user-select: none;
}

.author-alias-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  margin-top: 8px;
}

.author-alias-form label {
  display: grid;
  flex: 1 1 220px;
  gap: 3px;
}

.author-alias-form input {
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.public-author-more-wrap {
  display: flex;
  justify-content: center;
  margin: 18px 0 4px;
}


.public-author-page .public-empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 28px 12px;
  color: var(--muted);
  text-align: center;
}

.person-designers-more {
  display: inline-block;
  position: relative;
  z-index: 4;
}

.person-designers-more > summary {
  display: inline;
  list-style: none;
  color: var(--muted-2);
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  cursor: pointer;
}

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

.person-designers-list {
  display: block;
  margin-top: 4px;
}

@media (max-width: 640px) {
  .public-shell { padding: 16px 13px 36px; }
  .person-modal-filters { display: grid; grid-template-columns: 1fr; }
  .person-save-missing { width: 100%; margin-right: 0; justify-content: center; }
  .public-top { margin-bottom: 28px; }
  .public-top .brand-word { font-size: 17px; }
  .public-content h1 { font-size: 38px; }
  .person-avatar { flex-basis: 46px; width: 46px; height: 46px; font-size: 16px; }
  .person-modal { padding: 16px; }
  .person-modal-head .person-avatar { flex-basis: 52px; width: 52px; height: 52px; }
  .person-modal-title h2 { font-size: 24px; }
  .person-games { grid-template-columns: 1fr; }
}


.person-game:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.person-game-offer {
  margin-top: 2px;
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.person-game-offer.is-empty {
  color: var(--muted);
  font-weight: 550;
}

.person-game-offer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
}

.person-game-offer .store-favicon {
  width: 11px;
  height: 11px;
  border-radius: 2px;
}

.person-game-offer strong {
  font-weight: 800;
}

[data-theme="dark"] .person-game-offer {
  color: var(--accent);
}

[data-theme="dark"] .person-game-offer.is-empty {
  color: var(--muted);
}

.person-game-offer.is-empty {
  font-size: 10.5px;
  font-weight: 500;
}

.person-game-offer {
  text-decoration: none;
}

.person-game-offer:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.person-game-offer > .icon {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-left: 1px;
  color: var(--muted);
}

.person-game-offer.is-stale {
  color: var(--gold);
}

[data-theme="dark"] .person-game-offer.is-stale {
  color: var(--gold);
}

.person-game-offer-stale {
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.person-game-name-link {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.person-game-name-link:hover {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.person-game-name-link .icon {
  display: inline;
  width: 9px;
  height: 9px;
  margin-left: 3px;
  color: var(--muted);
  opacity: .55;
  vertical-align: baseline;
}

[data-theme="dark"] .person-game.is-in-wishlist {
  border-color: color-mix(in srgb, var(--success) 78%, var(--line));
  background: color-mix(in srgb, var(--success) 9%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--success) 38%, transparent);
}

[data-theme="dark"] .person-game-saved {
  color: color-mix(in srgb, var(--success) 78%, white);
}

.auth-contact {
  color: inherit;
  font-weight: 750;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-contact:hover {
  color: var(--accent);
}

/* The invite path is an action, not a footnote: it stays visible on the
   sign-in card and opens a pre-addressed request from either entry point. */
.auth-invite-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.auth-invite-line .icon {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: var(--accent);
}

.auth-invite-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.auth-invite-copy p {
  margin: 0;
}

.auth-invite-cta {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-invite-cta:hover {
  background: transparent;
  color: var(--accent);
}

.auth-invite-cta .icon {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: var(--accent);
}

.auth-invite-cta small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 550;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.public-invite {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  color: var(--accent-deep);
}

.public-invite:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  color: var(--accent);
}

.public-invite .icon {
  width: 15px;
  height: 15px;
}

[data-theme="dark"] .auth-first.auth-invite {
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}

[data-theme="dark"] .auth-footnote {
  color: var(--muted-2);
}

[data-theme="dark"] .auth-footnote strong {
  color: var(--ink);
}

[data-theme="dark"] .auth-contact {
  color: var(--accent);
}

@media (max-width: 640px) {
  .public-top {
    flex-wrap: wrap;
    row-gap: 12px;
  }

  .public-actions {
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 4px;
  }

  .public-actions .btn,
  .auth-invite-cta {
    min-height: 44px;
  }

  .public-actions .public-invite {
    width: 44px;
    min-width: 44px;
    padding: 0;
    justify-content: center;
  }

  .public-actions .public-invite span {
    display: none;
  }

  .public-actions .language-control {
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
  }

  .public-actions .language-control > .icon {
    display: none;
  }

  .public-actions .language-control::after {
    content: attr(data-locale);
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--ink-soft);
    font-size: 8.5px;
    font-weight: 750;
    letter-spacing: .02em;
    pointer-events: none;
  }

  .public-actions .language-control select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
  }

  .auth-shell {
    justify-content: flex-start;
    padding: 26px 14px 32px;
  }

  .auth-pitch {
    gap: 9px;
  }

  .auth-pitch .auth-brand {
    align-self: center;
  }

  .auth-brand .brand-word {
    display: inline;
    font-size: 22px;
  }

  .auth-pitch-title {
    margin-top: 1px;
    font-size: 26px;
    line-height: 1.05;
    text-wrap: balance;
  }

  .auth-pitch-lead {
    font-size: 13px;
    line-height: 1.45;
  }

  .auth-card {
    width: 100%;
    padding: 21px 18px;
    border-radius: 22px;
  }

  .auth-top {
    margin-bottom: 6px;
  }

  .auth-top .language-control {
    height: 30px;
    padding: 0 2px;
    border-color: transparent;
    background: transparent;
  }

  .auth-card h1 {
    font-size: 33px;
    line-height: 1.05;
    text-wrap: balance;
  }

  .auth-subtitle {
    margin-top: 8px;
    font-size: 12.5px;
  }

  .auth-tabs {
    margin: 14px 0;
  }

  .auth-tabs button {
    min-height: 44px;
  }

  .passkey-help summary {
    display: flex;
    min-height: 44px;
    align-items: center;
  }

  .auth-footnote {
    max-width: 270px;
    font-size: 11px;
  }

  .auth-people-link {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px dashed var(--line);
  }
}

.public-top-finds {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 11px;
  border-bottom: 1px dashed var(--line);
}

.public-top-finds-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.public-top-finds-head .eyebrow {
  margin: 0;
}

.public-top-finds-head > span {
  color: var(--ink-soft);
  font-size: 10px;
}

.public-top-finds-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 6px;
}

.public-top-finds-list:has(.public-top-find:only-child) {
  max-width: 640px;
}

.public-top-finds.is-compact {
  gap: 5px;
  margin-bottom: 9px;
  padding-bottom: 8px;
}

.public-top-finds.is-compact .public-top-finds-head {
  margin-bottom: 0;
}

.public-top-finds.is-compact .public-top-find {
  gap: 7px;
  padding: 4px 8px;
  background: transparent;
}

.public-top-finds.is-compact .public-top-find-cover {
  display: none;
}

.public-top-finds.is-compact .public-top-find-copy {
  flex-direction: row;
  align-items: baseline;
  gap: 7px;
}

.public-top-finds.is-compact .public-top-find-copy strong {
  font-size: 12px;
}

.public-top-finds.is-compact .public-top-find-percent {
  padding: 2px 6px;
  border-radius: 7px;
}

.public-top-find {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-2) 62%, transparent);
  color: inherit;
  text-decoration: none;
}

.public-top-find-cover {
  flex: 0 0 auto;
  width: 32px;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.public-top-find-cover img,
.public-top-find-cover svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-top-find-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
}

.public-top-find-copy strong,
.public-top-find-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-top-find-copy strong {
  font-size: 11px;
}

.public-top-find-copy small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.public-top-find-percent {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 1px;
  padding: 3px 7px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.public-top-find-percent b {
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.public-top-find-percent small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .public-top-finds {
    gap: 5px;
    margin-bottom: 9px;
    padding-bottom: 8px;
  }

  .public-top-finds-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-top-finds-head > span {
    display: none;
  }

  .public-top-find {
    gap: 6px;
    padding: 4px 7px;
  }

  .public-top-find-cover {
    width: 26px;
    height: 34px;
  }

  .public-top-find-copy strong {
    font-size: 10.5px;
  }

  .public-top-find-copy small {
    font-size: 8.5px;
  }

  .public-top-find-percent {
    padding: 2px 6px;
  }
}

.person-follow-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fbf7ed;
  box-shadow: 0 9px 20px -14px color-mix(in srgb, var(--accent-deep) 70%, transparent);
}

.person-follow-primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.person-follow-primary.is-following {
  border-color: var(--line-strong);
  background: var(--accent-soft);
  color: var(--accent-deep);
  box-shadow: none;
}

.public-share-actions {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 2px;
}

.public-share-actions .public-share,
.public-share-actions .public-share-card {
  flex: 0 0 44px;
  width: 44px;
  min-height: 44px;
  margin-top: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  justify-content: center;
}

.public-share-actions .public-share:hover,
.public-share-actions .public-share-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.public-share-actions .public-follow {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.public-person-head .public-visitor-follow {
  margin-top: 10px;
}

@media (max-width: 640px) {
  .public-person-head .public-visitor-follow {
    min-height: 44px;
  }
}

.public-sticky-actions .public-follow {
  width: 36px;
  min-height: 36px;
  padding: 0;
}

.public-sticky-actions .public-follow span {
  display: none;
}


.auth-stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 14px 0 2px;
}

.auth-stepper > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  padding: 5px 2px 8px;
  border-bottom: 2px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  transition: color 150ms ease, border-color 150ms ease;
}

.auth-stepper i {
  display: grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.auth-stepper > span.is-active {
  border-color: var(--accent);
  color: var(--accent-deep);
  font-weight: 800;
}

.auth-stepper > span.is-active i {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.auth-stepper > span.is-complete {
  border-color: var(--success);
  color: var(--success);
}

.auth-stepper > span.is-complete i {
  border-color: var(--success);
  background: color-mix(in srgb, var(--success) 12%, var(--surface));
  color: var(--success);
}

.auth-step-panel {
  display: grid;
  gap: 13px;
}

.auth-step-panel[hidden] {
  display: none;
}

.auth-step-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 3px;
}

.auth-step-actions .btn {
  min-height: 42px;
}

.auth-step-actions .btn-primary {
  flex: 1 1 auto;
  justify-content: center;
}

@media (max-width: 640px) {
  .auth-step-actions {
    position: sticky;
    bottom: 10px;
    z-index: 2;
    padding: 7px 0;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(8px);
  }

  .auth-step-actions .btn {
    min-height: 44px;
  }
}

.public-coverage-meter {
  width: 100%;
  height: 4px;
  margin: 3px 0 2px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  appearance: none;
}

.public-coverage-meter::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--line);
}

.public-coverage-meter::-webkit-progress-value {
  border-radius: 999px;
  background: var(--success);
}

.public-coverage-meter::-moz-progress-bar {
  border-radius: 999px;
  background: var(--success);
}

.public-coverage-meter.is-fresh {
  height: 3px;
  margin-top: 1px;
}

.public-coverage-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px 7px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.public-coverage-legend span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.public-coverage-legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.public-coverage-legend .is-fresh i {
  background: var(--gold);
}

.public-coverage-meter.is-fresh::-webkit-progress-value {
  background: var(--gold);
}

.public-coverage-meter.is-fresh::-moz-progress-bar {
  background: var(--gold);
}

/* ---------- Following and the people feed ---------- */

.person-follow {
  justify-content: center;
  min-height: 36px;
  gap: 6px;
  color: var(--accent-deep);
}

.person-follow.is-following {
  color: var(--muted);
}

.person-follow .icon {
  flex: 0 0 auto;
}

.person-follow-compact {
  min-height: 30px;
  padding: 2px 8px;
  font-size: 11px;
}

.person-follow-compact[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.person-follow-compact .icon {
  width: 14px;
  height: 14px;
}

.person-foot-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.people-feed {
  margin-bottom: 14px;
  padding: 16px 18px;
}

.people-feed-head {
  display: block;
  margin-bottom: 12px;
}

.people-feed-head h2 {
  margin: 1px 0 0;
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.05;
}

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

.people-feed-followees {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.people-feed-tabs {
  display: flex;
  gap: 4px;
}

.people-feed-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.people-feed-tab b {
  min-width: 17px;
  padding: 1px 4px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.people-feed-tab:hover {
  color: var(--ink);
}

.people-feed-tab.is-active {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.people-feed-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 8px;
}

.people-feed-person-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.people-feed-person-filter select {
  min-height: 30px;
  padding: 3px 24px 3px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font: inherit;
  font-size: 10px;
}

.people-feed-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.people-feed-clear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 3px 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.people-feed-clear:hover {
  color: var(--ink);
  border-color: var(--accent);
}

.people-feed-kind {
  min-height: 30px;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.people-feed-kind:hover {
  color: var(--ink);
}

.people-feed-kind.is-active {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.people-feed-kind b {
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
}

.people-feed-kind:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.people-feed-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.people-feed-period {
  display: grid;
  gap: 7px;
}

.people-feed-period-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.people-feed-period-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.people-feed-period-items {
  display: grid;
  gap: 10px;
}

.people-feed-person-group {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 82%, var(--bg));
}

.people-feed-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.people-feed-group-head > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.people-feed-group-head strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.people-feed-group-head small {
  color: var(--muted);
  font-size: 11px;
}

.people-feed-group-head .people-feed-new {
  margin-left: auto;
}

.people-feed-group-items {
  display: grid;
  gap: 0;
}

.people-feed-group-items > :first-child {
  border-top: 0;
  padding-top: 2px;
}

.people-feed-avatar {
  flex-basis: 34px;
  width: 34px;
  height: 34px;
  font-size: 11px;
}

.people-feed-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.people-feed-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-width: 0;
}

.people-feed-side .people-feed-offer {
  margin: 0;
  white-space: nowrap;
}

.people-feed-save {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent-deep);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.people-feed-save:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-soft);
}

.people-feed-save.is-saved {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
  cursor: default;
}

.people-feed-save.is-saved:hover {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  background: var(--accent-soft);
}

.people-feed-save .icon {
  width: 15px;
  height: 15px;
}

.people-feed-item .people-feed-on-shelf {
  margin: 0;
  white-space: nowrap;
}

.people-feed-copy .people-feed-on-shelf {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  justify-self: start;
  margin-top: 1px;
  font-size: 10px;
}

.people-feed-copy .people-feed-on-shelf .icon {
  width: 11px;
  height: 11px;
}

.people-feed-item:hover .people-feed-copy strong {
  color: var(--accent-deep);
}

/* Three full-width rows left most of a desktop feed empty. Additions become
   three compact shelf cards when there is room; the mobile list keeps the
   single-column reading order. */
@media (min-width: 900px) {
  .people-feed-period-items.is-additions .people-feed-group-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 8px;
    padding-top: 4px;
  }

  .people-feed-period-items.is-additions .people-feed-item {
    grid-template-columns: 60px minmax(0, 1fr);
    align-items: start;
    row-gap: 4px;
    column-gap: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: color-mix(in srgb, var(--surface-2) 38%, var(--surface));
  }

  .people-feed-period-items.is-additions .people-feed-game {
    grid-column: 1 / -1;
  }

  .people-feed-period-items.is-additions .people-feed-side {
    grid-column: 2;
    width: 100%;
    justify-content: space-between;
  }

  .people-feed-period-items.is-additions .people-feed-group-items > :first-child {
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }
}

.people-feed-game {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.people-feed-cover {
  display: block;
  flex: 0 0 60px;
  width: 60px;
  height: 80px;
  overflow: hidden;
  border-radius: 5px;
}

.people-feed-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.people-feed-copy {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 2px;
}

.people-feed-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.people-feed-copy small {
  color: var(--muted);
  font-size: 11px;
}

.people-feed-offer {
  margin-top: 2px;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 700;
}

.people-feed-offer.is-empty {
  color: var(--muted);
  font-weight: 500;
}

.people-feed-new {
  display: inline-flex;
  justify-self: start;
  margin-top: 1px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.people-feed-more-row {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.people-feed-on-shelf {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
  color: var(--accent-deep);
  font-size: 10px;
}

.people-feed-on-shelf .icon {
  width: 12px;
  height: 12px;
}

.people-feed-prices {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.people-feed-prices .people-feed-period-items {
  gap: 8px;
}

.people-feed-subhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: var(--fg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.people-feed-subhead small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.people-feed-price {
  display: block;
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.people-feed-price-game {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.people-feed-price-when {
  color: var(--muted) !important;
  font-weight: 500 !important;
}

.people-feed-price-cover {
  display: block;
  flex: 0 0 42px;
  width: 42px;
  height: 56px;
  overflow: hidden;
  border-radius: 4px;
}

.people-feed-price-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.people-feed-price-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.people-feed-price-copy strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.people-feed-price-copy small {
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 700;
}

.people-feed-price-copy small s {
  color: var(--muted);
  font-weight: 500;
}

.people-feed-price-copy em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.people-feed-empty {
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.people-feed-empty > .icon {
  color: var(--accent-deep);
}

.people-feed-empty p {
  max-width: 420px;
  margin: 0;
  font-size: 12px;
}

.people-feed-skeleton {
  display: grid;
  min-height: 106px;
  align-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.people-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 2px 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.people-section-head .eyebrow {
  margin: 0;
}

.people-section-head > span {
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 640px) {
  .person-follow {
    min-height: 44px;
  }

  .people-feed {
    padding: 13px;
  }

  .people-feed-head {
    margin-bottom: 10px;
  }

  .people-feed-bar {
    gap: 6px;
  }

  .people-feed-followees {
    font-size: 10px;
  }

  .people-feed-person-group {
    padding: 9px 10px;
  }

  .people-feed-item {
    gap: 8px;
  }

  .people-feed-side {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }

  .people-feed-side .people-feed-offer {
    font-size: 11px;
  }

  .people-feed-save {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
  }

  .people-feed-item .people-feed-on-shelf {
    font-size: var(--type-caption-sm);
  }

  .people-feed-group-head {
    min-height: 44px;
  }

  .people-feed-tab,
  .people-feed-kind,
  .people-feed-clear {
    min-height: 44px;
  }

  .people-feed-person-filter {
    width: 100%;
    justify-content: space-between;
  }

  .people-feed-person-filter select {
    flex: 1;
    min-height: 44px;
  }

  .people-feed-price {
    padding-top: 9px;
  }
}

@media (max-width: 360px) {
  .people-feed-tabs {
    gap: 3px;
  }

  .people-feed-tab {
    gap: 5px;
    padding-inline: 7px;
  }

  .people-feed-followees {
    padding-inline: 6px;
  }
}

.billing-poll-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 2px;
  color: var(--muted);
  font-size: 10.5px;
}

.billing-poll-note .icon {
  width: 13px;
  height: 13px;
}

@media (max-width: 640px) {
  .billing-mobile-bar.is-keyboard-hidden {
    display: none;
  }
}

.billing-timeline {
  display: grid;
  gap: 0;
  margin: 12px 0 2px;
  padding: 0;
  list-style: none;
}

.billing-timeline li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 0 0 10px;
  color: var(--muted);
}

.billing-timeline li:last-child {
  padding-bottom: 0;
}

.billing-timeline li > span {
  display: grid;
  flex: 0 0 24px;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted-2);
  font-size: var(--type-caption-sm);
  font-weight: 750;
}

.billing-timeline li > span .icon {
  width: 12px;
  height: 12px;
}

.billing-timeline li > div {
  display: grid;
  gap: 1px;
  padding-top: 2px;
}

.billing-timeline strong {
  color: var(--ink-soft);
  font-size: 10.5px;
}

.billing-timeline small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.billing-timeline li.is-done > span {
  border-color: color-mix(in srgb, var(--success) 34%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.billing-timeline li.is-current > span {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold);
}

/* Public curation trail */
.public-trail-page .public-content {
  max-width: 980px;
}

.public-trail-title {
  margin: 4px 0 6px;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
}

.public-trail-lede {
  margin: 0 0 22px;
  color: var(--muted);
}

.public-trail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.public-trail-card {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}

.public-trail-cover {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.public-trail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-trail-card strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-trail-card small {
  color: var(--muted);
  font-size: 10.5px;
}

.public-trail-cta {
  margin-top: 24px;
}

@media (max-width: 640px) {
  .public-trail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* ---------- boot ---------- */

@keyframes boot-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (max-width: 640px) {
  #toast-root { right: 10px; bottom: 10px; }

  .store-group-action,
  .store-group-head,
  .settings-advanced > summary {
    min-height: 44px;
  }
}

.store-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.store-group-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  grid-column: 1 / -1;
}

.store-group-action {
  min-height: 32px;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.store-group-action:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.store-group {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.store-group-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
  min-height: 32px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.store-group-head::-webkit-details-marker {
  display: none;
}

.store-group-head::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 5px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 140ms ease;
}

.store-group[open] > .store-group-head::after {
  transform: rotate(-135deg);
}

.store-group-head span {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.store-group-head .store-group-count {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  letter-spacing: 0;
}

.store-group-logos {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  padding-left: 4px;
}

.store-group-logos .store-favicon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px var(--surface-2);
}

.store-group-logos:empty {
  display: none;
}

/* 180px was narrower than the longest store name, so labels ellipsed down to
   "Amazo…". Each cell now fits the longest label plus its checkbox and padding. */
.store-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px 12px;
}

/* A store toggle is a grid item, so it stretches to the cell width; left-align
   its checkbox and label instead of spreading them across the cell, which made
   every label start at a different x. */
.store-group-grid .store-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-width: 0;
}

/* These toggles live inside .store-groups, a fieldset that also carries .field,
   so the generic ".field input { width: 100% }" stretched the checkbox to ~200px
   and squeezed every label into an ellipsis. Keep the checkbox at its own size. */
.store-group-grid .store-toggle > input[type="checkbox"] {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

.store-group-grid .store-toggle > span {
  flex: 0 1 auto;
  min-width: 0;
}

/* ---------- visual polish ---------- */

:root {
  --radius-card: 18px;
  --radius-panel: 15px;
  --shadow-card: 0 12px 28px -30px rgba(57, 44, 26, .55);
  --shadow-float: 0 24px 54px -32px rgba(57, 44, 26, .55);
}

[data-theme="dark"] {
  --bg: #1b1814;
  --bg-elev: #241f18;
  --surface: #28231c;
  --surface-2: #312a21;
  --surface-3: #3a3025;
  --line: #4a3e31;
  --line-strong: #6a5947;
  --shadow-card: 0 14px 34px -30px rgba(0, 0, 0, .95);
  --shadow-float: 0 26px 60px -30px rgba(0, 0, 0, .95);
}

.game-card {
  grid-template-columns: 104px minmax(0, 1fr);
  min-height: 156px;
  padding: 17px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.game-card .cover {
  width: 104px;
  height: 136px;
  border-radius: 13px;
  box-shadow: 0 12px 24px -20px rgba(0, 0, 0, .65);
}

.cover img {
  transition: transform 220ms ease;
}

.game-card:hover .cover img {
  transform: scale(1.025);
}

.cover-rank {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  padding: 2px 6px;
  border-radius: 999px;
  background: #1b3a34;
  color: #fffaf0;
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .04em;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 1px rgba(255, 250, 240, .18), 0 2px 6px rgba(0, 0, 0, .28);
}

.cover-language {
  position: absolute;
  top: 28px;
  left: 7px;
  z-index: 2;
  padding: 1px 5px;
  border: 1px solid rgba(27, 58, 52, .18);
  border-radius: 999px;
  background: #fffaf0;
  color: #1b3a34;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .05em;
  line-height: 1.45;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}

.cover-language.no-rank {
  top: 7px;
}

/* BGG marks 207 of the 1319 tracked games as expansions. Without a label a card
   for "Boonlake: Artifacts" reads as the base game, and the price looks like the
   thing to buy. Amber, not red: it is a fact about the product, not a warning. */
/* Chips live in .cover-meta-rail, which stacks them; this only styles the pill. */
.cover-expansion {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border: 1px solid rgba(120, 82, 20, .35);
  border-radius: 999px;
  /* Dark chip on a light one: the screenshot showed pale text on pale art. */
  background: #3b2a10;
  color: #fdf3dd;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1.35;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

.game-title {
  font-size: 20px;
  letter-spacing: -.018em;
}

.price-row {
  margin-top: 6px;
}

.game-card:active {
  transform: translateY(0) scale(.997);
}

.btn,
.nav-link,
.price-pill,
.settings-card,
.domain-panel {
  transition: background-color var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard);
}

.btn:focus-visible,
.nav-link:focus-visible,
.price-pill:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 62%, transparent);
  outline-offset: 2px;
}

.store-badge {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-soft);
}

.store-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--badge-dot, var(--accent));
}

.store-badge.stock-badge::before {
  background: var(--muted-2);
}

.store-badge.stock-badge.in::before {
  background: var(--success);
}

.store-badge.stock-badge.out::before {
  background: var(--terracotta);
}

.store-badge.stock-badge.unknown::before {
  background: var(--gold);
}

.store-badge.us::before,
.store-badge.nk::before,
.store-badge.tg::before,
.store-badge.mm::before,
.store-badge.bn::before { --badge-dot: var(--accent); }
.store-badge.br::before,
.store-badge.lp::before,
.store-badge.ml::before,
.store-badge.olx::before { --badge-dot: var(--gold); }
.store-badge.zt::before,
.store-badge.aru::before,
.store-badge.id::before,
.store-badge.mmh::before,
.store-badge.trv::before { --badge-dot: var(--terracotta); }
.store-badge.mc::before,
.store-badge.ph::before,
.store-badge.she::before,
.store-badge.mth::before,
.store-badge.gpl::before,
.store-badge.ply::before { --badge-dot: var(--chart-5); }

.best-total-offer {
  position: relative;
  padding: 13px 15px 13px 18px;
  border-width: 1px;
  border-radius: var(--radius-panel);
  box-shadow: 0 10px 24px -24px rgba(57, 44, 26, .7);
}

.best-total-offer::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.best-total-offer strong {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -.03em;
}

.price-chart {
  padding: 7px 2px 0;
  border-radius: 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 72%, transparent), transparent);
}

.price-chart text {
  fill: var(--muted);
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
}

.price-chart line {
  stroke: var(--line);
}

.settings-card {
  border-radius: var(--radius-card);
}

.form-save-bar {
  backdrop-filter: blur(12px);
}

@media (max-width: 640px) {
  .game-card {
    grid-template-columns: 66px minmax(0, 1fr);
    min-height: 118px;
    padding: 12px;
  }

  .game-card .cover {
    width: 66px;
    height: 88px;
  }

  .game-title {
    font-size: 17px;
  }

  .cover-rank {
    top: 4px;
    left: 4px;
    padding: 1px 4px;
    font-size: 8px;
  }

  .cover-language {
    top: 22px;
    left: 4px;
    padding: 1px 4px;
    font-size: 7.5px;
  }

  .cover-language.no-rank {
    top: 4px;
  }

  .cover-price-tag {
    right: 4px;
    bottom: 4px;
    max-width: calc(100% - 8px);
    padding: 2px 5px;
    font-size: 8.5px;
  }

  .sidebar {
    backdrop-filter: none;
  }

  .nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: flex;
    justify-content: space-around;
    gap: 0;
    min-height: calc(58px + env(safe-area-inset-bottom));
    padding: 4px 6px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--sidebar) 94%, transparent);
    box-shadow: 0 -12px 30px -24px rgba(57, 44, 26, .55);
    backdrop-filter: blur(14px);
    overflow: visible;
  }

  .nav-link {
    flex: 1 1 0;
    min-width: 0;
    min-height: 50px;
    justify-content: center;
    border-radius: 12px;
  }

  .nav-link.active {
    background: var(--accent-soft);
    color: var(--accent-deep);
  }

  .main-inner {
    padding-bottom: 82px;
  }

  #toast-root {
    bottom: calc(70px + env(safe-area-inset-bottom));
  }

  .modal-backdrop,
  .modal {
    z-index: 50;
  }
}

.detail-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.detail-column-main,
.detail-column-side {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.detail-buybox:empty {
  display: none;
}

/* With no offers and no diagnostics the main column is empty; a lone alert
   panel pinned to the right of an empty 2/3 column wasted the dialog. */
.detail-columns.is-side-only {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 900px) {
  .detail-columns {
    grid-template-columns: 1fr;
  }
}


.deal-savings {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: var(--type-caption-sm);
  font-weight: 750;
}

.public-person-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  overflow: hidden;
  margin: 0 0 14px;
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(520px 260px at 8% 0%, color-mix(in srgb, var(--gold-soft) 72%, transparent), transparent 70%),
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 78%, var(--bg)), color-mix(in srgb, var(--accent-soft) 48%, var(--surface)));
}

.public-person-hero .public-person-head {
  position: relative;
  z-index: 2;
  margin: 0;
}

.public-person-hero h1 {
  font-size: clamp(34px, 4.6vw, 52px);
}

.public-hero-inline-counts {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.public-hero-inline-counts b {
  color: var(--ink-soft);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.public-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.public-inline-actions .icon-btn {
  width: 36px;
  height: 36px;
  min-height: 36px;
}

@media (max-width: 640px) {
  .public-inline-actions .icon-btn {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }
}

.public-person-hero.has-covers::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--surface) 94%, transparent) 0%, color-mix(in srgb, var(--surface) 80%, transparent) 42%, color-mix(in srgb, var(--surface) 18%, transparent) 100%),
    linear-gradient(0deg, color-mix(in srgb, var(--surface) 64%, transparent), transparent 62%);
  pointer-events: none;
}

.public-hero-side {
  display: contents;
}

.public-hero-cover-strip {
  position: relative;
  z-index: 2;
  display: grid;
  flex: 0 0 92px;
  grid-auto-rows: minmax(0, 1fr);
  gap: 5px;
  width: 92px;
  height: 190px;
}

.public-hero-cover-strip img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: top center;
  border-radius: 9px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--line) 72%, transparent);
}

.public-person-layout.is-sparse .public-hero-cover-strip {
  display: none;
}

@media (min-width: 641px) {
  .public-hero-side {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 14px;
    padding: 8px;
    border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    border-radius: 20px;
    background: color-mix(in srgb, var(--surface) 46%, transparent);
  }

  .public-hero-side .public-hero-cover-strip {
    flex-basis: 84px;
    width: 84px;
  }
}

.public-person-hero .public-subtitle {
  margin: 8px 0 0;
}

.public-person-joined {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.public-person-joined .icon {
  width: 12px;
  height: 12px;
}

@media (max-width: 640px) {
  .public-person-hero {
    gap: var(--space-2);
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .public-person-hero h1 {
    font-size: clamp(28px, 8vw, 34px);
  }

  .public-person-head {
    gap: 10px;
    margin-bottom: 0;
  }

  .public-person-head .person-avatar {
    flex-basis: 52px;
    width: 52px;
    height: 52px;
  }

  .public-person-hero .public-subtitle {
    margin-top: 4px;
    font-size: 12.5px;
    line-height: 1.4;
  }

  .public-person-joined {
    margin-top: 5px;
    font-size: 10.5px;
  }

  .public-hero-inline-counts {
    gap: 3px 8px;
    margin-top: 4px;
    font-size: 10.5px;
  }
}

.settings-toc-toggle {
  display: none;
}

@media (max-width: 640px) {
  .settings-toc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 8px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 700;
  }

  .settings-toc {
    display: none;
    position: static;
    flex-wrap: wrap;
    border-radius: 14px;
  }

  .settings-toc.toc-open,
  .settings-toc-sub.toc-open {
    display: flex;
  }

  .settings-toc-sub {
    display: none;
  }
}

.people-empty {
  min-height: 160px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 45%, transparent);
}

[data-theme="dark"] .price-pill.empty .store {
  color: var(--ink-soft) !important;
}

[data-theme="dark"] .deal-type.drop {
  color: var(--terracotta);
}

.price-spark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: auto;
  min-width: 64px;
  height: 18px;
  margin-left: auto;
  opacity: .9;
}

.price-spark svg {
  width: 64px;
  height: 18px;
  overflow: visible;
}

.spark-window {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

.spark-change {
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.spark-change.down {
  color: var(--success);
}

.spark-change.up {
  color: var(--terracotta);
}

/* A settled price gets a short rule instead of the word "stable", which used to
   repeat on every card. */
.price-spark.is-flat {
  justify-content: flex-end;
  min-width: 0;
}

.spark-flat-line {
  display: block;
  width: 18px;
  height: 0;
  border-top: 1.5px solid color-mix(in srgb, var(--muted) 55%, transparent);
  border-radius: 1px;
}

.price-spark path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.deal-day {
  display: grid;
  gap: 8px;
}

.deal-day-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 4px;
}

.deal-day-head h2 {
  font-family: var(--serif);
  font-size: 18px;
}

.deal-day-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.activity-timeline {
  display: grid;
  gap: 18px;
}

.activity-day {
  position: relative;
  display: grid;
  gap: 8px;
  padding-left: 22px;
}

.activity-day::before {
  content: "";
  position: absolute;
  top: 30px;
  bottom: 6px;
  left: 7px;
  width: 1px;
  background: var(--line);
}

.activity-day-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-left: -22px;
  padding-left: 22px;
}

.activity-day-head h3 {
  font-family: var(--serif);
  font-size: 18px;
}

.activity-day-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.run-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.run-icon .icon {
  width: 13px;
  height: 13px;
}

.activity-day .run-card {
  position: relative;
}

.activity-day .run-card::before {
  content: "";
  position: absolute;
  top: 23px;
  left: -19px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
}

.command-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.command-label span {
  color: var(--muted-2);
  font-size: var(--type-caption-sm);
  font-weight: 700;
}

.command-result mark {
  padding: 0 2px;
  border-radius: 3px;
  background: var(--gold-soft);
  color: var(--ink);
}

.person-card {
  position: relative;
  overflow: hidden;
}

.person-open {
  padding-right: 0;
}

.person-covers {
  height: 64px;
  margin-top: 2px;
}

.person-covers img {
  flex-basis: 46px;
  width: 46px;
  height: 64px;
  border-radius: 7px;
}

.settings-card.is-dirty {
  border-color: color-mix(in srgb, var(--gold) 52%, var(--line));
  box-shadow: inset 3px 0 0 var(--gold);
}

.form-save-bar.dirty {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
  background: color-mix(in srgb, var(--gold-soft) 46%, var(--surface));
}

.form-save-bar.dirty > span {
  color: var(--ink-soft);
  font-weight: 650;
}

@media (max-width: 640px) {
  .nav {
    gap: 1px;
  }

  /* The Admin header links to Activity; on a phone the eighth tab costs more
     than the shortcut is worth. */
  .sidebar .nav-link[href="#/activity"] {
    display: none;
  }

  .nav-link {
    flex-direction: column;
    gap: 2px;
    min-width: 48px;
    padding: 4px 5px;
    font-size: var(--type-caption-sm);
    line-height: 1.05;
  }

  .nav-link span:not(.nav-count):not(.sr-only) {
    display: block;
  }

  .nav-link.active {
    box-shadow: inset 0 -2px 0 var(--accent);
  }

  .nav-link .icon {
    width: 17px;
    height: 17px;
  }
}

#deals-list {
  display: grid;
  gap: 18px;
}

@media (max-width: 640px) {
  .sidebar .nav {
    position: fixed;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 10px;
    z-index: 45;
    flex-direction: row;
    justify-content: space-around;
    margin: 0;
    padding: 6px 8px;
    border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    box-shadow: var(--shadow-lift);
    backdrop-filter: blur(14px);
  }

  .main-inner {
    padding-bottom: 96px;
  }

  #toast-root {
    bottom: calc(82px + env(safe-area-inset-bottom));
  }
}

img[data-fade] {
  opacity: 0;
  filter: blur(8px);
  transform: scale(1.02);
  transition: opacity 260ms ease, filter 320ms ease, transform 320ms ease;
}

img[data-fade].loaded {
  opacity: 1;
  filter: none;
  transform: none;
}

.cover-editorial img {
  transition: opacity 220ms ease;
}

.cover-editorial img:not(.loaded) {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .cover-editorial img {
    transition: none;
  }
}

.run-steps {
  position: relative;
  gap: 0;
}

.run-step {
  position: relative;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 5px 0;
}

.run-step::before {
  content: "";
  position: absolute;
  top: 26px;
  bottom: -5px;
  left: 12px;
  width: 1px;
  background: var(--line);
}

.run-step:last-child::before {
  display: none;
}

.step-icon {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
}

@media (min-width: 641px) and (max-width: 900px) {
  .main-inner {
    padding: 26px 22px 64px;
  }

  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .filter-card {
    gap: 8px;
    padding: 12px;
  }

  .filter-card .search-field {
    flex-basis: 100%;
  }

  .filter-card .filter-field {
    flex: 1 1 140px;
  }

  .sidebar .nav-link {
    font-size: 12px;
  }
}

#view-content > * {
  animation: view-item 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

#view-content > *:nth-child(2) { animation-delay: 30ms; }
#view-content > *:nth-child(3) { animation-delay: 55ms; }
#view-content > *:nth-child(4) { animation-delay: 75ms; }

@keyframes view-item {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

[data-theme="dark"] :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline-color: var(--gold);
}

@media (min-width: 901px) {
  #page-header {
    position: sticky;
    top: 0;
    z-index: 15;
    margin: 0 -10px 22px;
    padding: 12px 10px 10px;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 62%, transparent);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(12px);
  }
}

@media (min-width: 901px) {
  #page-header.settings-page-header {
    position: static;
    top: auto;
    z-index: auto;
  }
}

.price-trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: var(--type-caption-sm);
  font-weight: 750;
}

.price-trend.down {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.price-trend .icon {
  width: 10px;
  height: 10px;
}

.price-trend-label {
  font-size: var(--type-caption-sm);
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .82;
}

/* On a card the arrow and percentage already say "recent drop"; the full label
   made the badge wide enough to wrap onto a line of its own. */
.game-card .price-trend-label {
  display: none;
}

.game-card .price-spark.is-flat {
  display: none;
}

.quick-alert-label {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.chart-crosshair {
  stroke: color-mix(in srgb, var(--accent) 55%, transparent);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  pointer-events: none;
}

.chart-crosshair[hidden] {
  display: none;
}

.sync-ring {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  transform: rotate(-90deg);
}

.sync-ring-track,
.sync-ring-value {
  fill: none;
  stroke-width: 3;
}

.sync-ring-track {
  stroke: var(--surface-3);
}

.sync-ring-value {
  stroke: var(--accent);
  stroke-linecap: round;
  transition: stroke-dashoffset 220ms ease;
}

.empty-wishlist .empty-illustration {
  background: var(--terracotta-soft);
  color: var(--terracotta);
}

.empty-search .empty-illustration {
  background: var(--gold-soft);
  color: var(--gold);
}

@media (max-width: 640px) {
  .store-health-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    padding: 10px 0;
  }

  .store-health-actions {
    justify-content: flex-start;
  }

  .event-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .event-row small {
    flex: 1 0 100%;
    margin-left: 14px;
  }
}

@media (max-width: 640px) {
  #page-header {
    position: sticky;
    top: 54px;
    z-index: 14;
    margin: 0 -4px 14px;
    padding: 8px 4px 7px;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    backdrop-filter: blur(12px);
  }

  #page-header .eyebrow,
  #page-header .page-subtitle {
    display: none;
  }

  #page-header .page-heading h1 {
    font-size: 25px;
    line-height: 1.05;
  }

  #page-header .header-actions {
    flex-direction: row;
    flex-wrap: nowrap;
  }

}

.settings-card,
.settings-form section {
  scroll-margin-top: 86px;
}

[data-theme="dark"] .empty-hobby {
  filter: brightness(.9) saturate(.85) contrast(1.05);
  opacity: .72;
}


.chart-store-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0 2px;
}

.chart-store-strip[hidden] {
  display: none;
}

.chart-store-card {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.chart-store-card strong {
  color: var(--ink);
  font-size: 11px;
}

.chart-store-card.active {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
  background: var(--accent-soft);
}

.public-share {
  margin-top: 8px;
  width: 100%;
  justify-content: center;
}

.pwa-banner {
  position: fixed;
  right: 16px;
  bottom: 18px;
  left: 16px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 620px;
  margin: 0 auto;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(12px);
}

.pwa-banner-copy {
  display: grid;
  flex: 1;
  gap: 1px;
}

.pwa-banner-copy strong {
  font-size: 11.5px;
}

.pwa-banner-copy span {
  color: var(--muted);
  font-size: 10px;
}

[data-theme="dark"] .price-chart text {
  fill: var(--ink-soft);
}

[data-theme="dark"] .chart-tooltip {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
}

@media (max-width: 640px) {
  .pwa-banner {
    right: 10px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: 10px;
  }
}

.cover-ribbon-card.skeleton {
  display: block;
  flex: 0 0 68px;
  width: 68px;
  height: 78px;
  background: linear-gradient(100deg, var(--surface-2) 20%, color-mix(in srgb, var(--surface-2) 50%, var(--surface)) 40%, var(--surface-2) 60%);
  background-size: 220% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  border-radius: 8px;
}

.chart-store-strip::-webkit-scrollbar {
  display: none;
}

.chart-empty {
  flex-wrap: wrap;
  align-items: center;
}

.chart-empty span {
  display: grid;
  gap: 2px;
  flex: 1;
}

.chart-empty strong {
  color: var(--ink-soft);
  font-size: 11px;
}

.chart-empty small {
  color: var(--muted);
  font-size: 10px;
}

.settings-target-flash {
  animation: target-flash 1.1s ease;
}

@keyframes target-flash {
  0%, 100% { box-shadow: none; }
  20% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 55%, transparent); }
}

.onboarding-shelf {
  padding: 24px;
}

.onboarding-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: start;
  gap: 24px;
}

.onboarding-journey {
  min-width: 0;
}

.onboarding-journey h2 {
  font-family: var(--serif);
  font-size: 28px;
}

.onboarding-journey > p:not(.eyebrow) {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.onboarding-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.onboarding-progress progress {
  width: 130px;
  height: 5px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  appearance: none;
}

.onboarding-progress progress::-webkit-progress-bar {
  border-radius: inherit;
  background: var(--line);
}

.onboarding-progress progress::-webkit-progress-value {
  border-radius: inherit;
  background: var(--accent);
}

.onboarding-progress progress::-moz-progress-bar {
  border-radius: inherit;
  background: var(--accent);
}

.onboarding-progress span {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
}

.onboarding-steps {
  position: relative;
  display: grid;
  gap: 6px;
  margin-bottom: 13px;
}

.onboarding-steps::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 24px;
  width: 1px;
  background: var(--line);
  pointer-events: none;
}

.onboarding-step {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: start;
  gap: 6px 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.onboarding-step.is-current {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 42%, var(--surface));
}

.onboarding-step.is-done .onboarding-icon {
  background: color-mix(in srgb, var(--success) 13%, var(--surface));
  color: var(--success);
}

.onboarding-step.is-pending {
  opacity: .74;
}

.onboarding-step > div {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 0;
}

.onboarding-number {
  position: absolute;
  top: -7px;
  left: 11px;
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
}

.onboarding-number .icon {
  width: 10px;
  height: 10px;
  color: var(--success);
}

.onboarding-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.onboarding-icon .icon {
  width: 15px;
  height: 15px;
}

.onboarding-step h3 {
  font-size: 13px;
}

.onboarding-step p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
}

.onboarding-state {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.onboarding-step.is-current .onboarding-state {
  color: var(--accent-deep);
}

.onboarding-step-link {
  grid-column: 3;
  grid-row: 2;
  justify-self: end;
  align-self: end;
  color: var(--accent-deep);
  font-size: var(--type-caption-sm);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.onboarding-cta {
  width: fit-content;
}

.onboarding-preview {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding-top: 26px;
}

.onboarding-preview-label {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
}

.onboarding-preview-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(150px 110px at 12% 0%, color-mix(in srgb, var(--gold-soft) 66%, transparent), transparent 70%),
    var(--surface-2);
  box-shadow: var(--shadow-lift);
  transform: rotate(-1.2deg);
}

.onboarding-preview-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.onboarding-preview-head .brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
}

.onboarding-preview-head strong {
  font-family: var(--serif);
  font-size: 13px;
}

.onboarding-preview-head span {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.onboarding-preview-shelf {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  min-height: 86px;
  padding: 8px 4px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 62%, transparent);
}

.onboarding-book {
  display: grid;
  width: 30px;
  height: 58px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--accent-deep);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 700;
}

.onboarding-book.is-back {
  height: 48px;
  opacity: .7;
  transform: rotate(-4deg);
}

.onboarding-book.is-front {
  height: 68px;
  transform: rotate(3deg);
}

.onboarding-book .icon {
  width: 14px;
  height: 14px;
}

.onboarding-preview-row {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.onboarding-preview-row b {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
}

.onboarding-preview-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.onboarding-preview-bell .icon {
  width: 12px;
  height: 12px;
  color: var(--gold);
}

@media (max-width: 760px) {
  .onboarding-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .onboarding-preview {
    max-width: 300px;
    padding-top: 0;
  }
}

.game-card.is-opening {
  pointer-events: none;
}

.game-card.is-opening::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  z-index: 4;
}

::view-transition-old(game-cover-transition),
::view-transition-new(game-cover-transition) {
  animation-duration: 260ms;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pull-refresh {
  position: fixed;
  top: 8px;
  left: 50%;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-lift);
  color: var(--muted);
  font-size: 10px;
  transform: translateX(-50%);
}

.pull-refresh .sync-spinner {
  width: 14px;
  height: 14px;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 28px;
  background: color-mix(in srgb, var(--bg) 92%, black);
  backdrop-filter: blur(14px);
}

.image-lightbox img {
  max-width: min(92vw, 720px);
  max-height: 86vh;
  border-radius: 14px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
  object-fit: contain;
}

.image-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
}

.detail-cover {
  padding: 0;
  border: 0;
  cursor: zoom-in;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .pull-refresh {
    top: auto;
    bottom: calc(80px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
  }
}

.image-lightbox[hidden],
.pull-refresh[hidden],
.pwa-banner[hidden] {
  display: none !important;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 220ms;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav {
  position: relative;
}

@media (max-width: 640px) {
  .nav::after {
    content: "";
    position: absolute;
    bottom: 5px;
    left: var(--nav-indicator-left, 0);
    width: var(--nav-indicator-width, 0);
    height: 36px;
    border-radius: 12px;
    background: var(--accent-soft);
    z-index: 0;
    transition: left 180ms ease, width 180ms ease;
  }

  .nav-link {
    position: relative;
    z-index: 1;
  }

  .nav-link.active {
    background: transparent;
    box-shadow: none;
  }
}

.card-actions {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 14px;
}

.card-actions[hidden] {
  display: none;
}

.card-actions-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(27, 20, 14, .44);
  backdrop-filter: blur(2px);
}

.card-actions-sheet {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  width: min(460px, 100%);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lift);
}

.card-actions-sheet .eyebrow {
  margin: 2px 4px 8px;
}

.card-actions-sheet > button:not(.card-actions-backdrop),
.card-actions-sheet > a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  text-align: left;
  font-size: 12px;
  text-decoration: none;
}

.card-actions-sheet > button:hover,
.card-actions-sheet > a:hover {
  background: var(--accent-soft);
}

.mobile-more-sheet > a .nav-count,
.mobile-more-sheet > button .nav-count {
  display: inline-block;
  margin-left: auto;
}

@media (pointer: coarse) {
}

.price-spark circle {
  cursor: help;
  pointer-events: all;
}

#view-content.route-in {
  animation: route-in 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes route-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

.content-revealed {
  animation: content-reveal var(--motion-base) var(--ease-standard);
}

@keyframes content-reveal {
  from { opacity: .58; transform: translateY(2px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  #view-content.route-in {
    animation: none;
    transform: none;
  }
}

.chart-source-swatch.dash-1 {
  background-image: repeating-linear-gradient(90deg, transparent 0 2px, rgba(255,255,255,.72) 2px 3px);
}
.chart-source-swatch.dash-2 {
  background-image: repeating-linear-gradient(45deg, transparent 0 1px, rgba(255,255,255,.7) 1px 2px);
}
.chart-source-swatch.dash-3 {
  background-image: repeating-linear-gradient(90deg, transparent 0 3px, rgba(255,255,255,.72) 3px 5px);
}
.chart-source-swatch.dash-4 {
  background-image: repeating-linear-gradient(0deg, transparent 0 2px, rgba(255,255,255,.72) 2px 3px);
}

.chart-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: chart-draw 700ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.spark-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: chart-draw 500ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes chart-draw {
  to { stroke-dashoffset: 0; }
}

.chart-store-strip {
  scroll-snap-type: x proximity;
}

.chart-store-card {
  scroll-snap-align: start;
}

@media print {
  .sidebar,
  .page-header,
  #page-header,
  .filter-card,
.app-shell {
    display: block;
  }

  .main-inner {
    padding: 0;
  }

  .game-card {
    break-inside: avoid;
    box-shadow: none;
  }
}

.shortcuts-sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}

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

.shortcuts-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(27, 20, 14, .46);
  backdrop-filter: blur(3px);
}

.shortcuts-card {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lift);
}

.shortcut-list {
  display: grid;
  gap: 2px;
  margin-top: 12px;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 4px;
  border-top: 1px dashed var(--line);
  color: var(--ink-soft);
  font-size: 11px;
}

.shortcut-row kbd {
  min-width: 92px;
  text-align: center;
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 520px) {
  .sidebar {
    padding: 5px 12px;
  }

  #page-header {
    top: 48px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  #page-header .page-heading h1 {
    font-size: 23px;
  }

  .main-inner {
    padding-bottom: 78px;
  }

  .modal {
    max-height: 100vh;
    border-radius: 0;
  }

  .detail-body {
    padding: 12px 16px 20px;
  }

}

.theme-transition::view-transition-old(root) {
  animation: none;
  z-index: 1;
}

.theme-transition::view-transition-new(root) {
  z-index: 2;
  clip-path: circle(0 at var(--theme-reveal-x, 50%) var(--theme-reveal-y, 50%));
  animation: theme-reveal 420ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes theme-reveal {
  to { clip-path: circle(var(--theme-reveal-radius, 120vmax) at var(--theme-reveal-x, 50%) var(--theme-reveal-y, 50%)); }
}

.price-change {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 8.5px;
  font-weight: 800;
}

.price-change.down {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.price-change.up {
  background: var(--terracotta-soft);
  color: #6f301a;
}

.price-change .icon {
  width: 9px;
  height: 9px;
}

.game-card.price-changed {
  animation: price-changed 1.2s ease;
}

@keyframes price-changed {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 36%, transparent); }
  35% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.cover-price-tag {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 3;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  max-width: calc(100% - 12px);
  padding: 3px 6px;
  border: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--ink);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  line-height: 1.1;
  box-shadow: 0 4px 12px -8px rgba(0, 0, 0, .65);
  backdrop-filter: blur(6px);
}

.cover-price-tag b {
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 750;
  letter-spacing: .04em;
}

.cover-price-tag.at-low {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.cover-price-tag.at-low b {
  color: var(--accent-deep);
}

.quick-alert {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 999px;
  background: transparent;
  color: var(--accent-deep);
  font-size: 10.5px;
  font-weight: 650;
  cursor: pointer;
  pointer-events: auto;
}

.quick-alert .icon {
  width: 12px;
  height: 12px;
}

.quick-alert:hover {
  background: var(--accent-soft);
}

.quick-alert.active {
  border-style: solid;
  color: var(--muted);
  background: var(--surface-2);
}

.price-pill {
  flex-shrink: 0;
  white-space: nowrap;
}

.detail-language-filter {
  max-width: 150px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font: inherit;
  font-size: 11px;
  padding: 7px 24px 7px 10px;
}

.game-card {
  container-type: inline-size;
}

@container (max-width: 520px) {
  .game-card .price-pill {
    min-width: 0;
    max-width: 100%;
  }

  /* One compact low label, never the full phrase plus a duplicate. */
  .game-card .price-pill .low-badge-text {
    display: none;
  }

  .game-card .price-pill .low-badge-short {
    display: inline;
  }

.game-card .price-pill .good-price-badge {
    padding: 0;
  }
}

@container (max-width: 420px) {
  .game-card .price-spark {
    display: none;
  }
}

.search-field {
  gap: 10px;
  padding: 0 22px;
}

.search-field input {
  padding-left: 6px;
  padding-right: 8px;
}

.command-field {
  gap: 12px;
  padding: 14px 26px 14px 28px;
}

.command-field input {
  padding-left: 6px;
  padding-right: 4px;
}

.filter-card {
  position: relative;
  z-index: 30;
}

.filter-card .store-filter[open] {
  position: relative;
  z-index: 1001;
}

.filter-card .store-filter-menu {
  z-index: 1002;
}

[data-theme="dark"] .price-pill strong,
.detail-column-main,
.detail-column-side {
  grid-template-columns: minmax(0, 1fr);
}

.best-total-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 9px;
  min-width: 0;
}

.best-total-store {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.best-total-open {
  position: absolute;
  top: 50%;
  right: 12px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  transform: translateY(-50%);
}

.best-total-open .icon {
  width: 13px;
  height: 13px;
}

.best-total-offer {
  width: fit-content;
  max-width: 100%;
}

.detail-offers {
  min-width: 0;
}

.best-total-offer {
  text-decoration: none;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

a.best-total-offer:hover {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 82%, var(--surface));
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -26px rgba(57, 44, 26, .85);
}

a.best-total-offer:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.best-total-offer .best-total-copy {
  flex: 1 1 auto;
}

.filter-card .filter-more-toggle,
.filter-card .reset-filters {
  min-height: 38px;
}

/* Desktop keeps the preferences open in the sidebar: the gear toggle is a
   mobile-only affordance. The app opens the details at the desktop width and
   closes it when the viewport crosses back below the breakpoint. */
@media (min-width: 901px) {
  .sidebar-preferences > summary {
    display: none;
  }
}

@media (max-width: 900px) {
  .sidebar {
    grid-template-rows: auto;
    height: auto;
    padding: 9px 16px;
  }

  .sidebar-preferences {
    position: relative;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    padding: 0;
  }

  .sidebar-preferences summary {
    width: 34px;
    min-width: 34px;
    height: 30px;
    padding: 0;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: color-mix(in srgb, var(--surface) 55%, transparent);
    color: var(--ink-soft);
  }

  .sidebar-preferences[open] .sidebar-extras {
    /* One row: theme, app actions, language and currency side by side. The
       selects shrink instead of the row wrapping, so the popover stays a
       single 44px strip over the page rather than a 178px column. */
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    width: min(360px, calc(100vw - 24px));
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
    box-shadow: var(--shadow-lift);
  }

  .sidebar-preferences[open] .sidebar-extras > * {
    min-width: 0;
    flex: 0 0 auto;
  }

  .sidebar-preferences[open] .sidebar-app {
    flex-direction: row;
    gap: 4px;
  }

  .sidebar-preferences[open] .sidebar-pickers {
    flex: 0 1 auto;
    gap: 4px;
  }

  .sidebar-preferences[open] .sidebar-pickers .currency-control,
  .sidebar-preferences[open] .sidebar-pickers .language-control {
    width: auto;
    min-width: 0;
    height: 34px;
    padding: 0 6px;
  }

  .sidebar-preferences[open] .sidebar-pickers select {
    min-width: 0;
    max-width: 92px;
    font-size: 11px;
  }

  .sidebar-preferences[open] .sidebar-extras .theme-button,
  .sidebar-preferences[open] .sidebar-app .theme-button {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
  }
}

body.modal-open {
  overscroll-behavior: none;
}

.modal-scroll {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
  .modal-backdrop {
    overflow: hidden;
  }

  .modal {
    height: 100%;
    max-height: 100%;
    height: 100dvh;
    max-height: 100dvh;
  }

  .modal-scroll {
    height: 100%;
    max-height: 100%;
    height: 100dvh;
    max-height: 100dvh;
  }
}

@media (max-width: 900px) {
  #page-header {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
  }

  .page-heading {
    flex: 1 1 220px;
    min-width: 0;
  }

  .header-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
    padding-top: 0;
  }

  .header-actions .sync-icon-button {
    width: 38px;
    height: 38px;
    padding: 0;
  }
}

@media (max-width: 640px) {
  .nav-link span:not(.nav-count):not(.sr-only) {
    display: none;
  }

  .nav-link {
    justify-content: center;
  }

  .nav-link .icon {
    width: 19px;
    height: 19px;
  }
}

@media (max-width: 640px) {
  .nav::after {
    bottom: calc(5px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 640px) {
  #page-header {
    position: static;
    top: auto;
  }
}

@media (max-width: 640px) {
  .nav::after {
    top: var(--nav-indicator-top, 14px);
    bottom: auto;
  }
}

.page-title-count {
  display: inline-block;
  margin-left: 0.18em;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.42em;
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: 0.18em;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .sidebar .nav {
    right: 0;
    bottom: 0;
    left: 0;
    padding: 4px 6px env(safe-area-inset-bottom);
    border: 0;
    border-top: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    border-radius: 16px 16px 0 0;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    box-shadow: 0 -12px 30px -24px rgba(57, 44, 26, .55);
  }
}

@media (max-width: 900px) {
  .header-actions {
    margin-left: auto;
  }
}
.private-collection-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line));
  background: var(--gold-soft);
}
.private-collection-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--surface);
}
.private-collection-icon svg { width: 19px; height: 19px; }
.private-collection-copy { flex: 1 1 320px; min-width: 0; }
.private-collection-copy .eyebrow { margin-bottom: 2px; }
.private-collection-copy h3 { margin: 0 0 3px; font-size: 17px; }
.private-collection-copy p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13.5px; max-width: 68ch; }
.private-collection-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .private-collection-banner { align-items: flex-start; }
  .private-collection-actions { flex-basis: 100%; }
}
.settings-lede {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.sync-cadence {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
  text-align: center;
}
.sync-cadence a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.update-rhythm {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.update-rhythm-next {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 12px;
  background: var(--accent-soft);
}
.update-rhythm-next .eyebrow { margin: 0; }
.update-rhythm-next strong { font-size: 14px; }
.update-rhythm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}
.update-rhythm-item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}
.update-rhythm-item strong { display: block; font-size: 13px; }
.update-rhythm-item p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
@media (max-width: 640px) {
  .update-rhythm-next { flex-direction: column; gap: 3px; }
}
.guided-tour {
  position: fixed;
  inset: 0;
  z-index: 5000;
  pointer-events: auto;
}

.guided-tour[hidden] { display: none; }

.guided-tour.is-unanchored::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(18, 14, 10, .62);
}

.guided-tour-spotlight {
  position: fixed;
  z-index: 1;
  border: 2px solid var(--accent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  box-shadow: 0 0 0 9999px rgba(18, 14, 10, .62);
  pointer-events: none;
  transition: left 140ms ease, top 140ms ease, width 140ms ease, height 140ms ease;
}

.guided-tour-spotlight[hidden] { display: none; }

.guided-tour-card {
  position: fixed;
  z-index: 2;
  width: min(360px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 60px -24px rgba(20, 14, 7, .5);
  outline: none;
}

.guided-tour-card.is-centered {
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
}

.guided-tour-card.is-mobile {
  right: 12px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  left: 12px;
  width: auto;
  max-height: calc(100vh - 120px);
}

.guided-tour-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.guided-tour-progress {
  height: 3px;
  margin: 10px 0 18px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.guided-tour-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width 180ms ease;
}

.guided-tour-card h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.08;
}

.guided-tour-card > p {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.55;
}

.guided-tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.guided-tour-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.guided-tour-skip {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.guided-tour-skip:hover { color: var(--ink); }

.settings-tour-button { flex: 0 0 auto; }

body.guided-tour-open { overflow: hidden; }

@media (max-width: 640px) {
  .settings-tour-button { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .guided-tour-spotlight,
  .guided-tour-progress span { transition: none; }
}
.guided-tour-progress progress {
  display: block;
  width: 100%;
  height: 3px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  overflow: hidden;
}
.guided-tour-progress progress::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--surface-2);
}
.guided-tour-progress progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}
.guided-tour-progress progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}
.settings-toc {
  flex-wrap: wrap;
  overflow-x: visible;
  border-radius: 18px;
}

#page-header {
  align-items: center;
  gap: 16px;
}

.page-breadcrumb {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  color: var(--muted);
  line-height: 1.1;
}

.page-kicker {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .09em;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.page-breadcrumb a {
  color: var(--muted);
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.page-breadcrumb a:hover { color: var(--ink); }

#page-header .page-breadcrumb h1 {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-breadcrumb .page-title-count {
  margin-left: 0.3em;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.42em;
  font-weight: 650;
  letter-spacing: 0;
  vertical-align: 0.16em;
}

#page-header .header-actions {
  padding-top: 0;
}

@media (min-width: 901px) {
  #page-header {
    margin-bottom: 18px;
    padding: 8px 10px 7px;
  }
}

@media (max-width: 640px) {
  #page-header.settings-page-header .page-breadcrumb {
    flex: 1 1 auto;
    min-width: 0;
  }
}
.mobile-breadcrumb { display: none; }

@media (max-width: 640px) {
  .mobile-breadcrumb {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.3;
  }

  .mobile-crumb-path > a,
  .mobile-crumb-path .breadcrumb-sep {
    display: none;
  }

  .mobile-breadcrumb .mobile-crumb-current {
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-breadcrumb .page-title-count {
    margin-left: 0.2em;
    font-size: 10px;
    vertical-align: baseline;
  }

  #page-header .page-breadcrumb {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  #page-header.header-empty-actions {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
    background: none;
    backdrop-filter: none;
  }
}
.mobile-crumb-path {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.mobile-page-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}
.mobile-page-actions.has-sync-menu .header-sync-status,
.mobile-page-actions.has-sync-menu .sync-header-button {
  display: none;
}

.mobile-page-actions.has-sync-menu .sync-mobile-menu {
  display: inline-block;
}


@media (max-width: 640px) {
  #page-header,
  #page-header.header-empty-actions,
  #page-header.settings-page-header {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
    background: none;
    backdrop-filter: none;
  }

  #page-header .header-actions { display: none; }

  .mobile-page-actions .btn {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
    font-size: 0;
    border-radius: 50%;
  }

  .mobile-page-actions .btn .icon {
    width: 16px;
    height: 16px;
  }
}
.settings-autosave-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.3;
  white-space: nowrap;
}
.settings-autosave-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--muted-2);
}
.settings-autosave-status[data-state="saved"] .settings-autosave-dot { background: var(--success); }
.settings-autosave-status[data-state="pending"] .settings-autosave-dot,
.settings-autosave-status[data-state="saving"] .settings-autosave-dot { background: var(--gold); }
.settings-autosave-status[data-state="error"] .settings-autosave-dot { background: var(--danger); }
@media (max-width: 640px) {
  .settings-autosave-status .settings-autosave-label { display: none; }
}

.coverage-fact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  text-align: left;
  cursor: pointer;
}
.coverage-fact:hover { color: var(--ink); }
.coverage-fact.active {
  padding: 2px 6px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.coverage-fact strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.coverage-fact.active strong { color: inherit; }
.coverage-clear {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.coverage-clear:hover { color: var(--ink); }

.price-verdict {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background:
    radial-gradient(280px 140px at 0% 0%, color-mix(in srgb, var(--gold-soft) 55%, transparent), transparent 75%),
    color-mix(in srgb, var(--surface) 88%, var(--accent-soft));
}

.price-verdict.is-good {
  border-color: color-mix(in srgb, var(--success) 38%, var(--line));
}

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

.verdict-toggle {
  display: none;
}

.price-verdict-extra {
  display: grid;
  gap: 10px;
  min-width: 0;
}

@media (max-width: 640px) {
  .verdict-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    padding: 0;
    border: 0;
    border-top: 1px dashed var(--line);
    background: transparent;
    color: var(--accent-deep);
    font: inherit;
    font-size: 11.5px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
  }

  .verdict-toggle .icon {
    width: 14px;
    height: 14px;
    color: var(--muted);
    transition: transform 150ms ease;
  }

  .price-verdict.is-open .verdict-toggle .icon {
    transform: rotate(180deg);
  }

  .price-verdict:not(.is-open) .price-verdict-extra {
    display: none;
  }
}

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

.verdict-copy h2 {
  margin: 2px 0 3px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -.025em;
}

.verdict-copy p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.price-verdict .best-total-offer {
  width: 100%;
}

/* A bare "0/7 days" next to an empty bar said nothing; this states the reason. */
.verdict-progress {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.verdict-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
}

.verdict-context b {
  color: var(--ink-soft);
  font-weight: 800;
}

.quick-alert.first-offer {
  margin-left: 0;
  white-space: nowrap;
}
.first-offer-watch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
  padding: 8px 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 10.5px;
}
.first-offer-watch.active {
  border-style: solid;
  border-color: color-mix(in srgb, var(--success) 35%, var(--line));
  background: color-mix(in srgb, var(--success) 8%, transparent);
}
.first-offer-watch .icon { color: var(--accent-deep); }
.first-offer-watch .btn { margin-left: auto; }
.first-offer-cta { margin: 8px 0; }

.alert-push-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
  padding: 8px 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 10.5px;
}
.alert-push-cta .icon { color: var(--accent-deep); }
.alert-push-cta .btn { margin-left: auto; }

@media (max-width: 640px) {
  .alert-push-cta.shelf-alert-push {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    padding: 8px 10px;
    font-size: 10.5px;
  }

  .alert-push-cta.shelf-alert-push > span {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .alert-push-cta.shelf-alert-push .btn {
    min-height: 44px;
    margin: 0;
    padding: 4px 9px;
    font-size: 10.5px;
    white-space: nowrap;
  }

  .alert-push-cta.shelf-alert-push .btn[data-action="dismiss-notifications-cta"] {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }
}

.alert-history {
  display: grid;
  gap: 3px;
  margin: 8px 0;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 10px;
}
.alert-history > strong { color: var(--ink-soft); font-size: 10.5px; }
.alert-hit {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.alert-hit small { white-space: nowrap; }

.admin-inbox-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-color: color-mix(in srgb, var(--danger) 28%, var(--line));
  background: var(--danger-soft);
}
.admin-inbox-banner > div {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.admin-inbox-banner strong { color: var(--danger); font-size: 12px; }
.admin-inbox-banner small { color: var(--ink-soft); font-size: 10.5px; }
.admin-inbox-banner .btn { margin-left: auto; }

.store-health-row.is-unread {
  margin: 0 -8px;
  padding: 7px 8px;
  border-radius: 8px;
  background: var(--danger-soft);
}
.outbox-body {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  line-height: 1.35;
}
.inbox-more {
  display: flex;
  margin: 10px auto 0;
}
.gtin-coverage,
.language-coverage {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 6px;
}
.gtin-coverage .settings-footnote,
.language-coverage .settings-footnote { margin: 0; }
.gtin-by-store,
.language-by-store,
.gtin-conflicts {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 10.5px;
}
.gtin-by-store summary,
.language-by-store summary,
.gtin-conflicts summary {
  cursor: pointer;
  font-weight: 650;
}
.gtin-by-store summary,
.language-by-store summary { color: var(--ink-soft); }
.gtin-by-store ul,
.language-by-store ul,
.gtin-conflicts ul {
  display: grid;
  gap: 4px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.gtin-by-store li,
.language-by-store li,
.gtin-conflicts li {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 8px;
  padding: 4px 6px;
  border-left: 2px solid var(--line-strong);
  background: var(--surface-2);
}
.gtin-by-store li b,
.language-by-store li b { color: var(--ink); }
.gtin-by-store li span,
.language-by-store li span { margin-left: auto; }
.gtin-conflicts summary {
  cursor: pointer;
  color: var(--danger);
  font-weight: 650;
}
.gtin-conflicts ul {
  display: grid;
  gap: 4px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.gtin-conflicts li {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 8px;
  padding: 4px 6px;
  border-left: 2px solid var(--danger);
  background: var(--danger-soft);
}
.gtin-conflicts code { color: var(--ink); }
.gtin-conflicts .text-action { margin-left: auto; }
.run-step-stats {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
}
.run-resumed {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  color: var(--accent-deep);
  font-size: 10.5px;
}

.weekly-report {
  margin-bottom: 10px;
  padding: 12px 14px;
}
.weekly-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.weekly-report-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10.5px;
}
.weekly-report-grid strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.alert-filters {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  padding: 14px 16px;
}
/* The store and window selects sat in one row inside Deals and wrap onto two
   columns on a narrow screen instead of stretching the panel. */
.alert-filter-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.alert-filter-fields .filter-field {
  flex: 1 1 150px;
  max-width: 260px;
}
.alert-load-more {
  display: flex;
  margin: 12px auto 0;
}
.alert-feed-groups {
  display: grid;
  gap: 18px;
}

.alert-day-group {
  display: grid;
  gap: 8px;
}

.alert-day-group h2 {
  margin: 0;
  padding: 0 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.alert-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}

.alert-feed-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.alert-feed-item:hover {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--surface) 90%, var(--accent-soft));
}

.alert-feed-target_hit { border-left: 3px solid var(--success); }
.alert-feed-price_drop { border-left: 3px solid var(--terracotta); }
.alert-feed-restock { border-left: 3px solid var(--gold); }
.alert-feed-new_listing { border-left: 3px solid var(--accent); }
.alert-feed-target_hit .alert-feed-kind {
  color: color-mix(in srgb, var(--success) 55%, var(--ink));
  background: color-mix(in srgb, var(--success) 10%, transparent);
}
.alert-feed-price_drop .alert-feed-kind {
  color: var(--terracotta);
  background: color-mix(in srgb, var(--terracotta) 11%, transparent);
}
.alert-feed-restock .alert-feed-kind {
  color: var(--gold);
  background: color-mix(in srgb, var(--gold) 12%, transparent);
}
.alert-feed-new_listing .alert-feed-kind {
  color: var(--accent-deep);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.alert-feed-item.is-spotlight.alert-feed-target_hit {
  background: linear-gradient(100deg, color-mix(in srgb, var(--success) 6%, var(--surface)), var(--surface) 55%);
}
.alert-feed-item.is-spotlight.alert-feed-price_drop {
  background: linear-gradient(100deg, color-mix(in srgb, var(--terracotta) 6%, var(--surface)), var(--surface) 55%);
}
.alert-feed-item.is-spotlight.alert-feed-restock {
  background: linear-gradient(100deg, color-mix(in srgb, var(--gold) 7%, var(--surface)), var(--surface) 55%);
}
.alert-feed-item.is-spotlight.alert-feed-new_listing {
  background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 5%, var(--surface)), var(--surface) 55%);
}

.alert-feed-cover {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 8px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 15px;
}

.alert-feed-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.alert-feed-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.alert-feed-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 8px;
  min-width: 0;
}

.alert-feed-kind {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  padding: 3px 8px;
  overflow: visible;
  border-radius: 999px;
  color: var(--accent-deep);
  font-size: var(--type-caption-sm);
  font-weight: 700;
  letter-spacing: .04em;
  text-overflow: clip;
  text-transform: uppercase;
  white-space: nowrap;
}

.alert-feed-kind .icon {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
}

.alert-feed-copy strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-feed-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-feed-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  color: var(--muted-2);
  font-size: var(--type-caption-sm);
  white-space: nowrap;
}

.alert-feed-count {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: var(--type-caption-sm);
}

@media (max-width: 640px) {
  .alert-feed {
    grid-template-columns: 1fr;
  }
}


.modal-mobile-offer {
  display: none;
}

@media (max-width: 640px) {
  .modal.has-mobile-offer .modal-scroll {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .modal-mobile-offer {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 16px calc(9px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: 0 -12px 30px -24px rgba(0, 0, 0, .7);
    backdrop-filter: blur(12px);
    transition: transform var(--motion-base) var(--ease-standard), opacity var(--motion-base) var(--ease-standard);
  }

  .modal-mobile-offer.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(100%);
  }

  .mobile-offer-copy {
    position: relative;
    display: grid;
    min-width: 0;
    gap: 1px;
    padding: 0 16px 0 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
  }

  .mobile-offer-reading-cue {
    position: absolute;
    top: 50%;
    right: 0;
    color: var(--muted);
    transform: translateY(-50%);
  }

  .mobile-offer-reading-cue .icon {
    width: 12px;
    height: 12px;
  }

  .mobile-offer-copy small {
    color: var(--muted);
    font-size: var(--type-caption-sm);
    font-weight: 650;
  }

  .mobile-offer-copy strong {
    color: var(--accent-deep);
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 650;
    letter-spacing: -.02em;
  }

  .mobile-offer-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 5px;
  }

  .mobile-offer-fallback {
    display: none;
  }

  .mobile-offer-verdict {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    max-width: 14ch;
    overflow: hidden;
    padding: 1px 5px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--ink-soft);
    font-family: var(--sans);
    font-size: 10px;
    font-style: normal;
    font-weight: 750;
    letter-spacing: .02em;
    line-height: 1.5;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .mobile-offer-verdict.is-low {
    background: var(--accent-soft);
    color: var(--accent-deep);
  }

  .mobile-offer-verdict.is-good {
    background: color-mix(in srgb, var(--success) 14%, var(--surface));
    color: var(--success);
  }

  .mobile-offer-verdict.is-high {
    background: var(--danger-soft);
    color: var(--danger);
  }

  .mobile-offer-copy span {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .modal-mobile-offer .btn {
    flex: 0 0 auto;
  }

  .modal-mobile-offer.is-alert-only .modal-mobile-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .modal-mobile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 0;
  }

  .modal-mobile-alert {
    gap: 5px;
    padding: 0 10px;
  }

  .modal-mobile-alert span {
    font-size: 10.5px;
    font-weight: 650;
    white-space: nowrap;
  }

  .modal-mobile-sep {
    flex: 0 0 auto;
    width: 1px;
    height: 26px;
    background: var(--line-strong);
  }

  .modal-mobile-alert .icon {
    width: 17px;
    height: 17px;
  }
}

@media (max-width: 360px) {
  .modal-mobile-open {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
  }

  .modal-mobile-open-label {
    display: none;
  }

  .modal-mobile-offer .mobile-offer-verdict {
    display: none;
  }

  .modal-mobile-offer .mobile-offer-fallback {
    display: inline;
  }

  .header-price-compact .header-price-store {
    display: none;
  }

  .header-price-compact .mobile-offer-verdict {
    display: inline-flex;
    max-width: 11ch;
    font-size: var(--type-caption-sm);
  }
}


@media (max-width: 640px) {
  .filter-primary .search-field {
    flex-basis: 100%;
  }

  .filter-primary .filter-sort {
    flex: 1 1 150px;
  }

  .filter-primary .reset-filters {
    width: auto;
    flex: 0 0 auto;
  }

  .filter-primary .toolbar-note {
    flex-basis: 100%;
    margin-left: 0;
    padding: 2px 2px 0;
    /* The base rule keeps this on one line, which overflowed the 390px column
       by 131px once the note sat on its own row. Let it wrap. */
    white-space: normal;
  }
}

/* ---------- readability and badge polish ---------- */

.filter-field > span,
.filter-field.range-field > span,
.year-range-field > span,
.mechanic-mode {
  font-size: 10.5px;
}

.toggle-field {
  font-size: 12px;
}

.game-meta {
  font-size: 11.5px;
}

.store,
.freshness-badge {
  font-size: 10px;
}

.cover-rank {
  font-size: var(--type-caption-sm);
}

.cover-language {
  font-size: 8.5px;
}

.tag {
  font-size: var(--type-caption-sm);
  border-radius: 999px;
}

.settings-footnote {
  font-size: 11px;
}

.public-foot {
  font-size: 11px;
}

@container (max-width: 520px) {
  .game-card .price-row-main {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .game-card .price-row-visual {
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  .cover-rank {
    font-size: 10px;
  }

  .cover-language {
    font-size: var(--type-caption-sm);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .filter-card:not(.advanced-collapsed) .filter-advanced {
    animation: filter-panel-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
    transform-origin: top center;
  }

  .store-filter[open] .store-filter-menu {
    animation: filter-popover-in 150ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
    transform-origin: top left;
  }
}

@keyframes filter-panel-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

@keyframes filter-popover-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .filter-card .filter-advanced,
  .store-filter-menu {
    animation: none;
  }
}

@media (max-width: 640px) {
  .filter-primary .reset-filters {
    width: 38px;
    min-width: 38px;
    padding: 0;
    font-size: 0;
  }

  .filter-primary .reset-filters .icon {
    width: 16px;
    height: 16px;
    margin: 0;
  }

  .filter-condition {
    flex: 1 1 100%;
  }
}

@media (max-width: 640px) {
  .filter-primary .filter-more-toggle {
    width: 38px;
    min-width: 38px;
    padding: 0;
  }

  .filter-primary .filter-more-toggle .filter-toggle-label {
    display: none;
  }

  .filter-primary .filter-more-toggle .icon {
    width: 16px;
    height: 16px;
    margin: 0;
  }
}

@media (min-width: 641px) {
  html.compact-cards .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 9px;
  }

  html.compact-cards .game-card {
    grid-template-columns: 68px minmax(0, 1fr);
    min-height: 112px;
    padding: 11px;
    gap: 11px;
  }

  html.compact-cards .game-card .cover {
    width: 68px;
    height: 92px;
    border-radius: 10px;
  }

  html.compact-cards .game-title {
    font-size: 17px;
  }

  html.compact-cards .game-meta {
    font-size: 10.5px;
  }

  html.compact-cards .cover-rank,
  html.compact-cards .cover-language {
    font-size: var(--type-caption-sm);
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
    background-position: 0 0;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .filter-card .filter-advanced {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }

  .filter-card .filter-advanced .mechanic-filter-field {
    grid-column: 1 / -1;
  }

  .filter-card .filter-advanced .filter-field,
  .filter-card .filter-advanced .toggle-field {
    width: 100%;
  }

  html.compact-cards .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

.cover-meta-rail {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  max-width: calc(100% - 14px);
}

.cover-meta-rail .cover-rank,
.cover-meta-rail .cover-language,
.cover-meta-rail .cover-expansion {
  position: static;
  top: auto;
  left: auto;
}

@media (max-width: 640px) {
  .cover-meta-rail {
    top: 4px;
    left: 4px;
    gap: 2px;
    max-width: calc(100% - 8px);
  }
}

.view-switcher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.view-switcher-label {
  margin-right: 2px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 1279px) {
  .view-switcher-label { display: none; }
}

.view-button.is-active {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

/* Cover focal treatment */
.cover img {
  object-position: center 34%;
}

.cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 38%;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(35, 28, 20, .28));
}

[data-theme="dark"] .cover::after {
  background: linear-gradient(transparent, rgba(0, 0, 0, .42));
}

/* Shelf layout */
@media (min-width: 641px) {
  html.shelf-view .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    column-gap: 12px;
    row-gap: 28px;
    align-items: start;
  }

  html.shelf-view .game-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0 7px 14px;
    gap: 8px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
  }

  html.shelf-view .game-card::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1px;
    background: var(--line-strong);
    box-shadow: 0 3px 5px -4px rgba(35, 28, 20, .45);
  }

  html.shelf-view .game-card:hover {
    transform: translateY(-2px);
    background: transparent;
    box-shadow: none;
  }

  /* The shelf draws covers at ~185px against 88px in the card grid, so the
     chip has to grow with it or it reads as a smudge. */
  html.shelf-view .cover-expansion {
    top: 8px;
    left: 8px;
    padding: 3px 9px;
    font-size: 10px;
    letter-spacing: .08em;
  }

  html.shelf-view .cover-language {
    top: 8px;
    left: 8px;
    padding: 2px 7px;
    font-size: 10px;
  }

  /* The language chip takes the corner; the expansion chip follows below it. */
  html.shelf-view .cover-language ~ .cover-expansion {
    top: 34px;
  }

  html.shelf-view .game-card .cover {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    border-radius: 9px;
    box-shadow: 0 14px 24px -20px rgba(35, 28, 20, .7);
  }

  html.shelf-view .game-main {
    width: 100%;
  }

  html.shelf-view .game-title {
    font-size: 15.5px;
    line-height: 1.14;
  }

  html.shelf-view .game-meta {
    gap: 3px;
    margin-top: 1px;
    font-size: 10px;
  }

  html.shelf-view .cover-price-tag,
  html.shelf-view .price-row-secondary,
  html.shelf-view .price-spark {
    display: none;
  }

  html.shelf-view .card-price-area {
    margin-top: 1px;
  }

  html.shelf-view .price-row-main {
    min-width: 0;
  }

  html.shelf-view .price-lead {
    max-width: 100%;
  }

  html.shelf-view .price-lead strong {
    font-size: 13px;
  }

  html.shelf-view .price-lead .store-name,
  html.compact-cards .price-lead .store-name {
    display: none;
  }

  html.shelf-view .price-lead .store-short,
  html.compact-cards .price-lead .store-short {
    display: inline;
  }

  html.shelf-view .cover-rank,
  html.shelf-view .cover-language {
    font-size: var(--type-caption-sm);
  }
}

@media (max-width: 640px) {
  html.shelf-view .game-grid,
  html.compact-cards .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 9px;
    align-items: start;
  }

  html.shelf-view .game-card,
  html.compact-cards .game-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0 5px 11px;
    gap: 6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
  }

  html.shelf-view .game-card::after,
  html.compact-cards .game-card::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1px;
    background: var(--line-strong);
  }

  html.shelf-view .game-card .cover,
  html.compact-cards .game-card .cover {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    border-radius: 8px;
  }

  html.shelf-view .game-title,
  html.compact-cards .game-title {
    font-size: 13.5px;
    line-height: 1.12;
    -webkit-line-clamp: 2;
  }

  html.shelf-view .game-meta,
  html.compact-cards .game-meta {
    font-size: 10.5px;
  }

  html.shelf-view .cover-price-tag,
  html.shelf-view .price-row-secondary,
  html.shelf-view .price-spark,
  html.compact-cards .cover-price-tag,
  html.compact-cards .price-row-secondary,
  html.compact-cards .price-spark {
    display: none;
  }

  html.shelf-view .price-lead,
  html.compact-cards .price-lead {
    max-width: 100%;
  }

  html.shelf-view .price-lead strong,
  html.compact-cards .price-lead strong {
    font-size: 12.5px;
  }

  html.shelf-view .price-lead .store,
  html.compact-cards .price-lead .store {
    font-size: var(--type-caption-sm);
  }

  html.shelf-view .price-lead .store-name,
  html.compact-cards .price-lead .store-name {
    display: none;
  }

  html.shelf-view .price-lead .store-short,
  html.compact-cards .price-lead .store-short {
    display: inline;
  }
}

.empty-art {
  width: 112px;
  height: 76px;
  margin: 0 auto 2px;
  color: var(--accent);
  opacity: .88;
}

.empty-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.storeless-shelf > .empty-art {
  flex: 0 0 88px;
  width: 88px;
  height: 64px;
  margin: 0;
}

.private-collection-icon .empty-art {
  width: 28px;
  height: 28px;
  margin: 0;
  color: var(--surface);
  opacity: 1;
}

.private-collection-icon .empty-art svg {
  width: 28px;
  height: 28px;
}

@media (prefers-reduced-motion: no-preference) {
  .game-grid.view-layout-changing {
    animation: view-layout-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }
}

@keyframes view-layout-in {
  from { opacity: .55; transform: translateY(2px); }
  to { opacity: 1; transform: none; }
}

/*
 * Skeletons reserve the height their view will need, so switching between
 * cards/compact/shelf does not jump the list while the fetch is in flight.
 */
.skeleton-card {
  min-height: 124px;
}

html.compact-cards .skeleton-card {
  min-height: 112px;
}

@media (min-width: 641px) {
  html.shelf-view .skeleton-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 268px;
    padding: 0 7px 14px;
  }

  html.shelf-view .skeleton-card .cover {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
  }
}

/* Public share pages put server-rendered content inside #app before hydration.
   The boot screen stays in the shell for the app's normal fallback, but must not
   stack above the crawlable card while JavaScript is still loading. */
body.has-ssr .boot-screen {
  display: none;
}

/* The boot mark had no rules at all: the 1200px source rendered at its natural
   size until style.css arrived, so a refresh flashed a screen-sized meeple. The
   width/height on the element stop it before CSS; these keep it settled after. */
.boot-mark img{border-radius:18px}

.boot-progress {
  width: 120px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, var(--line));
}

.boot-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  animation: boot-progress 1.4s ease-in-out infinite;
}

@keyframes boot-progress {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(265%); }
}

@media (prefers-reduced-motion: reduce) {
  .boot-progress span {
    width: 100%;
    opacity: .55;
    animation: none;
  }
}

#page-header.route-title-in .header-copy,
#page-header.route-title-in h1 {
  animation: route-title-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes route-title-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  #page-header.route-title-in .header-copy,
  #page-header.route-title-in h1 {
    animation: none;
  }
}

.price-spark .spark-target {
  stroke: var(--gold);
  stroke-width: 1;
  stroke-dasharray: 2 2;
  opacity: .85;
}

/* Editorial covers, quieter card actions, and denser secondary content. */

/* ---------- Editorial fallback covers ---------- */

/*
 * One monogram primitive for every "no image" state: avatar circles, command
 * palette rows and editorial covers. Tone comes from `cover-tone-*` (game or
 * username hash); size and radius come from the consumer.
 */
.monogram {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background:
    radial-gradient(circle at 32% 24%, color-mix(in srgb, var(--cover-paper, var(--accent-soft)) 64%, var(--surface)), transparent 62%),
    var(--cover-paper, var(--accent-soft));
  color: var(--cover-ink, var(--accent-deep));
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
  text-transform: uppercase;
}


.cover-editorial {
  position: relative;
  container-type: inline-size;
  background: var(--cover-paper, var(--surface-2));
  color: var(--cover-ink, var(--muted-2));
}

.cover-tone-0 {
  --cover-paper: color-mix(in srgb, var(--accent-soft) 62%, var(--surface));
  --cover-ink: var(--accent-deep);
  --cover-rule: color-mix(in srgb, var(--accent) 23%, transparent);
}

.cover-tone-1 {
  --cover-paper: color-mix(in srgb, var(--gold-soft) 72%, var(--surface));
  --cover-ink: color-mix(in srgb, var(--ink) 82%, var(--gold));
  --cover-rule: color-mix(in srgb, var(--gold) 25%, transparent);
}

.cover-tone-2 {
  --cover-paper: color-mix(in srgb, var(--terracotta-soft) 62%, var(--surface));
  --cover-ink: color-mix(in srgb, var(--terracotta) 78%, var(--ink));
  --cover-rule: color-mix(in srgb, var(--terracotta) 23%, transparent);
}

.cover-tone-3 {
  --cover-paper: color-mix(in srgb, var(--surface-3) 76%, var(--surface));
  --cover-ink: var(--ink-soft);
  --cover-rule: color-mix(in srgb, var(--ink) 12%, transparent);
}

.cover-tone-4 {
  --cover-paper: color-mix(in srgb, var(--accent-soft) 35%, var(--gold-soft));
  --cover-ink: color-mix(in srgb, var(--accent-deep) 78%, var(--ink));
  --cover-rule: color-mix(in srgb, var(--accent) 17%, var(--gold));
}

.cover-meta-rail,
.game-card .cover-rank,
.game-card .cover-language,
.game-card .cover-price-tag {
  z-index: 4;
  pointer-events: none;
}

.cover-tone-5 {
  --cover-paper: color-mix(in srgb, var(--surface-2) 82%, var(--terracotta-soft));
  --cover-ink: color-mix(in srgb, var(--ink-soft) 72%, var(--terracotta));
  --cover-rule: color-mix(in srgb, var(--ink) 10%, transparent);
}

.cover-editorial::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .7;
  pointer-events: none;
}

.cover-pattern-0::before {
  background:
    radial-gradient(circle at 50% 28%, transparent 0 29px, var(--cover-rule) 30px 31px, transparent 32px),
    linear-gradient(90deg, transparent 49.4%, var(--cover-rule) 49.5% 50.5%, transparent 50.6%);
}

.cover-pattern-1::before {
  background: repeating-linear-gradient(135deg, transparent 0 14px, var(--cover-rule) 15px 16px);
}

.cover-pattern-2::before {
  background:
    linear-gradient(90deg, transparent 0 70%, var(--cover-rule) 70% 71%, transparent 71%),
    radial-gradient(circle at 72% 22%, var(--cover-rule) 0 18px, transparent 19px);
}

.cover-editorial img {
  position: relative;
  z-index: 2;
}

/* The cover-authorship rail is a fallback, never a sticker over real art. */
.cover-editorial:has(> img) > .cover-art {
  display: none;
}

.cover-editorial::after {
  z-index: 3;
}

.cover-empty::after {
  inset: 0;
  height: auto;
  background:
    linear-gradient(180deg, transparent 56%, color-mix(in srgb, var(--cover-paper) 80%, transparent)),
    radial-gradient(circle at 50% 16%, color-mix(in srgb, var(--surface) 35%, transparent), transparent 64%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cover-ink) 17%, transparent);
}

/* Missing art should read as a designed book, not an empty rectangle. The
   hash already picks one of six papers and three patterns; a spine and a
   small foil dot give every fallback a stable, recognizable silhouette. */
.cover-empty {
  background:
    linear-gradient(
      155deg,
      color-mix(in srgb, var(--cover-paper) 90%, var(--surface)) 0 54%,
      color-mix(in srgb, var(--cover-paper) 72%, var(--cover-rule)) 100%
    );
}

.cover-empty .cover-art::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  width: clamp(3px, 8%, 6px);
  background: color-mix(in srgb, var(--cover-ink) 18%, var(--cover-paper));
  box-shadow: inset -1px 0 0 color-mix(in srgb, var(--cover-ink) 12%, transparent);
}

.cover-empty .cover-art::after {
  content: "";
  position: absolute;
  top: 9%;
  right: 9%;
  z-index: 0;
  width: 6px;
  height: 6px;
  border: 1px solid color-mix(in srgb, var(--cover-ink) 24%, transparent);
  border-radius: 50%;
  opacity: .8;
}

.cover-empty .cover-art > * {
  position: relative;
  z-index: 1;
}

.cover-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 18px 9px 13px;
  overflow: hidden;
  text-align: center;
  pointer-events: none;
}

.cover-art-mark {
  color: var(--cover-ink);
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: .9;
}

.cover-art-title {
  max-width: 100%;
  color: color-mix(in srgb, var(--cover-ink) 86%, transparent);
  font-family: var(--serif);
  font-size: 8px;
  font-weight: 650;
  line-height: 1.18;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.cover-art-spine {
  display: none;
  position: absolute;
  top: 18px;
  bottom: 13px;
  left: 5px;
  max-height: calc(100% - 31px);
  overflow: hidden;
  color: color-mix(in srgb, var(--cover-ink) 62%, transparent);
  font-family: var(--serif);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

@container (min-width: 120px) {
  .cover-art-spine {
    display: block;
  }
}

.cover-empty .cover-art > .cover-art-spine {
  position: absolute;
}

.cover-art-year {
  color: color-mix(in srgb, var(--cover-ink) 58%, transparent);
  font-size: 7px;
  font-weight: 750;
  letter-spacing: .08em;
  line-height: 1;
}

.cover-art.is-compact {
  gap: 0;
  padding: 0;
}

.cover-art.is-compact .cover-art-mark {
  font-size: 16px;
}

.cover-art-year.is-compact-year {
  position: absolute;
  right: 3px;
  bottom: 3px;
  left: 3px;
  overflow: hidden;
  font-size: 6px;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: .78;
}

.cover-ribbon-card .cover-art {
  padding: 4px;
}

.cover-ribbon-card .cover-art-mark {
  font-size: 18px;
}

.game-card .cover-art-mark {
  font-size: 25px;
}

.game-card .cover-art-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.game-card .cover::after,
[data-theme="dark"] .game-card .cover::after {
  box-shadow: none;
}

html.shelf-view .game-card .cover-art-mark {
  font-size: 38px;
}

html.shelf-view .game-card .cover-art-title {
  font-size: 10px;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

html.shelf-view .game-card .cover-art-year {
  font-size: 8px;
}

.detail-cover .cover-art-mark {
  font-size: 38px;
}

.detail-cover .cover-art-title {
  font-size: 10px;
}

.deal-cover .cover-art-mark,
.alert-feed-cover .cover-art-mark,
.person-game-cover .cover-art-mark,
.alert-minor-cover .cover-art-mark {
  font-size: 16px;
}

.alert-feed-cover,
.alert-minor-cover,
.person-game-cover {
  position: relative;
}

@container (max-width: 100px) {
  .cover-art-title,
  .cover-art-year {
    display: none;
  }

  .cover-art-mark {
    font-size: 21px;
  }
}

@media (max-width: 640px) {
  .game-card .cover-art-title,
  .game-card .cover-art-year {
    display: none;
  }

  .game-card .cover-art-mark {
    font-size: 21px;
  }

  html.shelf-view .game-card .cover-art-mark {
    font-size: 32px;
  }

  html.shelf-view .game-card .cover-art-title {
    display: -webkit-box;
    font-size: var(--type-caption-sm);
  }

  .detail-cover .cover-art-mark {
    font-size: 26px;
  }

  .detail-cover .cover-art-title {
    font-size: 8px;
  }
}

/* ---------- Quieter secondary card actions ---------- */

.game-card .quick-alert {
  padding: 2px 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.game-card .quick-alert:hover {
  background: transparent;
  color: var(--accent);
  text-decoration-style: solid;
}

.game-card .quick-alert.active {
  padding: 2px 0;
  color: var(--muted);
  text-decoration: none;
}

.game-card .quick-alert-edit {
  width: 24px;
  justify-content: center;
  padding: 0;
}

/* The first-offer action lived as a dotted text link beside real buttons.
   Keep the compact scale, but give it the same outlined pill affordance. */
.game-card .quick-alert.first-offer {
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-deep);
  font-weight: 700;
  text-decoration: none;
}

.game-card .quick-alert.first-offer:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.game-card .quick-alert.first-offer.active {
  border-color: color-mix(in srgb, var(--success) 38%, var(--line));
  background: color-mix(in srgb, var(--success) 9%, var(--surface));
  color: var(--ink-soft);
}

.game-card .more-prices {
  margin-top: 0;
  padding: 2px 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.game-card .more-prices:hover {
  background: transparent;
  color: var(--accent-deep);
  text-decoration-style: solid;
}

.game-card .price-chip {
  gap: 4px;
  padding: 2px 2px;
  border-color: transparent;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 700;
}

.game-card .price-chip:hover {
  border-color: transparent;
  background: transparent;
  color: var(--accent-deep);
}

.game-card .price-chip.is-low {
  border-color: transparent;
  background: transparent;
}

.game-card .price-row-secondary {
  gap: 10px;
}

.game-card .price-row-secondary .quick-alert,
.game-card .price-row-secondary .more-prices {
  min-height: 22px;
  padding-top: 1px;
  padding-bottom: 1px;
}

/* ---------- Alert priority hierarchy ---------- */

.alert-day-group h2 {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 7px 2px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  font-size: 11px;
}

.alert-feed-priority {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

@media (min-width: 900px) {
  .alert-day-group {
    grid-template-columns: 92px minmax(0, 1fr);
    grid-template-areas:
      "date priority"
      "date minor";
    gap: 8px 14px;
    align-items: start;
  }

  .alert-day-group h2 {
    grid-area: date;
    top: 78px;
    padding: 2px 12px 0 0;
    border-right: 1px solid var(--line);
    background: var(--bg);
    backdrop-filter: none;
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.2;
    text-align: right;
    text-transform: none;
  }

  .alert-feed-priority {
    grid-area: priority;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .alert-minor-block {
    grid-area: minor;
  }
}

/* A lone priority alert used to sit in the left half of a two-column row. Give
   it the whole band and enough cover to read as the day's headline. */
.alert-feed-priority.is-spotlight {
  grid-template-columns: minmax(0, 1fr);
}

.alert-feed-item.is-spotlight {
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-left-width: 4px;
  border-radius: 16px;
}

.alert-feed-item.is-spotlight .alert-feed-cover {
  width: 88px;
  height: 118px;
  border-radius: 12px;
}

.alert-feed-item.is-spotlight .alert-feed-copy strong {
  overflow: visible;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-overflow: unset;
  white-space: normal;
}

.alert-feed-item.is-spotlight .alert-feed-copy small {
  overflow: visible;
  font-size: 12px;
  text-overflow: unset;
  white-space: normal;
}

.alert-feed-item.is-spotlight .alert-feed-kind {
  font-size: 10.5px;
}

.alert-feed-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.alert-feed-cta .icon {
  width: 14px;
  height: 14px;
}

.alert-feed-store {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  color: var(--ink-soft);
  font-weight: 650;
}

.alert-feed-store .store-favicon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border-radius: 3px;
}

.alert-feed-store-mark {
  display: none;
  place-items: center;
  min-width: 13px;
  height: 13px;
  padding: 0 2px;
  border-radius: 3px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 7px;
  font-weight: 750;
  line-height: 1;
}

.alert-feed-store.image-broken .store-favicon {
  display: none;
}

.alert-feed-store.image-broken .alert-feed-store-mark {
  display: inline-grid;
}

.alert-feed-store::before {
  content: "·";
  margin-right: 4px;
  color: var(--muted-2);
}

/* The latest first offer is the day's lead, but it is not a target hit or a
   price drop: give it a readable headline and a full store line instead of the
   one-line ellipsis used by the compact feed rows. */
.alert-feed-first .alert-feed-item {
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
}

.alert-feed-first .alert-feed-cover {
  width: 64px;
  height: 84px;
  border-radius: 10px;
}

.alert-feed-first .alert-feed-copy {
  gap: 4px;
}

.alert-feed-first .alert-feed-copy strong {
  overflow: visible;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: unset;
  white-space: normal;
}

.alert-feed-first .alert-feed-copy small {
  overflow: visible;
  line-height: 1.4;
  text-overflow: unset;
  white-space: normal;
}

.alert-feed-first .alert-feed-store {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-weight: 650;
}

.alert-feed-first .alert-feed-store::before {
  content: none;
}

@media (max-width: 640px) {
  .alert-feed-item.is-spotlight {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .alert-feed-item.is-spotlight .alert-feed-cover {
    width: 64px;
    height: 86px;
  }

  .alert-feed-item.is-spotlight .alert-feed-copy strong {
    font-size: 15px;
  }

  .alert-feed-cta { display: none; }

  .alert-feed-first .alert-feed-item {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .alert-feed-first .alert-feed-cover {
    width: 56px;
    height: 74px;
  }

  .alert-feed-first .alert-feed-copy strong {
    font-size: 15px;
  }
}

.alert-feed-target_hit .alert-feed-kind {
  font-size: 10px;
}

.alert-minor-block {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}

/* First offers are the bulk of the feed and rarely need a click, so the block
   is a disclosure: price drops stay visible, first offers stay one tap away. */
.alert-minor-block > summary {
  list-style: none;
  cursor: pointer;
}

.alert-minor-block > summary::-webkit-details-marker {
  display: none;
}

.alert-minor-block[open] > summary .icon:last-child {
  transform: rotate(180deg);
}

.alert-minor-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 2px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.alert-minor-head .icon:last-child {
  width: 11px;
  height: 11px;
  color: var(--muted);
  transition: transform 160ms ease;
}

.alert-minor-head .icon {
  width: 12px;
  height: 12px;
  color: var(--gold);
}

.alert-minor-head strong {
  margin-left: auto;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
}

.alert-minor-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2px 12px;
}

.alert-minor-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.alert-minor-item:hover {
  border-color: var(--line);
  background: var(--surface);
}

.alert-minor-cover {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: 7px;
  color: var(--muted);
}

.alert-minor-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.alert-minor-copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.alert-minor-copy strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-minor-copy small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 1 auto;
  max-width: 48%;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-minor-copy > .alert-feed-count {
  flex: 0 0 auto;
}

@media (min-width: 900px) {
  .alert-feed-target_hit {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .alert-feed-target_hit .alert-feed-cover {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 640px) {
  .alert-minor-list {
    grid-template-columns: 1fr;
  }

  .alert-minor-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
  }

  .alert-minor-copy small {
    max-width: 100%;
  }
}

/* ---------- Compact mobile coverage ---------- */

@media (max-width: 640px) {
  .wishlist-coverage {
    gap: 5px;
    margin-bottom: 12px;
    padding: 10px 12px;
  }

  .coverage-head {
    align-items: center;
  }

  .coverage-head .eyebrow {
    display: none;
  }

  .coverage-head h2 {
    max-width: 28ch;
    margin: 0;
    font-size: 14.5px;
    line-height: 1.2;
  }

  .coverage-percent {
    font-size: 20px;
  }

  .coverage-disclosure {
    display: inline-flex;
    width: auto;
    min-width: 44px;
    gap: 4px;
    padding: 0 9px;
  }

  .coverage-disclosure-label {
    display: inline;
    font-size: 10px;
    font-weight: 700;
  }

  .wishlist-coverage .coverage-meter,
  .wishlist-coverage .coverage-summary-row {
    display: none;
  }

  .wishlist-coverage.summary-open .coverage-meter {
    display: block;
  }

  .wishlist-coverage.summary-open .coverage-summary-row {
    display: flex;
  }

  .wishlist-coverage .coverage-toggle {
    display: none;
  }

  .coverage-summary-row {
    gap: 3px 8px;
  }

  .coverage-legend {
    gap: 2px 10px;
  }

  .coverage-fact,
  .coverage-offer-total {
    font-size: 11px;
  }

  .coverage-fact.is-zero:not(.active),
  .coverage-offer-total.is-zero:not(.active) {
    display: none;
  }

  .coverage-toggle {
    font-size: 10.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .coverage-toggle .icon {
    transition: none;
  }
}

/* ---------- Sparse public profiles ---------- */

@media (min-width: 901px) {
  /* The identity band stays full-width for every shelf size. The shelf below
     gets the columns, so the hero never becomes a tall companion card. */
  .public-person-layout.is-sparse,
  .public-person-layout.is-rich {
    display: block;
  }

  .public-person-layout.is-sparse .people-panel,
  .public-person-layout.is-rich .people-panel {
    margin: 0;
  }
}

/* ---------- Editorial game modal header ---------- */

.modal-head {
  grid-template-columns: 156px minmax(0, 1fr) minmax(240px, 320px);
  gap: 28px;
  padding: 34px 34px 30px;
}

.detail-cover {
  width: 156px;
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
}

.detail-cover::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 3;
  width: 7px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(31, 23, 15, .2), transparent);
  pointer-events: none;
}

.detail-heading {
  padding-top: 6px;
}

.detail-heading h1 {
  font-size: clamp(32px, 4vw, 42px);
}

.detail-meta {
  gap: 6px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed color-mix(in srgb, var(--line) 82%, transparent);
  font-size: 12.5px;
}

.modal-head-price {
  padding-left: 24px;
}

@media (max-width: 900px) {
  .modal-head {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 20px;
    padding: 26px 24px 22px;
  }

  .detail-cover {
    width: 112px;
    height: auto;
  }

  .detail-heading h1 {
    font-size: clamp(28px, 4vw, 36px);
  }
}

@media (max-width: 640px) {
  .modal-head {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    padding: 20px 16px 18px;
  }

  .detail-cover {
    width: 96px;
    height: auto;
  }

  .detail-heading h1 {
    font-size: 27px;
  }

  .detail-meta {
    font-size: 11px;
  }

  .detail-cover::before {
    width: 5px;
  }
}

/* ---------- Dark polish and contextual empty art ---------- */

[data-theme="dark"] .cover::after,
[data-theme="dark"] .detail-cover::after,
[data-theme="dark"] .cover-ribbon-card::after {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

/* Row covers in the deals feed keep a clean edge (see 00-foundation.css). */
[data-theme="dark"] .deal-cover::after,
[data-theme="dark"] .alert-feed-cover::after,
[data-theme="dark"] .alert-minor-cover::after,
[data-theme="dark"] .active-alert-cover::after {
  box-shadow: none;
}

[data-theme="dark"] .cover-empty::after {
  background:
    linear-gradient(180deg, transparent 56%, color-mix(in srgb, var(--cover-paper) 74%, transparent)),
    radial-gradient(circle at 50% 16%, color-mix(in srgb, var(--surface) 22%, transparent), transparent 64%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Row covers in the deals/alert feeds are small and sit on a tinted card: the
   inset ring reads as a bright outline around the artwork. Keep their edge
   clean in both themes, with or without an image. */
.deal-cover::after,
.alert-feed-cover::after,
.alert-minor-cover::after,
.active-alert-cover::after,
[data-theme="dark"] .deal-cover::after,
[data-theme="dark"] .alert-feed-cover::after,
[data-theme="dark"] .alert-minor-cover::after,
[data-theme="dark"] .active-alert-cover::after,
[data-theme="dark"] .deal-cover.cover-empty::after,
[data-theme="dark"] .alert-feed-cover.cover-empty::after,
[data-theme="dark"] .alert-minor-cover.cover-empty::after,
[data-theme="dark"] .active-alert-cover.cover-empty::after {
  box-shadow: none;
}

[data-theme="dark"] .person-game-cover,
[data-theme="dark"] .alert-feed-cover,
[data-theme="dark"] .alert-minor-cover {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.empty-art-bell,
.empty-art-search {
  color: var(--gold);
}

.empty-art-store {
  color: var(--terracotta);
}

.empty-art-lock {
  color: var(--muted);
}

.empty-art-shelf {
  color: var(--accent);
}

/* Avatars reuse the monogram primitive; only the inner highlight is theirs. */
.person-avatar-fallback {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--surface) 30%, transparent);
}

/* Grouped activity runs */
.run-group {
  margin-bottom: 8px;
  overflow: hidden;
}

.run-group > summary {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  list-style: none;
  cursor: pointer;
}

.run-group > summary::-webkit-details-marker {
  display: none;
}

.run-group > summary > .icon {
  margin-left: auto;
  color: var(--muted-2);
  transition: transform 160ms ease;
}

.run-group[open] > summary > .icon {
  transform: rotate(180deg);
}

.run-group-count {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.run-group .run-date {
  margin-left: auto;
}

.run-group-body {
  display: grid;
  gap: 7px;
  padding: 0 10px 10px;
}

.run-group-body .run-card {
  margin: 0;
  border-color: color-mix(in srgb, var(--line) 72%, transparent);
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .run-group > summary > .icon {
    transition: none;
  }
}

/* Five labeled tabs: shelf, discover, alerts, people, and everything else in
   a More sheet. The old bar squeezed seven icons into 370px and labeled only
   the active one at 7.5px. */
@media (max-width: 640px) {
  .sidebar .nav {
    gap: 1px;
    padding: 5px 6px;
  }

  .sidebar .nav-link {
    position: relative;
    flex: 1 1 0;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    min-height: 48px;
    padding: 4px 2px 3px;
    border-radius: 12px;
    font-size: var(--type-caption-sm);
  }

  .sidebar .nav-link.mobile-secondary,
  .sidebar .mobile-search-link {
    display: none;
  }

  .sidebar .mobile-more-link {
    display: flex;
  }

  .sidebar .nav .nav-link .nav-label {
    position: static;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: var(--type-caption-sm);
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar .nav .nav-link .nav-label-full { display: inline; }

  .sidebar .nav .nav-link .nav-label-short { display: none; }

  .sidebar .nav .nav-link .nav-label.has-short .nav-label-full { display: none; }

  .sidebar .nav .nav-link .nav-label.has-short .nav-label-short { display: inline; }

  .sidebar .nav-link.active {
    background: var(--accent-soft);
    box-shadow: none;
    color: var(--accent-deep);
  }

  .sidebar .nav-link .icon {
    width: 17px;
    height: 17px;
  }

  .sidebar .nav-link.active .icon {
    width: 17px;
    height: 17px;
  }

  .sidebar .nav .nav-count { display: none; }

  .nav::after { display: none; }
}

/* Settings search */
.settings-nav {
  display: grid;
  gap: 8px;
}

.settings-nav .settings-toc {
  margin: 0;
}

/* Superadmin group sits under the section list on desktop; on the horizontal
   mobile bar it keeps the same pill row inside the toggle. */
.settings-nav .settings-toc-sub {
  flex-wrap: wrap;
  margin: 0;
}

@media (max-width: 640px) {
  .settings-nav .settings-toc-group {
    margin-left: 0;
  }
}

@media (max-width: 959px) {
  .settings-layout:not(.admin-layout) .settings-toc {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent);
  }
}

.settings-search {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
}

.settings-search .icon {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

.settings-search input {
  width: 100%;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  outline: 0;
}

.settings-search-empty {
  margin: 0 0 12px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 13px;
  color: var(--muted);
  font-size: 12px;
}

@media (min-width: 1100px) {
  .settings-nav {
    position: sticky;
    top: 12px;
  }

  .settings-nav .settings-toc {
    position: static;
    top: auto;
  }
}

/* Each game carries its cover palette into the detail header. */
.modal-head {
  background:
    radial-gradient(460px 240px at 0% 0%, color-mix(in srgb, var(--cover-paper, var(--gold-soft)) 74%, transparent), transparent 72%),
    color-mix(in srgb, var(--surface) 65%, var(--bg));
}

.detail-context-bar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 6px 58px 6px 30px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
}

.detail-context-bar[hidden] {
  display: none;
}

.detail-context-thumb {
  flex: 0 0 auto;
  width: 28px;
  height: 38px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
}

.detail-context-thumb img,
.detail-context-thumb svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-context-copy {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 10px;
}

.detail-context-copy strong {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.detail-context-copy small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.detail-context-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
  margin-left: auto;
}

.detail-context-alert {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--accent-deep);
  font-size: 10.5px;
  font-weight: 650;
}

.detail-context-alert .icon {
  width: 12px;
  height: 12px;
}

.detail-context-actions .btn {
  min-height: 32px;
}

.modal.has-detail-context .detail-jump {
  top: 48px;
}

/* Sticky game-detail section navigation */
.detail-jump {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 4px;
  padding: 8px 62px 8px 30px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(10px);
  scrollbar-width: none;
}

.detail-jump::-webkit-scrollbar {
  display: none;
}

.detail-jump button {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10.5px;
  font-weight: 650;
  cursor: pointer;
}

.detail-jump button:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.detail-jump button.active {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.detail-body [id] {
  scroll-margin-top: 58px;
}

.detail-other-stores {
  margin-top: 14px;
  border-top: 1px dashed var(--line);
}

.detail-other-stores > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 2px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.detail-other-stores > summary::-webkit-details-marker {
  display: none;
}

.detail-other-stores > summary .icon {
  width: 14px;
  height: 14px;
}

.offer-compare {
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
}

.offer-compare > summary {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.offer-compare > summary::-webkit-details-marker {
  display: none;
}

.offer-compare > summary > span {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
}

.offer-compare > summary > .icon:last-child {
  margin-left: auto;
  transition: transform 150ms ease;
}

.offer-compare[open] > summary > .icon:last-child {
  transform: rotate(180deg);
}

.offer-compare-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.offer-compare-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 10.5px;
}

.offer-compare-table th,
.offer-compare-table td {
  padding: 8px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.offer-compare-table th {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.offer-compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.offer-compare-table tr.is-best td {
  background: color-mix(in srgb, var(--accent-soft) 40%, transparent);
}

.offer-compare-table td strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.offer-price-bar {
  display: block;
  width: min(120px, 100%);
  height: 4px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 999px;
}

.offer-price-track {
  fill: var(--line);
}

.offer-price-fill {
  fill: var(--line-strong);
}

.offer-compare-table tr.is-best .offer-price-fill {
  fill: var(--accent);
}

.offer-compare-best {
  display: block;
  margin-top: 2px;
  color: var(--accent-deep);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.offer-compare-open {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--accent-deep);
}

.offer-compare-open:hover {
  background: var(--surface-2);
}

@media (max-width: 640px) {
  .offer-compare > summary {
    min-height: 44px;
  }
}

.detail-other-stores > summary span {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
}

.detail-other-stores .domain-grid {
  margin-top: 10px;
}

@media (max-width: 640px) {
  .detail-context-bar {
    height: 44px;
    padding: 5px 52px 5px 16px;
  }

  .detail-context-copy small,
  .detail-context-alert {
    display: none;
  }

  .detail-context-actions .btn {
    min-height: 34px;
    padding-inline: 8px;
  }

  .modal.has-detail-context .detail-jump {
    top: 44px;
  }

  .detail-jump {
    padding: 7px 52px 7px 16px;
  }

  .detail-jump button {
    padding: 5px 9px;
    font-size: 10px;
  }
}

@media (max-width: 640px) {
  .chart-tooltip {
    max-width: min(280px, calc(100vw - 24px));
    padding: 6px 9px;
    font-size: 12px;
    line-height: 1.4;
  }

  .chart-hit {
    touch-action: manipulation;
  }
}

.run-group > summary > .icon {
  margin-left: 0;
}

@media (max-width: 640px) {
  .run-group .run-date {
    display: none;
  }
}

@media (min-width: 1100px) {
  .settings-nav {
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
    scrollbar-width: thin;
  }
}

.settings-panel [hidden],
.settings-nav [hidden] {
  display: none !important;
}

/* Command palette actions and recents */
.command-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.command-label > span {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.command-label-action {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--type-caption-sm);
  font-weight: 650;
  letter-spacing: 0;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  text-transform: none;
  cursor: pointer;
}

.command-label-action:hover {
  color: var(--ink);
}

.command-label > span + .command-label-action {
  margin-left: 0;
}

/* Exact price-history table */
.chart-data {
  margin-top: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 58%, var(--bg));
}

.chart-data > summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}

.chart-data > summary::-webkit-details-marker {
  display: none;
}

.chart-data > summary > .icon:first-child {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.chart-data > summary > span {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 10.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.chart-data > summary > .icon:last-child {
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: transform 160ms ease;
}

.chart-data[open] > summary {
  border-bottom: 1px solid var(--line);
}

.chart-data[open] > summary > .icon:last-child {
  transform: rotate(180deg);
}

.chart-data-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.chart-data-table-wrap {
  margin: 0 12px 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.chart-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.chart-data-table th,
.chart-data-table td {
  padding: 7px 9px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  text-align: left;
  white-space: nowrap;
}

.chart-data-table th {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.chart-data-table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.chart-data-table tr:last-child td {
  border-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  .chart-data > summary > .icon:last-child {
    transition: none;
  }
}

/* People directory freshness and sorting */
.people-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.people-controls .people-search {
  flex: 1 1 320px;
  margin: 0;
}

.people-sort select {
  height: 38px;
  min-width: 168px;
  padding: 0 30px 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.people-sort select:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 58%, transparent);
  outline-offset: 2px;
}

.person-joined {
  color: var(--muted-2);
  font-size: var(--type-caption-sm);
}

@media (max-width: 900px) {
}

@media (max-width: 640px) {
}

/* Compact sticky list toolbar */
.list-sticky-tools {
  position: fixed;
  top: 12px;
  z-index: 19;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.list-sticky-tools[hidden] {
  display: none;
}

.list-sticky-count {
  padding: 0 4px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.list-sticky-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.list-sticky-button:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.list-sticky-button .icon {
  width: 14px;
  height: 14px;
}

.list-sticky-icon {
  margin-left: auto;
}

@media (max-width: 900px) {
  .list-sticky-tools {
    top: 56px;
  }
}

@media (max-width: 640px) {
  .list-sticky-tools {
    top: 54px;
    gap: 3px;
    padding: 5px 6px;
  }

  .list-sticky-button span,
  .list-sticky-count {
    display: none;
  }
}

/* Featured deal */
.deal-featured-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--gold-soft);
  color: var(--ink-soft);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-featured-short {
  display: none;
}

@container deal-card (max-width: 420px) {
  .deal-featured-full {
    display: none;
  }

  .deal-featured-short {
    display: inline;
  }
}

.deal-featured-badge .icon {
  width: 11px;
  height: 11px;
  color: var(--gold);
}

/* Narrow cards: shorten the label and the timestamp instead of truncating them.
   "QUEDA DE PREÇO · há 23 h" plus the badge needs ~432 px of text on one line,
   which a 464 px card cannot give once padding and gaps are counted. */
.deal-type-short,
.deal-time-short {
  display: none;
}

@container deal-card (max-width: 520px) {
  .deal-type-full,
  .deal-time-full {
    display: none;
  }

  .deal-type-short,
  .deal-time-short {
    display: inline;
  }
}

.people-sort select {
  width: 200px;
  max-width: 100%;
}

@media (max-width: 640px) {
  .people-sort {
    flex: 1 1 100%;
  }

  .people-sort select {
    width: 100%;
  }
}

.chart-data-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* Active alert management */
.active-alerts-panel {
  position: relative;
  z-index: 20;
  margin-bottom: 10px;
  padding: 10px 12px;
}

.active-alerts-panel > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.active-alerts-panel > summary::-webkit-details-marker {
  display: none;
}

.active-alerts-panel > summary > .icon:first-child {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.active-alerts-panel > summary > span {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
}

.active-alerts-panel > summary > .active-alerts-paused-badge {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 600;
  white-space: nowrap;
}

.active-alerts-panel > summary > .icon:last-child {
  margin-left: auto;
  width: 13px;
  height: 13px;
  color: var(--muted);
  transition: transform 160ms ease;
}

.active-alerts-panel[open] > summary > .icon:last-child {
  transform: rotate(180deg);
}

.active-alerts-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  line-height: 1.35;
}

.active-alerts-note > span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.active-alerts-note .icon {
  width: 11px;
  height: 11px;
  color: var(--accent);
}

.active-alerts-note b {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold-soft) 55%, transparent);
  color: var(--ink-soft);
  font-size: var(--type-caption-sm);
  font-weight: 700;
}

.active-alerts-list {
  display: grid;
  gap: 3px;
  margin-top: 7px;
  border-top: 1px dashed var(--line);
  padding-top: 7px;
}

.active-alert-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px 2px;
}

.active-alert-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.active-alert-actions .btn {
  min-height: 30px;
}

.active-alert-snooze,
.active-alert-more {
  position: relative;
}

.active-alert-snooze > summary,
.active-alert-more > summary {
  list-style: none;
  cursor: pointer;
}

.active-alert-more > summary {
  display: grid;
  place-items: center;
  width: 30px;
  padding: 0;
}

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

.active-alert-more-menu {
  min-width: 118px;
}

.active-alert-remove-action {
  color: var(--danger);
}

.active-alert-snooze > summary::-webkit-details-marker {
  display: none;
}

.active-alert-snooze-menu {
  position: absolute;
  top: auto;
  right: 0;
  bottom: calc(100% + 4px);
  z-index: 12;
  display: grid;
  gap: 2px;
  min-width: 108px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.active-alert-snooze-menu button {
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 10px;
  text-align: left;
  cursor: pointer;
}

.active-alert-snooze-menu button:hover {
  background: var(--surface-2);
}

.active-alerts-paused {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
}

.active-alerts-paused > summary {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.active-alerts-paused > summary::-webkit-details-marker {
  display: none;
}

.active-alerts-paused > summary .icon {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

.active-alerts-paused > summary > span {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
}

.active-alerts-paused > summary .icon:last-child {
  margin-left: auto;
  color: var(--muted);
  transition: transform 160ms ease;
}

.active-alerts-paused[open] > summary .icon:last-child {
  transform: rotate(180deg);
}

.active-alerts-none {
  margin: 0;
  padding: 8px 2px;
  color: var(--muted);
  font-size: 10.5px;
}

.active-alert-open {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 2px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.active-alert-open:hover {
  background: var(--surface-2);
}

.active-alert-item.is-snoozed .active-alert-open {
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
}

.active-alert-cover {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 6px;
  color: var(--muted);
}

.active-alert-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.active-alert-copy {
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
  min-width: 0;
}

.active-alert-ring-wrap {
  display: grid;
  justify-items: center;
  flex: 0 0 auto;
  gap: 1px;
  margin-left: auto;
}

.active-alert-ring {
  position: relative;
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: 0;
  color: var(--success);
}

.active-alert-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.active-alert-ring circle {
  fill: none;
  stroke-width: 4;
}

.active-alert-ring-track {
  stroke: var(--line);
}

.active-alert-ring-fill {
  stroke: currentColor;
  stroke-linecap: round;
}

.active-alert-ring b {
  position: relative;
  z-index: 1;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.active-alert-ring.is-far { color: var(--gold); }
.active-alert-ring.is-empty { color: var(--line-strong); }

@media (max-width: 640px) {
  .active-alert-item {
    flex-wrap: wrap;
  }

  .active-alert-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .active-alert-actions .btn {
    min-height: 44px;
  }

  .active-alert-ring {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }

  .active-alert-ring b {
    font-size: 8.5px;
  }
}

.active-alert-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-alert-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-alert-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 2px;
}

.active-alert-gap {
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.active-alert-gap b {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.active-alert-gap.is-hit {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--success);
  font-weight: 700;
}

.active-alert-gap.is-hit .icon {
  width: 12px;
  height: 12px;
}

.active-alert-foot .price-spark {
  margin-left: auto;
}

.active-alert-foot .price-spark svg {
  height: 18px;
}

@media (min-width: 900px) {
  .active-alert-item {
    max-width: 760px;
  }

  .active-alert-foot .price-spark svg {
    width: 110px;
  }
}

.active-alert-item > .text-action {
  flex: 0 0 auto;
}

@media (prefers-reduced-motion: reduce) {
  .active-alerts-panel > summary > .icon:last-child {
    transition: none;
  }
}

.store-health-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 2px;
}

.store-health-filter {
  min-height: 32px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 10.5px;
  font-weight: 650;
  cursor: pointer;
}

.store-health-filter b {
  margin-left: 3px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.store-health-filter.is-active {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.store-health-no-links {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-2) 30%, transparent);
}

.store-health-no-links > summary {
  min-height: 30px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  cursor: pointer;
}

.store-health-matrix-wrap {
  max-height: 430px;
  margin: 10px 0 4px;
  overflow: auto;
  overscroll-behavior: contain;
}

.store-health-matrix-compact {
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.store-health-matrix {
  display: grid;
  min-width: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 28%, transparent);
}

.store-health-matrix-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 58px 58px 58px 112px;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
}

.store-health-matrix-row:first-child {
  border-top: 0;
}

.store-health-matrix-row.is-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.store-health-matrix-row.is-head > span:not(:first-child) {
  text-align: center;
}

.store-health-matrix-row:not(.is-head):hover {
  background: color-mix(in srgb, var(--accent-soft) 28%, transparent);
}

.matrix-store {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.matrix-store .store-favicon {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  border-radius: 4px;
}

.matrix-store b {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matrix-cell {
  color: var(--ink-soft);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.matrix-cell.is-warn b {
  color: var(--gold);
}

.matrix-cell.is-bad b {
  color: var(--danger);
}

.matrix-state {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
  white-space: nowrap;
}

.matrix-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-2);
}

.matrix-state.is-ok { color: var(--accent-deep); }
.matrix-state.is-ok i { background: var(--success); }
.matrix-state.is-stale { color: var(--gold); }
.matrix-state.is-stale i { background: var(--gold); }
.matrix-state.is-error { color: var(--danger); }
.matrix-state.is-error i { background: var(--danger); }

.store-trend {
  display: block;
  width: 92px;
  height: 24px;
  margin: 5px 0 2px;
  overflow: visible;
}

.store-trend-bar {
  fill: color-mix(in srgb, var(--accent) 22%, transparent);
}

.store-trend-errors {
  fill: none;
  stroke: var(--danger);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .85;
}

.digest-preview-card {
  margin: 8px 0 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.digest-preview-card strong {
  display: block;
  margin-top: 3px;
  font-family: var(--serif);
  font-size: 16px;
}

.digest-preview-card p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.store-history-stale {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .9;
}

.store-history-unpriced {
  fill: none;
  stroke: var(--danger);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .8;
}

.store-history-stale-dot {
  fill: var(--gold);
}

.store-history-unpriced-dot {
  fill: var(--danger);
}

.store-history-trend {
  margin-top: 2px;
}

/* High-contrast and forced-colors support */
@media (prefers-contrast: more) {
  :root {
    --bg: #f8efdf;
    --surface: #fffef9;
    --surface-2: #eadcc7;
    --surface-3: #dec9ae;
    --ink: #1e1812;
    --ink-soft: #332a20;
    --muted: #3b3024;
    --muted-2: #46392b;
    --line: #a58b69;
    --line-strong: #70583d;
    --accent: #244d32;
    --accent-deep: #16331f;
    --accent-soft: #d7e6cb;
    --gold-soft: #f1dfb3;
    --terracotta-soft: #f3d4c5;
    --danger-soft: #f2cec6;
  }

  [data-theme="dark"] {
    --bg: #17130f;
    --surface: #292219;
    --surface-2: #362e23;
    --surface-3: #453a2c;
    --ink: #fff8e9;
    --ink-soft: #f0e4d1;
    --muted: #dfd0b9;
    --muted-2: #d3c2a9;
    --line: #8b7256;
    --line-strong: #c0a47e;
    --accent: #c8e2b7;
    --accent-deep: #e1f3d7;
    --accent-soft: #34452d;
    --gold: #f0c96c;
    --gold-soft: #4a3d25;
    --danger: #ffb0a1;
    --danger-soft: #542f2a;
  }

  .paper,
  .game-card,
  .settings-card,
  .filter-card,
  .domain-panel,
  .deal-item,
  .run-card,
  .run-group,
  .active-alerts-panel,
  .list-sticky-tools {
    border-color: var(--line-strong);
  }

  .nav-link.active,
  .chip.active,
  .chart-range.active,
  .view-button.is-active,
  .good-price-badge,
  .low-badge {
    outline: 2px solid currentColor;
    outline-offset: 1px;
  }
}

@media (forced-colors: active) {
  body::after,
  .cover::after,
  .detail-cover::after,
  .cover-editorial::before,
  .game-card::after {
    display: none !important;
  }

  .paper,
  .game-card,
  .settings-card,
  .filter-card,
  .domain-panel,
  .deal-item,
  .run-card,
  .run-group,
  .active-alerts-panel,
  .list-sticky-tools,
  .command-dialog,
  .modal,
  .digest-preview-card {
    border: 1px solid CanvasText;
  }

  .btn,
  .theme-button,
  .view-button,
  .chip,
  .search-field,
  .filter-field input,
  .filter-field select,
  .people-sort select,
  .active-alerts-panel > summary {
    border: 1px solid ButtonText;
  }

  button:focus-visible,
  a:focus-visible,
  input:focus-visible,
  select:focus-visible,
  summary:focus-visible {
    outline: 3px solid Highlight;
    outline-offset: 2px;
  }

  .cover-art,
  .empty-art {
    color: CanvasText;
  }

  .tag,
  .chip,
  .shelf-scope-tab,
  .person-scope-tab,
  .person-offer,
  .chart-range,
  .chart-store,
  .freshness-badge,
  .good-price-badge,
  .low-badge,
  .weekly-stat,
  .activity-calendar-day {
    border: 1px solid CanvasText;
  }

  .nav-link.active,
  .chip.active,
  .shelf-scope-tab.is-active,
  .person-scope-tab.is-active,
  .person-offer.active,
  .people-feed-tab.is-active,
  .chart-range.active,
  .chart-store.active,
  .view-button.is-active,
  .mobile-bottom-link.is-active,
  .settings-toc button.active {
    background: Canvas;
    color: CanvasText;
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }

  .coverage-meter rect,
  .weekly-rhythm-bar,
  .price-position rect,
  .price-position circle,
  .price-position-band,
  .chart-draw,
  .chart-point,
  .chart-low-mark,
  .chart-event-shape,
  .chart-median-line,
  .chart-low-line,
  .chart-target-line,
  .chart-good-line,
  .chart-band,
  .chart-good-band {
    stroke: CanvasText;
    stroke-width: 1;
  }
}

/* Keep the mobile cover price pill inside the narrow cover. */
@container (max-width: 80px) {
  .cover-price-tag {
    right: 3px;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    outline: none;
    bottom: 3px;
    left: 3px;
    max-width: none;
    justify-content: center;
    gap: 2px;
    padding: 2px 3px;
    font-size: 7.5px;
    letter-spacing: -.015em;
    white-space: nowrap;
  }

  .cover-price-tag b {
    display: none;
  }
}

@media (max-width: 900px) {
  .sidebar {
    z-index: 35;
  }
}

@media (max-width: 640px) {
  .deal-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 7px;
  }

  .deal-type {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .deal-time {
    flex: 0 0 auto;
    margin-left: auto;
    white-space: nowrap;
  }

  .deal-featured-badge {
    order: 3;
  }
}

.admin-inbox-banner {
  align-items: flex-start;
}

.admin-inbox-banner > .status-dot {
  margin-top: 6px;
}

.admin-inbox-banner .btn {
  align-self: center;
}

.admin-inbox-banner > .status-dot {
  flex: 0 0 7px;
}

/* The preference popover is one strip on tablet/mobile: theme, app actions,
   language, currency — side by side. Stacking it turned a 44px control into a
   178px column that covered the settings behind it. */
@media (max-width: 900px) {
  .sidebar-preferences[open] .sidebar-extras {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .sidebar-preferences[open] .sidebar-extras::-webkit-scrollbar {
    display: none;
  }

  .sidebar-preferences[open] .theme-button {
    order: 1;
    flex: 0 0 34px;
  }

  .sidebar-preferences[open] .view-switcher {
    order: 2;
    flex: 0 0 auto;
  }

  .sidebar-preferences[open] .sidebar-app {
    order: 3;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
  }

  .sidebar-preferences[open] .sidebar-app .sidebar-action {
    flex: 0 0 34px;
    width: 34px;
  }

  .sidebar-preferences[open] .sidebar-pickers {
    order: 4;
    flex: 0 1 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 4px;
  }

  .sidebar-preferences[open] .sidebar-pickers .currency-control,
  .sidebar-preferences[open] .sidebar-pickers .language-control {
    flex: 0 1 auto;
    width: auto;
    height: 34px;
    padding: 0 6px;
    min-width: 0;
  }

  .sidebar-preferences[open] .sidebar-pickers .currency-control span,
  .sidebar-preferences[open] .sidebar-pickers .language-control span {
    display: none;
  }

  .sidebar-preferences[open] .sidebar-pickers select {
    min-width: 0;
    max-width: 96px;
    font-size: 11px;
  }
}

/* Keep the best-price signal attached to the best offer, not a secondary store. */
.game-card .price-row-main {
  flex-wrap: wrap;
  row-gap: 4px;
}

html.shelf-view .price-row-main .low-badge,
html.shelf-view .price-row-main .good-price-badge {
  display: none;
}

@container (max-width: 100px) {
  .cover-price-tag {
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
  }
}

.filter-primary > .view-switcher-wrap {
  align-self: flex-end;
  flex: 0 0 auto;
}

@media (max-width: 640px) {
  .view-switcher [data-mode="shelf"] {
    display: none;
  }
}

@media (max-width: 640px) {
  .filter-primary .view-switcher .theme-button {
    width: 34px;
    height: 34px;
    padding: 3px;
  }

  .filter-primary .view-switcher .icon {
    width: 16px;
    height: 16px;
  }
}

/* ---------- batch selection and price comparison ---------- */

.batch-mode-enter {
  margin-left: 4px;
  white-space: nowrap;
}

.batch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  padding: 9px 12px;
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}

.batch-bar-count {
  color: var(--ink-soft);
  font-size: 12px;
  white-space: nowrap;
}

.batch-bar-count strong {
  color: var(--accent-deep);
  font-family: var(--serif);
  font-size: 17px;
}

.batch-filter-note {
  color: var(--muted);
  font-size: 10px;
}

.batch-bar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.batch-bar .danger {
  color: var(--danger);
}

.batch-check {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow-soft);
  color: transparent;
  cursor: pointer;
}

.batch-check input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.batch-check .icon {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.batch-check:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--surface);
}

.batch-check:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Owned cards keep a quiet collection rail in the mixed Everything view. */
.game-card.is-owned {
  border-color: color-mix(in srgb, var(--success) 28%, var(--line));
  background: linear-gradient(to right, color-mix(in srgb, var(--success) 16%, var(--surface)) 0 4px, var(--surface) 4px);
}

.game-card.is-owned:hover {
  border-color: color-mix(in srgb, var(--success) 42%, var(--line));
}

.game-card.is-batch-selected {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent), var(--shadow-soft);
}

.price-comparison {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.price-comparison-title {
  align-self: center;
  flex: 1 1 100%;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.price-comparison-item {
  display: flex;
  flex: 1 1 130px;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.price-comparison-item small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.price-comparison-item em {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.price-comparison-item em.down {
  color: var(--accent-deep);
}

.price-comparison-item em.up {
  color: var(--danger);
}

.price-position {
  display: grid;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.price-position-track {
  display: block;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 52%, transparent);
}

.price-position-band {
  fill: color-mix(in srgb, var(--success) 18%, transparent);
}

.price-position-marker {
  fill: var(--muted);
}

.price-position-marker.is-median { fill: var(--gold); }
.price-position-marker.is-current { fill: var(--accent); }

.price-position-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.price-position-legend > span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.price-position-legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.price-position-legend .is-median i { background: var(--gold); }
.price-position-legend .is-current i { background: var(--accent); }

.price-position-legend b {
  color: var(--ink-soft);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
}

.price-position-legend em {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-style: normal;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.price-position-legend em.down {
  color: var(--accent-deep);
}

.price-position-legend em.up {
  color: var(--danger);
}

@media (max-width: 640px) {
  .price-position-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 8px;
  }
}

.store-filter-empty {
  margin: 8px 0 0;
}

@media (max-width: 640px) {
  .batch-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .batch-bar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .batch-bar-actions .btn {
    flex: 1 1 auto;
  }

  .batch-bar .batch-exit {
    flex: 0 0 auto;
  }
}

.retention-disk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.retention-disk-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
}

.retention-disk-row small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.retention-disk-row strong {
  margin-left: auto;
  color: var(--ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.retention-disk-row em {
  flex: 1 1 100%;
  color: var(--muted-2);
  font-size: var(--type-caption-sm);
  font-style: normal;
}

.retention-warning {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 9px 0 0;
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 10.5px;
}

.retention-warning .icon {
  width: 14px;
  height: 14px;
}

@media (max-width: 640px) {
  .retention-disk-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .filter-primary {
    gap: 7px;
  }

  .filter-primary .filter-sort {
    flex: 1 1 100%;
    min-width: 0;
  }

  .filter-primary .view-switcher {
    margin-right: auto;
  }
}

@media (max-width: 360px) {
  .filter-primary .toolbar-note {
    width: 100%;
    max-width: 100%;
    white-space: normal;
  }
}

.retention-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 12px 0;
}

.retention-rule {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.retention-rule > small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 650;
}

.retention-rule > span {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.retention-rule input {
  width: 100%;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.retention-rule em {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-style: normal;
  white-space: nowrap;
}

.retention-source {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.retention-source.custom {
  color: var(--accent-deep);
  font-weight: 700;
}

.retention-impact {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.retention-impact .settings-footnote {
  margin: 0 0 8px;
}

.retention-impact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.retention-impact-grid > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.retention-impact-grid small,
.retention-impact-grid em {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retention-impact-grid strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1;
}

@media (max-width: 900px) {
  .retention-editor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .retention-impact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .retention-editor,
  .retention-impact-grid {
    grid-template-columns: 1fr;
  }
}

.audit-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 0.8fr);
  gap: 7px;
  margin: 0 0 10px;
}

.audit-filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.audit-filters label > span {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.audit-filters input,
.audit-filters select {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 11px;
}

.audit-severity-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 10px;
}

.audit-severity {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.audit-severity span {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
}

.audit-timeline {
  max-height: 460px;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 3px;
}

.audit-day {
  position: relative;
  padding: 0 0 14px 17px;
}

.audit-day::before {
  position: absolute;
  top: 14px;
  bottom: 0;
  left: 3px;
  width: 1px;
  background: var(--line);
  content: "";
}

.audit-day:last-child::before {
  display: none;
}

.audit-day h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 5px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.audit-day h3 span {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
}

.audit-events {
  display: grid;
  gap: 7px;
}

.audit-event {
  position: relative;
  padding-left: 2px;
}

.audit-event .event-dot {
  position: absolute;
  left: -19px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

.audit-event.is-danger .event-dot {
  background: var(--danger);
}

.audit-event.is-auth .event-dot {
  background: var(--gold);
}

.audit-event.is-ops .event-dot {
  background: var(--accent);
}

@media (max-width: 640px) {
  .audit-filters {
    grid-template-columns: 1fr 1fr;
  }

  .audit-severity {
    min-height: 44px;
  }
}

.offline-cache {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.offline-cache .settings-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.offline-cache .settings-actions {
  margin-top: 10px;
  padding-top: 10px;
}

@media (max-width: 640px) {
  .filter-primary .view-switcher .theme-button,
  .filter-primary .filter-more-toggle,
  .filter-primary .reset-filters {
    position: relative;
  }

  .filter-primary .view-switcher .theme-button::after,
  .filter-primary .filter-more-toggle::after,
  .filter-primary .reset-filters::after,
  .batch-check::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: inherit;
  }
}

@media (max-width: 640px) {
  .filter-primary .view-switcher {
    gap: 10px;
  }

  .btn-small,
  .game-card .quick-alert,
  .game-card .more-prices,
  .game-card .price-chip {
    min-height: 44px;
  }

  .game-card .quick-alert,
  .game-card .more-prices,
  .game-card .price-row-secondary .quick-alert,
  .game-card .price-row-secondary .more-prices {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .game-card .price-chip {
    align-items: center;
    padding-block: 4px;
  }
}

/* ---------- Deals and discover context ---------- */

/* Collapsed repeat drops: the same game no longer fills two days. */
.deal-repeats {
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}

/* Recent search chips above the discover filters. */
.recent-searches {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.recent-searches-label {
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.recent-searches .chip {
  color: var(--ink);
}

/* ---------- Community shelves ---------- */

/* The shared shelf is a proportion, not only a sentence. */
.person-overlap {
  display: grid;
  gap: 5px;
  margin-top: 1px;
}

.person-overlap-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.person-overlap-pill {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: var(--type-caption-sm);
  font-weight: 650;
  white-space: nowrap;
}

.person-overlap.is-empty .person-overlap-pill {
  background: var(--surface-2);
  color: var(--muted);
}

.person-overlap-pill .icon {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
}

.person-shared-covers {
  display: flex;
  min-width: 0;
  margin-left: auto;
}

.person-shared-covers img {
  width: 22px;
  height: 28px;
  margin-left: -5px;
  border: 1px solid var(--surface);
  border-radius: 4px;
  object-fit: cover;
}

.person-shared-covers img:first-child {
  margin-left: 0;
}

.person-overlap-meter {
  display: block;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  appearance: none;
}

.person-overlap-meter::-webkit-progress-bar {
  border-radius: inherit;
  background: var(--line);
}

.person-overlap-meter::-webkit-progress-value {
  border-radius: inherit;
  background: var(--success);
}

.person-overlap-meter::-moz-progress-bar {
  border-radius: inherit;
  background: var(--success);
}

.person-overlap.is-empty .person-overlap-meter::-webkit-progress-value {
  background: var(--line-strong);
}

.person-overlap.is-empty .person-overlap-meter::-moz-progress-bar {
  background: var(--line-strong);
}

.person-modal-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.person-modal-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 8px;
}

.person-offer-filters,
.person-modal-filters.is-comparison {
  display: grid;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 42%, var(--surface));
}

.person-offer-filters {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.person-modal-filters.is-comparison {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.person-offer-filters .person-offer,
.person-modal-filters.is-comparison .person-scope {
  display: flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 6px 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
}

.person-modal-filters.is-comparison .person-scope {
  justify-content: center;
}

.person-offer-filters .person-offer .icon {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

.person-offer-filters .person-offer > span:last-child {
  min-width: 24px;
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.person-offer-filters .person-offer.active,
.person-modal-filters.is-comparison .person-scope.active {
  border: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 7%, transparent);
}

.person-offer-filters .person-offer.active > span:last-child {
  background: var(--accent);
  color: var(--surface);
}

.person-modal-filters.is-comparison .person-scope > span {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.person-modal-filters.is-comparison .person-scope.active > span {
  background: var(--accent);
  color: var(--surface);
}

@media (max-width: 900px) {
  .person-offer-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .person-offer-filters,
  .person-modal-filters.is-comparison {
    grid-template-columns: 1fr;
  }

  .person-offer-filters .person-offer,
  .person-modal-filters.is-comparison .person-scope {
    min-height: 44px;
    white-space: normal;
  }
}

.person-filter-axis {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.person-filter-axis-label {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.person-scope-tabs {
  display: inline-flex;
  gap: 3px;
  margin: 0 0 8px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 72%, var(--bg));
}

.person-scope-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.person-scope-tab b {
  min-width: 17px;
  padding: 1px 4px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.person-scope-tab.is-active {
  background: var(--accent);
  color: var(--surface);
}

.person-scope-tab:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.person-scope-tab[data-ownership="wanted"].is-active {
  background: var(--terracotta);
}

.person-scope-tab[data-ownership="owned"].is-active {
  background: var(--success);
}

.person-scope-tab.is-active b {
  background: var(--surface);
  color: var(--accent-deep);
}

.person-scope-tab[data-ownership="wanted"].is-active b {
  color: var(--terracotta);
}

.person-scope-tab[data-ownership="owned"].is-active b {
  color: var(--success);
}

@media (max-width: 640px) {
  .person-scope-tabs {
    width: 100%;
  }

  .person-scope-tab {
    flex: 1;
    min-height: 44px;
    justify-content: center;
  }
}

.person-scope.active {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.person-save-missing {
  margin-right: auto;
}

.person-modal-tools {
  flex: 0 0 auto;
}

/* Long public shelves keep the controls fixed above the scrolling cards. */
.person-modal.is-long .person-modal-tools {
  margin: 0 -22px 8px;
  padding: 0 22px 8px;
  border-bottom: 1px solid var(--line);
}

.person-modal.is-long .person-modal-filters {
  margin-bottom: 0;
}

.public-more-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 62%, transparent);
}

.public-more-progress {
  margin-right: auto;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.person-modal .public-more-row {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 12px -4px 0;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: 0 -10px 22px -22px rgba(44, 40, 35, .55);
  backdrop-filter: blur(12px);
}

.public-more {
  margin: 0;
  min-height: 44px;
}

.public-more-count {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.public-more.is-loading {
  pointer-events: none;
}

.public-more.is-loading .public-more-count {
  display: none;
}

.public-more .sync-spinner {
  margin-right: 2px;
}

@media (max-width: 640px) {
  .person-modal.is-long .person-modal-tools {
    margin-inline: -16px;
    padding: 0 16px 8px;
  }

  .person-modal-tools {
    display: block;
    overflow: visible;
  }

  .public-more-row {
    gap: 8px;
    padding: 8px 10px;
  }

  .public-more {
    min-height: 44px;
  }

  .person-modal .public-more-row {
    margin-inline: 0;
  }
}

/* ---------- Sync run history ---------- */

.update-runs {
  margin: 10px 0 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.update-runs-alert {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  color: var(--warning);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}
.update-runs-list {
  display: grid;
  gap: 4px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.update-run {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
}
.update-run-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}
.update-run.is-ok .update-run-dot { background: var(--success); }
.update-run.is-partial .update-run-dot { background: var(--warning); }
.update-run.is-failed .update-run-dot { background: var(--error); }
.update-run-when { color: var(--muted); }
.update-run-why {
  flex-basis: 100%;
  padding-left: 12px;
  color: var(--muted);
  font-size: 10.5px;
}
.update-run-resumed {
  color: var(--muted);
  font-size: 10px;
  font-style: italic;
}

/* Collapsed card: the second/third store price, so a wide gap is visible. */
.price-chip-value {
  margin-left: 4px;
  font-size: 11px;
  font-weight: 600;
}

/* Wishlist divider: priced cards above, the rest below. */
.game-section-note {
  grid-column: 1 / -1;
  margin: 10px 0 2px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ---------- Shelf card: one lead offer, the rest behind a summary ---------- */

/* The price area used to repeat every secondary offer as its own pill. The
   summary keeps the cheapest alternate visible and moves the full comparison
   behind one line, so the cover can grow without making the card taller. */
.price-row-more {
  display: grid;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
}

.price-row-more-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.price-row-more-head > .quick-alert {
  margin-left: auto;
}

@media (min-width: 641px) {
  .game-card .price-row-more-head > .quick-alert,
  .game-card .price-row-more-head > .more-prices {
    align-items: center;
    height: 24px;
    padding-top: 0;
    padding-bottom: 0;
  }
}

.quick-alert-gap {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 700;
  white-space: nowrap;
}

.quick-alert-gap.is-hit {
  color: var(--success);
}

.quick-alert-gap.is-paused {
  color: var(--gold);
}

.quick-alert-gap .icon {
  width: 10px;
  height: 10px;
}

.quick-alert-resume {
  position: relative;
  z-index: 4;
  padding: 2px 0;
  border: 0;
  background: transparent;
  pointer-events: auto;
  color: var(--accent-deep);
  font: inherit;
  font-size: var(--type-caption-sm);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.price-row-more .price-signal-chips {
  width: 100%;
}

.price-row-more .quick-alert,
.price-row-more .more-prices {
  pointer-events: auto;
}

.more-prices.price-summary {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  margin: 0;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.more-prices.price-summary .icon {
  width: 12px;
  height: 12px;
  color: var(--muted);
  transition: transform 160ms ease;
}

.more-prices.price-summary[aria-expanded="true"] .icon {
  transform: rotate(180deg);
}

.more-prices.price-summary:hover,
.more-prices.price-summary:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: var(--surface);
  color: var(--accent-deep);
}

.more-prices.price-summary:hover .icon,
.more-prices.price-summary:focus-visible .icon {
  color: var(--accent-deep);
}

.more-prices.price-summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.price-row-more .quick-alert {
  min-height: 24px;
  margin: 0;
  padding: 3px 6px;
  font-size: 10.5px;
}

/* The lead offer is the one place the full store name belongs; the short code
   remains in the expanded comparison pills. */
.price-lead .store-name {
  flex: 1 1 auto;
  max-width: none;
  min-width: 0;
}

.price-lead .store-short {
  display: none;
}

@container (max-width: 300px) {
  .price-lead {
    flex-wrap: nowrap;
  }

  .price-lead .store-name {
    display: none;
  }

  .price-lead .store-short {
    display: inline;
  }
}

@media (min-width: 641px) {
  html.shelf-view .price-lead .store-name,
  html.compact-cards .price-lead .store-name {
    display: block;
  }

  html.shelf-view .price-row-more .quick-alert,
  html.compact-cards .price-row-more .quick-alert {
    display: none;
  }

  html.shelf-view .price-row-more .more-prices,
  html.compact-cards .price-row-more .more-prices {
    font-size: 10.5px;
  }

  /* Expanded cards are the only ones that render this row, so showing it here
     does not add height to the shelf. */
  html.shelf-view .game-card.expanded-prices .price-row-secondary,
  html.compact-cards .game-card.expanded-prices .price-row-secondary {
    display: flex;
    flex-wrap: wrap;
  }

  html.shelf-view .game-meta {
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  .game-card {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    padding: 10px;
  }

  .game-card .cover {
    width: 84px;
    height: 112px;
    border-radius: 9px;
  }

  .game-card .game-title {
    font-size: 17px;
    line-height: 1.15;
  }

  .game-card .game-meta {
    gap: 4px;
    margin-top: 2px;
    font-size: 11px;
  }

  .game-card .price-row-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 6px;
    margin-top: 5px;
  }

  .game-card .price-lead {
    width: 100%;
    min-width: 0;
    padding: 4px 7px;
    overflow: hidden;
  }

  .game-card .price-lead .store-name {
    min-width: 0;
  }

  .game-card .price-row-main > .good-price-badge,
  .game-card .price-row-main > .low-badge {
    flex: 0 0 auto;
  }

  .game-card .price-lead strong {
    font-size: 14.5px;
  }

  .game-card .price-lead .store-name {
    font-size: 11px;
  }

  .game-card .price-row-visual {
    display: none;
  }

  .game-card .price-row-more {
    gap: 6px;
    margin-top: 4px;
  }

  .game-card .price-row-more .quick-alert {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    text-decoration: none;
    white-space: nowrap;
  }

  .game-card .more-prices.price-summary {
    flex: 0 0 auto;
    min-height: 44px;
    font-size: 11px;
    text-decoration: none;
    white-space: nowrap;
  }

  .game-card .price-row-secondary {
    gap: 4px;
    margin-top: 4px;
  }
}

/* Microtype floor: the cover rank and card metadata were set at 8–10px. */
.game-card .cover-rank,
.game-card .cover-language,
.game-card .cover-expansion {
  font-size: 10px;
}

.game-card .game-meta {
  font-size: 11px;
}

@media (min-width: 641px) {
  html.shelf-view .game-card .cover-rank,
  html.shelf-view .game-card .cover-language,
  html.shelf-view .game-card .cover-expansion,
  html.compact-cards .game-card .cover-rank,
  html.compact-cards .game-card .cover-language,
  html.compact-cards .game-card .cover-expansion {
    font-size: 10px;
  }
}

.discover-filters .filter-toggle-label {
  display: none;
}

.discover-filters .filter-more-toggle {
  min-width: 38px;
  padding-inline: 8px;
}

@media (min-width: 800px) {
  .discover-filters .filter-primary {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .discover-filters .filter-primary .filter-search {
    min-width: 0;
  }
}

@media (min-width: 641px) and (max-width: 1100px) {
  .wishlist-toolbar .filter-primary > .filter-more-toggle {
    order: 5;
  }

  .wishlist-toolbar .filter-primary > .list-action-group {
    order: 10;
  }

  .wishlist-toolbar .filter-primary > .new-filter-chip {
    order: 11;
  }
}

/* ---------- Wishlist toolbar: filter chip and a real selection action ---------- */

.list-utility-row {
  display: contents;
}

.toolbar-extra {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.toolbar-extra .toolbar-note {
  margin-left: auto;
  padding: 0;
  font-size: 11px;
  white-space: normal;
}

.toolbar-extra .new-filter-chip {
  min-height: 32px;
  padding-inline: 11px;
  font-size: 11px;
}

.toolbar-extra .batch-mode-enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  margin-left: 4px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.toolbar-extra .batch-mode-enter:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
}

@media (max-width: 640px) {
  .list-utility-row {
    display: flex;
    align-items: stretch;
    gap: 6px;
    margin-top: 8px;
  }

  .list-utility-row .toolbar-extra {
    flex: 0 1 auto;
    min-width: 0;
    margin: 0;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .filter-card.has-mobile-filter .list-utility-row .filter-mobile-toggle {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    margin-top: 0;
  }

  .toolbar-extra .new-filter-chip {
    min-height: 44px;
  }

  .toolbar-extra .toolbar-note {
    flex: 1 1 100%;
    order: -1;
  }

  .toolbar-extra .batch-mode-enter {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    gap: 0;
    overflow: hidden;
    font-size: 0;
  }

  .toolbar-extra .batch-mode-enter .icon {
    width: 16px;
    height: 16px;
  }
}

/* ---------- Alert feed: first offers as a real group ---------- */

.alert-filters {
  display: block;
}

.alert-filter-body {
  display: grid;
  gap: 10px;
}

.alert-active-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.alert-active-filters > span {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 10px;
}

.alert-active-filters > button {
  margin-left: auto;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.alert-active-filters .icon {
  width: 11px;
  height: 11px;
}

.alert-filters-toggle {
  display: none;
}

@media (max-width: 640px) {
  .alert-filters {
    padding: 0;
  }

  .alert-filters-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
    text-align: left;
  }

  .alert-filters-toggle .icon:first-child {
    width: 15px;
    height: 15px;
    color: var(--accent);
  }

  .alert-filters-toggle .icon:last-child {
    margin-left: auto;
    width: 13px;
    height: 13px;
    transition: transform 160ms ease;
  }

  .alert-filters-toggle b {
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-deep);
    font-size: 10px;
  }

  .alert-filters.is-open .alert-filters-toggle .icon:last-child {
    transform: rotate(180deg);
  }

  .alert-filter-body {
    display: none;
    padding: 10px 12px 12px;
  }

  .alert-filters.is-open .alert-filter-body {
    display: grid;
  }
}

.alert-minor-block {
  gap: 0;
  margin-top: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 48%, var(--bg));
}

.alert-minor-block > summary {
  min-height: 44px;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--surface) 72%, var(--bg));
}

.alert-minor-block[open] > summary {
  border-bottom: 1px solid var(--line);
}

.alert-minor-head {
  padding: 0;
  font-size: 10px;
}

.alert-minor-thumbs {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
}

.alert-minor-thumb {
  display: grid;
  place-items: center;
  width: 24px;
  height: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
}

.alert-minor-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.alert-minor-thumb .cover-art-title,
.alert-minor-thumb .cover-art-year,
.alert-minor-thumb .cover-art-mark {
  display: none;
}

.alert-minor-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.alert-minor-head strong {
  margin-left: auto;
  font-size: 10px;
}

.alert-minor-list {
  padding: 4px 8px 8px;
}

/* ---------- People: quiet count, reserved preview, aligned footers ---------- */

.person-open {
  padding-right: 0;
  align-items: flex-start;
}

.person-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
  min-width: 0;
}

.person-name-row strong {
  min-width: 0;
}

.person-count {
  flex: 0 0 auto;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
}

.person-count-split {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.person-count-split .is-wanted {
  color: var(--terracotta);
}

.person-count-split .is-owned {
  color: var(--accent-deep);
}

.person-count-dot {
  color: var(--line-strong);
}

.person-covers,
.person-covers-empty,
.person-empty-shelf {
  min-height: 64px;
  margin-top: 0;
}

.person-covers-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.person-covers-empty .icon {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

.person-covers-ghost {
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 5px;
  padding: 8px;
}

.person-covers-ghost > span {
  flex: 0 0 28px;
  width: 28px;
  height: 38px;
  border: 1px dashed var(--line-strong);
  border-radius: 5px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--surface-2) 78%, transparent), transparent);
}

.person-covers-ghost small {
  display: inline-flex;
  flex: 1 0 100%;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  font-size: var(--type-caption);
  line-height: 1.25;
  text-align: center;
}

@media (max-width: 640px) {
  .people-grid .person-covers-ghost {
    min-height: 54px;
    padding: 6px;
  }

  .people-grid .person-covers-ghost > span {
    flex-basis: 24px;
    width: 24px;
    height: 32px;
  }
}

@media (min-width: 641px) {
  .people-grid .person-covers-ghost {
    min-height: 58px;
    padding: 6px 8px;
  }

  .people-grid .person-covers-ghost > span {
    flex-basis: 24px;
    width: 24px;
    height: 32px;
  }

  .people-grid .person-covers-ghost small {
    flex: 0 1 auto;
    margin-left: auto;
  }
}

.person-empty-shelf {
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}

.person-foot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  padding-right: 18px;
}

.person-ludopedia {
  margin-top: 0;
}

/* ---------- Game modal: compressed mobile header and target reference ---------- */

.chart-target-line {
  stroke: var(--gold);
  stroke-width: 1.3;
  stroke-dasharray: 5 4;
  opacity: .9;
}

.chart-target-label {
  fill: var(--gold);
  font-weight: 700;
  stroke: var(--surface);
  stroke-width: 3px;
}

.chart-low-line {
  stroke: color-mix(in srgb, var(--success) 62%, var(--line));
  stroke-width: 1;
  opacity: .85;
}

.chart-low-label {
  fill: var(--success);
  font-weight: 700;
  stroke: var(--surface);
  stroke-width: 3px;
}

.chart-median-line {
  stroke: color-mix(in srgb, var(--muted-2) 72%, var(--line));
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.chart-median-label {
  fill: var(--muted);
  font-weight: 700;
  stroke: var(--surface);
  stroke-width: 3px;
}

@media (max-width: 640px) {
  .modal-head {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    padding: 14px 14px 10px;
  }

  .detail-cover {
    width: 72px;
    height: 96px;
    border-radius: 10px;
  }

  .detail-badges {
    gap: 4px;
    margin-bottom: 4px;
  }

  .detail-badges .tag {
    font-size: var(--type-caption-sm);
    padding: 1px 5px;
  }

  .detail-heading {
    padding-top: 0;
  }

  .detail-heading h1 {
    padding-right: 16px;
    font-size: 23px;
    line-height: 1.08;
  }

  .detail-meta {
    gap: 3px;
    margin-top: 4px;
    font-size: 10.5px;
  }

  .detail-actions {
    margin-top: 8px;
    gap: 5px;
  }

  .detail-actions .btn {
    padding: 7px 9px;
    font-size: 10.5px;
  }

  .detail-actions .btn-primary {
    flex: 1 1 auto;
    min-width: 0;
  }

  .detail-language-filter {
    flex: 0 0 132px;
    min-width: 132px;
    min-height: 34px;
    padding-inline: 6px;
    font-size: 10.5px;
  }

  .wishlist-toolbar .view-switcher .theme-button,
  .discover-filters .view-switcher .theme-button {
    width: 44px;
    height: 44px;
  }

  .detail-share {
    display: none;
  }

  .modal-head-price {
    padding-top: 6px;
  }

  .modal-head-price .best-total-offer {
    padding: 7px 28px 7px 10px;
  }

  .header-price-label {
    font-size: var(--type-caption);
  }

  .header-price-compact strong {
    font-size: 19px;
  }

  .header-price-store {
    font-size: var(--type-caption-sm);
  }

  .detail-jump {
    padding: 6px 46px 6px 14px;
    background: color-mix(in srgb, var(--surface) 97%, transparent);
  }

  .detail-body {
    padding-top: 12px;
  }

  .price-verdict.is-maturing {
    gap: 2px;
    margin-top: 8px;
    padding: 9px 11px;
  }

  .price-verdict.is-maturing .eyebrow,
  .price-verdict.is-maturing .price-comparison,
  .price-verdict.is-maturing .verdict-context,
  .price-verdict.is-maturing .verdict-copy > p:not(.verdict-progress) {
    display: none;
  }

  .price-verdict.is-maturing .verdict-copy {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 7px;
  }

  .price-verdict.is-maturing .verdict-copy h2 {
    margin: 0;
    font-size: 15px;
    line-height: 1.2;
  }

  .price-verdict.is-maturing .verdict-progress {
    margin: 0;
    font-size: 10.5px;
    line-height: 1.35;
  }

  .price-verdict.is-maturing .verdict-progress-long {
    display: none;
  }

  .price-verdict.is-maturing .verdict-progress-short {
    display: inline;
  }
}

/* ---------- Settings: one vertical, sticky index ---------- */

@media (min-width: 960px) {
  .settings-layout:not(.admin-layout) {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 18px;
  }

  .settings-layout:not(.admin-layout) .settings-nav {
    position: sticky;
    top: 12px;
    z-index: 6;
    display: grid;
    align-items: stretch;
    gap: 8px;
    max-height: calc(100vh - 24px);
    padding: 8px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .settings-layout:not(.admin-layout) .settings-toc {
    position: static;
    top: auto;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    flex-wrap: nowrap;
    order: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    scrollbar-width: none;
  }

  .settings-layout:not(.admin-layout) .settings-toc button {
    width: 100%;
    padding: 8px 10px;
    text-align: left;
    white-space: normal;
  }
}

@media (min-width: 641px) and (max-width: 959px) {
  .settings-layout:not(.admin-layout) .settings-nav {
    position: sticky;
    top: 12px;
    z-index: 6;
    max-height: calc(100vh - 24px);
    padding: 8px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .settings-layout:not(.admin-layout) .settings-toc {
    position: static;
    margin: 0;
  }
}

@media (max-width: 640px) {
  /* The shelf title already carries the total; the review note is for the
     cases where there is something to review. */
  .toolbar-extra .toolbar-note {
    display: none;
  }

  .toolbar-extra .toolbar-note.has-review {
    display: block;
  }
}

.verdict-progress-short {
  display: none;
}

/* ---------- Visual polish: filters, people, alerts and settings ---------- */

.filter-search {
  display: flex;
  flex: 1 1 260px;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.filter-search .filter-caption {
  padding-left: 2px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.filter-search .search-field {
  flex: 1 1 auto;
  width: 100%;
}

.active-filter-summary {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 0 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.active-filter-summary[hidden],
.filter-primary .reset-filters[hidden] {
  display: none;
}

.filter-primary > .new-filter-chip {
  flex: 0 0 auto;
  min-height: 34px;
  padding-inline: 10px;
  font-size: 10.5px;
}

.active-filter-chips {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 28px;
  padding: 2px 8px 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.active-filter-chip > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-filter-chip:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.active-filter-chip-x {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--muted);
}

.active-filter-chip-x .icon {
  width: 11px;
  height: 11px;
}

.active-filter-summary-clear {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 28px;
  margin-left: auto;
  padding: 0 0 0 12px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--accent-deep);
  font: inherit;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.filter-mobile-toggle {
  display: none;
}

.filter-sheet-active {
  display: none;
}

@media (max-width: 640px) {
  .filter-primary .reset-filters {
    display: none;
  }

  .active-filter-chip,
  .active-filter-summary-clear {
    min-height: 44px;
  }

  .active-filter-chip {
    padding-inline: 10px 8px;
    font-size: 10.5px;
  }

  .active-filter-summary-clear {
    padding-left: 10px;
    font-size: 10.5px;
  }
}

@media (max-width: 640px) {
  .filter-primary .filter-search {
    flex: 1 1 100%;
  }

  /* The full-width bar is the current mobile trigger. Keep the older inline
     toggle visible when a stale shell predates the bar, so a cached bundle
     never leaves the shelf without a way into its filters. */
  .filter-card.has-mobile-filter .filter-primary .filter-more-toggle {
    display: none;
  }

  .filter-card.has-mobile-filter .filter-mobile-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    margin-top: 8px;
    padding: 0 10px;
    border: 1px dashed var(--line-strong);
    border-radius: 10px;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
  }

  .filter-mobile-toggle .icon:first-child {
    width: 15px;
    height: 15px;
    color: var(--accent);
  }

  .filter-mobile-toggle .icon:last-child {
    width: 14px;
    height: 14px;
    margin-left: auto;
    color: var(--muted);
    transition: transform 140ms ease;
  }

  .filter-mobile-toggle[aria-expanded="true"] {
    border-color: var(--line-strong);
    background: var(--surface-2);
  }

  .filter-mobile-toggle[aria-expanded="true"] .icon:last-child {
    transform: rotate(180deg);
  }

  .filter-card:not(.advanced-collapsed) {
    z-index: 90;
  }

  #view-content,
  #view-content.route-in,
  #view-content > .filter-card {
    animation: none;
    transform: none;
  }

  .filter-card:not(.advanced-collapsed) > .filter-sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 70;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: color-mix(in srgb, var(--ink) 28%, transparent);
    backdrop-filter: blur(2px);
    cursor: pointer;
  }

  .filter-card:not(.advanced-collapsed) > .filter-advanced {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 71;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-height: min(92dvh, 820px);
    padding: 0;
    overflow: hidden;
    border-top: 0;
    border-radius: 18px 18px 0 0;
    background: var(--surface);
    box-shadow: 0 -24px 60px -34px color-mix(in srgb, var(--ink) 55%, transparent);
    outline: none;
  }

  .filter-card:not(.advanced-collapsed) .filter-sheet-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 0 0 auto;
    padding: 20px 16px 11px;
    border-bottom: 1px solid var(--line);
  }

  .filter-card:not(.advanced-collapsed) .filter-sheet-grabber {
    display: block;
    position: absolute;
    top: 7px;
    left: 50%;
    width: 38px;
    height: 4px;
    margin-left: -19px;
    border-radius: 999px;
    background: var(--line-strong);
    opacity: .75;
  }

  .filter-sheet-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ink);
    font-size: 15px;
  }

  .filter-sheet-title .icon {
    width: 16px;
    height: 16px;
    color: var(--accent);
  }

  .filter-sheet-close {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink-soft);
    cursor: pointer;
  }

  .filter-sheet-close .icon {
    width: 16px;
    height: 16px;
  }

  .filter-card:not(.advanced-collapsed) .filter-sheet-body {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    min-height: 0;
    padding: 14px 16px 16px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    align-self: stretch;
    box-sizing: border-box;
  }

  .filter-sheet-active {
    display: flex;
    flex: 1 1 100%;
    width: 100%;
    padding: 0 0 4px;
  }

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

  .filter-sheet-active .active-filter-chip,
  .filter-sheet-active .active-filter-summary-clear {
    font-size: 11px;
  }

  .filter-card:not(.advanced-collapsed) .filter-sheet-body .filter-sheet-group {
    display: flex;
    flex: 1 1 100%;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
  }

  .filter-card:not(.advanced-collapsed) .filter-sheet-body .filter-sheet-group + .filter-sheet-group {
    padding-top: 12px;
    border-top: 1px dashed var(--line);
  }

  .filter-card:not(.advanced-collapsed) .filter-sheet-body .filter-sheet-group-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
    min-width: 0;
  }

  .filter-card:not(.advanced-collapsed) .filter-sheet-body .filter-author {
    flex: 1 1 100%;
    width: 100%;
  }

  .filter-card:not(.advanced-collapsed) .filter-sheet-body .filter-sheet-group-title {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 14px;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 7px 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .07em;
    text-transform: uppercase;
    cursor: pointer;
    list-style: none;
  }

  .filter-sheet-group-name {
    grid-column: 1;
  }

  .filter-sheet-group-value {
    grid-column: 2;
    min-width: 0;
    overflow: hidden;
    color: var(--accent-deep);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0;
    text-align: right;
    text-overflow: ellipsis;
    text-transform: none;
    white-space: nowrap;
  }

  .filter-sheet-group.is-active .filter-sheet-group-name {
    color: var(--accent-deep);
  }

  .filter-card:not(.advanced-collapsed) .filter-sheet-body .filter-sheet-group-title::-webkit-details-marker {
    display: none;
  }

  .filter-card:not(.advanced-collapsed) .filter-sheet-body .filter-sheet-group-title::after {
    content: "+";
    grid-column: 3;
    justify-self: end;
    color: var(--muted-2);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1;
  }

  .filter-card:not(.advanced-collapsed) .filter-sheet-body .filter-sheet-group[open] > .filter-sheet-group-title::after {
    content: "−";
  }

  .filter-card:not(.advanced-collapsed) .filter-sheet-actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: var(--surface);
  }

  .filter-sheet-actions.is-scrollable::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 32px;
    background: linear-gradient(transparent, var(--surface) 78%);
    pointer-events: none;
  }

  .filter-sheet-actions .btn {
    min-height: 44px;
  }

  .filter-sheet-actions .btn:disabled {
    opacity: .72;
    cursor: wait;
  }

  .filter-sheet-actions .btn-primary {
    flex: 1 1 auto;
    justify-content: center;
  }

  .filter-sheet-body .store-filter-menu {
    position: static;
    width: 100%;
    max-width: none;
    margin-top: 6px;
    border-radius: 10px;
    box-shadow: none;
  }

  body.filter-sheet-open {
    overflow: hidden;
  }
}

@media (max-width: 360px) {
  .filter-card:not(.advanced-collapsed) .filter-sheet-body .year-range-field,
  .filter-card:not(.advanced-collapsed) .filter-sheet-body .filter-kind,
  .filter-card:not(.advanced-collapsed) .filter-sheet-body .toggle-field {
    flex: 1 1 100%;
  }
}

@media (max-width: 640px) and (prefers-reduced-motion: no-preference) {
  .filter-card:not(.advanced-collapsed) > .filter-advanced {
    animation: filter-sheet-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
}

@keyframes filter-sheet-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) and (prefers-reduced-motion: reduce) {
  .filter-card:not(.advanced-collapsed) > .filter-advanced {
    animation: none;
  }
}

@media (min-width: 641px) {
  /* The maturing-history note is one sentence; the desktop card should not
     reserve a paragraph-sized block for it. */
  .price-verdict.is-maturing {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 12px;
    padding: 11px 14px;
  }

  .price-verdict.is-maturing .verdict-head {
    width: 100%;
  }

  .price-verdict.is-maturing .verdict-copy {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
  }

  .price-verdict.is-maturing .eyebrow,
  .price-verdict.is-maturing .price-comparison,
  .price-verdict.is-maturing .verdict-context,
  .price-verdict.is-maturing .verdict-copy > p:not(.verdict-progress) {
    display: none;
  }

  .price-verdict.is-maturing .verdict-copy h2 {
    margin: 0;
    font-size: 20px;
  }

  .price-verdict.is-maturing .verdict-progress {
    margin: 0;
    font-size: 12px;
  }
}

.weekly-report-head {
  align-items: flex-end;
  flex-wrap: wrap;
}

.weekly-report-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.weekly-report-title strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.weekly-report-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.weekly-share {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.weekly-share:hover,
.weekly-share:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
}

.weekly-share .icon {
  width: 11px;
  height: 11px;
}

@media (max-width: 640px) {
  .weekly-share {
    min-height: 44px;
  }
}

.weekly-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 700;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.weekly-delta .icon {
  width: 11px;
  height: 11px;
}

.weekly-delta.is-up {
  border-color: color-mix(in srgb, var(--success) 26%, var(--line));
  background: color-mix(in srgb, var(--success) 9%, var(--surface));
  color: color-mix(in srgb, var(--success) 70%, var(--ink));
}

.weekly-delta.is-down {
  border-color: color-mix(in srgb, var(--terracotta) 26%, var(--line));
  background: color-mix(in srgb, var(--terracotta) 8%, var(--surface));
  color: color-mix(in srgb, var(--terracotta) 72%, var(--ink));
}

.weekly-best-day {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--gold);
  font-weight: 700;
}

.weekly-best-day .icon {
  width: 11px;
  height: 11px;
}

.weekly-best-day b {
  color: var(--ink-soft);
  font-weight: 700;
  text-transform: capitalize;
}

.weekly-rhythm-day.is-best {
  background: color-mix(in srgb, var(--gold-soft) 46%, transparent);
  outline: 1px solid color-mix(in srgb, var(--gold) 34%, var(--line));
  outline-offset: -1px;
}

.weekly-rhythm-day.is-best .weekly-rhythm-count,
.weekly-rhythm-day.is-best .weekly-rhythm-day-label {
  color: var(--ink-soft);
  font-weight: 750;
}

.weekly-report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}

.weekly-stat {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-2) 35%, transparent);
  color: var(--muted);
}

.weekly-stat > .icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  padding: 5px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.weekly-stat-hits > .icon {
  background: color-mix(in srgb, var(--success) 12%, transparent);
  color: var(--success);
}

.weekly-stat-first > .icon {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.weekly-stat-drops > .icon {
  background: var(--terracotta-soft);
  color: var(--terracotta);
}

.weekly-stat-restocks > .icon {
  background: var(--gold-soft);
  color: var(--gold);
}

.weekly-rhythm {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.weekly-rhythm-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 12px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.weekly-rhythm-head > span:first-child {
  margin-right: auto;
}

.weekly-rhythm-key {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.weekly-rhythm-key i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.weekly-rhythm-key.weekly-rhythm-hits { color: var(--data-1); }
.weekly-rhythm-key.weekly-rhythm-first { color: var(--data-2); }
.weekly-rhythm-key.weekly-rhythm-drops { color: var(--data-3); }
.weekly-rhythm-key.weekly-rhythm-restocks { color: var(--data-4); }

.weekly-rhythm-summary {
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.weekly-rhythm-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 4px;
  margin-top: 8px;
}

.weekly-rhythm-day.is-zero {
  background: color-mix(in srgb, var(--surface-2) 32%, transparent);
}

.weekly-rhythm-day {
  display: grid;
  grid-template-rows: auto 62px auto;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  padding: 5px 2px 3px;
  border-radius: 7px;
}

.weekly-rhythm-day:hover {
  background: color-mix(in srgb, var(--surface-2) 65%, transparent);
}

.weekly-rhythm-count {
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.weekly-rhythm-day-chart {
  display: block;
  width: 100%;
  height: 62px;
  overflow: visible;
}

.weekly-rhythm-base {
  stroke: var(--line);
  stroke-width: 1;
}

.weekly-rhythm-bar.weekly-rhythm-hits { fill: var(--data-1); }
.weekly-rhythm-bar.weekly-rhythm-first { fill: var(--data-2); }
.weekly-rhythm-bar.weekly-rhythm-drops { fill: var(--data-3); }
.weekly-rhythm-bar.weekly-rhythm-restocks { fill: var(--data-4); }

.weekly-rhythm-day-label {
  overflow: hidden;
  max-width: 100%;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-rhythm-empty {
  fill: var(--line-strong);
}

.weekly-stat-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.weekly-stat-copy strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.weekly-stat-copy small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  line-height: 1.25;
}

@media (max-width: 640px) {
  .weekly-report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .weekly-stat {
    padding: 7px;
  }
}

.people-grid {
  align-items: stretch;
}

.people-grid .person-card {
  height: 100%;
}

@media (min-width: 641px) {
  .people-grid .person-card {
    min-height: 200px;
  }
}

.settings-card > .field,
.settings-card > .toggle-field {
  margin-top: 8px;
}

.settings-card .field > span,
.settings-card .checkbox-fieldset legend {
  font-size: 12px;
}

.settings-card .field small {
  font-size: 10.5px;
  line-height: 1.45;
}

.settings-card > .settings-footnote {
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .settings-card {
    padding: 18px 16px;
  }

  .settings-card > .settings-footnote {
    font-size: 11.5px;
  }
}

/* Give the currency picker room for "Moeda da loja" instead of clipping it
   against the equally-sized language picker. */
.sidebar-pickers .language-control {
  flex-grow: .8;
}

.sidebar-pickers .currency-control {
  flex-grow: 1.4;
}

/* The sidebar already carries the sync status on desktop; the page header
   should not repeat it (and the refresh icon still stays there). */
@media (min-width: 901px) {
  #page-header .header-sync-status {
    display: none;
  }
}

/* ---------- Second visual pass ---------- */

.active-alerts-empty {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
  padding: 12px 14px;
}

.active-alerts-empty-icon {
  display: inline-grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent-deep);
}

.active-alerts-empty-icon .icon {
  width: 16px;
  height: 16px;
}

.active-alerts-empty-copy {
  flex: 1 1 200px;
  min-width: 0;
}

.active-alerts-empty-copy strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.active-alerts-empty-copy p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.active-alerts-empty > .btn {
  flex: 0 0 auto;
}

.active-alert-suggestions {
  display: grid;
  flex: 1 1 100%;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.active-alert-suggestions-label {
  margin: 0;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.active-alert-suggestion {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.active-alert-suggestion:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.active-alert-suggestion-cover {
  flex: 0 0 28px;
  width: 28px;
  height: 38px;
  overflow: hidden;
  border-radius: 4px;
}

.active-alert-suggestion-cover img,
.active-alert-suggestion-cover svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.active-alert-suggestion-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 1px;
}

.active-alert-suggestion-copy strong,
.active-alert-suggestion-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-alert-suggestion-copy strong {
  font-size: 11px;
}

.active-alert-suggestion-copy small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
}

.active-alert-suggestion-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  color: var(--accent-deep);
  font-size: var(--type-caption-sm);
  font-weight: 700;
}

.active-alert-suggestion-action .icon {
  width: 12px;
  height: 12px;
}

@media (max-width: 640px) {
  .active-alerts-empty {
    flex-wrap: wrap;
  }

  .active-alerts-empty > .btn {
    width: 100%;
    justify-content: center;
  }
}

.shelf-alert {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 6;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  color: var(--accent-deep);
  box-shadow: 0 5px 14px -10px rgba(44, 40, 35, .8);
  cursor: pointer;
  backdrop-filter: blur(6px);
}

html.shelf-view .shelf-alert {
  display: inline-grid;
}

.shelf-alert .icon {
  width: 14px;
  height: 14px;
}

.shelf-alert:hover,
.shelf-alert:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--surface);
}

.shelf-alert.active {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: var(--accent-soft);
}

.shelf-alert::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: inherit;
}

.shelf-alert-hint {
  display: none;
  align-items: center;
  gap: 5px;
  width: 100%;
  margin: 0 2px -2px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.shelf-alert-hint .icon {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  color: var(--accent-deep);
}

html.shelf-view .shelf-alert-hint {
  display: inline-flex;
}

@media (max-width: 640px) {
  .shelf-alert-hint {
    display: none !important;
  }
}

@media (hover: hover) and (pointer: fine) {
  html.shelf-view .shelf-alert:not(.active) {
    opacity: 0;
    transform: translateY(-2px);
    pointer-events: none;
    transition: opacity 130ms ease, transform 130ms ease;
  }

  html.shelf-view .game-card:hover .shelf-alert:not(.active),
  html.shelf-view .game-card:focus-within .shelf-alert:not(.active) {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  /* A hover-only affordance is invisible until discovered. The first card
     teaches the interaction without putting a bell on every cover. */
  html.shelf-view .game-card:first-child .shelf-alert:not(.active) {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

.shared-intake {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  padding: 9px 12px;
}

.shared-intake-mark {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.shared-intake-mark .icon {
  width: 14px;
  height: 14px;
}

.shared-intake-copy {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 1px;
}

.shared-intake-copy .eyebrow {
  margin: 0;
}

.shared-intake-copy strong {
  color: var(--ink-soft);
  font-size: 10.5px;
}

.shared-intake-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-intake-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

@media (max-width: 640px) {
  .shared-intake {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .shared-intake-actions {
    width: 100%;
    margin-left: 37px;
  }
}

.discover-trails {
  display: grid;
  min-width: 0;
  max-width: 100%;
  gap: 9px;
  margin: 11px 0 13px;
  overflow: hidden;
}

.discover-trails-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.discover-trails-head .eyebrow {
  margin: 0;
}

.discover-trails-head > span {
  color: var(--muted);
  font-size: 11px;
}

.discover-curation-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 2px 7px;
}

.filter-primary .discover-curation-bar {
  flex: 0 0 auto;
  margin: 0;
}

.filter-primary .discover-curation-toggle {
  min-height: 34px;
  font-size: 10.5px;
}

.discover-curation-bar[hidden] {
  display: none;
}

.discover-curation-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font: 700 10px/1.2 var(--sans);
  cursor: pointer;
}

.discover-curation-toggle:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.discover-curation-toggle .icon:last-child {
  width: 11px;
  height: 11px;
  margin-left: 2px;
  color: var(--muted);
  transition: transform 160ms ease;
}

.discover-curation-toggle[aria-expanded="true"] .icon:last-child {
  transform: rotate(180deg);
}

.discover-curation-count {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent-deep);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1;
}

.discover-curation-bar > span {
  color: var(--muted);
  font-size: 10.5px;
}

.discover-all-curated {
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.discover-trail {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 13px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.discover-trail-rail {
  position: relative;
  min-width: 0;
}

.discover-trail-rail::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 3px;
  width: 58px;
  background: linear-gradient(90deg, transparent, var(--surface) 78%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.discover-trail-rail.is-overflowing::after {
  opacity: 1;
}

.discover-trail-rail.is-at-end::after {
  opacity: 0;
}

.discover-trail-next {
  position: absolute;
  top: 50%;
  right: 8px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent-deep);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 160ms ease, border-color 140ms ease, background 140ms ease;
  cursor: pointer;
}

.discover-trail-next .icon {
  width: 15px;
  height: 15px;
  transform: rotate(-90deg);
}

.discover-trail-next:hover,
.discover-trail-next:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.discover-trail-rail.is-overflowing:not(.is-at-end) .discover-trail-next {
  opacity: 1;
  pointer-events: auto;
}

.discover-trail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.discover-trail-head h3 {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.discover-trail-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.discover-trail-all {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  min-height: 28px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.discover-trail-all:hover,
.discover-trail-all:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
}

.discover-trail-all .icon {
  width: 11px;
  height: 11px;
  transform: rotate(-90deg);
}

.discover-trail-row {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 9px;
  padding-bottom: 3px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.discover-trail-row::-webkit-scrollbar {
  display: none;
}

.discover-trail-card {
  display: grid;
  flex: 1 0 clamp(240px, 26vw, 300px);
  max-width: 460px;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 50%, var(--surface));
  color: inherit;
  text-align: left;
  scroll-snap-align: start;
  cursor: pointer;
}

.discover-trail-card:hover,
.discover-trail-card:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 42%, var(--surface));
}

.discover-trail-cover {
  display: block;
  width: 68px;
  height: 92px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 16px -14px rgba(44, 40, 35, .65);
}

.discover-trail-cover img,
.discover-trail-cover svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discover-trail-cover.is-loading,
.person-covers img.is-loading {
  background: linear-gradient(100deg, var(--surface-2) 20%, color-mix(in srgb, var(--surface) 70%, var(--surface-2)) 50%, var(--surface-2) 80%);
  background-size: 200% 100%;
  animation: history-cover-shimmer 1.2s linear infinite;
}

.discover-trail-cover.is-missing,
.person-covers img.is-missing {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface-2) 82%, transparent), transparent 70%),
    var(--surface-2);
}

.person-covers img.is-missing {
  object-fit: none;
}

@media (prefers-reduced-motion: reduce) {
  .discover-trail-cover.is-loading,
  .person-covers img.is-loading {
    animation: none;
  }
}

.discover-trail-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.discover-trail-copy strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.02em;
  line-height: 1.14;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.discover-trail-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discover-trail-copy b {
  overflow: hidden;
  margin-top: 3px;
  color: var(--accent-deep);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discover-trails-more {
  display: none;
}

@media (max-width: 640px) {
  .discover-trails-head > span {
    display: none;
  }

  .discover-trail-all {
    min-height: 44px;
  }

  .discover-trail-row {
    gap: 8px;
    margin-inline: -2px;
    padding: 2px 2px 4px;
    scroll-snap-type: x mandatory;
  }

  .discover-trail-card {
    flex: 0 0 min(84%, 290px);
    scroll-snap-align: start;
  }

  .discover-trail-rail::after,
  .discover-trail-next {
    display: none;
  }

  .discover-trail.is-mobile-extra {
    display: none;
  }

  .discover-trails.is-expanded .discover-trail.is-mobile-extra {
    display: block;
  }

  .discover-trails-more {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--accent-deep);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
  }

  .discover-trails-more .icon {
    width: 15px;
    height: 15px;
    transition: transform 160ms ease;
  }

  .discover-trails.is-expanded .discover-trails-more .icon {
    transform: rotate(180deg);
  }
}

.discover-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent-deep);
  box-shadow: 0 12px 28px -22px rgba(30, 24, 16, .75);
  cursor: pointer;
}

.discover-top[hidden] {
  display: none;
}

.discover-top:hover,
.discover-top:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.discover-top .icon {
  width: 18px;
  height: 18px;
}

@media (max-width: 640px) {
  .discover-top {
    right: 14px;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    width: 44px;
    height: 44px;
  }
}

.discover-catalog-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 15px 2px 8px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
}

.discover-catalog-head .eyebrow {
  margin: 0;
}

.discover-catalog-head small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.discover-lede {
  margin: 0 2px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.discover-history-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -3px 0 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.discover-history-note .icon {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.discover-history-copy {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 5px;
}

.discover-history-copy strong {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.discover-history-copy small {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discover-history-note button {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-deep);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.discover-history-note button:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .discover-history-note {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    align-items: start;
    gap: 3px 7px;
  }

  .discover-history-note .icon {
    margin-top: 2px;
  }

  .discover-history-note button {
    grid-column: 2;
    justify-self: start;
    margin-left: 0;
  }

  .discover-history-copy {
    display: grid;
    gap: 1px;
  }

  .discover-history-copy small {
    white-space: normal;
  }
}

@container (max-width: 1000px) {
  /* Keep "Clear" from wrapping onto a line of its own when the toolbar is
     narrower than the viewport suggests. */
  .filter-primary .reset-filters {
    width: 38px;
    min-width: 38px;
    padding: 0;
    font-size: 0;
  }

  .filter-primary .reset-filters .icon {
    width: 16px;
    height: 16px;
    margin: 0;
  }
}

.filter-count {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.4;
}

/* A filter toggle is a utility, not the page's primary action. Keep it
   outlined both closed and open. */
.filter-card .filter-more-toggle {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  color: var(--ink-soft);
}

.filter-card .filter-more-toggle:hover,
.filter-card .filter-more-toggle.is-active {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.view-switcher-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.view-switcher-wrap .view-switcher-label {
  margin: 0;
  padding-left: 2px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.view-switcher {
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}

.view-switcher .view-button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
}

.view-switcher .view-button:hover {
  border-color: transparent;
  background: var(--surface);
  color: var(--ink);
}

.view-switcher .view-button.is-active {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

@media (max-width: 1279px) {
  .view-switcher-wrap .view-switcher-label {
    display: none;
  }
}

.settings-status-row {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.settings-account-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: start;
  gap: 12px 18px;
  margin-top: 8px;
}

.settings-account-fields .field,
.settings-account-fields .toggle-field {
  margin-top: 0;
}

.settings-account-fields .toggle-field.settings-toggle {
  align-self: center;
}

.account-security-overview {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
}

.security-overview-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.security-ring {
  position: relative;
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--success);
}

.security-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.security-ring circle {
  fill: none;
  stroke-width: 4;
}

.security-ring-track {
  stroke: var(--line);
}

.security-ring-fill {
  stroke: currentColor;
  stroke-linecap: round;
}

.security-ring b {
  position: relative;
  z-index: 1;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.security-ring.is-warn {
  color: var(--gold);
}

.security-overview-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.security-overview-progress {
  color: var(--muted);
  font-size: 10.5px;
}

.security-overview-cta {
  flex: 0 0 auto;
  margin-left: auto;
}

.account-security-overview.is-secure {
  gap: 0;
  padding: 10px 12px;
}

.account-security-overview.is-secure .security-ring {
  flex-basis: 36px;
  width: 36px;
  height: 36px;
}

.account-security-overview.is-secure .security-ring b {
  font-size: var(--type-caption-sm);
}

.security-overview-more {
  margin-top: 5px;
}

.security-overview-more > summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  color: var(--accent-deep);
  font-size: 10.5px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

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

.security-overview-more > summary .icon {
  width: 12px;
  height: 12px;
  transition: transform 150ms ease;
}

.security-overview-more[open] > summary .icon {
  transform: rotate(180deg);
}

.security-overview-more .security-checklist {
  margin-top: 7px;
}

.security-checklist {
  display: grid;
  gap: 6px;
  margin-top: 11px;
}

.security-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.security-check-icon {
  display: grid;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface);
  color: var(--gold);
}

.security-check.is-done .security-check-icon {
  color: var(--success);
}

.security-check-icon .icon {
  width: 13px;
  height: 13px;
}

.security-check-copy {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 1px;
}

.security-check-copy strong {
  font-size: 12px;
}

.security-check-copy small {
  color: var(--muted);
  font-size: 11px;
}

.security-check-state {
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.security-check.is-done .security-check-state {
  color: var(--ink-soft);
}

.security-check .text-action {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 2px 5px;
  font-size: 10.5px;
}

@media (max-width: 640px) {
  .security-overview-head {
    flex-wrap: wrap;
  }

  .security-overview-cta {
    width: 100%;
    margin-left: 0;
  }

  .security-check {
    flex-wrap: wrap;
  }

  .security-check .text-action {
    margin-left: 33px;
    min-height: 44px;
  }
}

.security-overview-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.security-overview-head .eyebrow {
  margin: 0 0 1px;
}

.security-overview-head h3 {
  margin: 0;
  font-size: 16px;
}

.security-overview-state,
.settings-status,
.auto-status,
.device-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--type-caption-sm);
  font-weight: 700;
  line-height: 1.35;
}

.security-overview-state {
  margin-left: auto;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.security-overview-state.is-good {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.security-overview-state.is-warn {
  background: var(--gold-soft);
  color: var(--ink-soft);
}

.security-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--line);
}

@media (max-width: 640px) {
  .security-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.security-overview-grid > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
  padding: 7px 9px;
  background: var(--surface);
}

.security-overview-grid strong {
  font-family: var(--serif);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.security-overview-grid small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  line-height: 1.2;
  white-space: normal;
}

.security-overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.security-overview-actions .text-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--accent-deep);
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.security-overview-actions .icon {
  width: 13px;
  height: 13px;
}

@media (max-width: 640px) {
  .security-overview-actions .text-action {
    min-height: 44px;
  }
}

.settings-tour-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
}

.settings-tour-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.settings-tour-copy .eyebrow {
  margin: 0 0 3px;
}

.settings-tour-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.settings-tour-copy strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  margin-right: 5px;
}

.settings-tour-button {
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .settings-account-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .settings-tour-card {
    flex-wrap: wrap;
    padding: 16px;
  }

  .settings-tour-button {
    width: 100%;
    justify-content: center;
  }
}

.person-covers.is-single {
  justify-content: center;
  align-items: center;
  min-height: 100px;
  height: 100px;
}

.person-covers.is-single img {
  flex-basis: 72px;
  width: 72px;
  height: 100px;
  border-radius: 8px;
}

.person-self {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.best-total-open {
  gap: 4px;
  font-size: var(--type-caption-sm);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.best-total-open-label {
  display: none;
}

@media (min-width: 641px) {
  .modal-head-price .best-total-open-label {
    display: inline;
  }

  .modal-head-price .best-total-offer {
    padding-right: 64px;
  }
}

.mobile-title-count {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  margin-left: 2px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.mobile-title-count:empty {
  display: none;
}

.people-lede {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .people-lede {
    display: none;
  }
}

/* The card alert was a dashed outline at 10.5px, easy to read as metadata
   instead of an action. A soft fill keeps it secondary but clickable. */
.game-card .quick-alert:not(.active) {
  border-style: solid;
  background: color-mix(in srgb, var(--accent-soft) 42%, transparent);
}

/* Saving is the primary action on a Discover card; the watch action stays
   outlined next to it. */
.game-card .quick-alert.wishlist-save {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fbf7ed;
  font-weight: 700;
  text-decoration: none;
}

.game-card .quick-alert.wishlist-save .icon {
  width: 14px;
  height: 14px;
}

@media (max-width: 640px) {
  .game-card .quick-alert.wishlist-save {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }
}

.game-card .quick-alert.wishlist-save:hover {
  border-color: var(--accent-deep);
  background: var(--accent-deep);
  color: #fbf7ed;
}

@media (min-width: 641px) {
  html.shelf-view .price-row-more .quick-alert.wishlist-save,
  html.compact-cards .price-row-more .quick-alert.wishlist-save {
    display: inline-flex;
  }
}

[data-theme="dark"] .game-card .quick-alert.wishlist-save {
  color: #1d2419;
}

/* Shelf rows read as a set only when the text below each cover starts on the
   same line. Reserve two title lines and one tag line, including for cards
   that happen to have neither. */
html.shelf-view .game-card .game-title {
  min-height: 2.3em;
}

html.shelf-view .game-card .game-tags {
  min-height: 22px;
}

html.shelf-view .game-card .game-tags:empty {
  display: flex;
}

.person-games.is-small {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 760px;
  margin-inline: auto;
}

.person-games.is-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1000px;
}

@media (max-width: 999px) {
  .person-games.is-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 760px;
  }
}

@media (max-width: 640px) {
  .person-games.is-small,
  .person-games.is-three {
    grid-template-columns: 1fr;
    max-width: none;
  }
}

/* Saving stays the primary Discover action; the first-offer watch is a quiet
   text affordance on desktop and keeps its 44px pill on touch screens. */
@media (min-width: 641px) {
  .game-card .price-row-more .quick-alert.first-offer:not(.active) {
    padding: 4px 2px;
    border-color: transparent;
    background: transparent;
    color: var(--muted);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
  }

  .game-card .price-row-more .quick-alert.first-offer:not(.active):hover {
    border-color: transparent;
    background: transparent;
    color: var(--accent-deep);
    text-decoration-style: solid;
  }
}

.person-modal-copy {
  flex: 0 0 auto;
  margin-left: auto;
  width: 40px;
  height: 40px;
}

@media (max-width: 640px) {
  .person-modal-copy {
    width: 44px;
    height: 44px;
  }
}

.action-label-short {
  display: none;
}

@media (min-width: 641px) {
  .game-card .price-row-more {
    flex-wrap: nowrap;
    align-items: center;
  }

  .game-card .price-row-more .first-offer .action-label-full {
    display: none;
  }

  .game-card .price-row-more .first-offer .action-label-short {
    display: inline;
  }
}

@media (max-width: 640px) {
  /* A single game should not sit in half of a two-column shelf view. Give it
     the full width and the same horizontal card anatomy as the default grid. */
  html.shelf-view .game-grid.is-sparse,
  html.compact-cards .game-grid.is-sparse {
    grid-template-columns: 1fr;
  }

  html.shelf-view .game-grid.is-sparse .game-card,
  html.compact-cards .game-grid.is-sparse .game-card {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    align-content: start;
    align-items: start;
    min-height: 0;
    padding: 10px;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: none;
  }

  html.shelf-view .game-grid.is-sparse .game-card::after,
  html.compact-cards .game-grid.is-sparse .game-card::after {
    display: none;
  }

  html.shelf-view .game-grid.is-sparse .game-card .cover,
  html.compact-cards .game-grid.is-sparse .game-card .cover {
    width: 84px;
    height: 112px;
    aspect-ratio: auto;
    border-radius: 9px;
  }

  html.shelf-view .game-grid.is-sparse .game-card .game-title,
  html.compact-cards .game-grid.is-sparse .game-card .game-title {
    min-height: 0;
    font-size: 17px;
  }
}

.person-modal-copy {
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
}

.person-modal-copy:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
}

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

.person-modal-name-row h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.person-modal-name-row .person-modal-copy {
  margin-left: 0;
}

.detail-side-offer {
  display: none;
}

.detail-side-offer-inner {
  display: grid;
  gap: 8px;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 12px 30px -28px rgba(35, 28, 20, .55);
}

@media (min-width: 901px) {
  .detail-column-side {
    position: sticky;
    top: 58px;
    align-self: start;
    gap: 0;
  }

  .detail-side-offer {
    display: grid;
    grid-template-rows: 0fr;
    margin-bottom: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: grid-template-rows 180ms ease, opacity 140ms ease, margin-bottom 180ms ease;
  }

  .detail-side-offer:not(.is-hidden) {
    grid-template-rows: 1fr;
    margin-bottom: 18px;
    opacity: 1;
    visibility: visible;
  }

  .detail-side-offer .best-total-offer {
    min-height: 0;
  }
}

@media (min-width: 641px) {
  .person-games.is-small .person-game-cover,
  .person-games.is-three .person-game-cover {
    flex-basis: 64px;
    width: 64px;
    height: 64px;
    border-radius: 11px;
  }
}

.person-games.is-three {
  max-width: 940px;
}

@media (max-width: 640px) {
  .alert-filter-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .alert-filter-fields .filter-field {
    max-width: none;
  }
}

/* A slim bar turns the target/current pair into a glanceable gap. */
.active-alert-progress {
  width: min(200px, 100%);
  height: 4px;
  margin-top: 2px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  appearance: none;
}

.active-alert-progress::-webkit-progress-bar {
  border-radius: inherit;
  background: var(--line);
}

.active-alert-progress::-webkit-progress-value {
  border-radius: inherit;
  background: var(--alert-progress, var(--success));
}

.active-alert-progress::-moz-progress-bar {
  border-radius: inherit;
  background: var(--alert-progress, var(--success));
}

.active-alert-progress.is-hit,
.active-alert-progress.is-near {
  --alert-progress: var(--success);
}

.active-alert-progress.is-far {
  --alert-progress: var(--gold);
}

.active-alert-progress.is-empty {
  --alert-progress: var(--line-strong);
}

/* Directory sorting stays compact and consistent with the other lists. */
.people-sort {
  display: block;
  flex: 0 0 auto;
}

.people-scope {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}

.people-scope .chip {
  min-height: 36px;
}

.people-scope .chip b {
  padding: 0 4px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.people-scope .chip.active b {
  background: color-mix(in srgb, var(--surface) 64%, transparent);
  color: var(--accent-deep);
}

.people-sort-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.people-sort-chips .chip {
  min-height: 36px;
}

@media (max-width: 640px) {
  .people-sort {
    display: block;
  }

  .people-scope {
    flex: 1 1 100%;
  }

  .people-scope .chip {
    flex: 1;
    justify-content: center;
    min-height: 44px;
  }

  .people-sort-chips {
    display: none;
  }

  .people-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px;
    align-items: center;
    gap: 6px;
  }

  .people-controls .people-search {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
  }

  .people-controls .people-sort {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
  }

  .people-sort select {
    width: 100%;
    min-width: 0;
    padding: 0 8px;
  }

  .people-controls .people-scope,
  .people-controls .people-lede {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* The directory's loading state uses the same cards as the result, so the
   page does not jump when the first shelf arrives. */
.people-skeleton {
  align-items: stretch;
}

.people-skeleton .person-card {
  pointer-events: none;
}

.person-skeleton-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.person-skeleton-avatar {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
}

.person-skeleton-lines {
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
  min-width: 0;
}

.person-skeleton-covers {
  display: block;
  height: 64px;
  border-radius: 8px;
}

.person-skeleton-card.is-compact .person-skeleton-covers {
  height: 42px;
}

/* Larger shelf previews give the directory the feel of a shelf, not a list. */
.person-covers {
  height: 70px;
  gap: 6px;
}

.person-covers img {
  flex-basis: 56px;
  width: 56px;
  height: 70px;
  border-radius: 7px;
}

.person-covers img {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface-2) 82%, transparent), transparent 70%),
    var(--surface-2);
}

.person-covers {
  position: relative;
}

.person-covers-more {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 2px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(20, 24, 22, .78);
  color: #fff;
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
}

.person-covers-more small {
  color: rgba(255, 255, 255, .82);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}

/* Long public shelves need a way back without losing the sheet controls. */
.public-top-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  color: var(--ink-soft);
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(10px);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.public-top-button[hidden] {
  display: none;
}

.public-top-button:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

.public-top-button .icon {
  width: 15px;
  height: 15px;
}

.person-top-button {
  bottom: 92px;
  z-index: 6;
}

@media (max-width: 640px) {
  .public-top-button {
    right: 14px;
    bottom: 16px;
  }

  .person-top-button {
    right: 14px;
    bottom: 86px;
  }
}

@media (min-width: 901px) {
  .people-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 10px;
  }

  .people-controls .people-search {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: none;
  }

  .people-controls .people-sort {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .people-controls .people-scope {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  .people-controls .people-lede {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    margin-left: 12px;
    text-align: right;
  }

  .people-controls .people-sort-chips {
    display: none;
  }
}

/* Public profile loading mirrors the hero and cards that replace it. */
.public-person-skeleton {
  display: grid;
  gap: 18px;
}

.public-hero-skeleton {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}

.public-avatar-skeleton {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
}

.public-hero-skeleton-copy {
  display: grid;
  flex: 1 1 auto;
  gap: 5px;
  min-width: 0;
}

.public-hero-skeleton-copy .skeleton.line {
  margin: 0;
}

.public-stat-skeleton {
  flex: 0 0 150px;
  height: 84px;
  border-radius: 18px;
}

.public-skeleton-panel {
  padding: 18px;
}

.public-skeleton-panel .person-games {
  margin: 0;
}

.public-skeleton-panel .person-skeleton-card {
  min-height: 146px;
}

@media (max-width: 640px) {
  .public-hero-skeleton {
    padding: 16px;
  }

  .public-avatar-skeleton {
    flex-basis: 54px;
    width: 54px;
    height: 54px;
  }

  .public-stat-skeleton {
    display: none;
  }

  .public-skeleton-panel {
    padding: 13px;
  }
}

/* Discover closes with an explanation and a next step, not a bare count. */
.discover-end {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 16px 18px;
}

.discover-end-mark {
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.discover-end-mark .icon {
  width: 19px;
  height: 19px;
}

.discover-end-copy {
  flex: 1 1 240px;
  min-width: 0;
}

.discover-end-copy .eyebrow {
  margin-bottom: 2px;
}

.discover-end-copy strong {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.15;
}

.discover-end-copy p:last-child {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10.5px;
}

.discover-end-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .discover-end {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .discover-end-copy {
    flex-basis: calc(100% - 56px);
  }

  .discover-end-actions {
    width: 100%;
    justify-content: stretch;
  }

  .discover-end-actions .btn {
    flex: 1 1 auto;
    min-height: 44px;
  }
}

/* Activity day headers stay in view, and each run carries its status as a rail. */
.activity-day-head {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: -6px 0 0 -22px;
  padding: 8px 10px 8px 22px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
}

.run-card.run-ok {
  box-shadow: inset 3px 0 0 var(--success);
}

.run-card.run-partial,
.run-card.run-interrupted,
.run-card.run-running {
  box-shadow: inset 3px 0 0 var(--gold);
}

.run-card.run-error {
  box-shadow: inset 3px 0 0 var(--danger);
}

/* Alerts load as alert cards, so the feed does not jump from a text line. */
.alert-feed-skeletons {
  display: grid;
  gap: 8px;
}

.alert-skeleton {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.alert-skeleton.is-compact {
  padding-block: 9px;
}

.alert-skeleton-cover {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.alert-skeleton.is-compact .alert-skeleton-cover {
  flex-basis: 34px;
  width: 34px;
  height: 34px;
}

.alert-skeleton-copy {
  display: grid;
  flex: 1 1 auto;
  gap: 3px;
  min-width: 0;
}

.alert-skeleton-copy .skeleton.line {
  margin: 0;
}

/* The wishlist closes with a quiet shelf mark, except when the invite card
   already provides the ending. */
.load-more-done.shelf-end {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 11px;
}

.shelf-end .icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

/* Alert feed closure. */
.alerts-end {
  margin-top: 12px;
  padding: 0;
}

.alerts-end-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
}

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

.alerts-end-summary > .icon:last-child {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: transform 150ms ease;
}

.alerts-end[open] .alerts-end-summary > .icon:last-child {
  transform: rotate(180deg);
}

.alerts-end-mark {
  display: grid;
  flex: 0 0 26px;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.alerts-end-mark .icon {
  width: 14px;
  height: 14px;
}

.alerts-end-copy {
  display: grid;
  flex: 1 1 auto;
  gap: 1px;
  min-width: 0;
}

.alerts-end-copy strong {
  color: var(--ink);
  font-size: 12px;
}

.alerts-end-copy small {
  color: var(--muted);
  font-size: 10px;
}

.alerts-end-details {
  padding: 0 12px 10px 47px;
}

.alerts-end-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.alerts-end-actions .btn {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 10.5px;
}

@media (max-width: 640px) {
  .alerts-end-summary {
    min-height: 44px;
    padding: 7px 10px;
  }

  .alerts-end-details {
    padding: 0 10px 10px 45px;
  }

  .alerts-end-actions .btn {
    flex: 1 1 auto;
    min-height: 44px;
    justify-content: center;
  }
}

/* Per-store comparison against its own 90-day history. */
.domain-panel.is-best {
  border-color: color-mix(in srgb, var(--success) 40%, var(--line));
  background: color-mix(in srgb, var(--success) 5%, var(--surface));
}

.domain-best {
  margin-left: auto;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--success) 35%, var(--line));
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.domain-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-left: auto;
}

.domain-head-actions .domain-best {
  margin-left: 0;
}

.domain-menu {
  position: relative;
}

.domain-menu-toggle {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  list-style: none;
  cursor: pointer;
}

.domain-menu-toggle::-webkit-details-marker {
  display: none;
}

.domain-menu-toggle .icon {
  width: 14px;
  height: 14px;
}

.domain-menu[open] .domain-menu-toggle,
.domain-menu-toggle:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
}

.domain-menu-panel {
  position: absolute;
  top: 31px;
  right: 0;
  z-index: 8;
  display: grid;
  min-width: 150px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 14px 30px -22px rgba(30, 24, 16, .8);
}

.domain-menu-panel .text-action {
  display: flex;
  width: 100%;
  padding: 7px 8px;
  border-radius: 6px;
  text-align: left;
  text-decoration: none;
}

.domain-menu-panel .text-action:hover {
  background: var(--danger-soft);
}

.domain-rank {
  width: fit-content;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.domain-panel.is-best .domain-rank {
  color: var(--success);
}

.domain-compare {
  width: fit-content;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.domain-compare.is-down {
  color: var(--success);
}

.domain-compare.is-up {
  color: var(--gold);
}

/* Offline is a card with a next step, not an alarming strip. */
.offline-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-color: color-mix(in srgb, var(--gold) 38%, var(--line));
  border-radius: 13px;
  background: color-mix(in srgb, var(--gold-soft) 68%, var(--surface));
}

.offline-banner-mark {
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--gold) 15%, transparent);
  color: var(--gold);
}

.offline-banner-mark .icon {
  width: 15px;
  height: 15px;
}

.offline-banner-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.offline-banner-copy strong {
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
}

.offline-banner-copy small {
  color: var(--muted);
  font-size: 10px;
}

.offline-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.offline-banner-actions .btn {
  min-height: 32px;
  padding: 4px 9px;
  font-size: 10.5px;
}

@media (max-width: 640px) {
  .offline-banner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .offline-banner-actions {
    grid-column: 1 / -1;
    width: 100%;
  }

  .offline-banner-actions .btn {
    flex: 1 1 auto;
    min-height: 44px;
    justify-content: center;
  }
}

/* Settings sections become one sticky picker on phones. */
@media (max-width: 640px) {
  .settings-toc-toggle {
    position: sticky;
    top: 8px;
    z-index: 7;
    justify-content: flex-start;
    gap: 6px;
    box-shadow: var(--shadow-soft);
  }

  .settings-toc-toggle .settings-toc-current {
    max-width: 46%;
    margin-left: auto;
    overflow: hidden;
    color: var(--accent-deep);
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .settings-toc-toggle > .icon:last-child {
    flex: 0 0 auto;
    margin-left: 2px;
    color: var(--muted);
    transition: transform 160ms ease;
  }

  .settings-toc-toggle[aria-expanded="true"] > .icon:last-child {
    transform: rotate(180deg);
  }

  .settings-toc.toc-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    max-height: 60vh;
    padding: 8px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
  }

  .settings-toc.toc-open button {
    width: 100%;
    min-height: 44px;
    padding: 9px 10px;
    border-radius: 8px;
    text-align: left;
  }

  .settings-toc.toc-open button.active {
    background: var(--accent-soft);
    color: var(--accent-deep);
  }
}

/* Coverage segments are links, not just decoration. */
.coverage-meter a {
  cursor: pointer;
}

.coverage-meter a rect {
  transition: opacity 120ms ease;
}

.coverage-meter a:hover rect {
  opacity: .82;
}

.coverage-meter a:focus-visible {
  outline: none;
}

.coverage-meter a:focus-visible rect {
  stroke: var(--ink);
  stroke-width: .8;
}

/* Toasts carry their status on the edge and a real timeout line. */
.toast {
  position: relative;
  overflow: hidden;
  padding-left: 15px;
  border-color: color-mix(in srgb, var(--accent) 16%, var(--line));
}

.toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
}

.toast-success {
  border-color: color-mix(in srgb, var(--success) 25%, var(--line));
  background: color-mix(in srgb, var(--success) 5%, var(--surface));
}

.toast-success::before,
.toast-success .toast-timer {
  background: var(--success);
}

.toast-warn {
  border-color: color-mix(in srgb, var(--gold) 28%, var(--line));
  background: color-mix(in srgb, var(--gold-soft) 38%, var(--surface));
}

.toast-warn::before,
.toast-warn .toast-timer {
  background: var(--gold);
}

.toast-error {
  border-color: color-mix(in srgb, var(--danger) 28%, var(--line));
  background: color-mix(in srgb, var(--danger-soft) 38%, var(--surface));
}

.toast-error::before,
.toast-error .toast-timer {
  background: var(--danger);
}

.toast-timer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  opacity: .35;
  transform-origin: left center;
}

/* The image lightbox becomes a small editorial spread. */
.image-lightbox {
  background:
    radial-gradient(circle at 22% 14%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 42%),
    radial-gradient(circle at 80% 84%, color-mix(in srgb, var(--gold) 10%, transparent), transparent 42%),
    color-mix(in srgb, #17130f 95%, black);
}

.image-lightbox-figure {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  justify-items: center;
  max-width: 100%;
  margin: 0;
}

.image-lightbox img {
  border-radius: 16px;
  box-shadow: 0 32px 90px -30px rgba(0, 0, 0, .9);
}

.image-lightbox-figure figcaption {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  color: #f1e7d5;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.2;
  text-align: center;
}

.image-lightbox-figure figcaption span {
  color: #c4b49e;
  font-family: var(--sans);
  font-size: 11px;
}

.image-lightbox-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: #c4b49e;
  font-size: 10.5px;
  transform: translateX(-50%);
}

.image-lightbox-hint .icon {
  width: 13px;
  height: 13px;
}

.image-lightbox-close {
  background: color-mix(in srgb, #2a241c 88%, transparent);
  border-color: #493d30;
  color: #f1e7d5;
  backdrop-filter: blur(10px);
}

/* The alert panel gets the same target rail as the alerts page. */
.detail-alert-progress-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.detail-alert-progress-row .active-alert-progress {
  flex: 1 1 130px;
  width: auto;
}

.detail-alert-progress-row small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
}

/* The chart legend marks the store holding the current best offer. */
.chart-source.is-best {
  border-color: color-mix(in srgb, var(--success) 34%, var(--line));
  background: color-mix(in srgb, var(--success) 6%, var(--surface));
}

.chart-source-best {
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--accent-deep);
  color: var(--surface);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Admin gets a four-tile health ribbon before the detailed cards. */
.admin-health-ribbon {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--surface) 72%, var(--surface-2));
}

.admin-health-board-head {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.admin-health-board-mark {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--success) 12%, var(--surface));
  color: var(--success);
}

.admin-health-board-mark.is-warn {
  background: color-mix(in srgb, var(--gold) 16%, var(--surface));
  color: var(--gold);
}

.admin-health-board-mark.is-error {
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
  color: var(--danger);
}

.admin-health-board-mark .icon {
  width: 17px;
  height: 17px;
}

.admin-health-board-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.admin-health-board-copy .eyebrow {
  margin: 0;
}

.admin-health-board-copy strong {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.15;
}

.admin-health-board-copy small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.admin-health-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.admin-health-review {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-deep);
  font: inherit;
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .02em;
  white-space: nowrap;
  cursor: pointer;
}

.admin-health-review:hover,
.admin-health-review:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.admin-health-review .icon {
  width: 12px;
  height: 12px;
  transform: rotate(-90deg);
}

.admin-health-overall {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  color: var(--ink-soft);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.admin-health-head-actions .admin-health-overall {
  margin-left: 0;
}

.admin-health-overall i,
.admin-health-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.admin-health-overall.is-warn i { background: var(--gold); }
.admin-health-overall.is-error i { background: var(--danger); }

.admin-health-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.admin-health-tile {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: start;
  align-content: start;
  gap: 7px;
  min-width: 0;
  min-height: 92px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.admin-health-tile:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.admin-health-tile-icon {
  display: grid;
  flex: 0 0 26px;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
}

.admin-health-tile-icon .icon {
  width: 14px;
  height: 14px;
}

.admin-health-tile-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.admin-health-tile-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-health-tile-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-health-detail {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-health-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  margin-top: 2px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 7.5px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.admin-health-tile.is-warn .admin-health-state i { background: var(--gold); }
.admin-health-tile.is-error .admin-health-state i { background: var(--danger); }

.admin-health-spark {
  display: block;
  flex: 0 0 36px;
  width: 36px;
  height: 15px;
  color: color-mix(in srgb, var(--muted) 68%, transparent);
}

.admin-health-spark svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.admin-health-tile.is-warn .admin-health-spark {
  color: color-mix(in srgb, var(--gold) 72%, transparent);
}

.admin-health-tile.is-error .admin-health-spark {
  color: color-mix(in srgb, var(--danger) 72%, transparent);
}

@media (max-width: 900px) {
  .admin-health-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .admin-health-board-head {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
  }

  .admin-health-head-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-left: 43px;
  }

  .admin-health-overall {
    padding-left: 0;
    font-size: 8px;
  }

  .admin-health-tile {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 82px;
    gap: 5px;
    padding: 8px;
  }

  .admin-health-tile-icon {
    display: none;
  }

  .admin-health-tile-copy strong {
    font-size: 13px;
  }

  .admin-health-tile-copy small {
    font-size: 7.5px;
  }

  .admin-health-spark {
    flex-basis: 28px;
    width: 28px;
    height: 14px;
  }
}

@media (max-width: 640px) {
  .image-lightbox {
    padding: 16px;
  }

  .image-lightbox-figure figcaption {
    font-size: 15px;
  }

  .detail-alert-progress-row small {
    flex-basis: 100%;
  }
}

.chart-store .store-favicon {
  width: 13px;
  height: 13px;
  border-radius: 3px;
}

.settings-autosave-short {
  display: none;
}

@media (max-width: 640px) {
  .settings-autosave-label {
    display: none;
  }

  .settings-autosave-short {
    display: inline;
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
  }
}

.shortcut-groups {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.shortcut-group h3 {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.shortcut-group .shortcut-list {
  margin-top: 0;
}

.shortcut-group .shortcut-row:first-child {
  border-top: 0;
}

.sync-history {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}

.sync-history-label {
  margin-right: 2px;
  color: var(--muted-2);
  font-size: var(--type-caption-sm);
  font-weight: 650;
}

.sync-history-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
}

.sync-history-dot.ok { background: var(--success); }
.sync-history-dot.partial,
.sync-history-dot.interrupted { background: var(--gold); }
.sync-history-dot.error { background: var(--danger); }
.sync-history-dot.running { background: var(--accent); }

.command-empty-suggestions .command-label span {
  color: var(--muted-2);
  font-size: var(--type-caption-sm);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.fatal-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
}

.fatal-state .empty-art {
  margin: 12px auto 4px;
}

.fatal-message {
  font-size: 11px !important;
  opacity: .8;
}

.fatal-hint {
  margin-top: -2px;
  color: var(--muted-2) !important;
  font-size: 11px !important;
}

.fatal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}

.pwa-banner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-radius: 17px;
}

.pwa-banner-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
}

.pwa-banner-mark .brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.pwa-banner-copy {
  gap: 2px;
}

.pwa-banner-copy strong {
  font-size: 13px;
}

.pwa-banner-copy span {
  font-size: 10.5px;
}

.pwa-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  margin-top: 2px;
  color: var(--muted) !important;
  font-size: 9.5px !important;
}

.pwa-benefits > span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.pwa-benefits .icon {
  width: 11px;
  height: 11px;
  color: var(--accent);
}

.pwa-banner-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding-right: 42px;
}

.pwa-banner-actions .btn {
  min-height: 36px;
}

.pwa-banner-close {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.pwa-banner-close:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.pwa-banner-close .icon {
  width: 14px;
  height: 14px;
}

@media (max-width: 640px) {
  .pwa-banner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .pwa-banner-copy {
    padding-right: 44px;
  }

  .pwa-banner-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    padding-right: 0;
  }

  .pwa-banner-actions .btn {
    flex: 1 1 auto;
    min-height: 44px;
    justify-content: center;
  }

  .pwa-banner-close {
    width: 44px;
    height: 44px;
  }
}

.settings-search-mark {
  padding: 0 1px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--gold-soft) 82%, var(--surface));
  color: var(--ink);
}

.public-not-found {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.public-not-found .empty-art {
  margin: 0 0 18px;
}

.public-not-found .public-subtitle {
  margin-bottom: 16px;
}

.discover-top-recents.is-empty-results {
  display: none;
}

.recent-games-rail {
  margin: 2px 0 14px;
}

.recent-games-head {
  display: flex;
  align-items: center;
  padding: 0 2px;
}

.recent-games-head .eyebrow {
  margin: 0;
}

.recent-games-list {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  padding: 2px 2px 4px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.recent-games-list::-webkit-scrollbar {
  display: none;
}

.recent-game {
  display: flex;
  flex: 1 0 230px;
  align-items: center;
  gap: 9px;
  min-width: 230px;
  max-width: 360px;
  min-height: 62px;
  padding: 7px 11px 7px 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: inherit;
  font: inherit;
  text-align: left;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.recent-game-price {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--accent-deep);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.recent-game-price.is-empty {
  color: var(--muted);
  font-weight: 500;
}

.recent-game-cover {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.recent-game-cover img,
.recent-game-cover svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-game-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.recent-game-copy strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.recent-game-copy small {
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) {
  .recent-game:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
  }
}

@media (max-width: 640px) {
  .recent-game {
    flex: 0 0 220px;
    min-width: 220px;
    max-width: 220px;
    min-height: 62px;
  }
}

.cover-ribbon-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.cover-ribbon-head .cover-ribbon-label {
  margin: 0;
  padding: 0;
}

.cover-ribbon-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--accent-deep);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cover-ribbon-link .icon {
  width: 11px;
  height: 11px;
}

.cover-ribbon {
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

@media (max-width: 640px) {
  .cover-ribbon-link {
    min-height: 44px;
  }
}

/* Sticky chrome only earns elevation while content passes under it. */
.alert-day-group h2.is-stuck,
.activity-day-head.is-stuck,
.detail-jump.is-stuck,
.settings-nav.is-stuck,
.settings-toc.is-stuck,
.settings-toc-toggle.is-stuck,
.person-modal-tools.is-stuck,
#page-header.is-stuck {
  box-shadow: 0 12px 26px -24px rgba(44, 40, 35, .75);
}

.list-sticky-tools.is-stuck {
  box-shadow: 0 12px 26px -18px rgba(44, 40, 35, .55);
}

/* A thin proportion strip makes the shared/missing split visible before the cards. */
.person-compare-meter {
  display: block;
  width: 100%;
  height: 4px;
  margin: 2px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.person-compare-meter rect.shared {
  fill: var(--success);
}

.person-compare-meter rect.missing {
  fill: var(--line-strong);
}

.person-modal.is-long .person-compare-meter {
  margin-bottom: 0;
}

.activity-end {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
  padding: 14px;
}

.activity-end-mark {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.activity-end-mark .icon {
  width: 16px;
  height: 16px;
}

.activity-end-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.activity-end-copy strong {
  display: block;
  color: var(--ink);
  font-size: 12.5px;
}

.activity-end-copy p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10.5px;
}

.activity-end-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.activity-end-actions .btn {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 10.5px;
}

@media (max-width: 640px) {
  .activity-end {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .activity-end-copy {
    flex-basis: calc(100% - 46px);
  }

  .activity-end-actions {
    width: 100%;
  }

  .activity-end-actions .btn {
    flex: 1 1 auto;
    min-height: 44px;
    justify-content: center;
  }
}

.alert-history-list {
  position: relative;
  display: grid;
  gap: 4px;
  margin-top: 4px;
}

.alert-history-list::before {
  content: "";
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 3px;
  width: 1px;
  background: var(--line);
}

.alert-hit {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding-left: 0;
}

.alert-hit-dot {
  z-index: 1;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--surface);
}

.alert-hit-copy {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}

.alert-hit-copy b {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.alert-hit-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-hit-time {
  color: var(--muted-2);
  font-size: var(--type-caption-sm);
  white-space: nowrap;
}

/* A card that is saving gets a precise marker beyond the shared autosave pill. */
.settings-card.is-dirty {
  position: relative;
}

.settings-card.is-dirty::after {
  content: "";
  position: absolute;
  top: 11px;
  right: 13px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-soft) 72%, transparent);
}

/* Game modal loading uses the final layout instead of a bare spinner. */
.game-modal-skeleton {
  min-height: 520px;
}

.game-skeleton-head {
  grid-template-columns: 120px minmax(0, 1fr) minmax(230px, 300px);
}

.game-skeleton-cover {
  display: block;
  width: 120px;
  height: 168px;
  border-radius: 12px;
}

.game-skeleton-heading {
  display: grid;
  gap: 9px;
  padding-top: 4px;
}

.game-skeleton-heading .skeleton.line {
  margin: 0;
}

.game-skeleton-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.game-skeleton-actions span {
  width: 108px;
  height: 34px;
  border-radius: 999px;
}

.game-skeleton-price {
  display: block;
  width: 100%;
  height: 104px;
  border-radius: 18px;
}

.game-skeleton-tabs {
  display: flex;
  gap: 6px;
  padding: 9px 30px;
  border-bottom: 1px solid var(--line);
}

.game-skeleton-tabs span {
  width: 70px;
  height: 24px;
  border-radius: 999px;
}

.game-skeleton-body {
  gap: 18px;
}

.game-skeleton-verdict {
  display: block;
  height: 132px;
  border-radius: 18px;
}

.game-skeleton-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 18px;
}

.game-skeleton-chart {
  display: block;
  height: 235px;
  border-radius: 16px;
}

.game-skeleton-side {
  display: block;
  height: 260px;
  border-radius: 16px;
}

.chart-skeleton {
  position: relative;
  height: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: repeating-linear-gradient(0deg, transparent 0 42px, var(--line) 42px 43px);
}

.chart-skeleton-grid {
  position: absolute;
  inset: 24px 20px 42px 40px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.chart-skeleton-line {
  position: absolute;
  top: 49%;
  right: 16%;
  left: 18%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent) 22%, var(--gold) 70%, transparent);
  opacity: .36;
  transform: rotate(-7deg);
}

.chart-skeleton-legend {
  position: absolute;
  bottom: 13px;
  left: 22px;
  display: flex;
  gap: 7px;
}

.chart-skeleton-legend i {
  width: 54px;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
}

.game-title mark {
  padding: 0 1px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--gold-soft) 82%, var(--surface));
  color: inherit;
}

.no-offer-state {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
}

.no-offer-icon {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--terracotta);
}

.no-offer-icon .icon {
  width: 21px;
  height: 21px;
}

.no-offer-copy {
  flex: 1 1 240px;
  min-width: 0;
}

.no-offer-copy .eyebrow {
  margin-bottom: 2px;
}

.no-offer-copy h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
}

.no-offer-copy p:last-child {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.no-offer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.settings-loading-skeleton {
  display: grid;
  gap: 13px;
}

.settings-skeleton-card {
  display: grid;
  gap: 8px;
  padding: 22px;
}

.settings-skeleton-card .skeleton.line {
  margin: 0;
}

.settings-skeleton-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.settings-skeleton-mark {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.settings-skeleton-heading {
  display: grid;
  flex: 1;
  gap: 6px;
}

.settings-skeleton-heading .line {
  height: 10px;
}

.settings-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 2px 0;
}

.settings-skeleton-field {
  display: block;
  height: 38px;
  border-radius: 10px;
}

.settings-skeleton-block {
  display: block;
  height: 64px;
  border-radius: 12px;
}

@media (max-width: 640px) {
  .settings-skeleton-card {
    padding: 17px;
  }

  .settings-skeleton-grid {
    grid-template-columns: 1fr;
  }
}

::view-transition-old(game-title-transition),
::view-transition-new(game-title-transition) {
  animation-duration: 180ms;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

::view-transition-old(game-price-transition),
::view-transition-new(game-price-transition) {
  animation-duration: 220ms;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (max-width: 640px) {
  .game-skeleton-head {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
  }

  .game-skeleton-cover {
    width: 74px;
    height: 104px;
  }

  .game-skeleton-price {
    display: none;
  }

  .game-skeleton-tabs {
    padding: 8px 16px;
  }

  .game-skeleton-body {
    padding: 14px 16px;
  }

  .game-skeleton-columns {
    grid-template-columns: 1fr;
  }

  .game-skeleton-side {
    display: none;
  }

  .no-offer-state {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .no-offer-copy {
    flex-basis: calc(100% - 58px);
  }

  .no-offer-actions {
    width: 100%;
  }

  .no-offer-actions .btn {
    flex: 1 1 auto;
    min-height: 44px;
    justify-content: center;
  }
}

/* Game comparison */
.compare-mode-enter.is-active {
  color: var(--accent-deep);
}

.compare-check {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 7;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow-soft);
  color: transparent;
  cursor: pointer;
}

.compare-check input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.compare-check .icon {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.compare-check:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.game-card.is-compare-selected {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent);
}

.compare-tray {
  position: fixed;
  right: 16px;
  bottom: 18px;
  left: 16px;
  z-index: 24;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.compare-tray[hidden] {
  display: none;
}

.compare-tray-inner {
  display: flex;
  width: min(820px, 100%);
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(14px);
  pointer-events: auto;
}

.compare-tray-label {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.compare-tray-items {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.compare-tray-items::-webkit-scrollbar {
  display: none;
}

.compare-tray-empty {
  color: var(--muted);
  font-size: 10.5px;
}

.compare-chip {
  display: inline-flex;
  flex: 0 0 auto;
  max-width: 190px;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font: inherit;
  font-size: var(--type-caption-sm);
  cursor: pointer;
}

.compare-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-chip .icon {
  width: 11px;
  height: 11px;
}

.compare-open {
  flex: 0 0 auto;
}

.compare-exit {
  flex: 0 0 auto;
  padding: 3px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.compare-modal {
  padding: 22px;
}

.compare-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.compare-modal-head .eyebrow {
  margin-bottom: 2px;
}

.compare-modal-head h2 {
  margin: 0;
  font-size: 28px;
}

.compare-count {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 10px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.compare-verdicts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.compare-verdict {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1px 8px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--success) 22%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--success) 5%, var(--surface));
}

.compare-verdict small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.compare-verdict strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-verdict b {
  color: var(--accent-deep);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .compare-verdicts {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 8px;
  }

  .compare-verdict {
    padding: 8px 9px;
  }
}

.compare-table-wrap {
  max-height: min(66vh, 620px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.compare-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  table-layout: fixed;
}

.compare-add-slot {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 70px;
  margin-top: 10px;
  padding: 10px 16px;
  border: 1px dashed color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent-soft) 38%, transparent);
  color: var(--accent-deep);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.compare-add-slot:hover {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  background: var(--accent-soft);
}

.compare-add-slot > .icon {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.compare-add-slot-cover {
  display: grid;
  flex: 0 0 40px;
  place-items: center;
  width: 40px;
  height: 52px;
  border: 1px dashed color-mix(in srgb, var(--accent) 48%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent-soft) 44%, var(--surface));
  color: var(--accent-deep);
}

.compare-add-slot-cover .icon {
  width: 18px;
  height: 18px;
}

.compare-add-slot-copy {
  display: grid;
  flex: 1 1 auto;
  gap: 1px;
  min-width: 0;
}

.compare-add-slot-copy strong {
  font-size: 11.5px;
  font-weight: 750;
}

.compare-add-slot-copy small {
  color: var(--muted);
  font-size: 10px;
}

.compare-table thead th.compare-add-head {
  padding: 8px;
  background: color-mix(in srgb, var(--surface-2) 84%, var(--bg));
}

.compare-add-head-slot {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  width: 100%;
  min-height: 100%;
  padding: 10px;
  border: 1px dashed color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent-soft) 28%, var(--surface));
  color: var(--accent-deep);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.compare-add-head-slot:hover {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  background: var(--accent-soft);
}

.compare-add-head-slot .compare-add-slot-cover {
  flex: none;
}

.compare-add-head-copy {
  display: grid;
  gap: 2px;
}

.compare-add-head-copy strong {
  font-size: 11.5px;
  font-weight: 750;
}

.compare-add-head-copy small {
  color: var(--muted);
  font-size: 10px;
}

.compare-add-cell {
  border-left: 1px dashed var(--line);
  background: color-mix(in srgb, var(--surface) 72%, var(--bg));
}

.compare-table th,
.compare-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.compare-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 30px 8px 9px;
  background: var(--surface-2);
}

.compare-criteria-head {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.compare-head-card {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.compare-table thead th.compare-has-vs::before {
  content: "vs";
  position: absolute;
  top: 50%;
  left: -15px;
  z-index: 3;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .04em;
  transform: translateY(-50%);
}

.compare-table thead th:first-child,
.compare-table tbody th {
  position: sticky;
  left: 0;
  width: 104px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.compare-table thead th:first-child {
  z-index: 4;
  background: var(--surface);
}

.compare-table tbody th {
  z-index: 1;
  background: var(--surface);
}

.compare-table td.is-best {
  background: color-mix(in srgb, var(--success) 7%, var(--surface));
}

.compare-best-tag {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--success);
  color: var(--surface);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .03em;
  line-height: 1.1;
  text-transform: uppercase;
}

.compare-remove {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 30px;
  height: 30px;
  min-height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.compare-remove:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.compare-remove .icon {
  width: 13px;
  height: 13px;
}

.compare-game-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding-right: 42px;
}

.compare-cover {
  display: block;
  width: 42px;
  height: 56px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.compare-head-title {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.compare-head-title strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compare-head-title small {
  color: var(--muted);
  font-size: 8.5px;
}

.compare-head-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.compare-head-meta .compare-best-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-head-wins {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.compare-head-wins span {
  padding: 1px 5px;
  border: 1px solid color-mix(in srgb, var(--success) 24%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 8%, var(--surface));
  color: var(--accent-deep);
  font-size: 7.5px;
  font-weight: 750;
  line-height: 1.4;
  white-space: nowrap;
}

.compare-head-card .compare-open-game {
  width: fit-content;
  min-height: 28px;
}

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

.compare-best-label,
.compare-store-count {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  line-height: 1.35;
}

.compare-open-game {
  min-height: 30px;
  padding: 3px 6px;
  font-size: var(--type-caption-sm);
}

.compare-value {
  display: block;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.compare-value.is-good { color: var(--accent-deep); }
.compare-value.is-high { color: var(--terracotta); }

.compare-detail {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.compare-table tbody tr.compare-group-row th {
  position: static;
  width: auto;
  padding: 9px 10px 6px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.compare-empty-row td {
  padding: 14px 12px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.compare-empty-row .icon {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

.compare-mobile-cards,
.compare-mobile-tools {
  display: none;
}

.compare-mobile-switcher {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.compare-mobile-switcher::-webkit-scrollbar {
  display: none;
}

.compare-mobile-switcher button {
  flex: 0 0 auto;
  max-width: 150px;
  min-height: 38px;
  overflow: hidden;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: 650 10px/1.2 var(--sans);
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.compare-mobile-switcher button[aria-pressed="true"] {
  border-color: var(--accent-deep);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.compare-mobile-verdict {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-mobile-add {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 4px 8px;
  font-size: 10px;
}

.compare-mobile-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.compare-mobile-card.is-active {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 10%, transparent);
}

.compare-mobile-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.compare-mobile-title {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.compare-mobile-title strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-mobile-title small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.compare-card-remove {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
}

.compare-card-remove .icon {
  width: 13px;
  height: 13px;
}

.compare-mobile-metrics {
  display: grid;
  gap: 5px;
  margin: 0;
}

.compare-mobile-metrics > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  border-top: 1px dashed var(--line);
}

.compare-mobile-metrics dt {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.compare-mobile-metrics dd {
  min-width: 0;
  margin: 0;
  text-align: right;
}

.compare-mobile-metrics .compare-value {
  font-size: 12px;
}

.compare-mobile-metrics .compare-detail {
  font-size: 8.5px;
}

.compare-mobile-metrics .compare-best-tag {
  margin: 0 0 0 5px;
}

.compare-price-note {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 1px 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.compare-price-note .icon {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
}

#view-content.has-compare-tray {
  padding-bottom: 82px;
}

@media (max-width: 640px) {
  .compare-tray {
    right: 10px;
    bottom: 76px;
    left: 10px;
  }

  .compare-tray-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    padding: 7px;
  }

  .compare-tray-label {
    display: none;
  }

  .compare-tray-items {
    grid-column: 1 / -1;
  }

  .compare-chip {
    max-width: 160px;
    min-height: 34px;
  }

  .compare-open,
  .compare-exit {
    min-height: 40px;
  }

  .compare-check {
    width: 38px;
    height: 38px;
  }

  .compare-modal {
    max-height: calc(90vh - 2px);
    overflow-y: auto;
    padding: 16px;
  }

  .compare-modal-head {
    align-items: flex-end;
    flex-wrap: wrap;
  }

  .compare-modal-head h2 {
    font-size: clamp(20px, 6vw, 24px);
    line-height: 1.05;
    white-space: nowrap;
  }

  .compare-mobile-tools {
    position: sticky;
    top: -1px;
    z-index: 5;
    display: grid;
    gap: 5px;
    margin: 0 -4px 8px;
    padding: 7px 4px 6px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    backdrop-filter: blur(8px);
  }

  .compare-mobile-switcher button {
    min-height: 44px;
  }

  .compare-remove {
    top: 4px;
    right: 4px;
    width: 44px;
    height: 44px;
  }

  .compare-table thead th {
    padding-right: 46px;
  }

  .compare-table-wrap {
    display: none;
  }

  .compare-add-slot {
    display: flex;
    justify-content: flex-start;
    min-height: 72px;
    margin-top: 4px;
    padding: 10px 14px;
  }

  .compare-mobile-cards {
    display: block;
    padding: 0 1px 7px;
  }

  .compare-mobile-card {
    display: none;
  }

  .compare-mobile-card.is-active {
    display: grid;
  }

  .compare-mobile-cards::-webkit-scrollbar {
    display: none;
  }

  .compare-mobile-card {
    flex: 0 0 min(86%, 340px);
    scroll-snap-align: start;
  }

  .compare-mobile-head {
    grid-template-columns: 42px minmax(0, 1fr) 44px;
  }

  .compare-card-remove {
    width: 44px;
    height: 44px;
  }

  .compare-mobile-metrics > div {
    padding: 6px 0;
  }
}

/* Desktop comparison and selection sit together with the layout switcher. */
.wishlist-toolbar .filter-primary .filter-search {
  flex-basis: 240px;
}

.wishlist-toolbar .filter-primary .filter-sort {
  flex-basis: 160px;
  min-width: 140px;
}

.list-action-group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}

.list-action-group .btn {
  min-height: 34px;
  padding: 0 8px;
  gap: 5px;
  white-space: nowrap;
  font-size: 10.5px;
}

.list-action-group .batch-mode-enter.is-icon-only {
  width: 34px;
  padding: 0;
  justify-content: center;
}

.list-action-count {
  display: inline-flex;
  min-width: 26px;
  height: 18px;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 45%, transparent);
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.compare-mode-enter.is-active .list-action-count,
.list-action-row.is-active .list-action-count {
  background: var(--accent);
  color: var(--bg);
}

@media (max-width: 640px) {
  .list-action-group {
    display: none;
  }
}

/* Mobile list actions live in one sheet instead of four controls on the toolbar. */
.list-actions-menu {
  display: none;
}

.list-actions-toggle {
  min-height: 44px;
  padding: 0 10px;
  gap: 5px;
  font-size: 10.5px;
}

.list-actions-toggle::marker,
.list-actions-toggle::-webkit-details-marker {
  display: none;
  content: "";
}

.list-actions-toggle .icon {
  width: 15px;
  height: 15px;
}

.list-actions-menu[open] > .list-actions-toggle {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.list-actions-backdrop {
  display: none;
}

.list-actions-menu[open] .list-actions-backdrop {
  position: fixed;
  z-index: 38;
  inset: 0;
  display: block;
  background: rgba(24, 21, 17, .34);
  animation: list-actions-fade 160ms ease-out;
}

.list-actions-panel {
  position: fixed;
  z-index: 39;
  right: 10px;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  left: 10px;
  display: none;
  width: min(340px, calc(100vw - 20px));
  max-height: min(70vh, 480px);
  margin: 0 auto;
  padding: 8px 12px 12px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-lift);
}

.list-actions-menu[open] .list-actions-panel {
  display: grid;
  gap: 8px;
  animation: list-actions-up 180ms cubic-bezier(.2, .8, .2, 1);
}

.list-actions-grabber {
  justify-self: center;
  width: 36px;
  height: 4px;
  margin: 0 0 2px;
  border-radius: 999px;
  background: var(--line-strong);
}

@keyframes list-actions-up {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes list-actions-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .list-actions-menu[open] .list-actions-panel,
  .list-actions-menu[open] .list-actions-backdrop {
    animation: none;
  }
}

.list-actions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.list-actions-head strong {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}

.list-actions-close {
  width: 44px;
  height: 44px;
  min-height: 44px;
}

.list-actions-hint {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.list-actions-label {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.list-actions-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.list-action-view,
.list-action-row {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font: inherit;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.list-action-view {
  flex-direction: column;
  gap: 4px;
  font-size: var(--type-caption-sm);
}

.list-action-view .icon,
.list-action-row .icon {
  width: 16px;
  height: 16px;
}

.list-action-view.is-active,
.list-action-row.is-active {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.list-action-row {
  justify-content: flex-start;
  padding-inline: 11px;
}

.list-action-row .list-action-count {
  margin-left: auto;
}

@media (max-width: 640px) {
  .list-actions-menu {
    display: block;
    flex: 0 0 auto;
    align-self: center;
  }

  .filter-primary > .view-switcher-wrap,
  .discover-filters > .filter-primary > .compare-mode-enter,
  .toolbar-extra .compare-mode-enter,
  .toolbar-extra .batch-mode-enter {
    display: none;
  }
}

.offer-store-rail {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
  overflow-x: auto;
  padding: 1px 0 3px;
  scrollbar-width: none;
}

.offer-store-rail::-webkit-scrollbar {
  display: none;
}

.offer-rail-item {
  display: inline-grid;
  grid-template-columns: 16px auto auto;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: 10px;
  text-decoration: none;
}

a.offer-rail-item:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.offer-rail-item.is-best {
  border-color: color-mix(in srgb, var(--success) 36%, var(--line));
  background: color-mix(in srgb, var(--success) 7%, var(--surface));
}

.offer-rail-item .store-favicon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.offer-rail-item b {
  color: var(--ink);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .offer-rail-item {
    min-height: 44px;
  }
}

.offer-dot-plot {
  margin-bottom: 10px;
  color: var(--ink);
  padding: 10px 12px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 45%, transparent);
}

.offer-dot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.offer-dot-head small {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-deep);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
}

.offer-dot-plot svg {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 2px;
  overflow: visible;
}

.offer-dot-axis {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.offer-dot {
  fill: var(--muted);
  stroke: var(--surface);
  stroke-width: 2;
}

.offer-dot.is-best {
  fill: var(--accent);
}

.offer-dot.is-stale {
  fill: var(--gold);
}

.offer-dot-point {
  cursor: pointer;
  outline: none;
}

.offer-dot-label {
  opacity: 0;
  fill: var(--ink);
  font-size: var(--type-caption-sm);
  font-weight: 700;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3px;
  pointer-events: none;
}

.offer-dot-point:hover .offer-dot-label,
.offer-dot-point:focus .offer-dot-label {
  opacity: 1;
}

.offer-dot-point:focus-visible .offer-dot {
  stroke: var(--accent);
  stroke-width: 3;
}
.offer-dot-point.is-active .offer-dot-label {
  opacity: 1;
}

.offer-dot-point.is-active .offer-dot {
  stroke: var(--accent);
  stroke-width: 3;
}

.offer-dot-guide {
  stroke: color-mix(in srgb, var(--gold) 70%, transparent);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.offer-dot-median {
  fill: none;
  stroke: color-mix(in srgb, var(--gold) 68%, transparent);
  stroke-width: 1;
}

.offer-dot-readout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.offer-dot-readout span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.offer-dot-readout small {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.offer-dot-readout b {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.offer-dot-readout span:first-child b {
  color: var(--accent-deep);
}

@media (max-width: 480px) {
  .offer-dot-readout {
    gap: 5px;
  }

  .offer-dot-readout b {
    font-size: 10px;
  }
}

/* Operational tables become labelled cards on small screens. */
@media (max-width: 640px) {
  .store-health-matrix-wrap {
    overflow: visible;
  }

  .store-health-matrix,
  .store-health-matrix-compact .store-health-matrix {
    width: 100%;
    min-width: 0;
  }

  .store-health-matrix-row.is-head {
    display: none;
  }

  .store-health-matrix-row:not(.is-head) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
  }

  .store-health-matrix-row .matrix-store,
  .store-health-matrix-row .matrix-state {
    grid-column: 1 / -1;
  }

  .store-health-matrix-row .matrix-cell {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 7px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--surface-2) 44%, transparent);
  }

  .store-health-matrix-row .matrix-cell::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: var(--type-caption-sm);
    font-weight: 650;
  }
}

/* Completion feedback stays on the control that performed the action. */
.btn.is-done,
.icon-btn.is-done {
  border-color: color-mix(in srgb, var(--success) 42%, var(--line));
  background: color-mix(in srgb, var(--success-soft) 64%, var(--surface));
  color: var(--success);
}

.btn.is-done .icon,
.icon-btn.is-done .icon {
  animation: action-done-pop 280ms ease-out;
}

@keyframes action-done-pop {
  0% { transform: scale(.65); }
  70% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* Keep the row label visible while operational tables scroll sideways. */
.chart-data-table th:first-child,
.chart-data-table td:first-child,
.offer-compare-table th:first-child,
.offer-compare-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
}

.chart-data-table th:first-child::after,
.offer-compare-table th:first-child::after {
  content: "";
  position: absolute;
  top: 0;
  right: -8px;
  bottom: 0;
  width: 8px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--ink) 8%, transparent), transparent);
  pointer-events: none;
}

/* Shared toolbar contract for browse and directory lists. */
.list-toolbar {
  --toolbar-gap: 8px;
}

.compare-mobile-pager {
  display: flex;
  align-items: center;
  gap: 5px;
}

.compare-mobile-pager .compare-mobile-switcher {
  flex: 1;
}

.compare-pager-btn {
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent-deep);
}

.compare-pager-btn .icon {
  width: 15px;
  height: 15px;
  transform: rotate(90deg);
}

.compare-pager-btn.is-next .icon {
  transform: rotate(-90deg);
}

.compare-pager-btn:disabled {
  opacity: .35;
  cursor: default;
}

.compare-mobile-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.compare-mobile-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.matrix-store {
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.matrix-store .icon {
  width: 12px;
  height: 12px;
  margin-left: auto;
  color: var(--muted-2);
  transform: rotate(-90deg);
}

.store-health-row.is-focused {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.active-alerts-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 7px;
  color: var(--muted);
  font-size: 10px;
}

.active-alerts-toolbar > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-alerts-panel.is-bulk .active-alert-actions {
  display: none;
}

.active-alert-select {
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent-deep);
}

.active-alert-select .icon {
  width: 14px;
  height: 14px;
}

.active-alert-item.is-selected {
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent-soft) 46%, transparent);
}

.active-alerts-bulk {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 -10px 24px -22px rgba(44, 40, 35, .7);
  backdrop-filter: blur(10px);
}

.active-alerts-bulk > span {
  margin-right: auto;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .active-alert-select {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }
}

.chart-compare-stores {
  margin: 10px 0 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.chart-controls .chart-compare-stores {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.chart-controls .chart-compare-stores > summary {
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 10px;
}

.chart-controls .chart-compare-stores[open] > summary {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.chart-more-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  width: min(360px, calc(100vw - 32px));
  padding: 9px 0 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.chart-more-label {
  margin: 0 11px 4px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.chart-more-panel .chart-conditions {
  width: fit-content;
  margin: 0 11px 9px;
}

.chart-more-panel .chart-compare-store-list {
  border-top: 1px solid var(--line);
}

.chart-compare-stores > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 11px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.chart-compare-stores > summary::-webkit-details-marker {
  display: none;
}

.chart-compare-stores > summary .icon {
  width: 14px;
  height: 14px;
}

.chart-compare-stores > summary > span {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.chart-compare-store-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 4px 10px;
  padding: 2px 11px 9px;
  border-top: 1px solid var(--line);
}

.chart-compare-store {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  color: var(--ink-soft);
  font-size: 10.5px;
  cursor: pointer;
}

.chart-compare-store input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.chart-compare-store > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.chart-compare-store .store-favicon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.chart-compare-actions {
  padding: 0 11px 8px;
}

@media (max-width: 640px) {
  .chart-controls .chart-compare-stores {
    width: 100%;
  }

  .chart-more-panel {
    position: static;
    width: auto;
    margin-top: 6px;
    border: 0;
    box-shadow: none;
  }

  .chart-compare-store {
    min-height: 44px;
  }
}

.compare-mobile-decision {
  display: none;
}

@media (max-width: 640px) {
  .compare-mobile-decision {
    display: grid;
    gap: 9px;
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-2) 44%, var(--surface));
  }

  .compare-mobile-decision-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
  }

  .compare-mobile-decision-head .eyebrow {
    margin: 0;
  }

  .compare-mobile-decision-head strong {
    color: var(--ink);
    font-family: var(--serif);
    font-size: 18px;
    letter-spacing: -.02em;
  }

  .compare-mobile-decision-grid {
    display: grid;
    gap: 6px;
  }

  .compare-mobile-decision-grid > span {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 7px;
    padding-bottom: 5px;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  }

  .compare-mobile-decision-grid > span:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .compare-mobile-decision-grid small {
    color: var(--muted);
    font-size: var(--type-caption-sm);
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
  }

  .compare-mobile-decision-grid b {
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .compare-mobile-decision-grid em {
    color: var(--muted);
    font-size: 10px;
    font-style: normal;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
}

.alert-simulator[hidden] {
  display: none;
}

.alert-simulator {
  display: grid;
  gap: 2px;
  margin: 2px 0 4px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.alert-simulator > span {
  color: var(--ink-soft);
}

.alert-simulator strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.alert-simulator.is-good {
  border-color: color-mix(in srgb, var(--success) 32%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 46%, var(--surface));
}

.alert-simulator.is-warn {
  border-color: color-mix(in srgb, var(--gold) 32%, var(--line));
}

.alert-simulator small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.compare-objectives {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 10px;
}

.compare-objective {
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: 650 9.5px/1 var(--sans);
  cursor: pointer;
}

.compare-objective.is-active {
  border-color: var(--accent-deep);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

@media (max-width: 640px) {
  .compare-objective {
    min-height: 38px;
  }
}

.shopping-list-modal {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.shopping-store-list {
  display: grid;
  gap: 12px;
}

.shopping-store {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.shopping-store > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 48%, transparent);
}

.shopping-store-total {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.shopping-store-items {
  display: grid;
}

.shopping-store-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 32px;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-top: 1px solid color-mix(in srgb, var(--line) 58%, transparent);
}

.shopping-store-item:first-child {
  border-top: 0;
}

.shopping-item-cover {
  display: grid;
  place-items: center;
  width: 34px;
  height: 44px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 8px;
}

.shopping-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shopping-item-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.shopping-item-copy strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shopping-item-copy small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.shopping-item-total {
  color: var(--ink-soft);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.shopping-store-item .icon-btn {
  width: 32px;
  height: 32px;
}

@media (max-width: 640px) {
  .shopping-store-item {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .shopping-store-item .icon-btn {
    grid-column: 1 / -1;
    width: 100%;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 9px;
  }
}

.offer-confidence {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: auto;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 700;
  white-space: nowrap;
}

.offer-confidence.is-high {
  border-color: color-mix(in srgb, var(--success) 30%, var(--line));
  color: var(--accent-deep);
  background: color-mix(in srgb, var(--accent-soft) 44%, transparent);
}

.offer-confidence.is-medium {
  border-color: color-mix(in srgb, var(--gold) 35%, var(--line));
  color: color-mix(in srgb, var(--gold) 65%, var(--ink));
}

.offer-confidence.is-low {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
  color: color-mix(in srgb, var(--danger) 65%, var(--ink));
}

.header-price-recommendation {
  display: inline-flex;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 8px;
  font-style: normal;
  font-weight: 750;
  letter-spacing: .03em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.header-price-recommendation.is-buy {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.header-price-recommendation.is-wait {
  background: var(--gold-soft);
  color: color-mix(in srgb, var(--gold) 65%, var(--ink));
}

.header-price-recommendation.is-watch {
  background: var(--surface-2);
  color: var(--muted);
}

.chart-condition-compare {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 4px;
}

.chart-condition-compare > button {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
}

.chart-condition-compare > button.is-active {
  border-color: var(--accent-deep);
  background: var(--accent-soft);
}

.chart-condition-compare small {
  color: var(--muted);
  font-size: 8.5px;
  text-transform: uppercase;
}

.chart-condition-compare strong {
  color: var(--ink-soft);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.chart-condition-compare > span {
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.shopping-budget {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  align-items: end;
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 36%, transparent);
}

.shopping-budget > div {
  display: grid;
  gap: 2px;
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
}

.shopping-budget strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
}

.shopping-budget .is-ok {
  color: var(--accent-deep);
}

.shopping-budget .is-over {
  color: var(--danger);
  font-weight: 700;
}

@media (max-width: 640px) {
  .shopping-budget {
    grid-template-columns: 1fr;
  }
}

.compare-custom-weights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface-2) 38%, transparent);
}

.compare-custom-weights label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 650;
}

.compare-custom-weights input {
  width: 100%;
  accent-color: var(--accent);
}

@media (max-width: 640px) {
  .compare-custom-weights {
    grid-template-columns: 1fr;
  }
}

.shopping-store-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 28%, transparent);
  color: var(--muted);
  font-size: var(--type-caption-sm);
}

.shopping-store-footer strong {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}


/* Desktop advanced filters: group panels instead of one loose wrapping row. */
@media (min-width: 641px) {
  .filter-card > .filter-advanced {
    display: block;
    width: 100%;
  }

  .filter-card > .filter-advanced > .filter-sheet-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    align-items: start;
    gap: 14px 18px;
    width: 100%;
  }

  .filter-card > .filter-advanced .filter-sheet-active {
    grid-column: 1 / -1;
  }

  .filter-card > .filter-advanced .filter-sheet-group {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
  }

  .filter-card > .filter-advanced .filter-sheet-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: var(--accent-deep);
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .07em;
    text-transform: uppercase;
    list-style: none;
  }

  .filter-card > .filter-advanced .filter-sheet-group-title::-webkit-details-marker {
    display: none;
  }

  .filter-card > .filter-advanced .filter-sheet-group-title::after {
    display: none;
  }

  .filter-sheet-group-name {
    flex: 0 0 auto;
  }

  .filter-sheet-group-value {
    min-width: 0;
    margin-left: auto;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0;
    text-align: right;
    text-overflow: ellipsis;
    text-transform: none;
    white-space: nowrap;
  }

  .filter-card > .filter-advanced .filter-sheet-group-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 10px 12px;
    width: 100%;
    min-width: 0;
  }

  .filter-card > .filter-advanced .filter-sheet-group-fields > .filter-field,
  .filter-card > .filter-advanced .filter-sheet-group-fields > .toggle-field {
    width: 100%;
    min-width: 0;
  }

  .filter-card > .filter-advanced .filter-sheet-group-fields > .store-filter-field,
  .filter-card > .filter-advanced .filter-sheet-group-fields > .mechanic-filter-field,
  .filter-card > .filter-advanced .filter-sheet-group-fields > .year-range-field,
  .filter-card > .filter-advanced .filter-sheet-group-fields > .filter-author,
  .filter-card > .filter-advanced .filter-sheet-group-fields > .filter-source {
    grid-column: 1 / -1;
  }

  .filter-card > .filter-advanced .filter-sheet-group-fields > .toggle-field {
    align-self: end;
  }

  .filter-card > .filter-advanced .filter-presets {
    grid-column: 1 / -1;
    margin-top: 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
  }
}


@media (min-width: 641px) {
  .filter-primary .filter-more-toggle {
    margin-left: auto;
  }
}

/* The single-game aside keeps notification opt-in secondary to the card. */
.single-shelf-aside .shelf-alert-push {
  margin: 0;
  padding: 6px 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

.single-shelf-aside .shelf-alert-push .btn {
  min-height: 32px;
  padding: 0 8px;
  font-size: 11px;
}

.public-share-icon-group {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.public-share-icon-group .icon-btn {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.public-share-icon-group .icon-btn + .icon-btn {
  border-left: 1px solid var(--line);
  border-radius: 0 999px 999px 0;
}

.discover-curation-preview {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px dashed color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent-soft) 24%, var(--surface));
  color: var(--accent-deep);
  font: 700 11px/1.3 var(--sans);
  text-align: left;
  cursor: pointer;
}

.discover-curation-preview:hover {
  border-style: solid;
  background: color-mix(in srgb, var(--accent-soft) 42%, var(--surface));
}

.discover-curation-preview .icon:last-child {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--muted);
}

@media (max-width: 480px) {
  .person-offer-filters.person-modal-filters {
    grid-template-columns: 1fr;
  }
}

.game-meta {
  font-size: 12px;
}

.game-designers {
  font-size: 11px;
}

.shelf-value-head > div > span {
  font-size: 10.5px;
}

.collection-value small,
.collection-stats small {
  font-size: 11px;
}

.tag {
  font-size: 10px;
}

.cover-rank {
  font-size: 10px;
}

.cover-language {
  font-size: var(--type-caption-sm);
}

.recent-games-list.is-compact .recent-game {
  flex-basis: 200px;
  min-height: 48px;
  padding: 5px 9px 5px 5px;
}

.recent-games-list.is-compact .recent-game-cover {
  width: 28px;
  height: 38px;
}

.recent-games-list.is-compact .recent-game-copy strong {
  font-size: 12px;
}

.recent-games-list.is-compact .recent-game-price {
  font-size: 10.5px;
}

.discover-curation-preview-cover {
  position: relative;
  display: block;
  width: 26px;
  height: 34px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface-2);
}

.discover-curation-preview-cover + .discover-curation-preview-cover {
  margin-left: -7px;
}

.discover-curation-preview-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discover-curation-preview-copy {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-safety-menu {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
}

.person-safety-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  list-style: none;
  cursor: pointer;
}

.person-safety-toggle::-webkit-details-marker {
  display: none;
}

.person-safety-toggle:hover,
.person-safety-menu[open] .person-safety-toggle {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
}

.person-safety-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 176px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.person-safety-action {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 44px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--danger);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.person-safety-action:hover {
  background: var(--danger-soft);
}

.retention-table {
  display: grid;
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.retention-section {
  margin: 0;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 74%, transparent);
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.retention-table .retention-rule {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px 92px;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.retention-table .retention-rule:last-child {
  border-bottom: 0;
}

.retention-table .retention-rule > small:first-child {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.retention-table .retention-rule > span {
  justify-self: end;
}

.retention-table .retention-rule input {
  width: 86px;
  padding: 4px 6px;
  font-size: 11px;
}

.retention-table .retention-rule > span em {
  font-size: var(--type-caption-sm);
}

.retention-table .retention-source {
  display: inline-flex;
  justify-self: end;
  width: fit-content;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 600;
}

.retention-table .retention-source.custom {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-deep);
}

@media (max-width: 520px) {
  .retention-table .retention-rule {
    grid-template-columns: minmax(0, 1fr) 96px;
  }

  .retention-table .retention-source {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

/* Personal curation trails */
.discover-my-trails {
  display: grid;
  gap: 10px;
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-2) 36%, var(--surface));
}

.discover-my-trails .discover-trails-head {
  margin: 0;
}

.discover-my-trails .discover-trails-head h3 {
  margin: 2px 0 0;
  font-size: 1rem;
}

.curation-trail-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}

.curation-trail-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.curation-trail-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.curation-trail-card-head > div {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.curation-trail-card-head strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.curation-trail-card-head small {
  color: var(--muted);
  font-size: 10px;
}

.curation-trail-covers {
  display: flex;
  flex: 0 0 auto;
}

.curation-mini-cover {
  display: block;
  width: 26px;
  height: 34px;
  margin-left: -8px;
  overflow: hidden;
  border: 1px solid var(--surface);
  border-radius: 5px;
}

.curation-mini-cover:first-child {
  margin-left: 0;
}

.curation-mini-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.curation-trail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.curation-trail-actions .text-action {
  gap: 3px;
  font-size: 10.5px;
}

.curation-trail-actions .danger {
  color: var(--danger);
  margin-left: auto;
}

.curation-editor {
  max-width: 560px;
}

.curation-selected {
  display: grid;
  gap: 5px;
}

.curation-selected-game {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  font-size: 12px;
}

.curation-selected-game .icon-btn {
  width: 26px;
  height: 26px;
}

.curation-search-results {
  display: grid;
  gap: 4px;
  max-height: 210px;
  overflow-y: auto;
}

.curation-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.curation-result:hover,
.curation-result:focus-visible {
  background: var(--surface-2);
}

.curation-result span {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.curation-result small {
  color: var(--muted);
  font-size: 10px;
}

.curation-result .icon {
  width: 12px;
  height: 12px;
  color: var(--accent-deep);
}

@media (max-width: 640px) {
  .discover-my-trails {
    padding: 11px;
  }

  .curation-trail-list {
    grid-template-columns: 1fr;
  }
}

.curation-templates {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.curation-templates .eyebrow {
  width: 100%;
}

.curation-order-actions {
  display: inline-flex;
  gap: 2px;
  margin-left: auto;
}

.curation-order-actions .icon-btn:disabled {
  opacity: .35;
  cursor: default;
}

/* Comparison: decision rail on desktop, stacked controls on mobile. */
@media (min-width: 641px) {
  .compare-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 238px;
    gap: 14px;
    align-items: start;
  }

  .compare-rail {
    position: sticky;
    top: 0;
    grid-column: 2;
    grid-row: 1;
    display: grid;
    gap: 8px;
    min-width: 0;
  }

  .compare-main {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .compare-rail .compare-objectives {
    display: grid;
    grid-template-columns: 1fr;
    margin-bottom: 0;
  }

  .compare-rail .compare-objective {
    justify-content: flex-start;
    text-align: left;
  }

  .compare-rail .compare-custom-weights {
    grid-template-columns: 1fr;
  }

  .compare-rail .compare-verdicts {
    margin: 0;
  }
}

@media (max-width: 640px) {
  .compare-layout {
    display: block;
  }
}

/* One state vocabulary for prices and trust signals. */
:root {
  --state-verified: #2c4a35;
  --state-attention: #6f541b;
  --state-suspect: #8a3d30;
  --state-unavailable: #665847;
  --state-verified-soft: #e4ecdd;
  --state-attention-soft: #f4e9c9;
  --state-suspect-soft: #f3ddd7;
}

[data-theme="dark"] {
  --state-verified: #cfe0c2;
  --state-attention: #e0bd6a;
  --state-suspect: #e58f80;
  --state-unavailable: #b9aa95;
  --state-verified-soft: #333d2d;
  --state-attention-soft: #3f3523;
  --state-suspect-soft: #472b28;
}

.status-dot.ok { background: var(--state-verified); }
.status-dot.idle { background: var(--state-attention); }
.status-dot.error { background: var(--state-suspect); }

.price-lead.at-good,
.price-lead.at-low {
  border-color: color-mix(in srgb, var(--state-verified) 42%, var(--line));
  background: var(--state-verified-soft);
}

.price-lead.stale {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--state-unavailable) 46%, var(--line));
}

.price-lead-empty,
.price-lead-oos {
  color: var(--state-unavailable);
}

/* All prices align vertically and share the same numeric texture. */
.price-lead strong,
.listing-price,
.compare-value,
.header-price-compact strong,
.header-price-full strong,
.shelf-history-summary strong,
.detail-price {
  font-variant-numeric: tabular-nums;
  letter-spacing: -.025em;
}

/* Admin: attention items float to the top and read as incidents. */
.ops-summary-grid .ops-summary-item.needs-attention {
  order: -1;
  border-color: color-mix(in srgb, var(--state-suspect) 34%, var(--line));
  box-shadow: inset 3px 0 0 var(--state-suspect);
}

.ops-summary-grid .ops-summary-item.needs-attention strong {
  color: var(--state-suspect);
}

/* People cards: identity first, metadata second. */
.people-feed-item,
.person-card {
  box-shadow: none;
}

.people-feed-item:hover,
.person-card:hover {
  box-shadow: var(--shadow-soft);
}

.person-card h2,
.people-feed-item h3 {
  letter-spacing: -.02em;
}

.person-card .person-covers,
.people-feed-item .people-feed-cover {
  border-radius: 11px;
}

/* Settings navigation reads as a section index, not a second toolbar. */
.settings-toc,
.settings-nav {
  border-bottom-color: color-mix(in srgb, var(--line) 62%, transparent);
}

.settings-toc .settings-toc-link,
.settings-nav .settings-nav-link {
  font-size: 10.5px;
}

.settings-card > .settings-head h2 {
  letter-spacing: -.025em;
}

/* Charts: lower the grid tone, keep the data on top. */
.price-chart line[stroke="var(--line)"] {
  opacity: .42;
}

.price-chart text[fill="var(--muted)"] {
  opacity: .9;
}

/* Sheets share the same chrome. */
.filter-sheet-head,
.list-actions-head,
.command-field {
  border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent);
}

.filter-sheet-grabber,
.list-actions-grabber {
  background: color-mix(in srgb, var(--muted) 30%, var(--line));
}

/* Empty states share one frame. */
.empty-state,
.people-empty,
.people-feed-empty {
  border-color: color-mix(in srgb, var(--line) 78%, transparent);
}

.empty-state .empty-illustration,
.people-empty .empty-art {
  opacity: .82;
}

/* Compact cards become two-line list rows instead of small posters. */
@media (min-width: 900px) {
  html.compact-cards .game-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  html.compact-cards .game-card {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    min-height: 78px;
    padding: 9px 12px;
    align-items: center;
  }

  html.compact-cards .game-card .cover {
    width: 46px;
    height: 62px;
  }

  html.compact-cards .game-title {
    font-size: 15px;
  }

  html.compact-cards .game-tags,
  html.compact-cards .price-row-more {
    display: none;
  }

  html.compact-cards .card-price-area {
    justify-self: end;
    max-width: 220px;
  }
}

/* Mobile app navigation: four destinations plus More. */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 640px) {
  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: 0 -16px 30px -26px rgba(44, 40, 35, .55);
    backdrop-filter: blur(14px);
  }

  .mobile-bottom-link {
    display: grid;
    place-items: center;
    gap: 2px;
    min-height: 50px;
    padding: 3px 2px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
    text-decoration: none;
  }

  .mobile-bottom-link .icon {
    width: 19px;
    height: 19px;
  }

  .mobile-bottom-link.is-active {
    background: var(--accent-soft);
    color: var(--accent-deep);
  }

  .main-inner {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }

  #toast-root {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .modal-head {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
    padding-top: 24px;
  }

  .detail-cover {
    width: 104px;
    height: 142px;
  }

  .detail-heading h1 {
    font-size: 30px;
    line-height: .98;
  }

  .detail-actions {
    gap: 6px;
  }

}

/* Keyboard focus is always visible, including on custom cards and sheets. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.game-card:focus-visible,
.alert-feed-item:focus-visible,
.person-card:focus-visible {
  outline-offset: 2px;
  border-radius: var(--radius-card);
}

/* Operational tables read across long rows. */
.store-health-matrix-row:not(.is-head):nth-child(even),
.outbox-list .store-health-row:nth-child(even),
.audit-list .audit-row:nth-child(even) {
  background: color-mix(in srgb, var(--surface-2) 26%, transparent);
}

.store-health-matrix-row:not(.is-head):hover,
.store-health-row:hover {
  background: color-mix(in srgb, var(--accent-soft) 38%, transparent);
}

.store-health-matrix-row.is-head {
  box-shadow: 0 1px 0 var(--line);
}

/* Data colours stay quieter than the editorial chrome. */
[data-theme="dark"] .price-chart {
  --chart-grid: color-mix(in srgb, var(--line) 48%, transparent);
}

[data-theme="dark"] .chart-band {
  opacity: .18;
}

/* Empty states get one editorial frame and one clear action. */
.empty-state,
.people-empty,
.people-feed-empty,
.wishlist-empty {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 85% 8%, color-mix(in srgb, var(--accent-soft) 42%, transparent), transparent 38%),
    var(--surface);
}

.empty-state h3,
.people-empty h2,
.wishlist-empty h3 {
  letter-spacing: -.02em;
}

/* Compact rows show the lead price as the visual anchor. */
@media (min-width: 900px) {
  html.compact-cards .game-card .card-price-area {
    display: grid;
    justify-items: end;
    gap: 3px;
  }

  html.compact-cards .game-card .price-row-main {
    justify-content: flex-end;
  }

  html.compact-cards .game-card .price-lead {
    min-height: 32px;
  }
}

/* Motion: short, functional, and fully removable. */
.toast,
.modal,
.filter-sheet-body,
.compare-mobile-card {
  transition-timing-function: cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-reduced-motion: reduce) {
  .mobile-bottom-nav,
  .toast,
  .modal,
  .compare-mobile-card {
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .sidebar .nav {
    display: none;
  }
}

/* Responsive editorial scale. */
.detail-heading h1,
.modal-head .detail-heading h1 {
  font-size: clamp(26px, 5.2vw, 42px);
}

.page-header h1,
#page-header h1 {
  font-size: clamp(30px, 4.4vw, 50px);
}

.settings-card > .settings-head h2 {
  font-size: clamp(19px, 2.4vw, 25px);
}

/* Forms: invalid fields explain themselves before submit. */
.field input:user-invalid,
.field select:user-invalid,
.field textarea:user-invalid {
  border-color: color-mix(in srgb, var(--danger) 55%, var(--line));
  background: color-mix(in srgb, var(--danger-soft) 28%, var(--surface));
}

.field:has(input:user-invalid) > span,
.field:has(select:user-invalid) > span {
  color: var(--danger);
}

/* Chips share one silhouette and weight. */
.tag,
.chip,
.toolbar-note,
.store-badge,
.people-feed-offer {
  letter-spacing: .01em;
}

/* Skeletons keep the final geometry. */
.skeleton-card {
  min-height: 158px;
}

.skeleton-card .cover {
  border-radius: 12px;
}

.skeleton.line {
  border-radius: 999px;
}

/* Public profile reads as sections, not one long card. */
.public-content > section,
.public-shelf,
.public-shelf-dna,
.public-activity {
  scroll-margin-top: 72px;
}

/* High contrast mode. */
@media (prefers-contrast: more) {
  :root {
    --line: color-mix(in srgb, var(--ink) 42%, var(--bg));
    --line-strong: color-mix(in srgb, var(--ink) 62%, var(--bg));
    --muted: color-mix(in srgb, var(--ink) 78%, var(--bg));
  }

  :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline-width: 3px;
  }

}

/* Print: shelf, plans and collection reports without app chrome. */
@media print {
  .sidebar,
  .mobile-bottom-nav,
  #page-header,
  .filter-card,
  .list-actions-menu,
  #toast-root,
  .offline-banner,
  .sync-banner,
  .game-card-actions,
  .price-row-more,
  .empty-actions {
    display: none !important;
  }

  body,
  .app-shell,
  .main,
  .main-inner {
    display: block !important;
    width: auto !important;
    background: #fff !important;
    color: #111 !important;
  }

  .main-inner {
    padding: 0 !important;
  }

  .game-grid {
    display: block !important;
  }

  .game-card,
  .paper,
  .settings-card {
    break-inside: avoid;
    border-color: #999 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .game-card {
    margin: 0 0 8px;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #555;
  }
}

/* Store rows identify themselves at the point of choice. */
.store-group-grid .store-toggle .store-favicon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}

/* Mobile header keeps the title count in the ownership tabs only. */
@media (max-width: 640px) {
  .page-title-count {
    display: none;
  }
}

/* Collection share is a deliberate secondary action. */
.collection-share {
  justify-self: start;
  margin-top: 4px;
}

/* Ownership tabs read as one segmented control. */
.shelf-scope-tabs,
.person-scope-tabs {
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-2) 34%, transparent);
}

.shelf-scope-tabs > button,
.person-scope-tabs > button {
  border-radius: 999px;
}

/* Cover art keeps the same book-ish proportion everywhere. */
.collection-game-cover,
.recent-game-cover,
.people-feed-cover,
.person-cover {
  aspect-ratio: 2 / 3;
}

/* A subtle depth shift separates app chrome from content. */
.main {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg-elev) 34%, transparent), transparent 220px),
    var(--bg);
}

.header-sync-status {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.header-sync-status:hover {
  color: var(--ink-soft);
}

.store-group-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 10px 6px;
}

.store-group-actions .text-action {
  color: var(--accent-deep);
  font-size: var(--type-caption-sm);
}

.shopping-list-skeleton {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.shopping-store-skeleton {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.shopping-store-skeleton > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 70px;
  align-items: center;
  gap: 8px;
}

.shopping-store-cover {
  width: 34px;
  height: 44px;
  border-radius: 5px;
}

/* Settings uses the desktop width for two balanced columns. */
@media (min-width: 1200px) {
  #settings-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
  }

  #settings-form > section {
    min-width: 0;
    margin: 0;
  }

  #settings-account { order: 1; grid-column: 1 / -1; }
  #settings-tour { order: 2; grid-column: 1 / -1; }
  #settings-form > .settings-fold {
    grid-column: 1 / -1;
    min-width: 0;
  }

  #settings-fold-data { order: 3; }
  #settings-fold-updates { order: 4; }

  .settings-fold-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
  }

  .settings-fold-body > .settings-card {
    min-width: 0;
    margin: 0;
  }

  #settings-sources { order: 1; grid-column: 1 / -1; }
  #settings-origins { order: 2; }
  #settings-stores { order: 3; }
  #settings-discovery { order: 4; grid-column: 1 / -1; }
  #settings-updates { order: 1; grid-column: 1 / -1; }
  #settings-alerts { order: 2; grid-column: 1 / -1; }
  #settings-form > .form-save-bar { order: 5; grid-column: 1 / -1; }

  /* Keep the sticky index in the same order the two-column grid displays. */
  .settings-layout:not(.admin-layout) .settings-toc [data-target="settings-account"] { order: 1; }
  .settings-layout:not(.admin-layout) .settings-toc [data-target="settings-tour"] { order: 2; }
  .settings-layout:not(.admin-layout) .settings-toc [data-target="settings-sources"] { order: 3; }
  .settings-layout:not(.admin-layout) .settings-toc [data-target="settings-origins"] { order: 4; }
  .settings-layout:not(.admin-layout) .settings-toc [data-target="settings-stores"] { order: 5; }
  .settings-layout:not(.admin-layout) .settings-toc [data-target="settings-discovery"] { order: 6; }
  .settings-layout:not(.admin-layout) .settings-toc [data-target="settings-updates"] { order: 7; }
  .settings-layout:not(.admin-layout) .settings-toc [data-target="settings-alerts"] { order: 8; }
  .settings-layout:not(.admin-layout) .settings-toc [data-target="settings-app"] { order: 9; }
}

/* ---------- Mobile shelf: put the first game above the fold ---------- */

@media (max-width: 640px) {
  /* Value + coverage used to take two tall cards before any game. One compact
     value summary and the coverage strip are enough to orient the reader. */
  .shelf-summary-head {
    flex-wrap: wrap;
    gap: 4px 8px;
    min-height: 0;
    padding: 8px 12px;
  }

  .shelf-summary-summary {
    flex: 1 1 calc(100% - 26px);
    gap: 8px;
    min-height: 0;
  }

  .shelf-summary-mark {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .shelf-summary-title {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 6px;
  }

  .shelf-summary-title .eyebrow {
    display: none;
  }

  .shelf-summary-title strong {
    font-size: 17px;
  }

  .shelf-summary-title small {
    flex: 1 1 100%;
    font-size: 10px;
  }

  .shelf-summary-chips {
    order: 4;
    width: 100%;
    margin-left: 36px;
    gap: 4px;
  }

  .shelf-summary-chips > span,
  .shelf-summary-chips > button {
    padding: 1px 6px;
    font-size: var(--type-caption);
  }

  .shelf-summary-spark,
  .shelf-summary-spark-slot,
  .shelf-summary-spark-empty {
    display: none;
  }

  .shelf-summary-chevron {
    flex-basis: 18px;
    margin-left: auto;
  }

  /* Search and sort share one row; their captions duplicate the placeholders
     and select values. The advanced controls keep their sheet. */
  .filter-card.has-mobile-filter .filter-primary {
    gap: 6px;
  }

  .filter-card.has-mobile-filter .filter-primary .filter-caption {
    display: none;
  }

  /* The sort caption leaves the visual row but must keep naming the select. */
  .filter-card.has-mobile-filter .filter-primary .filter-sort > span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .filter-card.has-mobile-filter .filter-primary .filter-search,
  .wishlist-toolbar .filter-primary .filter-search,
  .discover-filters .filter-primary .filter-search {
    flex: 1 1 100%;
  }

  .filter-card.has-mobile-filter .filter-primary .filter-sort,
  .wishlist-toolbar .filter-primary .filter-sort,
  .discover-filters .filter-primary .filter-sort {
    flex: 1 1 100%;
    min-width: 0;
  }

  .filter-card.has-mobile-filter .filter-primary .filter-sort select {
    width: 100%;
  }

  /* The import banner above already offers the unmatched games; the BGG match
     count has no room to breathe beside the filter actions. */
  .toolbar-extra .toolbar-note,
  .toolbar-extra .toolbar-note.has-review {
    display: none;
  }
}

@media (max-width: 360px) {
  /* At 320px the shortcut chip, the actions menu and the filter button do not
     fit in one row; give the chip its own row instead of widening the page. */
  .list-utility-row {
    flex-wrap: wrap;
  }

  .list-utility-row .toolbar-extra {
    flex: 1 1 100%;
    order: -1;
  }

  /* At 320px the relative sync age squeezes "Sua estante" into an ellipsis.
     The status dot and buttons still carry the action and meaning. */
  .mobile-page-actions .header-sync-status:not(.settings-autosave-status) .header-sync-label {
    display: none;
  }

  .mobile-page-actions .header-sync-status:not(.settings-autosave-status) {
    min-height: 34px;
    padding: 0;
  }
}

@media (max-width: 640px) {
  /* People is a directory first; the followed-shelves feed follows it. */
  .people-page {
    display: flex;
    flex-direction: column;
  }

  .people-page > .people-section-head { order: 1; }
  .people-page > .people-controls { order: 2; }
  .people-page > .people-panel { order: 3; }
  .people-page > #people-feed {
    order: 4;
    margin-top: 16px;
  }

  .people-page > .people-feed-jump {
    display: flex;
    align-items: center;
    gap: 8px;
    order: 0;
    width: 100%;
    min-height: 48px;
    margin-bottom: 12px;
    padding: 0 13px;
    border: 1px dashed var(--line-strong);
    border-radius: 13px;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
  }

  .people-feed-jump .icon:first-child {
    width: 16px;
    height: 16px;
    color: var(--accent);
  }

  .people-feed-jump .icon:last-child {
    width: 14px;
    height: 14px;
    margin-left: 2px;
    color: var(--muted);
  }

  .people-feed-jump b {
    margin-left: auto;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--ink-soft);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
  }

  .people-feed-jump b[hidden] {
    display: none;
  }

  .people-feed-jump small {
    margin-left: -4px;
    color: var(--muted);
    font-size: var(--type-caption);
    font-weight: 600;
  }

  .people-feed-jump small[hidden] {
    display: none;
  }

  .people-page > .people-feed-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    order: 5;
    min-height: 44px;
    margin-top: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent-deep);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
  }

  .people-feed-back .icon {
    width: 14px;
    height: 14px;
  }
}

.people-feed-jump,
.people-feed-back {
  display: none;
}

.activity-overview-toggle {
  display: none;
}

@media (max-width: 640px) {
  .activity-overview-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    margin-bottom: 12px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
    color: var(--ink-soft);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
  }

  .activity-overview-toggle .icon:first-child {
    width: 16px;
    height: 16px;
    color: var(--accent);
  }

  .activity-overview-toggle .icon:last-child {
    width: 14px;
    height: 14px;
    margin-left: auto;
    color: var(--muted);
    transition: transform 150ms ease;
  }

  .activity-overview:not(.is-open) .activity-overview-body {
    display: none;
  }

  .activity-overview.is-open .activity-overview-toggle .icon:last-child {
    transform: rotate(180deg);
  }
}

@media (max-width: 360px) {
  .activity-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .activity-filters .filter-field,
  .activity-filters .filter-field select,
  .activity-filters .toggle-field,
  .activity-filters .btn {
    width: 100%;
  }
}

@media (min-width: 901px) and (max-width: 1120px) {
  /* The 228px tablet rail made the brand and the longest nav label wrap. */
  .brand {
    gap: 7px;
  }

  .brand-word {
    font-size: 16px;
    white-space: nowrap;
  }

  .nav-link {
    gap: 8px;
    padding-inline: 10px;
    font-size: 13px;
  }

  .nav-count {
    min-width: 18px;
    padding-inline: 5px;
    font-size: 10px;
  }
}

@media (max-width: 640px) {
  .chart-ranges {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .chart-conditions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chart-range {
    text-align: center;
  }
}

/* ---------- Public shared game ---------- */

.public-share-page .public-content {
  max-width: 1120px;
}

.public-share-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 30px;
  margin-top: 18px;
  padding: 26px;
}

.public-share-card.is-loading,
.public-share-card[aria-busy="true"] {
  min-height: 340px;
}

.public-share-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface-2);
}

.public-share-cover img,
.public-share-cover .cover-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-share-body {
  min-width: 0;
}

.public-share-body h1 {
  margin-top: 3px;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.02;
  letter-spacing: -.04em;
}

.public-share-body .public-subtitle {
  margin-top: 8px;
}

.public-share-designers {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.public-share-designers a {
  color: var(--accent-deep);
  font-weight: 650;
  text-decoration: none;
}

.public-share-designers a:hover {
  text-decoration: underline;
}

.public-share-history {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.public-share-history-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.public-share-history-head span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.public-share-history-chart {
  height: 96px;
  color: var(--accent-deep);
}

.public-share-history-chart svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.public-share-history-area {
  fill: var(--accent-soft);
  opacity: .85;
}

.public-share-history-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.public-share-history-dot {
  fill: currentColor;
  stroke: var(--surface);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.public-share-history-dates {
  display: flex;
  justify-content: space-between;
  margin-top: -4px;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-variant-numeric: tabular-nums;
}

.public-share-history-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
}

.public-share-history-stats span {
  display: grid;
  gap: 1px;
}

.public-share-history-stats small {
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.public-share-history-stats strong {
  color: var(--accent-deep);
  font-family: var(--serif);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.public-share-history.is-empty .public-share-empty {
  margin-top: 4px;
}

.public-share-offers {
  display: grid;
  gap: 6px;
  margin-top: 20px;
}

.public-share-offers > .eyebrow {
  margin-bottom: 2px;
}

.public-share-offer {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}

a.public-share-offer:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.public-share-store {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 650;
}

.public-share-store .store-favicon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  object-fit: contain;
}

.public-share-store-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.public-share-store-copy > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-share-store-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--type-caption-sm);
  font-weight: 500;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-share-price {
  display: grid;
  margin-left: auto;
  justify-items: end;
  gap: 2px;
}

.public-share-price strong {
  color: var(--accent-deep);
  font-family: var(--serif);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.public-share-price .tag {
  padding: 1px 6px;
  font-size: var(--type-caption-sm);
  line-height: 1.3;
}

.public-share-converted {
  color: var(--muted);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}

.public-share-more {
  margin-top: 8px;
}

.public-share-more summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 10px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--accent-deep);
  font-size: 11.5px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

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

.public-share-more[open] summary {
  margin-bottom: 8px;
}

.public-share-more-open {
  display: none;
}

.public-share-more[open] .public-share-more-closed {
  display: none;
}

.public-share-more[open] .public-share-more-open {
  display: inline;
}

.public-share-offer > .icon {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  color: var(--muted);
}

.public-share-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.public-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.public-share-page .public-not-found {
  align-items: flex-start;
  max-width: 620px;
}

@media (max-width: 700px) {
  .public-share-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
  }

  .public-share-cover {
    width: 140px;
    justify-self: center;
  }

  .public-share-body h1 {
    font-size: 36px;
  }

  .public-share-history-chart {
    height: 82px;
  }

  .public-share-history-stats strong {
    font-size: 15px;
  }

  .public-share-actions .btn {
    min-height: 44px;
  }

  .public-share-offer {
    flex-wrap: nowrap;
  }

  .public-share-price strong {
    font-size: 18px;
  }

  .public-share-store .store-favicon {
    flex-basis: 22px;
    width: 22px;
    height: 22px;
  }
}

/* ---------- Shelf: one action language ---------- */

.shelf-action {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  text-align: left;
  box-shadow: none;
  transition: border-color 150ms ease, background 150ms ease;
}

.shelf-action:hover,
.shelf-action:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 24%, var(--surface));
}

.shelf-invite-art {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.shelf-invite-art .icon,
.shelf-action-alert > .icon:first-child {
  width: 18px;
  height: 18px;
}

.shelf-action-alert > .icon:first-child {
  flex: 0 0 34px;
  box-sizing: content-box;
  padding: 8px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.shelf-invite-copy {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.shelf-invite-copy strong {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -.015em;
  line-height: 1.2;
}

.shelf-invite-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shelf-invite > .icon {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--muted);
  transform: rotate(-90deg);
}

.shelf-invite {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.shelf-invite.shelf-invite-more {
  align-self: start;
  height: auto;
  min-height: 44px;
  padding: 6px 10px;
  border-style: dashed;
  background: transparent;
}

.shelf-invite-more .shelf-invite-art {
  flex-basis: 28px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.shelf-invite-more .shelf-invite-art .icon {
  width: 15px;
  height: 15px;
}

.shelf-invite-more .shelf-invite-copy {
  display: flex;
  align-items: center;
}

.shelf-invite-more .shelf-invite-copy strong {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.shelf-invite-more .shelf-invite-copy small {
  display: none;
}

.shelf-action-alert {
  min-width: 0;
  font-size: 10.5px;
}

.shelf-action-alert > span {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.shelf-action-alert .btn {
  margin: 0;
}

.single-shelf-aside .shelf-action {
  align-self: stretch;
}

.single-shelf-aside .shelf-alert-push {
  grid-column: 1 / -1;
  margin: 0;
}

@media (max-width: 640px) {
  .shelf-action {
    min-height: 56px;
    padding: 9px 11px;
  }

  .shelf-invite {
    min-height: 56px;
    padding: 9px 11px;
  }

  .shelf-invite-copy strong {
    font-size: 13px;
  }
}

/* Default desktop cards reserve two title lines and pin the whole price block
   to the same bottom edge. A one-line title used to lift its price above the
   neighbour's; shelf and compact views already have their own anatomy. */
@media (min-width: 641px) {
  html:not(.shelf-view):not(.compact-cards) .game-main {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-width: 0;
  }

  html:not(.shelf-view):not(.compact-cards) .game-main > .card-price-area {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 56px;
    margin-top: auto;
  }
}

/* Microtype floor: status labels and action chips were 8.5–10.5px, which
   crosses from "compact" into "squint" on a phone. Keep the same rhythm with
   the smallest text one step up. */
.tag,
.game-reason,
.drop-badge,
.low-badge,
.good-price-badge {
  font-size: 10px;
}

.price-lead .store-name,
.price-row-secondary .quick-alert,
.price-row-secondary .more-prices {
  font-size: 11px;
}

.shelf-value-head > div > span {
  font-size: 10.5px;
}

.shelf-value-trend-label {
  font-size: 10px;
}

.shelf-value-trend strong {
  font-size: 11px;
}

.header-price-recommendation {
  font-size: 10px;
}

.run-status {
  font-size: 10px;
}

.alert-delivery-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 650;
  text-decoration: none;
}

.alert-delivery-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
}

.alert-delivery-chip.is-on .alert-delivery-dot {
  background: var(--success);
}

.alert-delivery-chip.is-off .alert-delivery-dot {
  background: var(--gold);
}

/* Visual refinement pass: density, contrast and touch-safe chrome. */

/* Numbers in prices, counts and meters should not jitter between rows. */
:root {
  --type-caption: 11px;
  --type-caption-sm: 10.5px;
}

body {
  font-variant-numeric: tabular-nums;
}

.settings-footnote,
.chart-summary,
.trade-modal-sub,
.settings-card small,
.field small {
  font-size: max(11px, 0.68rem);
}

.empty-state {
  gap: 8px;
  padding: 38px 20px;
}

.empty-state .empty-illustration {
  width: 54px;
  height: 54px;
}

.empty-state .empty-actions {
  justify-content: center;
}

.chart-summary-spark {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
}

.chart-summary-spark .price-spark {
  width: 76px;
  height: 22px;
}

.chart-summary-spark .spark-window,
.chart-summary-spark .spark-change,
.chart-data-jump-short {
  display: none;
}

/* Dense table and compact cards keep the price column from shifting row by row. */
.card-price-area,
.price-lead,
.price-lead-amount,
.card-price-area strong {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

html.table-view .card-price-area,
html.compact-cards .card-price-area {
  justify-content: flex-end;
  width: 112px;
  min-width: 7.5ch;
  text-align: right;
}

html.table-view .card-price-area > *,
html.compact-cards .card-price-area > * {
  width: 100%;
  text-align: right;
}

.game-card-manage {
  position: relative;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 32px;
  height: 30px;
  margin: -3px 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.game-card-manage:hover,
.game-card-manage:focus-visible {
  background: var(--surface-2);
  color: var(--ink);
}

.game-card-manage .icon {
  width: 16px;
  height: 16px;
}

.collection-game-row-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
}

.collection-game-remove {
  width: 38px;
  min-height: 38px;
  color: var(--muted);
}

.collection-game-remove:hover,
.collection-game-remove:focus-visible {
  color: var(--danger);
  background: var(--danger-soft);
}

.eyebrow {
  color: var(--accent-deep);
  font-size: 11.5px;
  letter-spacing: 0.12em;
}

[data-theme="dark"] .eyebrow {
  color: var(--accent);
}

/* Shared card rhythm: the shelf, trade gallery and people directory now use
   the same radius even when their internal density differs. */
.game-card,
.person-card,
.trade-card,
.curation-trail-card {
  border-radius: 16px;
}

/* ---------- mobile shelf: content before chrome ---------- */

@media (max-width: 640px) {
  .wishlist-coverage.is-compact {
    margin-bottom: 6px;
    padding: 6px 10px;
  }

  .coverage-compact-row {
    gap: 6px 8px;
  }

  .coverage-compact-mark {
    flex-basis: 24px;
    width: 24px;
    height: 24px;
  }

  .coverage-compact-copy {
    font-size: 11px;
    line-height: 1.25;
  }

  .shelf-scope-cluster {
    margin-bottom: 6px;
    gap: 6px;
  }

  .wishlist-toolbar {
    gap: 5px;
    padding: 8px;
  }

  .wishlist-toolbar .filter-primary {
    gap: 6px;
  }

  .shelf-alert-hint,
  .list-utility-row .toolbar-extra {
    display: none;
  }

  .list-utility-row {
    margin-top: 4px;
  }

  .main-inner {
    padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-bottom-nav {
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  }

  #toast-root {
    right: 12px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    width: min(calc(100vw - 24px), 380px);
  }
}

/* ---------- dark mode: lift stats off the background ---------- */

[data-theme="dark"] .public-person-hero {
  border-color: var(--line-strong);
  background:
    radial-gradient(520px 260px at 8% 0%, color-mix(in srgb, var(--gold-soft) 54%, transparent), transparent 70%),
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 90%, var(--bg)), color-mix(in srgb, var(--accent-soft) 56%, var(--surface)));
}

[data-theme="dark"] .public-hero-side,
[data-theme="dark"] .public-shelf-dna,
[data-theme="dark"] .public-dna-item {
  border-color: color-mix(in srgb, var(--line-strong) 78%, transparent);
  background: var(--surface);
}

[data-theme="dark"] .public-dna-item progress,
[data-theme="dark"] .public-dna-item progress::-webkit-progress-bar {
  background: var(--line-strong);
}

[data-theme="dark"] .cover-empty,
[data-theme="dark"] .cover-editorial.cover-empty {
  --cover-paper: color-mix(in srgb, var(--surface-2) 86%, var(--bg));
  --cover-ink: var(--ink-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line-strong) 58%, transparent);
}

.public-dna-summary {
  display: none;
}

@media (max-width: 640px) {
  .public-dna-disclosure {
    margin: -10px 8px 10px;
  }

  .public-dna-summary {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface-2) 46%, var(--surface));
    color: var(--ink-soft);
    font-size: 11px;
    list-style: none;
    cursor: pointer;
  }

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

  .public-dna-summary > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 650;
  }

  .public-dna-summary small {
    overflow: hidden;
    margin-left: auto;
    color: var(--muted);
    font-size: 10.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .public-dna-summary > .icon {
    flex: 0 0 auto;
    color: var(--muted);
    transition: transform 160ms ease;
  }

  .public-dna-disclosure[open] > .public-dna-summary {
    margin-bottom: 6px;
  }

  .public-dna-disclosure[open] > .public-dna-summary > .icon {
    transform: rotate(180deg);
  }

  .public-shelf-dna {
    margin: 0;
    padding: 7px 8px;
  }

  .public-dna-grid {
    gap: 4px;
  }

  .public-dna-item {
    padding: 5px 7px;
  }

  .public-dna-item small {
    font-size: 10.5px;
  }

  .public-dna-scale {
    display: none;
  }
}

/* ---------- public profile: one attached stat rail ---------- */

.public-person-updated {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
}

.public-shelf-dna {
  position: relative;
  z-index: 2;
  margin: -15px 14px 14px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: color-mix(in srgb, var(--surface) 92%, var(--accent-soft));
}

.public-dna-grid {
  gap: 6px;
}

.public-dna-item {
  border-color: color-mix(in srgb, var(--line) 74%, transparent);
  background: color-mix(in srgb, var(--surface-2) 38%, var(--surface));
}

/* ---------- trade gallery: dense rows on phones ---------- */

@media (max-width: 640px) {
  .chart-summary {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 10px;
  }

  .chart-summary-current {
    grid-column: 1;
    grid-row: 1;
  }

  .chart-summary-spark {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }

  .chart-summary-range {
    display: none;
  }

  .chart-summary-good {
    grid-column: 1;
    grid-row: 2;
  }

  .chart-summary .chart-data-jump {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    min-height: 0;
    margin: 0;
    font-size: 10.5px;
  }

  .chart-data-jump-label {
    display: none;
  }

  .chart-data-jump-short {
    display: inline;
  }

  .trade-card.is-gallery {
    grid-template-columns: minmax(0, 1fr) 64px;
    grid-template-areas:
      "copy cover"
      "actions actions";
    align-items: start;
    gap: 8px 10px;
  }

  .trade-card.is-gallery .trade-card-copy {
    grid-area: copy;
  }

  .trade-card.is-gallery .trade-cover-wrap {
    grid-area: cover;
    width: 64px;
    height: 80px;
    aspect-ratio: auto;
  }

  .trade-card.is-gallery .trade-cover {
    border-radius: 9px;
  }

  .trade-card.is-gallery .trade-card-title h3 {
    -webkit-line-clamp: 2;
    font-size: 17px;
  }

  .trade-card.is-gallery .trade-card-actions {
    grid-area: actions;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }

  .trade-card.is-gallery .trade-card-actions .btn {
    min-height: 44px;
  }

  .trade-card.is-gallery .trade-chip-extra {
    display: none;
  }

  .trade-card.is-gallery .trade-chip-more {
    display: inline-flex;
  }

  .trade-card.is-gallery.is-chips-open .trade-chip-extra {
    display: inline-flex;
  }

  .trade-card.is-gallery.is-chips-open .trade-chip-more {
    display: none;
  }
}

.trade-chip-more {
  display: none;
  border: 0;
  cursor: pointer;
}

.trade-card.is-chips-open .trade-chip-more {
  display: none;
}

/* ---------- settings: essential by default, details on demand ---------- */

.settings-mode-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--accent-deep);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.settings-mode-toggle:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

html:not(.settings-advanced) .settings-layout:not(.admin-layout) [data-settings-advanced],
html:not(.settings-advanced) .settings-layout:not(.admin-layout) .settings-form .field small,
html:not(.settings-advanced) .settings-layout:not(.admin-layout) .settings-form .filter-field small {
  display: none;
}

html:not(.settings-advanced) .settings-layout:not(.admin-layout) .settings-form {
  gap: 9px;
}

html:not(.settings-advanced) .settings-layout:not(.admin-layout) .settings-card {
  padding: 17px;
}

html:not(.settings-advanced) .settings-layout:not(.admin-layout) .settings-head {
  margin-bottom: 12px;
}

/* ---------- settings: index visible at laptop width ---------- */

@media (min-width: 840px) {
  .settings-layout:not(.admin-layout) {
    display: grid;
    grid-template-columns: 208px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
  }

  .settings-layout:not(.admin-layout) .settings-nav {
    position: sticky;
    top: 12px;
    z-index: 6;
    display: grid;
    align-items: stretch;
    gap: 8px;
    max-height: calc(100vh - 24px);
    padding: 8px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .settings-layout:not(.admin-layout) .settings-toc {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .settings-layout:not(.admin-layout) .settings-toc button {
    width: 100%;
    padding: 8px 10px;
    border-bottom: 0;
    border-left: 2px solid transparent;
    border-radius: 8px;
    text-align: left;
    white-space: normal;
  }

  .settings-layout:not(.admin-layout) .settings-toc button:hover {
    border-left-color: var(--line-strong);
    background: var(--surface-2);
  }

  .settings-layout:not(.admin-layout) .settings-toc button.active {
    border-left-color: var(--accent);
    background: var(--accent-soft);
  }

}

/* ---------- gap cards: one expanded card, compact rows for the rest ---------- */

.collection-gap-list {
  grid-template-columns: minmax(0, 1fr);
}

.collection-gap-fold {
  display: block;
  padding: 0;
  overflow: hidden;
}

.collection-gap-fold > .collection-gap-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  list-style: none;
  cursor: pointer;
}

.collection-gap-fold > .collection-gap-summary::-webkit-details-marker {
  display: none;
}

.collection-gap-summary > span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.collection-gap-summary strong {
  font-size: 0.86rem;
  line-height: 1.2;
}

.collection-gap-summary small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-gap-summary > .icon {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--muted);
  transition: transform 160ms ease;
}

.collection-gap-fold[open] > .collection-gap-summary > .icon {
  transform: rotate(180deg);
}

.collection-gap-fold-body {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

/* ---------- gap cards: one primary action ---------- */

.collection-gap-actions {
  align-items: center;
}

.collection-gap-primary {
  flex: 0 1 auto;
}

.collection-gap-more {
  flex: 0 0 auto;
  margin-left: auto;
}

.collection-gap-more > summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}

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

.collection-gap-more > summary:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.collection-gap-more-panel {
  display: grid;
  gap: 2px;
  margin-top: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.collection-gap-more-panel .text-action {
  width: 100%;
  justify-content: flex-start;
  padding: 7px 8px;
}

.collection-roulette-memory > div > strong {
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.collection-roulette-memory > div > span {
  font-size: 11px;
}

.collection-roulette-actions {
  flex-wrap: nowrap;
  align-items: center;
}

.collection-roulette-keep {
  flex: 1 1 auto;
  min-width: 0;
}

.collection-roulette-icon {
  flex: 0 0 42px;
  width: 42px;
  min-height: 42px;
}

.alert-feed-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
}

.alert-feed-entry .alert-feed-item {
  min-width: 0;
}

.alert-feed-snooze {
  align-self: center;
  width: 40px;
  min-height: 40px;
  color: var(--muted);
}

.alert-feed-snooze:hover {
  color: var(--ink);
  background: var(--surface-2);
}

@media (max-width: 640px) {
  .alert-feed-cta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: auto;
    color: var(--accent-deep);
    font-size: 10.5px;
    font-weight: 650;
  }

  .alert-feed-snooze {
    display: none;
  }
}

/* Empty People shelves use one compact line, not three empty cover slots. */
.person-no-covers {
  justify-content: flex-start;
  min-height: 38px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  text-align: left;
}

/* ---------- public profile: one identity block and one stat card ---------- */

.public-hero-inline-counts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11.5px;
}

.public-hero-inline-counts b {
  font-size: 13.5px;
}

.public-hero-inline-counts .public-inline-actions {
  margin-left: auto;
}

.public-dna-coverage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px 18px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.public-dna-coverage-copy {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.public-dna-coverage-copy .public-hero-breakdown {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}

.public-dna-coverage-bars {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.public-dna-coverage .public-coverage-meter {
  margin: 0;
}

.public-dna-coverage .public-coverage-legend {
  justify-content: flex-start;
  font-size: 11px;
}

@media (max-width: 640px) {
  .public-person-hero.has-covers {
    display: block;
  }

  .public-person-hero.has-covers::after,
  .public-person-hero .public-hero-side {
    display: none;
  }

  .public-hero-inline-counts {
    gap: 4px 9px;
    margin-top: 6px;
    font-size: 11px;
  }

  .public-hero-inline-counts b {
    font-size: 13px;
  }

  .public-dna-coverage {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .public-dna-coverage-copy {
    display: flex;
    align-items: baseline;
    gap: 8px;
  }
}

/* ---------- calmer action toolbar ---------- */

.wishlist-toolbar .list-action-group .btn-ghost,
.discover-filters .list-action-group .btn-ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.wishlist-toolbar .list-action-group .btn-ghost:hover,
.wishlist-toolbar .list-action-group .btn-ghost:focus-visible,
.discover-filters .list-action-group .btn-ghost:hover,
.discover-filters .list-action-group .btn-ghost:focus-visible {
  border-color: var(--line);
  background: var(--surface-2);
}

.collection-bulk-actions .collection-gaps-alert-all {
  align-self: center;
  padding: 2px 0;
  color: var(--accent-deep);
}

/* ---------- mobile shelf: less chrome before the first card ---------- */

@media (max-width: 640px) {
  .shelf-scope-hint {
    display: none;
  }

  .shelf-scope-cluster {
    margin-bottom: 4px;
  }

  .wishlist-coverage.is-compact {
    margin-bottom: 4px;
    padding: 5px 9px;
  }

  .wishlist-toolbar {
    padding: 7px;
  }

  .list-actions-toggle {
    width: 44px;
    min-width: 44px;
    padding: 0;
    justify-content: center;
  }

  .list-actions-toggle span {
    display: none;
  }

  .collection-head-side {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
  }

  .collection-value {
    justify-items: end;
  }
}

.shelf-scope-hint,
.collection-value small,
.collection-stats small {
  font-size: 11px;
}

.public-person-hero .public-person-head {
  flex: 1 1 auto;
  min-width: 0;
}

.public-person-hero .public-person-head > div {
  flex: 1 1 auto;
  min-width: 0;
}

.public-hero-inline-counts {
  width: 100%;
}

.public-hero-inline-counts .public-share-icon-group {
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
}

.public-hero-inline-counts .public-share-icon-group .icon-btn {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
}

.public-hero-inline-counts .public-share-icon-group .icon-btn + .icon-btn {
  border-left: 0;
  border-radius: 50%;
}

@media (max-width: 640px) {
  .public-hero-inline-counts .public-share-icon-group .icon-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }
}

/* The settings form autosaves, so its status needs no floating bar over the
   account actions. Keep it in flow at compact widths. */
@media (max-width: 900px) {
  #settings-form .form-save-bar.form-action-bar {
    position: static;
    box-shadow: var(--shadow-soft);
  }
}

/* ── Billing checkout visual pass ────────────────────────────────────────── */
.billing-steps-wrap {
  display: grid;
  gap: 5px;
  margin: 16px 0 18px;
}

.billing-steps-wrap .billing-steps {
  margin: 0;
}

.billing-step.is-pending {
  color: var(--muted);
}

.billing-steps-meter {
  display: block;
  height: 2px;
  margin: 0 7px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 70%, transparent);
}

.billing-steps-meter > i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width var(--motion-base) var(--ease-standard);
}

.billing-steps-wrap[data-step="1"] .billing-steps-meter > i { width: 33.333%; }
.billing-steps-wrap[data-step="2"] .billing-steps-meter > i { width: 66.666%; }
.billing-steps-wrap[data-step="3"] .billing-steps-meter > i { width: 100%; }

.billing-manage-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.billing-manage-title h2 {
  margin: 0;
}

.billing-plan-head .status-pill,
.billing-mobile-plan .status-pill {
  min-height: 19px;
  padding: 2px 7px;
  font-size: 9.5px;
}

.billing-trust-badge {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--muted);
  line-height: 1.4;
}

.billing-trust-badge .icon {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: var(--accent-deep);
}

.billing-form .field {
  align-content: start;
}

.billing-form .field.is-invalid input {
  border-color: color-mix(in srgb, var(--danger) 64%, var(--line));
  background: color-mix(in srgb, var(--danger-soft) 34%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 10%, transparent);
}

.billing-form .field.is-valid input {
  border-color: color-mix(in srgb, var(--success) 38%, var(--line));
}

.billing-field-error {
  display: block;
  margin-top: 3px;
  color: var(--danger);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.35;
}

.billing-field-error[hidden] {
  display: none;
}

.billing-form .field input,
.billing-form .field select {
  scroll-margin-bottom: 110px;
}

.billing-review-receipt {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.billing-review-plan {
  display: grid;
  gap: 1px;
  padding-bottom: 9px;
  border-bottom: 1px dashed var(--line);
}

.billing-review-plan strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.05;
}

.billing-review-plan small {
  color: var(--muted);
  font-size: 10.5px;
}

.billing-review-block {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.billing-review-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.billing-review-block-head .text-action {
  min-height: 24px;
  font-size: 10.5px;
}

.billing-review-block dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  margin: 0;
}

.billing-review-block dl > div {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.billing-review-block dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.billing-review-block dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.35;
}

.billing-review-block > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.5;
}

.billing-form-progress-row {
  display: none;
}

.billing-form-progress-row > span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
}

.billing-form-progress-row > span.is-ready {
  color: var(--accent-deep);
}

.billing-mobile-progress {
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 2px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: color-mix(in srgb, var(--line) 75%, transparent);
}

.billing-mobile-progress::-webkit-progress-bar {
  border-radius: inherit;
  background: color-mix(in srgb, var(--line) 75%, transparent);
}

.billing-mobile-progress::-webkit-progress-value {
  border-radius: inherit;
  background: var(--accent);
  transition: width var(--motion-base) var(--ease-standard);
}

.billing-mobile-progress::-moz-progress-bar {
  border-radius: inherit;
  background: var(--accent);
}

@media (max-width: 980px) {
  .billing-form {
    padding-bottom: 0;
  }

  .billing-mobile-bar {
    position: static;
    margin-top: 4px;
    padding-bottom: calc(9px + env(safe-area-inset-bottom, 0px));
    box-shadow: none;
  }

  .billing-form-progress-row {
    display: grid;
    gap: 4px;
    margin-bottom: -2px;
  }

  .billing-review-receipt {
    padding: 10px;
  }

  .billing-review-block dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .settings-subscription-card {
    flex-wrap: wrap;
  }

  .settings-subscription-card > .btn {
    width: 100%;
    justify-content: center;
  }

  .settings-subscription-title {
    align-items: flex-start;
  }
}

.admin-health-overall.status-pill,
.admin-health-state.status-pill {
  width: fit-content;
  margin-top: 2px;
  padding: 2px 7px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .015em;
  text-transform: none;
}

.admin-health-head-actions .admin-health-overall.status-pill {
  margin-left: 0;
}

.auth-subscription {
  align-items: flex-start;
}

.auth-subscription-mark {
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--surface);
  color: var(--accent-deep);
}

.auth-subscription-mark .icon {
  width: 16px;
  height: 16px;
}

.auth-subscription strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.auth-subscription p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}

.auth-invite-optional {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-2) 40%, transparent);
}

.auth-invite-optional > summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  color: var(--accent-deep);
  font-size: 10.5px;
  font-weight: 650;
  cursor: pointer;
}

.auth-invite-optional > summary::-webkit-details-marker {
  display: none;
}

.auth-invite-optional > summary .icon {
  width: 12px;
  height: 12px;
  transition: transform var(--motion-fast) var(--ease-standard);
}

.auth-invite-optional[open] > summary .icon {
  transform: rotate(180deg);
}

.auth-invite-optional .field {
  margin-top: 4px;
}

.billing-checkout-fallback {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
  text-align: center;
}

/* ── Shelf card scanning ─────────────────────────────────────────────────── */
@media (min-width: 900px) {
  /* Keep the offer and trend on one line, and let the target gap take the
     leftover width instead of leaving an empty island in the middle. */
  html:not(.table-view):not(.compact-cards) .game-card .price-row-more .quick-alert-gap {
    margin-left: auto;
  }
}
