/* Altaria's Nest - storefront styles. Colours and type straight from design/DESIGN.md. */
:root {
  --navy: #1f3350;
  --navy-ink: #1f2a3a;
  --coral: #e8634a;
  --cream: #fff7e6;
  --cream2: #fffaf0;
  --sky: #8cc8e3;
  --yellow: #ffd45c;
  --sold: #b3261e;
  --low: #c2410c;
  --muted: #4a5568;
  --backdrop: var(--sky);  /* page colour behind the app column */
  --bar: var(--navy);      /* top header bar */
}
/* The female shopper gets a soft pink page and a header with a hint of plum. */
:root[data-shopper="f"] { --backdrop: #fadadd; --bar: #2f3253; }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--backdrop); overflow-x: hidden; }
body {
  font-family: 'Nunito Sans', system-ui, sans-serif;
  color: var(--navy-ink);
}
a { color: var(--navy); }
a:hover { color: #0f1c2e; }
button { font-family: inherit; touch-action: manipulation; } /* quick taps on + don't zoom the page */
img { max-width: 100%; }

.heading { font-family: 'Pixelify Sans', sans-serif; font-weight: 700; }

/* ---- phone frame ----
   The room's tap zones, walker and speech bubble are all positioned in
   fixed pixels against the 390x522 design (see design/DESIGN.md), so the
   frame itself is locked to 390px wide rather than stretched to fit the
   device - that keeps every hotspot lined up with the background art.
   max-width: 100vw just stops a horizontal scrollbar on a narrower phone. */
.phone {
  width: 390px;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh; /* actual visible height on mobile, not the full scrollable page */
  margin: 0 auto;
  background: var(--backdrop);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* Header and the tab bar are fixed-size flex children (see their own rules);
   this is the only part that's allowed to scroll if content ever runs
   taller than the screen, so the page itself never does. */
.shop-body { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.shop-body-inner { display: flex; flex-direction: column; flex-shrink: 0; transform-origin: top center; }
@media (min-width: 560px) {
  body { display: flex; justify-content: center; padding: 24px 0; }
  .phone { min-height: 844px; height: 844px; border-radius: 28px; box-shadow: 0 20px 60px rgba(15,28,46,.35); }
}

/* ---- header ---- */
.app-header {
  height: 58px; flex-shrink: 0; box-sizing: border-box; padding: 0 12px 0 16px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bar); color: #fff; position: relative; z-index: 3;
}
.app-header .title { font-size: 21px; line-height: 1; }
.app-header .subtitle { font-size: 11px; color: #c9d8ea; margin-top: 3px; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.avatar-btn {
  width: 44px; height: 44px; border-radius: 22px; border: 2px solid #3d5677; background: #2a4466;
  padding: 0; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; cursor: pointer;
}
.avatar-btn img { height: 40px; image-rendering: pixelated; margin-bottom: -6px; }
.avatar-btn.empty { background: #fff; border-color: #fff; color: var(--navy); align-items: center; }
.basket-btn {
  height: 44px; min-width: 44px; padding: 0 12px; border-radius: 22px; border: 0; background: var(--coral);
  color: #fff; font: 800 14px 'Nunito Sans', sans-serif; display: flex; align-items: center; gap: 6px; cursor: pointer;
}

/* ---- room ---- */
.room { position: relative; width: 390px; height: 522px; flex-shrink: 0; overflow: hidden; }
.room img.bg { display: block; width: 390px; height: 522px; object-fit: cover; }
.hot {
  position: absolute; background: transparent; border: 2px dashed transparent; border-radius: 10px;
  padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.hot:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.hot.on { border-color: rgba(255,255,255,.95); background: rgba(255,255,255,.12); }
.pill {
  position: absolute; left: 50%; top: -15px; transform: translateX(-50%); white-space: nowrap;
  background: var(--navy); color: #fff; border: 2px solid #fff; border-radius: 12px; padding: 3px 9px;
  font: 700 11px 'Nunito Sans', sans-serif; box-shadow: 0 3px 0 rgba(15,28,46,.35);
  display: flex; align-items: center; gap: 5px; animation: bob 2.2s ease-in-out infinite;
}
.pill i { width: 6px; height: 6px; border-radius: 3px; background: var(--yellow); display: inline-block; animation: twinkle 1.4s ease-in-out infinite; }
.pill.soon { background: #6b7c93; }
.pill.sale { background: #c8432e; }
.pill.counter { top: -42px; left: 47%; }
.pill.raised { top: -30px; } /* clear of the shopper's head at the stool */
/* the notice board is drawn inside its own tap zone, label just above it */
.hot.board img { position: absolute; left: 2px; top: 2px; width: 50px; }
.hot.board .pill { top: -24px; }
.capsule { position: absolute; left: 329px; top: 275px; width: 30px; pointer-events: none; }
@keyframes bob { 0%, 100% { margin-top: 0; } 50% { margin-top: -4px; } }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* Walk and sit frames are a 120x212 canvas anchored at (60,190) - see
   site/img/walk/README.md. That is dead-center horizontally (-50%) but
   89.6226% (190/212) down rather than at the very bottom, since some stride
   frames reach a few px past that baseline. JS moves the walker every screen
   refresh, so there's no CSS transition. */
.walker { position: absolute; pointer-events: none; transform: translate(-50%, -89.6226%); }
.walker img { display: block; height: 109px; image-rendering: pixelated; filter: drop-shadow(0 3px 1px rgba(40,25,5,.35)); }

/* .enter plays the pop-in once, on the render where a panel/bubble/toast first
   appears - every render rebuilds the whole DOM, so without this gate the
   animation would replay (and visibly ghost) on every unrelated re-render. */
.speech {
  position: absolute; width: 36%; text-align: left; background: #fff; border: 2px solid var(--navy); border-radius: 12px;
  padding: 7px 9px; font: 700 12px/1.35 'Nunito Sans', sans-serif; color: var(--navy-ink);
  box-shadow: 0 3px 0 rgba(15,28,46,.3); cursor: pointer;
}
.speech .tail {
  position: absolute; left: 56px; top: -9px; width: 0; height: 0;
  border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 9px solid var(--navy);
}
.speech .label { display: block; font-size: 10px; font-weight: 800; letter-spacing: .5px; color: var(--low); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- info strip ---- */
.info-strip { padding: 12px 16px 0; display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { background: var(--cream); border-radius: 12px; padding: 5px 10px; font-size: 12px; font-weight: 700; }
.info-strip p { margin: 0; font-size: 13px; line-height: 1.4; }

/* ---- bottom nav ---- */
.tabbar {
  flex-shrink: 0; background: var(--cream); border-top: 2px solid var(--navy);
  display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); align-items: center;
  padding: 0 6px 6px; box-sizing: border-box; height: 76px; position: relative; z-index: 3;
}
.tabbar button {
  border: 0; background: transparent; padding: 0; font: 800 11px/14px 'Nunito Sans', sans-serif;
  white-space: nowrap; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; cursor: pointer; color: var(--navy);
}
.tabbar button.active { color: var(--coral); }
.tabbar .icon { height: 24px; display: flex; align-items: center; }
.tabbar .basket-tab { justify-content: flex-end; align-self: stretch; }
.tabbar .basket-circle {
  position: relative; width: 54px; height: 54px; margin-top: -22px; border-radius: 27px; background: var(--coral);
  border: 3px solid var(--cream); box-shadow: 0 4px 0 rgba(15,28,46,.25); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.tabbar .basket-count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box;
  border-radius: 10px; background: var(--navy); color: #fff; font: 800 11px/20px 'Nunito Sans', sans-serif; text-align: center;
}

/* ---- panel (full-screen zone pages) ---- */
.panel {
  position: absolute; inset: 58px 0 76px 0; background: var(--cream2); display: flex; flex-direction: column;
  z-index: 4;
}
.panel-head { display: flex; align-items: center; gap: 8px; padding: 10px 16px 8px 8px; border-bottom: 1px solid #e3e7ec; flex-shrink: 0; }
.back-btn {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 22px; border: 0; background: transparent;
  color: var(--navy); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.panel-title { margin: 0; font-size: 22px; line-height: 1.1; }
.panel-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.panel-body { flex: 1; overflow-y: auto; padding: 14px 16px 20px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* ---- card tiles ---- */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px 10px; }
.card-tile { display: flex; flex-direction: column; gap: 5px; height: 100%; }
.card-art {
  aspect-ratio: 63/88; border-radius: 5px; position: relative; overflow: hidden; display: block; width: 100%;
  border: 0; cursor: zoom-in; text-align: left; background-size: cover; background-position: center;
}
.card-art.r-AR, .card-art.r-default { background: linear-gradient(160deg,#cfe3f2,#e9d8b4); }
.card-art.r-SR { background: linear-gradient(160deg,#ece6d4,#c4b37f); }
.card-art.r-UR, .card-art.r-SSR { background: linear-gradient(160deg,#f5d77f,#b5832a); }
.card-art.r-SAR { background: linear-gradient(160deg,#d9c9f2,#f2c6d8,#c7ecf0); }
.card-art.r-Pika { background: linear-gradient(160deg,#fff3b0,#ffd45c); }
.card-art.r-Bundle { background: linear-gradient(160deg,#f5a98f,#ffd45c); }
.card-art img.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-art .sold-badge {
  position: absolute; inset: 0; background: rgba(255,250,240,.72); display: flex; align-items: center; justify-content: center;
  font: 800 12px 'Nunito Sans', sans-serif; letter-spacing: 2px; color: var(--sold);
}
.card-name { font-size: 12px; font-weight: 800; line-height: 15px; height: 30px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-meta { font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; }
/* price and "Only N left" are stacked (not side by side) so every tile
   reserves the same height whether or not it has a stock tag to show -
   otherwise tiles with/without a tag line up to different row heights. */
.card-price-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 36px; }
.card-price { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.card-tag { display: block; min-height: 14px; font-size: 11px; font-weight: 800; }
.card-tag.sold-tag { color: var(--sold); }
.card-tag.low-tag { color: var(--low); }
.add-btn {
  margin-top: auto; width: 100%; min-height: 44px; border-radius: 10px; border: 2px solid var(--navy); background: #fff;
  color: var(--navy); font: 800 12px 'Nunito Sans', sans-serif; cursor: pointer;
}
.stepper {
  margin-top: auto; display: grid; grid-template-columns: 40px minmax(0,1fr) 40px; align-items: center;
  border: 2px solid var(--navy); border-radius: 10px; background: var(--navy); color: #fff; overflow: hidden;
}
.stepper button { height: 40px; border: 0; background: transparent; color: #fff; font: 800 18px 'Nunito Sans', sans-serif; cursor: pointer; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper span { text-align: center; font: 800 14px 'Nunito Sans', sans-serif; }

/* ---- album ---- */
.album-controls { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.search-row { display: flex; gap: 8px; }
.search-row input {
  flex: 1; min-width: 0; min-height: 44px; border-radius: 12px; border: 2px solid var(--navy); padding: 0 12px;
  font: 400 15px 'Nunito Sans', sans-serif; color: var(--navy-ink); background: #fff;
}
.filters-btn {
  min-height: 44px; padding: 0 12px; border-radius: 12px; border: 2px solid var(--navy); background: #fff; color: var(--navy);
  font: 800 13px 'Nunito Sans', sans-serif; display: flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap;
}
.filters-btn.active { background: var(--navy); color: #fff; }
.filters-panel { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid #e3e7ec; border-radius: 12px; padding: 10px; }
.filters-label { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: .5px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  min-height: 40px; min-width: 44px; padding: 0 10px; border-radius: 20px; border: 2px solid var(--navy); background: #fff;
  color: var(--navy); font: 800 12px 'Nunito Sans', sans-serif; cursor: pointer;
}
.chip.on { background: var(--navy); color: #fff; }
.sort-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.sort-row label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--muted); }
.sort-row select { min-height: 40px; border-radius: 10px; border: 2px solid var(--navy); background: #fff; font: 700 13px 'Nunito Sans', sans-serif; color: var(--navy-ink); padding: 0 8px; }
.clear-link { min-height: 40px; padding: 0 4px; border: 0; background: transparent; color: var(--navy); font: 700 13px 'Nunito Sans', sans-serif; text-decoration: underline; cursor: pointer; }
.lang-switch { display: flex; gap: 6px; }

.dividers { display: flex; gap: 3px; padding: 0 2px; margin-bottom: -2px; overflow-x: auto; scrollbar-width: none; }
.dividers::-webkit-scrollbar { display: none; }
.divider-tab {
  flex: 0 0 auto; min-width: 54px; min-height: 44px; padding: 6px 8px 4px; border: 2px solid var(--navy); border-bottom: 0;
  white-space: nowrap; border-radius: 10px 10px 0 0; background: #eef1f5; color: var(--navy);
  font: 800 12px/1.15 'Nunito Sans', sans-serif; cursor: pointer; transform: translateY(4px);
}
.divider-tab.current { transform: translateY(0); }
.divider-tab span { font-weight: 600; font-size: 10.5px; display: block; }
.jump-btn {
  flex: 0 0 auto; min-width: 44px; min-height: 44px; padding: 6px 10px 4px; border: 2px solid var(--navy); border-bottom: 0;
  border-radius: 10px 10px 0 0; background: #fff; color: var(--navy); font: 800 12px 'Nunito Sans', sans-serif; cursor: pointer;
}

.book-page {
  position: relative; background: #fff; border: 2px solid var(--navy); border-top: 6px solid var(--page-color, var(--navy));
  border-radius: 0 0 12px 12px; padding: 12px 10px 14px 28px; box-shadow: 0 3px 0 rgba(15,28,46,.18);
}
.book-page .spine { position: absolute; left: 9px; top: 24px; bottom: 24px; display: flex; flex-direction: column; justify-content: space-between; }
.book-page .spine span { width: 10px; height: 10px; border-radius: 5px; background: #e3e7ec; box-shadow: inset 0 1px 2px rgba(0,0,0,.25); display: block; }
.book-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.book-head h3 { margin: 0; font-size: 18px; }
.book-head .set-sub { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.book-page.flipN { animation: flipN .45s ease-out; transform-origin: left center; }
.book-page.flipP { animation: flipP .45s ease-out; transform-origin: right center; }
@keyframes flipN { from { transform: perspective(900px) rotateY(-75deg); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes flipP { from { transform: perspective(900px) rotateY(75deg); opacity: .2; } to { transform: none; opacity: 1; } }

.page-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.page-nav button { min-height: 44px; padding: 0 12px; border-radius: 12px; border: 2px solid var(--navy); font: 800 13px 'Nunito Sans', sans-serif; cursor: pointer; }
.page-nav .prev { background: #fff; color: var(--navy); }
.page-nav .next { background: var(--navy); color: #fff; }
.page-nav button:disabled { opacity: .4; cursor: default; }
.page-nav .page-count { font-size: 12px; font-weight: 700; color: var(--muted); }

.result-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 10px; }

/* ---- slab / coming-soon ---- */
.coming-soon { background: #eef4fb; border: 2px dashed #8aa3c2; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.coming-soon .title { font-size: 18px; }
.coming-soon p { margin: 0; font-size: 14px; line-height: 1.45; }
.coming-soon .note { font-size: 12px; color: var(--muted); }
.coming-soon button, .coming-soon a {
  min-height: 48px; border-radius: 12px; border: 0; background: var(--navy); color: #fff; font: 800 14px 'Nunito Sans', sans-serif;
  cursor: pointer; text-decoration: none; display: flex; align-items: center; justify-content: center;
}

/* ---- treasure bin ---- */
.bundle-list { display: flex; flex-direction: column; gap: 12px; }
.bundle-card { background: #fff; border: 2px solid var(--navy); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 3px 0 rgba(15,28,46,.15); }
.bundle-top { display: flex; gap: 12px; align-items: center; }
.bundle-fan { position: relative; width: 86px; height: 82px; flex-shrink: 0; }
.bundle-fan .card-art { position: absolute; width: 46px; box-shadow: 0 2px 4px rgba(0,0,0,.25); cursor: default; }
.bundle-info { flex: 1; min-width: 0; }
.bundle-info .name { font-size: 18px; }
.bundle-info .count { font-size: 12px; color: var(--muted); }
.bundle-price-row { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.bundle-price-row .price { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bundle-price-row .worth { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.save-tag { display: inline-block; margin-top: 4px; background: #fff3ef; color: var(--low); border-radius: 8px; padding: 2px 8px; font-size: 11px; font-weight: 800; }
.inside-toggle { align-self: flex-start; min-height: 36px; padding: 0 2px; border: 0; background: transparent; color: var(--navy); font: 700 13px 'Nunito Sans', sans-serif; text-decoration: underline; cursor: pointer; }
.inside-list { font-size: 13px; line-height: 1.5; background: #f4f6f9; border-radius: 10px; padding: 10px; }
.inside-list.card-grid { gap: 10px 8px; } /* the card grid above, 3 to a row */
.inside-list .card-art { cursor: default; }
.qty-badge {
  position: absolute; top: 4px; right: 4px; z-index: 1; background: var(--navy); color: #fff; border: 2px solid #fff;
  border-radius: 10px; padding: 0 6px; font: 800 11px/16px 'Nunito Sans', sans-serif;
}
.bundle-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bundle-bottom .stepper, .bundle-bottom .add-btn { width: 140px; margin-top: 0; }

/* ---- basket / counter ---- */
.wheel-teaser {
  display: flex; align-items: center; gap: 12px; text-align: left; border: 2px dashed var(--coral); background: #fff3ef;
  border-radius: 14px; padding: 10px 12px; cursor: pointer; color: var(--navy-ink); width: 100%;
}
.wheel-teaser .lead { display: block; font: 800 14px 'Nunito Sans', sans-serif; }
.wheel-teaser .sub { font-size: 12px; color: var(--muted); }
.basket-list { display: flex; flex-direction: column; gap: 10px; }
.basket-row { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #dde3ea; border-radius: 12px; padding: 12px; }
.basket-row .card-art { width: 36px; flex-shrink: 0; cursor: default; }
.basket-row .info { flex: 1; min-width: 0; }
.basket-row .info .name { font-size: 14px; font-weight: 800; }
.basket-row .info .meta { font-size: 12px; color: var(--muted); }
.basket-row .info .note { font-size: 11px; font-weight: 700; color: var(--low); }
.basket-row .right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.basket-row .stepper { grid-template-columns: 36px 28px 36px; }
.basket-row .stepper button { height: 36px; background: #fff; color: var(--navy); }
.basket-row .line-total { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.basket-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 16px; padding: 8px 2px; margin-top: 12px; }
.msg-label-row { display: flex; align-items: baseline; justify-content: space-between; margin: 16px 0 4px; }
.msg-label-row label { font-size: 13px; font-weight: 800; }
.msg-label-row .clear-link { margin: -12px 0; } /* keeps the 40px tap area without padding the row */
.msg-hint { font-size: 12px; line-height: 1.4; color: var(--muted); margin-bottom: 8px; }
#order-msg { display: block; width: 100%; box-sizing: border-box; border-radius: 12px; border: 2px solid var(--navy); background: #fff; padding: 12px; font: 400 14px/1.45 'Nunito Sans', sans-serif; color: var(--navy-ink); resize: vertical; }
.msg-stale { font-size: 12px; font-weight: 700; color: var(--sold); margin-top: 8px; }
.send-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.send-row button { min-height: 48px; border-radius: 12px; border: 0; font: 800 14px 'Nunito Sans', sans-serif; cursor: pointer; color: #fff; }
.send-row .tg { background: #2a8bd1; }
.send-row .wa { background: #1f8a4c; }
.send-row button:disabled { opacity: .45; cursor: default; }
.fine-print { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.send-row + .fine-print { margin-top: 12px; }
.fine-print + .fine-print { margin-top: 6px; }
.confirm-box { margin-top: 12px; background: #eef6ee; border: 2px solid #1f8a4c; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.confirm-box .headline { font-weight: 800; font-size: 15px; }
.confirm-box button { min-height: 48px; border-radius: 12px; border: 0; background: #1f8a4c; color: #fff; font: 800 14px 'Nunito Sans', sans-serif; cursor: pointer; }
.confirm-box .back { background: #fff; border: 2px solid var(--navy); color: var(--navy); font: 800 13px 'Nunito Sans', sans-serif; margin-top: -2px; }
.empty-note { margin: 0; font-size: 14px; }

/* ---- notice board: updates + FAQ accordion ---- */
.board-h { font-size: 18px; margin: 0 0 8px; }
.board-h ~ .board-h { margin-top: 20px; }
.board-updates { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.board-updates li { background: #fff; border: 2px solid var(--navy); border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-line; }
.u-date { display: block; font-size: 11px; font-weight: 800; color: var(--muted); margin-bottom: 2px; }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item { background: #fff; border: 2px solid var(--navy); border-radius: 12px; overflow: hidden; }
.faq-q { width: 100%; min-height: 48px; padding: 8px 12px; border: 0; background: transparent; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  text-align: left; font: 800 14px/1.35 'Nunito Sans', sans-serif; color: var(--navy-ink); cursor: pointer; }
.faq-q .chev { flex-shrink: 0; color: var(--navy); }
.faq-item.open .faq-q { background: #eef4fb; }
.faq-a { padding: 10px 12px 12px; font-size: 14px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; border-top: 2px solid #eef4fb; }

/* ---- detail modal ---- */
.detail-overlay {
  position: absolute; inset: 58px 0 76px 0; background: rgba(15,28,46,.78); display: flex; flex-direction: column;
  align-items: center; padding: 14px 20px 16px; box-sizing: border-box; gap: 12px; z-index: 6;
}
.detail-close { align-self: flex-end; width: 44px; height: 44px; border-radius: 22px; border: 0; background: rgba(255,255,255,.15); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.detail-overlay .card-art { width: 250px; border-radius: 12px; box-shadow: 0 16px 30px rgba(0,0,0,.45); cursor: default; }
.detail-info { width: 100%; background: var(--cream2); border-radius: 16px; padding: 14px; box-sizing: border-box; display: flex; flex-direction: column; gap: 4px; }
.detail-info .row1 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.detail-info .row1 .name { font-size: 17px; font-weight: 800; }
.detail-info .row1 .price { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.detail-info .meta { font-size: 13px; color: var(--muted); }
.detail-info .stock { font-size: 13px; font-weight: 700; }
.detail-info button { margin-top: 8px; min-height: 48px; border-radius: 12px; border: 2px solid var(--navy); font: 800 14px 'Nunito Sans', sans-serif; cursor: pointer; }

/* ---- welcome / shopper picker ---- */
.modal-overlay { position: absolute; inset: 0; background: rgba(15,28,46,.55); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 8; }
.modal-card { background: var(--cream2); border: 2px solid var(--navy); border-radius: 20px; padding: 22px 18px 18px; width: 100%; box-sizing: border-box; box-shadow: 0 6px 0 rgba(15,28,46,.4); }
.modal-card .heading { font-size: 24px; text-align: center; }
.modal-card .lede { margin: 8px 0 16px; font-size: 14px; text-align: center; line-height: 1.4; }
.modal-card label.field-label { display: block; font-size: 13px; font-weight: 800; margin-bottom: 6px; }
.modal-card input[type=text] {
  width: 100%; box-sizing: border-box; min-height: 44px; border-radius: 12px; border: 2px solid var(--navy); padding: 0 12px;
  font: 400 15px 'Nunito Sans', sans-serif; color: var(--navy-ink); background: #fff;
}
.modal-card .hint { font-size: 11px; color: var(--muted); margin: 4px 0 14px; }
.modal-card .pick-label { font-size: 13px; font-weight: 800; margin-bottom: 8px; }
.shopper-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.shopper-pick {
  min-height: 150px; border-radius: 16px; border: 2px solid var(--navy); display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; gap: 8px; padding: 12px; cursor: pointer; font: 800 14px 'Nunito Sans', sans-serif; color: var(--navy-ink);
}
.shopper-pick.m { background: #e3f1f9; }
.shopper-pick.f { background: #fbe8e3; }
.shopper-pick img { height: 96px; image-rendering: pixelated; }
.skip-link { margin-top: 12px; width: 100%; min-height: 44px; border: 0; background: transparent; color: var(--navy); font: 700 13px 'Nunito Sans', sans-serif; text-decoration: underline; cursor: pointer; }

/* ---- jump-to-set sheet ---- */
.jump-sheet-list { display: flex; flex-direction: column; gap: 2px; max-height: 60vh; overflow-y: auto; }
.jump-sheet-list button {
  display: flex; justify-content: space-between; gap: 10px; padding: 12px 6px; border: 0; border-bottom: 1px solid #eef1f5;
  background: transparent; font: 700 14px 'Nunito Sans', sans-serif; color: var(--navy-ink); cursor: pointer; text-align: left;
}
.jump-sheet-list .n { color: var(--muted); font-weight: 600; font-size: 12px; }

/* ---- toast ---- */
.toast { position: absolute; left: 16px; right: 16px; bottom: 92px; background: var(--navy); color: #fff; border-radius: 12px; padding: 12px 14px; font-size: 13px; font-weight: 700; box-shadow: 0 8px 18px rgba(15,28,46,.35); z-index: 9; }
.panel.enter, .speech.enter, .toast.enter { animation: up .25s ease-out; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- capsule machine demo (capsule.js) ---- */
.cap {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0;
  padding: 0; box-sizing: border-box; overflow: hidden; background: rgba(10,18,32,.95); color: var(--navy-ink);
}
.cap[open] { display: flex; flex-direction: column; align-items: center; }
.cap::backdrop { background: transparent; }
.cap [hidden] { display: none !important; }
.cap-btn { min-height: 48px; padding: 0 22px; border-radius: 12px; border: 2px solid var(--navy); background: #fff; color: var(--navy); font: 800 15px 'Nunito Sans', sans-serif; cursor: pointer; }
.cap-btn.primary { background: var(--coral); border-color: #fff; color: #fff; }
.cap-btn:disabled { opacity: .55; cursor: default; }
.cap button:focus-visible, .cap input:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.cap-card {
  width: min(88%, 320px); box-sizing: border-box; background: var(--cream2); border: 3px solid var(--navy); border-radius: 18px;
  padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.cap-card h2 { margin: 0; font-size: 20px; }
.cap-card .cap-btn { align-self: stretch; }
.cap-code { margin-top: 90px; } /* high up, so a phone keyboard doesn't cover it */
/* 16px or more stops iPhone Safari zooming in when the box is tapped */
.cap-input { width: 100%; box-sizing: border-box; min-height: 48px; border: 2px solid var(--navy); border-radius: 12px; text-align: center; font: 800 20px 'Nunito Sans', sans-serif; letter-spacing: 2px; text-transform: uppercase; }
.cap-error { margin: 0; min-height: 18px; font-size: 13px; font-weight: 700; color: var(--sold); }

/* the rules step is tall, so it scrolls inside its own card on a small screen */
.cap-rules { width: min(92%, 380px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); margin-top: 12px; overflow-y: auto; align-items: stretch; text-align: left; }
.cap-rules h2 { text-align: center; }
.cap-rule-list { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.45; }
.cap-rule-list li + li { margin-top: 6px; }
.cap-terms summary { cursor: pointer; font-weight: 800; font-size: 14px; color: var(--navy); min-height: 32px; display: flex; align-items: center; gap: 6px; list-style: none; }
.cap-terms summary::-webkit-details-marker { display: none; }
.cap-terms summary::before { content: "▸"; }
.cap-terms[open] summary::before { content: "▾"; }
.cap-terms-body { font-size: 13px; line-height: 1.45; }
.cap-terms-body ol { margin: 6px 0 0; padding-left: 22px; }
.cap-terms-body li + li { margin-top: 6px; }
.cap-terms-link { font-size: 13px; color: var(--navy); }
.cap-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 700; line-height: 1.35; cursor: pointer; }
.cap-agree input { flex-shrink: 0; width: 24px; height: 24px; margin: 0; accent-color: var(--coral); }
.cap-fail { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); animation: cap-fade .3s both; }
.cap-fail-text { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4; }

.cap-play { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.cap-play { transition: opacity .3s; }
.cap-play.dim { opacity: .25; pointer-events: none; }
.cap-x { position: absolute; right: 10px; top: calc(8px + env(safe-area-inset-top)); width: 44px; height: 44px; border: 0; border-radius: 22px; background: rgba(255,255,255,.15); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.cap-stage {
  /* Where things sit on machine.png, as % of its width (x, sizes) and height (y). Nudge here. */
  --plate-x: 49.3%; --plate-y: 71.7%; --plate-size: 20%;
  --tray-x: 49.3%; --tray-y: 88%; --capsule-size: 19%;
  --dome-x: 50%; --dome-y: 35.8%; --dome-rx: 33%; --dome-ry: 17.5%;
  position: relative; aspect-ratio: 3 / 4; flex-shrink: 0;
  width: min(92%, 360px, calc((100vh - 230px) * .75));
  width: min(92%, 360px, calc((100dvh - 190px) * .75)); /* the visible height, where supported */
}
.cap-machine, .cap-dome, .cap-dome img { position: absolute; inset: 0; width: 100%; height: 100%; }
.cap-dome { clip-path: ellipse(var(--dome-rx) var(--dome-ry) at var(--dome-x) var(--dome-y)); pointer-events: none; }
.cap-stage.jiggle .cap-dome img { animation: cap-jiggle .2s linear 4; }
/* the round touch area: a bit bigger than the knob, with the progress ring on its edge */
.cap-knob {
  position: absolute; left: var(--plate-x); top: var(--plate-y); width: calc(var(--plate-size) * 1.5); aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%; touch-action: none; cursor: grab;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.cap-knob.locked { cursor: default; }
.cap-knob img { position: absolute; left: 15%; top: 15%; width: 70%; height: 70%; pointer-events: none; }
.cap-knob svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); fill: none; stroke-width: 4; pointer-events: none; }
.cap-knob .track { stroke: rgba(255,255,255,.45); }
.cap-knob .ring { stroke: var(--yellow); stroke-linecap: round; }
.cap-drop {
  position: absolute; left: var(--tray-x); top: var(--tray-y); width: var(--capsule-size); transform: translate(-50%, -50%);
  padding: 0; border: 0; background: none; cursor: pointer; animation: cap-fall .8s ease-in both;
}
.cap-drop img { display: block; width: 100%; transition: transform .5s ease-out, opacity .5s ease-in; }
.cap-drop .top, .cap-drop .bottom { position: absolute; left: 0; opacity: 0; transition-property: transform; }
.cap-drop .top { top: 0; }
.cap-drop .bottom { bottom: 0; }
.cap-drop.open .closed { opacity: 0; transition: none; }
.cap-drop.open .bottom { opacity: 1; transform: translateY(18%); }
.cap-drop.open .top { animation: cap-lift .55s ease-out forwards; }
.cap-hint { margin: 0; color: #fff; font-size: 14px; font-weight: 700; }
.cap-actions { min-height: 52px; display: flex; justify-content: center; }
.cap-open { animation: cap-pulse 1s ease-in-out infinite; }
.cap-prize { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); animation: cap-pop .45s cubic-bezier(.2,1.4,.4,1) both; transform-origin: 50% 100%; }
.cap-shop { font-size: 16px; color: var(--navy); }
.cap-got { font-size: 13px; font-weight: 700; color: var(--muted); }
.cap-name { font-size: 28px; line-height: 1.15; color: var(--navy); }
.cap-prize p { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.cap-confetti { position: absolute; left: 50%; top: 50%; pointer-events: none; }
.cap-confetti i { position: absolute; width: 8px; height: 12px; animation: cap-burst 1.3s cubic-bezier(.15,.7,.3,1) forwards; }
@keyframes cap-jiggle { 0%, 100% { transform: none; } 25% { transform: translate(1.2%, -.7%); } 50% { transform: translate(-1%, .5%); } 75% { transform: translate(.6%, .8%); } }
@keyframes cap-fall {
  0% { top: var(--plate-y); opacity: 0; } 15% { opacity: 1; }
  60% { top: var(--tray-y); animation-timing-function: ease-out; }
  76% { top: calc(var(--tray-y) - 4%); }
  90% { top: var(--tray-y); animation-timing-function: ease-out; }
  95% { top: calc(var(--tray-y) - 1%); }
  100% { top: var(--tray-y); opacity: 1; }
}
@keyframes cap-lift { 0% { transform: none; opacity: 1; } 65% { opacity: 1; } 100% { transform: translate(-45%, -110%) rotate(-50deg); opacity: 0; } }
@keyframes cap-pulse { 50% { transform: scale(1.07); } }
@keyframes cap-pop { from { transform: translate(-50%, 10%) scale(.15); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes cap-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cap-burst { from { transform: none; opacity: 1; } 70% { opacity: 1; } to { transform: translate(var(--dx), calc(var(--dy) + 90px)) rotate(var(--spin)); opacity: 0; } }
/* no jiggle, bounce or flying pieces: steps just fade (capsule.js skips the confetti) */
@media (prefers-reduced-motion: reduce) {
  .cap-stage.jiggle .cap-dome img, .cap-open { animation: none; }
  .cap-drop, .cap-prize { animation: cap-fade .3s both; }
  .cap-drop img { transition: none; }
  .cap-drop.open .top { animation: cap-fade .3s reverse forwards; }
  .cap-drop.open .bottom { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pill, .pill i, .speech, .book-page.flipN, .book-page.flipP, .toast { animation: none; }
}
