﻿/* CameraCashier — shared stylesheet for Web and MAUI Blazor Hybrid */

:root {
    /* Brand primitives (locked — from TallyTill badge) */
    --brand-green:  #1B3D2A;   /* badge background — forest green */
    --brand-amber:  #D97746;   /* badge centre — amber */
    --brand-blue:   #1565C0;   /* ring tones — locked primitive */
    --brand-red:    #B71C1C;   /* error/danger */
    --pay-green:    #2E7D32;   /* payment success indicator (functional, not brand) */

    /* Design system: Direction B (Warm & Approachable) */
    --surface:      #FFFFFF;
    --surface-2:    #faf8f4;   /* warm off-white — matches DS --content-bg */
    --border:       #e2dbd0;   /* DS --border */
    --text:         #1c2a1e;   /* DS --text-primary */
    /* WCAG 1.4.3 (AA) needs 4.5:1 for body text. The former #8aa290 measured 2.74:1 on
       --surface, 2.58 on --surface-2 and 2.46 on the tinted blue — it failed on every
       background it is used against. #5a7463 keeps the same hue but measures 5.11:1 on
       --surface, 4.81:1 on --surface-2 and 4.58:1 on #ecf3ff, and stays lighter than
       --text-secondary (6.10:1) so the type hierarchy is preserved. */
    --text-muted:   #5a7463;   /* DS --text-muted */
    --text-secondary: #4f6855; /* DS --text-secondary */
    --accent:       #d97746;   /* DS --accent (amber) */
    /* The accent is fine as decoration but fails WCAG 1.4.3 when it CARRIES text: #d97746 on
       white measures 3.14:1 against the 4.5:1 minimum. Same hue, darkened to 5.0:1 on white —
       used only where the accent is the text colour, so the brand is unchanged elsewhere. */
    --accent-strong: #b8501f;
    --accent-hover: #c0612e;
    --success:      #2E7D32;
    --success-light: #e8f5e9;
    --warning:      #d97706;
    --warning-light: #fef3c7;
    --danger:       #c62828;
    --danger-light: #fce8e8;

    /* Typography */
    --font-sans:  'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono:  'DM Mono', 'Cascadia Code', ui-monospace, monospace;

    /* Spacing & shape — sharper to match DS */
    --radius:       2px;
    --radius-sm:    2px;
    --radius-md:    4px;
    --radius-full:  9999px;
    --shadow:       0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-xs:    0 1px 2px rgba(0,0,0,.04);
    --shadow-focus: 0 0 0 3px rgba(217, 119, 70, 0.22);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--text);
    background: var(--surface-2);
    height: 100%;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* body — not #app — owns the vertical flex column. The MAUI host wraps the app in
   <div id="app">, the Web host renders <Routes> straight into <body>, so a rule hung
   off #app silently does nothing on Web. Anything MainLayout renders above .cc-layout
   (the demo "go live" banner) then pushed a height:100% .cc-layout down by the banner's
   height and overflow:hidden clipped the bottom off — the pay/New Cart row. */
body { display: flex; flex-direction: column; }
#app { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.cc-layout { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .55rem 1.1rem;
    border: none;
    border-radius: var(--radius);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s, filter .15s;
    white-space: nowrap;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:not(:disabled):hover { filter: brightness(.93); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-pay     { background: var(--pay-green); color: var(--pay-green-text, #fff); font-size: 1.05rem; padding: .6rem 1.5rem; }
.btn-danger  { background: var(--brand-red); color: var(--brand-red-text, #fff); }
.btn-ghost   { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ai      { background: #5E35B1; color: #fff; }
.btn-sm      { padding: .35rem .75rem; font-size: .85rem; }

/* Ensure readable button text across theme changes */
.btn-contrast-safe { color: #fff !important; }
.btn-primary.btn-contrast-safe,
.btn-danger.btn-contrast-safe { color: #fff !important; }
.btn-ghost.btn-contrast-safe { color: var(--text) !important; }

/* ── Header ──────────────────────────────────────────────────────── */
.cc-header {
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    background: var(--brand-green);
    color: var(--brand-green-text, #fff);
    gap: .75rem;
}
.header-title { font-size: 1.1rem; font-weight: 700; }
.header-actions { display: flex; gap: .5rem; }
.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    pointer-events: none;          /* clicks fall through to the header's 5-tap handler */
    text-align: center;
    max-width: 46vw;
}
.header-center-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .05rem;
    min-width: 0;
}
/* Merchant's own logo — shown left of their name on tablet/wide screens only. */
.header-tenant-logo {
    height: 34px;
    width: auto;
    max-width: 90px;
    object-fit: contain;
    border-radius: 4px;
    background: rgba(255,255,255,.9);
    padding: 2px 4px;
    flex-shrink: 0;
}
.header-business-name {
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.15;
    color: var(--brand-green-text, #fff);
    letter-spacing: .01em;
    max-width: 42vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--company-font, inherit);
}
.header-device-name {
    font-size: .68rem;
    font-weight: 400;
    opacity: .72;
    color: var(--brand-green-text, #fff);
    letter-spacing: .02em;
    white-space: nowrap;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* The in-app fullscreen toggle button was removed in July 2026 along with the robot face; its
   styles lived here and were dead for a year. Fullscreen is now driven by kiosk-guard.js on the
   customer's first tap when KioskMode is on — see .cc-kiosk-locked below. */

/* Cloud connectivity badge — shown only when cloud sync is configured and offline */
.cloud-offline-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .5rem;
    border-radius: 999px;
    background: rgba(251,146,60,.92); /* amber-400 */
    color: #1a1a1a;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .03em;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.4;
}
.cloud-offline-badge::before,
.cloud-disconnected-badge::before {
    content: '';
    display: inline-block;
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: #92400e;
    flex-shrink: 0;
}

/* "Disconnected" is a HARDER state than "Offline": the server signed this till out, so it will not
   recover on its own network — a human has to re-register it. Red rather than amber so the two read
   as different problems at a glance. #b91c1c on white is 6.4:1, comfortably past WCAG 1.4.3 AA. */
.cloud-disconnected-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .5rem;
    border-radius: 999px;
    background: #fff;
    color: #b91c1c;
    border: 1px solid #b91c1c;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .03em;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.4;
}
.cloud-disconnected-badge::before { background: #b91c1c; }

/* Buttons in themed headers need contrast text */
.cc-header .btn,
.cc-header .btn-ghost {
    color: var(--brand-green-text, #fff) !important;
}
.cc-header .btn-ghost {
    border-color: var(--brand-green-text, #fff);
}
.header-actions .btn-ghost {
    color: #fff;
    border-color: rgba(255,255,255,.5);
}

/* TallyTill product brand (left side of checkout header) — always visible, marketing. */
.header-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
    min-width: 0;
    position: relative; /* positioning context for the Tally chirp bubble */
}
.header-brand-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}
.header-brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: .01em;
    color: var(--brand-green-text, #fff);
    user-select: none;
    white-space: nowrap;
}

/* Phones: keep the TallyTill brand prominent, drop the merchant's own logo
   (tablet-only per design). The identity block flows in the space between the
   brand and the assistant (truncating) instead of absolute-centering, so it can
   never overlap the "TallyTill" wordmark on a narrow screen. */
@media (max-width: 600px) {
    .header-tenant-logo { display: none; }
    .header-brand-name  { font-size: 1.05rem; }
    .header-brand-logo  { height: 30px; }
    .header-center {
        position: static;
        transform: none;
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
        margin: 0 .5rem;
    }
    .header-business-name { font-size: .82rem; max-width: 100%; }
    .header-device-name   { max-width: 100%; }
}

/* Product brand icon (right side of checkout header) */
.header-product-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.header-product-icon {
    height: 32px;
    width: auto;
    opacity: .85;
    filter: brightness(0) invert(1);  /* white on the green background */
}

/* Footer attribution */
.app-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .6rem 1rem;
    font-size: .75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    margin-top: auto;
}
.footer-company-logo {
    height: 20px;
    width: auto;
    opacity: .6;
}
.footer-attribution { color: var(--text-muted); }

/* ── Logo ────────────────────────────────────────────────────────── */
.logo {
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    user-select: none;
    letter-spacing: .02em;
    font-family: var(--company-font, inherit);
}
.logo:active { opacity: .8; }

/* ── Status bar ─────────────────────────────────────────────────── */
.scan-status {
    font-size: .82rem;
    font-weight: 600;
    padding: .25rem .75rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.92);
    color: #1B5E20;
    border: 1.5px solid rgba(255,255,255,0.6);
    white-space: nowrap;
    max-width: 55vw;
    overflow: hidden;
    text-overflow: ellipsis;
}
.status-error {
    background: rgba(255,255,255,0.92);
    color: #B71C1C;
}

/* ── Camera section ─────────────────────────────────────────────── */
.camera-section { padding: .5rem 1rem 0; }

/* When robot face is active the camera section becomes the robot's "mouth" */
.camera-section.robot-mouth {
    padding: 0 1rem 0;
}
.camera-section.robot-mouth .camera-continuous,
.camera-section.robot-mouth .camera-picker {
    border: 2px solid #1565C0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 3px 0 #90CAF9;
    transition: border-color .25s, box-shadow .25s;
}

.camera-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 160px;
    background: #1a1a2e;
    border-radius: var(--radius);
    color: #888;
    gap: .5rem;
    font-size: 2rem;
}
.camera-placeholder p { font-size: .9rem; color: #666; }

.camera-live { height: 160px; border-radius: var(--radius); overflow: hidden; }
.scanner-host {
    height: 100%;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}
.scanner-hint { color: #aaa; font-size: .9rem; }

/* ── Camera source picker ───────────────────────────────────────── */
.camera-picker {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    padding: .75rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.camera-picker-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-muted);
}
.camera-picker-actions {
    display: flex;
    gap: .5rem;
}
.camera-picker-actions .btn { flex: 1; }

/* ── Webcam live preview (legacy) ───────────────────────────────── */
.camera-live-web {
    position: relative;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}
.webcam-video {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    display: block;
}
.webcam-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: .5rem;
    padding: .6rem;
    background: linear-gradient(transparent, rgba(0,0,0,.6));
}
.webcam-controls .btn { flex: 1; }

/* ── Continuous ML vision camera ────────────────────────────────── */
/* Fixed-size viewport. The video is centered and scaled to COVER the box (object-fit:cover),
   so it fills the space edge-to-edge with no black letterbox bars; aspect ratio is preserved
   (no distortion) and only the overflow is center-cropped. */
.camera-continuous {
    position: relative;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Manual "Identify with AI" trigger — icon button, BOTTOM-RIGHT of the live camera view
   (top-left sat too close to the lens). Sized to match the Tally mic button (40x40 circle). */
.btn-identify-ai {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 4;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent, #d97746);
    color: #fff;
    border: none;
    border-radius: 50%;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    cursor: pointer;
}
.btn-identify-ai:hover { transform: scale(1.08); animation: none; }
.btn-identify-ai .identify-icon { pointer-events: none; }

/* Camera control — TOP-RIGHT of the live camera view. Non-kiosk: switch camera; kiosk: restart the
   configured camera to recover a locked/frozen feed. Neutral dark chip so it reads as a camera
   control, visually distinct from the accent-coloured AI identify button (bottom-right). */
.btn-camera-control {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(17, 24, 20, .55);
    color: #fff;
    border: none;
    border-radius: 50%;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    cursor: pointer;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.btn-camera-control:hover { background: rgba(17, 24, 20, .78); }
.btn-camera-control:disabled { cursor: default; opacity: .85; }
.btn-camera-control svg { pointer-events: none; display: block; }
.btn-camera-control.switching svg { animation: cc-cam-spin .8s linear infinite; transform-origin: 50% 50%; }
@keyframes cc-cam-spin { to { transform: rotate(360deg); } }
.ti-spin { display: inline-flex; animation: cc-cam-spin 1s linear infinite; }
@media (prefers-reduced-motion: reduce) { .ti-spin { animation: none; } }
@media (prefers-reduced-motion: reduce) { .btn-camera-control.switching svg { animation: none; } }

/* Top-right control cluster: switch/refresh + on/off power, in a row. The container owns the absolute
   positioning so each button sits static inside it. */
.camera-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    display: flex;
    gap: 8px;
}
.camera-controls .btn-camera-control { position: static; top: auto; right: auto; }
/* Power toggle turns brand-red once the camera is OFF, so the state is unmistakable at a glance. */
.btn-camera-power.is-off { background: var(--brand-red, #b42318); }
.btn-camera-power.is-off:hover { background: color-mix(in srgb, var(--brand-red, #b42318) 85%, #000); }

/* Brand placeholder over the streamless <video> (before start, or when turned off) — covers the WebView's
   native ▶ overlay so the idle camera reads as intentional rather than broken. The critical layout is also
   inlined on the element so a stale cached stylesheet can't knock the mark off-centre. */
.camera-off-placeholder {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    background: #000;
}
.camera-off-label { font-size: .8rem; font-weight: 600; letter-spacing: .02em; color: rgba(255,255,255,.72); }

/* Idle "tap me" invite so the camera button clearly reads as interactive, matching the mic's invite
   pulse. Overridden by the stronger running pulse and paused on hover. */
.btn-identify-ai:not(.identify-running) { animation: cc-cam-invite 2.6s ease-in-out infinite; }
@keyframes cc-cam-invite {
    0%, 100% { transform: scale(1);     box-shadow: 0 2px 6px rgba(0,0,0,.3), 0 0 0 0 rgba(217,119,70,.55); }
    50%      { transform: scale(1.07);  box-shadow: 0 2px 6px rgba(0,0,0,.3), 0 0 0 9px rgba(217,119,70,0); }
}
/* Running: pulse the edge like the mic button (tap again to re-capture / cancel). */
.btn-identify-ai.identify-running { animation: identify-pulse 1.2s infinite ease-in-out; }
@keyframes identify-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(255,255,255,.5); }
    50%     { box-shadow: 0 0 0 7px rgba(255,255,255,0); }
}
@media (prefers-reduced-motion: reduce) { .btn-identify-ai:not(.identify-running) { animation: none; } }

/* Countdown number shown over the camera before capture. Each number "pops" (selfie-timer feel):
   it enters large + faint and settles to full size within the first ~450ms, then holds for the rest
   of its second. Re-keyed per number in the markup so the animation replays on 3 → 2 → 1. */
.vision-countdown {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5.5rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 16px rgba(0,0,0,.75);
    pointer-events: none;
    animation: cc-count-pop .45s cubic-bezier(.2,.9,.3,1) both;
}
@keyframes cc-count-pop {
    0%   { transform: scale(1.9); opacity: 0; }
    30%  { opacity: 1; }
    100% { transform: scale(1);   opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .vision-countdown { animation: none; }
}

/* Frozen still shown over the live video while an AI identify is processing.
   Matches the live view's cover-crop so freezing doesn't jump to a letterboxed frame. */
.vision-frozen {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: #000;
    z-index: 2;
}
.vision-video {
    width: 100%;
    height: 100%;
    object-fit: cover;        /* fill the viewport, center-crop — preserve aspect ratio, no distortion */
    object-position: center;
    display: block;
}
/* Suppress the Android WebView's native <video> play-button overlay: before the camera stream
   attaches (or while it loads) an oversized ▶ shows through. Every <video> in this app is a live
   camera preview driven by our own JS capture — none ever needs native media controls — so target
   ALL of them (not just #cc-vision-video), which is also more robust across WebView/ROM versions. */
video::-webkit-media-controls,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-overlay-enclosure,
video::-webkit-media-controls-overlay-play-button,
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-play-button,
video::-webkit-media-controls-panel {
    display: none !important;
    -webkit-appearance: none !important;
    opacity: 0 !important;
}
.camera-mirrored { transform: scaleX(-1); }
.vision-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
/* AI Test Mode recognition toast — internal testing overlay on the camera feed. */
.ai-test-toast {
    position: absolute;
    left: 50%;
    bottom: .6rem;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: .5rem;
    max-width: 92%;
    padding: .35rem .7rem;
    border-radius: 999px;
    background: rgba(17, 24, 20, .82);
    color: #fff;
    font-size: .82rem;
    line-height: 1.1;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
    animation: ai-test-pop .16s ease-out;
}
.ai-test-toast .ai-test-tier {
    font-size: .62rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .1rem .4rem;
    border-radius: 999px;
    white-space: nowrap;
}
.ai-test-toast.ai-test-ok  .ai-test-tier { background: #2f7d4f; }
.ai-test-toast.ai-test-miss .ai-test-tier { background: #6b7280; }
.ai-test-toast .ai-test-label { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-test-toast .ai-test-verdict { display: inline-flex; gap: .25rem; margin-left: .35rem; pointer-events: auto; }
.ai-test-toast .ai-test-thumb {
    border: none; background: rgba(255,255,255,.15); border-radius: 999px;
    width: 30px; height: 30px; font-size: 1rem; line-height: 1; cursor: pointer; padding: 0;
}
.ai-test-toast .ai-test-thumb:hover { background: rgba(255,255,255,.32); }
.ai-test-toast .ai-test-skip { font-size: .8rem; opacity: .7; }
@keyframes ai-test-pop { from { opacity: 0; transform: translateX(-50%) translateY(4px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.vision-loading {
    position: absolute;
    bottom: .5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.65);
    color: #ccc;
    font-size: .75rem;
    padding: .2rem .65rem;
    border-radius: 99px;
    white-space: nowrap;
}
/* ── Tally assistant (header top-right): mascot avatar + mic ──────── */
.header-assistant {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: auto;
}
/* "Hey Tally!" wake-word invite — sits to the LEFT of the mic. Pretty italic/script with a soft pulse
   so it reads as a spoken call-to-action. Tapping it opens the "List commands" panel. */
.hey-tally-badge {
    font-family: 'Segoe Script', 'Snell Roundhand', 'Bradley Hand', 'Brush Script MT', 'Comic Sans MS', cursive;
    font-style: italic;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1;
    white-space: nowrap;
    /* Solid white pill so the script text is readable on ANY header colour (the header uses the
       merchant's brand colour — orange-on-blue was unreadable). Accent-coloured text ties it to
       Tally, but the plain accent on white is only 3.14:1 — and this badge is the entry point to
       the voice assistant, i.e. the accessibility affordance itself, so it is a poor place to be
       hard to read. --accent-strong is the same hue at 5.0:1. */
    color: var(--accent-strong, #b8501f);
    background: #fff;
    border: none;
    border-radius: 999px;
    padding: .34rem .8rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
    cursor: pointer;
    flex: 0 0 auto;
    animation: heyTallyPulse 2.4s ease-in-out infinite;
}
.hey-tally-badge:hover { filter: brightness(0.97); }
/* CSA pickup entry point (checkout header, pickup-station devices only). Matches the mockup
   v3/pickup-station/PS3: a ghost header button, icon + label; on a phone only the icon, 44px tap target. */
.header-pickup-btn { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; flex: 0 0 auto; }
.header-pickup-btn svg { width: 1.1em; height: 1.1em; }
@media (max-width: 520px) {
    .header-pickup-btn { min-width: 44px; min-height: 44px; justify-content: center; }
    .header-pickup-btn .header-pickup-label { display: none; }
}
@keyframes heyTallyPulse {
    0%, 100% { transform: scale(1);    box-shadow: 0 2px 6px rgba(0, 0, 0, .22); }
    50%      { transform: scale(1.05); box-shadow: 0 3px 11px rgba(0, 0, 0, .30); }
}
@media (prefers-reduced-motion: reduce) { .hey-tally-badge { animation: none; } }
/* "List commands" help panel (uses .match-overlay for the dimmed, centered backdrop). */
.voice-help-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.4rem 1.5rem;
    max-width: 460px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
    text-align: left;
}
.voice-help-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 .9rem;
    color: var(--primary, #2f6f4e);
    text-align: center;
}
.voice-help-list {
    list-style: none;
    margin: 0 0 1.2rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.voice-help-list li {
    font-size: 1rem;
    line-height: 1.35;
    padding: .5rem .7rem;
    background: #f4f6f5;
    border-radius: 9px;
}
.voice-help-close { width: 100%; }
.tally-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #eaf0ec;
    padding: 2px;
    flex: 0 0 auto;
}
.tally-mic-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--accent, #d97746);
    color: #fff;
    cursor: pointer;
    transition: background .15s, transform .1s;
    flex: 0 0 auto;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.tally-mic-btn:hover { background: #c26236; transform: scale(1.08); }
.tally-mic-btn.mic-active {
    background: #c0392b;
    animation: mic-pulse 1.2s infinite ease-in-out;
}
.tally-mic-btn.mic-session-active {
    outline: 2px solid rgba(255,255,255,.55);
    outline-offset: 2px;
}
@keyframes mic-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(192,57,43,.45); }
    50%      { box-shadow: 0 0 0 8px rgba(192,57,43,0); }
}
/* Idle "ask for help" invite: a gentle accent glow + breathing so customers notice the mic is
   tappable. Animates box-shadow only (never transform) so it works for both the top-right and
   in-camera variants without breaking their positioning. Stops once listening/session-active. */
.tally-mic-btn:not(.mic-active):not(.mic-session-active) {
    animation: mic-invite 2.6s ease-in-out infinite;
}
@keyframes mic-invite {
    0%, 100% { box-shadow: 0 2px 6px rgba(0,0,0,.3), 0 0 0 0   rgba(217,119,70,.55); }
    50%      { box-shadow: 0 2px 6px rgba(0,0,0,.3), 0 0 0 9px rgba(217,119,70,0); }
}
@media (prefers-reduced-motion: reduce) {
    .tally-mic-btn:not(.mic-active):not(.mic-session-active) { animation: none; }
}

/* ── Tally toast ───────────────────────────────────────────────── */
.tally-toast-thumbs-down {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255,255,255,.45);
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    border-radius: 99px;
    transition: color .15s, background .15s;
}
.tally-toast-thumbs-down:hover  { color: #ef4444; }
.tally-toast-thumbs-down.voted  { color: #ef4444; background: rgba(239,68,68,.2); border-radius: 99px; }
.tally-toast-thumbs-up {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255,255,255,.45);
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    border-radius: 99px;
    transition: color .15s, background .15s;
}
.tally-toast-thumbs-up:hover { color: #22c55e; }
.tally-toast-thumbs-up.voted  { color: #22c55e; background: rgba(34,197,94,.2); }
/* Tally's speech bubble for spoken replies. Anchored under the owl (top-right) with an upward
   tail so it reads as the OWL talking — we pitch the owl as the one speaking. Carries the 👍/👎. */
.tally-toast {
    position: fixed;
    top: 3.6rem;
    right: .75rem;
    left: auto;
    transform: none;
    display: flex;
    align-items: center;
    gap: .5rem;
    background: rgba(0,0,0,.82);
    color: #fff;
    padding: .6rem 1.1rem;
    border-radius: 16px;
    font-size: .9rem;
    max-width: min(88vw, 420px);
    z-index: 9999;
    overflow: visible;
    box-shadow: 0 6px 18px rgba(0,0,0,.28);
    animation: tally-toast-in .2s ease-out;
}
/* Little tail pointing up toward the owl perched in the header. */
.tally-toast::before {
    content: '';
    position: absolute;
    top: -7px;
    right: 44px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(0,0,0,.82);
}
.tally-toast-text {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.tally-toast-icon { flex-shrink: 0; font-size: 1rem; }
@keyframes tally-toast-in {
    from { opacity: 0; transform: translateY(-10px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* "Heard" toast — shows the customer's recognized speech (what STT transcribed) so they get
   immediate confirmation the mic worked. Brand-green and centred at the top to represent the
   CUSTOMER's words — distinct from Tally's reply, which appears as the owl's speech bubble (top-right). */
.tally-heard-toast {
    position: fixed;
    top: 3.25rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: .5rem;
    background: rgba(27,61,42,.92);
    color: #fff;
    padding: .55rem 1.05rem;
    border-radius: 99px;
    font-size: .9rem;
    max-width: min(90vw, 480px);
    z-index: 9999;
    animation: tally-heard-in .2s ease-out;
}
@keyframes tally-heard-in {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.tally-heard-icon { flex-shrink: 0; font-size: 1rem; }
.tally-heard-text {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-style: italic;
}

.cam-switch-btn {
    position: absolute;
    top: .4rem;
    right: .4rem;
    background: rgba(0,0,0,.5);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: .3rem .5rem;
    font-size: 1rem;
    cursor: pointer;
    line-height: 1;
}
.cam-switch-btn:hover { background: rgba(0,0,0,.75); }

/* ── ML match selection overlay ─────────────────────────────────── */
/* Results modal — AI recognition matches, "not in inventory", and name-search results all use this
   wrapper. It's a TRUE centered modal (fixed, above the pinned totals/Pay bar) with a dimmed backdrop
   and an internal scroll, so a long list is never cut off no matter how tight the checkout column is. */
.match-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0,0,0,.5);
}
/* The dialog card inside the backdrop. */
.match-single,
.match-multiple {
    width: min(92vw, 460px);
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;   /* momentum scroll on tablets */
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.match-single { text-align: center; }
.match-heading {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: .4rem;
}
.match-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: .2rem;
}
.match-pct {
    font-size: .85rem;
    color: var(--text-muted);
    margin-bottom: .6rem;
}
.match-actions {
    display: flex;
    gap: .5rem;
}
.match-actions .btn { flex: 1; }
.match-multiple {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    /* Height/scroll are handled by the shared dialog-card rule above (max-height:85vh). */
}
.match-option {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .75rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: .95rem;
    text-align: left;
}
.match-option:hover { background: var(--border); }
.match-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--brand-blue);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.match-thumb {
    display: block;
    width: 96px;
    height: 96px;
    object-fit: contain;   /* whole product image, no cropping */
    background: var(--surface-2);
    border-radius: 10px;
    border: 2px solid var(--border);
    margin: .3rem auto .6rem;
}
.match-thumb-sm {
    width: 48px;
    height: 48px;
    object-fit: contain;   /* whole product image, no cropping */
    background: var(--surface-2);
    border-radius: 6px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.match-name-sm { flex: 1; font-weight: 600; }
.match-pct-sm  { font-size: .8rem; color: var(--text-muted); }
.match-dismiss { margin-top: .25rem; }

/* ── Input row ───────────────────────────────────────────────────── */
.input-row {
    display: flex;
    gap: .5rem;
    padding: .5rem 1rem;
    align-items: center;
}
.barcode-input {
    flex: 1;
    padding: .55rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .95rem;
}
.barcode-input:focus { outline: 2px solid var(--brand-blue); border-color: transparent; }

/* ── Item search dropdown ────────────────────────────────────────── */
.barcode-wrap {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.barcode-wrap .barcode-input { width: 100%; }
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--brand-blue);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    z-index: 200;
    max-height: 220px;
    overflow-y: auto;
}
.search-option {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .45rem .75rem;
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    text-align: left;
    font-size: .9rem;
}
.search-option:last-child { border-bottom: none; }
.search-option:hover, .search-option:focus { background: var(--surface-2); outline: none; }
.search-option-thumb {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.search-option-name  { flex: 1; font-weight: 600; }
.search-option-price { color: var(--text-muted); font-size: .82rem; white-space: nowrap; }

/* ── Session tax override bar ────────────────────────────────────── */
.tax-override-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.tax-override-label { font-size: .8rem; color: var(--text-muted); white-space: nowrap; }
.tax-override-select {
    flex: 1;
    font-size: .85rem;
    padding: .2rem .4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
}
.food-exempt-badge {
    font-size: .75rem;
    padding: .15rem .5rem;
    border-radius: 99px;
    background: #E8F5E9;
    color: var(--brand-green);
    white-space: nowrap;
    font-weight: 600;
}

/* ── Cart ────────────────────────────────────────────────────────── */
/* The scrollable middle region. Camera stays fixed above; totals + pay-row stay
   fixed below. Everything here (matches, search, input, cart) scrolls as one, so a
   long ML match list can never push the Pay / New-Cart bar off the bottom. */
.checkout-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
}
.cart-section {
    /* Grow to fill the scroll region when the cart is short; the outer
       .checkout-scroll owns the scrolling now (no nested scrollbar). */
    flex: 1 0 auto;
    padding: 0 1rem;
}
.cart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    color: var(--text-muted);
    font-size: .95rem;
}
.cart-list { display: flex; flex-direction: column; gap: .25rem; padding: .25rem 0; }

.cart-item {
    color: var(--text);
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .3rem .6rem;
    box-shadow: var(--shadow);
}
.item-info { flex: 1; min-width: 0; }
.item-name { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-meta-row { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.item-unit-price { font-size: .75rem; color: var(--text-muted); }
.item-tax-exempt { font-size: .67rem; color: var(--brand-green); font-weight: 600; }

.qty-controls { display: flex; align-items: center; gap: .3rem; }
.qty-btn {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-2);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: var(--border); }
.qty-value { width: 24px; text-align: center; font-weight: 700; }
/* A weighed or fixed line shows "1.35 lb" in the quantity cell — the 24px count box wraps it onto two lines. */
.qty-controls.qty-fixed .qty-value { width: auto; min-width: 24px; white-space: nowrap; padding: 0 .25rem; }

.item-total { font-weight: 700; min-width: 52px; text-align: right; white-space: nowrap; }
.remove-btn {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 1rem; padding: .15rem;
}
.remove-btn:hover { color: var(--brand-red); }

/* ── Totals ──────────────────────────────────────────────────────── */
.totals-section {
    padding: .4rem 1rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
}
.totals-row {
    display: flex;
    justify-content: space-between;
    padding: .15rem 0;
    font-size: .9rem;
    color: var(--text-muted);
}
.totals-grand {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    padding-top: .4rem;
    border-top: 1px solid var(--border);
    margin-top: .2rem;
}

/* "Sales tax is not configured" notice under the totals. Amber, operator-facing; charging $0 is
   correct until a rate is set, but the merchant must be able to see the gap. */
.tax-unconfigured-note {
    display: flex;
    gap: .4rem;
    align-items: flex-start;
    margin-top: .5rem;
    padding: .5rem .6rem;
    font-size: .8rem;
    line-height: 1.3;
    color: #7a4f00;
    background: #fff6e5;
    border: 1px solid #f2c879;
    border-radius: 6px;
}

.tax-unconfigured-icon {
    flex: 0 0 auto;
    font-size: .95rem;
    line-height: 1.2;
}

/* ── Manager price override / discounts ──────────────────────────── */
/* Struck-through original price (line unit price and line total) */
.price-original {
    text-decoration: line-through;
    color: var(--text-muted);
    opacity: .7;
    margin-right: .3rem;
    font-weight: 400;
}
.item-total .price-original { font-size: .78rem; }
/* Per-line adjustment badge */
.item-discount-badge {
    font-size: .67rem;
    font-weight: 700;
    color: var(--brand-red);
    background: color-mix(in srgb, var(--brand-red) 12%, transparent);
    border-radius: .5rem;
    padding: 0 .35rem;
    white-space: nowrap;
}
/* Pencil "adjust" button on a cart line */
.adjust-btn {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 1rem; padding: .15rem;
}
.adjust-btn:hover { color: var(--brand-green); }
/* Discount row in the totals */
.totals-discount { color: var(--brand-red); font-weight: 600; }
.breakdown-discount { color: var(--brand-red); font-weight: 600; }
.discount-clear {
    background: none; border: none; cursor: pointer;
    color: var(--brand-red); font-size: .8rem; padding: 0 .2rem; margin-left: .2rem;
}
/* Whole-sale discount link under the totals */
.btn-cart-discount {
    display: block; width: 100%;
    margin-top: .45rem; padding: .35rem;
    background: none; border: 1px dashed var(--border); border-radius: .5rem;
    color: var(--text-muted); font-size: .82rem; font-weight: 600; cursor: pointer;
}
.btn-cart-discount:hover { color: var(--text); border-color: var(--text-muted); }
/* Adjustment modal internals */
.adjust-modes { display: flex; gap: .4rem; margin: .5rem 0; }
.adjust-mode-btn {
    flex: 1; padding: .4rem; cursor: pointer;
    border: 1px solid var(--border); border-radius: .5rem;
    background: var(--surface-2); color: var(--text); font-size: .85rem; font-weight: 600;
}
.adjust-mode-btn.active { border-color: var(--brand-green); color: var(--brand-green); background: color-mix(in srgb, var(--brand-green) 10%, transparent); }
.adjust-value-row { position: relative; display: flex; align-items: center; margin: .3rem 0; }
.adjust-value-prefix { position: absolute; left: .6rem; color: var(--text-muted); font-weight: 700; }
.adjust-value-input { padding-left: 1.5rem; }
.adjust-label { display: block; font-size: .78rem; color: var(--text-muted); font-weight: 600; margin: .5rem 0 .2rem; }
.adjust-reasons { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .3rem; }
.adjust-reason-chip {
    padding: .2rem .5rem; cursor: pointer; font-size: .78rem;
    border: 1px solid var(--border); border-radius: 1rem; background: var(--surface-2); color: var(--text);
}
.adjust-reason-chip.active { border-color: var(--brand-green); color: var(--brand-green); }

/* ── Offline card queue banner ───────────────────────────────────────
   Shown whenever card payments collected offline have not yet reached Stripe. Amber (warning), not
   red: nothing has failed, but this is money still owed and staff should know it is outstanding. */
.pay-offline-banner {
    display: flex; align-items: flex-start; gap: .6rem;
    margin: .55rem 1rem 0;
    padding: .6rem .8rem;
    border: 1px solid var(--brand-amber, #d98324);
    border-radius: .6rem;
    background: color-mix(in srgb, var(--brand-amber, #d98324) 12%, var(--surface));
    color: var(--text);
    font-size: .86rem; line-height: 1.35;
}
/* "Card off" reason under the greyed Card tile (owner-approved mockup, #1731). */
.card-readers-off-note {
    display: flex; align-items: flex-start; gap: .6rem;
    margin: .75rem 1rem 0;
    padding: .7rem .8rem;
    border: 1px solid #f0d3bd; border-radius: .6rem;
    background: #fff7f0; color: #3b2a1e;
    font-size: .9rem; line-height: 1.35;
}
.card-readers-off-note .pill {
    flex: 0 0 auto; font-size: .65rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    background: #D97746; color: #fff; border-radius: 99px; padding: .15rem .5rem; white-space: nowrap;
}
/* Till reader-status line (issue #1732, owner-approved mockup). One line, one state colour, one action. */
.reader-status {
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    margin: .75rem 1rem 0; padding: .6rem .8rem;
    border: 1px solid var(--rs-border, #c9d6ea); border-radius: .6rem;
    background: var(--rs-bg, #eef4ff); color: #1f2d44;
    font-size: .9rem; line-height: 1.35;
}
.reader-status-text { flex: 1 1 12rem; min-width: 0; }
.reader-status .btn { flex: 0 0 auto; min-height: 2.5rem; padding: .35rem .9rem; }
.reader-status-dot { flex: 0 0 auto; width: .65rem; height: .65rem; border-radius: 50%; background: var(--rs-dot, #3b6fd1); }
.reader-status-spinner {
    flex: 0 0 auto; width: .9rem; height: .9rem; border-radius: 50%;
    border: 2px solid var(--rs-dot, #3b6fd1); border-right-color: transparent;
    animation: reader-status-spin .9s linear infinite;
}
@keyframes reader-status-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .reader-status-spinner { animation: none; } }
.reader-status-searching, .reader-status-connecting { --rs-bg: #eef4ff; --rs-border: #c9d6ea; --rs-dot: #3b6fd1; }
.reader-status-connected { --rs-bg: #eefaf1; --rs-border: #b9e0c3; --rs-dot: #2e9e4f; }
.reader-status-notfound { --rs-bg: #fff7f0; --rs-border: #f0d3bd; --rs-dot: #D97746; }
.reader-status-bluetoothnotallowed { --rs-bg: #fff1f0; --rs-border: #f2c4c0; --rs-dot: #c8372d; }
/* Payment-screen reader dot (owner spec 2026-11-18): same .65rem dot, in a larger invisible tap target, top right. */
.reader-dot-hit {
    /* z-index 40 sits ABOVE .cc-header (30): the header is a positioned sibling and would otherwise paint over
       the dot and take its taps. The dot is pointer-only; it never overlaps the header's own controls except
       the far top-right corner. */
    position: fixed; top: .35rem; right: .35rem; z-index: 40;
    width: 2.25rem; height: 2.25rem; padding: 0; border: 0; background: transparent;
    display: flex; align-items: center; justify-content: center; cursor: default;
}
.reader-dot-gray   { --rs-dot: #8a94a6; }
.reader-dot-green  { --rs-dot: #2e9e4f; }
.reader-dot-yellow { --rs-dot: #e0b000; }
.reader-dot-red    { --rs-dot: #c8372d; }
.reader-dot-pulse  { animation: reader-dot-pulse 1.4s ease-in-out infinite; }
@keyframes reader-dot-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .reader-dot-pulse { animation: none; } }
.reader-dot-facts { display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; margin: .5rem 0 1rem; text-align: left; }
.reader-dot-facts dt { font-weight: 600; }
.reader-dot-facts dd { margin: 0; }
/* Above the header (30) and the dot (40): the modal must cover both. Doubled class so it beats the later
   .cc-update-required-overlay rule (z-index 25) regardless of source order. */
.cc-update-required-overlay.reader-dot-modal { z-index: 50; }
.reader-dot-modal .btn { margin-top: .5rem; }
.pay-offline-banner .pay-offline-icon { flex: 0 0 auto; color: var(--brand-amber, #d98324); }
.pay-offline-banner .pay-offline-icon svg { width: 1.15rem; height: 1.15rem; display: block; }

/* ── Pay row ─────────────────────────────────────────────────────── */
.pay-row {
    padding: .55rem 1rem;
    background: var(--surface);
    display: flex;
    gap: 0;
    align-items: stretch;
}
/* PayPal ACDC hosted-card fields: only set the injected iframe's WIDTH. Never set its height — PayPal's SDK
   sizes the iframe dynamically (~150px), and any CSS height here fights that and makes the modal resize in a
   loop. The .ppcard-field wrapper is a fixed-height clipping window that shows just the top (PayPal's input),
   so we get a single clean field without touching the iframe height. (Kept here, not in PaymentPage.razor's
   inline <style>, because a bare element selector like `iframe` there is mis-parsed by Razor — RZ9980.) */
.ppcard-field iframe { width: 100% !important; border: 0 !important; display: block; }

/* New Cart button — same height as Pay, left-rounded only, left-aligned, smaller font */
.pay-row .btn-new-cart {
    background: var(--brand-red);
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    padding: .7rem .9rem;
    border: none;
    border-radius: var(--radius) 0 0 var(--radius);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity .15s, filter .15s;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: .3rem;
}
.pay-row .btn-new-cart:hover { filter: brightness(.9); }
/* When New Cart is visible, Pay button loses its left rounding */
.pay-row .btn-new-cart + .btn-pay {
    border-radius: 0 var(--radius) var(--radius) 0;
    flex: 1;
}
/* When New Cart is absent Pay keeps full rounding */
.pay-row .btn-pay:only-child,
.pay-row .btn-pay:first-child {
    border-radius: var(--radius);
    flex: 1;
    width: 100%;
}
.pay-row .btn-pay { flex: 1; }

/* ── Two-column checkout layout (featured left, checkout right) ──── */
.checkout-layout {
    display: flex;
    align-items: stretch;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: var(--surface-2);
}

/* ── Featured products panel — left column ───────────────────────── */
.featured-section {
    display: none;   /* hidden on mobile */
    flex-direction: column;
    padding: .75rem 1rem .5rem;
    border-right: 1px solid var(--border);
    background: var(--surface);
    overflow: hidden;
}
.featured-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    margin-bottom: .5rem;
}
/* Featured panel search row */
.featured-search-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;          /* category pickers now share this row; wrap gracefully if space is tight */
    gap: .35rem;
    margin-bottom: .5rem;
}
.featured-search-input {
    flex: 1;
    padding: .3rem .55rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
    font-size: .8rem;
    min-width: 0;
}
.featured-search-input:focus {
    outline: none;
    border-color: var(--brand-blue, #6366f1);
}
/* WCAG 2.4.7 Focus Visible — the border-colour change above was the only focus cue, and
   it is far too subtle to serve as one (this was the sole tab stop of 18 on the till with
   no discernible indicator). Keyboard users get a real ring; pointer users see nothing new. */
.featured-search-input:focus-visible {
    outline: 2px solid var(--brand-blue, #6366f1);
    outline-offset: 2px;
}

/* The featured panel's title is a real <h2> so the till has document structure, but the
   surrounding .featured-title already owns the typography — this keeps it rendering exactly
   as the previous <span> did. */
.featured-title-heading {
    margin: 0;
    font: inherit;
    color: inherit;
}

/* Suppresses the double-tap-to-zoom gesture on tap targets so the kiosk still feels like an
   app, while leaving deliberate pinch-zoom intact (see the viewport note in App.razor). */
button, .btn, [role="button"], .featured-card, .pay-tile {
    touch-action: manipulation;
}

/* Visually hidden, but available to screen readers and still focusable. Used for headings
   and labels that the sighted layout conveys through position or icon alone. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* Search box with an inline clear (✕) button. */
.featured-search-inputwrap {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
}
.featured-search-inputwrap .featured-search-input {
    flex: 1;
    padding-right: 1.6rem; /* room for the clear button */
}
.featured-searchbox-clear {
    position: absolute;
    right: .25rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--text-muted, #9ca3af);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 .25rem;
    border-radius: 50%;
}
.featured-searchbox-clear:hover { color: var(--text); }
.featured-mic-btn {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    transition: background .12s, color .12s, border-color .12s;
}
.featured-mic-btn:hover { background: var(--surface-2, #e5e7eb); color: var(--text); }
.featured-mic-btn.active {
    background: #fee2e2;
    border-color: #ef4444;
    color: #ef4444;
    animation: mic-pulse .8s ease-in-out infinite alternate;
}
@keyframes mic-pulse { from { opacity: 1; } to { opacity: .55; } }

/* Framework-free spinner (cashier hosts don't load Bootstrap) */
.cc-spinner {
    display: inline-block;
    width: 1.1rem;
    height: 1.1rem;
    vertical-align: middle;
    border: 2px solid color-mix(in srgb, var(--brand-green) 30%, transparent);
    border-top-color: var(--brand-green);
    border-radius: 50%;
    animation: cc-spin .7s linear infinite;
}
@keyframes cc-spin { to { transform: rotate(360deg); } }

/* Inline chevron that flips on expand (replaces Bootstrap-Icons bi-chevron-*) */
.cc-chevron { transition: transform .15s; }
.cc-chevron.up { transform: rotate(180deg); }
.featured-grid {
    display: grid;
    /* --cc-grid-cols defaults to auto-fill (today's responsive behaviour); a fixed count is set inline
       from CheckoutGridColumns when > 0. The span vars default to 1 so untouched grids look unchanged.
       grid-auto-rows is emitted inline ONLY when a row-span is configured, so the default grid is
       byte-identical to before (implicit auto rows). */
    grid-template-columns: repeat(var(--cc-grid-cols, auto-fill), minmax(90px, 1fr));
    gap: .5rem;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    align-content: start;
}
/* Per-tile span (Phase E). Featured tiles read the featured vars, standard tiles the standard vars;
   all default to 1, so with default settings every tile is a normal 1×1 cell. */
.featured-card--hero {
    grid-column: span var(--cc-feat-col, 1);
    grid-row:    span var(--cc-feat-row, 1);
}
.featured-card--standard {
    grid-column: span var(--cc-std-col, 1);
    grid-row:    span var(--cc-std-row, 1);
}
.featured-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    padding: .5rem .25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    text-align: center;
    font-size: .75rem;
    transition: filter .15s;
}
/* Hover only on devices that really hover: on the touch tablet :hover sticks after a tap. */
@media (hover: hover) { .featured-card:hover { filter: brightness(.92); } }
/* Sold out per the last stock pull: dim the tile and stamp it, but it stays a button — the count can be
   stale and the customer holding the item is real, so the till warns and still sells. */
.featured-card--soldout { position: relative; opacity: .6; }
.featured-card--soldout .featured-thumb { filter: grayscale(1); }
.featured-soldout {
    position: absolute;
    top: .35rem;
    left: .35rem;
    background: #b42318;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    line-height: 1;
    padding: .2rem .4rem;
    border-radius: .35rem;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.featured-thumb {
    width: 56px;
    height: 56px;
    object-fit: contain;   /* show the WHOLE product image — never crop/cut off edges */
    background: var(--surface-2);
    border-radius: calc(var(--radius) - 2px);
}
.featured-thumb-placeholder {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-muted);
}
/* Tile pulse: a brief accent ring on the tile just added (two names so a repeat tap restarts it). */
@keyframes till-pulse-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.till-pulse-a { animation: till-pulse-ring .6s ease-out; }
.till-pulse-b { animation: till-pulse-ring .6s ease-out; }
@media (prefers-reduced-motion: reduce) { .till-pulse-a, .till-pulse-b { animation: none; outline: 3px solid var(--accent); } }
.featured-name { font-weight: 600; color: var(--text); line-height: 1.2; }
.featured-price { color: var(--brand-green, #2a9d4e); font-weight: 700; }

/* Hero tiles (Phase E emphasis) fill their enlarged cell: a large centred product image with
   the name/price grouped beneath it and the whole cluster vertically centred, so a 2×2 tile
   reads as a proper hero instead of a small top-anchored cluster in mostly-empty space. The
   image is sized relative to the cell (capped) rather than the fixed 56px, and scales up with
   larger spans. Standard/default (1×1) tiles are untouched — these rules only bind to --hero. */
.featured-card--hero {
    justify-content: flex-start;
    gap: .4rem;
    padding: .6rem .5rem;
}
/* The image takes only the space left ABOVE the name/price (which are pinned non-shrinking),
   so the price is always visible while the image still grows to fill the enlarged cell.
   object-fit:contain (from the base rule) letterboxes it so nothing is cropped.
   min-height 56px = the base thumbnail size: it's the FLOOR so that when NO row-span is
   configured (rows are content-sized, no free space to grow into) the image doesn't collapse
   to 0 — every featured tile is a --hero tile, so this rule also applies to the default,
   unspanned featured grid. With a row-span set, flex-grow takes the image well past this floor. */
.featured-card--hero .featured-thumb,
.featured-card--hero .featured-thumb-placeholder {
    flex: 1 1 0;
    min-height: 56px;
    width: 100%;
    height: 0;
    aspect-ratio: auto;
}
.featured-card--hero .featured-thumb-placeholder { font-size: 3rem; }
/* Large item tiles: show the WHOLE photo (contain), never a cover crop that zooms into plain rice. */
.featured-card--hero .featured-thumb { object-fit: contain; background: var(--surface-2); border-radius: 0; }
.featured-card--hero .featured-name  { flex: 0 0 auto; font-size: 1rem; line-height: 1.2; }
.featured-card--hero .featured-price { flex: 0 0 auto; font-size: 1rem; }

/* Category filter bar */
.featured-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .5rem;
}
.featured-filter-btn {
    padding: .2rem .55rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: .7rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
    white-space: nowrap;
}
.featured-filter-btn:hover { background: var(--surface); color: var(--text); }
.featured-filter-btn.active {
    background: var(--brand-blue, #2563eb);
    border-color: var(--brand-blue, #2563eb);
    color: #fff;
}
.featured-filter-select {
    font-size: .75rem;
    padding: .2rem .4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;   /* inline on the search row — the search input absorbs the slack, not the pickers */
}

/* Featured / checkout responsive overrides live after .checkout-page base rule below */

/* ── Modal body text ─────────────────────────────────────────────── */
.modal-body { font-size: .95rem; color: var(--text-muted); margin: 0; }

/* ── Full checkout layout ────────────────────────────────────────── */
.checkout-page {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    background: var(--surface-2);
}

/* Show featured left column on tablets and larger — featured expands, checkout fixed right */
@media (min-width: 768px) {
    .featured-section {
        display: flex;
        flex: 1;
        min-width: 0;
        /* The checkout column is first in the markup so that the phone pager's focus order
           matches its visual order (see the phone pager block). Here, where both columns are
           on screen at once, `order` puts the product column back on the left. */
        order: -1;
    }
    .checkout-page {
        flex: 0 0 460px;
        width: 460px;
        min-width: 320px;
        margin: 0;
    }
}

/* Wider checkout column on large tablets (kiosk displays) */
@media (min-width: 1100px) {
    .checkout-page {
        flex: 0 0 520px;
        width: 520px;
    }
}

/* ── MAUI / native app overrides ──────────────────────────────────── */
/* (The .btn-fullscreen override that lived here went with the button itself — MAUI uses Android
   immersive mode + Lock Task, and kiosk-guard.js self-disables under .maui-app for the same reason.) */

/* Empty featured panel: show a friendly placeholder instead of blank white */
.featured-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    color: var(--text-muted);
    text-align: center;
    padding: 2rem 1.5rem;
}
.featured-empty-icon { font-size: 3rem; opacity: .35; }
.featured-empty-title { font-size: .95rem; font-weight: 700; color: var(--text); }
.featured-empty-hint { font-size: .8rem; line-height: 1.5; }

/* ── Admin hub (AdminPage.razor) ──────────────────────────────────
   The merchant's side of the till. One column, one gap, one card vocabulary: the Portal card, the
   install offer and every tile are members of the same family, on the real design tokens. The hub
   previously reached for --cc-primary, --surface-1 and --border-color, none of which exist in this
   stylesheet — every one was silently falling back to a browser-blue/grey that belongs to no part of
   the product. */
.admin-page { background: var(--surface); width: 100%; flex: 1; overflow-y: auto; }

.admin-hub {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    /* Capped so the tiles stay a readable column on a desktop browser instead of stretching to a
       1920px-wide strip of text. Below the cap it is fluid, which is the tablet and phone case. */
    max-width: 880px;
    margin: 0 auto;
    padding: 1.25rem 1rem 1.5rem;
}

/* --brand-green is THEMED: ThemeStyles.razor rewrites it from the merchant's ThemePrimary at
   runtime and computes --brand-green-text as its contrast pair. A literal #fff here would give a
   merchant who picks a light primary white-on-light and an unreadable card. Never hardcode a
   foreground on a themed background — pair the two tokens, as the rest of this stylesheet does. */
.admin-portal-card {
    background: var(--brand-green);
    color: var(--brand-green-text, #fff);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.4rem;
}
.admin-portal-title { font-size: 1.25rem; font-weight: 700; margin-bottom: .45rem; }
/* Opacity rather than a second colour: it de-emphasises whichever contrast colour was computed. */
.admin-portal-body  { margin: 0 0 1rem; line-height: 1.5; opacity: .92; }
.admin-portal-cta {
    display: inline-block;
    /* --accent-strong, not --accent: this button CARRIES text, and #d97746 measures 3.14:1 against
       white where 4.5:1 is required. Same hue, AA-compliant. See the token comment at the top. */
    /* --accent-strong is NOT themed (ThemeStyles only rewrites --brand-green and --brand-blue),
       so a literal foreground is safe here and the 5.0:1 ratio is fixed. */
    background: var(--accent-strong);
    color: #fff;
    font-weight: 700;
    padding: .6rem 1.2rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: .95rem;
}
.admin-portal-cta:hover { background: var(--accent-hover); }

.admin-tile {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: .9rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: border-color .15s, box-shadow .15s;
}
.admin-tile:hover { border-color: var(--brand-green); box-shadow: var(--shadow-xs); }
.admin-tile:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.admin-tile-icon { font-size: 1.5rem; flex-shrink: 0; line-height: 1; }
.admin-tile-text { display: flex; flex-direction: column; gap: .12rem; min-width: 0; flex: 1; }
.admin-tile-title { font-weight: 700; font-size: .95rem; }
.admin-tile-sub   { color: var(--text-muted); font-size: .82rem; line-height: 1.4; }
.admin-tile-chevron {
    flex-shrink: 0;
    font-size: 1.35rem;
    line-height: 1;
    color: var(--text-muted);
}

.admin-hub-note {
    margin: .5rem 0 0;
    color: var(--text-muted);
    font-size: .8rem;
    text-align: center;
    line-height: 1.5;
}
.product-list { padding: .5rem 1rem; display: flex; flex-direction: column; gap: .4rem; }
.product-row {
    display: flex;
    align-items: center;
    padding: .6rem .75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    gap: .5rem;
}
.product-info { flex: 1; min-width: 0; }
.product-name { font-weight: 600; display: block; }
.product-meta { font-size: .82rem; color: var(--text-muted); }
.dirty-badge {
    display: inline-block;
    background: #FFF9C4;
    color: #827717;
    border-radius: 4px;
    padding: 0 .35rem;
    font-size: .75rem;
    margin-left: .25rem;
    border: 1px solid #F9A825;
}
.fab-row { padding: 1rem; display: flex; justify-content: center; }

/* ── Forms (edit, settings) ─────────────────────────────────────── */
.settings-page { background: var(--surface); width: 100%; flex: 1; overflow-y: auto; }
.form-body, .settings-body { padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }

.settings-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .75rem;
}
.section-title { font-weight: 700; margin-bottom: .6rem; color: var(--brand-green); }
.section-note  { font-size: .85rem; color: var(--text-muted); margin-bottom: .6rem; }

.field-group { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .6rem; }
.field-group label { font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.field-group-center { justify-content: center; }
.toggle-label { display: flex; align-items: center; gap: .4rem; font-weight: normal; cursor: pointer; padding-top: .35rem; }
.toggle-label input[type=checkbox] { width: 1rem; height: 1rem; cursor: pointer; }
.field-row { display: flex; gap: .75rem; }
.field-row .field-group { flex: 1; }

.field-input, .field-select {
    width: 100%;
    padding: .5rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .95rem;
    background: var(--surface);
}
.field-input:focus, .field-select:focus {
    outline: 2px solid var(--brand-blue);
    border-color: transparent;
}

.connect-btn { margin-top: .35rem; width: 100%; }

.field-note { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }

.btc-rate-row { display: flex; gap: .5rem; align-items: center; }
.btc-rate-input { flex: 1; background: var(--surface-2); color: var(--text-muted); cursor: not-allowed; }

.suggest-tax-btn { margin-top: .5rem; }

.barcode-input-row { display: flex; gap: .5rem; align-items: center; }
.barcode-input-row .field-input { flex: 1; }
.barcode-scan-btn { white-space: nowrap; }

.barcode-scan-live { position: relative; width: 100%; }
.barcode-video { width: 100%; max-height: 180px; object-fit: cover; border-radius: var(--radius); background: #000; }
.barcode-scan-overlay { display: flex; align-items: center; gap: .5rem; padding: .4rem 0; }
.scan-status { font-size: .85rem; color: var(--text-muted); flex: 1; }
/* .scan-status is declared twice in this file (see also the header pill rule above), and this
   later `color` was silently beating .status-error at equal specificity — so "Error…",
   "Could not…" and "Unknown…" statuses rendered muted rather than red, giving the cashier no
   visual distinction between a successful scan and a failed one. These compound selectors win
   on specificity regardless of source order. The wording itself still carries the meaning, so
   colour is not the only signal (WCAG 1.4.1). */
.scan-status.status-error { color: var(--danger); }
.scan-status.status-ok    { color: var(--text-secondary); }
/* The add confirmation floats at the bottom of the screen, off the header and clear of the tiles' search row.
   (The sr-only live region above still announces it; this visible copy is aria-hidden.) */
.scan-status.till-toast {
    position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 950; flex: none; pointer-events: none;
    max-width: min(32rem, 92vw); padding: .6rem 1rem; border-radius: var(--radius, 4px);
    background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--brand-green);
    box-shadow: 0 6px 18px rgba(0,0,0,.25); font-size: .95rem; font-weight: 600; animation: till-toast-in .18s ease-out;
}
.scan-status.till-toast.status-error { border-left-color: var(--danger); color: var(--text); }
@keyframes till-toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .scan-status.till-toast { animation: none; } }

.required { color: var(--brand-red); }
.validation-error { color: var(--brand-red); font-size: .9rem; padding: .4rem .6rem; background: #FFEBEE; border-radius: var(--radius); }
.status-message   { color: var(--brand-green); font-size: .9rem; padding: .4rem .6rem; background: #E8F5E9; border-radius: var(--radius); }
.form-actions { display: flex; gap: .75rem; padding-top: .5rem; }
.form-actions .btn-pay { flex: 1; }

/* ── Payment page ────────────────────────────────────────────────── */
.payment-page { display: flex; flex-direction: column; background: var(--surface); width: 100%; flex: 1; overflow-y: auto; }
.total-display { text-align: center; padding: 1.5rem 1rem; }
.total-label   { font-size: 1rem; color: var(--text-muted); margin-bottom: .25rem; }
.total-amount  { font-size: 3rem; font-weight: 900; color: var(--brand-green); }
/* Change-due recap on the "Total Paid" confirmation screen (attended cash). */
.paid-change-row {
    display: flex;
    justify-content: center;
    gap: .5rem;
    align-items: baseline;
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: .3rem;
}
.paid-change-row .paid-change-label { font-weight: 600; }
.paid-change-highlight {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--brand-green);
    margin-top: .05rem;
}
.paid-change-highlight .paid-change-label { color: var(--brand-green); font-weight: 700; }
.breakdown-row {
    display: flex;
    justify-content: space-between;
    font-size: .9rem;
    color: var(--text-muted);
    padding: .1rem 1.5rem;
    margin-bottom: .1rem;
}
.breakdown-divider {
    height: 1px;
    background: var(--border);
    margin: .5rem 1.5rem .75rem;
}
.no-methods    { text-align: center; padding: 2rem; color: var(--text-muted); }
.no-methods p  { margin-bottom: .5rem; }

.cash-check-fallback {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.txn-id-block {
    background: var(--surface-2, #f5f5f5);
    border: 2px dashed var(--brand-green, #333);
    border-radius: 8px;
    text-align: center;
    padding: .75rem 1rem;
}
.txn-id-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.txn-id-value { font-size: 2rem; font-weight: 700; letter-spacing: .15em; font-family: monospace; color: var(--brand-green, #333); margin: .15rem 0; }
.txn-id-hint  { font-size: .78rem; color: var(--text-muted); }

.cash-check-prompt { font-size: .95rem; font-weight: 600; text-align: center; margin: .25rem 0 -.25rem; }

.cash-check-card {
    background: var(--surface, #fff);
    border: 2px solid var(--border, #ddd);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.cash-check-card:hover        { border-color: var(--brand-green, #333); }
.cash-check-card.selected     { border-color: var(--brand-green, #2e7d32); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-green, #2e7d32) 20%, transparent); }
.cash-check-card-top          { display: flex; align-items: center; gap: .5rem; }
.cash-check-icon              { font-size: 1.4rem; flex-shrink: 0; }
.cash-check-title             { font-size: 1rem; font-weight: 600; flex: 1; }
.cash-check-selected-mark     { font-size: 1.1rem; font-weight: 700; color: var(--brand-green, #2e7d32); }
.cash-check-instructions      { font-size: .88rem; color: var(--text-muted); line-height: 1.5; }

/* ── Alternative payment methods (unified tiles: card / cash / check) ── */
.alt-methods {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    padding: .25rem 1rem .5rem;
}
.alt-methods-divider {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--text-muted);
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin: .35rem 0 .1rem;
}
.alt-methods-divider::before,
.alt-methods-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border, #e6ebe7);
}
.pay-tile {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    text-align: left;
    background: var(--surface, #fff);
    border: 1.5px solid var(--border, #e6ebe7);
    border-radius: 13px;
    padding: .8rem .9rem;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.pay-tile:hover:not(:disabled) {
    border-color: var(--brand-green, #2e7d32);
    background: color-mix(in srgb, var(--brand-green, #2e7d32) 4%, transparent);
}
.pay-tile.sel {
    border-color: var(--brand-green, #2e7d32);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-green, #2e7d32) 16%, transparent);
}
.pay-tile:disabled { opacity: .6; cursor: default; }

/* ── Tip (offered above the tender tiles, before any tender starts) ──
   Same surface, border, radius and brand-green selection ring as .pay-tile so it reads as part of the payment screen.
   One compact row of equal, large touch targets (each at least 56px tall, 48px on a short landscape tablet) that
   wraps to two rows on a narrow portrait screen; it adds one short row of height, never a scroll region. */
.tip-panel {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    padding: .25rem 1rem .35rem;
}
.tip-title {
    color: var(--text);
    font-size: .95rem;
    font-weight: 600;
    text-align: center;
}
.tip-choices {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.tip-btn {
    flex: 1 1 0;
    min-width: 5.2rem;
    min-height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .05rem;
    background: var(--surface, #fff);
    border: 1.5px solid var(--border, #e6ebe7);
    border-radius: 13px;
    padding: .4rem .6rem;
    cursor: pointer;
    font: inherit;
    color: inherit;
    line-height: 1.15;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.tip-btn b { font-size: 1.05rem; font-weight: 700; }
.tip-btn small { font-size: .78rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tip-btn:hover:not(:disabled) {
    border-color: var(--brand-green, #2e7d32);
    background: color-mix(in srgb, var(--brand-green, #2e7d32) 4%, transparent);
}
.tip-btn.on {
    border-color: var(--brand-green, #2e7d32);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-green, #2e7d32) 16%, transparent);
}
.tip-btn:disabled { opacity: .6; cursor: default; }
.tip-custom { display: flex; gap: .5rem; align-items: stretch; }
.tip-custom .form-control { flex: 1 1 auto; min-height: 48px; font-size: 1.1rem; text-align: center; }
.tip-custom .btn { min-height: 48px; }
.tip-custom-field { position: relative; flex: 1 1 auto; display: flex; }
.tip-custom-field .form-control { padding-left: 1.6rem; width: 100%; }
.tip-currency { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); font-size: 1.1rem; color: var(--text-muted); pointer-events: none; }
.tip-error { color: var(--danger, #c62828); font-size: .85rem; text-align: center; }
/* Narrow portrait: three presets/choices per row, still full-width touch targets. */
@media (max-width: 520px) {
    .tip-btn { flex: 1 1 28%; }
}
/* Short landscape tablet (960x600): keep the whole tip row to one line so the tender tiles stay above the pinned footer. */
@media (max-height: 640px) and (orientation: landscape) {
    .tip-panel { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .2rem .6rem; padding-top: 0; padding-bottom: .2rem; }
    .tip-title { flex: 0 0 auto; text-align: left; white-space: nowrap; margin: 0; }
    .tip-panel > .tip-custom, .tip-panel > .tip-confirm, .tip-panel > .tip-error { flex: 0 0 100%; }
    .tip-choices { flex: 1 1 0; min-width: 0; flex-wrap: nowrap; gap: .4rem; }
    .tip-btn { min-height: 48px; min-width: 0; padding: .25rem .4rem; }
    .tip-btn small { font-size: .72rem; }
}
/* Short phone portrait (360x560): tighten the totals + tip blocks so Cash and Cancel stay on screen with a tip/donation chosen. */
@media (orientation: portrait) and (max-height: 640px) {
    .payment-page > .total-display { padding-top: .35rem; padding-bottom: .15rem; }
    .payment-page .total-amount { font-size: 1.7rem; }
    .payment-page .breakdown-row { padding-top: 0; padding-bottom: 0; font-size: .74rem; }
    .payment-page .breakdown-divider { margin: .15rem 1.5rem .2rem; }
    .tip-panel { gap: .2rem; padding-top: 0; padding-bottom: .2rem; }
    .tip-title { line-height: 1.1; margin: 0; }
    .tip-choices { gap: .3rem; }
    .tip-btn { min-height: 44px; padding: .2rem .4rem; }
}
/* Card + Pay-by-QR sit side by side; each column tile is centered: accepted-method logos on top,
   title + sub, then a large method icon (contactless / QR) as the visual anchor. */
.pay-row { display: flex; gap: .6rem; align-items: stretch; }
.pay-tile-col { flex: 1 1 0; min-width: 0; flex-direction: column; align-items: center; text-align: center;
                gap: .3rem; position: relative; padding: .9rem .7rem 1rem; }
.pay-tile-col .pay-marks { justify-content: center; margin-top: 0; margin-bottom: .1rem; }
.pay-tile-col .pay-tile-title { font-size: 1.05rem; }
.pay-tile-hero { margin-top: .35rem; color: var(--brand-green, #1B3D2A); line-height: 0; }
.pay-tile-hero svg { width: 46px; height: 46px; display: block; }
.pay-tile-col .pay-tile-mark { position: absolute; top: .5rem; right: .6rem; }
/* Five or six tiles (the wallet QR options join Card / Cash / Pay by QR): equal tiles, three to a row, compact enough that
   two rows plus Check | Charge to account and the docked footer all sit above the fold at 960x600. */
.pay-row.dense { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.pay-row.dense .pay-tile-col { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: .6rem; row-gap: 0; align-items: center;
                               text-align: left; padding: .5rem .7rem; min-height: 64px; }
.pay-row.dense .pay-tile-col .pay-marks { display: none; }
.pay-row.dense .pay-tile-hero { grid-column: 1; grid-row: 1 / span 2; margin-top: 0; }
.pay-row.dense .pay-tile-col .pay-tile-title { grid-column: 2; grid-row: 1; font-size: 1rem; }
.pay-row.dense .pay-tile-col .pay-tile-sub { grid-column: 2; grid-row: 2; font-size: .75rem; }
.pay-row.dense .pay-tile-hero svg { width: 30px; height: 30px; }
/* A short landscape screen (the 960x600 tablet) with tax on the sale: Subtotal and Tax share one line, and the tall Card / Cash /
   Pay by QR tiles give back a little height, so every tile still sits above the pinned footer. */
@media (max-height: 640px) and (orientation: landscape) {
    .total-display { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; column-gap: 1.1rem; }
    .total-display > * { flex: 0 0 100%; }
    .total-display > .breakdown-row { flex: 0 0 auto; min-width: 0; gap: .5rem; padding-left: 0; padding-right: 0; margin-bottom: .15rem; justify-content: center; }
    .total-display > .breakdown-divider { display: none; }
    .pay-row:not(.dense) .pay-tile-col { padding: .6rem .7rem .65rem; gap: .15rem; }
    .pay-row:not(.dense) .pay-tile-hero { margin-top: .1rem; }
    .pay-row:not(.dense) .pay-tile-hero svg { width: 36px; height: 36px; }
    /* The check memo / envelope code is one row (label left, code right), so it sits above the footer with the balance added. */
    .payment-page .honor-code-panel { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: .3rem .9rem; column-gap: .8rem; row-gap: 0; }
    .payment-page .honor-code-value { font-size: 1.8rem; letter-spacing: .18em; line-height: 1.2; }
    .payment-page .alt-methods { gap: .4rem; }
    .payment-page .alt-methods .pay-tile:not(.pay-tile-col) { padding-top: .35rem; padding-bottom: .35rem; }
    .payment-page .alt-methods .pay-tile:not(.pay-tile-col) .pay-tile-ic { width: 34px; height: 34px; }
    .payment-page .honor-note { margin: 0; padding: .15rem 0; font-size: .8rem; }
    .payment-page .honor-code-instructions { flex: 0 0 100%; text-align: left; font-size: .8rem; line-height: 1.3; margin-top: 0; }
}
.wallet-sheet .qr-overlay-img { width: 200px; height: 200px; }
.wallet-sheet .qr-overlay-title { margin-bottom: .6rem; font-size: 1.2rem; }
.wallet-sheet .payment-confirm-note { font-size: .9rem; margin: .5rem 0 .6rem; }
.wallet-sheet-actions { display: grid; grid-template-columns: 2fr 1fr; gap: .5rem; }
.wallet-sheet-actions .btn { min-height: 48px; }
.receipt-prompt-check.pending { color: #b45309; }
/* A cashier has no other way to tell a simulated reader from a real one — the tile is otherwise
   identical. Deliberately loud (amber, uppercase, top-left so it reads before the tile title does). */
.pay-tile-test-badge {
    position: absolute; top: .5rem; left: .6rem;
    background: #b45309; color: #fff;
    font-size: .62rem; font-weight: 800; letter-spacing: .04em;
    padding: .12rem .4rem; border-radius: 999px; line-height: 1.3;
}
/* While the card reader is waiting: highlight the tile and pulse the contactless icon as a "tap now" cue. */
.pay-tile-col.processing { border-color: var(--brand-green, #2e7d32);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-green, #2e7d32) 18%, transparent); }
.pay-tile-hero.cc-tap-active svg { transform-origin: center; animation: cc-tap-pulse 1.1s ease-in-out infinite; }
@keyframes cc-tap-pulse { 0%, 100% { transform: scale(1); opacity: .7; } 50% { transform: scale(1.22); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pay-tile-hero.cc-tap-active svg { animation: none; } }
.pay-tile-ic {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--brand-green, #2e7d32) 10%, transparent);
    color: var(--brand-green, #1B3D2A);
}
.pay-tile-tx { flex: 1; display: flex; flex-direction: column; gap: .12rem; }
.pay-tile-title { font-weight: 700; font-size: 1rem; color: var(--text-primary, #1c3226); }
.pay-tile-sub   { font-size: .8rem; color: var(--text-muted); }
.pay-tile-chev  { color: var(--border, #c2ccc6); font-size: 1.25rem; line-height: 1; }
.pay-tile-mark  { color: var(--brand-green, #2e7d32); font-weight: 800; font-size: 1.1rem; }
.card-pay-error {
    margin: -.1rem .1rem 0;
    padding: .5rem .75rem;
    background: #fdecea;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #a12622;
    font-weight: 600;
    font-size: .9rem;
}

/* The sale could not be written to the device. Louder than .card-pay-error on purpose: a declined card
   is a routine "try another one", whereas this appears when money may already be in the drawer and the
   cashier has to act on it before the screen is cleared. */
.sale-error {
    margin: .5rem .1rem;
    padding: .7rem .9rem;
    background: #fdecea;
    border: 2px solid #a12622;
    border-radius: 8px;
    color: #a12622;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.35;
}

/* ── Honor-mode envelope code panel ───────────────────────────────── */
.honor-code-panel {
    background: var(--surface-2, #f5f5f5);
    border: 2px dashed var(--brand-green, #333);
    border-radius: 8px;
    text-align: center;
    padding: .85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}
.honor-code-label        { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.honor-code-value        { font-size: 2.4rem; font-weight: 700; letter-spacing: .25em; font-family: monospace; color: var(--brand-green, #333); }
.honor-code-instructions { font-size: .88rem; color: var(--text-muted); line-height: 1.5; margin-top: .2rem; }

/* ── Change due panel ──────────────────────────────────────────────── */
.change-due-panel {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: .85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}
.change-due-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.change-due-denoms {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
}
.change-denom-btn {
    padding: .35rem .75rem;
    border-radius: 99px;
    border: 1.5px solid #d1d5db;
    background: #fff;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.change-denom-btn:hover  { border-color: var(--brand-green, #2e7d32); }
.change-denom-btn.active { background: var(--brand-green, #2e7d32); border-color: var(--brand-green, #2e7d32); color: #fff; }
.change-due-input {
    width: 100%;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    padding: .45rem .7rem;
    font-size: 1rem;
    background: #fff;
    box-sizing: border-box;
}
.change-due-input:focus { outline: none; border-color: var(--brand-green, #2e7d32); }
.change-due-result {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    background: #dcfce7;
    border-radius: 8px;
    padding: .5rem .75rem;
}
.change-due-result.change-due-short { background: #fef2f2; }
.change-due-result-label  { font-size: .85rem; color: #166534; font-weight: 600; }
.change-due-result.change-due-short .change-due-result-label { color: #991b1b; }
.change-due-result-amount { font-size: 1.4rem; font-weight: 800; color: #15803d; }
.change-due-result.change-due-short .change-due-result-amount { color: #dc2626; }

.qr-scroll {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: .5rem 1rem 1rem;
}
.qr-card {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}
.qr-label {
    font-weight: 700;
    font-size: 1.05rem;
    width: 100%;
    text-align: center;
    padding-bottom: .4rem;
    margin-bottom: .6rem;
    border-bottom: 2px solid var(--accent, #1e6fff);
}
.qr-image { width: 160px; height: 160px; image-rendering: pixelated; }
.qr-hint  { font-size: .78rem; color: var(--text-muted); margin-top: .5rem; }

/* Mobile portrait: 2-column QR grid so the 3rd card isn't clipped */
@media (max-width: 480px) {
    .qr-card  { flex: 0 0 calc(50% - .5rem); }
    .qr-image { width: 120px; height: 120px; }
}

.honor-note {
    text-align: center;
    padding: .75rem;
    color: var(--text-muted);
    font-size: .9rem;
}
.payment-confirm-note {
    text-align: center;
    padding: .25rem 1rem .5rem;
    color: var(--brand-green);
    font-size: .8rem;
    font-weight: 600;
}
.payment-actions {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    padding: .75rem 1rem 1.5rem;
}
.payment-actions .btn { width: 100%; }

/* ── Receipt prompt ──────────────────────────────────────────────── */
.receipt-prompt {
    margin: .5rem 1rem 1.5rem;
    padding: 1.25rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    border-top: 3px solid var(--brand-green);
}
.receipt-prompt-check {
    font-size: .85rem;
    font-weight: 700;
    color: var(--brand-green);
    margin-bottom: .35rem;
}
.receipt-prompt-heading { margin: 0 0 1rem; font-size: 1.05rem; }
.receipt-actions {
    display: flex;
    gap: .5rem;
    margin-top: .75rem;
}
.receipt-msg { font-size: .85rem; margin: .35rem 0 0; }
.receipt-error { color: var(--brand-red); }
/* Email + Mobile sit side by side to keep Send Receipt above the fold. Each keeps a sane
   minimum so on a very narrow phone they wrap back to stacked instead of squishing. */
.receipt-contact-row { flex-wrap: wrap; }
.receipt-contact-row .field-group { flex: 1 1 8rem; min-width: 8rem; }
.receipt-sent  { color: #2E7D32; font-weight: 600; }

/* Online-receipt QR on the receipt step: beside the contact form on a tablet (so Send receipt / Skip stay above
   the fold), stacked under it on a phone. The form column takes the remaining width and may shrink (min-width 0)
   so Email + Mobile never push the QR off the side. */
.receipt-body.has-qr { display: flex; gap: 1.25rem; align-items: flex-start; }
.receipt-body.has-qr > .receipt-form { flex: 1 1 auto; min-width: 0; }
.receipt-body.qr-only { justify-content: center; }
.receipt-body.qr-only > .receipt-form { display: none; }
.receipt-qr {
    flex: 0 0 auto;
    width: 11rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    text-align: center;
}
.receipt-qr img {
    width: 11rem;
    height: 11rem;
    box-sizing: border-box;
    padding: .35rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    image-rendering: pixelated;
}
.receipt-qr figcaption { font-size: .8rem; line-height: 1.3; color: var(--text-muted); }
@media (max-width: 640px) {
    /* QR FIRST on a phone, above "Want a receipt?", so the no-info option is in view without scrolling and never
       sits under the sticky action bar. Caption beside the code rather than under it to save height. */
    .receipt-body.has-qr { flex-direction: column; align-items: stretch; gap: .6rem; }
    .receipt-body.has-qr > .receipt-qr {
        order: -1;
        width: auto;
        flex-direction: row;
        justify-content: center;
        gap: .75rem;
        text-align: left;
    }
    .receipt-qr img { width: 8.5rem; height: 8.5rem; flex: 0 0 auto; }
    .receipt-qr figcaption { max-width: 10rem; font-size: .85rem; }
    /* Email and Mobile full-width, one under the other: side by side they clip their placeholders. */
    .receipt-contact-row { flex-direction: column; gap: 0; }
    .receipt-contact-row .field-group { flex: 1 1 auto; min-width: 0; }
    /* The stacked QR adds height, so on a phone Send receipt / Skip / Done pin to the bottom of .payment-page's
       scroll area while the form and QR scroll under them (same pattern as the short-landscape footer below). */
    .receipt-body.has-qr ~ .receipt-actions-primary {
        position: sticky;
        bottom: 0;
        background: var(--surface-2);
        padding: .5rem 0 .1rem;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, .06);
        z-index: 5;
    }
}

/* Data-use / SMS consent notice on the receipt screen. Compact single line by default;
   "How we use your info" toggles the fuller two-party explanation. Kept small + muted so it
   never crowds the fields, but the SMS consent stays legible for carrier/TCR review. */
.receipt-consent { margin-top: .5rem; }
.receipt-consent-line { margin: 0; font-size: .72rem; line-height: 1.35; opacity: .75; }
.receipt-consent-toggle {
    background: none; border: 0; padding: 0; margin: 0;
    font: inherit; color: inherit; text-decoration: underline; cursor: pointer;
}
.receipt-consent-sep { opacity: .45; margin: 0 .2rem; }
.receipt-consent-links { margin-top: .5rem; }

/* Standalone SMS express-consent checkbox (TCR-mandated). Deliberately normal-contrast and legible —
   NOT fine print — so the consent statement reads as a standalone agreement in reviews/screenshots. */
.sms-consent-check {
    display: flex; align-items: flex-start; gap: .55rem;
    margin-top: .6rem; padding: .55rem .65rem;
    font-size: .85rem; line-height: 1.4; color: var(--text, #1f2937);
    background: rgba(0,0,0,.03); border: 1px solid rgba(0,0,0,.12); border-radius: 8px;
    cursor: pointer;
}
.sms-consent-check input[type="checkbox"] {
    width: 1.15rem; height: 1.15rem; margin-top: .1rem; flex: 0 0 auto;
    accent-color: var(--brand-green, #2F7A43); cursor: pointer;
}

/* ── Contact form (payment page) ─────────────────────────────────── */
.contact-form {
    margin: .25rem 1rem .75rem;
    padding: 1.25rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    border-top: 3px solid var(--accent);
}
.contact-form-heading { margin: 0 0 .75rem; font-size: 1.05rem; }
.required-star { color: var(--brand-red); }

/* ── Payment pending notice ──────────────────────────────────────── */
.receipt-pending-notice {
    background: #fff8e1;
    border-left: 4px solid #f9a825;
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: .75rem 1rem;
    margin: .5rem 0 1rem;
    font-size: .88rem;
    color: #5d4037;
    line-height: 1.5;
}
.receipt-pending-notice strong { display: block; margin-bottom: .25rem; color: #e65100; }
/* Success notice for a shopper (offline-stored card): its own class so the short-landscape rule that collapses
   .receipt-pending-notice to one line does not hide the body sentence on a 960x600 kiosk. */
.receipt-notice--ok {
    background: #e8f5e9;
    border-left: 4px solid #a5d6a7;
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: .75rem 1rem;
    margin: .5rem 0 1rem;
    font-size: .88rem;
    color: #1b5e20;
    line-height: 1.5;
}
.receipt-notice--ok strong { display: block; margin-bottom: .25rem; color: inherit; }
.receipt-notice--ok p { margin: 0; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .receipt-notice--ok { background: #12301a; border-left-color: #2e7d32; color: #c8e6c9; }
}
:root[data-theme="dark"] .receipt-notice--ok { background: #12301a; border-left-color: #2e7d32; color: #c8e6c9; }
.receipt-pending-notice p { margin: 0; }

/* ── Short-viewport (landscape tablet) fit for the payment + receipt screens ───────────────
   Tab 60 kiosk tablet in landscape, no zoom, is a 960x600 CSS-px viewport. Once the cash
   change-due panel appeared (or, on the receipt step, the contact form rendered), the primary
   Record payment/Cancel — and later Send receipt/Skip — buttons were pushed below the fold and
   the cashier had to scroll mid-sale to finish it. Scoped to max-height AND landscape so normal
   tablet/desktop heights and phones in portrait (short height, but not landscape) are untouched. */
@media (max-height: 700px) and (orientation: landscape) {
    /* Height reserved for whichever sticky action footer is on screen: Record payment/Cancel
       stacked (the taller of the two — that's what this is sized to) or Send receipt/Skip in a
       row. .payment-page never shows both at once (_showReceiptPrompt toggles between them), so
       one shared value is enough — sizing it to the taller footer just leaves a little extra
       clearance on the receipt step, which is harmless. Kept as a custom property, not repeated
       as a magic number, so scroll-padding-bottom below and every scroll-margin-bottom on a
       field that can sit behind a footer stay in lockstep. */
    .payment-page {
        --sticky-footer-h: 6.5rem;
        /* The Android WebView runs edge-to-edge and does not resize when the soft keyboard
           opens (see the .modal-overlay comment below), so a focused input's own
           scrollIntoView still has to clear the sticky footer sitting on top of the scroll
           container's own content, not just the keyboard. */
        scroll-padding-bottom: var(--sticky-footer-h);
    }

    /* Record payment / Cancel become a sticky footer inside .payment-page's own scroll
       container (it already has overflow-y:auto), so they stay on screen while the content
       above — QR cards, payment tiles, the change-due panel — scrolls underneath. Scoped to a
       direct child of .payment-page so it never reaches the unrelated .ppcard-actions instance
       of this class inside the PayPal card overlay. */
    .payment-page > .payment-actions {
        position: sticky;
        bottom: 0;
        background: var(--surface);
        padding: .5rem 1rem;
        gap: .4rem;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, .08);
        z-index: 5;
    }

    /* Shrink the Total Due / Total Paid hero and the subtotal/tax breakdown — the single
       biggest fixed block of vertical space on the page. */
    .payment-page > .total-display { padding: .5rem 1rem .25rem; }
    .payment-page .total-label     { font-size: .8rem; margin-bottom: .1rem; }
    .payment-page .total-amount    { font-size: 1.9rem; }
    .payment-page .breakdown-row      { padding: .05rem 1rem; font-size: .78rem; margin-bottom: 0; }
    .payment-page .breakdown-divider  { margin: .3rem 1.5rem .4rem; }
    .payment-page .paid-change-row        { font-size: .85rem; margin-top: .15rem; }
    .payment-page .paid-change-highlight  { font-size: 1rem; }

    /* Give the cash change-due panel a little more breathing room back too. */
    .change-due-panel  { padding: .6rem .75rem; gap: .45rem; }
    .change-due-denoms { gap: .3rem; }

    /* "Or enter amount" sits directly above the sticky Record payment/Cancel footer. Focusing it
       opens the Android soft keyboard and the WebView scrolls the input into view — without this,
       "into view" is measured against the scroll container's padding box, which the sticky footer
       visually sits on top of, so the input lands hidden behind Record payment. */
    .change-due-input { scroll-margin-bottom: var(--sticky-footer-h); }

    /* ── Receipt step ──────────────────────────────────────────────────────────────────── */
    .payment-page > .receipt-prompt { padding: .65rem .85rem; margin: .35rem .5rem 1rem; }

    /* Collapse the two confirmation banners — the "Payment recorded" check line above, and the
       bordered "Payment confirmed/pending" notice below it — into a single line: hide the
       redundant check line and drop the notice's explanatory paragraph, keeping just its bold
       title (e.g. "✓ Payment confirmed"). */
    .receipt-prompt-check         { display: none; }
    .receipt-pending-notice       { padding: .4rem .65rem; margin: 0 0 .4rem; }
    .receipt-pending-notice strong { margin-bottom: 0; font-size: .85rem; }
    .receipt-pending-notice p      { display: none; }

    .receipt-prompt-heading { margin: 0 0 .35rem; font-size: .95rem; }

    /* Name shares a row with Email + Mobile on wide-but-short screens instead of stacking above
       them. .receipt-contact-row keeps its own internal flex layout (Email/Mobile side by side)
       unchanged — it just becomes a second flex item alongside Name here. */
    .receipt-options {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: .5rem;
    }
    .receipt-options > .field-group       { flex: 1 1 8rem; min-width: 8rem; margin-bottom: 0; }
    .receipt-options > .receipt-contact-row { flex: 2 1 14rem; margin: 0; }
    .receipt-options .field-group label   { font-size: .78rem; }
    /* Name/Email/Mobile sit directly above the sticky Send receipt/Skip footer. Same reasoning as
       .change-due-input above: without scroll-margin-bottom, focusing one of these on the Android
       soft keyboard scrolls it to the edge of .payment-page's padding box, which the sticky footer
       is drawn over — leaving the field the cashier just tapped hidden underneath it. */
    .receipt-options .field-input         { padding: .35rem .55rem; font-size: .88rem; scroll-margin-bottom: var(--sticky-footer-h); }

    .receipt-consent { margin-top: .3rem; }

    /* The online-receipt QR beside the form: smaller here so the short screen keeps its height for the form. */
    .receipt-qr, .receipt-qr img { width: 8rem; }
    .receipt-qr img { height: 8rem; }

    /* Send receipt / Skip become the receipt step's own sticky footer, pinned within
       .receipt-prompt (still scrolling inside .payment-page). Scoped to .receipt-actions-primary
       so the separate Print Receipt .receipt-actions block further down is left alone — making
       both sticky would stack them on top of each other at the bottom of the screen. */
    .receipt-actions-primary {
        position: sticky;
        bottom: 0;
        background: var(--surface-2);
        margin-top: .4rem;
        padding: .5rem 0 .1rem;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, .06);
        z-index: 5;
    }
}

/* ── Modal (PIN dialog) ──────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    display: flex;
    /* Anchor dialogs near the TOP (not vertically centred) so the on-screen keyboard can never
       cover the input or the Enter/Cancel buttons. The Android kiosk WebView runs edge-to-edge
       (SetDecorFitsSystemWindows=false) and does NOT resize when the IME opens, so a centred or
       even mid-anchored dialog leaves its buttons behind the keyboard with no way to scroll to
       them (the full-height overlay never overflows). Keeping the dialog high puts the PIN field
       and action buttons inside the ~top third that stays visible above the keyboard. */
    align-items: flex-start; justify-content: center;
    padding: 2.5vh 1rem 2rem;
    overflow-y: auto;
    z-index: 1000;
}
.modal-box {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    width: min(320px, 90vw);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
.modal-box h3 { font-size: 1.1rem; }
.modal-hint { font-size: .9rem; color: var(--text-muted); margin: 0; text-align: center; }

/* Wristband validation result — big, glanceable ✓ / ✗ so staff can read it across a stand. */
.band-result { align-items: center; text-align: center; border-top: 6px solid transparent; }
.band-result.band-ok  { border-top-color: #4CAF50; }
.band-result.band-bad { border-top-color: #F44336; }
.band-icon {
    width: 84px; height: 84px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; font-weight: 700; color: #fff; line-height: 1;
}
.band-ok  .band-icon { background: #4CAF50; }
.band-bad .band-icon { background: #F44336; }
.band-title { margin: 0; }
.band-ok  .band-title { color: #2e7d32; }
.band-bad .band-title { color: #c62828; }

/* Per-item redemption checklist (Phase F) inside the scan-result modal. */
.redeem-panel { width: 100%; margin-top: .5rem; text-align: left; }
.redeem-status { font-size: .85rem; color: var(--text-muted); margin: .25rem 0; text-align: center; }
.redeem-status.redeem-err { color: #c62828; }
.redeem-title { font-size: .8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: .35rem; }
.redeem-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; max-height: 40vh; overflow-y: auto; }
.redeem-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}
.redeem-row.is-redeemed { opacity: .6; background: var(--surface-2); }
.redeem-name { flex: 1; font-weight: 600; color: var(--text); }
.redeem-count { font-variant-numeric: tabular-nums; color: var(--text-muted); font-size: .9rem; }
.redeem-done { color: #2e7d32; font-weight: 700; font-size: .85rem; white-space: nowrap; }
.redeem-btn { white-space: nowrap; }
.pin-input {
    width: 100%;
    padding: .6rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: .3em;
}
.pin-error { color: var(--brand-red); font-size: .9rem; }
.modal-actions { display: flex; gap: .6rem; }
.modal-actions .btn { flex: 1; }

/* ID check confirmation: a tap target big enough to be a deliberate act on a phone, and the whole
   row is the label so the tick does not need a fingertip on a 16px box. */
.age-confirm { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; }
.age-confirm input { width: 1.4rem; height: 1.4rem; flex: 0 0 auto; margin-top: .1rem; }

/* ── Cart thumbnail ──────────────────────────────────────────────── */
.cart-thumb--mono { display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; color: var(--text-muted); }
.cart-thumb {
    width: 36px;
    height: 36px;
    object-fit: contain;   /* whole product image, no cropping */
    background: var(--surface-2);
    border-radius: 5px;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

/* ── Product image management ────────────────────────────────────── */
.image-capture-row {
    display: flex;
    gap: .5rem;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: .75rem;
    padding: .25rem 0;
}

.image-card {
    display: flex;
    flex-direction: column;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
}

.image-card.is-thumbnail {
    border-color: var(--brand-green);
}

.image-preview {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--surface-2);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: var(--surface-2);
}

.thumbnail-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: var(--brand-green);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: .1rem .35rem;
    border-radius: 4px;
}

.image-card-actions {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: .5rem;
}

.training-toggle {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .8rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: .15rem 0;
}

.training-toggle input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--brand-blue);
}

/* ── Misc ────────────────────────────────────────────────────────── */
.loading    { padding: 2rem; text-align: center; color: var(--text-muted); }
.not-found  { padding: 2rem; text-align: center; color: var(--text-muted); }

/* ── Reports page ────────────────────────────────────────────────── */
.reports-page { background: var(--surface); width: 100%; flex: 1; overflow-y: auto; }

.report-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    background: var(--surface-2);
}
.tab-btn {
    padding: .65rem 1.4rem;
    border: none;
    background: none;
    font-size: .95rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
}
.tab-btn:hover { color: var(--text); }
.tab-active { color: var(--brand-green) !important; border-bottom-color: var(--brand-green) !important; }

.report-section { padding: 1rem; }
.report-section-scroll { overflow-y: auto; max-height: calc(100vh - 80px); }

.report-filters {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: .75rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}
.filter-row {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}
.filter-row .field-group { flex: 1; min-width: 140px; }
.report-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Product sheet card */
.product-sheet {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
}
/* .sheet-row is the main horizontal layout: thumb | body | catalog-QR */
.sheet-row, .sheet-top {
    display: flex;
    gap: 1rem;
    align-items: center;
}
.sheet-thumb {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.sheet-body { flex: 1; }
.sheet-name  { font-size: 1.4rem; font-weight: 800; margin-bottom: .3rem; color: var(--text); }
.sheet-desc  { color: var(--text-muted); font-size: .95rem; margin-bottom: .5rem; }
.sheet-price { font-size: 1.5rem; font-weight: 900; color: var(--brand-green); }

.sheet-qr-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px solid var(--border);
}
.sheet-qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    flex-shrink: 0;
}
.sheet-qr-label { font-weight: 700; font-size: .85rem; }
.sheet-qr-img   { width: 110px; height: 110px; image-rendering: pixelated; }
.sheet-qr-hint  { font-size: .72rem; color: var(--text-muted); text-align: center; }

/* Catalog QR — green dashed outline, sits inline at the right of sheet-row */
.sheet-qr-item-catalog .sheet-qr-label { color: var(--brand-green); }
.sheet-qr-item-catalog .sheet-qr-hint  { color: var(--brand-green); font-weight: 600; }
.sheet-qr-item-catalog .sheet-qr-img   {
    outline: 2.5px dashed var(--brand-green);
    outline-offset: 4px;
    border-radius: 2px;
}

/* Sales report */
.report-summary {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: .75rem 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: .75rem;
    font-size: .9rem;
    color: var(--text-muted);
}
.report-empty { padding: 2rem; text-align: center; color: var(--text-muted); }

.report-table-wrap { overflow-x: auto; }
.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.report-table th, .report-table td {
    padding: .5rem .75rem;
    border: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}
.report-table th {
    background: var(--surface-2);
    font-weight: 700;
    color: var(--text-muted);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.report-table tbody tr:nth-child(even) { background: var(--surface-2); }
.report-table .col-num   { text-align: right; }
.report-table .col-txnid { font-size: .78rem; white-space: nowrap; }
.txnid-link { color: var(--brand-green); text-decoration: none; font-family: monospace; }
.txnid-link:hover { text-decoration: underline; }
.totals-foot td {
    font-weight: 800;
    background: var(--surface-2);
    border-top: 2px solid var(--border);
}

.print-report-header { margin-bottom: .75rem; }
.print-report-header h2 { font-size: 1.4rem; }
.print-report-header p  { color: var(--text-muted); font-size: .9rem; }

/* ── Print styles ────────────────────────────────────────────────── */
.print-only { display: none; }

@media print {
    .no-print   { display: none !important; }
    .print-only { display: block !important; }

    body, html { background: white; }

    .reports-page { max-width: none; box-shadow: none; }

    .product-sheet { border: 1px solid #ccc; box-shadow: none; page-break-after: always; }
    .product-sheet:last-child { page-break-after: avoid; }

    .report-table th                          { background: #eee !important; }
    .report-table tbody tr:nth-child(even)    { background: #f9f9f9 !important; }
    .totals-foot td                           { background: #eee !important; }
    .report-summary                           { background: #f5f5f5 !important; }
}

/* ── Image Editor Modal ────────────────────────────────────────────── */
/* ── Cloud Account section ──────────────────────────────────────────── */
.cloud-status {
    display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
    padding: .5rem .75rem; border-radius: var(--radius);
    font-size: .875rem; font-weight: 600; margin-bottom: .75rem;
}
.cloud-status-connected { background: #E8F5E9; color: #2E7D32; border: 1px solid #A5D6A7; }
.cloud-device-id { font-family: monospace; font-size: .78rem; font-weight: 400; color: #555; }
.cloud-sync-row  { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

/* Connection indicator dot on collapsed section header */
.cloud-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-left: .4rem; flex-shrink: 0; }
.cloud-dot-on  { background: #4CAF50; box-shadow: 0 0 4px #4CAF50; }
.cloud-dot-off { background: #bbb; }

/* Read-only field display for connected state */
.field-value-readonly { font-size: .875rem; color: #333; padding: .35rem 0; word-break: break-all; }
.key-masked { font-family: monospace; letter-spacing: .05em; color: #777; display: flex; align-items: center; gap: .25rem; }
.key-last4  { color: #333; font-weight: 600; letter-spacing: normal; }

/* ── Collapsible settings section headers ───────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: .25rem 0 .4rem;
    cursor: pointer;
    font-size: inherit;
    gap: .5rem;
    text-align: left;
}
.section-header:hover { opacity: .82; }
.section-header .section-title { margin-bottom: 0; }
.section-icon { font-size: 1.15rem; flex-shrink: 0; }
.section-chevron { margin-left: auto; font-size: .75rem; transition: transform .2s; flex-shrink: 0; }
.section-chevron.open { transform: rotate(0deg); }
.section-chevron:not(.open) { transform: rotate(-90deg); }
/* No max-height / overflow here on purpose. This used to be a 60vh scroll box nested inside the
   already-scrolling .settings-page, which put the Save button below the fold of the INNER scroller
   on a phone — it rendered, and looked missing. Nested scrolling on a touch screen is a known
   failure mode: the gesture lands on whichever scroller is under the finger. The page scroll is the
   only one there should be. See SettingsPageStructureTests. */
.section-content {
    animation: sectionFade .12s ease;
}
@keyframes sectionFade { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }

/* "Synced with Portal" — AutoStartCamera, MirrorCamera and KioskMode are CanDeviceOverride: the
   merchant can set them here AND in the Portal, and the device override wins. That precedence is
   real, so it has to be visible; without the chip these read as purely local, like the camera pick
   beside them. Deliberately quiet — it is a fact about the setting, not a warning. */
.synced-chip {
    display: inline-block;
    padding: .05rem .4rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface-2, #f5f5f5);
    color: var(--text-muted);
    font-size: .7rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Danger zone — the one destructive control on the page, last, and looking like it. */
.settings-section-danger { border-color: var(--brand-red, #C62828); }
.settings-section-danger .section-title { color: var(--brand-red, #C62828); }

/* Inline "saved"/"copied" confirmation beside a Save button. Replaces `text-success small ms-2`,
   Bootstrap utilities that this app never loads and which therefore styled nothing. */
.setting-saved { color: var(--brand-green); font-size: .85rem; align-self: center; }

/* ── Diagnostics ─────────────────────────────────────────────────────── */
.diag-row   { display: flex; align-items: flex-start; gap: .5rem; }
.diag-value { flex: 1; min-width: 0; }
.diag-path  { font-family: monospace; font-size: .8rem; word-break: break-all; }
.diag-copy  { flex-shrink: 0; font-size: .75rem; padding: .15rem .5rem; }

/* ── Branding ────────────────────────────────────────────────────── */
.logo-preview { max-width: 140px; max-height: 64px; margin-top: .5rem; border-radius: 4px; border: 1px solid var(--border); display: block; }
.color-input-row { display: flex; gap: .75rem; align-items: center; }
.color-swatch { width: 42px; height: 42px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; padding: 2px; flex-shrink: 0; }

.theme-preset-grid { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .25rem; }
.theme-preset-btn {
    display: flex; align-items: center; gap: .35rem;
    padding: .3rem .55rem; border: 2px solid var(--border);
    border-radius: var(--radius); background: var(--surface);
    cursor: pointer; font-size: .8rem; color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.theme-preset-btn:hover { border-color: var(--brand-green); box-shadow: 0 0 0 2px rgba(46,125,50,.15); }
.theme-preset-btn.active { border-color: var(--brand-green); box-shadow: 0 0 0 2px rgba(46,125,50,.25); }
.preset-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(0,0,0,.12); }
.preset-name { white-space: nowrap; }

/* ── Transaction Photos settings ────────────────────────────────── */
.photo-event-row { display: flex; flex-direction: column; gap: .45rem; margin-top: .25rem; }
.photo-event-label { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .9rem; font-weight: normal; }
.photo-event-label input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand-green); cursor: pointer; }

/* ── Session status badges ───────────────────────────────────────── */
.status-completed { display: inline-block; background: #E8F5E9; color: var(--brand-green); padding: .15rem .55rem; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.status-abandoned { display: inline-block; background: #FFF3E0; color: #E65100; padding: .15rem .55rem; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.session-row-abandoned td { color: var(--text-muted); }

/* ── Abandoned cart summary ──────────────────────────────────── */
.abandoned-summary {
    display: flex; flex-wrap: wrap; gap: .75rem;
    margin-bottom: 1rem;
}
.ab-stat {
    flex: 1; min-width: 120px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: .75rem 1rem;
    text-align: center;
}
.ab-stat-loss { border-color: #E65100; background: #FFF3E0; }
.ab-stat-value { font-size: 1.45rem; font-weight: 800; color: var(--text); }
.ab-stat-loss .ab-stat-value { color: #E65100; }
.ab-stat-label { font-size: .72rem; color: var(--text-muted); margin-top: .15rem; text-transform: uppercase; letter-spacing: .04em; }
.lost-value { color: #C62828; font-weight: 600; }

/* ── Payment Reconciliation ─────────────────────────────────────── */
.recon-summary { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.recon-stat { flex: 1; min-width: 110px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .65rem .9rem; text-align: center; }
.recon-stat-disputed { border-color: #E65100; }
.recon-stat-loss     { border-color: #C62828; background: #FFEBEE; }
.recon-stat-value    { font-size: 1.3rem; font-weight: 800; }
.recon-stat-label    { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-top: .1rem; }
.recon-card {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: .6rem;
}
.recon-disputed { border-color: #E65100; background: #FFF3E0; }
.recon-card-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .3rem; }
.recon-card-meta   { display: flex; gap: .55rem; align-items: baseline; flex-wrap: wrap; }
.recon-method      { font-weight: 700; font-size: .85rem; }
.recon-time        { font-size: .78rem; color: var(--text-muted); }
.recon-card-total  { font-weight: 800; color: #C62828; font-size: 1.05rem; }
.recon-card-items  { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.recon-item        { font-size: .8rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .15rem .5rem; }
.recon-card-actions { display: flex; gap: .5rem; }
.recon-status-badge { display: inline-block; padding: .15rem .5rem; border-radius: 10px; font-size: .75rem; font-weight: 600; }
.recon-badge-pending     { background: #FFF9C4; color: #F57F17; }
.recon-badge-received    { background: #E8F5E9; color: #2E7D32; }
.recon-badge-disputed    { background: #FFF3E0; color: #E65100; }
.recon-badge-voided      { background: #ECEFF1; color: #546E7A; }
.recon-row-disputed td { background: #FFF8F0; }
.recon-action-cell { display: flex; gap: .35rem; flex-wrap: wrap; }

/* ── Tab alert badge dot ─────────────────────────────────────────── */
.tab-alert-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--brand-red, #C62828);
    border-radius: 50%;
    margin-left: 5px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

/* ── Dispute modal overrides ─────────────────────────────────────── */
.modal-title { font-size: 1.1rem; font-weight: 700; }
.dispute-note-input { width: 100%; resize: vertical; }
.field-error { color: var(--brand-red, #C62828); font-size: .85rem; margin-top: .25rem; }

/* ── Transaction notes ───────────────────────────────────────────── */
.txn-notes-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .75rem; }
.txn-note-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: .15rem .5rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .55rem .75rem;
}
.txn-note-meta {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    gap: .5rem;
    align-items: baseline;
}
.txn-note-delete { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.txn-note-by   { font-size: .78rem; font-weight: 700; color: var(--text); }
.txn-note-time { font-size: .73rem; color: var(--text-muted); }
.txn-note-text { grid-column: 1; grid-row: 2; font-size: .9rem; white-space: pre-wrap; word-break: break-word; }
.txn-add-note  { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; }
.txn-note-input { width: 100%; resize: vertical; }

/* ── Transaction detail page ─────────────────────────────────────── */
.transaction-detail-page { background: var(--surface); width: 100%; flex: 1; overflow-y: auto; }
.detail-body { display: flex; flex-direction: column; }
.detail-meta { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.detail-date { font-weight: 700; font-size: 1rem; }
.detail-section { padding: .75rem 1rem 1rem; border-bottom: 1px solid var(--border); }
.detail-section:last-child { border-bottom: none; }
.detail-section-title { font-size: .8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .5rem; }

/* ── Photo grid ──────────────────────────────────────────────────── */
.photo-grid { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .25rem; }
.photo-card {
    width: 130px; border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; background: var(--surface-2);
    cursor: pointer; transition: transform .12s, box-shadow .12s;
}
.photo-card:hover { transform: scale(1.04); box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.photo-thumb-wrap { position: relative; }
.photo-img  { width: 100%; height: 97px; object-fit: cover; display: block; }
.photo-zoom-hint {
    position: absolute; bottom: 4px; right: 4px;
    background: rgba(0,0,0,.55); color: #fff;
    font-size: .7rem; border-radius: 3px; padding: 1px 4px;
    pointer-events: none; opacity: 0; transition: opacity .12s;
}
.photo-card:hover .photo-zoom-hint { opacity: 1; }
.photo-meta { padding: .3rem .4rem; }
.photo-event   { font-size: .73rem; font-weight: 700; color: var(--brand-green); }
.photo-product { font-size: .73rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-time    { font-size: .68rem; color: var(--text-muted); }

/* ── Lightbox ─────────────────────────────────────────────────── */
.lightbox-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,.9);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 1.25rem 1rem;
    outline: none;
    animation: lb-fade-in .15s ease;
}
@keyframes lb-fade-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox-content {
    position: relative;
    display: flex; flex-direction: column; align-items: center;
    gap: .65rem; max-height: 100%;
}
.lightbox-close {
    position: absolute; top: -2.4rem; right: -.5rem;
    background: transparent; border: none;
    color: #fff; font-size: 1.4rem; cursor: pointer;
    padding: .2rem .45rem; line-height: 1; border-radius: 4px;
    opacity: .75; transition: opacity .12s, background .12s;
}
.lightbox-close:hover { opacity: 1; background: rgba(255,255,255,.12); }
.lightbox-main {
    position: relative; display: flex; align-items: center; justify-content: center;
}
.lightbox-img {
    max-width: min(82vw, 680px);
    max-height: 58vh;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    background: #111;
    animation: lb-scale-in .15s ease;
}
@keyframes lb-scale-in { from { transform: scale(.96); } to { transform: scale(1); } }
.lightbox-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,.55); border: none; color: #fff;
    font-size: 2.8rem; line-height: 1; cursor: pointer;
    padding: .3rem .55rem; border-radius: 4px; z-index: 1;
    transition: background .12s; user-select: none;
}
.lightbox-arrow:hover { background: rgba(0,0,0,.85); }
.lightbox-prev { left: -3.8rem; }
.lightbox-next { right: -3.8rem; }
.lightbox-footer {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; color: #ccc; font-size: .85rem;
    padding: 0 .1rem;
}
.lightbox-meta { display: flex; gap: .55rem; align-items: baseline; flex-wrap: wrap; }
.lightbox-event   { font-weight: 700; color: var(--brand-green); }
.lightbox-product { color: #bbb; }
.lightbox-time    { color: #777; font-size: .78rem; }
.lightbox-counter { color: #777; font-size: .8rem; white-space: nowrap; padding-left: 1rem; }
.lightbox-strip {
    display: flex; gap: .35rem; overflow-x: auto;
    max-width: min(82vw, 680px);
    padding: .15rem .05rem .25rem;
    scrollbar-width: thin; scrollbar-color: #444 transparent;
}
.lightbox-strip-thumb {
    width: 60px; height: 45px; object-fit: cover;
    border-radius: 4px; cursor: pointer; flex-shrink: 0;
    border: 2px solid transparent; opacity: .5;
    transition: opacity .12s, border-color .12s;
}
.lightbox-strip-thumb:hover { opacity: .8; }
.lightbox-strip-thumb.active { border-color: var(--brand-green); opacity: 1; }

/* ── Robot Face ──────────────────────────────────────────────────── */
.robot-face-wrapper {
    position: relative;
    background: #dceeff;
    border: 2px solid #1a1a2e;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    margin: .5rem 1rem 0;
    padding: 8px 12px 8px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center; /* eyes stay centered */
    min-height: 68px;
}

.robot-face {
    display: flex;
    gap: 24px;
    align-items: flex-end;
    flex-shrink: 0;
    /* centered in the wrapper — bubble is absolute so it doesn't push eyes */
}

.robot-eye-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.robot-brow {
    width: 42px;
    height: 7px;
    background: #1565C0;
    border-radius: 4px;
    transform-origin: center center;
}

.robot-eye-sock {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #1565C0;
    box-shadow: 0 3px 0 #90CAF9;
    overflow: hidden;
    transition: border-color .3s;
}

.robot-eye-sock svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Speech bubble — absolute right side, text right-aligned, left-pointing tail */
.robot-bubble {
    position: absolute;
    right: 10px;
    top: 20%;
    transform: translateY(-50%);
    max-width: 42%;
    background: #fff;
    border: 1.5px solid #b0c8e8;
    border-radius: 12px;
    padding: 7px 11px;
    font-size: .82rem;
    line-height: 1.35;
    color: #1a2a40;
    text-align: right;
    word-break: break-word;
    white-space: normal;
    opacity: 0;
    transition: opacity .25s;
    pointer-events: none;
    z-index: 10;
}
.robot-bubble.show { opacity: 1; }
/* left-pointing tail */
.robot-bubble::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 7px 9px 7px 0;
    border-style: solid;
    border-color: transparent #b0c8e8 transparent transparent;
}
.robot-bubble::after {
    content: '';
    position: absolute;
    left: -7px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 8px 6px 0;
    border-style: solid;
    border-color: transparent #fff transparent transparent;
    z-index: 1;
}

/* Scan sweep bar — full-width strip at the bottom of the face wrapper */
.robot-scanbar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
}
.robot-scanbar.active {
    background: linear-gradient(90deg, transparent 0%, #FF9800 40%, #FF9800 60%, transparent 100%);
    background-size: 200% 100%;
    animation: robotSweep 1.2s linear infinite;
}

/* Eyebrow keyframes */
@keyframes browHappyL  { 0%{transform:translateY(0) rotate(0)}  35%{transform:translateY(-7px) rotate(-6deg)} 100%{transform:translateY(0) rotate(0)} }
@keyframes browHappyR  { 0%{transform:translateY(0) rotate(0)}  35%{transform:translateY(-7px) rotate(6deg)}  100%{transform:translateY(0) rotate(0)} }
@keyframes browSadL    { 0%{transform:translateY(0) rotate(0)}  35%{transform:translateY(4px) rotate(9deg)}   100%{transform:translateY(0) rotate(0)} }
@keyframes browSadR    { 0%{transform:translateY(0) rotate(0)}  35%{transform:translateY(4px) rotate(-9deg)}  100%{transform:translateY(0) rotate(0)} }
@keyframes browPonderL { 0%{transform:translateY(0) rotate(0)}  50%{transform:translateY(-3px) rotate(-2deg)} 100%{transform:translateY(0) rotate(0)} }
@keyframes browPonderR { 0%{transform:translateY(0) rotate(0)}  50%{transform:translateY(-3px) rotate(2deg)}  100%{transform:translateY(0) rotate(0)} }

/* Blink: scaleY on the whole eye socket (squints it shut) */
@keyframes robotBlink {
    0%,80%,100% { transform: scaleY(1); }
    88%          { transform: scaleY(0.08); }
}
.robot-eye-sock {
    animation: robotBlink 4s ease-in-out infinite;
}

/* Idle brow float — gentle continuous raise/lower when no override is active */
@keyframes browIdleFloat {
    0%,100% { transform: translateY(0); }
    50%     { transform: translateY(-3px); }
}
.robot-brow {
    animation: browIdleFloat 3.5s ease-in-out infinite;
}

/* Talking mouth — pulse the camera border when robot is speaking */
@keyframes robotTalkPulse {
    0%,100% { border-color: #1565C0; box-shadow: 0 3px 0 #90CAF9; }
    25%     { border-color: #42A5F5; box-shadow: 0 4px 0 #90CAF9, 0 0 8px rgba(66,165,245,.5); }
    75%     { border-color: #0D47A1; box-shadow: 0 2px 0 #90CAF9; }
}
.camera-section.robot-mouth.robot-talking .camera-continuous,
.camera-section.robot-mouth.robot-talking .camera-picker {
    animation: robotTalkPulse 0.45s ease-in-out infinite;
}

@keyframes robotSockBounce { 0%{transform:scale(1)} 40%{transform:scale(1.13)} 70%{transform:scale(0.95)} 100%{transform:scale(1)} }
@keyframes robotSweep  { 0%{background-position:100% 0} 100%{background-position:-100% 0} }

/* ── Receivables tab ─────────────────────────────────────────────── */
.btn-warning       { background: #e65100; color: #fff; }
.btn-warning:not(:disabled):hover { filter: brightness(.88); }
.btn-warning.btn-sent { background: var(--success); opacity: .85; }

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: var(--brand-red, #C62828);
    color: #fff;
    border-radius: 50%;
    font-size: .65rem;
    font-weight: 700;
    margin-left: 5px;
    vertical-align: middle;
    line-height: 1;
}

.receivables-summary {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.rcv-stat {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .75rem 1.25rem;
    min-width: 120px;
    text-align: center;
}
.rcv-stat-outstanding { border-color: #e65100; background: #fff3e0; }
.rcv-stat-value { font-size: 1.5rem; font-weight: 800; color: var(--text); line-height: 1.2; }
.rcv-stat-outstanding .rcv-stat-value { color: #e65100; }
.rcv-stat-label { font-size: .78rem; color: var(--text-muted); margin-top: .15rem; }

.rcv-row-outstanding td { background: #fffdf8; }
.rcv-row-outstanding:hover td { background: #fff8f0; }

.recon-pending  { display: inline-block; padding: .15rem .55rem; border-radius: 10px; font-size: .75rem; font-weight: 600; background: #fff9c4; color: #f57f17; }
.recon-received { display: inline-block; padding: .15rem .55rem; border-radius: 10px; font-size: .75rem; font-weight: 600; background: #e8f5e9; color: #2e7d32; }
.recon-disputed { display: inline-block; padding: .15rem .55rem; border-radius: 10px; font-size: .75rem; font-weight: 600; background: #fff3e0; color: #e65100; }
.recon-voided   { display: inline-block; padding: .15rem .55rem; border-radius: 10px; font-size: .75rem; font-weight: 600; background: #eceff1; color: #546e7a; }

.contact-detail { font-size: .82rem; color: var(--text-secondary); }
.no-contact     { font-size: .82rem; color: var(--text-muted); font-style: italic; }

.col-actions { white-space: nowrap; }
.col-actions .btn + .btn { margin-left: .25rem; }

/* ── ConnectPage (device registration lockdown screen) ─────────────────── */
/* display:flex + child margin:auto centers the card when it fits, but lets the page scroll
   (top stays reachable) when the card is taller than the viewport — e.g. tablet landscape.
   align-items/justify-content:center would push the top off-screen with no way to scroll to it. */
.connect-page { display: flex; min-height: 100vh; overflow-y: auto; background: var(--surface-2); padding: 1.5rem; box-sizing: border-box; }
.connect-card { margin: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 2rem 2.5rem; max-width: 460px; width: 100%; text-align: center; box-shadow: 0 4px 24px rgba(0,0,0,.08); }
.connect-logo { margin-bottom: 1rem; }
.connect-title { font-size: 1.4rem; font-weight: 700; color: var(--text); margin: 0 0 .4rem; }
.connect-subtitle { font-size: .9rem; color: var(--text-muted); margin: 0 0 1.5rem; line-height: 1.5; }
.connect-section { margin-bottom: 1rem; text-align: left; }
.connect-hint { font-size: .85rem; color: var(--text-secondary); margin-bottom: .75rem; }
.connect-portal { margin-top: -.4rem; }
.connect-portal-link { color: var(--brand-blue); font-weight: 600; text-decoration: none; word-break: break-all; }
.connect-portal-link:hover { text-decoration: underline; }
.connect-divider { font-size: .8rem; color: var(--text-muted); text-align: center; margin: 1rem 0; position: relative; }
.connect-divider::before, .connect-divider::after { content: ''; position: absolute; top: 50%; width: 42%; height: 1px; background: var(--border); }
.connect-divider::before { left: 0; }
.connect-divider::after { right: 0; }
.connect-camera-wrap { position: relative; border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 4/3; }
.connect-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.connect-scan-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: .5rem; background: rgba(0,0,0,.55); text-align: center; }
.connect-scan-status { font-size: .8rem; font-weight: 600; }
.scan-waiting { color: #fbbf24; }
.scan-found   { color: #34d399; }
.connect-pin-row { display: flex; gap: .5rem; align-items: stretch; }
.connect-pin-row .btn-connect-primary { width: auto; flex: 0 0 auto; margin-top: 0; white-space: nowrap; }
/* min-width:0 lets this flex input shrink below its ~20-char intrinsic width; without it the
   input refuses to shrink and pushes the "Unlock" button past the card content box (clipped on
   phones wider than the 380px stack breakpoint, e.g. ~412px). */
.connect-pin-input { flex: 1; min-width: 0; padding: .6rem .9rem; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; background: var(--surface); color: var(--text); letter-spacing: .2em; }
.connect-pin-error { font-size: .8rem; color: #ef4444; margin-top: .3rem; }
.connect-field-group { margin-bottom: .9rem; }
.connect-field-group label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-secondary); margin-bottom: .3rem; }
.connect-input { width: 100%; padding: .6rem .9rem; border: 1px solid var(--border); border-radius: 8px; font-size: .9rem; background: var(--surface); color: var(--text); }
.connect-field-hint { display: block; font-size: .78rem; color: var(--text-muted); margin-top: .25rem; }
.btn-connect-primary { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; padding: .7rem 1.2rem; background: var(--brand-green); color: var(--brand-green-text, #fff); border: none; border-radius: 8px; font-size: .95rem; font-weight: 600; cursor: pointer; margin-top: .5rem; }
.connect-cam-icon { display: block; flex: 0 0 auto; }
.btn-connect-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-connect-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); border-radius: 8px; padding: .4rem .9rem; font-size: .85rem; cursor: pointer; }
.connect-success { background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; border-radius: 8px; padding: .7rem 1rem; margin-bottom: 1rem; font-weight: 600; }
.connect-error   { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; border-radius: 8px; padding: .7rem 1rem; margin-bottom: 1rem; font-size: .85rem; }
.connect-busy    { color: var(--text-muted); font-size: .9rem; padding: 1rem; }

/* First-run setup progress (post-registration catalog + image pull) */
.connect-setup            { margin-top: 1rem; text-align: center; }
.connect-setup-label      { font-weight: 600; font-size: .95rem; margin: 0 0 .6rem; color: var(--text, #1f2937); }
.connect-progress-track   { height: 10px; border-radius: 999px; background: var(--border, #e5e7eb); overflow: hidden; }
.connect-progress-fill    { height: 100%; border-radius: 999px; background: var(--accent, #d97746);
                            transition: width .35s ease; min-width: 2px; }
.connect-progress-pct     { margin: .5rem 0 0; font-size: .85rem; font-weight: 600; color: var(--accent, #d97746); }
.connect-setup-hint       { margin: .35rem 0 0; font-size: .75rem; color: var(--text-muted, #6b7280); }

/* ── New-here / demo entry ─────────────────────────────────────────────────── */
.connect-newhere { background: var(--surface-2, #f8faf9); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; }
.connect-newhere-label { font-weight: 700; font-size: .95rem; margin: 0 0 .5rem; color: var(--text-primary, inherit); }
.connect-center { text-align: center; }
.btn-connect-demo { font-size: 1.05rem; padding: .85rem 1.2rem; }
.btn-connect-signup { display: block; width: 100%; text-align: center; box-sizing: border-box; padding: .6rem 1.2rem; margin-top: .75rem; text-decoration: none; font-weight: 600; }
.btn-connect-link { background: none; border: none; color: var(--brand-blue); font-weight: 600; font-size: .85rem; cursor: pointer; padding: .25rem; text-decoration: underline; }
.connect-video-cta { display: flex; align-items: center; gap: .5rem; justify-content: center; margin: .75rem 0 0; padding: .5rem; color: var(--brand-blue); text-decoration: none; font-size: .85rem; font-weight: 600; }
.connect-video-play { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-blue); color: #fff; font-size: .7rem; }
.connect-qr-help { margin-top: .75rem; padding: .6rem .8rem; background: var(--surface-2, #f8faf9); border: 1px dashed var(--border); border-radius: 8px; }
.connect-footer { text-align: center; margin-top: 1.25rem; font-size: .8rem; }
.connect-footer-sep { color: var(--text-muted); margin: 0 .4rem; }

/* Demo go-live banner (MainLayout, demo devices only) */
.cc-demo-banner { display: block; flex: 0 0 auto; text-align: center; padding: .5rem 1rem; background: var(--brand-green, #1b3d2a); color: #fff; text-decoration: none; font-size: .85rem; font-weight: 500; }
.cc-demo-banner:hover { filter: brightness(1.08); }
.cc-demo-banner strong { font-weight: 700; }

/* Narrow screens: keep the connect card breathable and stop the PIN row from
   crowding the "Unlock" button against a squeezed input. Below 380px the row
   stacks so both controls stay full-width and finger-friendly. */
@media (max-width: 380px) {
    .connect-card { padding: 1.5rem 1.25rem; }
    .connect-pin-row { flex-direction: column; align-items: stretch; }
    .connect-pin-row .btn-connect-primary { width: 100%; }
}

/* ── How to Tap overlay (Tap to Pay on Android / iPhone) ──────────────────────
   Apple requires this instructional screen when enabling Tap to Pay on iPhone.
   Shown whenever CardReaderMode = "taptopay" and a payment is being collected.
─────────────────────────────────────────────────────────────────────────────── */
.tap-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: tap-overlay-in .2s ease both;
}

@keyframes tap-overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.tap-overlay-card {
    background: var(--surface, #fff);
    border-radius: 20px;
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    max-width: 320px;
    width: calc(100% - 2rem);
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
    animation: tap-card-in .25s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes tap-card-in {
    from { opacity: 0; transform: scale(.88) translateY(12px); }
    to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* Icon area — phone centred in a field of expanding rings */
.tap-overlay-icon-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tap-phone-icon {
    position: relative;
    z-index: 1;
    color: var(--primary, #1a73e8);
}

/* Three concentric pulse rings */
.tap-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2.5px solid var(--primary, #1a73e8);
    opacity: 0;
    animation: tap-ripple 2.1s ease-out infinite;
}
.tap-ring-1 { animation-delay: 0s; }
.tap-ring-2 { animation-delay: .7s; }
.tap-ring-3 { animation-delay: 1.4s; }

@keyframes tap-ripple {
    0%   { transform: scale(.65); opacity: .75; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Text */
.tap-overlay-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text, #111);
    margin: 0 0 .6rem;
}

.tap-overlay-body {
    font-size: 1rem;
    color: var(--text, #333);
    line-height: 1.5;
    margin: 0 0 .5rem;
}

.tap-overlay-hint {
    font-size: .82rem;
    color: var(--text-muted, #888);
    margin: 0;
}

/* Live reader status (e.g. "Processing your payment…", "That didn't work — please try again") —
   distinct from the static hint above it so a changing message actually draws the eye. */
.tap-overlay-status {
    font-size: .88rem;
    font-weight: 600;
    color: var(--brand, #2563eb);
    margin: .5rem 0 0;
}

/* Phone (<600px) shows the phone-specific span; tablet hides it */
.tap-loc-phone  { display: inline; }
.tap-loc-tablet { display: none; }
@media (min-width: 600px) {
    .tap-loc-phone  { display: none; }
    .tap-loc-tablet { display: inline; }
}

/* ── Tally owl mascot (animated, event-driven; see docs/TALLY_MASCOT.md) ───── */
.tally-owl{
    --body:#C89A63; --body-dark:#B08247; --tuft:#A87C46; --face:#F4EAD6; --belly:#F4EAD6;
    --disc-rim:#DCC6A0; --spot:#CBAA79; --beak:#E08A3E; --beak-dark:#C86E28; --foot:#E0954A;
    --eye-white:#FDFBF4; --iris:#C6822E; --pupil:#1B1206; --brow:#6E4F2E; --hi:#FFFFFF; --outline:#6E4F2E;
    width:40px; height:43px; flex:0 0 auto; overflow:visible; transform-origin:50% 92%;
}
.tally-owl .c-body{fill:var(--body)} .tally-owl .c-belly{fill:var(--belly)} .tally-owl .c-spot{fill:var(--spot)}
.tally-owl .c-wing{fill:var(--body-dark)} .tally-owl .c-tuft{fill:var(--tuft)} .tally-owl .c-head{fill:var(--body)}
.tally-owl .c-face{fill:var(--face);stroke:var(--disc-rim);stroke-width:1.4}
.tally-owl .c-brow{fill:var(--brow)} .tally-owl .c-eyewhite{fill:var(--eye-white)} .tally-owl .c-iris{fill:var(--iris)}
.tally-owl .c-pupil{fill:var(--pupil)} .tally-owl .c-hi{fill:var(--hi)} .tally-owl .c-lid{fill:var(--body)}
.tally-owl .c-beak{fill:var(--beak)} .tally-owl .c-beaklo{fill:var(--beak-dark)} .tally-owl .c-foot{fill:var(--foot)}
.tally-owl .c-out{stroke:var(--outline);stroke-width:1.7;stroke-linejoin:round}
.tally-owl .head{transform-origin:50px 60px;}
.tally-owl .tuftL{transform-origin:32px 13px;} .tally-owl .tuftR{transform-origin:68px 13px;}
.tally-owl .wingL{transform-origin:30px 54px;} .tally-owl .wingR{transform-origin:70px 54px;}
.tally-owl .beakLo{transform-origin:50px 55px;}
.tally-owl .lidL{transform-origin:39px 32px;transform:scaleY(0);} .tally-owl .lidR{transform-origin:61px 32px;transform:scaleY(0);}
@keyframes tally-breathe{0%,90%,100%{transform:translateY(0)}95%{transform:translateY(-1px)}}
.tally-owl.idle{animation:tally-breathe 4s ease-in-out infinite;}
@keyframes tally-blink{0%,100%{transform:scaleY(0)}45%,55%{transform:scaleY(1)}}
.tally-owl.doblink .lidL,.tally-owl.doblink .lidR{animation:tally-blink .3s ease-in-out;}
@keyframes tally-swivel{0%{transform:rotate(0) scaleX(1)}18%{transform:rotate(-24deg) scaleX(.9)}40%{transform:rotate(-20deg) scaleX(.92)}60%{transform:rotate(18deg) scaleX(.93)}82%{transform:rotate(14deg) scaleX(.95)}100%{transform:rotate(0) scaleX(1)}}
.tally-owl.swivel .head{animation:tally-swivel 2.4s ease-in-out;}
@keyframes tally-notice{0%{transform:rotate(0)}22%{transform:rotate(-14deg)}72%{transform:rotate(-10deg)}100%{transform:rotate(0)}}
.tally-owl.notice .head{animation:tally-notice 1.5s ease-in-out;}
@keyframes tally-twitchL{0%,100%{transform:rotate(0) translateY(0)}50%{transform:rotate(-16deg) translateY(-1px)}}
@keyframes tally-twitchR{0%,100%{transform:rotate(0) translateY(0)}50%{transform:rotate(16deg) translateY(-1px)}}
.tally-owl.listen .tuftL{animation:tally-twitchL .5s ease-in-out infinite;} .tally-owl.listen .tuftR{animation:tally-twitchR .5s ease-in-out infinite;}
@keyframes tally-hop{0%{transform:translateY(0) rotate(0)}25%{transform:translateY(-14px) rotate(-4deg)}45%{transform:translateY(-5px) rotate(3deg)}65%{transform:translateY(-9px) rotate(-2deg)}100%{transform:translateY(0) rotate(0)}}
.tally-owl.hop{animation:tally-hop .82s cubic-bezier(.3,1.4,.5,1);}
@keyframes tally-flapL{0%,100%{transform:rotate(0)}50%{transform:rotate(-52deg)}}
@keyframes tally-flapR{0%,100%{transform:rotate(0)}50%{transform:rotate(52deg)}}
.tally-owl.hop .wingL{animation:tally-flapL .14s ease-in-out 5;} .tally-owl.hop .wingR{animation:tally-flapR .14s ease-in-out 5;}
@keyframes tally-chatter{0%,100%{transform:rotate(0)}50%{transform:rotate(30deg)}}
@keyframes tally-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
.tally-owl.talk{animation:tally-bob .3s ease-in-out infinite;} .tally-owl.talk .beakLo{animation:tally-chatter .19s ease-in-out infinite;}
@media (prefers-reduced-motion: reduce){ .tally-owl.idle,.tally-owl.listen .tuftL,.tally-owl.listen .tuftR{animation:none} }
/* Tally speech / chirp bubble — drops just below the header, points up at the owl */
/* Chirp bubble sits just to the RIGHT of the owl (owl now lives at the left of the header, in
   .header-brand which is the positioning context). Tail points left, back at the owl. */
.tally-bubble{position:absolute; top:2px; left:calc(100% + 10px); max-width:200px; background:#fff;
    border:1px solid var(--border,#e2e6e3); border-radius:12px; padding:6px 11px; font-size:.8rem;
    font-weight:600; color:#243a2e; box-shadow:0 4px 10px rgba(0,0,0,.16); opacity:0;
    transform:translateX(-4px) scale(.96); transform-origin:0 50%; transition:.18s; z-index:20;
    pointer-events:none; line-height:1.3; white-space:nowrap;}
.tally-bubble.show{opacity:1; transform:translateX(0) scale(1);}
.tally-bubble::before{content:""; position:absolute; left:-7px; top:12px; border:7px solid transparent; border-right-color:#fff;}

/* ── Kiosk hardening (kiosk-guard.js) ──────────────────────────────────────
   Applied to <html> by kiosk-guard.js engage(), removed by release(). Doing this with a class
   rather than selectstart/dragstart listeners keeps it off the event hot path entirely. */
html.cc-kiosk-locked,
html.cc-kiosk-locked body {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;   /* iOS long-press "Open in New Tab" sheet */
    overscroll-behavior: none;     /* pull-to-refresh reloads the till mid-sale */
}
/* Text entry must stay selectable or manual barcode entry and the receipt email field break. */
html.cc-kiosk-locked input,
html.cc-kiosk-locked textarea,
html.cc-kiosk-locked [contenteditable="true"] {
    -webkit-user-select: text;
    user-select: text;
}

/* Tap-to-resume panel, shown when the customer leaves fullscreen (Esc, or a browser that refused
   the request). A re-request without user activation is rejected by spec, so this asks for the tap
   that makes it legal. "Not now" must stay reachable — see the note in kiosk-guard.js. */
#cc-kiosk-resume {
    position: fixed;
    inset: 0;
    z-index: 19000;               /* below the reconnect overlay (20000): a dead circuit wins */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(18, 38, 27, .72);
    backdrop-filter: blur(6px) saturate(1.1);
    -webkit-backdrop-filter: blur(6px) saturate(1.1);
    cursor: pointer;
}
.cc-kiosk-resume-card {
    background: #fff;
    border-radius: 22px;
    padding: 2.25rem 2.5rem 1.75rem;
    text-align: center;
    max-width: 360px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.cc-kiosk-resume-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #16281d;
    letter-spacing: -.01em;
}
.cc-kiosk-resume-sub {
    font-size: 1rem;
    color: #5a6b60;
    margin-top: .45rem;
    line-height: 1.45;
}
.cc-kiosk-resume-dismiss {
    margin-top: 1.5rem;
    background: none;
    border: 0;
    color: #7b8a80;
    font-size: .9rem;
    font-family: inherit;
    text-decoration: underline;
    cursor: pointer;
    padding: .4rem .8rem;
}
.cc-kiosk-resume-dismiss:hover { color: #16281d; }

@media (prefers-color-scheme: dark) {
    .cc-kiosk-resume-card { background: #16211a; box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
    .cc-kiosk-resume-title { color: #eaf2ec; }
    .cc-kiosk-resume-sub { color: #9db0a3; }
    .cc-kiosk-resume-dismiss:hover { color: #eaf2ec; }
}

/* "Update required" full-screen block (CheckoutPage, v1.5.4 forced-update work #543/#438). z-index is
   deliberately BELOW .cc-header's (30, see the Header section above): both are positioned siblings in
   the same stacking context, so the header still paints on top of this overlay in the rectangle it
   occupies, keeping the 5-tap admin unlock reachable — this screen adds no new escape, it just never
   covers the existing one. Everywhere below the header, this opaque card blocks every pointer/touch path
   into the pager + checkout-shell underneath. */
.cc-update-required-overlay {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(18, 38, 27, .92);
}
.cc-update-required-card {
    background: #fff;
    border-radius: 22px;
    padding: 2.25rem 2.5rem;
    text-align: center;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.cc-update-required-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff3e0;
    color: #e65100;
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 auto 1rem;
}
.cc-update-required-card h2 {
    margin: 0 0 .6rem;
    font-size: 1.3rem;
    font-weight: 800;
    color: #16281d;
    letter-spacing: -.01em;
}
.cc-update-required-card p {
    margin: 0 0 1.4rem;
    font-size: 1rem;
    color: #5a6b60;
    line-height: 1.45;
}
.cc-update-required-card .btn { width: 100%; }
.cc-kiosk-closed-overlay {
    position: fixed;
    inset: 0;
    z-index: 25;   /* below .cc-header (30): the 5-tap admin unlock stays reachable, as on the update screen. Scale: see "Checkout z-index scale" below */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(18, 38, 27, .94);
}
.cc-kiosk-closed-card {
    background: #fff;
    border-radius: 22px;
    padding: 2.25rem 2.5rem;
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.cc-kiosk-closed-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e8f1eb;
    color: #2e6b45;
    font-size: 1.6rem;
    margin: 0 auto 1rem;
}
.cc-kiosk-closed-card h2 { margin: 0 0 .6rem; font-size: 1.4rem; font-weight: 800; color: #16281d; letter-spacing: -.01em; }
.cc-kiosk-closed-card p { margin: 0 0 1.4rem; font-size: 1.05rem; color: #5a6b60; line-height: 1.45; }
/* The locked till (TillLockOverlay) reuses the kiosk closed screen's look but is fully opaque: the cart behind it must not show through. */
.cc-till-lock-overlay { background: #12261b; }
/* A cold start reads the stored till lock before the till can be used: a plain cover, same layer as the overlays, so nothing shows or can be tapped meanwhile. */
.till-lock-hydrating { position: fixed; inset: 0; z-index: 25; background: #12261b; }

/* ── Checkout z-index scale, and the Lock button above dialogs ─────────────────────────────────────
     content, pager ............................ auto / 25
     update required, kiosk closed, till lock .. 25    (the screens above)
     checkout header (each piece of it) ........ 30    (31 for the brand, so the Tally bubble stays over the centre text)
     dialog backdrops .modal-overlay/.match-overlay  1000
     the Lock button ........................... 1001  (nothing else on the checkout sits here)
     toasts 9999, kiosk resume 19000, reconnect 20000
   Why the header is built this way: an element with a numeric z-index is a stacking context, and nothing inside it can
   paint (or take a tap) above anything outside it at a higher level. When the header itself was `z-index: 30`, its Lock
   button was trapped under every dialog backdrop (1000): with the New Cart confirm or the custom-item PIN open, a tap on
   Lock landed on the backdrop, which closed the dialog, and a second tap locked (round 8, Tab 60). So the checkout header
   (.cc-header--layered, CheckoutPage only) makes no stacking context: its background is painted by ::before at 30, each
   of its pieces is 30 on its own (above the 25 screens, so the header and its 5-tap admin unlock stay on top of the
   locked screen as before), and only the Lock button is 1001. One tap locks; LockTillAsync closes the dialog. The ::before
   takes taps on purpose: they belong to the header, whose 5-tap handler must keep receiving them over the locked screen.
   :where() keeps the per-piece layer at zero specificity, so a piece with its own z-index (the reconnect sheet's
   .modal-overlay, rendered inside the header) keeps it. Guarded by TillLockButtonStackingGuardTests. */
.cc-header.cc-header--layered { z-index: auto; }
.cc-header--layered::before { content: ""; position: absolute; inset: 0; background: inherit; z-index: 30; }
:where(.cc-header--layered > *) { z-index: 30; }
:where(.cc-header--layered > .header-brand) { z-index: 31; }
:where(.cc-header--layered > .header-assistant) { z-index: auto; }
:where(.cc-header--layered > .header-assistant > *) { z-index: 30; }
.cc-header--layered .header-lock-btn { z-index: 1001; }
/* Shown only when "Update now" has nothing to open on this host (PR #567 review, D3) — a host with no
   Play Store presence must never leave the operator staring at a button that did nothing. */
.cc-update-required-fallback {
    margin: .9rem 0 0;
    font-size: .85rem;
    color: #5a6b60;
    line-height: 1.4;
}

@media (prefers-color-scheme: dark) {
    .cc-update-required-card { background: #16211a; box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
    .cc-update-required-card h2 { color: #eaf2ec; }
    .cc-update-required-card p { color: #9db0a3; }
    .cc-update-required-fallback { color: #9db0a3; }
}

/* Bluetooth card-reader permission: the till-open primer reuses the update-required card above; its
   second button stacks under the first. The payment screen's "Open settings" action sits under the
   card error it belongs to. */
.reader-permission-primer .btn + .btn { margin-top: .6rem; }
/* The card is white (dark in a dark OS theme) whatever the app theme, so the ghost button must not follow --text:
   "Not now" was near-invisible on the Moto test, 2026-11-16. */
.reader-permission-primer .btn-ghost { color: #16281d !important; border-color: #8fa396; background: transparent; }
@media (prefers-color-scheme: dark) {
    .reader-permission-primer .btn-ghost { color: #eaf2ec !important; border-color: #5a6b60; }
}
.reader-permission-settings { display: block; margin: .5rem auto 0; }

/* ── /setup — one-card install wizard ──────────────────────────────────────
   Deliberately large-touch and low-density: this is read once, on an unfamiliar device, often
   outdoors on a farm stand. One heading, one button, nothing competing with them. */
.setup-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--brand-green, #1B3D2A);
}
.setup-card {
    background: #fff;
    border-radius: 22px;
    padding: 2.5rem 2.25rem 2rem;
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.setup-logo img { display: block; margin: 0 auto; border-radius: 18px; }
.setup-check {
    width: 64px; height: 64px; margin: 0 auto 0.25rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: #e8f5ec; color: #1b7a3a;
    font-size: 2rem; font-weight: 800;
}
.setup-heading {
    font-size: 1.45rem; font-weight: 800; color: #16281d;
    margin-top: 1.35rem; letter-spacing: -.01em; line-height: 1.25;
}
.setup-body {
    font-size: 1rem; color: #5a6b60; margin-top: .6rem; line-height: 1.5;
}
.setup-steps {
    text-align: left; margin: 1.25rem 0 0; padding-left: 1.35rem;
    color: #3d4f45; font-size: 1rem; line-height: 1.6;
}
.setup-steps li { margin-bottom: .4rem; }
.setup-code {
    text-align: left; margin: 1.15rem 0 0; padding: .85rem 1rem;
    background: #f2f5f3; border-radius: 12px; color: #16281d;
    font-family: var(--font-mono, 'DM Mono', ui-monospace, monospace);
    font-size: .85rem; line-height: 1.5;
    overflow-x: auto;            /* long URLs must scroll, never widen the card */
    white-space: pre;
}
.setup-btn {
    margin-top: 1.75rem; width: 100%; padding: .95rem 1rem;
    border: 0; border-radius: 999px; background: #1b7a3a; color: #fff;
    font-size: 1.05rem; font-weight: 700; font-family: inherit; cursor: pointer;
}
.setup-btn:disabled { opacity: .6; cursor: default; }
.setup-btn:active:not(:disabled) { transform: translateY(1px); }
/* Immediate progress for a busy setup action (#543) — most visibly "Open full-screen", which can take a
   few seconds even when it succeeds, and used to give no feedback beyond the button's own relabel. */
.setup-spinner {
    width: 28px; height: 28px; margin: 1.5rem auto 0;
    border: 3px solid rgba(27, 122, 58, .2); border-top-color: #1b7a3a;
    border-radius: 50%; animation: cc-setup-spin .8s linear infinite;
}
@keyframes cc-setup-spin { to { transform: rotate(360deg); } }
.setup-status {
    margin-top: .9rem; font-size: .95rem; color: #3d4f45; line-height: 1.45;
}
.setup-skip {
    margin-top: 1.1rem; background: none; border: 0; color: #7b8a80;
    font-size: .9rem; font-family: inherit; text-decoration: underline; cursor: pointer;
    padding: .4rem .8rem;
}
.setup-skip:hover { color: #16281d; }

@media (prefers-color-scheme: dark) {
    .setup-card { background: #16211a; box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
    .setup-heading { color: #eaf2ec; }
    .setup-body, .setup-status { color: #9db0a3; }
    .setup-steps { color: #c3d2c8; }
    .setup-code { background: #1e2c23; color: #eaf2ec; }
    .setup-check { background: #1e3a28; color: #6ee7a0; }
    .setup-skip:hover { color: #eaf2ec; }
}

/* ── Install offer (InstallPrompt.razor) ───────────────────────────────────
   Rendered only from AdminPage, behind the PIN. It used to be a full-bleed dark-green bar with a
   bright-green pill, butted edge-to-edge against the Portal card in two colours used nowhere else
   in the product. It is a merchant tool like every other item on the hub, so it is now a member of
   the same card family: same surface, same border, same radius, same gap. */
.cc-install-bar {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .9rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: .95rem;
}
.cc-install-icon img { display: block; border-radius: var(--radius-md); }
.cc-install-text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; flex: 1; gap: .12rem; }
.cc-install-text strong { font-weight: 700; font-size: .95rem; }
.cc-install-text span { color: var(--text-muted); font-size: .82rem; }
.cc-install-go {
    flex-shrink: 0;
    padding: .55rem 1.15rem;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--brand-green);
    color: var(--brand-green-text, #fff);   /* themed background — never a literal foreground */
    font-size: .9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}
.cc-install-go:disabled { opacity: .6; cursor: default; }
.cc-install-go:active:not(:disabled) { transform: translateY(1px); }
.cc-install-dismiss {
    flex-shrink: 0;
    background: none;
    border: 0;
    color: var(--text-muted);
    font-size: 1.4rem;
    line-height: 1;
    padding: .1rem .45rem;
    cursor: pointer;
    font-family: inherit;
}
.cc-install-dismiss:hover { color: var(--text); }

/* Shown only when "Update" has nothing to open on this host (PR #567 review, D3). */
.cc-update-fallback-note {
    margin: -.4rem 0 0;
    font-size: .82rem;
    color: var(--text-muted);
}

/* The iOS "show me how" steps are their own card rather than a seamless extension of the bar: the
   hub is a gapped column, so a flush-joined panel is not available without fighting the layout. */
.cc-install-steps {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    padding: .9rem 1.1rem 1rem;
    font-size: .92rem;
}
.cc-install-steps ol { margin: 0; padding-left: 1.35rem; line-height: 1.7; }
.cc-install-steps .cc-install-note {
    margin: .7rem 0 0;
    color: var(--text-muted);
    font-size: .82rem;
    line-height: 1.45;
}

/* On a phone the copy has to give up the horizontal fight before the button does. */
@media (max-width: 560px) {
    .cc-install-bar { flex-wrap: wrap; gap: .6rem .75rem; }
    .cc-install-text { flex-basis: 100%; order: 3; }
    .cc-install-text span { font-size: .8rem; }
    .cc-install-go { margin-left: auto; }
}

/* ── Phone pager ─────────────────────────────────────────────────────────
   Above 768px nothing here applies: the product column and the checkout column sit side
   by side as they always have.

   Below it, the product column used to be display:none — search and browse simply did not
   exist on a phone. Instead the two columns become two full-width pages in a horizontal
   scroll-snap track, and the New Cart / Pay bar is lifted OUT of the track (as a sibling,
   still in normal flow) so it is on screen on BOTH pages. What scrolls is only the camera
   + cart on one page and the product search on the other. */

/* Both the tab bar and the coach mark exist only on phones; on tablet+ the two columns
   are already side by side, so there is nothing to page between. */
.cc-pager { display: none; }
.cc-swipe-coach { display: none; }

/* ── The shell: the two pages, and the Pay row beneath them ─────────────────────────
   The Pay row is a SIBLING of the swipe track, never a child, and is never
   position:fixed. On a phone that is what puts New Cart and Pay permanently on screen
   for both pages; on tablet+ the grid below tucks it back under the checkout column so
   the layout is unchanged. */
/* Page two must clip its own absolutely positioned descendants.
   `.sr-only` is position:absolute, so its containing block is the nearest POSITIONED
   ancestor. With this pane static that was an ancestor outside the swipe track, so the
   pane's headings escaped the track's overflow-x and parked a 1px box at document x=449 —
   15px past the 433px viewport. Chromium sizes the root scrollable area as viewport /
   minimum-page-scale, so a 449px-wide document forced a minimum scale of 0.964 and a
   1000px root scroll height against a 964px viewport: the whole till could be dragged 36px,
   sliding the header under the status bar. Nothing on html/body could reach it, because the
   overflow was neither on html nor on body. Making the pane the containing block puts those
   boxes back inside its own `overflow: hidden`.

   This only began to matter with the pager: page two used to be display:none on phones, so
   it had no layout box to escape from. Guarded by PhonePagerGuardTests. */
.featured-section { position: relative; }

.checkout-shell {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: var(--surface-2);
}
.checkout-shell > .checkout-layout { flex: 1; min-height: 0; }
.checkout-shell > .pay-row         { flex: 0 0 auto; }

@media (min-width: 768px) {
    /* Tablet+ is unchanged to the pixel: products column full height on the left, checkout
       column on the right, Pay row directly beneath the checkout column only. `display:
       contents` lets the two panes become grid items of the shell so the Pay row can share
       the checkout column's track. */
    .checkout-shell {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: 1fr auto;
    }
    .checkout-shell > .checkout-layout { display: contents; }
    .featured-section { grid-column: 1; grid-row: 1 / span 2; }
    .checkout-page    { grid-column: 2; grid-row: 1; }
    .checkout-shell > .pay-row { grid-column: 2; grid-row: 2; }
}

@media (max-width: 767.98px) {

    /* ── The swipe track ───────────────────────────────────────────────────── */
    .checkout-layout {
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;   /* don't hand the swipe to the browser's back gesture */
        scroll-behavior: smooth;
        overflow-anchor: none;            /* 274 product images loading must not shove the pager */
        scrollbar-width: none;            /* the tab bar is the position indicator */
        -webkit-overflow-scrolling: touch;
    }
    .checkout-layout::-webkit-scrollbar { width: 0; height: 0; }

    /* Checkout is page 1 — the till's home screen — because it comes FIRST IN THE MARKUP,
       not because of `order`. That matters twice over: the right page is showing on the
       first paint with no JS and no flash of the product list, AND the focus order a
       keyboard or TalkBack user walks matches what is on screen. Ordering these visually
       instead put the product page's controls next in the tab sequence while the checkout
       page was displayed, so Tab silently paged you sideways (WCAG 2.4.3). Tablet+ puts
       the product column back on the left with `order` — see the min-width: 768px block. */
    .checkout-page,
    .featured-section {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        scroll-snap-align: start;
        scroll-snap-stop: always;         /* one page per swipe — never skip past a page */
    }
    .featured-section {
        display: flex;                    /* overrides the base `display: none` */
        border-right: none;
    }
    /* While a hint nudge is animating, snapping would fight the animation. */
    .checkout-layout.cc-pager-nudging { scroll-snap-type: none; }

    /* ── Tab bar ───────────────────────────────────────────────────────────── */
    .cc-pager {
        display: flex;
        position: relative;
        flex: 0 0 auto;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        z-index: 25;
    }
    .cc-pager-tab {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .3rem;
        padding: .5rem .25rem .6rem;
        border: none;
        background: transparent;
        font-family: inherit;
        font-size: .82rem;
        font-weight: 700;
        color: var(--text-muted);
        cursor: pointer;
        transition: color .15s;
        min-height: 44px;                 /* WCAG 2.5.8 target size */
    }
    .cc-pager-tab[aria-current="true"] { color: var(--brand-green); }
    .cc-pager-tab:focus-visible {
        outline: 2px solid var(--brand-blue, #1565C0);
        outline-offset: -3px;
    }
    /* Item count rides the Checkout tab, so adding from the product page shows up
       there without leaving that page. */
    .cc-pager-count {
        min-width: 1.15rem;
        padding: 0 .3rem;
        border-radius: 999px;
        background: var(--accent);
        color: #fff;
        font-size: .7rem;
        font-weight: 800;
        line-height: 1.15rem;
        text-align: center;
    }
    /* Chevrons point AT the page you'd swipe to, and only on the page you're not on —
       a standing "there is something over there" cue once the coach mark is gone. */
    .cc-pager-arrow {
        font-size: 1.05rem;
        line-height: 1;
        opacity: .75;
        transition: opacity .15s;
    }
    .cc-pager-arrow-left  { animation: cc-pager-nudge-l 1.8s ease-in-out infinite; }
    .cc-pager-arrow-right { animation: cc-pager-nudge-r 1.8s ease-in-out infinite; }
    .cc-pager-tab[aria-current="true"] .cc-pager-arrow {
        opacity: 0;
        animation: none;
    }
    @keyframes cc-pager-nudge-l {
        0%, 65%, 100% { transform: translateX(0); }
        80%           { transform: translateX(-3px); }
    }
    @keyframes cc-pager-nudge-r {
        0%, 65%, 100% { transform: translateX(0); }
        80%           { transform: translateX(3px); }
    }
    /* Underline that tracks the swipe itself — it moves WITH the finger (JS writes
       --cc-pager-progress, 0..1, from scrollLeft), which is what makes the pages feel
       connected rather than like two unrelated screens. */
    .cc-pager-indicator {
        position: absolute;
        left: 0;
        bottom: -1px;
        width: 50%;
        height: 3px;
        background: var(--accent);
        border-radius: 3px 3px 0 0;
        transform: translateX(calc(var(--cc-pager-progress, 0) * 100%));
    }

    /* ── First-run coach mark ──────────────────────────────────────────────── */
    .cc-swipe-coach {
        position: fixed;
        left: 50%;
        bottom: .6rem;
        transform: translateX(-50%);
        z-index: 45;
        display: flex;
        align-items: center;
        gap: .5rem;
        padding: .45rem .9rem .45rem .7rem;
        border-radius: 999px;
        background: rgba(28, 42, 30, .92);
        color: #fff;
        font-size: .82rem;
        font-weight: 600;
        white-space: nowrap;
        box-shadow: 0 4px 16px rgba(0,0,0,.28);
        pointer-events: none;             /* never intercepts a tap on the till */
        animation: cc-coach-in .25s ease-out;
    }
    .cc-swipe-coach[hidden] { display: none; }
    .cc-swipe-coach-track {
        display: flex;
        animation: cc-coach-swipe 1.6s ease-in-out infinite;
    }
    @keyframes cc-coach-in {
        from { opacity: 0; transform: translate(-50%, 8px); }
        to   { opacity: 1; transform: translate(-50%, 0); }
    }
    @keyframes cc-coach-swipe {
        0%, 100% { transform: translateX(5px); }
        50%      { transform: translateX(-5px); }
    }
}

/* Motion is decoration here, never the message: the chevrons, the coach mark and the
   page transition all still read when they hold still. */
@media (prefers-reduced-motion: reduce) {
    .checkout-layout { scroll-behavior: auto; }
    .cc-pager-arrow,
    .cc-swipe-coach,
    .cc-swipe-coach-track { animation: none; }
}

/* ── Weight entry pad (products sold by weight) ─────────────────────────────────────────────────
   Phone-width first: the pad fills the viewport on a phone, sits as a card on a tablet. Big keys —
   this is used with one hand while the other holds a package. */
/* min() against 100% (the overlay's CONTENT box), not 100vw — 100vw ignores the overlay's padding and,
   with the global border-box, pushed the right key column off-screen on a phone. */
/* gap .5rem, not the dialog's 1rem: the keypad pad has up to ten rows, and at 1rem the container switch and line
   pushed Add/Cancel below an 800px-tall Tab 60. */
.weight-pad { width: min(100%, 26rem); padding: 1rem; gap: .5rem; }
.weight-head { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; margin-bottom: .5rem; }
.weight-name { font-weight: 700; font-size: 1.05rem; }
.weight-rate { color: var(--text-muted, #5a7463); font-size: .9rem; white-space: nowrap; }
.weight-display {
    /* wrap: with a scale connected this row carries the 2.4rem reading, the unit, a nowrap status pill
       and the tare button — about 370px of content in a 343px box on a 375px phone. */
    display: flex; align-items: baseline; justify-content: flex-end; gap: .4rem; flex-wrap: wrap;
    font-size: 2.4rem; font-weight: 700; font-variant-numeric: tabular-nums;
    padding: .25rem .5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.weight-unit { font-size: 1rem; color: var(--text-muted, #5a7463); }
.weight-preview { text-align: right; font-size: 1.1rem; margin: .35rem 0 .6rem; color: var(--text-muted, #5a7463); }
.weight-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.weight-key {
    font-size: 1.5rem; padding: .85rem 0; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); cursor: pointer; min-height: 3.4rem;
}
.weight-key:active { filter: brightness(.9); }
.weight-key--back { font-size: 1.25rem; }
.weight-actions { margin-top: .75rem; }
.weight-add { flex: 1; font-size: 1.1rem; padding: .8rem; }
.weight-hint { margin: .5rem 0 0; font-size: .8rem; color: var(--text-muted, #5a7463); text-align: center; }
.weight-hint--warn { color: var(--warning-text, #8a5a00); }

/* Scale panel. The reading IS the display, so the status pill and Tare live INSIDE the display row —
   a separate panel above the keys does not fit 375px, which is the screen this is designed for. */
.weight-display .scale-pill {
    font-size: .7rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
    padding: .15rem .45rem; border-radius: 999px; align-self: center;
    background: var(--surface-muted, #eef2ee); color: var(--text-muted, #5a7463); white-space: nowrap;
}
.weight-display .scale-pill--ok   { background: #e3f4e8; color: #1f6b39; }
.weight-display .scale-pill--wait { background: #fdf1dc; color: #8a5a00; }
.weight-tare {
    align-self: center; font-size: .85rem; padding: .3rem .7rem; min-height: 2.2rem; flex: 0 0 auto;
}
.weight-tare-line {
    margin: .3rem 0 0; font-size: .8rem; color: var(--text-muted, #5a7463); text-align: right;
    min-height: 1.2em;   /* holds its row while empty, so the keypad below never moves */
}
/* What the keypad is charging for: the number that prices the line, in normal text, not the small muted note. */
.weight-tare-line.weight-charging-line { font-size: 1rem; color: inherit; text-align: center; font-weight: 600; }
/* The staff-approval message and the link that fixes it are one block. */
.weight-staff-approve { display: flex; flex-direction: column; align-items: center; gap: .15rem; margin: .4rem 0 0; }
/* The product's container (preset or typed), already taken off. Takes the place of the one-line "Basket off" note, so a 375px
   phone gains no row; Change and None are quiet links beside it. Amber when the pan weighs no more than the container. */
.weight-container-chip {
    display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem .75rem;
    margin: .4rem 0 0; padding: .4rem .6rem; font-size: .8rem; color: var(--text-muted, #5a7463);
    border: 1px dashed var(--border); border-radius: 8px; background: var(--surface, transparent);
}
.weight-container-chip--warn { background: var(--warning-light, #fef3c7); border-color: var(--warning, #d97706); color: #854d0e; }
.weight-container-actions { display: inline-flex; gap: .9rem; }
.weight-container-link {
    background: none; border: 0; padding: .35rem .15rem; min-height: 2.2rem; font-size: .85rem; font-weight: 600;
    color: var(--accent-strong, #b8501f); text-decoration: underline; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem;
}
.weight-container-edit {
    display: flex; align-items: baseline; gap: .6rem; margin: .4rem 0 0; padding: .4rem .6rem; font-size: .85rem;
    border: 1px solid var(--border); border-radius: 8px;
}
.weight-container-label { color: var(--text-muted, #5a7463); }
.weight-container-value { margin-left: auto; font-weight: 700; }
/* Weigh it now: Save is the one full-width action; the other two are quiet links under it, as the mockup draws them. */
.modal-actions.weight-actions--stack { flex-direction: column; align-items: stretch; }
.modal-actions.weight-actions--stack .weight-add { width: 100%; }
.modal-actions.weight-actions--stack .weight-typeit { margin: .2rem auto 0; }
.weight-container-switch {
    display: flex; align-items: center; gap: .6rem; margin: .6rem 0 0; font-size: .9rem; cursor: pointer; min-height: 2.5rem;
}
/* Deliberately a quiet link, not a button: typing is the fallback once a scale is connected, and a
   second prominent control beside Add is how someone taps the wrong one. */
.weight-typeit {
    display: block; margin: .6rem auto 0; background: none; border: 0; padding: .4rem;
    font-size: .85rem; color: var(--text-muted, #5a7463); text-decoration: underline; cursor: pointer;
}

/* Which prices this sale is on. Quiet by default (retail is the ordinary case) and highlighted only
   when the till is on a list, because that is the state someone needs to notice before charging. */
.price-list-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    align-self: flex-start; margin: 0 0 .4rem;
    padding: .25rem .6rem; font-size: .85rem;
    border: 1px solid var(--border); border-radius: 999px;
    background: var(--surface); color: var(--text-muted, #5a7463); cursor: pointer;
}
.price-list-chip--active {
    border-color: var(--primary, #2f6f4f); color: var(--primary, #2f6f4f); font-weight: 700;
}

/* Size picker — shares the weight pad's overlay, so choosing a weighed size SWAPS the content in place
   instead of stacking a second dialog. One big target per size: this is a customer-facing screen. */
.size-options { display: flex; flex-direction: column; gap: .5rem; margin: .5rem 0 .75rem; }
.size-option {
    display: flex; align-items: baseline; gap: .6rem; width: 100%;
    padding: .9rem 1rem; min-height: 3.4rem;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
    cursor: pointer; text-align: left;
}
.size-option:active { filter: brightness(.9); }
.size-label { font-size: 1.15rem; font-weight: 700; }
.size-price { margin-left: auto; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
/* Dimmed and stamped, never disabled: the count can be minutes stale and the customer is standing here. */
.size-option--soldout { opacity: .6; }
.size-soldout {
    font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: var(--danger, #b3261e);
}
/* Extras sheet (plan §2.2, mockups 9-10): same overlay slot as the size picker. Eyebrow group names,
   status pills, big option targets, an amber pill for a required group, "Unavailable" greyed. */
.extras-sheet { max-height: 90vh; overflow-y: auto; }
.extras-group { margin: .75rem 0; display: flex; flex-direction: column; gap: .4rem; }
.extras-group-head { display: flex; align-items: center; gap: .5rem; }
.extras-group-name { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
.extras-pill {
    margin-left: auto; padding: .1rem .5rem; font-size: .7rem; font-weight: 700; border-radius: 4px;
    background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
}
.extras-pill--required { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--text); border-color: var(--accent); }
.extras-pill--chosen { background: color-mix(in srgb, var(--brand-green) 14%, var(--surface)); color: var(--text); border-color: var(--brand-green); }
.extras-glyph { flex: none; align-self: center; width: 1.3rem; height: 1.3rem; border: 2px solid var(--text-muted); background: var(--surface); position: relative; }
.extras-glyph--radio { border-radius: 50%; }
.extras-glyph--check { border-radius: 4px; }
.extras-option--on .extras-glyph { border-color: var(--brand-green); background: var(--brand-green); }
.extras-option--on .extras-glyph--radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #fff; }
.extras-option--on .extras-glyph--check::after { content: ""; position: absolute; left: 4px; top: 0; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.extras-reason { font-size: .85rem; color: var(--text-muted); text-align: center; margin: -.25rem 0 .5rem; }
.extras-option {
    display: flex; align-items: baseline; gap: .6rem; width: 100%; min-height: 3rem; padding: .7rem 1rem;
    border: 1px solid var(--border); border-radius: 3px; background: var(--surface); cursor: pointer; text-align: left;
}
.extras-option--on { border-color: var(--brand-green); background: color-mix(in srgb, var(--brand-green) 12%, var(--surface)); font-weight: 700; }
.extras-option--off { opacity: .5; cursor: not-allowed; }
.extras-option-price { margin-left: auto; font-variant-numeric: tabular-nums; }
.extras-error { font-size: .8rem; color: var(--text); }
.extras-add { width: 100%; margin: .5rem 0; }
.extras-add[disabled] { opacity: .5; }
/* Option lines sit on their own row under the line; the amount's right edge lines up with .item-total
   (--cart-tail = the remove button, plus the adjust button when shown). */
.cart-item { flex-wrap: wrap; --cart-tail: 52px; }
.cart-item--adjust { --cart-tail: 100px; }
.cart-item .remove-btn, .cart-item .adjust-btn { width: 44px; min-height: 44px; padding: 0; flex: none; }
.item-extras-block { flex: 1 1 100%; display: flex; flex-direction: column; padding: 0 var(--cart-tail) .15rem 3rem; }
.item-extra { display: flex; gap: .5rem; font-size: .85rem; color: var(--text-muted); }
.item-extra-amount { margin-left: auto; min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.item-extras-btn {
    align-self: flex-start; margin: .2rem 0 0 .75rem; padding: .15rem .6rem; font-size: .75rem; font-weight: 700;
    border: 1px solid var(--brand-green, #1B3D2A); border-radius: 3px; background: transparent; color: var(--brand-green, #1B3D2A); cursor: pointer;
}
.weight-cancel {
    width: 100%; padding: .8rem; font-size: 1rem;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer;
}
@media (max-width: 480px) {
    /* Full-bleed on a phone: kill the overlay padding so the pad genuinely spans the viewport. */
    .modal-overlay--weight { padding: 0; align-items: stretch; }
    .weight-pad {
        width: 100%;
        max-width: none;
        min-height: 100dvh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        /* flex-start + scroll, NOT center: centred content taller than a landscape phone overflowed
           above the top edge, where nothing can scroll to it — the product name and the weight readout
           simply disappeared. */
        justify-content: flex-start;
        overflow-y: auto;
    }
    .weight-key { min-height: 3.5rem; font-size: 1.6rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════════════════════════════════
   Till balance payments (Sprint 1) and the tablet-fit layout of the Payment screen.

   Ported from the approved v3 mockups (CSA member-surface patterns on the till's own tokens): the member
   row, the Add balance switch, the combined-total line, the docked cash panel, the pickup cards and the
   sheets. The tablet-fit rules (.sec-row, .dock) apply to EVERY sale, not only a member's: at 960x600 the
   Tab 60 kiosk tablet must show every tender tile and action button above the fold in every state.
   ═══════════════════════════════════════════════════════════════════════════════════════════════════════ */

.btn { font-family: inherit; }
svg.ti { width: 1.1em; height: 1.1em; flex: 0 0 auto; display: inline-block; vertical-align: -.15em; }

/* Manager customer controls (Add customer / Change): a small ghost button with the PIN lock; icon only on the kiosk. */
.cust-add-row { margin: 0 1rem .5rem; display: flex; }
.cust-gate { min-height: 40px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; font: 600 14px 'Plus Jakarta Sans', sans-serif; flex: 0 0 auto; }
.cust-gate > svg.ti { width: 18px; height: 18px; }
.cust-gate > svg.ti-lock-fill { width: 11px; height: 11px; opacity: .7; }
.cust-gate.icon-only { width: 44px; padding: 0; justify-content: center; position: relative; }
.cust-gate.icon-only > svg.ti-lock-fill { position: absolute; right: 4px; bottom: 3px; width: 10px; height: 10px; }
.customer-row .cust-gate { margin-left: auto; }
/* Kiosk staff control: small, muted, right-aligned beside Cancel in the footer (or alone bottom right with no footer). */
.cancel-row { display: flex; align-items: center; gap: .5rem; }
.cancel-row > .btn:first-child { flex: 1 1 auto; }
.payment-actions .btn.staff-corner { width: 36px; min-height: 36px; flex: 0 0 auto; opacity: .55; border-color: transparent; }
.cust-kiosk-row { display: flex; justify-content: flex-end; margin: 0 1rem .5rem; }
.cust-kiosk-row .staff-corner { width: 36px; min-height: 36px; opacity: .55; border-color: transparent; }

/* Cards, rows, thumbs, pills (CSA member-surface pattern) */
.bp-eyebrow { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; margin: 0 0 6px;
              display: flex; align-items: center; gap: 8px; }
.bp-eyebrow .pill { text-transform: none; letter-spacing: 0; }
.bp-row { display: flex; align-items: center; gap: 12px; }
.bp-grow { flex: 1 1 auto; min-width: 0; }
.bp-th { display: inline-grid; place-items: center; border-radius: 6px; color: var(--text); font-weight: 700; flex: 0 0 auto; }
.bp-th.round { border-radius: 50%; }
.bp-name { font-size: 20px; font-weight: 700; line-height: 1.15; }
.bp-sub { font-size: 13px; color: var(--text-secondary, var(--text-muted)); }
.bp-muted { font-size: 13px; color: var(--text-muted); }
.bp-big { font-size: 34px; font-weight: 800; line-height: 1.05; color: var(--text); letter-spacing: -.01em; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.pill.ok { background: var(--success-light); color: var(--success); }
.pill.warn { background: var(--warning-light); color: #854d0e; }
.pill.amber, .pill.due { background: #fff4ee; color: var(--accent-strong); }
.bp-card { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow); padding: 18px; }
.bp-card.accent { border-left: 4px solid var(--accent); }
.bp-card.accent-green { border-left: 4px solid var(--brand-green); }
.bp-amber-btn { background: var(--accent); color: #fff; border: 0; }

/* Item rows (What's this for? sheet, pickup box contents) */
.bp-items { margin: 4px 0 0; }
.bp-item { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); }
.bp-item:first-child { border-top: 0; }
.bp-item .t { font-weight: 600; font-size: 15px; line-height: 1.25; }
.bp-item .d { font-size: 12.5px; color: var(--text-muted); }
.bp-item .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.bp-date { width: 46px; flex: 0 0 auto; text-align: center; font-size: 11px; line-height: 1.15; color: var(--text-secondary, var(--text-muted)); text-transform: uppercase;
           letter-spacing: .04em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 5px 0; }
.bp-date b { display: block; font-size: 16px; color: var(--text); letter-spacing: 0; }
.bp-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; margin-top: 2px; border-top: 2px solid var(--text); font-weight: 800; }

/* Change amount */
.bp-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bp-opt { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--border); border-radius: 13px; background: var(--surface); padding: 12px 14px; min-height: 64px;
          text-align: left; font: inherit; color: inherit; cursor: pointer; position: relative; }
.bp-opt .r { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); flex: 0 0 auto; display: grid; place-items: center; }
.bp-opt.on { border-color: var(--brand-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-green) 16%, transparent); }
.bp-opt.on .r { border-color: var(--brand-green); }
.bp-opt.on .r::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-green); }
.bp-opt .t { font-weight: 700; font-size: 15px; }
.bp-opt .v { font-size: 13px; color: var(--text-secondary, var(--text-muted)); }
.bp-opt input { font-weight: 800; font-size: 22px; font-family: inherit; width: 100%; border: 0; border-bottom: 2px solid var(--brand-green); padding: 0 0 2px; background: transparent;
                color: var(--text); outline: none; font-variant-numeric: tabular-nums; }
.bp-result { display: flex; align-items: center; gap: 8px; margin: 10px 2px 0; font-size: 14px; color: var(--text-secondary, var(--text-muted)); }
.bp-result b { color: var(--text); }
.bp-result.ok svg.ti { color: var(--success); }

/* Sheets (What's this for?, Change amount, Manager menu, QR scan) */
.modal-box.wide { width: min(460px, 92vw); }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; }
.sheet-actions .btn { min-height: 48px; width: 100%; }
.btn-danger-ghost { background: transparent; color: var(--brand-red); border: 1px solid #e9b4b4; }
.bp-cam { width: 100%; aspect-ratio: 4 / 3; max-height: 34vh; object-fit: cover; background: #000; border-radius: 10px; }
.bp-cam-status { font-size: 14px; color: var(--text-secondary, var(--text-muted)); text-align: center; }
.bp-cam-status.err { color: var(--brand-red); font-weight: 600; }

/* Member row (replaces the customer strip) */
.bp-member { display: flex; align-items: center; gap: 12px; margin: 0 1rem .5rem; padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.bp-member .n { font-weight: 700; font-size: 15px; line-height: 1.2; }
.bp-member .o { font-size: 13px; line-height: 1.3; color: var(--text-secondary, var(--text-muted)); }
.bp-member .o b { color: var(--accent-strong); }
.bp-member .o .credit { color: var(--success); font-weight: 700; }
.bp-member .btn { min-height: 44px; }
.bp-member.bp-prompt { background: #fff4ee; border-color: #f1d5c4; }
.bp-member .bp-link { background: none; border: 0; padding: 0; margin-left: 4px; font: inherit; color: var(--text-secondary, var(--text-muted)); text-decoration: underline; cursor: pointer; }
.bp-th.bp-th-qr { background: #fff; color: var(--accent-strong); font-size: 20px; }
.bp-member-note { margin: 0 1rem .5rem; font-size: 13px; color: var(--text-secondary, var(--text-muted)); }
.bp-member-note.err { color: var(--brand-red); font-weight: 600; }
.bp-member-note.warn { color: #854d0e; font-weight: 600; }

/* UX review v4 ----------------------------------------------------------------------------------------- */
/* "Who's paying?": the one panel for a balance-only screen nobody has been chosen for (counter and kiosk). */
.who { margin: 4px 1rem 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow); }
.who h2 { margin: 0; font-size: 20px; font-weight: 800; color: var(--text); }
.who p.sub { margin: 4px 0 14px; font-size: 14px; color: var(--text-secondary, var(--text-muted)); }
.who-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.who-act { display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 12px 16px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface);
           text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.who-act:disabled { opacity: .6; cursor: default; }
.who-act .ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; flex: 0 0 auto; background: var(--surface-2); color: var(--brand-green); }
.who-act .t { display: block; font-weight: 800; font-size: 17px; line-height: 1.2; }
.who-act .s { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-secondary, var(--text-muted)); margin-top: 2px; }
.who-act.primary { border-color: var(--brand-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-green) 14%, transparent); }
.who-act.primary .ic { background: var(--brand-green); color: #fff; }
.who-act.amber { border-color: var(--accent); background: #fff4ee; }
.who-act.amber .ic { background: var(--accent); color: #fff; }
.who-act.solo { grid-column: 1 / -1; justify-content: center; }
.who-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--text-muted); }

/* "Nothing to take": a customer who owes nothing (paid up or holding credit) gets a calm panel, not dead tiles. */
.done { margin: 4px 1rem 0; border: 1px solid var(--border); border-left: 4px solid var(--success); border-radius: 12px; background: var(--surface); padding: 16px 20px; box-shadow: var(--shadow); }
.done .head { display: flex; align-items: center; gap: 12px; }
.done .tick { width: 44px; height: 44px; border-radius: 50%; background: var(--success-light); color: var(--success); display: grid; place-items: center; font-size: 22px; flex: 0 0 auto; }
.done .t { font-weight: 800; font-size: 18px; line-height: 1.2; }
.done .s { font-size: 14px; color: var(--text-secondary, var(--text-muted)); margin-top: 2px; }
.done .credit { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13.5px; font-weight: 700; color: var(--success); background: var(--success-light); border-radius: 999px; padding: 3px 10px; }
.done-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.done-acts .btn { min-height: 52px; font-size: 1rem; }
.done-acts .btn.solo { grid-column: 1 / -1; }

/* What a part payment is part of, under the one amount. */
.of-line { display: flex; justify-content: center; gap: 14px; font-size: .88rem; color: var(--text-secondary, var(--text-muted)); margin-top: 2px; }
.of-line b { color: var(--text); }

/* The customer search after the PIN, on a balance-only screen. Higher specificity than the page's own picker rules. */
.customer-picker.pick { margin: 0 1rem; padding: 14px 16px; gap: 0; border-radius: 12px; box-shadow: var(--shadow); }
.customer-picker.pick .pick-h { margin: 0 0 8px; font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.customer-picker.pick .customer-search { min-height: 48px; border: 1.5px solid var(--brand-green); border-radius: 10px; padding: 0 14px; font: 500 16px 'Plus Jakarta Sans', sans-serif; margin-bottom: 4px; }
.customer-picker.pick .customer-result.res { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border: 0; border-top: 1px solid var(--border); border-radius: 0; min-height: 52px; background: transparent; }
.customer-picker.pick .customer-result.res:first-of-type { border-top: 0; }
.customer-picker.pick .customer-result.res .customer-result-name { flex: 1; font-weight: 700; font-size: 15px; }
.customer-picker.pick .customer-result.res .chev { color: var(--text-muted); font-size: 18px; display: inline-flex; }
/* The search fills whatever height the screen has left (the page is a flex column), wherever it sits: the list scrolls inside it
   and the heading, search box and Cancel stay put. No fixed offset to go stale when something above it changes. */
.customer-picker.pick { flex: 1 1 auto; min-height: 0; margin-bottom: .75rem; }
.customer-picker.pick .pick-list { flex: 1 1 auto; min-height: 120px; overflow-y: auto; }
.customer-picker .customer-cancel { align-self: flex-end; min-height: 44px; margin-top: 8px; }

@media (max-width: 760px) { .who-acts, .done-acts { grid-template-columns: 1fr; } }

/* Add balance switch */
.sw { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 14px 6px 6px; font-weight: 700;
      font-size: 14px; font-family: inherit; color: var(--text); min-height: 44px; cursor: pointer; white-space: nowrap; }
.sw .tr { width: 42px; height: 24px; border-radius: 999px; background: #cfd8d2; position: relative; flex: 0 0 auto; transition: background .15s; }
.sw .tr::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.sw.on { border-color: var(--accent); background: #fff4ee; color: var(--accent-strong); }
.sw.on .tr { background: var(--accent); }
.sw.on .tr::after { left: 21px; }
.sw:disabled { opacity: .6; cursor: default; }

/* Checkout pay row: the member / balance entry sits before the other buttons. */
.pay-row-member { display: flex; align-items: center; margin-right: .5rem; }
.pay-row-member .btn { min-height: 44px; white-space: nowrap; }

/* Combined total */
.total-display .breakdown-row b { font-weight: 700; }
.mix { display: flex; justify-content: center; gap: 18px; font-size: .85rem; color: var(--text-secondary, var(--text-muted)); margin-bottom: 2px; }
.mix b { color: var(--text); font-weight: 700; }

/* Tablet fit: Check and Charge to account side by side; the cash panel docks into the pinned footer. */
/* Three equal columns, the width of a Card / Cash / Pay by QR tile, so a lone Check is one ordinary tile and not a full-width row. */
.sec-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.sec-row .pay-tile { padding: .6rem .8rem; }
.sec-row .pay-tile-ic { width: 38px; height: 38px; }
.payment-page > .payment-actions.dock { position: sticky; bottom: 0; background: var(--surface); box-shadow: 0 -2px 10px rgba(0,0,0,.08); z-index: 5; padding: .5rem 1rem .6rem; gap: .45rem; }
.dock-cash { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.dock-cash .lbl { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.dock-cash .change-denom-btn { min-height: 40px; font-family: inherit; }
.dock-cash input { width: 11.5rem; min-height: 40px; border: 1.5px solid var(--border); border-radius: 8px; padding: 0 .6rem; font-weight: 600; font-size: 1rem; font-family: inherit; box-sizing: border-box; }
.dock-cash input::placeholder { font-weight: 500; font-size: .95rem; }
.dock-cash .chg { margin-left: auto; display: flex; align-items: baseline; gap: .5rem; background: #dcfce7; border-radius: 8px; padding: .35rem .8rem; }
.dock-cash .chg span { font-size: .8rem; font-weight: 700; color: #166534; }
.dock-cash .chg b { font-size: 1.35rem; color: #15803d; }
.dock-cash .chg.short { background: var(--warning-light, #fef3c7); }
.dock-cash .chg.short span { color: #854d0e; }
.dock-cash .chg.short b { color: #b45309; }
.dock-btns { display: grid; grid-template-columns: 2fr 1fr; gap: .5rem; }
.dock-btns .btn { min-height: 50px; }

/* Paid step */
.paid-line { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 6px; font-size: .95rem; color: var(--text-secondary, var(--text-muted)); }
.paid-line b { color: var(--text); }
.rcpt-quick { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.rcpt-quick .btn { min-height: 48px; }

@media (max-width: 760px) {
    .sec-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dock-cash .chg { margin-left: 0; width: 100%; justify-content: space-between; }
    .bp-member { flex-wrap: wrap; }
    .bp-member .sw { width: 100%; justify-content: flex-start; }
    .bp-member .bp-grow { flex-basis: calc(100% - 60px); }
    .rcpt-quick { grid-template-columns: 1fr; }
    .bp-seg { grid-template-columns: 1fr; }
}
@media (max-height: 700px) and (orientation: landscape) {
    .bp-member { margin-bottom: .35rem; padding: 6px 10px; }
}

/* CSA pickup (box card + account card) */
.bp { flex: 1; overflow-y: auto; background: var(--surface-2); }
.bp-wrap { max-width: 1120px; margin: 0 auto; padding: 14px 24px 28px; }
.bp-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: start; }
.bp-card + .bp-card { margin-top: 14px; }
.bp-scan { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1.5px solid var(--brand-green); border-radius: 12px; padding: 0 14px; min-height: 52px;
           box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-green) 12%, transparent); margin-bottom: 14px; }
.bp-scan > svg.ti { font-size: 24px; color: var(--brand-green); }
.bp-scan input { flex: 1; border: 0; outline: none; background: transparent; font: 700 20px var(--font-mono, 'DM Mono', ui-monospace, monospace); letter-spacing: .06em; color: var(--text); min-width: 0; }
.bp-scan .clr { font-size: 22px; color: var(--text-muted); background: none; border: 0; cursor: pointer; display: grid; place-items: center; }
.bp-acct .btn { min-height: 48px; width: 100%; margin-top: 12px; font-size: 1rem; }
.bp-acct .btn.bp-btn-tight { margin-top: 8px; }
.bp-handover { width: 100%; min-height: 56px; font-size: 1.15rem; margin-top: 12px; }
/* Pay first: the confirmed fallback ("put it on the account") and the success line after this device's own hand-over. */
.bp-confirm { border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface-2, var(--surface)); }
.bp-acct .bp-confirm .btn { width: auto; flex: 1 1 0; margin-top: 0; }
.bp-handed-over { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; color: var(--success); }
.bp-pending { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--text-secondary, var(--text-muted)); }
.bp-pending svg.ti { color: #b45309; }
/* A refused cash/check balance payment: standing notice until a manager dismisses it (BalanceRejectedNotice). */
.bp-refused { display: flex; align-items: center; gap: 12px; margin: 8px 12px 0; padding: 10px 14px; border-radius: 10px;
              background: #fef2f2; border: 1.5px solid #fca5a5; color: #991b1b; font-size: .9rem; font-weight: 600; }
.bp-refused-icon { font-size: 22px; display: grid; place-items: center; }
.bp-refused .btn { font-family: inherit; flex: none; }
/* The search box has its own clear button; the browser's native one would be a second X. */
.bp-scan input[type="search"]::-webkit-search-cancel-button, .bp-scan input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.cc-header .bp-hsub { font-size: .8rem; opacity: .8; font-weight: 500; margin-left: .6rem; }
@media (max-width: 760px) {
    .bp-wrap { padding: 14px 14px 22px; }
    .bp-grid { grid-template-columns: 1fr; gap: 14px; }
    .bp-big { font-size: 30px; }
    .cc-header .bp-hsub { display: none; }
}

/* CSA pickup: empty-state card and the camera-scan button (were inline styles) */
.pickup-scan-btn { min-height: 44px; }
.pickup-empty { text-align: center; padding: 18px 16px; }
.pickup-empty-icon { font-size: 28px; }
.pickup-empty-title { font-size: 17px; margin: 6px 0 4px; }
.pickup-empty-note { margin-top: 6px; }
.dock-cash .chg small { font-size: .75rem; font-weight: 600; color: #854d0e; margin-left: .35rem; }

/* TillButton (double-click review): a blocked button keeps its look but is dimmed and ignores taps; a running one shows its own state. */
.till-btn-blocked { opacity: .6; cursor: default; pointer-events: none; }
.till-btn-spinner {
    display: inline-block; width: 1em; height: 1em; margin-right: .5em; vertical-align: -.15em;
    border: .15em solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: till-btn-spin .7s linear infinite;
}
@keyframes till-btn-spin { to { transform: rotate(360deg); } }

/* ── Direct Venmo / Cash App tiles (P2P wizard, 2026-10-31) ───────────────────────────────────────────────────────────────
   The brand chip is the tile's hero. The dense grid hides .pay-marks (they are the Card / QR tiles' logo rows), so the chip
   opts back in. A handle breaks anywhere so a long one wraps instead of overflowing; every other word wraps at word boundaries. */
.pay-row .pay-tile-hero .pay-marks,
.pay-row.dense .pay-tile-col .pay-tile-hero .pay-marks { display: flex; margin: 0; justify-content: center; }
.pay-row .pay-tile-hero .pay-marks svg,
.pay-row.dense .pay-tile-hero .pay-marks svg { width: 36px; height: auto; }
.pay-tile-col .pay-tile-title, .pay-tile-col .pay-tile-sub { min-width: 0; overflow-wrap: break-word; }
.pay-tile-handle { overflow-wrap: anywhere; }
.wallet-sheet-to { font-weight: 700; margin: -.2rem 0 .5rem; }
/* A phone: two tile columns, never three. The page scrolls (.payment-page is overflow-y: auto), so nothing is clipped. */
@media (max-width: 560px) {
    .alt-methods .pay-row, .alt-methods .pay-row.dense { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
    .alt-methods .pay-row.dense .pay-tile-col { column-gap: .45rem; padding: .5rem .55rem; height: auto; min-height: 64px; }
    .alt-methods .pay-row.dense .pay-tile-col .pay-tile-title { font-size: .95rem; }
}

/* ── Venmo sheet: two codes (2026-10-31) ─────────────────────────────────────────────────────────────────────────────────
   Venmo's in-app scanner and the phone camera need different links. Wide: both codes side by side. Phone: one code behind a
   two-option toggle (the camera first: its code carries the total). */
.wallet-sheet:has(.venmo-dual) { max-width: 520px; }
.venmo-dual { display: flex; gap: 1rem; justify-content: center; margin: 0 0 .4rem; }
.venmo-code { margin: 0; flex: 1 1 0; min-width: 0; }
.venmo-code-head { font-weight: 700; font-size: .95rem; margin-bottom: .3rem; }
.venmo-label { display: inline-flex; align-items: center; gap: .4rem; }
.venmo-label .pay-marks { margin: 0; }
.venmo-label .pay-marks svg { height: 18px; }
.venmo-code-cap { font-size: .85rem; color: var(--text-muted, #4b5563); margin-top: .25rem; overflow-wrap: break-word; }
.venmo-amount { font-size: 1.3rem; font-weight: 800; color: var(--text-primary, #1c3226); }
.wallet-sheet .venmo-dual .qr-overlay-img { width: 170px; height: 170px; }
.venmo-toggle { display: none; }
.venmo-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 0 .6rem; border: 1.5px solid var(--border, #c2ccc6); border-radius: 10px; overflow: hidden; }
.venmo-seg-btn { border: 0; background: var(--surface, #fff); padding: .5rem .4rem; min-height: 44px; font: inherit; font-weight: 600; cursor: pointer; }
.venmo-seg-btn.on { background: color-mix(in srgb, var(--brand-green, #2e7d32) 14%, transparent); box-shadow: inset 0 0 0 2px var(--brand-green, #2e7d32); }
.venmo-seg-btn:focus-visible { outline: 3px solid var(--brand-green, #2e7d32); outline-offset: -3px; }
@media (max-width: 560px) {
    .venmo-dual { display: none; }
    .venmo-toggle { display: block; }
    .wallet-sheet { max-height: 100%; overflow-y: auto; }
}

/* PortalLink: the one way a till screen sends a person to tallytill.com (Components/Shared/PortalLink.razor). */
.portal-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; text-decoration: none; }
.portal-link-inline { color: var(--brand-blue, #1d6fb8); }
.portal-link-inline:hover { text-decoration: underline; }
.portal-link-button { justify-content: center; text-decoration: none; }
.portal-link .ti { flex: 0 0 auto; }
.portal-link-qr { display: flex; align-items: center; gap: .75rem; margin-top: .4rem; font-weight: 400; }
.portal-link-qr-img { flex: 0 0 auto; background: #fff; padding: 4px; border-radius: 6px; image-rendering: pixelated; }
.portal-link-qr-text { display: flex; flex-direction: column; gap: .15rem; text-align: left; }
.portal-link-qr-label { font-weight: 600; }
.portal-link-short { word-break: break-all; }

/* ConnectPage first run: two doors (I have an account / I'm new), then the demo, demoted. */
.connect-door { background: var(--surface-2, #f8faf9); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; margin-bottom: .75rem; }
.connect-door-title { font-weight: 700; font-size: 1rem; margin: 0 0 .5rem; text-align: center; }
.connect-door .btn-connect-primary, .connect-door .portal-link-button { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; box-sizing: border-box; }
.connect-door .portal-link-button { padding: .6rem 1.2rem; }
.connect-door .portal-link-qr { margin-top: .75rem; }
.connect-demo { text-align: center; margin-top: .25rem; }
.connect-demo .btn-connect-demo { width: 100%; box-sizing: border-box; padding: .5rem 1rem; }

/* Hotfix 1.11.1 (owner, 2026-11-06): on a phone the sign-up button's label ran out of its box (the button kept the .btn
   no-wrap, so "Create your free account at tallytill.com" was 282px in a 226px button). Let it wrap, make it the door's one
   solid action as in the approved first-run mockup, and give the note above it room to breathe. */
.connect-door .portal-link-button { white-space: normal; text-align: center; line-height: 1.25; min-height: 48px; font-weight: 700; border-radius: 10px; }
.connect-door-new .portal-link-button { background: var(--brand-green); border-color: var(--brand-green); color: var(--brand-green-text, #fff); }
.connect-door-new .portal-link-button:hover { filter: brightness(1.08); color: var(--brand-green-text, #fff); }
.connect-door-new > .connect-field-hint { margin: 0 0 .6rem; }
/* A <button> does not inherit the page font on its own: without this the QR toggle drew in Arial. */
.btn-connect-link { font-family: inherit; line-height: 1.35; }
/* The public demo's "open tallytill.com" link reads as body text, not a headline. */
.connect-section .portal-link-inline { font-size: .9rem; }

/* The Disconnected badge is a button now (tap for how to reconnect): keep the pill look, drop the dot (it carries a Wi-Fi icon). */
button.cloud-disconnected-badge { font-family: inherit; cursor: pointer; }
button.cloud-disconnected-badge::before { display: none; }

/* Custom item (ring up something not in the catalog): the entry point under the price-list chip, and the dialog's
   taxable switch. Quiet like the chip: it is a manager tool, not the ordinary way to add an item. */
.adhoc-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    align-self: flex-start; margin: 0 0 .4rem;
    padding: .25rem .6rem; font-size: .85rem;
    border: 1px dashed var(--border); border-radius: 999px;
    background: var(--surface); color: var(--text-muted, #5a7463); cursor: pointer;
}
.adhoc-taxable { display: flex; align-items: center; gap: .5rem; margin: .6rem 0 .3rem; font-size: 1rem; cursor: pointer; }
.adhoc-taxable input { width: 1.2rem; height: 1.2rem; }
.adhoc-add { width: 100%; padding: .8rem; font-size: 1rem; margin-top: .4rem; }
.tip-confirm { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: center; font-size: .9rem; }
.tip-confirm span { flex: 1 1 100%; text-align: center; }
.tip-confirm .btn { min-height: 48px; flex: 1 1 0; }

/* Welcome screen on short viewports (10-inch landscape tablets at 1024x600, phones): tighten so the
   "Scan QR Code" button is on screen without scrolling. Taller screens keep the roomy layout above. */
@media (max-height: 760px) {
    .connect-page { padding: .75rem; }
    .connect-card { padding: 1rem 1.5rem; }
    /* keep the narrow-phone side padding set above (max-width: 380px) */
    @media (max-width: 380px) { .connect-card { padding: 1rem 1.25rem; } }
    .connect-logo { margin-bottom: .4rem; }
    .connect-logo img { width: 44px; height: 44px; }
    .connect-title { font-size: 1.2rem; margin-bottom: .25rem; }
    .connect-subtitle { font-size: .85rem; margin-bottom: .75rem; line-height: 1.35; }
    .connect-door { padding: .75rem; margin-bottom: .5rem; }
    .connect-door-title { margin-bottom: .3rem; }
    .connect-door .connect-field-hint { margin-top: 0; }
    .connect-camera-wrap { aspect-ratio: 16/9; max-height: 30vh; margin: 0 auto; }
}

/* Hotfix 1.11.1: on a phone the page, card and door paddings stacked to leave ~226px for content on a 390px screen. Placed after
   the short-viewport block so it wins on every phone height. */
@media (max-width: 480px) {
    .connect-page { padding: .75rem; }
    .connect-card { padding: 1.25rem 1rem; }
    .connect-door { padding: .9rem; }
}

/* Camera OFF on the checkout page: collapse the 200px black panel to a slim bar (icon, "Camera off", the existing turn-on button) so the cart gets the space.
   The <video> stays in the DOM, so turning the camera back on restores the full panel with no re-mount. */
.camera-section.camera-bar { padding-bottom: .25rem; }
.camera-section.camera-bar .camera-continuous { height: 44px; border-radius: 10px; }
.camera-section.camera-bar .camera-off-placeholder { flex-direction: row !important; justify-content: flex-start !important; padding: 0 .9rem; gap: .5rem !important; }
.camera-section.camera-bar .camera-off-placeholder > svg:not(.camera-off-icon) { display: none; }
.camera-section.camera-bar .camera-off-icon { color: rgba(255,255,255,.72); flex: 0 0 auto; }
.camera-section.camera-bar .camera-controls { top: 50%; transform: translateY(-50%); }

/* Scroll hint: a soft fade at the foot of the scrolling checkout region, so a cart that runs past the fold reads as scrollable. */
.checkout-scroll::after {
    content: "";
    position: sticky;
    bottom: 0;
    flex: 0 0 auto;
    height: 20px;
    margin-top: -20px;
    background: linear-gradient(to bottom, transparent, var(--surface, #fff));
    pointer-events: none;
}

/* ── Till category / sub-category tiles (TillTileBrowser) ─────────────────────────────────────── */
.till-browser { display: flex; flex-direction: column; gap: .5rem; flex: 1; min-height: 0; }
.till-body { display: flex; flex-direction: column; gap: .5rem; flex: 1; min-height: 0; overflow-y: auto; }
.till-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; font-size: .85rem; }
.till-menu-btn, .till-crumb { background: var(--surface, #fff); border: 1px solid var(--border, #d6d6d6); border-radius: 999px; padding: .35rem .8rem; min-height: 44px; cursor: pointer; color: var(--text); font-weight: 600; }
.till-crumb-sep { opacity: .5; }
.till-crumb-here { font-weight: 700; color: var(--text); }
.till-eyebrow { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; opacity: .6; padding: .15rem .1rem 0; }
.till-prompt { text-align: center; font-size: 1.05rem; font-weight: 600; color: var(--text); padding: .4rem; }
.till-nodes { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); grid-auto-rows: 168px; align-content: start; flex: none; overflow: visible; }
.till-body--large .till-nodes, .till-body--large .featured-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.till-body--large .till-nodes { grid-auto-rows: 208px; }
.till-body .featured-grid { flex: none; overflow: visible; }
.till-node { position: relative; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 0; min-height: 132px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius, 4px); background: var(--brand-green); color: var(--text); cursor: pointer; text-align: left; overflow: hidden; }
.till-node:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.till-node-img { flex: 1 1 0; width: 100%; min-height: 0; height: 0; object-fit: cover; display: block; }
/* Multi-picture category tile: later pictures fade in over the still first one (stagger = rotation ms, set inline); the last fades out to reveal it. */
.till-node-rot { position: relative; flex: 1 1 0; min-height: 0; display: block; overflow: hidden; }
.till-node-rot > .till-node-img { position: absolute; inset: 0; width: 100%; height: 100%; flex: none; }
.till-node-img--rot { opacity: 0; animation-iteration-count: infinite; animation-timing-function: linear; }
@keyframes till-rot-2-last { 0% { opacity: 0 } 12.50% { opacity: 1 } 50.00% { opacity: 1 } 62.50% { opacity: 0 } 100% { opacity: 0 } }
@keyframes till-rot-2-mid { 0% { opacity: 0 } 12.50% { opacity: 1 } 62.50% { opacity: 1 } 62.51% { opacity: 0 } 100% { opacity: 0 } }
@keyframes till-rot-3-last { 0% { opacity: 0 } 8.33% { opacity: 1 } 33.33% { opacity: 1 } 41.67% { opacity: 0 } 100% { opacity: 0 } }
@keyframes till-rot-3-mid { 0% { opacity: 0 } 8.33% { opacity: 1 } 41.67% { opacity: 1 } 41.68% { opacity: 0 } 100% { opacity: 0 } }
@keyframes till-rot-4-last { 0% { opacity: 0 } 6.25% { opacity: 1 } 25.00% { opacity: 1 } 31.25% { opacity: 0 } 100% { opacity: 0 } }
@keyframes till-rot-4-mid { 0% { opacity: 0 } 6.25% { opacity: 1 } 31.25% { opacity: 1 } 31.26% { opacity: 0 } 100% { opacity: 0 } }
@keyframes till-rot-5-last { 0% { opacity: 0 } 5.00% { opacity: 1 } 20.00% { opacity: 1 } 25.00% { opacity: 0 } 100% { opacity: 0 } }
@keyframes till-rot-5-mid { 0% { opacity: 0 } 5.00% { opacity: 1 } 25.00% { opacity: 1 } 25.01% { opacity: 0 } 100% { opacity: 0 } }
@keyframes till-rot-6-last { 0% { opacity: 0 } 4.17% { opacity: 1 } 16.67% { opacity: 1 } 20.83% { opacity: 0 } 100% { opacity: 0 } }
@keyframes till-rot-6-mid { 0% { opacity: 0 } 4.17% { opacity: 1 } 20.83% { opacity: 1 } 20.84% { opacity: 0 } 100% { opacity: 0 } }
@media (prefers-reduced-motion: reduce) { .till-node-img--rot { animation: none !important; opacity: 0; } }
.till-node-initial { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; font-weight: 800; line-height: 1; color: var(--tile-ink, #fff); min-height: 0; }
.till-node-band { display: flex; flex-direction: column; gap: .1rem; padding: .45rem .6rem; background: var(--surface); color: var(--text); border-top: 1px solid var(--border); }
.till-node-name { font-size: .95rem; font-weight: 700; line-height: 1.15; color: var(--text); }
.till-node-count { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }

/* Staff-only offline card queue chip + decline notice (OfflineQueueChip.razor) */
.cc-offline-chip { position: fixed; right: .75rem; bottom: .75rem; z-index: 900; padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--brand-amber, #d98324); background: color-mix(in srgb, var(--brand-amber, #d98324) 14%, var(--surface)); color: var(--text); font-size: .8rem; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.cc-offline-chip-alert { bottom: 3rem; border-radius: .6rem; max-width: min(28rem, 92vw); display: flex; gap: .6rem; align-items: flex-start; border-color: var(--danger, #c0392b); }
.cc-offline-chip-x { background: none; border: 0; color: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer; }

/* ── Till dark mode (#1691): the till's own surfaces re-point the theme tokens, so tiles, the extras sheet, the
   cart lines and the add toast follow the device/app theme without hard-coded colours. Scoped on purpose: the
   rest of the app does not define dark tokens yet. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .checkout-shell, :root:not([data-theme="light"]) .till-browser, :root:not([data-theme="light"]) .extras-sheet,
    :root:not([data-theme="light"]) .cart-item, :root:not([data-theme="light"]) .till-toast {
        --surface: #16211a; --surface-2: #1d2b22; --border: #2f4236; --text: #eaf2ec; --text-muted: #9db0a3;
    }
}
:root[data-theme="dark"] .checkout-shell, :root[data-theme="dark"] .till-browser, :root[data-theme="dark"] .extras-sheet,
:root[data-theme="dark"] .cart-item, :root[data-theme="dark"] .till-toast {
    --surface: #16211a; --surface-2: #1d2b22; --border: #2f4236; --text: #eaf2ec; --text-muted: #9db0a3;
}

/* Dark: brand-green text is unreadable on the dark surface, so prices and the tax-exempt tag use the text token. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .till-browser .featured-price, :root:not([data-theme="light"]) .cart-item .item-tax-exempt { color: var(--text); }
}
:root[data-theme="dark"] .till-browser .featured-price, :root[data-theme="dark"] .cart-item .item-tax-exempt { color: var(--text); }

/* The extras sheet and its option/cancel buttons take the text token (buttons do not inherit colour by default). */
.extras-sheet { color: var(--text); }
.extras-sheet .extras-option, .extras-sheet .weight-cancel { color: var(--text); }

/* Dark: the browse panel paints its own surface so crumbs and tiles never sit light-on-light; chips/buttons take tokens. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .till-browser { background: var(--surface); }
}
:root[data-theme="dark"] .till-browser { background: var(--surface); }
.cart-item .item-extras-btn, .cart-item .qty-btn { color: var(--text); }
.till-crumb-sep { color: var(--text-muted); }

/* Dark: the checkout shell takes the surface/text tokens so the cart column, totals and fields follow the theme. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .checkout-shell { background: var(--surface); color: var(--text); }
    :root:not([data-theme="light"]) .checkout-shell input, :root:not([data-theme="light"]) .checkout-shell select,
    :root:not([data-theme="light"]) .checkout-shell textarea { background: var(--surface-2); color: var(--text); border-color: var(--border); }
}
:root[data-theme="dark"] .checkout-shell { background: var(--surface); color: var(--text); }
:root[data-theme="dark"] .checkout-shell input, :root[data-theme="dark"] .checkout-shell select,
:root[data-theme="dark"] .checkout-shell textarea { background: var(--surface-2); color: var(--text); border-color: var(--border); }

/* ---- Till browse: photo-forward item tiles, clean 2-column leaf grid, brand pressed state ---- */
/* `dense` back-fills the cell beside a single tile with the next 1x1 tile, so wide (M/L) tiles never leave a hole. */
.till-body .featured-grid { grid-auto-flow: dense; }
.till-body .featured-card, .till-body .till-node { -webkit-tap-highlight-color: transparent; }
.till-body .featured-card {
    padding: 0; gap: 0; overflow: hidden; align-items: stretch; min-height: 44px; color: var(--text);
}
/* The photo fills the top of the tile; name and price sit under it. */
.till-body .featured-card .featured-thumb,
.till-body .featured-card .featured-thumb-placeholder {
    flex: none; width: 100%; height: auto; min-height: 0; aspect-ratio: 5 / 4; object-fit: cover;
    border: 0; border-radius: 0; background: var(--surface-2);
}
.till-body .featured-card .featured-thumb-placeholder { font-size: 2.4rem; }
.till-body .featured-card .featured-name { padding: .45rem .6rem 0; font-size: .95rem; font-weight: 700; color: var(--text); text-align: left; }
.till-body .featured-card .featured-price { padding: .1rem .6rem .55rem; font-size: .95rem; font-weight: 700; color: var(--brand-green); text-align: left; }
/* Wide (featured) tile: the WHOLE photo at full tile height on the left, name and price beside it. */
.till-body .featured-card--hero { display: grid; grid-template-columns: minmax(0, 46%) 1fr; grid-template-rows: 1fr 1fr; column-gap: 0; align-items: stretch; }
.till-body .featured-card--hero .featured-thumb,
.till-body .featured-card--hero .featured-thumb-placeholder {
    grid-row: 1 / span 2; grid-column: 1; width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: contain; min-height: 0;
}
.till-body .featured-card--hero .featured-name { grid-column: 2; grid-row: 1; align-self: end; padding: .6rem .8rem 0; font-size: 1.15rem; }
.till-body .featured-card--hero .featured-price { grid-column: 2; grid-row: 2; align-self: start; padding: .15rem .8rem .6rem; font-size: 1.15rem; }
/* Pressed / hover use brand tokens, never the UA or Android blue. */
@media (hover: hover) { .till-body .featured-card:hover, .till-body .till-node:hover { filter: none; border-color: var(--brand-green); } }
.till-body .featured-card:active { background: color-mix(in srgb, var(--brand-green) 12%, var(--surface)); border-color: var(--brand-green); }
.till-body .till-node:active { outline: 3px solid var(--accent); outline-offset: -3px; }
.till-body .featured-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.till-crumbs button, .till-crumb, .till-menu-btn { -webkit-tap-highlight-color: transparent; }
.till-crumb:active, .till-crumbs button:active, .till-menu-btn:active { background: color-mix(in srgb, var(--brand-green) 12%, var(--surface)); color: var(--text); }

/* Cold-start loading state for the product area of a tiles till (replaces the flat grid until the tile layout exists). */
.till-loading { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.till-loading-label { font-size: 0.8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
.till-loading-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; pointer-events: none; }
.till-loading-tile { min-height: 96px; border-radius: 4px; border: 1px solid var(--border); background: var(--surface-2); animation: till-loading-pulse 1.4s ease-in-out infinite; }
@keyframes till-loading-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .till-loading-tile { animation: none; } }

/* ── Tile style presets (plan C.8): one tenant-wide class on the product grid, four fixed looks ─────────────────
   Specificity is deliberately 4 classes so a preset beats the hero/standard rules above. Text on photos always sits on a
   dark scrim; the badge is a darkened accent so white price text clears 4.5:1. */
.featured-star { display: none; }
.featured-grid[class*="tile-style--"] .featured-card { position: relative; }
.featured-grid[class*="tile-style--"] .featured-card .featured-star {
    display: flex; position: absolute; top: .4rem; z-index: 2; width: 1.5rem; height: 1.5rem; align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(31, 41, 51, .85); color: #fff; font-size: .8rem; line-height: 1;
}
.tile-style--classic .featured-card .featured-star, .tile-style--menulist .featured-card .featured-star { right: .4rem; }
.tile-style--photofirst .featured-card .featured-star { left: .4rem; }
.featured-grid.tile-style--compact .featured-card .featured-star { display: none; }

/* Classic: today's look (photo, name, price stacked). */
.featured-grid.tile-style--classic .featured-card .featured-name,
.featured-grid.tile-style--classic .featured-card .featured-price { font-size: 18px; }

/* Photo first: photo fills the tile, name and price on a scrim at the bottom. */
/* The grid row owns the tile height (an inline grid-auto-rows from the layout settings overrides this default), so a tile spanning
   2 columns or 2 rows fills exactly its cell. A width-derived aspect-ratio here made M/L tiles taller than their rows. */
.featured-grid.tile-style--photofirst { grid-auto-rows: minmax(120px, auto); }
.featured-grid.tile-style--photofirst .featured-card { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto auto; min-height: 0; min-width: 0; height: 100%; overflow: hidden; }
.featured-grid.tile-style--photofirst .featured-card .featured-thumb,
.featured-grid.tile-style--photofirst .featured-card .featured-thumb-placeholder {
    position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; grid-row: auto; grid-column: auto;
}
.featured-grid.tile-style--photofirst .featured-card::after {
    content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .6) 0, rgba(0, 0, 0, .6) 38%, rgba(0, 0, 0, 0) 70%); pointer-events: none;
}
.featured-grid.tile-style--photofirst .featured-card .featured-name,
.featured-grid.tile-style--photofirst .featured-card .featured-price {
    position: relative; z-index: 1; align-self: end; color: #fff; font-size: 18px; padding: .5rem .6rem .55rem; text-shadow: none; text-align: left;
}
.featured-grid.tile-style--photofirst .featured-card .featured-name { grid-column: 1; grid-row: 2; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: break-word; line-height: 1.2; max-height: calc(2.4em + .5rem); padding-bottom: 0; }
.featured-grid.tile-style--photofirst .featured-card .featured-price { grid-column: 1; grid-row: 3; min-width: 0; padding-top: .15rem; overflow-wrap: break-word; }
/* Name and price are stacked (single column) so neither is squeezed or clipped on narrow tiles. */
/* No photo: the placeholder (the item's initials) sits in the clear upper part of the tile on a dark panel, in white for contrast. */
.featured-grid.tile-style--photofirst .featured-card .featured-thumb-placeholder { display: flex; align-items: center; justify-content: center; padding-bottom: 5rem; background: #3a4753; color: rgba(255, 255, 255, .9); font-size: 1.5rem; }
/* The star owns top-left in Photo first, so SOLD OUT moves to top-right and both stay readable. */
.featured-grid.tile-style--photofirst .featured-card .featured-soldout { z-index: 2; left: auto; right: .35rem; }

/* Compact: short band, name and price share one row under the photo. */
.featured-grid.tile-style--compact .featured-card { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; }
.featured-grid.tile-style--compact .featured-card .featured-thumb,
.featured-grid.tile-style--compact .featured-card .featured-thumb-placeholder { grid-column: 1 / span 2; grid-row: 1; width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; }
.featured-grid.tile-style--compact .featured-card .featured-name,
.featured-grid.tile-style--compact .featured-card .featured-price { grid-row: 2; align-self: center; font-size: 15px; padding: .35rem .5rem; }
.featured-grid.tile-style--compact .featured-card .featured-name { grid-column: 1; }
.featured-grid.tile-style--compact .featured-card .featured-price { grid-column: 2; }

/* Menu list: one item per row, photo left, large name right, price badge on the photo's corner. */
.featured-grid.tile-style--menulist { grid-template-columns: 1fr !important; }
.featured-grid.tile-style--menulist .featured-card { display: grid; grid-template-columns: 38% 1fr; grid-template-rows: 1fr; grid-column: auto !important; grid-row: auto !important; min-height: 96px; }
.featured-grid.tile-style--menulist .featured-card .featured-thumb,
.featured-grid.tile-style--menulist .featured-card .featured-thumb-placeholder { grid-column: 1; grid-row: 1; width: 100%; height: 100%; min-height: 96px; aspect-ratio: auto; object-fit: cover; }
.featured-grid.tile-style--menulist .featured-card .featured-name { grid-column: 2; grid-row: 1; align-self: center; font-size: 22px; padding: .6rem .9rem; }
.featured-grid.tile-style--menulist .featured-card .featured-price {
    position: absolute; left: calc(38% - .4rem); bottom: .4rem; transform: translateX(-100%); z-index: 2; grid-column: auto; grid-row: auto;
    background: #A8481C; color: #fff; padding: .15rem .55rem; border-radius: 999px; font-size: 15px;
}
.featured-grid.tile-style--menulist .featured-card .featured-star { right: auto; left: calc(38% - 1.9rem); }
