:root {
    color: #201d35;
    background: #f4f2ed;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    --ink: #201d35;
    --muted: #686477;
    --paper: #fffefa;
    --canvas: #f4f2ed;
    --accent: #ff5d3d;
    --accent-dark: #d93c22;
    --violet: #6757d9;
    --line: #ded9d0;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(circle at 10% 10%, rgba(255, 93, 61, .08), transparent 26rem), var(--canvas);
}

button,
input,
select {
    font: inherit;
}

.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; color: #fff; background: var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.shell {
    min-height: 100vh;
    padding: 24px;
}

body.terminal-page {
    overflow: hidden;
}

.terminal-page .minarrolabs-page,
.terminal-page .shell {
    height: 100dvh;
    min-height: 0;
}

.card {
    border: 1px solid rgba(32, 29, 53, .08);
    background: var(--paper);
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(32, 29, 53, .08);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 18px;
    border: 0;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

.button-primary {
    color: #fff;
    background: var(--accent);
    box-shadow: 0 8px 22px rgba(255, 93, 61, .24);
}

.button-primary:hover { background: var(--accent-dark); }

.button-secondary {
    color: var(--ink);
    background: #ebe8e1;
}

.button-quiet { color: var(--ink); background: transparent; }

.button-danger {
    color: #b42318;
    background: #fef3f2;
}

.home-shell,
.admin-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 32px 24px;
}

.home-hero {
    padding: clamp(32px, 7vw, 80px);
    background: linear-gradient(135deg, #fff 35%, #e7edff);
}

.home-hero h1 {
    max-width: 720px;
    margin: 0 0 18px;
    font-size: clamp(2.4rem, 7vw, 5rem);
    line-height: .98;
}

.home-lead {
    max-width: 670px;
    color: #4a5664;
    font-size: 1.2rem;
    line-height: 1.6;
}

.home-actions,
.admin-nav,
.section-heading,
.admin-item summary,
.admin-item-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.home-actions .button,
.admin-nav a {
    text-decoration: none;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 18px;
}

.home-grid article {
    padding: 26px;
}

.admin-nav {
    position: sticky;
    top: 12px;
    z-index: 2;
    padding: 16px 20px;
    overflow-x: auto;
}

.admin-nav a {
    color: #3448c5;
    font-weight: 800;
}

.admin-section {
    margin-top: 22px;
    padding: 28px;
    scroll-margin-top: 90px;
}

.section-heading,
.admin-item summary {
    justify-content: space-between;
}

.admin-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
    border-radius: 14px;
    background: #f5f7fa;
}

.admin-form label,
.admin-form fieldset {
    font-weight: 700;
}

.admin-form input,
.admin-form select {
    width: 100%;
    margin-top: 6px;
    padding: 11px;
    border: 1px solid #cbd3dc;
    border-radius: 9px;
    background: #fff;
}

.admin-form fieldset {
    display: flex;
    gap: 12px;
    border: 0;
}

.admin-form fieldset input {
    width: auto;
}

.admin-list {
    margin-top: 18px;
}

.admin-item {
    padding: 16px 0;
    border-top: 1px solid #e7edf3;
}

.admin-item[data-inactive] {
    opacity: .65;
}

.admin-item summary {
    cursor: pointer;
}

.admin-item summary span,
.admin-item summary small {
    display: block;
}

.admin-item summary small {
    margin-top: 4px;
    color: #687482;
}

.admin-item-actions {
    align-items: flex-end;
    margin-top: 14px;
}

.admin-item-actions .admin-form {
    flex: 1;
}

.flash {
    padding: 12px 16px;
    border-radius: 10px;
    background: #fff;
}

.table-scroll { overflow-x: auto; }
.table-scroll table { width: 100%; border-collapse: collapse; }
.table-scroll th, .table-scroll td { padding: 12px; border-bottom: 1px solid #e7edf3; text-align: left; }
.receipt-footer { margin: 18px 0 0; text-align: center; }

.muted {
    color: #687482;
}

.error {
    min-height: 24px;
    color: #b42318;
}

.notice {
    min-height: 24px;
    color: #067647;
}

.pos {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    height: 100%;
    min-height: 0;
}

.catalog,
.cart {
    padding: 22px;
}

.products {
    display: grid;
    flex: 1;
    min-height: 0;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.product {
    min-height: 110px;
    padding: 16px;
    border: 0;
    border-radius: 16px;
    background: #f5f7fa;
    text-align: left;
    cursor: pointer;
}

.product strong {
    display: block;
    margin-bottom: 20px;
}

.cart {
    display: flex;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
}

.cart-heading,
.line,
.line-actions {
    display: flex;
    align-items: center;
}

.cart-heading {
    justify-content: space-between;
    gap: 12px;
}

.cart-lines {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.line {
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #e7edf3;
}

.line-description strong,
.line-description span {
    display: block;
}

.line-description span {
    margin-top: 4px;
    color: #687482;
    font-size: .85rem;
}

.line-actions {
    gap: 8px;
}

.quantity-button,
.remove-button,
.cancel-button {
    min-height: 40px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}

.quantity-button {
    min-width: 40px;
    background: #e7edf3;
    font-size: 1.25rem;
}

.remove-button,
.cancel-button {
    padding: 8px 10px;
    color: #b42318;
    background: #fef3f2;
}

.line-subtotal {
    min-width: 72px;
    text-align: right;
}

.total {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    font-size: 1.7rem;
    font-weight: 800;
}

.payments {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.register-status {
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f5f7fa;
}

.terminal-context {
    display: flex;
    align-items: center;
    gap: 10px;
}

.catalog {
    display: flex;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
}

.terminal-context .register-status {
    flex: 1;
}

.operator-status {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #067647;
    background: #ecfdf3;
    font-size: .82rem;
    font-weight: 800;
}

.operator-status span {
    margin-right: 6px;
    font-size: .62rem;
}

.text-link {
    color: #3448c5;
    font-weight: 700;
}

.logout-form {
    display: inline;
    margin: 0;
}

.logout-button {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.logout-button:hover {
    text-decoration: underline;
}

.pos-links,
.cash-header nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.pos-menu-toggle {
    display: none;
}

.cart-toggle {
    display: none;
}

.cart-count {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
}

.cash-shell {
    width: min(1180px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: 32px 24px;
}

.cash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.cash-header h1,
.cash-panel h1,
.cash-panel h2,
.eyebrow {
    margin-top: 0;
}

.eyebrow {
    margin-bottom: 6px;
    color: #3448c5;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.cash-panel {
    padding: 28px;
}

.cash-panel-narrow {
    width: min(520px, 100%);
    margin: 6vh auto 0;
}

.cash-panel-narrow > .text-link {
    display: block;
    margin-top: 16px;
}

.cash-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 24px 0;
}

.cash-metric {
    padding: 20px;
}

.cash-metric span,
.cash-metric strong {
    display: block;
}

.cash-metric span {
    color: #687482;
}

.cash-metric strong {
    margin-top: 8px;
    font-size: 1.45rem;
}

.cash-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
    align-items: start;
}

.cash-form {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.cash-form label {
    margin-top: 4px;
    font-weight: 700;
}

.cash-form input,
.cash-form select {
    min-width: 0;
    padding: 12px;
    border: 1px solid #cbd3dc;
    border-radius: 10px;
    background: #fff;
}

.money-input {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
}

.money-input span {
    font-weight: 800;
}

.movement-list {
    padding: 0;
    list-style: none;
}

.movement-list li,
.cash-balance div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #e7edf3;
}

.movement-list time {
    display: block;
    margin-top: 3px;
    color: #687482;
    font-size: .82rem;
}

.positive { color: #067647; }
.negative { color: #b42318; }

.cash-balance {
    margin: 20px 0;
}

.cash-balance dt,
.cash-balance dd {
    margin: 0;
}

.cash-balance dd {
    font-weight: 800;
}

.cash-table-wrap { overflow-x: auto; }
.cash-table { width: 100%; border-collapse: collapse; }
.cash-table th, .cash-table td { padding: 12px; border-bottom: 1px solid #e7edf3; text-align: left; white-space: nowrap; }

.receipt-browser,
.receipt-layout {
    min-height: 100vh;
    padding: 24px;
}

.receipt-browser {
    display: grid;
    place-items: start center;
}

.receipt-panel {
    width: min(100%, 680px);
    padding: 28px;
}

.receipt-layout {
    display: grid;
    grid-template-columns: minmax(280px, 80mm) minmax(280px, 420px);
    justify-content: center;
    gap: 24px;
    align-items: start;
}

.receipt-paper,
.receipt-actions {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 12px 36px rgba(24, 32, 42, .12);
}

.receipt-paper {
    width: 80mm;
    padding: 8mm 6mm;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

.receipt-header,
.receipt-header span {
    display: block;
    text-align: center;
}

.receipt-header strong {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
}

.receipt-meta {
    margin: 18px 0;
    padding: 12px 0;
    border-top: 1px dashed #687482;
    border-bottom: 1px dashed #687482;
    text-align: center;
}

.receipt-meta h1 {
    margin: 0 0 4px;
    font-size: 15px;
}

.receipt-lines {
    width: 100%;
    border-collapse: collapse;
}

.receipt-lines th,
.receipt-lines td {
    padding: 6px 2px;
    border-bottom: 1px dotted #aab2bd;
    text-align: right;
    vertical-align: top;
}

.receipt-lines th:first-child,
.receipt-lines td:first-child {
    text-align: left;
}

.receipt-lines small {
    display: block;
    color: #687482;
}

.receipt-total,
.receipt-payments p {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.receipt-total {
    margin-top: 14px;
    font-size: 16px;
}

.receipt-payments h2 {
    margin: 18px 0 8px;
    font-size: 13px;
}

.receipt-payments p {
    margin: 4px 0;
}

.receipt-immutable {
    margin: 18px 0 0;
    padding-top: 12px;
    border-top: 1px dashed #687482;
    text-align: center;
}

.receipt-actions {
    padding: 24px;
}

.receipt-actions > .button {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    text-align: center;
    text-decoration: none;
}

.receipt-search {
    margin: 24px 0;
}

.receipt-search label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.receipt-search div {
    display: flex;
    gap: 8px;
}

.receipt-search input {
    min-width: 0;
    flex: 1;
    padding: 12px;
    border: 1px solid #cbd3dc;
    border-radius: 10px;
}

.recent-receipts ol {
    padding: 0;
    list-style: none;
}

.recent-receipts li + li {
    border-top: 1px solid #e7edf3;
}

.recent-receipts a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    color: inherit;
    text-decoration: none;
}

.recent-receipts span {
    color: #687482;
    text-align: right;
}

button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.brand-bar,
.brand-lockup,
.value-strip,
.demo-access,
.site-footer,
.terminal-heading { display: flex; align-items: center; }

.home-shell { width: min(1240px, 100%); }
.brand-bar { justify-content: space-between; margin-bottom: 24px; }
.brand-lockup { gap: 12px; color: var(--ink); text-decoration: none; }
.brand-lockup strong, .brand-lockup small { display: block; }
.brand-lockup small { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px 13px 4px 13px; color: #fff; background: var(--ink); font-size: 1.3rem; font-weight: 900; }
.demo-badge { padding: 7px 11px; border: 1px solid rgba(103, 87, 217, .22); border-radius: 99px; color: var(--violet); background: rgba(103, 87, 217, .08); font-size: .74rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }

.home-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); gap: clamp(32px, 7vw, 90px); align-items: center; overflow: hidden; background: linear-gradient(135deg, var(--paper) 42%, #ece8ff); }
.home-hero h1 { font-size: clamp(2.7rem, 6vw, 5.4rem); letter-spacing: -.065em; line-height: .94; }
.home-lead { color: var(--muted); }
.signed-in { margin-top: 24px; }
.hero-proof { padding: 26px; border: 1px solid rgba(32, 29, 53, .12); border-radius: 18px; background: rgba(255, 254, 250, .72); backdrop-filter: blur(10px); }
.proof-kicker { color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.hero-proof ol { margin: 18px 0 0; padding: 0; list-style: none; }
.hero-proof li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); font-weight: 750; }
.hero-proof li span { color: var(--accent); font-size: .72rem; }
.section-intro { grid-column: 1 / -1; max-width: 700px; padding: 42px 0 12px; }
.section-intro h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.04em; }
.feature-card { position: relative; min-height: 260px; padding: 28px !important; }
.feature-card h3 { max-width: 260px; margin: 18px 0 10px; font-size: 1.45rem; }
.feature-card p:last-child { color: var(--muted); line-height: 1.6; }
.feature-number { position: absolute; top: 22px; right: 24px; color: #cbc6bd; font-size: 2.2rem; font-weight: 900; }
.value-strip { justify-content: space-around; margin: 18px 0 0; padding: 22px 12px; border-block: 1px solid var(--line); }
.value-strip p { margin: 0; padding: 4px 24px; }
.value-strip strong, .value-strip span { display: block; }
.value-strip strong { font-size: 1.25rem; }
.value-strip span { margin-top: 3px; color: var(--muted); font-size: .82rem; }
.demo-access { justify-content: space-between; gap: 36px; margin-top: 72px; padding: clamp(28px, 5vw, 52px); color: #fff; background: var(--ink); }
.demo-access > div { max-width: 500px; }
.demo-access h2 { margin: 6px 0 12px; font-size: 2rem; }
.demo-access p { color: #c9c5d6; line-height: 1.5; }
.demo-access code { color: #fff; }
.demo-access dl { min-width: 260px; margin: 0; }
.demo-access dl div { padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.demo-access dt { color: #aaa4bc; font-size: .74rem; text-transform: uppercase; }
.demo-access dd { margin: 4px 0 0; font-weight: 750; }
.site-footer { justify-content: space-between; gap: 24px; padding: 38px 4px 10px; color: var(--muted); }
.site-footer > span { color: var(--ink); font-weight: 900; }

.tour-dialog { width: min(580px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 24px; color: var(--ink); background: var(--paper); box-shadow: 0 30px 100px rgba(16, 13, 32, .3); }
.tour-dialog::backdrop { background: rgba(21, 18, 41, .68); backdrop-filter: blur(4px); }
.tour-top, .tour-actions { display: flex; align-items: center; justify-content: space-between; padding: 20px 28px; }
.tour-top { border-bottom: 1px solid var(--line); color: var(--muted); font-size: .8rem; font-weight: 800; }
.tour-top button { border: 0; background: none; font-size: 1.8rem; cursor: pointer; }
.tour-step { min-height: 260px; padding: 40px 44px; }
.tour-step h2 { margin: 8px 0 16px; font-size: 2.5rem; letter-spacing: -.04em; }
.tour-step p:last-child { color: var(--muted); font-size: 1.08rem; line-height: 1.65; }
.tour-actions { border-top: 1px solid var(--line); }

.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, 440px); place-content: center; gap: 24px; padding: 24px; }
.login-brand { justify-self: center; }
.login-card { padding: clamp(28px, 6vw, 46px); }
.login-card h1 { margin: 8px 0 12px; font-size: clamp(2rem, 6vw, 3.2rem); letter-spacing: -.045em; }
.field { display: grid; gap: 8px; margin-top: 18px; font-weight: 750; }
.field input, .catalog-search input { width: 100%; border: 1px solid #cfc9bf; border-radius: 12px; padding: 14px; background: #fff; }
.field input:focus, .catalog-search input:focus { border-color: var(--violet); outline: 3px solid rgba(103, 87, 217, .14); }
.login-card > .button { width: 100%; margin-top: 6px; }
.login-hint { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .8rem; }
.login-hint span { color: var(--violet); font-weight: 800; }
.login-back { display: block; margin-top: 22px; text-align: center; }

.eyebrow { color: var(--violet); }
.product { display: flex; min-height: 140px; flex-direction: column; border: 1px solid #e4dfd7; background: #f8f6f1; transition: transform .15s, border-color .15s; }
.product:hover { border-color: var(--accent); transform: translateY(-2px); }
.product span { color: var(--violet); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.product strong { margin: 12px 0 auto; }
.product b { margin-top: 16px; font-size: 1.05rem; }
.terminal-heading { justify-content: space-between; }
.terminal-heading h1 { margin: 0 0 16px; }
.catalog-search { display: grid; gap: 7px; margin: 22px 0 16px; color: var(--muted); font-size: .8rem; font-weight: 750; }
.empty-state { display: grid; gap: 7px; margin: 18px 0; padding: 24px; border: 1px dashed #cfc9bf; border-radius: 14px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink); }
.catalog-empty { grid-column: 1 / -1; }

@media (max-width: 850px) {
    .pos {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) auto;
        gap: 12px;
    }

    .receipt-layout {
        grid-template-columns: 1fr;
    }

    .cash-metrics { grid-template-columns: repeat(2, 1fr); }
    .cash-grid { grid-template-columns: 1fr; }
    .home-grid { grid-template-columns: 1fr; }
    .home-hero { grid-template-columns: 1fr; }
    .section-intro { grid-column: auto; }
    .demo-access { align-items: flex-start; flex-direction: column; }
    .admin-form { grid-template-columns: repeat(2, 1fr); }

    .receipt-paper {
        max-width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 520px) {
    .shell {
        height: 100dvh;
        min-height: 0;
        padding: 0;
    }

    .pos {
        display: grid;
        height: 100dvh;
        min-height: 0;
        grid-template-rows: minmax(0, 1fr) auto;
        gap: 0;
        background: var(--paper);
    }

    .catalog,
    .cart {
        min-width: 0;
        padding: 12px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .catalog {
        display: flex;
        min-height: 0;
        flex-direction: column;
        overflow: hidden;
    }

    .terminal-heading .eyebrow,
    .terminal-heading .demo-badge {
        display: none;
    }

    .terminal-heading h1 {
        margin: 0 0 8px;
        font-size: 1.35rem;
    }

    .terminal-context {
        gap: 6px;
    }

    .register-status,
    .operator-status {
        min-width: 0;
        margin-bottom: 8px;
        padding: 7px 9px;
        overflow: hidden;
        font-size: .72rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .operator-status {
        max-width: 42%;
    }

    .pos-menu {
        position: absolute;
        z-index: 5;
        top: 8px;
        right: 10px;
    }

    .pos-menu-toggle {
        display: block;
        padding: 7px 10px;
        border: 0;
        border-radius: 9px;
        color: var(--violet);
        background: #f1efff;
        font-size: .74rem;
        font-weight: 800;
        cursor: pointer;
    }

    .pos-menu[data-expanded] .pos-links {
        display: grid;
    }

    .pos-links {
        position: absolute;
        top: 38px;
        right: 0;
        display: none;
        width: 190px;
        gap: 0;
        padding: 8px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--paper);
        box-shadow: 0 14px 38px rgba(32, 29, 53, .18);
    }

    .pos-links a {
        padding: 10px;
        text-decoration: none;
    }

    .catalog-search {
        margin: 0 0 8px;
    }

    .catalog-search span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .catalog-search input {
        padding: 9px 11px;
        border-radius: 10px;
        font-size: .85rem;
    }

    .products {
        flex: 1;
        min-height: 0;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-rows: minmax(84px, 1fr);
        gap: 7px;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: none;
    }

    .products::-webkit-scrollbar {
        display: none;
    }

    .product {
        min-height: 84px;
        padding: 9px;
        border-radius: 12px;
    }

    .product:hover {
        transform: none;
    }

    .product span {
        display: none;
    }

    .product strong {
        display: -webkit-box;
        margin: 0;
        overflow: hidden;
        font-size: .82rem;
        line-height: 1.12;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .product b {
        margin-top: auto;
        font-size: .84rem;
    }

    .cart {
        position: relative;
        z-index: 4;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 9px 12px max(9px, env(safe-area-inset-bottom));
        border-top: 1px solid var(--line);
        box-shadow: 0 -12px 32px rgba(32, 29, 53, .1);
    }

    .cart-heading h2 {
        margin: 0;
        font-size: .9rem;
    }

    .cart-toggle {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        margin-left: auto;
        padding: 6px 8px;
        border: 0;
        color: var(--violet);
        background: transparent;
        font-size: .72rem;
        font-weight: 800;
    }

    .cart-toggle span:last-child {
        transition: transform .18s;
    }

    .cart[data-expanded] .cart-toggle span:last-child {
        transform: rotate(180deg);
    }

    .cart-lines,
    .cart .cancel-button {
        display: none;
    }

    .cart[data-expanded] {
        position: fixed;
        inset: 22dvh 0 0;
        grid-template-rows: auto minmax(0, 1fr) auto auto auto;
        border-radius: 20px 20px 0 0;
    }

    .cart[data-expanded] .cart-lines {
        display: block;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .cart[data-expanded] .cancel-button:not([hidden]) {
        display: inline-block;
    }

    .cart .empty-state {
        margin: 6px 0;
        padding: 12px;
        font-size: .8rem;
    }

    .total {
        margin: 0;
        font-size: 1.25rem;
    }

    .payments {
        gap: 8px;
    }

    .payments .button {
        min-height: 48px;
        padding: 10px 12px;
    }

    .notice,
    .error {
        min-height: 0;
        margin: 0;
        font-size: .76rem;
    }

    .notice:empty,
    .error:empty {
        display: none;
    }

    .line {
        align-items: flex-start;
        flex-direction: column;
    }

    .line-actions {
        width: 100%;
    }

    .line-subtotal {
        flex: 1;
    }

    .cash-shell { padding: 18px 12px; }
    .cash-header { align-items: flex-start; flex-direction: column; }
    .cash-metrics { grid-template-columns: 1fr; }
    .home-shell, .admin-shell { padding: 18px 12px; }
    .home-actions, .admin-item-actions { align-items: stretch; flex-direction: column; }
    .value-strip { align-items: flex-start; flex-direction: column; gap: 12px; }
    .value-strip p { padding-inline: 4px; }
    .site-footer { align-items: flex-start; flex-direction: column; }
    .tour-step { min-height: 320px; padding: 32px 26px; }
    .admin-form { grid-template-columns: 1fr; }
}

@media print {
    @page {
        size: 80mm auto;
        margin: 0;
    }

    :root,
    body {
        width: 80mm;
        min-height: 0;
        background: #fff;
    }

    .no-print {
        display: none !important;
    }

    .receipt-layout {
        display: block;
        min-height: 0;
        padding: 0;
    }

    .receipt-paper {
        width: 80mm;
        padding: 4mm;
        border-radius: 0;
        box-shadow: none;
    }
}
