/* ==========================================================================
   Beanbucks pages: buy (/beanbucks), gift (/beanbucks/gift/:token),
   redeem (/bb/:code). Mobile-first; light by default, dark via
   prefers-color-scheme (same token approach as public/portal.html).
   The card itself is styled by /css/holo-card.css.
   ========================================================================== */

:root {
  --primary: #FFD600;
  --primary-hover: #FFE34D;
  --on-primary: #1C1C1C;
  --accent: #E4572E;
  --caramel: #C68E17;
  --coffee: #6F4E37;
  --link: #007C91;

  --bg: #FFF8E7;
  --text: #1C1C1C;
  --text-2: #4A4038;
  --muted: #6E655D;
  --surface: #FFFFFF;
  --surface-2: #FBF3E1;
  --border: #E8DDC7;
  --border-strong: #CBBC9F;

  --error: #B8321A;
  --error-bg: #FDEDE8;
  --success: #0E7A54;
  --success-bg: #E3F4EB;

  --ink-panel: #1C1C1C;         /* the dark claim panel (like the homepage signup card) */
  --ink-panel-text: #FFF8E7;
  --ink-panel-muted: rgba(255, 248, 231, 0.7);
  --ink-panel-field: #2B2622;
  --ink-panel-border: rgba(255, 248, 231, 0.24);

  --focus: 0 0 0 3px rgba(198, 142, 23, 0.45);
  --radius: 12px;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121010;
    --text: #F5F0E8;
    --text-2: #CFC5B8;
    --muted: #A39A8F;
    --surface: #1E1A16;
    --surface-2: #26201A;
    --border: #36302A;
    --border-strong: #4D453D;
    --link: #4ECDE6;
    --caramel: #D9A325;
    --coffee: #C79A6B;
    --error: #FF8A73;
    --error-bg: rgba(255, 120, 95, 0.12);
    --success: #5FD3A2;
    --success-bg: rgba(95, 211, 162, 0.12);
    --ink-panel: #1E1A16;
    --ink-panel-field: #2A241F;
    --focus: 0 0 0 3px rgba(217, 163, 37, 0.5);
  }
}

/* ---- base ----------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--link); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--caramel); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.12; }
/* No lone word on a heading's last line ("Jamie / Lee"), and none at the end of a paragraph or step. */
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
p { margin: 0; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
/* honeypot: off-screen, not display:none (some bots skip hidden fields) */
.bb-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---- header / footer ------------------------------------------------------- */

.bb-header {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.bb-logo { display: inline-flex; padding: 4px 0; border-radius: 6px; }
.bb-logo img { display: block; height: 22px; width: auto; }
@media (prefers-color-scheme: dark) { .bb-logo img { filter: invert(1); } }
.bb-header__link {
  font: 600 12px/1 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  text-decoration: none;
  padding: 8px 0;
}
.bb-header__link:hover { color: var(--text); text-decoration: underline; }

.bb-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 4px 16px 44px;
}

.bb-footer {
  border-top: 1px solid var(--border);
  padding: 18px 16px 26px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.bb-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.bb-footer a { color: var(--text-2); }

/* ---- type & brand marks ---------------------------------------------------- */

.bb-title {
  margin: 0 0 8px;
  font-size: clamp(2.25rem, 6vw + 0.75rem, 3.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
}
/* the homepage's chamfered yellow tag with a hard offset shadow */
.bb-mark { display: inline-block; filter: drop-shadow(0.07em 0.07em 0 var(--text)); }
.bb-mark > span {
  --cut: 0.22em;
  display: inline-block;
  padding: 0.05em 0.2em 0.09em;
  background: var(--primary);
  color: var(--on-primary);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.bb-lead { font-size: 1.0625rem; line-height: 1.45; color: var(--text-2); max-width: 34ch; }
.bb-h2 { margin: 0 0 6px; font-size: clamp(1.5rem, 4vw + 0.6rem, 2rem); font-weight: 700; }
.bb-kicker {
  font: 700 12px/1.2 var(--font-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coffee);
}
.bb-badge-test {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  padding: 3px 7px 2px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font: 700 11px/1.2 var(--font-ui);
  letter-spacing: 0.12em;
}

/* ---- buttons ---------------------------------------------------------------- */

.bb-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 22px;
  border: 0;
  border-radius: 10px;
  font: 700 15px/1.15 var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.2s ease;
}
.bb-btn--primary { background: var(--primary); color: var(--on-primary); box-shadow: 4px 4px 0 var(--text); }
.bb-btn--primary:hover { background: var(--primary-hover); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--text); }
.bb-btn--primary:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--text); }
.bb-btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.bb-btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--text); }
.bb-btn--small { min-height: 44px; padding: 10px 16px; font-size: 13px; }
.bb-btn--block { width: 100%; }
.bb-btn[disabled], .bb-btn[aria-disabled="true"] { cursor: not-allowed; opacity: 0.55; transform: none; }
.bb-btn--primary[disabled] { box-shadow: 4px 4px 0 var(--border-strong); }
.bb-btn .bb-spinner { display: none; }
.bb-btn.is-busy .bb-spinner { display: inline-block; }

.bb-linkbtn {
  appearance: none;
  border: 0;
  background: none;
  padding: 6px 2px;
  font: 600 14px/1.3 var(--font-ui);
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.bb-linkbtn[disabled] { color: var(--muted); text-decoration: none; cursor: default; }

.bb-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: bb-spin 0.7s linear infinite;
  flex: none;
}
@keyframes bb-spin { to { transform: rotate(360deg); } }

/* ---- form fields ------------------------------------------------------------ */

.bb-field { margin-top: 14px; }
.bb-label {
  display: block;
  margin-bottom: 6px;
  font: 600 14px/1.3 var(--font-ui);
  color: var(--text);
}
.bb-label .bb-opt { font-weight: 400; color: var(--muted); }
.bb-input,
.bb-textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: 400 16px/1.3 var(--font-ui);
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bb-textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
.bb-input::placeholder, .bb-textarea::placeholder { color: var(--muted); opacity: 0.8; }
.bb-input:focus, .bb-textarea:focus { outline: none; border-color: var(--caramel); box-shadow: var(--focus); }
.bb-input[aria-invalid="true"], .bb-textarea[aria-invalid="true"] { border-color: var(--error); }
.bb-hint { margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--muted); }
/* a hint the buyer needs to read (what "I'll send it myself" gets them) */
.bb-hint--strong { margin-top: 8px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.bb-error { margin-top: 6px; font-size: 13.5px; line-height: 1.4; font-weight: 600; color: var(--error); }
.bb-error:empty { display: none; }
.bb-counter { float: right; font: 500 12px/1.9 var(--font-ui); color: var(--muted); font-variant-numeric: tabular-nums; }
.bb-counter.is-over { color: var(--error); }
.bb-pair { display: grid; gap: 0 12px; }
@media (min-width: 560px) { .bb-pair { grid-template-columns: 1fr 1fr; } }

.bb-money { position: relative; }
.bb-money::before {
  content: '$';
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font: 700 17px/1 var(--font-display);
  color: var(--text-2);
  pointer-events: none;
}
.bb-money .bb-input { padding-left: 30px; font: 700 18px/1.2 var(--font-display); letter-spacing: -0.01em; }

.bb-alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
}
.bb-alert--error { background: var(--error-bg); color: var(--error); font-weight: 600; }
.bb-alert--info { background: var(--surface-2); color: var(--text-2); }
.bb-alert:empty { display: none; }

/* ---- buy page ---------------------------------------------------------------- */

.bb-buy { display: grid; gap: 14px; }
.bb-hero { text-align: left; }
.bb-preview { display: flex; justify-content: center; padding: 10px 0 4px; }
.bb-preview .holo-card { width: min(62vw, 280px); }
.bb-form { min-width: 0; }

@media (min-width: 900px) {
  .bb-buy { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 56px; align-items: start; padding-top: 18px; }
  .bb-aside { position: sticky; top: 20px; }
  .bb-preview { justify-content: flex-start; padding: 22px 0 0; }
  .bb-preview .holo-card { width: min(100%, 360px); }
}

.bb-step { padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--border); }
.bb-step:first-of-type { padding-top: 6px; margin-top: 0; border-top: 0; }
.bb-step__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font: 700 1.125rem/1.2 var(--font-display);
  letter-spacing: -0.01em;
}
.bb-step__num {
  --cut: 6px;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  font: 700 13px/1 var(--font-display);
  background: var(--text);
  color: var(--bg);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

/* design picker: four small cards in a row (2x2 would cost ~250px of phone) */
.bb-designs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bb-design {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
  border-radius: 10px;
}
.bb-design:focus-visible { outline: none; }
.bb-design__frame {
  position: relative;
  display: block;
  padding: 3px;
  border-radius: 9px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.bb-design:hover .bb-design__frame { transform: translateY(-2px); }
.bb-design[aria-pressed="true"] .bb-design__frame { box-shadow: 0 0 0 2.5px var(--text), 4px 4px 0 2.5px var(--primary); }
.bb-design:focus-visible .bb-design__frame { box-shadow: 0 0 0 2.5px var(--caramel), var(--focus); }
.bb-design__check {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 22px;
  height: 22px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #1C1C1C;
  box-shadow: 0 0 0 2px var(--text);
  z-index: 2;
}
.bb-design__check svg { width: 13px; height: 13px; }
.bb-design[aria-pressed="true"] .bb-design__check { display: grid; }
.bb-design__name {
  display: block;
  margin-top: 7px;
  font: 600 11.5px/1.2 var(--font-ui);
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
}
.bb-design[aria-pressed="true"] .bb-design__name { color: var(--text); }
@media (min-width: 560px) { .bb-design__name { font-size: 12.5px; } }

/* amount chips (radios) */
.bb-amounts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; border: 0; margin: 0; padding: 0; }
.bb-chip { position: relative; display: block; }
.bb-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.bb-chip span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  font: 700 17px/1 var(--font-display);
  letter-spacing: -0.01em;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.bb-chip--custom span { font: 700 11.5px/1 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; }
/* "CUSTOM" is about 55px wide; below 375px five chips leave less than that
   inside the borders (0.4px to spare at 360px), so tighten the label, and
   below 360px the gap too. */
@media (max-width: 374px) {
  .bb-chip--custom span { font-size: 10px; letter-spacing: 0.02em; }
}
@media (max-width: 359px) {
  .bb-amounts { gap: 6px; }
}
.bb-chip input:hover + span { border-color: var(--text); }
.bb-chip input:checked + span { background: var(--primary); color: #1C1C1C; border-color: var(--text); box-shadow: 3px 3px 0 var(--text); }
.bb-chip input:focus-visible + span { box-shadow: var(--focus); border-color: var(--caramel); }
.bb-chip input:checked:focus-visible + span { box-shadow: 3px 3px 0 var(--text), var(--focus); }

/* segmented control (radios) */
.bb-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
}
.bb-seg label { position: relative; display: block; }
.bb-seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.bb-seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 8px;
  font: 600 14px/1.2 var(--font-ui);
  text-align: center;
  color: var(--text-2);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.bb-seg input:checked + span { background: var(--text); color: var(--bg); }
.bb-seg input:focus-visible + span { box-shadow: var(--focus); }

/* "When should it arrive?": Send now, or a date + time + zone */
.bb-when { min-width: 0; margin: 20px 0 0; padding: 0; border: 0; }
.bb-when > legend { padding: 0; }
.bb-when__pick { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 10px; margin-top: 12px; }
.bb-when__pick .bb-field { margin-top: 0; min-width: 0; }
/* iOS centres a date's text and collapses an empty one; keep it a normal field.
   iOS also gives the native date control its own minimum width and padding, which
   pushed it past its column and under the Time box; appearance:none + min-width:0
   let it shrink, and the fixed height matches the Time select. */
.bb-date { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; height: 48px; text-align: left; }
.bb-date::-webkit-date-and-time-value { text-align: left; margin: 0; min-height: 1.3em; }
.bb-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236E655D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}
.bb-tz { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 8px; font-size: 13.5px; color: var(--text-2); }
.bb-tz strong { font-weight: 600; color: var(--text); }
.bb-tz .bb-linkbtn { padding: 4px 2px; font-size: 13.5px; }
.bb-tz__select { margin-top: 8px; }

/* the scheduled moment, said back: a chamfered yellow date tag + one sentence
   (the buy page before paying, the gift page after) */
.bb-ticket {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  padding: 12px 14px 12px 12px;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
}
.bb-ticket__shadow { display: block; filter: drop-shadow(3px 3px 0 var(--text)); }
.bb-ticket__date {
  --cut: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  width: 58px;
  height: 62px;
  background: var(--primary);
  color: #1C1C1C;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.bb-ticket__mon { font: 700 11px/1 var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; }
.bb-ticket__day { margin-top: 3px; font: 700 26px/1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.bb-ticket__text { font-size: 14.5px; line-height: 1.45; color: var(--text-2); overflow-wrap: anywhere; }
.bb-ticket__text strong { font-weight: 600; color: var(--text); }
.bb-ticket__sub { margin-top: 4px; font-size: 13px; line-height: 1.4; color: var(--muted); }

.bb-pay { min-height: 0; }
.bb-pay__loading { display: flex; align-items: center; gap: 10px; min-height: 96px; font-size: 14px; color: var(--muted); }
.bb-buybox { margin-top: 20px; }
.bb-fine { margin-top: 12px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.bb-alt { margin-top: 18px; font-size: 14px; color: var(--text-2); }

/* ---- gift + redeem pages: centred column ------------------------------------- */

.bb-center { max-width: 560px; margin: 0 auto; text-align: center; }
.bb-center .bb-lead { margin: 0 auto; }
.bb-cardwrap { width: min(66vw, 290px); margin: 14px auto 0; position: relative; }
@media (min-width: 700px) { .bb-cardwrap { width: 320px; } }

.bb-state { padding: 28px 0 8px; }
.bb-state .bb-h2 { margin-bottom: 8px; }
.bb-state p + p { margin-top: 8px; }
.bb-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }
.bb-loading { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; color: var(--text-2); }

.bb-panel {
  margin-top: 22px;
  padding: 18px;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
}
.bb-panel > * + * { margin-top: 14px; }
.bb-panel__title { margin: 0; font: 700 1.0625rem/1.25 var(--font-display); letter-spacing: -0.01em; }

.bb-copy { display: flex; gap: 8px; }
.bb-copy .bb-input { min-width: 0; flex: 1; font-size: 15px; background: var(--surface-2); }
.bb-copy .bb-btn { flex: none; min-height: 48px; box-shadow: 3px 3px 0 var(--text); }

.bb-code {
  --cut: 10px;
  display: block;
  padding: 12px 10px;
  text-align: center;
  font: 700 clamp(1.4rem, 6.4vw, 1.9rem)/1 var(--font-display);
  letter-spacing: 0.08em;
  color: var(--text);
  background: var(--surface-2);
  border: 1.5px dashed var(--border-strong);
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
  user-select: all;
}
.bb-meta { font-size: 14px; line-height: 1.5; color: var(--text-2); }
.bb-meta strong { color: var(--text); }
.bb-rowlinks { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }

.bb-quote {
  position: relative;
  margin: 16px auto 0;
  max-width: 30em;
  padding: 2px 0 0 18px;
  text-align: left;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--text-2);
  border-left: 3px solid var(--caramel);
  overflow-wrap: anywhere;
}
.bb-quote cite { display: block; margin-top: 6px; font-style: normal; font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---- redeem -------------------------------------------------------------- */

.bb-reveal { transform-origin: 50% 60%; }
.bb-reveal.is-in { animation: bb-reveal 1s cubic-bezier(0.18, 0.9, 0.22, 1.12) both; }
@keyframes bb-reveal {
  0% { opacity: 0; transform: perspective(1000px) translateY(40px) rotateY(-95deg) scale(0.72); }
  45% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
.bb-rise { animation: bb-rise 0.6s 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes bb-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* the claim panel: the one dark object with a hard yellow shadow, like the
   homepage signup card */
.bb-claim {
  margin: 24px 6px 0 0;
  padding: 20px 18px 18px;
  text-align: left;
  color: var(--ink-panel-text);
  background: var(--ink-panel);
  border: 1px solid #000;
  border-radius: 16px;
  box-shadow: 8px 8px 0 var(--primary);
}
@media (prefers-color-scheme: dark) { .bb-claim { border-color: var(--border-strong); } }
.bb-claim h2 { margin: 0 0 6px; font-size: 1.375rem; color: var(--ink-panel-text); }
.bb-claim p { color: var(--ink-panel-muted); font-size: 14.5px; line-height: 1.45; }
.bb-claim .bb-label { color: var(--ink-panel-text); }
.bb-claim .bb-input {
  background: var(--ink-panel-field);
  border-color: var(--ink-panel-border);
  color: var(--ink-panel-text);
}
.bb-claim .bb-input::placeholder { color: rgba(255, 248, 231, 0.45); }
.bb-claim .bb-error { color: #FF9F8A; }
.bb-claim .bb-hint { color: var(--ink-panel-muted); }
.bb-claim a:not(.bb-btn), .bb-claim .bb-linkbtn { color: #7FDDEE; }
.bb-claim .bb-linkbtn[disabled] { color: rgba(255, 248, 231, 0.5); }
.bb-claim .bb-btn--primary { box-shadow: 4px 4px 0 #FFF8E7; }
.bb-claim .bb-btn--primary:hover { box-shadow: 5px 5px 0 #FFF8E7; }
.bb-claim .bb-btn--primary:active { box-shadow: 1px 1px 0 #FFF8E7; }
.bb-claim .bb-btn--primary[disabled] { box-shadow: 4px 4px 0 rgba(255, 248, 231, 0.3); }
.bb-claim .bb-btn { margin-top: 14px; }
.bb-claim .bb-alert--error { background: rgba(255, 120, 95, 0.14); color: #FFB4A3; }
.bb-claim .bb-alert--info { background: rgba(255, 248, 231, 0.08); color: var(--ink-panel-text); }

.bb-otp {
  text-align: center;
  font: 700 28px/1 var(--font-display) !important;
  letter-spacing: 0.5em;
  padding-left: calc(14px + 0.5em) !important;
  font-variant-numeric: tabular-nums;
}
.bb-subrow { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; margin-top: 10px; }

.bb-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 248, 231, 0.07);
  border: 1px solid var(--ink-panel-border);
}
.bb-check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--primary); }
.bb-check label { font-size: 12.5px; line-height: 1.5; color: var(--ink-panel-text); }

/* claimed stamp, drawn over the card art */
.bb-stamp {
  --cut: 10px;
  position: absolute;
  left: 50%;
  top: 44%;
  z-index: 5;
  padding: 10px 18px 9px;
  font: 700 clamp(1.25rem, 6vw, 1.7rem)/1 var(--font-display);
  letter-spacing: 0.14em;
  color: #1C1C1C;
  background: var(--primary);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transform: translate(-50%, -50%) rotate(-9deg);
  pointer-events: none;
}
.bb-stamp-shadow { position: absolute; inset: 0; z-index: 5; pointer-events: none; filter: drop-shadow(4px 4px 0 #1C1C1C); }
.bb-stamp.is-in { animation: bb-stamp 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
@keyframes bb-stamp {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-24deg) scale(2.2); }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(-9deg) scale(1); }
}
.bb-burst { position: absolute; inset: -12%; z-index: 4; pointer-events: none; }
.bb-burst i {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 10px;
  height: 10px;
  background: var(--primary);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0;
  animation: bb-spark 0.9s ease-out both;
}
@keyframes bb-spark {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(0) scale(0.4); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(160deg) scale(1.15); }
}

.bb-how { list-style: none; margin: 20px 0 0; padding: 0; text-align: left; counter-reset: how; display: grid; gap: 10px; }
.bb-how li {
  counter-increment: how;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--text-2);
}
.bb-how li::before {
  content: counter(how);
  --cut: 6px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  font: 700 13px/1 var(--font-display);
  background: var(--primary);
  color: #1C1C1C;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

@media (prefers-reduced-motion: reduce) {
  .bb-reveal.is-in { animation: bb-fade 0.4s ease-out both; }
  .bb-rise { animation: bb-fade 0.3s ease-out both; }
  .bb-stamp.is-in { animation: none; }
  .bb-burst { display: none; }
  .bb-btn, .bb-chip span, .bb-seg span, .bb-design__frame { transition: none; }
  .bb-spinner { animation-duration: 1.6s; }
}
@keyframes bb-fade { from { opacity: 0; } to { opacity: 1; } }

/* claim panel: text inside the dark panel */
.bb-claim .bb-how li { color: var(--ink-panel-text); }

/* claimed screen: what's done vs the one thing left before ordering */
.bb-checklist { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.bb-checklist li {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  padding: 11px 14px 11px 46px;
  border-radius: 10px;
  border: 1px solid var(--ink-panel-border);
  background: rgba(255, 248, 231, 0.05);
  font-size: 14.5px;
  line-height: 1.4;
}
.bb-checklist strong { color: var(--ink-panel-text); font-weight: 600; }
.bb-checklist li > span:last-child {
  font: 600 11.5px/1.4 var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-panel-muted);
}
.bb-checklist li::before {
  --cut: 5px;
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.bb-checklist li.is-done::before {
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C1C1C' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.bb-checklist li.is-open { border-color: var(--primary); border-style: dashed; background: rgba(255, 214, 0, 0.06); }
.bb-checklist li.is-open::before { background: transparent; clip-path: none; border-radius: 4px; box-shadow: inset 0 0 0 2px var(--primary); }
.bb-checklist li.is-open > span:last-child { color: var(--primary); }
.bb-claim .bb-kicker { color: var(--primary); }
.bb-claim strong { color: var(--ink-panel-text); }
.bb-head { padding: 0 4px; }
