/* MERGE-O-MATIC 40: machine, paper and recording preview. Paper rows are a 42 column character grid. Print timing
   uses negative animation delays from the job start, so re-renders resume mid-print. Host pages may set --bg, --mono,
   --muted, --focus and --rm-sticky-top; the toolbar and dialog chrome below [data-chrome="kit"] are for hosts
   without their own buttons and dialog. */
.receipt-stage{display:grid;justify-items:center;gap:22px;padding:4px 0 48px}
.receipt-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;width:min(100%,760px)}
.rm{--rc-font:"OCR A Std","OCR A Extended","OCR-A",Menlo,"SF Mono","Courier New",monospace;--rc-size:12.5px;position:relative;display:grid;justify-items:center;width:min(100%,460px)}
.rm-dock{position:sticky;top:var(--rm-sticky-top,70px);z-index:5;display:grid;justify-items:center;width:100%}
.rm-machine{position:relative;z-index:3;width:100%;padding:16px 20px 0;border-radius:30px 30px 18px 18px;
 background:radial-gradient(120% 90% at 20% 0%,#c4b5fd 0%,transparent 55%),linear-gradient(165deg,#a78bfa 0%,#8b5cf6 35%,#6d28d9 75%,#4c1d95 100%);
 box-shadow:inset 0 2px 0 #ffffff66,inset 0 -8px 14px #2e106555,0 22px 34px -16px #2e1065aa,0 6px 14px #1b124633}
.rm-machine::before{content:"";position:absolute;left:24px;right:24px;top:6px;height:10px;border-radius:10px;background:linear-gradient(#ffffff55,#ffffff00);pointer-events:none}
.rm-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.rm-plate{font:800 11px/1 var(--mono,ui-monospace,"SF Mono",Menlo,Consolas,monospace);letter-spacing:.24em;color:#f5f3ff;padding:7px 11px;border-radius:8px;background:#2e106540;box-shadow:inset 0 1px 2px #0005,0 1px 0 #ffffff40;text-shadow:0 1px 0 #2e1065}
.rm-plate b{color:#6ee7b7}
/* A plain wrapper on the page background: the recorded video draws its own background. */
.rm-frame{display:grid;justify-items:center;width:min(100%,460px)}
/* Machine and paper show at 75%, as if the browser were zoomed out, so more of the paper is in view as it feeds.
   CSS zoom keeps layout, hit testing and text crisp. The sticky offset is in zoomed units, so it is scaled back to
   clear the app bar. Phones keep full size for readability. */
@supports (zoom:1){
 .rm-frame{--rm-zoom:.75;zoom:var(--rm-zoom)}
 .rm-frame .rm-dock{top:calc(var(--rm-sticky-top,70px) / var(--rm-zoom))}
 @media (max-width:600px){.rm-frame{--rm-zoom:1}}
}
/* The preview never widens the dialog: grid children may shrink below the video's own width, and the video fits. */
.rc-clip-dialog,.rc-clip-preview{min-width:0;max-width:100%}
/* One scroller at most, and the buttons always show: the dialog never scrolls, and a flex column down to the
   video lets the video give up height (letterboxed) before anything else is pushed out. The body only scrolls
   when even the smallest video does not fit. */
#modal[open]:has(.rc-clip-dialog){display:flex;flex-direction:column;max-height:90dvh;overflow:hidden}
#modal:has(.rc-clip-dialog) .modal-body{box-sizing:border-box;display:flex;flex-direction:column;flex:0 1 auto;min-height:0;max-height:90dvh;overflow:hidden auto;overscroll-behavior:contain}
.rc-clip-dialog{display:flex;flex-direction:column;flex:0 1 auto;min-height:0}
.rc-clip-dialog>*{flex:none}
.rc-clip-dialog>.rc-clip-preview{display:flex;flex-direction:column;align-items:center;gap:10px;flex:0 1 auto;min-height:0}
.rc-clip-preview>*{flex:none}
.rc-clip-preview video{display:block;flex:0 1 auto;width:auto;height:auto;max-width:100%;max-height:calc(90dvh - 250px);min-height:120px;object-fit:contain;border-radius:12px;background:#000;box-shadow:0 10px 28px -12px #000a}
.rc-clip-dialog .dialog-actions{flex-wrap:wrap}
html:has(#modal[open] .rc-clip-dialog){overflow:hidden}
@media (max-width:620px){.rc-clip-preview video{max-height:calc(90dvh - 330px)}}
.rc-clip-meta{font:600 12px/1.4 var(--mono,ui-monospace,"SF Mono",Menlo,Consolas,monospace);color:var(--muted,#6b7280);text-align:center;word-break:break-all}
/* Year menu: a listbox under the range group that floats over the machine and paper below it. */
.rc-island{z-index:8}
.rc-seg-wrap{position:relative;display:inline-flex}
.rc-year-btn .rc-caret{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;margin-left:-2px;transition:transform .15s}
.rc-year-btn[aria-expanded="true"] .rc-caret{transform:rotate(180deg)}
.rc-years{position:absolute;top:calc(100% + 6px);right:0;z-index:20;display:grid;gap:2px;min-width:112px;max-height:min(280px,60vh);overflow:auto;padding:5px;border-radius:12px;border:1px solid var(--line,#e5e7eb);background:var(--surface,var(--panel,#fff));color:var(--ink,#1f1b2e);box-shadow:0 16px 36px -14px #0006;overscroll-behavior:contain;animation:rc-years-in .14s ease-out}
.rc-years button{height:32px;padding:0 12px;border:0;border-radius:8px;background:none;color:inherit;font:600 13px/1 var(--sans,inherit);text-align:left;font-variant-numeric:tabular-nums;cursor:pointer}
.rc-years button:hover,.rc-years button:focus-visible{background:color-mix(in srgb,var(--accent,#7c3aed) 14%,transparent);outline:none}
.rc-years button[aria-selected="true"]{background:color-mix(in srgb,var(--accent,#7c3aed) 26%,transparent);font-weight:800}
@keyframes rc-years-in{from{opacity:0;transform:translateY(-4px)}}
@media (prefers-reduced-motion:reduce){.rc-years{animation:none}}
@media (max-width:620px){.receipt-controls .rc-lbl{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}}
.rm-rec{display:inline-flex;align-items:center;gap:4px;margin-left:8px;font:800 9px/1 var(--mono,ui-monospace,"SF Mono",Menlo,Consolas,monospace);letter-spacing:.14em;color:#fecaca;font-style:normal;vertical-align:1px}
.rm-rec b,.rc-rec-dot{width:7px;height:7px;border-radius:50%;background:#ef4444;box-shadow:0 0 6px #ef4444;animation:rc-rec 1.1s ease-in-out infinite}
.rc-rec.is-on{gap:6px;border-color:#ef444466;background:#ef44441a;color:#ef4444;font-family:var(--mono,ui-monospace,"SF Mono",Menlo,Consolas,monospace);font-weight:800;letter-spacing:.06em}
.rc-rec.is-on:hover{background:#ef44442e}
.rc-rec-stop{margin-left:4px;padding:1px 6px;border-radius:5px;background:#ef4444;color:#fff;font:700 11px/1.4 var(--sans,inherit);letter-spacing:0}
@keyframes rc-rec{50%{opacity:.25}}
@media (prefers-reduced-motion:reduce){.rm-rec b,.rc-rec-dot{animation:none}}
/* Share and Download hold their place until the receipt is torn off, then emerge; --rc-shown resumes it on re-render. */
.receipt-btn.rc-out.is-hidden{visibility:hidden}
.receipt-btn.rc-out.is-shown{animation:rc-emerge .45s cubic-bezier(.2,.9,.3,1.15) both;animation-delay:calc(180ms + var(--rc-i,0) * 110ms - var(--rc-shown,0ms))}
@keyframes rc-emerge{from{opacity:0;transform:translateY(8px) scale(.9)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.receipt-btn.rc-out.is-shown{animation:none}}
/* Dynamic island: PRINT gathers the toolbar into a pill that keeps the toolbar's space, and the finished print bubbles
   it back out. --rc-isl is ms since the last change, so re-renders resume the motion. */
.rc-island{position:relative;display:grid;width:min(100%,760px)}
.rc-island>.receipt-controls{width:100%}
.rc-island.is-gathered>.receipt-controls{pointer-events:none;animation:rc-isl-gather var(--rc-isl-in,.5s) var(--rc-isl-ease-in,cubic-bezier(.45,-.35,.3,1)) both;animation-delay:calc(var(--rc-isl-wait-in,0ms) - var(--rc-isl,0ms))}
.rc-island.is-bubbled>.receipt-controls{animation:rc-isl-bubble var(--rc-isl-out,.7s) ease-in-out both;animation-delay:calc(var(--rc-isl-wait-out,60ms) - var(--rc-isl,0ms))}
.rc-pill{position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:flex-end;gap:8px;width:118px;height:34px;margin:auto;padding:0 13px;border-radius:999px;background:#0c0a12;box-shadow:0 12px 26px -14px #0c0a12,inset 0 1px 0 #ffffff1f}
.rc-pill-dot{width:8px;height:8px;border-radius:50%;background:#34d399;box-shadow:0 0 8px #34d399;animation:rc-rec 1.1s ease-in-out infinite}
.rc-pill-dot.is-rec{background:#ef4444;box-shadow:0 0 8px #ef4444}
.rc-pill-stop{display:grid;place-items:center;width:22px;height:22px;margin-right:auto;padding:0;border:0;border-radius:50%;background:#ef4444;cursor:pointer}
.rc-pill-stop i{width:8px;height:8px;border-radius:2px;background:#fff}
.rc-pill-stop:focus-visible{outline:2px solid #fff;outline-offset:2px}
.rc-island.is-gathered .rc-pill{animation:rc-isl-pop .75s ease-in-out both;animation-delay:calc(180ms - var(--rc-isl,0ms))}
.rc-island.is-bubbled .rc-pill{pointer-events:none;animation:rc-isl-melt .3s cubic-bezier(.4,0,.2,1) both;animation-delay:calc(0ms - var(--rc-isl,0ms))}
/* A host island (islandPill:false) may set --rc-isl-x/-y/-sx/-sy on an ancestor to gather the toolbar into it, and
   --rc-isl-in/-out, --rc-isl-wait-in/-out and --rc-isl-ease-in to pace it. */
@keyframes rc-isl-gather{to{opacity:0;transform:translate(var(--rc-isl-x,0px),var(--rc-isl-y,0px)) scale(var(--rc-isl-sx,.16),var(--rc-isl-sy,.45))}}
@keyframes rc-isl-bubble{from{opacity:0;transform:translate(var(--rc-isl-x,0px),var(--rc-isl-y,0px)) scale(var(--rc-isl-sx,.16),var(--rc-isl-sy,.45))}40%{opacity:1;transform:scale(1.04,.96)}62%{transform:scale(.985,1.015)}82%{transform:scale(1.005,.998)}to{opacity:1;transform:none}}
@keyframes rc-isl-pop{from{opacity:0;transform:scale(.4,.7)}45%{opacity:1;transform:scale(1.1,.92)}68%{transform:scale(.96,1.04)}86%{transform:scale(1.015,.99)}to{opacity:1;transform:none}}
@keyframes rc-isl-melt{to{opacity:0;transform:scale(1.5,.85)}}
@keyframes rc-isl-fade-in{from{opacity:0}}
@keyframes rc-isl-fade-out{to{opacity:0}}
@media (prefers-reduced-motion:reduce){
 .rc-island.is-gathered>.receipt-controls,.rc-island.is-bubbled .rc-pill{animation:rc-isl-fade-out .18s ease both;animation-delay:calc(0ms - var(--rc-isl,0ms))}
 .rc-island.is-bubbled>.receipt-controls,.rc-island.is-gathered .rc-pill{animation:rc-isl-fade-in .18s ease both;animation-delay:calc(0ms - var(--rc-isl,0ms))}
 .rc-pill-dot{animation:none}
}
.rm-led-wrap{display:flex;align-items:center;gap:8px;font:800 9.5px var(--mono,ui-monospace,"SF Mono",Menlo,Consolas,monospace);letter-spacing:.16em;color:#ede9fe}
.rm-mute{display:grid;place-items:center;width:26px;height:22px;margin-right:4px;padding:0;border:0;border-radius:6px;color:#f5f3ff;background:#2e106540;box-shadow:inset 0 1px 2px #0005,0 1px 0 #ffffff40;cursor:pointer}
.rm-mute .icon{width:14px;height:14px}
/* PRINT: same material as the speaker key (translucent purple, inner highlight), lit with an emerald rim when ready. */
.rm-printkey{display:inline-flex;flex-direction:row;align-items:center;gap:6px;height:22px;margin:0 6px 0 0;padding:0 10px 0 8px;border:0;border-radius:6px;cursor:pointer;
 font:800 9.5px/1 var(--mono,ui-monospace,"SF Mono",Menlo,Consolas,monospace);letter-spacing:.16em;color:#f5f3ff;background:#2e106540;appearance:none;-webkit-appearance:none;
 box-shadow:inset 0 1px 2px #0005,0 1px 0 #ffffff40;transition:transform .06s,box-shadow .12s,background .12s}
.rm-printkey .icon{width:13px;height:13px;flex:none}
.rm-printkey span{display:inline-block;line-height:1}
.rm-printkey:hover:not(:disabled){background:#2e106580}
.rm-printkey.is-pressed,.rm-printkey:active:not(:disabled){transform:translateY(1px);box-shadow:inset 0 2px 4px #000a,0 0 0 #ffffff00}
.rm-printkey:focus-visible{outline:2px solid #f5f3ff;outline-offset:2px}
.rm-printkey:disabled{cursor:default;color:#c4b5fd;opacity:.55}
.rm-idle .rm-printkey:not(:disabled),.rm-ready .rm-printkey:not(:disabled),.rm-empty .rm-printkey:not(:disabled){box-shadow:inset 0 1px 2px #0005,0 1px 0 #ffffff40,0 0 0 1.5px #6ee7b7,0 0 10px 1px #34d39988}
.rm-idle .rm-led{background:#34d399;box-shadow:0 0 0 2px #2e1065,0 0 12px 3px #34d399bb}
.rm-idle .rm-printkey:not(:disabled){animation:rm-invite 1.6s ease-in-out infinite}
@keyframes rm-invite{50%{box-shadow:inset 0 1px 2px #0005,0 1px 0 #ffffff40,0 0 0 1.5px #a7f3d0,0 0 16px 3px #34d399bb}}
@media (prefers-reduced-motion:reduce){.rm-idle .rm-printkey{animation:none!important}}
.rm-mute[data-state="off"]{color:#c4b5fd;opacity:.75}
.rm-mute[data-state="locked"]{color:#fde68a;opacity:.85}
.rm-mute:hover{background:#2e106580}
.rm-mute:focus-visible{outline:2px solid #f5f3ff;outline-offset:2px}
.rm-led{width:12px;height:12px;border-radius:50%;background:#1e1036;box-shadow:inset 0 1px 3px #000c,0 0 0 2px #2e1065}
.rm-ready .rm-led{background:#34d399;box-shadow:0 0 0 2px #2e1065,0 0 12px 3px #34d399bb}
.rm-printing .rm-led,.rm-loading .rm-led{background:#f5f3ff;box-shadow:0 0 0 2px #2e1065,0 0 14px 4px #c4b5fd;animation:rm-blink .5s steps(2,jump-none) infinite}
.rm-warming .rm-led{background:#fde68a;box-shadow:0 0 0 2px #2e1065,0 0 12px 3px #fbbf24aa;animation:rm-blink .6s steps(2,jump-none) infinite}
.rm-warming .rm-head{opacity:.6;left:calc(50% - 10px);animation:rm-glow .75s ease-in-out infinite alternate}
.rm-empty .rm-led{background:#fbbf24;box-shadow:0 0 0 2px #2e1065,0 0 12px 3px #fbbf24bb}
.rm-error .rm-led{background:#f87171;box-shadow:0 0 0 2px #2e1065,0 0 12px 3px #f87171bb;animation:rm-blink 1.1s steps(2,jump-none) infinite}
.rm-face{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center}
.rm-lcd{position:relative;display:grid;gap:3px;min-width:0;padding:10px 13px;border-radius:10px;border:2px solid #2e1065;background:linear-gradient(#0a2618,#0f3a26);box-shadow:inset 0 3px 8px #000c,0 1px 0 #ffffff50;
 font:700 15px/1.15 var(--mono,ui-monospace,"SF Mono",Menlo,Consolas,monospace);letter-spacing:.1em;color:#86efac;text-shadow:0 0 7px #4ade80aa;overflow:hidden}
.rm-lcd::after{content:"";position:absolute;inset:0;background:repeating-linear-gradient(#0000 0 2px,#00000038 2px 3px);pointer-events:none}
.rm-lcd-main,.rm-lcd-sub{white-space:nowrap;overflow:hidden}
.rm-lcd-sub{font-size:10.5px;min-height:13px;color:#4ade80d0;letter-spacing:.12em}
.rm-loading .rm-lcd-main::after{content:"_";animation:rm-blink .9s steps(2,jump-none) infinite}
.rm-empty .rm-lcd{color:#fcd34d;text-shadow:0 0 7px #fbbf24aa}.rm-empty .rm-lcd-sub{color:#fcd34dcc}
.rm-error .rm-lcd{color:#fca5a5;text-shadow:0 0 7px #f87171aa}.rm-error .rm-lcd-sub{color:#fca5a5cc}
.rm-lcd-bar{display:block;height:6px;margin-top:4px;border-radius:2px;background:#052e1c;overflow:hidden}
.rm-lcd-bar b{display:block;height:100%;transform-origin:left;background:repeating-linear-gradient(90deg,#4ade80 0 6px,transparent 6px 8px);animation:rm-progress var(--rc-total) linear both;animation-delay:calc(0ms - var(--rc-el))}
.rm-keys{display:grid;grid-template-columns:repeat(4,18px);gap:7px}
.rm-keys i{width:18px;height:13px;border-radius:4px;background:#ede9fe;box-shadow:inset 0 -3px 0 #0002,0 2px 0 #2e1065}
.rm-keys .k1{background:#34d399}.rm-keys .k2{background:#60a5fa}.rm-keys .k3{background:#fbbf24}.rm-keys .k4{background:#f87171}.rm-keys .k5{background:#c4b5fd}
.rm-printing .rm-keys .k1{animation:rm-press .5s ease-in-out infinite alternate}
/* Keypad self-test while warming: a 900 ms uneven chase (offsets from KEY_CHASE_MS in receipt.js), then every key
   flashes just before the paper feeds. Both run on the warm-up clock, so a re-render picks up mid-sequence. */
.rm-warming .rm-keys{animation:rm-keys-flash var(--rc-warm) linear both;animation-delay:calc(0ms - var(--rc-el))}
.rm-warming .rm-keys i{animation:rm-key-lit .9s linear infinite;animation-delay:calc(var(--d) - var(--rc-el))}
.rm-warming .rm-keys i:nth-child(n+5){animation-name:rm-key-pale}
.rm-printing .rm-keys i:not(.k1){animation:rm-key-pulse 1.6s ease-in-out infinite alternate;animation-delay:calc(var(--d) * -2)}
.rm-ready .rm-keys i:nth-child(-n+4){box-shadow:inset 0 -3px 0 #0002,0 2px 0 #2e1065,0 0 7px 1px #ffffff40}
.rm-mouth{display:grid;place-items:center;height:28px;margin:16px -20px 0;border-radius:0 0 18px 18px;background:linear-gradient(#4c1d95,#2e1065);box-shadow:inset 0 3px 5px #0007}
.rm-slot{position:relative;width:calc(100% - 30px);height:8px;border-radius:5px;background:#05020d;box-shadow:inset 0 2px 3px #000,0 1px 0 #ffffff2a;overflow:hidden}
.rm-head{position:absolute;top:2px;bottom:2px;left:4px;width:20px;border-radius:3px;background:#6ee7b7;box-shadow:0 0 8px #34d399;opacity:0}
.rm-printing .rm-head{opacity:1;animation:rm-head .34s ease-in-out infinite alternate}
.rm-tearbar{position:relative;z-index:4;display:block;width:calc(42ch + 70px);max-width:calc(100% - 16px);height:13px;margin-top:-2px;padding:0;border:0;background:none;font:var(--rc-size) var(--rc-font);cursor:pointer}
.rm-tearbar:disabled{cursor:default}
.rm-tearbar:focus-visible{outline:none;box-shadow:var(--focus,0 0 0 3px #8b5cf666);border-radius:4px}
.rm-teeth{display:block;height:100%;border-radius:3px 3px 0 0;background:linear-gradient(#f3f4f6,#9ca3af 70%,#6b7280);
 -webkit-mask:linear-gradient(#000 0 0) top/100% 6px no-repeat,conic-gradient(from -45deg at bottom,#0000,#000 1deg 89deg,#0000 90deg) bottom/8px 8px repeat-x;
 mask:linear-gradient(#000 0 0) top/100% 6px no-repeat,conic-gradient(from -45deg at bottom,#0000,#000 1deg 89deg,#0000 90deg) bottom/8px 8px repeat-x}
.rm-tearbar:not(:disabled):hover .rm-teeth{background:linear-gradient(#fff,#c4b5fd 70%,#8b5cf6)}
.rm-feed{position:relative;z-index:2;display:grid;justify-items:center;width:100%;min-height:24px;margin-top:-9px}
.rm-stub{display:none;height:10px;width:calc(42ch + 40px);max-width:calc(100% - 24px);font:var(--rc-size) var(--rc-font);background:#fff;
 -webkit-mask:linear-gradient(#000 0 0) top/100% 4px no-repeat,conic-gradient(from -45deg at bottom,#0000,#000 1deg 89deg,#0000 90deg) bottom/10px 10px repeat-x;
 mask:linear-gradient(#000 0 0) top/100% 4px no-repeat,conic-gradient(from -45deg at bottom,#0000,#000 1deg 89deg,#0000 90deg) bottom/10px 10px repeat-x}
.rm.is-torn .rm-stub{display:block;position:absolute;top:0;left:50%;transform:translateX(-50%)}
.rm-paper{max-width:calc(100% - 8px);transform-origin:50% 0;filter:drop-shadow(0 10px 14px #1b124633) drop-shadow(0 1px 1px #1b124626)}
.rm-printing .rm-paper{animation:rc-jitter .1s steps(2,jump-none) infinite}
.rm-printing .rm-machine{animation:rm-shake .15s linear infinite}
.rm-paper.is-torn{animation:rc-tear 1s cubic-bezier(.25,.9,.3,1.05) both;animation-delay:calc(0ms - var(--rc-tel))}
.rm.is-torn .rm-feed{padding:14px 0 52px}

.receipt{--rc-ink:#16150f;--rc-soft:#4b4a43;--rc-add:#0b6b45;--rc-del:#a3221b;--lh:17px;
 width:calc(42ch + 40px);max-width:100%;padding:12px 20px 22px;border-radius:0 0 16px 16px;overflow:hidden;
 font:600 var(--rc-size)/var(--lh) var(--rc-font);color:var(--rc-ink);letter-spacing:0;font-variant-ligatures:none;
 background:linear-gradient(#00000014,#0000 18px),repeating-linear-gradient(0deg,#0000 0 2px,#8a846f06 2px 3px),#fff}
[data-theme="dark"] .receipt{background:linear-gradient(#0000001f,#0000 18px),repeating-linear-gradient(0deg,#0000 0 2px,#8a846f08 2px 3px),#f7f6f1}
.rm-paper.is-torn .receipt{padding-top:20px;border-radius:0 0 16px 16px;
 -webkit-mask:linear-gradient(#000 0 0) bottom/100% calc(100% - 7px) no-repeat,conic-gradient(from 135deg at top,#0000,#000 1deg 89deg,#0000 90deg) top/14px 14px repeat-x;
 mask:linear-gradient(#000 0 0) bottom/100% calc(100% - 7px) no-repeat,conic-gradient(from 135deg at top,#0000,#000 1deg 89deg,#0000 90deg) top/14px 14px repeat-x}
.rc-r{height:calc(var(--lh) * var(--h,1));overflow:hidden;white-space:pre}
.rc-t{display:block}
.rc-c{text-align:center}
.rc-s2{--h:2}.rc-s4{--h:4}
.rc-s2 .rc-t{font-size:calc(var(--rc-size) * 1.9);line-height:calc(var(--lh) * 2);font-weight:800}
.rc-title .rc-t{font:800 24px/calc(var(--lh) * 2) "Arial Narrow","Helvetica Neue",Arial,sans-serif;letter-spacing:.005em;white-space:nowrap}
.rc-title.rc-small .rc-t{font-size:19px}
.rc-sold .rc-t{letter-spacing:.02em}
.rc-stamp .rc-t{color:var(--rc-del)}
.rc-dept .rc-t{font-weight:800}
.rc-s4 .rc-t{display:flex;align-items:center;justify-content:center;height:100%}
.rc-code{display:block;width:86%;height:60px}
.receipt a{color:inherit;text-decoration:none}
.receipt a:hover{text-decoration:underline;text-underline-offset:2px}
.receipt a:focus-visible{outline:2px solid var(--amethyst,#7c3aed);outline-offset:1px;border-radius:2px}
.rc-item{font-weight:800}
.rc-fine{color:var(--rc-soft);font-weight:500}
.rc-link{text-decoration:underline dotted!important;text-underline-offset:2px}
.rc-add,.rc-ok{color:var(--rc-add)}.rc-del{color:var(--rc-del)}.rc-warn{color:#8a5300}
.rc-strong{font-weight:800}
.rc-flag{font-weight:800}
.rc-check{position:relative}
.rc-check svg{position:absolute;left:-25%;top:50%;width:150%;aspect-ratio:1;transform:translateY(-50%);overflow:visible;fill:none;stroke:var(--rc-add);stroke-width:1.9;stroke-linecap:square;stroke-linejoin:miter}
.rc-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
/* The paper feeds out of the slot bottom first: the last row starts at --t 0 and the header comes out last. A row
   not yet printed has no height, so the row feeding always sits at the top of the paper, right under the slot, and
   grows over its own --d (linear, so the paper moves continuously) while the printed rows slide down below it.
   --rc-el is how far the feed has run, so a re-render resumes exactly where it was. */
.rm.is-printing .rc-r{animation:rc-feed var(--d) linear both;animation-delay:calc(var(--t) - var(--rc-el))}
/* Like a thermal head, a whole line prints at once across the full width, one dot row after another from the top,
   so no glyph is ever cut sideways. It inks over the last --i of its feed, so the ink never runs past the paper
   already out of the slot. The barcode inks over its whole slower feed. */
.rm.is-printing .rc-t{animation:rc-ink var(--i) linear both;animation-delay:calc(var(--t) + var(--d) - var(--i) - var(--rc-el))}
/* Reduced motion: the finished receipt fades in and is torn off without the drop. --rc-calm is ms since it
   appeared, so re-renders never replay the fade. A fade is not motion, so its duration outranks a host page rule
   that cuts every animation short under reduced motion. */
.rm-paper.is-calm{animation:rc-fade .4s ease both;animation-duration:.4s!important;animation-delay:calc(0ms - var(--rc-calm,0ms))}
.rm-paper.is-calm.is-torn{animation:none}
@keyframes rc-fade{from{opacity:0}}
@keyframes rc-feed{from{height:0}}
@keyframes rc-ink{from{clip-path:inset(0 0 100% 0)}to{clip-path:inset(0 0 0 0)}}
@keyframes rc-jitter{from{transform:translateX(-.5px)}to{transform:translateX(.5px)}}
@keyframes rm-shake{0%,100%{transform:none}25%{transform:translate(.7px,-.4px) rotate(.12deg)}50%{transform:translate(-.6px,.3px)}75%{transform:translate(.4px,.5px) rotate(-.1deg)}}
@keyframes rm-head{from{left:4px}to{left:calc(100% - 24px)}}
@keyframes rm-progress{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes rm-blink{50%{opacity:.25}}
@keyframes rm-glow{from{opacity:.2}to{opacity:.8}}
@keyframes rm-key-lit{0%,26%{filter:brightness(1.55) saturate(1.3);box-shadow:inset 0 -1px 0 #0002,0 0 10px 3px #ffffffaa,0 1px 0 #2e1065;transform:translateY(1px)}32%,100%{filter:brightness(.72);box-shadow:inset 0 -3px 0 #0002,0 2px 0 #2e1065}}
@keyframes rm-key-pale{0%,18%{background:#fff;box-shadow:0 0 9px 2px #ede9fecc,0 1px 0 #2e1065;transform:translateY(1px)}24%,100%{background:#a78bfa;box-shadow:inset 0 -3px 0 #0002,0 2px 0 #2e1065}}
@keyframes rm-keys-flash{0%,90%{filter:none}91%,97%{filter:brightness(1.45) drop-shadow(0 0 6px #fff)}100%{filter:none}}
@keyframes rm-key-pulse{from{filter:brightness(.85)}to{filter:brightness(1.15)}}
@media (prefers-reduced-motion:reduce){
 .rm-warming .rm-keys,.rm-warming .rm-keys i,.rm-printing .rm-keys i{animation:none!important}
 .rm-warming .rm-keys i{filter:brightness(1.2);box-shadow:inset 0 -3px 0 #0002,0 2px 0 #2e1065,0 0 8px 2px #ffffff66}
}
@keyframes rm-press{to{transform:translateY(2px);box-shadow:inset 0 -1px 0 #0002,0 0 0 #2e1065}}
@keyframes rc-tear{0%{transform:none}12%{transform:translateY(5px) rotate(calc(.7deg * var(--rc-tilt,1)))}28%{transform:translate(2px,-3px) rotate(calc(-.5deg * var(--rc-tilt,1)))}100%{transform:translate(12px,34px) rotate(calc(-2.8deg * var(--rc-tilt,1)))}}
@media (max-width:820px){
 .rm{--rc-size:11px}
 .receipt{--lh:15px;padding:10px 12px 18px}
 .rm-stub{width:calc(42ch + 24px)}
 .rm-machine{padding:14px 14px 0;border-radius:24px 24px 16px 16px}
 .rm-mouth{margin:14px -14px 0}
 .rm-keys{grid-template-columns:repeat(4,14px);gap:5px}.rm-keys i{width:14px;height:11px}
 .rm-lcd{font-size:13px;padding:8px 10px}
 .rc-title .rc-t{font-size:20px}.rc-title.rc-small .rc-t{font-size:16px}
 .receipt-controls .toolbar-spacer,.receipt-controls .receipt-spacer{display:none}
}
.receipt-controls .receipt-spacer{flex:1 1 auto}
@media print{
 .receipt-controls,.rc-pill,.rc-island-status,.rm-machine,.rm-tearbar,.rm-stub,.receipt-toast{display:none!important}
 .rm-feed,.rm-frame{margin:0!important;padding:0!important}
 .rm-frame{zoom:1!important}
 .rm-dock{position:static!important}
 .rm-paper{animation:none!important;transform:none!important;filter:none!important}
 .rm .rc-r,.rm .rc-t{animation:none!important;clip-path:none!important}
 .receipt{border:1px solid #ddd;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* Kit chrome: range buttons, toolbar buttons, the dialog and the toast, for hosts that do not bring their own. */
.receipt-stage[data-chrome="kit"],.receipt-dialog,.receipt-toast{--rk-ink:var(--ink,#1f1b2e);--rk-muted:var(--muted,#6b7280);--rk-line:var(--line,#e5e1f0);--rk-panel:var(--panel,#fff);--rk-accent:var(--accent,#7c3aed);
 font-family:var(--sans,"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif)}
.receipt-stage[data-chrome="kit"] .icon,.receipt-dialog .icon,.receipt-toast .icon{width:16px;height:16px;flex:none}
.receipt-stage[data-chrome="kit"] .receipt-seg{display:inline-flex;gap:2px;padding:3px;border-radius:12px;background:var(--rk-panel);border:1px solid var(--rk-line)}
.receipt-stage[data-chrome="kit"] .receipt-seg button{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border:0;border-radius:9px;background:none;color:var(--rk-muted);font-family:inherit;font-weight:600;font-size:13px;line-height:1;cursor:pointer}
.receipt-stage[data-chrome="kit"] .receipt-seg button:hover{color:var(--rk-ink);background:#8b5cf612}
.receipt-stage[data-chrome="kit"] .receipt-seg button[aria-pressed="true"]{background:var(--rk-accent);color:#fff}
.receipt-stage[data-chrome="kit"] .receipt-seg .count{padding:1px 6px;border-radius:999px;background:#10b98122;color:#047857;font-family:inherit;font-weight:700;font-size:11px;line-height:1.4}
.receipt-stage[data-chrome="kit"] .receipt-seg button[aria-pressed="true"] .count{background:#ffffff33;color:#fff}
.receipt-stage[data-chrome="kit"] .receipt-seg button:focus-visible,.receipt-stage[data-chrome="kit"] .receipt-btn:focus-visible,.receipt-dialog .rcd-btn:focus-visible{outline:2px solid var(--rk-accent);outline-offset:2px}
.receipt-stage[data-chrome="kit"] .receipt-btn,.receipt-dialog .rcd-btn{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 12px;border:1px solid var(--rk-line);border-radius:10px;background:var(--rk-panel);color:var(--rk-ink);font-family:inherit;font-weight:600;font-size:13px;line-height:1;cursor:pointer}
.receipt-stage[data-chrome="kit"] .receipt-btn:hover:not(:disabled),.receipt-dialog .rcd-btn:hover:not(:disabled){border-color:#8b5cf666}
.receipt-stage[data-chrome="kit"] .receipt-btn:disabled,.receipt-dialog .rcd-btn:disabled{opacity:.5;cursor:default}
.receipt-dialog .rcd-btn.is-primary{background:var(--rk-accent);border-color:var(--rk-accent);color:#fff}
@media (max-width:620px){.receipt-stage[data-chrome="kit"] .receipt-seg button{padding:0 9px}}
.receipt-dialog{width:min(520px,calc(100vw - 32px));max-height:90dvh;padding:0;border:1px solid var(--rk-line);border-radius:18px;background:var(--rk-panel);color:var(--rk-ink);box-shadow:0 30px 80px -20px #1b124680;overflow:hidden}
.receipt-dialog[open]{display:flex;flex-direction:column}
.receipt-dialog::backdrop{background:#0b0d14aa;backdrop-filter:blur(2px)}
.receipt-dialog-x{position:absolute;top:12px;right:12px;display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:9px;background:none;color:var(--rk-muted);cursor:pointer}
.receipt-dialog-x:hover{background:#8b5cf612;color:var(--rk-ink)}
.receipt-dialog-body{box-sizing:border-box;display:flex;flex-direction:column;min-height:0;max-height:90dvh;padding:22px;overflow:hidden auto;overscroll-behavior:contain}
.receipt-dialog .rcd-form{display:grid;gap:16px}
.receipt-dialog .rcd-head{display:flex;gap:12px;align-items:flex-start;padding-right:32px}
.receipt-dialog .rcd-head h2{margin:0 0 4px;font-size:18px;line-height:1.25}
.receipt-dialog .rcd-head p{margin:0;color:var(--rk-muted);font-size:13.5px;line-height:1.45}
.receipt-dialog .rcd-icon{display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:10px;background:#ef444418;color:#ef4444}
.receipt-dialog .rcd-section{display:grid;gap:12px}
.receipt-dialog .rcd-hint{margin:0;color:var(--rk-muted);font-size:13px;line-height:1.5}
.receipt-dialog .rcd-error{margin:0;min-height:0;color:#b91c1c;font-size:13px}
.receipt-dialog .rcd-error:empty{display:none}
.receipt-dialog .rcd-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.receipt-dialog .switch-row{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--rk-line);border-radius:12px;cursor:pointer}
.receipt-dialog .switch-row input{position:absolute;opacity:0;width:1px;height:1px}
.receipt-dialog .switch{position:relative;flex:none;width:38px;height:22px;border-radius:999px;background:#d4d0e0;transition:background .15s}
.receipt-dialog .switch::after{content:"";position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px #0004;transition:transform .15s}
.receipt-dialog .switch-row input:checked+.switch{background:var(--rk-accent)}
.receipt-dialog .switch-row input:checked+.switch::after{transform:translateX(16px)}
.receipt-dialog .switch-row input:focus-visible+.switch{outline:2px solid var(--rk-accent);outline-offset:2px}
.receipt-dialog .switch-row strong{display:block;font-size:14px}
.receipt-dialog .switch-row small{display:block;color:var(--rk-muted);font-size:12.5px}
.receipt-dialog .switch-row.is-disabled{opacity:.6;cursor:default}
.receipt-dialog .rcd-modes{display:grid;gap:8px;margin:0;padding:0;border:0;min-width:0}
.receipt-dialog .rcd-modes legend{margin-bottom:8px;padding:0;font-size:13px;font-weight:600;color:var(--rk-muted)}
.receipt-dialog .rcd-mode{display:flex;align-items:flex-start;gap:12px;padding:12px;border:1px solid var(--rk-line);border-radius:12px;cursor:pointer}
.receipt-dialog .rcd-mode:has(input:checked){border-color:var(--rk-accent);box-shadow:inset 0 0 0 1px var(--rk-accent)}
.receipt-dialog .rcd-mode input{flex:none;margin:2px 0 0;accent-color:var(--rk-accent)}
.receipt-dialog .rcd-mode strong{display:block;font-size:14px}
.receipt-dialog .rcd-mode small{display:block;color:var(--rk-muted);font-size:12.5px;line-height:1.45}
.receipt-dialog .rcd-mode.is-disabled{opacity:.6;cursor:default}
.receipt-dialog:has(.rc-clip-dialog) .receipt-dialog-body{overflow:hidden auto}
.receipt-dialog .rc-clip-dialog{display:flex;flex-direction:column;flex:0 1 auto;min-height:0}
.receipt-dialog .rc-clip-dialog>.rc-clip-preview{display:flex;flex-direction:column;align-items:center;gap:10px;flex:0 1 auto;min-height:0}
html:has(.receipt-dialog[open] .rc-clip-dialog){overflow:hidden}
.receipt-toast{position:fixed;left:50%;bottom:24px;z-index:1000;display:flex;align-items:center;gap:8px;max-width:calc(100vw - 32px);padding:10px 14px;border-radius:12px;background:#1f1b2e;color:#fff;font-size:13.5px;box-shadow:0 12px 30px -10px #0008;opacity:0;transform:translate(-50%,8px);pointer-events:none;transition:opacity .2s,transform .2s}
.receipt-toast.is-visible{opacity:1;transform:translate(-50%,0)}
.receipt-toast.is-error{background:#991b1b}
