/* Frugea B2B webshop UI. Every value comes from theme tokens (see theme.js).
   Responsive rules use container queries on #frame, so the device preview works without resizing the window. */

/* ============ base ============ */
#frame { container: app / inline-size; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: var(--t-base);
  line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
#frame *, #frame *::before, #frame *::after { box-sizing: border-box; }
#app { position: absolute; inset: 0; }
/* Resets use :where() so they carry no ID specificity and component classes always win */
:where(#frame) :is(h1, h2, h3, h4) { font-family: var(--font-heading); font-weight: var(--h-weight); letter-spacing: var(--h-tracking); margin: 0; line-height: 1.2; }
:where(#frame) h1 { font-size: var(--t-2xl); }
:where(#frame) h2 { font-size: var(--t-lg); }
:where(#frame) h3 { font-size: var(--t-md); }
:where(#frame) p { margin: 0; }
:where(#frame) a { color: inherit; text-decoration: none; }
:where(#frame) button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
:where(#frame) :is(input, select, textarea) { font: inherit; color: inherit; }
:where(#frame) :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; flex-shrink: 0; }
:where(#frame) ::selection { background: var(--primary-soft); color: var(--text); }
:where(#frame) mark { background: var(--accent-soft); color: var(--accent-soft-ink); border-radius: 3px; padding: 0 1px; }
:where(#frame) :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ic { display: block; flex-shrink: 0; }
.muted { color: var(--muted); }
.text { color: var(--text); }
.tiny { font-size: var(--t-xs); }
.small { font-size: var(--t-sm); }
.center { text-align: center; justify-content: center; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.r { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0; }
.big { font-size: var(--t-lg); font-weight: 800; font-family: var(--font-heading); }
.link { color: var(--primary-ink); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; }
.link:hover { text-decoration: underline; }
.eyebrow { font-size: var(--t-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px !important; }
.inline-ic { display: flex; align-items: center; gap: 6px; }
.ok-txt { color: var(--success-ink); font-weight: 600; }
.warn-txt { color: var(--warning-ink); font-weight: 600; }
.danger-txt { color: var(--danger-ink); font-weight: 600; }
.row-gap { display: flex; gap: var(--s2); flex-wrap: wrap; }
.row-gap.end { justify-content: flex-end; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: var(--s3); }
.stack-sm { display: flex; flex-direction: column; gap: var(--s2); }
.stack-lg { display: flex; flex-direction: column; gap: var(--s4); }
.main::-webkit-scrollbar { width: 10px; }
.main::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 35%, transparent); border-radius: 10px; border: 3px solid var(--bg); }

/* ============ requirement notes ============ */
.anno { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; margin: 0 6px; border-radius: 50%; vertical-align: middle; flex-shrink: 0;
  background: #FACC15; color: #422006; font: 800 11px/1 ui-sans-serif, system-ui, sans-serif; letter-spacing: 0; text-transform: none; cursor: help; z-index: 6;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, .32); animation: anno-pulse 2.4s infinite; }
.anno-pop { position: absolute; left: 50%; top: calc(100% + 10px); transform: translateX(-50%); width: 270px; padding: 10px 12px; border-radius: 10px; z-index: 100;
  background: #201B07; color: #FEF3C7; font: 500 12px/1.5 ui-sans-serif, system-ui, sans-serif; text-align: left; white-space: normal; box-shadow: 0 14px 30px rgba(0,0,0,.3);
  opacity: 0; visibility: hidden; transition: opacity .15s; pointer-events: none; }
.anno.up .anno-pop { top: auto; bottom: calc(100% + 10px); }
.anno:hover .anno-pop, .anno:focus .anno-pop { opacity: 1; visibility: visible; }
@keyframes anno-pulse { 50% { box-shadow: 0 0 0 6px rgba(250, 204, 21, .12); } }

/* ============ buttons ============ */
.btn { --h: var(--ctl-h); display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: var(--h); padding: 0 calc(var(--h) * .42);
  border-radius: var(--r-btn); border: 1px solid transparent !important; font-weight: 600; font-size: var(--t-sm); white-space: nowrap; line-height: 1; user-select: none;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .06s; cursor: pointer; text-decoration: none !important; }
.btn:active:not([disabled]) { transform: translateY(1px); }
.btn:focus-visible { outline: none !important; box-shadow: 0 0 0 3px var(--primary-ring); }
.btn-primary { background: var(--primary) !important; color: var(--on-primary) !important; }
.btn-primary:hover:not([disabled]) { background: var(--primary-hover) !important; }
.btn-accent { background: var(--accent) !important; color: var(--on-accent) !important; }
.btn-secondary { background: var(--surface) !important; border-color: var(--border) !important; color: var(--text) !important; }
.btn-secondary:hover:not([disabled]) { background: var(--surface-2) !important; }
.btn-soft { background: var(--primary-soft) !important; color: var(--primary-soft-ink) !important; }
.btn-soft:hover:not([disabled]) { background: color-mix(in srgb, var(--primary-soft) 82%, var(--primary)) !important; }
.btn-ghost { background: transparent !important; color: var(--text) !important; }
.btn-ghost:hover:not([disabled]) { background: var(--surface-2) !important; }
.btn-ghost.danger { color: var(--danger-ink) !important; }
.btn-wa { background: #128C7E !important; color: #fff !important; }
.btn-wa:hover { background: #0E7A6E !important; }
.btn-light { background: #fff !important; color: #141414 !important; }
.btn-sm { --h: var(--ctl-h-sm); font-size: var(--t-xs); padding: 0 calc(var(--h) * .36); }
.btn-lg { --h: var(--ctl-h-lg); font-size: var(--t-base); }
.btn-block { width: 100%; }
.btn-icon { width: var(--h); padding: 0 !important; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.fav-on { color: var(--danger) !important; }
.btn.fav-on svg { fill: currentColor; }
.icon-btn { position: relative; width: var(--ctl-h); height: var(--ctl-h); display: grid; place-items: center; border-radius: var(--r-ctl); color: inherit; transition: background-color .15s; }
.icon-btn:hover { background: var(--hover-bg, var(--surface-2)); }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--tb-bg, var(--surface)); }
.icon-btn .count, .nav-item .count, .tab-i .count { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; display: grid; place-items: center; line-height: 1; }
.icon-btn .count { position: absolute; top: 1px; right: 0; box-shadow: 0 0 0 2px var(--tb-bg, var(--surface)); }

/* ============ badges & chips ============ */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-badge); font-size: var(--t-xs); font-weight: 700; white-space: nowrap; line-height: 1; vertical-align: middle; }
.badge-new { background: var(--primary); color: var(--on-primary); }
.badge-offer { background: var(--accent); color: var(--on-accent); }
.badge-soft { background: var(--surface-2); color: var(--muted); }
.badge-glass { background: rgba(255, 255, 255, .18); color: inherit; backdrop-filter: blur(4px); height: 26px; padding: 0 10px; }
.badge.st::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.st:has(svg)::before { display: none; }
.st-received { background: var(--surface-2); color: var(--text); }
.st-process { background: var(--warning-soft); color: var(--warning-ink); }
.st-out { background: var(--info-soft); color: var(--info-ink); }
.st-delivered { background: var(--success-soft); color: var(--success-ink); }
.st-cancelled { background: var(--danger-soft); color: var(--danger-ink); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: var(--ctl-h-sm); padding: 0 var(--s3); border-radius: 999px; border: 1px solid var(--border) !important;
  background: var(--surface) !important; font-size: var(--t-sm); font-weight: 500; white-space: nowrap; color: var(--text); transition: .15s; }
.chip:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)) !important; }
.chip.on { background: var(--primary-soft) !important; color: var(--primary-soft-ink); border-color: color-mix(in srgb, var(--primary) 35%, transparent) !important; font-weight: 600; }
.chip.sm { height: 28px; font-size: var(--t-xs); padding: 0 10px; }
.doc-pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px !important; border-radius: var(--r-badge); border: 1px solid var(--border) !important; font-size: 11.5px; font-weight: 600; color: var(--text); background: var(--surface) !important; white-space: nowrap; }
.doc-pill:hover { border-color: var(--primary) !important; color: var(--primary-ink); }
.doc-pill.cn { color: var(--danger-ink); border-color: color-mix(in srgb, var(--danger) 35%, var(--border)) !important; }

/* ============ form controls ============ */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: var(--t-sm); font-weight: 600; display: flex; align-items: center; gap: 4px; }
.input, .select, .textarea { width: 100%; height: var(--ctl-h); padding: 0 var(--s3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-ctl);
  color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); outline: none !important; }
.textarea { height: auto; min-height: 92px; padding: var(--s3); resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 34px; cursor: pointer; width: auto;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.input-ic { position: relative; display: flex; align-items: center; }
.input-ic .input { padding-right: 44px; }
.input-ic.sm > .ic { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.input-ic.sm .input { padding: 0 var(--s3) 0 34px; width: 170px; }
.ii-btn { position: absolute; right: 6px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r-ctl); color: var(--muted); }
.ii-btn:hover { background: var(--surface-2); color: var(--text); }
.check { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-sm); padding: 5px 0; cursor: pointer; }
.check .n, .cat-list .n { margin-left: auto; color: var(--muted); font-size: var(--t-xs); font-variant-numeric: tabular-nums; }
.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
#frame .switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--border); transition: .2s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: .2s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(18px); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: calc(var(--r-ctl) + 2px); background: var(--surface-2); border: 1px solid var(--border); }
.seg button { height: calc(var(--ctl-h) - 8px); min-width: calc(var(--ctl-h) - 8px); display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 var(--s3);
  border-radius: max(2px, calc(var(--r-ctl) - 2px)); color: var(--muted); font-size: var(--t-sm); font-weight: 600; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.seg button[disabled] { opacity: .55; cursor: not-allowed; }
.seg.sm button { height: 24px; padding: 0 8px; font-size: var(--t-xs); min-width: 0; }
.seg-lg { display: flex; } .seg-lg button { flex: 1; height: calc(var(--ctl-h) - 2px); }
.stepper { display: inline-flex; align-items: center; height: var(--ctl-h); border: 1px solid var(--border); border-radius: var(--r-btn); background: var(--surface); overflow: hidden; flex-shrink: 0; }
.stepper button { width: calc(var(--ctl-h) - 6px); height: 100%; display: grid; place-items: center; color: var(--text); transition: background-color .12s; }
.stepper button:hover { background: var(--surface-2); }
.stepper input { width: 40px; height: 100%; text-align: center; border: 0; background: transparent; font-weight: 700; outline: none; font-variant-numeric: tabular-nums; padding: 0; }
.stepper.block { display: flex; width: 100%; } .stepper.block input { flex: 1; }
.stepper.sm { height: var(--ctl-h-sm); } .stepper.sm button { width: calc(var(--ctl-h-sm) - 4px); }
.stepper.lg { height: var(--ctl-h-lg); } .stepper.lg button { width: var(--ctl-h-lg); } .stepper.lg input { width: 48px; font-size: var(--t-md); }
.stepper.in-cart { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 30%, transparent); color: var(--primary-soft-ink); }
.stepper.in-cart button { color: var(--primary-soft-ink); }
.stepper.in-cart button:hover { background: color-mix(in srgb, var(--primary) 14%, transparent); }

/* ============ cards ============ */
.card { background: var(--surface); border-radius: var(--r-lg); padding: var(--s5); border: 1px solid transparent; min-width: 0; }
[data-card="bordered"] .card { border-color: var(--border); }
[data-card="elevated"] .card { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--border) 45%, transparent); }
[data-card="flat"] .card { background: var(--surface-2); }
[data-card="flat"] .card :is(.input, .select, .textarea, .stepper:not(.in-cart), .chip, .loc-radio, .date-chip, .choice, .pick, .doc-row, .loc-card, .pay-line, .doc-empty, .confirm-grid > div):not(.on) { background-color: var(--surface) !important; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.card-head.tight { margin-bottom: 0; align-items: center; }
.card-head p { font-size: var(--t-sm); color: var(--muted); margin-top: 3px; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s2); padding: var(--s10) var(--s5); }
.empty-ic { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary-soft-ink); margin-bottom: var(--s2); }
.empty .row-gap, .empty .btn { margin-top: var(--s3); }

/* product tiles (placeholder imagery, tinted by category) */
.thumb { width: 64px; height: 64px; flex-shrink: 0; display: grid; place-items: center; font-size: 30px; line-height: 1; border-radius: var(--r);
  background: hsl(var(--hue, 100) var(--tile-s) var(--tile-l)); }
.thumb.sm { width: 42px; height: 42px; font-size: 21px; border-radius: var(--r-sm); }
.thumb.xs { width: 30px; height: 30px; font-size: 16px; border-radius: var(--r-sm); }
.thumb.more { background: var(--surface-2); color: var(--muted); font-size: var(--t-xs); font-weight: 700; }

/* ============ shell ============ */
.shell { --sb-w: 264px; display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); height: 100%; }
[data-nav="top"] .shell { grid-template-columns: minmax(0, 1fr); }
[data-nav="top"] .sidebar { display: none; }
.sidebar { position: relative; z-index: 40; display: flex; flex-direction: column; gap: var(--s4); padding: var(--s5) var(--s4) var(--s4); min-height: 0;
  background: var(--chrome-bg); color: var(--chrome-text); border-right: 1px solid var(--chrome-border); --hover-bg: var(--chrome-hover); }
.sb-head { padding: 0 var(--s2); }
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-foot { margin-top: auto; }
.main { position: relative; overflow-y: auto; overflow-x: hidden; min-width: 0; display: flex; flex-direction: column; }
.content { flex: 1; width: 100%; max-width: 1340px; margin: 0 auto; padding: var(--s6) var(--s8) var(--s10); }
.app-foot { display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; padding: var(--s5) var(--s8) var(--s8); font-size: var(--t-xs); color: var(--muted); max-width: 1340px; width: 100%; margin: 0 auto; }
.app-foot a { cursor: pointer; } .app-foot a:hover { color: var(--text); }

.logo { display: inline-flex; align-items: center; gap: 9px; color: inherit; }
.logo-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: min(var(--r), 11px); background: var(--chrome-mark-bg, var(--primary)); color: var(--chrome-mark-text, var(--on-primary)); }
.logo-word { font-family: var(--font-heading); font-weight: 800; font-size: 21px; letter-spacing: -.03em; }
.logo-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; padding: 2px 6px; border-radius: 5px; border: 1px solid currentColor; opacity: .6; }

.nav-item { display: flex; align-items: center; gap: var(--s3); height: calc(var(--ctl-h) + 2px); padding: 0 var(--s3); border-radius: var(--r-ctl);
  color: var(--chrome-muted); font-weight: 500; font-size: var(--t-sm); position: relative; transition: background-color .15s, color .15s; white-space: nowrap; }
.nav-item:hover { background: var(--chrome-hover); color: var(--chrome-text); }
.nav-item.active { background: var(--chrome-active-bg); color: var(--chrome-active-text); font-weight: 650; }
.nav-item .count { margin-left: auto; }

.loc-picker { position: relative; }
.loc-btn { width: 100%; display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3) !important; border-radius: var(--r-ctl);
  border: 1px solid var(--chrome-border) !important; background: var(--chrome-hover) !important; text-align: left; color: inherit; transition: .15s; }
.loc-btn:hover { border-color: color-mix(in srgb, var(--chrome-text) 30%, transparent) !important; }
.loc-ic { width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--chrome-mark-bg, var(--primary)); color: var(--chrome-mark-text, var(--on-primary)); }
.loc-txt { flex: 1; min-width: 0; line-height: 1.25; }
.loc-txt small { display: block; font-size: 11px; color: var(--chrome-muted); }
.loc-txt b { display: block; font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-chev { color: var(--chrome-muted); transition: transform .2s; }
.loc-picker.open .loc-chev { transform: rotate(180deg); }
.loc-menu { position: absolute; top: calc(100% + 6px); left: 0; width: max(100%, 300px); z-index: 80; padding: var(--s2); border-radius: var(--r-lg);
  background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: pop .16s ease-out; }
.loc-menu-title { font-size: var(--t-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: var(--s2) var(--s2) var(--s1); }
.loc-opt { width: 100%; display: flex; align-items: center; gap: var(--s3); padding: var(--s2) !important; border-radius: var(--r-ctl); text-align: left; }
.loc-opt:hover { background: var(--surface-2) !important; }
.loc-opt .loc-ic { background: var(--surface-2); color: var(--muted); }
.loc-opt.on .loc-ic { background: var(--primary-soft); color: var(--primary-soft-ink); }
.loc-opt.on > .ic { color: var(--primary-ink); }
.loc-opt-txt { flex: 1; min-width: 0; }
.loc-opt-txt b { display: block; font-size: var(--t-sm); }
.loc-opt-txt small { display: block; font-size: var(--t-xs); color: var(--muted); }
.loc-menu-foot { display: flex; gap: 6px; align-items: flex-start; margin-top: var(--s1); padding: var(--s2); border-top: 1px solid var(--border); font-size: var(--t-xs); color: var(--muted); }
.loc-picker.in-topbar { display: none; }

.rep-mini { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s3); border-radius: var(--r-lg); background: var(--chrome-hover); border: 1px solid var(--chrome-border); }
.rep-top { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.rep-top .avatar .online { box-shadow: 0 0 0 2px var(--chrome-bg); width: 10px; height: 10px; right: 0; bottom: 0; }
.rep-txt { flex: 1; min-width: 0; line-height: 1.25; }
.rep-txt small { display: block; font-size: 11px; color: var(--chrome-muted); }
.rep-txt b { display: block; font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rep-act { height: 32px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: var(--r-btn); font-size: var(--t-xs); font-weight: 700;
  background: var(--chrome-mark-bg, var(--primary)); color: var(--chrome-mark-text, var(--on-primary)); transition: filter .15s; }
.rep-act:hover { filter: brightness(1.08); }
.rep-act.wa { background: #128C7E; color: #fff; }
.avatar { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary-soft-ink); font-size: 12px; font-weight: 800; letter-spacing: .02em; position: relative; }
.avatar.rep { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.avatar.xl { width: 54px; height: 54px; font-size: 17px; }
.avatar .online { position: absolute; right: 1px; bottom: 1px; width: 13px; height: 13px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px var(--surface); }

/* topbar */
.topbar { position: sticky; top: 0; z-index: 30; flex-shrink: 0; --tb-bg: var(--surface);
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.5) blur(14px); border-bottom: 1px solid var(--border);
  --search-bg: var(--surface-2); --search-border: transparent; --search-text: var(--text); --search-ph: var(--muted); }
.tb-row { display: flex; align-items: center; gap: var(--s4); height: var(--topbar-h); padding: 0 var(--s8); }
.tb-brand { display: none; flex-shrink: 0; }
.tb-actions { display: flex; align-items: center; gap: var(--s1); margin-left: auto; flex-shrink: 0; }
.avatar-btn { display: flex; align-items: center; gap: var(--s2); padding: 4px 10px 4px 4px; margin-left: var(--s1); border-radius: 999px; transition: background-color .15s; }
.avatar-btn:hover { background: var(--hover-bg, var(--surface-2)); }
.avatar-meta { line-height: 1.2; }
.avatar-meta b { display: block; font-size: var(--t-sm); white-space: nowrap; }
.avatar-meta small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; }
.tb-nav { display: none; }
[data-nav="top"] .topbar { --tb-bg: var(--chrome-bg); background: var(--chrome-bg); color: var(--chrome-text); border-bottom-color: var(--chrome-border); backdrop-filter: none; --hover-bg: var(--chrome-hover);
  --search-bg: var(--chrome-input-bg); --search-border: var(--chrome-input-border); --search-text: var(--chrome-input-text); --search-ph: var(--chrome-input-ph); }
[data-nav="top"] .tb-brand { display: flex; }
[data-nav="top"] .tb-row { gap: var(--s6); }
[data-nav="top"] .loc-picker.in-topbar { display: block; }
[data-nav="top"] .in-topbar .loc-btn { padding: 4px var(--s3) 4px 4px !important; max-width: 250px; }
[data-nav="top"] .in-topbar .loc-ic { width: 30px; height: 30px; }
[data-nav="top"] .in-topbar .loc-menu { left: auto; right: 0; }
[data-nav="top"] .avatar-meta small { color: var(--chrome-muted); }
[data-nav="top"][data-chrome="brand"] .topbar .avatar { background: rgba(255,255,255,.18); color: #fff; }
[data-nav="top"] .tb-nav { display: flex; align-items: center; gap: var(--s1); height: calc(var(--ctl-h) + 14px); padding: 0 var(--s8); border-top: 1px solid var(--chrome-border); overflow-x: auto; scrollbar-width: none; }
[data-nav="top"] .tb-nav .nav-item { height: calc(var(--ctl-h) - 2px); }
.tb-nav-spacer { flex: 1; }
.tb-nav-note { display: flex; align-items: center; gap: 6px; font-size: var(--t-xs); color: var(--chrome-muted); white-space: nowrap; }

/* search */
.search { position: relative; flex: 1; max-width: 580px; min-width: 0; }
.search > .anno { position: absolute; right: -30px; top: 50%; margin-top: -9px; }
.search-input { display: flex; align-items: center; gap: var(--s2); height: var(--ctl-h); padding: 0 var(--s3); border-radius: var(--r-ctl); cursor: text;
  background: var(--search-bg); border: 1px solid var(--search-border); color: var(--search-text); transition: background-color .15s, border-color .15s, box-shadow .15s; }
.search-input > .ic { opacity: .7; }
.search-input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none !important; background: transparent; color: inherit; }
.search-input input::placeholder { color: var(--search-ph); }
.search-input input::-webkit-search-cancel-button { display: none; }
.search-input kbd { font: 600 11px/18px ui-monospace, Menlo, monospace; padding: 0 6px; border-radius: 6px; border: 1px solid currentColor; opacity: .45; }
.search.open .search-input, .search-input:focus-within { background: var(--surface); color: var(--text); border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.search.open .search-input input::placeholder { color: var(--muted); }
.search-pop { display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; min-width: 360px; max-height: min(520px, 70cqh); overflow: auto; z-index: 70;
  padding: var(--s2); border-radius: var(--r-lg); background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: pop .14s ease-out; }
.search.open .search-pop { display: block; }
.sp-title { display: flex; align-items: center; gap: 6px; padding: var(--s2) var(--s2) var(--s1); font-size: var(--t-xs); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sp-title span { background: var(--surface-2); padding: 1px 6px; border-radius: 99px; letter-spacing: 0; }
.sp-recent { width: 100%; display: flex; align-items: center; gap: var(--s2); padding: 8px var(--s2) !important; border-radius: var(--r-ctl); color: var(--muted); font-size: var(--t-sm); text-align: left; }
.sp-recent span { color: var(--text); }
.sp-recent:hover, .sp-item:hover, .sp-cat:hover { background: var(--surface-2); }
.sp-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: var(--s1) var(--s2) var(--s2); }
.sp-item { display: flex; align-items: center; gap: var(--s3); padding: 6px var(--s2); border-radius: var(--r-ctl); }
.sp-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s3); }
.sp-txt { min-width: 0; line-height: 1.3; }
.sp-txt b { display: block; font-weight: 600; font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-txt small { display: block; font-size: var(--t-xs); color: var(--muted); }
.sp-price { font-size: var(--t-sm); font-weight: 700; white-space: nowrap; }
.sp-cat { display: flex; align-items: center; gap: var(--s3); padding: 6px var(--s2); border-radius: var(--r-ctl); font-size: var(--t-sm); font-weight: 600; }
.sp-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--s6) var(--s4); text-align: center; color: var(--muted); font-size: var(--t-sm); }
.sp-empty b { color: var(--text); }
.sp-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: var(--s1); padding: var(--s3) var(--s2); border-top: 1px solid var(--border); font-size: var(--t-sm); font-weight: 600; color: var(--primary-ink); }
.sp-foot kbd { font: 500 11px/18px ui-monospace, Menlo, monospace; padding: 0 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.sp-hint { display: flex; align-items: center; gap: 6px; padding: var(--s2); font-size: 11px; color: var(--muted); background: var(--surface-2); border-radius: var(--r-sm); }

/* ============ overlay: tab bar, help, modal, toast ============ */
#overlay, #toast-root { position: absolute; inset: 0; pointer-events: none; z-index: 50; }
#overlay > *, #toast-root > * { pointer-events: auto; }
.tabbar { display: none; }
.fab { position: absolute; right: var(--s6); bottom: var(--s6); z-index: 70; display: flex; align-items: center; gap: var(--s2); height: 54px; padding: 0 var(--s5) 0 var(--s4) !important;
  border-radius: 999px; background: var(--primary) !important; color: var(--on-primary) !important; font-weight: 700; font-size: var(--t-base);
  box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--primary) 75%, transparent), var(--shadow); transition: transform .15s; }
.fab:hover { transform: translateY(-2px); }
.fab.on { background: var(--text) !important; color: var(--bg) !important; }
.fab .pulse { position: absolute; top: 7px; left: 34px; width: 11px; height: 11px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 2px var(--primary); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 2px var(--primary), 0 0 0 2px rgba(34,197,94,.6); } 70%, 100% { box-shadow: 0 0 0 2px var(--primary), 0 0 0 10px rgba(34,197,94,0); } }
.help-pop { position: absolute; right: var(--s6); bottom: calc(var(--s6) + 66px); z-index: 71; width: 350px; display: flex; flex-direction: column; gap: var(--s3); padding: var(--s5);
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: pop-up .2s ease-out; transform-origin: bottom right; }
.hp-head { display: flex; align-items: center; gap: var(--s3); }
.hp-head b { display: block; font-size: var(--t-md); font-family: var(--font-heading); font-weight: var(--h-weight); }
.hp-head small { display: block; font-size: var(--t-xs); }
.hp-hours { display: flex; align-items: center; gap: 4px; font-size: var(--t-xs); color: var(--success-ink); font-weight: 600; margin-top: 2px; }
.hp-preview { font-size: var(--t-xs); color: var(--muted); padding: var(--s2) var(--s3); border-radius: var(--r-ctl); background: var(--surface-2); font-style: italic; }
.hp-preview small { display: block; font-style: normal; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 10px; margin-bottom: 2px; }
.hp-link { display: flex; align-items: center; gap: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--border); font-size: var(--t-sm); color: var(--muted); }
.hp-link span { flex: 1; } .hp-link b { color: var(--primary-ink); }
.help-pop > .anno { position: absolute; top: 12px; right: 44px; }

.modal-wrap { position: absolute; inset: 0; z-index: 90; display: grid; place-items: center; padding: var(--s6); }
.modal-backdrop { position: absolute; inset: 0; background: var(--overlay); backdrop-filter: blur(2px); animation: fade .2s; }
.modal { position: relative; width: 100%; max-width: 660px; max-height: 100%; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); animation: pop .22s cubic-bezier(.2, .8, .2, 1); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); padding: var(--s5) var(--s6); border-bottom: 1px solid var(--border); }
.modal-head p { margin-top: 2px; }
.modal-body { padding: var(--s5) var(--s6); overflow-y: auto; display: flex; flex-direction: column; gap: var(--s5); }
.modal-foot { display: flex; align-items: center; gap: var(--s2); padding: var(--s4) var(--s6); border-top: 1px solid var(--border); background: var(--surface-2); }
.foot-note { display: flex; align-items: center; gap: 6px; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: var(--s2); }
.choice { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) !important; border-radius: var(--r-ctl); border: 1px solid var(--border) !important; background: var(--surface) !important;
  text-align: left; font-size: var(--t-sm); font-weight: 500; transition: .15s; }
.choice .ic { color: var(--muted); }
.choice:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)) !important; }
.choice.on { border-color: var(--primary) !important; background: var(--primary-soft) !important; color: var(--primary-soft-ink); box-shadow: inset 0 0 0 1px var(--primary); font-weight: 600; }
.choice.on .ic { color: currentColor; }
.choices.err .choice { border-color: color-mix(in srgb, var(--danger) 55%, var(--border)) !important; }
.err-txt { color: var(--danger-ink); font-size: var(--t-xs); font-weight: 600; }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; max-height: 210px; overflow-y: auto; padding: 2px; }
.pick { display: flex; align-items: center; gap: var(--s2); padding: 6px var(--s2) !important; border-radius: var(--r-ctl); border: 1px solid var(--border) !important; text-align: left; font-size: var(--t-sm); background: var(--surface) !important; }
.pick.on { border-color: var(--primary) !important; background: var(--primary-soft) !important; }
.pick .grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb { width: 18px; height: 18px; flex-shrink: 0; display: grid; place-items: center; border-radius: 5px; border: 1.5px solid var(--border); background: var(--surface); }
.pick.on .cb { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--s5); border: 2px dashed var(--border); border-radius: var(--r-lg); color: var(--muted); text-align: center; cursor: pointer; transition: .15s; }
.dropzone b { color: var(--text); font-size: var(--t-sm); }
.dropzone small { font-size: var(--t-xs); }
.dropzone:hover { border-color: var(--primary); color: var(--primary-ink); background: var(--primary-soft); }
.photo-thumbs { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.ph { position: relative; }
.ph img { width: 76px; height: 76px; object-fit: cover; border-radius: var(--r); display: block; border: 1px solid var(--border); }
.ph button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--text) !important; color: var(--bg) !important; }

.toast { position: absolute; left: 50%; bottom: var(--s6); transform: translateX(-50%); z-index: 95; display: flex; align-items: center; gap: var(--s3); max-width: calc(100% - 32px);
  padding: 12px 18px 12px 14px; border-radius: var(--r-lg); background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); font-size: var(--t-sm); font-weight: 500; animation: toast .3s cubic-bezier(.2, .8, .2, 1); }
.toast .ic { color: color-mix(in srgb, var(--success) 70%, var(--bg)); }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 12px); } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes pop-up { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes fade { from { opacity: 0; } }

/* ============ page scaffolding ============ */
.page { display: flex; flex-direction: column; gap: var(--s6); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.page-head p { margin-top: 4px; }
.page-head h1 { display: flex; align-items: center; gap: 8px; }
.head-tools { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.title-row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--t-sm); color: var(--muted); margin-bottom: calc(var(--s4) * -1); }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs span:last-child { color: var(--text); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.section-head h2 { display: flex; align-items: center; }
.section-head a { font-size: var(--t-sm); font-weight: 600; color: var(--primary-ink); display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.sort { display: flex; align-items: center; gap: var(--s2); color: var(--muted); }

/* ============ login ============ */
.login { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); height: 100%; overflow: auto; background: var(--surface); }
.login-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: var(--s8); min-height: 100%; color: var(--on-primary);
  background: radial-gradient(circle at 85% 12%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 45%), linear-gradient(160deg, var(--primary), var(--primary-hover)); }
.la-top { position: relative; z-index: 1; --chrome-mark-bg: rgba(255,255,255,.18); --chrome-mark-text: currentColor; }
.la-produce span { position: absolute; line-height: 1; filter: drop-shadow(0 14px 18px rgba(0,0,0,.22)); animation: float 7s ease-in-out infinite; }
.la-produce span:nth-child(2n) { animation-duration: 9s; animation-delay: -2s; }
.la-produce span:nth-child(3n) { animation-duration: 11s; animation-delay: -4s; }
@keyframes float { 50% { translate: 0 -10px; } }
.la-copy { position: relative; z-index: 1; max-width: 460px; display: flex; flex-direction: column; gap: var(--s3); }
.la-copy h2 { font-size: var(--t-3xl); line-height: 1.08; color: inherit; }
.la-copy p { font-size: var(--t-md); opacity: .88; }
.la-stats { display: flex; gap: var(--s6); margin-top: var(--s3); padding-top: var(--s4); border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.la-stats b { display: block; font-family: var(--font-heading); font-size: var(--t-xl); font-weight: var(--h-weight); }
.la-stats small { font-size: var(--t-xs); opacity: .8; }
.login-form-wrap { display: grid; place-items: center; padding: var(--s8); }
.login-form { width: 100%; max-width: 390px; display: flex; flex-direction: column; gap: var(--s4); }
.lf-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s6); }
.login-form h1 { font-size: var(--t-2xl); margin-bottom: 4px; }
.divider { display: flex; align-items: center; gap: var(--s3); color: var(--muted); font-size: var(--t-xs); margin-top: var(--s2); }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.lf-help { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); border-radius: var(--r-lg); background: var(--surface-2); }
.lf-help b { display: block; font-size: var(--t-sm); }
.lf-help small { display: block; font-size: var(--t-xs); color: var(--muted); }

/* ============ home ============ */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.hello h1 { font-size: var(--t-3xl); line-height: 1.1; }
.hello-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: var(--s2) !important; }
.hello-actions { display: flex; gap: var(--s2); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--s4); }
.promo { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3); min-height: 250px; padding: var(--s6); border-radius: var(--r-lg); color: var(--on-primary);
  background: radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--accent) 60%, transparent), transparent 52%), linear-gradient(135deg, var(--primary), var(--primary-hover)); isolation: isolate; }
.promo h2 { font-size: var(--t-xl); max-width: 19ch; line-height: 1.15; color: inherit; }
.promo p { max-width: 40ch; opacity: .88; font-size: var(--t-sm); }
.promo .btn { margin-top: auto; }
.promo:hover .promo-art { transform: rotate(-4deg) scale(1.04); }
.promo-art { position: absolute; right: -8px; bottom: -14px; z-index: -1; display: grid; grid-template-columns: repeat(2, auto); gap: 0 6px; font-size: 76px; line-height: 1.05;
  transform: rotate(-9deg); transition: transform .4s; filter: drop-shadow(0 16px 20px rgba(0,0,0,.25)); }
.mtrack { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mt i { display: block; height: 6px; border-radius: 99px; background: var(--surface-2); }
.mt.done i { background: var(--primary); }
.mt.cur i { background: linear-gradient(90deg, var(--primary) 55%, color-mix(in srgb, var(--primary) 25%, var(--surface-2)) 55%); }
.mt small { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); line-height: 1.2; }
.mt.done small, .mt.cur small { color: var(--text); font-weight: 600; }
.eta { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); border-radius: var(--r-ctl); background: var(--info-soft); color: var(--info-ink); font-size: var(--t-sm); }
.home-grid .card .btn { margin-top: auto; }
.cart-peek { display: flex; gap: 6px; }
.quick-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(236px, 1fr); gap: var(--s4); overflow-x: auto; padding: 2px 2px var(--s3); margin: -2px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.qcard { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4); scroll-snap-align: start; }
.qc-top { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.qc-txt { min-width: 0; line-height: 1.3; }
.qc-txt b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--t-sm); }
.qc-txt small { display: block; color: var(--muted); font-size: var(--t-xs); margin-top: 2px; }
.qc-meta { display: flex; align-items: center; gap: 5px; font-size: var(--t-xs); color: var(--muted); margin-top: auto; }
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3); }
.cat-tile { display: flex; flex-direction: column; gap: 2px; padding: var(--s4); border-radius: var(--r-lg); background: hsl(var(--hue) var(--tile-s) var(--tile-l)); transition: transform .2s, box-shadow .2s; }
.cat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ct-emo { font-size: 32px; line-height: 1; margin-bottom: var(--s2); transition: transform .25s; }
.cat-tile:hover .ct-emo { transform: scale(1.1) rotate(-6deg); }
.cat-tile b { font-size: var(--t-sm); line-height: 1.25; }
.cat-tile small { font-size: var(--t-xs); color: var(--muted); }

/* ============ catalog ============ */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: var(--s4); }
.product-grid.one { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pcard { position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden; transition: box-shadow .2s, border-color .2s, transform .2s; }
[data-card="elevated"] .pcard { box-shadow: var(--shadow-sm), 0 0 0 1px color-mix(in srgb, var(--border) 60%, transparent); }
[data-card="elevated"] .pcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
[data-card="bordered"] .pcard:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
[data-card="flat"] .pcard:hover { background: color-mix(in srgb, var(--surface-2) 70%, var(--primary-soft)); }
.pc-media { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; margin: var(--s2) var(--s2) 0; border-radius: max(0px, calc(var(--r-lg) - 4px)); background: hsl(var(--hue) var(--tile-s) var(--tile-l)); overflow: hidden; }
.pc-emoji { font-size: 62px; line-height: 1; filter: drop-shadow(0 10px 12px rgba(0,0,0,.16)); transition: transform .3s; }
.pcard:hover .pc-emoji { transform: scale(1.07) rotate(-4deg); }
.pc-labels { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.pc-stock { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: var(--r-badge); font-size: 11px; font-weight: 700; background: var(--warning-soft); color: var(--warning-ink); }
.pc-stock.out { background: var(--danger-soft); color: var(--danger-ink); }
.pcard.is-out .pc-emoji { filter: grayscale(.85); opacity: .6; }
.fav { position: absolute; top: calc(var(--s2) + 8px); right: calc(var(--s2) + 8px); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 88%, transparent) !important; color: var(--muted); box-shadow: var(--shadow-sm); backdrop-filter: blur(6px); transition: transform .15s, color .15s; z-index: 2; }
.fav:hover { transform: scale(1.1); color: var(--danger); }
.fav.on, .fav-inline.on { color: var(--danger); }
.fav.on svg, .fav-inline.on svg { fill: currentColor; }
.fav.lg { width: 42px; height: 42px; top: var(--s4); right: var(--s4); }
.pc-body { display: flex; flex-direction: column; gap: 2px; flex: 1; padding: var(--s3) var(--s4) 0; }
.pc-name { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.pc-name:hover { color: var(--primary-ink); }
.pc-meta { font-size: var(--t-xs); color: var(--muted); }
.pc-price { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; margin-top: var(--s2); }
.pc-price b { font-size: var(--t-md); font-weight: 800; font-variant-numeric: tabular-nums; }
.pc-price.offer b, .prow-price.offer b, .price-main.offer { color: var(--accent-ink); }
.pc-price .per, .pc-price s, .pc-ref { font-size: var(--t-xs); color: var(--muted); }
.pc-actions { padding: var(--s3) var(--s4) var(--s4); }
.catalog-layout { display: grid; grid-template-columns: 246px minmax(0, 1fr); gap: var(--s6); align-items: start; }
.filters { position: sticky; top: calc(var(--topbar-h) + var(--s4)); display: flex; flex-direction: column; gap: var(--s5); max-height: calc(100vh - var(--topbar-h) - 120px); overflow-y: auto; }
[data-nav="top"] .filters { top: calc(var(--topbar-h) + var(--ctl-h) + 30px); }
.f-group h4 { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: var(--s2); display: flex; align-items: center; }
.cat-list { display: flex; flex-direction: column; gap: 1px; margin: 0 calc(var(--s2) * -1); }
.cat-list a { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: 7px var(--s2); border-radius: var(--r-ctl); font-size: var(--t-sm); }
.cat-list a:hover { background: var(--surface-2); }
.cat-list a.on { background: var(--primary-soft); color: var(--primary-soft-ink); font-weight: 600; }
.cat-list a.on .n { color: inherit; }
.cat-emo { margin-right: 8px; }
.catalog-main { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.chips-row { display: none; gap: var(--s2); overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips-sep { width: 1px; background: var(--border); flex-shrink: 0; margin: 4px 2px; }
.search-notice { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: var(--s3) var(--s4); border-radius: var(--r-lg); background: var(--accent-soft); color: var(--accent-soft-ink); font-size: var(--t-sm); }
.search-notice span { flex: 1; min-width: 220px; }
.search-notice .link { color: inherit; text-decoration: underline; }
.product-list { display: flex; flex-direction: column; gap: var(--s2); }
.prow { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; align-items: center; gap: var(--s4); padding: var(--s3) var(--s4) var(--s3) var(--s3); }
.prow-title { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.prow-title .pc-name { min-height: 0; }
.prow-price { text-align: right; line-height: 1.3; }
.prow-price b { display: block; font-size: var(--t-md); font-weight: 800; }
.prow-price small { font-size: var(--t-xs); color: var(--muted); }
.prow-act { display: flex; align-items: center; gap: var(--s2); }
.prow-act .btn { min-width: 112px; }
.fav-inline { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.fav-inline:hover { background: var(--surface-2); color: var(--danger); }

/* ============ product detail ============ */
.pdp-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--s8); align-items: start; }
.gallery { position: sticky; top: calc(var(--topbar-h) + var(--s4)); }
[data-nav="top"] .gallery { top: calc(var(--topbar-h) + var(--ctl-h) + 30px); }
.g-main { position: relative; aspect-ratio: 1 / 1; max-height: 540px; width: 100%; display: grid; place-items: center; border-radius: var(--r-lg); background: hsl(var(--hue) var(--tile-s) var(--tile-l)); overflow: hidden; }
.g-emoji { font-size: clamp(110px, 17cqw, 230px); line-height: 1; filter: drop-shadow(0 26px 30px rgba(0,0,0,.2)); transition: transform .35s; }
.v1 { display: inline-block; transform: rotate(-14deg) scale(.92); } .v2 { display: inline-block; transform: scaleX(-1) rotate(-8deg); } .v3 { display: inline-block; transform: scale(.78) rotate(10deg); }
.g-main .pc-labels { top: var(--s4); left: var(--s4); }
.g-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); margin-top: var(--s3); }
.g-thumbs button { aspect-ratio: 1; display: grid; place-items: center; border-radius: var(--r); background: hsl(var(--hue) var(--tile-s) var(--tile-l)) !important; font-size: 36px; border: 2px solid transparent !important; transition: border-color .15s; }
.g-thumbs button.on { border-color: var(--primary) !important; }
.pdp-info { display: flex; flex-direction: column; gap: var(--s4); }
.pdp-info h1 { font-size: var(--t-3xl); line-height: 1.1; }
.pdp-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.kv-line { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: var(--t-sm); color: var(--muted); }
.kv-line b { color: var(--text); font-weight: 600; margin-left: 3px; }
.stock-line { display: flex; align-items: center; gap: 8px; font-size: var(--t-sm); font-weight: 600; color: var(--success-ink); }
.stock-line.low { color: var(--warning-ink); } .stock-line.out { color: var(--danger-ink); }
.stock-line .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 20%, transparent); }
.price-block { display: flex; flex-direction: column; gap: 4px; padding: var(--s4) var(--s5); border-radius: var(--r-lg); background: var(--surface-2); }
.pb-row { display: flex; align-items: baseline; gap: var(--s2); flex-wrap: wrap; }
.price-main { font-family: var(--font-heading); font-size: var(--t-2xl); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.save-pill { margin-left: auto; align-self: center; padding: 3px 10px; border-radius: var(--r-badge); background: var(--accent); color: var(--on-accent); font-size: var(--t-xs); font-weight: 700; }
.buy-row { display: flex; gap: var(--s2); }
.buy-row .grow { flex: 1; }
.perks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); padding: var(--s4) 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.perk { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-xs); line-height: 1.3; }
.perk b { display: block; font-size: var(--t-sm); }
.perk small { color: var(--muted); }
.perk-ic { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--r-ctl); background: var(--primary-soft); color: var(--primary-soft-ink); }
.pdp-desc { display: flex; flex-direction: column; gap: var(--s2); }
.specs { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.specs td { padding: 10px 0; border-bottom: 1px solid var(--border); }
.specs td:first-child { color: var(--muted); width: 42%; }

/* ============ cart ============ */
.cart-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s6); align-items: start; }
.cart-side { position: sticky; top: calc(var(--topbar-h) + var(--s4)); display: flex; flex-direction: column; gap: var(--s4); }
[data-nav="top"] .cart-side { top: calc(var(--topbar-h) + var(--ctl-h) + 30px); }
.cart-items { padding-top: var(--s3); padding-bottom: var(--s3); container: cartitems / inline-size; }
.ci-head, .ci { display: grid; grid-template-columns: 64px minmax(0, 1fr) 110px 112px 100px 32px; gap: var(--s4); align-items: center; }
.ci-head { grid-template-columns: minmax(0, 1fr) 110px 112px 100px 32px; padding: var(--s2) 0 var(--s3) 0; font-size: var(--t-xs); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); }
.ci { padding: var(--s4) 0; border-bottom: 1px solid var(--border); }
.ci:last-child { border-bottom: 0; padding-bottom: var(--s2); }
.ci-info { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; min-width: 0; }
.ci-name { font-weight: 600; line-height: 1.3; }
.ci-name:hover { color: var(--primary-ink); }
.ci-price { font-size: var(--t-sm); line-height: 1.3; }
.ci-price small { display: block; color: var(--muted); font-size: var(--t-xs); }
.ci-total { font-weight: 800; text-align: right; }
.ci-rm { color: var(--muted); }
.ci-rm:hover { color: var(--danger-ink); }
.loc-radios { display: flex; flex-direction: column; gap: var(--s2); }
.loc-radio { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3) !important; border-radius: var(--r-ctl); border: 1px solid var(--border) !important; background: var(--surface) !important; text-align: left; transition: .15s; }
.loc-radio b { display: block; font-size: var(--t-sm); }
.loc-radio small { display: block; font-size: var(--t-xs); color: var(--muted); }
.loc-radio.on { border-color: var(--primary) !important; box-shadow: inset 0 0 0 1px var(--primary); background: var(--primary-soft) !important; }
.radio { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); }
.loc-radio.on .radio { border: 5px solid var(--primary); }
.date-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.date-chip { display: flex; flex-direction: column; align-items: center; padding: var(--s2) !important; border-radius: var(--r-ctl); border: 1px solid var(--border) !important; background: var(--surface) !important; line-height: 1.25; }
.date-chip small { font-size: var(--t-xs); color: var(--muted); }
.date-chip b { font-size: var(--t-sm); }
.date-chip.on { border-color: var(--primary) !important; background: var(--primary-soft) !important; color: var(--primary-soft-ink); box-shadow: inset 0 0 0 1px var(--primary); }
.date-chip.on small { color: inherit; }
.sum { display: flex; flex-direction: column; }
.sum-row { display: flex; justify-content: space-between; gap: var(--s3); padding: 6px 0; font-size: var(--t-sm); }
.sum-row.cn { color: var(--danger-ink); }
.sum-row.total { margin-top: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--border); font-size: var(--t-md); font-weight: 800; }
.minorder { display: flex; flex-direction: column; gap: 6px; font-size: var(--t-xs); color: var(--muted); }
.minorder.ok { color: var(--success-ink); }
.minbar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.minbar i { display: block; height: 100%; border-radius: inherit; background: var(--warning); transition: width .3s; }
.minorder.ok .minbar i { background: var(--success); }
.pay-line { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); border-radius: var(--r-ctl); background: var(--surface-2); font-size: var(--t-sm); }
.pay-line span { flex: 1; } .pay-line small { display: block; font-size: var(--t-xs); color: var(--muted); }
/* cart rows adapt to the width of their own card, not the page */
@container cartitems (max-width: 720px) {
  .ci-head { display: none; }
  .ci { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "img info rm" "img step total"; gap: var(--s2) var(--s3); }
  .ci-img { grid-area: img; align-self: start; } .ci .thumb { width: 56px; height: 56px; }
  .ci-info { grid-area: info; } .ci-price { display: none; }
  .ci .stepper { grid-area: step; justify-self: start; height: var(--ctl-h-sm); }
  .ci-total { grid-area: total; align-self: center; } .ci-rm { grid-area: rm; align-self: start; }
}

/* ============ confirm ============ */
.confirm { align-items: center; padding-top: var(--s4); }
.confirm-card { position: relative; overflow: hidden; width: 100%; max-width: 720px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s4); padding: var(--s10) var(--s8); }
.confirm-card .mtrack { width: 100%; max-width: 460px; text-align: left; }
.big-check { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%; background: var(--success-soft); color: var(--success-ink); box-shadow: 0 0 0 10px color-mix(in srgb, var(--success-soft) 45%, transparent); animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.confirm-grid { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); text-align: left; }
.confirm-grid > div { padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.confirm-grid small { font-size: var(--t-xs); color: var(--muted); }
.confirm-grid b { font-size: var(--t-sm); }
.confetti i { position: absolute; top: -12px; left: var(--x); width: 8px; height: 14px; border-radius: 2px; background: var(--c); opacity: 0; animation: confetti 2.6s var(--d) ease-in forwards; }
@keyframes confetti { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(420px) rotate(var(--r)); } }

/* ============ orders ============ */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
.stat { display: flex; flex-direction: column; gap: 2px; padding: var(--s4) var(--s5); }
.stat small { font-size: var(--t-xs); color: var(--muted); font-weight: 600; }
.stat b { font-family: var(--font-heading); font-size: var(--t-xl); font-weight: var(--h-weight); letter-spacing: var(--h-tracking); }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; align-items: center; }
.tab { display: inline-flex; align-items: center; gap: 6px; height: calc(var(--ctl-h) + 4px); padding: 0 var(--s3) !important; border-bottom: 2px solid transparent !important; margin-bottom: -1px;
  color: var(--muted); font-weight: 600; font-size: var(--t-sm); white-space: nowrap; transition: color .15s; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--primary) !important; }
.tab .n { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: 11px; display: grid; place-items: center; }
.tab.on .n { background: var(--primary-soft); color: var(--primary-soft-ink); }
.filters-inline { display: flex; gap: var(--s2); flex-wrap: wrap; }
.table-card { padding: 0; overflow: hidden; }
.table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.table th { text-align: left; font-weight: 700; font-size: var(--t-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); white-space: nowrap; background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.table td { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th.r, .table td.r { text-align: right; }
.table tbody tr:last-child td { border-bottom: 0; }
.orders-table tbody tr { cursor: pointer; transition: background-color .12s; }
.orders-table tbody tr:hover { background: var(--surface-2); }
.orders-table td:first-child { white-space: nowrap; }
.docs { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--s1); color: var(--muted); }
.order-cards { display: none; flex-direction: column; }
.ocard { display: flex; flex-direction: column; gap: 4px; padding: var(--s4); border-bottom: 1px solid var(--border); }
.ocard:last-child { border-bottom: 0; }
.ocard-top, .ocard-bot { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }

/* order detail */
.tracker-card .card-head { margin-bottom: var(--s5); }
.live-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; background: var(--info-soft); color: var(--info-ink); font-size: var(--t-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.live-pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.tracker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tstep { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s2); padding: 0 var(--s2); }
.tstep::before { content: ''; position: absolute; top: 18px; left: calc(-50% + 24px); right: calc(50% + 24px); height: 3px; border-radius: 3px; background: var(--border); }
.tstep:first-child::before { display: none; }
.tstep.done::before, .tstep.cur::before { background: var(--primary); }
.tdot { position: relative; z-index: 1; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--muted); border: 2px solid var(--border); }
.tstep.done .tdot { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.tstep.cur .tdot { border-color: var(--primary); color: var(--primary-ink); box-shadow: 0 0 0 6px var(--primary-ring); animation: ring 2s infinite; }
@keyframes ring { 50% { box-shadow: 0 0 0 10px transparent; } }
.tstep-txt b { display: block; font-size: var(--t-sm); line-height: 1.3; }
.tstep-txt small { display: block; font-size: var(--t-xs); color: var(--muted); margin-top: 2px; }
.tstep.todo .tstep-txt b { color: var(--muted); font-weight: 500; }
.cancel-banner { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--danger-soft); color: var(--danger-ink); }
.cancel-banner b { display: block; } .cancel-banner small { display: block; font-size: var(--t-xs); }
.od-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s6); align-items: start; }
.lines { margin-top: var(--s3); }
.lines th:first-child, .lines td:first-child { padding-left: 0; }
.lines th:last-child, .lines td:last-child { padding-right: 0; }
.lines th { background: transparent; }
.line-prod { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.od-sum { margin-top: var(--s3); margin-left: auto; max-width: 360px; }
.doc-row { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); border-radius: var(--r-ctl); background: var(--surface-2); }
.doc-row b { display: block; font-size: var(--t-sm); }
.doc-row small { display: block; font-size: var(--t-xs); color: var(--muted); }
.doc-ic { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--r-ctl); background: var(--primary-soft); color: var(--primary-soft-ink); }
.doc-row.cn .doc-ic { background: var(--danger-soft); color: var(--danger-ink); }
.doc-empty { display: flex; gap: var(--s2); align-items: center; padding: var(--s3); border-radius: var(--r-ctl); background: var(--surface-2); font-size: var(--t-xs); color: var(--muted); }
.info-line { display: flex; align-items: flex-start; gap: var(--s3); font-size: var(--t-sm); }
.info-line > .ic { margin-top: 3px; color: var(--muted); }
.info-line b { display: block; } .info-line small { display: block; color: var(--muted); font-size: var(--t-xs); }
.report-item { display: flex; flex-direction: column; gap: 4px; padding: var(--s3); border-radius: var(--r-ctl); border: 1px solid var(--border); }
.ri-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); font-size: var(--t-sm); }
.ri-photos { display: flex; gap: 6px; } .ri-photos img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--r-sm); }

/* ============ buy again ============ */
.ba-card { padding-top: var(--s2); padding-bottom: var(--s2); }
.ba-row { display: grid; grid-template-columns: 26px 64px minmax(0, 1fr) 130px auto; gap: var(--s4); align-items: center; padding: var(--s3) 0; border-bottom: 1px solid var(--border); }
.ba-row:last-child { border-bottom: 0; }
.rank { font-family: var(--font-heading); font-weight: 800; color: var(--muted); font-size: var(--t-md); text-align: center; font-variant-numeric: tabular-nums; }
.ba-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.freq { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-xs); color: var(--muted); margin-top: 2px; }
.freq-bar { width: 64px; height: 5px; border-radius: 99px; background: var(--surface-2); overflow: hidden; flex-shrink: 0; }
.freq-bar i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.ba-price { text-align: right; line-height: 1.3; }
.ba-price b { display: block; } .ba-price small { font-size: var(--t-xs); color: var(--muted); }
.ba-act { display: flex; align-items: center; gap: var(--s2); }
.ba-act .btn { min-width: 132px; }

/* ============ account ============ */
.acc-grid { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: var(--s6); align-items: start; }
.acc-nav { position: sticky; top: calc(var(--topbar-h) + var(--s4)); display: flex; flex-direction: column; gap: 2px; padding: var(--s2); }
[data-nav="top"] .acc-nav { top: calc(var(--topbar-h) + var(--ctl-h) + 30px); }
.acc-nav a { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r-ctl); font-size: var(--t-sm); font-weight: 500; color: var(--muted); cursor: pointer; }
.acc-nav a:hover { background: var(--surface-2); color: var(--text); }
.acc-nav a.on { background: var(--primary-soft); color: var(--primary-soft-ink); font-weight: 600; }
.acc-main { display: flex; flex-direction: column; gap: var(--s5); min-width: 0; }
.acc-main > section { scroll-margin-top: calc(var(--topbar-h) + 24px); }
[data-nav="top"] .acc-main > section { scroll-margin-top: calc(var(--topbar-h) + var(--ctl-h) + 40px); }
.dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s6); }
.dl small { display: block; font-size: var(--t-xs); color: var(--muted); margin-bottom: 2px; }
.dl b { font-weight: 600; }
.loc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s3); }
.loc-card { display: flex; flex-direction: column; gap: 4px; padding: var(--s4); border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); }
.loc-card.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.lc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s2); }
.loc-card .loc-ic { background: var(--primary-soft); color: var(--primary-soft-ink); }
.lc-meta { display: flex; flex-direction: column; gap: 4px; margin: var(--s2) 0 var(--s3); font-size: var(--t-xs); color: var(--muted); }
.lc-meta span { display: flex; align-items: center; gap: 6px; }
.loc-card .btn { margin-top: auto; }
.user-list { display: flex; flex-direction: column; }
.user-row { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--border); }
.user-row:last-child { border-bottom: 0; }
.user-row b { display: block; font-size: var(--t-sm); } .user-row small { display: block; font-size: var(--t-xs); color: var(--muted); }
.ur-access { width: 170px; text-align: right; }
.pref-row { display: flex; align-items: center; gap: var(--s4); padding: var(--s3) 0; border-bottom: 1px solid var(--border); }
.pref-row:last-of-type { border-bottom: 0; }
.pref-row b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--t-sm); }
.pref-row small { display: block; font-size: var(--t-xs); color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }

/* ============ style guide ============ */
.sg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3); margin-top: var(--s4); }
.sg-sw { border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.sg-sw .c { height: 64px; border-bottom: 1px solid var(--border); }
.sg-sw .l { padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; }
.sg-sw b { font-size: var(--t-sm); }
.sg-sw code, .sg-pair small { font: 11px ui-monospace, Menlo, monospace; color: var(--muted); }
.sg-pair { padding: var(--s4); border-radius: var(--r); display: flex; flex-direction: column; gap: 4px; min-height: 84px; justify-content: flex-end; border: 1px solid var(--border); }
.sg-pair small { color: inherit; opacity: .75; }
.sg-type { display: flex; flex-direction: column; margin-top: var(--s3); }
.sg-type > div { display: flex; align-items: baseline; gap: var(--s4); padding: var(--s3) 0; border-bottom: 1px dashed var(--border); }
.sg-type > div:last-child { border-bottom: 0; }
.sg-type small { width: 120px; flex-shrink: 0; color: var(--muted); font: 11px ui-monospace, Menlo, monospace; }
.sg-row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-top: var(--s4); }
.sg-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s4); margin-top: var(--s4); align-items: end; }
.sg-form .sg-row { margin-top: 0; }
.sg-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); }
.sg-shapes { display: flex; flex-wrap: wrap; gap: var(--s4); }
.sg-shapes span { width: 84px; height: 64px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-soft-ink); font: 600 11px ui-monospace, Menlo, monospace; }

/* ============ responsive (container queries on the app frame) ============ */
@container app (max-width: 1240px) {
  .home-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .home-grid .promo { grid-column: 1 / -1; min-height: 220px; }
  .catalog-layout { grid-template-columns: minmax(0, 1fr); }
  .filters { display: none; }
  .chips-row { display: flex; }
  .cart-grid { grid-template-columns: minmax(0, 1fr) 340px; }
  .od-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .content { padding: var(--s6); }
  .tb-row, [data-nav="top"] .tb-nav, .app-foot { padding-left: var(--s6); padding-right: var(--s6); }
  .ba-row { grid-template-columns: 22px 56px minmax(0, 1fr) auto; }
  .ba-price { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-nav-note { display: none; }
}
@container app (max-width: 980px) {
  .shell { --sb-w: 78px; }
  .sidebar { align-items: center; padding: var(--s4) var(--s2); }
  .sidebar .logo-word, .sidebar .logo-tag, .sidebar .loc-txt, .sidebar .loc-chev, .sidebar .nav-item .lbl, .sb-foot { display: none; }
  .sb-head { padding: 0; }
  .sidebar .nav-item { width: 54px; height: 50px; justify-content: center; padding: 0; }
  .sidebar .nav-item .count { position: absolute; top: 4px; right: 4px; margin: 0; }
  .sidebar .loc-btn { width: 54px; height: 50px; justify-content: center; padding: 0 !important; }
  .sidebar .loc-menu { width: 300px; }
  .cart-grid, .od-grid, .pdp-grid, .acc-grid, .sg-two { grid-template-columns: minmax(0, 1fr); }
  .cart-side, .gallery { position: static; }
  .g-main { max-height: 420px; aspect-ratio: 16 / 10; }
  .acc-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .acc-nav a { white-space: nowrap; }
  .avatar-meta { display: none; }
  .avatar-btn { padding: 4px; }
  [data-nav="top"] .in-topbar .loc-txt small { display: none; }
  [data-nav="top"] .in-topbar .loc-btn { max-width: 200px; }
  .search > .anno { right: 6px; }
  .search-pop { min-width: 0; }
  .confirm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .orders-table th:nth-child(3), .orders-table td:nth-child(3) { display: none; }
}
@container app (max-width: 680px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .tb-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand actions" "search search"; height: auto; padding: var(--s3) var(--s4) !important; gap: var(--s3); }
  .tb-brand { display: flex; grid-area: brand; }
  .tb-brand .logo-mark { width: 30px; height: 30px; }
  .tb-brand .logo-word { font-size: 19px; }
  .search { grid-area: search; max-width: none; }
  .search-input kbd { display: none; }
  .tb-actions { grid-area: actions; }
  [data-nav="top"] .tb-nav, .tb-nav { display: none !important; }
  .loc-picker.in-topbar { display: none !important; }
  .icon-btn.bell { display: none; }
  .content { padding: var(--s4) var(--s4) 150px; }
  .app-foot { display: none; }
  .page { gap: var(--s5); }
  :where(#frame) h1 { font-size: var(--t-xl); }
  .hello h1, .pdp-info h1 { font-size: var(--t-2xl); }
  .hello-actions { width: 100%; } .hello-actions .btn { flex: 1; }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .promo { min-height: 230px; padding: var(--s5); }
  .promo-art { font-size: 58px; }
  .quick-row { grid-auto-columns: 78%; }
  .cat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
  .pc-emoji { font-size: 48px; }
  .pc-body { padding: var(--s2) var(--s3) 0; }
  .pc-actions { padding: var(--s2) var(--s3) var(--s3); }
  .pc-ref { display: none; }
  .fav { width: 30px; height: 30px; }
  .prow { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "img info price" "img act act"; gap: var(--s2) var(--s3); }
  .prow > a { grid-area: img; } .prow .thumb { width: 52px; height: 52px; }
  .prow-info { grid-area: info; } .prow-price { grid-area: price; } .prow-act { grid-area: act; justify-content: flex-end; }
  .page-head .head-tools { width: 100%; }
  .page-head .head-tools > .btn { flex: 1; }
  .perks { grid-template-columns: minmax(0, 1fr); }
  .buy-row { flex-wrap: wrap; } .buy-row .grow { flex: 1 1 60%; }
  .table-card .orders-table { display: none; }
  .order-cards { display: flex; }
  .list-toolbar { flex-direction: column; align-items: stretch; }
  .filters-inline { display: grid; grid-template-columns: 1fr 1fr; }
  .filters-inline .input-ic { grid-column: 1 / -1; } .input-ic.sm .input { width: 100%; }
  .filters-inline .select { width: 100%; }
  .stats { gap: var(--s3); }
  .stat { padding: var(--s3) var(--s4); }
  .tracker { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .tstep { flex-direction: row; text-align: left; align-items: center; gap: var(--s3); padding: 0; }
  .tstep::before { left: 18px; right: auto; top: auto; bottom: calc(100% - 2px); width: 3px; height: calc(var(--s4) + 4px); }
  .hide-sm { display: none !important; }
  .ba-row { grid-template-columns: 52px minmax(0, 1fr); grid-template-areas: "img info" "act act"; gap: var(--s2) var(--s3); }
  .rank { display: none; } .ba-img { grid-area: img; } .ba-row .thumb { width: 52px; height: 52px; } .ba-info { grid-area: info; } .ba-act { grid-area: act; justify-content: flex-end; }
  .ba-act .btn { flex: 1; min-width: 0; }
  .dl, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .ur-access { display: none; }
  .confirm-card { padding: var(--s8) var(--s4); }
  .od-sum { max-width: none; }
  .modal-wrap { padding: 0; place-items: end stretch; }
  .modal { max-width: none; max-height: 94%; border-radius: var(--r-lg) var(--r-lg) 0 0; animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
  .modal-head, .modal-body { padding-left: var(--s4); padding-right: var(--s4); }
  .modal-foot { padding: var(--s3) var(--s4) var(--s5); flex-wrap: wrap; }
  .modal-foot .foot-note { flex-basis: 100%; }
  .modal-foot .btn { flex: 1; }
  .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pick-list { grid-template-columns: minmax(0, 1fr); }
  .tabbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 65; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px 20px;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--border); }
  .tab-i { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 10.5px; font-weight: 600; color: var(--muted); }
  .tab-i.active { color: var(--primary-ink); }
  .tab-i.active svg { stroke-width: 2.4; }
  .tab-i .count { position: absolute; top: 0; left: calc(50% + 4px); }
  .fab { right: var(--s4); bottom: 92px; width: 54px; padding: 0 !important; justify-content: center; }
  .fab .lbl { display: none; }
  .fab .pulse { left: auto; right: 4px; top: 4px; }
  .help-pop { left: var(--s3); right: var(--s3); width: auto; bottom: 156px; }
  .toast { bottom: 160px; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-art { min-height: 250px; padding: var(--s5); }
  .la-copy h2 { font-size: var(--t-xl); }
  .la-copy p, .la-stats, .la-produce span:nth-child(n+5) { display: none; }
  .login-form-wrap { padding: var(--s5) var(--s4) var(--s8); place-items: start center; }
  .lf-top { margin-bottom: 0; }
  .sg-type small { width: 80px; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
