:root {
  --navy: #0b1d2e;
  --navy-2: #12324a;
  --sea: #1596c0;
  --aqua: #4ad8d2;
  --sand: #f5f0e4;
  --sand-2: #ece4d1;
  --paper: #fffdf8;
  --ink: #10283a;
  --muted: #5c7080;
  --line: #e3dac4;
  --coral: #ff7a59;
  --coral-deep: #d34d2a;
  --coral-ink: #2a0d05;
  --green: #178a5b;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(16, 40, 58, 0.08);
  --display: "Fredoka", "DM Sans", system-ui, sans-serif;

  /* Colors that change with the theme (see the dark palette below). */
  color-scheme: light;
  --strong: #0b1d2e;
  --tile-hi: #ffffff;
  --field: #ffffff;
  --toast-bg: #0b1d2e;
  --showcase-end: #eaf6f8;
  --notice-bg: #fff4d6;
  --notice-line: #f0d98c;
  --danger: #b4321f;
  --legal-text: #2a3f50;
  --key-bg: #fff4ee;
  --key-line: #ffc7b3;
  --text-mix: #000;
  /* The phone browser's address bar color (app.js copies it into the theme-color meta). */
  --theme-color: #0b1d2e;
}

/* Dark mode. The sidebar, hero and banners are already dark, so this mostly re-colors the
   page, cards, fields and text. The choice is saved, and it follows the system until chosen. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --sand: #0b1621;
  --sand-2: #172c40;
  --paper: #12273a;
  --ink: #e6eff5;
  --muted: #98adbd;
  --line: #27435c;
  --green: #3ddc84;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --strong: #1c6f96;
  --tile-hi: #244560;
  --field: #0d1e2f;
  --toast-bg: #24506e;
  --showcase-end: #133248;
  --notice-bg: #3a3216;
  --notice-line: #6b5a1f;
  --danger: #ff8f80;
  --legal-text: #c7d6e1;
  --key-bg: #3a2219;
  --key-line: #7a3d29;
  --text-mix: #ffffff;
  --theme-color: #0b1621;
}

:root[data-theme="dark"] .sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  /* Opening a popup hides the page's scrollbar. Keeping its space reserved stops the whole page
     from being laid out again (and shifting sideways) every time one opens or closes. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.5;
}

body.drawer-open,
body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  line-height: 1.15;
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
}

.skip-link:focus {
  top: 12px;
}

/* ───────── buttons ───────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--coral);
  color: var(--coral-ink);
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 3px 0 var(--coral-deep);
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--coral-deep);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  filter: none;
  box-shadow: 0 3px 0 var(--coral-deep);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.btn.sm {
  padding: 8px 13px;
  font-size: 0.85rem;
}

.btn.wide {
  width: 100%;
}

.count {
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  font-size: 0.72rem;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
}

.icon-button svg {
  width: 22px;
  height: 22px;
}

.link {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 2px;
}

.link:hover {
  color: var(--ink);
}

/* ───────── layout ───────── */

.layout {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
}

.mobile-bar {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 14px 16px;
  background: linear-gradient(180deg, var(--navy), #0d2740);
  color: #dbe9f2;
}

.brand {
  display: grid;
  place-items: center;
  padding: 2px 0 8px;
}

.brand img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.4));
  transition: transform 0.2s;
}

.brand:hover img {
  transform: scale(1.07) rotate(-3deg);
}

.hero-logo {
  display: block;
  width: 100%;
  aspect-ratio: 2000 / 470;
  object-fit: cover;
  object-position: 50% 52%;
}

.nav {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 12px;
  color: #cfe2ee;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.12s;
}

.nav-toggle {
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
}

.nav-link img {
  width: 34px;
  height: 34px;
  padding: 3px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
  background: rgba(74, 216, 210, 0.18);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--aqua);
}

.nav-link .chevron {
  width: 18px;
  height: 18px;
  margin-left: auto;
  opacity: 0.7;
  transition: transform 0.2s;
}

.nav-group.open > .nav-toggle {
  color: #fff;
}

.nav-group.open .chevron {
  transform: rotate(180deg);
}

.nav-sub {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.22s ease, visibility 0s 0.22s;
}

.nav-group.open .nav-sub {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.22s ease, visibility 0s;
}

.nav-sub > div {
  min-height: 0;
  overflow: hidden;
  margin-left: 27px;
  padding-left: 8px;
  border-left: 2px solid rgba(255, 255, 255, 0.12);
}

.nav-sub-link {
  display: block;
  margin: 2px 0;
  padding: 8px 12px;
  border-radius: 10px;
  color: #b9d2e2;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-sub-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-sub-link.active {
  background: rgba(74, 216, 210, 0.18);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--aqua);
}

.featured-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  text-align: left;
}

.featured-card:hover {
  background: rgba(255, 255, 255, 0.12);
}

.featured-card img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex: none;
}

.featured-card small {
  display: block;
  color: var(--aqua);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.featured-card strong {
  display: block;
  line-height: 1.2;
}

.featured-card .price b {
  font-size: 1rem;
}

.featured-card .price s {
  color: #86a9bf;
}

.sidebar-foot {
  display: grid;
  gap: 10px;
}

.support-link {
  color: #86a9bf;
  font-size: 0.8rem;
  text-align: center;
}

.support-link:hover {
  color: #fff;
}

.content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Pages use as much of the screen as they sensibly can. Grids and cards add columns as the
   space grows, and only very large monitors get side margins. */
#view {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 14px 32px 48px;
  flex: 1;
  outline: 0;
}

/* The home page is mostly a few wide banners, so on big screens it stops at 1440px of content
   and keeps real margins. Category pages keep the full width for their grids and tables. */
#view.is-home {
  max-width: calc(1440px + 64px);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  padding: 22px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

/* Hidden (but still taking its space) until the page above it has loaded, so it never jumps. */
body.store-loading .footer {
  visibility: hidden;
}

.footer p {
  margin: 0;
  flex: 1 1 320px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.footer-brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(6, 20, 32, 0.55);
}

#nav-backdrop {
  z-index: 45;
}

#drawer-backdrop {
  z-index: 55;
}

/* ───────── shared bits ───────── */

.price {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
}

.price s {
  color: var(--muted);
  font-size: 0.82rem;
}

.price b {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
}

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

.chips li {
  padding: 3px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--sand);
  font-size: 0.8rem;
  font-weight: 600;
}

.chips.small li {
  padding: 1px 8px;
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.chips.code li {
  border-radius: 8px;
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 500;
}

.sale-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--coral);
  color: var(--coral-ink);
  font-size: 0.75rem;
  font-weight: 800;
}

.sale-badge.inline {
  position: static;
  margin-left: 10px;
}

/* A pill in front of a category name (`categoryBadges` in store-data.js), e.g. LIMITED. */
.badge {
  display: inline-block;
  padding: 0.1em 0.6em;
  border-radius: 999px;
  background: var(--coral);
  color: var(--coral-ink);
  box-shadow: 0 2px 0 var(--coral-deep);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: max(0.66em, 0.62rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  vertical-align: 0.18em;
}

.notice,
.info-line {
  margin: 0 0 16px;
}

.notice {
  padding: 10px 14px;
  border: 1px solid var(--notice-line);
  border-radius: 12px;
  background: var(--notice-bg);
  font-size: 0.9rem;
}

/* ───────── sale banner ───────── */

.sale-banner {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 22px 0 0;
  padding: 22px 30px;
  overflow: hidden;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(100deg, #d90f5a 0%, #f2500f 55%, #ff8a00 100%);
  box-shadow: 0 16px 36px rgba(242, 80, 15, 0.4), inset 0 -5px 0 rgba(0, 0, 0, 0.16);
}

.sale-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.11) 0 14px, transparent 14px 28px);
}

.sale-banner::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -180px;
  width: 120px;
  z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: shine 3.8s ease-in-out infinite;
}

@keyframes shine {
  0%,
  55% {
    left: -180px;
  }

  100% {
    left: 110%;
  }
}

.sale-burst {
  flex: none;
  display: grid;
  place-content: center;
  width: 116px;
  height: 116px;
  background: #ffe94d;
  color: #c1121f;
  font-family: var(--display);
  line-height: 1;
  text-align: center;
  clip-path: polygon(50% 0, 61% 11%, 76% 5%, 80% 20%, 95% 24%, 90% 39%, 100% 50%, 90% 61%, 95% 76%, 80% 80%, 76% 95%, 61% 89%, 50% 100%, 39% 89%, 24% 95%, 20% 80%, 5% 76%, 10% 61%, 0 50%, 10% 39%, 5% 24%, 20% 20%, 24% 5%, 39% 11%);
  animation: pulse 1.6s ease-in-out infinite;
}

.sale-burst b {
  font-size: 2.1rem;
  font-weight: 700;
}

.sale-burst small {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

@keyframes pulse {
  50% {
    transform: scale(1.09) rotate(-5deg);
  }
}

.sale-copy strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.7rem, 4.2vw, 2.7rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.2);
}

.sale-copy span {
  display: block;
  margin-top: 6px;
  font-size: 1.05rem;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.sale-banner .sale-btn {
  flex: none;
  margin-left: auto;
  padding: 13px 22px;
  background: #fff;
  color: #b3122d;
  font-size: 1.02rem;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
}

.sale-banner .sale-btn:active {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.info-line {
  color: var(--muted);
  font-size: 0.9rem;
}

.section-title {
  font-size: 1.35rem;
  margin: 30px 0 14px;
}

.loading,
.empty {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 70px 20px;
  text-align: center;
  color: var(--muted);
}

.empty h1 {
  color: var(--ink);
  font-size: 1.6rem;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid var(--line);
  border-top-color: var(--sea);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: -5px;
  margin-right: 8px;
}

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

/* ───────── home ───────── */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 24px;
  align-items: center;
  overflow: hidden;
  padding: 38px 42px;
  border-radius: 28px;
  color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, rgba(74, 216, 210, 0.5), transparent 55%),
    linear-gradient(135deg, #0b2f4d, #0f6f9a 65%, #1aa5b8);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--aqua);
}

.hero-logo {
  max-width: 440px;
}

.hero-text {
  margin: 8px 0 22px;
  max-width: 46ch;
  color: #d6ebf5;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.chip-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

.chip-button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.chip-button svg {
  width: 17px;
  height: 17px;
}

.chip-button code {
  padding: 0;
  background: none;
  color: inherit;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.86rem;
}

.hero-art img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 250px;
  margin-left: auto;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.35));
  animation: bob 5s ease-in-out infinite;
}

@keyframes bob {
  50% {
    transform: translateY(-8px);
  }
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 18px;
}

.mode-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.mode-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(16, 40, 58, 0.14);
}

.mode-art,
.cat-art,
.card-art {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 35%, var(--tile-hi), var(--sand));
}

.mode-art img,
.cat-art img,
.card-art img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.mode-body h3 {
  font-size: 1.45rem;
}

.mode-body p {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.mode-body .btn {
  margin-top: 16px;
}

/* Thin single-row cards for a category with only a few packages (Limited Items).
   They sit directly under the server cards, so the grid gap matches .mode-grid. */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
  gap: 18px;
  margin-top: 18px;
}

.showcase-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, var(--paper), var(--showcase-end));
  transition: transform 0.15s, box-shadow 0.15s;
}

.showcase-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.showcase-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
}

.showcase-art {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 35%, var(--tile-hi), var(--sand));
}

.showcase-art img {
  width: 88%;
  height: 88%;
  object-fit: contain;
}

.showcase-info strong {
  display: block;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.15;
}

.showcase-info small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
}

.showcase-foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.showcase-foot .price b {
  font-size: 1.2rem;
}

.showcase-art .sale-badge {
  top: -7px;
  left: -7px;
  padding: 1px 7px;
  font-size: 0.66rem;
}

.banner-stack {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.event-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 20px 28px;
  overflow: hidden;
  border-radius: 26px;
  color: #fff;
  background: radial-gradient(60% 180% at 0% 50%, rgba(255, 214, 64, 0.38), transparent 62%),
    linear-gradient(120deg, #2c1373, #5b2bc4 65%, #8047ff);
  box-shadow: 0 14px 30px rgba(76, 38, 176, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}

.event-banner:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 38px rgba(76, 38, 176, 0.4);
}

.event-banner img {
  flex: none;
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.35));
  transition: transform 0.2s;
}

.event-banner:hover img {
  transform: scale(1.08) rotate(-4deg);
}

.event-copy h3 {
  font-size: 1.9rem;
}

.event-copy p {
  margin: 4px 0 0;
  color: #dccfff;
}

.event-banner .btn {
  flex: none;
  margin-left: auto;
  background: #ffd23f;
  color: #3b2500;
  box-shadow: 0 3px 0 #b78900;
  padding: 11px 20px;
}

.steps ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps li {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: var(--sand-2);
}

.steps li > span {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--strong);
  color: #fff;
  font-family: var(--display);
  font-weight: 600;
}

.steps p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ───────── category pages ───────── */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.crumbs i {
  font-style: normal;
  opacity: 0.5;
}

.crumbs a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.crumbs [aria-current] {
  color: var(--ink);
  font-weight: 700;
}

.page-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 124px;
  padding: 22px 30px;
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  background: radial-gradient(90% 160% at 100% 0%, rgba(74, 216, 210, 0.45), transparent 60%),
    linear-gradient(120deg, #0d3a5e, #1188b3);
}

.page-banner h1 {
  font-size: 2.1rem;
}

.page-banner p {
  margin: 6px 0 0;
  max-width: 48ch;
  color: #d6ebf5;
}

.page-banner img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.3));
}

.nav-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
}

.nav-strip:empty {
  display: none;
}

.seg {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--sand-2);
}

.seg-link {
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
}

.seg-link.active {
  background: var(--strong);
  color: #fff;
}

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

.pill {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
}

.pill:hover {
  border-color: var(--sea);
}

.pill.active {
  background: var(--strong);
  border-color: var(--strong);
  color: #fff;
}

/* Cards sit in a centered, wrapping row, so a few packages are centered on the page and a
   short last row is centered too, instead of hugging the left edge. */
.cat-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.cat-grid > .cat-tile {
  flex: 0 1 260px;
  min-width: 230px;
  max-width: 300px;
}

.cat-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: transform 0.15s, box-shadow 0.15s;
}

.cat-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.cat-tile h3 {
  margin-top: 6px;
  font-size: 1.25rem;
}

.cat-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.cat-foot svg {
  width: 18px;
  height: 18px;
  color: var(--sea);
}

.cat-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ───────── product grid ───────── */

.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.grid > .card {
  flex: 0 1 240px;
  min-width: 210px;
  max-width: 270px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: transform 0.15s, box-shadow 0.15s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card-open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: center;
}

.card-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.2;
}

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

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

.card .pill {
  padding: 4px 12px;
}

.card-meta {
  margin: 0;
  min-height: 1.4em;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

/* ───────── ranks comparison ───────── */

/* A rank's length: Infinite / 30 days pills (the same pills as key pack sizes), or a plain
   label for a rank sold one way. Both take the same height, so prices and buttons line up. */
.rank-head .rank-length {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 30px;
  margin: 0;
}

.rank-length .pill {
  flex: 1;
  min-width: 0;
  padding: 3px 4px;
  font-size: 0.74rem;
  white-space: nowrap;
}

.rank-card .rank-length {
  max-width: 260px;
}

.rank-area {
  container-type: inline-size;
}

.rank-cards {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.rank-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 6px solid var(--accent);
  border-radius: var(--radius);
  background: var(--paper);
}

/* No frame around the table: the empty top-left corner shows the page background, and a
   drop-shadow (which follows the shape of the cells, not a box) gives it depth. */
.compare-wrap {
  filter: drop-shadow(0 10px 22px rgba(16, 40, 58, 0.1));
}

.compare {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.compare .corner,
.compare .row-label {
  width: clamp(210px, 16cqw, 280px);
}

.compare thead .corner {
  padding: 0;
  border: 0;
  background: none;
}

.compare thead th {
  padding: 16px 8px 14px;
  border-top: 5px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--paper));
  vertical-align: top;
  font-weight: 400;
}

.compare td,
.compare .row-label {
  padding: 11px 8px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.compare td {
  text-align: center;
  background: color-mix(in srgb, var(--accent) 5%, var(--paper));
}

.compare .row-label {
  padding-left: 16px;
  text-align: left;
  font-weight: 600;
  background: var(--paper);
}

.compare .row-label code {
  display: inline-block;
  margin: 1px 2px 1px 0;
}

.compare .sec th {
  padding: 9px 16px;
  border-top: 1px solid var(--line);
  background: var(--sand-2);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
}

/* Rounded outer corners, since the table has no clipping frame. */
.compare thead th:nth-child(2) {
  border-top-left-radius: var(--radius);
}

.compare thead th:last-child {
  border-top-right-radius: var(--radius);
}

.compare tbody tr:first-child th {
  border-top-left-radius: var(--radius);
}

.compare tbody tr:last-child .row-label {
  border-bottom-left-radius: var(--radius);
}

.compare tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius);
}

code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--sand);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 500;
}

.yes {
  color: var(--green);
  font-weight: 800;
  font-size: 1.05rem;
}

.no {
  color: #bdb39b;
}

.rank-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.rank-art {
  width: 92px;
  height: 92px;
  padding: 0;
  border: 0;
  background: none;
}

.rank-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.18));
  transition: transform 0.2s;
}

.rank-art:hover img {
  transform: scale(1.07) rotate(-2deg);
}

.rank-head h3 {
  margin-top: 2px;
  font-size: 1.2rem;
  color: color-mix(in srgb, var(--accent) 70%, var(--text-mix));
}

.rank-note {
  margin: 0;
  min-height: 1.2em;
  color: var(--muted);
  font-size: 0.72rem;
}

.rank-term {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-price .rank-term {
  margin-left: 10px;
}

.rank-head .btn.buy {
  width: 100%;
  margin-top: 6px;
  background: color-mix(in srgb, var(--accent) 72%, #fff);
  color: #0d2233;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 70%, #000);
  padding: 9px 6px;
  font-size: 0.82rem;
}

.rank-head .btn.buy:active {
  box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 70%, #000);
}

/* Notes can wrap to two lines ("Includes all MONARCH perks"), so every column reserves
   two lines and the prices and buttons line up across the header row. */
.compare .rank-note {
  min-height: 3em;
}

.compare .rank-head .btn {
  padding-inline: 4px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.compare .rank-head .btn svg {
  display: none;
}

/* On a wide screen the columns are much wider, so the art and text grow with them
   instead of floating in empty space. */
@container (min-width: 1200px) {
  .rank-art {
    width: 118px;
    height: 118px;
  }

  .rank-head h3 {
    font-size: 1.5rem;
  }

  .rank-note {
    font-size: 0.8rem;
  }

  .rank-head .price b {
    font-size: 1.5rem;
  }

  .rank-head .rank-length {
    min-height: 36px;
  }

  .rank-length .pill {
    padding: 5px 6px;
    font-size: 0.85rem;
  }

  .compare .rank-head .btn {
    padding: 11px 8px;
    font-size: 0.9rem;
  }

  .compare td,
  .compare .row-label {
    padding: 14px 10px;
    font-size: 1rem;
  }

  .compare .row-label {
    padding-left: 20px;
  }

  .compare .sec th {
    padding: 11px 20px;
  }
}

@container (max-width: 899px) {
  .compare-wrap {
    display: none;
  }

  .rank-cards {
    display: grid;
  }

  .rank-art {
    width: 120px;
    height: 120px;
  }
}

/* ───────── detail modal ───────── */

.modal {
  width: min(720px, calc(100vw - 24px));
  max-height: min(88dvh, 880px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.modal[open] {
  display: flex;
  flex-direction: column;
}

/* A plain darker backdrop: blurring the whole page behind a popup is costly to paint, which made
   popups slow to appear on phones. */
.modal::backdrop {
  background: rgba(6, 20, 32, 0.68);
}

.modal-scroll {
  overflow-y: auto;
  padding: 24px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background: var(--sand-2);
  color: var(--ink);
}

.modal-head {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 0 44px 18px 0;
  border-bottom: 1px solid var(--line);
}

.modal-head .card-meta {
  text-align: left;
}

.modal-head.rank {
  border-bottom: 5px solid var(--accent);
}

.modal-head img {
  width: 104px;
  height: 104px;
  object-fit: contain;
}

.modal-head h2 {
  font-size: 1.6rem;
}

.modal-price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin: 6px 0 0;
}

.modal-copy {
  padding-top: 16px;
  font-size: 0.95rem;
}

.modal-copy p {
  margin: 0 0 10px;
}

.modal-copy ul:not(.chips),
.modal-copy ol,
.kit-list {
  margin: 0 0 12px;
  padding-left: 1.25rem;
}

.modal-copy li {
  margin: 2px 0;
}

.modal-copy h3 {
  margin: 20px 0 8px;
  font-size: 1.05rem;
}

.modal-copy h3 small {
  margin-left: 6px;
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 0;
}

.stat-grid div {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--sand);
}

.stat-grid dt {
  color: var(--muted);
  font-size: 0.75rem;
}

.stat-grid dd {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
}

/* ───────── cart drawer ───────── */

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: min(440px, 100vw);
  background: var(--paper);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.25);
  transform: translateX(105%);
  transition: transform 0.25s ease;
  visibility: hidden;
}

.cart-drawer.open {
  transform: none;
  visibility: visible;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2 {
  font-size: 1.4rem;
}

.drawer-header h2 span {
  color: var(--muted);
  font-size: 1rem;
}

.drawer-header .icon-button {
  background: var(--sand-2);
  color: var(--ink);
}

.drawer-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px;
}

.cart-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.cart-row > img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--sand);
}

.cart-row-info strong {
  display: block;
  line-height: 1.25;
  font-size: 0.93rem;
}

.cart-row-info small {
  color: var(--muted);
}

.cart-row-price {
  font-family: var(--display);
  font-weight: 600;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.stepper button {
  width: 26px;
  height: 26px;
  border: 0;
  background: none;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.stepper span {
  min-width: 22px;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.remove-item {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
}

.remove-item:hover {
  background: var(--sand-2);
  color: var(--ink);
}

.empty-cart {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 50px 10px;
  text-align: center;
  color: var(--muted);
}

.empty-cart img {
  width: 90px;
  opacity: 0.85;
}

.empty-cart p {
  margin: 8px 0 0;
  color: var(--ink);
  font-weight: 700;
}

.checkout-panel {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
  background: var(--sand);
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 0.9rem;
}

.player-input {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  color: var(--ink);
}

.player-input:focus {
  outline: 0;
  border-color: var(--sea);
}

.field-hint,
.checkout-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.checkout-note {
  text-align: center;
}

.total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 14px 0 12px;
}

.total-row strong {
  font-family: var(--display);
  font-size: 1.6rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--toast-bg);
  color: #fff;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.2s, transform 0.2s;
}

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

.toast[data-error="true"] {
  background: #b4321f;
}

/* ───────── live player count (hero) ───────── */

/* A small green dot and the number of players online, sitting right after the server IP. */
.ip-chip {
  gap: 12px;
}

.live-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
}

.live-count b,
.chip-count {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* The numbers arrive after the page is drawn, so their boxes are already wide enough for them and
   nothing beside them moves when they fill in. */
.live-count b {
  min-width: 3ch;
}

.chip-count {
  min-width: calc(5ch + 10px);
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  text-align: right;
}

.pulse-dot {
  position: relative;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 8px rgba(61, 220, 132, 0.9);
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid #3ddc84;
  border-radius: 50%;
  opacity: 0;
  animation: ping 1.8s ease-out infinite;
}

.live-count[data-mode="offline"] .pulse-dot {
  background: #9aa8b4;
  box-shadow: none;
}

.live-count[data-mode="offline"] .pulse-dot::after {
  display: none;
}

/* Until the first answer arrives the numbers take up their space but cannot be seen. If there is
   no answer at all they are removed instead (the page sets `hidden`). */
.live-count[data-mode="loading"],
.chip-count[data-mode="loading"] {
  visibility: hidden;
}

@keyframes ping {
  0% {
    opacity: 0.9;
    transform: scale(0.5);
  }

  80%,
  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}

/* ───────── player profile (sidebar) ───────── */

.profile.has-player {
  margin-top: 62px;
}

.profile-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  text-align: left;
}

button.profile-card:hover {
  background: rgba(255, 255, 255, 0.13);
}

.profile-head {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 10px;
  image-rendering: pixelated;
}

.profile-text strong {
  display: block;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.profile-text small {
  display: block;
  color: #86a9bf;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.profile-card > svg {
  width: 18px;
  height: 18px;
  margin-left: auto;
  opacity: 0.7;
}

.profile-card.signed {
  min-height: 92px;
  padding-left: 112px;
  border-color: rgba(74, 216, 210, 0.32);
  background: linear-gradient(135deg, rgba(74, 216, 210, 0.18), rgba(255, 255, 255, 0.05));
}

.profile-avatar {
  position: absolute;
  left: 6px;
  bottom: 6px;
  display: grid;
  align-items: end;
  justify-items: center;
  width: 100px;
  height: 154px;
  padding: 0;
  border: 0;
  background: none;
}

.avatar-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45));
  transition: opacity 0.4s;
  animation: bob 4.5s ease-in-out infinite;
}

.avatar-img.loaded {
  opacity: 1;
}

.profile-avatar:hover .avatar-img {
  filter: drop-shadow(0 8px 12px rgba(74, 216, 210, 0.55)) brightness(1.06);
}

.profile-avatar.swapping .avatar-img {
  opacity: 0.55;
}

.avatar-shadow {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 60px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  filter: blur(3px);
  transform: translateX(-50%);
  animation: ground 4.5s ease-in-out infinite;
}

@keyframes bob {
  50% {
    transform: translateY(-7px);
  }
}

@keyframes ground {
  50% {
    transform: translateX(-50%) scale(0.78);
    opacity: 0.65;
  }
}

.profile-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: #86a9bf;
  font-size: 0.78rem;
}

.profile-actions i {
  font-style: normal;
}

.profile-actions button {
  padding: 0;
  border: 0;
  background: none;
  color: #a9d3e6;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.profile-actions button:hover {
  color: #fff;
}

.avatar-button {
  overflow: hidden;
  padding: 0;
}

.avatar-button img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

/* ───────── sign-in dialog and checkout name ───────── */

.login {
  display: grid;
  gap: 10px;
}

.login-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 40px;
  margin-bottom: 6px;
}

.login-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  overflow: hidden;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 35%, var(--tile-hi), var(--sand));
}

.login-avatar img {
  width: 74%;
  height: 74%;
  border-radius: 8px;
  image-rendering: pixelated;
}

.login-top h2 {
  font-size: 1.6rem;
  overflow-wrap: anywhere;
}

/* The small line above the name in the "deliver to" confirmation. */
.confirm-label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-top p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-hint {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.login-hint[data-tone="ok"] {
  color: var(--green);
  font-weight: 700;
}

.login-hint[data-tone="error"] {
  color: var(--danger);
  font-weight: 700;
}

.login-out {
  justify-self: center;
}

/* Java / Bedrock switch (reuses the pill switch look of the server switcher). */
.platform-seg {
  justify-self: start;
}

button.seg-link {
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
}

/* The username box. For Bedrock a "." chip sits in front of the text field: it is not part of
   the typed text, so it can't be edited or removed. */
.name-field {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--field);
}

.name-field:focus-within {
  border-color: var(--sea);
}

.name-field .player-input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 0;
}

.name-field .player-input:focus {
  outline: 0;
}

.name-prefix {
  display: none;
  place-items: center;
  padding: 0 14px;
  border-right: 2px solid var(--line);
  background: var(--sand-2);
  color: var(--ink);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.3rem;
  font-weight: 700;
  user-select: none;
}

.name-field.bedrock .name-prefix {
  display: grid;
}

.platform-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(74, 216, 210, 0.22);
  color: inherit;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* "Delivering to" in the cart. */
.deliver-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 700;
}

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

.deliver-row img {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 8px;
  image-rendering: pixelated;
}

.deliver-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.deliver-name .platform-tag {
  background: var(--sand-2);
}

.checkout-note a {
  color: var(--sea);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* A coupon code tucked into the cart (`promo` in store-data.js). Clicking it copies the code. */
.promo {
  display: grid;
  gap: 2px;
  width: 100%;
  margin-top: 12px;
  padding: 9px 12px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  background: none;
  color: var(--ink);
  font-size: 0.85rem;
  text-align: left;
}

.promo:hover {
  border-color: var(--sea);
}

.promo code {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

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

/* ───────── server choice (a featured package sold on several servers) ───────── */

.choose h2 {
  padding-right: 44px;
  font-size: 1.6rem;
}

.choose > p {
  margin: 6px 0 18px;
  color: var(--muted);
}

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

.choose-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--sand);
  text-align: center;
  transition: transform 0.15s, border-color 0.15s;
}

.choose-card:hover {
  transform: translateY(-3px);
  border-color: var(--sea);
}

.choose-card .mode-art {
  width: min(120px, 100%);
}

.choose-card strong {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.15;
}

.choose-from {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ───────── dark mode toggle ───────── */

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: #cfe2ee;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: left;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.theme-toggle .switch {
  position: relative;
  width: 38px;
  height: 22px;
  margin-left: auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  transition: background 0.2s;
}

.theme-toggle .switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.theme-toggle[aria-pressed="true"] .switch {
  background: var(--aqua);
}

.theme-toggle[aria-pressed="true"] .switch i {
  transform: translateX(16px);
}

/* ───────── currency picker ───────── */

/* On big screens the picker is a pill at the top right, in a slim row above the page. The row
   lines up with the page below it, which is narrower on the home page. */
.topbar {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 16px 32px 0;
}

.content:has(#view.is-home) .topbar {
  max-width: calc(1440px + 64px);
}

.currency {
  position: relative;
}

.currency-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
  transition: border-color 0.12s;
}

.currency-button:hover,
.currency-button[aria-expanded="true"] {
  border-color: var(--sea);
}

.currency-button svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.currency-button .currency-chevron {
  width: 14px;
  height: 14px;
  opacity: 0.7;
  transition: transform 0.2s;
}

.currency-button[aria-expanded="true"] .currency-chevron {
  transform: rotate(180deg);
}

/* Prices already in the visitor's own currency (from Tebex): the button only names it. */
.currency-button:disabled {
  cursor: default;
}

.currency-button:disabled:hover {
  border-color: var(--line);
}

.currency-button:disabled .currency-chevron {
  display: none;
}

.currency-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: 292px;
  max-width: calc(100vw - 28px);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.currency-menu-title {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
}

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

.currency-option {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  padding: 7px 4px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--sand);
  color: var(--ink);
  font-size: 0.82rem;
}

.currency-option span {
  color: var(--muted);
  font-size: 0.76rem;
}

.currency-option:hover {
  border-color: var(--sea);
}

.currency-option.active {
  background: var(--strong);
  color: #fff;
}

.currency-option.active span {
  color: rgba(255, 255, 255, 0.78);
}

.currency-menu-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

/* Under the cart total when prices are shown in another currency. */
.currency-note {
  margin: -6px 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

/* ───────── legal pages and footer links ───────── */

.legal {
  max-width: 900px;
  margin: 22px auto 0;
}

.legal-intro {
  margin: 0 0 6px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  font-size: 1.05rem;
}

.legal section {
  margin-top: 26px;
}

.legal h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 1.3rem;
}

.legal h2 span {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--strong);
  color: #fff;
  font-size: 0.85rem;
}

.legal p {
  margin: 0 0 10px;
  color: var(--legal-text);
}

.legal ul {
  margin: 0 0 10px;
  padding-left: 1.3rem;
}

.legal li {
  margin: 4px 0;
  color: var(--legal-text);
}

.legal a {
  color: var(--sea);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* The refund section is the one people look for, so it stands out. */
.legal section.legal-key {
  padding: 18px 22px;
  border: 1px solid var(--key-line);
  border-radius: 18px;
  background: var(--key-bg);
}

.legal section.legal-key h2 span {
  background: var(--coral-deep);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.footer-links a {
  color: var(--ink);
  font-weight: 600;
}

.footer-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ───────── 404: Minecraft's death screen ───────── */

/* The game's UI font, from Minecraft-Font by Idrees Hassan (a faithful remake under the SIL Open
   Font License 1.1, see assets/fonts/minecraft-font-LICENSE.txt). Browsers only download it on
   the 404 page. Its pixel grid is 9 per em, so it is crisp at multiples of 9px, and the game's
   one-pixel text shadow is 1/9 em. */
@font-face {
  font-family: "Minecraft";
  src: url("/assets/fonts/minecraft.otf") format("opentype");
  font-display: swap;
}

/* The page is a little Minecraft world (sky, clouds, a row of grass blocks) under the death
   screen's red overlay, with the screen's text and stone buttons on top. The pixel art is small
   SVGs drawn with crisp edges. */
.death {
  --sky-top: #6f9cf2;
  --sky-bottom: #b3cdff;
  --ground: 84px;
  --pixel: "Minecraft", var(--display);
  --px: calc(1em / 9);
  --hurt: sepia(1) saturate(5) hue-rotate(-40deg) brightness(0.95);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  overflow: hidden;
  min-height: 640px;
  padding: 54px 24px 0;
  border-radius: 28px;
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom));
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow);
}

.death-clouds {
  position: absolute;
  inset: 0 -60px auto;
  height: 240px;
  background:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 4' shape-rendering='crispEdges'><g fill='%23fff'><rect x='3' width='8' height='1'/><rect y='1' width='16' height='2'/><rect x='2' y='3' width='11' height='1'/></g></svg>") 8% 46px / 176px 44px no-repeat,
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 4' shape-rendering='crispEdges'><g fill='%23fff'><rect x='3' width='8' height='1'/><rect y='1' width='16' height='2'/><rect x='2' y='3' width='11' height='1'/></g></svg>") 78% 104px / 232px 58px no-repeat,
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 4' shape-rendering='crispEdges'><g fill='%23fff'><rect x='3' width='8' height='1'/><rect y='1' width='16' height='2'/><rect x='2' y='3' width='11' height='1'/></g></svg>") 46% 14px / 120px 30px no-repeat;
  opacity: 0.85;
  animation: clouds-drift 80s linear infinite alternate;
}

@keyframes clouds-drift {
  from {
    transform: translateX(-40px);
  }

  to {
    transform: translateX(40px);
  }
}

.death-copy,
.death-actions {
  position: relative;
  z-index: 2;
  animation: death-text 0.8s ease-out 0.5s both;
}

.death-copy {
  display: grid;
  justify-items: center;
  gap: 16px;
  font-family: var(--pixel);
}

.death-copy h1 {
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 72px;
  line-height: 1;
  margin-bottom: 10px;
  text-shadow: var(--px) var(--px) 0 #3f3f3f;
}

.death-message,
.death-score {
  margin: 0;
  font-size: 27px;
  line-height: calc(1em + 2 * var(--px));
  text-shadow: var(--px) var(--px) 0 #3f3f3f;
}

.death-score b {
  color: #ffff55;
  font-weight: 400;
  text-shadow: var(--px) var(--px) 0 #3f3f15;
}

/* Ten empty heart containers, like a hotbar at zero health. */
.death-hearts {
  width: 180px;
  height: 16px;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8' shape-rendering='crispEdges'><g fill='%23000' fill-opacity='.3'><rect x='1' y='1' width='2' height='1'/><rect x='6' y='1' width='2' height='1'/><rect x='1' y='2' width='3' height='1'/><rect x='5' y='2' width='3' height='1'/><rect x='1' y='3' width='7' height='1'/><rect x='2' y='4' width='5' height='1'/><rect x='3' y='5' width='3' height='1'/><rect x='4' y='6' width='1' height='1'/></g><g fill='%23000'><rect x='1' width='2' height='1'/><rect x='6' width='2' height='1'/><rect y='1' width='1' height='3'/><rect x='3' y='1' width='1' height='1'/><rect x='5' y='1' width='1' height='1'/><rect x='8' y='1' width='1' height='3'/><rect x='4' y='2' width='1' height='1'/><rect x='1' y='4' width='1' height='1'/><rect x='7' y='4' width='1' height='1'/><rect x='2' y='5' width='1' height='1'/><rect x='6' y='5' width='1' height='1'/><rect x='3' y='6' width='1' height='1'/><rect x='5' y='6' width='1' height='1'/><rect x='4' y='7' width='1' height='1'/></g></svg>") 0 0 / 18px 16px repeat-x;
}

.death-path {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.9rem;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
}

.death-path code {
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  overflow-wrap: anywhere;
}

.death-actions {
  display: grid;
  gap: 10px;
  width: min(100%, 400px);
  animation-delay: 0.8s;
}

/* The game's stone buttons: grey with a bevel, white text with a hard shadow, and the classic
   blue with yellow text on hover. */
.mc-button {
  display: block;
  padding: 11px 14px;
  border: 2px solid #000;
  background: #6f6f6f
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'><g fill='%23fff' fill-opacity='.1'><rect x='1' y='1' width='1' height='1'/><rect x='5' y='2' width='1' height='1'/><rect x='3' y='5' width='1' height='1'/><rect x='6' y='6' width='1' height='1'/></g><g fill='%23000' fill-opacity='.12'><rect x='3' y='0' width='1' height='1'/><rect x='0' y='4' width='1' height='1'/><rect x='6' y='3' width='1' height='1'/><rect x='2' y='7' width='1' height='1'/></g></svg>")
    0 0 / 24px 24px;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.32), inset -2px -4px 0 rgba(0, 0, 0, 0.32);
  color: #e0e0e0;
  font-family: var(--pixel);
  font-size: 18px;
  line-height: 1;
  text-shadow: var(--px) var(--px) 0 #383838;
}

.mc-button:hover,
.mc-button:focus-visible {
  outline: 0;
  background-color: #7e88bf;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.4), inset -2px -4px 0 rgba(0, 0, 0, 0.3), 0 0 0 2px #fff;
  color: #ffffa0;
  text-shadow: var(--px) var(--px) 0 #3f3f28;
}

/* The ground: a row of grass blocks on dirt, across the whole card. */
.death-world {
  position: relative;
  align-self: stretch;
  height: calc(var(--ground) + 160px);
  margin: auto -24px 0;
  background:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'><rect width='16' height='16' fill='%23866043'/><g fill='%236c4d36'><rect x='2' y='6' width='1' height='1'/><rect x='7' y='8' width='2' height='1'/><rect x='12' y='7' width='1' height='1'/><rect x='4' y='11' width='1' height='1'/><rect x='10' y='12' width='2' height='1'/><rect x='14' y='10' width='1' height='1'/><rect x='1' y='14' width='2' height='1'/><rect x='8' y='14' width='1' height='1'/></g><g fill='%239a7353'><rect x='5' y='7' width='1' height='1'/><rect x='10' y='9' width='1' height='1'/><rect x='1' y='10' width='1' height='1'/><rect x='6' y='13' width='1' height='1'/><rect x='12' y='13' width='1' height='1'/><rect x='14' y='15' width='1' height='1'/></g><rect width='16' height='3' fill='%235f9f35'/><g fill='%235f9f35'><rect y='3' width='2' height='1'/><rect x='4' y='3' width='3' height='1'/><rect x='9' y='3' width='1' height='1'/><rect x='12' y='3' width='3' height='1'/><rect x='1' y='4' width='1' height='1'/><rect x='5' y='4' width='1' height='1'/><rect x='13' y='4' width='1' height='1'/></g><g fill='%2376b843'><rect x='1' width='2' height='1'/><rect x='6' y='1' width='2' height='1'/><rect x='11' width='1' height='1'/><rect x='14' y='1' width='1' height='1'/><rect x='3' y='2' width='1' height='1'/></g><g fill='%23477d27'><rect x='4' width='1' height='1'/><rect x='9' y='2' width='2' height='1'/><rect x='13' y='2' width='1' height='1'/><rect y='1' width='1' height='1'/></g></svg>") 0 calc(100% - 36px) / 48px 48px repeat-x,
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'><rect width='16' height='16' fill='%23866043'/><g fill='%236c4d36'><rect x='3' y='1' width='1' height='1'/><rect x='11' y='3' width='2' height='1'/><rect x='6' y='6' width='1' height='1'/><rect x='1' y='9' width='2' height='1'/><rect x='13' y='11' width='1' height='1'/><rect x='8' y='13' width='1' height='1'/></g><g fill='%239a7353'><rect x='8' y='2' width='1' height='1'/><rect x='14' y='6' width='1' height='1'/><rect x='4' y='12' width='1' height='1'/><rect x='10' y='15' width='1' height='1'/></g></svg>") 0 100% / 48px 48px repeat-x;
}

/* The body: it stands, flashes red, tips over onto its side and is gone in a puff of smoke.
   Its resting state is "gone", so with animations turned off it is simply not there. */
.death-body {
  position: absolute;
  /* It falls to the right, so it starts half a body length left of the middle and lands centred. */
  left: calc(50% - 70px);
  bottom: var(--ground);
}

.death-body img {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 140px;
  /* Its holder is only a point on the ground, so the usual max-width: 100% would squash it. */
  max-width: none;
  translate: -50% 0;
  transform-origin: 50% 100%;
  transform: translateY(-30%) rotate(90deg);
  filter: var(--hurt);
  opacity: 0;
}

/* The sequence starts once the skin picture has arrived (or after a short wait without it), so a
   slow picture never means a death nobody saw. */
.death-world.go .death-body img {
  animation: death-fall 1.6s ease-in 0.1s both;
}

@keyframes death-fall {
  0% {
    transform: none;
    filter: none;
    opacity: 1;
  }

  8% {
    filter: var(--hurt);
  }

  55% {
    transform: translateY(-30%) rotate(90deg);
    opacity: 1;
  }

  76% {
    opacity: 1;
  }

  100% {
    transform: translateY(-30%) rotate(90deg);
    opacity: 0;
  }
}

.death-poof {
  position: absolute;
  left: 50%;
  bottom: calc(var(--ground) + 26px);
}

.death-poof i {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #f2f2f2;
  opacity: 0;
}

.death-world.go .death-poof i {
  animation: death-poof 0.9s ease-out 1.3s both;
}

@keyframes death-poof {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }

  20% {
    opacity: 0.95;
  }

  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(1.4);
  }
}

/* The dropped items pop out where the body was, then bob and spin like items on the ground.
   Each one opens its package. */
.death-item {
  position: absolute;
  left: var(--x);
  bottom: calc(var(--ground) + 4px);
  width: 58px;
  height: 58px;
  padding: 0;
  border: 0;
  background: none;
  translate: -50% 0;
  visibility: hidden;
}

.death-world.go .death-item {
  visibility: visible;
  animation: item-pop 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) calc(1.35s + var(--wait)) both;
}

.death-item span {
  display: block;
  width: 100%;
  height: 100%;
  animation: item-bob 2.4s ease-in-out calc(2s + var(--wait)) infinite;
}

.death-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 4px rgba(0, 0, 0, 0.35));
  animation: item-spin 3.6s ease-in-out infinite;
}

.death-item:hover img,
.death-item:focus-visible img {
  animation-play-state: paused;
  filter: drop-shadow(0 0 8px #fff) drop-shadow(0 6px 4px rgba(0, 0, 0, 0.35));
}

@keyframes item-pop {
  0% {
    transform: translateY(10px) scale(0);
  }

  60% {
    transform: translateY(-34px) scale(1);
  }

  100% {
    transform: none;
  }
}

@keyframes item-bob {
  50% {
    transform: translateY(-8px);
  }
}

@keyframes item-spin {
  25% {
    transform: scaleX(0.15);
  }

  50% {
    transform: scaleX(-1);
  }

  75% {
    transform: scaleX(0.15);
  }
}

/* The death screen's red wash over the world, after a brighter flash as you die. */
.death-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent linear-gradient(180deg, rgba(80, 0, 0, 0.38), rgba(128, 48, 48, 0.63));
  pointer-events: none;
  animation: death-flash 0.9s ease-out both;
}

@keyframes death-flash {
  from {
    background-color: rgba(255, 0, 0, 0.45);
  }
}

@keyframes death-text {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 520px) {
  .death {
    min-height: 600px;
    gap: 20px;
    padding: 40px 16px 0;
  }

  .death-copy h1 {
    font-size: 45px;
  }

  .death-message,
  .death-score {
    font-size: 18px;
  }

  .mc-button {
    padding-inline: 8px;
  }

  .death-world {
    height: calc(var(--ground) + 130px);
    margin: auto -16px 0;
  }

  .death-body {
    left: calc(50% - 55px);
  }

  .death-body img {
    height: 110px;
  }

  .death-item {
    width: 46px;
    height: 46px;
  }
}

/* ───────── large screens ───────── */

/* With a wide content area, the big home-page elements grow too, so they fill the space
   instead of just stretching. */
@media (min-width: 1500px) {
  .hero {
    padding: 48px 56px;
  }

  .hero-logo {
    max-width: 540px;
  }

  .hero-text {
    max-width: 52ch;
    font-size: 1.15rem;
  }

  .hero-art img {
    max-width: 330px;
  }

  .mode-card {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 28px;
    padding: 28px;
  }

  .mode-body h3 {
    font-size: 1.85rem;
  }

  .mode-body p {
    font-size: 1rem;
  }

  .showcase-card {
    padding: 16px 24px 16px 18px;
  }

  .showcase-art {
    width: 78px;
    height: 78px;
  }

  .showcase-info strong {
    font-size: 1.4rem;
  }

  .showcase-foot .price b {
    font-size: 1.4rem;
  }

  .event-banner {
    padding: 26px 36px;
  }

  .event-banner img {
    width: 120px;
    height: 120px;
  }

  .event-copy h3 {
    font-size: 2.3rem;
  }

  .sale-banner {
    padding: 28px 40px;
  }

  .steps li {
    padding: 22px;
  }

  .page-banner {
    min-height: 150px;
    padding: 28px 40px;
  }

  .page-banner h1 {
    font-size: 2.5rem;
  }

  .page-banner img {
    width: 130px;
    height: 130px;
  }

  .cat-grid > .cat-tile {
    flex-basis: 300px;
    max-width: 340px;
  }

  .grid > .card {
    flex-basis: 260px;
    max-width: 300px;
  }
}

/* ───────── responsive ───────── */

@media (max-width: 900px) {
  .layout {
    display: block;
  }

  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: var(--navy);
    color: #fff;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
    font-family: var(--display);
    font-size: 1.15rem;
    font-weight: 600;
  }

  .mobile-brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
  }

  /* On phones the currency picker sits in the top bar, styled like the bar's other buttons, and
     its list lines up with the bar's right edge. */
  .topbar {
    display: none;
  }

  .mobile-bar > * {
    flex: none;
  }

  .mobile-bar .currency {
    position: static;
  }

  .mobile-bar .currency-button {
    height: 40px;
    padding: 0 10px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }

  .mobile-bar .currency-menu {
    right: 14px;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: min(84vw, 320px);
    transform: translateX(-102%);
    transition: transform 0.25s ease;
    visibility: hidden;
  }

  .sidebar.open {
    transform: none;
    visibility: visible;
  }

  #view {
    padding: 20px 16px 40px;
  }

  .footer {
    padding: 20px 16px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 28px 22px;
  }

  .hero-art {
    display: none;
  }

  .page-banner {
    padding: 20px;
  }

  .page-banner h1 {
    font-size: 1.7rem;
  }

  .page-banner img {
    width: 76px;
    height: 76px;
  }
}

@media (max-width: 520px) {
  .info-line,
  .page-banner p {
    display: none;
  }

  .page-banner {
    min-height: 0;
  }

  .mode-card {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }

  .mode-body h3 {
    font-size: 1.25rem;
  }

  .showcase-card {
    flex-wrap: wrap;
    padding: 12px 14px;
  }

  .showcase-foot {
    width: 100%;
    justify-content: flex-end;
  }

  .showcase-foot .price {
    margin-right: auto;
  }

  .event-banner {
    flex-wrap: wrap;
    padding: 18px;
  }

  .event-banner img {
    width: 72px;
    height: 72px;
  }

  .event-copy h3 {
    font-size: 1.5rem;
  }

  .event-banner .btn {
    width: 100%;
    margin-left: 0;
  }

  .sale-banner {
    flex-wrap: wrap;
    gap: 14px;
    padding: 18px;
  }

  .sale-burst {
    width: 88px;
    height: 88px;
  }

  .sale-burst b {
    font-size: 1.6rem;
  }

  .sale-burst small {
    font-size: 0.6rem;
  }

  .sale-copy {
    flex: 1 1 160px;
  }

  .sale-banner .sale-btn {
    width: 100%;
    margin-left: 0;
  }

  .grid {
    gap: 10px;
  }

  .grid > .card {
    flex: 0 0 calc(50% - 5px);
    min-width: 0;
    max-width: none;
  }

  .card {
    padding: 10px;
  }

  .card-foot {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .card-foot .price {
    justify-content: center;
  }

  .modal-head {
    grid-template-columns: 80px minmax(0, 1fr);
  }

  .modal-head img {
    width: 80px;
    height: 80px;
  }

  .modal-head .btn {
    grid-column: 1 / -1;
  }

  .modal-scroll {
    padding: 18px;
  }
}

/* The phone top bar holds the menu, logo, currency, sign-in and cart. On narrow phones the logo
   drops its "ShoreSMP" text to make room, and on the narrowest the currency drops its icon. */
@media (max-width: 440px) {
  .mobile-brand span {
    display: none;
  }
}

@media (max-width: 360px) {
  .mobile-bar .currency-button svg {
    display: none;
  }
}

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