:root {
  --bg: #05050a; --surface: #0e0e18; --tile: #12121f; --line: #25253a; --text: #f1f2fa; --muted: #a4a6c0;
  --accent: #00f0ff; --ink: #f1f2fa; --on-ink: #05050a;
  --t0: #00f0ff; --t1: #9bff2f; --t2: #ff2bd6;
  --cyan: #00f0ff; --lime: #9bff2f; --magenta: #ff2bd6;
  --danger: #ff6b81; --ok: #9bff2f; --warn: #ffc14d; --shadow: 0 8px 30px rgba(0, 0, 0, .55);
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 22px; --gutter: 16px; --dock-h: 76px;
  --grad: linear-gradient(110deg, var(--cyan), var(--lime) 55%, var(--magenta));
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #f9f9fa; --surface: #ffffff; --tile: #eeeef1; --line: #e2e2e8; --text: #101014; --muted: #5f5f6c;
  --accent: #007c86; --ink: #101014; --on-ink: #ffffff;
  --t0: #0aa5b2; --t1: #5aa800; --t2: #d11aa8;
  --danger: #c8283f; --ok: #3f7d00; --warn: #a86b00; --shadow: 0 6px 24px rgba(16, 16, 20, .1);
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--body); -webkit-tap-highlight-color: transparent; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3 { font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }

.app { max-width: 1100px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--dock-h) + 24px + env(safe-area-inset-bottom)); }
.announce { text-align: center; font-size: 13px; font-weight: 600; padding: 8px var(--gutter); background: var(--ink); color: var(--on-ink); }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px var(--gutter); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 40px; width: auto; }
.brand img.word { display: none; }
.searchpill { flex: 1; white-space: nowrap; overflow: hidden; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px; background: var(--tile); border-radius: 999px; color: var(--muted); font-size: 15px; }
.searchbox { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; background: var(--tile); border-radius: 999px; color: var(--muted); }
.searchbox input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); }
.searchbox:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.iconbtn { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--tile); flex: none; }
.iconbtn:hover { background: var(--line); }

.view { padding: 8px var(--gutter) 0; outline: 0; animation: in .25s ease-out; }
@keyframes in { from { opacity: 0; } to { opacity: 1; } }
.sec { margin-top: 32px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.sec-head h2 { font-size: 22px; }
.link { color: var(--accent); font-weight: 600; font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }

/* home hero */
.intro { text-align: center; padding: 22px 8px 20px; }
.intro h1 { font-size: clamp(32px, 9.5vw, 56px); letter-spacing: -.035em; max-width: 14ch; margin: 0 auto; }
.intro p { color: var(--muted); margin: 10px auto 0; max-width: 34ch; }
.hero { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter); }
.hero::-webkit-scrollbar, .rail::-webkit-scrollbar, .chips::-webkit-scrollbar, .cats::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 90%; max-width: 560px; scroll-snap-align: center; position: relative; min-height: 220px; padding: 22px; border-radius: 26px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; background: #07070d; color: #f1f2fa; isolation: isolate; }
.slide::before { content: ''; position: absolute; inset: 0; z-index: -2; background: radial-gradient(70% 90% at 90% 20%, var(--tone), transparent 65%); opacity: .35; }
.slide .ghost { position: absolute; z-index: -1; right: -8%; top: 4%; width: 50%; opacity: .75; filter: drop-shadow(0 0 24px var(--tone)); }
.slide.cyan { --tone: #00f0ff; } .slide.lime { --tone: #9bff2f; } .slide.magenta { --tone: #ff2bd6; }
.slide h2 { font-size: 28px; max-width: 10ch; letter-spacing: -.03em; }
.slide p { color: #b9bbd2; font-size: 14px; max-width: 22ch; }
.slide .btn { align-self: flex-start; margin-top: 12px; background: #f1f2fa; color: #05050a; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 600; background: var(--ink); color: var(--on-ink); transition: opacity .2s, transform .1s; }
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: var(--tile); color: var(--text); }
.btn.block { width: 100%; }

/* categories */
.cats { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; margin: 18px calc(var(--gutter) * -1) 0; padding: 2px var(--gutter); }
.cat { flex: none; width: 72px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; color: var(--text); }
.cat .ring { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--tile); transition: background .2s; }
.cat:hover .ring { background: var(--line); }
.cat .ico { width: 26px; height: 26px; color: var(--c); }
.cat:nth-child(3n+1) { --c: var(--t0); } .cat:nth-child(3n+2) { --c: var(--t1); } .cat:nth-child(3n) { --c: var(--t2); }

/* product cards */
.rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter) 6px; }
.rail .card { flex: 0 0 168px; scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; }
.card .pic { aspect-ratio: 1; background: var(--tile); border-radius: var(--r); overflow: hidden; position: relative; }
.card .pic img, .art { width: 100%; height: 100%; object-fit: cover; }
.card .tag { position: absolute; top: 10px; left: 10px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface); color: var(--text); }
.card .tag.out { color: var(--muted); }
.card .info { padding: 0 4px; display: flex; flex-direction: column; gap: 2px; }
.card .name { font-weight: 500; font-size: 15px; line-height: 1.3; letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.was { margin-left: 6px; font-weight: 400; font-size: 13px; color: var(--muted); text-decoration: line-through; }
.card .full { position: absolute; inset: 0; z-index: 1; border-radius: var(--r); }
.add { position: absolute; z-index: 2; right: 8px; bottom: 8px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--text); box-shadow: var(--shadow); transition: background .2s, color .2s; }
.add:hover, .add:active { background: var(--ink); color: var(--on-ink); }
.add:disabled { opacity: .4; }
.card .pic-wrap { position: relative; }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter); }
.chip { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--tile); font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--on-ink); }
.toolbar { display: flex; align-items: center; justify-content: space-between; margin: 14px 0; color: var(--muted); font-size: 14px; }
.toolbar select { background: var(--tile); border: 0; border-radius: 999px; padding: 0 14px; min-height: 40px; }

/* trust / lists */
.trust { display: grid; gap: 10px; margin-top: 24px; }
.trust div { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--tile); border-radius: var(--r); }
.trust .ico { color: var(--accent); width: 24px; height: 24px; }
.trust b { display: block; font-size: 15px; }
.trust span { color: var(--muted); font-size: 14px; }

/* product page */
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 26px; background: var(--tile); }
.gallery > * { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1; max-height: 520px; object-fit: cover; }
.pdp h1 { font-size: 28px; margin-top: 18px; letter-spacing: -.03em; }
.pdp .meta { color: var(--muted); margin-top: 4px; font-size: 14px; }
.pdp .pricing { display: flex; align-items: baseline; gap: 4px; margin: 12px 0; }
.pdp .pricing .price { font-size: 28px; }
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ok); }
.stock.low { color: var(--warn); } .stock.out { color: var(--danger); }
.pdp p { color: var(--text); opacity: .82; max-width: 62ch; }
.specs { margin-top: 22px; background: var(--tile); border-radius: var(--r); overflow: hidden; }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 18px; border-top: 1px solid var(--line); font-size: 15px; }
.specs div:first-child { border-top: 0; }
.specs span { color: var(--muted); }
.specs b { text-align: right; font-weight: 600; }
.buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.buybar .in { max-width: 1100px; margin: 0 auto; display: flex; gap: 12px; align-items: center; }
.buybar .btn { flex: 1; }
.stepper { display: inline-flex; align-items: center; background: var(--tile); border-radius: 999px; }
.stepper button { width: 44px; height: 44px; display: grid; place-items: center; }
.stepper output { min-width: 24px; text-align: center; font-weight: 600; }

/* cart */
.line { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line .pic { width: 88px; height: 88px; border-radius: 16px; overflow: hidden; flex: none; background: var(--tile); }
.line .pic img { width: 100%; height: 100%; object-fit: cover; }
.line .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.line .name { font-weight: 500; line-height: 1.3; }
.line .row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.line .stepper button { width: 38px; height: 38px; }
.line .iconbtn { width: 38px; height: 38px; background: none; }
.summary { background: var(--tile); border-radius: var(--r); padding: 16px 18px; margin: 18px 0; }
.summary div { display: flex; justify-content: space-between; padding: 4px 0; color: var(--muted); }
.summary div.total { color: var(--text); font-weight: 700; font-size: 20px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.hint { font-size: 14px; color: var(--ok); margin-top: 6px; }

.form { display: grid; gap: 14px; margin-top: 12px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input, .field textarea { width: 100%; min-height: 50px; padding: 12px 16px; background: var(--tile); border: 0; border-radius: 16px; outline: 0; }
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field textarea:focus { box-shadow: 0 0 0 2px var(--accent); }
.err { color: var(--danger); font-size: 14px; min-height: 1.4em; }

.empty { text-align: center; padding: 56px 12px; color: var(--muted); }
.empty .ico { width: 44px; height: 44px; margin: 0 auto 14px; color: var(--accent); }
.empty h2 { color: var(--text); font-size: 22px; margin-bottom: 6px; }
.empty .btn { margin-top: 18px; }

.done { text-align: center; padding: 40px 8px; }
.done .tick { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); }
.done .tick .ico { width: 36px; height: 36px; stroke-width: 2.4; }
.done h1 { font-size: 28px; }
.done .code { display: inline-block; margin: 14px 0; padding: 8px 18px; background: var(--tile); border-radius: 14px; font-weight: 700; font-size: 22px; letter-spacing: .06em; }
.done p { color: var(--muted); max-width: 36ch; margin: 0 auto 8px; }
.done .btn { margin: 8px 4px 0; }

.help-list { display: grid; gap: 10px; margin-top: 16px; }
.help-list a, .help-list div, .help-list button { display: flex; gap: 14px; align-items: center; padding: 16px 18px; background: var(--tile); border-radius: var(--r); text-align: left; width: 100%; }
.help-list .ico { color: var(--accent); }
.help-list small { display: block; color: var(--muted); }

/* dock */
.tabbar { position: fixed; z-index: 35; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); width: min(400px, calc(100% - 32px)); display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; background: rgba(10, 10, 18, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: 999px; box-shadow: 0 10px 34px rgba(0, 0, 0, .28); }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; border-radius: 999px; font-size: 12px; font-weight: 500; color: #a4a6c0; transition: color .2s, background .2s; }
.tabbar a[aria-current='page'] { color: #fff; background: rgba(255, 255, 255, .12); }
.tabbar a[aria-current='page'] .ico { stroke: var(--cyan); }
.tabbar .badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--magenta); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
body.nodock .tabbar { display: none; }
body.nodock .app { padding-bottom: 110px; }

.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--dock-h) + 28px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-weight: 600; font-size: 14px; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.nodock .toast { bottom: 96px; }

.skel { background: linear-gradient(90deg, var(--tile) 25%, var(--line) 50%, var(--tile) 75%); background-size: 200% 100%; animation: sh 1.2s infinite; border-radius: var(--r); min-height: 200px; }
@keyframes sh { to { background-position: -200% 0; } }

/* intro (always dark, it is the logo's own background) */
.splash { position: fixed; inset: 0; z-index: 100; background: #03030a; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; animation: splash-out .5s ease 2.7s forwards; cursor: pointer; }
.splash.out { opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .4s; animation: none; }
.no-intro .splash { display: none; }
.splash .mark { width: min(46vw, 230px); opacity: 0; transform: scale(.82); filter: blur(10px) drop-shadow(0 0 30px rgba(0, 240, 255, .5)); animation: mark-in 1s cubic-bezier(.2, .8, .2, 1) .1s forwards; }
.splash .word { width: min(70vw, 360px); clip-path: inset(0 100% 0 0); animation: wipe .8s cubic-bezier(.6, 0, .2, 1) 1s forwards; }
.splash img, .slide .ghost { height: auto; }
.splash .tag { color: #a4a6c0; font-size: 13px; letter-spacing: .02em; opacity: 0; animation: fade .6s ease 1.7s forwards; }
@keyframes mark-in { to { opacity: 1; transform: none; filter: blur(0) drop-shadow(0 0 22px rgba(0, 240, 255, .25)); } }
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes fade { to { opacity: 1; } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }

@media (max-width: 699px) { .announce { display: none; } }
@media (min-width: 700px) {
  :root { --gutter: 28px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 28px 18px; }
  .slide { flex-basis: 520px; min-height: 280px; }
  .rail .card { flex-basis: 210px; }
  .trust { grid-template-columns: repeat(3, 1fr); }
  .brand img.mark { display: none; }
  .brand img.word { display: block; height: 30px; }
  .pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
  .pdp .gallery { position: sticky; top: 90px; }
  .pdp h1 { margin-top: 0; }
  .view.narrow { max-width: 640px; margin: 0 auto; }
}
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
