/* Receipt Booth design system
   Two colours: ink on paper, the same as the print. Script headings (Vegan Style),
   Open Sans for buttons, receipt type for labels (DM Mono). Every screen is edge to edge: panels and tiles
   touch each other and the glass, separated only by an ink line. No outer margins. */

@font-face { font-family: 'Gaegu'; font-weight: 400; font-display: block; src: url('../fonts/gaegu-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Gaegu'; font-weight: 700; font-display: block; src: url('../fonts/gaegu-latin-700-normal.woff2') format('woff2'); }
/* Headers and big text. One weight. The personal-use file has no punctuation and prints a stamp for
   every digit, so it is limited to letters here: everything else falls back to Gaegu.
   Personal-use licence: see fonts/LICENSE-Vegan-Style.txt */
@font-face { font-family: 'Vegan Style'; font-weight: 400; font-display: block; src: url('../fonts/VeganStylePersonalUse-5Y58.ttf') format('truetype'); unicode-range: U+41-5A, U+61-7A, U+C0-D6, U+D8-F6, U+F8-17F; }
/* Buttons and the words a guest reads. One variable file per style holds every weight. */
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 300 800; font-display: block; src: url('../fonts/open-sans-latin.woff2') format('woff2'); }
@font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 300 800; font-display: block; src: url('../fonts/open-sans-italic-latin.woff2') format('woff2'); }
@font-face { font-family: 'DM Mono'; font-weight: 400; font-display: block; src: url('../fonts/dm-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Mono'; font-weight: 500; font-display: block; src: url('../fonts/dm-mono-latin-500-normal.woff2') format('woff2'); }

:root {
  --paper: #fbfaf5;
  --ink: #111;
  --mute: #6f6c64;
  --line: 3px;
  --sans: 'Open Sans', system-ui, sans-serif;
  --display: 'Vegan Style', 'Gaegu', 'Comic Sans MS', cursive;
  --mono: 'DM Mono', ui-monospace, 'Roboto Mono', monospace;
  --wobble: 255px 18px 225px 18px / 18px 225px 18px 255px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--paper);
  color: var(--ink);
  font: 400 clamp(14px, 2.1vmin, 20px) / 1.35 var(--mono);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
button:disabled { opacity: 0.35; }
h1, h2, p, ul, dl, dd { margin: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 4px dashed currentColor; outline-offset: -8px; }

/* ---------- layout primitives ---------- */

#app, .screen { position: fixed; inset: 0; }
.screen { display: flex; flex-direction: column; gap: var(--line); background: var(--ink); animation: enter 0.22s ease-out; }
@keyframes enter { from { opacity: 0; } }

.panel { background: var(--paper); }
.fill { flex: 1; min-height: 0; }
.center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1.5vmin; padding: 4vmin; }

.tiles { display: flex; gap: var(--line); background: var(--ink); }
.tiles.col { flex-direction: column; }
.tiles.wrap { flex-wrap: wrap; }
.tiles.wrap > * { flex: 1 1 34%; }
.split { flex-direction: column; }
@media (orientation: landscape) { .split { flex-direction: row; } }

.tile {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 13vh;
  padding: 1.5vmin 3vmin;
  background: var(--paper);
  color: var(--ink);
  font: 700 clamp(22px, 5vmin, 58px) / 1.05 var(--sans);
  letter-spacing: -0.01em;
  text-align: center;
  transition: transform 0.08s;
}
.tile.ink, .chip.ink, .btn.ink { background: var(--ink); color: var(--paper); }
.tile:active:not(:disabled) { transform: scale(0.97); }
.cta { flex: 0 0 auto; min-height: 17vh; }

.label { font: 500 clamp(12px, 1.9vmin, 18px) / 1.3 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.title { font: 700 clamp(30px, 6.4vmin, 72px) / 1 var(--sans); }
.big { font: 700 clamp(36px, 8vmin, 96px) / 0.95 var(--sans); }
.giant { font: 700 clamp(52px, 15vmin, 190px) / 0.86 var(--sans); }
.sub { font: 500 clamp(13px, 2.3vmin, 22px) / 1.3 var(--mono); letter-spacing: 0.16em; }
.fine { font-size: clamp(11px, 1.6vmin, 15px); color: var(--mute); }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 3vmin; padding: 2.2vmin 3.5vmin; }

.chip {
  padding: 1.4vmin 2.6vmin;
  border: var(--line) solid var(--ink);
  border-radius: var(--wobble);
  font: 500 clamp(12px, 1.9vmin, 18px) var(--mono);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.back {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  width: 15vmin;
  height: 15vmin;
  max-width: 120px;
  max-height: 120px;
  font: 700 clamp(34px, 8vmin, 70px) / 1 var(--sans);
}
.back.inline { position: static; width: auto; height: auto; padding: 0 3vmin 0 0; }
.back.on-dark { color: #fff; text-shadow: 0 0 12px #000; }

.corner { position: absolute; top: 0; right: 0; z-index: 9; width: 18vmin; height: 18vmin; max-width: 150px; max-height: 150px; }

.toast {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 2.4vmin 4vmin;
  background: var(--ink);
  color: var(--paper);
  font: 500 clamp(14px, 2.4vmin, 22px) var(--mono);
  text-align: center;
  animation: rise 0.2s ease-out;
}
@keyframes rise { from { transform: translateY(100%); } }

.sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; background: rgba(17, 17, 17, 0.6); }
.sheet-body { width: 100%; display: flex; flex-direction: column; gap: var(--line); background: var(--ink); animation: rise 0.2s ease-out; }
.sheet-title { padding: 4vmin; background: var(--paper); font: 700 clamp(24px, 5vmin, 48px) / 1.05 var(--sans); }
.sheet-note { margin: calc(-1 * var(--line)) 0 0; padding: 0 4vmin 4vmin; background: var(--paper); font: 400 clamp(15px, 2.4vmin, 22px) / 1.45 var(--sans); max-width: none; }
.sheet .field { border-width: 0; padding: 3vmin 4vmin; font-size: clamp(18px, 3vmin, 28px); }

/* a strip of receipt paper on screen: real dots, zig-zag tear at the bottom */
.paper {
  --tear: 10px;
  background: #fff;
  padding-bottom: var(--tear);
  filter: drop-shadow(0 6px 0 rgba(17, 17, 17, 0.14));
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--tear)), 95% 100%, 90% calc(100% - var(--tear)), 85% 100%, 80% calc(100% - var(--tear)), 75% 100%, 70% calc(100% - var(--tear)), 65% 100%, 60% calc(100% - var(--tear)), 55% 100%, 50% calc(100% - var(--tear)), 45% 100%, 40% calc(100% - var(--tear)), 35% 100%, 30% calc(100% - var(--tear)), 25% 100%, 20% calc(100% - var(--tear)), 15% 100%, 10% calc(100% - var(--tear)), 5% 100%, 0 calc(100% - var(--tear)));
}
.paper canvas { display: block; width: 100%; height: auto; image-rendering: auto; }
.paper.loading { background: repeating-linear-gradient(#fff 0 22px, #f0eee6 22px 24px); animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: 0.55; } }

/* ---------- cover ---------- */

.cover { background: var(--paper); overflow: hidden; cursor: pointer; }
.cover-img, .cover-back { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s; }
.cover-img { object-fit: contain; }
.cover-back { inset: -8%; width: 116%; height: 116%; object-fit: cover; filter: blur(4vmin) saturate(1.1); } /* oversized so the blur has no soft edge */
.cover-img.on, .cover-back.on { opacity: 1; }
.cover-img.drift { animation: drift 16s ease-out both; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.07); } }
.cover-hint {
  position: absolute;
  left: 50%;
  bottom: 3.2vh;
  transform: translateX(-50%);
  padding: 1.7vmin 4.6vmin;
  border-radius: 99px;
  background: var(--ink);
  color: var(--paper);
  font: 700 clamp(14px, 2.5vmin, 26px) / 1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 0.8vmin 2.4vmin rgb(17 17 17 / 0.28);
  animation: bob 1.6s ease-in-out infinite alternate;
}
@keyframes bob { to { transform: translateX(-50%) translateY(-1vh); } }
.cover-clock, .cover-warn { position: absolute; top: 1.4vmin; font: 500 clamp(11px, 1.6vmin, 15px) var(--mono); letter-spacing: 0.1em; opacity: 0.55; mix-blend-mode: difference; color: #fff; }
.cover-clock { left: 2vmin; }
.cover-warn { left: 50%; transform: translateX(-50%); }

/* ---------- A / B ---------- */

.option { gap: 0.5vmin; min-height: 0; }
.option-letter { font: 700 clamp(120px, 44vmin, 460px) / 0.8 var(--sans); }
.option-title { font: 500 clamp(18px, 4vmin, 44px) var(--mono); letter-spacing: 0.2em; }
.option-sub { font: 400 clamp(16px, 3.2vmin, 32px) var(--sans); }
.badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  transform: translate(-50%, -50%) rotate(-7deg);
  padding: 1.4vmin 4vmin;
  border: var(--line) solid var(--ink);
  border-radius: var(--wobble);
  background: var(--paper);
  font: 700 clamp(20px, 4.2vmin, 44px) / 1 var(--sans);
  white-space: nowrap;
  pointer-events: none;
}

/* ---------- strip picker ---------- */

.rail {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  gap: var(--line);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  background: var(--ink);
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.strip-card {
  flex: 0 0 auto;
  height: 100%;
  min-width: 24vmin;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6vmin;
  padding: 0 2vmin 2vmin;
  background: var(--paper);
  scroll-snap-align: start;
  overflow: hidden;
}
.strip-card .paper { flex: 0 0 auto; }
.strip-name { margin-top: auto; padding-top: 1vmin; font: 700 clamp(17px, 3.2vmin, 34px) / 1.1 var(--sans); }
.strip-shots { font: 500 clamp(11px, 1.7vmin, 16px) var(--mono); letter-spacing: 0.16em; color: var(--mute); }
.hintbar { padding: 1.4vmin; text-align: center; font: 500 clamp(11px, 1.8vmin, 16px) var(--mono); letter-spacing: 0.24em; }

/* ---------- camera ---------- */

.camera { background: #000; overflow: hidden; }
.cam-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.12); }
.cam-video.mirror { transform: scaleX(-1); }
.cam-guide { position: absolute; border: 4px solid #fff; border-radius: 6px; box-shadow: 0 0 0 200vmax rgba(10, 10, 10, 0.68); transition: all 0.3s; pointer-events: none; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam-flash.go { animation: flash 0.6s ease-out; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.cam-count {
  position: absolute;
  inset: 0 0 20vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font: 700 clamp(160px, 58vmin, 620px) / 1 var(--sans);
  text-shadow: 0 0 6vmin rgba(0, 0, 0, 0.75);
  pointer-events: none;
}
.cam-count.words { font-size: clamp(60px, 17vmin, 200px); }
.cam-count.pop { animation: pop 0.9s ease-out both; }
@keyframes pop { from { transform: scale(1.5); opacity: 0; } 20% { opacity: 1; } to { transform: scale(0.94); } }
/* Progress while shooting: one small framed picture per photo, in the photo's shape.
   Empty frame while waiting, a bright frame for the next one, the photo itself once taken.
   Shown only once GO is tapped; upright along the top, sideways down the right. */
.cam-thumbs { position: absolute; top: 3vh; left: 0; right: 0; display: none; justify-content: center; align-items: center; gap: 1.8vmin; pointer-events: none; }
.running .cam-thumbs { display: flex; }
.cam-thumb {
  position: relative;
  box-sizing: content-box;
  height: min(14vmin, calc(70vw / var(--n, 3) / var(--a, 1.5) - 3vmin)); /* the whole row fits, even with wide photos */
  display: grid;
  place-items: center;
  padding: 0.6vmin;
  border: 2px dashed rgb(255 255 255 / 0.6);
  border-radius: 3px;
  background: rgb(0 0 0 / 0.35);
  color: rgb(255 255 255 / 0.75);
  font: 700 clamp(13px, 2.4vmin, 24px) / 1 var(--sans);
  transition: transform 0.25s, border-color 0.25s;
}
.cam-thumb.now { border: 3px solid #fff; color: #fff; transform: scale(1.08); }
.cam-thumb.done { border: 0; padding: calc(0.6vmin + 2px); background: #fff; box-shadow: 0 0.6vmin 1.8vmin rgb(0 0 0 / 0.5); transform: rotate(-2deg); animation: land 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.cam-thumb.done:nth-child(even) { transform: rotate(2deg); }
.cam-thumb canvas { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.12); }
@keyframes land { from { transform: scale(1.7) rotate(0); } }
@media (prefers-reduced-motion: reduce) { .cam-thumb { transition: none; animation: none !important; } }
.cam-note { position: absolute; left: 0; right: 0; bottom: 22vh; padding: 0 6vw; color: #fff; text-align: center; font: 700 clamp(18px, 3.6vmin, 38px) / 1.15 var(--sans); text-shadow: 0 0 2vmin #000; }
.shutter {
  position: absolute;
  left: 50%;
  bottom: 3vh;
  width: 17vh;
  height: 17vh;
  transform: translateX(-50%);
  border: 0.9vh solid var(--ink);
  border-radius: 50%;
  outline: 0.5vh solid #fff;
  background: #fff;
  color: var(--ink);
  font: 800 4.8vh / 1 var(--sans);
}
.shutter:active { transform: translateX(-50%) scale(0.93); }
@media (orientation: landscape) {
  .shutter { left: auto; right: 5vw; bottom: 50%; width: 24vh; height: 24vh; transform: translateY(50%); font-size: 8.5vh; }
  .shutter:active { transform: translateY(50%) scale(0.93); }
  .cam-note { bottom: 4vh; right: 26vw; padding: 0 3vw; }
  .cam-count { inset: 0 26vw 8vh 0; }
  /* the shutter's column is free while shooting: the frames stack there */
  .cam-thumbs { top: 50%; bottom: auto; left: auto; right: 3vw; width: 20vw; flex-direction: column; transform: translateY(-50%); }
  .cam-thumb { height: min(15vh, calc(82vh / var(--n, 3) - 2.6vmin)); max-width: 18vw; }
}

/* The lens is in the middle of one long edge (data-lens: top | right | left, set by camera.js).
   The countdown numbers sit beside it, so eyes in the photo meet the camera. */
.camera[data-lens='right'] .cam-count, .camera[data-lens='left'] .cam-count { width: 44vw; font-size: clamp(120px, 36vmin, 380px); }
.camera[data-lens='right'] .cam-count { inset: 0 30vw 0 auto; justify-content: flex-end; text-align: right; }
.camera[data-lens='left'] .cam-count { inset: 0 auto 0 30vw; justify-content: flex-start; text-align: left; }
.camera[data-lens='right'] .cam-count.words, .camera[data-lens='left'] .cam-count.words { font-size: clamp(40px, 11vmin, 120px); }
.camera[data-lens='top'] .cam-count { inset: 26vh 0 auto; justify-content: center; font-size: clamp(120px, 34vmin, 360px); }
.camera[data-lens='top'] .cam-count.words { font-size: clamp(56px, 14vmin, 160px); }

/* ---------- review / printing / done ---------- */

.stage { flex: 2.1; min-width: 0; min-height: 0; display: flex; justify-content: center; align-items: flex-start; overflow: hidden; background: #e9e6dc; }
.actions { flex: 1; min-width: 0; }
.print { flex: 2.4; font-size: clamp(60px, 17vmin, 200px); }
.retake { font-size: clamp(28px, 6vmin, 70px); }
@media (orientation: portrait) { .actions.col { flex-direction: row-reverse; flex: 0 0 22vh; } .stage { flex: 1; } }

.printing { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; gap: var(--line); background: var(--ink); }
.printer-scene { position: relative; justify-content: flex-start; overflow: hidden; padding: 0; }
.slot { position: relative; z-index: 2; width: min(76vmin, 620px); height: 5vmin; border-radius: 0 0 3vmin 3vmin; background: var(--ink); }
.paper.feeding { width: min(60vmin, 500px); margin-top: -2vmin; animation: feed 2.6s cubic-bezier(0.3, 0, 0.3, 1) both; }
@keyframes feed { from { transform: translateY(-100%); } to { transform: translateY(0); } }
/* Printing: the colour strip is wiped into the black-and-white print by a moving print head, then comes back. Loops until done. */
.paper.morph { position: relative; }
.morph-colour { position: absolute; inset: 0 0 var(--tear) 0; animation: develop 3.4s cubic-bezier(0.45, 0, 0.25, 1) infinite; }
.morph-colour canvas { display: block; width: 100%; height: 100%; }
.morph-scan { position: absolute; left: 0; right: 0; top: 0; height: 2.6vmin; margin-top: -1.3vmin; background: linear-gradient(transparent, rgb(17 17 17 / 0.28) 45%, #111 50%, rgb(17 17 17 / 0.28) 55%, transparent); animation: head 3.4s cubic-bezier(0.45, 0, 0.25, 1) infinite; pointer-events: none; }
@keyframes develop {
  0%, 14% { clip-path: inset(0 0 0 0); filter: saturate(1.15); opacity: 1; }
  70% { clip-path: inset(100% 0 0 0); filter: saturate(0.8); opacity: 1; }
  88% { clip-path: inset(100% 0 0 0); opacity: 0; }
  89% { clip-path: inset(0 0 0 0); opacity: 0; }
  100% { clip-path: inset(0 0 0 0); filter: saturate(1.15); opacity: 1; }
}
@keyframes head {
  0%, 14% { top: 0; opacity: 0; }
  18% { opacity: 1; }
  66% { opacity: 1; }
  70%, 100% { top: calc(100% - var(--tear)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .morph-colour { animation-duration: 6s; } .morph-scan { display: none; } }
.printing-word { position: absolute; left: 0; right: 0; bottom: 5vh; z-index: 3; text-shadow: 0 0 2vmin var(--paper), 0 0 2vmin var(--paper); animation: pulse 0.7s infinite alternate; }
.done .tile { min-height: 20vh; }
.code-box { display: flex; flex-direction: column; align-items: center; gap: 1.6vmin; padding: 4vmin; text-align: center; }
.code-box canvas { width: min(56vmin, 420px); height: auto; image-rendering: pixelated; }

/* ---------- preview: colour, then the print ---------- */

.compare { display: flex; align-items: center; justify-content: center; gap: 3vmin; min-height: 0; padding: 3vmin; background: #e9e6dc; }
.compare figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 1.4vmin; }
.compare figcaption { font: 500 clamp(12px, 1.9vmin, 18px) / 1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.compare-arrow svg { display: block; width: 9vmin; height: 9vmin; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.compare-note { padding: 2.4vmin 5vmin; text-align: center; font: 600 clamp(15px, 2.6vmin, 26px) / 1.4 var(--sans); }
.arrow { margin-bottom: 4vh; font: 700 clamp(60px, 16vmin, 180px) / 0.8 var(--sans); animation: nudge 0.7s ease-in-out infinite alternate; }
@keyframes nudge { to { transform: translateY(2.4vh); } }

/* ---------- PIN ---------- */

.pin-head { flex: 0 0 24vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.4vmin; padding: 2vmin; text-align: center; }
.pin-title { font: 700 clamp(22px, 4.6vmin, 48px) / 1.1 var(--sans); }
.pin-dots { display: flex; gap: 3.4vmin; }
.pin-dot { width: 4.4vmin; height: 4.4vmin; border: var(--line) solid var(--ink); border-radius: 50%; }
.pin-dot.on { background: var(--ink); }
.shake { animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-2.5vmin); } 75% { transform: translateX(2.5vmin); } }
.keypad { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: var(--line); background: var(--ink); }
.key { min-height: 0; font-size: clamp(40px, 10vmin, 110px); }

/* ---------- setup + attendant ---------- */

.setup-body, .admin-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--line); background: var(--ink); }
.admin-body { user-select: text; -webkit-user-select: text; }
.setup-body::after, .admin-body::after { content: ''; flex: 1; background: var(--paper); }
.setup-step { padding: 2.4vmin 3.5vmin 1.6vmin; }
.choice { min-height: 15vh; gap: 1vmin; font-size: clamp(26px, 5.4vmin, 60px); }
.choice-sub { font: 400 clamp(11px, 1.7vmin, 16px) var(--mono); letter-spacing: 0.08em; }
.tabs { flex: 0 0 auto; }
.tab { min-height: 8.5vh; padding: 0.5vmin; font: 500 clamp(11px, 2vmin, 19px) var(--mono); letter-spacing: 0.12em; }
.scopes .tab { min-height: 7vh; }

.group { display: flex; flex-direction: column; gap: 1.8vmin; padding: 3vmin 3.5vmin; background: var(--paper); }
.group-title { padding-bottom: 1.2vmin; border-bottom: 2px dashed var(--ink); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: center; gap: 1vmin 3vmin; }
.row .hint { grid-column: 2; }
.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 1.6vmin; }
.inline .field { flex: 1 1 22vmin; }
.field {
  width: 100%;
  min-height: 6.4vmin;
  padding: 1.2vmin 2vmin;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: #fff;
  font: 500 clamp(15px, 2.4vmin, 22px) var(--mono);
}
.btn {
  align-self: flex-start;
  min-height: 7.4vmin;
  padding: 1.4vmin 3.4vmin;
  border: var(--line) solid var(--ink);
  border-radius: var(--wobble);
  background: var(--paper);
  font: 700 clamp(15px, 2.6vmin, 26px) / 1 var(--sans);
  letter-spacing: 0.02em;
}
.admin-body > .btn, .admin-body > .note { margin: 0; align-self: stretch; border-radius: 0; border-width: 0; padding: 3vmin 3.5vmin; background: var(--paper); text-align: left; }
.admin-body > .btn.ink { background: var(--ink); }
.note, .hint { color: var(--mute); font-size: clamp(11px, 1.7vmin, 16px); }
.status { font-weight: 500; letter-spacing: 0.06em; }
.status.bad { text-decoration: underline wavy; }
.slider { display: flex; align-items: center; gap: 1.6vmin; }
.slider input { flex: 1; height: 6vmin; accent-color: var(--ink); }
.slider output { width: 4em; text-align: right; }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 1.2vmin 4vmin; align-items: baseline; }
.facts dt { font-size: clamp(11px, 1.7vmin, 16px); letter-spacing: 0.14em; color: var(--mute); }
.facts dd { font: 700 clamp(20px, 3.6vmin, 40px) / 1.1 var(--sans); }
.facts .money { font-size: clamp(40px, 9vmin, 100px); }

.table { width: 100%; border-collapse: collapse; background: var(--paper); font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 1.5vmin 2vmin; border-bottom: 1px dashed var(--ink); text-align: left; vertical-align: top; }
.table th { font: 500 clamp(11px, 1.6vmin, 15px) var(--mono); letter-spacing: 0.14em; color: var(--mute); }
.table .num { text-align: right; white-space: nowrap; }
.table .what { word-break: break-word; }
.table tr.total td { border-top: var(--line) solid var(--ink); font: 700 clamp(22px, 4vmin, 42px) / 1.1 var(--sans); }
.table tr.struck td { text-decoration: line-through; color: var(--mute); }
.table tr.muted td { color: var(--mute); }
.table .chip { padding: 0.8vmin 1.8vmin; }

.event { display: flex; flex-direction: column; gap: 1.6vmin; padding: 0 0 2.4vmin; margin-bottom: 0.6vmin; border-bottom: 2px dashed var(--ink); }
.thumbs { display: flex; flex-wrap: wrap; gap: 1.2vmin; }
.thumb { width: 21vmin; aspect-ratio: 3 / 4; border: 2px solid var(--ink); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tune { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 3vmin; align-items: start; }
.tune > div { display: flex; flex-direction: column; gap: 1.6vmin; }
.paper.small { width: 100%; max-width: 300px; border: 1px solid #ccc; }
.checks { list-style: none; display: flex; flex-direction: column; gap: 1.4vmin; }
.check { display: grid; grid-template-columns: 2.4em auto 1fr; gap: 1.4vmin; align-items: baseline; }
.check > span:first-child { font: 700 clamp(22px, 4vmin, 40px) / 1 var(--sans); }
.check.bad strong { text-decoration: underline wavy; }

/* The display face has a single weight: asking for bold would smear it. */
.title, .big, .giant, .sheet-title, .option-letter { font-family: var(--display); font-weight: 400; line-height: 1.15; }
/* Script capitals are wide and tall: the A and B need room so they are not cut off. */
.option-letter { font-size: clamp(90px, 30vmin, 320px); line-height: 1.3; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Design editor: a whiteboard with floating tools ---------- */

.editor { background: #e9e6dc; }
.ed-board {
  position: absolute;
  inset: 0;
  display: flex;
  overflow: auto;
  padding: 96px 6vw 120px;
  background: radial-gradient(rgb(17 17 17 / 0.17) 1.2px, transparent 1.7px) 0 0 / 22px 22px;
  overscroll-behavior: contain;
}
/* The 80 mm roll: striped 4 mm edges the head cannot reach, the 72 mm print area in white. */
.ed-sheet { position: relative; flex: 0 0 auto; margin: auto; background: repeating-linear-gradient(135deg, #f3f1ea 0 6px, #e4e1d7 6px 9px); box-shadow: 0 1px 2px rgb(17 17 17 / 0.22), 0 16px 36px rgb(17 17 17 / 0.16); }
.ed-sheet::before { content: attr(data-label); position: absolute; left: 0; right: 0; bottom: 100%; padding-bottom: 8px; color: var(--mute); font: 500 12px / 1 var(--mono); letter-spacing: 0.1em; text-align: center; text-transform: uppercase; white-space: nowrap; }
.ed-stage { position: relative; background: #fff; }
.ed-paper canvas { display: block; width: 100%; height: 100%; }
.ed-guide { position: absolute; top: 0; bottom: 0; left: 50%; width: 0; border-left: 2px dashed var(--ink); opacity: 0; pointer-events: none; }
.ed-guide.on { opacity: 1; }

.ed-zone { position: absolute; border: 2px dashed var(--ink); box-shadow: 0 0 0 2px rgb(255 255 255 / 0.9), inset 0 0 0 2px rgb(255 255 255 / 0.9); cursor: grab; touch-action: none; }
.ed-zone.on { border-style: solid; background: rgb(255 255 255 / 0.12); }
.ed-zone:active { cursor: grabbing; }
.ed-num { position: absolute; top: 8px; left: 8px; min-width: 26px; padding: 5px 0; border-radius: 13px; background: var(--ink); color: var(--paper); font: 700 14px / 16px var(--sans); text-align: center; pointer-events: none; }
.ed-grip { position: absolute; width: 18px; height: 18px; border: 2px solid var(--ink); border-radius: 4px; background: #fff; box-shadow: 0 2px 5px rgb(17 17 17 / 0.3); }
.ed-grip::after { content: ''; position: absolute; inset: -15px; } /* a finger-sized target around a small mark */
.ed-grip.nw { top: -10px; left: -10px; cursor: nwse-resize; }
.ed-grip.ne { top: -10px; right: -10px; cursor: nesw-resize; }
.ed-grip.sw { bottom: -10px; left: -10px; cursor: nesw-resize; }
.ed-grip.se { bottom: -10px; right: -10px; cursor: nwse-resize; }

.ed-bar {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 96vw;
  padding: 6px;
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 1px 2px rgb(17 17 17 / 0.2), 0 10px 28px rgb(17 17 17 / 0.18);
}
.ed-left { top: 16px; left: 16px; }
.ed-right { top: 16px; right: 16px; }
.ed-dock { bottom: 20px; left: 50%; transform: translateX(-50%); }
.ed-tool {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 48px;
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  font: 700 15px / 1 var(--sans);
  white-space: nowrap;
  transition: background 0.12s;
}
.ed-tool:hover:not(:disabled) { background: rgb(17 17 17 / 0.07); }
.ed-tool:active:not(:disabled) { background: rgb(17 17 17 / 0.14); }
.ed-tool.on, .ed-tool.ink, .ed-tool.on:hover, .ed-tool.ink:hover { background: var(--ink); color: var(--paper); }
.ed-tool.ink { padding: 0 22px; }
.ed-tool:focus-visible, .ed-name:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ed-ico { display: flex; }
.ed-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ed-shape { display: block; border: 2px solid currentColor; border-radius: 3px; }
.ed-sep { flex: 0 0 1px; height: 28px; margin: 0 4px; background: rgb(17 17 17 / 0.16); }
.ed-read { padding: 0 10px; color: var(--mute); font: 500 13px / 1 var(--mono); white-space: nowrap; }
.ed-zoom { min-width: 58px; padding: 0 6px; font: 500 13px / 1 var(--mono); }
.ed-seg { display: flex; gap: 2px; }
.ed-name { width: 10em; height: 48px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; font: 700 16px / 1 var(--sans); user-select: text; -webkit-user-select: text; }
.ed-name:hover, .ed-name:focus { background: #fff; }
.ed-name::selection { background: var(--ink); color: var(--paper); }

/* ---------- Strip studio (studio.html, the owner's own site) ---------- */

.studio .admin-body { user-select: text; -webkit-user-select: text; }
.studio-design { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 3vmin; }
.studio-pair { display: flex; gap: 1.6vmin; align-items: flex-start; }
.studio-pair .paper.small { width: clamp(110px, 16vmin, 170px); }
.studio-facts { flex: 1 1 260px; display: flex; flex-direction: column; gap: 1.2vmin; }
.studio-name { margin: 0; font: 700 clamp(20px, 3.2vmin, 30px) / 1.1 var(--sans); }
.studio-live { color: var(--ink); }
.studio-live::before { content: ''; display: inline-block; width: 0.7em; height: 0.7em; margin-right: 0.5em; border-radius: 50%; background: var(--ink); }
