/* ============================================================
   MAPTECH STORE — public store pages ("Midnight", matches home.css)
   ============================================================ */
:root {
  color-scheme: dark;
  --bg: #07090F; --panel: #0D111B; --panel-2: #121828; --panel-3: #182036;
  --line: #1C2334; --line-2: #283149;
  --ink: #EEF1F8; --ink-2: #A9B1C6; --ink-3: #7C85A2;
  --gold: #E6AE2E; --gold-2: #F5CD6E; --on-gold: #1A1204; --blue: #4F8BFF;
  --ok: #34D399; --warn: #FBBF24; --bad: #F87171; --violet: #A78BFA; --rose: #FCA5A5;
  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --r: 12px;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #F6F7FB; --panel: #FFFFFF; --panel-2: #F1F3F9; --panel-3: #E8EBF4;
  --line: #E3E6EF; --line-2: #D3D8E5;
  --ink: #0F1424; --ink-2: #48506A; --ink-3: #6B738C;
  --gold: #C98F12; --gold-2: #A8770C; --on-gold: #1A1204;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; text-wrap: balance; letter-spacing: -.015em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid rgba(79,139,255,.75); outline-offset: 2px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink); font: 600 .9rem/1 var(--font); cursor: pointer; white-space: nowrap; transition: transform 160ms var(--ease), background-color 160ms, border-color 160ms, filter 160ms; touch-action: manipulation; }
.btn:active { transform: scale(.97); }
.btn:hover { border-color: var(--ink-3); }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--on-gold); border-color: transparent; box-shadow: 0 10px 24px -12px rgba(230,174,46,.75); }
.btn-gold:hover { filter: brightness(1.05); border-color: transparent; }
.btn-block { width: 100%; }
.btn-sm { height: 34px; padding: 0 12px; font-size: .82rem; border-radius: 8px; }
.btn-lg { height: 50px; font-size: 1rem; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }
.btn-ghost { background: transparent; }
.link { color: var(--gold-2); }
.link:hover { text-decoration: underline; }

/* ── Header ── */
.s-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 41; background: var(--bg); }
.s-head-row { display: flex; align-items: center; gap: 14px; height: 64px; }
.s-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1rem; white-space: nowrap; }
.s-brand .mk { width: 30px; height: 30px; border-radius: 8px; overflow: hidden; background: linear-gradient(135deg, var(--gold-2), #7C5A10); flex: none; display: grid; place-items: center; }
.s-brand .mk img, .s-brand .mk video { width: 100%; height: 100%; object-fit: cover; }
.s-brand small { display: block; font: 500 .66rem var(--mono); color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.s-search { flex: 1; max-width: 460px; position: relative; }
.s-search input { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); padding: 0 14px 0 38px; color: var(--ink); }
.s-search svg { position: absolute; left: 12px; top: 11px; width: 18px; height: 18px; color: var(--ink-3); }
.s-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.s-nav a.s-link { padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-size: .88rem; font-weight: 500; white-space: nowrap; }
.s-nav a.s-link:hover { color: var(--ink); background: var(--panel); }
.s-cart { position: relative; }
.s-cart .ct { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: var(--on-gold); font: 700 .7rem/19px var(--font); text-align: center; }
.s-cart .ct[data-n="0"] { display: none; }
@media (max-width: 760px) {
  .s-head-row { height: auto; flex-wrap: wrap; padding-block: 10px; gap: 10px; }
  .s-search { order: 3; flex-basis: 100%; max-width: none; }
  .s-nav .hide-sm { display: none; }
}

/* ── Flash ── */
.flash { margin-top: 16px; padding: 12px 14px; border-radius: 10px; border: 1px solid; font-size: .9rem; display: flex; gap: 10px; align-items: flex-start; }
.flash-success { background: rgba(52,211,153,.08); border-color: rgba(52,211,153,.35); color: var(--ok); }
.flash-error { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.35); color: var(--bad); }
.flash-info { background: rgba(79,139,255,.08); border-color: rgba(79,139,255,.35); color: #8DB4FF; }

main.s-main { padding-block: 22px 70px; min-height: 60vh; }

/* ── Store front ── */
.hero-band { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; margin-bottom: 18px; }
@media (max-width: 860px) { .hero-band { grid-template-columns: 1fr; } }
.banner { position: relative; overflow: hidden; border-radius: 16px; padding: 28px; border: 1px solid var(--line-2); background: radial-gradient(110% 130% at 0% 0%, rgba(230,174,46,.22), transparent 60%), radial-gradient(90% 120% at 100% 100%, rgba(79,139,255,.14), transparent 60%), var(--panel-2); display: grid; gap: 10px; align-content: center; min-height: 180px; }
.banner .eyebrow { font: 600 .7rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.banner h1 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); font-weight: 700; letter-spacing: -.03em; }
.banner p { color: var(--ink-2); max-width: 56ch; }
.feat-side { display: grid; gap: 12px; }
.feat { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); transition: border-color 160ms; }
.feat:hover { border-color: var(--line-2); }
.feat .thumb { width: 74px; flex: none; }
.feat .eyebrow { font: 600 .64rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 16px; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; flex: 1; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 999px; font-size: .84rem; color: var(--ink-2); background: var(--panel); white-space: nowrap; transition: background-color 160ms, color 160ms; }
.chip:hover { color: var(--ink); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.chip .n { font: 500 .72rem var(--mono); opacity: .7; }
.select { height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); padding: 0 32px 0 12px; color: var(--ink); appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px; background-size: 5px 5px; background-repeat: no-repeat; }
.check { display: inline-flex; gap: 7px; align-items: center; font-size: .86rem; color: var(--ink-2); cursor: pointer; }
.results-note { font-size: .84rem; color: var(--ink-3); margin-bottom: 12px; }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.card-p { display: grid; gap: 8px; align-content: start; padding: 9px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); transition: border-color 160ms, transform 200ms var(--ease); min-width: 0; }
.card-p:hover { border-color: var(--line-2); }
@media (hover: hover) { .card-p:hover { transform: translateY(-2px); } }
.card-p .nm { font-weight: 600; font-size: .9rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.price { font: 600 .95rem var(--mono); font-variant-numeric: tabular-nums; }
.was { font: 400 .78rem var(--mono); color: var(--ink-3); text-decoration: line-through; margin-left: 6px; }
.meta { font-size: .76rem; color: var(--ink-3); }
.meta b { color: var(--warn); font-weight: 600; }
.meta .out { color: var(--bad); font-weight: 600; }
.lock { display: inline-flex; align-items: center; gap: 4px; font: 600 .66rem var(--mono); color: var(--gold-2); }
.lock svg { width: 11px; height: 11px; }

/* product art / photos */
.ph { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: radial-gradient(120% 90% at 20% 10%, #22345E, #0E1528 70%); display: grid; place-items: center; max-width: 100%; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph .ph-ico { width: 38%; height: 38%; color: rgba(255,255,255,.88); }
.ph.t-download { background: radial-gradient(120% 90% at 80% 10%, #1F6B57, #0B1E1A 70%); }
.ph.t-code { background: radial-gradient(120% 90% at 30% 0%, #8A6418, #22180A 72%); }
.ph.t-service { background: radial-gradient(120% 90% at 70% 0%, #5A3E9C, #171028 72%); }
.ph.t-source { background: radial-gradient(120% 90% at 20% 0%, #8C3B3B, #1F0E0E 72%); }
.ph .sale { position: absolute; top: 8px; left: 8px; background: var(--gold); color: var(--on-gold); font: 700 .66rem var(--font); padding: 3px 7px; border-radius: 6px; }

.tag { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 2px 8px; border-radius: 999px; font: 600 .64rem/1.7 var(--mono); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.tag-physical { background: rgba(79,139,255,.14); color: #8DB4FF; }
.tag-download { background: rgba(52,211,153,.13); color: var(--ok); }
.tag-code { background: rgba(230,174,46,.15); color: var(--gold-2); }
.tag-service { background: rgba(167,139,250,.15); color: var(--violet); }
.tag-source { background: rgba(248,113,113,.13); color: var(--rose); }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 38px; height: 38px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel); font: 500 .85rem var(--mono); }
.pager .on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.empty { text-align: center; padding: 60px 20px; border: 1px dashed var(--line-2); border-radius: 16px; color: var(--ink-2); display: grid; gap: 10px; justify-items: center; }
.empty svg { width: 40px; height: 40px; color: var(--ink-3); }

/* ── Product page ── */
.crumbs { font-size: .82rem; color: var(--ink-3); margin-bottom: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--ink); }
.pdp { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .pdp { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
.gallery { display: grid; gap: 10px; position: sticky; top: calc(80px + env(safe-area-inset-top, 0px)); }
@media (max-width: 900px) { .gallery { position: static; } }
.gallery .main { aspect-ratio: 4 / 3; border-radius: 14px; border: 1px solid var(--line); cursor: zoom-in; }
.gallery .main img { object-fit: contain; background: var(--panel); }
.thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.thumbs button { padding: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--panel); cursor: pointer; aspect-ratio: 1 / 1; }
.thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.thumbs button.on { outline: 2px solid var(--gold); outline-offset: 1px; }
.info { display: grid; gap: 16px; min-width: 0; }
.info h1 { font-size: clamp(1.4rem, 3vw, 1.95rem); font-weight: 700; }
.info .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.info .big-price { font: 650 1.6rem var(--mono); letter-spacing: -.02em; }
.lead { color: var(--ink-2); }
.pill { display: inline-flex; padding: 3px 10px; border-radius: 999px; font: 600 .74rem var(--font); white-space: nowrap; }
.pill-ok { background: rgba(52,211,153,.13); color: var(--ok); }
.pill-warn { background: rgba(251,191,36,.13); color: var(--warn); }
.pill-bad { background: rgba(248,113,113,.13); color: var(--bad); }
.pill-blue { background: rgba(79,139,255,.15); color: #8DB4FF; }
.pill-gold { background: rgba(230,174,46,.15); color: var(--gold-2); }
.pill-mute { background: var(--panel-3); color: var(--ink-2); }
.opt-group { display: grid; gap: 8px; }
.opt-group > label, .field > label, .label { font-size: .8rem; color: var(--ink-3); font-weight: 500; }
.opts { display: flex; gap: 8px; flex-wrap: wrap; }
.opts label { position: relative; }
.opts input { position: absolute; opacity: 0; inset: 0; }
.opts span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border: 1px solid var(--line-2); border-radius: 9px; font-size: .86rem; color: var(--ink-2); cursor: pointer; background: var(--panel); }
.opts input:checked + span { border-color: var(--gold); color: var(--gold-2); background: rgba(230,174,46,.08); }
.opts input:disabled + span { opacity: .45; text-decoration: line-through; cursor: not-allowed; }
.opts input:focus-visible + span { outline: 2px solid rgba(79,139,255,.75); outline-offset: 2px; }
.qty { display: inline-flex; align-items: center; height: 42px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); overflow: hidden; }
.qty button { width: 38px; height: 100%; border: 0; background: transparent; cursor: pointer; font-size: 1.1rem; color: var(--ink-2); }
.qty input { width: 46px; height: 100%; border: 0; background: transparent; text-align: center; font: 600 .95rem var(--mono); -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-row { display: flex; gap: 10px; flex-wrap: wrap; }
.buy-row .btn { flex: 1; min-width: 150px; }
.box { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 14px 16px; display: grid; gap: 10px; }
.box h3 { font-size: .95rem; font-weight: 600; }
.box-dashed { border-style: dashed; border-color: var(--line-2); }
.note-line { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--ink-2); }
.note-line svg { width: 18px; height: 18px; flex: none; color: var(--gold); margin-top: 1px; }
.stack { display: flex; gap: 6px; flex-wrap: wrap; }
.stack span { padding: 4px 9px; border-radius: 7px; font: 500 .76rem var(--mono); background: var(--panel-3); color: var(--ink-2); border: 1px solid var(--line-2); }
.creds { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; }
.creds .k { font-size: .78rem; color: var(--ink-3); }
.creds .v { font: 500 .84rem var(--mono); overflow-wrap: anywhere; min-width: 0; }
.copy { border: 1px solid var(--line-2); background: var(--panel-2); color: var(--gold-2); font: 600 .74rem var(--font); padding: 5px 9px; border-radius: 7px; cursor: pointer; }
.desc { color: var(--ink-2); line-height: 1.7; overflow-wrap: anywhere; }
.desc p + p { margin-top: 10px; }
.desc ul { margin: 8px 0; padding-left: 20px; }
.section { margin-top: 36px; display: grid; gap: 14px; }
.section > h2 { font-size: 1.15rem; font-weight: 650; }
.files li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .86rem; }
.files { list-style: none; margin: 0; padding: 0; }
.files li:last-child { border-bottom: 0; }

.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(4,6,12,.92); display: grid; place-items: center; padding: 24px; }
.lightbox img { max-height: 88vh; max-width: 100%; border-radius: 10px; }
.lightbox button { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: calc(14px + env(safe-area-inset-right, 0px)); }

/* ── Forms ── */
.field { display: grid; gap: 6px; min-width: 0; }
.input, .textarea { width: 100%; min-height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); padding: 0 13px; color: var(--ink); font-size: 16px; }
.textarea { min-height: 84px; padding: 10px 13px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--gold); outline: none; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .f2 { grid-template-columns: 1fr; } }
.hint { font-size: .76rem; color: var(--ink-3); }

/* ── Cart & checkout ── */
.co { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .co { grid-template-columns: minmax(0, 1fr); } }
.co-side { position: sticky; top: calc(80px + env(safe-area-inset-top, 0px)); display: grid; gap: 12px; }
@media (max-width: 900px) { .co-side { position: static; } }
.step { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.step + .step { margin-top: 14px; }
.step h2 { font-size: 1rem; font-weight: 650; display: flex; gap: 10px; align-items: center; }
.step h2 .n { width: 24px; height: 24px; border-radius: 50%; background: var(--panel-3); display: grid; place-items: center; font: 600 .76rem var(--mono); color: var(--gold-2); }
.line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line .nm { font-weight: 600; font-size: .9rem; }
.line .sub { font-size: .78rem; color: var(--ink-3); }
.line .problem { font-size: .78rem; color: var(--bad); font-weight: 600; }
.summary { display: grid; gap: 8px; font-size: .9rem; }
.summary .r { display: flex; justify-content: space-between; gap: 10px; }
.summary .r span:last-child { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.summary .tot { font-weight: 700; font-size: 1.05rem; padding-top: 10px; border-top: 1px solid var(--line); }
.summary .disc { color: var(--ok); }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--panel); cursor: pointer; transition: border-color 160ms, background-color 160ms; }
.radio-card input { margin-top: 3px; accent-color: var(--gold); width: 16px; height: 16px; flex: none; }
.radio-card:has(input:checked) { border-color: var(--gold); background: rgba(230,174,46,.06); }
.radio-card.is-off { opacity: .5; cursor: not-allowed; }
.radio-card .t { font-weight: 600; font-size: .9rem; }
.radio-card .s { font-size: .78rem; color: var(--ink-3); }
.radio-card .pr { margin-left: auto; font: 600 .86rem var(--mono); white-space: nowrap; }
.radios { display: grid; gap: 8px; }
.notice { padding: 10px 12px; border-radius: 10px; font-size: .84rem; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); }

/* ── Order page ── */
.o-head { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-bottom: 18px; }
.o-head h1 { font-size: 1.6rem; font-weight: 700; }
.timeline { display: grid; }
.timeline .st { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; position: relative; padding-bottom: 16px; }
.timeline .st::before { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: var(--line-2); }
.timeline .st:last-child::before { display: none; }
.timeline .st.done::before { background: var(--gold); }
.timeline .b { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--bg); margin-top: 2px; position: relative; z-index: 1; }
.timeline .done .b { border-color: var(--gold); background: var(--gold); }
.timeline .now .b { border-color: var(--gold); box-shadow: 0 0 0 5px rgba(230,174,46,.18); }
.timeline .t { font-weight: 600; font-size: .92rem; }
.timeline .s { font-size: .78rem; color: var(--ink-3); }
.code-box { font: 500 1rem var(--mono); letter-spacing: .06em; background: var(--bg); border: 1px dashed var(--line-2); border-radius: 9px; padding: 10px 12px; color: var(--gold-2); overflow-wrap: anywhere; }
.dl-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dl-row:last-child { border-bottom: 0; }

/* ── Footer ── */
.s-foot { border-top: 1px solid var(--line); padding-block: 26px calc(26px + env(safe-area-inset-bottom, 0px)); color: var(--ink-3); font-size: .84rem; }
.s-foot .row { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.s-foot a:hover { color: var(--ink); }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 95; background: var(--panel-3); border: 1px solid var(--line-2); color: var(--ink); padding: 11px 16px; border-radius: 11px; font-size: .9rem; box-shadow: 0 20px 40px -18px rgba(0,0,0,.8); transition: opacity 200ms var(--ease), transform 200ms var(--ease); pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.bad { border-color: rgba(248,113,113,.5); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; } }

.chips-sub { flex-basis:100%; order:3; padding-top:2px; }
.chips-sub .chip { font-size:.82rem; padding:5px 11px; }

/* ═══════════════ Store front layouts (Admin → Store → Settings → Store front layout) ═══════════════ */
.st-preview { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px; border: 1px dashed var(--gold); border-radius: 12px; background: color-mix(in srgb, var(--gold) 8%, transparent); font-size: .86rem; color: var(--ink-2); }
.st-preview b { color: var(--ink); }
.st-front .eyebrow { font: 600 .7rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.st-front .n { font: 500 .72rem var(--mono); opacity: .7; }
.st-sec-h { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin: 26px 0 12px; }
.st-sec-h h2 { font-size: 1.12rem; display: flex; align-items: center; gap: 10px; }
.st-sec-h h2 small { font-size: .74rem; color: var(--ink-3); font-weight: 500; }
.st-sec-h > a { font-size: .85rem; color: var(--gold-2); white-space: nowrap; }
.st-trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 34px 0 10px; }
.st-trust > div { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--panel); font-size: .83rem; color: var(--ink-3); }
.st-trust b { display: block; color: var(--ink); font-size: .9rem; margin-bottom: 2px; }
@media (max-width: 700px) { .st-trust { grid-template-columns: 1fr; } }
.sw { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--ink-2); cursor: pointer; white-space: nowrap; user-select: none; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw i { width: 34px; height: 20px; border-radius: 999px; background: var(--line-2); position: relative; transition: background-color 160ms; flex: none; }
.sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink-2); transition: left 160ms var(--ease), background-color 160ms; }
.sw input:checked + i { background: var(--gold); }
.sw input:checked + i::after { left: 17px; background: var(--on-gold); }
.sw input:focus-visible + i { outline: 2px solid rgba(79,139,255,.75); outline-offset: 2px; }
/* tints for category icons */
.tint-0 { background: rgba(79,139,255,.14); color: #6FA0FF; }
.tint-1 { background: rgba(248,113,113,.14); color: #F28B8B; }
.tint-2 { background: rgba(52,211,153,.14); color: #34C48E; }
.tint-3 { background: rgba(167,139,250,.16); color: #9F86F5; }
.tint-4 { background: rgba(230,174,46,.16); color: var(--gold); }
.tint-5 { background: rgba(45,212,191,.14); color: #2EBFAE; }
.ta-sub { display: flex; gap: 6px; flex-wrap: wrap; margin: -2px 0 14px; }
.ta-sub a { border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 12px; font-size: .8rem; color: var(--ink-2); }
.ta-sub a:hover { color: var(--ink); }
.ta-sub a.on { border-color: var(--gold); color: var(--gold-2); font-weight: 600; }
.ta-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ── Category tiles ── */
.ta-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-bottom: 8px; }
.ta-main { position: relative; overflow: hidden; padding: 28px; border-radius: 18px; border: 1px solid var(--line-2); display: grid; gap: 12px; align-content: center; min-height: 220px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(230,174,46,.2), transparent 55%), radial-gradient(90% 120% at 100% 100%, rgba(79,139,255,.12), transparent 60%), var(--panel-2); }
.ta-main h1 { font-size: clamp(1.55rem, 3.4vw, 2.35rem); font-weight: 700; letter-spacing: -.03em; }
.ta-main p { color: var(--ink-2); max-width: 54ch; }
.ta-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.ta-side { display: grid; gap: 12px; }
.ta-perk { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); min-width: 0; transition: border-color 160ms; }
a.ta-perk:hover { border-color: var(--line-2); }
.ta-perk .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--panel-3); color: var(--gold-2); flex: none; }
.ta-perk .ic svg { width: 22px; height: 22px; }
.ta-thumb { width: 64px; flex: none; }
.ta-thumb .ph { border-radius: 9px; }
.ta-txt { display: grid; gap: 2px; min-width: 0; }
.ta-txt b { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta-txt > span:not(.eyebrow) { font-size: .8rem; color: var(--ink-3); }
.ta-txt .eyebrow { font-size: .62rem; color: var(--ink-3); }
@media (max-width: 860px) { .ta-hero { grid-template-columns: 1fr; } .ta-side { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ta-perk { flex-direction: column; align-items: flex-start; } }
@media (max-width: 620px) { .ta-side { grid-template-columns: 1fr; } .ta-perk { flex-direction: row; align-items: center; } .ta-main { padding: 22px; min-height: 0; } }
.ta-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
@media (max-width: 560px) { .ta-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.ta-cat { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--panel); display: grid; gap: 6px; align-content: start; min-width: 0; transition: border-color 160ms, transform 200ms var(--ease); }
@media (hover: hover) { .ta-cat:hover { border-color: var(--line-2); transform: translateY(-2px); } }
.ta-cat.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.ta-cat .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 4px; }
.ta-cat .ic svg { width: 22px; height: 22px; }
.ta-cat b { font-size: .9rem; line-height: 1.3; overflow-wrap: anywhere; }
.ta-cat small { font-size: .76rem; color: var(--ink-3); }
.ta-cat.is-soon { opacity: .72; }
.ta-cat em { font-style: italic; }
.ta-bar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 22px 0 14px; scroll-margin-top: 80px; }
.ta-types { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; max-width: 100%; }
.ta-types::-webkit-scrollbar { display: none; }
.ta-type { flex: none; display: inline-flex; gap: 7px; align-items: center; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); font-size: .85rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; transition: background-color 160ms, color 160ms; }
.ta-type:hover { color: var(--ink); }
.ta-type svg { width: 16px; height: 16px; flex: none; }
.ta-type.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ── Sidebar filters ── */
.sb-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 4px 0 16px; scroll-margin-top: 80px; }
.sb-top h1 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); display: flex; align-items: center; gap: 10px; }
.sb-count { font-size: .8rem; font-weight: 500; color: var(--ink-3); padding: 2px 9px; border: 1px solid var(--line-2); border-radius: 999px; }
.sb-crumb { font-size: .82rem; color: var(--ink-3); margin-bottom: 4px; }
.sb-crumb a:hover { color: var(--ink); }
.sb-tools { display: flex; gap: 8px; align-items: center; }
.sb-fbtn { display: none; }
.sb-badge { min-width: 20px; height: 20px; border-radius: 999px; background: var(--gold); color: var(--on-gold); font: 700 .72rem var(--mono); display: inline-grid; place-items: center; padding: 0 5px; }
.sb-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; align-items: start; }
.sb-side { position: sticky; top: 80px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 4px 0; max-height: calc(100vh - 96px); overflow: auto; }
.sb-grp { padding: 12px 14px; border-bottom: 1px solid var(--line); margin: 0; }
.sb-grp:last-child { border-bottom: 0; }
.sb-grp h4 { margin: 0 0 8px; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.sb-cat { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; font-size: .88rem; color: var(--ink-2); }
.sb-cat:hover { background: var(--panel-2); color: var(--ink); }
.sb-cat.on { background: var(--panel-3); color: var(--ink); font-weight: 600; }
.sb-cat .l { display: flex; gap: 8px; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.sb-cat svg { width: 16px; height: 16px; flex: none; }
.sb-cat.is-soon { opacity: .7; }
.sb-subs { margin: 2px 0 4px 24px; display: grid; border-left: 1px solid var(--line-2); padding-left: 6px; }
.sb-subs .sb-cat { font-size: .83rem; padding: 5px 8px; }
.sb-opt { display: flex; gap: 9px; align-items: center; padding: 6px 4px; font-size: .88rem; color: var(--ink-2); border-radius: 8px; }
.sb-opt:hover { color: var(--ink); }
.sb-opt i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--ink-3); flex: none; position: relative; }
.sb-opt.on { color: var(--ink); font-weight: 600; }
.sb-opt.on i { border-color: var(--gold); }
.sb-opt.on i::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--gold); }
.sb-opt .n { margin-left: auto; }
.sb-opt.is-zero { opacity: .5; }
.sb-price { display: flex; gap: 6px; }
.sb-price input { width: 100%; min-width: 0; height: 36px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); padding: 0 10px; font: 500 .85rem var(--mono); }
.sb-active { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.sb-active a { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--panel-3); font-size: .8rem; }
.sb-active a i { font-style: normal; color: var(--ink-3); }
.sb-active a:hover i { color: var(--bad); }
.sb-active a.clear { background: none; color: var(--gold-2); }
.sb-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.sb-close { display: none; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 1; }
.sb-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 69; }
@media (max-width: 860px) {
  .sb-layout { grid-template-columns: minmax(0, 1fr); }
  .sb-fbtn { display: inline-flex; }
  .sb-side { display: none; position: fixed; inset: auto 0 0 0; top: auto; max-height: 82vh; z-index: 70; border-radius: 18px 18px 0 0; box-shadow: 0 -20px 60px rgba(0,0,0,.45); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .sb-side.open { display: block; }
  .sb-close { display: flex; }
  .sb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* ── Tabs + shelves ── */
.sh-tabs { position: sticky; top: 64px; z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); margin: -22px 0 18px; }
@media (max-width: 760px) { .sh-tabs { position: static; } }
.sh-tabs-row { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.sh-tabs-row::-webkit-scrollbar { display: none; }
.sh-tab { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 12px 10px; color: var(--ink-3); font-size: .8rem; font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; min-width: 84px; flex: none; transition: color 160ms; }
.sh-tab svg { width: 22px; height: 22px; }
.sh-tab:hover { color: var(--ink); }
.sh-tab.on { color: var(--gold-2); border-bottom-color: var(--gold); }
.sh-tab.is-soon { opacity: .6; }
.sh-hero { border-radius: 18px; padding: 22px 24px; border: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap;
  background: linear-gradient(100deg, rgba(230,174,46,.16), transparent 50%), var(--panel-2); }
.sh-hero h1 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); font-weight: 700; letter-spacing: -.02em; margin-top: 4px; }
.sh-hero p { color: var(--ink-2); font-size: .9rem; margin-top: 4px; max-width: 60ch; }
.sh-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.sh-quick a { display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line-2); font-size: .82rem; font-weight: 600; }
.sh-quick a:hover { border-color: var(--gold); }
.sh-quick svg { width: 16px; height: 16px; }
.sh-ic { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; }
.sh-ic svg { width: 17px; height: 17px; }
.sh-shelf { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 12px) / 4); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.sh-shelf > * { scroll-snap-align: start; }
@media (max-width: 1000px) { .sh-shelf { grid-auto-columns: calc((100% - 2 * 12px) / 3); } }
@media (max-width: 720px) { .sh-shelf { grid-auto-columns: 46%; gap: 10px; } }
.sh-soon { margin-top: 18px; font-size: .85rem; color: var(--ink-3); }
.sh-filter { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 4px 0 12px; scroll-margin-top: 140px; }
.sh-types { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.sh-types a { flex: none; border: 1px solid var(--line-2); background: var(--panel); border-radius: 8px; padding: 7px 12px; font-size: .82rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.sh-types a.on { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
