/* The shared money screens (splits.ptpete.com and plans.ptpete.com), inside a shadow root.
   The page sets the theme variables: --bg --surface --sunk --line --fg --muted --accent --accent-fg --accent-soft
   --pos --neg --warn --warn-soft --p1..--p8 --font --radius --shadow. Edit in ptpete-splits only. */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
:host { display: block; color: var(--fg); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; text-align: left; }
/* inside another site (plans.ptpete.com): no page margins or room for a header of our own */
:host(.embed) .wrap { max-width: none; padding-left: 0; padding-right: 0; }
.embed-bar { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.embed-bar .tabs { flex: 1; margin: 0; }
.embed-bar + * { margin-top: 14px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.025em; text-wrap: balance; margin: 0; }
a { color: var(--accent); }
.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num, .amt { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.pos { color: var(--pos); } .neg { color: var(--neg); }
/* iPhones zoom into any text box under 16px; keep boxes at 16px on touch screens. */
@media (pointer: coarse) { input, select, textarea { font-size: 16px !important; } }

.wrap { max-width: 720px; margin: 0 auto; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.top { display: flex; align-items: center; gap: 10px; min-height: 56px; padding-top: env(safe-area-inset-top, 0px); }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 1.05rem; letter-spacing: -.02em; text-decoration: none; color: var(--fg); }
.logo img { width: 26px; height: 26px; border-radius: 7px; display: block; }
.iconbtn { border: 0; background: none; width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--fg); flex: none; }
.iconbtn:hover { background: var(--sunk); }
.top .sp { flex: 1; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; background: var(--fg); color: var(--bg);
  border-radius: 12px; padding: 10px 16px; font-weight: 550; min-height: 44px; text-decoration: none; white-space: nowrap; }
.btn.accent { background: var(--accent); color: var(--accent-fg); }
.btn.ghost { background: var(--sunk); color: var(--fg); }
.btn.line { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--neg); border: 1px solid var(--line); }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: .86rem; border-radius: 10px; }
.btn.wide { width: 100%; }
.btn .i { width: 18px; height: 18px; }
.link { border: 0; background: none; color: var(--accent); padding: 0; font-weight: 500; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 16px; }
.eyebrow { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); font-weight: 550; text-transform: uppercase; letter-spacing: .05em; }
.eyebrow .i { width: 14px; height: 14px; }
.field { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; min-width: 0; min-height: 44px; }
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
textarea.field { resize: vertical; min-height: 70px; }
label.lbl { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; color: var(--muted); font-weight: 500; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 160px; min-width: 0; }
.empty { color: var(--muted); padding: 28px 16px; text-align: center; font-size: .93rem; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }
/* skeleton while the group loads: the shape of the page, gently pulsing */
.skel { display: grid; gap: 12px; padding-top: 8px; }
.skel i { display: block; height: 18px; border-radius: 9px; background: var(--sunk); animation: pulse 1.1s ease-in-out infinite alternate; }
.skel .big { height: 96px; border-radius: 18px; }
.skel .row { height: 54px; border-radius: 14px; }
@keyframes pulse { to { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .skel i { animation: none; } }

.face { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 600; font-size: .8rem; color: #fff; flex: none; user-select: none; }
.face.sm { width: 24px; height: 24px; font-size: .68rem; }
.face.lg { width: 44px; height: 44px; font-size: 1rem; }
.faces { display: flex; align-items: center; }
.faces .face { border: 2px solid var(--bg); margin-left: -8px; }
.faces .face:first-child { margin-left: 0; }
.faces .more { font-size: .78rem; color: var(--muted); margin-left: 6px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  border-radius: 999px; padding: 4px 12px 4px 4px; min-height: 38px; font-size: .9rem; }
.chip.plain { padding: 4px 12px; }
.chip.on { border-color: var(--accent); background: var(--accent-soft); font-weight: 550; }
.chip .face { width: 28px; height: 28px; font-size: .72rem; }
.chip .x { color: var(--muted); display: inline-grid; place-items: center; }
.chip .x .i { width: 14px; height: 14px; }

.seg { display: flex; background: var(--sunk); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 9px; padding: 7px 6px; font-size: .86rem; color: var(--muted); font-weight: 500; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 18px 0 14px; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 10px 12px; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tab.on { color: var(--fg); border-bottom-color: var(--fg); }
.tab .badge { font-size: .7rem; background: var(--accent); color: var(--accent-fg); border-radius: 999px; padding: 0 6px; }

/* home */
.hero { padding: 28px 0 8px; }
.hero h1 { font-size: clamp(1.9rem, 7vw, 2.6rem); letter-spacing: -.035em; line-height: 1.08; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: var(--muted); margin: 10px 0 18px; max-width: 34em; }
.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 22px 0 8px; }
.point { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); }
.point b { color: var(--fg); font-weight: 550; display: block; }
.point .dot { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.glist { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.gitem { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; color: var(--fg); border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); text-align: left; width: 100%; }
.gitem:hover { border-color: var(--muted); }
.gitem .t { flex: 1; min-width: 0; }
.gitem .t b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gitem .t small { color: var(--muted); font-size: .82rem; }
.gemoji { width: 44px; height: 44px; border-radius: 13px; background: var(--sunk); display: grid; place-items: center; font-size: 1.4rem; flex: none; }
.section-h { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 4px; }
.section-h h2 { font-size: 1.05rem; }

/* group */
.ghead { display: flex; align-items: center; gap: 12px; padding: 6px 0 4px; }
.ghead .gemoji { width: 52px; height: 52px; font-size: 1.7rem; border-radius: 15px; }
.ghead h1 { font-size: clamp(1.4rem, 5.5vw, 1.9rem); letter-spacing: -.03em; line-height: 1.15; overflow-wrap: anywhere; }
.ghead .sub { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .86rem; margin-top: 2px; border: 0; background: none; padding: 0; }
.summary { margin-top: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.summary .big { font-size: 1.5rem; font-weight: 650; letter-spacing: -.025em; line-height: 1.2; }
.summary .big small { display: block; font-size: .82rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.summary .curs { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; border-radius: 999px; padding: 3px 10px; background: var(--sunk); font-weight: 550; font-variant-numeric: tabular-nums; }
.pill.pos { background: var(--accent-soft); color: var(--pos); }
.pill.neg { background: color-mix(in srgb, var(--neg) 13%, transparent); color: var(--neg); }
.actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 12px; }
.actions .btn { flex-direction: column; gap: 4px; min-height: 64px; font-size: .84rem; padding: 8px 6px; border-radius: 14px; }
.actions .btn .i { width: 21px; height: 21px; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); font-size: .88rem; margin-top: 12px; }
.banner.warn { background: var(--warn-soft); }
.banner .i { margin-top: 2px; color: var(--accent); }
.banner.warn .i { color: var(--warn); }
.banner .t { flex: 1; min-width: 0; }

.search { position: relative; margin-bottom: 10px; }
.search .i { position: absolute; left: 12px; top: 13px; color: var(--muted); width: 17px; height: 17px; }
.search .field { padding-left: 38px; }
.day-h { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 14px 4px 6px; }
.day-h:first-child { padding-top: 2px; }
.ents { display: flex; flex-direction: column; }
.ent { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; background: var(--surface); color: var(--fg); text-align: left; width: 100%;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-top: 1px solid var(--line); }
.ent:hover { background: color-mix(in srgb, var(--surface) 92%, var(--fg)); }
/* shown at once, still on its way to the server */
.ent.saving { opacity: .62; }
.ent.saving .amt, .ent.saving .tile { animation: saving 1.2s ease-in-out infinite alternate; }
@keyframes saving { to { opacity: .55; } }
.day-h + .ent, .ents > .ent:first-child { border-top-left-radius: 14px; border-top-right-radius: 14px; }
.ent:has(+ .day-h), .ent:last-child { border-bottom: 1px solid var(--line); border-bottom-left-radius: 14px; border-bottom-right-radius: 14px; }
.ent .tile { width: 40px; height: 40px; border-radius: 12px; background: var(--sunk); display: grid; place-items: center; font-size: 1.25rem; flex: none; }
.ent.pay .tile { background: var(--accent-soft); color: var(--accent); }
.ent .t { flex: 1; min-width: 0; }
.ent .t b { display: block; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ent .t small { display: block; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ent .you { text-align: right; flex: none; font-variant-numeric: tabular-nums; font-weight: 600; font-size: .92rem; }
.ent .you small { display: block; font-size: .72rem; font-weight: 500; }
.ent .you.muted small { color: var(--muted); }

.stack { display: flex; flex-direction: column; gap: 12px; }
.bal { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.bal:first-child { border-top: 0; }
.bal .n { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.bal .n small { display: block; color: var(--muted); font-size: .78rem; }
.bal .amt { font-weight: 600; text-align: right; }
.tr { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.eyebrow + .tr { border-top: 0; margin-top: 4px; }
.tr .pair { display: flex; flex: none; }
.tr .pair .face + .face { margin-left: -9px; border: 2px solid var(--surface); box-sizing: content-box; }
.tr .who { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.tr .names { font-size: .86rem; color: var(--muted); display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tr .names .i { width: 13px; height: 13px; flex: none; }
.tr .amt { font-weight: 650; font-size: 1.05rem; }
.tr .btn { flex: none; }
.rates { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.rate { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.rate .field { width: 130px; min-height: 40px; padding: 7px 10px; }
.rate span { white-space: nowrap; }
.bar { height: 8px; border-radius: 99px; background: var(--sunk); overflow: hidden; margin-top: 5px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }

.fab { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); bottom: calc(18px + var(--bottom-gap, 0px) + env(safe-area-inset-bottom, 0px)); z-index: 20;
  box-shadow: 0 6px 20px rgba(0,0,0,.18); border-radius: 999px; min-height: 54px; padding: 0 22px; font-size: 1rem; }

/* sheets: a bottom sheet on phones, a centred dialog on bigger screens */
.scrim { position: fixed; inset: 0; background: rgba(6, 10, 8, .46); z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.scrim.anim { animation: fade .18s ease-out; }
.scrim.anim .sheet { animation: up .32s cubic-bezier(.2, .9, .25, 1); }
/* closing: slide away, then the sheet is removed (closeSheet waits ~200 ms) */
.scrim.closing { animation: fade .2s ease-in reverse forwards; pointer-events: none; }
.scrim.closing .sheet { animation: down .2s cubic-bezier(.4, 0, 1, 1) forwards; }
/* dragging the sheet down by its top: it follows the finger */
.sheet.drag { transition: none !important; }
.sheet.back { transition: transform .25s cubic-bezier(.2, .9, .25, 1); }
.sheet { width: 100%; max-width: 560px; max-height: calc(100dvh - max(24px, env(safe-area-inset-top, 0px))); overflow: auto; overscroll-behavior: contain; background: var(--surface);
  border-radius: 20px 20px 0 0; padding: 6px 18px calc(18px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; }
.sheet .grab { width: 38px; height: 5px; border-radius: 9px; background: var(--line); margin: 4px auto 0; flex: none; position: relative; }
.sheet .grab::before { content: ""; position: absolute; inset: -14px -60px; } /* a bigger area to grab */
.sheet .grab, .sheet-h { touch-action: none; }
.sheet-h { display: flex; align-items: center; gap: 8px; position: sticky; top: -6px; background: var(--surface); padding: 6px 0; z-index: 2; }
.sheet-h h2 { font-size: 1.15rem; flex: 1; min-width: 0; }
.sheet p { margin: 0; color: var(--muted); font-size: .9rem; }
.sheet-foot { display: flex; gap: 8px; position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom, 0px)); background: var(--surface); padding: 10px 0 calc(18px + env(safe-area-inset-bottom, 0px)); margin-bottom: calc(-18px - env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); flex-wrap: wrap; }
.sheet-foot .btn { flex: 1; }
@media (min-width: 640px) {
  .scrim { align-items: center; padding: 24px; }
  .sheet { border-radius: 20px; padding-bottom: 18px; max-height: calc(100dvh - 48px); }
  .sheet .grab { display: none; }
  .sheet-foot { bottom: -18px; padding-bottom: 18px; margin-bottom: -18px; }
}
@keyframes up { from { transform: translateY(100%); } }
@keyframes down { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
@media (min-width: 640px) {
  @keyframes up { from { transform: translateY(16px) scale(.98); opacity: 0; } }
  @keyframes down { to { transform: translateY(12px) scale(.98); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) { .scrim.anim, .scrim.anim .sheet, .scrim.closing, .scrim.closing .sheet { animation: none; } }

/* expense editor */
.amount-row { display: flex; gap: 8px; align-items: stretch; }
.amount-row .cur { width: 104px; flex: none; font-weight: 550; }
.amount { font-size: 1.6rem !important; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; min-height: 56px; }
.calc { font-size: .82rem; color: var(--muted); min-height: 1.2em; margin-top: -8px; font-variant-numeric: tabular-nums; }
.title-row { display: flex; gap: 8px; align-items: center; }
.emoji-btn { width: 48px; height: 48px; border-radius: 13px; border: 1px solid var(--line); background: var(--sunk); font-size: 1.35rem; flex: none; padding: 0; }
.emojis { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.emojis button { border: 0; background: var(--sunk); border-radius: 10px; aspect-ratio: 1; font-size: 1.2rem; padding: 0; }
.emojis button.on { outline: 2px solid var(--accent); }
.splitrows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.refunds { display: grid; gap: 6px; margin-top: 12px; }
.srow { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); min-height: 52px; background: var(--surface); }
.srow:first-child { border-top: 0; }
button.srow { border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; color: var(--fg); }
.srow .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow .v { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; white-space: nowrap; }
.srow.on .v { color: var(--fg); font-weight: 550; }
.srow .box { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; }
.srow.on .box { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.srow .box .i { width: 14px; height: 14px; stroke-width: 3; }
.srow:not(.on) .box .i { display: none; }
.srow .field { width: 108px; min-height: 38px; padding: 6px 10px; text-align: right; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 1.1rem; line-height: 1; padding: 0; }
.stepper b { min-width: 24px; text-align: center; font-variant-numeric: tabular-nums; }
.status { font-size: .86rem; display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.status.bad { color: var(--neg); font-weight: 500; }
.quick { display: flex; gap: 6px; }
.items { display: flex; flex-direction: column; gap: 2px; font-size: .86rem; }
.items .it { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.items .it .n { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.items .dots { display: inline-flex; gap: 2px; }
.items .dots i { width: 9px; height: 9px; border-radius: 50%; }
details.more summary { cursor: pointer; color: var(--muted); font-size: .88rem; list-style: none; display: flex; align-items: center; gap: 6px; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary { margin-bottom: 8px; }
.meta { font-size: .78rem; color: var(--muted); }

.qr { background: #fff; border-radius: 14px; padding: 10px; width: min(240px, 70vw); margin: 0 auto; aspect-ratio: 1; display: grid; place-items: center; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr svg path, .qr svg rect { shape-rendering: crispEdges; }
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--sunk); border-radius: 12px; padding: 8px 8px 8px 12px; font-size: .86rem; }
.linkbox code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
.mrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.mrow:first-child { border-top: 0; }
.mrow .n { flex: 1; min-width: 0; }
.mrow .n small { display: block; color: var(--muted); font-size: .78rem; }
.who-list { display: flex; flex-direction: column; gap: 8px; }
.who-list .btn { justify-content: flex-start; gap: 12px; min-height: 56px; }
.danger-zone { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }

/* receipt scanner: full screen, outside the render loop so redraws don't wipe it */
receipt-splitter { --rs-bg: var(--bg); --rs-panel: var(--surface); --rs-ink: var(--fg); --rs-muted: var(--muted); --rs-line: var(--line);
  --rs-accent: var(--accent); --rs-on-accent: var(--accent-fg); --rs-info-bg: var(--accent-soft); --rs-info-ink: var(--fg); --rs-font: var(--font); --rs-radius: 14px; }
.rcpt { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: flex; flex-direction: column; }
.rcpt-top { display: flex; align-items: center; gap: 10px; padding: max(10px, env(safe-area-inset-top, 0px)) 16px 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
.rcpt-top h2 { font-size: 1.05rem; flex: 1; }
.rcpt-body { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; }
.rcpt-body receipt-splitter { max-width: 1100px; margin: 0 auto; }
.rcpt-load { padding: 40px 16px; text-align: center; color: var(--muted); }
.rcpt-bar { border-top: 1px solid var(--line); background: var(--surface); padding: 10px 16px max(10px, env(safe-area-inset-bottom, 0px)); }
.rcpt-bar .in { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rcpt-bar .field { width: auto; min-height: 42px; }
.rcpt-bar .grow { flex: 1 1 180px; }
.rcpt-bar .cur { width: 82px; text-transform: uppercase; }
.rcpt-bar .sum { font-size: .85rem; color: var(--muted); flex: 1 1 220px; }
.rcpt-bar .sum b { color: var(--fg); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .rcpt-bar .grow { flex: 1 1 100%; } .rcpt-bar .btn { margin-left: auto; } }

.toast { position: fixed; left: 16px; right: 16px; margin: 0 auto; width: fit-content; bottom: calc(88px + var(--bottom-gap, 0px) + env(safe-area-inset-bottom, 0px)); transform: translateY(12px); background: var(--fg); color: var(--bg);
  padding: 8px 8px 8px 16px; border-radius: 12px; font-size: .9rem; z-index: 50; max-width: 480px; display: flex; align-items: center; gap: 12px; min-height: 40px;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s, transform .2s, visibility 0s linear .2s; }
.toast.show { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: opacity .2s, transform .2s, visibility 0s; }
.toast:not(:has(button)) { padding-right: 16px; }
.toast button { border: 0; background: color-mix(in srgb, var(--bg) 18%, transparent); color: var(--bg); border-radius: 8px; padding: 5px 10px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
.foot { text-align: center; color: var(--muted); font-size: .78rem; margin-top: 40px; }
.foot a { color: var(--muted); }
/* the site's own picture (an animal on plans.ptpete.com) instead of the first letter */
.face.av svg { width: 62%; height: 62%; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- native feel ---------- */
/* no double-tap zoom delay, no text selection or callout when pressing buttons */
button, a, label, select, summary, .ent, .chip { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button, .ent, .chip { transition: transform .12s ease, background-color .12s ease, opacity .12s ease; }
button:active:not(:disabled), .chip:active { transform: scale(.96); }
.btn:active:not(:disabled) { opacity: .88; }
.ent:active { transform: scale(.985); background: color-mix(in srgb, var(--surface) 88%, var(--fg)); }
.tab:active, .iconbtn:active { opacity: .7; }
/* tab switches cross-fade (View Transitions, where the browser has them) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; }
@media (prefers-reduced-motion: reduce) { button, .ent, .chip { transition: none; } button:active, .ent:active, .chip:active { transform: none; } }
