/*
 * Beanz Craft store.
 * Layout concept: the logo's sticker language carried across the page. Flat
 * colour, soft bean curves, and one hard offset shadow (the bean's own) on the
 * things you press. Sparkles mark moments, never sections.
 */
:root {
  /* colour */
  --pink: #ff5c9a;
  --pink-soft: #ffc4dc;
  --berry: #c92f6c; /* filled controls: passes AA under white text */
  --berry-deep: #8e1d4b; /* the offset shadow */
  --bg: #fff5f9;
  --surface: #ffffff;
  --tint: #ffe6f0;
  --ink: #3a1226;
  --ink-soft: #7a5266;
  --line: #f6cfe0;
  --ok: #1c7c54;
  --warn: #9a5b00;
  --bad: #b3243f;
  --on-pink: #3a1226;
  /* product placeholder art */
  --art-a: #ffe0ec;
  --art-b: #ffc4dc;
  --art-c: #ff8fba;
  --art-shadow: #f29fc0;

  /* type */
  --display: 'Fredoka', 'Nunito', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Figtree', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* shape */
  --r-lg: 28px;
  --r-md: 18px;
  --r-pill: 999px;
  --drop: 0 5px 0;
  --wrap: 1120px;
}

/* Dark is opt-in through the header toggle (saved per visitor); light is the default. */
:root[data-theme='dark'] {
  --bg: #15111a;
  --surface: #201926;
  --tint: #2c2233;
  --ink: #fff1f7;
  --ink-soft: #c9b3c4;
  --line: #3b2d45;
  --berry: #e0457f;
  --berry-deep: #8a1f4c;
  --pink-soft: #5b2a44;
  --ok: #7ddcb0;
  --warn: #f0b860;
  --bad: #ff9aac;
  --art-a: #33203a;
  --art-b: #4a2447;
  --art-c: #c93a74;
  --art-shadow: #120d16;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.3rem, 6vw, 3.9rem);
  letter-spacing: -0.01em;
}
h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}
h3 {
  font-size: 1.3rem;
}
p {
  margin: 0;
}
a {
  color: var(--berry);
  text-underline-offset: 0.2em;
}
img {
  max-width: 100%;
  display: block;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

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

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.6rem 1.4rem;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--berry);
  color: #fff;
  font: 600 1.05rem/1 var(--display);
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--drop) var(--berry-deep);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 0 var(--berry-deep);
}
.btn:active {
  transform: translateY(5px);
  box-shadow: 0 0 0 var(--berry-deep);
}
.btn:disabled {
  cursor: not-allowed;
  background: var(--line);
  color: var(--ink-soft);
  box-shadow: none;
  transform: none;
}
.btn.ghost {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--drop) var(--line);
}
.btn.ghost:hover {
  box-shadow: 0 6px 0 var(--line);
}
.btn.ghost:active {
  box-shadow: 0 0 0 var(--line);
}
.btn.small {
  min-height: 44px;
  padding: 0.4rem 1rem;
  font-size: 0.95rem;
}
.btn.block {
  width: 100%;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0.6rem 0.2rem;
  min-height: 44px;
  color: var(--berry);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font: 600 1.35rem/1 var(--display);
  margin-right: auto;
}
.brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.8rem;
  border-radius: var(--r-pill);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current='page'] {
  background: var(--tint);
}
.basket-btn {
  position: relative;
}
.theme-toggle {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.theme-toggle:hover {
  background: var(--tint);
}
.theme-toggle svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
/* show the icon for the theme you would switch to */
.theme-toggle .moon,
:root[data-theme='dark'] .theme-toggle .sun {
  display: block;
}
.theme-toggle .sun,
:root[data-theme='dark'] .theme-toggle .moon {
  display: none;
}
.basket-count {
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.35rem;
  display: inline-grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--berry);
  font: 700 0.85rem/1 var(--body);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) {
  .brand span {
    display: none;
  }
  .site-nav a {
    padding: 0 0.55rem;
    font-size: 0.95rem;
  }
}

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--pink);
  color: var(--on-pink);
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(4.5rem, 9vw, 6.5rem);
}
.hero p.lede {
  margin-top: 1.1rem;
  max-width: 34ch;
  font-size: 1.2rem;
  font-weight: 500;
}
.hero h1 em {
  font-style: normal;
  color: #fff;
  /* the logo's hard shadow, on type */
  text-shadow: 0 4px 0 var(--berry-deep);
}
.hero-art {
  position: absolute;
  pointer-events: none;
  fill: #fff;
}
.hero-art.bean {
  right: -70px;
  bottom: -110px;
  width: 420px;
  opacity: 0.22;
}
.hero-art.s1 {
  top: 26px;
  left: 46%;
  width: 34px;
}
.hero-art.s2 {
  top: 58%;
  left: 3%;
  width: 20px;
  opacity: 0.8;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-art.s1,
  .hero-art.s2 {
    animation: twinkle 3.2s ease-in-out infinite;
  }
  .hero-art.s2 {
    animation-delay: 1.4s;
  }
}
@keyframes twinkle {
  50% {
    transform: scale(0.6) rotate(20deg);
    opacity: 0.5;
  }
}

/* The address, styled after a row in Minecraft's multiplayer server list. */
.server-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem 1rem;
  align-items: center;
  padding: 1.1rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 0 var(--berry-deep);
}
.server-card img {
  width: 68px;
  height: 68px;
  border-radius: 16px;
}
.server-card .name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font: 600 1.25rem/1.2 var(--display);
}
.server-card .motd {
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.signal {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}
.signal i {
  width: 4px;
  background: var(--ok);
  border-radius: 1px;
}
.signal i:nth-child(1) { height: 20%; }
.signal i:nth-child(2) { height: 40%; }
.signal i:nth-child(3) { height: 60%; }
.signal i:nth-child(4) { height: 80%; }
.signal i:nth-child(5) { height: 100%; }
.address {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.35rem 0.35rem 1rem;
  border-radius: var(--r-pill);
  background: var(--tint);
}
.address code {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font: 600 1rem/1.3 ui-monospace, 'Cascadia Mono', Consolas, monospace;
}

@media (max-width: 820px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
  }
  /* no room beside the headline once it stacks */
  .hero-art.s1 {
    display: none;
  }
}

/* ---------------------------------------------------------------- shopper bar */

.shopper {
  position: relative;
  z-index: 2;
  margin-top: -2.75rem;
}
.shopper-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 0.75rem 2rem;
  align-items: center;
  padding: clamp(1.1rem, 3vw, 1.6rem) clamp(1.1rem, 3vw, 2rem);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--drop) var(--pink-soft);
  border: 2px solid var(--line);
}
.shopper-card p {
  color: var(--ink-soft);
  font-size: 0.98rem;
}
@media (max-width: 720px) {
  .shopper-card {
    grid-template-columns: minmax(0, 1fr);
  }
}

.field {
  display: grid;
  gap: 0.35rem;
}
.field label {
  font-weight: 700;
  font-size: 0.95rem;
}
.input {
  width: 100%;
  min-height: 52px;
  padding: 0.6rem 1.1rem;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--ink);
  font: 600 1.1rem/1.2 var(--body);
  transition: border-color 0.15s ease;
}
.input::placeholder {
  color: var(--ink-soft);
  font-weight: 400;
}
.input:focus {
  border-color: var(--pink);
}
.input.is-valid {
  border-color: var(--ok);
}
.input.is-invalid {
  border-color: var(--bad);
}
.field-note {
  min-height: 1.4em;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.field-note.ok {
  color: var(--ok);
  font-weight: 600;
}
.field-note.bad {
  color: var(--bad);
  font-weight: 600;
}

/* ---------------------------------------------------------------- shop */

.section {
  padding-block: clamp(2.2rem, 6vw, 4rem);
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pill {
  min-height: 44px;
  padding: 0 1.1rem;
  border: 2px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  font: 600 1rem/1 var(--display);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.pill:hover {
  border-color: var(--pink);
}
.pill[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: 1.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 2px solid var(--line);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 9px 0 var(--pink-soft);
}
@media (prefers-reduced-motion: no-preference) {
  .card {
    animation: rise 0.45s ease both;
    animation-delay: calc(var(--i, 0) * 60ms);
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
.card-art {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background: var(--art-a);
}
.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-art svg.bean {
  width: 46%;
  fill: #fff;
  filter: drop-shadow(0 6px 0 var(--art-shadow));
  transition: transform 0.3s ease;
}
.card:hover .card-art svg.bean {
  transform: rotate(-8deg) scale(1.05);
}
.card-art svg.spark {
  position: absolute;
  width: 22px;
  fill: var(--pink);
}
.card-art svg.spark.a { top: 16%; right: 18%; }
.card-art svg.spark.b { bottom: 20%; left: 16%; width: 13px; }
/* a different hue of pink per card so a grid of placeholders is not a wall of one colour */
.card[data-tone='1'] .card-art { background: var(--art-b); }
.card[data-tone='2'] .card-art { background: var(--art-c); }
.card[data-tone='2'] .card-art svg.spark { fill: #fff; }

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.15rem 1.25rem 1.35rem;
}
.card-body p {
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tag {
  padding: 0.2rem 0.65rem;
  border-radius: var(--r-pill);
  background: var(--tint);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}
.card-foot {
  margin-top: auto;
  padding-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.price {
  font: 600 1.6rem/1 var(--display);
  font-variant-numeric: tabular-nums;
}
.buy {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stepper {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
}
.stepper button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  font: 600 1.3rem/1 var(--display);
  cursor: pointer;
}
.stepper button:hover:not(:disabled) {
  background: var(--tint);
}
.stepper button:disabled {
  color: var(--line);
  cursor: not-allowed;
}
.stepper output {
  min-width: 1.6rem;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.skeleton {
  min-height: 330px;
  border-radius: var(--r-lg);
  background: linear-gradient(100deg, var(--tint) 40%, var(--surface) 50%, var(--tint) 60%) 0 0 / 250% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .skeleton {
    animation: shimmer 1.3s linear infinite;
  }
}
@keyframes shimmer {
  to {
    background-position: -250% 0;
  }
}

/* ---------------------------------------------------------------- states */

.state {
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: clamp(2rem, 6vw, 3.5rem) 1rem;
  text-align: center;
}
.state svg.bean {
  width: 120px;
  fill: var(--pink-soft);
}
.state p {
  max-width: 44ch;
  color: var(--ink-soft);
}

.notice {
  padding: 0.8rem 1rem;
  border-radius: var(--r-md);
  background: var(--tint);
  border: 2px solid var(--line);
  font-weight: 600;
}
.notice.bad {
  border-color: var(--bad);
  color: var(--bad);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 60;
  translate: -50% 0;
  max-width: calc(100vw - 32px);
  padding: 0.8rem 1.3rem;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--ink) 35%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .toast {
    animation: pop 0.25s ease;
  }
}
@keyframes pop {
  from {
    opacity: 0;
    translate: -50% 12px;
  }
}

/* ---------------------------------------------------------------- basket drawer */

.drawer {
  width: min(100%, 440px);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: var(--bg);
  color: var(--ink);
}
.drawer::backdrop {
  background: color-mix(in srgb, var(--ink) 55%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .drawer[open] {
    animation: slide 0.25s ease;
  }
}
@keyframes slide {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
}
.drawer-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--line);
}
.icon-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--tint);
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: grid;
  gap: 0.9rem;
  align-content: start;
}
.line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 2px solid var(--line);
}
.line strong {
  font: 600 1.08rem/1.25 var(--display);
}
.line .each {
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.line .total {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.line .controls {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-foot {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 2px solid var(--line);
  background: var(--surface);
  display: grid;
  gap: 0.8rem;
}
.subtotal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font: 600 1.35rem/1 var(--display);
  font-variant-numeric: tabular-nums;
}
.fine {
  color: var(--ink-soft);
  font-size: 0.88rem;
  text-align: center;
}

/* ---------------------------------------------------------------- simple pages */

.panel {
  max-width: 680px;
  margin-inline: auto;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 2px solid var(--line);
  box-shadow: var(--drop) var(--pink-soft);
  display: grid;
  gap: 1.1rem;
}
.panel.center {
  text-align: center;
  justify-items: center;
}
.panel .logo {
  width: 88px;
  border-radius: 22px;
}
.receipt {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--r-md);
  background: var(--tint);
  text-align: left;
}
.receipt li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
}
.receipt li + li {
  border-top: 2px dashed var(--line);
}
.receipt li.sum {
  font: 600 1.15rem/1.3 var(--display);
}
.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}
.spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 5px solid var(--pink-soft);
  border-top-color: var(--berry);
}
@media (prefers-reduced-motion: no-preference) {
  .spinner {
    animation: spin 0.9s linear infinite;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.lookup {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
}
.lookup .field {
  flex: 1 1 240px;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
th,
td {
  padding: 0.7rem 0.6rem;
  text-align: left;
  border-bottom: 2px solid var(--line);
}
th {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.badge {
  display: inline-block;
  padding: 0.15rem 0.7rem;
  border-radius: var(--r-pill);
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--tint);
}
.badge.paid {
  color: var(--ok);
}
.badge.refunded,
.badge.disputed,
.badge.revoked {
  color: var(--bad);
}

.prose {
  max-width: 68ch;
  display: grid;
  gap: 1rem;
}
.prose h2 {
  margin-top: 0.9rem;
  font-size: 1.4rem;
}
.prose ul {
  margin: 0;
  padding-left: 1.3rem;
  display: grid;
  gap: 0.5rem;
}
.prose li::marker {
  color: var(--pink);
}
.prose .updated {
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.prose code,
.fine code {
  font: 600 0.92em/1 ui-monospace, 'Cascadia Mono', Consolas, monospace;
  overflow-wrap: anywhere;
}
/* a blank the site owner still has to fill in; remove the <mark> once done */
mark.fill {
  padding: 0.05em 0.35em;
  border-radius: 6px;
  background: #ffe27a;
  color: #3a1226;
  font-weight: 700;
}

.consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  font-size: 0.92rem;
  line-height: 1.45;
  cursor: pointer;
}
.consent input {
  width: 22px;
  height: 22px;
  margin: 0.1rem 0 0;
  accent-color: var(--berry);
}

#confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  margin-top: clamp(2rem, 6vw, 4rem);
  padding-block: 2rem 2.5rem;
  background: var(--tint);
  border-top: 2px solid var(--line);
  font-size: 0.95rem;
}
.site-footer .wrap {
  display: grid;
  gap: 1rem;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}
.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}
.disclaimer {
  font-weight: 700;
}
.site-footer p {
  max-width: 75ch;
  color: var(--ink-soft);
}
.site-footer p.disclaimer {
  color: var(--ink);
}

/* ---------------------------------------------------------------- community: goals and supporter boards */

.community {
  padding-bottom: 0;
}
.section-note {
  color: var(--ink-soft);
}
.goals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.goals:empty {
  display: none;
}
.goal {
  display: grid;
  gap: 0.7rem;
  padding: 1.25rem 1.4rem 1.4rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 2px solid var(--line);
}
.goal-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1rem;
}
.goal-percent {
  font: 600 1.5rem/1 var(--display);
  font-variant-numeric: tabular-nums;
  color: var(--berry);
}
/* a chunky track with the same hard shadow as the buttons */
.meter {
  position: relative;
  height: 26px;
  border-radius: var(--r-pill);
  background: var(--tint);
  box-shadow: inset 0 3px 0 var(--line);
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  min-width: 26px;
  border-radius: var(--r-pill);
  background: var(--pink);
  box-shadow: inset 0 -5px 0 var(--berry);
  transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.goal.reached .meter-fill {
  background: var(--ok);
  box-shadow: inset 0 -5px 0 color-mix(in srgb, var(--ok) 60%, #000);
}
.goal-amounts {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.goal-amounts strong {
  color: var(--ink);
}

.boards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
}
.board {
  padding: 1.25rem 1.4rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 2px solid var(--line);
}
.board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}
.pills.small .pill {
  min-height: 36px;
  padding: 0 0.8rem;
  font-size: 0.9rem;
}
.rank-list,
.recent-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}
.rank-list li,
.recent-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.5rem 0.7rem;
  border-radius: var(--r-md);
  background: var(--bg);
}
.rank {
  flex: none;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--tint);
  font: 600 0.95rem/1 var(--display);
  font-variant-numeric: tabular-nums;
}
/* the podium: first place in the brand pink with the logo's hard shadow */
.rank-list li:nth-child(1) .rank {
  background: var(--berry);
  color: #fff;
  box-shadow: 0 3px 0 var(--berry-deep);
}
.rank-list li:nth-child(2) .rank {
  background: var(--pink);
  color: var(--on-pink);
}
.rank-list li:nth-child(3) .rank {
  background: var(--pink-soft);
  color: var(--on-pink);
}
.rank-list li:nth-child(1) .who {
  font-size: 1.1rem;
}
.who {
  font-weight: 700;
  overflow-wrap: anywhere;
}
.recent-list li {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.15rem 0.75rem;
}
.recent-list .what {
  color: var(--ink-soft);
  font-size: 0.92rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.recent-list time {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 0.82rem;
  white-space: nowrap;
}
.board-empty {
  color: var(--ink-soft);
  padding: 0.5rem 0.2rem;
}

/* A player's face as a little profile picture. --s is the size of one skin pixel: the face is
   8 of them square, cut out of the 64-wide skin image, with the hat layer drawn on top. */
.avatar {
  --s: 4.5px;
  position: relative;
  flex: none;
  width: calc(var(--s) * 8);
  height: calc(var(--s) * 8);
  border-radius: 10px;
  overflow: hidden;
  background: var(--tint);
  box-shadow: 0 3px 0 var(--pink-soft);
  transition: transform 0.2s ease;
}
.avatar i {
  position: absolute;
  inset: 0;
  background-image: var(--skin);
  background-repeat: no-repeat;
  background-size: calc(var(--s) * 64) auto;
  image-rendering: pixelated;
}
.avatar .face {
  background-position: calc(var(--s) * -8) calc(var(--s) * -8);
}
.avatar .hat {
  background-position: calc(var(--s) * -40) calc(var(--s) * -8);
}
.avatar.blank {
  display: grid;
  place-items: center;
}
.avatar.blank svg {
  width: 70%;
  fill: var(--pink);
}
/* first place gets a bigger picture, tilted like a sticker */
.rank-list li:nth-child(1) .avatar {
  --s: 6px;
  border-radius: 13px;
  transform: rotate(-4deg);
  box-shadow: 0 4px 0 var(--berry-deep);
}
.rank-list li:hover .avatar,
.recent-list li:hover .avatar {
  transform: rotate(4deg) scale(1.08);
}
@media (prefers-reduced-motion: reduce) {
  .avatar {
    transition: none;
  }
}

/* ---------------------------------------------------------------- 404 */

.lost {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1.1rem;
  padding: clamp(2.5rem, 8vw, 5rem) 1rem;
  text-align: center;
}
.lost-number {
  display: flex;
  align-items: center;
  gap: clamp(0.4rem, 2vw, 1rem);
  font: 700 clamp(5rem, 22vw, 11rem) / 0.9 var(--display);
  color: var(--pink);
  text-shadow: 0 8px 0 var(--berry-deep);
}
/* the 0 is the bean from the logo, rolling away */
.lost-number svg {
  width: clamp(5.5rem, 24vw, 12rem);
  fill: var(--surface);
  filter: drop-shadow(0 8px 0 var(--pink-soft));
  stroke: var(--line);
  stroke-width: 3;
}
@media (prefers-reduced-motion: no-preference) {
  .lost-number svg {
    animation: wobble 2.6s ease-in-out infinite;
  }
}
@keyframes wobble {
  0%,
  100% {
    transform: rotate(-9deg);
  }
  50% {
    transform: rotate(9deg) translateY(-6px);
  }
}
.lost p {
  max-width: 42ch;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

/* ---------------------------------------------------------------- narrow header */

.brand,
.brand img {
  flex: none;
}
.site-nav a {
  white-space: nowrap;
}
@media (max-width: 480px) {
  .site-header .wrap {
    gap: 0.35rem;
  }
  /* the logo already links to the shop */
  .site-nav a[href='/'] {
    display: none;
  }
  .theme-toggle {
    width: 40px;
  }
}

/* ---------------------------------------------------------------- product cards open their page */

.card {
  position: relative;
}
.card-link {
  color: inherit;
  text-decoration: none;
}
/* stretch the title link over the whole card... */
.card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--r-lg);
}
.card-link:focus-visible {
  outline: none;
}
.card:has(.card-link:focus-visible) {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}
/* ...while the buttons stay on top and clickable */
.card .buy {
  position: relative;
  z-index: 2;
}
.card:hover .card-link {
  color: var(--berry);
}
.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn.in-basket {
  color: var(--ok);
}
.basket-qty {
  padding: 0.15rem 0.5rem;
  border-radius: var(--r-pill);
  background: var(--tint);
  color: var(--ink);
  font-size: 0.85rem;
}

/* ---------------------------------------------------------------- product page */

.crumbs {
  margin-bottom: 1.25rem;
}
.crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  text-decoration: none;
}
.product-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
@media (max-width: 760px) {
  .product-page {
    grid-template-columns: minmax(0, 1fr);
  }
}
.product-art {
  aspect-ratio: 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 8px 0 var(--pink-soft);
}
.product-art svg.bean {
  width: 58%;
}
.product-art svg.spark.c {
  position: absolute;
  top: 22%;
  left: 20%;
  width: 16px;
}
.product-art-skeleton {
  aspect-ratio: 1;
  min-height: 0;
}
.product-info {
  display: grid;
  gap: 1rem;
  justify-items: start;
}
.product-price {
  font-size: 2.2rem;
}
.product-desc {
  max-width: 55ch;
  font-size: 1.1rem;
  white-space: pre-line;
}
.product-info .buy {
  flex-wrap: wrap;
}
.product-for {
  text-align: left;
}
.facts {
  width: 100%;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}
.facts li {
  display: grid;
  gap: 0.15rem;
  padding: 0.8rem 1rem;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 2px solid var(--line);
}
.facts span {
  color: var(--ink-soft);
  font-size: 0.95rem;
}
