:root {
  --bg: #0a0a0b;
  --surface: #141416;
  --surface-2: #1c1c1f;
  --surface-3: #26262a;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f5f5f6;
  --muted: #8e8e95;
  --muted-2: #5c5c63;
  --accent: #6366f1;
  --accent-2: #818cf8;
  --accent-soft: rgba(99, 102, 241, 0.14);
  --ok: #3ccf7a;
  --ok-soft: rgba(60, 207, 122, 0.14);
  --warn: #f5b83d;
  --warn-soft: rgba(245, 184, 61, 0.14);
  --danger: #ff5a4f;
  --danger-soft: rgba(255, 90, 79, 0.14);
  --info: #5aa9ff;
  --info-soft: rgba(90, 169, 255, 0.14);
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --display: 'Unbounded', 'Manrope', sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }

/* ---------- Shell / phone frame on desktop ---------- */
.stage { height: 100%; display: flex; align-items: center; justify-content: center; }
.app {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 700px) and (min-height: 700px) {
  body:not(.embed):not(.in-tg) {
    background: radial-gradient(1200px 600px at 50% -10%, rgba(99, 102, 241, 0.16), transparent 60%), #050506;
  }
  body:not(.embed):not(.in-tg) .app {
    width: 400px;
    height: min(860px, calc(100% - 48px));
    border-radius: 44px;
    border: 1px solid var(--line-2);
    box-shadow: 0 0 0 10px #111113, 0 0 0 11px #2a2a2e, 0 40px 120px rgba(0, 0, 0, 0.7);
  }
  .desk-note { display: block !important; }
}
.desk-note {
  display: none;
  position: fixed;
  left: 24px;
  bottom: 24px;
  max-width: 260px;
  color: var(--muted);
  font-size: 13px;
}
.desk-note a { color: var(--accent-2); text-decoration: none; }

/* ---------- Demo role bar ---------- */
.demobar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(8px + var(--safe-top)) 14px 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 11, 0.9);
  z-index: 30;
}
.demobar .tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent);
  border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 3px 7px;
  border-radius: 999px;
}
.seg {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 3px;
  position: relative;
}
.seg button {
  position: relative;
  z-index: 1;
  height: 30px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  transition: color 0.2s;
}
.seg button.on { color: #111; }
.seg::before {
  content: '';
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: var(--text);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.seg.right::before { transform: translateX(100%); }
.demobar .reset { color: var(--muted); padding: 6px; border-radius: 10px; }
.demobar .reset:active { background: var(--surface-2); }

/* ---------- Screen ---------- */
.screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 24px);
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.screen.no-tabs { padding-bottom: calc(110px + var(--safe-bottom)); }
.fade-in { animation: fadeIn 0.28s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.pad { padding: 0 16px; }
.hdr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 10px;
}
.hdr h1 { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.hdr .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.hdr .grow { flex: 1; min-width: 0; }
.logo-mark { width: 40px; height: 40px; border-radius: 12px; flex: none; overflow: hidden; background: var(--accent); }
.logo-mark img { width: 100%; height: 100%; object-fit: cover; }
.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  flex: none;
}
.icon-btn:active { transform: scale(0.95); }
.icon-btn svg { width: 20px; height: 20px; }
.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 2px solid var(--bg);
}
.back-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.back-btn svg { width: 20px; height: 20px; }

/* search */
.search {
  margin: 4px 16px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15px; }
.search input::placeholder { color: var(--muted-2); }

/* banner */
.banner {
  position: relative;
  margin: 0 16px 16px;
  border-radius: var(--r-lg);
  padding: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #1d1d21, #121214);
  border: 1px solid var(--line);
  min-height: 132px;
}
.banner.hot { background: linear-gradient(135deg, #818cf8 0%, #6366f1 45%, #3730a3 100%); border: 0; }
.banner .kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.75; }
.banner .ttl { font-family: var(--display); font-size: 20px; font-weight: 600; line-height: 1.1; margin: 8px 0 6px; max-width: 70%; }
.banner .txt { font-size: 13px; opacity: 0.8; max-width: 66%; }
.banner img { position: absolute; right: -10px; bottom: -14px; width: 120px; height: 150px; object-fit: cover; border-radius: 16px; transform: rotate(6deg); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); }
.timer { display: inline-flex; gap: 6px; margin-top: 10px; }
.timer span { background: rgba(0, 0, 0, 0.25); border-radius: 8px; padding: 4px 7px; font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: #cfcfd4;
  white-space: nowrap;
}
.chip.on { background: var(--text); color: #111; border-color: var(--text); }
.chip.sm { height: 30px; padding: 0 11px; font-size: 12px; }
.chips-label { padding: 0 16px 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

.result-line { display: flex; justify-content: space-between; align-items: center; padding: 2px 16px 12px; color: var(--muted); font-size: 13px; }

/* product grid */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; }
.card { position: relative; text-align: left; display: block; width: 100%; }
.card .ph { display: block; position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.card:active .ph img { transform: scale(1.03); }
.card .off {
  position: absolute; left: 8px; top: 8px;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 800;
  padding: 4px 7px; border-radius: 8px;
}
.card .ribbon {
  position: absolute; left: 8px; bottom: 8px;
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 11px; font-weight: 700;
  padding: 4px 8px; border-radius: 8px;
}
.fav {
  position: absolute; right: 8px; top: 8px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(10, 10, 11, 0.55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.fav svg { width: 16px; height: 16px; }
.fav.on { color: var(--accent); }
.fav.on svg path { fill: currentColor; }
.card .brand { margin-top: 9px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.card .name { font-size: 13.5px; font-weight: 600; margin-top: 2px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .prices { display: flex; align-items: baseline; gap: 6px; margin-top: 5px; }
.card .now { font-weight: 800; font-size: 15px; }
.card .was { color: var(--muted-2); font-size: 12px; text-decoration: line-through; }
.card .sz { margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.card .low { color: var(--accent-2); font-weight: 700; }
.card.soldout .ph img { filter: grayscale(1); opacity: 0.45; }
.card.soldout .ribbon { background: rgba(255, 255, 255, 0.92); color: #111; }

.section-t { display: flex; justify-content: space-between; align-items: baseline; padding: 26px 16px 12px; }
.section-t h3 { margin: 0; font-size: 17px; font-weight: 800; }
.section-t span { color: var(--muted); font-size: 13px; }

/* ---------- Product page ---------- */
.gallery { position: relative; }
.gallery .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery .track::-webkit-scrollbar { display: none; }
.gallery .track img { flex: none; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; scroll-snap-align: start; }
.gallery .dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.gallery .dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.4); transition: width 0.2s; }
.gallery .dots i.on { width: 18px; background: #fff; }
.gallery .float { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; }
.glass-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(10, 10, 11, 0.55);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.glass-btn svg { width: 20px; height: 20px; }
.glass-btn.on { color: var(--accent); }
.glass-btn.on svg path { fill: currentColor; }

.pd { padding: 18px 16px 0; }
.pd .brand { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.pd h2 { margin: 6px 0 12px; font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.price-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.price-row .now { font-family: var(--display); font-size: 26px; font-weight: 600; }
.price-row .was { color: var(--muted); text-decoration: line-through; font-size: 15px; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.pill.accent { background: var(--accent-soft); color: var(--accent-2); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.muted { background: var(--surface-2); color: var(--muted); }
.save { color: var(--muted); font-size: 13px; margin-top: 6px; }

.block-t { display: flex; justify-content: space-between; align-items: baseline; margin: 24px 0 10px; }
.block-t b { font-size: 15px; }
.block-t a, .block-t button.link { color: var(--accent-2); font-size: 13px; font-weight: 700; text-decoration: none; }
.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.size {
  position: relative;
  height: 52px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  font-weight: 800;
  font-size: 15px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.size small { font-size: 10px; font-weight: 700; color: var(--muted); }
.size.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.size.off { color: var(--muted-2); background: transparent; border-style: dashed; cursor: not-allowed; }
.size.off::after { content: ''; position: absolute; left: 12px; right: 12px; top: 50%; height: 1px; background: var(--muted-2); transform: rotate(-18deg); }
.stock-note { margin-top: 10px; font-size: 13px; color: var(--accent-2); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.stock-note::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2); }
.desc { color: #c9c9ce; font-size: 14.5px; line-height: 1.55; }
.info-list { margin-top: 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.info-list .row { display: flex; gap: 12px; padding: 14px; align-items: flex-start; }
.info-list .row + .row { border-top: 1px solid var(--line); }
.info-list svg { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 1px; }
.info-list b { display: block; font-size: 14px; }
.info-list span { color: var(--muted); font-size: 13px; }
.post-ref { margin-top: 14px; font-size: 12px; color: var(--muted-2); }

/* sticky bottom bar */
.buybar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  display: flex; align-items: center; gap: 12px;
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  z-index: 20;
}
.buybar .sum { flex: none; }
.buybar .sum small { display: block; color: var(--muted); font-size: 12px; }
.buybar .sum b { font-size: 18px; font-weight: 800; }
.btn {
  height: 52px;
  border-radius: 16px;
  padding: 0 20px;
  font-weight: 800;
  font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.12s, opacity 0.2s, background 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.light { background: var(--text); color: #111; }
.btn.ghost { background: var(--surface-2); color: var(--text); }
.btn.outline { border: 1px solid var(--line-2); color: var(--text); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.block { width: 100%; }
.btn.grow { flex: 1; }
.btn.sm { height: 38px; border-radius: 12px; padding: 0 14px; font-size: 13px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex;
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  z-index: 20;
}
.tabbar button {
  flex: 1;
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 700;
}
.tabbar button svg { width: 23px; height: 23px; }
.tabbar button.on { color: var(--text); }
.tabbar button.on::before { content: ''; position: absolute; top: 0; width: 26px; height: 2px; border-radius: 2px; background: var(--accent); }
.tabbar .badge { top: 6px; right: calc(50% - 22px); }

/* ---------- Cart ---------- */
.cart-item { display: flex; gap: 12px; padding: 12px; margin: 0 16px 10px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.cart-item img { width: 76px; height: 96px; border-radius: 12px; object-fit: cover; flex: none; }
.cart-item .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cart-item .meta .brand { font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.cart-item .meta .name { font-size: 14px; font-weight: 600; margin-top: 2px; }
.cart-item .meta .opt { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.cart-item .meta .bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.cart-item .x { color: var(--muted-2); align-self: flex-start; padding: 2px; }
.cart-item .x svg { width: 18px; height: 18px; }
.stepper { display: inline-flex; align-items: center; background: var(--surface-2); border-radius: 10px; height: 32px; }
.stepper button { width: 32px; height: 32px; display: grid; place-items: center; font-size: 18px; font-weight: 700; color: var(--text); }
.stepper button[disabled] { color: var(--muted-2); }
.stepper span { min-width: 22px; text-align: center; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.summary { margin: 16px; padding: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.summary .ln { display: flex; justify-content: space-between; font-size: 14px; color: #c9c9ce; padding: 4px 0; }
.summary .ln.disc span:last-child { color: var(--ok); }
.summary .ln.total { color: var(--text); font-weight: 800; font-size: 18px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }

.empty { text-align: center; padding: 60px 32px; color: var(--muted); }
.empty .ico { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 16px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--accent); }
.empty .ico svg { width: 32px; height: 32px; }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }

/* ---------- Forms ---------- */
.form { padding: 0 16px; }
.fgroup { margin-bottom: 22px; }
.fgroup > .lbl { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.field { display: block; margin-bottom: 10px; }
.field span { display: block; font-size: 12.5px; color: var(--muted); margin: 0 0 6px 2px; }
.input {
  width: 100%;
  height: 50px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  padding: 0 14px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
textarea.input { height: 84px; padding: 12px 14px; resize: none; }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; }
.input:focus { border-color: var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt-card {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  text-align: left;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  margin-bottom: 8px;
}
.opt-card .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--muted-2); flex: none; display: grid; place-items: center; }
.opt-card.on { border-color: var(--accent); background: var(--accent-soft); }
.opt-card.on .radio { border-color: var(--accent); }
.opt-card.on .radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.opt-card .t { flex: 1; }
.opt-card .t b { display: block; font-size: 14.5px; }
.opt-card .t span { color: var(--muted); font-size: 12.5px; }
.opt-card .r { font-size: 13px; font-weight: 700; color: var(--muted); }
.opt-card[disabled] { opacity: 0.5; }

.toggle-row { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 8px; }
.toggle-row .t { flex: 1; }
.toggle-row .t b { display: block; font-size: 14.5px; }
.toggle-row .t span { color: var(--muted); font-size: 12.5px; }
.switch { width: 50px; height: 30px; border-radius: 999px; background: var(--surface-3); position: relative; flex: none; transition: background 0.2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(20px); }

/* success */
.success { padding: 40px 20px 0; text-align: center; }
.success .check { width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 20px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); animation: pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.success .check svg { width: 42px; height: 42px; }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
.success h2 { font-family: var(--display); font-weight: 600; font-size: 24px; margin: 0 0 8px; }
.success p { color: var(--muted); margin: 0 auto; max-width: 300px; }
.tg-msg { text-align: left; margin: 26px 0 0; padding: 14px; border-radius: 18px 18px 18px 6px; background: #1f2b3a; border: 1px solid rgba(90, 169, 255, 0.18); font-size: 14px; line-height: 1.5; }
.tg-msg .from { display: flex; align-items: center; gap: 8px; color: var(--info); font-weight: 800; font-size: 13px; margin-bottom: 6px; }
.tg-msg .from img { width: 22px; height: 22px; border-radius: 50%; }
.tg-msg .time { text-align: right; color: rgba(255, 255, 255, 0.4); font-size: 11px; margin-top: 4px; }
.caption { text-align: center; color: var(--muted-2); font-size: 12px; margin-top: 8px; }

/* orders */
.order { margin: 0 16px 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.order .top { display: flex; justify-content: space-between; align-items: center; padding: 14px 14px 10px; }
.order .top b { font-size: 15px; }
.order .top small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.order .thumbs { display: flex; gap: 6px; padding: 0 14px 12px; }
.order .thumbs img { width: 46px; height: 58px; border-radius: 9px; object-fit: cover; }
.order .lines { padding: 0 14px 12px; font-size: 13.5px; color: #c9c9ce; }
.order .lines div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.order .lines div span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order .cust { padding: 12px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.order .cust b { color: var(--text); font-weight: 700; }
.order .acts { display: flex; gap: 8px; padding: 0 14px 14px; }
.order .foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.order .foot b { font-size: 16px; }
.timeline { display: flex; gap: 4px; padding: 0 14px 14px; }
.timeline i { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); }
.timeline i.on { background: var(--accent); }
.order.fresh { border-color: rgba(99, 102, 241, 0.55); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12); }

/* ---------- Seller ---------- */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.kpi { padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.kpi small { color: var(--muted); font-size: 12px; font-weight: 600; }
.kpi b { display: block; font-family: var(--display); font-size: 24px; font-weight: 600; margin-top: 6px; letter-spacing: -0.01em; }
.kpi .d { font-size: 12px; font-weight: 700; color: var(--ok); margin-top: 2px; }
.kpi.accent { background: linear-gradient(135deg, #818cf8, #4f46e5); border: 0; }
.kpi.accent small, .kpi.accent .d { color: rgba(255, 255, 255, 0.85); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 72px; margin-top: 12px; }
.bars i { flex: 1; border-radius: 5px 5px 2px 2px; background: var(--surface-3); }
.bars i.on { background: var(--accent); }
.bars-l { display: flex; gap: 6px; margin-top: 6px; }
.bars-l span { flex: 1; text-align: center; font-size: 10.5px; color: var(--muted-2); }

.list { margin: 0 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px; width: 100%; text-align: left; }
.li + .li { border-top: 1px solid var(--line); }
.li img { width: 48px; height: 60px; border-radius: 10px; object-fit: cover; flex: none; }
.li .m { flex: 1; min-width: 0; }
.li .m b { display: block; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .m span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.li .chev { color: var(--muted-2); width: 18px; height: 18px; flex: none; }
.szmini { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.szmini i { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); color: #c9c9ce; }
.szmini i.z { background: transparent; color: var(--muted-2); text-decoration: line-through; }

.notice { margin: 0 16px; padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); display: flex; gap: 12px; }
.notice .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--info-soft); color: var(--info); flex: none; }
.notice .ic svg { width: 20px; height: 20px; }
.notice b { display: block; font-size: 14px; }
.notice span { color: var(--muted); font-size: 13px; }

/* editor */
.photos { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.photos img, .photos .add { width: 84px; height: 106px; border-radius: 12px; object-fit: cover; flex: none; }
.photos .add { display: grid; place-items: center; border: 1px dashed var(--line-2); color: var(--muted); background: var(--surface); position: relative; text-align: center; font-size: 11px; font-weight: 700; }
.photos .add svg { width: 22px; height: 22px; margin: 0 auto 4px; display: block; }
.photos .add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.size-rows { border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.size-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.size-row + .size-row { border-top: 1px solid var(--line); }
.size-row b { width: 46px; font-size: 15px; }
.size-row .st { flex: 1; font-size: 12.5px; color: var(--muted); }
.size-row .st.z { color: var(--danger); }
.add-size { display: flex; gap: 8px; margin-top: 8px; }
.add-size .input { height: 42px; }
.calc { font-size: 12.5px; color: var(--ok); margin: -2px 0 0 2px; }

/* channel preview (Telegram-like) */
.tgfeed { margin: 0 12px; padding: 12px 0; border-radius: 18px; background: #0e1621 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='2' cy='2' r='1' fill='%23ffffff' fill-opacity='.04'/%3E%3C/svg%3E"); }
.tgch-head { display: flex; align-items: center; gap: 10px; padding: 0 12px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); margin-bottom: 12px; }
.tgch-head img { width: 38px; height: 38px; border-radius: 50%; }
.tgch-head b { display: block; font-size: 14.5px; }
.tgch-head span { font-size: 12px; color: #7f91a4; }
.tgpost { max-width: 300px; margin: 0 12px 12px; border-radius: 14px 14px 14px 4px; background: #182533; overflow: hidden; font-size: 14px; position: relative; }
.tgpost .pimg { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
#post-preview .pimg { aspect-ratio: 16 / 10; }
.tgpost .body { padding: 9px 11px 6px; line-height: 1.45; white-space: pre-line; }
.tgpost .body b { font-weight: 700; }
.tgpost .body s { color: #7f91a4; }
.tgpost .meta { display: flex; justify-content: flex-end; gap: 6px; padding: 0 11px 8px; font-size: 11.5px; color: #6d8196; }
.tgpost .kb { display: block; width: calc(100% - 8px); margin: 0 4px 4px; padding: 10px; border-radius: 10px; background: rgba(90, 169, 255, 0.14); color: #8cc4ff; font-weight: 700; font-size: 13.5px; text-align: center; }
.tgpost.deleted { padding: 12px; color: #7f91a4; font-style: italic; font-size: 13px; background: rgba(24, 37, 51, 0.5); }
.tgpost .flash { position: absolute; inset: 0; pointer-events: none; animation: flash 1.6s ease-out both; border-radius: inherit; }
@keyframes flash { 0% { box-shadow: inset 0 0 0 2px var(--accent); background: rgba(99, 102, 241, 0.16); } 100% { box-shadow: inset 0 0 0 2px transparent; background: transparent; } }
.log { margin: 0 16px; }
.log .e { display: flex; gap: 10px; padding: 10px 0; font-size: 13px; }
.log .e + .e { border-top: 1px solid var(--line); }
.log .e time { color: var(--muted-2); font-variant-numeric: tabular-nums; flex: none; width: 40px; }
.log .e span { color: #c9c9ce; }
.log .e span b { color: var(--text); }

/* range */
.range-wrap { padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.range-wrap .v { font-family: var(--display); font-size: 34px; font-weight: 600; color: var(--accent); }
input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: var(--surface-3); outline: none; margin: 14px 0 4px; }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); }
input[type='range']::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 0; }

/* toast */
.toast {
  position: absolute;
  left: 16px; right: 16px;
  top: calc(64px + var(--safe-top));
  z-index: 60;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(38, 38, 42, 0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line-2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: flex; gap: 10px; align-items: center;
  font-size: 13.5px;
  transform: translateY(-20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.2, 1), opacity 0.25s;
}
.toast.show { transform: none; opacity: 1; pointer-events: auto; }
.toast .ic { width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.toast .ic img { width: 32px; height: 32px; border-radius: 10px; }
.toast .ic svg { width: 18px; height: 18px; }
.toast b { display: block; font-size: 13.5px; }
.toast span { color: #c9c9ce; font-size: 12.5px; }

/* coach hint */
.hint { margin: 0 16px 14px; padding: 12px 14px; border-radius: 14px; border: 1px dashed rgba(99, 102, 241, 0.45); background: rgba(99, 102, 241, 0.06); font-size: 13px; color: #c9cbf7; display: flex; gap: 10px; }
.hint svg { width: 18px; height: 18px; flex: none; color: var(--accent); margin-top: 1px; }
.hint b { color: #fff; }
.hint button { color: var(--muted); margin-left: auto; align-self: flex-start; }

/* bottom action bar above the tab bar (cart, promo) */
#bottom.above-tabs .buybar { bottom: calc(var(--tabbar-h) + var(--safe-bottom)); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.screen.with-bar { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 100px); }

/* ===== Layout v2: bottom bar and tab bar sit in normal flow, so they never cover content ===== */
@supports (height: 100dvh) { html, body, .stage { height: 100dvh; } }
body.in-tg, body.in-tg .stage { height: var(--tg-viewport-stable-height, 100dvh); }
.screen, .screen.no-tabs, .screen.with-bar { padding-bottom: 28px; }
#bottom { flex: none; position: relative; z-index: 20; }
.buybar, #bottom.above-tabs .buybar { position: relative; left: auto; right: auto; bottom: auto; }
#bottom.above-tabs .buybar { padding-bottom: 12px; border-bottom: 0; }
.tabbar { position: relative; flex: none; }

/* product page: back / favourite buttons stay visible while scrolling */
.pd-float { position: sticky; top: 0; height: 0; z-index: 6; }
.pd-float .row { display: flex; justify-content: space-between; padding: 12px 12px 0; }

/* toasts are informational: never block taps on buttons underneath */
.toast, .toast.show { pointer-events: none; }
