/* Hallmark · shape: app screen · genre: modern-minimal · theme: Coral (deal 1/3, seed thecatalog-upload-excel-csv-ec39·f6d3c192·2026-12-06·r0)
 * nav: the merchant's header, a sticky search and filter bar, a sticky cart bar · signature: the order sheet (every item a line with its own quantity box) · states: loading, empty, error, full
 * axes: light/grotesk-sans/warm · posture: restrained · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P2 H2 E2 S2 R2 V2 · weakest: S, the merchant's brand colour only fills primary actions and the cart count */
@import url("./tokens-app.css");
@import url("./base.css");
@import url("./fonts.css");
@import url("./ui.css");

:root {
  --brand: var(--color-board);
  --brand-ink: var(--color-board-type);
  --bar-h: 56px;
  --page-max: 1320px;
  --control-h: 40px;
  --color-ok: oklch(48% 0.11 150);
  --color-warn: oklch(52% 0.12 70);
  --color-warn-soft: oklch(96% 0.045 85);
  --color-wa: oklch(52% 0.13 152);
  --color-wa-ink: oklch(99% 0.01 150);
  --color-overlay: oklch(21% 0.012 38 / 0.42);
  --font-figure: var(--font-outlier);
}

body.store { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: var(--page-max); margin-inline: auto; padding-inline: var(--space-lg); }
@media (max-width: 40rem) { .wrap { padding-inline: var(--space-md); } }
.fig { font-family: var(--font-figure); font-variant-numeric: tabular-nums; }
.muted { color: var(--color-muted); }
.small { font-size: var(--text-sm); }
.xs { font-size: var(--text-xs); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; }
a.link { color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-rule-2); }
a.link:hover { text-decoration-color: var(--color-accent-2); }

/* ---------------------------------------------------------------- banners + header */
.preview-bar { background: var(--color-board); color: var(--color-board-type); font-size: var(--text-sm); }
.preview-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm); padding-block: 10px; }
.preview-bar a.btn { min-height: 34px; }
.shop-head { background-color: var(--color-desk); background-image: radial-gradient(90% 140% at 0% 20%, var(--color-cotton), transparent 65%), var(--tex-desk); border-bottom: 1px solid var(--color-rule); }
.shop-head .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-md) var(--space-lg); padding-block: var(--space-lg); align-items: start; }
.shop-id { display: flex; gap: var(--space-md); align-items: center; min-width: 0; }
.shop-logo { max-height: 56px; max-width: 160px; width: auto; border-radius: 6px; flex: none; }
.shop-id h1 { font-size: var(--text-2xl); max-width: none; }
.shop-id .by { font-size: var(--text-sm); color: var(--color-muted); margin-top: 2px; }
.shop-intro { grid-column: 1 / -1; max-width: 72ch; font-size: var(--text-sm); color: var(--color-ink-2); white-space: pre-line; }
.shop-contact { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.shop-who { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; font-size: var(--text-sm); }
@media (max-width: 48rem) { .shop-head .wrap { grid-template-columns: minmax(0, 1fr); } .shop-contact { justify-content: flex-start; } }
body.embed .shop-head .wrap { padding-block: var(--space-md); }

/* ---------------------------------------------------------------- controls */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--control-h); padding: 0 16px; border: 0; border-radius: var(--radius-stock); font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer; color: var(--color-print); background-color: var(--color-cotton); background-image: var(--tex-cotton); box-shadow: var(--edge-stock), var(--cast-stock); transition: transform var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out); }
.btn:hover { transform: translateY(-1px); box-shadow: var(--edge-stock), var(--cast-stock-lift); }
.btn:active { transform: translateY(1px); box-shadow: var(--edge-stock); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.btn--brand { background: var(--brand); background-image: none; color: var(--brand-ink); box-shadow: var(--cast-stock); }
.btn--ghost { background: transparent; background-image: none; box-shadow: none; }
.btn--ghost:hover { background: var(--color-paper-2); box-shadow: none; transform: none; }
.btn--wa { background: var(--color-wa); background-image: none; color: var(--color-wa-ink); box-shadow: var(--cast-stock); }
.btn--sm { min-height: 32px; padding: 0 12px; font-size: var(--text-xs); }
.btn--lg { min-height: 50px; padding: 0 22px; font-size: var(--text-md); }
.btn--block { width: 100%; }
.btn--icon { padding: 0; width: var(--control-h); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn.is-busy { color: transparent; pointer-events: none; }
.btn.is-busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--color-muted); border-right-color: transparent; animation: spin 0.7s linear infinite; }
.btn--brand.is-busy::after, .btn--wa.is-busy::after { border-color: var(--brand-ink); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.input, .select, .textarea { width: 100%; min-height: var(--control-h); padding: 8px 12px; border: 1px solid var(--color-rule-2); border-radius: var(--radius-input); background: var(--color-cotton); color: var(--color-ink); font-size: var(--text-md); }
@media (min-width: 48rem) { .input, .select, .textarea { font-size: var(--text-sm); } }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--color-focus); box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-focus) 18%, transparent); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--color-error); }
.select { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--color-muted) 50%), linear-gradient(135deg, var(--color-muted) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.textarea { min-height: 80px; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: var(--text-sm); font-weight: 500; }
.field .opt { font-weight: 400; color: var(--color-muted); }
.error-text { font-size: var(--text-xs); color: var(--color-error); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--text-sm); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.tag { display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 0 8px; border-radius: var(--radius-pill); border: 1px solid var(--color-rule-2); font-size: var(--text-xs); font-weight: 500; color: var(--color-ink-2); background: var(--color-cotton); white-space: nowrap; }
.tag--warn { color: var(--color-warn); border-color: color-mix(in oklab, var(--color-warn) 45%, transparent); background: var(--color-warn-soft); }
.tag--out { color: var(--color-muted); border-style: dashed; }
.tag--ok { color: var(--color-ok); border-color: color-mix(in oklab, var(--color-ok) 45%, transparent); }
.tag--deal { color: var(--color-paid); border-color: color-mix(in oklab, var(--color-paid) 40%, transparent); }

/* ---------------------------------------------------------------- toolbar */
.toolbar { position: sticky; top: 0; z-index: var(--z-sticky); background: color-mix(in oklab, var(--color-paper) 94%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--color-rule); }
.toolbar .wrap { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; padding-block: 10px; }
.search { position: relative; flex: 1 1 260px; min-width: 0; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--color-muted); pointer-events: none; }
.search .input { padding-left: 36px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--color-paper-2); box-shadow: var(--press-groove); }
.seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--color-muted); font-size: var(--text-sm); font-weight: 500; cursor: pointer; transition: background-color var(--dur-micro), color var(--dur-micro); }
.seg button[aria-pressed="true"] { background: var(--color-cotton); color: var(--color-ink); box-shadow: var(--edge-stock); }
.seg button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-block: 2px; flex-basis: 100%; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: var(--radius-pill); border: 1px solid var(--color-rule-2); background: var(--color-cotton); font-size: var(--text-sm); color: var(--color-ink-2); white-space: nowrap; cursor: pointer; transition: border-color var(--dur-micro), background-color var(--dur-micro); }
.chip:hover { border-color: var(--color-muted); }
.chip[aria-pressed="true"] { background: var(--color-board); border-color: var(--color-board); color: var(--color-board-type); }
.chip:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.chip .fig { font-size: var(--text-xs); opacity: 0.75; }

/* ---------------------------------------------------------------- products */
main.shop { flex: 1; padding-block: var(--space-lg) calc(var(--space-3xl) + 40px); }
.result-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-xs); margin-bottom: var(--space-md); font-size: var(--text-sm); color: var(--color-muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: var(--space-md); }
@media (max-width: 40rem) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm); } }
.card { display: flex; flex-direction: column; min-width: 0; border-radius: var(--radius-card); background-color: var(--color-cotton); background-image: var(--tex-cotton); box-shadow: var(--edge-stock), var(--cast-stock); overflow: hidden; }
.card-img { position: relative; aspect-ratio: 1; background: var(--color-paper-2); display: grid; place-items: center; color: var(--color-muted); border: 0; padding: 0; cursor: pointer; width: 100%; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
.card-img .tag { position: absolute; left: 8px; top: 8px; }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; flex: 1; }
.card-brand { font-size: var(--text-xs); color: var(--color-muted); }
.card-title { font-size: var(--text-sm); font-weight: 500; line-height: 1.3; border: 0; background: none; padding: 0; text-align: left; color: var(--color-ink); cursor: pointer; overflow-wrap: anywhere; }
.card-title:hover { text-decoration: underline; text-decoration-color: var(--color-rule-2); }
.card-meta { font-size: var(--text-xs); color: var(--color-muted); overflow-wrap: anywhere; }
.price { font-family: var(--font-figure); font-size: var(--text-md); font-variant-numeric: tabular-nums; color: var(--color-ink); }
.price s { color: var(--color-muted); font-size: var(--text-xs); margin-left: 6px; }
.price .unit { font-family: var(--font-body); font-size: var(--text-xs); color: var(--color-muted); margin-left: 4px; }
.price-note { font-size: var(--text-xs); color: var(--color-muted); }
.card-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rules { font-size: var(--text-xs); color: var(--color-muted); }
.yours { font-size: var(--text-xs); color: var(--color-paid); font-weight: 500; }

.stepper { display: inline-flex; align-items: stretch; border-radius: var(--radius-stock); background: var(--color-cotton); box-shadow: var(--edge-stock); overflow: hidden; height: 36px; }
.stepper button { width: 34px; border: 0; background: transparent; color: var(--color-ink); cursor: pointer; display: grid; place-items: center; transition: background-color var(--dur-micro); }
.stepper button:hover { background: var(--color-paper-2); }
.stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.stepper button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
.stepper input { width: 52px; border: 0; border-inline: 1px solid var(--color-rule); text-align: center; font-family: var(--font-figure); font-size: var(--text-sm); background: transparent; color: var(--color-ink); -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; background: var(--color-paper-2); }
.stepper.is-on { box-shadow: 0 0 0 1.5px var(--brand); }
.add-btn { height: 36px; }

.list { display: grid; gap: var(--space-xs); }
.list-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--space-md); align-items: center; padding: 10px 14px; border-radius: var(--radius-card); background-color: var(--color-cotton); background-image: var(--tex-cotton); box-shadow: var(--edge-stock); }
.list-row .thumb { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; background: var(--color-paper-2); border: 0; padding: 0; cursor: pointer; display: grid; place-items: center; color: var(--color-muted); }
.list-row .thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.list-main { min-width: 0; display: grid; gap: 2px; }
.list-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
@media (max-width: 40rem) { .list-row { grid-template-columns: 52px minmax(0, 1fr); } .list-row .thumb { width: 52px; height: 52px; } .list-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; } }

.sheet-wrap { border-radius: var(--radius-card); background: var(--color-cotton); box-shadow: var(--edge-stock), var(--cast-stock); overflow-x: auto; }
.sheet { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.sheet th { text-align: left; font-weight: 500; font-size: var(--text-xs); color: var(--color-muted); padding: 10px 12px; border-bottom: 1px solid var(--color-rule-2); white-space: nowrap; position: sticky; top: 0; background: var(--color-cotton); z-index: 1; }
.sheet td { padding: 8px 12px; border-bottom: 1px solid var(--color-rule); vertical-align: middle; }
.sheet .num { text-align: right; font-family: var(--font-figure); white-space: nowrap; }
.sheet th.num { font-family: var(--font-body); }
.sheet tr.cat td { background: var(--color-paper-2); font-weight: 600; font-size: var(--text-xs); color: var(--color-ink-2); padding-block: 6px; }
.sheet tr.has-qty td { background: color-mix(in oklab, var(--brand) 6%, var(--color-cotton)); }
.sheet .t { font-weight: 500; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: var(--color-ink); }
.sheet .t:hover { text-decoration: underline; }
.sheet .v { font-size: var(--text-xs); color: var(--color-muted); }
.sheet .stepper { height: 32px; }
.sheet .stepper button { width: 30px; }
.sheet .stepper input { width: 48px; }
@media (max-width: 40rem) { .sheet .hide-sm { display: none; } }

.more { display: flex; justify-content: center; margin-top: var(--space-lg); }
.empty { text-align: center; padding: var(--space-2xl) var(--space-md); }
.empty h2 { font-size: var(--text-xl); margin: 0 auto var(--space-xs); }
.empty p { color: var(--color-muted); margin: 0 auto; max-width: 44ch; }
.skel { display: block; border-radius: 6px; background: linear-gradient(90deg, var(--color-paper-2), var(--color-paper-3), var(--color-paper-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-card { height: 300px; border-radius: var(--radius-card); }

/* ---------------------------------------------------------------- cart bar */
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sticky); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: var(--color-board); color: var(--color-board-type); transform: translateY(110%); transition: transform var(--dur-short) var(--ease-out); }
.cartbar.is-on { transform: none; }
.cartbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); }
.cartbar .sum { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cartbar .sum strong { font-family: var(--font-figure); font-size: var(--text-lg); }
.cartbar .sum span { font-size: var(--text-xs); opacity: 0.8; }
.cartbar .btn--brand { box-shadow: none; }
.meter { height: 4px; border-radius: 4px; background: color-mix(in oklab, var(--color-board-type) 22%, transparent); overflow: hidden; width: min(220px, 40vw); }
.meter > span { display: block; height: 100%; width: 100%; background: var(--color-accent); transform: scaleX(0); transition: transform var(--dur-short) var(--ease-out); transform-origin: left; }

/* ---------------------------------------------------------------- dialogs + drawer */
dialog.dlg { width: min(720px, calc(100vw - 16px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 14px; background: var(--color-cotton); color: var(--color-ink); box-shadow: var(--edge-stock), 0 24px 60px -12px oklch(var(--shade) / 0.35); }
dialog.dlg::backdrop { background: var(--color-overlay); }
dialog.dlg[open] { display: flex; flex-direction: column; animation: dlg-in var(--dur-short) var(--ease-out); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(12px); } }
dialog.drawer { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(520px, 100vw); border-radius: 0; animation-name: drawer-in; }
@keyframes drawer-in { from { transform: translateX(24px); opacity: 0; } }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--color-rule); }
.dlg-head h2 { font-size: var(--text-lg); max-width: none; }
.dlg-body { padding: var(--space-lg); overflow-y: auto; flex: 1; }
.dlg-foot { padding: var(--space-md) var(--space-lg) calc(var(--space-md) + env(safe-area-inset-bottom)); border-top: 1px solid var(--color-rule); background: var(--color-paper); display: grid; gap: 8px; }
@media (max-width: 40rem) { .dlg-body { padding: var(--space-md); } .dlg-head, .dlg-foot { padding-inline: var(--space-md); } }

.pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-lg); }
@media (max-width: 48rem) { .pd { grid-template-columns: minmax(0, 1fr); } }
.pd-main { aspect-ratio: 1; border-radius: var(--radius-card); background: var(--color-paper-2); overflow: hidden; display: grid; place-items: center; color: var(--color-muted); }
.pd-main img { width: 100%; height: 100%; object-fit: contain; background: var(--color-cotton); }
.pd-thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pd-thumbs button { width: 56px; height: 56px; border-radius: 6px; padding: 0; border: 1px solid var(--color-rule-2); background: var(--color-paper-2); overflow: hidden; cursor: pointer; }
.pd-thumbs button[aria-pressed="true"] { border-color: var(--color-ink); box-shadow: 0 0 0 1px var(--color-ink); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-info { display: grid; gap: var(--space-sm); align-content: start; min-width: 0; }
.pd-info h3 { font-size: var(--text-xl); line-height: 1.15; }
.pd-desc { font-size: var(--text-sm); white-space: pre-line; color: var(--color-ink-2); }
.pd-specs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; font-size: var(--text-sm); margin: 0; }
.pd-specs dt { color: var(--color-muted); }
.pd-specs dd { margin: 0; overflow-wrap: anywhere; }
.tier-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.tier-table td { padding: 6px 0; border-bottom: 1px solid var(--color-rule); }
.tier-table .num { text-align: right; font-family: var(--font-figure); }
.var-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); margin-top: var(--space-md); }
.var-table th { text-align: left; font-weight: 500; font-size: var(--text-xs); color: var(--color-muted); padding: 8px 6px; border-bottom: 1px solid var(--color-rule-2); }
.var-table td { padding: 8px 6px; border-bottom: 1px solid var(--color-rule); vertical-align: middle; }
.var-table .num { text-align: right; font-family: var(--font-figure); white-space: nowrap; }

.line { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--color-rule); }
.line:first-child { padding-top: 0; }
.line img, .line .ph { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; background: var(--color-paper-2); }
.line .lt { font-size: var(--text-sm); font-weight: 500; overflow-wrap: anywhere; }
.line .lv { font-size: var(--text-xs); color: var(--color-muted); }
.line .lerr { font-size: var(--text-xs); color: var(--color-error); }
.line .lside { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.line .ltot { font-family: var(--font-figure); font-size: var(--text-sm); }
.line .rm { border: 0; background: none; color: var(--color-muted); font-size: var(--text-xs); cursor: pointer; text-decoration: underline; padding: 0; }
.totals { display: grid; gap: 6px; font-size: var(--text-sm); }
.totals .row { display: flex; justify-content: space-between; gap: var(--space-md); }
.totals .row .fig { text-align: right; }
.totals .total { font-size: var(--text-lg); font-weight: 600; padding-top: 8px; border-top: 1px solid var(--color-rule-2); }
.nudge { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: var(--radius-card); background: var(--color-paper-2); font-size: var(--text-sm); }
.nudge--warn { background: var(--color-warn-soft); }
.progress { height: 6px; border-radius: 6px; background: var(--color-paper-3); overflow: hidden; }
.progress > span { display: block; height: 100%; width: 100%; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-short) var(--ease-out); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 40rem) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.done-mark { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--color-paper-2); color: var(--color-paid); margin-bottom: var(--space-sm); }
.done-mark .icon { width: 28px; height: 28px; }
.order-card { padding: 12px 14px; border-radius: var(--radius-card); background: var(--color-paper); box-shadow: var(--edge-stock); display: grid; gap: 6px; }
.order-card + .order-card { margin-top: var(--space-sm); }
.gate { max-width: 440px; margin: var(--space-2xl) auto; padding: var(--space-xl); border-radius: 12px; background-color: var(--color-cotton); background-image: var(--tex-cotton); box-shadow: var(--edge-stock), var(--cast-stock); display: grid; gap: var(--space-md); }
.gate h2 { font-size: var(--text-xl); }
.notice { padding: 10px 12px; border-radius: var(--radius-card); background: var(--color-paper-2); font-size: var(--text-sm); }
.notice--error { background: color-mix(in oklab, var(--color-error) 10%, var(--color-cotton)); }
.toast-zone { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: var(--z-toast); display: grid; gap: 8px; width: min(92vw, 460px); pointer-events: none; }
.toast { pointer-events: auto; padding: 12px 16px; border-radius: var(--radius-card); background: var(--color-board); color: var(--color-board-type); font-size: var(--text-sm); box-shadow: var(--cast-stock-lift); animation: dlg-in var(--dur-short) var(--ease-out); }
.toast--error { background: var(--color-error); }

.shop-foot { border-top: 1px solid var(--color-rule); padding-block: var(--space-lg) calc(var(--space-lg) + 72px); font-size: var(--text-xs); color: var(--color-muted); }
.shop-foot .wrap { display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-lg); justify-content: space-between; align-items: center; }
.langs { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.langs a { color: var(--color-muted); text-decoration: none; }
.langs a:hover, .langs a[aria-current="true"] { color: var(--color-ink); text-decoration: underline; }
@media print { .toolbar, .cartbar, .shop-foot, .preview-bar { display: none !important; } }

/* fixes after the first visual pass */
.sheet .num .price-note, .sheet .num .price .unit { font-family: var(--font-body); }
.sheet .sm-price { display: none; margin-top: 4px; }
@media (max-width: 40rem) {
  .sheet .price-col { display: none; }
  .sheet .sm-price { display: block; }
  .sheet td { padding-inline: 8px; }
  .sheet .stepper button { width: 28px; }
  .sheet .stepper input { width: 40px; }
}
dialog.dlg { max-width: calc(100vw - 16px); }
dialog.drawer { max-width: 100vw; }
.line.noimg { grid-template-columns: minmax(0, 1fr) auto; }

/* seller card above the footer links: address and company numbers (with "Show my contact details") */
.shop-foot .shop-card { align-items: flex-start; justify-content: flex-start; gap: var(--space-sm) var(--space-xl, 48px); padding-bottom: var(--space-md); margin-bottom: var(--space-md); border-bottom: 1px solid var(--color-rule); font-size: var(--text-sm); color: var(--color-ink-2); }
.shop-card img { max-height: 40px; max-width: 140px; object-fit: contain; }
.shop-card strong { color: var(--color-ink); font-weight: 500; }
.shop-card .addr { white-space: pre-line; color: var(--color-muted); }
.shop-card dl { margin: 0; display: grid; gap: 2px; }
.shop-card dl div { display: flex; flex-wrap: wrap; gap: 0 6px; }
.shop-card dt { color: var(--color-muted); }
.shop-card dt::after { content: ":"; }
.shop-card dd { margin: 0; font-family: var(--font-figure); }

/* product window: variant photos, and the size grid for two options */
.vname { display: flex; align-items: center; gap: 10px; }
.vname .rules { display: block; }
.vthumb { flex: none; width: 40px; height: 40px; padding: 0; border: 1px solid var(--color-rule); border-radius: 6px; overflow: hidden; background: var(--color-paper-2); cursor: pointer; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vthumb:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.mx { display: grid; gap: var(--space-xs); margin-top: var(--space-md); }
.mx-wrap { overflow-x: auto; }
.mx-table { border-collapse: collapse; width: 100%; font-size: var(--text-sm); }
.mx-table th, .mx-table td { border: 1px solid var(--color-rule); padding: 6px 8px; text-align: center; vertical-align: middle; }
.mx-table thead th, .mx-table th[scope="row"] { background: var(--color-paper-2); font-weight: 500; white-space: nowrap; }
.mx-table th[scope="row"], .mx-table thead th:first-child { text-align: left; }
.mx-in input { width: 58px; height: 36px; text-align: center; border: 1px solid var(--color-rule-2); border-radius: 8px; font-family: var(--font-figure); font-size: var(--text-sm); background: var(--color-cotton); color: var(--color-ink); -moz-appearance: textfield; }
.mx-in input::-webkit-outer-spin-button, .mx-in input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mx-in input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; }
.mx-in.is-on input { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.mx-sub { margin-top: 2px; font-size: var(--text-xs); color: var(--color-muted); white-space: nowrap; }
.mx-none { color: var(--color-muted); }

/* past orders: every item can go back into the cart */
.order-items summary { cursor: pointer; color: var(--color-muted); margin-top: 2px; }
.order-items summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 4px; }
.order-items ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.order-items li { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: var(--text-sm); }
