:root {
  --bg: #f5f6f8; --surface: #ffffff; --ink: #0f1b2d; --muted: #5b6676; --line: #dfe3e9;
  --brand: #0b1018; --accent: #e11d2e; --accent-ink: #ffffff; --silver: #c9d1db; --good: #2b8a3e; --warn: #e67700; --bad: #c92a2a;
  --soft: #eef1f5; --radius: 10px;
  --display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif; --body: 'Inter', 'Segoe UI', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0b121c; --surface: #141f2e; --ink: #e8edf4; --muted: #93a0b3; --line: #243247; --brand: #070c14; --soft: #1b283a;
  --good: #51cf66; --warn: #ffa94d; --bad: #ff8787; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0b121c; --surface: #141f2e; --ink: #e8edf4; --muted: #93a0b3; --line: #243247; --brand: #070c14; --soft: #1b283a;
  --good: #51cf66; --warn: #ffa94d; --bad: #ff8787; color-scheme: dark; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; text-wrap: balance; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left)); }
.muted { color: var(--muted); } .small { font-size: 13px; } .num { font-variant-numeric: tabular-nums; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface);
  padding: 9px 16px; border-radius: 8px; cursor: pointer; font-weight: 600; text-decoration: none; min-height: 40px; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.dark { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.wa { background: #1faa59; border-color: #1faa59; color: #fff; }
.btn.sm { padding: 5px 10px; min-height: 32px; font-size: 13px; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.field { display: grid; gap: 4px; } .field label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.field input, .field select, .field textarea, .input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-height: 40px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--soft); }
.pill.good { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.pill.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.pill.bad { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--brand); color: #fff;
  padding: 10px 18px; border-radius: 8px; opacity: 0; pointer-events: none; transition: .25s; z-index: 99; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- storefront ---------- */
.topbar { background: var(--brand); color: #cfd7e3; font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 12px; padding-block: 7px; flex-wrap: wrap; }
header.site { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
header.site .wrap { display: flex; align-items: center; gap: 16px; padding-block: 12px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.logo b { color: var(--accent); }
.search { flex: 1; max-width: 520px; }
.cartbtn { margin-left: auto; position: relative; }
.badge { background: var(--accent); color: var(--accent-ink); border-radius: 99px; font-size: 12px; padding: 0 7px; font-weight: 700; }
.hero { background: var(--brand); color: #fff; }
.hero .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; padding-block: 48px; align-items: center; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); letter-spacing: -.03em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: #b9c4d3; max-width: 52ch; margin: 14px 0 22px; font-size: 17px; }
.hero .row { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .perks { display: grid; gap: 10px; }
.perk { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 14px 16px; }
.perk b { display: block; font-family: var(--display); }
.perk span { color: #b9c4d3; font-size: 14px; }
.cats { display: flex; gap: 8px; overflow-x: auto; padding-block: 18px; scrollbar-width: thin; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 7px 14px; cursor: pointer; font-weight: 600; font-size: 14px; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; padding-bottom: 40px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card .pic { aspect-ratio: 4/3; display: grid; place-items: center; background: var(--soft); position: relative; }
.card .pic .tag { position: absolute; top: 8px; left: 8px; }
.ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.phfb { display: grid; place-items: center; width: 100%; height: 100%; }
.card .pic .tag { z-index: 1; }
.thumb { width: 40px; height: 40px; border-radius: 6px; overflow: hidden; background: var(--soft); display: grid; place-items: center; flex: none; }
.pos .it .thumb { width: 100%; height: 90px; border-radius: 6px; }
.photobox { display: flex; gap: 12px; align-items: center; }
.photobox .thumb { width: 84px; height: 84px; }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { font-size: 15px; font-weight: 600; font-family: var(--body); }
.card .price { font-family: var(--display); font-size: 20px; font-weight: 700; }
.card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; }
.sec { padding-block: 40px; } .sec h2 { font-size: 28px; margin-bottom: 18px; }
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.how > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.how h3 { margin-bottom: 6px; font-size: 17px; }
footer.site { background: var(--brand); color: #b9c4d3; padding-block: 28px; font-size: 14px; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer.site a { color: #fff; }
.drawer { position: fixed; inset: 0; z-index: 50; display: none; }
.drawer.on { display: block; }
.drawer .shade { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.drawer .panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(440px, 100%); background: var(--surface); display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
.drawer .panel header { padding: 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.drawer .panel .list { flex: 1; overflow: auto; padding: 8px 16px; }
.drawer .panel footer { border-top: 1px solid var(--line); padding: 16px; display: grid; gap: 10px; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; }
.qty button { border: 0; background: none; width: 32px; height: 32px; cursor: pointer; font-size: 18px; }
.qty span { min-width: 26px; text-align: center; font-weight: 600; }
.total { display: flex; justify-content: space-between; font-family: var(--display); font-size: 20px; font-weight: 700; }

/* ---------- admin ---------- */
.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--brand); color: #cfd7e3; padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; }
.side .logo { color: #fff; padding: 0 10px 14px; display: block; }
.side a.nav { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; text-decoration: none; font-weight: 500; }
.side a.nav:hover { background: rgba(255,255,255,.08); }
.side a.nav.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.side .sp { flex: 1; }
.main { padding: 22px max(16px, env(safe-area-inset-right)) 60px 24px; min-width: 0; }
.main h1 { font-size: 26px; margin-bottom: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .l { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.kpi .v { font-family: var(--display); font-size: 28px; font-weight: 700; margin-top: 2px; }
.kpi .s { font-size: 13px; color: var(--muted); }
.panel2 { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.panel2 h2 { font-size: 16px; margin-bottom: 12px; }
.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-bottom: 14px; }
.cols > * { min-width: 0; }
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.bars .b i { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.bars .b small { font-size: 11px; color: var(--muted); } .bars .b em { font-style: normal; font-size: 11px; font-weight: 600; }
.pos { display: grid; grid-template-columns: 1fr 380px; gap: 14px; align-items: start; }
.pos .items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.pos .it { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; cursor: pointer; text-align: left; display: grid; gap: 2px; }
.pos .it:hover { border-color: var(--accent); }
.pos .it:disabled { opacity: .4; cursor: not-allowed; }
.pos .it b { font-size: 13px; font-weight: 600; } .pos .it .p { font-family: var(--display); font-weight: 700; }
.ticket { position: sticky; top: 14px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.toolbar .grow { flex: 1; min-width: 180px; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; width: min(380px, 100%); display: grid; gap: 14px; }
dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); width: min(460px, calc(100% - 24px)); padding: 22px; }
dialog::backdrop { background: rgba(0,0,0,.5); }
.form2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form2 .full { grid-column: 1 / -1; }
.receipt { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: var(--soft); border-radius: 8px; padding: 14px; white-space: pre-wrap; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding-block: 32px; }
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; overflow-x: auto; padding: 8px; align-items: center; }
  .side .logo, .side .sp { display: none; }
  .side a.nav { white-space: nowrap; }
  .main { padding-left: max(16px, env(safe-area-inset-left)); }
  .cols, .pos { grid-template-columns: 1fr; }
  .ticket { position: static; }
  .topbar .hide-sm { display: none; }
  header.site .wrap { flex-wrap: wrap; } .search { order: 3; max-width: none; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- v3 additions ---------- */
.who { padding: 4px 12px 12px; display: grid; gap: 2px; }
.who b { color: #fff; font-family: var(--display); font-size: 17px; } .who span { font-size: 12px; color: #93a0b3; }
.side select.input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #fff; }
.side select.input option { color: #0f1b2d; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.seg button { border: 0; background: var(--surface); padding: 8px 18px; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--brand); color: #fff; } .seg button:disabled { opacity: .4; cursor: not-allowed; }
.payrow { display: grid; grid-template-columns: 1fr 120px; gap: 6px; margin-bottom: 8px; padding: 8px; background: var(--soft); border-radius: 8px; }
.payrow input, .payrow select { padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); min-height: 36px; min-width: 0; width: 100%; }
.payrow input[data-f="ref"], .payrow button { grid-column: 1 / -1; }
.splitbar { height: 10px; background: var(--soft); border-radius: 99px; overflow: hidden; margin: 6px 0 10px; }
.splitbar i { display: block; height: 100%; background: var(--accent); }
.steps { display: grid; gap: 0; margin: 14px 0; }
.step { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding-bottom: 14px; position: relative; color: var(--muted); }
.step::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); margin: 3px 0 0 2px; }
.step:not(:last-child)::after { content: ''; position: absolute; left: 8px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.step.done { color: var(--ink); } .step.done::before { background: var(--good); border-color: var(--good); }
.avail { display: flex; gap: 10px; font-size: 12px; color: var(--muted); }
.avail b { color: var(--ink); font-weight: 600; }
@media print {
  .side, .noprint, .toolbar, .btn, #toast { display: none !important; }
  .app { display: block; } .main { padding: 0; } body { background: #fff; color: #000; }
  .panel2, .kpi, .tablewrap { border: 1px solid #ccc; break-inside: avoid; }
}

/* ---------- v4: TinteQ brand (black / red / silver) ---------- */
:root { --ink: #11161f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --brand: #070a10; --accent: #f0303f; } }
:root[data-theme="dark"] { --brand: #070a10; --accent: #f0303f; }
.logo img { display: block; height: 52px; width: auto; border-radius: 6px; }
header.site { background: var(--brand); border-bottom: 1px solid rgba(255,255,255,.08); color: #fff; }
header.site .input { background: #fff; color: #11161f; border-color: transparent; }
header.site .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
header.site .btn.primary { background: var(--accent); border-color: var(--accent); }
.badge { background: #fff; color: var(--accent); }
.btn.primary { color: #fff; }
.hero { background: radial-gradient(1200px 500px at 85% 40%, #1a2230 0%, var(--brand) 60%); }
.hero .wrap { grid-template-columns: 1.2fr 1fr; }
.hero h1 em { color: var(--accent); }
.hero .heroLogo { justify-self: center; width: min(100%, 420px); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.strip { background: var(--surface); border-bottom: 1px solid var(--line); }
.strip .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; background: var(--line); }
.strip .wrap > div { background: var(--surface); padding: 16px 18px; }
.strip b { display: block; font-family: var(--display); } .strip span { color: var(--muted); font-size: 14px; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.services > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; border-top: 3px solid var(--accent); }
.services h3 { font-size: 18px; margin-bottom: 6px; }
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; }
.about img { width: 100%; max-width: 380px; border-radius: 16px; justify-self: center; }
.branches { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.branches > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.branches h3 { margin-bottom: 4px; }
footer.site a { color: var(--silver); }
.side { background: var(--brand); } .side a.nav.on { background: var(--accent); color: #fff; }
.side .logo img { height: 64px; margin: 0 auto 10px; }
.login .box .logo img { height: 110px; margin: 0 auto; }
.bars .b i { background: var(--accent); }
.splitbar i { background: var(--accent); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero .heroLogo { width: 220px; order: -1; } .about { grid-template-columns: 1fr; } .logo img { height: 42px; } }
.chartbox .tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--brand); color: #fff; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.4; pointer-events: none; white-space: nowrap; z-index: 5; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.chartbox .tip .muted { color: #b9c4d3; }
#etable select, #etable input { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); min-height: 36px; min-width: 0; }
#etable td { min-width: 90px; } #etable td:first-child { min-width: 220px; }
/* v4 fixes: equal-height product images, readable badges on photos, clean feature strip */
.card .pic { overflow: hidden; }
.card .pic .ph, .card .pic .phfb { position: absolute; inset: 0; }
.card .pic .tag { background: rgba(11,16,24,.88); box-shadow: 0 1px 6px rgba(0,0,0,.35); }
.card .pic .tag.good { color: #69db7c; } .card .pic .tag.warn { color: #ffa94d; } .card .pic .tag.bad { color: #ff8787; }
.strip .wrap { background: transparent; gap: 0; }
.strip .wrap > div { border-left: 1px solid var(--line); } .strip .wrap > div:first-child { border-left: 0; }
/* hidden attribute must beat display:grid/flex rules */
[hidden] { display: none !important; }

/* sidebar: scrolls on its own when the menu is taller than the screen */
.side { align-self: start; height: 100vh; max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.side a.nav { padding: 8px 12px; flex: none; }
.side .logo img { height: 52px; }
.side .sp { flex: 1 0 8px; min-height: 8px; }
@media (max-width: 860px) { .side { height: auto; max-height: none; overflow-y: visible; overflow-x: auto; align-self: stretch; } }

/* ---------- floating navigation bar (customer website) ---------- */
.fnav { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: flex; align-items: center; gap: 2px; padding: 6px;
  background: rgba(11,16,24,.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.14); border-radius: 999px;
  box-shadow: 0 12px 34px rgba(0,0,0,.45); max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none; }
.fnav::-webkit-scrollbar { display: none; }
.fnav a, .fnav .fcart { color: #cfd7e3; padding: 9px 15px; border-radius: 999px; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; border: 0; background: transparent; cursor: pointer; transition: background .2s, color .2s; }
.fnav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.fnav a.on { background: var(--accent); color: #fff; }
.fnav .fcart { background: #fff; color: #11161f; margin-left: 4px; display: inline-flex; align-items: center; gap: 6px; }
.fnav .fcart .badge { background: var(--accent); color: #fff; }
body.hasfnav #toast { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
body.hasfnav footer.site { padding-bottom: 96px; }
section[id], main[id] { scroll-margin-top: 76px; }
@media (max-width: 520px) { .fnav a, .fnav .fcart { padding: 9px 11px; font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .fnav a { transition: none; } }
@media (max-width: 430px) { .fnav .fcart { display: none; } .fnav a { padding: 9px 13px; } }

/* staff login, top right of the website */
.topbar .wrap { align-items: center; }
.topbar .topright { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.stafflogin { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: #fff !important; font-weight: 600; font-size: 13px; text-decoration: none; padding: 4px 14px; border-radius: 999px; white-space: nowrap; }
.stafflogin:hover { filter: brightness(1.1); }
.stafflogin::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; opacity: .9; }

/* theme toggle */
:root { color-scheme: light; }
.themebtn { background: transparent; color: #cfd7e3; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.themebtn:hover { background: rgba(255,255,255,.1); color: #fff; }
@media (max-width: 430px) { .topbar .wrap > span:first-child { display: none; } .topbar .topright { width: 100%; justify-content: flex-end; } }

/* ---------- v5: header, hero, floating bar and footer follow light / dark ---------- */
:root {
  --top-bg: #e8ecf1; --top-fg: #4a5565; --top-line: rgba(17,22,31,.22);
  --hdr-bg: #ffffff; --hdr-fg: #11161f; --hdr-line: #dfe3e9; --hdr-input: #f1f3f6;
  --hero-bg: radial-gradient(1200px 520px at 85% 40%, #ffffff 0%, #e9edf3 70%); --hero-fg: #11161f; --hero-muted: #4a5565; --ghost-line: rgba(17,22,31,.28);
  --fnav-bg: rgba(255,255,255,.92); --fnav-fg: #3c4655; --fnav-hover: rgba(17,22,31,.07); --fnav-line: rgba(17,22,31,.14); --fnav-cart-bg: #11161f; --fnav-cart-fg: #fff; --fnav-shadow: 0 12px 30px rgba(17,22,31,.2);
  --foot-bg: #e8ecf1; --foot-fg: #4a5565; --foot-strong: #11161f; --foot-link: #11161f;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --top-bg: #070a10; --top-fg: #cfd7e3; --top-line: rgba(255,255,255,.3);
  --hdr-bg: #0b1018; --hdr-fg: #ffffff; --hdr-line: rgba(255,255,255,.14); --hdr-input: #ffffff;
  --hero-bg: radial-gradient(1200px 500px at 85% 40%, #1a2230 0%, #0b1018 60%); --hero-fg: #ffffff; --hero-muted: #b9c4d3; --ghost-line: rgba(255,255,255,.35);
  --fnav-bg: rgba(11,16,24,.9); --fnav-fg: #cfd7e3; --fnav-hover: rgba(255,255,255,.1); --fnav-line: rgba(255,255,255,.14); --fnav-cart-bg: #ffffff; --fnav-cart-fg: #11161f; --fnav-shadow: 0 12px 34px rgba(0,0,0,.45);
  --foot-bg: #070a10; --foot-fg: #b9c4d3; --foot-strong: #ffffff; --foot-link: #c9d1db; } }
:root[data-theme="dark"] {
  --top-bg: #070a10; --top-fg: #cfd7e3; --top-line: rgba(255,255,255,.3);
  --hdr-bg: #0b1018; --hdr-fg: #ffffff; --hdr-line: rgba(255,255,255,.14); --hdr-input: #ffffff;
  --hero-bg: radial-gradient(1200px 500px at 85% 40%, #1a2230 0%, #0b1018 60%); --hero-fg: #ffffff; --hero-muted: #b9c4d3; --ghost-line: rgba(255,255,255,.35);
  --fnav-bg: rgba(11,16,24,.9); --fnav-fg: #cfd7e3; --fnav-hover: rgba(255,255,255,.1); --fnav-line: rgba(255,255,255,.14); --fnav-cart-bg: #ffffff; --fnav-cart-fg: #11161f; --fnav-shadow: 0 12px 34px rgba(0,0,0,.45);
  --foot-bg: #070a10; --foot-fg: #b9c4d3; --foot-strong: #ffffff; --foot-link: #c9d1db; }

.topbar { background: var(--top-bg); color: var(--top-fg); border-bottom: 1px solid var(--hdr-line); }
.themebtn { color: var(--top-fg); border-color: var(--top-line); }
.themebtn:hover { background: var(--fnav-hover); color: var(--hdr-fg); }
header.site { background: var(--hdr-bg); color: var(--hdr-fg); border-bottom: 1px solid var(--hdr-line); }
header.site .input { background: var(--hdr-input); color: #11161f; border: 1px solid var(--hdr-line); }
header.site .btn { background: transparent; color: var(--hdr-fg); border-color: var(--hdr-line); }
header.site .btn:hover { border-color: var(--hdr-fg); }
header.site .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.hero { background: var(--hero-bg); color: var(--hero-fg); }
.hero p { color: var(--hero-muted); }
.btn.ghost { background: transparent; color: var(--hero-fg); border-color: var(--ghost-line); }
.btn.ghost:hover { border-color: var(--hero-fg); }
.fnav { background: var(--fnav-bg); border-color: var(--fnav-line); box-shadow: var(--fnav-shadow); }
.fnav a, .fnav .fcart { color: var(--fnav-fg); }
.fnav a:hover { background: var(--fnav-hover); color: var(--hdr-fg); }
.fnav a.on { background: var(--accent); color: #fff; }
.fnav .fcart { background: var(--fnav-cart-bg); color: var(--fnav-cart-fg); }
footer.site { background: var(--foot-bg); color: var(--foot-fg); border-top: 1px solid var(--hdr-line); }
footer.site b { color: var(--foot-strong); } footer.site a { color: var(--foot-link); }
