/* ==========================================================================
   Customer portal v3
   Mobile-first. Brand colour comes from admin branding via --brand.
   Generic class names (.card .row .radio .muted .countdown) are scoped away
   from #cancel-step-container because spin-wheel.js reuses those names.
   ========================================================================== */

:root {
  --brand: #1f304a;
  --ok: #047857;
  --bad: #c2412d;
  --warn: #b7791f;
  --bg: #f6f5f2;
  --surface: #ffffff;
  --ink: #16181d;
  --ink-2: #4a4f59;
  --ink-3: #5f646d; /* 5.6:1 on --bg, 6:1 on white (AA) */
  --line: #e6e3dd;
  --line-2: #f0eee9;
  --soft: color-mix(in srgb, var(--brand) 8%, #fff);
  --soft-2: color-mix(in srgb, var(--brand) 14%, #fff);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 22, 28, .04), 0 4px 16px rgba(20, 22, 28, .05);
  --shadow-lg: 0 12px 40px rgba(20, 22, 28, .18);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tap: 44px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html.sheet-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 750; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { flex: none; }

.muted:where(:not(#cancel-step-container *)) { color: var(--ink-3); }
.small { font-size: 13px; }
.fine { font-size: 12.5px; color: var(--ink-3); }
.center { text-align: center; }
.center-block { display: block; margin: 8px auto 0; }
.cap { text-transform: capitalize; }
.right { text-align: right; }
.ok { color: var(--ok); }
.stack { display: grid; gap: 12px; }
.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: inline; } }

/* ── Chrome ───────────────────────────────────────────────────────────── */
.preview-bar { background: #fff4d6; color: #6b4b00; font-size: 13px; padding: 8px 16px; text-align: center; display: flex; gap: 6px; justify-content: center; align-items: center; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner { max-width: 1080px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.brand { text-decoration: none; display: flex; align-items: center; }
.brand-logo { max-height: 30px; width: auto; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.topbar-nav { display: flex; gap: 4px; }
.topbar-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: 14px; font-weight: 550; }
.topbar-link:hover { background: var(--line-2); color: var(--ink); }

.page { padding: 16px 0 64px; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.page-head { margin: 8px 0 20px; }
.eyebrow { font-size: 12.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); display: inline-flex; gap: 6px; align-items: center; }
.section-title { margin: 28px 0 12px; font-size: 15px; color: var(--ink-2); }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--ink-3); text-decoration: none; margin: 0 0 12px; min-height: var(--tap); }
.back-link:hover { color: var(--ink); }

.layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.col-main, .col-side { display: grid; gap: 16px; align-content: start; min-width: 0; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .layout { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 20px; } }

/* ── Cards ────────────────────────────────────────────────────────────── */
.card:where(:not(#cancel-step-container *)) {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.card:where(:not(#cancel-step-container *)) > h2 { margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.empty { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 36px 20px; color: var(--ink-2); }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 10px 18px; border-radius: 999px;
  border: 1px solid transparent; font-weight: 650; font-size: 15px; line-height: 1.2;
  text-decoration: none; transition: background .15s, transform .05s, opacity .15s; white-space: nowrap;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn-soft { background: var(--soft); color: var(--brand); }
.btn-soft:hover:not(:disabled) { background: var(--soft-2); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { background: var(--line-2); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--bad) 88%, #000); }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn-soft.is-busy::after, .btn-ghost.is-busy::after { border-color: color-mix(in srgb, var(--brand) 30%, transparent); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.link-btn { background: none; border: 0; padding: 4px 2px; min-height: var(--tap); color: var(--brand); font-weight: 600; font-size: 14px; display: inline-flex; gap: 4px; align-items: center; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.link-btn:hover { text-decoration-color: currentColor; }
/* Inline links in running text keep a 44px hit area without breaking line height. */
.callout .link-btn, p .link-btn { display: inline; min-height: 0; padding: 12px 2px; margin: -12px 0; }
.link-muted { color: var(--ink-3); font-weight: 500; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; display: inline-grid; place-items: center; color: var(--ink-3); }
.icon-btn:hover { background: var(--line-2); color: var(--ink); }

/* ── Pills, chips, segmented ──────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.pill-ok { background: #e3f5ec; color: #0b6b49; }
.pill-warn { background: #fdf1d8; color: #8a5a00; }
.pill-bad { background: #fde7e3; color: #a3301e; }
.pill-muted { background: var(--line-2); color: var(--ink-3); }
.pill-brand { background: var(--soft-2); color: var(--brand); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip { min-height: var(--tap); padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; color: var(--ink-2); }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-on, .chip[aria-checked="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--line-2); border-radius: 999px; padding: 4px; }
.seg-btn { min-height: var(--tap); border: 0; border-radius: 999px; background: transparent; font-weight: 600; font-size: 14px; color: var(--ink-2); padding: 6px 8px; }
.seg-btn.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.seg-sm .seg-btn { min-height: 36px; font-size: 13px; }

/* ── Notices & banners ────────────────────────────────────────────────── */
.notice { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin: 0 0 16px; }
.notice-bad { background: #fde7e3; color: #8f2a1a; }
.notice-info { background: var(--soft); color: var(--brand); }
.banner { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius); margin: 0 0 16px; border: 1px solid; }
.banner-body { display: grid; gap: 2px; font-size: 14px; }
.banner .btn { grid-column: 1 / -1; }
@media (min-width: 640px) { .banner { grid-template-columns: auto 1fr auto; } .banner .btn { grid-column: auto; } }
.banner-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.6); }
.banner-warn { background: #fff8e8; border-color: #f2dca8; color: #6b4600; }
.banner-bad { background: #fff0ed; border-color: #f5c6bd; color: #842617; }
.announce { display: flex; gap: 8px; align-items: center; justify-content: center; text-align: center; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 550; margin: 0 0 12px; }
.announce-x { background: none; border: 0; color: inherit; opacity: .7; padding: 4px; display: grid; }
.callout { display: flex; gap: 8px; align-items: flex-start; background: var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; color: var(--ink-2); margin: 12px 0; }
.callout .ic, .callout svg { margin-top: 2px; flex: none; }
.callout-brand { background: var(--soft); }
.callout-tip { background: #fff8e8; color: #5c4400; }
.callout-ok { background: #e3f5ec; color: #0b5a3e; }
.callout-ok .ic, .callout-ok svg { color: var(--ok); }
.banner-status { display: flex; gap: 6px; align-items: center; font-weight: 600; }

/* ── Hub cards ────────────────────────────────────────────────────────── */
.container-narrow { max-width: 720px; }
.sub-card:where(:not(#cancel-step-container *)) { padding: 0; display: grid; transition: border-color .15s; }
.sub-card:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.sub-card-link { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; text-decoration: none; padding: 18px; border-radius: var(--radius); }
.sub-card-thumbs { display: flex; align-self: start; }
.sub-card-thumbs img, .thumb-ph { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--line-2); border: 2px solid var(--surface); display: grid; place-items: center; color: var(--ink-3); }
.sub-card-thumbs > * + * { margin-left: -18px; }
.sub-card-body { min-width: 0; display: grid; gap: 4px; }
.sub-card-top { display: flex; gap: 6px 8px; align-items: center; flex-wrap: wrap; }
.sub-card-title { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.sub-card-meta { font-size: 14px; }
.sub-card-total { font-weight: 700; color: var(--ink); font-size: 14.5px; }
.sub-card-chev { color: var(--ink-3); display: grid; }
.sub-card-foot { display: flex; gap: 12px; align-items: center; padding: 0 18px 16px 84px; margin-top: -4px; }
@media (max-width: 480px) { .sub-card-foot { padding-left: 18px; } }
.sub-card-ended .sub-card-thumbs { opacity: .75; }
.signed-in { margin-top: 32px; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero:where(:not(#cancel-step-container *)) { padding: 22px 20px; background: linear-gradient(180deg, var(--soft) 0%, var(--surface) 70%); }
.hero-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.hero-date { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.hero-pre { display: block; font-size: 14px; font-weight: 600; color: var(--ink-2); letter-spacing: 0; margin-bottom: 2px; }
.hero-sub { color: var(--ink-2); margin-top: 6px; font-size: 14.5px; }
.hero-amount { margin-top: 4px; font-size: 14.5px; color: var(--ink-2); }
.hero-amount strong { color: var(--ink); font-size: 16px; }
.hero-offer { display: flex; gap: 8px; align-items: center; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: #e3f5ec; color: #0b5a3e; font-size: 14px; }
.hero { scroll-margin-top: 72px; }
.hero.is-highlight { box-shadow: 0 0 0 3px var(--soft-2), var(--shadow); }
.hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.hero-actions .btn-primary { grid-column: 1 / -1; }
@media (min-width: 560px) { .hero-actions { display: flex; flex-wrap: wrap; } .hero-actions .btn-primary { grid-column: auto; } }
.hero-upcoming { margin-top: 12px; }
.hero-paused { background: linear-gradient(180deg, #fff8e8 0%, var(--surface) 70%); }
.hero-winback { background: linear-gradient(180deg, var(--soft-2) 0%, var(--surface) 75%); }
.hero-winback .hero-date, .hero-paused .hero-date { font-size: 24px; }

/* ── Supply check ─────────────────────────────────────────────────────── */
.supply-head { margin-bottom: 12px; display: grid; gap: 2px; }
.supply-panel { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); display: grid; gap: 4px; animation: rise .2s ease-out; }
.supply-ok { display: flex; gap: 8px; align-items: center; color: var(--ok); font-weight: 600; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ── Upsell ───────────────────────────────────────────────────────────── */
.upsell { position: relative; display: grid; gap: 10px; border-color: color-mix(in srgb, var(--brand) 30%, var(--line)) !important; }
.upsell-x { position: absolute; top: 10px; right: 10px; }
.upsell .pill { justify-self: start; }
.upsell h3 { font-size: 18px; padding-right: 32px; }
.compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.compare-box { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--line-2); }
.compare-to { background: var(--soft-2); color: var(--brand); }
.compare-arrow { color: var(--ink-3); }
.countdown:where(:not(#cancel-step-container *)) { display: flex; gap: 6px; align-items: center; color: var(--bad); font-weight: 600; }

/* ── Journey (compact rows, expand on tap) ───────────────────────────── */
.journey:where(:not(#cancel-step-container *)) { padding: 6px 20px; }
.jrow + .jrow { border-top: 1px solid var(--line-2); }
.jrow > summary { list-style: none; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 0; cursor: pointer; min-height: var(--tap); }
.jrow > summary::-webkit-details-marker { display: none; }
.jrow-main { display: grid; gap: 4px; min-width: 0; }
.jrow-title { font-weight: 700; font-size: 15px; }
.jrow-meta { color: var(--ink-2); }
.jrow-chev { color: var(--ink-3); transition: transform .15s; display: grid; }
.jrow[open] .jrow-chev { transform: rotate(90deg); }
.jrow-body { padding: 4px 0 14px; display: grid; gap: 12px; }
.progress { display: block; height: 6px; background: var(--line-2); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.progress span { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .6s ease; }
.jsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.jstep { display: grid; grid-template-columns: 22px 1fr; gap: 12px; position: relative; padding-bottom: 14px; }
.jstep:not(:last-child)::before { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.jstep-done:not(:last-child)::before { background: var(--brand); }
.jdot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; color: #fff; }
.jstep-done .jdot { background: var(--brand); border-color: var(--brand); }
.jstep-current .jdot { border-color: var(--brand); box-shadow: 0 0 0 4px var(--soft-2); }
.jday { font-size: 12px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.jtitle { font-weight: 650; }
.jstep-upcoming .jtitle { color: var(--ink-2); font-weight: 550; }
.jbody { font-size: 14px; color: var(--ink-2); margin-top: 4px; }

/* ── Manage group ─────────────────────────────────────────────────────── */
.manage:where(:not(#cancel-step-container *)) { padding: 16px 20px 10px; }
.manage h2 { margin-bottom: 6px !important; }
.row-cancel .row-val { color: var(--ink); }
.row-cancel .row-ic { background: var(--line-2); color: var(--ink-2); }

/* ── Welcome back ─────────────────────────────────────────────────────── */
.welcome { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)) !important; background: linear-gradient(180deg, #effaf4, var(--surface) 80%) !important; }
.welcome-head { display: flex; gap: 12px; align-items: flex-start; }
.welcome-ic { width: 40px; height: 40px; border-radius: 50%; background: #e3f5ec; color: var(--ok); display: grid; place-items: center; flex: none; }

/* ── Line items ───────────────────────────────────────────────────────── */
.lines { list-style: none; margin: 0; padding: 0; display: grid; }
.line { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line-2); }
.line:first-child { border-top: 0; padding-top: 0; }
.line-img { width: 64px; height: 64px; border-radius: 12px; background: var(--line-2); overflow: hidden; display: grid; place-items: center; color: var(--ink-3); }
.line-img img { width: 100%; height: 100%; object-fit: cover; }
.line-soldout .line-img { opacity: .55; }
.line-soldout .line-title { color: var(--ink-2); }
.line-main { min-width: 0; display: grid; gap: 2px; }
.line-title { font-weight: 650; }
.line-variant { font-size: 14px; color: var(--ink-3); }
.line-price { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 14px; }
.line-qty { font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--line-2); border-radius: 6px; padding: 1px 7px; }
.line-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; height: var(--tap); }
.stepper-btn { width: 42px; height: 42px; border: 0; background: none; display: grid; place-items: center; color: var(--ink-2); border-radius: 999px; font-size: 18px; }
.stepper-btn:hover:not(:disabled) { background: var(--line-2); }
.stepper-btn:disabled { opacity: .35; }
.stepper-val { min-width: 24px; text-align: center; font-weight: 650; }

.summary { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line-2); display: grid; gap: 6px; font-size: 14px; }
.summary div { display: flex; justify-content: space-between; }
.summary dt { color: var(--ink-2); }
.summary dd { margin: 0; font-weight: 600; }
.summary .ok dt, .summary .ok dd { color: var(--ok); }
.summary .total { font-size: 16px; padding-top: 6px; border-top: 1px dashed var(--line); margin-top: 4px; }
.summary .total dt { color: var(--ink); font-weight: 700; }
.summary .regular { color: var(--ink-2); }
.summary .regular dd { font-weight: 650; }
.dt-sub { font-weight: 500; color: var(--ink-3); font-size: 13px; margin-left: 4px; }
.dt-note { display: block; font-weight: 500; color: var(--ink-3); font-size: 12.5px; }
.summary-tight { margin-top: 8px; }
.discount { display: flex; gap: 8px; margin-top: 14px; }
.discount input { flex: 1; min-width: 0; }

/* ── Value panel ──────────────────────────────────────────────────────── */
.value h2 .ic { color: var(--bad); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--line-2); border-radius: var(--radius-sm); padding: 12px 10px; display: grid; gap: 2px; text-align: center; }
.stat strong { font-size: 17px; letter-spacing: -.01em; }
.stat span { font-size: 12px; color: var(--ink-3); line-height: 1.3; }
.perks { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; font-size: 14px; }
.perks li { display: flex; gap: 8px; align-items: flex-start; }
.perks .ic { color: var(--ok); margin-top: 3px; }

/* ── Settings rows ────────────────────────────────────────────────────── */
.rows { list-style: none; margin: 0 -8px; padding: 0; display: grid; }
.row:where(:not(#cancel-step-container *)) { width: 100%; display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 12px 8px; border: 0; background: none; border-radius: var(--radius-sm); color: var(--ink); }
.row:where(:not(#cancel-step-container *)):hover { background: var(--line-2); }
.row:where(:not(#cancel-step-container *)) > .ic { color: var(--ink-3); }
.row-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--soft); color: var(--brand); display: grid; place-items: center; }
.row-main { display: grid; gap: 1px; min-width: 0; }
.row-label { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.row-main > .row-val + .row-label { font-weight: 500; }
.row-val { font-size: 14.5px; font-weight: 550; overflow-wrap: anywhere; }

.orders { list-style: none; margin: 0; padding: 0; display: grid; }
.order { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.order:first-child { border-top: 0; padding-top: 0; }
.order > div { display: grid; gap: 1px; }
.orders + .btn { margin-top: 10px; }


/* ── Recommendations ──────────────────────────────────────────────────── */
.reco h2 { margin-bottom: 12px; }
.reco-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(140px, 180px); gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.reco-card { display: grid; gap: 6px; align-content: start; scroll-snap-align: start; }
.reco-card .btn { justify-self: start; }
.reco-card .p-img { aspect-ratio: auto; height: 120px; }
.reco-card .p-img img { object-fit: cover; }

/* ── Forms ────────────────────────────────────────────────────────────── */
.field { display: grid; gap: 6px; margin: 12px 0 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field-err { font-size: 13px; color: var(--bad); font-weight: 550; }
.has-error input, .has-error select, [aria-invalid="true"] { border-color: var(--bad) !important; }
.hint { color: var(--ink-2); min-height: 1.5em; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235f646d' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px !important; }
input:not([type="radio"]):not([type="checkbox"]), select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--soft-2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 420px) { .form-grid { grid-template-columns: 1fr; } }
.radios { display: grid; gap: 8px; margin: 12px 0; }
.radio:where(:not(#cancel-step-container *)) { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; min-height: var(--tap); }
.radio:where(:not(#cancel-step-container *)):has(input:checked) { border-color: var(--brand); background: var(--soft); }
.radio input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; flex: none; }
.radio-main { display: grid; gap: 1px; }
.radio-sub { font-size: 13px; color: var(--ink-3); }

/* ── Sheets (dialog) ──────────────────────────────────────────────────── */
dialog.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 100%;
  max-height: 92vh; max-height: 92dvh; border-radius: 22px 22px 0 0; background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
dialog.sheet[open] { animation: sheet-up .25s cubic-bezier(.2,.8,.2,1); display: flex; }
dialog.sheet::backdrop { background: rgba(16, 18, 24, .45); backdrop-filter: blur(2px); animation: fade .2s ease-out; }
@media (min-width: 640px) {
  dialog.sheet { margin: auto; max-width: 480px; border-radius: 22px; max-height: 86vh; }
  dialog.sheet[open] { animation: pop .2s ease-out; }
  dialog.sheet-lg { max-width: 600px; }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet-inner { display: flex; flex-direction: column; width: 100%; max-height: inherit; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 4px 20px; flex: none; }
.sheet-head::before { content: ""; position: absolute; left: 50%; top: 8px; width: 36px; height: 4px; border-radius: 4px; background: var(--line); transform: translateX(-50%); }
@media (min-width: 640px) { .sheet-head::before { display: none; } }
.sheet-body { padding: 8px 20px calc(20px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }
.sheet-body > p { color: var(--ink-2); margin-bottom: 4px; }
.sheet-actions { display: grid; gap: 8px; margin-top: 18px; }
.sheet-head h2:focus { outline: none; }
.sheet-body .fine { margin-top: 10px; }

/* ── Product picker ───────────────────────────────────────────────────── */
.search { margin-top: 4px; }
.p-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
@media (min-width: 520px) { .p-grid { grid-template-columns: repeat(3, 1fr); } }
.p-card { display: grid; gap: 6px; align-content: start; text-align: left; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.p-card:hover { border-color: var(--brand); }
.p-img { aspect-ratio: 1; width: 100%; border-radius: 10px; background: var(--line-2); overflow: hidden; display: grid; place-items: center; color: var(--ink-3); }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img-lg { width: 84px; flex: none; }
.p-title { font-weight: 600; font-size: 14px; line-height: 1.3; }
.p-price { font-size: 13px; color: var(--ink-2); }
.p-price s, .v-price s, .p-detail-price s { color: var(--ink-3); font-weight: 500; margin-left: 2px; }
.p-detail-main { display: grid; gap: 4px; }
.p-detail-price { font-size: 15px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.p-price strong { color: var(--ink); }
.p-sub { display: block; font-size: 12px; font-weight: 600; color: var(--ok); }
.p-once { font-weight: 600; color: var(--ink-2); }
.p-once-note { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 6px; }
.p-price-note { flex-basis: 100%; font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }
.p-grid-note { grid-column: 1 / -1; }
.p-detail { display: flex; gap: 14px; align-items: center; margin: 10px 0 14px; }
.variants { display: grid; gap: 8px; margin-bottom: 14px; }
.variant { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-height: var(--tap); }
.variant img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.variant:not(:has(img)) { grid-template-columns: 1fr auto; }
.variant.is-on { border-color: var(--brand); background: var(--soft); box-shadow: inset 0 0 0 1px var(--brand); }
.variant:disabled { opacity: .45; }
.v-title { font-weight: 600; font-size: 14px; }
.v-price { font-size: 13px; color: var(--ink-2); }
.p-foot { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 14px; position: sticky; bottom: -20px; background: var(--surface); padding: 12px 0 4px; }
.p-foot .btn { flex: 1; }
.skeleton-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.skeleton-grid span { aspect-ratio: 1.1; border-radius: 12px; background: linear-gradient(90deg, var(--line-2), #fafaf8, var(--line-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Toasts ───────────────────────────────────────────────────────────── */
.toast-region { position: fixed; z-index: 1000; left: 0; right: 0; bottom: calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 8px; justify-items: center; pointer-events: none; padding: 0 16px; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: center; background: #1d2027; color: #fff; padding: 12px 12px 12px 14px; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 14px; max-width: 460px; animation: rise .2s ease-out; transition: opacity .3s, transform .3s; }
.toast button { background: none; border: 0; color: #fff; opacity: .6; display: grid; padding: 2px; }
.toast-ok .toast-ic { color: #6ee7b7; }
.toast-bad .toast-ic { color: #fca5a5; }
.toast-info .toast-ic { color: #fcd34d; }
.toast-out { opacity: 0; transform: translateY(6px); }

/* ── Auth ─────────────────────────────────────────────────────────────── */
.auth-body .page { padding: 0; }
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 500px at 50% -10%, var(--soft-2), transparent); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 32px 24px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.auth-logo { max-height: 36px; width: auto; }
.auth-wordmark { font-weight: 850; font-size: 22px; letter-spacing: -.02em; }
.auth-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #e3f5ec; color: var(--ok); }
.auth-card h1 { font-size: 24px; }
.auth-card .btn { margin-top: 8px; }
.tips { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; display: grid; gap: 4px; }

/* ==========================================================================
   Cancel flow
   ========================================================================== */
.sheet-cancel .sheet-head { padding-bottom: 0; }
.cf { min-height: 300px; }
.cf-progress { height: 4px; background: var(--line-2); border-radius: 4px; overflow: hidden; margin-bottom: 14px; }
.cf-progress span { display: block; height: 100%; background: var(--brand); transition: width .3s ease; }
.cf-back { background: none; border: 0; padding: 4px 0; min-height: var(--tap); color: var(--ink-3); font-size: 14px; display: inline-flex; align-items: center; gap: 2px; margin-bottom: 8px; }
.cf-back:hover { color: var(--ink); }
.cf-step { display: grid; gap: 12px; }
.cf-step h2 { font-size: 22px; font-weight: 780; letter-spacing: -.02em; outline: none; }
.cf-in { animation: cf-in .22s ease-out; }
.cf-in-back { animation: cf-in-back .22s ease-out; }
@keyframes cf-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@keyframes cf-in-back { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.cf-sub { color: var(--ink-2); }
.cf-note, .cf-chip-note { font-size: 14px; color: var(--ink-2); background: var(--line-2); padding: 8px 12px; border-radius: 10px; }
.cf-visual { border-radius: 14px; max-height: 180px; object-fit: cover; width: 100%; }
.cf-options { display: grid; gap: 8px; }
.cf-option { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 15px; font-weight: 550; }
.cf-option:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
.cf-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; flex: none; }
.cf-option.is-on { border-color: var(--brand); background: var(--soft); box-shadow: inset 0 0 0 1px var(--brand); }
.cf-option.is-on .cf-check { background: var(--brand); border-color: var(--brand); color: #fff; }
.cf-options-tight .cf-option { min-height: 44px; background: rgba(255,255,255,.7); }
.cf-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-body { display: grid; gap: 10px; color: var(--ink-2); font-size: 15px; }
.cf-tips { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.cf-tips li { position: relative; padding: 10px 12px 10px 36px; background: var(--line-2); border-radius: 10px; color: var(--ink); font-size: 14.5px; }
.cf-tips li::before { content: "→"; position: absolute; left: 13px; top: 9px; color: var(--brand); font-weight: 700; }
.cf-offer-h { margin-top: 4px; }
.cf-offer { position: relative; background: linear-gradient(135deg, var(--soft-2), var(--soft)); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); border-radius: 16px; padding: 18px; display: grid; gap: 8px; }
.cf-offer-tag { justify-self: start; font-size: 11.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; background: var(--brand); color: #fff; padding: 3px 9px; border-radius: 999px; }
.cf-offer-amount { font-size: 34px; font-weight: 850; letter-spacing: -.03em; color: var(--brand); line-height: 1; }
.cf-offer-body { color: var(--ink-2); }
/* Dollar savings for this subscriber (lib/offer-savings.js) */
.cf-savings, .offer-savings { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: #e3f5ec; color: #0b5a3e; }
.cf-savings-h, .offer-savings-h { font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.cf-savings-d, .offer-savings-d { font-size: 13px; color: #2c6a52; line-height: 1.35; }
.cf-offer > .cf-savings-d { margin-top: -2px; }
.offer-savings[hidden] { display: none; }
.cf-loss-panel { display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; background: #fff3ec; border: 1.5px solid #f2b79a; color: #7a2e12; }
.cf-loss-panel-h { font-size: 17px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; color: #9a3412; }
.cf-loss-panel p { font-size: 14px; line-height: 1.4; color: #7a2e12; margin: 0; }
.cf-loss-panel-once { font-weight: 650; }
.cf-opt-save { display: block; font-size: 12.5px; font-weight: 500; color: #2c6a52; margin-top: 2px; }
.hero-offer-save { font-weight: 700; }
.cf-extra { display: grid; gap: 10px; margin-top: 4px; }
.cf-alt-h { margin: 6px 0 -2px; font-size: 13px; font-weight: 650; color: var(--ink-2); }
.cf-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cf-compare-box { display: grid; gap: 2px; padding: 12px; border-radius: 12px; background: var(--line-2); }
.cf-compare-to { background: var(--soft-2); color: var(--brand); }
.cf-loss { background: #fff8f5; border: 1px solid #f6ddd5; border-radius: 14px; padding: 14px 16px; }
.cf-loss-h { font-weight: 700; margin-bottom: 6px; }
.cf-loss ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--ink-2); font-size: 14.5px; }
.cf-foot { display: grid; gap: 6px; margin-top: 8px; position: sticky; bottom: -20px; background: var(--surface); padding: 10px 0 4px; }
.cf-decline { background: none; border: 0; min-height: var(--tap); color: var(--ink-3); font-size: 14.5px; font-weight: 550; text-decoration: underline; text-underline-offset: 3px; }
.cf-decline:hover { color: var(--ink); }
.cf-result { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); color: var(--ink-3); margin: 12px auto 4px; }
.cf-result svg { width: 26px; height: 26px; }
.cf-result-ok { background: #e3f5ec; color: var(--ok); }
.cf-result ~ h2, .cf-result ~ .cf-sub { text-align: center; }
.cf-lines { display: grid; gap: 8px; }
.cf-line { display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cf-line img, .cf-line-ph { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--line-2); flex: none; }
#cancel-savings-bar { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── "Your progress" benefits timeline (journey v2) ───────────────────────
   One vertical rail through three sections: noticed (done) → now (current)
   → coming up (upcoming, dashed). Colours come from tokens only, so it
   follows --brand and stays legible if a dark palette is ever added. */
.jp:where(:not(#cancel-step-container *)) { padding: 18px 20px 16px; display: grid; gap: 14px; }
.jp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.jp-head h2 { margin-top: 4px; font-size: 18px; }
.jp-daybadge { flex: none; display: grid; justify-items: center; align-content: center; min-width: 56px; height: 56px; border-radius: 14px; background: var(--brand); color: #fff; line-height: 1; }
.jp-daybadge strong { font-size: 20px; font-weight: 800; }
.jp-daybadge span { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; opacity: .85; margin-top: 3px; }
.jp-track { display: grid; gap: 14px; }
.jp-sub { color: var(--ink-2); font-size: 14px; }
.jp-stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.jp-stats li { display: inline-flex; align-items: baseline; gap: 5px; background: var(--soft); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--ink-2); }
.jp-stats strong { color: var(--brand); font-size: 15px; font-weight: 750; }
.jp-ontrack { display: flex; gap: 10px; align-items: flex-start; background: var(--soft); border-left: 3px solid var(--brand); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; color: var(--ink); }
.jp-ontrack svg { color: var(--brand); flex: none; margin-top: 2px; }
.jp-timeline { display: grid; gap: 4px; }
.jsec { display: grid; gap: 8px; }
.jsec-h { font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); padding-left: 36px; margin-top: 6px; }
.jsec-now .jsec-h { color: var(--brand); }
.jtl { list-style: none; margin: 0; padding: 0; display: grid; }
.jtl-item { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding-bottom: 14px; }
/* Rail: drawn from every dot down to the next item, across sections. */
.jtl-item::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: -6px; width: 2px; background: var(--brand); }
.jtl-current::before, .jtl-upcoming::before { background: none; border-left: 2px dashed var(--line); width: 0; }
.jsec-next .jtl-item:last-child::before { display: none; }
.jtl-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; color: #fff; position: relative; z-index: 1; }
.jtl-done .jtl-dot { background: var(--brand); border-color: var(--brand); }
.jtl-current .jtl-dot { border-color: var(--brand); border-width: 6px; box-shadow: 0 0 0 4px var(--soft-2); }
.jtl-text { min-width: 0; }
.jtl-current .jtl-text { background: var(--soft); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: -4px; }
.jtl-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.jtl-day { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.jtl-when { font-size: 12px; font-weight: 650; color: var(--brand); background: var(--soft-2); border-radius: 999px; padding: 2px 8px; }
.jtl-title { margin: 2px 0 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.jtl-done .jtl-title { color: var(--ink-2); }
.jtl-body { font-size: 14px; color: var(--ink-2); margin-top: 3px; }
.jsec-older > summary { padding-left: 36px; font-size: 13px; color: var(--ink-3); cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.jsec-older[open] > summary { margin-bottom: 8px; }
.jsec-ongoing { display: flex; gap: 10px; align-items: flex-start; margin-left: 36px; font-size: 14px; color: var(--ink-2); background: var(--soft); border-radius: var(--radius-sm); padding: 10px 12px; }
.jsec-ongoing svg { color: var(--brand); flex: none; margin-top: 2px; }
.jp-disc { font-size: 11.5px; line-height: 1.45; color: var(--ink-3); border-top: 1px solid var(--line-2); padding-top: 10px; }
.jp-collapsible { border-top: 1px solid var(--line-2); }
.jp-collapsible > summary { list-style: none; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 0; cursor: pointer; min-height: var(--tap); }
.jp-collapsible > summary::-webkit-details-marker { display: none; }
.jp-collapsible[open] .jrow-chev { transform: rotate(90deg); }
.jp-sum-main { display: grid; gap: 2px; min-width: 0; }
.jp-sum-title { font-weight: 700; font-size: 15px; }
.jp-sum-meta { color: var(--ink-2); }
.jp-body { display: grid; gap: 14px; padding-bottom: 8px; }
.hero-ontrack { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 13.5px; color: var(--brand); font-weight: 550; }
.hero-ontrack svg { flex: none; }
.jmiss { display: flex; gap: 8px; align-items: flex-start; background: var(--soft); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; color: var(--ink-2); margin: 12px 0; }
.jmiss svg { color: var(--brand); flex: none; margin-top: 2px; }
.sub-card-progress { display: flex; gap: 6px; align-items: center; margin-top: 4px; font-size: 13px; color: var(--brand); font-weight: 550; }
.sub-card-progress svg { flex: none; }
@media (prefers-reduced-motion: reduce) { .jp-collapsible .jrow-chev { transition: none; } }
/* ── Portal builder blocks (views/portal/block-registry.js) ─────────────── */
.hero-actions-card .hero-actions { margin-top: 0; }
.pb-text h2, .pb-faq h2, .pb-image h2 { font-size: 17px; margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.pb-text:not(.card) { padding: 0 4px; }
.pb-rich { line-height: 1.55; color: var(--ink-2, #3b3f47); overflow-wrap: anywhere; }
.pb-rich > * + * { margin-top: 8px; }
.pb-rich h3 { font-size: 16px; margin: 12px 0 4px; color: var(--ink); }
.pb-rich h4 { font-size: 14px; margin: 10px 0 4px; color: var(--ink); }
.pb-rich ul, .pb-rich ol { padding-left: 20px; }
.pb-rich a { color: var(--brand); text-decoration: underline; }
.pb-image { padding: 0; overflow: hidden; }
.pb-image-img { display: block; width: 100%; max-height: 260px; object-fit: cover; background: var(--soft); }
.pb-image-body { padding: 18px; display: grid; gap: 10px; justify-items: start; }
.pb-image-body p { margin: 0; }
.pb-faq-item { border-top: 1px solid var(--line); }
.pb-faq-item:first-of-type { border-top: 0; }
.pb-faq-item summary { cursor: pointer; padding: 12px 0; font-weight: 600; min-height: var(--tap); display: flex; align-items: center; }
.pb-faq-item p { margin: 0 0 12px; }
.pb-divider { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.pb-spacer-sm { height: 4px; } .pb-spacer-md { height: 16px; } .pb-spacer-lg { height: 40px; }

/* Builder preview only (body.pb-frame inside the admin iframe) */
.pb-frame .pb-ribbon { position: sticky; top: 0; z-index: 50; background: #1f2937; color: #fff; font-weight: 600; letter-spacing: .01em; }
.pb-frame [data-block-id] { cursor: pointer; transition: outline-color .12s; outline: 2px solid transparent; outline-offset: 3px; }
.pb-frame [data-block-id].pb-hover { outline: 2px dashed color-mix(in srgb, #3b82f6 70%, transparent); }
.pb-frame [data-block-id].pb-selected { outline: 2px solid #3b82f6; }
.pb-frame .rows [data-block-id] { outline-offset: -2px; }

/* ── "Add another flavor" bundle builder ──────────────────────────────── */
.line-flavor-btn { margin-top: 8px; justify-self: start; }
.sheet-bundle .sheet-body { padding-bottom: 0; }
.bb-head { display: flex; gap: 12px; align-items: center; margin: 4px 0 12px; }
.bb-head-img { width: 56px; flex: none; }
.bb-head-main { display: grid; gap: 2px; }
.bb-head-sub { color: var(--ink-2); font-size: 14px; }
.bb-h { font-size: 13px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-3); margin: 14px 0 8px; }
.bb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 640px) { .bb-list { grid-template-columns: 1fr 1fr; } }
.bb-item { display: grid; grid-template-columns: 48px 1fr; grid-template-areas: "img main" "img step"; gap: 6px 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.bb-item.has-qty { border-color: var(--brand); background: var(--soft); box-shadow: inset 0 0 0 1px var(--brand); }
.bb-item.is-out { opacity: .6; }
.bb-img { grid-area: img; width: 48px; height: 48px; border-radius: 10px; overflow: hidden; background: var(--line-2); display: grid; place-items: center; color: var(--ink-3); align-self: start; }
.bb-img img { width: 100%; height: 100%; object-fit: cover; }
.bb-main { grid-area: main; display: grid; gap: 2px; min-width: 0; }
.bb-name { font-weight: 650; font-size: 14.5px; line-height: 1.25; }
.bb-price { font-size: 13px; color: var(--ink-2); }
.bb-price s { color: var(--ink-3); margin-left: 2px; }
.bb-serv { color: var(--ink-3); }
.bb-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.bb-stepper { grid-area: step; justify-self: start; height: 40px; background: var(--surface); }
.bb-stepper .stepper-btn { width: 40px; height: 38px; }
.bb-section { margin-top: 4px; }
.bb-freqs { margin: 0; }
.bb-freqs .radio.is-disabled { opacity: .55; cursor: not-allowed; }
.bb-freq-note { margin-top: 8px; }
.bb-freq-note.is-warn { color: var(--warn); font-weight: 600; }
.bb-error { margin: 0 0 8px; }
.bb-foot { position: sticky; bottom: 0; margin: 16px -20px 0; padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 16px rgba(20, 22, 28, .05); display: grid; gap: 10px; }
.bb-summary { display: grid; gap: 4px; font-size: 14px; }
.bb-row { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.bb-total strong { font-size: 17px; white-space: nowrap; }
.bb-total s { font-size: 13px; font-weight: 500; margin-left: 4px; }
.bb-extras { justify-content: flex-start; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.bb-ship { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.bb-ship.is-free { display: flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 600; }
.bb-fine { margin: 0; }
.bb-bar { display: block; height: 6px; border-radius: 6px; background: var(--line-2); overflow: hidden; }
.bb-bar > span { display: block; height: 100%; border-radius: 6px; background: var(--brand); transition: width .25s ease; }
@media (prefers-reduced-motion: reduce) { .bb-bar > span { transition: none; } }

/* Toasts live in the top layer (popover) so they sit above open sheets. */
.toast-region[popover] { inset: auto 0 calc(16px + env(safe-area-inset-bottom)) 0; margin: 0; border: 0; background: transparent; color: inherit; overflow: visible; width: auto; height: auto; max-width: none; max-height: none; }
.toast-region[popover]:not(:popover-open) { display: none; }
.toast-region[popover]:popover-open { display: grid; }
