:root {
  color-scheme: light;
  --bg: #eef3f2;
  --surface: #ffffff;
  --surface-soft: #e7f1ef;
  --text: #102e2c;
  --muted: #4d6b68;
  --line: #b8d3ce;
  --line-strong: #6d9d95;
  --accent: #2ab399;
  --accent-strong: #185858;
  --accent-soft: #d8f2ed;
  --lime: #caff02;
  --gold: #f3c339;
  --magenta: #d818b3;
  --warn: #d58a19;
  --danger: #e34455;
  --fh-ink: #071f20;
  --fh-deep: #185858;
  --fh-teal: #2ab399;
  --fh-lime: #caff02;
  --fh-paper: #f8f8f8;
  --shadow: 0 16px 36px rgba(7, 31, 32, 0.16);
  --shadow-soft: 0 7px 18px rgba(7, 31, 32, 0.1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
a.button {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.site-header {
  display: flex;
  position: sticky;
  top: 10px;
  z-index: 20;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(199, 208, 202, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.brand-block {
  min-width: max-content;
}

.header-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 0;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 800;
  transition: color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, transform 120ms var(--ease-out);
}

.nav-link:hover {
  color: var(--text);
  background: #ffffff;
}

.nav-link.is-active {
  color: var(--accent-strong);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(24, 32, 29, 0.08);
}

.nav-link:active {
  transform: scale(0.97);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  font-size: 1.65rem;
  font-weight: 850;
}

h2 {
  font-size: 1.1rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 1px 0 rgba(24, 32, 29, 0.03);
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, transform 120ms var(--ease-out);
}

.button:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-soft);
}

.button.primary {
  color: #ffffff;
  border-color: var(--accent);
  background: var(--accent);
}

.button.primary:hover {
  background: var(--accent-strong);
}

.button:active {
  transform: scale(0.97);
}

.button.is-speaking,
.speak-button.is-speaking {
  color: #ffffff;
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(33, 107, 79, 0.14);
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(164, 97, 18, 0.1);
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.status-strip.is-ok .status-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 108, 80, 0.11);
}

.status-strip.is-error .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(166, 61, 52, 0.11);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.stat-card {
  min-height: 86px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.stat-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.collection-progress {
  display: grid;
  gap: 10px;
  margin: -6px 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.progress-heading strong {
  color: var(--accent);
  font-size: 1rem;
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: #e8ece7;
  overflow: hidden;
}

.progress-fill {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(15, 80, 58, 0.08) inset;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms var(--ease-out);
}

.statistics-page {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.garage-value-band {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  min-height: 176px;
  padding: 28px;
  border: 1px solid rgba(23, 108, 80, 0.24);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: linear-gradient(120deg, #ffffff 0%, #edf6f1 100%);
  box-shadow: var(--shadow-soft);
}

.garage-value-band p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.garage-value-band > div > p {
  margin-bottom: 12px;
  color: var(--accent-strong);
  font-size: 0.9rem;
}

.garage-value-number {
  display: block;
  min-height: 1em;
  color: var(--text);
  font-size: 3.25rem;
  font-weight: 850;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.value-stat-card strong {
  font-size: 1.35rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.statistics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px 34px;
  padding-top: 8px;
}

.statistics-section {
  min-width: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.statistics-wide {
  grid-column: 1 / -1;
}

.statistics-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.statistics-section-heading p {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.statistics-section-heading > span {
  color: var(--muted);
  font-size: 0.85rem;
}

.value-breakdown,
.make-value-list {
  display: grid;
  gap: 18px;
}

.value-breakdown-row,
.make-value-row {
  display: grid;
  gap: 9px;
}

.value-breakdown-meta,
.make-value-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.value-breakdown-meta span,
.make-value-heading span {
  color: var(--muted);
  font-size: 0.86rem;
  text-align: right;
}

.stats-bar {
  height: 9px;
  border-radius: 999px;
  background: #e2e7e3;
  overflow: hidden;
}

.stats-bar-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 260ms var(--ease-out);
}

.stats-bar-fill.is-autoshow {
  background: #176c50;
}

.stats-bar-fill.is-non-tradable {
  background: #5d6f9f;
}

.value-ranking {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.value-ranking li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.ranking-index {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 850;
}

.value-ranking div {
  min-width: 0;
}

.value-ranking strong,
.value-ranking small {
  display: block;
  overflow-wrap: anywhere;
}

.value-ranking small {
  margin-top: 2px;
  color: var(--muted);
}

.ranking-value {
  color: var(--accent-strong);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.statistics-empty {
  margin: 0;
  padding: 24px 0;
  color: var(--muted);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(250px, 1.4fr) repeat(5, minmax(130px, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 11px;
  color: var(--text);
  background: var(--surface-soft);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.field select {
  appearance: none;
  cursor: pointer;
  padding-right: 34px;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%),
    linear-gradient(to right, var(--line), var(--line)),
    var(--surface-soft);
  background-position:
    calc(100% - 18px) 17px,
    calc(100% - 13px) 17px,
    calc(100% - 30px) 9px,
    0 0;
  background-size:
    5px 5px,
    5px 5px,
    1px 22px,
    100% 100%;
  background-repeat: no-repeat;
}

.field input:hover,
.field select:hover {
  border-color: var(--accent);
  background-color: #ffffff;
}

.field select:hover {
  background:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%),
    linear-gradient(to right, var(--line-strong), var(--line-strong)),
    #ffffff;
  background-position:
    calc(100% - 18px) 17px,
    calc(100% - 13px) 17px,
    calc(100% - 30px) 9px,
    0 0;
  background-size:
    5px 5px,
    5px 5px,
    1px 22px,
    100% 100%;
  background-repeat: no-repeat;
}

.field input:focus,
.field select:focus,
.make-picker-button:focus-visible,
.filter-picker-button:focus-visible,
.button:focus-visible,
.ui-button:focus-visible {
  outline: 3px solid rgba(33, 107, 79, 0.22);
  outline-offset: 1px;
}

.single-source-toggle {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.single-source-toggle input,
.owned-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.single-source-toggle > span:last-child {
  color: var(--text);
  font-size: 0.78rem;
}

.single-source-check {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: #ffffff;
  transition: border-color 140ms ease, background-color 140ms ease, transform 120ms var(--ease-out);
}

.single-source-check::after {
  content: "";
  width: 8px;
  height: 4px;
  margin-top: -1px;
  border-bottom: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  opacity: 0;
  transform: rotate(-45deg) scale(0.72);
  transition: opacity 100ms ease, transform 140ms var(--ease-out);
}

.single-source-toggle input:checked + .single-source-check {
  border-color: var(--accent);
  background: var(--accent);
}

.single-source-toggle input:checked + .single-source-check::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}

.single-source-toggle input:focus-visible + .single-source-check,
.owned-toggle input:focus-visible + .owned-check {
  outline: 3px solid rgba(33, 107, 79, 0.22);
  outline-offset: 2px;
}

.single-source-toggle:active .single-source-check {
  transform: scale(0.9);
  transition-duration: 60ms;
}

.field input:focus,
.field select:focus {
  border-color: var(--accent);
  background-color: #ffffff;
  box-shadow: 0 0 0 1px rgba(33, 107, 79, 0.1);
}

.make-picker-button,
.filter-picker-button {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  padding: 6px 34px 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-soft);
  text-align: left;
  box-shadow: 0 1px 0 rgba(24, 32, 29, 0.025);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease, transform 120ms var(--ease-out);
}

.make-picker-button::after,
.filter-picker-button::after {
  content: "";
  position: absolute;
  right: 14px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
}

.make-picker-button:hover,
.filter-picker-button:hover {
  border-color: var(--accent);
  background: #ffffff;
}

.make-picker-button:active,
.filter-picker-button:active {
  transform: scale(0.98);
}

.make-picker-button.is-active,
.filter-picker-button.is-active {
  border-color: rgba(23, 108, 80, 0.45);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px rgba(23, 108, 80, 0.06) inset;
}

.make-picker-button.is-active::after,
.filter-picker-button.is-active::after {
  border-color: var(--accent);
}

.make-picker-button:hover::after,
.filter-picker-button:hover::after {
  border-color: var(--accent);
}

.make-picker-button strong,
.make-picker-button small,
.filter-picker-button strong,
.filter-picker-button small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.make-picker-button strong,
.filter-picker-button strong {
  font-size: 0.9rem;
  line-height: 1.1;
}

.make-picker-button small,
.filter-picker-button small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.1;
}

.filter-picker-button {
  min-width: 0;
}

.make-dialog {
  width: min(760px, calc(100% - 24px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(24, 32, 29, 0.24);
}

.make-dialog::backdrop {
  background: rgba(24, 32, 29, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.make-dialog[open] {
  animation: dialog-enter 200ms var(--ease-out);
}

.make-dialog[open]::backdrop {
  animation: backdrop-enter 160ms var(--ease-out);
}

.make-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.make-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.make-panel-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.make-panel-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.make-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
  max-height: min(520px, calc(100vh - 235px));
  overflow: auto;
  padding-right: 2px;
}

.make-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-soft);
  text-align: left;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 120ms var(--ease-out);
}

.make-option:hover {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(31, 37, 35, 0.08);
}

.make-option:active {
  transform: scale(0.98);
}

.make-option.is-active {
  color: #ffffff;
  border-color: var(--accent);
  background: var(--accent);
}

.make-option-name {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.make-option-name strong,
.make-option-name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.make-option-name strong {
  font-size: 0.95rem;
}

.make-option-name small {
  color: var(--muted);
  font-size: 0.78rem;
}

.make-option.is-active .make-option-name small {
  color: rgba(255, 255, 255, 0.78);
}

.make-option-count {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.make-option.is-active .make-option-count {
  color: var(--accent-strong);
  background: #ffffff;
}

.make-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 12px;
}

.list-header span {
  color: var(--muted);
  font-size: 0.95rem;
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(286px, 1fr));
  gap: 14px;
}

.vehicle-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transform: translateZ(0);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 140ms var(--ease-out);
}

.vehicle-card:hover {
  border-color: rgba(23, 108, 80, 0.62);
}

.vehicle-card:focus-visible {
  outline: 3px solid rgba(33, 107, 79, 0.22);
  outline-offset: 2px;
}

.vehicle-card.is-owned {
  border-color: rgba(33, 107, 79, 0.42);
  box-shadow: 0 5px 18px rgba(23, 108, 80, 0.08);
}

.vehicle-card.is-just-owned {
  border-color: var(--accent);
}

.image-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #e3e7e2;
  overflow: hidden;
}

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

.owned-flag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(15, 80, 58, 0.94);
  box-shadow: 0 5px 16px rgba(15, 80, 58, 0.18);
  font-size: 0.78rem;
  font-weight: 700;
}

.vehicle-card.is-just-owned .owned-flag {
  animation: owned-flag-in 180ms var(--ease-out);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

.car-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.car-title {
  min-width: 0;
}

.car-title h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.car-alias {
  color: var(--accent-strong);
  font-weight: 800;
}

.car-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.speak-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.speak-button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 800;
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease, transform 120ms var(--ease-out);
}

.speak-button:hover {
  border-color: var(--accent);
  background: #ffffff;
}

.speak-button:active {
  transform: scale(0.96);
}

.speak-button:focus-visible {
  outline: 3px solid rgba(33, 107, 79, 0.22);
  outline-offset: 1px;
}

.question-speak-button {
  margin-top: 4px;
}

.owned-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.owned-check {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(24, 32, 29, 0.08);
  overflow: visible;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 120ms var(--ease-out);
}

.owned-check::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 6px;
  height: 10px;
  border-right: 2.35px solid #ffffff;
  border-bottom: 2.35px solid #ffffff;
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  transform: translate(-50%, -50%) rotate(45deg) scale(0.72);
  transform-origin: center;
  will-change: transform, opacity, clip-path;
  transition: opacity 120ms ease, transform 150ms var(--ease-out), clip-path 1ms linear 150ms;
}

.owned-check::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(23, 108, 80, 0.28);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.owned-toggle:hover .owned-check {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(33, 107, 79, 0.1);
}

.owned-toggle input:checked + .owned-check {
  border-color: var(--accent);
  background: var(--accent);
}

.owned-toggle input:checked + .owned-check::before {
  opacity: 1;
  clip-path: inset(0 0 0 0);
  transform: translate(-50%, -50%) rotate(45deg) scale(1);
}

.vehicle-card.is-just-owned .owned-check {
  animation: owned-check-settle 320ms cubic-bezier(0.2, 0.9, 0.25, 1) both;
}

.vehicle-card.is-just-owned .owned-check::before {
  animation: owned-check-draw 260ms cubic-bezier(0.16, 0.9, 0.3, 1) 38ms both;
}

.vehicle-card.is-just-owned .owned-check::after {
  animation: owned-check-ring 360ms ease-out both;
}

.owned-toggle:active .owned-check {
  transform: scale(0.92);
  transition-duration: 60ms;
}

.vehicle-card.is-owned .owned-toggle {
  color: var(--accent-strong);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.badge.rarity-legendary,
.detail-highlight.rarity-legendary {
  color: #ffffff;
  border-color: #fea71d;
  background: #fea71d;
}

.badge.rarity-forza-edition,
.detail-highlight.rarity-forza-edition {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(to left, #3655cd, #d122bd);
}

.detail-highlight.rarity-forza-edition span,
.detail-highlight.rarity-forza-edition strong,
.detail-highlight.rarity-legendary span,
.detail-highlight.rarity-legendary strong,
.detail-highlight.rarity-epic span,
.detail-highlight.rarity-epic strong,
.detail-highlight.rarity-rare span,
.detail-highlight.rarity-rare strong,
.detail-highlight.rarity-common span,
.detail-highlight.rarity-common strong {
  color: #ffffff;
}

.badge.rarity-epic,
.detail-highlight.rarity-epic {
  color: #ffffff;
  border-color: #d247ed;
  background: #d247ed;
}

.badge.rarity-rare,
.detail-highlight.rarity-rare {
  color: #ffffff;
  border-color: #2dcdf9;
  background: #2dcdf9;
}

.badge.rarity-common,
.detail-highlight.rarity-common {
  color: #ffffff;
  border-color: #7acb49;
  background: #7acb49;
}

.badge.rarity-treasure-car {
  color: #6e430a;
  border-color: #e3c071;
  background: #fff7df;
}

.badge.rarity-unknown {
  color: #4f5a55;
  border-color: #cbd2ce;
  background: #f3f5f4;
}

.badge.rarity-barn-find {
  color: #6a451f;
  border-color: #d7b68f;
  background: #fff5e8;
}

.performance-badge {
  color: #ffffff;
  border-color: transparent;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 2px rgba(24, 32, 29, 0.14);
}

.performance-d { background: #3dbaea; }
.performance-c { background: #f6bf31; }
.performance-b { background: #ff6533; }
.performance-a { background: #fc355a; }
.performance-s1 { background: #bd5ee4; }
.performance-s2 { background: #1567d6; }
.performance-r { background: #d21995; }

.meta-list {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 6px 10px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.meta-list dt {
  color: var(--text);
  font-weight: 700;
}

.meta-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  margin: 0;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
}

.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;
}

.ui-toolbar,
.detail-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
}

.ui-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
  box-shadow: 0 7px 16px rgba(31, 37, 35, 0.06);
  font: inherit;
  font-weight: 900;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, transform 120ms var(--ease-out);
}

.ui-button:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 22px rgba(31, 37, 35, 0.1);
}

.ui-button:active {
  transform: scale(0.97);
}

.ui-button:focus-visible {
  outline: 3px solid rgba(33, 107, 79, 0.22);
  outline-offset: 2px;
}

.ui-button-primary {
  color: #ffffff;
  border-color: var(--accent);
  background: linear-gradient(180deg, #2b7b5d 0%, var(--accent) 100%);
  box-shadow: 0 10px 22px rgba(33, 107, 79, 0.18);
}

.ui-button-primary.is-saved {
  color: var(--accent-strong);
  border-color: rgba(23, 108, 80, 0.34);
  background: var(--accent-soft);
  box-shadow: 0 6px 16px rgba(23, 108, 80, 0.1);
}

.ui-panel {
  border: 1px solid rgba(195, 202, 195, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ui-panel-soft {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.ui-badge {
  display: inline-grid;
  min-height: 40px;
  place-items: center;
  padding: 0 11px;
  border: 1px solid rgba(33, 107, 79, 0.3);
  border-radius: 8px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.86rem;
  font-weight: 900;
  text-align: center;
  overflow-wrap: anywhere;
}

.ui-badge-muted {
  color: var(--text);
  border-color: var(--line);
  background: #ffffff;
}

.ui-badge.is-owned {
  color: #ffffff;
  border-color: var(--accent);
  background: var(--accent);
}

.ui-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(33, 107, 79, 0.26);
  border-radius: 8px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.82rem;
  font-weight: 900;
}

.detail-title-block {
  min-width: 0;
  text-align: center;
}

.detail-title-block h1 {
  overflow-wrap: anywhere;
}

.detail-status {
  margin-bottom: 16px;
}

.detail-page,
.detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  margin-top: 18px;
}

.detail-showcase {
  display: grid;
  position: sticky;
  top: 112px;
  gap: 12px;
  padding: 12px;
}

.detail-image-card {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 260px;
  border-radius: 8px;
  background: #151b18;
  overflow: hidden;
}

.detail-image-card::after {
  content: "";
  position: absolute;
  inset: auto 18px 18px;
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.detail-image-card img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-height: 252px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.detail-pill-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.detail-info {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 20px;
}

.detail-hero {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.detail-heading {
  display: grid;
  gap: 8px;
}

.detail-heading h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.detail-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.detail-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 9px;
}

.ui-metric {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(33, 107, 79, 0.18);
  border-radius: 8px;
  background: #eef6f2;
}

.ui-metric span {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
}

.ui-metric strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.ui-field {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.detail-item.is-wide {
  grid-column: 1 / -1;
}

.detail-list dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.detail-list dd {
  margin: 0;
  min-width: 0;
  color: var(--text);
  overflow-wrap: anywhere;
  font-weight: 800;
}

.detail-intro-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.detail-name-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.detail-seasonal-item {
  align-items: start;
}

.seasonal-event-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.seasonal-event-list li {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.seasonal-event-list strong {
  color: var(--text);
  font-size: 0.86rem;
}

.seasonal-event-list span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.45;
}

.detail-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.detail-section-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.detail-section-heading span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.detail-text-field input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
  font: inherit;
  font-weight: 700;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.detail-text-field input:hover,
.detail-text-field input:focus {
  border-color: var(--accent);
}

.detail-text-field input:focus {
  outline: 3px solid rgba(33, 107, 79, 0.22);
  outline-offset: 1px;
}

.performance-metric {
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(24, 32, 29, 0.12);
}

.performance-metric span,
.performance-metric strong {
  color: #ffffff;
}

.performance-metric.performance-d { background: #3dbaea; }
.performance-metric.performance-c { background: #f6bf31; }
.performance-metric.performance-b { background: #ff6533; }
.performance-metric.performance-a { background: #fc355a; }
.performance-metric.performance-s1 { background: #bd5ee4; }
.performance-metric.performance-s2 { background: #1567d6; }
.performance-metric.performance-r { background: #d21995; }

.detail-intro-field textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
  font: inherit;
  line-height: 1.55;
  box-shadow: inset 0 1px 0 rgba(31, 37, 35, 0.03);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.detail-intro-field textarea:hover,
.detail-intro-field textarea:focus {
  border-color: var(--accent);
}

.detail-intro-field textarea:focus {
  outline: 3px solid rgba(33, 107, 79, 0.22);
  outline-offset: 1px;
}

.guess-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.guess-board {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.mode-switch {
  width: min(960px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.mode-button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  transition: color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, transform 120ms var(--ease-out);
}

.mode-button:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.mode-button.is-active {
  color: var(--accent-strong);
  border-color: var(--line);
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(24, 32, 29, 0.08);
}

.mode-button:active {
  transform: scale(0.98);
}

.make-question-card {
  width: min(960px, 100%);
  min-height: 190px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 26px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.make-question-card span {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.make-question-card strong {
  max-width: 100%;
  font-size: 2.4rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.make-question-card small {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}

.guess-stage {
  position: relative;
  width: min(960px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.car-detail-dialog {
  width: min(1180px, calc(100% - 24px));
  height: min(860px, calc(100vh - 28px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 26px 80px rgba(24, 32, 29, 0.25);
  overflow: hidden;
}

.car-detail-dialog::backdrop {
  background: rgba(24, 32, 29, 0.42);
  backdrop-filter: blur(3px);
}

.car-detail-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  animation: dialog-enter 200ms var(--ease-out);
}

.car-detail-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.car-detail-dialog iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--bg);
}

body.is-embedded .app-shell {
  width: min(1120px, calc(100% - 20px));
  padding-top: 10px;
}

body.is-embedded .detail-topbar {
  display: none;
}

.back-to-top {
  appearance: none;
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(23, 108, 80, 0.35);
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(23, 108, 80, 0.2);
  font-size: 1.25rem;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.96);
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out), background-color 140ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  background: var(--accent-strong);
}

.back-to-top:active {
  transform: scale(0.95);
}

.guess-options {
  width: min(960px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  counter-reset: answer-option;
}

.answer-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  font-weight: 700;
  text-align: left;
  overflow-wrap: anywhere;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 140ms var(--ease-out);
}

.answer-button::before {
  counter-increment: answer-option;
  content: counter(answer-option, upper-alpha);
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.86rem;
  font-weight: 800;
}

.answer-button:disabled {
  cursor: default;
  opacity: 1;
}

.answer-button:hover:not(:disabled) {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(31, 37, 35, 0.12);
}

.answer-button:active:not(:disabled) {
  transform: scale(0.985);
}

.answer-button:focus-visible {
  outline: 3px solid rgba(33, 107, 79, 0.22);
  outline-offset: 2px;
}

.answer-button.is-correct {
  color: #ffffff;
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(33, 107, 79, 0.2);
  animation: answer-confirm 180ms var(--ease-out);
}

.answer-button.is-correct::before {
  color: var(--accent-strong);
  border-color: #ffffff;
  background: #ffffff;
}

.answer-button.is-wrong {
  color: #ffffff;
  border-color: var(--danger);
  background: var(--danger);
  box-shadow: 0 10px 24px rgba(163, 59, 50, 0.18);
  animation: answer-confirm 180ms var(--ease-out);
}

.answer-button.is-wrong::before {
  color: var(--danger);
  border-color: #ffffff;
  background: #ffffff;
}

.guess-actions {
  width: min(960px, 100%);
  margin: 0 auto;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@keyframes dialog-enter {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes backdrop-enter {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes owned-flag-in {
  0% {
    opacity: 0;
    transform: translateY(-4px) scale(0.94);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes owned-check-settle {
  0% {
    transform: scale(0.82);
    box-shadow: 0 0 0 0 rgba(23, 108, 80, 0.18);
  }

  56% {
    transform: scale(1.1);
    box-shadow: 0 0 0 5px rgba(23, 108, 80, 0.08);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 1px 2px rgba(24, 32, 29, 0.08);
  }
}

@keyframes owned-check-draw {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transform: translate(-50%, -50%) rotate(45deg) scale(0.62);
  }

  42% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translate(-50%, -50%) rotate(45deg) scale(1);
  }
}

@keyframes owned-check-ring {
  0% {
    opacity: 0.62;
    transform: scale(0.72);
  }

  100% {
    opacity: 0;
    transform: scale(1.4);
  }
}

@keyframes answer-confirm {
  0% {
    opacity: 0.82;
    transform: scale(0.985);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .make-dialog[open],
  .make-dialog[open]::backdrop,
  .vehicle-card.is-just-owned .owned-flag,
  .vehicle-card.is-just-owned .owned-check,
  .vehicle-card.is-just-owned .owned-check::before,
  .vehicle-card.is-just-owned .owned-check::after,
  .answer-button.is-correct,
  .answer-button.is-wrong {
    animation: none;
  }

  .vehicle-card,
  .button,
  .ui-button,
  .nav-link,
  .make-picker-button,
  .filter-picker-button,
  .make-option,
  .answer-button,
  .mode-button {
    transform: none !important;
    transition-duration: 1ms !important;
  }

  .owned-check,
  .single-source-check,
  .owned-check::before,
  .owned-check::after,
  .single-source-check::after {
    transition-duration: 1ms !important;
  }

  .owned-toggle:active .owned-check,
  .single-source-toggle:active .single-source-check {
    transform: none;
  }

  .back-to-top {
    transform: none !important;
    transition: opacity 1ms linear !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .make-dialog::backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  .site-header,
  .toolbar,
  .status-strip,
  .vehicle-card,
  .stat-card {
    border-color: #727c77;
  }
}

@media (hover: hover) and (pointer: fine) {
  .vehicle-card:hover {
    box-shadow: 0 15px 34px rgba(24, 32, 29, 0.12);
    transform: translateY(-2px);
  }

  .answer-button:hover:not(:disabled) {
    transform: translateY(-1px);
  }
}

@media (max-width: 1040px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    justify-items: start;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .file-actions {
    justify-content: flex-start;
  }

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

  .stats-summary-grid,
  .statistics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-page,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-showcase {
    position: static;
  }

  .search-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .car-detail-dialog {
    position: fixed;
    inset: 0;
    width: 100dvw;
    height: 100dvh;
    max-width: 100dvw;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  body.is-embedded .app-shell {
    width: 100%;
    padding: 0 10px 20px;
  }

  .app-shell {
    width: min(100% - 20px, 1480px);
    padding-top: 12px;
  }

  h1 {
    font-size: 1.65rem;
  }

  .detail-topbar {
    grid-template-columns: 1fr;
  }

  .detail-title-block {
    text-align: left;
  }

  .header-actions,
  .site-nav {
    width: 100%;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav-link {
    min-width: 0;
    padding: 0 7px;
    text-align: center;
  }

  .file-actions,
  .button,
  .ui-button {
    width: 100%;
  }

  .stats-grid,
  .stats-summary-grid,
  .statistics-grid,
  .toolbar,
  .vehicle-grid,
  .guess-stats,
  .guess-options,
  .mode-switch {
    grid-template-columns: 1fr;
  }

  .garage-value-band {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 20px;
  }

  .garage-value-number {
    font-size: 2.25rem;
  }

  .statistics-wide {
    grid-column: auto;
  }

  .statistics-section-heading,
  .value-breakdown-meta,
  .make-value-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .value-breakdown-meta span,
  .make-value-heading span {
    text-align: left;
  }

  .value-ranking li {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .ranking-value {
    grid-column: 2;
    text-align: left;
  }

  .make-question-card {
    min-height: 150px;
  }

  .make-question-card strong {
    font-size: 1.8rem;
  }

  .stat-card {
    min-height: 78px;
  }

  .vehicle-card {
    min-height: auto;
  }

  .make-panel-header {
    flex-direction: column;
  }

  .make-panel-actions {
    width: 100%;
  }

  .make-list {
    grid-template-columns: 1fr;
  }

  .detail-pill-row,
  .detail-highlights,
  .detail-list {
    grid-template-columns: 1fr;
  }

  .car-detail-dialog {
    position: fixed;
    inset: 0;
    width: 100dvw;
    height: 100dvh;
    max-width: 100dvw;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
}

/* Horizon-inspired interface refresh */
body.has-global-navigation .app-shell {
  padding-bottom: 132px;
}

body.has-global-navigation .site-header,
body.has-global-navigation .detail-topbar {
  padding-right: 64px;
}

.site-header {
  border-color: rgba(125, 190, 180, 0.56);
  background: rgba(255, 255, 255, 0.92);
}

.site-header::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 18px;
  width: 54px;
  height: 3px;
  background: var(--lime);
}

.eyebrow {
  color: var(--accent-strong);
}

.status-strip {
  border-color: rgba(154, 207, 199, 0.7);
  background: rgba(255, 255, 255, 0.82);
}

.status-dot,
.status-strip.is-ok .status-dot {
  background: var(--magenta);
  box-shadow: 0 0 0 3px rgba(209, 34, 189, 0.12);
}

.button.primary,
.ui-button-primary {
  color: #ffffff;
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.button.primary:hover,
.ui-button-primary:hover {
  color: #143431;
  border-color: var(--lime);
  background: var(--lime);
}

.toolbar,
.collection-progress,
.stat-card,
.vehicle-card,
.make-question-card,
.guess-stage,
.answer-button {
  border-color: rgba(172, 210, 204, 0.9);
}

.collection-progress {
  gap: 8px;
  margin: 18px 0;
  padding: 15px 16px 12px;
}

.progress-heading strong {
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 13px;
  border: 1px solid rgba(10, 75, 70, 0.1);
  background: #dcebe8;
}

.progress-fill {
  --progress-hidden: 100%;
  background: linear-gradient(
    90deg,
    #3dbaea 0%,
    #3dbaea 7%,
    #f6bf31 15%,
    #ff6533 27%,
    #fc355a 39%,
    #bd5ee4 52%,
    #1567d6 66%,
    #d21995 80%,
    #161a1c 92%,
    #161a1c 97%,
    #3655cd 98.25%,
    #d122bd 100%
  );
  box-shadow: 0 1px 2px rgba(10, 40, 38, 0.18) inset;
  clip-path: inset(0 var(--progress-hidden) 0 0);
  transform: none;
  transition: clip-path 380ms var(--ease-out);
}

.vehicle-card.is-just-owned {
  border-color: rgba(11, 159, 145, 0.42);
}

.owned-toggle {
  min-height: 34px;
  padding: 3px;
  border-radius: 999px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.owned-toggle-label {
  color: var(--muted);
  transition: color 180ms ease;
}

.vehicle-card.is-owned .owned-toggle-label {
  color: var(--accent-strong);
}

.owned-check {
  width: 27px;
  height: 27px;
  border: 1.5px solid #a9bfbb;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(12, 46, 42, 0.12);
  overflow: hidden;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 150ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.owned-check::before,
.owned-check::after {
  content: none;
}

.owned-check svg {
  position: absolute;
  inset: 4px;
  width: 17px;
  height: 17px;
  overflow: visible;
}

.owned-check path {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.45;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 16;
  stroke-dashoffset: 16;
  opacity: 0;
  transition:
    stroke-dashoffset 330ms cubic-bezier(0.22, 0.74, 0.18, 1) 70ms,
    opacity 90ms ease 60ms;
}

.owned-toggle:hover .owned-check {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(11, 159, 145, 0.1);
}

.owned-toggle input:checked + .owned-check {
  border-color: #0b8f82;
  background: #0b8f82;
}

.owned-toggle input:checked + .owned-check path {
  stroke-dashoffset: 0;
  opacity: 1;
}

.vehicle-card.is-just-owned .owned-check,
.vehicle-card.is-just-owned .owned-check::before,
.vehicle-card.is-just-owned .owned-check::after {
  animation: none;
}

.owned-toggle:active .owned-check {
  transform: scale(0.88);
  transition-duration: 90ms;
}

.owned-toggle input:focus-visible + .owned-check {
  outline: none;
  box-shadow: 0 0 0 4px rgba(11, 159, 145, 0.2);
}

.garage-value-toast {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  z-index: 90;
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-height: 48px;
  padding: 10px 15px;
  border: 1px solid rgba(216, 165, 28, 0.65);
  border-radius: 8px;
  color: #6c4a00;
  background: #fff4c8;
  box-shadow: 0 14px 36px rgba(132, 94, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px) scale(0.96);
  transition: opacity 180ms ease, transform 240ms var(--ease-out);
}

.garage-value-toast span {
  font-size: 0.82rem;
  font-weight: 800;
}

.garage-value-toast strong {
  color: #b17700;
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
}

.garage-value-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.bottom-navigation {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 55;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(420px, calc(100% - 28px));
  min-height: 68px;
  padding: 6px;
  border: 1px solid rgba(122, 184, 175, 0.66);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(7, 65, 59, 0.2);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  transform: translateX(-50%);
}

.bottom-nav-item {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  min-width: 0;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 850;
  transition: color 160ms ease, background-color 180ms ease, transform 140ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item:hover {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.bottom-nav-item:active {
  transform: scale(0.96);
}

.bottom-nav-item.is-active {
  color: #ffffff;
  background: var(--accent-strong);
}

.bottom-nav-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: currentColor;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  transition: transform 240ms cubic-bezier(0.2, 0.9, 0.25, 1), color 180ms ease;
}

.bottom-nav-item.is-active .bottom-nav-icon {
  color: var(--lime);
  transform: translateY(-1px) scale(1.08);
  animation: nav-icon-arrive 260ms cubic-bezier(0.2, 0.9, 0.25, 1);
}

.global-settings-button {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 65;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(122, 184, 175, 0.72);
  border-radius: 50%;
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(7, 65, 59, 0.14);
  -webkit-tap-highlight-color: transparent;
}

.global-settings-button span {
  display: block;
  font-size: 1.22rem;
  line-height: 1;
  transition: transform 280ms cubic-bezier(0.2, 0.85, 0.25, 1);
}

.global-settings-button:hover span,
.global-settings-button.is-open span {
  transform: rotate(52deg);
}

.global-settings-button:active {
  transform: scale(0.92);
}

.settings-dialog {
  width: min(420px, calc(100% - 24px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 26px 80px rgba(7, 65, 59, 0.28);
}

.settings-dialog::backdrop {
  background: rgba(5, 35, 32, 0.36);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.settings-dialog[open] {
  animation: dialog-enter 220ms var(--ease-out);
}

.settings-panel {
  display: grid;
  gap: 4px;
  padding: 18px;
}

.settings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.settings-heading p {
  margin: 0 0 3px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
}

.settings-heading h2 {
  font-size: 1.35rem;
}

.settings-close-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 1.35rem;
}

.settings-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 10px 4px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.settings-option > span {
  display: grid;
  gap: 2px;
}

.settings-option strong {
  font-size: 0.92rem;
}

.settings-option small {
  color: var(--muted);
  font-size: 0.78rem;
}

.settings-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settings-option i {
  position: relative;
  display: block;
  width: 46px;
  height: 28px;
  border: 1px solid #b9cbc8;
  border-radius: 999px;
  background: #dce8e6;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.settings-option i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(12, 46, 42, 0.2);
  transition: transform 220ms cubic-bezier(0.2, 0.9, 0.25, 1);
}

.settings-option input:checked + i {
  border-color: var(--accent);
  background: var(--accent);
}

.settings-option input:checked + i::after {
  transform: translateX(18px);
}

.settings-option input:focus-visible + i {
  outline: 3px solid rgba(11, 159, 145, 0.22);
  outline-offset: 2px;
}

.back-to-top {
  bottom: max(94px, calc(env(safe-area-inset-bottom) + 82px));
  border-radius: 50%;
}

.game-hub {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.game-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 160ms var(--ease-out);
}

.game-entry:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.game-entry:active {
  transform: scale(0.985);
}

.game-entry-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 8px;
  color: #143431;
  background: var(--lime);
  font-size: 1.7rem;
  font-weight: 950;
}

.game-entry-make .game-entry-icon {
  color: #ffffff;
  background: var(--magenta);
}

.game-entry small {
  color: var(--accent);
  font-weight: 900;
}

.game-entry h2 {
  margin: 5px 0 7px;
  font-size: 1.35rem;
}

.game-entry p {
  margin: 0;
  color: var(--muted);
}

.game-entry > strong {
  color: var(--accent);
  font-size: 2rem;
  transition: transform 180ms var(--ease-out);
}

.game-entry:hover > strong {
  transform: translateX(3px);
}

.garage-value-band {
  border-color: #075f58;
  border-left-color: var(--lime);
  background: #075f58;
}

.garage-value-band p,
.garage-value-band > div > p,
.garage-value-band > p {
  color: rgba(255, 255, 255, 0.74);
}

.garage-value-number {
  color: var(--lime);
}

.rolling-number {
  display: inline-flex !important;
  align-items: baseline;
  max-width: 100%;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.detail-image-card {
  background: #083f3b;
}

.detail-image-card::after {
  height: 3px;
  background: var(--lime);
}

.detail-performance-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.performance-radar-wrap {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(180px, 1fr);
  align-items: center;
  gap: 16px;
}

#performanceRadar {
  display: block;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  margin: 0 auto;
}

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

.performance-values div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.performance-values dt {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.performance-values dd {
  margin: 0;
  color: var(--accent-strong);
  font-size: 1.08rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.compact-card-setting .vehicle-grid {
  gap: 8px;
}

.compact-card-setting .vehicle-card {
  min-height: 336px;
}

.compact-card-setting .card-body {
  gap: 9px;
  padding: 11px;
}

@keyframes nav-icon-arrive {
  0% {
    opacity: 0.72;
    transform: translateY(3px) scale(0.9);
  }

  100% {
    opacity: 1;
    transform: translateY(-1px) scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bottom-nav-item.is-active .bottom-nav-icon {
    animation: none;
  }

  .rolling-digit-track {
    transform: none !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .bottom-navigation,
  .global-settings-button {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (max-width: 760px) {
  .game-hub,
  .performance-radar-wrap {
    grid-template-columns: 1fr;
  }

  .game-entry {
    min-height: 150px;
    padding: 18px;
  }

  .garage-value-toast {
    top: max(70px, calc(env(safe-area-inset-top) + 58px));
    width: max-content;
    max-width: calc(100% - 24px);
  }
}

@media (max-width: 620px) {
  body.has-global-navigation .app-shell {
    padding-bottom: 118px;
  }

  body.has-global-navigation .site-header,
  body.has-global-navigation .detail-topbar {
    padding-right: 56px;
  }

  .global-settings-button {
    top: max(11px, env(safe-area-inset-top));
    right: max(11px, env(safe-area-inset-right));
    width: 42px;
    height: 42px;
  }

  .bottom-navigation {
    bottom: max(8px, env(safe-area-inset-bottom));
    width: calc(100% - 20px);
    min-height: 64px;
  }

  .bottom-nav-item {
    font-size: 0.7rem;
  }

  .back-to-top {
    right: 12px;
    bottom: max(84px, calc(env(safe-area-inset-bottom) + 74px));
  }

  .owned-toggle-label {
    display: none;
  }

  .performance-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-entry {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .game-entry > strong {
    display: none;
  }

  .rolling-number {
    font-size: min(10vw, 2.25rem);
  }
}

/* FH6 palette sampled from the provided tuning and filter screens. */
html {
  background: var(--bg);
}

body {
  background:
    linear-gradient(
      to bottom,
      var(--fh-teal) 0,
      var(--fh-teal) 210px,
      var(--bg) 210px,
      var(--bg) 100%
    );
  background-attachment: fixed;
}

.app-shell {
  width: min(1460px, calc(100% - 28px));
  padding-top: 14px;
}

.site-header {
  top: 8px;
  min-height: 74px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 4px solid var(--fh-lime);
  border-radius: 5px;
  color: #ffffff;
  background: rgba(24, 88, 88, 0.97);
  box-shadow: 0 12px 28px rgba(7, 31, 32, 0.22);
  backdrop-filter: blur(14px) saturate(125%);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
}

.site-header::before {
  content: none;
}

.site-header h1,
.site-header .nav-link:hover {
  color: #ffffff;
}

.site-header .eyebrow,
.detail-topbar .eyebrow {
  color: var(--fh-lime);
}

.site-header .button {
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  background: rgba(7, 31, 32, 0.34);
  box-shadow: none;
}

.site-header .button:hover {
  border-color: var(--fh-lime);
  color: var(--fh-ink);
  background: var(--fh-lime);
}

.site-header .button.primary {
  border-color: var(--fh-lime);
  color: var(--fh-ink);
  background: var(--fh-lime);
}

.status-strip {
  min-height: 42px;
  margin-top: 10px;
  border: 0;
  border-left: 5px solid var(--magenta);
  border-radius: 4px;
  color: var(--fh-ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 7px 18px rgba(7, 31, 32, 0.12);
}

.status-dot,
.status-strip.is-ok .status-dot {
  background: var(--magenta);
  box-shadow: 0 0 0 3px rgba(216, 24, 179, 0.14);
}

.status-strip.is-error {
  border-left-color: var(--danger);
}

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

.collection-progress {
  margin: 12px 0 14px;
  padding: 15px 16px 13px;
  border: 0;
  border-radius: 5px;
  color: #ffffff;
  background: var(--fh-deep);
  box-shadow: 0 10px 24px rgba(7, 31, 32, 0.18);
}

.progress-heading {
  color: rgba(255, 255, 255, 0.78);
}

.progress-heading strong {
  color: var(--fh-lime);
}

.progress-track {
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  background: #103f40;
}

.progress-fill {
  border-radius: 1px;
}

.toolbar {
  gap: 9px;
  padding: 14px;
  border: 0;
  border-radius: 5px;
  background: var(--fh-teal);
  box-shadow: 0 12px 26px rgba(7, 31, 32, 0.17);
}

.toolbar > .field > span,
.toolbar .single-source-toggle > span:last-child {
  color: #0f4541;
  font-weight: 900;
}

.field input,
.make-picker-button,
.filter-picker-button {
  border-color: rgba(7, 31, 32, 0.34);
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 0 2px 0 rgba(7, 31, 32, 0.08);
}

.field input:hover,
.make-picker-button:hover,
.filter-picker-button:hover {
  border-color: var(--fh-ink);
  background: #ffffff;
}

.field input:focus,
.make-picker-button:focus-visible,
.filter-picker-button:focus-visible,
.button:focus-visible,
.ui-button:focus-visible,
.answer-button:focus-visible {
  outline: 3px solid var(--fh-lime);
  outline-offset: 2px;
}

.make-picker-button.is-active,
.filter-picker-button.is-active {
  border-color: var(--fh-lime);
  color: #ffffff;
  background: var(--fh-ink);
  box-shadow: 0 0 0 2px var(--fh-lime);
}

.make-picker-button.is-active small,
.filter-picker-button.is-active small {
  color: rgba(255, 255, 255, 0.72);
}

.make-picker-button.is-active::after,
.filter-picker-button.is-active::after {
  border-color: var(--fh-lime);
}

.single-source-check {
  border-color: var(--fh-deep);
  border-radius: 4px;
}

.single-source-toggle input:checked + .single-source-check {
  border-color: var(--fh-ink);
  background: var(--fh-ink);
}

.list-header {
  min-height: 48px;
  margin: 18px 0 10px;
  padding: 0 14px;
  border-left: 5px solid var(--fh-lime);
  border-radius: 4px;
  color: #ffffff;
  background: var(--fh-ink);
}

.list-header span {
  color: var(--fh-lime);
  font-weight: 900;
}

.vehicle-grid {
  gap: 12px;
}

.vehicle-card {
  border-color: rgba(24, 88, 88, 0.48);
  border-radius: 5px;
  box-shadow: 0 7px 17px rgba(7, 31, 32, 0.1);
}

.vehicle-card:hover {
  border-color: var(--fh-ink);
  box-shadow: 0 0 0 3px var(--fh-lime), 0 15px 30px rgba(7, 31, 32, 0.18);
  transform: translateY(-2px);
}

.vehicle-card.is-owned {
  border-color: var(--fh-teal);
  box-shadow: 0 7px 18px rgba(24, 88, 88, 0.14);
}

.image-frame {
  background: #d8e6e3;
}

.card-body {
  border-top: 3px solid var(--fh-teal);
}

.owned-flag {
  border-radius: 3px;
  color: var(--fh-ink);
  background: var(--fh-lime);
  box-shadow: 0 5px 14px rgba(7, 31, 32, 0.18);
}

.speak-button {
  border-color: rgba(24, 88, 88, 0.26);
  border-radius: 4px;
  color: var(--fh-deep);
  background: #e2f5f1;
}

.owned-toggle input:checked + .owned-check {
  border-color: #28a956;
  background: #28a956;
}

.owned-toggle:hover .owned-check {
  border-color: #28a956;
  box-shadow: 0 0 0 4px rgba(40, 169, 86, 0.13);
}

.make-dialog {
  border: 0;
  border-radius: 5px;
  background: var(--fh-deep);
  box-shadow: 0 28px 80px rgba(7, 31, 32, 0.42);
}

.make-dialog::backdrop {
  background: rgba(7, 31, 32, 0.62);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.make-panel {
  gap: 0;
  padding: 0;
}

.make-panel-header {
  padding: 16px;
  color: var(--fh-ink);
  background: var(--fh-lime);
}

.make-panel-header p {
  color: rgba(7, 31, 32, 0.72);
}

.make-panel-header .button {
  border-color: rgba(7, 31, 32, 0.45);
  border-radius: 4px;
  color: var(--fh-ink);
  background: rgba(255, 255, 255, 0.72);
}

.make-search-field {
  padding: 14px 16px 0;
}

.make-search-field > span {
  color: #ffffff;
}

.make-list {
  gap: 5px;
  padding: 14px 16px 16px;
}

.make-option {
  min-height: 56px;
  border-color: transparent;
  border-radius: 3px;
  background: var(--fh-paper);
  box-shadow: none;
}

.make-option:hover {
  border-color: var(--fh-lime);
  background: #ffffff;
  box-shadow: 0 0 0 2px var(--fh-lime);
}

.make-option.is-active {
  border-color: var(--fh-lime);
  color: #ffffff;
  background: #080808;
  box-shadow: 0 0 0 3px var(--fh-lime);
}

.make-option.is-active .make-option-name small {
  color: rgba(255, 255, 255, 0.72);
}

.make-option-count {
  border-radius: 3px;
  color: var(--fh-ink);
  background: #d8ebe7;
}

.make-option.is-active .make-option-count {
  color: var(--fh-ink);
  background: var(--fh-lime);
}

.button,
.ui-button {
  border-radius: 5px;
}

.button.primary,
.ui-button-primary {
  border-color: var(--fh-lime);
  color: var(--fh-ink);
  background: var(--fh-lime);
  box-shadow: 0 7px 16px rgba(83, 107, 0, 0.2);
}

.button.primary:hover,
.ui-button-primary:hover {
  border-color: var(--fh-ink);
  color: #ffffff;
  background: var(--fh-ink);
}

.bottom-navigation {
  left: 0;
  bottom: 0;
  grid-template-columns: repeat(3, minmax(120px, 190px));
  justify-content: center;
  width: 100%;
  min-height: 70px;
  padding: 0 max(12px, env(safe-area-inset-right)) max(0px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  border: 0;
  border-top: 4px solid var(--fh-lime);
  border-radius: 0;
  background: rgba(24, 72, 72, 0.98);
  box-shadow: 0 -12px 30px rgba(7, 31, 32, 0.24);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  transform: none;
}

.bottom-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 66px;
  padding: 0 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 900;
}

.bottom-nav-item:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.bottom-nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
}

.bottom-nav-item.is-active {
  color: var(--fh-ink);
  background: var(--fh-lime);
}

.bottom-nav-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  font-size: 0;
}

.bottom-nav-icon svg,
.global-settings-button svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav-item.is-active .bottom-nav-icon {
  color: var(--fh-ink);
  transform: translateY(-1px);
  animation: fh-nav-focus 220ms var(--ease-out);
}

.global-settings-button {
  width: 46px;
  height: 46px;
  border: 2px solid var(--fh-lime);
  border-radius: 4px;
  color: var(--fh-lime);
  background: rgba(7, 31, 32, 0.94);
  box-shadow: 0 8px 22px rgba(7, 31, 32, 0.28);
}

.global-settings-button span {
  width: 23px;
  height: 23px;
}

.global-settings-button:hover,
.global-settings-button.is-open {
  color: var(--fh-ink);
  background: var(--fh-lime);
}

.global-settings-button:hover span,
.global-settings-button.is-open span {
  transform: none;
}

.settings-dialog {
  border: 0;
  border-top: 5px solid var(--fh-lime);
  border-radius: 5px;
}

.settings-heading p {
  color: var(--magenta);
}

.settings-option input:checked + i {
  border-color: var(--fh-teal);
  background: var(--fh-teal);
}

.game-entry {
  border: 0;
  border-radius: 5px;
  color: var(--fh-ink);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(7, 31, 32, 0.15);
}

.game-entry:first-child {
  border-top: 6px solid var(--fh-lime);
  background: var(--fh-teal);
}

.game-entry-make {
  border-top: 6px solid var(--fh-lime);
  color: #ffffff;
  background: var(--magenta);
}

.game-entry:hover {
  border-color: var(--fh-lime);
  box-shadow: 0 0 0 3px var(--fh-lime), 0 18px 34px rgba(7, 31, 32, 0.2);
}

.game-entry-icon {
  border-radius: 4px;
  color: var(--fh-ink);
  background: var(--fh-lime);
}

.game-entry-make .game-entry-icon {
  color: var(--fh-ink);
  background: #ffffff;
}

.game-entry small,
.game-entry > strong {
  color: var(--fh-deep);
}

.game-entry-make small,
.game-entry-make > strong,
.game-entry-make p {
  color: rgba(255, 255, 255, 0.82);
}

.game-entry:first-child p {
  color: rgba(7, 31, 32, 0.72);
}

.garage-value-band {
  border: 0;
  border-top: 6px solid var(--fh-lime);
  border-radius: 5px;
  background: var(--fh-deep);
  box-shadow: 0 16px 34px rgba(7, 31, 32, 0.22);
}

.garage-value-number {
  color: var(--fh-lime);
}

.stats-summary-grid .stat-card {
  position: relative;
  border: 0;
  border-radius: 5px;
  overflow: hidden;
}

.stats-summary-grid .stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--fh-teal);
}

.stats-summary-grid .stat-card:nth-child(2)::before {
  background: var(--fh-lime);
}

.stats-summary-grid .stat-card:nth-child(3)::before {
  background: var(--gold);
}

.stats-summary-grid .stat-card:nth-child(4)::before {
  background: var(--magenta);
}

.statistics-section {
  border-top: 4px solid var(--fh-deep);
}

.statistics-section-heading p {
  color: var(--magenta);
}

.stats-bar {
  border-radius: 2px;
  background: #d5e2df;
}

.stats-bar-fill {
  border-radius: 1px;
  background: var(--fh-teal);
}

.stats-bar-fill.is-autoshow {
  background: var(--fh-teal);
}

.stats-bar-fill.is-non-tradable {
  background: var(--magenta);
}

.rolling-number {
  display: inline-block !important;
  min-width: 8.2ch;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mode-switch {
  border: 0;
  border-radius: 4px;
  background: var(--fh-deep);
}

.mode-button {
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.72);
}

.mode-button:hover {
  color: var(--fh-ink);
  background: var(--fh-lime);
}

.mode-button.is-active {
  border-color: var(--fh-lime);
  color: var(--fh-ink);
  background: var(--fh-lime);
  box-shadow: none;
}

.make-question-card {
  border: 0;
  border-top: 6px solid var(--fh-lime);
  border-radius: 5px;
  color: #ffffff;
  background: var(--fh-deep);
}

.make-question-card span,
.make-question-card small {
  color: rgba(255, 255, 255, 0.72);
}

.make-question-card strong {
  color: var(--fh-lime);
}

.guess-stage {
  border: 4px solid var(--fh-deep);
  border-radius: 5px;
  background: var(--fh-deep);
}

.answer-button {
  border-color: rgba(24, 88, 88, 0.5);
  border-radius: 4px;
  box-shadow: 0 6px 15px rgba(7, 31, 32, 0.1);
}

.answer-button::before {
  border-radius: 3px;
  color: var(--fh-ink);
  background: #dcebe8;
}

.answer-button:hover:not(:disabled) {
  border-color: var(--fh-lime);
  color: #ffffff;
  background: var(--fh-ink);
  box-shadow: 0 0 0 3px var(--fh-lime);
}

.answer-button.is-correct {
  border-color: var(--fh-lime);
  color: var(--fh-ink);
  background: var(--fh-lime);
  box-shadow: 0 0 0 3px var(--fh-ink);
}

.answer-button.is-correct::before {
  border-color: var(--fh-ink);
  color: #ffffff;
  background: var(--fh-ink);
}

.answer-button.is-wrong {
  border-color: var(--danger);
  color: #ffffff;
  background: var(--danger);
}

.detail-topbar {
  margin-bottom: 10px;
  padding: 12px;
  border-bottom: 4px solid var(--fh-lime);
  border-radius: 5px;
  color: #ffffff;
  background: var(--fh-deep);
  box-shadow: 0 12px 28px rgba(7, 31, 32, 0.2);
}

.detail-title-block h1 {
  color: #ffffff;
}

.detail-topbar .ui-button:not(.ui-button-primary) {
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  background: rgba(7, 31, 32, 0.34);
  box-shadow: none;
}

.ui-panel {
  border-color: rgba(24, 88, 88, 0.35);
  border-radius: 5px;
}

.ui-panel-soft {
  border-color: rgba(24, 88, 88, 0.3);
  border-radius: 4px;
  background: #edf5f3;
}

.detail-image-card {
  border-radius: 4px;
  background: var(--fh-deep);
}

.detail-image-card::after {
  height: 4px;
  background: var(--fh-lime);
}

.detail-hero {
  border: 0;
  border-left: 6px solid var(--fh-lime);
  border-radius: 3px;
  background: var(--fh-deep);
}

.detail-heading h2 {
  color: #ffffff;
}

.ui-kicker {
  border-color: var(--fh-lime);
  border-radius: 3px;
  color: var(--fh-ink);
  background: var(--fh-lime);
}

.ui-metric,
.ui-field {
  border-radius: 4px;
}

.ui-metric {
  border-color: transparent;
  background: #dff0ed;
}

.ui-metric span,
.performance-values dd {
  color: var(--fh-deep);
}

.detail-section-heading {
  padding-bottom: 8px;
  border-bottom: 3px solid var(--fh-teal);
}

.detail-text-field input,
.detail-intro-field textarea {
  border-radius: 4px;
}

.garage-value-toast {
  border-color: var(--gold);
  border-radius: 4px;
  color: #3d2a00;
  background: #fff0b7;
}

.garage-value-toast strong {
  color: #8a5a00;
}

.back-to-top {
  border-color: var(--fh-lime);
  border-radius: 4px;
  color: var(--fh-lime);
  background: var(--fh-deep);
}

/* Large filter surfaces with hidden native scroll chrome. */
html,
body,
.make-list,
.settings-panel {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.make-list::-webkit-scrollbar,
.settings-panel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.make-dialog {
  width: 75vw;
  height: 75vh;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  box-sizing: border-box;
  overflow: hidden;
}

.make-panel {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
}

.make-panel-header,
.make-search-field {
  flex: 0 0 auto;
}

.make-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
}

/* iOS-style switches: pill track, white thumb, interruptible translation. */
.single-source-check {
  position: relative;
  display: block;
  width: 46px;
  height: 28px;
  flex: 0 0 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.28);
  box-shadow: inset 0 0 0 1px rgba(7, 31, 32, 0.12);
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 140ms var(--ease-out);
}

.single-source-check::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(7, 31, 32, 0.24);
  opacity: 1;
  transform: translateX(0);
  transition: transform 240ms cubic-bezier(0.32, 0.72, 0, 1);
}

.single-source-toggle input:checked + .single-source-check {
  border: 0;
  background: #34c759;
  box-shadow: inset 0 0 0 1px rgba(18, 112, 43, 0.08);
}

.single-source-toggle input:checked + .single-source-check::after {
  transform: translateX(18px);
}

.single-source-toggle:active .single-source-check {
  transform: scale(0.97);
}

.settings-dialog {
  width: min(460px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}

.settings-panel {
  max-height: calc(100dvh - 24px);
  overflow: auto;
  overscroll-behavior: contain;
}

.settings-option i {
  width: 51px;
  height: 31px;
  border: 0;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.28);
  box-shadow: inset 0 0 0 1px rgba(7, 31, 32, 0.1);
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 140ms var(--ease-out);
}

.settings-option i::after {
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  box-shadow: 0 2px 6px rgba(7, 31, 32, 0.24);
  transition: transform 240ms cubic-bezier(0.32, 0.72, 0, 1);
}

.settings-option input:checked + i {
  border: 0;
  background: #34c759;
  box-shadow: inset 0 0 0 1px rgba(18, 112, 43, 0.08);
}

.settings-option input:checked + i::after {
  transform: translateX(20px);
}

.settings-option:active i {
  transform: scale(0.97);
}

/* Preserve the collection page surface while keeping card spacing consistent. */
.vehicle-grid {
  gap: 8px;
}

.vehicle-card,
.vehicle-card.is-owned,
.vehicle-card.is-just-owned {
  position: relative;
  border: 4px solid #e9ecea;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: none;
  transition:
    border-color 120ms ease,
    outline-color 120ms ease,
    box-shadow 140ms ease,
    transform 140ms var(--ease-out);
}

.vehicle-card:focus-visible,
.vehicle-card:focus-within {
  z-index: 2;
  border-color: #050706;
  outline: 4px solid var(--fh-lime);
  outline-offset: 0;
  box-shadow: 0 11px 24px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

@media (hover: hover) and (pointer: fine) {
  .vehicle-card:hover {
    z-index: 2;
    border-color: #050706;
    outline: 4px solid var(--fh-lime);
    outline-offset: 0;
    box-shadow: 0 11px 24px rgba(0, 0, 0, 0.28);
    transform: translateY(-1px);
  }
}

.image-frame,
.card-body {
  background: #ffffff;
}

.car-name-copy-button {
  appearance: none;
  display: inline;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 3px;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: copy;
  transition: color 120ms ease, background-color 120ms ease;
}

.car-name-copy-button:hover {
  color: var(--fh-deep);
  background: rgba(202, 255, 2, 0.24);
}

.car-name-copy-button:focus-visible {
  outline: 3px solid var(--fh-lime);
  outline-offset: 2px;
}

.car-name-copy-button.is-copied {
  color: #167d3b;
  background: rgba(52, 199, 89, 0.14);
}

.clipboard-helper {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.hide-drivetrain-setting .vehicle-card .drivetrain-badge,
.hide-speech-setting .vehicle-card .speak-actions {
  display: none;
}

@keyframes fh-nav-focus {
  0% {
    opacity: 0.65;
    transform: translateY(3px);
  }

  100% {
    opacity: 1;
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .settings-option i,
  .settings-option i::after {
    transition-duration: 1ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header,
  .bottom-navigation,
  .global-settings-button {
    background: var(--fh-deep);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (max-width: 760px) {
  body {
    background:
      linear-gradient(
        to bottom,
        var(--fh-teal) 0,
        var(--fh-teal) 170px,
        var(--bg) 170px,
        var(--bg) 100%
      );
  }

  .toolbar {
    padding: 11px;
  }

  .make-dialog {
    width: calc(100vw - 16px);
    height: 75dvh;
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .game-entry {
    min-height: 146px;
  }
}

@media (max-width: 620px) {
  body.has-global-navigation .app-shell {
    padding-bottom: 92px;
  }

  .app-shell {
    width: min(100% - 16px, 1460px);
    padding-top: 8px;
  }

  .site-header {
    top: 5px;
    min-height: 68px;
  }

  .bottom-navigation {
    bottom: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    min-height: 64px;
    padding: 0 0 max(0px, env(safe-area-inset-bottom));
  }

  .bottom-nav-item {
    min-height: 60px;
    gap: 7px;
    padding: 0 8px;
    font-size: 0.72rem;
  }

  .bottom-nav-icon {
    width: 23px;
    height: 23px;
  }

  .global-settings-button {
    width: 42px;
    height: 42px;
  }

  .make-panel-header {
    padding: 13px;
  }

  .make-list {
    padding: 10px 12px 12px;
  }

  .garage-value-number.rolling-number {
    font-size: min(8.8vw, 2.45rem);
  }

  .detail-page,
  .detail-layout {
    gap: 10px;
  }
}

/* Horizon filter grid: luminous title rail, dense option cells, and direct focus. */
.make-dialog {
  width: 75vw;
  height: 75dvh;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  border: 0;
  border-radius: 2px;
  background: #313432;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.46);
}

.make-dialog::backdrop {
  background: rgba(3, 7, 7, 0.68);
  backdrop-filter: blur(10px) saturate(72%);
  -webkit-backdrop-filter: blur(10px) saturate(72%);
}

.make-panel-header {
  position: relative;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: center;
  padding: 12px 210px;
  color: #050706;
  background: var(--fh-lime);
  text-align: center;
}

.make-panel-header h2 {
  font-size: clamp(1.45rem, 2.2vw, 2.2rem);
  line-height: 1;
}

.make-panel-header p,
#filterDialogHint {
  display: none;
}

.make-panel-actions {
  position: absolute;
  top: 50%;
  right: 12px;
  gap: 6px;
  transform: translateY(-50%);
}

.make-panel-header .button {
  min-height: 40px;
  padding-inline: 13px;
  border: 2px solid #050706;
  border-radius: 2px;
  color: #ffffff;
  background: #050706;
  box-shadow: none;
}

.make-panel-header .button:hover {
  color: #050706;
  background: #ffffff;
}

.make-search-field {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  color: #ffffff;
  background: #313432;
}

.make-search-field > span {
  color: #ffffff;
}

.make-search-field input {
  min-height: 42px;
  border: 2px solid #747875;
  border-radius: 0;
  background: #ffffff;
}

.make-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 3px;
  padding: 4px;
  background: #313432;
}

.make-option {
  position: relative;
  justify-content: center;
  min-height: 56px;
  padding: 7px 10px;
  border: 0;
  border-radius: 0;
  color: #111412;
  background: #ffffff;
  box-shadow: none;
  text-align: center;
  transition:
    color 110ms ease,
    background-color 110ms ease,
    outline-color 110ms ease,
    transform 100ms var(--ease-out);
}

.make-option-name {
  justify-items: center;
  gap: 2px;
}

.make-option-name strong,
.make-option-name small {
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
}

.make-option-name strong {
  font-size: 0.94rem;
  line-height: 1.08;
}

.make-option-name small {
  color: #5f6662;
  font-size: 0.7rem;
  line-height: 1.05;
}

.make-option-count {
  display: none;
}

.make-option:hover {
  z-index: 1;
  border: 0;
  background: #ffffff;
  outline: 2px solid var(--fh-lime);
  outline-offset: 0;
  box-shadow: none;
}

.make-option.is-active {
  z-index: 2;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: #050706;
  outline: 4px solid var(--fh-lime);
  outline-offset: 0;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.36);
}

/* Detail metadata reads as one scan-friendly vertical specification list. */
.detail-highlights,
.detail-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  padding: 3px;
  border-left: 5px solid var(--fh-lime);
  border-radius: 2px;
  background: #2f3331;
}

.detail-highlights .ui-metric,
.detail-list .ui-field {
  display: grid;
  grid-template-columns: minmax(108px, 0.34fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 14px;
  min-height: 48px;
  padding: 11px 13px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.detail-highlights .ui-metric span,
.detail-list dt {
  margin: 0;
  color: #59615d;
  font-size: 0.78rem;
  font-weight: 900;
}

.detail-highlights .ui-metric strong,
.detail-list dd {
  color: #111412;
  font-size: 0.94rem;
  font-weight: 850;
}

.detail-highlights .performance-metric,
.detail-highlights [class*="rarity-"] {
  color: #ffffff;
}

.detail-highlights .performance-d { background: #3dbaea; }
.detail-highlights .performance-c { background: #f6bf31; }
.detail-highlights .performance-b { background: #ff6533; }
.detail-highlights .performance-a { background: #fc355a; }
.detail-highlights .performance-s1 { background: #bd5ee4; }
.detail-highlights .performance-s2 { background: #1567d6; }
.detail-highlights .performance-r { background: #d21995; }
.detail-highlights .performance-x { background: #161a1c; }
.detail-highlights .rarity-common { background: #7acb49; }
.detail-highlights .rarity-rare { background: #2dcdf9; }
.detail-highlights .rarity-epic { background: #d247ed; }
.detail-highlights .rarity-legendary { background: #fea71d; }
.detail-highlights .rarity-forza-edition {
  background: linear-gradient(to left, #3655cd, #d122bd);
}

.detail-highlights .performance-metric span,
.detail-highlights .performance-metric strong,
.detail-highlights [class*="rarity-"] span,
.detail-highlights [class*="rarity-"] strong {
  color: inherit;
}

.detail-item.is-wide {
  grid-column: auto;
}

/* A 4px focus rail exactly meets the next card without changing card dimensions. */
.vehicle-grid,
.compact-card-setting .vehicle-grid {
  gap: 4px;
}

.vehicle-card:focus-visible,
.vehicle-card:focus-within {
  transform: none;
}

@media (hover: hover) and (pointer: fine) {
  .vehicle-card:hover {
    transform: none;
  }
}

/* Horizon-style segmented navigation: white tabs, black active tab, lime rail. */
.bottom-navigation {
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(920px, calc(100% - 24px));
  min-height: 62px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: #f8f9f7;
  box-shadow:
    0 14px 34px rgba(3, 12, 11, 0.28),
    0 0 0 1px rgba(0, 0, 0, 0.2);
  transform: translateX(-50%);
  overflow: hidden;
}

.bottom-nav-indicator {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(100% / 3);
  border-bottom: 6px solid var(--fh-lime);
  background: #030504;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  transform: translate3d(var(--active-offset, 0%), 0, 0);
  transition: transform 220ms cubic-bezier(0.32, 0.72, 0, 1);
}

.bottom-nav-item {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: center;
  padding: 0 18px 5px;
  border: 0;
  border-right: 2px solid rgba(27, 31, 29, 0.58);
  border-radius: 0;
  color: #050706;
  background: transparent;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
  transition:
    color 140ms ease,
    background-color 160ms ease,
    transform 120ms var(--ease-out);
}

.bottom-nav-item:first-child {
  border-left: 0;
}

.bottom-nav-item:last-child {
  border-right: 0;
}

.bottom-nav-item:hover {
  color: #050706;
  background: rgba(0, 0, 0, 0.07);
}

.bottom-nav-item.is-active {
  color: #ffffff;
  background: transparent;
}

.bottom-nav-item.is-active:hover {
  color: #ffffff;
  background: transparent;
}

/* Reliable navigation motion; the destination begins after 30% of the timeline. */
html.fh-page-leaving .app-shell {
  opacity: 0;
  transform: translate3d(-30vw, 0, 0);
  transition:
    opacity 280ms cubic-bezier(0.32, 0.72, 0, 1),
    transform 280ms cubic-bezier(0.32, 0.72, 0, 1);
}

html.fh-page-entering .app-shell {
  opacity: 0;
  transform: translate3d(30vw, 0, 0);
}

html.fh-page-entering.fh-page-enter-ready .app-shell {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition:
    opacity 196ms cubic-bezier(0.32, 0.72, 0, 1),
    transform 196ms cubic-bezier(0.32, 0.72, 0, 1);
}

/* Bottom tabs stay mounted so filters, scroll positions, and game state survive tab switches. */
.persistent-tab-root {
  min-height: 100dvh;
}

.persistent-tab-stack {
  position: fixed;
  z-index: 45;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
}

.persistent-tab-stack.has-active-tab {
  visibility: visible;
  pointer-events: auto;
}

.persistent-tab-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--bg);
  visibility: hidden;
  pointer-events: none;
}

.persistent-tab-frame.is-active {
  visibility: visible;
  pointer-events: auto;
}

body.has-remote-tab {
  overflow: hidden;
}

body.is-embedded-tab {
  padding-bottom: 92px;
}

@media (prefers-reduced-motion: reduce) {
  html.fh-page-leaving .app-shell,
  html.fh-page-entering .app-shell,
  html.fh-page-entering.fh-page-enter-ready .app-shell {
    transform: none;
    transition: opacity 100ms ease-out;
  }
}

@media (max-width: 900px) {
  .make-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .make-panel-header {
    min-height: 68px;
    justify-content: flex-start;
    padding: 11px 174px 11px 14px;
    text-align: left;
  }
}

@media (max-width: 620px) {
  .make-dialog {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .make-panel-header {
    min-height: 62px;
    padding: 9px 142px 9px 12px;
  }

  .make-panel-header .button {
    min-height: 36px;
    padding-inline: 9px;
    font-size: 0.76rem;
  }

  .make-list {
    gap: 2px;
    padding: 3px;
  }

  .make-option {
    min-height: 50px;
    padding: 6px;
  }

  .detail-highlights .ui-metric,
  .detail-list .ui-field {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 9px;
    padding: 10px;
  }

  .bottom-navigation {
    bottom: max(8px, env(safe-area-inset-bottom));
    width: calc(100% - 12px);
    min-height: 56px;
  }

  .bottom-nav-item {
    min-height: 56px;
    padding: 0 8px 5px;
    font-size: 0.9rem;
  }
}

/* Final interaction rules: Horizon filter states, restrained settings controls, and value hints. */
.make-list {
  gap: 4px;
  padding: 4px;
}

.make-panel-header {
  justify-content: center;
  text-align: center;
}

.make-panel-header > div:first-child {
  position: absolute;
  left: 50%;
  width: min(480px, calc(100% - 170px));
  transform: translateX(-50%);
}

#filterDialog .make-panel-header > div:first-child {
  width: calc(100% - 32px);
}

.make-option,
.make-option[aria-pressed="true"],
.make-option.is-active {
  border: 0;
  border-radius: 2px;
  color: #111412;
  background: #ffffff;
  outline: 0;
  box-shadow: none;
}

.make-option[aria-pressed="true"] .make-option-name small,
.make-option.is-active .make-option-name small {
  color: #5f6662;
}

@media (hover: hover) and (pointer: fine) {
  .make-option:hover,
  .make-option[aria-pressed="true"]:hover,
  .make-option.is-active:hover {
    z-index: 3;
    border-radius: 7px;
    color: #ffffff;
    background: #050706;
    outline: 4px solid var(--fh-lime);
    outline-offset: 0;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
  }

  .make-option:hover .make-option-name small {
    color: rgba(255, 255, 255, 0.72);
  }
}

#filterDialog .make-panel-header {
  padding-inline: 16px;
}

#filterDialog .make-list {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 4px;
  padding: 5px;
}

.filter-option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  min-height: 50px;
  justify-content: stretch;
  gap: 14px;
  padding: 8px 12px;
  text-align: left;
}

.filter-option-row .make-option-name {
  justify-items: start;
  align-self: center;
}

.filter-option-row .make-option-name strong {
  width: 100%;
  text-align: left;
}

.filter-option-check {
  display: grid;
  width: 26px;
  height: 26px;
  align-self: center;
  place-items: center;
  border: 2px solid #111412;
  border-radius: 2px;
  color: #111412;
  background: #ffffff;
}

.filter-option-check svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.82);
  transition:
    opacity 120ms ease,
    transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.filter-option-check.is-checked svg {
  opacity: 1;
  transform: scale(1);
}

.settings-language {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(17, 72, 68, 0.18);
  border-radius: 7px;
  background: #ffffff;
}

.settings-language legend {
  padding: 0;
  color: #111412;
  font-size: 0.94rem;
  font-weight: 800;
}

.settings-language > small {
  color: var(--muted);
  font-size: 0.76rem;
}

.settings-segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  margin-top: 8px;
  padding: 3px;
  border-radius: 7px;
  background: #e4ece9;
}

.settings-segmented-control label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.settings-segmented-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.settings-segmented-control span {
  display: grid;
  min-height: 38px;
  place-items: center;
  padding: 6px 8px;
  border-radius: 5px;
  color: #42504b;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  transition:
    color 140ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    transform 120ms cubic-bezier(0.23, 1, 0.32, 1);
}

.settings-segmented-control input:checked + span {
  color: #ffffff;
  background: #093d39;
  box-shadow: 0 3px 9px rgba(9, 61, 57, 0.22);
}

.settings-segmented-control input:focus-visible + span {
  outline: 3px solid var(--fh-lime);
  outline-offset: 1px;
}

.settings-segmented-control label:active span {
  transform: scale(0.98);
}

.vehicle-card:focus-within:not(:focus-visible) {
  z-index: auto;
  border-color: #e9ecea;
  outline: 0;
  box-shadow: none;
  transform: none;
}

.car-name-copy-button:focus,
.car-name-copy-button:focus-visible {
  outline: 0;
  outline-offset: 0;
}

.value-label {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  gap: 2px;
}

.value-info {
  display: grid;
  width: 15px;
  height: 15px;
  margin-top: -3px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #124943;
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
  cursor: help;
}

.value-tooltip {
  position: absolute;
  z-index: 8;
  left: calc(100% + 6px);
  top: -8px;
  width: max-content;
  max-width: 140px;
  padding: 6px 8px;
  border-radius: 4px;
  color: #ffffff;
  background: #050706;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.28);
  font-size: 0.72rem;
  font-weight: 800;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-4px, 0, 0);
  transition:
    opacity 140ms ease,
    transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.value-info:hover + .value-tooltip,
.value-info:focus-visible + .value-tooltip {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.guess-stage {
  background: #ffffff;
}

.stats-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 620px) {
  #filterDialog .make-panel-header {
    padding-inline: 12px;
  }

  .filter-option-row {
    min-height: 48px;
    padding-inline: 10px;
  }

  .stats-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .filter-option-check svg,
  .settings-segmented-control span,
  .value-tooltip {
    transition-duration: 1ms;
  }
}

/* Screenshot-matched filter rail: a narrow option column directly over the blurred page. */
:is(#filterDialog, #makeDialog) {
  width: clamp(360px, 37.1vw, 714px);
  height: min(75dvh, 780px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

:is(#filterDialog, #makeDialog) .make-panel {
  background: transparent;
}

:is(#filterDialog, #makeDialog) .make-panel-header {
  width: 100%;
  min-height: 76px;
  box-sizing: border-box;
}

:is(#filterDialog, #makeDialog) .make-list {
  position: relative;
  width: calc(100% + 28px);
  margin-top: -10px;
  margin-inline: -14px;
  gap: 4px;
  padding: 14px 14px 18px;
  box-sizing: border-box;
  background: transparent;
  scroll-padding-block: 14px 18px;
  scroll-snap-type: none;
  overscroll-behavior: contain;
}

:is(#filterDialog, #makeDialog) .filter-option-row {
  width: 100%;
  min-height: 58px;
  padding-inline: 18px;
  box-sizing: border-box;
}

:is(#filterDialog, #makeDialog) .filter-option-row .make-option-name strong {
  font-size: clamp(1.05rem, 1.42vw, 1.65rem);
  line-height: 1.1;
  font-weight: 760;
}

#makeDialog .make-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#makeDialog {
  width: min(73.25vw, 1500px);
  max-width: calc(100vw - 80px);
}

#makeDialog .make-panel-header h2 {
  font-size: clamp(1.8rem, 2.4vw, 2.8rem);
  font-weight: 850;
}

#makeDialog .filter-option-row {
  position: relative;
  display: flex;
  min-height: 56px;
  justify-content: center;
  padding: 7px 40px;
}

#makeDialog .filter-option-row .make-option-name {
  width: 100%;
  justify-items: center;
}

#makeDialog .filter-option-row .make-option-name strong {
  font-family: "Arial Narrow", "Roboto Condensed", "Microsoft YaHei UI", sans-serif;
  font-size: clamp(0.9rem, 1.05vw, 1.35rem);
  line-height: 1.08;
  font-weight: 800;
  text-align: center;
}

#makeDialog .filter-option-check {
  position: absolute;
  top: 50%;
  right: 11px;
  width: 24px;
  height: 24px;
  border: 0;
  color: #111412;
  background: transparent;
  opacity: 0;
  transform: translateY(-50%);
}

#makeDialog .filter-option-check.is-checked {
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  :is(#filterDialog, #makeDialog) .make-option:hover,
  :is(#filterDialog, #makeDialog) .make-option[aria-pressed="true"]:hover,
  :is(#filterDialog, #makeDialog) .make-option.is-active:hover {
    z-index: 5;
    border-radius: 4px;
    color: #ffffff;
    background: #050706;
    outline: 5px solid var(--fh-lime);
    outline-offset: 0;
    box-shadow:
      0 0 0 11px #050706,
      0 14px 26px rgba(0, 0, 0, 0.32);
    transform: none;
  }

  :is(#filterDialog, #makeDialog) .make-option:hover .filter-option-check {
    border-color: #ffffff;
    color: #ffffff;
    background: #050706;
  }

  #makeDialog .make-option:hover,
  #makeDialog .make-option[aria-pressed="true"]:hover,
  #makeDialog .make-option.is-active:hover {
    border-radius: 3px;
    outline-width: 4px;
    box-shadow:
      0 0 0 6px #050706,
      0 12px 22px rgba(0, 0, 0, 0.28);
  }

  #makeDialog .make-option:hover .filter-option-check {
    color: #ffffff;
    background: transparent;
  }
}

.answer-button.is-previewed {
  outline: 4px solid var(--fh-lime);
  outline-offset: 2px;
}

/* Keep repeated card facts on a shared visual baseline within each grid row. */
.vehicle-card .car-title-row {
  min-height: 84px;
}

.vehicle-card .badge-row {
  min-height: 44px;
  gap: 4px;
  align-content: flex-start;
}

.vehicle-card .card-body {
  gap: 7px;
  padding: 9px 10px 10px;
}

.vehicle-card .meta-list {
  gap: 4px 8px;
  align-content: start;
}

.hide-speech-setting .vehicle-card .car-title-row {
  min-height: 48px;
}

.vehicle-card .speak-actions {
  gap: 4px;
  margin-top: 4px;
}

.image-frame .owned-flag {
  z-index: 3;
  top: 10px;
  left: 10px;
  padding: 6px 9px;
  border: 1px solid rgba(125, 86, 0, 0.34);
  border-radius: 4px;
  color: #211600;
  background: #e5b63f;
  box-shadow: 0 7px 18px rgba(72, 47, 0, 0.22);
  font-size: 0.72rem;
  font-weight: 900;
}

.image-owned-toggle {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  display: grid;
  width: 40px;
  height: 40px;
  min-height: 40px;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 7px 18px rgba(5, 7, 6, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.image-owned-toggle .owned-check {
  width: 28px;
  height: 28px;
}

.image-owned-toggle:hover .owned-check {
  border-color: #0b8f82;
  box-shadow: 0 0 0 4px rgba(11, 143, 130, 0.12);
}

/* Detail ownership lives on the image and uses the same animated check as collection cards. */
.detail-image-card::after {
  display: none;
}

.detail-owned-toggle {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 7px 18px rgba(5, 7, 6, 0.22);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.detail-owned-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.detail-owned-toggle .owned-check {
  width: 28px;
  height: 28px;
}

.detail-owned-toggle:hover .owned-check {
  border-color: #0b8f82;
  box-shadow: 0 0 0 4px rgba(11, 143, 130, 0.12);
}

.detail-owned-toggle input:checked + .owned-check {
  border-color: #0b8f82;
  background: #0b8f82;
}

.detail-owned-toggle input:checked + .owned-check path {
  stroke-dashoffset: 0;
  opacity: 1;
}

.detail-owned-toggle input:focus-visible + .owned-check {
  outline: 3px solid var(--fh-lime);
  outline-offset: 3px;
}

.detail-pill-row {
  grid-template-columns: minmax(0, 1fr);
}

/* Confirmation for removing a vehicle from future guess-game questions. */
.guess-hide-dialog {
  width: min(420px, calc(100% - 24px));
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: var(--text);
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(5, 7, 6, 0.3);
}

.guess-hide-dialog::backdrop {
  background: rgba(3, 7, 7, 0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.guess-hide-dialog[open] {
  animation: dialog-enter 180ms var(--ease-out);
}

.guess-hide-panel {
  display: grid;
  gap: 10px;
  padding: 20px;
  border-top: 7px solid var(--fh-lime);
}

.guess-hide-kicker {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.guess-hide-panel h2,
.guess-hide-panel p {
  margin: 0;
}

.guess-hide-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.guess-hide-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 620px) {
  :is(#filterDialog, #makeDialog) {
    width: calc(100vw - 40px);
    height: min(75dvh, 780px);
    max-width: calc(100vw - 40px);
  }

  #makeDialog .make-list {
    grid-template-columns: minmax(0, 1fr);
  }

  #makeDialog .filter-option-row {
    min-height: 52px;
  }

  #makeDialog .filter-option-row .make-option-name strong {
    font-size: 1rem;
  }

  .vehicle-card .car-title-row,
  .vehicle-card .badge-row {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guess-hide-dialog[open] {
    animation: none;
  }
}

/* Delayed mouse-only performance preview for collection cards. */
.performance-hover-tooltip {
  position: fixed;
  z-index: 1200;
  width: min(224px, calc(100vw - 20px));
  padding: 12px;
  border: 1px solid #050706;
  border-radius: 6px;
  color: #f7faf8;
  background: rgba(9, 18, 16, 0.97);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.32);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px) scale(0.97);
  transform-origin: top left;
  transition:
    opacity 150ms cubic-bezier(0.23, 1, 0.32, 1),
    transform 150ms cubic-bezier(0.23, 1, 0.32, 1);
}

.performance-hover-tooltip[hidden] {
  display: none;
}

.performance-hover-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.performance-hover-tooltip > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--fh-lime);
  font-size: 0.82rem;
  font-weight: 900;
}

.performance-hover-tooltip dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  margin: 0;
}

.performance-hover-tooltip dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
}

.performance-hover-tooltip dt,
.performance-hover-tooltip dd {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
}

.performance-hover-tooltip dt {
  color: #aebbb7;
}

.performance-hover-tooltip dd {
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

@media (hover: none), (pointer: coarse) {
  .performance-hover-tooltip {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .performance-hover-tooltip {
    transform: none;
    transition: opacity 120ms ease;
  }
}

/* Seasonal source details use the same quiet info-dot pattern as vehicle value. */
.seasonal-source-inline {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  gap: 2px;
}

.seasonal-source-info {
  display: grid;
  width: 15px;
  height: 15px;
  margin-top: -3px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #14735d;
  font-size: 0.66rem;
  font-weight: 950;
  line-height: 1;
  cursor: help;
}

.seasonal-source-info:focus-visible {
  outline: 2px solid #0b1713;
  outline-offset: 2px;
}

.seasonal-source-tooltip {
  position: fixed;
  z-index: 1400;
  top: 0;
  left: 0;
  width: min(380px, calc(100vw - 28px));
  padding: 14px;
  border: 1px solid #050706;
  border-radius: 6px;
  color: #f7faf8;
  background: rgba(9, 18, 16, 0.98);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.38);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-5px) scale(0.98);
  transform-origin: top left;
  transition:
    opacity 140ms cubic-bezier(0.23, 1, 0.32, 1),
    transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.seasonal-source-tooltip[data-side="left"] {
  transform-origin: top right;
}

.seasonal-source-tooltip[hidden] {
  display: none;
}

.seasonal-source-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.seasonal-source-tooltip.is-keyboard {
  transform: none;
  transition: none;
}

.seasonal-source-tooltip > strong {
  display: block;
  margin-bottom: 9px;
  color: var(--fh-lime, #b7ff00);
  font-size: 0.84rem;
  font-weight: 900;
}

.seasonal-source-tooltip ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.seasonal-source-tooltip li {
  padding: 8px 9px;
  border-left: 3px solid var(--fh-lime, #78d000);
  color: #f6faf8;
  background: #1b2722;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .seasonal-source-tooltip {
    width: min(340px, calc(100vw - 20px));
  }
}

/* Detail information below the six-dimension panel uses one quiet solid surface. */
.detail-info .detail-highlights .ui-metric,
.detail-info .detail-list .ui-field,
.detail-info .detail-name-card,
.detail-info .detail-intro-card {
  color: #111412 !important;
  background: #ffffff !important;
  background-image: none !important;
}

.detail-info .detail-highlights .ui-metric span,
.detail-info .detail-highlights .ui-metric strong {
  color: inherit !important;
}

@media (prefers-reduced-motion: reduce) {
  .seasonal-source-tooltip {
    transform: none;
    transition: opacity 120ms ease;
  }
}
