:root {
    color-scheme: light;

    /* Brand and surfaces, translated from the visual prototype. */
    --color-paper: #fffaf0;
    --color-surface: #ffffff;
    --color-cream: #f6ead2;
    --color-cream-soft: #fff3df;
    --color-cream-strong: #ede0c7;
    --color-ink: #172e29;
    --color-ink-soft: #3f514c;
    --color-muted: #70675f;
    --color-red: #b4232d;
    --color-red-dark: #8f1821;
    --color-green: #172e29;
    --color-green-soft: #28745d;
    --color-gold: #e8b84a;
    --color-gold-light: #f6d47a;
    --color-line: #e1d6c3;
    --color-line-strong: #d9c6a5;
    --color-danger: #a61b24;
    --color-success: #176b52;
    --color-footer: #102622;
    --color-footer-muted: #b2b9b5;

    /* Purpose-based geometry and rhythm. */
    --radius-xs: .55rem;
    --radius-sm: .8rem;
    --radius-md: 1.25rem;
    --radius-lg: 1.75rem;
    --radius-xl: 2.5rem;
    --shadow-xs: 0 2px 5px rgb(52 31 20 / 10%);
    --shadow-sm: 0 8px 24px rgb(52 31 20 / 8%);
    --shadow-md: 0 18px 46px rgb(52 31 20 / 14%);
    --shadow-lg: 0 32px 82px rgb(52 31 20 / 22%);
    --space-1: .35rem;
    --space-2: .65rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 2rem;
    --space-6: 3rem;
    --space-7: 4.5rem;
    --page-max: 80rem;
    --page-gutter: clamp(1rem, 3vw, 2rem);
    --header-height: 4.75rem;
    --control-height: 3rem;
    --control-height-lg: 3.5rem;
    --font-body: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: Georgia, "Times New Roman", "Noto Serif CJK SC", serif;
    --transition-fast: 160ms ease;

    /* Compatibility aliases for existing operational components. */
    --ink: var(--color-ink);
    --muted: var(--color-muted);
    --paper: var(--color-paper);
    --surface: var(--color-surface);
    --line: var(--color-line);
    --brand: var(--color-red);
    --brand-dark: var(--color-red-dark);
    --accent: var(--color-green-soft);
    --danger: var(--color-danger);
    --shadow: var(--shadow-sm);

    font-family: var(--font-body);
    font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 20rem; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 1rem); }
body {
    min-width: 20rem;
    margin: 0;
    overflow-x: hidden;
    color: var(--color-ink);
    background: var(--color-paper);
    font-family: var(--font-body);
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img, svg { max-width: 100%; }
address { font-style: normal; }
::selection { color: var(--color-ink); background: var(--color-gold); }

a { color: var(--color-red-dark); text-underline-offset: .2em; }
a:hover { color: var(--color-red); }
a.map-link { color: inherit; text-decoration-line: underline; text-decoration-style: dotted; text-decoration-color: currentColor; }
a.map-link:hover { color: var(--color-red); text-decoration-style: solid; }

h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 {
    margin-top: 0;
    color: var(--color-ink);
    font-family: var(--font-display);
    font-weight: 900;
    letter-spacing: -.035em;
    line-height: 1.03;
}
h1 { margin-bottom: .75rem; font-size: clamp(2.75rem, 7vw, 5.25rem); }
h2 { margin-bottom: .65rem; font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
h3 { margin-bottom: .5rem; font-size: 1.2rem; }

:focus-visible {
    outline: 3px solid var(--color-red);
    outline-offset: 3px;
}
h1[tabindex="-1"]:focus { outline: none; }

.content-width { width: min(var(--page-max), calc(100% - (2 * var(--page-gutter)))); margin-inline: auto; }
.narrow-page { width: min(52rem, calc(100% - (2 * var(--page-gutter)))); margin-inline: auto; padding-block: clamp(3rem, 8vw, 6rem); }
.page-intro { max-width: 45rem; color: var(--color-muted); font-size: 1.04rem; line-height: 1.75; }

.eyebrow {
    margin-bottom: .7rem;
    color: var(--color-red);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .22em;
    line-height: 1.4;
    text-transform: uppercase;
}

.muted, .fine-print { color: var(--color-muted); }
.fine-print { font-size: .79rem; line-height: 1.65; }
.danger-text { color: var(--color-danger); }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Shared controls */
.ui-icon { display: block; width: 1.25rem; height: 1.25rem; flex: 0 0 auto; }
.back-link { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; margin-bottom: 1.25rem; color: var(--color-muted); font-size: .85rem; font-weight: 850; text-decoration: none; }
.back-link:hover { color: var(--color-red); }
@media (max-width: 600px) {
    .back-link { margin-bottom: 1rem; }
}

.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.button-row.end { justify-content: flex-end; margin-top: 1.25rem; }
.button {
    min-height: var(--control-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .65rem 1.15rem;
    color: var(--color-ink);
    border: 1px solid var(--color-line-strong);
    border-radius: 999px;
    background: var(--color-surface);
    box-shadow: none;
    font-weight: 850;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.button:hover:not(:disabled) { color: var(--color-ink); transform: translateY(-1px); box-shadow: var(--shadow-xs); }
.button:disabled { opacity: .52; cursor: not-allowed; }
.button.primary { color: white; border-color: var(--color-red); background: var(--color-red); box-shadow: 0 10px 24px rgb(128 24 32 / 18%); }
.button.primary:hover:not(:disabled) { color: white; border-color: var(--color-red-dark); background: var(--color-red-dark); }
.button.secondary { color: var(--color-ink); background: transparent; }
.button.secondary:hover:not(:disabled) { border-color: var(--color-red); background: white; }
.button.danger { color: var(--color-danger); border-color: #e8b6b1; background: #fff8f7; }
.button.small { min-height: 2.5rem; padding: .5rem .8rem; border-radius: .7rem; font-size: .87rem; }
.button.wide { width: 100%; }

.link-button {
    padding: 0;
    color: var(--color-red-dark);
    border: 0;
    background: none;
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: .2em;
    cursor: pointer;
}
.inline-form { display: inline; }

/* Shared content surfaces and system messages */
.panel {
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-xs);
}
.panel > :first-child { margin-top: 0; }

.alert {
    margin: 1rem 0;
    padding: .9rem 1rem;
    border: 1px solid;
    border-radius: var(--radius-sm);
    font-size: .93rem;
    font-weight: 650;
}
.alert.warning { color: #68400b; border-color: #e8c875; background: #fff7df; }
.alert.error { color: #7a2019; border-color: #e5aaa5; background: #fff1ef; }
.alert.success { color: #155d4d; border-color: #9fd8ca; background: #ecf9f5; }

.loading { color: var(--color-muted); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .48; } }
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
    min-height: 18rem;
    display: grid;
    place-items: center;
    align-content: center;
    padding: 3rem 1.5rem;
    border: 1px dashed var(--color-line-strong);
    border-radius: var(--radius-lg);
    background: rgb(255 255 255 / 58%);
    text-align: center;
}
.empty-state > * { max-width: 36rem; }
.empty-state h1, .empty-state h2 { margin-bottom: .5rem; }

/* Forms */
.form-stack { display: grid; gap: 1rem; }
.form-stack label,
.form-field,
.inline-edit-form label { display: grid; gap: .4rem; color: var(--color-ink-soft); font-size: .88rem; font-weight: 800; }

input, textarea, select {
    width: 100%;
    min-height: var(--control-height);
    padding: .65rem .8rem;
    color: var(--color-ink);
    border: 1px solid #baa998;
    border-radius: var(--radius-xs);
    background: white;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
textarea { min-height: 6.5rem; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--color-red); box-shadow: 0 0 0 3px rgb(180 35 45 / 10%); }
select {
    appearance: none;
    padding-right: 2.8rem;
    background-color: white;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--color-red) 50%),
        linear-gradient(135deg, var(--color-red) 50%, transparent 50%),
        linear-gradient(to right, var(--color-line), var(--color-line));
    background-position:
        calc(100% - 1.15rem) calc(50% - .1rem),
        calc(100% - .82rem) calc(50% - .1rem),
        calc(100% - 2.15rem) 50%;
    background-repeat: no-repeat;
    background-size: .34rem .34rem, .34rem .34rem, 1px 60%;
    cursor: pointer;
}
select:hover { border-color: #9c8873; background-color: #fffdf9; }
select:disabled { color: #8e867e; background-color: #f0ede8; cursor: not-allowed; }
select option { color: var(--color-ink); background: white; }

input[type="date"], input[type="time"], input[type="datetime-local"] { color-scheme: light; cursor: pointer; }
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    width: 1.25rem;
    height: 1.25rem;
    margin: -.15rem;
    padding: .35rem;
    border-radius: .45rem;
    background-color: var(--color-cream-soft);
    cursor: pointer;
}

input[type="checkbox"], input[type="radio"] {
    width: 1.15rem;
    height: 1.15rem;
    min-height: 1.15rem;
    flex: 0 0 auto;
    appearance: none;
    padding: 0;
    border: 1.5px solid #9e8e7e;
    background-color: white;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
}
input[type="radio"] { border-radius: 50%; }
input[type="radio"]:checked { border: .3rem solid var(--color-red); background: white; }
input[type="checkbox"] { border-radius: .32rem; }
input[type="checkbox"]:checked {
    border-color: var(--color-red);
    background-color: var(--color-red);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.3' d='m3.2 8.2 3 3.1 6.6-7'/%3E%3C/svg%3E");
    background-size: .85rem;
}
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: .5; cursor: not-allowed; }

.check-row { display: flex !important; align-items: center; gap: .6rem !important; font-weight: 700 !important; }
.check-row input { width: 1.15rem; min-height: 1.15rem; flex: 0 0 auto; }
.check-group { display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-columns.three { grid-template-columns: repeat(3, 1fr); }
.validation-message, .validation-summary-errors { color: var(--color-danger); font-size: .86rem; }
.validation-summary-errors ul { margin-block: .25rem; padding-left: 1.15rem; }

/* Shared order and pricing patterns */
.order-item-row { display: flex; justify-content: space-between; gap: 1.25rem; padding: .9rem 0; border-bottom: 1px solid var(--color-line); }
.order-item-row > div { min-width: 0; display: grid; gap: .15rem; }
.order-item-row small { color: var(--color-muted); line-height: 1.5; }
.order-item-row > span { flex: 0 0 auto; font-weight: 800; }
.totals { margin-top: 1rem; }
.totals > div { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; }
.totals.compact { padding-top: .7rem; border-top: 0; border-radius: 0; box-shadow: none; }
.totals .total { margin-top: .55rem; padding-top: .8rem; border-top: 1px solid var(--color-line); font-size: 1.13rem; }
.estimate { padding: .8rem; color: #164f46; border-radius: var(--radius-xs); background: #eaf7f3; }
.price-notice { color: #68400b; font-weight: 700; }

.quantity-control { display: flex; align-items: center; gap: .25rem; padding: .2rem; border: 1px solid var(--color-line-strong); border-radius: 999px; }
.quantity-control button {
    width: 2.35rem;
    height: 2.35rem;
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--color-ink);
    border: 0;
    border-radius: 50%;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
}
.quantity-control button:hover:not(:disabled) { background: var(--color-cream-soft); }
.quantity-control button:disabled { opacity: .35; cursor: not-allowed; }
.quantity-control label { display: grid; place-items: center; flex: 0 0 auto; }
.quantity-control input {
    width: 3rem;
    min-height: 2.25rem;
    padding: .25rem;
    border: 0;
    background: transparent;
    text-align: center;
    font-variant-numeric: tabular-nums;
    box-shadow: none;
    appearance: textfield;
    -moz-appearance: textfield;
}
.quantity-control input::-webkit-outer-spin-button,
.quantity-control input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }

/* Staff workspace shared language */
.staff-page { width: min(100%, 100rem); margin-inline: auto; padding: clamp(1.25rem, 3vw, 2rem); }
.staff-page h1 { font-family: var(--font-body); font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.045em; }
.staff-page h2, .staff-page h3 { font-family: var(--font-body); letter-spacing: -.025em; }
.staff-page > .button.primary { margin-bottom: 1.25rem; }
.staff-shell .button { border-radius: .7rem; }
.staff-shell .panel { border-radius: var(--radius-sm); box-shadow: none; }

.admin-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.admin-card {
    min-height: 9rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1.4rem;
    color: var(--color-ink);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
    background: white;
    text-decoration: none;
    transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.admin-card:hover { color: var(--color-ink); border-color: var(--color-red); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.admin-card strong { font-size: 1.08rem; }
.admin-card-icon { width: 3.1rem; height: 3.1rem; display: grid; place-items: center; color: var(--color-red); border-radius: .8rem; background: var(--color-cream); font-size: 1.55rem; line-height: 1; }
.admin-card-copy { min-width: 0; display: grid; gap: .4rem; }
.admin-card-copy > span { color: var(--color-muted); font-size: .94rem; line-height: 1.45; }

.admin-section { margin-top: 2.5rem; }
.admin-form { max-width: 65rem; margin-block: 1.25rem; }
.form-list { margin-top: 1rem; }
.inline-edit-form { display: grid; grid-template-columns: repeat(5, minmax(7rem, 1fr)) auto; align-items: end; gap: .75rem; margin-bottom: .75rem; }
.inline-edit-form textarea { min-height: var(--control-height); }
.inline-edit-form .validation-summary-errors { grid-column: 1 / -1; }
.compact-form { margin: .4rem 0; padding: .75rem; border-radius: .7rem; background: #faf6ef; }
.new-row { border: 1px dashed var(--color-red); }
.option-list { margin: -.25rem 0 1.5rem 1.5rem; }

.image-admin-field { display: grid; gap: .8rem; padding: 1rem; border: 1px solid var(--color-line); border-radius: .7rem; }
.image-admin-field legend { padding-inline: .35rem; font-weight: 850; }
.image-admin-field img { width: min(100%, 24rem); max-height: 15rem; border-radius: .7rem; object-fit: cover; }

.admin-table-wrap { overflow-x: auto; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: white; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--color-line); vertical-align: middle; }
.admin-table th { color: var(--color-muted); background: #f8f5ef; font-size: .76rem; letter-spacing: .09em; text-transform: uppercase; }
.admin-table td > small { display: block; color: var(--color-muted); }
.admin-table tbody tr { transition: background var(--transition-fast); }
.admin-table tbody tr:hover { background: #fffaf0; }
.admin-table tr.inactive { opacity: .58; }
.table-actions { text-align: right !important; }
.table-actions-inner { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .4rem; }

.badge { display: inline-flex; align-items: center; width: max-content; padding: .28rem .65rem; border-radius: 999px; font-size: .76rem; font-weight: 900; letter-spacing: .035em; text-transform: uppercase; }
.badge.success { color: #155d4d; background: #dff4ed; }
.badge.muted { color: #5f554e; background: #eee8e2; }
.badge.new { color: #7a2c12; background: #ffdfcf; }
.badge.status-received, .badge.status-awaiting-payment { color: #74520b; background: #fff0bf; }
.badge.status-preparing { color: #883f09; background: #fee4ca; }
.badge.status-ready { color: #155d4d; background: #dff4ed; }
.badge.status-out-for-delivery { color: #5b3c8d; background: #eee5ff; }
.badge.status-completed { color: #4e5653; background: #e8ecea; }
.badge.status-cancelled { color: #8f1821; background: #fde1e3; }

.detail-header { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.detail-header div { display: grid; gap: .2rem; }
.detail-header span { color: var(--color-muted); font-size: .7rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.status-actions { margin: 1rem 0; }

.order-filters { margin-top: 1.5rem; }
.order-filters h2 { font-size: 1rem; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(7.5rem, 1fr)) auto; align-items: end; gap: .75rem; }
.filter-grid label { display: grid; gap: .35rem; color: var(--color-ink-soft); font-size: .85rem; font-weight: 850; }
.filter-grid .search-field { grid-column: span 2; }
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }

.destructive-confirmation { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.destructive-confirmation p { margin: .25rem 0 0; }
.schedule-day { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--color-line); }
.schedule-edit { display: grid; grid-template-columns: 8rem auto 8rem 4rem auto auto; align-items: center; gap: .45rem; margin-bottom: .5rem; }
.schedule-edit input { min-height: 2.3rem; padding: .35rem .45rem; }
.icon-button { width: 2.75rem; height: 2.75rem; display: inline-grid; place-items: center; padding: 0; color: var(--color-danger); border: 0; border-radius: 50%; background: white; font-size: 1.05rem; cursor: pointer; }
.simple-list > div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--color-line); }

.timeline { margin: 0; padding: .25rem 0 0 1.2rem; border-left: 2px solid var(--color-line); list-style: none; }
.timeline li { position: relative; display: grid; padding: 0 0 1.3rem 1.25rem; }
.timeline li::before { position: absolute; top: .35rem; left: -.43rem; width: .72rem; height: .72rem; border: 2px solid white; border-radius: 50%; background: var(--color-red); box-shadow: 0 0 0 1px var(--color-line-strong); content: ""; }
.timeline time, .timeline small { color: var(--color-muted); font-size: .82rem; }

#blazor-error-ui {
    position: fixed;
    z-index: 1000;
    inset: auto 1rem 1rem;
    display: none;
    padding: 1rem;
    color: #48140f;
    border: 1px solid #e5aaa5;
    border-radius: .7rem;
    background: #fff1ef;
    box-shadow: var(--shadow-md);
}
#blazor-error-ui .dismiss { float: right; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; background: none; cursor: pointer; }

@media (max-width: 980px) {
    .admin-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inline-edit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-header { grid-template-columns: 1fr 1fr; }
    .form-columns.three { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    :root { --header-height: 4.25rem; --page-gutter: 1rem; }
    h1 { font-size: clamp(2.55rem, 13vw, 4rem); }
    .form-columns, .admin-card-grid { grid-template-columns: 1fr; }
    .admin-card { min-height: 7.75rem; }
    .inline-edit-form, .filter-grid { grid-template-columns: 1fr; }
    .filter-grid .search-field { grid-column: auto; }
    .detail-header { grid-template-columns: 1fr 1fr; }
    .option-list { margin-left: 0; }
    .schedule-day { grid-template-columns: 1fr; }
    .schedule-edit { grid-template-columns: 1fr auto 1fr; }
    .schedule-edit label:nth-of-type(3) { display: none; }
    .destructive-confirmation { align-items: stretch; flex-direction: column; }
    .admin-table-wrap { overflow: visible; border: 0; background: transparent; }
    .admin-table, .admin-table tbody { display: grid; gap: .75rem; }
    .admin-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .admin-table tr { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .85rem 1rem; padding: 1rem; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: white; }
    .admin-table th, .admin-table td { min-width: 0; display: grid; align-content: start; gap: .25rem; padding: 0; border: 0; overflow-wrap: anywhere; }
    .admin-table td::before { color: var(--color-muted); font-size: .62rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; content: attr(data-label); }
    .admin-table td:first-child, .admin-table .table-actions, .admin-table .table-detail-row td { grid-column: 1 / -1; }
    .admin-table .table-actions { padding-top: .25rem; border-top: 1px solid var(--color-line); text-align: left !important; }
    .admin-table .table-actions::before { width: 100%; }
    .admin-table .table-actions-inner { justify-content: flex-start; }
    .admin-table .table-detail-row { display: block; }
}

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

@media print {
    .no-print, .site-header, .site-footer { display: none !important; }
    .staff-content { margin-left: 0 !important; }
    body { color: black !important; background: white !important; }
    .panel { border-color: #bbb; box-shadow: none; }
}

/* Keep dense forms and long customer text usable at every width. */
[hidden] { display: none !important; }
input, select, textarea, fieldset, .form-stack label, .form-field, .inline-edit-form label { min-width: 0; }
address, .order-item-row, .totals, .timeline, .badge, .alert, .button, .simple-list { overflow-wrap: anywhere; }
.totals > div > :last-child { flex-shrink: 0; }
.badge { max-width: 100%; }
button:disabled, .link-button:disabled { cursor: not-allowed; opacity: .55; }
input.invalid, select.invalid, textarea.invalid, [aria-invalid="true"] { border-color: var(--color-danger); background-color: #fff8f7; }
.skip-link { position: fixed; z-index: 1100; top: .5rem; left: 1rem; transform: translateY(-200%); padding: .75rem 1rem; color: white; border-radius: .5rem; background: var(--color-green); }
.skip-link:focus { transform: translateY(0); color: white; }
#main-content:focus { outline: none; }
body:has(.configuration-dialog) { overflow: hidden; }
body:has(.staff-modal-backdrop) { overflow: hidden; }
.staff-page > .alert { position: sticky; z-index: 35; top: 1rem; box-shadow: var(--shadow-sm); }
.staff-page > .alert[role="alertdialog"]:focus { outline: 3px solid var(--color-red); }
.staff-sidebar { overflow-y: auto; }
.disclosure-help { margin-block: 1rem; color: var(--color-muted); font-size: .9rem; }
.disclosure-help summary { width: fit-content; padding-block: .5rem; color: var(--color-ink-soft); font-weight: 750; cursor: pointer; }
.disclosure-help p { max-width: 65ch; margin-block: .5rem; }
.inline-confirmation { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .85rem; border: 1px solid #e8c875; border-radius: .6rem; background: #fff7df; }
.inline-confirmation p { flex: 1 1 15rem; margin: 0; }
@media (max-width: 900px) {
    .staff-page > .alert { top: 7.5rem; }
}
@media (max-width: 620px) {
    input, textarea, select { font-size: 1rem; }
    .button.small, .icon-button, .quantity-control button { min-height: 2.75rem; }
    .icon-button { min-width: 2.75rem; }
    .quantity-control button { width: 2.75rem; }
    .cart-line-links a, .cart-line-links .link-button, .summary-actions a, .summary-actions .link-button { min-height: 2.75rem; display: inline-flex; align-items: center; }
}
body:has(.calendar-popover) { overflow: hidden; }
