:root {
  color-scheme: light;

  /* lines + primary text, and the text that sits on top of an ink fill */
  --ink: #16122b;
  --on-ink: #fffdf7;
  /* dark text for bright accent fills (yellow, cyan, lime) in BOTH themes */
  --on-bright: #15122a;

  /* surfaces, light -> subtle */
  --paper: #fffdf7;
  --surface: #ffffff;
  --surface-2: #fffdf7;
  --surface-3: #fff6d6;
  --surface-4: #eef2fa;
  --hairline: #e6e9f0;

  /* an intentionally inverted panel (summary bar, grand total, phone header) */
  --invert-bg: #16122b;
  --invert-fg: #fffdf7;

  /* accents stay saturated in both themes so hat colors read true */
  --pop: #ff3d7f;
  --pop2: #ffd23f;
  --pop3: #22d3ee;
  --pop4: #7c4dff;
  --lime: #a3e635;
  --save: #15803d;

  /* Access Pass dashboard */
  --navy: #0b2a5b;
  --navy-ink: #0b2a5b;
  --navy-surface: #f6f8fc;
  --navy-track: #c8d2e4;
  --pass-foot: #ffffff;
  --bubble: #e6f7ff;

  /* backdrops */
  --stage-bg: linear-gradient(160deg, #fff 0%, #f3ecff 60%, #ffe9f3 100%);
  --blob-1: #ffe8f1;
  --blob-2: #e0f7ff;
  --blob-3: #fff4cc;
  --scrim: rgba(22, 18, 43, .72);

  --shadow-color: #16122b;
  --shadow: 6px 6px 0 var(--shadow-color);
  --radius: 22px;
}

[data-theme="dark"] {
  color-scheme: dark;

  --ink: #efeaff;
  --on-ink: #15122a;
  /* --on-bright deliberately does NOT flip: these fills stay bright */

  --paper: #120f24;
  --surface: #241f42;
  --surface-2: #1d1938;
  --surface-3: #3b2f16;
  --surface-4: #232f49;
  --hairline: #3b3466;

  --invert-bg: #2e2755;
  --invert-fg: #efeaff;

  --save: #4ade80;

  --navy: #16407c;
  --navy-ink: #9dc4ff;
  --navy-surface: #1b2744;
  --navy-track: #31456b;
  --pass-foot: #223049;
  --bubble: #15324a;

  --stage-bg: linear-gradient(160deg, #2a2450 0%, #1b1739 60%, #2f1836 100%);
  --blob-1: #5a2346;
  --blob-2: #12404f;
  --blob-3: #4a3c10;
  --scrim: rgba(5, 3, 15, .78);

  --shadow-color: #05030f;
}

* { box-sizing: border-box; }

/* the hidden attribute must beat any display rule below */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 15% 10%, var(--blob-1) 0%, transparent 45%),
              radial-gradient(circle at 85% 20%, var(--blob-2) 0%, transparent 45%),
              radial-gradient(circle at 50% 95%, var(--blob-3) 0%, transparent 50%),
              var(--paper);
  overflow-x: hidden;
}

h1, h2 { font-family: "Archivo Black", "Baloo 2", sans-serif; letter-spacing: -0.5px; }

/* floating background blobs */
.blobs { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.blobs span {
  position: absolute; border-radius: 50%; filter: blur(2px); opacity: .25;
  animation: float 14s ease-in-out infinite;
}
.blobs span:nth-child(1) { width: 260px; height: 260px; background: var(--pop); top: 8%; left: -80px; }
.blobs span:nth-child(2) { width: 200px; height: 200px; background: var(--pop3); bottom: 12%; right: -60px; animation-delay: -5s; }
.blobs span:nth-child(3) { width: 160px; height: 160px; background: var(--pop2); top: 55%; left: 45%; animation-delay: -9s; }
@keyframes float { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-28px) scale(1.08); } }

/* ===== top bar ===== */
.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 18px 26px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  font-size: 40px; line-height: 1;
  background: var(--pop2); border: 3px solid var(--ink); border-radius: 18px;
  padding: 6px 10px; box-shadow: var(--shadow);
  transform: rotate(-6deg);
}
.brand h1 { margin: 0; font-size: 30px; }
.brand p { margin: 0; font-weight: 700; font-size: 14px; opacity: .7; }

.topbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.chip-btn {
  font-family: inherit; font-weight: 800; font-size: 14px; cursor: pointer;
  background: var(--surface); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 999px;
  padding: 9px 16px; box-shadow: 4px 4px 0 var(--shadow-color);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.chip-btn:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--shadow-color); background: var(--pop2); color: var(--on-bright); }
.chip-btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--shadow-color); }

/* ===== layout ===== */
.layout {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr) 360px;
  gap: 18px;
  padding: 0 26px 18px;
  align-items: start;
}
@media (max-width: 1180px) { .layout { grid-template-columns: 1fr; } .center { order: -1; } }

/* Center column: the stage grows to eat the leftover height so it never leaves
   dead space under the hat, and the colorway strip stays pinned beneath it. */
.center {
  display: flex; flex-direction: column; gap: 18px;
  min-width: 0; height: calc(100vh - 190px);
  /* on a short viewport, let the page scroll rather than overflow the column */
  min-height: 620px;
}
@media (max-width: 1180px) { .center { height: auto; } }

.panel { display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - 190px); overflow-y: auto; padding-right: 4px; }
@media (max-width: 1180px) { .panel { max-height: none; } }
.panel::-webkit-scrollbar { width: 10px; }
.panel::-webkit-scrollbar-thumb { background: var(--ink); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }

.card {
  background: var(--surface); border: 3px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
}
.card h2 { margin: 0 0 12px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.step {
  display: inline-grid; place-items: center; width: 28px; height: 28px;
  background: var(--pop); color: #fff; border: 3px solid var(--ink);
  border-radius: 50%; font-size: 14px;
}
.hint { font-size: 13px; font-weight: 600; opacity: .65; margin: 10px 0 0; }

/* ===== style cards ===== */
.style-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.style-card {
  cursor: pointer; font-family: inherit; text-align: left;
  border: 3px solid var(--ink); border-radius: 16px; background: var(--surface);
  padding: 10px; box-shadow: 3px 3px 0 var(--shadow-color);
  transition: transform .12s ease, background .12s ease;
}
.style-card:hover { transform: translateY(-3px); }
.style-card .emoji { font-size: 24px; }
.style-card .name { display: block; font-weight: 800; font-size: 14px; }
.style-card .price { font-size: 12px; font-weight: 700; opacity: .6; }
.style-card[aria-pressed="true"] { color: var(--on-bright); background: var(--pop3); box-shadow: 3px 3px 0 var(--shadow-color), inset 0 0 0 3px var(--surface); }

/* ===== pills ===== */
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  cursor: pointer; font-family: inherit; font-weight: 800; font-size: 13px;
  border: 3px solid var(--ink); border-radius: 999px; background: var(--surface);
  padding: 7px 14px; box-shadow: 3px 3px 0 var(--shadow-color);
  transition: transform .1s ease, background .1s ease;
}
.pill:hover { transform: translateY(-2px); }
.pill[aria-pressed="true"] { background: var(--lime); color: var(--on-bright); }
.pill-row.small .pill { font-size: 12px; padding: 5px 11px; }

/* ===== swatches ===== */
.swatch-block { margin-bottom: 12px; }
.swatch-block label { font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; opacity: .7; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 7px; }
.swatch {
  width: 34px; height: 34px; border-radius: 12px; cursor: pointer;
  border: 3px solid var(--ink); box-shadow: 2px 2px 0 var(--shadow-color);
  transition: transform .1s ease;
  position: relative;
}
.swatch:hover { transform: scale(1.12) rotate(-4deg); }
.swatch[aria-pressed="true"]::after {
  content: "✓"; position: absolute; inset: 0; display: grid; place-items: center;
  font-weight: 900; color: #fff; text-shadow: 0 0 4px #000, 0 0 2px #000;
}

/* ===== stage ===== */
.stage {
  position: relative; border: 3px solid var(--ink); border-radius: 28px;
  box-shadow: var(--shadow); overflow: hidden; min-height: 420px;
  background: var(--stage-bg);
  flex: 1 1 auto;
}
@media (max-width: 1180px) { .stage { min-height: 560px; flex: 0 0 auto; } }
#viewport { position: absolute; inset: 0; }
#viewport canvas { display: block; width: 100% !important; height: 100% !important; }
.stage-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  pointer-events: none; flex-wrap: wrap;
}
.view-buttons { display: flex; gap: 6px; pointer-events: auto; flex-wrap: wrap; }
.view-buttons button {
  font-family: inherit; font-weight: 800; font-size: 12px; cursor: pointer;
  border: 3px solid var(--ink); border-radius: 999px; background: var(--surface);
  padding: 6px 13px; box-shadow: 3px 3px 0 var(--shadow-color);
}
.view-buttons button:hover { background: var(--pop2); }
.drag-hint { margin: 0; font-weight: 700; font-size: 12px; opacity: .55; }
.loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-weight: 800; background: var(--surface); z-index: 3;
}

/* ===== team colorways ===== */
.colorways { flex: 0 0 auto; padding: 14px 16px; }
.colorways-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.colorways-head h2 { margin: 0; }
.colorways .hint { margin: 8px 0 10px; }
.chip-btn.tiny { font-size: 12px; padding: 5px 12px; border-width: 2px; box-shadow: 2px 2px 0 var(--shadow-color); }
.colorway-row {
  display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px;
  scrollbar-width: thin;
}
.colorway-row::-webkit-scrollbar { height: 8px; }
.colorway-row::-webkit-scrollbar-thumb { background: var(--ink); border-radius: 8px; }
.colorway-btn {
  flex: 0 0 auto; cursor: pointer; font-family: inherit; font-weight: 800; font-size: 11px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 78px;
  background: var(--surface); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 16px; padding: 8px 5px;
  box-shadow: 3px 3px 0 var(--shadow-color);
  transition: transform .12s ease, box-shadow .12s ease;
}
.colorway-btn:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--shadow-color); }
.colorway-btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--shadow-color); }
.colorway-btn[aria-pressed="true"] { background: var(--pop2); color: var(--on-bright); }
.colorway-btn .cw-name { line-height: 1.15; text-align: center; }
/* little cap glyph: crown on top, bill below, accent button on the squatchee */
.cw-chip {
  position: relative; width: 42px; height: 30px; flex: 0 0 auto;
  border: 2px solid var(--ink); border-radius: 999px 999px 6px 6px;
  overflow: hidden;
}
.cw-chip i { position: absolute; left: 0; right: 0; display: block; }
.cw-chip .cw-crown { top: 0; height: 62%; }
.cw-chip .cw-bill { bottom: 0; height: 38%; border-top: 2px solid rgba(0,0,0,.35); }
.cw-chip .cw-accent {
  top: 3px; left: 50%; transform: translateX(-50%);
  width: 7px; height: 7px; right: auto; border-radius: 50%; border: 1px solid rgba(0,0,0,.4);
}

/* ===== patches ===== */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tab {
  cursor: pointer; font-family: inherit; font-weight: 800; font-size: 12px;
  border: 3px solid var(--ink); border-radius: 999px; background: var(--surface); padding: 5px 12px;
}
.tab[aria-pressed="true"] { background: var(--pop4); color: #fff; }
.search {
  width: 100%; font-family: inherit; font-weight: 700; font-size: 14px;
  border: 3px solid var(--ink); border-radius: 999px; padding: 8px 14px;
  background: var(--surface-2); margin-bottom: 10px;
}
.search:focus { outline: none; background: var(--surface); box-shadow: 3px 3px 0 var(--pop3); }

.tabs { max-height: 76px; overflow-y: auto; }
.patch-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px;
  max-height: 290px; overflow-y: auto; padding: 3px;
}
.patch-grid::-webkit-scrollbar, .tabs::-webkit-scrollbar { width: 8px; }
.patch-grid::-webkit-scrollbar-thumb, .tabs::-webkit-scrollbar-thumb {
  background: var(--ink); border-radius: 8px; border: 2px solid transparent; background-clip: content-box;
}
.patch-empty { grid-column: 1 / -1; font-weight: 700; font-size: 13px; opacity: .6; padding: 10px 2px; }

/* ---------- custom embroidery ---------- */
.font-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.font-btn {
  font-family: inherit; cursor: pointer; background: var(--surface-2);
  border: 3px solid var(--ink); border-radius: 12px; padding: 7px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.1;
}
.font-btn .fsample { font-size: 19px; color: inherit; }
.font-btn .fname { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; opacity: .62; }
.font-btn:hover { transform: translate(-1px, -1px); box-shadow: 2px 2px 0 var(--shadow-color); }
.font-btn[aria-pressed="true"] { color: var(--on-bright); background: var(--pop3); box-shadow: 3px 3px 0 var(--shadow-color); }

.emb-preview-wrap { position: relative; margin: 12px 0 10px; }
.emb-preview-tag {
  position: absolute; top: -9px; left: 10px; z-index: 1;
  background: var(--invert-bg); color: var(--invert-fg); font-size: 9px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px;
}
#embPreview {
  display: block; width: 100%; height: auto;
  border: 3px solid var(--ink); border-radius: 14px; background: #2f3340;
}
.patch-btn {
  cursor: pointer; background: var(--surface); border: 3px solid var(--ink); border-radius: 14px;
  padding: 6px 4px; box-shadow: 3px 3px 0 var(--shadow-color); font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: transform .1s ease;
}
.patch-btn:hover { transform: translateY(-3px) rotate(-2deg); }
.patch-btn canvas { width: 54px; height: 54px; border-radius: 10px; }
.patch-btn span { font-size: 10px; font-weight: 800; line-height: 1.1; text-align: center; }
/* Let the gallery scroll vertically on touch while a sideways drag starts a
   patch drag instead. */
.patch-btn { touch-action: pan-y; cursor: grab; }
.patch-btn:active { cursor: grabbing; }

/* ---------- drag a patch onto the hat ---------- */
.patch-ghost {
  position: fixed; left: 0; top: 0; z-index: 60;
  transform: translate(-50%, -50%) rotate(-6deg) scale(.92);
  pointer-events: none; display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  transition: transform .12s ease;
}
.patch-ghost canvas {
  width: 86px; height: 86px; border-radius: 16px;
  border: 3px solid var(--ink); box-shadow: 5px 6px 0 rgba(17, 17, 24, .38);
  background: var(--surface);
}
.patch-ghost.over { transform: translate(-50%, -50%) rotate(0deg) scale(1.06); }
.ghost-tag {
  font-weight: 900; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  background: var(--invert-bg); color: var(--invert-fg); border-radius: 999px; padding: 4px 10px;
  white-space: nowrap; box-shadow: 2px 2px 0 rgba(17, 17, 24, .3);
}
.patch-ghost.over .ghost-tag { background: var(--pop); }
body.is-dragging-patch { cursor: grabbing; user-select: none; }
body.is-dragging-patch .patch-btn:hover { transform: none; }
/* Light up the 3D stage as a drop zone. */
.stage.drop-armed { outline: 4px dashed var(--pop); outline-offset: -10px; }
.stage.drop-armed .drag-hint { opacity: 1; color: var(--pop); }

.placement { margin-top: 14px; }
.placement label { font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; opacity: .7; display: block; margin-bottom: 6px; }

.applied { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.applied-row {
  display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  background: var(--surface-3); border: 2px solid var(--ink); border-radius: 12px; padding: 5px 8px;
}
.applied-row button {
  margin-left: auto; cursor: pointer; border: 2px solid var(--ink); background: var(--pop);
  color: #fff; border-radius: 8px; font-weight: 900; padding: 1px 7px; font-family: inherit;
}
.thread-dot {
  flex: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--ink); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25);
}

/* ===== loyalty ===== */
.field { display: block; margin-bottom: 10px; }
.field span { font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; opacity: .7; }
.field input,
.field textarea {
  width: 100%; margin-top: 5px; font-family: inherit; font-weight: 700; font-size: 15px;
  border: 3px solid var(--ink); border-radius: 14px; padding: 9px 12px; background: var(--surface-2);
}
.field input:focus,
.field textarea:focus { outline: none; background: var(--surface); box-shadow: 3px 3px 0 var(--pop3); }
.field textarea {
  display: block; resize: none; line-height: 1.35; text-align: center;
  letter-spacing: .06em; text-transform: uppercase;
}

.emb-text-meta { display: flex; align-items: center; gap: 10px; }
.emb-text-meta .hint { margin: 0; }
.linkbtn {
  margin-left: auto; cursor: pointer; background: none; border: none; padding: 0;
  font-family: inherit; font-size: 12px; font-weight: 800; color: var(--pop);
  text-transform: uppercase; letter-spacing: .04em; text-decoration: underline;
  text-underline-offset: 3px;
}
.linkbtn:disabled { opacity: .35; cursor: default; text-decoration: none; }
.points-readout {
  background: var(--pop4); color: #fff; border: 3px solid var(--ink); border-radius: 14px;
  padding: 10px 12px; font-weight: 700; font-size: 13px; margin: 6px 0 12px; line-height: 1.45;
}
.points-readout b { font-size: 15px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ===== spec chips + order lines ===== */
.spec-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.spec-chips span {
  font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-4); border: 2px solid var(--ink); white-space: nowrap;
}
.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.price-lines { border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; }
.price-lines div {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 7px 11px; font-size: 13px; font-weight: 700;
  border-bottom: 2px solid var(--hairline); background: var(--surface);
}
.price-lines div:last-child { border-bottom: 0; }
.price-lines .sub { opacity: .65; font-size: 12px; }
.price-lines .save { color: var(--save); }
.price-lines .grand { background: var(--invert-bg); color: var(--pop2); font-family: "Archivo Black", sans-serif; font-size: 15px; }

/* ===== access pass dashboard ===== */
.pass-card {
  border: 3px solid var(--ink); border-radius: 18px; overflow: hidden;
  background: var(--navy-surface); margin: 4px 0 12px; box-shadow: 4px 4px 0 var(--shadow-color);
  animation: pop .25s ease;
}
.pass-head {
  background: var(--navy); color: #fff; padding: 10px 13px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.pass-crumb { margin: 0; font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--pop2); }
.pass-head h3 { margin: 0; font-family: "Archivo Black", sans-serif; font-size: 19px; }
.pass-status { font-size: 10px; font-weight: 800; color: var(--lime); white-space: nowrap; }

.pass-body { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 12px 13px; }
.pass-tier-line { margin: 0 0 6px; font-size: 14px; font-weight: 700; }
.pass-tier-line b { font-family: "Archivo Black", sans-serif; }
.pass-meta { margin: 0 0 3px; font-size: 11px; font-weight: 700; opacity: .7; }
.tier-bar {
  margin: 8px 0 4px; height: 9px; border-radius: 99px; background: var(--navy-track);
  border: 2px solid var(--ink); overflow: hidden;
}
.tier-bar i { display: block; height: 100%; width: 0; background: var(--navy-ink); transition: width .4s ease; }
.tier-labels { display: flex; justify-content: space-between; font-size: 10px; font-weight: 800; opacity: .75; margin-bottom: 4px; }

.pass-stats { display: flex; flex-direction: column; gap: 10px; border-left: 2px dashed var(--navy-track); padding-left: 12px; }
.stat { display: flex; align-items: center; gap: 8px; }
.stat-icon { font-size: 22px; }
.stat p { margin: 0; font-size: 11px; font-weight: 700; opacity: .7; }
.stat b { font-family: "Archivo Black", sans-serif; font-size: 17px; color: var(--navy-ink); white-space: nowrap; }

.reward-apply {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 13px; background: var(--pass-foot); border-top: 3px solid var(--ink);
}
.reward-label { margin: 0; font-weight: 800; font-size: 13px; }
.reward-sub { margin: 2px 0 0; font-size: 11px; font-weight: 700; opacity: .65; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button {
  width: 30px; height: 30px; border-radius: 10px; border: 3px solid var(--ink);
  background: var(--pop2); color: var(--on-bright); font-family: inherit; font-weight: 900; font-size: 17px;
  cursor: pointer; line-height: 1; box-shadow: 2px 2px 0 var(--shadow-color);
}
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper b { font-family: "Archivo Black", sans-serif; font-size: 17px; min-width: 18px; text-align: center; }

.big-btn {
  width: 100%; cursor: pointer; font-family: inherit; font-weight: 900; font-size: 17px;
  background: var(--pop); color: #fff; border: 3px solid var(--ink);
  border-radius: 16px; padding: 13px; box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.big-btn:hover { transform: translate(-2px,-2px); box-shadow: 8px 8px 0 var(--shadow-color); }
.big-btn:active { transform: translate(3px,3px); box-shadow: 2px 2px 0 var(--shadow-color); }
.big-btn.alt { background: var(--pop3); color: var(--on-bright); margin-top: 9px; font-size: 15px; }

.sharebox {
  display: flex; gap: 7px; margin: 12px 0 10px;
}
.sharebox input {
  flex: 1; min-width: 0; font-family: inherit; font-size: 12px; font-weight: 700;
  border: 3px solid var(--ink); border-radius: 12px; padding: 8px 10px;
  background: var(--surface-2); color: var(--ink); text-overflow: ellipsis;
}
.sharebox button {
  flex: none; cursor: pointer; font-family: inherit; font-weight: 900; font-size: 13px;
  background: var(--pop4); color: #fff; border: 3px solid var(--ink);
  border-radius: 12px; padding: 8px 14px;
}
.sharebox button:active { transform: translate(2px, 2px); }

/* ===== summary ===== */
.summary {
  position: relative; z-index: 2;
  margin: 0 26px 26px; padding: 14px 20px;
  background: var(--invert-bg); color: var(--invert-fg); border-radius: var(--radius);
  display: flex; gap: 22px; flex-wrap: wrap; align-items: center;
  font-weight: 700; font-size: 14px;
}
.summary .tagline { font-family: "Archivo Black", sans-serif; color: var(--pop2); font-size: 16px; }
.summary .sum-item b { color: var(--pop3); }
.summary .total { margin-left: auto; font-family: "Archivo Black", sans-serif; font-size: 20px; color: var(--lime); }

/* ===== modal ===== */
.modal-backdrop {
  position: fixed; inset: 0; background: var(--scrim); z-index: 20;
  display: grid; place-items: center; padding: 20px;
}
.modal {
  background: var(--surface); border: 4px solid var(--ink); border-radius: 26px;
  box-shadow: 10px 10px 0 var(--pop); padding: 20px; width: min(420px, 94vw);
  position: relative; animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(.85) rotate(-3deg); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute; top: -16px; right: -16px; width: 38px; height: 38px;
  border-radius: 50%; border: 3px solid var(--ink); background: var(--pop2); color: var(--on-bright);
  font-weight: 900; cursor: pointer; font-family: inherit; box-shadow: 3px 3px 0 var(--shadow-color);
}
.phone { border: 3px solid var(--ink); border-radius: 20px; overflow: hidden; margin-bottom: 16px; }
.phone-top { background: var(--invert-bg); color: var(--invert-fg); font-weight: 800; font-size: 13px; padding: 8px 12px; text-align: center; }
.phone-bottom { font-size: 11px; font-weight: 700; opacity: .6; padding: 6px 12px; text-align: right; }
.bubble {
  background: var(--bubble); margin: 12px; padding: 12px 14px; border-radius: 16px 16px 16px 4px;
  border: 2px solid var(--ink); font-weight: 600; font-size: 13.5px; white-space: pre-wrap; line-height: 1.5;
}

/* ===== confetti ===== */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.confetti i {
  position: absolute; width: 11px; height: 16px; top: -24px;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: .9; }
}
