/* Customer and merchant sheets share one fluid handset canvas on every screen. */
body:is([data-role=customer],[data-role=merchant]) {
  --handset:520px; --pad:clamp(12px,4vw,20px); --foot:calc(72px + env(safe-area-inset-bottom,0px));
  --ink:#152844; --muted:#526581; --line:#dce4ef; --accent:#214fc7; --soft:#edf2ff; --paper:#f6f8fc;
  font-variant-numeric:tabular-nums; background:#e9edf2; color:var(--ink);
}
body[data-role=merchant] {
  --ink:#17372d; --muted:#4f685b; --line:#d7e3d8; --accent:#176347; --soft:#e9f4e7; --paper:#f5f8f2;
}
body:is([data-role=customer],[data-role=merchant]) #app {
  max-width:var(--handset); min-height:100vh; min-height:100dvh; margin:auto;
  background:var(--paper); box-shadow:0 0 0 1px #18314512,0 0 40px #1831450c;
}
.phone-header.topbar {
  min-height:54px; height:auto; gap:10px; border:0; border-bottom:1px solid var(--line); background:#fff;
  padding:max(4px,env(safe-area-inset-top,0px)) max(var(--pad),env(safe-area-inset-right,0px)) 4px max(var(--pad),env(safe-area-inset-left,0px));
}
.phone-brand,.phone-tools,.phone-tool,.phone-menu-sheet a,.phone-menu-sheet button,.phone-page-title,.phone-page-title time,.phone-hero-label,.phone-wallet h2 {
  display:flex; align-items:center;
}
.phone-brand {gap:9px; min-width:0; color:var(--ink);text-decoration:none}
.phone-brand img {width:30px;height:30px;object-fit:contain}
.phone-brand>span {display:flex;align-items:baseline;column-gap:8px;flex-wrap:wrap}
.phone-brand b {font-size:17px;line-height:1.4}
.phone-brand small {font-size:11px;line-height:1.6}
.phone-tools {gap:3px}
.phone-tool {width:44px;height:44px;justify-content:center;background:transparent;border:0;border-radius:13px;color:var(--ink);cursor:pointer;position:relative;text-decoration:none}
.phone-tool:hover,.phone-menu[open] summary {background:var(--soft)}
.phone-tool svg {width:21px;height:21px}
.phone-tool i {position:absolute;left:9px;top:7px;width:7px;height:7px;border-radius:50%;background:var(--accent);border:1px solid #fff}
.phone-menu {position:relative}
.phone-menu summary {list-style:none}
.phone-menu summary::-webkit-details-marker {display:none}
.phone-menu-sheet {
  position:absolute;inset-inline-end:0;top:calc(100% + 5px);z-index:5;min-width:min(240px,80vw);max-height:70dvh;overflow:auto;
  background:white;color:var(--ink);padding:10px;border:1px solid var(--line);border-radius:17px;box-shadow:0 12px 30px #18314424;
}
.phone-menu-sheet>strong {display:block;font-size:13px;padding:5px 8px;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.phone-menu-sheet a,.phone-menu-sheet button {width:100%;min-height:44px;gap:10px;border:0;border-radius:8px;text-align:start;background:transparent;padding:5px 8px;text-decoration:none;color:var(--ink)}
.phone-menu-sheet a:hover,.phone-menu-sheet button:hover {background:var(--soft)}
.phone-menu-sheet svg {width:18px;height:18px;color:var(--accent)}
body[data-role=merchant] .phone-header {background:#113e30;color:#f2fcf4;border-color:#214d3c}
body[data-role=merchant] .phone-brand,body[data-role=merchant] .phone-header .phone-tool {color:#f2fcf4}
body[data-role=merchant] .phone-brand img {padding:6px;background:#f5fff4;border-radius:11px}
body[data-role=merchant] .phone-brand small {color:#bee2ce}
body[data-role=merchant] .phone-tool:hover,body[data-role=merchant] .phone-menu[open] summary {background:#285442}
.phone-shell.shell {
  display:block;max-width:none;padding:14px max(var(--pad),env(safe-area-inset-right,0px)) var(--foot) max(var(--pad),env(safe-area-inset-left,0px));
}
.phone-shell .content {min-width:0;overflow-wrap:anywhere;container-type:inline-size}
.phone-shell .grid.two,.phone-shell .grid.three,.phone-shell .grid.four {grid-template-columns:minmax(0,1fr);gap:12px}
.phone-shell .page-heading {flex-wrap:wrap;gap:8px;margin-bottom:12px;align-items:flex-start}
.phone-shell .page-heading h1 {font-size:21px}
.phone-shell .page-heading p {font-size:13px}
.phone-shell .panel {padding:clamp(12px,3.4cqi,16px);box-shadow:none;border-radius:12px}
.phone-shell .panel+.panel,.phone-shell .content>.panel+.panel {margin-top:12px}
.phone-shell .record {padding:11px;border-radius:8px}
.phone-shell .panel>.record {border:0;border-radius:0;padding:12px 0;background:transparent}
.phone-shell .panel>.record+.record {border-block-start:1px solid var(--line);margin-top:0}
.phone-shell .record-actions {margin-top:8px}
.phone-shell .record-head,.phone-shell .section-title,.phone-shell .toolbar,.phone-shell .row,.phone-shell .record-actions {flex-wrap:wrap;gap:8px}
.phone-shell .record-head>div,.phone-shell .section-title>* {min-width:0}
.phone-shell .record-actions button,.phone-shell .section-title>a {min-height:44px}
.phone-shell .field {margin-bottom:12px}
.phone-shell .grid .field:last-child {margin-bottom:0}
.phone-shell .section-title {margin-bottom:10px}
.phone-shell .section-title h2 {font-size:17px}
.phone-shell .section-title a {display:inline-flex;align-items:center;font-size:12px}
.phone-shell .notification>div,.phone-shell .ticket-message,.phone-shell .detail-grid>div {min-width:0}
.phone-shell .status {max-width:100%;white-space:normal}
.phone-shell .metrics,.phone-shell .metrics.customer-summary {grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:14px 0}
.phone-shell .metric {min-width:0;padding:12px;border-radius:15px}
.phone-shell .metric strong {font-size:clamp(17px,5cqi,23px);line-height:1.55}
.phone-shell .metric span {font-size:12px}
.phone-shell .detail-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 12px}
.phone-shell .empty {padding:10px 0;text-align:start;background:transparent;border:0}
.phone-shell .empty h3 {font-size:14px}
.phone-shell .empty p {margin:4px 0;font-size:13px}
.phone-shell .payment-plan {gap:10px;padding:13px;min-height:90px}
.phone-shell .payment-plan:has(input:checked) {padding:12px}
.phone-shell .schedule-preview li {flex-wrap:wrap;gap:5px}
.phone-shell .table-wrap {max-width:100%;overscroll-behavior-inline:contain}
.phone-page-title {justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:13px}
.phone-page-title>div span,.phone-page-title time,.phone-wallet>small,.phone-wallet-row small {font-size:12px;color:var(--muted)}
.phone-page-title h1 {font-size:clamp(26px,7cqi,32px);line-height:1.45}
.phone-page-title time {white-space:nowrap}
.phone-page-title svg {width:16px;height:16px}
.phone-card-hero,.phone-pos-hero.page-heading {isolation:isolate;position:relative;overflow:hidden;padding:20px;border-radius:23px;color:white}
.phone-card-hero {display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);align-items:center;min-height:211px;
  background:radial-gradient(ellipse at 5% 105%,#3859b8,transparent 60%),linear-gradient(120deg,#273d82,#102344 80%)}
.phone-card-hero::before {content:'';position:absolute;z-index:-1;inset:-45% 18% -58% -35%;transform:rotate(-14deg);background:repeating-radial-gradient(ellipse at 35% 90%,transparent 0 17px,#c4dfff19 18px,transparent 19px 25px)}
.phone-card-hero>div {min-width:0}
.phone-card-hero figure {margin:0;display:grid;place-items:center;min-width:0}
.phone-card-hero figure img {height:auto;width:min(100%,100px);transform:rotate(-11deg);filter:drop-shadow(0 12px 9px #0715295c)}
.phone-hero-label {gap:6px;font-size:12px;color:#d9e5ff}
.phone-hero-label svg,.phone-wallet h2 svg {width:19px;height:19px}
.phone-amount {display:block;font-size:clamp(24px,7cqi,37px);line-height:1.5;font-weight:700;margin:5px 0;letter-spacing:-.035em;overflow-wrap:anywhere}
.phone-amount small {font-size:.43em;font-weight:400;color:inherit;letter-spacing:0}
.phone-card-hero p,.phone-pos-hero.page-heading p {font-size:12px;color:#dce7fb;margin:0 0 12px}
.phone-card-cta,.phone-pos-cta,.phone-pos-alt {font-weight:700;font-size:13px;border:0;padding:7px 12px;border-radius:11px;min-height:44px}
.phone-card-cta {background:#fff;color:#163a89}
.phone-shortcuts {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;margin:13px 0;padding:9px 4px;border-radius:16px;background:white;border:1px solid var(--line)}
.phone-shortcuts a {min-width:0;text-align:center;text-decoration:none;display:grid;justify-items:center;gap:4px;font-weight:700;font-size:11px;color:var(--ink)}
.phone-shortcuts span,.phone-case-icon {display:grid;place-items:center;width:36px;height:36px;border-radius:10px;color:#2851ac;background:#eaf0ff}
.phone-shortcuts svg,.phone-case-icon svg {width:20px;height:20px}
.phone-shortcuts a:nth-child(2) span {color:#674694;background:#f3edfa}
.phone-shortcuts a:nth-child(3) span {color:#096e62;background:#e1f3ed}
.phone-shortcuts a:nth-child(4) span {color:#825d1c;background:#f7efdf}
.phone-case.panel {display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-top:11px}
.phone-case>div {min-width:0;flex:1}
.phone-case h3 {font-size:14px}
.phone-case p {font-size:12px;color:var(--muted)}
.phone-pos-hero.page-heading {display:block;min-height:190px;background:linear-gradient(110deg,#225f49,#133d30 78%)}
.phone-pos-hero>div:first-of-type {position:relative;max-width:70%}
.phone-pos-hero .phone-hero-label,.phone-pos-hero.page-heading p {color:#d9efdc}
.phone-receipt-art {position:absolute;inset-inline-end:4%;top:12px;width:clamp(72px,24%,109px);pointer-events:none}
.phone-pos-actions {position:relative;display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.phone-pos-cta {background:#def3b4;color:#16442d}
.phone-pos-alt {background:#254e3d;color:#f5fff4;box-shadow:inset 0 0 0 1px #6c8b75}
.phone-wallet {background:#eaf4e4}
.phone-wallet h2 {gap:7px;color:#194c35}
.phone-wallet-row {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0;border-top:1px solid #cadbc7;padding-top:10px}
.phone-wallet-row small,.phone-wallet-row b {display:block}
.phone-wallet-row small {font-size:11px}
.phone-footer {margin:0}
.phone-navigation.nav {display:block;overflow:visible;margin:0;padding:0}
.phone-inbox.nav,.phone-services.nav {margin:0;padding:0;overflow:visible}
.phone-inbox.nav {display:flex}
.phone-inbox.nav a {padding:0;min-height:44px;background:transparent}
.phone-services.nav {display:grid;gap:0;border-bottom:1px solid var(--line);padding-bottom:4px;margin-bottom:4px}
.phone-services.nav a,.phone-services.nav a.active {min-height:44px;white-space:normal;box-shadow:none}
.phone-menu-sheet .menu-exit {border-top:1px solid var(--line);border-radius:0}
.phone-tabs {
  display:grid;align-items:center;
  position:fixed;z-index:4;bottom:0;inset-inline:0;width:min(100%,var(--handset));margin-inline:auto;
  grid-template-columns:repeat(5,minmax(0,1fr));padding:5px max(4px,env(safe-area-inset-right,0px)) calc(5px + env(safe-area-inset-bottom,0px)) max(4px,env(safe-area-inset-left,0px));
  background:#fff;border:1px solid var(--line);border-bottom:0;
}
.phone-tabs a,.phone-tabs a.active {display:flex;flex-direction:column;justify-content:center;gap:0;min-width:0;min-height:48px;line-height:1.65;text-align:center;background:transparent;box-shadow:none;padding:1px;font-size:10.5px;white-space:normal}
.phone-tabs a span {display:grid;place-items:center;height:28px;width:39px;border-radius:10px}
.phone-tabs a.active span {background:#e6edff;color:#224fb4}
body[data-role=merchant] .phone-tabs {bottom:calc(7px + env(safe-area-inset-bottom,0px));width:calc(min(100%,var(--handset)) - 18px);background:#143e30;border:1px solid #23543e;border-radius:17px;padding-block:4px}
body[data-role=merchant] .phone-tabs a {color:#c6dace}
body[data-role=merchant] .phone-tabs a.active {color:#fff}
body[data-role=merchant] .phone-tabs a.active span {background:#305842;color:#eaf9e6}
body[data-role=merchant] .phone-tabs a[href='#invoices'] span {background:#d7edac;color:#143c24}
body:is([data-role=customer],[data-role=merchant]) .auth-layout {display:block;max-width:none;margin:0;padding:16px var(--pad) 28px;min-width:0}
body:is([data-role=customer],[data-role=merchant]) .auth-copy {margin:0 0 8px;padding:8px 2px;background:none;color:var(--ink)}
body:is([data-role=customer],[data-role=merchant]) .auth-copy img {display:none}
body:is([data-role=customer],[data-role=merchant]) .auth-copy h1 {font-size:22px;line-height:1.6;max-width:none}
body:is([data-role=customer],[data-role=merchant]) .auth-copy :is(p,.eyebrow) {margin:0;color:#e1eafa;font-size:12px}
body:is([data-role=customer],[data-role=merchant]) .auth-card {padding:16px}
body:is([data-role=customer],[data-role=merchant]) .field :is(input,select,textarea) {font-size:16px}
body:is([data-role=customer],[data-role=merchant]) #modal {
  position:fixed;inset:auto 0 0;width:min(100%,var(--handset));max-width:100%;margin:0 auto;max-height:calc(100dvh - max(12px,env(safe-area-inset-top,0px)));
  overflow:auto;overscroll-behavior:contain;border-radius:19px 19px 0 0;overflow-wrap:anywhere;
}
body:is([data-role=customer],[data-role=merchant]) #modal .modal-head {padding:16px}
body:is([data-role=customer],[data-role=merchant]) #modal .modal-body {padding:16px 16px max(20px,env(safe-area-inset-bottom,0px))}
body:is([data-role=customer],[data-role=merchant]) #modal .grid {grid-template-columns:minmax(0,1fr)}
body:is([data-role=customer],[data-role=merchant]) #modal .modal-foot {flex-wrap:wrap;gap:8px}
body:is([data-role=customer],[data-role=merchant]) #notice {max-width:calc(min(100%,var(--handset)) - 22px);bottom:var(--foot)}
@container (max-width:340px) {
  .phone-card-hero,.phone-pos-hero.page-heading {padding:15px}
  .phone-shell .metrics.customer-summary .metric {padding:10px}
  .phone-shell .record-head {gap:5px}
}
@media (max-height:460px) and (orientation:landscape) {
  .phone-card-hero,.phone-pos-hero.page-heading {min-height:145px;padding-block:13px}
  .phone-card-hero figure img {width:65px}
  .phone-tabs a,.phone-tabs a.active {min-height:44px}
}

.phone-menu-sheet a.phone-admin-link {display:none}
@media(min-width:1024px){.phone-menu-sheet a.phone-admin-link {display:flex}}
.phone-shell .service-next {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border-inline-start:4px solid var(--accent)}
.service-next>div {min-width:0}
.service-next>div>small {display:flex;align-items:center;gap:6px;color:var(--muted);font-weight:600}
.service-next>div>small svg {width:16px;height:16px}
.service-next>div>strong {display:block;font-size:23px;color:var(--ink)}
.service-next strong small,.service-next p {font-size:12px}
.phone-shell .service-next.due-alert {border-inline-start-color:#ad5824;background:#fff9ef}
.next-release {display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:5px;padding-block:9px;color:#28553b;border-top:1px solid #ceded1}
.settlement-calendar {list-style:none;margin:8px 0 0;padding:0}
.settlement-calendar li {display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;padding:10px 0;border-top:1px solid var(--line)}
.settlement-calendar li div {display:grid}.settlement-calendar li small {color:var(--muted)}
.merchant-filter-pair,.merchant-report-totals {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.merchant-report-totals {margin:12px 0;padding:0}
.merchant-report-totals>div {min-width:0;background:#f1f7f0;border-radius:10px;padding:8px 10px}
.merchant-report-totals>div:last-child {grid-column:1/-1;border-inline-start:3px solid var(--accent)}
.merchant-report-totals dt,.merchant-report-totals dd small {font-size:11px;color:var(--muted)}
.merchant-report-totals dd {margin:0;font-weight:700;overflow-wrap:anywhere}
.merchant-report-pages,.merchant-receipt-returns article>div {display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.merchant-report-pages {padding-top:12px}.merchant-report-pages button {min-height:44px}
.merchant-receipt-returns {border-block-start:1px solid var(--line);padding-block-start:12px;margin-block-start:16px}
.merchant-receipt-returns article {padding-block:6px}.merchant-receipt-returns .id {overflow-wrap:anywhere}

.phone-shell [data-store-id] [data-action="store-payment"] {max-width:100%;min-width:0;white-space:normal}
@container (max-width: 340px) {
  .merchant-filter-pair {grid-template-columns:minmax(0,1fr)}
}

.plan-offer .plan-price{font-weight:700;color:var(--ink)}
.plan-terms{margin-block:.65rem;line-height:1.85}
.plan-terms>summary{cursor:pointer;font-weight:600;padding-block:.45rem}
.plan-terms p{margin:.3rem 0}
.plan-offer .record-actions{display:flex;flex-wrap:wrap;gap:.5rem}
.phone-shell [data-autopay-history] [data-action="refresh-autopay"] {max-width:100%;min-width:0;white-space:normal}

/* Keep the payment link inside a narrow dialog and center its scannable code. */
body[data-role=merchant] #modal .qr-box{display:flex;justify-content:center;direction:ltr;width:100%;margin:20px 0}
body[data-role=merchant] #modal .qr-box~.field{grid-template-columns:minmax(0,1fr)}

/* Customer account and transaction ledger */
body[data-role=customer] .customer-overview .phone-card-hero {
  grid-template-columns:minmax(0,1fr) 70px;gap:12px;min-height:0;
  padding:16px 18px;border-radius:13px;background:#183967;
}
body[data-role=customer] .phone-card-hero::before {content:none}
body[data-role=customer] .phone-card-hero figure img {width:64px;transform:none;filter:none}
body[data-role=customer] .phone-card-hero .phone-card-cta,
body[data-role=customer] .phone-card-hero .secondary {min-height:44px;max-width:100%;padding:7px 14px;border:0;border-radius:8px;color:#163659;background:#fff}
body[data-role=customer] .customer-tools {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:0 12px;margin-bottom:8px}
body[data-role=customer] .customer-tools :is(a,button) {display:inline-flex;align-items:center;min-height:44px;border:0;background:transparent;padding:0;font:inherit;color:var(--accent);font-size:13px}
body[data-role=customer] .customer-tools .quiet {color:var(--muted)}
body[data-role=customer] .customer-case-note {margin:.4rem 0;color:var(--muted)}
body[data-role=customer] .customer-overview .service-next {margin:8px 0 0;padding:12px 14px;border-radius:9px;border-inline-start-width:3px}
body[data-role=customer] .customer-summary {margin:10px 0 0;border-block:1px solid var(--line)}
body[data-role=customer] .customer-summary summary {min-height:48px;display:flex;align-items:center;gap:8px;cursor:pointer;font-size:14px}
body[data-role=customer] .customer-summary summary strong {margin-inline-start:auto;color:var(--ink)}
body[data-role=customer] .customer-summary summary::after {content:'⌄';color:var(--muted)}
body[data-role=customer] .customer-summary[open] summary::after {transform:rotate(180deg)}
body[data-role=customer] .customer-summary dl {display:grid;gap:6px;padding:0 0 12px;margin:0;font-size:13px}
body[data-role=customer] .customer-summary dl div {display:flex;gap:8px;justify-content:space-between}
body[data-role=customer] .customer-summary dd {margin:0}
body[data-role=customer] :is(.customer-ledger,.customer-group,.customer-archive) {min-width:0;margin:0 0 16px}
body[data-role=customer] .customer-overview .customer-ledger {margin-top:14px}
body[data-role=customer] :is(.customer-ledger,.customer-group)>:is(h2,h3),
body[data-role=customer] .customer-ledger .section-title h2 {font-size:16px;line-height:1.7}
body[data-role=customer] .customer-group>h2 {margin-bottom:6px}
body[data-role=customer] .customer-ledger .section-title {margin:0}
body[data-role=customer] .customer-receipt {border-bottom:1px solid var(--line)}
body[data-role=customer] .customer-receipt>button {
  display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) 10px;align-items:center;gap:9px;
  width:100%;min-height:52px;padding:9px 0;text-align:start;white-space:normal;border:0;background:transparent;color:var(--ink);font:inherit;
}
body[data-role=customer] .receipt-party,body[data-role=customer] .receipt-value {display:block;min-width:0;overflow-wrap:anywhere}
body[data-role=customer] .receipt-party>*,body[data-role=customer] .receipt-value>strong {display:block}
body[data-role=customer] .receipt-value {text-align:end}
body[data-role=customer] .receipt-party small,body[data-role=customer] .receipt-value small,
body[data-role=customer] .customer-footnote {color:var(--muted);font-size:12px}
body[data-role=customer] .receipt-value .status {background:none;padding:0;font-size:11px}
body[data-role=customer] .receipt-arrow {font-size:20px;color:var(--muted)}
body[data-role=customer] .customer-archive>summary {min-height:44px;padding:10px 0;cursor:pointer}
body[data-role=customer] .customer-group>.record,body[data-role=customer] .customer-group .plan-offer {
  border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;padding:12px 0;margin:0;
}
body[data-role=customer] .customer-group .grid.two {gap:0}
body[data-role=customer] .customer-schedule .record-actions {align-items:center}
body[data-role=customer] .customer-schedule .servicing-details summary {cursor:pointer}
body[data-role=customer] .customer-footnote {margin:9px 0 0}

/* The merchant counter and register use ruled rows for balances and activity. */
body[data-role=merchant] .merchant-counter,
body[data-role=merchant] .merchant-balance,
body[data-role=merchant] .merchant-register {border-radius:14px;box-shadow:none}
body[data-role=merchant] .merchant-counter {background:linear-gradient(180deg,#f3f8f2,#fff 76%)}
body[data-role=merchant] .merchant-caption,
body[data-role=merchant] .merchant-wallet-line,
body[data-role=merchant] .merchant-wallet-lines>div {display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
body[data-role=merchant] .merchant-caption h2,
body[data-role=merchant] .merchant-wallet-line h2 {font-size:14px}
body[data-role=merchant] .merchant-caption>span:not(.status),
body[data-role=merchant] .merchant-wallet-line>div>span,
body[data-role=merchant] .merchant-entry-meta,
body[data-role=merchant] .merchant-subtotal {display:block;color:var(--muted);font-size:12px;font-weight:400}
body[data-role=merchant] .merchant-gross {color:var(--ink);font-size:clamp(27px,8cqi,36px);font-weight:700;line-height:1.5;margin:3px 0}
body[data-role=merchant] .merchant-gross small,
body[data-role=merchant] .merchant-wallet-line strong small,
body[data-role=merchant] .merchant-entry-line strong small,
body[data-role=merchant] .merchant-caption h3 small {font-size:.64em;font-weight:400}
body[data-role=merchant] .merchant-counter-actions {display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
body[data-role=merchant] .merchant-counter-actions button {min-height:44px}
body[data-role=merchant] .merchant-wallet-line {padding-block:10px 0;border-top:1px solid var(--line)}
body[data-role=merchant] .merchant-wallet-line strong {display:block;font-size:20px;line-height:1.5}
body[data-role=merchant] .merchant-wallet-line a,
body[data-role=merchant] .merchant-inline-action {display:inline-flex;align-items:center;justify-content:center;min-height:44px}
body[data-role=merchant] .merchant-wallet-lines {margin:12px 0 0;padding-block-start:6px;border-top:1px solid var(--line)}
body[data-role=merchant] .merchant-wallet-lines>div {padding-block:3px}
body[data-role=merchant] .merchant-wallet-lines dt,
body[data-role=merchant] .merchant-wallet-lines dd {margin:0;font-size:13px}
body[data-role=merchant] .merchant-wallet-lines dd {font-weight:700}
body[data-role=merchant] .merchant-balance .merchant-wallet-line {border:0;padding:0}
body[data-role=merchant] .merchant-balance .merchant-wallet-line strong {font-size:26px}
body[data-role=merchant] .merchant-entry,
body[data-role=merchant] .merchant-invoice-row,
body[data-role=merchant] .merchant-withdrawal-row {border-top:1px solid var(--line);padding-block:8px}
body[data-role=merchant] .merchant-receipt-link {position:absolute;inset:0;width:100%;height:100%;appearance:none;background:transparent;border:0;padding:0;cursor:pointer}
body[data-role=merchant] .merchant-entry-line {position:relative;display:grid;grid-template-columns:minmax(0,1fr) max-content 12px;align-items:center;gap:7px;min-height:48px;line-height:1.65}
body[data-role=merchant] .merchant-entry-line>span:first-child {min-width:0;overflow-wrap:anywhere}
body[data-role=merchant] .merchant-entry-line strong {display:block;font-size:17px}
body[data-role=merchant] .merchant-chevron {font-size:20px;color:var(--accent)}
body[data-role=merchant] .merchant-inline-action {background:transparent;border:0;color:var(--accent);font:inherit;font-size:12px;padding:0 4px;text-decoration:underline;text-underline-offset:3px}
body[data-role=merchant] .merchant-inline-action.danger {color:var(--danger,#973237)}
body[data-role=merchant] .merchant-invoice-details>summary,
body[data-role=merchant] .merchant-report-breakdown>summary {cursor:pointer;min-height:44px;align-content:center;color:var(--accent);font-size:13px}
body[data-role=merchant] .merchant-report-breakdown {border-top:1px solid var(--line);margin-block:4px 0}
body[data-role=merchant] .merchant-report-breakdown summary b {margin-inline-start:8px}
body[data-role=merchant] .merchant-report-totals {display:block;margin:0}
body[data-role=merchant] .merchant-report-totals>div,
body[data-role=merchant] .merchant-report-totals>div:last-child {display:flex;gap:8px;justify-content:space-between;flex-wrap:wrap;border:0;background:none;border-radius:0;padding:4px 0}
body[data-role=merchant] #merchant-sale-results {margin-top:12px;border-top:1px solid var(--line);padding-top:12px}
body[data-role=merchant] .merchant-blank {color:var(--muted);margin-block:8px}
body[data-role=customer] .customer-lock-line {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 12px;margin:8px 0}
body[data-role=customer] .customer-lock-line h2 {font-size:14px}
body[data-role=customer] .customer-lock-line button {min-height:44px}
body[data-role=customer] .customer-stores {margin-top:12px}
body[data-role=merchant] .merchant-account-editor>summary,
body[data-role=merchant] .merchant-account-extra>summary {min-height:44px;align-content:center;cursor:pointer;color:var(--accent);font-weight:600;font-size:13px}

/* Messages and settings share a single reading column, with details available inline. */
.phone-shell .notification.message-row {display:block;padding:10px 0}
.message-head,.message-actions {display:flex;align-items:baseline;justify-content:space-between;gap:6px 12px;flex-wrap:wrap}
.message-head h3 {font-size:14px}
.message-head time,.message-actions summary {font-size:11px;color:var(--muted)}
.message-actions {align-items:center}
.message-actions .secondary,.inbox-settings .secondary {border:0;background:transparent;color:var(--accent);padding-inline:0;min-height:44px}
.message-actions details {min-width:0;max-width:100%}
.message-actions bdi {overflow-wrap:anywhere;font-size:12px}
.message-actions summary,.inbox-settings summary {cursor:pointer;min-height:44px;align-content:center}
.inbox-settings {margin-block:8px;color:var(--muted);font-size:13px}

/* The catalogue is a deck of offers; the controls below describe only its front card. */
.plan-deck {max-width:440px;margin-inline:auto}
.plan-rail {--plan-peek:clamp(34px,10cqi,47px);display:grid;grid-template-columns:6% minmax(0,1fr) 6%;position:relative;isolation:isolate;align-items:center;overflow:hidden;padding:var(--plan-peek) 0;touch-action:pan-x pinch-zoom;user-select:none}
.plan-rail[data-single=true] {padding-block:12px;touch-action:auto}
.plan-face {--foil:#a7c8ff;--base:#213f81;--edge:#142744;grid-area:1/2;position:relative;isolation:isolate;display:flex;flex-direction:column;justify-content:space-between;gap:5px;width:100%;min-width:0;min-height:clamp(154px,47cqi,207px);padding:clamp(13px,4cqi,20px);border:1px solid #ffffff36;border-radius:17px;color:white;background:linear-gradient(115deg,var(--base),var(--edge));overflow:hidden;box-shadow:0 4px 10px #14243b24;transition:transform .28s ease-out,opacity .28s ease-out}
.plan-face[data-tone="1"] {--base:#21624e;--edge:#113e39;--foil:#a8f6d7}
.plan-face[data-tone="2"] {--base:#504b7c;--edge:#292944;--foil:#d7c9ff}
.plan-face::before {content:"";position:absolute;z-index:-1;inset:auto -12% -62% 12%;height:100%;transform:rotate(-9deg);border:1px solid var(--foil);border-radius:50%;box-shadow:0 -5px 0 transparent,0 -6px 0 var(--foil),0 -11px 0 transparent,0 -12px 0 var(--foil);opacity:.13;pointer-events:none}
.plan-face[data-position="active"] {z-index:2;transform:translateY(var(--plan-pull,0px))}
.plan-face[data-position="before"],.plan-face[data-position="after"] {z-index:1;opacity:.28;box-shadow:none}
.plan-face[data-position="before"] {transform:translateY(calc(0px - var(--plan-peek))) scale(.9)}
.plan-face[data-position="after"] {transform:translateY(var(--plan-peek)) scale(.9)}
.plan-face[data-position="away"] {visibility:hidden;pointer-events:none;opacity:0;transform:scale(.85)}
.plan-rail[data-dragging] .plan-face {transition:none}
.plan-face-top {display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.plan-face-top h3 {margin:0;min-width:0;color:inherit;font-size:clamp(13px,3.6cqi,16px);line-height:1.5;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.plan-signature {white-space:nowrap;display:flex;align-items:center;gap:4px;flex:none;font-size:12px;font-weight:700}
.plan-signature img {width:18px;height:18px;filter:brightness(0) invert(1)}
.plan-face-value {align-self:stretch;min-width:0}
.plan-face-value>small,.plan-face-term {display:block;color:#f1f4fa;font-size:12px}
.plan-face-value strong {display:block;color:white;font-size:clamp(21px,6.4cqi,32px);line-height:1.45;font-variant-numeric:tabular-nums}
.plan-face-value strong small {font-size:13px;font-weight:400;color:inherit}
.plan-engraving {position:absolute;z-index:-1;inset-inline-end:15px;bottom:8px;font-size:clamp(50px,15cqi,74px);line-height:1;opacity:.12;font-weight:700;pointer-events:none}
.plan-face-hit {position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:inherit;background:transparent;cursor:pointer}
.plan-face-hit:focus-visible {outline:3px solid #fff;outline-offset:-5px}
.plan-stepper {display:grid;grid-template-columns:5.25rem minmax(0,1fr) 5.25rem;align-items:center;gap:6px;padding-inline:2px}
.plan-stepper button.quiet {display:block;width:100%;min-width:0;min-height:44px;padding:4px;color:var(--accent);background:transparent}
.plan-stepper [data-plan-count] {font-size:12px;color:var(--muted);text-align:center;overflow-wrap:anywhere;min-width:0}
body[data-role=customer] .customer-group .plan-deck .plan-offer {border-top:1px solid var(--line);border-bottom:0;padding-block:10px}
.plan-deck .plan-offer p {margin-block:3px;font-size:13px}
.plan-deck .plan-offer .plan-terms {margin-block:2px}
.plan-deck .plan-offer .record-actions {margin-top:4px}
@media (prefers-reduced-motion:reduce) {.plan-face {transition:none}}

/* Spendable credit on the card, only this purchase's split below it. */
.phone-shell .checkout-deck {margin-block:12px 8px;padding:0;border:0;min-inline-size:0}
.phone-shell .checkout-deck legend {font-weight:700;font-size:15px;margin:0;padding:0}
.checkout-deck .plan-rail[data-single=true] {padding-block:8px}
.checkout-deck .checkout-terms,.checkout-deck [data-plan-status] {font-size:12px;margin:4px 0;color:var(--muted)}
.checkout-deck .checkout-split {margin:7px 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-block:1px solid var(--line);gap:8px;padding-block:7px}
.checkout-split dt {font-size:12px;color:var(--muted)}
.checkout-split dd {margin:0;font-weight:700;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.checkout-change-card {display:inline-block;min-height:44px;padding:0 8px;border:0;background:transparent;color:var(--accent);text-decoration:underline;font:inherit;font-size:12px}
