/* Tokens mirror the Paper file "posterspin.com — Website v1" (see src/app.css). */
:root {
  --paper: #ffffff;
  --surface: #f4f4f4;
  --line: #e8e8e8;
  --line-strong: #dcdcdc;
  --muted: #555555; /* as src/app.css */
  --ink: #111111;
  --fluo: #ff48b0;
  --fluo-tint: color-mix(in srgb, var(--fluo) 16%, transparent);
  --fluo-deep: #d1106f; /* the Spin button: deep enough for a white label (5.2 : 1) */
  --display: Archivo, ui-sans-serif, system-ui, sans-serif;
  --body: Manrope, ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --pop-shadow: 0 16px 48px rgb(0 0 0 / .12);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--surface);
  color: var(--ink);
  font: 500 14px/20px var(--body);
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  overflow: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
svg { flex: none; }

/* Line icons share one stroke style. */
.get svg, .like svg, .disclose svg, .close svg, .back svg, .reel-open svg, .primary svg, .sent-body svg,
.basket-button svg, .in-basket svg, .remove svg, .slot svg {
  fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- layout: desktop ---------- */
.app {
  display: grid;
  height: 100vh;
  height: 100dvh;
  grid-template-columns: 152px minmax(0, 1fr) 152px;
  grid-template-rows: 72px minmax(0, 1fr) auto;
  grid-template-areas: "bar bar bar" "spins stage ." "dock dock dock";
}

.bar {
  grid-area: bar;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font: 800 23px/26px var(--display); letter-spacing: -0.035em;
}
.logo svg { width: 26px; height: 26px; fill: var(--ink); }
.get {
  display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 20px 0 22px;
  border: 0; border-radius: 999px;
  background: var(--ink); color: #fff;
  font-weight: 600; font-size: 15px;
}
.get svg { width: 16px; height: 16px; stroke-width: 1.8; }
.get:hover, .get[aria-expanded="true"] { background: #333; }
.bar-actions { display: flex; align-items: center; gap: 10px; }
/* Shown once the basket has a poster. */
.basket-button {
  display: flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 12px 0 16px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper);
  font-weight: 600; font-size: 15px;
}
.basket-button:hover { border-color: var(--line-strong); }
.basket-button[aria-expanded="true"] { border-color: var(--ink); }
.basket-button svg { width: 18px; height: 18px; stroke-width: 1.6; }
.basket-button .count {
  display: grid; place-items: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--fluo-deep); color: #fff;
  font-weight: 700; font-size: 13px; line-height: 16px;
}

/* Your spins: a vertical rail on desktop. */
.spins {
  grid-area: spins;
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
  min-height: 0;
  padding: 16px 0 16px 32px;
}
.spins p { font-weight: 600; color: var(--muted); }
.strip {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 0; overflow: auto;
  /* A scrolling box clips at its padding: leave room for the 5px current-spin ring. */
  padding: 6px; margin: -6px;
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip button {
  flex: none;
  width: 44px; height: 62px;
  padding: 0; border: 0; border-radius: 3px;
  background: var(--line) center / cover no-repeat;
  opacity: .6;
  transition: opacity .15s;
}
.strip button:hover { opacity: .9; }
.strip button[aria-current="true"] { opacity: 1; outline: 2px solid var(--ink); outline-offset: 3px; }
.strip button { position: relative; }
/* A spin that is in the basket. */
.strip button.in-basket::after {
  content: ""; position: absolute; top: -6px; right: -6px;
  width: 18px; height: 18px; border: 2px solid var(--surface); border-radius: 50%;
  background: var(--fluo-deep) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 8.5 3.2 3.2L13 4.5' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat;
}

.stage {
  grid-area: stage;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  min-height: 0;
  padding: 8px 0 20px;
}
.poster {
  position: relative;
  flex: 1; min-height: 0; width: 100%;
  display: grid; place-items: center;
}
.poster canvas { display: block; background: #fff; box-shadow: 0 12px 40px rgb(0 0 0 / .12); }
.notice { position: absolute; max-width: 32ch; text-align: center; color: var(--muted); }

/* While "Get this poster" is open, the stage shows the poster on a wall, clear of the sheet. */
@media (min-width: 1200px) {
  .app.on-wall :is(.poster, .like) { display: none; }
}
.wall {
  flex: 1; min-height: 0; width: 100%;
  display: flex; align-items: center; justify-content: center;
  padding-right: 304px;
  container-type: size;
}
/* Keep the complete photographic composition above its caption and controls. */
.wall .room { width: min(100cqw, (100cqh - 96px) * 1336 / 891); }
.wall .room-view { border-radius: 12px; }

.like {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper);
  font-weight: 600;
  white-space: nowrap;
}
.like svg { width: 16px; height: 16px; stroke-width: 1.6; }
.like:hover { border-color: var(--line-strong); }

/* ---------- reels and Spin ---------- */
.dock {
  grid-area: dock;
  display: flex; align-items: center; justify-content: center; gap: 24px;
  padding: 8px 32px 32px;
}
/* Reels measure their container for the chevron rule, so the row needs its own width. */
.reels { flex: 0 1 1032px; min-width: 0; display: flex; gap: 8px; }
.reel {
  flex: 0 1 200px; min-width: 0;
  container-type: inline-size;
  display: flex; align-items: center;
  height: 72px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--paper);
}
.reel:hover { border-color: var(--line-strong); }
.reel[data-open] { border-color: var(--ink); box-shadow: inset 0 0 0 .5px var(--ink); }
.reel[data-locked] { border-color: var(--fluo); box-shadow: inset 0 0 0 .5px var(--fluo); }
.reel-open {
  flex: 1; min-width: 0; align-self: stretch; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  padding: 0 0 0 18px;
  border: 0; border-radius: 16px 0 0 16px;
  background: none; text-align: left;
}
.reel-label { font-size: 13px; line-height: 16px; color: var(--muted); white-space: nowrap; }
.reel-value { display: flex; align-items: center; gap: 8px; min-width: 0; }
.reel-text { font-weight: 600; font-size: 16px; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reel-value svg { width: 12px; height: 12px; stroke-width: 1.8; color: var(--muted); }
/* A long colour like "Tricolore" with a four-ink swatch needs the chevron's room. */
@container (max-width: 197px) { .reel-value:has(.swatch) svg { display: none; } }
.reel .swatch { height: 18px; }

.swatch {
  flex: none;
  display: flex; gap: 2px;
  height: 20px; padding: 3px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08);
}
.swatch i { width: 5px; border-radius: 1px; }

.lock, .panel-lock { display: flex; align-items: center; justify-content: center; border: 0; background: none; }
.lock { width: 32px; height: 32px; margin-right: 10px; border-radius: 999px; color: var(--muted); }
.lock:hover { background: var(--surface); color: var(--ink); }
.lock svg, .panel-lock svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.lock[aria-pressed="true"], .lock[aria-pressed="true"]:hover { background: var(--fluo-tint); color: var(--ink); }
.lock-closed, [aria-pressed="true"] > .lock-open { display: none; }
[aria-pressed="true"] > .lock-closed { display: block; }
[aria-pressed="true"] > .lock-closed rect { fill: currentColor; }

.spin {
  flex: none;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  height: 72px; padding: 0 20px 0 24px;
  border: 0; border-radius: 999px;
  background: var(--fluo-deep); color: #fff;
  font: 800 26px/30px var(--display); letter-spacing: -0.025em;
  transition: transform 90ms ease;
}
.spin:hover { filter: brightness(.96); }
.spin:active { transform: scale(.97); }
/* The logo, one element per sheet: app.js winds and flings the wheel and swings the sheets out. */
.spin .wheel { position: relative; width: 30px; height: 30px; }
.spin .wheel svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: currentColor; }
.spin kbd {
  padding: 4px 8px; border-radius: 6px;
  background: rgb(0 0 0 / .14); color: #fff;
  font: 700 13px/16px var(--body); letter-spacing: 0;
}
@media (hover: none) {
  .spin { padding: 0 28px 0 24px; }
  .spin kbd { display: none; }
}

/* ---------- reel menu (a popover above its reel on desktop) ---------- */
.panel {
  position: fixed; z-index: 20;
  display: flex; flex-direction: column; gap: 18px;
  width: 392px; max-height: calc(100dvh - 32px); overflow: auto;
  padding: 20px;
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--pop-shadow);
  outline: none;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; }
.panel-head h2 { font-weight: 600; font-size: 15px; }
.panel-actions { display: none; }
.panel-body { display: flex; flex-direction: column; gap: 18px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  height: 34px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: 999px;
  background: none; color: var(--muted);
}
.chips button:hover, .palettes button:hover, .finishes button:hover { border-color: var(--line-strong); color: var(--ink); }
.chips button[aria-pressed="true"], .palettes button[aria-pressed="true"], .finishes button[aria-pressed="true"] {
  border-color: var(--ink); box-shadow: inset 0 0 0 .5px var(--ink); color: var(--ink); font-weight: 600;
}

.palettes { display: flex; flex-wrap: wrap; gap: 8px; }
.palettes button {
  display: flex; align-items: center; gap: 10px;
  width: calc(50% - 4px); height: 44px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 10px;
  background: none; color: var(--muted); text-align: left;
}
.palettes .swatch { height: 22px; }
.palettes .swatch i { width: 6px; }

.shapes { display: flex; flex-wrap: wrap; gap: 16px 8px; }
.shapes button {
  display: flex; flex-direction: column; gap: 8px;
  width: calc((100% - 16px) / 3);
  padding: 0; border: 0; background: none;
  color: var(--muted); text-align: left;
}
.shapes canvas { display: block; width: 100%; aspect-ratio: 108 / 80; border-radius: 8px; background: var(--surface); }
.shapes button:hover { color: var(--ink); }
.shapes button[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.shapes button[aria-pressed="true"] canvas { outline: 2px solid var(--ink); outline-offset: 2px; }

.finishes { display: flex; gap: 8px; }
.finishes button {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: none; text-align: left;
}
.finishes b { font-weight: 600; color: var(--ink); }
.finishes span { font-size: 13px; line-height: 18px; color: var(--muted); font-weight: 500; white-space: nowrap; }

.finetune { display: flex; flex-direction: column; padding-top: 14px; border-top: 1px solid var(--line); }
.disclose {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 28px; padding: 0;
  border: 0; background: none;
  font-weight: 600; text-align: left;
}
.disclose svg { width: 14px; height: 14px; stroke-width: 1.6; color: var(--muted); transition: transform .15s; }
.disclose[aria-expanded="true"] svg { transform: rotate(180deg); }
.sliders { display: flex; flex-direction: column; gap: 16px; padding: 12px 0 2px; }

.slider { display: grid; grid-template-columns: 1fr auto; row-gap: 10px; align-items: center; }
.slider output { color: var(--muted); font-variant-numeric: tabular-nums; }
.slider input {
  --f: .5; /* 0–1, set from JS; the ink part ends under the thumb's centre */
  grid-column: 1 / -1;
  width: 100%; height: 16px; margin: 0;
  -webkit-appearance: none; appearance: none;
  background: linear-gradient(var(--ink), var(--ink)) 0 50% / calc(8px + (100% - 16px) * var(--f)) 4px no-repeat,
              linear-gradient(var(--line), var(--line)) 0 50% / 100% 4px no-repeat;
  border-radius: 2px;
  cursor: pointer;
}
.slider input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink);
}
.slider input::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink);
}

.fields { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 16px; color: var(--muted); }
.field input {
  width: 100%; height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper); color: var(--ink);
  font-size: 14px; line-height: 20px;
}
.field input:hover { border-color: var(--line-strong); }
.field input:focus-visible { outline-offset: 0; }
.field input[data-key="title"] { text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
/* The second caption line sits right under the first, without its own label. */
.field:has(.sr) { margin-top: -6px; }

/* ---------- Get this poster (a popover under its button on desktop) ---------- */
.scrim { display: none; }
.sheet {
  position: fixed; z-index: 30;
  top: 76px; right: 32px;
  display: flex; flex-direction: column;
  width: 400px; max-height: calc(100dvh - 92px); overflow: hidden;
  padding: 20px 8px 8px;
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--pop-shadow);
  outline: none;
}
.grabber, .close { display: none; }
.sheet-head { display: flex; align-items: baseline; gap: 8px; padding: 0 12px 12px; }
.sheet:is([data-step="email"], [data-step="sent"]) .sheet-head { align-items: center; padding: 0 12px 16px 4px; }
.sheet-head h2 { flex: 1; min-width: 0; font: 800 28px/32px var(--display); letter-spacing: -0.03em; }
.sheet-head p { color: var(--muted); }
.back {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 999px; background: none;
}
.back:hover { background: var(--surface); }
.back svg { width: 16px; height: 16px; stroke-width: 1.8; }
/* Each step scrolls on its own; in the basket only the list does, under a fixed footer. */
.step { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.step[data-step="basket"] { overflow: hidden; }

/* What to get: the free postcard, or the poster with its add-on. */
.choices { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0; padding: 4px 0 0; border: 0; }
.choice { display: flex; align-items: flex-start; gap: 12px; padding: 14px 12px; border-radius: 12px; cursor: pointer; }
.choice-group { display: flex; flex-direction: column; border-radius: 12px; }
.choice.selected, .choice-group.selected { background: var(--surface); }
.choice.addon { margin: 0 12px; padding: 12px 0 14px; border-top: 1px solid #e2e2e2; border-radius: 0; }
.choice-group:not(.selected) .addon { border-top-color: var(--line); opacity: .45; cursor: default; }
.choice input, .item-addon input {
  -webkit-appearance: none; appearance: none;
  flex: none; width: 18px; height: 18px; margin: 1px 0 0;
  border: 1.5px solid #bdbdbd; border-radius: 50%;
  background: var(--paper) center / 12px no-repeat;
  cursor: inherit;
}
.choice input:checked[type="radio"] { border: 5px solid var(--ink); }
.choice input[type="checkbox"], .item-addon input { border-color: var(--ink); border-radius: 4px; }
.choice input:checked[type="checkbox"], .item-addon input:checked {
  background-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 8.5 3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.choice input:focus-visible, .item-addon input:focus-visible { outline-offset: 2px; }
.choice-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.choice-text b, .choice .price { font-weight: 600; font-size: 15px; }
.choice-text span { color: var(--muted); }
.choice .highlight { display: flex; align-items: center; gap: 6px; }
.spark { width: 12px; height: 12px; fill: var(--fluo); }
.choice .free {
  padding: 2px 8px; border-radius: 999px;
  background: var(--fluo-deep); color: #fff;
  font-weight: 700; font-size: 12px; line-height: 16px;
}

/* The basket. */
.basket { flex: 0 1 auto; min-height: 0; overflow-y: auto; margin: 0; padding: 8px 0 0; list-style: none; }
.basket .item { display: flex; align-items: flex-start; gap: 14px; padding: 12px; }
.basket .item + .item { border-top: 1px solid var(--line); }
.basket img, .slot { flex: none; width: 44px; height: 62px; border-radius: 3px; }
.basket img { display: block; object-fit: cover; background: var(--line); box-shadow: 0 1px 3px rgb(0 0 0 / .14); }
/* A basket poster's picture opens it on the stage. */
.item-open { flex: none; padding: 0; border: 0; border-radius: 3px; background: none; cursor: pointer; }
.item-open:hover img { outline: 1.5px solid var(--muted); outline-offset: 2px; }
.basket .item-replace { align-self: flex-start; padding-top: 4px; font-weight: 600; }
.item-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.item-head b, .more b { font-weight: 600; font-size: 15px; }
.item-head b:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.item-note, .more .item-body span { color: var(--muted); }
.item-addon { display: flex; align-items: center; gap: 8px; padding-top: 8px; cursor: pointer; }
.item-addon input { width: 16px; height: 16px; margin: 0; background-size: 10px; }
.item-addon span { flex: 1; }
.item-addon b { font-weight: 600; }
.remove {
  display: grid; place-items: center; flex: none;
  width: 28px; height: 28px; margin: -4px -6px 0 -4px; padding: 0;
  border: 0; border-radius: 999px; background: none; color: var(--muted);
}
.remove:hover { background: var(--surface); color: var(--ink); }
.remove svg { width: 14px; height: 14px; stroke-width: 1.6; }
.more button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 0; border: 0; background: none; text-align: left; }
.more button:hover .slot { border-color: var(--muted); }
.slot { display: grid; place-items: center; border: 1.5px dashed #c8c8c8; }
.slot svg { width: 16px; height: 16px; stroke-width: 1.8; }
.basket-empty { padding: 8px 12px 20px; color: var(--muted); font-size: 15px; line-height: 22px; }
.total { display: flex; align-items: baseline; justify-content: space-between; font-weight: 600; font-size: 15px; }
.total b { font: 800 22px/28px var(--display); letter-spacing: -0.02em; }

.sheet-foot {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 8px; padding: 12px 12px 8px;
  border-top: 1px solid var(--line);
}
/* cm or in, under the choices: quiet, as the sizes already follow where the visitor is. */
.size-units {
  align-self: flex-end; display: flex;
  margin: 8px 12px 0; padding: 2px;
  border-radius: 999px; background: rgb(0 0 0 / .05);
}
.size-units button {
  height: 28px; padding: 0 12px;
  border: 0; border-radius: 999px; background: none; color: var(--muted);
  font-weight: 600; font-size: 13px; line-height: 16px;
}
.size-units button:hover { color: var(--ink); }
.size-units button[aria-pressed="true"] { background: var(--paper); box-shadow: 0 1px 2px rgb(0 0 0 / .12); color: var(--ink); }
/* The price of each extra poster: a tint of the accent, so it reads as a price, not a sale. */
.extra-price {
  display: flex; align-items: center; align-self: center; gap: 8px;
  height: 32px; padding: 0 14px;
  border-radius: 999px; background: var(--fluo-tint);
  font-weight: 600;
}
.extra-price b { font: 800 17px/20px var(--display); letter-spacing: -0.02em; }
.in-basket { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 28px; font-weight: 600; font-size: 15px; }
.in-basket svg { width: 16px; height: 16px; stroke-width: 1.8; }
.in-basket.earlier svg { display: none; }
.error { font-size: 13px; line-height: 18px; color: #b3261e; }
.fine { font-size: 13px; line-height: 18px; color: var(--muted); text-align: center; }
.text-button {
  align-self: center;
  padding: 0; border: 0; background: none;
  text-decoration: underline 1px; text-underline-position: from-font;
}
.text-button:hover { color: var(--ink); }

/* The free postcard: email step, then "Check your email". */
.email-body { display: flex; flex-direction: column; gap: 16px; padding: 0 12px 12px; }
.email-body > p:first-child { font-size: 15px; line-height: 22px; }
.email-field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.email-field input {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1px solid #d4d4d4; border-radius: 12px;
  background: var(--paper);
  font-weight: 400; font-size: 16px; line-height: 24px;
}
.email-field input::placeholder { color: #9a9a9a; }
.email-field input:hover { border-color: #bdbdbd; }
.email-field input:focus-visible { outline-offset: 0; }
.email-field input[aria-invalid="true"] { border-color: #b3261e; }
.email-body .error { margin-top: -10px; }
.consent { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; cursor: pointer; }
.consent input {
  -webkit-appearance: none; appearance: none;
  flex: none; width: 20px; height: 20px; margin: 0;
  border: 1.5px solid #bdbdbd; border-radius: 6px;
  background: var(--paper) center / 14px no-repeat;
  cursor: pointer;
}
.consent input:checked {
  border-color: var(--ink);
  background-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 8.5 3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.consent input:focus-visible { outline-offset: 2px; }

.sent-body { display: flex; flex-direction: column; gap: 8px; padding: 4px 12px 20px; }
.sent-body h3 { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; line-height: 24px; }
.sent-body svg { width: 20px; height: 20px; stroke-width: 1.6; }
.sent-body p { font-weight: 400; font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.sent-body a { text-align: left; color: var(--muted); }
.sent-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 12px 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.sent-foot .text-button { color: var(--ink); font-weight: 600; }

.primary {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 20px;
  border: 0; border-radius: 999px;
  background: var(--ink); color: #fff;
  font-weight: 600; font-size: 16px;
}
.primary svg { width: 16px; height: 16px; stroke-width: 1.6; }
.primary:hover:not(:disabled) { background: #333; }
.primary:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.primary.busy:disabled { background: #3a3a3a; color: #fff; cursor: progress; }
.primary .spinner { width: 18px; height: 18px; stroke-width: 2; animation: spin .8s linear infinite; }
.spinner circle { stroke: rgb(255 255 255 / .3); }
.spinner path { stroke: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .primary .spinner { animation-duration: 2.4s; } }

/* ---------- layout: phones and narrow windows ---------- */
@media (max-width: 1199px) {
  .app {
    max-width: 600px; margin: 0 auto;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    grid-template-areas: "bar bar" "stage stage" "spins spins" "reels reels" "spin like";
    padding-top: env(safe-area-inset-top, 0px);
  }
  .bar { height: 60px; padding: 0 20px; }
  .logo { gap: 8px; font-size: 20px; line-height: 22px; }
  .logo svg { width: 22px; height: 22px; }
  .get { height: 40px; padding: 0 14px 0 16px; gap: 8px; font-size: 14px; }
  .get svg { width: 14px; height: 14px; }
  .bar-actions { gap: 8px; }
  .basket-button { position: relative; justify-content: center; width: 40px; height: 40px; padding: 0; }
  .basket-button .label { display: none; }
  .basket-button .count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; line-height: 14px; }

  .stage, .dock { display: contents; }
  .poster { grid-area: stage; padding: 8px 20px; }

  .spins { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px 16px; }
  .spins p { flex: none; }
  .strip { flex-direction: row; gap: 8px; padding: 4px; margin: -4px; }
  .strip button { width: 28px; height: 39px; border-radius: 2px; }
  .strip button[aria-current="true"] { outline-offset: 2px; }
  .strip button.in-basket::after { top: -5px; right: -5px; width: 14px; height: 14px; border-width: 1.5px; background-size: 8px; }

  .reels {
    grid-area: reels;
    overflow-x: auto; scrollbar-width: none;
    padding: 0 20px; scroll-padding: 0 20px;
    scroll-snap-type: x proximity;
  }
  .reels::-webkit-scrollbar { display: none; }
  .reel { flex: none; container-type: normal; min-width: 150px; height: 64px; border-radius: 14px; scroll-snap-align: start; }
  .reel-open { overflow: visible; padding-right: 8px; }
  .reel-open { gap: 2px; padding-left: 14px; border-radius: 14px 0 0 14px; }
  .reel-text { overflow: visible; }
  .reel-label { font-size: 12px; }
  .reel-value { gap: 6px; }
  .reel-value svg { display: none; }
  .reel-text { font-size: 15px; line-height: 20px; }
  .reel .swatch { height: 16px; }
  .reel .swatch i { width: 4px; }
  .lock { margin-right: 6px; }

  .spin {
    grid-area: spin;
    height: 64px; margin: 12px 0 calc(8px + var(--safe-bottom)) 20px; padding: 0 20px; gap: 10px;
    font-size: 24px; line-height: 28px;
  }
  .spin .wheel { width: 28px; height: 28px; }
  .spin kbd { display: none; }
  .like {
    grid-area: like;
    height: 64px; margin: 12px 20px calc(8px + var(--safe-bottom)) 8px; padding: 0 20px;
    font-size: 15px;
  }
  .like svg { display: none; }

  /* A reel is open: the poster shrinks and the reel's options take the bottom. */
  .app.editing {
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas: "stage stage" "panel panel";
  }
  .app.editing :is(.bar, .spins, .reels, .spin, .like) { display: none; }
  .app.editing .poster { padding: 16px 20px; }

  .panel {
    grid-area: panel;
    position: static;
    width: auto; max-height: none; overflow: visible;
    gap: 20px;
    padding: 20px 0 calc(16px + var(--safe-bottom));
    border: 0; border-radius: 24px 24px 0 0;
    box-shadow: 0 -8px 32px rgb(0 0 0 / .06);
  }
  .panel-head { padding: 0 20px; }
  .panel-head h2 { font-size: 17px; line-height: 22px; }
  .panel-actions { display: flex; align-items: center; gap: 8px; }
  .panel-lock, .done {
    display: flex; align-items: center; gap: 6px;
    height: 36px; border-radius: 999px;
    font-weight: 600;
  }
  .panel-lock { padding: 0 12px 0 10px; border: 1px solid var(--line); }
  .panel-lock[aria-pressed="true"] { border-color: var(--fluo); background: var(--fluo-tint); }
  .done { padding: 0 16px; border: 0; background: var(--ink); color: #fff; }
  .panel-body { gap: 20px; }
  .chips, .finishes { padding: 0 20px; }
  .finetune, .fields { margin: 0 20px; padding-top: 16px; }
  .disclose { font-size: 15px; }

  .palettes, .shapes {
    flex-wrap: nowrap; gap: 10px;
    overflow-x: auto; scrollbar-width: none;
    padding: 2px 20px 0; scroll-padding: 0 20px;
  }
  .palettes::-webkit-scrollbar, .shapes::-webkit-scrollbar { display: none; }
  .palettes button {
    flex: none; flex-direction: column; align-items: stretch; gap: 8px;
    width: 72px; height: auto; padding: 0;
    border: 0; font-size: 13px; line-height: 18px;
  }
  .palettes button[aria-pressed="true"] { box-shadow: none; }
  .palettes .swatch { height: 52px; padding: 7px; gap: 3px; border-radius: 10px; }
  .palettes .swatch i { flex: 1; width: auto; border-radius: 2px; }
  .palettes button[aria-pressed="true"] .swatch { outline: 2px solid var(--ink); outline-offset: 2px; }
  .shapes button { flex: none; width: 96px; }
  .shapes canvas { aspect-ratio: 96 / 72; }
  .field input { height: 44px; font-size: 16px; }

  /* Get this poster: a bottom sheet, with the room above it. */
  .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgb(17 17 17 / .4); }
  .wall {
    position: fixed; z-index: 27; top: 0; left: 0; right: 0;
    padding: 0;
    container-type: normal;
  }
  .wall .room { width: 100%; height: 100%; }
  .wall .room-view { flex: 1; aspect-ratio: auto; border-radius: 0; }
  .wall .room { gap: 8px; background: var(--paper); }
  .wall .room-foot { flex: none; padding: 0 16px 10px; gap: 6px; }
  .wall .room-caption {
    color: var(--ink); font-weight: 500; font-size: 12px; line-height: 18px;
  }
  .wall .room-controls { gap: 8px; }
  .wall .room-picks button { padding: 3px 7px; }
  .sheet {
    top: auto; right: 0; bottom: 0; left: 0;
    width: auto; max-width: 600px; margin: 0 auto;
    max-height: max(360px, calc(100dvh - 238px));
    padding: 8px 0 var(--safe-bottom);
    border: 0; border-radius: 24px 24px 0 0;
  }
  .grabber { display: block; width: 36px; height: 5px; margin: 0 auto 12px; border-radius: 999px; background: var(--line); }
  .sheet-head, .sheet:is([data-step="email"], [data-step="sent"]) .sheet-head {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 0;
    padding: 0 20px 12px;
  }
  .sheet-head h2 { grid-column: 2; }
  .sheet-head p { grid-row: 2; grid-column: 2; }
  .back { grid-row: 1 / 3; align-self: center; margin: 0 6px 0 -8px; }
  .close {
    grid-row: 1 / 3; grid-column: 3; align-self: start;
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border: 0; border-radius: 999px;
    background: var(--surface);
  }
  .close svg { width: 14px; height: 14px; stroke-width: 1.8; }
  .choices, .basket { padding-inline: 8px; }
  .basket-empty { padding-inline: 20px; }
  .email-body, .sent-body { padding-inline: 20px; }
  .sent-foot { margin: 0 20px; padding: 14px 0 8px; }
  .sheet-foot { margin: 8px 20px 0; padding: 8px 0; gap: 8px; }
  .primary { height: 56px; }
}

/* Small phones: with the basket showing, the name doesn't fit next to "Get this poster" in
   every language, so the logo shows its mark only. */
@media (max-width: 400px) {
  .bar:has(.basket-button:not([hidden])) .wordmark {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
}
