:root {
  --ink: #1f2428;
  --muted: #6b7078;
  --line: #d8dde2;
  --page: #f4f6f8;
  --panel: #ffffff;
  --panel-alt: #edf7f5;
  --green: #16856f;
  --green-dark: #0f604f;
  --red: #c74536;
  --yellow: #f3bf3f;
  --orange: #e56b35;
  --blue: #3873d8;
  --violet: #7b4db7;
  --shadow: 0 14px 34px rgba(31, 36, 40, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(22, 133, 111, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(199, 69, 54, 0.06) 1px, transparent 1px),
    var(--page);
  background-size: 36px 36px;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.wallet-gate {
  display: block;
  min-height: 100vh;
  overflow-x: hidden;
  padding: 0;
  background: #55c8bf;
}

.has-wallet .wallet-gate {
  display: none;
}

.app-shell {
  display: none;
}

.has-wallet .app-shell {
  display: block;
}

.entry-scene {
  position: relative;
  display: grid;
  min-height: 100vh;
  width: 100%;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(58, 151, 191, 0.02), rgba(17, 42, 48, 0.22)),
    url("assets/zcars-play-hero.png") center / cover no-repeat;
}

.entry-scene::before {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.08), transparent 24%);
  content: "";
  opacity: 1;
}

.entry-scene::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 28%;
  background: linear-gradient(180deg, transparent, rgba(28, 75, 82, 0.28));
  content: "";
}

.entry-header {
  position: absolute;
  top: 28px;
  right: 32px;
  left: 32px;
  z-index: 2;
  display: flex;
  justify-content: center;
}

.entry-logo {
  display: block;
  width: 210px;
  max-height: 118px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(17, 62, 78, 0.24));
}

.entry-hero {
  position: relative;
  z-index: 3;
  display: grid;
  width: min(520px, calc(100% - 44px));
  justify-items: center;
  gap: 16px;
  text-align: center;
  transform: translateY(18px);
}

.entry-hero-logo {
  display: block;
  width: min(100%, 660px);
  max-height: 300px;
  object-fit: contain;
  filter: drop-shadow(0 20px 22px rgba(17, 62, 78, 0.28));
}

.entry-hero p {
  max-width: 460px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 1.06rem;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(19, 70, 82, 0.26);
}

.entry-play-btn {
  min-width: 280px;
  min-height: 66px;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(180deg, #f8fff4, #b6f1df 46%, #48cad7 100%);
  color: #263138;
  box-shadow:
    0 16px 0 rgba(37, 45, 52, 0.34),
    0 26px 42px rgba(16, 71, 86, 0.34),
    inset 0 0 0 4px rgba(255, 255, 255, 0.52);
  cursor: pointer;
  font-size: 1.08rem;
  font-style: italic;
  font-weight: 1000;
  letter-spacing: 0.02em;
}

.entry-play-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 0 rgba(37, 45, 52, 0.34),
    0 30px 46px rgba(16, 71, 86, 0.38),
    inset 0 0 0 4px rgba(255, 255, 255, 0.62);
}

.entry-car {
  position: absolute;
  z-index: 2;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 26px 24px rgba(17, 48, 56, 0.26));
  pointer-events: none;
}

.entry-car-left {
  bottom: 8%;
  left: 6%;
  width: min(32vw, 420px);
  transform: rotate(-4deg);
}

.entry-car-right {
  right: 4%;
  bottom: 9%;
  width: min(34vw, 460px);
  transform: rotate(3deg);
}

.entry-road {
  position: absolute;
  z-index: 1;
  width: 360px;
  height: 96px;
  border-radius: 18px;
  background:
    linear-gradient(90deg, transparent 0 38%, #f5ce48 38% 43%, transparent 43% 57%, #f5ce48 57% 62%, transparent 62%),
    #2e3840;
  box-shadow: 0 18px 0 rgba(16, 42, 52, 0.18);
  opacity: 0.88;
}

.entry-road-left {
  bottom: 10%;
  left: 5%;
  transform: rotate(-12deg);
}

.entry-road-right {
  right: 5%;
  bottom: 11%;
  transform: rotate(11deg);
}

.entry-cars-showcase {
  position: relative;
  display: grid;
  min-height: 720px;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 40px;
  align-items: center;
  padding: 72px min(6vw, 88px);
  overflow: hidden;
  background: #55c8bf;
}

.showcase-rail {
  position: absolute;
  inset: 18% 5% 18% 5%;
  border: 5px solid rgba(255, 255, 255, 0.72);
  pointer-events: none;
}

.showcase-cards {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 600px;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 18px;
  align-items: center;
}

.nft-car-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 224px;
  padding: 12px;
  border: 3px solid rgba(38, 49, 56, 0.18);
  border-radius: 8px;
  background: white;
  box-shadow: 0 6px 0 rgba(28, 70, 78, 0.24);
  text-align: center;
}

.nft-car-card img {
  display: block;
  width: 100%;
  height: 138px;
  object-fit: contain;
  border-radius: 4px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0 24%, transparent 24%),
    #b9da85;
}

.nft-car-card span {
  color: #e9683d;
  font-size: 0.76rem;
  font-weight: 900;
}

.nft-car-card strong {
  color: #2ac7d4;
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 1000;
  text-shadow: 0 2px 0 rgba(31, 36, 40, 0.15);
  text-transform: uppercase;
}

.nft-car-card.card-a {
  transform: translateY(-90px);
}

.nft-car-card.card-b {
  transform: translateY(28px);
}

.nft-car-card.card-c {
  transform: translateY(-34px);
}

.nft-car-card.card-d {
  transform: translateY(98px);
}

.nft-car-card.card-e {
  transform: translateY(56px);
}

.showcase-copy {
  position: relative;
  z-index: 2;
  display: grid;
  max-width: 460px;
  gap: 18px;
  color: white;
}

.showcase-copy h2 {
  color: #f6fbff;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  font-style: italic;
  font-weight: 1000;
  letter-spacing: 0.02em;
  text-shadow:
    0 4px 0 #2c6fb7,
    0 7px 0 rgba(31, 36, 40, 0.28);
}

.showcase-copy p {
  max-width: 390px;
  color: white;
  font-size: clamp(1rem, 1.8vw, 1.42rem);
  font-weight: 900;
  line-height: 1.25;
}

.showcase-play-btn {
  width: min(100%, 300px);
  min-height: 58px;
  border-radius: 8px;
  background: #a9cf4d;
  color: white;
  box-shadow: 0 6px 0 rgba(60, 112, 68, 0.34);
  font-size: 1rem;
  font-weight: 1000;
  letter-spacing: 0.02em;
}

.entry-statistics {
  position: relative;
  display: grid;
  min-height: 620px;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 42px;
  align-items: center;
  padding: 76px min(8vw, 110px);
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 70%, rgba(255, 255, 255, 0.18), transparent 18%),
    #67cbc6;
}

.statistics-rail {
  position: absolute;
  inset: 20% 8% 22% 8%;
  border: 5px solid rgba(255, 255, 255, 0.72);
  pointer-events: none;
}

.statistics-title,
.statistics-grid {
  position: relative;
  z-index: 2;
}

.statistics-title h2 {
  color: #f6fbff;
  font-size: clamp(2.1rem, 4.3vw, 4.4rem);
  font-style: italic;
  font-weight: 1000;
  line-height: 1.18;
  letter-spacing: 0.02em;
  text-shadow:
    0 4px 0 #2c6fb7,
    0 7px 0 rgba(31, 36, 40, 0.28);
}

.statistics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 220px));
  gap: 46px 26px;
  align-items: center;
}

.entry-stat-card {
  position: relative;
  display: grid;
  min-height: 160px;
  place-items: center;
  padding: 22px 16px 18px;
  border: 3px solid #39e2ec;
  border-radius: 24px;
  background: rgba(91, 203, 198, 0.86);
  box-shadow:
    0 6px 0 rgba(38, 114, 124, 0.34),
    inset 0 0 0 4px rgba(255, 255, 255, 0.16);
  text-align: center;
}

.entry-stat-card::before {
  width: min(100%, 150px);
  height: 76px;
  border-radius: 18px 18px 18px 28px;
  background: linear-gradient(180deg, #fff0a2, #eedc79);
  box-shadow: 0 4px 0 rgba(133, 126, 67, 0.22);
  content: "";
}

.entry-stat-card::after {
  position: absolute;
  top: 86px;
  left: 50%;
  width: 34px;
  height: 24px;
  background: #eedc79;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  content: "";
}

.entry-stat-card strong {
  position: absolute;
  top: 43px;
  color: #df8900;
  font-size: clamp(2rem, 3vw, 2.55rem);
  font-weight: 1000;
}

.entry-stat-card span {
  margin-top: 12px;
  color: white;
  font-size: 1.25rem;
  font-weight: 1000;
  line-height: 1.08;
}

.entry-stat-card:nth-child(3) {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 220px);
}

.gate-panel {
  display: grid;
  width: min(980px, 100%);
  min-height: 560px;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.gate-art {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    #263138;
  background-size: 42px 42px;
}

.gate-art::before,
.gate-art::after {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 72px;
  content: "";
  background:
    linear-gradient(45deg, white 25%, transparent 25% 50%, white 50% 75%, transparent 75%),
    #111;
  background-size: 24px 24px;
}

.gate-art::before {
  left: 0;
}

.gate-art::after {
  right: 0;
}

.gate-track {
  position: absolute;
  inset: 80px 100px;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
}

.gate-track span {
  border-bottom: 3px dashed rgba(255, 255, 255, 0.22);
}

.gate-car {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 220px;
  height: 84px;
  transform: translate(-50%, -10%);
  border-radius: 18px 36px 15px 16px;
  background: var(--orange);
  box-shadow:
    0 22px 0 rgba(0, 0, 0, 0.18),
    inset 36px 0 0 rgba(255, 255, 255, 0.16);
}

.gate-car::before {
  position: absolute;
  top: -42px;
  left: 62px;
  width: 90px;
  height: 52px;
  border-radius: 38px 38px 7px 7px;
  content: "";
  background: #f5d26a;
}

.gate-car::after {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: -24px;
  height: 42px;
  border-radius: 28px;
  content: "";
  background:
    radial-gradient(circle at 28px 20px, #111 0 15px, #d8dde2 16px 23px, transparent 24px),
    radial-gradient(circle at calc(100% - 28px) 20px, #111 0 15px, #d8dde2 16px 23px, transparent 24px);
}

.gate-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 42px;
}

.gate-copy .brand-mark {
  margin-bottom: 8px;
}

.gate-logo {
  display: block;
  width: min(100%, 380px);
  max-height: 220px;
  object-fit: contain;
  object-position: left center;
  border-radius: 8px;
  filter: drop-shadow(0 14px 18px rgba(25, 38, 46, 0.16));
}

.gate-copy h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 0.95;
}

.gate-copy p {
  max-width: 330px;
  color: var(--muted);
  font-size: 1rem;
}

.gate-action {
  width: min(100%, 260px);
  margin-top: 8px;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 40px;
}

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

.brand-block,
.wallet-session,
.action-row,
.buy-row,
.odds-line {
  display: flex;
  align-items: center;
}

.brand-block {
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 -5px 0 rgba(255, 255, 255, 0.1);
}

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

h1 {
  font-size: 1.45rem;
  line-height: 1.05;
}

h2 {
  font-size: 1.4rem;
}

h3 {
  font-size: 1rem;
}

.brand-block p,
.section-head p,
.box-offer p,
.garage-empty,
.race-summary small,
.wallet-label,
.stat-card span,
.car-meta,
.market-seller,
.table-panel,
.admin-metrics {
  color: var(--muted);
}

.wallet-panel {
  position: relative;
  display: flex;
  min-width: min(100%, 560px);
  flex-direction: column;
  align-items: flex-end;
}

.wallet-session {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.wallet-balance-group {
  position: relative;
  display: flex;
  gap: 8px;
}

.day-menu-group {
  position: relative;
}

.day-pill,
.wallet-pill {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border: 1px solid rgba(54, 121, 160, 0.35);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(213, 240, 249, 0.88)),
    #e8f7fb;
  box-shadow:
    0 6px 14px rgba(31, 36, 40, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  color: #34424c;
}

.day-pill {
  gap: 7px;
  padding: 0 13px;
  cursor: pointer;
}

.day-pill:hover,
.day-pill[aria-expanded="true"] {
  border-color: rgba(22, 133, 111, 0.45);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(191, 235, 230, 0.92)),
    #dbf4f1;
}

.day-pill small {
  color: #69717a;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.day-pill strong {
  font-size: 0.95rem;
}

.wallet-pill {
  gap: 7px;
  min-width: 0;
  width: max-content;
  max-width: calc(100vw - 48px);
  flex: 0 0 auto;
  justify-content: flex-start;
  padding: 0 12px 0 8px;
  cursor: pointer;
}

.wallet-pill:hover,
.wallet-pill[aria-expanded="true"] {
  border-color: rgba(22, 133, 111, 0.45);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(191, 235, 230, 0.92)),
    #dbf4f1;
}

.token-gem {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
}

.token-gem img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.wallet-pill strong {
  flex: 0 1 auto;
  min-width: 1ch;
  max-width: none;
  color: #34424c;
  font-size: 0.94rem;
  line-height: 1;
  white-space: nowrap;
}

.pill-divider {
  width: 1px;
  height: 18px;
  flex: 0 0 auto;
  background: rgba(52, 66, 76, 0.22);
}

.wallet-label {
  max-width: 96px;
  overflow: hidden;
  color: #3e4a53;
  font-size: 0.86rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr);
  gap: 16px;
}

.referral-link-panel,
.referral-history-panel {
  border: 1px solid #d4dde2;
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.referral-link-panel > span,
.referral-metrics span {
  color: #69717a;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.referral-link-row {
  display: flex;
  gap: 8px;
  margin: 8px 0 10px;
}

.referral-link-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd6dc;
  border-radius: 7px;
  background: #f5fafb;
  padding: 11px 12px;
  color: #34424c;
  font: inherit;
}

.referral-link-row button {
  flex: 0 0 auto;
}

.referral-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.referral-metrics > div {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  justify-content: center;
  border: 1px solid #cce5e2;
  border-radius: 8px;
  background: #eef9f7;
  padding: 14px;
}

.referral-metrics strong {
  margin: 4px 0;
  color: #116d5d;
  font-size: 1.35rem;
}

.referral-metrics small,
.referral-link-panel small,
.referral-history-row small {
  color: #69717a;
}

.referral-history-panel {
  margin-top: 16px;
}

.referral-history-panel h3 {
  margin: 0 0 12px;
}

.referral-history {
  display: grid;
  gap: 8px;
}

.referral-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #e1e7ea;
  padding: 11px 2px 3px;
}

.referral-history-row:first-child {
  border-top: 0;
}

.referral-history-row strong {
  color: #16856f;
  white-space: nowrap;
}

.referral-empty {
  border: 1px dashed #cbd6dc;
  border-radius: 8px;
  padding: 24px;
  color: #69717a;
  text-align: center;
}

@media (max-width: 900px) {
  .referral-summary {
    grid-template-columns: 1fr;
  }

  .referral-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .referral-link-row,
  .referral-history-row {
    align-items: stretch;
    flex-direction: column;
  }

  .referral-metrics {
    grid-template-columns: 1fr;
  }
}

.balance-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  display: grid;
  width: 190px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  padding: 10px;
}

.day-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 11;
  display: grid;
  width: min(380px, calc(100vw - 28px));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  padding: 10px;
}

.balance-menu[hidden] {
  display: none;
}

.day-menu[hidden] {
  display: none;
}

.menu-title {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 1000;
}

.day-reward-list {
  display: grid;
  max-height: 360px;
  gap: 8px;
  overflow: auto;
}

.day-reward-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  padding: 10px;
}

.day-reward-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 14px;
  text-align: center;
}

.day-reward-row.claimed {
  opacity: 0.66;
}

.day-reward-main {
  min-width: 0;
}

.day-reward-main strong,
.day-reward-main span,
.day-reward-main small {
  display: block;
}

.day-reward-main strong {
  color: var(--ink);
  font-size: 0.94rem;
}

.day-reward-main span {
  color: var(--green-dark);
  font-weight: 1000;
}

.day-reward-main small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.claim-action {
  min-height: 38px;
  border-radius: 8px;
  background: var(--green);
  color: white;
  padding: 0 12px;
  font-weight: 1000;
}

.claim-action:disabled {
  background: #dbe3e8;
  color: var(--muted);
  opacity: 1;
}

.balance-menu button {
  min-height: 40px;
  border-radius: 8px;
  background: #e8edf0;
  color: var(--ink);
  font-weight: 900;
}

.balance-menu button:first-child {
  background: var(--green);
  color: white;
}

.balance-menu button:nth-child(3) {
  background: #f2e7e5;
  color: #8f3328;
}

.balance-menu button:disabled {
  cursor: not-allowed;
  background: #d9e0e4;
  color: #7a8790;
  opacity: 1;
}

.balance-menu small {
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 8px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: none;
}

.primary-action,
.secondary-action,
.ghost-action,
.danger-action,
.buy-row button,
.car-actions button,
.market-actions button {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 800;
}

.primary-action {
  background: var(--green);
  color: white;
}

.primary-action:hover {
  background: var(--green-dark);
}

.secondary-action {
  background: var(--ink);
  color: white;
}

.ghost-action {
  background: #e7ecef;
  color: var(--ink);
}

.danger-action {
  background: var(--red);
  color: white;
}

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

.stat-card,
.view-panel,
.box-offer,
.car-card,
.market-card,
.table-panel,
.config-panel,
.metric-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.stat-card {
  padding: 14px;
  min-height: 86px;
}

.stat-card span,
.race-summary span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.25rem;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab-button {
  min-width: 112px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-weight: 800;
}

.tab-button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.view-panel {
  display: none;
  padding: 18px;
  box-shadow: var(--shadow);
}

.view-panel.active {
  display: block;
}

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

.action-row {
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.race-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.garage-progress {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.garage-progress[hidden] {
  display: none;
}

.city-map,
.garage-map {
  display: grid;
  gap: 12px;
}

.city-map {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.city-guide {
  display: grid;
  gap: 12px;
}

.city-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(224, 248, 245, 0.94));
  box-shadow: 0 14px 28px rgba(18, 74, 89, 0.12);
  padding: 14px 16px;
}

.city-guide-head span,
.garage-cars-head span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 1000;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.city-guide-head strong,
.garage-cars-head strong {
  display: block;
  color: var(--ink);
  font-size: 1.32rem;
  line-height: 1.05;
}

.city-guide-head small {
  display: block;
  margin-top: 3px;
  color: #4b6973;
  font-size: 0.88rem;
  font-weight: 800;
}

.city-guide-summary {
  display: grid;
  min-width: 126px;
  justify-items: center;
  border-radius: 12px;
  background: #172027;
  color: white;
  padding: 10px 14px;
}

.city-guide-summary span {
  color: rgba(255, 255, 255, 0.72);
}

.city-guide-summary strong {
  color: #ffe870;
  font-size: 1.72rem;
}

.city-status-pill {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 3;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #263138;
  box-shadow: 0 4px 10px rgba(17, 48, 69, 0.16);
  padding: 5px 9px;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 1000;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.city-status-pill.selected {
  background: #ffe870;
  color: #4a3910;
}

.city-status-pill.next {
  background: #d9fff2;
  color: #0c765f;
}

.city-status-pill.locked {
  background: rgba(23, 32, 39, 0.76);
  color: white;
}

.garage-map {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  animation: expandMap 220ms ease-out;
}

.city-card,
.garage-map-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  text-align: left;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    filter 160ms ease;
}

.city-card {
  min-height: 154px;
  padding: 14px;
}

.city-card.available {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent),
    linear-gradient(180deg, #78c7b9, #3873d8);
  color: white;
}

.city-card.locked,
.garage-map-card.locked {
  filter: grayscale(1);
}

.city-card.locked {
  background: #dde2e6;
  color: #48515a;
}

.city-card.expanded,
.garage-map-card.selected,
.garage-map-card.pending {
  border-color: rgba(22, 133, 111, 0.75);
  box-shadow: 0 0 0 3px rgba(22, 133, 111, 0.14);
  transform: translateY(-2px);
}

.city-card strong,
.city-card small,
.garage-map-card strong,
.garage-map-card small {
  position: relative;
  z-index: 1;
  display: block;
}

.city-card strong {
  margin-top: 48px;
  font-size: 1.25rem;
}

.city-card small,
.garage-map-card small {
  font-size: 0.84rem;
  font-weight: 800;
}

.city-skyline {
  position: absolute;
  inset: 16px 14px auto 14px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 54px;
  opacity: 0.9;
}

.city-skyline i {
  display: block;
  width: 18%;
  border-radius: 5px 5px 0 0;
  background: currentColor;
  opacity: 0.42;
}

.city-skyline i:nth-child(1) {
  height: 34px;
}

.city-skyline i:nth-child(2) {
  height: 52px;
}

.city-skyline i:nth-child(3) {
  height: 42px;
}

.city-skyline i:nth-child(4) {
  height: 26px;
}

.map-lock {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 48px;
  height: 48px;
  background: url("assets/lock-gold.png") center / contain no-repeat;
  filter: drop-shadow(0 6px 7px rgba(18, 30, 38, 0.28));
}

.map-lock::before {
  content: none;
}

.garage-map-card.unlockable .map-lock,
.garage-map-card.unlockable .map-lock::before {
  filter: drop-shadow(0 6px 7px rgba(18, 30, 38, 0.28));
}

.garage-map-card {
  min-height: 118px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent),
    #eef2f4;
}

.garage-map-card.unlocked {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent),
    #3f4850;
  color: white;
}

.garage-door {
  display: block;
  width: min(100%, 126px);
  height: 48px;
  margin-bottom: 12px;
  border-radius: 8px 8px 3px 3px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0 2px, transparent 2px 22px),
    currentColor;
  opacity: 0.36;
}

.garage-map-card strong {
  font-size: 1rem;
}

@keyframes expandMap {
  from {
    opacity: 0;
    transform: scaleY(0.94);
    transform-origin: top;
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

.city-map {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.city-card {
  min-height: 176px;
  padding: 16px;
  border: 2px solid rgba(37, 48, 58, 0.1);
  box-shadow: 0 14px 26px rgba(31, 39, 46, 0.08);
  isolation: isolate;
}

.city-card::before {
  position: absolute;
  inset: auto -18px -46px -18px;
  height: 96px;
  border-radius: 50% 50% 0 0;
  background: rgba(33, 42, 50, 0.2);
  content: "";
  z-index: 0;
}

.city-card::after {
  position: absolute;
  right: 18px;
  bottom: 28px;
  left: 18px;
  height: 18px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(255, 255, 255, 0.8) 28px 38px),
    rgba(31, 39, 46, 0.22);
  content: "";
  z-index: 0;
}

.city-card.available {
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 226, 117, 0.92) 0 22px, transparent 23px),
    linear-gradient(180deg, #81d6c7 0%, #5baee0 52%, #3776d7 100%);
  color: white;
}

.city-card.locked {
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.7) 0 21px, transparent 22px),
    linear-gradient(180deg, #e1e1e1 0%, #cfcfcf 55%, #b9b9b9 100%);
  color: #40464c;
  filter: grayscale(1);
}

.city-card.expanded {
  border-color: rgba(22, 133, 111, 0.9);
  box-shadow:
    0 0 0 4px rgba(22, 133, 111, 0.16),
    0 18px 34px rgba(31, 39, 46, 0.16);
}

.guided-city-layout .city-card.expanded {
  border-color: #ffe870;
  box-shadow:
    0 0 0 4px rgba(255, 232, 112, 0.36),
    0 18px 34px rgba(31, 39, 46, 0.2);
}

.city-card strong {
  margin-top: 82px;
  font-size: 1.28rem;
}

.city-card small {
  margin-top: 3px;
}

.city-skyline {
  inset: 44px 16px auto 16px;
  height: 68px;
  gap: 6px;
  z-index: 1;
}

.city-skyline i {
  width: 20%;
  border-radius: 6px 6px 0 0;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.32) 0 4px, transparent 4px 12px),
    currentColor;
  opacity: 0.48;
}

.city-skyline i:nth-child(1) {
  height: 38px;
}

.city-skyline i:nth-child(2) {
  height: 58px;
}

.city-skyline i:nth-child(3) {
  height: 48px;
}

.city-skyline i:nth-child(4) {
  height: 32px;
}

.city-skyline i:nth-child(5) {
  height: 52px;
}

.city-sun,
.city-road-strip {
  position: absolute;
  pointer-events: none;
}

.city-road-strip {
  right: 20px;
  bottom: 28px;
  left: 20px;
  height: 18px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(255, 255, 255, 0.72) 28px 38px),
    rgba(31, 39, 46, 0.32);
  z-index: 1;
}

.city-zoom {
  overflow: hidden;
  border: 1px solid rgba(74, 91, 103, 0.18);
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 36px rgba(31, 39, 46, 0.1);
  animation: cityZoomIn 260ms ease-out;
}

.city-zoom-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(74, 91, 103, 0.16);
}

.city-zoom-head span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.city-zoom-head strong {
  display: block;
  margin-top: 2px;
  font-size: 1.28rem;
}

.city-zoom-title small {
  display: block;
  margin-top: 4px;
  max-width: 360px;
  color: #52616a;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.25;
}

.city-zoom-head > small {
  padding: 7px 10px;
  border-radius: 999px;
  background: #eaf8f4;
  color: #126a5c;
  font-weight: 900;
}

.global-buff-badge {
  display: grid;
  min-width: 260px;
  justify-items: center;
  gap: 2px;
  margin-right: 240px;
  border: 2px solid rgba(250, 205, 59, 0.92);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.84), transparent 42%),
    linear-gradient(180deg, #fff3a8, #f6c739);
  color: #172027;
  box-shadow:
    0 14px 28px rgba(58, 64, 18, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  padding: 11px 18px;
  text-align: center;
}

.global-buff-badge span {
  color: #544313;
  font-size: 0.72rem;
  font-weight: 1000;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.global-buff-badge strong {
  margin: 0;
  color: #0d6c59;
  font-size: 2.24rem;
  font-weight: 1000;
  line-height: 0.98;
  text-shadow:
    0 2px 0 rgba(255, 255, 255, 0.72),
    0 5px 12px rgba(10, 80, 64, 0.18);
}

.global-buff-badge small {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #4d4318;
  font-size: 0.74rem;
  font-weight: 900;
}

.global-buff-badge.active {
  border-color: rgba(255, 225, 82, 0.96);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.9), transparent 40%),
    linear-gradient(180deg, #fff38f, #f5bd24 58%, #e9951e);
  box-shadow:
    0 18px 36px rgba(92, 63, 8, 0.3),
    0 0 0 5px rgba(255, 231, 70, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.global-buff-badge.active strong {
  color: #0c765f;
}

.run-all-city-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  min-width: 270px;
  padding: 14px 26px;
  border: 2px solid rgba(255, 255, 255, 0.76);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(180deg, #1e2e39, #0f171d);
  color: white;
  box-shadow:
    0 16px 30px rgba(20, 31, 38, 0.34),
    0 0 0 5px rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-weight: 900;
  text-align: center;
  transform: translate(-50%, -50%);
}

.run-all-city-btn span {
  color: inherit;
  font-size: 1.12rem;
  letter-spacing: 0;
  text-transform: none;
}

.run-all-city-btn small {
  padding: 0;
  background: transparent;
  color: #ffe870;
  font-size: 0.78rem;
  line-height: 1.2;
}

.run-all-city-btn:hover:not(:disabled) {
  transform: translate(-50%, calc(-50% - 1px));
  box-shadow:
    0 20px 34px rgba(20, 31, 38, 0.38),
    0 0 0 6px rgba(255, 231, 70, 0.14);
}

.run-all-city-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}

.city-zoom-scene {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 18%, rgba(255, 217, 87, 0.92) 0 34px, transparent 35px),
    linear-gradient(180deg, #8ed9c9 0%, #69b9df 42%, #8fd285 43%, #67b16d 100%);
}

.city-zoom-scene::before {
  position: absolute;
  inset: auto -60px -120px -60px;
  height: 236px;
  border-radius: 50% 50% 0 0;
  background: rgba(71, 137, 84, 0.78);
  content: "";
}

.zoom-skyline {
  position: absolute;
  top: 36px;
  left: 38px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  width: min(52%, 520px);
  height: 116px;
  color: white;
}

.zoom-skyline i {
  display: block;
  flex: 1;
  border-radius: 8px 8px 0 0;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.24) 0 6px, transparent 6px 17px),
    rgba(255, 255, 255, 0.52);
  box-shadow: 0 10px 20px rgba(33, 42, 50, 0.08);
}

.zoom-skyline i:nth-child(1) {
  height: 72px;
}

.zoom-skyline i:nth-child(2) {
  height: 104px;
}

.zoom-skyline i:nth-child(3) {
  height: 84px;
}

.zoom-skyline i:nth-child(4) {
  height: 62px;
}

.zoom-skyline i:nth-child(5) {
  height: 96px;
}

.zoom-road {
  position: absolute;
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(255, 255, 255, 0.72) 38px 52px),
    #263139;
  box-shadow: 0 14px 20px rgba(31, 39, 46, 0.2);
}

.zoom-road-main {
  right: -70px;
  bottom: 94px;
  left: -70px;
  height: 54px;
  transform: rotate(-4deg);
}

.zoom-road-side {
  top: 86px;
  right: 248px;
  width: 52px;
  height: 300px;
  transform: rotate(24deg);
  background:
    repeating-linear-gradient(180deg, transparent 0 34px, rgba(255, 255, 255, 0.72) 34px 47px),
    #263139;
}

.zoom-park {
  position: absolute;
  right: 40px;
  bottom: 28px;
  width: 180px;
  height: 94px;
  border-radius: 48% 52% 42% 58%;
  background:
    radial-gradient(circle at 24% 42%, rgba(255, 255, 255, 0.25) 0 12px, transparent 13px),
    #53a464;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.1);
}

.garage-plots {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.garage-plot {
  position: absolute;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 220px;
  min-height: 94px;
  padding: 12px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(232, 247, 243, 0.92));
  color: var(--ink);
  box-shadow: 0 16px 28px rgba(31, 39, 46, 0.22);
  text-align: left;
  transform: translateZ(0);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    filter 160ms ease;
}

.garage-plot:hover,
.garage-plot.selected,
.garage-plot.pending {
  border-color: #19a884;
  box-shadow:
    0 0 0 4px rgba(25, 168, 132, 0.2),
    0 18px 32px rgba(31, 39, 46, 0.24);
  transform: translateY(-3px);
}

.garage-plot.locked {
  filter: grayscale(1);
}

.garage-plot.unlockable {
  filter: none;
  border-color: #19a884;
}

.garage-plot.plot-1 {
  left: 74px;
  bottom: 38px;
}

.garage-plot.plot-2 {
  left: 42%;
  top: 124px;
}

.garage-plot.plot-3 {
  right: 68px;
  bottom: 132px;
}

.garage-building {
  position: relative;
  display: block;
  width: 78px;
  height: 54px;
  border-radius: 8px 8px 3px 3px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 16px),
    #4f5b64;
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.14);
}

.garage-building::before {
  position: absolute;
  left: 12px;
  top: -20px;
  width: 48px;
  height: 24px;
  border-radius: 8px 8px 0 0;
  background: #66737d;
  content: "";
}

.garage-building::after {
  position: absolute;
  right: 10px;
  bottom: 8px;
  left: 10px;
  height: 18px;
  border-radius: 3px 3px 0 0;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0 2px, transparent 2px 12px),
    #2f363c;
  content: "";
}

.garage-building i {
  position: absolute;
  right: 8px;
  top: 10px;
  width: 16px;
  height: 9px;
  border-radius: 3px;
  background: #ffd454;
}

.garage-plot.unlocked .garage-building {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 16px),
    #19766a;
}

.garage-plot.unlockable .garage-building {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 16px),
    #e17339;
}

.garage-plot-copy {
  min-width: 0;
}

.garage-plot-copy strong,
.garage-plot-copy small {
  display: block;
}

.garage-plot-copy strong {
  font-size: 1rem;
}

.garage-plot-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.garage-plot-copy .garage-plot-state {
  margin-top: 1px;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.garage-plot .map-lock {
  top: 6px;
  right: 8px;
  width: 40px;
  height: 40px;
}

.garage-plot.unlockable .map-lock,
.garage-plot.unlockable .map-lock::before {
  filter: drop-shadow(0 6px 7px rgba(18, 30, 38, 0.28));
}

.garage-unlock-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 2px solid rgba(25, 168, 132, 0.35);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(234, 248, 244, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 16px 30px rgba(31, 39, 46, 0.1);
}

.garage-unlock-icon {
  position: relative;
  display: block;
  width: 74px;
  height: 58px;
  border-radius: 8px 8px 4px 4px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 14px),
    #e17339;
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.14);
}

.garage-unlock-icon::before {
  position: absolute;
  left: 13px;
  top: -18px;
  width: 46px;
  height: 23px;
  border-radius: 8px 8px 0 0;
  background: #f1995f;
  content: "";
}

.garage-unlock-icon span {
  position: absolute;
  right: 9px;
  bottom: 10px;
  left: 9px;
  height: 20px;
  border-radius: 4px 4px 0 0;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 2px, transparent 2px 12px),
    #273039;
}

.garage-unlock-panel span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.garage-unlock-panel strong {
  display: block;
  margin-top: 3px;
  font-size: 1.25rem;
}

.garage-unlock-panel small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.garage-unlock-action {
  display: grid;
  min-width: 194px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #172026;
  color: white;
  text-align: center;
  box-shadow: 0 12px 22px rgba(23, 32, 38, 0.24);
}

.garage-unlock-action span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
}

.garage-unlock-action strong {
  margin-top: 2px;
  color: white;
  font-size: 1rem;
}

.unlock-modal {
  position: fixed;
  inset: 0;
  z-index: 34;
  display: grid;
  place-items: center;
  padding: 18px;
}

.unlock-modal[hidden] {
  display: none;
}

.unlock-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 24, 0.72);
  backdrop-filter: blur(3px);
}

.unlock-dialog {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(420px, 100%);
  padding: 28px 22px 22px;
  border: 1px solid rgba(124, 219, 201, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(235, 250, 247, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  text-align: center;
  animation: unlockPop 160ms ease-out;
}

.unlock-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(23, 32, 38, 0.08);
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
}

.unlock-close:hover {
  background: rgba(23, 32, 38, 0.14);
}

.unlock-dialog-image {
  display: block;
  width: min(270px, 82%);
  max-height: 152px;
  margin: -6px 0 12px;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(25, 38, 46, 0.18));
}

.unlock-dialog-meta {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.unlock-dialog h2 {
  margin-top: 8px;
  font-size: 1.45rem;
}

.unlock-dialog p {
  margin-top: 8px;
  color: var(--muted);
}

.unlock-confirm {
  display: grid;
  width: 100%;
  margin-top: 20px;
  padding: 13px 18px;
  border-radius: 8px;
  background: #172026;
  color: white;
  text-align: center;
  box-shadow: 0 14px 24px rgba(23, 32, 38, 0.25);
}

.unlock-confirm span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.unlock-confirm strong {
  margin-top: 2px;
  color: white;
  font-size: 1.08rem;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  padding: 18px;
}

.confirm-modal[hidden] {
  display: none;
}

.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 24, 0.74);
  backdrop-filter: blur(3px);
}

.confirm-dialog {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(430px, 100%);
  padding: 30px 22px 22px;
  border: 1px solid rgba(124, 219, 201, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(235, 250, 247, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  text-align: center;
  animation: unlockPop 160ms ease-out;
}

.confirm-kicker {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.confirm-dialog h2 {
  margin-top: 8px;
  max-width: 330px;
  font-size: 1.45rem;
}

.confirm-dialog p {
  margin-top: 10px;
  color: var(--muted);
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
  width: 100%;
  margin-top: 20px;
}

.confirm-cancel,
.confirm-primary {
  min-height: 56px;
  border-radius: 8px;
  font-weight: 900;
}

.confirm-cancel {
  background: #e8edf0;
  color: var(--ink);
}

.confirm-primary {
  display: grid;
  place-items: center;
  background: #172026;
  color: white;
  box-shadow: 0 14px 24px rgba(23, 32, 38, 0.25);
}

.confirm-primary span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.confirm-primary strong {
  color: white;
  font-size: 1.08rem;
}

.reward-modal {
  position: fixed;
  inset: 0;
  z-index: 37;
  display: grid;
  place-items: center;
  padding: 18px;
}

.reward-modal[hidden] {
  display: none;
}

.reward-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 14, 20, 0.76);
  backdrop-filter: blur(5px);
}

.reward-dialog {
  position: relative;
  display: grid;
  width: min(620px, 100%);
  max-height: calc(100vh - 28px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 12px;
  background:
    radial-gradient(circle at 72% 0%, rgba(25, 168, 132, 0.16), transparent 34%),
    linear-gradient(180deg, #ffffff, #eef8f5);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  padding: 18px;
  animation: unlockPop 170ms ease-out;
}

.reward-modal-head {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding-right: 44px;
}

.reward-modal-car {
  display: grid;
  min-height: 88px;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 72%, rgba(255, 255, 255, 0.58), transparent 40%),
    var(--rarity-color);
}

.reward-modal-car .car-sprite {
  width: min(92%, 132px);
  max-height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 14px 12px rgba(0, 0, 0, 0.24));
}

.reward-modal-head span {
  display: block;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 1000;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.reward-modal-head h2 {
  margin-top: 2px;
  font-size: 1.55rem;
}

.reward-modal-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.reward-modal-body {
  min-height: 180px;
  margin-top: 16px;
  overflow: hidden;
}

.reward-modal-list {
  max-height: min(460px, calc(100vh - 210px));
  padding-right: 4px;
}

.reward-modal .day-reward-row {
  grid-template-columns: minmax(0, 1fr) 104px;
  border-color: rgba(31, 36, 40, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 251, 252, 0.98));
  padding: 13px;
}

.reward-modal .day-reward-main strong {
  font-size: 1rem;
}

.reward-modal .day-reward-main span {
  margin-top: 5px;
  font-size: 1.05rem;
}

.reward-modal .day-reward-main small {
  margin-top: 3px;
}

.reward-nerf-timer {
  color: #8f3328 !important;
}

.reward-modal .claim-action {
  min-height: 44px;
}

.box-reveal-modal {
  position: fixed;
  inset: 0;
  z-index: 36;
  display: grid;
  place-items: center;
  padding: 18px;
}

.box-reveal-modal[hidden] {
  display: none;
}

.box-reveal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 24, 0.74);
  backdrop-filter: blur(3px);
}

.box-reveal-dialog {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(470px, 100%);
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--rarity-color) 22%, white), transparent 34%),
    linear-gradient(180deg, #ffffff, #edf8f6);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  padding: 18px;
  text-align: center;
  animation: unlockPop 170ms ease-out;
}

.box-reveal-counter {
  justify-self: start;
  border-radius: 999px;
  background: rgba(31, 36, 40, 0.08);
  color: var(--muted);
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.box-reveal-visual {
  display: grid;
  width: 100%;
  min-height: 210px;
  margin-top: 8px;
  place-items: center;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 72%, rgba(255, 255, 255, 0.7), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent),
    var(--rarity-color);
  overflow: hidden;
}

.box-reveal-video {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
}

.box-reveal-visual .car-sprite {
  width: min(90%, 330px);
  max-height: 190px;
  object-fit: contain;
  filter:
    drop-shadow(0 22px 18px rgba(0, 0, 0, 0.3))
    drop-shadow(0 0 16px var(--car-accent));
}

.box-reveal-dialog.opening {
  background: #111820;
}

.box-reveal-dialog.opening .box-reveal-visual {
  background: #111820;
}

.box-reveal-dialog.opening .box-reveal-video {
  display: block;
}

.box-reveal-dialog.opening .car-sprite,
.box-reveal-dialog.opening .rarity-pill,
.box-reveal-dialog.opening h2,
.box-reveal-dialog.opening .box-reveal-stats,
.box-reveal-dialog.opening .box-reveal-next {
  display: none;
}

.box-reveal-dialog.revealed .car-sprite {
  animation: revealCarPop 220ms ease-out both;
}

.box-reveal-dialog .rarity-pill {
  margin-top: 14px;
}

.box-reveal-dialog h2 {
  margin-top: 8px;
  font-size: 1.55rem;
}

.box-reveal-stats {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.box-reveal-stats div {
  min-height: 62px;
  border: 1px solid rgba(31, 36, 40, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 9px;
  text-align: left;
}

.box-reveal-stats span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.box-reveal-stats strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 1rem;
}

.box-reveal-next {
  width: 100%;
  min-height: 44px;
  margin-top: 16px;
  border-radius: 8px;
  background: #172026;
  color: white;
  font-weight: 900;
}

@keyframes unlockPop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes revealCarPop {
  from {
    opacity: 0;
    transform: scale(0.84) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes cityZoomIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.track-panel {
  position: relative;
  min-height: 140px;
  overflow: hidden;
  border-radius: 8px;
  background: #2d3439;
}

.track-panel::before,
.track-panel::after {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 54px;
  content: "";
  background:
    linear-gradient(45deg, white 25%, transparent 25% 50%, white 50% 75%, transparent 75%),
    #111;
  background-size: 22px 22px;
}

.track-panel::before {
  left: 0;
}

.track-panel::after {
  right: 0;
}

.track-lanes {
  position: absolute;
  inset: 18px 70px;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
}

.track-lanes span {
  border-bottom: 2px dashed rgba(255, 255, 255, 0.28);
}

.track-car {
  position: absolute;
  left: 44%;
  bottom: 32px;
  width: 96px;
  height: 42px;
  border-radius: 10px 18px 9px 9px;
  background: var(--orange);
  box-shadow:
    0 12px 0 rgba(0, 0, 0, 0.16),
    inset 16px 0 0 rgba(255, 255, 255, 0.2);
}

.track-car::before {
  position: absolute;
  top: -20px;
  left: 26px;
  width: 42px;
  height: 24px;
  border-radius: 18px 18px 4px 4px;
  content: "";
  background: #f5d26a;
}

.track-car::after {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -12px;
  height: 22px;
  border-radius: 20px;
  content: "";
  background:
    radial-gradient(circle at 14px 11px, #111 0 8px, #d8dde2 9px 12px, transparent 13px),
    radial-gradient(circle at calc(100% - 14px) 11px, #111 0 8px, #d8dde2 9px 12px, transparent 13px);
}

.race-summary {
  display: flex;
  min-height: 140px;
  flex-direction: column;
  justify-content: center;
  border-radius: 8px;
  background: var(--panel-alt);
  padding: 18px;
}

.race-summary strong {
  font-size: 2.2rem;
  line-height: 1.1;
}

.car-grid,
.box-grid,
.market-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.market-grid {
  display: grid;
  gap: 18px;
}

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

.car-card,
.market-card,
.box-offer {
  overflow: hidden;
}

.car-card {
  min-height: 310px;
}

.car-visual {
  display: grid;
  min-height: 150px;
  place-items: center;
  background:
    radial-gradient(circle at 50% 64%, rgba(255, 255, 255, 0.34), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent),
    var(--rarity-color);
}

.car-visual .car-sprite {
  width: min(88%, 284px);
  height: auto;
  max-height: 142px;
  object-fit: contain;
  filter:
    drop-shadow(0 18px 16px rgba(0, 0, 0, 0.28))
    drop-shadow(0 0 10px var(--car-accent));
}

.car-body {
  padding: 14px;
}

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

.rarity-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  background: rgba(31, 36, 40, 0.08);
  padding: 0 10px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.car-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0 12px;
  font-size: 0.9rem;
}

.car-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6eaed;
}

.car-meter span {
  display: block;
  width: var(--fuel-width);
  height: 100%;
  background: var(--rarity-color);
}

.car-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.car-actions .reward-toggle {
  grid-column: 1 / -1;
  background: #edf7f5;
  color: var(--green-dark);
}

.car-actions button,
.market-actions button {
  background: #e8edf0;
  color: var(--ink);
}

.car-actions button:first-child,
.market-actions button:first-child {
  background: var(--ink);
  color: white;
}

.buy-row button {
  background: var(--ink);
  color: white;
}

.list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
}

.car-reward-panel {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 10px;
}

.listed-note {
  margin-top: 10px;
  border-radius: 8px;
  background: #edf7f5;
  color: var(--green-dark);
  padding: 10px;
  font-size: 0.86rem;
  font-weight: 900;
  text-align: center;
}

.list-row input,
.config-panel input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0 10px;
  outline: none;
}

.list-row input:focus,
.config-panel input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 133, 111, 0.12);
}

.garage-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 28px;
  text-align: center;
}

.box-offer {
  display: grid;
  grid-template-rows: auto auto minmax(48px, auto) auto;
  padding: 16px;
}

.box-art {
  display: grid;
  height: clamp(190px, 24vw, 260px);
  place-items: center;
  border-radius: 8px;
  margin-bottom: 14px;
  background:
    radial-gradient(circle at 52% 62%, rgba(255, 255, 255, 0.88), transparent 36%),
    linear-gradient(180deg, #f7fbfd, #e7eef2);
  overflow: hidden;
}

.box-art.premium {
  background:
    radial-gradient(circle at 52% 62%, rgba(255, 255, 255, 0.88), transparent 36%),
    linear-gradient(180deg, #fff7df, #ead596);
}

.box-art img {
  display: block;
  width: min(90%, 300px);
  height: min(94%, 248px);
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(23, 32, 38, 0.2));
}

.box-title-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.box-title-row h3 {
  margin: 0;
}

.box-offer > p {
  min-height: 42px;
  margin: 6px 0 0;
}

.box-info {
  position: relative;
  z-index: 3;
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(31, 36, 40, 0.12);
  border-radius: 999px;
  background: #edf2f5;
  color: var(--ink);
  cursor: help;
  font-size: 0.95rem;
  font-weight: 900;
}

.box-info:hover,
.box-info:focus-visible {
  background: #dfe8ed;
  outline: none;
}

.premium-info {
  background: #fbf0c6;
  border-color: rgba(176, 126, 20, 0.28);
  color: #6c4a07;
}

.premium-info:hover,
.premium-info:focus-visible {
  background: #f4df98;
}

.box-odds-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  display: grid;
  width: 184px;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(31, 36, 40, 0.12);
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 36px rgba(20, 28, 34, 0.22);
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.box-odds-popover::after {
  position: absolute;
  right: 10px;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: white;
  border-right: 1px solid rgba(31, 36, 40, 0.12);
  border-bottom: 1px solid rgba(31, 36, 40, 0.12);
  content: "";
  transform: rotate(45deg);
}

.box-info:hover .box-odds-popover,
.box-info:focus-visible .box-odds-popover,
.box-info:focus-within .box-odds-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.box-odds-popover strong {
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.box-odds-popover span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.86rem;
}

.box-odds-popover b,
.box-odds-popover em {
  font-style: normal;
}

.buy-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.buy-row button {
  display: grid;
  min-width: 0;
  min-height: 56px;
  place-items: center;
  align-content: center;
  gap: 2px;
  padding: 8px 10px;
  line-height: 1.05;
  text-align: center;
}

.buy-row button span,
.buy-row button strong {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.buy-row button strong {
  color: inherit;
  font-size: 0.94rem;
}

.market-card {
  padding: 14px;
}

.market-section {
  display: grid;
  gap: 10px;
}

.market-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.market-section-head strong {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 1000;
}

.market-section-head small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.market-card.own-listing {
  border-color: rgba(22, 133, 111, 0.34);
  box-shadow: 0 0 0 3px rgba(22, 133, 111, 0.08);
}

.market-price {
  margin: 10px 0;
  font-size: 1.3rem;
  font-weight: 900;
}

.market-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sell-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.sell-panel[hidden] {
  display: none;
}

.sell-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sell-panel-head strong {
  font-size: 0.95rem;
}

.sell-panel-head button {
  min-height: 34px;
  border-radius: 8px;
  background: #e8edf0;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 900;
}

.sell-car-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.sell-car-card {
  overflow: hidden;
  border: 1px solid #cfd7dd;
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 18px rgba(31, 36, 40, 0.06);
}

.sell-car-card.selected {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 133, 111, 0.12);
}

.sell-car-pick {
  display: grid;
  width: 100%;
  gap: 8px;
  background: white;
  color: var(--ink);
  padding: 8px;
  text-align: left;
}

.sell-car-mini {
  display: grid;
  height: 88px;
  place-items: center;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent),
    var(--rarity-color);
}

.sell-car-mini .car-sprite {
  width: min(92%, 154px);
  height: auto;
  max-height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 10px 10px rgba(31, 36, 40, 0.22));
}

.sell-car-info {
  min-width: 0;
}

.sell-car-info strong,
.sell-car-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sell-car-info strong {
  font-size: 0.92rem;
}

.sell-car-info small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.sell-price-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 8px;
}

.sell-price-row input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}

.sell-price-row button {
  min-height: 40px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  padding: 0 14px;
  font-weight: 900;
}

.table-panel {
  min-height: 180px;
  padding: 14px;
}

.table-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

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

.table-row strong {
  color: var(--ink);
}

.admin-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 12px;
}

.config-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.config-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

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

.metric-tile {
  padding: 14px;
}

.metric-tile span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-tile strong {
  color: var(--ink);
  font-size: 1.35rem;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  width: min(360px, calc(100% - 36px));
  transform: translateY(20px);
  border-radius: 8px;
  background: var(--ink);
  color: white;
  opacity: 0;
  padding: 13px 14px;
  font-weight: 800;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.race-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
}

.race-modal[hidden] {
  display: none;
}

.race-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 36, 40, 0.62);
  backdrop-filter: blur(2px);
}

.race-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto auto auto;
  width: min(900px, 100%);
  max-height: calc(100vh - 16px);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
  padding: 12px;
}

.race-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 4px 8px;
}

.race-header span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.race-header h2 {
  margin-top: 2px;
  font-size: 1.15rem;
}

.race-header strong {
  display: grid;
  min-width: 58px;
  min-height: 38px;
  place-items: center;
  border-radius: 8px;
  background: #edf7f5;
  color: var(--green-dark);
  font-size: 1.2rem;
}

.race-runner {
  position: relative;
  height: 96px;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.86) 0 24px, transparent 25px),
    linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
  margin-bottom: 8px;
}

.race-runner-stage {
  position: relative;
  width: min(380px, 100%);
  height: 100%;
  margin: 0 auto;
}

.race-road-slab {
  position: absolute;
  left: 50%;
  top: 56%;
  width: 270px;
  height: 82px;
  overflow: hidden;
  border-radius: 3px;
  background: #52565a;
  box-shadow:
    0 15px 0 #2f3336,
    0 24px 20px rgba(31, 36, 40, 0.18);
  transform: translate(-50%, -50%) rotate(-14deg) skewX(-10deg);
}

.race-road-slab::before {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 22px,
      #f6d74a 22px 38px,
      transparent 38px 72px
    ),
    linear-gradient(180deg, transparent 45%, rgba(255, 255, 255, 0.14) 45% 55%, transparent 55%);
  background-position: 0 0, 0 0;
  background-size: 72px 100%, 100% 100%;
  content: "";
  animation: raceRoadMove 520ms linear infinite;
}

.race-runner-car {
  position: absolute;
  left: 50%;
  top: 47%;
  z-index: 2;
  width: 150px;
  height: auto;
  filter: drop-shadow(0 18px 15px rgba(31, 36, 40, 0.24));
  transform: translate(-50%, -50%);
  animation: raceCarIdle 520ms ease-in-out infinite alternate;
}

.race-runner-tree {
  position: absolute;
  z-index: 1;
  width: 34px;
  height: 58px;
  filter: drop-shadow(0 8px 5px rgba(31, 36, 40, 0.14));
}

.race-runner-tree::before,
.race-runner-tree::after {
  position: absolute;
  content: "";
}

.race-runner-tree::before {
  left: 6px;
  bottom: 0;
  width: 9px;
  height: 20px;
  border-radius: 4px;
  background: #8f7a42;
}

.race-runner-tree::after {
  left: 0;
  bottom: 12px;
  width: 28px;
  height: 44px;
  border-radius: 70% 70% 60% 60%;
  background: linear-gradient(180deg, #9fb85a, #6f943f);
  transform: skewX(-10deg);
}

.race-runner-tree.tree-left {
  left: 30px;
  top: 12px;
}

.race-runner-tree.tree-right {
  right: 36px;
  bottom: 6px;
  transform: scale(0.72);
}

.race-modal.finished .race-road-slab::before,
.race-modal.finished .race-runner-car {
  animation-play-state: paused;
}

.race-progress {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf0;
  margin-bottom: 8px;
}

.race-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.2) 0 8px,
      transparent 8px 16px
    ),
    var(--green);
  transition: width 240ms linear;
}

.race-table-wrap {
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

.race-table {
  display: grid;
  gap: 5px;
}

.race-row {
  display: grid;
  grid-template-columns: 54px 104px minmax(120px, 1fr) repeat(3, 76px);
  align-items: center;
  gap: 10px;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 8px 12px;
  animation: raceRowShift 420ms ease;
}

.race-row.player {
  position: relative;
  border-color: rgba(22, 133, 111, 0.72);
  background:
    linear-gradient(90deg, rgba(22, 133, 111, 0.12), rgba(255, 255, 255, 0.75)),
    #f3fbfa;
  box-shadow:
    inset 4px 0 0 var(--green),
    0 0 0 2px rgba(22, 133, 111, 0.08);
}

.race-rank {
  display: inline-grid;
  width: 42px;
  min-height: 28px;
  place-items: center;
  border-radius: 7px;
  background: #6f7a83;
  color: white;
  font-size: 0.82rem;
  font-weight: 1000;
}

.race-row:nth-child(1) .race-rank {
  background: #d94b76;
}

.race-row:nth-child(2) .race-rank {
  background: #f3bf3f;
}

.race-row:nth-child(3) .race-rank {
  background: #3873d8;
}

.race-mini-car {
  display: grid;
  place-items: center;
}

.race-mini-car .car-sprite {
  width: 86px;
  height: auto;
  filter: drop-shadow(0 8px 9px rgba(31, 36, 40, 0.18));
}

.race-row.player .race-mini-car .car-sprite {
  width: 96px;
  filter:
    drop-shadow(0 10px 12px rgba(22, 133, 111, 0.24))
    drop-shadow(0 0 8px var(--race-color));
}

.race-name {
  min-width: 0;
}

.race-name strong {
  display: block;
  overflow: hidden;
  color: var(--race-color);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.race-name small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.race-row.player .race-name small {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  background: var(--green);
  color: white;
  padding: 0 9px;
  font-size: 0.72rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.race-stat {
  display: grid;
  gap: 4px;
  color: var(--ink);
}

.race-stat span {
  font-weight: 1000;
}

.race-stat small {
  color: var(--muted);
  font-size: 0.9rem;
}

.race-result {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(22, 133, 111, 0.28);
  border-radius: 8px;
  background: #edf7f5;
  padding: 10px;
  text-align: center;
}

.race-result[hidden] {
  display: none;
}

.race-result span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.race-result strong {
  color: var(--green-dark);
  font-size: 1.45rem;
}

.race-result small {
  color: var(--ink);
  font-weight: 800;
}

.race-close {
  width: 100%;
}

.race-footer {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  background: white;
  margin-top: 8px;
  padding-top: 8px;
}

@keyframes raceRowShift {
  from {
    transform: translateY(8px);
    opacity: 0.74;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes raceRoadMove {
  to {
    background-position: 72px 0, 0 0;
  }
}

@keyframes raceCarIdle {
  from {
    transform: translate(-50%, -50%) translateY(-1px);
  }
  to {
    transform: translate(-50%, -50%) translateY(2px);
  }
}

/* CryptoCars-style shell */
.has-wallet {
  background: #2fa6b5;
}

.has-wallet .app-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.has-wallet .topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 54px;
  margin: 0;
  padding: 0 48px;
  border-bottom: 1px solid rgba(19, 57, 86, 0.28);
  background: #2b75a2;
  box-shadow: 0 2px 8px rgba(19, 57, 86, 0.22);
}

.brand-logo {
  color: #eef8d9;
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 1000;
  letter-spacing: -0.05em;
  text-shadow:
    0 2px 0 rgba(21, 72, 64, 0.6),
    0 0 8px rgba(255, 255, 255, 0.22);
  white-space: nowrap;
}

.brand-logo-img {
  display: block;
  width: 132px;
  height: 42px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 2px 2px rgba(17, 48, 69, 0.24));
}

.has-wallet .tabs {
  flex: 1;
  align-items: center;
  gap: 20px;
  margin: 0 0 0 12px;
  padding: 0;
}

.has-wallet .tab-button {
  min-width: auto;
  min-height: 54px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.94rem;
  font-weight: 900;
}

.has-wallet .tab-button.active,
.has-wallet .tab-button:hover {
  background: transparent;
  color: white;
}

.has-wallet .wallet-pill {
  min-height: 38px;
  border: 2px solid rgba(32, 79, 126, 0.6);
  border-radius: 999px;
  background: #e8fbff;
  box-shadow:
    inset 0 -3px 0 rgba(50, 137, 164, 0.14),
    0 2px 8px rgba(11, 48, 84, 0.26);
}

.has-wallet .wallet-panel {
  min-width: 0;
  flex: 0 0 auto;
}

.has-wallet main {
  position: relative;
  min-height: calc(100vh - 54px);
  overflow: visible;
  padding: 18px 38px 64px;
  background: #2fa6b5;
}

.has-wallet .view-panel {
  position: relative;
  z-index: 1;
  border: 0;
  box-shadow: none;
}

.has-wallet #garageView.view-panel.active {
  display: block;
  width: 100%;
  min-height: calc(100vh - 54px);
  padding: 0 0 40px;
  border-radius: 0;
  background: transparent;
}

#garageView .section-head {
  display: none;
}

#garageGrid.car-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 18px;
}

.has-wallet #garageView .garage-progress {
  margin: 0 0 18px;
}

.has-wallet #garageView .city-map {
  grid-template-columns: repeat(3, minmax(190px, 1fr));
}

.has-wallet #garageView .city-card {
  min-height: 128px;
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 24px rgba(21, 74, 93, 0.18);
}

.has-wallet #garageView .city-card strong {
  margin-top: 56px;
}

.has-wallet #garageView .city-skyline {
  inset: 26px 16px auto 16px;
  height: 58px;
}

.has-wallet #garageView .city-zoom {
  margin-top: 12px;
}

.city-card.city-1.available {
  background:
    linear-gradient(180deg, rgba(11, 58, 71, 0.04), rgba(8, 48, 62, 0.48)),
    url("assets/city-1.png") center / cover;
}

.city-card.city-1 .city-skyline,
.city-card.city-1 .city-road-strip {
  display: none;
}

.city-card.city-1::before,
.city-card.city-1::after {
  display: none;
}

.city-card.city-1 strong {
  margin-top: 74px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.city-card.city-1 small {
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.city-card.city-2 {
  background:
    linear-gradient(180deg, rgba(44, 30, 16, 0.08), rgba(32, 19, 8, 0.56)),
    url("assets/city-2.png") center 43% / cover;
  color: white;
}

.city-card.city-2.locked {
  filter: grayscale(1);
}

.city-card.city-2 .city-skyline,
.city-card.city-2 .city-road-strip,
.city-card.city-2 .city-sun {
  display: none;
}

.city-card.city-2::before,
.city-card.city-2::after {
  display: none;
}

.city-card.city-2 strong {
  margin-top: 74px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.62);
}

.city-card.city-2 small {
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.62);
}

.city-card.city-3 {
  background:
    linear-gradient(180deg, rgba(18, 37, 67, 0.06), rgba(11, 24, 47, 0.58)),
    url("assets/city-3.png") center 43% / cover;
  color: white;
}

.city-card.city-3.locked {
  filter: grayscale(1);
}

.city-card.city-3 .city-skyline,
.city-card.city-3 .city-road-strip,
.city-card.city-3 .city-sun {
  display: none;
}

.city-card.city-3::before,
.city-card.city-3::after {
  display: none;
}

.city-card.city-3 strong {
  margin-top: 74px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.62);
}

.city-card.city-3 small {
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.62);
}

.city-zoom-1 .city-zoom-scene,
.city-zoom-2 .city-zoom-scene,
.city-zoom-3 .city-zoom-scene {
  min-height: 460px;
}

.city-zoom-1 .city-zoom-scene {
  background:
    linear-gradient(180deg, rgba(13, 54, 41, 0.04), rgba(13, 54, 41, 0.1)),
    url("assets/city-1-garages.png") center / cover;
}

.city-zoom-2 .city-zoom-scene {
  background:
    linear-gradient(180deg, rgba(74, 40, 13, 0.04), rgba(64, 37, 15, 0.18)),
    url("assets/city-2-garages.png") center 45% / cover;
}

.city-zoom-3 .city-zoom-scene {
  background:
    linear-gradient(180deg, rgba(20, 42, 74, 0.04), rgba(12, 28, 52, 0.2)),
    url("assets/city-3-garages.png") center 45% / cover;
}

.city-zoom-1 .city-zoom-scene::before,
.city-zoom-2 .city-zoom-scene::before,
.city-zoom-3 .city-zoom-scene::before,
.city-zoom-1 .zoom-skyline,
.city-zoom-2 .zoom-skyline,
.city-zoom-3 .zoom-skyline,
.city-zoom-1 .zoom-road,
.city-zoom-2 .zoom-road,
.city-zoom-3 .zoom-road,
.city-zoom-1 .zoom-park,
.city-zoom-2 .zoom-park,
.city-zoom-3 .zoom-park {
  display: none;
}

.city-zoom-1 .garage-plot,
.city-zoom-2 .garage-plot,
.city-zoom-3 .garage-plot {
  grid-template-columns: 1fr;
  justify-items: center;
  width: 210px;
  height: 82px;
  min-height: 0;
  padding: 12px 34px 12px 18px;
  border: 1px solid rgba(197, 255, 244, 0.72);
  background:
    linear-gradient(135deg, rgba(20, 150, 139, 0.62), rgba(9, 62, 73, 0.5));
  color: #f8fffd;
  box-shadow:
    0 14px 26px rgba(11, 40, 48, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(2px) saturate(1.08);
  text-align: center;
  transform: translate(-50%, -50%) translateZ(0);
}

.city-zoom-1 .garage-building,
.city-zoom-2 .garage-building,
.city-zoom-3 .garage-building {
  display: none;
}

.city-zoom-1 .garage-plot.locked,
.city-zoom-1 .garage-plot.unlockable,
.city-zoom-2 .garage-plot.locked,
.city-zoom-2 .garage-plot.unlockable,
.city-zoom-3 .garage-plot.locked,
.city-zoom-3 .garage-plot.unlockable {
  filter: none;
}

.city-zoom-1 .garage-plot:hover,
.city-zoom-1 .garage-plot.selected,
.city-zoom-1 .garage-plot.pending,
.city-zoom-2 .garage-plot:hover,
.city-zoom-2 .garage-plot.selected,
.city-zoom-2 .garage-plot.pending,
.city-zoom-3 .garage-plot:hover,
.city-zoom-3 .garage-plot.selected,
.city-zoom-3 .garage-plot.pending {
  border-color: rgba(197, 255, 244, 0.95);
  box-shadow:
    0 0 0 3px rgba(31, 196, 165, 0.2),
    0 16px 30px rgba(11, 40, 48, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transform: translate(-50%, calc(-50% - 3px)) translateZ(0);
}

.city-zoom-1 .garage-plot-copy strong,
.city-zoom-1 .garage-plot-copy small,
.city-zoom-2 .garage-plot-copy strong,
.city-zoom-2 .garage-plot-copy small,
.city-zoom-3 .garage-plot-copy strong,
.city-zoom-3 .garage-plot-copy small {
  color: #f8fffd;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.38);
}

.city-zoom-1 .garage-plot .map-lock,
.city-zoom-1 .garage-plot .map-lock::before,
.city-zoom-2 .garage-plot .map-lock,
.city-zoom-2 .garage-plot .map-lock::before,
.city-zoom-3 .garage-plot .map-lock,
.city-zoom-3 .garage-plot .map-lock::before {
  filter: drop-shadow(0 6px 7px rgba(18, 30, 38, 0.28));
}

.city-zoom-1 .garage-plot.plot-1 {
  left: 19%;
  top: 54%;
  right: auto;
  bottom: auto;
}

.city-zoom-1 .garage-plot.plot-2 {
  left: 48.5%;
  top: 54%;
  right: auto;
  bottom: auto;
}

.city-zoom-1 .garage-plot.plot-3 {
  left: 81%;
  right: auto;
  top: 54%;
  bottom: auto;
}

.city-zoom-2 .garage-plot.plot-1 {
  left: 19%;
  top: 55%;
  right: auto;
  bottom: auto;
}

.city-zoom-2 .garage-plot.plot-2 {
  left: 50%;
  top: 55%;
  right: auto;
  bottom: auto;
}

.city-zoom-2 .garage-plot.plot-3 {
  left: 81%;
  right: auto;
  top: 55%;
  bottom: auto;
}

.city-zoom-3 .garage-plot.plot-1 {
  left: 19%;
  top: 55%;
  right: auto;
  bottom: auto;
}

.city-zoom-3 .garage-plot.plot-2 {
  left: 50%;
  top: 55%;
  right: auto;
  bottom: auto;
}

.city-zoom-3 .garage-plot.plot-3 {
  left: 81%;
  right: auto;
  top: 55%;
  bottom: auto;
}

.garage-car-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  align-content: start;
  gap: 14px;
  min-height: 320px;
  margin-top: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  padding: 16px;
  box-shadow: 0 18px 34px rgba(18, 74, 89, 0.16);
}

.garage-cars-panel {
  display: grid;
  gap: 12px;
}

.garage-cars-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(230, 248, 245, 0.92));
  box-shadow: 0 18px 34px rgba(18, 74, 89, 0.14);
  padding: 14px 16px;
}

.garage-cars-head small {
  border-radius: 999px;
  background: #172027;
  color: #ffe870;
  padding: 8px 11px;
  font-size: 0.78rem;
  font-weight: 1000;
}

#garageView .garage-car-list .car-card {
  min-height: 0;
  border-color: #e0e8ee;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(21, 56, 84, 0.08);
}

#garageView .garage-car-list .car-visual {
  min-height: 142px;
  border-radius: 14px 14px 0 0;
}

#garageView .garage-car-list .car-visual .car-sprite {
  width: min(88%, 246px);
  max-height: 132px;
}

#garageView .garage-empty {
  min-height: 180px;
  margin-top: 38px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 34px rgba(18, 74, 89, 0.16);
}

.has-wallet #boxesView.view-panel.active,
.has-wallet #marketView.view-panel.active {
  width: min(920px, calc(100% - 76px));
  margin: 38px 38px 0 0;
  padding: 18px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 18px 34px rgba(18, 74, 89, 0.16);
}

.has-wallet .box-offer,
.has-wallet .market-card {
  border-radius: 12px;
}

.has-wallet .primary-action,
.has-wallet .secondary-action,
.has-wallet .buy-row button,
.has-wallet .car-actions button,
.has-wallet .market-actions button {
  border-radius: 12px;
}

@media (max-width: 980px) {
  .entry-cars-showcase {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 56px 24px;
  }

  .showcase-cards {
    min-height: auto;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    order: 2;
  }

  .showcase-copy {
    order: 1;
    max-width: none;
    justify-items: center;
    text-align: center;
  }

  .showcase-copy p {
    max-width: 560px;
  }

  .entry-statistics {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 58px 24px;
  }

  .statistics-title {
    text-align: center;
  }

  .statistics-grid {
    justify-content: center;
  }

  .nft-car-card.card-a,
  .nft-car-card.card-b,
  .nft-car-card.card-c,
  .nft-car-card.card-d,
  .nft-car-card.card-e {
    transform: none;
  }

  .has-wallet .topbar {
    padding: 0 20px;
  }

  .has-wallet .tabs {
    gap: 14px;
  }

  .has-wallet main {
    padding-left: 20px;
  }

  #garageGrid.car-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .has-wallet #garageView.view-panel.active {
    padding-right: 20px;
  }

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

  .race-board,
  .admin-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .race-board,
  .admin-layout {
    grid-template-columns: 1fr;
  }

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

  .sell-car-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .city-zoom-scene {
    min-height: 360px;
  }

  .garage-plot {
    width: 200px;
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .garage-plot.plot-1 {
    left: 34px;
  }

  .garage-plot.plot-2 {
    left: 35%;
  }

  .garage-plot.plot-3 {
    right: 28px;
  }

  .garage-building {
    width: 68px;
  }

  .race-row {
    grid-template-columns: 54px 96px minmax(120px, 1fr);
  }

  .race-table-wrap {
    max-height: none;
  }

  .race-stat {
    display: none;
  }
}

@media (max-width: 680px) {
  .wallet-gate {
    align-items: stretch;
    padding: 0;
  }

  .entry-header {
    top: 18px;
    right: 18px;
    left: 18px;
  }

  .entry-logo {
    width: 174px;
    max-height: 92px;
  }

  .entry-hero {
    width: min(100% - 28px, 420px);
    gap: 12px;
    transform: translateY(-6px);
  }

  .entry-hero-logo {
    max-height: 210px;
  }

  .entry-hero p {
    max-width: 300px;
    font-size: 0.95rem;
  }

  .entry-play-btn {
    min-width: 220px;
    min-height: 58px;
  }

  .entry-scene {
    background-position: center;
  }

  .entry-cars-showcase {
    padding: 42px 14px;
  }

  .showcase-rail {
    inset: 28px 14px;
    border-width: 3px;
  }

  .showcase-cards {
    grid-template-columns: 1fr;
    width: min(100%, 330px);
    justify-self: center;
  }

  .nft-car-card {
    min-height: 214px;
  }

  .entry-statistics {
    padding: 42px 14px;
  }

  .statistics-rail {
    inset: 28px 14px;
    border-width: 3px;
  }

  .statistics-grid {
    grid-template-columns: 1fr;
    width: min(100%, 280px);
    justify-self: center;
  }

  .entry-stat-card:nth-child(3) {
    grid-column: auto;
    width: 100%;
  }

  .entry-car-left {
    bottom: 5%;
    left: -16%;
    width: 260px;
  }

  .entry-car-right {
    right: -18%;
    bottom: 5%;
    width: 280px;
  }

  .entry-road {
    width: 250px;
    height: 72px;
  }

  .gate-panel {
    min-height: calc(100vh - 20px);
    grid-template-columns: 1fr;
  }

  .gate-art {
    min-height: 280px;
  }

  .gate-track {
    inset: 46px 70px;
  }

  .gate-car {
    width: 150px;
    height: 62px;
  }

  .gate-car::before {
    top: -31px;
    left: 42px;
    width: 66px;
    height: 39px;
  }

  .gate-copy {
    justify-content: flex-start;
    padding: 28px;
  }

  .gate-logo {
    width: min(100%, 300px);
    max-height: 170px;
  }

  .gate-action {
    width: min(100%, 260px);
  }

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

  .topbar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .has-wallet .app-shell {
    width: 100%;
    padding: 0;
  }

  .has-wallet .topbar {
    min-height: 54px;
    align-items: center;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    padding: 0 12px;
  }

  .brand-logo {
    font-size: 0.92rem;
  }

  .brand-logo-img {
    width: 104px;
    height: 36px;
  }

  .has-wallet .tabs {
    flex: 0 0 auto;
    gap: 12px;
    margin-left: 0;
  }

  .has-wallet .tab-button {
    min-height: 54px;
    font-size: 0.84rem;
  }

  .has-wallet .wallet-panel {
    min-width: auto;
    margin-left: auto;
  }

  .has-wallet .wallet-label,
  .has-wallet .pill-divider {
    display: none;
  }

  .has-wallet main {
    padding-left: 0;
    overflow: visible;
  }

  .has-wallet #garageView.view-panel.active {
    width: min(100%, 390px);
    margin: 0 auto;
    padding: 0 0 28px;
  }

  #garageGrid.car-grid {
    grid-template-columns: 1fr;
  }

  .garage-car-list {
    grid-template-columns: 1fr;
    min-height: 0;
    margin-top: 12px;
  }

  .has-wallet #boxesView.view-panel.active,
  .has-wallet #marketView.view-panel.active {
    width: calc(100% - 20px);
    margin: 10px;
  }

  .wallet-panel {
    min-width: 0;
    align-items: flex-start;
  }

  .wallet-session,
  .action-row {
    justify-content: stretch;
  }

  .wallet-session button,
  .action-row button {
    flex: 0 1 auto;
  }

  .balance-menu {
    left: 0;
    right: auto;
    width: min(100%, 240px);
  }

  .day-menu {
    left: 0;
    right: auto;
  }

  .stats-grid,
  .city-map,
  .garage-map,
  .car-grid,
  .box-grid,
  .market-card-grid,
  .admin-metrics {
    grid-template-columns: 1fr;
  }

  .city-zoom-head,
  .garage-unlock-panel {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .city-zoom-head {
    flex-direction: column;
  }

  .city-guide-head,
  .garage-cars-head {
    align-items: stretch;
    flex-direction: column;
  }

  .city-guide-summary {
    width: 100%;
  }

  .global-buff-badge {
    width: 100%;
    min-width: 0;
    margin-right: 0;
  }

  .run-all-city-btn {
    position: static;
    width: 100%;
    transform: none;
  }

  .run-all-city-btn:hover:not(:disabled) {
    transform: none;
  }

  .confirm-actions {
    grid-template-columns: 1fr;
  }

  .reward-dialog {
    padding: 14px;
  }

  .reward-modal-head {
    grid-template-columns: 1fr;
    padding-right: 36px;
  }

  .reward-modal-car {
    min-height: 116px;
  }

  .reward-modal .day-reward-row {
    grid-template-columns: 1fr;
  }

  .reward-modal .claim-action {
    width: 100%;
  }

  .city-zoom-scene {
    min-height: 560px;
  }

  .zoom-skyline {
    left: 18px;
    width: calc(100% - 36px);
  }

  .zoom-road-side {
    right: 58px;
  }

  .garage-plot {
    width: min(calc(100% - 36px), 260px);
  }

  .garage-plot.plot-1 {
    left: 18px;
    bottom: 34px;
  }

  .garage-plot.plot-2 {
    left: 18px;
    top: 204px;
  }

  .garage-plot.plot-3 {
    right: 18px;
    bottom: 184px;
  }

  .garage-unlock-action {
    min-width: 0;
  }

  .city-zoom-1 .garage-plot.plot-1,
  .city-zoom-1 .garage-plot.plot-2,
  .city-zoom-1 .garage-plot.plot-3,
  .city-zoom-2 .garage-plot.plot-1,
  .city-zoom-2 .garage-plot.plot-2,
  .city-zoom-2 .garage-plot.plot-3,
  .city-zoom-3 .garage-plot.plot-1,
  .city-zoom-3 .garage-plot.plot-2,
  .city-zoom-3 .garage-plot.plot-3 {
    left: 50%;
    right: auto;
  }

  .city-zoom-1 .garage-plot.plot-1,
  .city-zoom-2 .garage-plot.plot-1,
  .city-zoom-3 .garage-plot.plot-1 {
    top: 38%;
  }

  .city-zoom-1 .garage-plot.plot-2,
  .city-zoom-2 .garage-plot.plot-2,
  .city-zoom-3 .garage-plot.plot-2 {
    top: 56%;
  }

  .city-zoom-1 .garage-plot.plot-3,
  .city-zoom-2 .garage-plot.plot-3,
  .city-zoom-3 .garage-plot.plot-3 {
    top: 74%;
  }

  .view-panel {
    padding: 12px;
  }

  .race-summary {
    min-height: 110px;
  }

  .table-row {
    grid-template-columns: 1fr;
  }

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

  .race-dialog {
    padding: 10px;
    max-height: calc(100vh - 20px);
  }

  .race-runner {
    height: 82px;
  }

  .race-road-slab {
    width: 220px;
    height: 66px;
  }

  .race-runner-car {
    width: 124px;
  }

  .race-runner-tree {
    display: none;
  }

  .race-row {
    grid-template-columns: 46px 74px minmax(0, 1fr);
    gap: 8px;
    min-height: 68px;
    padding: 8px;
  }

  .race-table-wrap {
    max-height: none;
  }

  .race-mini-car .car-sprite {
    width: 62px;
  }

  .race-header {
    align-items: flex-start;
  }

  .race-result strong {
    font-size: 1.35rem;
  }
}
