  :root {
    /* Zepto-register consumer palette: bold violet, soft tinted neutrals */
    --bg:            #F6F4FB;
    --surface:       #FFFFFF;
    --ink:           #211A35;
    --ink-2:         #4A4364;
    --ink-3:         #6F6889;   /* 5.2:1 on white */
    --border:        #ECE8F6;
    --border-strong: #D9D2EC;
    --chrome-deep:   #3B1380;
    --chrome:        #5417C9;
    --brand:         #6D28D9;
    --brand-hover:   #5B21B6;
    --brand-deep:    #4C1D95;
    --brand-tint:    #F1EBFD;
    --focus:         #8B5CF6;
    --brand-ring:    rgba(124,58,237,.25);
    --danger:        #DC2626;
    --danger-tint:   #FDECEC;
    --warn:          #B45309;
    --warn-tint:     #FEF4E5;

    --r-panel: 16px;
    --r-ctl:   10px;
    --r-btn:   14px;

    --shadow-panel: 0 1px 2px rgba(33,26,53,.04), 0 8px 24px -12px rgba(76,29,149,.14);
    --shadow-sheet: 0 -12px 40px rgba(33,26,53,.22);
    --shadow-bar:   0 -4px 20px rgba(33,26,53,.08);

    --ease-out: cubic-bezier(.22, 1, .36, 1);

    /* z scale */
    --z-bar: 20; --z-scrim: 30; --z-sheet: 40; --z-toast: 50;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }
  [hidden] { display: none !important; } /* survive display overrides like .dock-actions{display:flex} */
  html { -webkit-text-size-adjust: 100%; }

  body {
    font-family: "Manrope", -apple-system, Roboto, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    background: var(--bg);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.45;
    min-height: 100dvh;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: none;
  }

  button { font: inherit; cursor: pointer; user-select: none; -webkit-user-select: none; }
  ::placeholder { color: #828B9C; opacity: 1; }

  :focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
  }

  /* ============ app header ============ */
  .appbar {
    position: sticky; top: 0; z-index: var(--z-bar);
    background: linear-gradient(118deg, var(--chrome-deep) 0%, var(--chrome) 100%);
  }
  .appbar .in {
    max-width: 520px; margin: 0 auto;
    padding: 14px 16px 13px;
    display: flex; align-items: center; justify-content: space-between;
  }
  .brand-lockup h1 {
    font-size: 18px; font-weight: 800; letter-spacing: -.02em;
    color: #FFFFFF;
    line-height: 1.15;
  }
  .appbar .date {
    display: block;
    margin-top: 2px;
    font-size: 12.5px; font-weight: 600;
    color: rgba(255,255,255,.75);
    font-variant-numeric: tabular-nums;
  }
  .appbar .glyph {
    display: grid; place-items: center;
    width: 40px; height: 40px;
    border-radius: 13px;
    background: rgba(255,255,255,.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
    color: #FFFFFF;
  }

  /* ============ layout ============ */
  .wrap {
    max-width: 520px;
    margin: 0 auto;
    padding: 14px 16px calc(272px + env(safe-area-inset-bottom)); /* clears the fixed summary dock */
    display: flex; flex-direction: column; gap: 14px;
  }

  .panel {
    background: var(--surface);
    border-radius: var(--r-panel);
    box-shadow: var(--shadow-panel);
  }
  .sec-label {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 8px;
    padding: 6px 6px 10px;
  }
  .sec-label h2 {
    font-size: 15px; font-weight: 800;
    letter-spacing: -.015em;
    color: var(--ink);
    display: flex; align-items: center; gap: 8px;
  }
  .sec-label .count {
    min-width: 22px; height: 22px;
    padding: 0 7px;
    display: inline-grid; place-items: center;
    background: var(--brand-tint);
    border-radius: 99px;
    font-size: 12px; font-weight: 800; color: var(--brand-deep);
    font-variant-numeric: tabular-nums;
  }
  .sec-label .hint { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
  section + section { margin-top: 10px; }

  /* ============ items table ============ */
  .thead, .trow {
    display: grid;
    grid-template-columns: minmax(82px, 1.32fr) minmax(38px, .48fr) minmax(50px, .64fr) minmax(56px, .72fr) minmax(50px, .64fr);
    gap: 2px;
    align-items: center;
    padding-left: 10px;
    padding-right: 10px;
  }
  body.selecting .thead, body.selecting .trow {
    grid-template-columns: minmax(70px, 1.24fr) minmax(36px, .48fr) minmax(46px, .64fr) minmax(52px, .72fr) minmax(46px, .64fr) 30px;
    padding-right: 8px;
  }
  .sel-col { display: none; }
  body.selecting .sel-col { display: block; }
  .thead {
    height: 36px;
    border-bottom: 1px solid var(--border);
    background: #FAF8FE;
    border-radius: var(--r-panel) var(--r-panel) 0 0;
  }
  .thead span {
    font-size: 9px; font-weight: 800; letter-spacing: .01em;
    color: var(--ink-3); text-transform: uppercase;
    padding: 0 2px;
    white-space: nowrap;
  }
  .thead span.num { text-align: right; }

  .trow {
    padding-top: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
  }
  .trow.entering { animation: item-in .22s var(--ease-out) both; }
  @keyframes item-in {
    from { opacity: 0; translate: 0 6px; }
    to   { opacity: 1; translate: 0 0; }
  }
  .trow.removing { transition: opacity .16s var(--ease-out); opacity: 0; }

  .trow .vbtn,
  .trow input {
    width: 100%;
    min-width: 0;
    height: 42px;
    font: inherit;
    font-size: 16px;            /* ≥16px: no iOS focus zoom */
    font-weight: 500;
    color: var(--ink);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    padding: 0 6px;
    appearance: none;
    font-variant-numeric: tabular-nums;
    transition: border-color .14s var(--ease-out), box-shadow .14s var(--ease-out), background-color .14s var(--ease-out);
  }
  .trow input { text-align: right; }
  .trow .vbtn {
    display: flex; align-items: center; justify-content: space-between; gap: 4px;
    text-align: left;
  }
  .trow .vbtn > span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .trow .vbtn > svg { flex: none; color: var(--ink-3); }
  .trow .vbtn.empty > span { color: #828B9C; font-weight: 450; }
  .trow .vbtn:hover, .trow input:hover { background-color: var(--bg); }
  .trow .vbtn:focus-visible, .trow input:focus {
    outline: none;
    background-color: var(--brand-tint);
    border-color: var(--focus);
  }
  .trow input.warn, .trow .vbtn.warn {
    background-color: var(--warn-tint);
    border-color: #F0C36C;
  }

  /* variety picker sheet */
  .sheet-sm { max-height: 72dvh; }
  .vsearch {
    position: relative;
    display: flex; align-items: center;
    margin: 10px 16px 2px;
  }
  .vsearch svg {
    position: absolute; left: 12px;
    color: var(--ink-3);
    pointer-events: none;
  }
  .vsearch input {
    width: 100%;
    height: 44px;
    font: inherit; font-size: 16px; font-weight: 500;
    color: var(--ink);
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: var(--r-ctl);
    padding: 0 12px 0 38px;
    appearance: none;
    transition: border-color .14s var(--ease-out), background-color .14s var(--ease-out);
  }
  .vsearch input:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--focus);
  }
  .vlist { overflow-y: auto; padding: 6px 10px; }
  .vempty {
    padding: 18px 14px;
    font-size: 14px; font-weight: 500;
    color: var(--ink-3);
    text-align: center;
  }
  .vopt {
    width: 100%;
    height: 52px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 12px;
    border: 0; background: none;
    border-radius: var(--r-ctl);
    font-size: 16px; font-weight: 450;
    color: var(--ink);
    transition: background-color .12s var(--ease-out);
  }
  .vopt:hover { background: var(--bg); }
  .vopt:active { background: var(--brand-tint); }
  .vopt.sel { font-weight: 800; background: var(--brand-tint); }
  .vopt.sel svg { color: var(--brand); }
  .vadd {
    width: 100%;
    height: 58px;
    border: 0;
    border-top: 1px solid var(--border);
    background: none;
    color: var(--brand);
    font-size: 15.5px; font-weight: 800;
    display: flex; align-items: center; justify-content: center; gap: 7px;
    padding-bottom: env(safe-area-inset-bottom);
    transition: background-color .12s var(--ease-out);
  }
  .vadd:hover { background: var(--brand-tint); }
  .trow .wt {
    text-align: right;
    padding: 0 6px;
    font-size: 13.5px; font-weight: 500;
    color: var(--ink-2);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .trow .wt.zero { color: #828B9C; }
  .select-toggle {
    border: 0;
    background: var(--brand-tint);
    color: var(--brand-deep);
    font: inherit; font-size: 12.5px; font-weight: 800;
    padding: 5px 12px;
    border-radius: 99px;
    transition: background-color .14s var(--ease-out), scale .12s var(--ease-out);
  }
  .select-toggle:active { scale: .96; }
  .select-toggle[hidden] { display: none; }

  body.selecting .trow { cursor: pointer; }
  body.selecting .trow .vbtn,
  body.selecting .trow input { pointer-events: none; }
  .trow.selected { background: var(--brand-tint); }
  .row-check {
    width: 24px; height: 24px;
    justify-self: center;
    border-radius: 99px;
    border: 2px solid var(--border-strong);
    display: grid; place-items: center;
    color: transparent;
    transition: background-color .14s var(--ease-out), border-color .14s var(--ease-out);
  }
  .trow.selected .row-check {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
  }
  .btn-danger {
    flex: 1;
    height: 50px;
    font-size: 15.5px;
    color: #fff;
    background: var(--danger);
  }

  .ctl { position: relative; display: flex; align-items: center; flex: 1; }
  .ctl > input, .ctl > select {
    width: 100%;
    height: 44px;
    font: inherit;
    font-size: 16px;            /* ≥16px: no iOS focus zoom */
    font-weight: 450;
    color: var(--ink);
    background: #FAFBFC;
    border: 2px solid var(--border);
    border-radius: var(--r-ctl);
    padding: 0 10px;
    appearance: none;
    font-variant-numeric: tabular-nums;
    transition: border-color .14s var(--ease-out), background-color .14s var(--ease-out);
  }
  .ctl > input:hover, .ctl > select:hover { background: #F4F5F7; }
  .ctl > input:focus, .ctl > select:focus {
    outline: none;
    border-color: var(--focus);
    background: #fff;
  }
  .ctl > input.warn {
    background-color: var(--warn-tint);
    border-color: #F0C36C;
  }
  .ctl > select:invalid { color: #828B9C; font-weight: 450; }
  .ctl > select { padding-right: 38px; }
  .ctl .chev {
    position: absolute; right: 12px;
    color: var(--ink-3); pointer-events: none;
  }
  .ctl .prefix, .ctl .suffix {
    position: absolute;
    font-size: 14px; font-weight: 500; color: var(--ink-3);
    pointer-events: none;
  }
  .ctl .prefix { left: 13px; }
  .ctl .suffix { right: 12px; }
  .ctl input.has-prefix { padding-left: 30px; }
  .ctl input.has-suffix { padding-right: 42px; }

  .add-item {
    width: 100%;
    height: 54px;
    border: 0;
    background: none;
    color: var(--brand);
    font-size: 15px; font-weight: 800;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 0 0 var(--r-panel) var(--r-panel);
    transition: background-color .15s var(--ease-out);
  }
  .add-item:hover { background: var(--brand-tint); }
  .add-item:active { background: var(--brand-tint); }

  /* ============ summary dock ============ */
  .dock {
    position: fixed; left: 0; right: 0; bottom: 0;
    z-index: var(--z-bar);
    background: var(--surface);
    border-radius: 20px 20px 0 0;
    box-shadow: var(--shadow-bar);
  }
  .dock .in {
    max-width: 520px; margin: 0 auto;
    padding: 8px 16px calc(12px + env(safe-area-inset-bottom));
  }
  .sum-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 2px;
  }
  .sum-row + .sum-row { border-top: 1px solid var(--border); }
  .sum-row .k { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
  .sum-row .v {
    font-size: 14px; font-weight: 700;
    font-variant-numeric: tabular-nums;
  }
  .sum-row .ctl { flex: none; width: 124px; }
  .sum-row .ctl input { height: 40px; text-align: right; font-weight: 700; }
  .sum-row.total {
    background: var(--brand-tint);
    border-radius: 12px;
    padding: 9px 14px;
    margin-top: 8px;
    border-top: 0;
  }
  .sum-row.total .k { font-size: 14px; font-weight: 800; color: var(--brand-deep); }
  .sum-row.total .v {
    font-size: 22px; font-weight: 800; letter-spacing: -.02em;
    color: var(--brand-deep);
  }
  .dock-actions { display: flex; gap: 10px; margin-top: 10px; }
  @keyframes total-bump {
    0% { scale: 1; } 35% { scale: 1.04; } 100% { scale: 1; }
  }
  .sum-row.total .v.bump { animation: total-bump .26s var(--ease-out); }

  /* ============ buttons ============ */
  .btn {
    border: 0;
    border-radius: var(--r-btn);
    font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: background-color .14s var(--ease-out), scale .12s var(--ease-out), box-shadow .14s var(--ease-out), opacity .14s var(--ease-out);
  }
  .btn:active { scale: .97; }
  .btn:disabled { opacity: .5; pointer-events: none; }
  .btn-primary {
    flex: 1;
    height: 50px;
    font-size: 15.5px;
    color: #fff;
    background: var(--brand);
    box-shadow: 0 6px 16px -6px rgba(109,40,217,.5);
  }
  .btn-primary:hover { background: var(--brand-hover); }
  .btn-quiet {
    height: 50px;
    padding: 0 18px;
    font-size: 14.5px;
    color: var(--brand-deep);
    background: var(--brand-tint);
  }
  .btn-quiet:hover { background: #E7DDFB; }

  /* ============ sheet ============ */
  .scrim {
    position: fixed; inset: 0; z-index: var(--z-scrim);
    background: rgba(15,23,42,.44);
    opacity: 0; pointer-events: none;
    transition: opacity .22s var(--ease-out);
  }
  .scrim.open { opacity: 1; pointer-events: auto; }

  .sheet {
    position: fixed; left: 0; right: 0; bottom: 0;
    z-index: var(--z-sheet);
    margin: 0 auto;
    max-width: 520px;
    max-height: 90dvh;
    background: var(--surface);
    border-radius: 22px 22px 0 0;
    box-shadow: var(--shadow-sheet);
    translate: 0 104%;
    visibility: hidden; /* the big blur shadow leaks above the viewport edge when closed */
    transition: translate .3s var(--ease-out), visibility 0s .3s;
    display: flex; flex-direction: column;
  }
  .sheet.open {
    translate: 0 0;
    visibility: visible;
    transition: translate .3s var(--ease-out);
  }
  .sheet.dragging { transition: none; }
  .sheet-grab {
    flex: none;
    padding: 9px 0 3px;
    display: grid; place-items: center;
    touch-action: none;
    cursor: grab;
  }
  .sheet-grab::before {
    content: "";
    width: 38px; height: 4px;
    border-radius: 99px;
    background: var(--border-strong);
  }
  .sheet-head {
    flex: none;
    display: flex; align-items: center; justify-content: space-between;
    padding: 4px 18px 12px;
    border-bottom: 1px solid var(--border);
  }
  .sheet-head h2 { font-size: 17px; font-weight: 800; letter-spacing: -.015em; }
  .sheet-sub { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-top: 2px; }
  .sheet-close {
    width: 36px; height: 36px;
    margin: -4px -4px -4px 0;
    border: 0; border-radius: 99px;
    background: var(--bg);
    color: var(--ink-2);
    display: grid; place-items: center;
    transition: background-color .14s var(--ease-out), scale .12s var(--ease-out);
  }
  .sheet-close:active { scale: .94; }
  .sheet-close:hover { background: var(--border); }

  .sheet-body {
    overflow-y: auto;
    background: #EEF0F4;
    box-shadow: inset 0 1px 0 rgba(20,24,31,.04);
  }
  .paper-wrap { display: flex; justify-content: center; padding: 22px 16px 26px; }
  .paper {
    /* true 58mm proportions: 48mm print area + ~5mm margin per side */
    width: fit-content;
    background: #FEFEFC;
    color: #181A1D;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 13px;
    line-height: 1.5;
    padding: 16px 13px 6px;
    box-shadow:
      0 1px 2px rgba(15,23,42,.10),
      0 6px 16px -4px rgba(15,23,42,.16),
      0 16px 32px -12px rgba(15,23,42,.18);
    --notch: 8px;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--notch)),
      96.67% 100%, 93.33% calc(100% - var(--notch)), 90% 100%, 86.67% calc(100% - var(--notch)),
      83.33% 100%, 80% calc(100% - var(--notch)), 76.67% 100%, 73.33% calc(100% - var(--notch)),
      70% 100%, 66.67% calc(100% - var(--notch)), 63.33% 100%, 60% calc(100% - var(--notch)),
      56.67% 100%, 53.33% calc(100% - var(--notch)), 50% 100%, 46.67% calc(100% - var(--notch)),
      43.33% 100%, 40% calc(100% - var(--notch)), 36.67% 100%, 33.33% calc(100% - var(--notch)),
      30% 100%, 26.67% calc(100% - var(--notch)), 23.33% 100%, 20% calc(100% - var(--notch)),
      16.67% 100%, 13.33% calc(100% - var(--notch)), 10% 100%, 6.67% calc(100% - var(--notch)),
      3.33% 100%, 0 calc(100% - var(--notch)));
  }
  .paper pre { font: inherit; white-space: pre; overflow: hidden; }
  .paper .r-title { text-align: center; font-size: 16px; font-weight: 700; letter-spacing: .04em; }
  .paper .r-sub { text-align: center; font-size: 11px; color: #4A4E55; margin-bottom: 3px; }
  .paper .r-total {
    font-weight: 700;
    /* Font B doubled on the printer: 21 chars across the same width */
    font-size: 19.5px;
    line-height: 1.35;
    margin: 3px 0 2px;
  }
  .paper .pad-bottom { height: 24px; }

  .sheet-actions {
    flex: none;
    display: flex; flex-direction: column; gap: 9px;
    padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
  }
  .btn-bt {
    height: 54px; font-size: 16px; color: #fff; background: var(--brand);
    box-shadow: 0 6px 16px -6px rgba(109,40,217,.5);
  }
  .btn-bt:hover { background: var(--brand-hover); }
  .btn-sys { height: 48px; font-size: 15px; color: var(--brand-deep); background: var(--brand-tint); }
  .btn-sys:hover { background: #E7DDFB; }
  .bt-hint {
    font-size: 12.5px; color: var(--ink-3);
    text-align: center; text-wrap: pretty;
    padding: 0 6px;
  }

  /* ============ toast ============ */
  .toast {
    position: fixed; left: 50%;
    bottom: calc(262px + env(safe-area-inset-bottom)); /* above the summary dock */
    translate: -50% 10px;
    z-index: var(--z-toast);
    background: var(--ink);
    color: #fff;
    font-size: 14px; font-weight: 700;
    padding: 12px 18px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15,23,42,.32);
    opacity: 0; pointer-events: none;
    transition: opacity .2s var(--ease-out), translate .2s var(--ease-out);
    max-width: min(92vw, 440px);
    text-align: center;
  }
  .toast.show { opacity: 1; translate: -50% 0; }

  /* ============ confirm dialog ============ */
  dialog.confirm {
    margin: auto;            /* the * reset removes the UA centering; restore it */
    border: 0; border-radius: 20px;
    padding: 22px;
    width: min(92vw, 340px);
    box-shadow: 0 16px 48px rgba(33,26,53,.3);
  }
  dialog.confirm::backdrop { background: rgba(33,26,53,.5); }
  dialog.confirm h3 { font-size: 17px; font-weight: 800; letter-spacing: -.015em; margin-bottom: 6px; }
  dialog.confirm p { font-size: 14px; font-weight: 500; color: var(--ink-2); margin-bottom: 18px; }
  dialog.confirm .row { display: flex; gap: 9px; }
  dialog.confirm .row .btn { flex: 1; height: 48px; font-size: 14.5px; }
  dialog.confirm .danger { background: var(--danger); color: #fff; }
  dialog.confirm .brand { background: var(--brand); color: #fff; }
  dialog.confirm .neutral { background: var(--brand-tint); color: var(--brand-deep); }

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

  /* ============ print ============ */
  #print-area { display: none; }
  /* ============ desktop / web view ============ */
  .receipt-side { display: none; }
  .rate-unit { display: none; }
  .unit {
    display: inline;
    font-weight: 700;
    font-size: 8.5px;
    line-height: 1.05;
    letter-spacing: 0;
    text-transform: none;
    color: #9A93B5;
  }

  @media (max-width: 380px) {
    .thead, .trow {
      grid-template-columns: minmax(78px, 1.32fr) minmax(36px, .48fr) minmax(46px, .64fr) minmax(52px, .72fr) minmax(46px, .64fr);
      padding-left: 8px;
      padding-right: 8px;
    }
    .thead span { font-size: 8.4px; padding: 0 1px; }
    .trow .vbtn, .trow input { font-size: 15px; padding-left: 4px; padding-right: 4px; }
    .trow .vbtn { gap: 2px; }
  }
  .only-desktop { display: none; }

  @media (min-width: 920px) {
    .only-mobile { display: none; }
    .only-desktop { display: inline; }
  }

  @media (min-width: 920px) {
    body {
      background:
        radial-gradient(90% 360px at 50% 0, #ECE5FA 0%, var(--bg) 100%);
      background-repeat: no-repeat;
      background-color: var(--bg);
    }
    .appbar .in { max-width: 1140px; padding-left: 28px; padding-right: 28px; }
    .layout {
      max-width: 1140px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 400px;
      gap: 32px;
      align-items: start;
      padding: 30px 28px 56px;
    }
    .wrap {
      max-width: none;
      margin: 0;
      padding: 0;       /* no fixed dock to clear */
    }
    .side {
      position: sticky;
      top: 24px;
      display: flex;
      flex-direction: column;
      gap: 22px;
      max-height: calc(100dvh - 48px);
    }
    .dock {
      position: static;
      border-radius: 20px;
      box-shadow: var(--shadow-panel);
    }
    .dock .in { padding: 12px 20px 18px; }
    .sum-row { padding: 10px 2px; }
    .sum-row.total { margin-top: 10px; padding: 12px 16px; }
    .sum-row.total .v { font-size: 26px; }

    .receipt-side { display: block; min-height: 0; }
    .paper-host {
      background:
        radial-gradient(120% 80% at 50% 0, #EDEAF4 0%, #E4E0EE 100%);
      padding: 26px 20px 30px;
      display: flex;
      justify-content: center;
      overflow-y: auto;
      max-height: calc(100dvh - 360px);
    }
    .paper-host .paper { flex: none; }

    .rate-unit, .unit {
      display: inline;
      font-weight: 600;
      font-size: inherit;
      line-height: inherit;
      letter-spacing: 0;
      text-transform: none;
      color: #9A93B5;
    }

    .trow .vbtn, .trow input { height: 46px; }
    .thead { height: 40px; }
    .thead, .trow {
      grid-template-columns: minmax(76px, 1.2fr) minmax(42px, .46fr) minmax(58px, .64fr) minmax(68px, .78fr) minmax(60px, .7fr);
      gap: 2px;
      padding-left: 12px;
      padding-right: 12px;
    }
    body.selecting .thead, body.selecting .trow {
      grid-template-columns: minmax(70px, 1.2fr) minmax(40px, .46fr) minmax(54px, .64fr) minmax(62px, .78fr) minmax(56px, .7fr) 34px;
      padding-right: 8px;
    }
    .thead span {
      font-size: 11px;
      letter-spacing: .05em;
      padding: 0 6px;
    }
    .toast { bottom: 48px; }

    /* sheets become centered modals on desktop; slide-up is a thumb pattern */
    .sheet {
      top: 50%; left: 50%; right: auto; bottom: auto;
      width: 480px;
      max-height: 86dvh;
      border-radius: 20px;
      translate: -50% -46%;
      opacity: 0;
      transition: opacity .16s var(--ease-out), translate .16s var(--ease-out), visibility 0s .16s;
    }
    .sheet.open {
      translate: -50% -50%;
      opacity: 1;
      transition: opacity .2s var(--ease-out), translate .2s var(--ease-out);
    }
    .sheet-grab { display: none; }
    .sheet-head { padding-top: 18px; }
  }

  @media print {
    body * { display: none !important; }
    body { background: #fff; }
    #print-area, #print-area * { display: block !important; }
    #print-area {
      width: 58mm;
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      font-size: 11.5px; line-height: 1.45; color: #000;
    }
    #print-area pre { white-space: pre; font: inherit; margin: 0; }
    @page { size: 58mm auto; margin: 0; }
  }
