/* ---------- Catalog bento (rebuilt 2026-10-02) ----------
   Every tile: header, a visual that fills the space, a key-result row. 20px padding.
   Tile sizes are fixed per breakpoint; container queries (bt) switch wide layouts. */
.bento { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.bt { --h: 340px; height: var(--h); position: relative; min-width: 0; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; container: bt / inline-size; transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out); }
@media (hover: hover) { .bt:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); } }
.bt-in { height: 100%; display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.bt-head { display: flex; align-items: flex-start; gap: 12px; flex-shrink: 0; }
.bt-head > div { min-width: 0; }
.bt-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--ic); display: grid; place-items: center; flex-shrink: 0; box-shadow: inset 0 -2px 0 rgba(0,0,0,.08); }
.bt-icon svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bt h3 { font-size: 1.16rem; letter-spacing: -.02em; line-height: 1.2; padding-top: 1px; }
.bt-head p { margin-top: 2px; font-size: .88rem; line-height: 1.35; color: var(--ink-2); }
.bt-cc { display: inline-block; vertical-align: 2px; margin-left: 4px; font: 700 .75rem/1 var(--font-body); letter-spacing: .05em; padding: 3px 6px; border-radius: 5px; border: 1px solid var(--line); color: var(--ink-2); }
.bt-viz { position: relative; flex: 1 1 0; min-height: 0; transition: opacity .4s var(--ease-out); }
.bt.is-fading .bt-viz { opacity: 0; }
.bt-label { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.bt-key { flex-shrink: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 56px; padding-top: 12px; border-top: 1px solid var(--line); }
.bt-key-l { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.bt-key-l b { font-weight: 650; font-size: .92rem; line-height: 1.25; white-space: nowrap; }
.bt-key-l > span { font-size: .8rem; line-height: 1.3; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bt-key-r { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.bt-big { font-family: var(--font-display); font-weight: 780; font-size: 1.85rem; letter-spacing: -.03em; line-height: 1.1; height: 1.1em; white-space: nowrap; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.num number-flow { font-variant-numeric: tabular-nums; --number-flow-mask-height: .12em; }
.bt-big.num, .bt-big .odo-col { line-height: 1.1; }

/* Grid: one column (phones), two columns (tablets), four columns (desktop). */
.bt-receipt { --h: 520px; } .bt-split { --h: 380px; } .bt-recipe { --h: 500px; } .bt-prime { --h: 330px; }
.bt-breakeven { --h: 350px; } .bt-pool { --h: 370px; } .bt-card { --h: 390px; } .bt-13th { --h: 320px; }
@media (min-width: 520px) and (max-width: 639px) {
  .bt-split { --h: 300px; } .bt-recipe { --h: 360px; } .bt-card { --h: 320px; } .bt-pool { --h: 340px; }
}
@media (min-width: 640px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 320px;
    grid-template-areas: "r s" "r p" "b b" "t t" "c f" "c m"; }
  .bt { height: auto; }
  .bt-receipt { grid-area: r; } .bt-split { grid-area: s; } .bt-recipe { grid-area: c; } .bt-prime { grid-area: p; }
  .bt-breakeven { grid-area: b; } .bt-pool { grid-area: t; } .bt-card { grid-area: f; } .bt-13th { grid-area: m; }
}
@media (min-width: 1100px) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 320px;
    grid-template-areas: "r s s c" "r p p c" "b b t t" "f f m m"; }
}

/* ---------- Receipt: the roll feeds up out of the printer ---------- */
.rc-viz { display: flex; flex-direction: column; }
.rc-feed { position: relative; flex: 1; min-height: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 64px); mask-image: linear-gradient(180deg, transparent 0, #000 64px); }
.rc-roll { position: absolute; left: 0; right: 0; bottom: 0; width: min(100% - 16px, 290px); margin-inline: auto; transition: transform .34s var(--ease-out); }
.rc-blk { padding: 12px 16px 0; background: #FFFEFA; color: #3A342C; font: 500 12px/21px ui-monospace, "SF Mono", Menlo, monospace; box-shadow: 0 0 0 1px rgba(40,30,15,.05), 0 10px 30px -14px rgba(40,30,15,.35); }
.rc-l { display: flex; justify-content: space-between; gap: 12px; height: 21px; white-space: nowrap; }
.rc-l > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.rc-l.p { animation: rc-print .28s steps(10, end); }
@keyframes rc-print { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.rc-brand { justify-content: center; font-weight: 800; letter-spacing: .14em; }
.rc-dim { color: #8A8174; }
.rc-rule, .rc-cut { height: 12px; background: repeating-linear-gradient(90deg, #CFC6B5 0 4px, transparent 4px 7px) center / 100% 1px no-repeat; }
.rc-sub { font-weight: 700; }
.rc-total { height: 30px; align-items: center; font-weight: 800; font-size: 15px; border-block: 1px dashed #CFC6B5; margin: 3px 0; }
.rc-thanks { justify-content: center; color: #8A8174; font-family: var(--font-body); font-size: 11px; }
.rc-cut { height: 26px; margin-inline: -16px; background: repeating-linear-gradient(90deg, #A79D8C 0 6px, transparent 6px 11px) center / 100% 1.5px no-repeat, var(--surface); position: relative; }
.rc-cut::before, .rc-cut::after { content: ""; position: absolute; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper-2); }
.rc-cut::before { left: -6px; } .rc-cut::after { right: -6px; }
.rc-printer { position: relative; flex-shrink: 0; width: min(100%, 320px); height: 30px; margin: 0 auto; border-radius: 9px 9px 12px 12px; background: linear-gradient(180deg, #3A352E, #1C1915); box-shadow: 0 10px 20px -12px rgba(28,25,21,.7), inset 0 1px 0 rgba(255,255,255,.12); }
.rc-slot { position: absolute; left: 12px; right: 12px; top: 0; height: 5px; border-radius: 0 0 3px 3px; background: #0B0A09; }
.rc-led { position: absolute; right: 12px; bottom: 9px; width: 6px; height: 6px; border-radius: 50%; background: #34C759; box-shadow: 0 0 6px #34C759; animation: rc-led 1.4s ease-in-out infinite; }
@keyframes rc-led { 50% { opacity: .35; } }
.bt-receipt.is-paused .rc-led { animation-play-state: paused; }

/* ---------- Tip and split: people around a table ---------- */
.sp-viz { container: viz / size; }
.sp-scene { position: absolute; inset: 0; }
.sp-table { position: absolute; left: 50%; top: 50%; width: 52%; height: 44%; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%, #FFFBF3, var(--paper-2)); border: 1px solid var(--line-2);
  box-shadow: inset 0 -4px 0 rgba(40,30,15,.05), 0 14px 24px -16px rgba(40,30,15,.45);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.sp-table b { font: 760 1rem/1.2 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sp-table span { font-size: .72rem; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-seat { position: absolute; left: calc(50% + var(--x, 0) * (26% + 25px)); top: calc(50% + var(--y, 0) * (22% + 23px)); width: 38px; height: 38px; margin: -19px 0 0 -19px;
  opacity: 0; transform: scale(.3); transition: left .8s var(--ease-out), top .8s var(--ease-out), opacity .35s, transform .45s var(--ease-out); }
.sp-seat.on { opacity: 1; transform: none; }
.sp-av { position: relative; display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  background: linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: 0 0 0 2.5px var(--surface), 0 6px 12px -6px rgba(0,0,0,.45); }
.sp-av svg { width: 100%; height: 100%; fill: rgba(255,255,255,.95); }
.sp-amt { position: absolute; left: 50%; top: calc(100% - 3px); transform: translateX(-50%); padding: 2px 5px; border-radius: 6px; background: var(--surface); box-shadow: 0 0 0 1px var(--line-2); font: 700 10px/1.1 var(--font-body); white-space: nowrap; font-variant-numeric: tabular-nums; }
@container viz (max-height: 185px) { .sp-amt { display: none; } }
.mini-stepper { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); flex-shrink: 0; }
.mini-stepper button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: 0 1px 2px rgba(28,25,21,.12); font-size: 1.3rem; line-height: 1; display: grid; place-items: center; transition: transform .12s, background-color .15s; color: var(--ink); }
.mini-stepper button:hover { background: #fff; }
.mini-stepper button:active { transform: scale(.9); }
.mini-stepper button:disabled { opacity: .35; cursor: default; transform: none; }
.mini-stepper output { min-width: 5.6em; text-align: center; font-weight: 650; font-size: .9rem; font-variant-numeric: tabular-nums; }
.sp-key { align-items: center; }
.sp-key .bt-key-r .bt-label { margin-top: 2px; }
@container bt (max-width: 300px) { .mini-stepper output { min-width: 4.6em; font-size: .84rem; } .mini-stepper button { width: 36px; height: 36px; } }

/* ---------- Recipe cost: donut + ingredients ---------- */
.rx-viz { display: flex; flex-direction: column; gap: 12px; }
.rx-donut { position: relative; flex: 1 1 0; min-height: 120px; }
.rx-donut svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rx-track { fill: none; stroke: var(--paper-2); }
.rx-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.rx-center span { font-size: .74rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.rx-center b { font: 780 1.4rem/1.15 var(--font-display); letter-spacing: -.03em; height: 1.15em; margin: 2px 0 1px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rx-list { flex-shrink: 0; list-style: none; margin: 0; padding: 0; }
.rx-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; height: 34px; font-size: .88rem; position: relative;
  opacity: 0; transform: translateY(-14px); transition: opacity .3s var(--ease-out), transform .6s var(--ease-spring); }
.rx-row + .rx-row::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); }
.rx-row.in { opacity: 1; transform: none; }
.rx-row.out { opacity: 0; transform: translateY(10px); transition-duration: .3s; }
.rx-row i { width: 10px; height: 10px; border-radius: 3px; }
.rx-row span { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-row b { font-weight: 650; font-variant-numeric: tabular-nums; }
@container bt (min-width: 480px) {
  .rx-viz { flex-direction: row; align-items: center; gap: 24px; }
  .rx-donut { flex: 0 0 42%; height: 100%; }
  .rx-list { flex: 1; min-width: 0; }
}

/* ---------- Prime cost: stacked area by month ---------- */
.pc-viz svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; touch-action: pan-y; }
.pc-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.pc-a-food { fill: var(--tomato); opacity: .78; }
.pc-a-labor { fill: var(--saffron); opacity: .72; }
.pc-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.pc-target-line { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 5 5; opacity: .6; }
.pc-cursor { stroke: var(--ink); stroke-width: 1; opacity: .3; }
.pc-dot { fill: var(--surface); stroke: var(--ink); stroke-width: 2.5; transition: fill .3s, stroke .3s; }
.pc-dot.high { fill: var(--tomato); stroke: var(--tomato-ink); }
.pc-axis text { font: 600 10px/1 var(--font-body); fill: var(--ink-3); }
.pc-axis text.on { fill: var(--ink); font-weight: 800; }
.pc-target { position: absolute; right: 0; top: 0; padding: 2px 7px; border-radius: 7px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-size: .72rem; font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.dot-food, .dot-labor { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: 0; }
.dot-labor { margin-left: 8px; }
.dot-food { background: var(--tomato); } .dot-labor { background: var(--saffron); }
[data-pc-pct] { transition: color .4s; }
.bt-prime.is-high [data-pc-pct] { color: var(--tomato-ink); }

/* ---------- Break-even: a month, day by day ---------- */
.be-viz { display: flex; flex-direction: column; }
.be-top { display: flex; justify-content: space-between; gap: 10px; height: 18px; font-size: .78rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.be-plot { position: relative; flex: 1; min-height: 0; margin-top: 10px; }
.be-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.be-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.be-rev, .be-cost { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.be-rev { stroke: var(--basil); } .be-cost { stroke: var(--tomato); }
.be-loss { fill: var(--tomato); opacity: .13; } .be-gain { fill: var(--basil); opacity: .2; }
.be-drop { stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 3 4; opacity: 0; transition: opacity .3s; }
.be-head { fill: var(--basil); stroke: var(--surface); stroke-width: 2.5; }
.be-mark { fill: var(--ink); stroke: var(--surface); stroke-width: 3; opacity: 0; transition: opacity .3s; }
.be-axis text { font: 600 10px/1 var(--font-body); fill: var(--ink-3); }
.be-flag { position: absolute; left: 50%; top: 0; transform: translate(-50%, 6px) scale(.9); padding: 4px 9px; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: .74rem; font-weight: 700; white-space: nowrap; opacity: 0; transition: opacity .3s, transform .5s var(--ease-spring); pointer-events: none; }
.bt-breakeven.is-crossed .be-flag { opacity: 1; transform: translate(-50%, 0); }
.bt-breakeven.is-crossed .be-mark, .bt-breakeven.is-crossed .be-drop { opacity: 1; }
.be-today { color: var(--ink); }

/* ---------- Tip pool: live shift ---------- */
.tp-viz { display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 16px; }
.tp-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.tp-clock { display: flex; justify-content: space-between; gap: 10px; height: 18px; font-size: .78rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.tp-clock span:first-child { color: var(--ink); font-variant-numeric: tabular-nums; }
.tp-rows { position: relative; flex: 1; min-height: 0; list-style: none; margin: 8px 0 0; padding: 0; }
.tp-row { position: absolute; left: 0; right: 0; top: calc(var(--rank, 0) * 25%); height: 25%; display: grid; grid-template-columns: 24px minmax(0, 1fr) 3.3em 4.2em; align-items: center; gap: 10px; transition: top .7s var(--ease-out); }
.tp-row + .tp-row::before { content: none; }
.tp-av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 750 .8rem/1 var(--font-body); font-style: normal; box-shadow: 0 0 0 2px var(--surface), 0 4px 10px -5px rgba(0,0,0,.4); transition: filter .4s, opacity .4s; }
.tp-who { display: flex; align-items: baseline; gap: 6px; min-width: 0; line-height: 1.2; white-space: nowrap; overflow: hidden; }
.tp-who b { font-size: .88rem; font-weight: 650; }
.tp-who small { font-size: .72rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-h { font-size: .82rem; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tp-amt { font-weight: 700; font-size: .9rem; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tp-row.off .tp-av { filter: grayscale(1); opacity: .45; }
.tp-row.off .tp-who small { color: var(--ink-3); }
.tp-jar { display: flex; flex-direction: column; min-height: 0; padding-top: 6px; }
.tp-glass { position: relative; flex: 1; border-radius: 10px 10px 16px 16px; border: 2px solid var(--line-2); border-top-width: 6px; background: var(--paper); overflow: hidden; }
.tp-layer { position: absolute; left: 0; right: 0; bottom: 0; height: 0; transition: height .6s var(--ease-out), bottom .6s var(--ease-out); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }

/* ---------- Card terminal fees: payment feed ---------- */
.cf-feed { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 52px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 52px), transparent); }
.cf-row { position: absolute; left: 0; right: 0; top: 0; height: 42px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  transform: translateY(calc(var(--k, 0) * 48px)); transition: transform .6s var(--ease-out), opacity .4s; }
.cf-row.enter { opacity: 0; transform: translateY(-24px) scale(.97); }
.cf-row.gone { opacity: 0; }
.cf-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.cf-ic svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cf-card .cf-ic { background: #0A84FF; } .cf-qr .cf-ic { background: #34C759; } .cf-wallet .cf-ic { background: #5E5CE6; }
.cf-what, .cf-amt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.cf-what b { font-size: .88rem; font-weight: 650; }
.cf-what small, .cf-amt small { font-size: .74rem; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cf-amt { align-items: flex-end; }
.cf-amt b { font-size: .9rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cf-amt small { color: var(--tomato-ink); }
.cf-key { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 16px; align-items: end; }
.cf-tot { display: flex; flex-direction: column; min-width: 0; }
.cf-tot b { font-weight: 700; font-size: .95rem; line-height: 1.3; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cf-fee { color: var(--tomato-ink); }
.cf-net { align-items: flex-end; text-align: right; }
.cf-net .bt-big { font-size: 1.55rem; font-weight: 780; line-height: 1.1; }

/* ---------- 13th month: bars fill month by month ---------- */
.m13-viz { display: flex; flex-direction: column; }
.m13-cap { display: flex; justify-content: space-between; gap: 10px; height: 18px; font-size: .78rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.m13-cap span:first-child { color: var(--ink); }
.m13-bars { flex: 1; min-height: 0; list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 5px; }
.m13-bar { display: flex; flex-direction: column; min-width: 0; }
.m13-col { position: relative; flex: 1; border-radius: 6px 6px 3px 3px; background: var(--paper-2); }
.m13-col i { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--h, 0) * 100%); border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #FF8A80, #FF5A4E); transition: height .7s var(--ease-spring); }
.m13-col em { position: absolute; left: 50%; bottom: calc(var(--h, 0) * 100% + 5px); transform: translateX(-50%) translateY(4px); padding: 2px 5px; border-radius: 6px; background: var(--ink); color: var(--paper); font: 700 10px/1.1 var(--font-body); white-space: nowrap; opacity: 0; transition: opacity .3s, transform .4s var(--ease-spring), bottom .7s var(--ease-spring); z-index: 1; }
.m13-bar.tagged em { opacity: 1; transform: translateX(-50%); }
.m13-bar:first-child em { left: 0; transform: none; }
.m13-bar:last-child em { left: auto; right: 0; transform: none; }
.m13-bar.zero .m13-col { background: none; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.m13-m { height: 16px; margin-top: 5px; font-size: .68rem; font-weight: 650; color: var(--ink-2); text-align: center; }
@container bt (max-width: 479px) { .m13-m { font-size: 0; } .m13-m::before { content: attr(data-short); font-size: .68rem; } }

/* ---------- Wide tiles (single wide column, or two-column spans) ---------- */
@container bt (min-width: 480px) {
  .bt-split .bt-in, .bt-card .bt-in, .bt-breakeven .bt-in { display: grid; grid-template-columns: minmax(0, 1fr) 200px; grid-template-rows: auto minmax(0, 1fr); column-gap: 24px; row-gap: 14px; }
  .bt-split .bt-head, .bt-card .bt-head, .bt-breakeven .bt-head { grid-column: 1 / -1; }
  .bt-split .bt-key, .bt-card .bt-key, .bt-breakeven .bt-key { flex-direction: column-reverse; align-items: flex-end; justify-content: center; gap: 18px; min-height: 0; padding: 0 0 0 24px; border-top: 0; border-left: 1px solid var(--line); }
  .bt-breakeven .bt-key { flex-direction: column; justify-content: center; align-items: stretch; gap: 14px; }
  .bt-breakeven .bt-key-r { align-items: flex-start; }
  .bt-breakeven .bt-big { font-size: 2.6rem; }
  .bt-split .bt-key-r { align-items: flex-end; }
  .bt-split .bt-big { font-size: 2.1rem; }
  .bt-card .bt-key.cf-key { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 14px; }
  .cf-tot { align-items: flex-end; }
  .cf-net .bt-big { font-size: 1.9rem; }
  .tp-viz { grid-template-columns: minmax(0, 1fr) 72px; gap: 24px; }
}

/* ---------- Scale band ---------- */
.scale { margin-top: 14px; padding: clamp(28px, 4vw, 44px) 0 clamp(28px, 4vw, 40px); border-radius: 28px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; text-align: center; }
.scale-head { padding: 0 20px; }
.scale-title { font-size: clamp(1.7rem, 1.1rem + 2.6vw, 3rem); font-weight: 800; letter-spacing: -.035em; }
.sec-icons { list-style: none; margin: 22px auto 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 250px; }
@media (min-width: 640px) { .sec-icons { max-width: 410px; } }
@media (min-width: 1100px) { .sec-icons { max-width: 760px; } }
.sec-icons li { width: 40px; height: 40px; border-radius: 11px; background: var(--ic); display: grid; place-items: center; box-shadow: inset 0 -2px 0 rgba(0,0,0,.08); transition: transform .45s var(--ease-spring), box-shadow .3s, opacity .4s; }
.sec-icons svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.js .sec-icons li { opacity: 0; transform: translateY(8px) scale(.9); transition-delay: calc(var(--i) * 45ms); }
.js .scale.is-in .sec-icons li { opacity: 1; transform: none; }
.js .scale.is-ready .sec-icons li { transition-delay: 0s; }
.sec-icons li.is-on { transform: translateY(-3px) scale(1.14) !important; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ic), 0 8px 18px -6px var(--ic); }
.sec-caption { height: 24px; margin-top: 16px; font-size: .95rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-caption b { color: var(--ink); font-weight: 650; }
.drift { display: grid; gap: 10px; margin-top: 26px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.drift-row { display: flex; gap: 8px; width: max-content; animation: drift var(--dur, 90s) linear infinite; }
.drift-row.rev { animation-direction: reverse; }
.drift:hover .drift-row, .scale.is-off .drift-row { animation-play-state: paused; }
.drift-row span { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.drift-row span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ic, var(--ink-3)); }
@keyframes drift { to { transform: translateX(calc(-50% - 4px)); } }
.scale-cta { margin-top: 28px; padding: 0 20px; }
.scale-cta .btn svg { transition: transform .35s var(--ease-out); }
.scale-cta .btn:hover svg { transform: none; }
.scale-cta .btn[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Full list: expands in place */
.cat-panel { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .6s var(--ease-out), opacity .4s; }
.cat-panel-inner { min-height: 0; overflow: hidden; }
.cat-panel .cat-app { margin-top: 14px; }
.js .cat-panel:not(.open) { grid-template-rows: 0fr; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .drift-row { animation: none; }
  .drift-row.rev { transform: translateX(-12%); }
  .rc-l.p, .rc-led { animation: none; }
  .rx-row { opacity: 1; transform: none; }
}

/* Receipt, narrow tile: the paper uses the full width; the key row puts the note under the total. */
@container bt (max-width: 320px) {
  .rc-roll { width: 100%; }
  .rc-blk { font-size: 11.5px; padding-inline: 12px; }
  .rc-cut { margin-inline: -12px; }
}
.bt-receipt .bt-key { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 12px; }
.bt-receipt .bt-key-l { display: contents; }
.bt-receipt .bt-key-l b { grid-area: 1 / 1; align-self: end; padding-bottom: 4px; }
.bt-receipt .bt-key-l > span { grid-area: 2 / 1 / 3 / 3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.bt-receipt .bt-big { grid-area: 1 / 2; }
.be-plot .be-today { position: absolute; left: 0; top: 0; font-size: .78rem; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bt-receipt { --h: 580px; }
@media (min-width: 640px) { .bt-receipt { --h: auto; } }
@container bt (max-width: 380px) { .tp-who small { display: none; } }
/* Outside the Philippines the 13th month tile is hidden; card fees take its place. */
.bt[hidden] { display: none; }
@media (min-width: 640px) { .bento.no-m13 { grid-template-areas: "r s" "r p" "b b" "t t" "c f" "c f"; } }
@media (min-width: 1100px) { .bento.no-m13 { grid-template-areas: "r s s c" "r p p c" "b b t t" "f f f f"; } }
/* Break-even: the "Day N · covers" label has its own band above the plot, clear of the gridlines. */
.be-plot svg { inset: 28px 0 0 0; height: auto; }
.cf-tap .cf-ic { background: #FF9500; } .cf-phone .cf-ic { background: #1C1C1E; } .cf-online .cf-ic { background: #30B0C7; }
/* Smallest phones: the pool card's "per hour worked" line and the card-fee times fit beside their amounts. */
@media (max-width: 359px) {
  .bt-key { gap: 8px; }
  .bt-key-l > span { font-size: .75rem; }
  .cf-row { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; }
  .cf-ic { width: 30px; height: 30px; border-radius: 9px; }
  .cf-ic svg { width: 18px; height: 18px; }
  .cf-what small, .cf-amt small { font-size: .7rem; }
}
/* Break-even, stacked tile (phones): the chart fills its plot box, so the day labels no longer run into the
   key row, and the tile is a little taller to give the chart room. "About N a day" and "a month" share a baseline. */
@media (max-width: 511px) {
  .bt-breakeven { --h: 390px; }
  .bt-breakeven .be-plot svg { height: calc(100% - 28px); }
  .bt-breakeven .bt-key-r .bt-label { font-size: .8rem; line-height: 1.3; }
}
/* Stacked tiles (phones), robust down to ~260px:
   - Key rows: the big number always keeps its place on the right; the label beside it gives up room first,
     wrapping inside its own column. Both blocks sit on the bottom line. Tip and split's stepper compacts.
   - Tip pool: the clock and shift line span the tile above the hours list and the jar, so the jar's column is
     never run under; the shift line wraps under the clock if there's no room beside it. */
@media (max-width: 511px) {
  .bt-key { gap: 10px; }
  .bt-key-l { flex: 1 1 0; min-width: 0; }
  .bt-key-l b, .bt-key-l > span { white-space: normal; text-wrap: balance; }
  .bt-key-r { flex-shrink: 0; }
  .sp-viz { margin-top: 10px; }
  .tp-viz { grid-template-rows: auto minmax(0, 1fr); row-gap: 8px; }
  .tp-main { display: contents; }
  .tp-clock { grid-column: 1 / -1; flex-wrap: wrap; height: auto; row-gap: 2px; }
  .tp-rows { grid-column: 1; grid-row: 2; margin-top: 0; }
  .tp-jar { grid-column: 2; grid-row: 2; padding-top: 0; }
}
/* Very narrow phones and split panes (under 340px), down to ~260px. */
@media (max-width: 339px) {
  .be-top { height: auto; white-space: normal; flex-wrap: wrap; line-height: 1.3; }
  .tp-viz { grid-template-columns: minmax(0, 1fr) 40px; column-gap: 12px; }
  .tp-row { grid-template-columns: 24px minmax(0, 1fr) 3em 3.8em; gap: 6px; }
  .scale [data-cat-toggle] { max-width: 100%; padding: 0 16px; font-size: .9rem; }
}
@media (max-width: 319px) {
  .cf-row { grid-template-columns: minmax(0, 1fr) auto; }
  .cf-ic { display: none; }
  .cat-panel { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 279px) {
  .cf-what small { overflow: hidden; text-overflow: ellipsis; }
  .bt-receipt .bt-key-l b { font-size: .84rem; }
}
@media (max-width: 299px) {
  .scale [data-cat-toggle] { padding: 0 14px; font-size: .86rem; }
  .scale [data-cat-toggle] svg { display: none; }
  .rx-row { gap: 8px; font-size: .8rem; }
  .rc-blk { font-size: 10.5px; padding-inline: 10px; }
}
/* Tip and split, narrow tiles: a compact stepper (32px keys, still a full tap target) so "each" amount stays on the row. */
@media (max-width: 400px) {
  .mini-stepper { gap: 2px; padding: 2px; }
  .mini-stepper button { width: 32px; height: 32px; font-size: 1.1rem; }
  .mini-stepper output { min-width: 4.4em; font-size: .8rem; }
}
@media (max-width: 339px) {
  .bt-big { font-size: 1.6rem; }
  .mini-stepper output { min-width: 0; padding-inline: 4px; }
}
/* Last resort, under 280px: a row that still can't fit lets the number go under, left-aligned, "each" beside it. */
@media (max-width: 279px) {
  .bt-key { flex-wrap: wrap; row-gap: 8px; }
  .sp-key .bt-key-r { flex-direction: row; align-items: baseline; gap: 6px; }
  .bt-big { font-size: 1.45rem; }
}
/* Recipe cost, stacked tile: a taller tile gives the donut ~200px, and a tighter centre stack keeps the dish name
   near the middle of the hole, where it is widest. Fixed sizes, so nothing moves when the dish changes. */
@media (max-width: 511px) {
  .bt-recipe { --h: 540px; }
  .rx-center span { line-height: 1.2; }
  .rx-center b { line-height: 1.1; height: 1.1em; margin: 0; }
}
@media (max-width: 279px) { .rx-center span { font-size: .7rem; } }
/* Tip and split under 320px: the amount steps down so the stepper and "₱452.05 each" share the row. */
@media (max-width: 319px) {
  .sp-key { gap: 8px; }
  .sp-key .bt-big { font-size: 1.4rem; }
  .mini-stepper output { font-size: .76rem; }
}
@media (max-width: 299px) {
  .sp-key { gap: 6px; }
  .sp-key .bt-big { font-size: 1.25rem; }
  .mini-stepper { gap: 0; }
  .mini-stepper button { position: relative; width: 30px; height: 30px; }
  .mini-stepper button::after { content: ""; position: absolute; inset: -1px; }
  .mini-stepper output { padding-inline: 2px; }
}
