/* PodcastHub Design Lab · Add-ons, plus and minus · five live options (B1, Rick, 2026-10-16)
   Tokens only; --local-* below are listed in the B1 report. Logical properties so RTL mirrors itself. */
:root {
  /* #0076DF under the --primary-on label (#FDFEFE, not #FFFFFF) measures 4.46:1; 3 % toward Ink = 4.68:1, visually identical */
  --local-fill-safe: color-mix(in srgb, var(--primary-fill) 97%, var(--ph-ink));
  --local-primary-deep: color-mix(in srgb, var(--primary-fill) 83%, var(--ph-ink));
  --local-glass-strong: color-mix(in srgb, var(--surface) 80%, transparent);
  --local-sel-glow: color-mix(in srgb, var(--primary) 45%, transparent);
}
@media (max-width: 440px) { .options { padding-inline: 0; gap: 32px; } .option .label { padding-inline: 16px; } }
.option .label code { font-size: var(--fs-label); }

.option .frame.ph { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.ph p { margin: 0; }
.ph .head { display: grid; gap: 4px; }
.ph .eyebrow { font: 600 var(--fs-ui)/1.3 var(--font-body); color: var(--fg-muted); }
.ph .h { font-family: var(--font-display); font-stretch: var(--font-display-stretch); font-weight: 700; font-size: var(--fs-h2); line-height: var(--lh-h2); }
.ph .sub { font-size: var(--fs-ui); line-height: 1.4; color: var(--fg-muted); }
.ph ul { list-style: none; margin: 0; padding: 0; }
.name { font: 600 var(--fs-ui)/1.3 var(--font-body); color: var(--fg); }
.unit { font: 400 var(--fs-ui)/1.35 var(--font-body); color: var(--fg-muted); transition: color var(--d-180); }
.is-on .unit { color: var(--info); } /* light #006BCB 5.24:1 on White, dark Sky 7.1:1 (primary-ink fails 4.33 on dark surface) */

/* ── rolling digits (NumberFlow idea, plain CSS): each digit is a 0–9 strip that slides ── */
.money { font-family: var(--font-display); font-stretch: var(--font-display-stretch); font-weight: 700; font-size: var(--fs-h2); line-height: 1.15; color: var(--fg); direction: ltr; unicode-bidi: isolate; display: inline-flex; align-items: baseline; white-space: nowrap; }
.money .cur { margin-inline-end: .28em; }
[data-roll] { display: inline-flex; }
[data-roll] .d { display: inline-block; block-size: 1.15em; overflow: hidden; inline-size: .74em; text-align: center; }
[data-roll] .d > span { display: flex; flex-direction: column; transform: translateY(calc(var(--n, 0) * -1.15em)); transition: transform var(--d-400) var(--ease-brand); }
[data-roll] .d > span > i { font-style: normal; block-size: 1.15em; line-height: 1.15em; }
[data-roll] .sep { display: inline-block; }
.totalbox { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l m" "c c"; align-items: center; column-gap: 12px; row-gap: 2px; }
.totalbox .meta { display: contents; }
.totalbox .meta b { grid-area: l; }
.totalbox .meta span { grid-area: c; }
.totalbox > div:last-child { grid-area: m; }
.totalbox .meta span { font-size: var(--fs-ui); color: var(--fg-muted); line-height: 1.3; }
.totalbox .meta b { font: 600 var(--fs-ui)/1.3 var(--font-body); color: var(--fg); }

/* ── shared stepper buttons ── */
.qbtn { inline-size: var(--t-min); block-size: var(--t-min); flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; padding: 0; color: var(--fg); background: transparent; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: transform var(--d-180) var(--ease-brand), background-color var(--d-120), color var(--d-120), opacity var(--d-120); }
.qbtn svg { inline-size: 18px; block-size: 18px; }
.qbtn.is-pressed { transform: scale(.9); }
.qbtn[disabled] { color: var(--fg-disabled); cursor: not-allowed; }
.qn { min-inline-size: 28px; text-align: center; font: 600 17px/1 var(--font-body); color: var(--fg); font-variant-numeric: tabular-nums; }
.qn.bump { animation: ph-bump var(--d-260) var(--ease-brand); }
@keyframes ph-bump { 40% { transform: translateY(-3px) scale(1.12); } }
.cta2 { min-block-size: var(--t-button-lg); border: 0; border-radius: var(--r-pill); padding-inline: 24px; font-family: inherit; font-weight: 600; font-size: 17px; line-height: 1.2; color: var(--primary-on); background: linear-gradient(180deg, var(--local-fill-safe), var(--local-primary-deep)); box-shadow: var(--tactile-shadow); cursor: pointer; transition: transform var(--d-180) var(--ease-brand); -webkit-tap-highlight-color: transparent; }
.cta2.is-pressed { transform: scale(var(--press-scale)); box-shadow: var(--tactile-pressed); }

/* ═════════ A1 · ROW STEPPER ═════════ */
.a1 .list { background: var(--surface); border: 1px solid var(--line-subtle); border-radius: var(--r-card); box-shadow: var(--shadow-1); overflow: hidden; }
.a1 .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-block-size: 72px; padding: 10px 12px 10px 16px; padding-inline: 16px 10px; transition: background-color var(--d-180); }
.a1 .row + .row { border-block-start: 1px solid var(--line-subtle); }
.a1 .row.is-on { background: var(--primary-subtle); }
.a1 .seg { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--surface-sunken); box-shadow: inset 0 0 0 1px var(--line-subtle); }
.a1 .seg .qbtn { background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-subtle); }
.a1 .seg .qbtn[data-act="inc"] { background: var(--local-fill-safe); color: var(--primary-on); box-shadow: 0 2px 8px color-mix(in srgb, var(--primary-fill) 35%, transparent); }
.a1 .seg .qbtn[disabled] { background: transparent; box-shadow: none; }
.a1 .foot { background: var(--surface); border: 1px solid var(--line-subtle); border-radius: var(--r-card); padding: 14px 16px; }

/* ═════════ A2 · MORPH IN PLACE (SIGNATURE SigQty: the + never moves, the segment grows toward the start) ═════════ */
.a2 .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-block-size: 76px; padding-block: 10px; }
.a2 .row + .row { border-block-start: 1px solid var(--line); }
.morph { display: flex; align-items: center; flex: none; border-radius: var(--r-pill); background: transparent; box-shadow: inset 0 0 0 1.5px var(--primary-ink); transition: background-color var(--d-180) var(--ease-brand), box-shadow var(--d-180) var(--ease-brand); }
.morph .ext { display: flex; align-items: center; max-inline-size: 0; opacity: 0; overflow: hidden; transition: max-inline-size var(--d-260) var(--ease-brand), opacity var(--d-180) var(--ease-brand); }
.morph .plus { inline-size: auto; min-inline-size: var(--t-min); padding-inline: 14px 18px; border-radius: var(--r-pill); display: flex; gap: 6px; color: var(--primary-ink); transition: padding var(--d-260) var(--ease-brand), background-color var(--d-180), color var(--d-180), transform var(--d-180) var(--ease-brand); }
.morph .plus .w { font: 600 var(--fs-ui)/1.3 var(--font-body); max-inline-size: 4em; overflow: hidden; white-space: nowrap; transition: max-inline-size var(--d-260) var(--ease-brand), opacity var(--d-180); }
.morph.has-qty { background: var(--primary-muted); box-shadow: inset 0 0 0 1.5px transparent; }
.morph.has-qty .ext { max-inline-size: 100px; opacity: 1; }
.morph.has-qty .plus { padding-inline: 0; inline-size: var(--t-min); justify-content: center; background: var(--local-fill-safe); color: var(--primary-on); box-shadow: 0 2px 10px color-mix(in srgb, var(--primary-fill) 40%, transparent); }
.morph.has-qty .plus .w { max-inline-size: 0; opacity: 0; }
.a2 .foot { margin-block-start: 4px; padding: 14px 16px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line-subtle); box-shadow: var(--shadow-1); }

/* ═════════ A3 · MEDIA-FIRST CARDS ═════════ */
.a3 .cards { display: grid; gap: 12px; }
.a3 .card3 { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-subtle); transition: box-shadow var(--d-180) var(--ease-brand); }
.a3 .card3.is-on { box-shadow: inset 0 0 0 2px var(--primary), 0 0 12px var(--local-sel-glow); }
.a3 .thumb { position: relative; inline-size: 96px; block-size: 112px; border-radius: var(--r-tile); overflow: hidden; background: var(--surface-sunken); }
.a3 .thumb img { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }
.a3 .thumb .play { position: absolute; inset-block-end: 8px; inset-inline-start: 8px; inline-size: 28px; block-size: 28px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--ph-ink) 55%, transparent); color: var(--ph-white); }
.a3 .thumb .play svg { inline-size: 12px; block-size: 12px; }
.a3 .thumb .ok { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; inline-size: 26px; block-size: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--local-fill-safe); color: var(--primary-on); transform: scale(.6); opacity: 0; transition: transform var(--d-180) var(--ease-brand), opacity var(--d-180); }
.a3 .card3.is-on .thumb .ok { transform: scale(1); opacity: 1; }
.a3 .body { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.a3 .body .bottom { margin-block-start: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.a3 .tag { font: 600 var(--fs-ui)/1 var(--font-body); color: var(--primary-ink); opacity: 0; transition: opacity var(--d-180); }
.a3 .card3.is-on .tag { opacity: 1; }
.a3 .seg { display: flex; align-items: center; gap: 0; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1.5px var(--line); }
.a3 .card3.is-on .seg { box-shadow: inset 0 0 0 1.5px var(--primary); }
.a3 .foot { padding: 6px 4px 0; }

/* ═════════ A4 · CHIPS WITH A QUANTITY BADGE ═════════ */
.option .frame.a4 { padding-block-end: 0; }
.a4 .chips { display: flex; flex-wrap: wrap; gap: 14px 10px; padding-block: 8px 4px; }
.a4 .chipw { position: relative; }
.a4 .chip { min-block-size: 52px; display: inline-flex; align-items: center; gap: 8px; padding-inline: 18px; border-radius: var(--r-pill); border: 0; cursor: pointer; font-family: inherit; font-weight: 500; font-size: var(--fs-ui); color: var(--fg); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line), var(--shadow-1); -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform var(--d-180) var(--ease-brand), background-color var(--d-180), box-shadow var(--d-180); }
.a4 .chip .p { color: var(--fg-muted); }
.a4 .chip .ck { inline-size: 0; overflow: hidden; display: inline-grid; transition: inline-size var(--d-180) var(--ease-brand); }
.a4 .chip .ck svg { inline-size: 18px; block-size: 18px; }
.a4 .chip.is-pressed { transform: scale(var(--press-scale)); }
.a4 .chipw.is-on .chip { background: var(--primary-muted); box-shadow: inset 0 0 0 2px var(--primary), 0 0 12px var(--local-sel-glow); padding-inline-end: 34px; }
.a4 .chipw.is-on .chip .ck { inline-size: 18px; color: var(--primary-ink); }
.a4 .chipw.is-on .chip .p { color: var(--fg); }
.a4 .badge { position: absolute; inset-block-start: -10px; inset-inline-end: -6px; inline-size: 44px; block-size: 44px; border: 0; padding: 0; background: transparent; display: grid; place-items: center; cursor: pointer; transform: scale(.4); opacity: 0; pointer-events: none; transition: transform var(--d-260) var(--ease-brand), opacity var(--d-180); }
.a4 .badge span { min-inline-size: 30px; block-size: 30px; padding-inline: 6px; border-radius: var(--r-pill); display: grid; place-items: center; font: 700 var(--fs-ui)/1 var(--font-body); color: var(--primary-on); background: var(--local-fill-safe); box-shadow: 0 0 0 3px var(--canvas), 0 4px 10px color-mix(in srgb, var(--primary-fill) 40%, transparent); }
.a4 .chipw.is-on .badge { transform: scale(1); opacity: 1; pointer-events: auto; }
.a4 .hint { font-size: var(--fs-ui); color: var(--fg-muted); line-height: 1.4; }
.a4 .editor { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--d-260) var(--ease-brand); }
.a4 .editor.open { grid-template-rows: 1fr; }
.a4 .editor > div { overflow: hidden; }
.a4 .editor .in { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 12px 16px; padding-inline: 16px 10px; margin-block: 2px; border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-subtle), var(--shadow-1); }
.a4 .editor .seg { display: flex; align-items: center; border-radius: var(--r-pill); background: var(--surface-sunken); }
.a4 .done { min-block-size: var(--t-min); padding-inline: 16px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--primary-ink); font-family: inherit; font-weight: 600; font-size: var(--fs-ui); cursor: pointer; }
.a4 .bar { margin-block-start: 6px; margin-inline: -16px; padding: 14px 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border-block-start: 1px solid var(--line-subtle); box-shadow: 0 -8px 24px color-mix(in srgb, var(--ph-ink) 6%, transparent); }
.a4 .bar .cta2 { min-inline-size: 140px; }

/* ═════════ A5 · GLASS SHEET over the room ═════════ */
.option .frame.a5 { padding: 0; gap: 0; min-block-size: 690px; background: var(--surface-sunken) url(img/aura.jpg) 50% 0 / auto 560px no-repeat; }
.a5 .tagl { position: absolute; inset-block-start: 16px; inset-inline-start: 16px; padding: 8px 14px; border-radius: var(--r-pill); font: 600 var(--fs-ui)/1.2 var(--font-body); color: var(--fg); background: var(--local-glass-strong); backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)); border: 1px solid var(--glass-stroke); }
.a5 .sheet { position: absolute; inset-inline: 0; inset-block-end: 0; padding: 10px 16px 16px; display: grid; gap: 6px; border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  background: var(--local-glass-strong); backdrop-filter: blur(24px) saturate(var(--glass-sat)); -webkit-backdrop-filter: blur(24px) saturate(var(--glass-sat));
  border-block-start: 1px solid var(--glass-stroke); box-shadow: 0 -12px 40px color-mix(in srgb, var(--ph-ink) 18%, transparent), inset 0 1px 0 color-mix(in srgb, var(--ph-white) 45%, transparent); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .a5 .sheet, .a5 .tagl { background: var(--surface); } }
.a5 .grab { justify-self: center; inline-size: 40px; block-size: 5px; border-radius: 3px; background: var(--line-strong); margin-block-end: 6px; }
.a5 .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-block-size: 64px; }
.a5 .row + .row { border-block-start: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.a5 .seg { display: flex; align-items: center; border-radius: var(--r-pill); background: color-mix(in srgb, var(--surface) 70%, transparent); box-shadow: inset 0 0 0 1px var(--glass-stroke), inset 0 1px 0 color-mix(in srgb, var(--ph-white) 50%, transparent), var(--shadow-1); }
.a5 .row.is-on .seg { box-shadow: inset 0 0 0 1.5px var(--primary), 0 0 12px var(--local-sel-glow); }
.a5 .pin { margin-block-start: 6px; padding-block-start: 12px; border-block-start: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.a5 .pin .cta2 { min-inline-size: 150px; }

@media (prefers-reduced-motion: reduce) {
  [data-roll] .d > span, .morph, .morph .ext, .morph .plus, .morph .plus .w, .a4 .editor, .a4 .badge, .a3 .card3 { transition: none; }
  .qn.bump { animation: none; }
  .qbtn.is-pressed { transform: none; background: var(--surface-active); }
  .chip.is-pressed { background: var(--surface-active); }
}

/* RTL with Latin fixture copy: each text run is its own bidi paragraph so "2 people · 2 mics" keeps its order,
   while the layout (rows, steppers, arrows, morph anchor) mirrors through logical properties. */
[dir="rtl"] .frame :is(p, h2, b, strong, small, span, output, button, li), [dir="rtl"] .option .label :is(b, code) { unicode-bidi: plaintext; }
[dir="rtl"] .frame :is(.eyebrow, .h, .sub, .hint, .sum-line, .sum-sub, .name, .unit, .cap, .meta b, .meta span, [data-count]), [dir="rtl"] .option .label { text-align: right; }

/* on glass the ground moves: line totals go Ink/White (12:1 / 9.8:1 worst frame); the stroke + glow carry 'selected' */
.a5 .is-on .unit { color: var(--fg); font-weight: 600; }
