/* Palette and components match Extension Royale's audited sky-theme.css. */
:root {
  font-family: system-ui, sans-serif;
  --ink: #211342;
  --paper: #fff8ea;
  --panel: #362260f5;
  --lime: #ffdf63;
  --ice: #71eee3;
  --muted: #d3c2e6;
  --line: #b495d355;
  background: #3c2673;
}
body {
  color: var(--paper);
}
button {
  border-radius: 13px;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--ice);
  outline-offset: 3px;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.topbar {
  background: transparent;
  border-bottom: 0;
  padding-block: 16px;
  gap: 15px;
}
.topbar nav {
  background: transparent;
  border: 0;
  gap: 6px;
  border-radius: 13px;
}
.topbar nav button {
  background: #473078;
  border: 2px solid #25133e;
  font-weight: 800;
  color: #fff8ea;
  border-radius: 9px;
}
.arcade-logo {
  display: block;
  width: 144px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}
@media (max-width: 1050px) {
  .arcade-logo {
    width: 124px;
  }
}
@media (max-width: 600px) {
  .arcade-logo {
    width: 108px;
  }
}
.icon-button {
  background: #473078;
  border: 2px solid #21133e;
  border-radius: 11px;
}
.primary,
.quick-race {
  background: #ffdb5f;
  color: #312149;
  border: 2px solid #25133e;
  border-radius: 13px;
  box-shadow: 0 3px 0 #160e3580;
  font-weight: 850;
}
.primary:hover,
.quick-race:hover {
  background: #ffe892;
}
.secondary {
  background: #473078;
  color: #fff8ea;
  border: 2px solid #25133e;
  border-radius: 13px;
  box-shadow: 0 3px 0 #160e3580;
}
.quick-race kbd {
  color: #312149;
  border-color: #31214955;
}
.panel {
  background: linear-gradient(135deg, #493078f5, #302055fa);
  border: 2px solid #21133e;
  border-radius: 20px;
  box-shadow:
    0 7px 0 #160e3577,
    0 20px 80px #180c4670;
}
.panel-backdrop {
  background: #1c103aae;
}
.panel.garage-panel {
  width: 470px;
}
.garage-panel.panel-backdrop {
  background: linear-gradient(90deg, #32195d12, #32195d22 40%, #32195d66);
  backdrop-filter: none;
}
.panel-heading h2 {
  font-weight: 850;
  color: #fff8ea;
  text-shadow: 0 3px #27143e;
}
.eyebrow,
.panel-heading .eyebrow {
  color: #ffdf78;
}
.welcome h1 {
  font-family: "Arial Black", system-ui, sans-serif;
  font-weight: 950;
  text-shadow:
    0 4px #311252,
    2px 0 #311252,
    -2px 0 #311252;
  transform: rotate(-2deg);
}
.welcome p {
  color: #fff8ea;
  text-shadow: 0 1px 8px #211342;
}
.welcome .eyebrow {
  color: #99fff0;
}
.discovery-card {
  background: #fff5e8;
  color: #332156;
  border: 2px solid #251044;
  border-radius: 16px;
  box-shadow: 0 5px 0 #24104466;
}
.discovery-card .eyebrow {
  color: #765489;
}
.activity-title p,
.activity-footer {
  color: #725980;
}
.activity-footer {
  border-color: #68458133;
}
.activity-footer button {
  color: #68449e;
}
.event-icon {
  background: #f3d9bc;
  color: #8d4e24;
}
.location .tiny,
.location #district,
.location small {
  color: #fff8ea;
  text-shadow: 0 2px 4px #211342;
}
.minimap-shell {
  border: 3px solid #3c2661;
  border-radius: 15px;
}
.map-caption {
  background: linear-gradient(transparent, #37225ce6);
}
.map-north {
  background: #3c2661;
  border-color: #ffdf63;
  color: #ffdf63;
}
.race-hud,
.event-prompt {
  background: #392663ef;
  border: 2px solid #21133e;
  box-shadow: 0 4px 0 #1c102a55;
}
.race-hud > div > span,
.panel-intro,
.fine-print,
.stats-bars span,
.key-guide p {
  color: #d3c2e6;
}
.event-card {
  background: #4e3576;
  border: 2px solid #26163e;
  border-top: 4px solid var(--event);
  border-radius: 15px;
}
.event-card p,
.event-meta,
.event-card-top small {
  color: #ddcdee;
}
.event-actions {
  border-color: #baa1d333;
}
.car-option {
  background: #30204e;
  border: 2px solid #21133e;
  border-radius: 10px;
}
.car-option.active {
  background: #65428d;
  border-color: #ffdf63;
}
.car-option small {
  color: #d3c2e6;
}
.class-mini {
  border-color: #a185bf;
}
.car-title {
  color: #dac8ec;
}
.car-title strong {
  color: #fff8ea;
  font-weight: 850;
}
.setting select,
.custom-field select,
.custom-field input:not([type="range"]),
#auth-form input {
  background: #25183f;
  border: 1px solid #c2a1de77;
  color: #fff8ea;
  border-radius: 9px;
  padding: 10px;
  font: inherit;
}
.setting {
  border-color: #b59dcc33;
}
kbd {
  border-color: #d6c5e677;
  color: #fff4dd;
}
.speedometer {
  background: #291b5670;
  border-radius: 18px;
  padding: 12px 16px;
  width: 265px;
}
.speed-row strong {
  color: #fff8ea;
}
.vehicle-label b,
.control-strip,
.map-footer {
  color: #fff4e3;
}
.boost-row {
  color: #71eee3;
}
.boost-row i {
  background: #71eee3;
}
.session-status i {
  background: #71eee3;
}
#toast {
  background: #432b72;
  border: 2px solid #ffdf63;
  border-radius: 12px;
}
#loading {
  background: radial-gradient(ellipse at 50% 40%, #6b4899, #302054);
}
.account-button {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 180px;
  padding: 8px 12px;
  background: #21133e;
  border: 1px solid #c29ddd55;
  border-radius: 13px;
  text-align: left;
  font-size: 11px;
  font-weight: 750;
}
.account-button #account-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-button #account-coins {
  color: #ffdb5f;
  font-size: 10px;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #b495d355;
  margin-bottom: 18px;
}
.auth-tabs button {
  padding: 13px;
  font-weight: 800;
  color: #d3c2e6;
  border-bottom: 3px solid transparent;
  border-radius: 0;
}
.auth-tabs button[aria-selected="true"] {
  color: #ffdf63;
  border-color: #ffdf63;
}
#auth-form fieldset {
  border: 0;
  padding: 0;
  display: grid;
  gap: 15px;
}
#auth-form label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 650;
}
#auth-form input {
  width: 100%;
  font-size: 15px;
}
#auth-error,
#garage-error,
#profile-error {
  color: #ffcd99;
  font-size: 12px;
  line-height: 1.5;
  min-height: 0;
}
.profile-hero {
  display: flex;
  align-items: center;
  gap: 20px;
}
.profile-hero h3 {
  font-size: 23px;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.profile-hero span {
  color: #ffdf63;
  font-size: 12px;
  font-weight: 800;
}
.profile-hero small {
  display: block;
  color: #d3c2e6;
  font-size: 10px;
  margin-top: 6px;
}
.arcade-avatar {
  display: block;
  width: 90px;
  height: 90px;
  background: #735398;
  border: 2px solid #d8baee50;
  border-radius: 15px;
  position: relative;
  flex-shrink: 0;
}
.arcade-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.arcade-avatar .layer-hat {
  top: -13%;
  width: 96%;
  left: 2%;
}
.arcade-avatar .layer-face {
  top: -3%;
}
.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 25px 0;
}
.profile-stats > div {
  padding: 17px 8px;
  background: #21133e;
  border-radius: 12px;
  text-align: center;
}
.profile-stats small {
  font-size: 8px;
  color: #d3c2e6;
  display: block;
}
.profile-stats b {
  display: block;
  font-size: 21px;
  color: #ffdf63;
  margin-top: 8px;
}
#starter-avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
#starter-avatars button {
  background: #735398;
  padding: 7px;
}
#starter-avatars img {
  width: 60px;
  height: 60px;
  image-rendering: pixelated;
}
.garage-wallet {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #21133e;
  border-radius: 12px;
  padding: 11px 14px;
  margin-bottom: 15px;
  font-size: 10px;
}
.garage-wallet b {
  color: #ffdf63;
}
.garage-performance {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 12px 0 20px;
}
.garage-performance > span {
  font-size: 21px;
  font-weight: 800;
}
.garage-performance small {
  display: block;
  font-size: 7px;
  color: #d3c2e6;
  font-weight: 500;
  letter-spacing: 1px;
}
.garage-tabs {
  display: flex;
  gap: 8px;
  margin: 10px 0 15px;
}
.garage-tabs button {
  padding: 10px;
  flex: 1;
  background: #30204e;
  font-size: 11px;
  font-weight: 750;
}
.garage-tabs button.active {
  background: #ffdf63;
  color: #312149;
}
.car-list.expanded {
  max-height: 280px;
}
.custom-controls {
  max-height: clamp(140px, calc(100vh - 660px), 300px);
  overflow: auto;
  padding: 2px 6px 2px 2px;
  scrollbar-width: thin;
}
.custom-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 13px 0;
  font-size: 11px;
}
.custom-field select,
.custom-field input {
  width: 175px;
  accent-color: #ffdf63;
}
.color-grid {
  display: flex;
  justify-content: space-between;
  margin: 15px 0;
}
.color-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 9px;
}
.color-grid input {
  width: 90px;
  height: 32px;
  padding: 0;
  border: 2px solid #b79bd8;
  border-radius: 8px;
  background: none;
}
.ownership {
  font-size: 8px;
  color: #dbbedf;
  margin-left: auto;
}
.ownership.owned {
  color: #71eee3;
}
.garage-caption small {
  display: none;
}
.swatch {
  border-color: #32214e;
}
.full + .fine-print {
  margin: 13px 0;
}
.fine-print a {
  text-decoration: underline;
  color: #71eee3;
}
.world-map-wrap {
  border: 3px solid #21133e;
}
.map-help {
  background: #fff6e6ed;
  color: #493555;
  border-color: #6f5386;
}
.map-legend button {
  color: #ffdf63;
}
.map-legend {
  color: #fff8ea;
}
@media (max-width: 1200px) {
  .session-status {
    display: none;
  }
  .topbar nav {
    gap: 0;
  }
  .topbar nav button {
    padding: 8px;
  }
  .topbar {
    padding-inline: 20px;
  }
  .top-right {
    gap: 7px;
  }
  .account-button {
    max-width: 125px;
    font-size: 10px;
  }
}
@media (max-width: 800px) {
  .wordmark {
    display: none;
  }
  .topbar nav button span,
  .topbar nav kbd {
    display: none;
  }
  .panel.garage-panel {
    width: 100%;
  }
  .speedometer {
    width: 180px;
    padding: 8px;
  }
  .speed-row strong {
    font-size: 52px;
  }
  .topbar {
    padding-inline: 12px;
  }
  .account-button {
    font-size: 9px;
    max-width: 110px;
  }
  .color-grid input {
    width: 65px;
  }
  .custom-field select,
  .custom-field input {
    width: 150px;
  }
}
@media (max-height: 750px) {
  .custom-controls {
    max-height: 140px;
  }
  .car-list.expanded {
    max-height: 200px;
  }
  .garage-performance {
    margin: 9px 0;
  }
  .car-title {
    margin: 14px 0;
  }
  .panel.garage-panel {
    padding: 20px;
  }
}
.difficulty-picker {
  display: grid;
  grid-template-columns: 1fr 250px;
  align-items: center;
  gap: 12px;
  padding: 18px;
  background: #25183f;
  border: 2px solid #b495d344;
  border-radius: 14px;
}
.difficulty-picker label {
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 1px;
  color: #ffdf63;
}
.difficulty-picker select {
  background: #493078;
  color: #fff8ea;
  border: 1px solid #b495d3;
  border-radius: 9px;
  padding: 12px;
  font: inherit;
}
.difficulty-picker p {
  grid-column: 1/-1;
  color: #d3c2e6;
  font-size: 12px;
  margin: 0;
}
.event-payout {
  font-weight: 850;
  font-size: 12px;
  color: #ffdf63;
  margin: 12px 0;
  display: flex;
  justify-content: space-between;
}
.event-payout span,
.reward-card b span {
  color: #71eee3;
}
.reward-card {
  background: #25183f;
  border: 2px solid #765aa044;
  border-radius: 14px;
  padding: 18px;
  margin: 18px 0;
  text-align: center;
}
.reward-card small {
  font-size: 10px;
  letter-spacing: 1px;
  color: #d3c2e6;
}
.reward-card b {
  display: block;
  font-size: 28px;
  color: #ffdf63;
  margin-top: 8px;
}
.reward-card b span {
  font-size: 20px;
  margin-left: 20px;
}
.reward-card p {
  font-size: 12px;
  line-height: 1.5;
  color: #d3c2e6;
}
@media (max-width: 600px) {
  .difficulty-picker {
    grid-template-columns: 1fr;
  }
}
.police-hud {
  position: absolute;
  top: 108px;
  left: 50%;
  transform: translateX(-50%);
  width: min(380px, calc(100vw - 32px));
  padding: 10px 16px;
  border-radius: 12px;
  background: #231a35ed;
  color: #fff3e6;
  border: 1px solid #9472bd;
  box-shadow: 0 5px 20px #15101d35;
  text-align: center;
  pointer-events: none;
}
.police-hud b {
  display: block;
  font-size: 11px;
  letter-spacing: 1.2px;
  color: #d8bdff;
}
.police-hud span {
  display: block;
  font-size: 12px;
  margin-top: 5px;
  line-height: 1.45;
}
.police-hud.wanted {
  background: #4c1524ef;
  border-color: #fa617c;
}
.police-hud.wanted b {
  color: #ffa2b4;
}
.police-hud[hidden] {
  display: none;
}
@media (max-width: 700px) {
  .police-hud {
    top: 138px;
    width: min(320px, calc(100vw - 24px));
    padding: 7px 10px;
  }
}
.about-game {
  display: block;
  margin-top: 16px;
  color: #ffe077;
  font-size: 12px;
  text-decoration: underline;
}
