﻿/* Pokémon-style game UI: deep navy panels, Poké-yellow accents, pixel display font. */
:root {
  --bg: #0d1226;
  --panel: #141b38;
  --card: #1d2650;
  --card-hi: #263266;
  --ink: #eef1ff;
  --muted: #b6bee3;
  --line: #313d78;
  --gold: #ffcb05;
  --gold-deep: #c79a00;
  --blue: #3d7dca;
  --danger: #ff5c6c;
  --ok: #5ee08a;
  --hud: rgba(13, 18, 38, 0.82);
  --pixel: 'Pixelify Sans', system-ui, sans-serif;
  --display: 'Fredoka', system-ui, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.4 system-ui, -apple-system, 'Segoe UI', sans-serif;
}

#app {
  display: grid;
  grid-template-columns: 1fr 312px;
  height: 100vh;
}

/* Smaller windows: a slimmer side panel so the map gets more room. */
@media (max-width: 1200px) {
  #app {
    grid-template-columns: 1fr 292px;
  }
}

#stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #13241a;
}

#stage canvas {
  display: block;
  cursor: crosshair;
}

/* ---------- Icons ---------- */
.ico {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-style: normal;
  font-weight: 700;
  font-size: 12px;
  flex: none;
}

.ico.coin {
  background: radial-gradient(circle at 35% 30%, #fff3a6, var(--gold) 55%, var(--gold-deep));
  color: #6b4e00;
  box-shadow: inset 0 0 0 2px #a67c00;
}

.ico.heart {
  background: radial-gradient(circle at 35% 30%, #ff9aa6, #e3243b);
  color: #fff;
  font-size: 11px;
}

/* Poké Ball: red top, white bottom, black band and button. */
.ico.ball {
  background:
    radial-gradient(circle, #fff 0 18%, #222 19% 30%, transparent 31%),
    linear-gradient(#e3243b 0 44%, #222 44% 56%, #f4f4f4 56%);
  box-shadow: inset 0 0 0 2px #222;
}

.ico.ball.big {
  width: 38px;
  height: 38px;
}

/* ---------- HUD ---------- */
#hud {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  pointer-events: none;
}

.stat.map-chip {
  padding-left: 12px;
  font-size: 14px;
  color: var(--gold);
}

.stat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--hud);
  color: #fff;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  border: 2px solid rgba(255, 203, 5, 0.55);
  font-family: var(--display);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}

.stat.dim {
  padding-left: 12px;
  border-color: var(--line);
  color: var(--muted);
}

.stat.dim:empty {
  display: none;
}

#toast {
  position: absolute;
  top: 58px;
  left: 50%;
  transform: translate(-50%, -6px);
  background: var(--hud);
  color: #fff;
  font-family: var(--display);
  font-size: 16px;
  padding: 7px 16px;
  border-radius: 10px;
  border: 2px solid var(--gold);
  opacity: 0;
  transition:
    opacity 0.25s,
    transform 0.25s;
  pointer-events: none;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

#overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(5, 8, 20, 0.6);
  backdrop-filter: blur(2px);
}

#overlay[hidden] {
  display: none;
}

.card {
  background: linear-gradient(180deg, var(--card-hi), var(--panel));
  border: 3px solid var(--gold);
  border-radius: 16px;
  padding: 22px 26px;
  min-width: 280px;
  max-width: 90%;
  box-shadow:
    0 0 0 4px #0d1226,
    0 18px 50px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.card h2 {
  margin: 0 0 6px;
  font-family: var(--pixel);
  font-size: 30px;
  color: var(--gold);
  text-shadow: 0 3px 0 #3d4fa0;
}

.card .row {
  justify-content: center;
}

/* ---------- Sidebar ---------- */
#side {
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(61, 125, 202, 0.25), transparent 70%),
    linear-gradient(180deg, var(--panel), var(--bg));
  border-left: 3px solid var(--line);
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.brand h1 {
  margin: 0;
  font-family: var(--pixel);
  font-size: 24px;
  line-height: 1;
  color: var(--gold);
  text-shadow:
    0 2px 0 #3d4fa0,
    0 3px 0 #22306e;
  letter-spacing: 0.02em;
}

.brand h1 span {
  display: block;
  font-size: 13px;
  color: var(--ink);
  text-shadow: none;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 3px;
}

.block {
  background: rgba(29, 38, 80, 0.7);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.block[hidden] {
  display: none;
}

h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 8px;
}

.grow {
  flex: 1;
}

/* ---------- Buttons ---------- */
button {
  font: inherit;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 10px;
  padding: 6px 11px;
  cursor: pointer;
  transition:
    transform 0.08s,
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
}

button:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--card-hi);
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

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

button.primary {
  font-family: var(--display);
  font-size: 16px;
  background: linear-gradient(180deg, #ffe066, var(--gold) 55%, #f0b400);
  color: #3a2c00;
  border-color: var(--gold-deep);
  box-shadow: 0 3px 0 var(--gold-deep);
}

button.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #fff09a, #ffd633 55%, #f5bd00);
  border-color: var(--gold-deep);
}

button.primary:active:not(:disabled) {
  box-shadow: 0 1px 0 var(--gold-deep);
  transform: translateY(2px);
}

button.danger {
  color: var(--danger);
  border-color: rgba(255, 92, 108, 0.45);
}

button.active {
  border-color: var(--gold);
  color: var(--gold);
}

input[type='number'] {
  width: 80px;
  font: inherit;
  padding: 3px 6px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
}

input[type='checkbox'] {
  accent-color: var(--gold);
}

.check {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
}

details summary {
  cursor: pointer;
  margin: 6px 0;
  color: var(--muted);
}

/* ---------- Shop ---------- */
#shop {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.shop-item {
  --type: var(--blue);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  text-align: center;
  background: var(--card);
  border: 2px solid color-mix(in srgb, var(--type) 45%, var(--line));
}

.shop-item:hover:not(:disabled) {
  border-color: var(--type);
  background: var(--card);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px var(--type),
    0 6px 18px color-mix(in srgb, var(--type) 45%, transparent);
}

.shop-item.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold);
}

/* Header strip in the Pokémon's type colour. */
.shop-head {
  display: block;
  padding: 3px 6px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

/* Type matchup against the next round, under the price. */
.shop-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.matchup {
  margin-top: 2px;
  padding: 0 5px;
  border-radius: 999px;
  font-family: system-ui, sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  text-shadow: none;
}

.matchup.strong {
  background: #1f6f3a;
  color: #b9f6ca;
  box-shadow: 0 0 0 1px #5ee08a;
}

.matchup.weak {
  background: #6f1f2a;
  color: #ffcdd2;
  box-shadow: 0 0 0 1px #ff5c6c;
}

/* The next round's wild Pokémon and their types. */
.next-wave {
  margin: 0 0 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.next-wave:empty {
  display: none;
}

.nw-title {
  display: block;
  margin-bottom: 4px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

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

.nw-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.nw-enemy {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.nw-enemy canvas {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
}

.nw-types {
  display: inline-flex;
  gap: 2px;
  margin-left: 4px;
  vertical-align: 1px;
}

.nw-type {
  padding: 0 4px;
  border-radius: 999px;
  font-style: normal;
  font-size: 8.5px;
  font-weight: 800;
  line-height: 13px;
  text-transform: uppercase;
}

.shop-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 8px 6px;
  background: radial-gradient(60% 90% at 30% 50%, color-mix(in srgb, var(--type) 28%, transparent), transparent 70%);
}

.shop-sprite,
#panel-sprite {
  image-rendering: pixelated;
  flex: none;
}

.shop-item small {
  font-family: var(--display);
  font-size: 15px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.shop-item small::before {
  content: '₽';
  margin-right: 2px;
  opacity: 0.8;
}

.shop-item:disabled {
  opacity: 0.5;
}

.shop-item:disabled .shop-sprite {
  filter: grayscale(1);
}

/* ---------- Selected tower panel ---------- */
.panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -10px -10px 10px;
  padding: 6px 10px;
  border-radius: 10px 10px 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

#panel-sprite {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.12);
}

.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

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

.kv dd {
  margin: 0;
  font-weight: 600;
}

/* ---------- Level and evolution (tower panel) ---------- */
.panel-lv {
  margin-left: auto;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: 13px;
  text-shadow: none;
}

.level-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.level-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.level-head b {
  font-family: var(--display);
  font-size: 18px;
  color: var(--gold);
}

.level-head small {
  color: var(--muted);
  font-size: 12px;
}

.level-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.level-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5ee08a, #ffcb05);
}

.evo-note {
  color: var(--muted);
  font-size: 12px;
}

.evo-note.ready {
  color: var(--gold);
  font-weight: 700;
}

.evolve-btn {
  width: 100%;
  animation: evolve-glow 1.2s ease-in-out infinite alternate;
}

@keyframes evolve-glow {
  from {
    box-shadow: 0 0 0 rgba(255, 203, 5, 0);
  }
  to {
    box-shadow: 0 0 14px rgba(255, 203, 5, 0.75);
  }
}

.level-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.level-buttons button {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 2px;
  font-family: var(--display);
  font-weight: 700;
}

.level-buttons small {
  font-family: system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
}

/* Evolution prompt */
.evolve-row {
  align-items: center;
}

.evolve-arrow {
  font-size: 28px;
  color: var(--gold);
}

.evolve-to canvas {
  animation: evolve-pulse 1s ease-in-out infinite alternate;
}

@keyframes evolve-pulse {
  from {
    filter: brightness(1) drop-shadow(0 0 0 #fff);
  }
  to {
    filter: brightness(1.6) drop-shadow(0 0 10px #fff);
  }
}

.evolve-actions {
  justify-content: center;
  gap: 8px;
}

.note {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

/* ---------- Collapsible side panel ---------- */
.side-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 50;
  display: flex;
  gap: 6px;
  transition: right 0.22s ease;
}

.side-toggle {
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid rgba(255, 203, 5, 0.55);
  background: var(--hud);
  color: #fff;
  font-family: var(--display);
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}

.side-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Collapsed: the map takes the full width; the panel slides in over it on demand. */
#app.panel-collapsed {
  grid-template-columns: 1fr;
}

#app.panel-collapsed #side {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 312px;
  z-index: 40;
  transform: translateX(105%);
  transition: transform 0.22s ease;
  box-shadow: -14px 0 34px rgba(0, 0, 0, 0.5);
}

#app.panel-collapsed.panel-open #side {
  transform: none;
}

/* Keep the controls beside the panel while it's slid in. */
#app.panel-collapsed.panel-open .side-controls {
  right: 324px;
}

@media (max-width: 760px) {
  .side-controls {
    display: none;
  }
}

/* ---------- Scrollbar ---------- */
#side::-webkit-scrollbar {
  width: 10px;
}

#side::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 6px;
}

@media (max-width: 760px) {
  #app {
    grid-template-columns: 1fr;
    grid-template-rows: 58vh auto;
    height: auto;
    min-height: 100vh;
  }

  #side {
    border-left: none;
    border-top: 3px solid var(--line);
    padding: 12px 16px;
  }
}

/* ================= Pokémon Center (gacha, collection, milestones) ================= */
.ico.sp {
  background: radial-gradient(circle at 35% 30%, #fff, #9be7ff 45%, #3d7dca);
  color: #fff;
  font-size: 12px;
  box-shadow: inset 0 0 0 2px #2b5aa0;
}

.meta-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.meta-bar .sp-balance {
  margin-right: auto;
}

.sp-balance {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  color: #cfe8ff;
}

.meta {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(5, 8, 20, 0.72);
  backdrop-filter: blur(3px);
  padding: 16px;
}

.meta[hidden] {
  display: none;
}

.meta-card {
  width: min(980px, 100%);
  max-height: min(760px, 100%);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(90% 50% at 50% 0%, rgba(61, 125, 202, 0.3), transparent 70%),
    linear-gradient(180deg, var(--card-hi), var(--panel));
  border: 3px solid var(--gold);
  border-radius: 18px;
  box-shadow:
    0 0 0 4px #0d1226,
    0 24px 70px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.meta-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 2px solid var(--line);
}

/* On the website the top bar already shows the balance; the Pokémon Center pages don't repeat it
   (the game page's pop-up Pokémon Center still does). */
.meta.inline .meta-head .sp-balance {
  display: none;
}

.meta-head h2 {
  margin: 0 auto 0 0;
  font-family: var(--pixel);
  font-size: 26px;
  color: var(--gold);
  text-shadow: 0 2px 0 #3d4fa0;
}

.meta-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
}

.meta-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 16px 0;
}

.meta-tabs[hidden] {
  display: none;
}

.meta-tabs button {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px 10px 0 0;
  border-bottom: none;
}

.meta-tabs button[aria-selected='true'] {
  background: var(--gold);
  color: #3a2c00;
  border-color: var(--gold-deep);
}

.meta-body {
  padding: 16px;
  overflow-y: auto;
}

.meta-lead {
  color: var(--muted);
  margin: 0 0 14px;
}

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

.portrait {
  image-rendering: pixelated;
}

.portrait.silhouette {
  filter: brightness(0) opacity(0.35);
}

.type-chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Starter pick */
.starter-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.starter-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px;
  border: 3px solid color-mix(in srgb, var(--type) 60%, var(--line));
  background: radial-gradient(70% 60% at 50% 35%, color-mix(in srgb, var(--type) 35%, transparent), var(--card) 75%);
}

.starter-card:hover:not(:disabled) {
  border-color: var(--type);
  transform: translateY(-3px);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--type) 45%, transparent);
}

.starter-name {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
}

.starter-card small {
  color: var(--muted);
}

/* Summon */
.banner-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

/* Banner tabs: small copies of each banner's splash art, titled in its colour. */
.banner-tab {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 480 / 195;
  container-type: inline-size;
  text-align: left;
  opacity: 0.72;
  transition: opacity 0.15s, transform 0.15s;
}

.banner-tab:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.banner-tab.on {
  opacity: 1;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold), 0 6px 18px rgba(0, 0, 0, 0.35);
}

.tab-art {
  display: block;
  width: 100%;
  height: 100%;
}

.tab-label {
  position: absolute;
  left: 5cqw;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  max-width: 34%;
  font-family: var(--display);
}

.tab-label span {
  color: #fff;
  font-weight: 700;
  font-size: clamp(11px, 6.4cqw, 20px);
  line-height: 1.05;
  font-style: italic;
  text-shadow: 0 1px 0 var(--ink), 0 0 6px rgba(0, 0, 0, 0.6);
}

.tab-label small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  font-size: clamp(9px, 3.6cqw, 12px);
  font-weight: 600;
}

/* The selected banner: wish-style splash on top, rates and summon buttons below. */
.banner-hero {
  border-radius: 14px;
  border: 2px solid var(--line);
  background: #141a33;
  overflow: hidden;
}

.banner-limited {
  border-color: var(--gold);
}

.wish-banner {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 1280 / 520;
  overflow: hidden;
}

.wish-banner::after {
  /* A slow sheen sweeping across the art. */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%);
  background-size: 250% 100%;
  animation: wish-sheen 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes wish-sheen {
  0%, 35% { background-position: 120% 0; }
  70%, 100% { background-position: -20% 0; }
}

.wish-art {
  display: block;
  width: 100%;
  height: 100%;
}

.wish-text {
  position: absolute;
  left: 4.5cqw;
  top: 0;
  bottom: 0;
  width: 30cqw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.9cqw;
  font-family: var(--display);
}

.wish-kicker {
  align-self: flex-start;
  padding: 0.3cqw 1.2cqw;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 1.6cqw;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wish-title {
  margin: 0;
  color: #fff;
  font-size: 4.8cqw;
  font-weight: 800;
  line-height: 1;
  font-style: italic;
  text-shadow: 0 0.25cqw 0 var(--ink), 0 0 1.6cqw var(--accent), 0 0.4cqw 1.2cqw rgba(0, 0, 0, 0.45);
}

.wish-new {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.5cqw;
  font-weight: 600;
  text-shadow: 0 0.15cqw 0.4cqw rgba(0, 0, 0, 0.5);
}

.wish-plate {
  align-self: flex-start;
  display: grid;
  gap: 0.2cqw;
  margin-top: 1.2cqw;
  padding: 0.8cqw 1.6cqw 0.8cqw 1.2cqw;
  border-left: 0.5cqw solid var(--accent);
  border-radius: 0 1cqw 1cqw 0;
  background: linear-gradient(90deg, rgba(20, 22, 40, 0.88), rgba(20, 22, 40, 0.6));
  color: #fff;
}

.wish-plate b {
  font-size: 2.2cqw;
}

.wish-stars {
  color: #ffd84d;
  font-size: 1.5cqw;
  letter-spacing: 0.1em;
}

.wish-plate small {
  color: #c9cde0;
  font-size: 1.2cqw;
}

.wish-timer {
  color: #ffe27a;
  text-shadow: 0 0.15cqw 0.4cqw rgba(0, 0, 0, 0.5);
  font-size: 1.4cqw;
  font-weight: 700;
}

.wish .banner-info {
  padding: 14px 16px 16px;
}

.banner-info h3 {
  font-size: 20px;
  margin-bottom: 4px;
}

.banner-info p {
  margin: 0 0 8px;
  color: #d6dcf5;
}

.rates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}

.rates li {
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid var(--r);
  font-size: 12px;
}

.rates b {
  color: var(--r);
}

.pity {
  font-size: 13px;
}

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

.pull-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
}

.pull-row .primary {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 140px;
}

.pull-row .primary small {
  font-size: 13px;
  opacity: 0.85;
}

/* Reveal */
.reveal-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.reveal-grid.single {
  grid-template-columns: minmax(180px, 240px);
  justify-content: center;
}

.reveal-card {
  position: relative;
  min-height: 170px;
  border-radius: 14px;
  border: 3px solid var(--line);
  background: var(--card);
  display: grid;
  place-items: center;
  overflow: hidden;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.reveal-card .face {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px;
  text-align: center;
}

.reveal-card.open {
  border-color: var(--r);
  box-shadow: 0 0 22px color-mix(in srgb, var(--g) 60%, transparent);
  background: radial-gradient(70% 60% at 50% 40%, color-mix(in srgb, var(--r) 30%, transparent), var(--card) 75%);
  animation: pop-in 0.35s ease-out;
}

.reveal-card.open .ball-wrap {
  display: none;
}

.reveal-card.open .face {
  display: flex;
}

.reveal-card.rarity-legendary.open {
  box-shadow:
    0 0 0 2px var(--gold),
    0 0 36px rgba(255, 203, 5, 0.75);
}

.shake {
  animation: shake 0.6s ease-in-out infinite;
}

.r-name {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
}

.r-rarity {
  font-size: 12px;
  font-weight: 700;
  color: var(--r);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge {
  font-size: 12px;
  color: var(--gold);
}

.badge.new {
  color: #3a2c00;
  background: var(--gold);
  padding: 1px 8px;
  border-radius: 999px;
}

.badge.refund {
  color: #9be7ff;
}

.legendary-flash {
  animation: flash 0.9s ease-out;
}

@keyframes shake {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-14deg);
  }
  75% {
    transform: rotate(14deg);
  }
}

@keyframes pop-in {
  from {
    transform: scale(0.7);
    opacity: 0.3;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes flash {
  0% {
    box-shadow: inset 0 0 0 999px rgba(255, 240, 160, 0.45);
  }
  100% {
    box-shadow: inset 0 0 0 999px rgba(255, 240, 160, 0);
  }
}

/* Item icons */
.item-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--item) 55%, color-mix(in srgb, var(--item) 60%, #000));
  color: #1b1b1b;
  font-weight: 800;
  font-size: 13px;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* An item's sprite on its orb (the Marketplace): a softer orb so the picture reads. */
.item-icon.has-picture {
  background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--item) 45%, #fff), color-mix(in srgb, var(--item) 35%, var(--card)) 70%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12), 0 2px 6px rgba(0, 0, 0, 0.35);
}

.item-icon.has-picture img {
  image-rendering: pixelated;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
}

/* Collection */
.dex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.dex-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px;
  border-radius: 12px;
  border: 2px solid color-mix(in srgb, var(--r) 70%, var(--line));
  background: radial-gradient(70% 55% at 50% 40%, color-mix(in srgb, var(--r) 18%, transparent), var(--card) 80%);
}

.dex-card.locked {
  opacity: 0.6;
}

.dex-top {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
  gap: 4px;
}

.dex-stars {
  color: var(--gold);
  letter-spacing: 1px;
}

.dex-base {
  color: var(--muted);
  font-size: 12px;
}

.item-select {
  width: 100%;
  margin-top: 4px;
  font: inherit;
  font-size: 12px;
  padding: 3px 4px;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}

.bag {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.bag-item {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 10px;
  border: 2px solid color-mix(in srgb, var(--r) 60%, var(--line));
  background: var(--card);
}

.bag-item small {
  display: block;
  color: var(--muted);
}

/* Milestones */
.milestones {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.milestone {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--card);
}

.milestone > div {
  flex: 1;
}

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

.milestone .bar {
  height: 7px;
  margin: 4px 0 2px;
  border-radius: 4px;
  background: var(--bg);
  overflow: hidden;
}

.milestone .bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #6ec6ff, var(--gold));
}

.milestone .reward {
  font-family: var(--display);
  font-weight: 700;
  color: #9be7ff;
  white-space: nowrap;
}

.milestone.done {
  border-color: rgba(94, 224, 138, 0.5);
}

.milestone.done .reward {
  color: var(--ok);
}

/* Milestone sections and their reward chips (Star Pieces, Heart Scales, items, Pokémon). */
.ms-head {
  margin: 14px 0 0;
  font-family: var(--display);
  font-size: 18px;
}

.ms-head small {
  margin-left: 6px;
  font-size: 13px;
  color: var(--muted);
}

.ms-blurb {
  margin: 0 0 2px;
  font-size: 13px;
  color: var(--muted);
}

.milestone > .ms-reward {
  flex: 0 1 auto;
  max-width: 48%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.rw-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.rw-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 4px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--r, var(--line)) 60%, var(--line));
  background: var(--bg);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.rw-chip .ico.sp {
  color: #9be7ff;
}

.rw-chip.hs .ico.hs {
  color: #ff7aa2;
}

.rw-chip .item-icon {
  font-size: 9px;
}

.milestone.done .rw-chips {
  opacity: 0.5;
}

@media (max-width: 640px) {
  .milestone {
    flex-wrap: wrap;
  }

  .milestone > .ms-reward {
    max-width: 100%;
    align-items: flex-start;
  }

  .rw-chips {
    justify-content: flex-start;
  }
}

.shop-stars {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 1px;
}

@media (max-width: 760px) {
  .banner-hero,
  .starter-row {
    grid-template-columns: 1fr;
  }

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

  .banner-tabs {
    grid-template-columns: 1fr;
  }
}

.shop-body > span {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
}

.starter-mode .meta-close {
  display: none;
}

.meta-head h2 {
  font-family: var(--display);
  font-weight: 700;
}

/* ================= Website main menu ================= */
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  text-decoration: none;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 10px;
  padding: 6px 11px;
  cursor: pointer;
}

a.button:hover {
  border-color: var(--blue);
  background: var(--card-hi);
}

a.button.primary {
  font-family: var(--display);
  font-weight: 600;
  background: linear-gradient(180deg, #ffe066, var(--gold) 55%, #f0b400);
  color: #3a2c00;
  border-color: var(--gold-deep);
  box-shadow: 0 3px 0 var(--gold-deep);
}

a.button.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body.menu-page {
  height: auto;
  min-height: 100%;
  background:
    radial-gradient(60% 40% at 15% 0%, rgba(61, 125, 202, 0.35), transparent 70%),
    radial-gradient(50% 40% at 90% 10%, rgba(255, 203, 5, 0.12), transparent 70%),
    var(--bg);
}

.menu-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  background: rgba(13, 18, 38, 0.82);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--line);
}

.menu-top .brand {
  padding: 0;
}

.menu-main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.menu-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: center;
  padding: 22px;
  border-radius: 18px;
  border: 3px solid var(--line);
  background:
    radial-gradient(70% 90% at 20% 50%, rgba(122, 199, 76, 0.35), transparent 70%),
    linear-gradient(135deg, #1d3d2a, #16224a 70%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.team-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  padding: 14px;
  border-radius: 14px;
  background: rgba(13, 18, 38, 0.45);
  min-height: 80px;
}

.team-strip .portrait {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
}

.hero-copy h2 {
  margin: 0 0 6px;
  font-family: var(--pixel);
  font-size: 34px;
  color: var(--gold);
  text-shadow: 0 3px 0 #3d4fa0;
}

.hero-copy p {
  color: #d6dcf5;
  margin: 0 0 14px;
}

a.button.play {
  font-size: 24px;
  padding: 10px 44px;
  border-radius: 14px;
  box-shadow: 0 5px 0 var(--gold-deep);
}

a.button.play:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--gold-deep);
}

.hero-stats {
  margin-top: 12px !important;
  font-size: 13px;
  color: var(--muted) !important;
}

/* The Pokémon Center embedded on the page instead of a modal. */
.meta.inline {
  position: static;
  display: block;
  background: none;
  backdrop-filter: none;
  padding: 0;
}

.meta.inline .meta-card {
  max-height: none;
  width: 100%;
}

#toast.menu-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  top: auto;
  transform: translate(-50%, 8px);
  z-index: 60;
}

#toast.menu-toast.show {
  transform: translate(-50%, 0);
}

.menu-foot {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 0 16px 24px;
}

@media (max-width: 760px) {
  .menu-hero {
    grid-template-columns: 1fr;
  }
}

/* ---------- Team bar (top of the homepage) ---------- */
.team-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 12px;
  border-radius: 14px;
  background: rgba(29, 38, 80, 0.75);
}

.team-label {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  line-height: 1.1;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.team-label b {
  font-family: var(--display);
  font-size: 15px;
  color: var(--gold);
  letter-spacing: 0;
}

.team-slots {
  display: grid;
  grid-template-columns: repeat(10, 34px);
  gap: 3px;
}

.team-slot {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), rgba(13, 18, 38, 0.5) 75%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Each Pokémon plays its idle animation (menu.js); hovering the bar makes them hop in a wave,
   and a Pokémon that just joined pops in. */
.team-slot canvas {
  transform-origin: 50% 90%;
  transition: transform 0.18s ease;
}

.team-bar:hover .team-slot:not(.empty) canvas {
  animation: slot-hop 0.42s ease calc(var(--i, 0) * 45ms);
}

.team-slot:not(.empty):hover canvas {
  transform: scale(1.18);
}

.team-slot.joined {
  animation: slot-join 0.55s cubic-bezier(0.3, 1.6, 0.5, 1);
}

@keyframes slot-hop {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px) scale(1.04, 0.96); }
  70% { transform: translateY(0) scale(1.06, 0.94); }
}

@keyframes slot-join {
  0% { transform: scale(0.3); box-shadow: 0 0 0 0 rgba(255, 203, 5, 0.8); }
  60% { transform: scale(1.15); box-shadow: 0 0 14px 4px rgba(255, 203, 5, 0.5); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .team-bar:hover .team-slot canvas,
  .team-slot.joined {
    animation: none;
  }
}

.team-slot.empty .ico.ball {
  width: 14px;
  height: 14px;
  opacity: 0.25;
}

.team-toggle {
  width: 100%;
  margin-top: 4px;
  font-size: 12px;
  padding: 4px 6px;
}

.team-toggle.on {
  border-color: var(--ok);
  color: var(--ok);
}

@media (max-width: 900px) {
  .menu-top {
    flex-wrap: wrap;
  }

  .team-bar {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .team-slots {
    grid-template-columns: repeat(10, minmax(0, 30px));
  }

  .team-slot {
    width: 30px;
    height: 30px;
  }

  .team-slot canvas {
    width: 28px;
    height: 28px;
  }
}

/* ---------- Homepage side navigation ---------- */
.menu-shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.side-nav {
  position: sticky;
  top: 58px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: calc(100vh - 58px);
  overflow-y: auto;
  padding: 12px 12px 16px;
  border-right: 2px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 27, 56, 0.85), rgba(13, 18, 38, 0.6));
}

/* Nav sections (Play, Pokémon, Free Stuff, Economy), each under a small heading. */
.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-group + .nav-group {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.nav-group-title {
  padding: 2px 14px 4px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c3cbf0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  flex: none;
  fill: currentColor;
}

.nav-item:hover {
  color: var(--ink);
  background: var(--card);
}

.nav-item[aria-current='page'] {
  color: var(--gold);
  background: var(--card-hi);
  border-color: rgba(255, 203, 5, 0.55);
  box-shadow: inset 4px 0 0 var(--gold);
}

/* My Team's sub-links, shown under it while a My Team page is open. */
.nav-sub {
  display: none;
  flex-direction: column;
  gap: 2px;
  margin: -2px 0 4px 26px;
  padding-left: 10px;
  border-left: 2px solid var(--line);
}

.nav-sub.open {
  display: flex;
}

.nav-subitem {
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
}

.nav-subitem:hover {
  color: var(--ink);
  background: var(--card);
}

.nav-subitem[aria-current='page'] {
  color: var(--gold);
  background: var(--card-hi);
}

.nav-item.nav-play {
  margin-top: auto;
  justify-content: center;
  color: #3a2c00;
  background: linear-gradient(180deg, #ffe066, var(--gold) 55%, #f0b400);
  border-color: var(--gold-deep);
  box-shadow: 0 3px 0 var(--gold-deep);
}

.nav-item.nav-play:hover {
  color: #3a2c00;
  background: linear-gradient(180deg, #fff09a, #ffd633 55%, #f5bd00);
}

.nav-item.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.menu-shell .menu-main {
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
}

.menu-shell #center[hidden],
.menu-shell .menu-hero[hidden] {
  display: none;
}

@media (max-width: 760px) {
  .menu-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  /* On phones the side nav becomes a bottom tab bar. */
  .side-nav {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    height: auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    border-right: none;
    border-top: 2px solid var(--line);
    background: rgba(13, 18, 38, 0.95);
  }

  /* The bottom bar shows every item in one row: the groups and their headings drop away. */
  .nav-group,
  .nav-group + .nav-group {
    display: contents;
  }

  .nav-group-title {
    display: none;
  }

  /* Ten tabs don't fit a phone's width: each keeps a comfortable size and the bar scrolls. */
  .nav-item {
    flex: 1 0 64px;
    flex-direction: column;
    gap: 2px;
    padding: 6px 2px;
    font-size: 11px;
    text-align: center;
  }

  .nav-item[aria-current='page'] {
    box-shadow: inset 0 3px 0 var(--gold);
  }

  .nav-item.nav-play {
    margin-top: 0;
  }

  /* The in-page tab row covers My Team's sub-tabs on phones. */
  .nav-sub.open {
    display: none;
  }

  body.menu-page {
    padding-bottom: 76px;
  }
}

/* ---------- First-time starter page ---------- */
.starter-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px 16px;
}

.starter-main {
  width: min(900px, 100%);
}

.starter-welcome {
  text-align: center;
  margin-bottom: 18px;
}

.starter-welcome .ico.ball.big {
  width: 56px;
  height: 56px;
  animation: shake 1.6s ease-in-out infinite;
}

.starter-welcome h1 {
  margin: 10px 0 6px;
  font-family: var(--pixel);
  font-size: 42px;
  color: var(--gold);
  text-shadow:
    0 3px 0 #3d4fa0,
    0 5px 0 #22306e;
}

.starter-welcome p {
  margin: 0;
  color: #d6dcf5;
  font-size: 16px;
}

.starter-page .meta-lead {
  display: none;
}

.starter-page.leaving .starter-main {
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 0.6s,
    transform 0.6s;
}

.starter-page .meta-head {
  display: none;
}

/* ---------- Home (landing dashboard) ---------- */
.view[hidden] {
  display: none;
}

.view-title {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 26px;
  color: var(--gold);
}

.home-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px;
  margin-bottom: 18px;
  border-radius: 18px;
  border: 3px solid var(--line);
  background:
    radial-gradient(60% 120% at 12% 50%, rgba(122, 199, 76, 0.4), transparent 70%),
    linear-gradient(135deg, #1d3d2a, #16224a 70%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.home-partner {
  flex: none;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), rgba(13, 18, 38, 0.4) 70%);
  box-shadow: inset 0 0 0 3px rgba(255, 203, 5, 0.45);
}

.home-greeting h2 {
  margin: 0 0 6px;
  font-family: var(--pixel);
  font-size: 32px;
  color: var(--gold);
  text-shadow: 0 3px 0 #3d4fa0;
}

.home-greeting p {
  margin: 0 0 12px;
  color: #d6dcf5;
}

.home-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-stat {
  display: flex;
  flex-direction: column;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(13, 18, 38, 0.5);
  font-size: 12px;
  color: var(--muted);
}

.home-stat b {
  font-family: var(--display);
  font-size: 20px;
  color: var(--ink);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.home-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  transition:
    transform 0.12s,
    border-color 0.15s,
    box-shadow 0.15s;
}

.home-card:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.home-card b {
  font-family: var(--display);
  font-size: 20px;
}

.home-card small {
  color: var(--muted);
}

/* ---------- Challenges, Trainer Card and Lottery pages (src/ui/pages.js) ---------- */
.ch-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.ch-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--card);
}

.ch-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
}

.ch-card .button,
.ch-card button {
  align-self: flex-start;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.ch-card .button small,
.ch-card button small {
  display: block;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.85;
}

.ch-card.locked {
  opacity: 0.7;
}

.ch-section {
  margin-top: 22px;
}

.ch-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ch-tag {
  padding: 1px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12.5px;
  color: #10183a;
  background: var(--gold);
}

.rule-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--ink);
}

.ch-status {
  margin: 0;
  font-size: 13.5px;
}

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

.legend-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend-row canvas {
  flex: none;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 10px rgba(255, 224, 120, 0.45));
}

.gym-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.gym-card {
  border-color: color-mix(in srgb, var(--gem) 55%, var(--line));
}

.gym-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gym-head > div {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.gym-head b {
  font-family: var(--display);
  font-size: 18px;
}

.gym-head small {
  color: var(--muted);
}

.gym-quote {
  margin: 0;
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
}

/* A Gym badge: an octagonal gem in the Gym's colour, greyed out until earned. */
.badge-gem {
  display: inline-block;
  flex: none;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  background: #3a446f;
}

.badge-gem.earned {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.85), transparent 35%),
    linear-gradient(135deg, var(--gem), color-mix(in srgb, var(--gem) 55%, #000));
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--gem) 70%, transparent));
}

.elite-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: elite;
}

.elite-steps li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--bg);
}

.elite-steps li small {
  color: var(--muted);
}

.elite-steps li.beaten {
  border-color: var(--ok);
}

.elite-steps li.beaten b::after {
  content: ' ✓';
  color: var(--ok);
}

.elite-steps li.next {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(255, 203, 5, 0.3);
}

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

.trainer-card {
  display: flex;
  gap: 18px;
  padding: 18px;
  border-radius: 16px;
  border: 3px solid #5a7bd8;
  background:
    linear-gradient(135deg, rgba(90, 123, 216, 0.25), transparent 60%),
    var(--card);
}

.tc-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.tc-left canvas {
  border-radius: 12px;
  background: var(--bg);
  image-rendering: pixelated;
}

.tc-level {
  font-family: var(--display);
  font-size: 20px;
  color: var(--gold);
}

.tc-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tc-main h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 24px;
}

.tc-xp {
  height: 10px;
  border-radius: 5px;
  background: var(--bg);
  overflow: hidden;
}

.tc-xp span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #6ec6ff, var(--gold));
}

.tc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin: 6px 0 0;
}

.tc-stats div {
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--bg);
}

.tc-stats dt {
  font-size: 12px;
  color: var(--muted);
}

.tc-stats dd {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
}

.badge-case {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--card);
}

.badge-case figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.medal-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.medal-sum {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--card);
}

.medal-sum b {
  font-family: var(--display);
}

.medal-sum small {
  color: var(--muted);
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.research-node {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--card);
}

.research-node.on {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
}

.rn-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rn-head b {
  flex: 1;
  font-family: var(--display);
}

.rn-pips {
  display: flex;
  gap: 3px;
}

.rn-pips i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
}

.rn-pips i.on {
  background: var(--gold);
  border-color: var(--gold-deep);
}

.research-node button {
  font-size: 12.5px;
}

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

.lotto-tickets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.lotto-ticket {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  border: 2px dashed #f5c542;
  font-family: var(--pixel);
  font-size: 16px;
  letter-spacing: 0.12em;
  color: #ffe9a3;
  background: rgba(245, 197, 66, 0.1);
}

.lotto-number {
  font-family: var(--pixel) !important;
  font-size: 34px !important;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.lotto-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.lotto-table td {
  padding: 5px 4px;
  border-top: 1px solid var(--line);
}

.lotto-table td small {
  display: block;
  color: var(--muted);
}

.lotto-results td {
  text-align: left;
}

@media (max-width: 640px) {
  .trainer-card {
    flex-direction: column;
  }

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

/* Home: What's New and At a Glance, side by side under the greeting. */
.home-info {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 14px;
}

@media (max-width: 860px) {
  .home-info {
    grid-template-columns: minmax(0, 1fr);
  }
}

.home-card.static:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: none;
}

.news-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.news-list li + li {
  border-top: 1px solid var(--line);
}

.news-list a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 6px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}

.news-list a:hover {
  background: var(--card-hi);
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.news-tag {
  padding: 0 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11.5px;
  color: #10183a;
  background: #b6bee3;
}

.news-tag.tag-promo { background: #6fd3ff; }
.news-tag.tag-maps { background: #8fe08a; }
.news-tag.tag-feature { background: var(--gold); }
.news-tag.tag-update { background: #d7b4ff; }

.home-card .news-new {
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #ff7a8a;
}

.news-meta time {
  margin-left: auto;
}

.home-card .news-title {
  font-size: 16px;
}

.glance-list {
  margin: 6px 0 0;
  display: flex;
  flex-direction: column;
}

.glance-list div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 2px;
  font-size: 13.5px;
}

.glance-list div + div {
  border-top: 1px solid var(--line);
}

.glance-list dt {
  color: var(--muted);
  font-weight: 600;
}

.glance-list dd {
  margin: 0;
}

.glance-list a {
  color: #9fd4ff;
  text-decoration: none;
  font-weight: 600;
}

.glance-list a:hover {
  text-decoration: underline;
}

.home-card .glance-ready {
  font-family: inherit;
  font-size: inherit;
  color: var(--ok);
}

.card-kicker {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
}

.card-continue {
  background: linear-gradient(135deg, #2a5a2f, #1d2650 75%);
}

.card-cta {
  margin-top: auto;
  align-self: flex-start;
  padding: 6px 16px;
  border-radius: 10px;
  font-family: var(--display);
  font-weight: 700;
  color: #3a2c00;
  background: linear-gradient(180deg, #ffe066, var(--gold) 55%, #f0b400);
  box-shadow: 0 3px 0 var(--gold-deep);
}

.card-banner {
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, #5a1f78, #1b1648 70%);
  border-color: rgba(255, 203, 5, 0.6);
}

.card-banner .card-kicker {
  align-self: flex-start;
}

.card-banner canvas {
  filter: drop-shadow(0 0 10px rgba(255, 203, 5, 0.6));
}

.mini-team {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 4px 0;
}

.goal-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}

.goal-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
}

.goal-reward {
  color: #9be7ff;
  font-weight: 700;
}

.goal-list .bar {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 3px;
  background: var(--bg);
  overflow: hidden;
}

.goal-list .bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #6ec6ff, var(--gold));
}

/* ---------- Play (map select) ---------- */
.map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.map-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid var(--gold);
  background: var(--card);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.map-card.locked {
  border-color: var(--line);
  opacity: 0.6;
  box-shadow: none;
}

.map-art {
  position: relative;
  height: 180px;
  display: grid;
  place-items: center;
  font-size: 34px;
  overflow: hidden;
}

/* The real map picture (baked from the game's own map painter). */
.map-art .map-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-num {
  position: absolute;
  top: 8px;
  left: 8px;
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(10, 14, 30, 0.8);
  color: var(--gold);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.map-lock {
  position: relative;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.map-card.locked .map-art .map-thumb {
  filter: grayscale(0.85) brightness(0.6);
}

/* The next map to play on the journey. */
.map-card.current {
  box-shadow:
    0 0 0 3px rgba(255, 203, 5, 0.35),
    0 12px 30px rgba(0, 0, 0, 0.35);
  animation: current-map 1.6s ease-in-out infinite alternate;
}

@keyframes current-map {
  to {
    box-shadow:
      0 0 0 3px rgba(255, 203, 5, 0.8),
      0 0 26px rgba(255, 203, 5, 0.45);
  }
}

.map-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.map-tag.done {
  background: rgba(94, 224, 138, 0.18);
  color: #5ee08a;
}

.map-tag.locked-tag {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.map-tag.feature {
  background: rgba(143, 211, 255, 0.14);
  color: #8fd3ff;
}

.map-info .map-threat {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 12px;
  color: var(--muted);
}

.map-threat small {
  font-size: 11.5px;
}

.pips {
  display: inline-flex;
  gap: 3px;
}

.pips i {
  width: 12px;
  height: 7px;
  border-radius: 3px;
  background: var(--line);
}

.pips i.on {
  background: linear-gradient(180deg, #ff9f6b, #ff5c6c);
  box-shadow: 0 0 6px rgba(255, 92, 108, 0.5);
}

.map-modes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 6px;
}

.map-modes .button.mode-nuzlocke {
  border-color: #b23a48;
}

/* Medals beside a map's name: Easy bronze, Medium silver, Hard gold, Nuzlocke crimson. A star
   inside marks a flawless clear (no lives lost). */
.medals {
  display: inline-flex;
  gap: 4px;
  margin-left: 10px;
  vertical-align: middle;
}

.medal {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px dashed var(--line);
  font-size: 10px;
  line-height: 1;
  color: #fff;
}

.medal.won {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
}

.medal-easy.won { background: radial-gradient(circle at 35% 30%, #f3c38b, #b5712f); }
.medal-medium.won { background: radial-gradient(circle at 35% 30%, #ffffff, #9ea7b8); color: #3a4152; }
.medal-hard.won { background: radial-gradient(circle at 35% 30%, #fff3a6, #e0a800); color: #5a3e00; }
.medal-nuzlocke.won { background: radial-gradient(circle at 35% 30%, #ff8b8b, #8e1b2a); }

.map-info .map-modes .button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  margin: 0;
  padding: 6px 4px;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.15;
  text-decoration: none;
}

.map-modes .button small {
  font-family: system-ui, sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  opacity: 0.85;
}

.map-modes .button.disabled {
  border: 2px dashed var(--line);
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}

.journey-bar {
  height: 10px;
  margin: 0 0 12px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.journey-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5ee08a, #ffcb05);
}

.map-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px 16px;
}

.map-info h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

.map-tag {
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 203, 5, 0.15);
  color: var(--gold);
}

.map-info p {
  margin: 0;
  color: #d6dcf5;
  font-size: 14px;
}

.map-info .map-stats {
  color: var(--muted);
  font-size: 13px;
}

.map-info .play {
  align-self: flex-start;
  margin-top: 6px;
}

@media (max-width: 760px) {
  .home-hero {
    flex-direction: column;
    text-align: center;
  }

  .home-stats {
    justify-content: center;
  }
}

/* ---------- My Team ---------- */
.sub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--card);
}

.sub-tabs a {
  padding: 6px 16px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
}

.sub-tabs a:hover {
  color: var(--ink);
}

.sub-tabs a[aria-current='page'] {
  color: #3a2c00;
  background: linear-gradient(180deg, #ffe066, var(--gold) 55%, #f0b400);
}

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

.view-lead a {
  color: var(--gold);
}

.view-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

/* Current Team has no intro text, so give the grid some room under the heading. */
#panel-team .view-head {
  margin-bottom: 10px;
}

.view-head .view-title {
  margin-bottom: 4px;
}

.team-size {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  color: var(--muted);
}

.view-lead {
  margin: 0 0 14px;
  color: var(--muted);
}

/* Five across, so a full team of 10 is two rows of five. */
.team-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 22px;
}

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

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

.tm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 8px 6px 6px;
  border-radius: 14px;
  border: 2px solid color-mix(in srgb, var(--r) 70%, var(--line));
  background: radial-gradient(70% 45% at 50% 28%, color-mix(in srgb, var(--type) 30%, transparent), var(--card) 80%);
  text-align: center;
}

.tm-card.empty {
  justify-content: center;
  min-height: 170px;
  font-size: 12px;
  border: 2px dashed var(--line);
  background: rgba(29, 38, 80, 0.35);
  color: var(--muted);
}

.tm-card.empty .ico.ball.big {
  opacity: 0.25;
}

a.tm-card.empty {
  text-decoration: none;
}

a.tm-card.empty:hover {
  border-color: var(--gold-deep);
  color: var(--ink);
}

/* In My Inventory, Pokémon already on the team get a gold edge. */
.tm-card.on-team {
  box-shadow: 0 0 0 2px var(--gold) inset;
}

.tm-on {
  color: var(--gold);
}

.tm-slot {
  position: absolute;
  top: 5px;
  left: 7px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
}

.tm-art {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 70%);
}

.tm-art canvas {
  width: 46px;
  height: 46px;
}

.tm-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--display);
  font-size: 15px;
}

.tm-evo,
.tm-cost {
  font-size: 12px;
  line-height: 1.25;
  color: var(--muted);
}

.tm-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2px 4px;
}

.tm-tags .type-chip {
  padding: 0 6px;
  font-size: 10.5px;
}

.tm-stars {
  color: var(--gold);
  font-size: 11.5px;
  letter-spacing: 0;
}

.tm-card .item-select {
  font-size: 12px;
  padding: 2px 3px;
}

.tm-actions {
  display: grid;
  width: 100%;
  margin-top: 3px;
}

.tm-actions button {
  padding: 3px 6px;
  font-size: 12px;
}

/* ---------- My Items: item inventory ---------- */
.inv-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.inv-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inv-chip {
  padding: 4px 12px;
  border-radius: 999px;
  border: 2px solid color-mix(in srgb, var(--r) 55%, var(--line));
  background: var(--card);
  color: var(--ink);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.inv-chip small {
  margin-left: 2px;
  color: var(--muted);
}

.inv-chip[aria-pressed='true'] {
  border-color: var(--r);
  background: color-mix(in srgb, var(--r) 22%, var(--card));
  box-shadow: 0 0 10px color-mix(in srgb, var(--r) 45%, transparent);
}

.inv-sort {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.inv-sort select {
  font: inherit;
  padding: 4px 6px;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}

.inv-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}

#panel-items.empty .inv-layout {
  grid-template-columns: minmax(0, 1fr);
}

#panel-items.empty .inv-detail,
#panel-items.empty .inv-toolbar {
  display: none;
}

.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
}

.inv-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  padding: 12px 6px 8px;
  border-radius: 12px;
  border: 2px solid color-mix(in srgb, var(--r) 55%, var(--line));
  background: radial-gradient(70% 50% at 50% 30%, color-mix(in srgb, var(--r) 18%, transparent), var(--card) 80%);
  color: var(--ink);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition:
    transform 0.12s,
    border-color 0.12s;
}

.inv-tile:hover {
  transform: translateY(-2px);
  border-color: var(--r);
}

.inv-tile[aria-pressed='true'] {
  border-color: var(--gold);
  box-shadow:
    0 0 0 2px var(--gold) inset,
    0 0 14px rgba(255, 203, 5, 0.3);
}

.inv-tile b {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--display);
  font-size: 14px;
}

.inv-tile small {
  font-size: 12px;
  color: var(--muted);
}

.inv-count {
  position: absolute;
  top: 5px;
  right: 7px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  color: var(--gold);
}

.inv-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 36px 16px;
  border-radius: 14px;
  border: 2px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

.inv-empty b {
  color: var(--ink);
  font-family: var(--display);
  font-size: 18px;
}

.inv-empty a {
  color: var(--gold);
}

.inv-detail {
  position: sticky;
  top: 74px;
  padding: 14px;
  border-radius: 14px;
  border: 2px solid color-mix(in srgb, var(--r) 60%, var(--line));
  background: radial-gradient(90% 40% at 50% 0%, color-mix(in srgb, var(--r) 18%, transparent), var(--card) 85%);
}

.inv-detail:empty {
  display: none;
}

.inv-detail-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inv-detail-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
}

.inv-rarity {
  font-size: 13px;
  font-weight: 700;
  color: var(--r);
}

.inv-desc {
  margin: 10px 0;
}

.inv-detail h4 {
  margin: 12px 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.inv-detail .muted {
  margin: 0;
  font-size: 13px;
}

.inv-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0;
}

.inv-stats div {
  padding: 6px;
  border-radius: 10px;
  background: var(--bg);
  text-align: center;
}

.inv-stats dt {
  font-size: 12px;
  color: var(--muted);
}

.inv-stats dd {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
}

.inv-fits {
  margin: 0;
  font-size: 13px;
}

.inv-holders {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.inv-holders li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 6px;
  border-radius: 10px;
  background: var(--bg);
  font-size: 14px;
}

.inv-holders li > span:nth-child(2) {
  flex: 1;
}

.inv-holders small {
  font-size: 12px;
}

.inv-holders button {
  padding: 2px 8px;
  font-size: 12px;
}

.inv-holder-art {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
}

.inv-give {
  display: flex;
  gap: 6px;
}

.inv-give select {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 13px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}

@media (max-width: 900px) {
  .inv-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .inv-detail {
    position: static;
    order: -1;
  }
}

/* ---------- "New teammates" card after the first match ---------- */
.joined-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(5, 8, 20, 0.7);
  backdrop-filter: blur(3px);
}

.joined-modal .card {
  animation: pop-in 0.35s ease-out;
}

.joined-modal p {
  color: #d6dcf5;
}

.joined-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 10px 0 18px;
}

.joined-row figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.joined-row canvas {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), rgba(13, 18, 38, 0.4) 70%);
  box-shadow: inset 0 0 0 3px rgba(255, 203, 5, 0.45);
}

.joined-row figcaption {
  font-family: var(--display);
  font-weight: 700;
}

/* ---------- Shiny Pokémon (cosmetic) ---------- */
.portrait.is-shiny {
  filter: drop-shadow(0 0 4px rgba(255, 236, 140, 0.9));
}

.tm-card.shiny,
.shop-item.shiny {
  box-shadow: 0 0 0 1px rgba(255, 224, 102, 0.7), 0 0 14px rgba(255, 224, 102, 0.35);
}

/* ---------- Promo Pokémon (src/data/promos.js) ---------- */
/* A "PROMO" ribbon in the corner of any card, button or slot showing a promo Pokémon. */
.promo {
  position: relative;
  box-shadow: 0 0 0 1px rgba(54, 198, 255, 0.75), 0 0 14px rgba(54, 198, 255, 0.35);
}

.promo::before {
  content: 'PROMO';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 1px 6px;
  border-radius: 999px;
  font: 800 10px/1.4 var(--display, inherit);
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(90deg, #0f86c9, #36c6ff 55%, #ff7ab6);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

/* Buttons that clip their overflow: the ribbon sits just inside the top edge. */
.shop-item.promo::before {
  top: 1px;
}

.team-slot.promo::before {
  content: '';
  top: 2px;
  left: auto;
  right: 2px;
  transform: none;
  width: 8px;
  height: 8px;
  padding: 0;
}

.promo-bonus,
.banner-info p.promo-bonus {
  font-size: 12px;
  line-height: 1.35;
  color: #0b5e8f;
  background: #e3f6ff;
  border: 1px solid #9fdcfa;
  border-radius: 8px;
  padding: 3px 7px;
}

.promo-bonus b {
  color: #0b6aa8;
}

/* The Promotional Pokémon page: a note from Professor Oak, the Current Promo table and the past
   promos behind a link. */
.promo-page {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.promo-say {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 85%, #ffffff 15%);
}

.promo-say-art {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  border: 2px solid #e8473a;
  background: #fff;
}

.promo-say p {
  margin: 2px 0 0;
  font-size: 14px;
}

.promo-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
  text-align: center;
}

.promo-table th {
  padding: 8px;
  font-family: var(--display);
  font-size: 15px;
  color: #fff;
  background: linear-gradient(180deg, #4a9af0, #1f5fc4);
}

.promo-table td {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.promo-table td small {
  display: block;
  color: var(--muted);
}

.promo-table .promo-sub {
  font-weight: 700;
  background: color-mix(in srgb, #36c6ff 14%, var(--card));
}

.promo-art canvas {
  display: block;
  margin: 0 auto;
  width: 128px;
  height: 128px;
  image-rendering: pixelated;
}

.promo-obtain {
  min-width: 150px;
  font-weight: 700;
}

.promo-none {
  padding: 22px 12px !important;
}

.promo-past-link {
  align-self: center;
  background: none;
  border: 0;
  font-weight: 700;
  font-size: 15px;
  color: #6fb6ff;
  cursor: pointer;
  text-decoration: underline;
}

.promo-past .promo-table td {
  text-align: left;
}

.promo-past-art {
  width: 56px;
}

.promo-section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.promo-section-head small {
  color: var(--muted);
}

.shiny-toggle {
  align-self: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #6b5600;
  background: #fff3b0;
  border: 1px solid #f5c542;
}

.shiny-toggle[aria-pressed='false'] {
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
}

.shiny-mark {
  font-size: 14px;
}

.badge.shiny-badge {
  color: #4a3a00;
  background: linear-gradient(90deg, #fff3b0, #ffd84d, #fff3b0);
}

.reveal-card.shiny .face {
  position: relative;
}

.reveal-card.shiny .face::before {
  /* A rainbow shimmer behind a shiny pull. */
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 14px;
  background: conic-gradient(from 0deg, #ff8a8a, #ffe066, #8affc1, #7fd3ff, #c99bff, #ff8a8a);
  opacity: 0.35;
  filter: blur(8px);
  animation: shiny-spin 3s linear infinite;
  z-index: -1;
}

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

/* ---------- Daily Prize chests and the Loyalty Shop ---------- */
.hs-balance { color: #ffc2d6; }
.ico.hs { color: #ff6f9a; font-style: normal; }

.card-daily {
  align-items: center;
  text-align: center;
  border-color: #f5c542;
  background: radial-gradient(circle at 50% 35%, rgba(255, 216, 77, 0.18), transparent 70%), var(--card);
}
.card-daily.claimed { border-color: var(--line); background: var(--card); }
.card-daily small { color: var(--muted); }
.card-daily button { margin-top: 6px; }

/* A chest drawn as a Poké Ball in its tier's colours. */
.daily-chest {
  --top: #e53935;
  position: relative;
  width: 64px;
  height: 64px;
  margin: 4px auto;
  border-radius: 50%;
  border: 4px solid #1a1a24;
  background: linear-gradient(var(--top) 0 46%, #1a1a24 46% 54%, #f4f4f4 54%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.daily-chest i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22%;
  height: 22%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #f4f4f4;
  border: 3px solid #1a1a24;
}
.daily-chest[data-tier='great'] { background: linear-gradient(#1e88e5 0 46%, #1a1a24 46% 54%, #f4f4f4 54%); }
.daily-chest[data-tier='ultra'] { background: linear-gradient(#2b2b2b 0 20%, #fdd835 20% 32%, #2b2b2b 32% 46%, #1a1a24 46% 54%, #f4f4f4 54%); }
.daily-chest[data-tier='master'] { background: linear-gradient(#8e24aa 0 46%, #1a1a24 46% 54%, #f4f4f4 54%); box-shadow: 0 0 18px rgba(201, 120, 255, 0.8); }
.daily-chest[data-tier='empty'] { filter: grayscale(1) opacity(0.45); }
.daily-chest.big { width: 120px; height: 120px; border-width: 6px; }
.daily-chest.shaking { animation: chest-shake 0.5s ease-in-out infinite; }
.daily-chest.opened { animation: chest-pop 0.5s ease-out; box-shadow: 0 0 30px rgba(255, 236, 140, 0.9); }
@keyframes chest-shake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-14deg); }
  75% { transform: rotate(14deg); }
}
@keyframes chest-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.chest-card { text-align: center; min-width: 280px; }
.chest-reveal h2 { margin: 8px 0 2px; }
.chest-disguised { margin: 10px 0 0; color: #ffe27a !important; font-weight: 700; }
.chest-streak { margin: 0 0 8px; }
.chest-loot {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  gap: 6px;
  font-family: var(--display);
  font-size: 17px;
}
.chest-loot li { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

/* Loyalty Shop */
.hs-count { display: inline-flex; align-items: center; gap: 4px; }
.shop-tabs { margin-bottom: 12px; }
.shop-note { color: var(--muted); margin: 0 0 12px; }
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.shop-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 10px;
  border-radius: 12px;
  border: 2px solid var(--r, var(--line));
  background: var(--card);
  text-align: center;
}
.shop-card small { color: var(--muted); font-size: 12px; min-height: 2.4em; }
.shop-card button { margin-top: auto; width: 100%; }
.shop-card.deal { box-shadow: 0 0 0 2px #ffd84d, 0 0 16px rgba(255, 216, 77, 0.35); }
.deal-tag {
  position: absolute;
  top: -9px;
  right: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #ffd84d;
  color: #3a2c00;
  font-size: 12px;
  font-weight: 700;
}
.big-sp { font-size: 40px; color: #9ad7ff; font-style: normal; }

/* ---------- Daily Prize page, nav dot and top-right notification ---------- */
/* Header pills: New Promo (promos.js) and Daily Prize, side by side before the balances. */
.top-alerts {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.top-alerts:not(:has(> :not([hidden]))) {
  display: none;
}

.daily-alert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  color: #3a2c00;
  text-decoration: none;
  background: linear-gradient(90deg, #ffe27a, #ffc94d);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), 0 6px 18px rgba(0, 0, 0, 0.35);
  animation: alert-pulse 2s ease-in-out infinite;
}
.daily-alert[hidden] { display: none; }
.promo-alert {
  color: #fff;
  background: linear-gradient(90deg, #0f86c9, #36c6ff);
}

/* Narrower windows: the pills shorten to "Promo" / "Daily" so the balances keep their room, and
   on phones to their icons. */
@media (max-width: 1150px) {
  .alert-long {
    display: none;
  }

  .menu-top {
    gap: 8px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .top-alerts {
    gap: 6px;
  }

  .daily-alert {
    padding: 5px 10px;
  }
}

@media (max-width: 640px) {
  .daily-alert > span:last-child {
    display: none;
  }
}
.daily-alert:hover { filter: brightness(1.05); }
@keyframes alert-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.nav-item { position: relative; }
.nav-dot {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff5a7a;
  box-shadow: 0 0 0 2px var(--panel, #12183a);
}
.nav-dot[hidden] { display: none; }

.dp-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px;
  margin-bottom: 18px;
  border-radius: 14px;
  border: 2px solid #f5c542;
  background: radial-gradient(circle at 15% 50%, rgba(255, 216, 77, 0.2), transparent 55%), var(--card);
}
.dp-hero .daily-chest.big { width: 130px; height: 130px; flex: none; margin: 0; }
.dp-hero .daily-chest.ready { animation: chest-shake 1.6s ease-in-out infinite; }
.dp-info b { font-family: var(--display); font-size: 22px; }
.dp-info p { color: var(--muted); margin: 6px 0 12px; }
.dp-claim { font-size: 17px; padding: 10px 22px; }
.dp-head { margin: 6px 0 10px; font-size: 16px; }
.daily-chest.small { width: 36px; height: 36px; border-width: 3px; margin: 2px auto; }
.dp-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.dp-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--card);
  text-align: center;
}
.dp-day.today { border-color: #f5c542; box-shadow: 0 0 12px rgba(255, 216, 77, 0.3); }
.dp-day.done { opacity: 0.7; }
.dp-day-label { font-family: var(--display); font-weight: 700; font-size: 13px; }
.dp-day small { color: var(--muted); font-size: 12px; }
.dp-odds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.dp-odd {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid var(--c);
  background: var(--card);
}
.dp-odd .daily-chest { grid-row: span 2; margin: 0; }
.dp-odd span { font-family: var(--display); font-weight: 700; color: var(--c); }
.dp-odd small { grid-column: 2 / span 2; color: var(--muted); }
.dp-rules a { color: #ffc2d6; }
@media (max-width: 640px) {
  .dp-hero { flex-direction: column; text-align: center; }
  .dp-week { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Marketplace ---------- */
.mk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.mk-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px 12px;
  border-radius: 12px;
  border: 2px solid color-mix(in srgb, var(--r) 70%, var(--line));
  background: radial-gradient(90% 45% at 50% 0%, color-mix(in srgb, var(--r) 16%, transparent), var(--card) 80%);
  text-align: center;
}
.mk-card > b { font-family: var(--display); font-size: 16px; }
.mk-card small { color: var(--muted); font-size: 12.5px; }
.mk-card .mk-seller { font-style: italic; }
.mk-art { height: 64px; display: grid; place-items: center; }
.mk-tags { position: absolute; top: -9px; right: 8px; display: flex; gap: 4px; }
.mk-tag {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.mk-tag.bargain { background: var(--ok); color: #05321a; }
.mk-tag.shiny { background: #ffd84d; color: #3a2c00; }
.mk-tag.auction { background: var(--blue); color: #fff; }
.mk-market {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.mk-market em { font-style: normal; font-weight: 700; }
.mk-market em.up, .mk-sp.up { color: var(--ok); }
.mk-market em.down, .mk-sp.down { color: var(--danger); }
.spark { width: 60px; height: 18px; }
.spark polyline { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.spark.up polyline { stroke: var(--ok); }
.spark.down polyline { stroke: var(--danger); }
.mk-price { margin-top: auto; padding-top: 4px; font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--gold); }
.mk-card > button { width: 100%; }
.mk-bids { min-height: 0 !important; }
.mk-you { font-size: 12px; font-weight: 700; }
.mk-you.lead { color: var(--ok); }
.mk-you.out { color: var(--danger); }
.mk-bid-row { display: flex; gap: 6px; width: 100%; }
.mk-bid-row input, .mk-field input, .mk-field select {
  min-width: 0;
  flex: 1;
  font: inherit;
  padding: 6px 8px;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}
.mk-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.mk-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  border-radius: 10px;
  border: 2px solid color-mix(in srgb, var(--r) 45%, var(--line));
  background: var(--card);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.mk-pick small { color: var(--muted); font-size: 12px; }
.mk-pick.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold) inset, 0 0 12px rgba(255, 203, 5, 0.3); }
.mk-sell { --r: var(--gold); display: flex; flex-direction: column; gap: 10px; }
.mk-sell-head { display: flex; align-items: center; gap: 12px; }
.mk-sell-head b { display: block; font-family: var(--display); font-size: 19px; }
.mk-sell-head small { color: var(--muted); }
.mk-facts { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin: 0; font-size: 14px; }
.mk-facts dt { color: var(--muted); }
.mk-facts dd { margin: 0; font-weight: 700; }
.mk-mode { display: flex; gap: 6px; }
.mk-field input, .mk-field select { width: 100%; box-sizing: border-box; }
.mk-field { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; }
.mk-outlook { margin: 0; font-weight: 700; }
.mk-outlook small { font-weight: 400; color: var(--muted); }
.mk-outlook.good { color: var(--ok); }
.mk-outlook.warn { color: #ffd84d; }
.mk-outlook.bad { color: var(--danger); }
.mk-warn { margin: 0; font-size: 13px; color: #ffd84d; }
.mk-list { width: 100%; }
.mk-rows { display: flex; flex-direction: column; gap: 8px; }
.mk-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--card);
}
.mk-row-main { flex: 1; min-width: 0; }
.mk-row-main small { color: var(--muted); }
.mk-status { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.mk-status.active { background: color-mix(in srgb, var(--blue) 35%, transparent); color: #cfe2ff; }
.mk-status.sold { background: color-mix(in srgb, var(--ok) 25%, transparent); color: var(--ok); }
.mk-status.out { background: color-mix(in srgb, var(--danger) 25%, transparent); color: var(--danger); }
.mk-status.off { background: color-mix(in srgb, var(--muted) 20%, transparent); color: var(--muted); }
.mk-sp { font-family: var(--display); white-space: nowrap; }
.mk-ghost {
  padding: 5px 12px;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.mk-ghost:hover { border-color: var(--gold); }
@media (max-width: 720px) {
  .mk-row { flex-wrap: wrap; }
}
