@font-face {
  font-family: "Exo 2";
  src: url("/static/fonts/exo2-cyrillic.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Exo 2";
  src: url("/static/fonts/exo2-latin-ext.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Exo 2";
  src: url("/static/fonts/exo2-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Kun = iliq sutli-bej (ko'zni charchatmaydi), Tun = grafit + sariq */
:root {
  --bg: #f4efe6; --card: #fbf8f2; --fg: #231e17; --muted: #72695c; --line: #e4dccd;
  --acc: #f2b705; --on-acc: #1d1810; --acc-text: #855f00; --img: #ece5d8;
  --ok: #1f7a4c; --ok-bg: #e1eedf; --grn-light: #8fdcaa; --grn-dark: #1b7a49; --req-bg: #f1f7ee; --t0-bg: #dcefec; --t0-fg: #0f6b63; --t1-bg: #e2eedb; --t1-fg: #3b7420; --t2-bg: #f8e1d6; --t2-fg: #ad4528; --t3-bg: #e9e2f4; --t3-fg: #6743a3; --t4-bg: #dee8f6; --t4-fg: #2c5ea6; --danger: #b23a2a; --shadow: 0 1px 2px rgba(70,52,20,.05), 0 6px 16px -8px rgba(70,52,20,.14);
  --display: "Exo 2", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --body: "Exo 2", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Exo 2", system-ui, sans-serif;
  --radius: 16px;
  --tabbar-h: 62px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #17191c; --card: #212428; --fg: #eceae4; --muted: #9a978f; --line: #2e3237;
  --acc: #ffd23f; --on-acc: #17191c; --acc-text: #ffd23f; --img: #2a2e33;
  --ok: #4fd18b; --ok-bg: #1d3328; --grn-light: #6ee7a0; --grn-dark: #146b3d; --req-bg: #1f2a24; --t0-bg: #1b302e; --t0-fg: #72d3c6; --t1-bg: #1f2d1b; --t1-fg: #95cf72; --t2-bg: #362621; --t2-fg: #f59a7c; --t3-bg: #29243a; --t3-fg: #b9a0ee; --t4-bg: #1e2738; --t4-fg: #8fb3ee; --danger: #ff7b6b; --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent }
html { -webkit-text-size-adjust: 100%; overscroll-behavior-y: contain }
body { overscroll-behavior-y: contain }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 15px; line-height: 1.45;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  transition: background-color .45s ease, color .45s ease;
}
.card, .chip, .search, .tabbar, .topbar, .sheet, .summary, .c-item { transition: background-color .45s ease, border-color .45s ease, color .45s ease }
button, input, textarea, select { font: inherit; color: inherit }
a { color: inherit }
img { max-width: 100%; display: block }
[hidden] { display: none !important }
:focus-visible { outline: 2.5px solid var(--acc); outline-offset: 2px }

/* ---------- splash ---------- */
.splash { display: none }
.splash-on .splash {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  transition: opacity .4s ease, visibility .4s;
}
.splash.gone { opacity: 0; visibility: hidden }
.splash-mark { width: 96px; height: 96px }
.splash-outline { fill: none; stroke: var(--acc); stroke-width: 3; stroke-dasharray: 170; stroke-dashoffset: 170; animation: draw 1s ease forwards }
.splash-fill { opacity: 0; animation: show .35s ease .9s forwards }
.splash-fill rect { fill: var(--acc) }
.splash-fill polygon { fill: var(--on-acc) }
.splash-word { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -.01em; opacity: 0; transform: translateY(8px); animation: rise .5s ease .7s forwards }
.splash-word b, .brand b, .foot-brand b { color: var(--acc-text) }
.splash-bar { width: 132px; height: 10px; border: 2px solid var(--fg); border-radius: 5px; padding: 1.5px; position: relative }
.splash-bar::after { content: ""; position: absolute; right: -6px; top: 1.5px; width: 3px; height: 3px; border-radius: 1px; background: var(--fg) }
.splash-bar i { display: block; height: 100%; width: 0; border-radius: 2px; background: var(--acc); animation: charge 1.7s cubic-bezier(.5,0,.3,1) .15s forwards }
@keyframes draw { to { stroke-dashoffset: 0 } }
@keyframes show { to { opacity: 1 } }
@keyframes rise { to { opacity: 1; transform: none } }
@keyframes charge { to { width: 100% } }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--bg);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  border-bottom: 1px solid transparent; transition: border-color .2s, background-color .25s;
}
.topbar.scrolled { border-bottom-color: var(--line) }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -.01em }
.brand svg { width: 30px; height: 30px }
.mark-bg { fill: var(--acc) }
.mark-bolt { fill: var(--on-acc) }
.top-actions { display: flex; align-items: center; gap: 8px }
.pill-btn { width: 34px; height: 30px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; padding: 0; flex: none; font-size: 13px; color: var(--fg) }
.pill-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round }
.top-search { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; height: 38px; background: var(--card); border: 1px solid var(--acc); border-radius: 999px; padding: 0 3px 0 12px; animation: grow .2s ease }
.top-search > svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round }
.top-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; font-size: 16px }
.top-search input::-webkit-search-cancel-button { display: none }
.top-search .pill-btn { border: 0; background: var(--img); width: 30px; height: 30px }
.topbar.searching .brand, .topbar.searching .top-actions { display: none }
@media (max-width: 380px) {
  .top-actions { gap: 6px }
  .brand { font-size: 16px; gap: 6px }
  .brand svg { width: 26px; height: 26px }
  .topbar .top-actions .pill-btn { width: 30px }
  .topbar .lang select { padding: 0 20px 0 9px; background-position: right 11px top 13px, right 7px top 13px }
  .topbar .top-actions .theme-toggle { width: 44px }
  :root[data-theme="dark"] .topbar .top-actions .theme-toggle i { transform: translateX(14px) }
}
@media (max-width: 340px) {
  .topbar > .brand span { display: none }
}
@keyframes grow { from { opacity: 0; transform: scaleX(.92) } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.gate-top select, .lang select {
  appearance: none; -webkit-appearance: none; height: 30px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); padding: 0 26px 0 12px; font-weight: 750; font-size: 13px; letter-spacing: .04em; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: right 13px top 13px, right 9px top 13px; background-size: 4px 4px; background-repeat: no-repeat;
}
.theme-toggle { width: 52px; height: 30px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); position: relative; cursor: pointer; padding: 0 }
.theme-toggle i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--acc); transition: transform .3s cubic-bezier(.4,1.4,.6,1) }
.theme-toggle i::before { content: "☀"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: var(--on-acc); font-style: normal }
:root[data-theme="dark"] .theme-toggle i { transform: translateX(22px) }
:root[data-theme="dark"] .theme-toggle i::before { content: "☾" }

/* ---------- page ---------- */
.page { padding: 4px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 16px; max-width: 980px; margin: 0 auto }
.hero { display: flex; flex-direction: column; gap: 8px; padding-top: 4px }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(17px, 4.8vw, 24px); line-height: 1.25; margin: 0; letter-spacing: -.01em; text-wrap: balance; max-width: 22ch }
.hero p { margin: 0; color: var(--muted); font-size: 14px; max-width: 44ch }
.perks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px }
.perks li { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; font-size: 12px; font-weight: 650; line-height: 1.25; min-width: 0 }
.perk-ic { width: 28px; height: 28px; border-radius: 9px; background: var(--acc); display: grid; place-items: center }
.perk-ic svg { width: 16px; height: 16px; fill: none; stroke: var(--on-acc); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round }

/* profile button */
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--fg); color: var(--bg); display: grid; place-items: center; font-weight: 800; font-size: 13px; text-decoration: none; letter-spacing: .02em }

/* login gate */
.gate { position: fixed; inset: 0; z-index: 80; background: var(--bg); overflow-y: auto; padding: calc(16px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)) }
body.gated { overflow: hidden }
body.gated .tabbar, body.gated .cartbar { display: none }
.gate-inner { max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px }
.gate-top { display: flex; justify-content: space-between; align-items: center }
#gateBody { display: flex; flex-direction: column; gap: 16px }
.gate h1 { font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1.25; margin: 6px 0 -8px; letter-spacing: -.01em }
.gate .lead { margin: 0; color: var(--muted); font-size: 14px }
.gate-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: s }
.gate-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; font-size: 14px; counter-increment: s }
.gate-steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; font-size: 13px }
.gate-steps li.done::before { content: "✓"; background: var(--acc); border-color: var(--acc); color: var(--on-acc) }
.gate-steps li.now { font-weight: 700 }
.tg-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border-radius: 14px; background: #2aabee; color: #fff; text-decoration: none; font-weight: 800; font-size: 15.5px }
.tg-btn svg { width: 22px; height: 22px; fill: #fff }
.wait { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--acc); animation: spin .8s linear infinite; flex: none }
@keyframes spin { to { transform: rotate(360deg) } }
.code-input { font-family: var(--mono); font-size: 28px !important; letter-spacing: .45em; text-align: center; font-weight: 700; padding-left: .45em !important }
.linkish { background: none; border: 0; padding: 6px 0; color: var(--muted); font-weight: 650; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; align-self: center }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px }
@media (max-width: 340px) { .row2 { grid-template-columns: 1fr } }

/* product photo gallery */
.gallery { display: grid; gap: 8px }
.g-frame { position: relative }
.g-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 16px; aspect-ratio: 4 / 3; background: var(--img); overscroll-behavior-x: contain }
.g-track::-webkit-scrollbar { display: none }
.g-track:focus-visible { outline: 2.5px solid var(--acc); outline-offset: 2px }
.g-slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always }
.g-slide img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none }
.g-count { position: absolute; top: 10px; right: 10px; background: rgba(20, 16, 10, .62); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; pointer-events: none }
.g-dots { display: flex; justify-content: center; gap: 6px }
.g-dots button { width: 8px; height: 8px; border-radius: 4px; border: 0; padding: 0; background: var(--line); cursor: pointer; transition: width .2s, background-color .2s }
.g-dots button.on { width: 22px; background: var(--acc) }
.credit { margin: 0; font-size: 11px; color: var(--muted); text-align: center; min-height: 1em; overflow-wrap: anywhere }
.p-hero img { width: 100%; height: 100%; object-fit: cover }

/* similar products in the product sheet */
.similar { display: grid; gap: 8px }
.sim-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(132px, 42%); gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px 4px; scroll-snap-type: x mandatory; scroll-padding-inline: 20px }
.sim-row::-webkit-scrollbar { display: none }
.sim { display: flex; flex-direction: column; gap: 4px; background: var(--card); border-radius: 14px; padding: 8px; text-decoration: none; color: inherit; scroll-snap-align: start; min-width: 0 }
.sim:focus-visible { outline: 2.5px solid var(--acc); outline-offset: 2px }
.sim-thumb { aspect-ratio: 1 / .8; border-radius: 10px; background: var(--img); display: grid; place-items: center; overflow: hidden }
.sim-thumb img { width: 100%; height: 100%; object-fit: cover }
.sim-thumb .badge-big { font-size: 15px; font-weight: 800; color: var(--muted) }
.sim-name { font-size: 12.5px; font-weight: 650; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em }
.sim-price { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums }

/* checkout progress */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px }
.flow li { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); padding-bottom: 8px; border-bottom: 3px solid var(--line); min-width: 0 }
.flow li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.flow-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--card); border: 1px solid var(--line); flex: none }
.flow li.now { color: var(--fg); border-bottom-color: var(--acc) }
.flow li.now .flow-n { background: var(--acc); border-color: var(--acc); color: var(--on-acc) }
.flow li.done { border-bottom-color: var(--acc) }
.flow li.done .flow-n { background: var(--ok-bg); border-color: transparent; color: var(--ok) }

/* cart */
.c-item { gap: 10px }
.c-top { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center }
.c-top .c-thumb { width: 64px; height: 64px; border-radius: 12px; font-size: 12px }
.c-info { display: flex; flex-direction: column; gap: 2px; text-decoration: none; min-width: 0 }
.c-info .c-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.trash { width: 38px; height: 38px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; align-self: start }
.trash svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
.trash:hover, .trash:focus-visible { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent) }
.c-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px }
.stepper button:disabled { opacity: .35; cursor: default }
.line-total { font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap }
.req-head { font-size: 12px; font-weight: 750; color: var(--ok) }

/* mandatory add-ons: light and dark green chase each other around the frame */
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg }
.req-box, .c-req {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--req-bg), var(--req-bg)) padding-box,
    conic-gradient(from var(--spin), var(--grn-dark), var(--grn-light), var(--grn-dark), var(--grn-light), var(--grn-dark)) border-box;
  animation: req-spin 4s linear infinite;
}
@keyframes req-spin { to { --spin: 360deg } }
.req-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-decoration: none; color: inherit; font-size: 13.5px; border-radius: 10px }
.req-row:focus-visible { outline: 2.5px solid var(--acc); outline-offset: 2px }
.req-thumb { width: 44px; height: 44px; border-radius: 10px; background: var(--img); display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line) }
.req-thumb img { width: 100%; height: 100%; object-fit: cover }
.req-thumb .badge-big { font-size: 10.5px; font-weight: 800; padding: 0 2px; line-height: 1.1 }
.req-name { line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.req-price { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600 }
.rv-items li.req { display: block; padding-left: 12px }
.rv-items li.req .req-row { font-size: 13px; color: var(--muted) }
.c-req-row span:first-child { min-width: 0 }
.choice-wrap { display: grid; gap: 8px }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px }
.opt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--fg); cursor: pointer; font: inherit; min-width: 0 }
.opt b { font-size: 14px }
.opt small { font-size: 12px; color: var(--muted); line-height: 1.3 }
.opt-ic { font-size: 20px; line-height: 1 }
.opt[aria-checked="true"] { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 14%, var(--card)); box-shadow: 0 0 0 1px var(--acc) }
.sheet-foot { flex: none; padding: 12px 20px calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--bg); border-top: 1px solid var(--line); display: flex; align-items: center; gap: 14px }
.sheet { overflow: hidden }
.sheet:has(.sheet-foot:not([hidden])) .sheet-body { padding-bottom: 16px }
.foot-total { display: flex; flex-direction: column; min-width: 0 }
.foot-total small { color: var(--muted); font-size: 12px; font-weight: 600 }
.foot-total strong { font-size: 19px; font-variant-numeric: tabular-nums; white-space: nowrap }
.sheet-foot .btn { flex: 1 }
.empty-cart { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 8px 0 4px }
.empty-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--card); display: grid; place-items: center }
.empty-ic svg { width: 30px; height: 30px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
.empty-cart h3 { margin: 6px 0 0; font-size: 18px }
.empty-cart p { margin: 0; color: var(--muted); font-size: 14px; max-width: 30ch }
.mini-list { display: grid; gap: 8px }
.mini { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--card); border-radius: 14px; padding: 8px }
.mini .c-thumb { width: 52px; height: 52px }
.mini-info { display: flex; flex-direction: column; gap: 2px; text-decoration: none; min-width: 0 }
.add-round { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--acc); color: var(--on-acc); font-size: 22px; font-weight: 700; cursor: pointer; line-height: 1 }
.toast { display: flex; align-items: center; gap: 14px }
.toast-btn { background: none; border: 0; color: #ffd23f; font: inherit; font-weight: 800; cursor: pointer; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px }
:root[data-theme="dark"] .toast-btn { color: #7a5600 }

/* order review */
.review { display: grid; gap: 10px }
.rv-block { background: var(--card); border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px }
.rv-label { font-size: 11.5px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; color: var(--muted) }
.rv-value { font-size: 15px; font-weight: 600; overflow-wrap: anywhere }
.rv-value small { display: block; font-weight: 500; color: var(--muted); font-size: 13px }
.verified { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; color: var(--ok); background: var(--ok-bg); padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 2px }
.rv-items { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 6px }
.rv-items li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px }
.rv-items li span:last-child { font-family: var(--mono); white-space: nowrap; font-variant-numeric: tabular-nums }
.confirm-note { font-size: 12.5px; color: var(--muted); margin: 0; text-align: center }
.profile-card { display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: 16px; padding: 16px }
.profile-card .avatar { width: 52px; height: 52px; font-size: 18px; flex: none }
.block { display: flex; flex-direction: column; gap: 8px }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px }
.label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted) }
.hint { font-size: 12.5px; color: var(--ok); font-weight: 600 }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding: 2px max(16px, env(safe-area-inset-left, 0px)) }
.chips::-webkit-scrollbar { display: none }
.chip { flex: none; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background-color .15s, color .15s }
.chip small { font-weight: 500; color: var(--muted); margin-left: 4px; font-size: 11.5px }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg) }
.chip.on small { color: inherit; opacity: .7 }

.search { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; height: 48px }
.search svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 16px; height: 100% }

/* ---------- product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)) } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)) } }
.card { background: var(--card); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); min-width: 0; position: relative }
.card.dim { opacity: .55 }
.card.skeleton { aspect-ratio: .68; background: linear-gradient(100deg, var(--card) 30%, var(--img) 50%, var(--card) 70%) 0 0 / 300% 100%; animation: shimmer 1.2s linear infinite }
@keyframes shimmer { to { background-position: -150% 0 } }
.card-link { display: flex; flex-direction: column; gap: 6px; text-decoration: none; flex: 1 }
.thumb { aspect-ratio: 1 / .86; border-radius: 12px; background: var(--img); display: grid; place-items: center; overflow: hidden; position: relative }
.thumb img { width: 100%; height: 100%; object-fit: cover }
.thumb .badge-big { font-family: var(--display); font-weight: 700; font-size: clamp(15px, 4.6vw, 22px); color: var(--muted); letter-spacing: -.01em; text-align: center; padding: 0 6px }
.fit { position: absolute; left: 6px; top: 6px; font-size: 10.5px; font-weight: 800; padding: 3px 7px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); letter-spacing: .02em }
.fit.no { background: var(--card); color: var(--muted) }
.pname { font-weight: 650; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em }
.pprice { font-family: var(--mono); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums }
.pprice.quote { font-family: var(--body); color: var(--muted); font-weight: 600; font-size: 12.5px }
.req-note { font-size: 11px; color: var(--acc-text); font-weight: 650 }
.add { border: 0; border-radius: 10px; background: var(--acc); color: var(--on-acc); font-weight: 750; padding: 10px 8px; font-size: 13.5px; cursor: pointer; min-height: 40px }
.add.in { background: transparent; border: 1.5px solid var(--acc); color: var(--fg) }
.add:active { transform: scale(.97) }
.out { font-size: 11.5px; color: var(--danger); font-weight: 650 }
.empty { text-align: center; color: var(--muted); padding: 24px 0 }

.foot { margin-top: 12px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; display: grid; gap: 6px }
.foot p { margin: 0; max-width: 52ch }
.foot-brand { font-family: var(--display); font-weight: 700; color: var(--fg); font-size: 16px }

/* ---------- tab bar + cart bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--card); border-top: 1px solid var(--line);
  padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600; position: relative; border-radius: 12px }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round }
.tabbar a.on { color: var(--fg) }
.tabbar a.on svg { stroke-width: 2.3 }
.tabbar .badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--acc); color: var(--on-acc); font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 5px; font-style: normal }
.badge.pop { animation: pop .35s ease }
@keyframes pop { 50% { transform: scale(1.35) } }

.cartbar { position: fixed; left: 0; right: 0; z-index: 25; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); padding: 0 max(12px, env(safe-area-inset-right, 0px)) 10px max(12px, env(safe-area-inset-left, 0px)); pointer-events: none }
.cartbar a { pointer-events: auto; display: flex; justify-content: space-between; align-items: center; max-width: 520px; margin: 0 auto; background: var(--acc); color: var(--on-acc); text-decoration: none; border-radius: 14px; padding: 13px 16px; font-weight: 750; box-shadow: 0 10px 24px -10px rgba(0,0,0,.45) }
.cartbar strong { font-family: var(--mono); font-variant-numeric: tabular-nums }
body.has-cart .page { padding-bottom: 84px }

/* ---------- bottom sheet ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50 }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); animation: fade .2s ease }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; max-height: 92dvh;
  background: var(--bg); border-radius: 22px 22px 0 0; display: flex; flex-direction: column;
  animation: up .28s cubic-bezier(.2,.9,.3,1); max-width: 640px; margin: 0 auto;
}
@media (min-width: 700px) { .sheet { bottom: 50%; transform: translateY(50%); border-radius: 22px; animation: fade .2s ease } }
@keyframes up { from { transform: translateY(100%) } }
@keyframes fade { from { opacity: 0 } }
.sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0 }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px 8px 20px }
.sheet-head h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: -.01em; min-width: 0 }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--card); cursor: pointer; font-size: 15px; flex: none }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px }

/* product sheet */
.p-hero { aspect-ratio: 4 / 3; border-radius: 16px; background: var(--img); display: grid; place-items: center; overflow: hidden }
.p-hero img { width: 100%; height: 100%; object-fit: cover }
.p-hero .badge-big { font-family: var(--display); font-weight: 700; font-size: 40px; color: var(--muted) }
.p-price { font-family: var(--mono); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums }
.facts { display: flex; flex-wrap: wrap; gap: 6px }
.fact { font-size: 12.5px; padding: 5px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 600 }
.fact.ok { color: var(--ok); border-color: transparent; background: var(--ok-bg) }
.fact.bad { color: var(--danger) }
.desc { margin: 0; color: var(--muted); white-space: pre-line }
.req-box { border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px }
.req-box h3 { margin: 0; font-size: 14px; color: var(--ok); display: flex; align-items: center; gap: 6px }
.req-box p { margin: 0; font-size: 12.5px; color: var(--muted) }
.req-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px }
.req-line span:last-child { font-family: var(--mono); white-space: nowrap; font-variant-numeric: tabular-nums }
.total-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 750; border-top: 1px solid var(--line); padding-top: 10px }
.total-line strong { font-family: var(--mono); font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap }

.actions { display: flex; gap: 10px; align-items: stretch; position: sticky; bottom: 0; background: var(--bg); padding-top: 6px }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--card); flex: none }
.stepper button { width: 42px; height: 48px; border: 0; background: transparent; font-size: 20px; font-weight: 600; cursor: pointer }
.stepper span { min-width: 26px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums }
.stepper.sm button { width: 34px; height: 36px; font-size: 17px }
.btn { flex: 1; border: 0; border-radius: 12px; background: var(--acc); color: var(--on-acc); font-weight: 800; font-size: 15.5px; padding: 0 16px; min-height: 50px; cursor: pointer }
.btn.ghost { background: var(--card); color: var(--fg); border: 1px solid var(--line) }
.btn:disabled { opacity: .55; cursor: default }

/* cart */
.cart-list { display: flex; flex-direction: column; gap: 10px }
.c-item { background: var(--card); border-radius: 14px; padding: 10px; display: grid; gap: 8px }
.c-main { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: center }
.c-thumb { width: 56px; height: 56px; border-radius: 10px; background: var(--img); display: grid; place-items: center; overflow: hidden; font-family: var(--display); font-weight: 700; font-size: 11px; color: var(--muted); text-align: center }
.c-thumb img { width: 100%; height: 100%; object-fit: cover }
.c-name { font-weight: 650; font-size: 14px; line-height: 1.3 }
.c-price { font-family: var(--mono); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums }
.c-req { display: grid; gap: 8px; padding: 10px; border-radius: 12px }
.c-req-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px }
.c-req-row span:first-child { display: flex; gap: 6px; align-items: center; min-width: 0 }
.c-req-row span:last-child { font-family: var(--mono); white-space: nowrap; font-variant-numeric: tabular-nums }
.lock { font-size: 10.5px; font-weight: 800; color: var(--acc-text); text-transform: uppercase; letter-spacing: .04em; flex: none }
.summary { background: var(--card); border-radius: 14px; padding: 12px 14px; display: grid; gap: 6px }
.sum-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px }
.sum-row span:last-child { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap }
.sum-row.total { font-weight: 800; font-size: 16px; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px }
.note-quote { font-size: 12.5px; color: var(--muted); margin: 0 }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border-radius: 14px; padding: 12px 14px; cursor: pointer }
.switch-row small { display: block; color: var(--muted); font-size: 12.5px }
.switch { position: relative; width: 50px; height: 30px; flex: none }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .2s; pointer-events: none }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25) }
.switch input:checked + i { background: var(--acc) }
.switch input:checked + i::after { transform: translateX(20px) }
.switch input:focus-visible + i { outline: 2.5px solid var(--acc); outline-offset: 2px }

/* form */
.form { display: flex; flex-direction: column; gap: 12px }
.field { display: flex; flex-direction: column; gap: 5px }
.field label { font-size: 13px; font-weight: 700 }
.field label small { font-weight: 500; color: var(--muted) }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px 14px; font-size: 16px; outline: none; min-height: 48px }
.field textarea { resize: vertical; min-height: 76px }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--acc) }
.field.err input { border-color: var(--danger) }
.field .msg { font-size: 12.5px; color: var(--danger) }
.prefix { display: flex; align-items: stretch; border: 1px solid var(--line); background: var(--card); border-radius: 12px; overflow: hidden }
.prefix span { display: grid; place-items: center; padding: 0 4px 0 14px; font-weight: 650; color: var(--muted) }
.prefix input { border: 0; border-radius: 0; padding-left: 4px }
.prefix:focus-within { border-color: var(--acc) }
.form-error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; font-weight: 600 }

/* success / orders */
.done { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 10px 0 }
.done-mark { width: 72px; height: 72px; border-radius: 50%; background: var(--acc); color: var(--on-acc); display: grid; place-items: center; font-size: 34px; font-weight: 900; animation: pop .5s ease }
.done h3 { margin: 0; font-family: var(--display); font-size: 20px }
.done p { margin: 0; color: var(--muted); max-width: 36ch }
.o-card { background: var(--card); border-radius: 14px; padding: 12px 14px; display: grid; gap: 6px }
.o-top { display: flex; justify-content: space-between; gap: 8px; align-items: center }
.o-top strong { font-family: var(--display); font-weight: 600 }
.status { font-size: 12px; font-weight: 750; padding: 4px 10px; border-radius: 999px; background: var(--img) }
.status.qabul, .status.yolda { background: color-mix(in srgb, var(--acc) 22%, transparent); color: var(--acc-text) }
.status.ornatildi { background: var(--ok-bg); color: var(--ok) }
.status.bekor { color: var(--danger) }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px }
.steps i { height: 4px; border-radius: 2px; background: var(--line) }
.steps i.on { background: var(--acc) }
.o-items { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px }
.contact-list { display: grid; gap: 10px }
.contact { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 14px; padding: 14px; text-decoration: none }
.contact b { display: block }
.contact small { color: var(--muted) }
.contact .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--acc); color: var(--on-acc); display: grid; place-items: center; font-size: 19px; flex: none }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 76px + env(safe-area-inset-bottom, 0px)); z-index: 60; background: var(--fg); color: var(--bg); padding: 12px 16px; border-radius: 14px; font-weight: 650; font-size: 14px; width: max-content; max-width: min(calc(100% - 32px), 460px); animation: fade .2s ease; justify-content: space-between; box-shadow: 0 10px 30px -10px rgba(0,0,0,.45) }
.toast > span { min-width: 0 }
.toast:has(.toast-btn) { width: min(calc(100% - 32px), 460px) }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important }
}

/* Soft category colours: placeholders, chip dots and perk icons pick one of five tints */
.tint-0 { --tb: var(--t0-bg); --tf: var(--t0-fg); background: var(--tb) }
.tint-1 { --tb: var(--t1-bg); --tf: var(--t1-fg); background: var(--tb) }
.tint-2 { --tb: var(--t2-bg); --tf: var(--t2-fg); background: var(--tb) }
.tint-3 { --tb: var(--t3-bg); --tf: var(--t3-fg); background: var(--tb) }
.tint-4 { --tb: var(--t4-bg); --tf: var(--t4-fg); background: var(--tb) }
[class*="tint-"] .badge-big { color: var(--tf) }
.req-thumb[class*="tint-"] { border-color: transparent }
.perk-ic[class*="tint-"] svg { stroke: var(--tf) }
.dot.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tf); display: inline-block; margin-right: 7px; vertical-align: 1px }
.chip.on .dot.dot { box-shadow: 0 0 0 2px var(--bg) }
.code-timer { text-align: center; font-size: 13.5px; font-weight: 700; color: var(--ok); font-variant-numeric: tabular-nums }
.code-timer.over { color: var(--danger) }
.notify-box { display: grid; gap: 6px; text-align: center }
.notify-box .tg-btn { border: 0; cursor: pointer; width: 100% }
.notify-box small { color: var(--muted); font-size: 12.5px }
.gate-actions { display: flex; align-items: center; gap: 8px }
.avatar.guest { background: var(--card); color: var(--fg); border: 1px solid var(--line) }
.avatar.guest svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round }

/* pull to refresh: slides out from under the top bar */
.ptr { --d: 0px; --p: 0; position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 52px); z-index: 19; width: 46px; height: 46px; margin-left: -23px;
  border-radius: 50%; background: var(--card); box-shadow: 0 6px 18px -6px rgba(0,0,0,.35); display: grid; place-items: center;
  transform: translateY(calc(var(--d) - 48px)) rotate(calc(var(--p) * 360deg)); opacity: calc(var(--p) * 1.4); pointer-events: none }
.ptr.leaving, .ptr.loading { transition: transform .25s ease, opacity .25s ease }
.ptr svg { width: 30px; height: 30px; overflow: visible }
.ptr-outline { fill: none; stroke: var(--acc); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 160; stroke-dashoffset: calc(160 - 160 * var(--p)) }
.ptr-fill { opacity: 0; transform-origin: 24px 24px; transform: scale(.6); transition: opacity .15s ease, transform .2s ease }
.ptr-fill rect { fill: var(--acc) }
.ptr-fill polygon { fill: var(--on-acc) }
.ptr.armed .ptr-fill { opacity: 1; transform: none }
.ptr.loading { transform: translateY(calc(var(--d) - 48px)) }
.ptr.loading svg { animation: ptr-breathe .9s ease-in-out infinite }
.ptr.loading .ptr-fill polygon { animation: ptr-flash .9s ease-in-out infinite }
@keyframes ptr-breathe { 50% { transform: scale(.86) } }
@keyframes ptr-flash { 50% { opacity: .35 } }
