* { box-sizing: border-box; margin: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --purple: #45419e; --gold: #edba36; --pink: #faa8ad; --lblue: #8fd5f7;
  --bg: #f7f5fc; --panel: #fff; --text: #2a2653; --dim: #7a76a0;
  --radius: 14px;
}
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text);
  font-family: -apple-system, "Segoe UI", sans-serif;
  padding-bottom: env(safe-area-inset-bottom); }

header { display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 6px; padding-top: max(10px, env(safe-area-inset-top));
  background: var(--purple); color: #fff; position: sticky; top: 0; z-index: 30; }
header h1 { font-size: 18px; font-weight: 700; }
header h1 span { color: var(--gold); font-weight: 400; }
.store-tag { flex: 1; font-size: 11px; opacity: .85; text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#gear { background: none; border: 0; color: #fff; font-size: 22px; padding: 4px 6px; }

main { max-width: 560px; margin: 0 auto; padding: 10px 12px 30px; }

#stage { background: radial-gradient(ellipse at 50% 30%, #eaf6fe, #c3dff2);
  border: 2px solid var(--gold); border-radius: var(--radius);
  padding: 0 0 6px; text-align: center; }
/* the machine is the star: full stage width, capped by viewport height */
#view-wrap { overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
#view { width: 100%; max-height: 62vh; height: auto; object-fit: contain;
  touch-action: none; transform-origin: 0 0; }
/* live 3D: the canvas is sized by CSS and drawn to match, not by an image's
   intrinsic size, so it needs a real height instead of height:auto */
body.live3d #view { height: 62vh; max-height: none; display: block; }
/* one locked hero view: the spin/tilt controls stay in the markup (and their
   code stays in app.js) but nothing reaches them yet. Zoom is separate — it is
   unlocked, so the +/- buttons stay. */
body.view-locked #spin-left, body.view-locked #spin-right,
body.view-locked #angle-dots { display: none; }
body.view-locked .spin-row { gap: 22px; }
body.view-locked #view-wrap { border-radius: var(--radius); }
.stage-hint { font-size: 11px; color: #5b7a92; margin-top: 2px; }
.spin-row { display: flex; align-items: center; justify-content: center; gap: 14px; }
.spin-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #b9d8ec;
  background: #ffffffcc; font-size: 20px; color: var(--text); }
#angle-dots { display: flex; gap: 6px; }
#angle-dots i { width: 7px; height: 7px; border-radius: 50%; background: #ffffff88;
  border: 1px solid #7aa8c6; }
#angle-dots i.on { background: var(--purple); border-color: var(--purple); }
.stage-hint { font-size: 11px; color: #5b7a92; margin-top: 4px; }

.row-label { font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--dim); margin: 16px 2px 6px; }

.seg { display: flex; gap: 8px; margin-top: 10px; }
.seg button { flex: 1; min-height: 44px; border-radius: 10px;
  border: 1px solid #d9d5ee; background: var(--panel); color: var(--text);
  font-size: 14px; font-weight: 600; }
.seg button.on { background: var(--purple); border-color: var(--purple); color: #fff; }

.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px;
  -webkit-overflow-scrolling: touch; }
.chip-row button { flex: 0 0 auto; min-height: 44px; padding: 0 14px;
  border-radius: 10px; border: 1px solid #d9d5ee; background: var(--panel);
  color: var(--text); font-size: 13px; white-space: nowrap; }
.chip-row button.on { background: var(--purple); border-color: var(--purple); color: #fff; }

.colors-label { display: flex; align-items: center; justify-content: space-between; }
#try-again { min-height: 34px; border: 0; border-radius: 8px; padding: 0 12px;
  background: var(--purple); color: #fff; font-size: 12px; font-weight: 600;
  text-transform: none; letter-spacing: 0; }
#zone-list { display: grid; gap: 8px; }
.zone-btn { display: flex; align-items: center; gap: 10px; min-height: 52px;
  border: 1px solid #d9d5ee; border-radius: 12px; background: var(--panel);
  padding: 6px 12px; width: 100%; text-align: left; font-size: 14px; color: var(--text); }
.zone-btn .sw { width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid #0002; flex: 0 0 auto; }
.zone-btn .zn { flex: 1; }
.zone-btn .cn { font-size: 12px; color: var(--dim); }

#price-card { margin-top: 18px; background: var(--panel); border: 1px solid #e4e1f3;
  border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; }
.price-line { font-size: 17px; }
.price-line strong { color: var(--purple); font-size: 22px; }
.price-sub { font-size: 12px; color: var(--dim); }
#price-card input { min-height: 44px; border: 1px solid #d9d5ee; border-radius: 10px;
  padding: 0 12px; font-size: 16px; width: 100%; }
#price-card button, .sheet-card button { min-height: 48px; border-radius: 10px;
  border: 0; background: var(--purple); color: #fff; font-size: 16px;
  font-weight: 600; width: 100%; }
button.ghost { background: none !important; color: var(--dim) !important;
  border: 1px solid #d9d5ee !important; }

#sheet, #settings { position: fixed; inset: 0; background: #2a265399; z-index: 50;
  display: flex; align-items: flex-end; }
#sheet[hidden], #settings[hidden] { display: none; }
.sheet-card { background: var(--bg); width: 100%; max-height: 82vh;
  border-radius: 18px 18px 0 0; padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  overflow-y: auto; -webkit-overflow-scrolling: touch; display: grid; gap: 10px;
  align-content: start; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head button { width: 44px; height: 44px; min-height: 0; border-radius: 50%;
  background: #e8e5f5; color: var(--text); font-size: 22px; }
.tier-head { font-size: 12px; font-weight: 700; color: var(--dim);
  text-transform: uppercase; letter-spacing: .05em; margin-top: 8px; }
.fam-head { font-size: 11px; color: var(--dim); margin: 4px 0 2px; }
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 8px; }
.swatch { height: 44px; border-radius: 9px; border: 1px solid #0002; position: relative; }
.swatch.on { outline: 3px solid var(--purple); outline-offset: 1px; }
.swatch small { position: absolute; left: 0; right: 0; bottom: -14px; font-size: 8px;
  color: var(--dim); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

#set-colors details { border: 1px solid #e4e1f3; border-radius: 10px;
  padding: 8px 10px; margin-bottom: 6px; background: var(--panel); }
#set-colors summary { font-size: 13px; min-height: 32px; display: flex;
  align-items: center; }
#set-colors summary input { width: 18px; height: 18px; margin-right: 8px; }
#set-colors .swatch-grid { margin-top: 8px; }
.swatch.off { opacity: .22; outline: 2px dashed #9a96c0; outline-offset: -2px; }

.check-row { display: flex !important; align-items: center; gap: 10px;
  min-height: 44px; font-size: 14px !important; color: var(--text) !important; }
.check-row input { width: 22px; height: 22px; min-height: 0 !important; flex: 0 0 auto; }
/* the LABEL is the tap target (44px), not the 22px box inside it - thumbs
   miss a bare checkbox at a busy booth */
.check-row { min-height: 44px; cursor: pointer; touch-action: manipulation; }
.logo-row { display: flex !important; align-items: center; justify-content: center;
  min-height: 48px; border: 1px dashed #b9b4d8; border-radius: 10px;
  background: var(--panel); font-size: 13px; }
#logo-preview { display: flex; gap: 6px; flex-wrap: wrap; }
#logo-preview i { width: 34px; height: 34px; border-radius: 7px;
  border: 1px solid #0002; display: block; }

#settings label { display: grid; gap: 4px; font-size: 13px; color: var(--dim); }
#settings input, #settings textarea { min-height: 44px; border: 1px solid #d9d5ee;
  border-radius: 10px; padding: 8px 12px; font-size: 16px; width: 100%;
  background: var(--panel); color: var(--text); font-family: inherit; }
.tier-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.hint { font-size: 12px; color: var(--dim); }
#settings-status { font-size: 13px; min-height: 18px; color: #2e8b46;
  text-align: center; }
#settings button[disabled] { opacity: .45; }

/* named setups: one row per saved client/event */
.profile-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.profile-row span { flex: 1; font-size: 13px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-row button { padding: 6px 12px; border-radius: 8px; font-size: 13px;
  border: 1px solid #cfd6e6; background: #fff; color: var(--purple); }
.profile-row button.danger { color: #b3261e; border-color: #eccbc8;
  padding: 6px 10px; font-size: 15px; line-height: 1; }

/* saved setups live on the main screen: saving one is part of the job, not
   a setting you configure once */
#setups-card { background: var(--panel); border: 1px solid #e4e1f3;
  border-radius: var(--radius); padding: 12px; display: grid; gap: 8px; }
#setups-card .hint { font-size: 12px; color: var(--dim); }
.setup-save { display: flex; gap: 8px; }
.setup-save input { flex: 1; min-height: 44px; border: 1px solid #d9d5ee;
  border-radius: 10px; padding: 0 12px; font-size: 16px; min-width: 0; }
.setup-save button { flex: 0 0 auto; min-height: 44px; padding: 0 20px;
  border: 0; border-radius: 10px; background: var(--purple); color: #fff;
  font-size: 15px; font-weight: 600; }
#setups-status:not(:empty) { font-size: 12px; color: var(--purple);
  font-weight: 600; padding: 2px 0; }

/* install prompt: a real button where the browser allows one, instructions on
   iOS where Apple only permits Share > Add to Home Screen by hand */
#install-bar { display: flex; align-items: center; gap: 10px;
  background: var(--gold); color: #3a2f00; padding: 10px 12px;
  font-size: 13px; line-height: 1.35; }
#install-bar[hidden] { display: none; }
#install-bar span { flex: 1; }
#install-bar button { min-height: 36px; border: 0; border-radius: 8px;
  padding: 0 14px; background: var(--purple); color: #fff; font-weight: 600;
  font-size: 13px; }
#install-x { background: #0000001a !important; color: #3a2f00 !important;
  padding: 0 10px !important; font-size: 18px !important; }

/* --- iOS Safari fixes ---------------------------------------------------- */

/* Tapping the spin arrows quickly registered as a double-tap and Safari zoomed
   the page. touch-action:manipulation tells it there is no double-tap gesture
   here, so repeated taps just tap. */
button, .seg button, .chip-row button, .spin-btn, .zone-btn { touch-action: manipulation; }

/* Nothing should scroll sideways: the cage chips have their own scroller, and
   a stray 47px of page overflow made the whole layout drift under a thumb. */
html, body { overflow-x: hidden; max-width: 100%; }

/* a flex item will not shrink below its text without this, which is what was
   pushing the install bar past the viewport */
#install-bar span { min-width: 0; overflow-wrap: anywhere; }

/* vh on iOS counts the address bar, so 62vh overflows until the bar hides.
   dvh follows the visible area; the vh line stays as the fallback. */
#view { max-height: 62dvh; }
body.live3d #view { height: 62dvh; }

/* long label beside a checkbox needs to wrap, not push the row wider */
.check-row { align-items: flex-start; padding: 6px 0; }
.check-row span { flex: 1; min-width: 0; overflow-wrap: anywhere;
  font-size: 12px; line-height: 1.35; }
.check-row input { margin-top: 2px; }

/* #price-card input {width:100%} outranks .check-row input on specificity, so
   the checkbox grew to full width and squeezed its label to zero - the text
   then wrapped one character per line. Match the id to win it back. */
#price-card .check-row input, #settings .check-row input {
  width: 20px; height: 20px; min-height: 0; flex: 0 0 auto; }

/* --- collapsible sections ------------------------------------------------
   Native <details>: iOS Safari handles the toggle, VoiceOver announces it, and
   it keeps working with JS disabled. A hand-rolled accordion gets none of that
   for free. */
.sect { background: var(--panel); border: 1px solid #e4e1f3;
  border-radius: var(--radius); margin-top: 10px; overflow: hidden; }
.sect > summary { list-style: none; cursor: pointer; user-select: none;
  min-height: 48px; display: flex; align-items: center; gap: 8px;
  padding: 0 14px; font-size: 13px; font-weight: 700; color: var(--dim);
  text-transform: uppercase; letter-spacing: .06em;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.sect > summary::-webkit-details-marker { display: none; }   /* iOS triangle */
.sect > summary::after { content: "\25BE"; margin-left: auto; font-size: 15px;
  transition: transform .15s ease; }
.sect[open] > summary::after { transform: rotate(180deg); }
.sect[open] > summary { color: var(--purple); }
.sect > *:not(summary) { padding: 0 14px 14px; }
.sect .seg, .sect .chip-row { margin-top: 0; }
.sect .chip-row { padding-bottom: 14px; }

.colors-head { display: flex; justify-content: flex-end; padding-top: 0 !important;
  padding-bottom: 8px !important; }

/* --- iOS touch targets ---------------------------------------------------
   Apple's guidance is 44x44 minimum. These were all comfortably under it and
   are the controls most likely to be tapped one-handed at a busy stall. */
#gear { min-width: 44px; min-height: 44px; display: flex;
  align-items: center; justify-content: center; }
#try-again { min-height: 44px; padding: 0 16px; }
.profile-row button { min-height: 44px; }
.profile-row button.danger { min-width: 44px; }
/* the checkbox itself stays 20px, but its whole row is the tap target */
#price-card .check-row { min-height: 44px; cursor: pointer; }

/* --- colour picker: brand > type, with a live name readout --------------- */
.swatch-readout { position: sticky; top: 0; z-index: 2; display: flex;
  align-items: center; gap: 10px; background: var(--bg); padding: 8px 2px 10px;
  border-bottom: 1px solid #e4e1f3; margin-bottom: 6px; }
.swatch-readout i { width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid #0002; flex: 0 0 auto; background: #ddd; }
.swatch-readout span { font-size: 14px; color: var(--text); line-height: 1.3; }
.swatch-readout small { color: var(--dim); }

.brand-group { border: 1px solid #e4e1f3; border-radius: 10px; background: var(--panel);
  margin-bottom: 8px; overflow: hidden; }
.brand-group > summary { list-style: none; min-height: 48px; display: flex;
  align-items: center; padding: 0 12px; font-size: 14px; font-weight: 600;
  color: var(--text); touch-action: manipulation; }
.brand-group > summary::-webkit-details-marker { display: none; }
.brand-group > summary small { color: var(--dim); font-weight: 400; margin-left: 6px; }
.brand-group > summary::after { content: "\25BE"; margin-left: auto; color: var(--dim); }
.brand-group[open] > summary::after { transform: rotate(180deg); }
.brand-group .fam-head { padding: 8px 12px 2px; }
.brand-group .swatch-grid { padding: 0 12px 12px; }
/* the name lives in the readout now, so the chips stay clean and bigger */
#sheet-body .swatch small { display: none; }
#sheet-body .swatch { height: 46px; }

/* --- bulk brand selection ------------------------------------------------
   141 brands is unworkable one tick at a time. */
.brand-tools { display: grid; gap: 8px; margin-bottom: 8px; }
#brand-filter { min-height: 44px; border: 1px solid #d9d5ee; border-radius: 10px;
  padding: 0 12px; font-size: 16px; width: 100%; }
.brand-tool-row { display: flex; gap: 8px; }
.brand-tool-row button { flex: 1; min-height: 44px; border-radius: 10px;
  font-size: 14px; font-weight: 600; }
#brand-count { font-size: 12px; color: var(--dim); }
#set-colors details.hidden { display: none; }

/* per-brand price tier */
.tier-row { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.tier-row span { flex: 1; font-size: 13px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tier-row select { min-height: 40px; border: 1px solid #d9d5ee; border-radius: 8px;
  padding: 0 8px; font-size: 14px; background: #fff; color: var(--text); }

/* family heading inside a brand's swatch block (settings) — the silks and the
   mattes need to be visibly separate blocks, or "drop this brand's silks"
   means hunting them one swatch at a time */
.fam-head {
  font-size: 12px;
  color: var(--dim, #8a8a9a);
  margin: 10px 0 4px;
  letter-spacing: .02em;
}
.fam-head small { opacity: .6; margin-left: 4px; }
#finish-tools { flex-wrap: wrap; }
#finish-tools button { font-size: 12px; }
#finish-tools button.off { opacity: .45; text-decoration: line-through; }

/* ---- seller gate: the first screen -------------------------------------
   Uses the app's own palette, not its own. The card sat on a dark fallback
   because --card is not a variable this project defines, so it landed on
   #1e1e26 over a light page. Only the tokens declared in :root above are safe
   to reference. */
body.gated { overflow: hidden; }
#gate {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 24px calc(24px + env(safe-area-inset-right))
           calc(24px + env(safe-area-inset-bottom))
           calc(24px + env(safe-area-inset-left));
  background: var(--bg);
  opacity: 1; transition: opacity .25s ease;
}
#gate.gate-out { opacity: 0; pointer-events: none; }
.gate-card {
  width: 100%; max-width: 380px;
  background: var(--panel);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(42, 38, 83, .12);
  overflow: hidden;
}
.gate-head {
  background: var(--purple); color: #fff;
  padding: 16px 20px 14px;
}
.gate-head h1 { font-size: 20px; font-weight: 700; }
.gate-head h1 span { color: var(--gold); font-weight: 400; }
.gate-sub { margin-top: 3px; font-size: 12px; opacity: .85; }
.gate-body { padding: 18px 20px 16px; }
.gate-body label {
  display: block; margin-bottom: 14px;
  font-size: 13px; font-weight: 600; color: var(--dim);
}
.gate-body input {
  display: block; width: 100%; margin-top: 6px;
  padding: 12px; min-height: 44px;
  font-size: 16px;                          /* 16px stops iOS zooming on focus */
  font-family: inherit;
  background: #fff; color: var(--text);
  border: 1px solid #ded9ee; border-radius: 10px;
}
.gate-body input:focus {
  outline: 2px solid var(--purple); outline-offset: 1px; border-color: var(--purple);
}
#gate-go {
  width: 100%; min-height: 46px; margin-top: 4px;
  font-size: 16px; font-weight: 700; font-family: inherit;
  border: 0; border-radius: 10px;
  background: var(--purple); color: #fff;
  touch-action: manipulation;
}
#gate-go:disabled { opacity: .55; }
#gate-msg { min-height: 20px; margin-top: 10px; font-size: 13px; color: var(--dim); }
#gate-msg.bad { color: #b3261e; }
.gate-foot {
  margin: 14px 0 0; font-size: 12px; color: var(--dim);
  border-top: 1px solid #ece8f7; padding-top: 12px;
}
.gate-foot a { color: var(--purple); }

/* ---- theme presets ------------------------------------------------------ */
#theme-row { margin-bottom: 10px; }
.theme-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--panel2, #f1eefb); border: 2px solid transparent;
  border-radius: 999px; padding: 7px 13px 7px 8px;
  font: inherit; font-size: 13px; color: var(--text, #221d3a);
  min-height: 44px; touch-action: manipulation; cursor: pointer;
}
.theme-chip:active { border-color: var(--purple, #45419E); }
.theme-chip .strip { display: inline-flex; border-radius: 999px; overflow: hidden;
  width: 46px; height: 22px; box-shadow: 0 0 0 1px rgba(0,0,0,.08) inset; }
.theme-chip .strip i { flex: 1; }

/* ---- floating price pill ------------------------------------------------ */
#price-pill {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 40; border: 0; border-radius: 999px;
  background: var(--purple, #45419E); color: #fff;
  padding: 10px 18px; min-height: 44px;
  font: inherit; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 6px 18px rgba(38, 28, 92, .35);
  touch-action: manipulation; cursor: pointer;
}
#price-pill .pill-go { font-size: 12px; font-weight: 500; opacity: .85; }
#price-pill[hidden] { display: none; }

/* ---- offline badge ------------------------------------------------------ */
#offline-chip {
  font-size: 11px; color: #2c7a4b; background: #e7f5ec;
  border-radius: 999px; padding: 4px 9px; white-space: nowrap;
}

/* theme chips ride in ONE horizontally swipeable row - fourteen wrapped
   chips pushed the colour zones below the fold on a phone */
#theme-row { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px;
  padding-bottom: 6px; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity; scrollbar-width: thin; }
#theme-row .theme-chip { flex: 0 0 auto; scroll-snap-align: start; }
.theme-chip.on { border-color: var(--purple, #45419E); background: #ece9fb; }

/* ---- operator add-ons --------------------------------------------------- */
.addon-manual, .addon-new { display: flex; gap: 8px; margin-top: 8px; }
.addon-manual input, .addon-new input { min-height: 44px; border: 1px solid #d9d5ee;
  border-radius: 10px; padding: 0 12px; font-size: 15px; }
.addon-manual #manual-label, .addon-new #new-addon-label { flex: 1; }
.addon-manual #manual-price, .addon-new #new-addon-price { width: 90px; }
.addon-new button { min-height: 44px; border: 0; border-radius: 10px;
  background: var(--purple); color: #fff; font-size: 14px; font-weight: 600;
  padding: 0 16px; }
.addon-set-row { display: flex; align-items: center; justify-content: space-between;
  gap: 8px; min-height: 44px; border-bottom: 1px solid #ece8f7; font-size: 14px; }
.addon-set-row button { width: 36px; height: 36px; min-height: 0; border: 0;
  border-radius: 50%; background: #f4e3e2; color: #b3261e; font-size: 18px; }
.capsule-price { width: 90px; min-height: 40px; border: 1px solid #d9d5ee;
  border-radius: 8px; padding: 0 10px; font-size: 15px; flex: 0 0 auto; }
/* choose-inside: member chips under a ticked collection */
.member-row { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 8px 32px; }
.member-chip { display: inline-flex; align-items: center; gap: 5px;
  background: var(--panel, #fff); border: 1px solid #d9d5ee; border-radius: 999px;
  padding: 5px 11px; font-size: 12px; min-height: 34px; cursor: pointer; }
.member-chip input { width: 16px; height: 16px; min-height: 0 !important; }
.member-edit { padding: 6px 0 10px; }
.member-edit input { width: 100%; min-height: 44px; border: 1px solid #d9d5ee;
  border-radius: 10px; padding: 0 12px; font-size: 14px; }
.member-inline { width: 100%; min-height: 40px; border: 1px solid #d9d5ee;
  border-radius: 10px; padding: 0 12px; font-size: 14px; }
/* collapsible series groups in the capsule lists */
.series-group { border: 1px solid #e4e1f3; border-radius: 10px;
  background: var(--panel, #fff); padding: 0 10px; margin-bottom: 8px; }
.series-group > summary { min-height: 44px; display: flex; align-items: center;
  font-size: 13px; font-weight: 700; color: var(--text, #2a2653);
  cursor: pointer; touch-action: manipulation; }
.series-group[open] { padding-bottom: 6px; }

/* ---- capsule set art ---------------------------------------------------- */
.set-thumb { width: 54px; height: 30px; object-fit: cover; border-radius: 5px;
  border: 1px solid #0002; flex: 0 0 auto; cursor: zoom-in; }
#art-view { position: fixed; inset: 0; z-index: 60; background: #171430ee;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 16px; overflow: auto; }
#art-view[hidden] { display: none; }
#art-img { max-width: 100%; max-height: 82vh; object-fit: contain;
  border-radius: 10px; background: #fff; }
#art-cap { color: #fff; font-size: 13px; margin-top: 10px; text-align: center;
  max-width: 640px; }
#art-close { position: fixed; top: calc(10px + env(safe-area-inset-top));
  right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: #ffffff22; color: #fff; font-size: 24px; }
/* the client-facing gallery: tiles that zoom */
#art-grid { display: grid; gap: 10px; width: 100%; max-width: 900px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
#art-grid[hidden] { display: none; }
.art-tile { margin: 0; cursor: zoom-in; }
.art-tile img { width: 100%; aspect-ratio: 16/9; object-fit: cover;
  border-radius: 8px; background: #fff; display: block; }
.art-tile figcaption { color: #fff; font-size: 11px; margin-top: 4px;
  opacity: .9; }
#art-back { position: fixed; top: calc(10px + env(safe-area-inset-top));
  left: 12px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 22px;
  background: #ffffff22; color: #fff; font-size: 14px; }
#art-back[hidden] { display: none; }
#art-img[hidden] { display: none; }
/* the ticked set's own art, inline with its characters */
.set-art { width: 100%; max-width: 320px; aspect-ratio: 16/9; object-fit: cover;
  border-radius: 8px; border: 1px solid #0002; display: block; margin-bottom: 6px;
  cursor: zoom-in; }

/* ---- private build: send to shop ---------------------------------------- */
.send-wrap { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
#send-shop { background: #1f7a3a; color: #fff; border: 0; border-radius: 12px;
  min-height: 44px; font-weight: 700; }
#send-shop:disabled { opacity: .6; }
#send-result a { color: #45419e; font-weight: 600; }
#send-result .bad { color: #a11; font-weight: 600; }
#send-result .warn { color: #7a5a00; }
