:root {
  --cream: #fff6e6;
  --paper: #fffdf8;
  --ink: #1e1b2e;
  --muted: #5c5668;
  --red: #d62828;
  --red-deep: #9d1b1b;
  --pine: #124f42;
  --pine-deep: #0c3a30;
  --gold: #ffc13b;
  --line: 3px solid var(--ink);
  --pop: 5px 5px 0 var(--ink);
  --radius: 18px;
  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --body: "Nunito Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--body);
}
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.02; margin: 0; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #2457d6; outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.preview-note {
  background: var(--gold);
  border-bottom: var(--line);
  font-size: .9rem;
  font-weight: 700;
  padding: 7px 16px;
  text-align: center;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 28px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: var(--cream);
  border-bottom: var(--line);
}
.logo {
  font: 800 1.5rem/1 var(--display);
  letter-spacing: -.02em;
  text-decoration: none;
  white-space: nowrap;
}
.site-header nav { display: flex; gap: 22px; }
.site-header nav a { font-weight: 700; text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.icon-btn {
  background: none; border: 0; padding: 8px;
  font-size: .95rem; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px;
  white-space: nowrap;
}
.basket-btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 6px 14px;
  background: var(--paper); border: var(--line); border-radius: 999px;
  font-weight: 700;
}
.count {
  display: inline-grid; place-items: center;
  min-width: 26px; height: 26px; padding: 0 6px;
  background: var(--red); color: #fff; border-radius: 999px;
  font-size: .9rem;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 10px 22px;
  border: var(--line); border-radius: 14px;
  font-weight: 700; text-decoration: none;
  transition: transform .08s, box-shadow .08s;
}
.btn-primary { background: var(--red); color: #fff; box-shadow: 4px 4px 0 var(--ink); }
.btn-primary:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn-primary:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn-plain { background: transparent; }
.btn-plain:hover { background: var(--paper); }
.btn-wide { width: 100%; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.1fr .9fr;
  align-items: center; gap: 32px;
  max-width: 1240px; margin: 0 auto;
  padding: clamp(36px, 6vw, 80px) clamp(16px, 4vw, 48px);
}
.eyebrow { color: var(--red-deep); font-weight: 700; margin-bottom: 12px; }
h1 { font-size: clamp(4rem, 11vw, 9rem); letter-spacing: -.045em; line-height: .9; }
.lede { font-size: 1.25rem; max-width: 30em; margin-top: 24px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.hero-toy { display: grid; justify-items: center; gap: 20px; }
.clicker {
  display: grid; place-items: center;
  width: min(100%, 340px); aspect-ratio: 1;
  background: var(--pine);
  border: 4px solid var(--ink); border-radius: 76px;
  box-shadow: 10px 10px 0 var(--ink);
  transform: rotate(-3deg);
}
.clicker-cap {
  width: 62%; aspect-ratio: 1;
  background: var(--red); color: #fff;
  border: 4px solid var(--ink); border-radius: 50%;
  box-shadow: 0 16px 0 var(--red-deep), 0 16px 0 4px var(--ink);
  font: 800 clamp(1.75rem, 4vw, 2.5rem)/1 var(--display);
  letter-spacing: .02em;
  transform: translateY(-8px);
  transition: transform .05s, box-shadow .05s;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.clicker-cap.is-down {
  transform: translateY(6px);
  box-shadow: 0 2px 0 var(--red-deep), 0 2px 0 4px var(--ink);
}
.click-score { font-size: 1.05rem; text-align: center; min-height: 1.6em; }
.click-score strong { font: 800 1.5rem/1 var(--display); font-variant-numeric: tabular-nums; }

/* Bands */
.band { padding: clamp(48px, 7vw, 88px) clamp(16px, 4vw, 48px); border-top: var(--line); }
.band > * { max-width: 1144px; margin-left: auto; margin-right: auto; }
.band-pine { background: var(--pine); color: #fff; }
.band-gold { background: var(--gold); }
.band-ink { background: var(--ink); color: #fff; }
.band-ink .card { box-shadow: 5px 5px 0 var(--gold); }
.band-ink :focus-visible { outline-color: var(--gold); }
.band-ink .chip:hover { background: #38334d; }
.band-ink .chip[aria-pressed="true"],
.band-ink .chip[aria-pressed="true"]:hover { background: var(--gold); border-color: var(--gold); }
.kit-note { margin-top: 28px; font-size: .92rem; color: #d9d5e2; }
a.add-btn { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
.section-head { margin-bottom: 32px; }
.section-head h2 { font-size: clamp(2.5rem, 6vw, 4.25rem); letter-spacing: -.03em; }
.section-head p { font-size: 1.15rem; margin-top: 10px; }

/* Products */
.grid { display: grid; gap: 24px; }
.grid-four { grid-template-columns: repeat(4, 1fr); }
.grid-three { grid-template-columns: repeat(3, 1fr); }
.card {
  display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  border: var(--line); border-radius: var(--radius);
  box-shadow: var(--pop);
  overflow: hidden;
}
.card-art { display: grid; place-items: center; aspect-ratio: 1; padding: 12%; background: #f4ead7; border-bottom: var(--line); }
.card-art img { width: 100%; height: 100%; object-fit: contain; display: block; }
.grid-four .card-art { padding: 9%; }
.card[hidden] { display: none; }
.amp { color: var(--red); }
.site-footer .amp { color: var(--gold); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.chip {
  min-height: 44px; padding: 6px 16px;
  background: transparent; color: #fff;
  border: 3px solid #fff; border-radius: 999px;
  font-weight: 700;
}
.chip:hover { background: var(--pine-deep); }
.chip[aria-pressed="true"] { background: var(--gold); color: var(--ink); border-color: var(--ink); }
.band-pine :focus-visible { outline-color: var(--gold); }
.card-art svg { width: 100%; height: 100%; display: block; overflow: visible; }
.spin-btn {
  width: 100%; height: 100%; padding: 0;
  background: none; border: 0; border-radius: 50%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.spin-part { transform-origin: 100px 100px; will-change: transform; }
.spin-btn img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.card-body { display: flex; flex-direction: column; flex: 1; gap: 6px; padding: 16px; }
.card-body h3 { font-size: 1.3rem; line-height: 1.12; letter-spacing: -.01em; }
.card-body p { color: var(--muted); }
.card-buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; }
.price { font: 800 1.3rem/1 var(--display); }
.add-btn {
  min-height: 44px; padding: 6px 14px;
  background: var(--gold); border: var(--line); border-radius: 12px;
  font-weight: 700; white-space: nowrap;
}
.add-btn:hover { background: #ffd26e; }
.add-btn.is-added { background: var(--pine); color: #fff; }
.add-btn:disabled { background: #e8dfcf; color: var(--muted); cursor: not-allowed; }
.btn:disabled { background: #e8dfcf; color: var(--muted); box-shadow: none; cursor: not-allowed; transform: none; }
.order-banner {
  background: var(--pine); color: #fff;
  border-bottom: var(--line);
  font-weight: 700; padding: 10px 16px; text-align: center;
}

/* Facts */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 0; margin-bottom: 0; }
.facts dt { font: 800 1.4rem/1.1 var(--display); margin-bottom: 8px; }
.facts dd { margin: 0; }
.facts mark { background: var(--paper); padding: 1px 5px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.site-footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px;
  padding: 24px clamp(16px, 4vw, 48px);
  background: var(--ink); color: var(--cream);
  font-weight: 700;
}

.sub-head { margin-top: 56px; margin-bottom: 24px; }
.sub-head h3 { font-size: clamp(1.8rem, 4vw, 2.75rem); letter-spacing: -.02em; }
.colour-field { margin-top: 8px; }

.made-note { font-size: .92rem; background: var(--cream); border: 2px solid var(--ink); border-radius: 10px; padding: 9px 11px; margin-bottom: 12px; overflow-wrap: anywhere; }

/* Christmas (the "xmas" class is added until christmasThemeEnds) */
.xmas-hat, #snow, .xmas-greeting { display: none; }
.xmas-bar {
  background: var(--red); color: #fff;
  border-bottom: var(--line);
  font-weight: 700; font-size: .95rem; padding: 8px 16px; text-align: center;
}
.xmas main { position: relative; }
.xmas #snow { display: block; position: absolute; top: 0; left: 0; width: 100%; pointer-events: none; }
.xmas .hero { position: relative; }
.xmas-greeting { font-family: var(--display); font-weight: 800; color: var(--gold); }
.xmas .xmas-greeting { display: inline; }

.xmas .clicker { position: relative; }
.xmas .xmas-hat {
  display: block; position: absolute; z-index: 2;
  top: -19%; left: -11%; width: 46%; height: auto;
  transform: rotate(-16deg);
  pointer-events: none;
}

.xmas .site-header::before,
.xmas .site-header::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%;
  height: 26px; margin-top: 3px;
  background-repeat: repeat-x; background-size: 120px 26px;
  pointer-events: none;
}
.xmas .site-header::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 26'%3E%3Cpath d='M0 2Q15 12 30 2T60 2T90 2T120 2' fill='none' stroke='%231e1b2e' stroke-width='2'/%3E%3Cellipse cx='15' cy='15' rx='5' ry='7' fill='%23d62828' stroke='%231e1b2e' stroke-width='1.5'/%3E%3Cellipse cx='75' cy='15' rx='5' ry='7' fill='%232c9c63' stroke='%231e1b2e' stroke-width='1.5'/%3E%3C/svg%3E");
}
.xmas .site-header::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 26'%3E%3Cellipse cx='45' cy='15' rx='5' ry='7' fill='%23ffc13b' stroke='%231e1b2e' stroke-width='1.5'/%3E%3Cellipse cx='105' cy='15' rx='5' ry='7' fill='%234aa3ff' stroke='%231e1b2e' stroke-width='1.5'/%3E%3C/svg%3E");
  animation: xmas-twinkle 1.6s ease-in-out infinite alternate;
}
@keyframes xmas-twinkle { from { opacity: 1; } to { opacity: .3; } }

.xmas .band-pine { position: relative; }
.xmas .band-pine::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; max-width: none;
  height: 34px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 34'%3E%3Cpath d='M-5-5H125V12C112 12 110 30 100 30S92 12 80 12 68 22 60 22 52 12 40 12 30 28 20 28 8 12-5 12Z' fill='%23fffdf8' stroke='%231e1b2e' stroke-width='3'/%3E%3C/svg%3E") repeat-x;
  background-size: 120px 34px;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .xmas .site-header::after { animation: none; }
}

/* Order confirmation */
.order-dialog {
  width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  padding: 32px 28px 28px; overflow-y: auto;
  background: var(--paper); color: var(--ink); text-align: center;
  border: 4px solid var(--ink); border-radius: 24px;
  box-shadow: 10px 10px 0 var(--ink);
}
.order-dialog::backdrop { background: rgb(18 79 66 / .88); }
.order-dialog h2 { font-size: clamp(3rem, 12vw, 4.25rem); letter-spacing: -.04em; margin-bottom: 6px; }
.order-dialog p { margin-bottom: 12px; }
.order-lead { font: 800 1.45rem/1.2 var(--display); }
.order-small { font-size: .95rem; color: var(--muted); overflow-wrap: anywhere; }
.order-dialog .btn { margin-top: 10px; }
.order-tick {
  display: grid; place-items: center;
  width: 84px; height: 84px; margin: 0 auto 16px;
  background: var(--pine); color: #fff;
  border: 4px solid var(--ink); border-radius: 50%;
}
.order-tick svg { width: 52px; height: 52px; display: block; }

/* Care instructions page */
.care-page { max-width: 760px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) clamp(16px, 4vw, 48px); }
.care-page h1 { font-size: clamp(3rem, 9vw, 5.5rem); letter-spacing: -.04em; line-height: .95; }
.care-page .lede { margin-bottom: 40px; }
.care-page h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -.02em; margin: 40px 0 12px; }
.care-page ul { margin: 0; padding-left: 22px; }
.care-page li { margin-bottom: 10px; }
.care-page p { margin-bottom: 12px; }
.care-warning { background: var(--gold); border: var(--line); border-radius: 14px; padding: 16px 18px; margin-top: 12px; }
.care-warning p:last-child { margin-bottom: 0; }

/* Custom Player Name */
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #ffd26e; }
.custom-panel {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 28px;
  margin-top: 36px; padding: 24px;
  background: var(--red); color: #fff;
  border: 3px solid #fff; border-radius: var(--radius);
}
.custom-panel h3 { font-size: clamp(1.6rem, 4vw, 2.25rem); letter-spacing: -.02em; margin-bottom: 6px; }
.custom-dialog {
  width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  padding: 0; overflow-y: auto;
  background: var(--paper); color: var(--ink);
  border: var(--line); border-radius: var(--radius);
}
.custom-dialog::backdrop { background: rgb(30 27 46 / .55); }
.custom-body { display: grid; gap: 14px; padding: 18px 20px 20px; }
.custom-preview { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 14px; }
.custom-preview img, .custom-preview svg { width: 100%; height: auto; display: block; }
.cap-name { font: 800 24px var(--display); fill: var(--ink); letter-spacing: 1px; }
.cap-number { font: 800 78px var(--display); fill: var(--ink); }
.field { display: grid; gap: 5px; font-weight: 700; }
.field select, .field input {
  width: 100%; min-height: 46px; padding: 8px 12px;
  background: #fff; color: var(--ink);
  border: var(--line); border-radius: 12px;
  font: 400 1rem var(--body);
}
.custom-error { color: var(--red-deep); font-weight: 700; }
.custom-error:empty { display: none; }
.custom-buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Basket */
.basket {
  width: min(440px, 100vw); max-width: none;
  height: 100dvh; max-height: none;
  margin: 0 0 0 auto; padding: 0;
  background: var(--paper); color: var(--ink);
  border: 0; border-left: var(--line);
}
.basket::backdrop { background: rgb(30 27 46 / .55); }
.basket-inner { display: flex; flex-direction: column; height: 100%; }
.basket-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: var(--line);
}
.basket-head h2 { font-size: 1.75rem; }
.basket-items { flex: 1; overflow-y: auto; padding: 4px 20px; }
.basket-empty { padding: 28px 0; color: var(--muted); }
.line {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px;
  padding: 16px 0; border-bottom: 2px solid #e8dfcf;
}
.line-name { font-weight: 700; }
.line-price { font-weight: 700; text-align: right; }
.qty { display: inline-flex; align-items: center; gap: 4px; }
.qty button {
  width: 36px; height: 36px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 10px;
  font-weight: 700; line-height: 1;
}
.qty span { min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; }
.remove { justify-self: end; align-self: center; background: none; border: 0; padding: 8px 0; font-size: .92rem; text-decoration: underline; color: var(--muted); }
.basket-foot { padding: 16px 20px 20px; border-top: var(--line); }
.subtotal { display: flex; justify-content: space-between; font-size: 1.2rem; margin-bottom: 14px; }
.checkout-note { color: var(--red-deep); font-weight: 700; font-size: .95rem; margin-top: 10px; }
.checkout-note:empty { display: none; }

@media (max-width: 980px) {
  .grid-four { grid-template-columns: repeat(2, 1fr); }
  .grid-three { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .card-buy { flex-wrap: wrap; }
}

@media (max-width: 760px) {
  .site-header { flex-wrap: wrap; gap: 8px 10px; padding-block: 10px; }
  .logo { font-size: 1.25rem; }
  .header-actions { gap: 6px; }
  #soundToggle { padding-inline: 2px; font-size: .85rem; }
  .hero { padding-top: 28px; gap: 24px; }
  h1 { font-size: 4rem; }
  .lede { font-size: 1.1rem; margin-top: 16px; }
  .hero-links { margin-top: 20px; gap: 10px; }
  .site-header nav { order: 3; width: 100%; justify-content: space-between; gap: 12px; font-size: .95rem; }
  html { scroll-padding-top: 118px; }
  .hero { grid-template-columns: 1fr; }
  .hero-toy { padding: 8px 12px 0 0; }
  .clicker { width: min(76vw, 300px); border-radius: 62px; }
  .grid-three { grid-template-columns: 1fr; }
  .grid-three .card-art { aspect-ratio: 16 / 10; padding: 16px; }
  .grid-three .spin-btn { width: auto; aspect-ratio: 1; }
  .facts { grid-template-columns: 1fr; gap: 22px; }
}

@media (max-width: 420px) {
  .logo { font-size: 1.12rem; }
  .basket-btn { padding-inline: 10px; }
  .chip { padding-inline: 12px; font-size: .95rem; }
  .grid-four { gap: 14px; }
  .grid-four .card-body { padding: 12px; }
  .grid-four .card-body h3 { font-size: 1.12rem; }
  .grid-four .add-btn { width: 100%; }
  #soundToggle { padding-inline: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .clicker-cap { transition: none; }
}
