:root {
  --ink: #150f26;
  --ink-2: #241a3d;
  --paper: #fff6e8;
  --gold: #ffd23f;
  --hot: #ff3f6e;
  --cool: #5cf2ff;
  --lime: #8de84a;
  --font: "Baloo 2", "Trebuchet MS", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

/* Author display rules beat the UA's [hidden] rule, so make it explicit. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #0a0714;
  color: var(--paper);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#app {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
}

#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

#ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

button, input { font-family: inherit; pointer-events: auto; }

/* ---------- top bar ---------- */
#topbar {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  right: calc(10px + env(safe-area-inset-right));
  display: flex;
  gap: 8px;
  z-index: 5;
}
.icon-btn {
  width: 48px; height: 48px;
  border: 0;
  border-radius: 14px;
  background: rgba(21, 15, 38, 0.55);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: transform .12s ease, background .12s ease;
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn:hover { background: rgba(21, 15, 38, 0.75); }

/* ---------- screens ---------- */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: radial-gradient(120% 90% at 50% 45%, rgba(10, 7, 20, 0.35) 0%, rgba(10, 7, 20, 0.82) 70%);
  animation: fade .22s ease both;
}
.screen[hidden] { display: none; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

.card {
  pointer-events: none;
  width: min(430px, 92vw);
  max-height: 92%;
  overflow: auto;
  text-align: center;
  background: rgba(28, 19, 50, 0.94);
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  padding: 22px 20px 20px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55), inset 0 2px 0 rgba(255, 255, 255, 0.08);
  animation: pop .26s cubic-bezier(.2, 1.3, .4, 1) both;
}
@keyframes pop { from { transform: translateY(14px) scale(.94); opacity: 0 } to { transform: none; opacity: 1 } }

.logo {
  font-size: clamp(44px, 13vw, 72px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #fff 0%, var(--gold) 55%, #ff9f43 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .35));
  margin-bottom: 2px;
}
.logo.small { font-size: clamp(30px, 8vw, 42px); }
.logo .chev {
  display: inline-block;
  font-size: 0.5em;
  color: var(--hot);
  -webkit-text-fill-color: var(--hot);
  transform: translateY(-0.35em);
  margin-right: 6px;
  animation: hover 1.6s ease-in-out infinite;
}
@keyframes hover { 0%,100% { transform: translateY(-0.35em) } 50% { transform: translateY(-0.62em) } }

.tagline { margin: 2px 0 14px; opacity: .82; font-size: 15px; }
.loading-text { opacity: .7; margin: 8px 0 0; }

.big-btn {
  display: block;
  width: 100%;
  margin: 12px 0 8px;
  padding: 16px 20px;
  min-height: 60px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffd94f, #ff9d1f);
  color: #40210a;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1.5px;
  cursor: pointer;
  box-shadow: 0 6px 0 #b96a06, 0 12px 24px rgba(0, 0, 0, .4);
  transition: transform .08s ease, box-shadow .08s ease;
}
.big-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #b96a06, 0 6px 14px rgba(0, 0, 0, .4); }

.ghost-btn {
  flex: 1;
  padding: 12px 14px;
  min-height: 46px;
  border: 2px solid rgba(255, 255, 255, .22);
  border-radius: 14px;
  background: rgba(255, 255, 255, .07);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .6px;
  cursor: pointer;
}
.ghost-btn:active { transform: translateY(2px); }
.row-btns { display: flex; gap: 8px; margin-top: 4px; }

.controls { margin: 10px 0 4px; font-size: 14px; opacity: .8; }
.key {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .14);
  border-bottom: 2px solid rgba(0, 0, 0, .3);
  font-weight: 700;
  font-size: 13px;
}

.stats-row { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
.stats-row.wide { margin: 14px 0 10px; }
.stats-row div {
  flex: 1;
  background: rgba(0, 0, 0, .25);
  border-radius: 14px;
  padding: 8px 6px;
}
.stats-row b { display: block; font-size: 22px; color: var(--gold); }
.stats-row small { display: block; font-size: 10px; letter-spacing: 1px; opacity: .65; }

.banner {
  background: linear-gradient(90deg, rgba(92, 242, 255, .18), rgba(197, 107, 255, .18));
  border: 2px solid rgba(92, 242, 255, .4);
  border-radius: 14px;
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 14px;
}
.banner strong { color: var(--cool); letter-spacing: 1.5px; display: block; font-size: 11px; }

.death-line {
  margin: 0 0 6px;
  color: var(--hot);
  font-size: clamp(17px, 5vw, 22px);
  font-weight: 800;
  letter-spacing: .5px;
}
.score-big {
  font-size: clamp(54px, 16vw, 78px);
  font-weight: 800;
  line-height: 1;
  color: #fff;
  text-shadow: 0 4px 0 rgba(0, 0, 0, .35);
}
.score-label { font-size: 11px; letter-spacing: 3px; opacity: .6; margin-top: -2px; }
.best-line { font-size: 13px; opacity: .75; margin: 2px 0 6px; }
.best-line b { color: var(--gold); }
.badge {
  display: inline-block;
  background: var(--lime);
  color: #17300a;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 6px;
  animation: wiggle .5s ease-in-out infinite alternate;
}
@keyframes wiggle { from { transform: rotate(-3deg) scale(1) } to { transform: rotate(3deg) scale(1.06) } }

.restart-hint { font-size: 12px; opacity: .55; margin: 10px 0 0; }
.fineprint { font-size: 11px; opacity: .45; margin: 6px 0 0; pointer-events: none; }
#share-fallback { margin-top: 10px; }
#share-input {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, .2);
  background: rgba(0, 0, 0, .35);
  color: #fff;
  font-size: 12px;
  user-select: text;
  -webkit-user-select: text;
}

#rotate-hint {
  position: absolute;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(21, 15, 38, .7);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  opacity: .8;
}
#rotate-hint[hidden] { display: none; }

/* Short landscape phones: shrink the chrome so the card always fits. */
@media (max-height: 460px) {
  .card { padding: 14px 16px; width: min(520px, 94vw); }
  .logo { font-size: clamp(30px, 8vh, 44px); }
  .tagline, .controls { font-size: 12px; margin: 6px 0; }
  .big-btn { font-size: 20px; min-height: 48px; padding: 10px; margin: 8px 0 6px; }
  .score-big { font-size: clamp(36px, 12vh, 56px); }
  .stats-row b { font-size: 17px; }
  .fineprint, .restart-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .logo .chev, .badge { animation: none; }
  .card, .screen { animation: none; }
}

/* ---------- locker + leaderboard ---------- */
.wide-card { width: min(560px, 94vw); }

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}
.card-head h2 {
  margin: 0;
  font-size: clamp(22px, 6vw, 30px);
  letter-spacing: 2px;
  color: var(--gold);
}
.card-sub { margin: 0 0 12px; font-size: 12px; opacity: .6; }

.wallet {
  font-size: 14px;
  color: var(--gold);
  font-weight: 700;
  white-space: nowrap;
}
.wallet.big { font-size: 19px; }

.menu-row { display: flex; gap: 8px; margin: 4px 0 10px; }
.menu-row .ghost-btn { display: flex; flex-direction: column; gap: 1px; align-items: center; }
.btn-label { font-size: 13px; letter-spacing: 1px; }
.btn-sub { font-size: 10px; opacity: .55; font-weight: 600; }

.pilot-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: rgba(0, 0, 0, .28);
  border-radius: 14px;
  padding: 8px 12px 8px 8px;
  margin-top: 4px;
}
.pilot-chip canvas { width: 46px; height: 46px; flex: none; }
.pilot-chip > div { flex: 1; min-width: 0; }
.pilot-chip b { display: block; font-size: 14px; color: var(--paper); }
.pilot-chip small { display: block; font-size: 11px; opacity: .55; line-height: 1.25; }

/* --- the grid of pilots --- */
.locker-grid {
  pointer-events: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 8px;
  max-height: 46vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 2px;
  margin-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}
.pilot-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 6px 8px;
  border: 2px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  background: rgba(0, 0, 0, .3);
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: center;
  transition: border-color .12s ease, transform .1s ease, background .12s ease;
}
.pilot-card:hover { background: rgba(255, 255, 255, .07); }
.pilot-card:active { transform: translateY(2px); }
.pilot-card:focus-visible { outline: 3px solid var(--cool); outline-offset: 2px; }
.pilot-card canvas { width: 62px; height: 62px; }
.pilot-card .pname {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  min-height: 2.3em;
  display: flex;
  align-items: center;
}
.pilot-card .ptag {
  font-size: 9.5px;
  opacity: .5;
  line-height: 1.25;
  min-height: 2.4em;
}
.pilot-card .pprice {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
}
.pilot-card.locked .pprice { background: rgba(255, 210, 63, .18); color: var(--gold); }
.pilot-card.affordable .pprice { background: var(--gold); color: #40210a; }
.pilot-card.owned { border-color: rgba(141, 232, 74, .45); }
.pilot-card.owned .pprice { background: rgba(141, 232, 74, .18); color: var(--lime); }
.pilot-card.equipped { border-color: var(--gold); background: rgba(255, 210, 63, .12); }
.pilot-card.equipped .pprice { background: var(--gold); color: #40210a; }
/* Locked pilots stay in FULL colour — a cosmetics shop that hides the
   cosmetics has nothing to sell. Lock state is carried by the price pill
   and the border, not by hiding the art. */
.pilot-card.locked { border-style: dashed; }
.pilot-card.locked canvas { opacity: .92; }

.bundle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: linear-gradient(90deg, rgba(255, 210, 63, .14), rgba(255, 63, 110, .14));
  border: 2px solid rgba(255, 210, 63, .3);
  border-radius: 14px;
  padding: 9px 10px;
}
.bundle-row > div { flex: 1; min-width: 0; }
.bundle-row b { display: block; font-size: 14px; }
.bundle-row small { display: block; font-size: 11px; opacity: .6; }
.buy-btn {
  flex: none;
  min-height: 44px;
  padding: 8px 16px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffd94f, #ff9d1f);
  color: #40210a;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 0 #b96a06;
}
.buy-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #b96a06; }
.buy-btn[disabled] { background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .5); box-shadow: none; cursor: default; }

.demo-note {
  margin: 10px 0 4px;
  font-size: 10.5px;
  letter-spacing: .4px;
  color: #ffb3c4;
  background: rgba(255, 63, 110, .12);
  border: 1px solid rgba(255, 63, 110, .3);
  border-radius: 9px;
  padding: 6px 8px;
}

/* --- leaderboard --- */
.board-mode {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  opacity: .8;
}
.board-mode.shared { background: rgba(92, 242, 255, .2); color: var(--cool); }

.name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 10px;
}
.name-row label { font-size: 10px; letter-spacing: 1.5px; opacity: .6; flex: none; }
#name-input {
  flex: 1;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, .2);
  background: rgba(0, 0, 0, .35);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  user-select: text;
  -webkit-user-select: text;
}
#name-input:focus { outline: none; border-color: var(--gold); }

.board-list {
  max-height: 46vh;
  overflow-y: auto;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.board-row {
  display: grid;
  grid-template-columns: 30px 34px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  text-align: left;
}
.board-row + .board-row { margin-top: 3px; }
.board-row:nth-child(odd) { background: rgba(255, 255, 255, .04); }
.board-row.me { background: rgba(255, 210, 63, .16); box-shadow: inset 0 0 0 1.5px rgba(255, 210, 63, .4); }
.board-row .rank { font-size: 13px; font-weight: 800; opacity: .6; text-align: right; }
.board-row.top1 .rank { color: #ffd23f; opacity: 1; }
.board-row.top2 .rank { color: #d8dbe4; opacity: 1; }
.board-row.top3 .rank { color: #e0a06a; opacity: 1; }
.board-row canvas { width: 30px; height: 30px; }
.board-row .who { min-width: 0; }
.board-row .tag {
  display: block;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.board-row .meta { display: block; font-size: 10px; opacity: .5; }
.board-row .pts {
  font-size: 15px;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.board-empty { opacity: .5; font-size: 13px; padding: 18px 0; }

.rank-line {
  font-size: 13px;
  margin: 2px 0 8px;
  color: var(--cool);
  font-weight: 700;
}

@media (max-height: 460px) {
  .locker-grid, .board-list { max-height: 38vh; }
  .pilot-chip, .card-sub { display: none; }
  .demo-note { font-size: 9.5px; padding: 4px 6px; margin: 6px 0 2px; }
}

/* ---------- confirm modal ---------- */
#screen-confirm { background: rgba(6, 4, 14, .75); z-index: 10; }
.confirm-card { width: min(390px, 92vw); }
.confirm-kicker {
  margin: 0 0 6px;
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 800;
  color: var(--hot);
}
#confirm-title { margin: 0 0 6px; font-size: 24px; letter-spacing: .5px; }
.confirm-body { margin: 0 0 4px; font-size: 13px; opacity: .75; line-height: 1.4; }
.ghost-btn.wide { width: 100%; margin-top: 6px; }

/* ---------- locker tabs ---------- */
.tabs { display: flex; gap: 6px; margin: 0 0 10px; }
.tab {
  flex: 1;
  min-height: 40px;
  padding: 8px 10px;
  border: 2px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  background: rgba(0, 0, 0, .25);
  color: rgba(255, 255, 255, .6);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  cursor: pointer;
}
.tab[aria-selected="true"] {
  background: rgba(255, 210, 63, .16);
  border-color: var(--gold);
  color: var(--gold);
}
.tab:focus-visible { outline: 3px solid var(--cool); outline-offset: 2px; }

/* Trail tiles are wider than pilot tiles: a streak needs room to read. */
.locker-grid.trails { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.locker-grid.trails .pilot-card canvas { width: 100%; height: 54px; }

/* ---------- the verdict (contextual upsell) ---------- */
.verdict {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: linear-gradient(90deg, rgba(255, 210, 63, .16), rgba(197, 107, 255, .12));
  border: 2px solid rgba(255, 210, 63, .38);
  border-radius: 16px;
  padding: 10px;
  margin-bottom: 10px;
  animation: gavel .45s cubic-bezier(.2, 1.5, .4, 1) both;
}
@keyframes gavel {
  from { transform: rotate(-2.5deg) scale(.9); opacity: 0 }
  to { transform: none; opacity: 1 }
}
.verdict canvas { width: 56px; height: 56px; flex: none; }
.verdict-text { flex: 1; min-width: 0; }
.verdict-text b {
  display: block;
  font-size: 13px;
  line-height: 1.2;
  color: var(--gold);
  letter-spacing: .3px;
}
.verdict-text small { display: block; font-size: 11px; opacity: .7; margin: 2px 0 6px; line-height: 1.3; }
.verdict-btn {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffd94f, #ff9d1f);
  color: #40210a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 3px 0 #b96a06;
}
.verdict-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #b96a06; }
@media (max-height: 460px) { .verdict canvas { display: none; } }

/* ---------- text cosmetics (titles + last words) ---------- */
.tabs { flex-wrap: wrap; }
.tab { flex: 1 1 44%; min-width: 0; font-size: 11px; letter-spacing: 1px; }

.locker-grid.texts { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }
.locker-grid.texts .pilot-card { padding: 10px 8px; }

.text-sample {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  width: 100%;
  padding: 6px 8px;
  margin-bottom: 4px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .32);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .6px;
  line-height: 1.15;
  text-wrap: balance;
}
.text-sample.muted { color: rgba(255, 255, 255, .35); font-style: italic; font-weight: 600; }
.pilot-card.equipped .text-sample { background: rgba(255, 210, 63, .18); }

/* A title next to a name on the leaderboard */
.title-badge {
  display: inline-block;
  max-width: 100%;
  margin: 1px 0 1px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(92, 242, 255, .16);
  border: 1px solid rgba(92, 242, 255, .3);
  color: var(--cool);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.board-row .who { display: flex; flex-direction: column; gap: 0; }

@media (max-height: 460px) {
  .tab { flex: 1 1 0; font-size: 10px; padding: 6px 4px; min-height: 34px; }
}

/* ---------- spark packs ---------- */
.wallet-btn {
  border: 2px solid rgba(255, 210, 63, .35);
  border-radius: 999px;
  background: rgba(255, 210, 63, .1);
  padding: 4px 12px;
  min-height: 36px;
  cursor: pointer;
  color: var(--gold);
}
.wallet-btn .plus {
  display: inline-block;
  margin-left: 4px;
  width: 17px;
  height: 17px;
  line-height: 15px;
  border-radius: 50%;
  background: var(--gold);
  color: #40210a;
  font-size: 14px;
  text-align: center;
  vertical-align: middle;
}
.wallet-btn:active { transform: translateY(2px); }

.pack-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.pack {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 2px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  background: rgba(0, 0, 0, .3);
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.pack:hover { background: rgba(255, 255, 255, .06); }
.pack:active { transform: translateY(2px); }
.pack:focus-visible { outline: 3px solid var(--cool); outline-offset: 2px; }
.pack.featured { border-color: rgba(255, 210, 63, .5); background: rgba(255, 210, 63, .09); }
.pack-info { flex: 1; min-width: 0; }
.pack-amount { display: block; font-size: 19px; font-weight: 800; color: var(--gold); }
.pack-name { display: block; font-size: 12px; font-weight: 700; }
.pack-tag { display: block; font-size: 10.5px; opacity: .55; }
.pack-badge {
  position: absolute;
  top: -8px;
  right: 12px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--lime);
  color: #17300a;
}
.pack-badge.popular { background: var(--cool); color: #06303a; }
.pack-rate { display: block; font-size: 9.5px; opacity: .42; margin-top: 1px; }

/* ---------- restore purchases ---------- */
.field-label {
  display: block;
  text-align: left;
  font-size: 10px;
  letter-spacing: 1.5px;
  opacity: .55;
  margin: 12px 0 4px;
}
.code-row { display: flex; gap: 6px; }
.code-row input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, .2);
  background: rgba(0, 0, 0, .35);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  user-select: text;
  -webkit-user-select: text;
}
.code-row input:focus { outline: none; border-color: var(--gold); }
.code-row .ghost-btn { flex: 0 0 auto; min-width: 82px; }
.restore-status { font-size: 12px; margin: 8px 0 0; min-height: 1.2em; font-weight: 700; }
.restore-status.ok { color: var(--lime); }
.restore-status.bad { color: var(--hot); }

/* ---------- bundles ---------- */
.bundle-row { width: 100%; cursor: pointer; font: inherit; color: inherit; }
.bundle-row:active { transform: translateY(2px); }
.bundle-row b { letter-spacing: 1.5px; }

.pack.owned-pack { opacity: .55; }
.pack .pack-contents {
  display: block;
  font-size: 10px;
  opacity: .5;
  margin-top: 2px;
}
.pack .pack-save {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(141, 232, 74, .18);
  color: var(--lime);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .5px;
}
