/* Agassi Mini App — brandbook: Deep Crimson #8C0F14, Warm Gold #C6A15B, Dark Red #5A0A0D,
   Soft Ivory #F4F1EA, Deep Garnet #4A0E1A; sarlavha — Cormorant Garamond, matn — Manrope. */

:root {
  --bg: #F4F1EA;
  --surface: #FFFFFF;
  --surface-2: #FBF9F4;
  --placeholder-a: #F7F2E9;
  --placeholder-b: #ECE3D4;
  --ink: #33090C;
  --ink-soft: #6E5550;
  --ink-faint: #85695F;   /* ivory fonda ~4.4:1 — kichik matn ham oʻqiladi */
  --line: #E7DED0;
  --crimson: #8C0F14;
  --crimson-press: #74090D;
  --dark-red: #5A0A0D;
  --garnet: #4A0E1A;
  --gold: #C6A15B;
  --gold-ink: #8A6A2E;    /* oltin matn: kontrast uchun toʻqroq */
  --on-crimson: #F8F3EA;
  --accent: var(--crimson);   /* matn/chiziq urgʻusi: havola, tanlangan holat */
  --heart: var(--crimson);
  --sheet: var(--bg);
  --ok: #3F7D52;
  --danger: #B3261E;
  --shadow: 0 1px 2px rgba(74, 14, 26, .05), 0 8px 24px -12px rgba(74, 14, 26, .18);
  --radius: 18px;
  --radius-sm: 12px;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Toʻliq ekranda: qurilma (notch) + Telegram tugmalari zonasi */
  --safe-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(var(--tg-safe-area-inset-bottom, 0px), env(safe-area-inset-bottom, 0px));
  color-scheme: light;
}

:root[data-theme="dark"] {
  /* «Tungi marosim»: iliq koʻmir-qora, granat tusi faqat sezilar-sezilmas; matn — fil suyagi.
     Interaktiv urgʻu — oltin, toʻq qizil faqat toʻliq tugmalarda (qora fonda qizil matn oʻqilmaydi). */
  --bg: #121011;
  --surface: #1C1819;
  --surface-2: #171415;
  --sheet: #1B1718;
  --placeholder-a: #241E1F;
  --placeholder-b: #191516;
  --ink: #F1EBE2;
  --ink-soft: #C9BDB1;
  --ink-faint: #978B81;   /* fonda ~5.6:1 */
  --line: #2D2728;
  --crimson: #9E262C;     /* fil suyagi matn bilan ~7:1, qora fonda koʻz qamashtirmaydi */
  --crimson-press: #841E23;
  --accent: #DDBA7A;
  --heart: #E5636A;
  --dark-red: #EEE1CE;    /* sarlavhalar: pergament */
  --gold: #CFAB69;
  --gold-ink: #D9B97C;
  --on-crimson: #FBF4EA;
  --ok: #82C08F;
  --danger: #F0857B;
  /* qorongʻida soya koʻrinmaydi — yuqori qirradagi nozik yorugʻlik koʻtarilganlikni beradi */
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 1px 2px rgba(0, 0, 0, .45), 0 14px 30px -18px rgba(0, 0, 0, .9);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* Cormorant'da eski uslubdagi «1» rim «I» ga oʻxshaydi; `font` shorthand bu xossani tiklab yuborgani uchun !important */
* { font-variant-numeric: lining-nums !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font: 400 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: var(--tg-viewport-stable-height, 100vh);
  overscroll-behavior-y: none;
}
body.sheet-open { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
input, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

#app { padding-bottom: calc(96px + var(--safe-bottom)); }
/* backwards: animatsiya tugagach transform «ushlab turilmaydi» (iOS'da fixed elementlar blokka bogʻlanib qolardi) */
.view { animation: viewIn .22s ease-out backwards; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { 50% { transform: scale(1.12); } }
.pad { padding: 0 16px; }
.pad-x { margin-left: 16px; margin-right: 16px; }

/* ---------- hero ---------- */
.hero {
  /* toʻliq ekranda yuqorida boʻshliq allaqachon bor — ichki chekinish qisqaradi */
  --hero-pad: clamp(8px, calc(30px - var(--safe-top) * .3), 30px);
  position: relative; height: calc(202px + var(--hero-pad) + var(--safe-top)); overflow: hidden; padding-top: var(--safe-top);
  background: linear-gradient(180deg, #FBFAF6 0%, var(--bg) 100%);
}
.hero-bg {
  position: absolute; inset: auto 0 0 0; width: 100%; height: 72%;
  object-fit: cover; object-position: center bottom; opacity: .95;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 45%, #000 70%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 45%, #000 70%, transparent 100%);
}
.hero-cranes { position: absolute; top: calc(10px + var(--safe-top)); right: -18px; width: 168px; opacity: .55; pointer-events: none; }
.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; padding-top: var(--hero-pad); }
.hero-sign { width: 66px; height: 78px; object-fit: contain; animation: rise .7s ease-out both; }
.hero-word { width: 132px; margin-top: 10px; animation: rise .7s .08s ease-out both; }
/* Shior ikki qatorga tushadi — markazda, qatorlar teng boʻlinadi */
.hero-tag { margin: 10px 0 0; padding: 0 28px; max-width: 360px; text-align: center; text-wrap: balance;
  font: italic 500 17px/1.25 var(--serif); color: var(--ink-soft); animation: rise .7s .16s ease-out both; }
:root[data-theme="dark"] .hero { background: radial-gradient(90% 70% at 50% 18%, #241C1B 0%, var(--bg) 70%); }
:root[data-theme="dark"] .hero-bg { opacity: .2; filter: sepia(1) saturate(.4) brightness(.75); }
:root[data-theme="dark"] .hero-cranes { opacity: .32; }
:root[data-theme="dark"] .hero-word { filter: brightness(0) invert(.92) sepia(.3); }
/* Toʻliq ekranda soat va Telegram tugmalari ostiga kontent kirmasin: aylantirilganda xira parda */
body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: var(--safe-top); pointer-events: none;
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; transition: opacity .2s; }
body.scrolled::before { opacity: 1; }

/* ---------- Telegram'dan tashqarida: «Telegram'da oching» ekrani ---------- */
.tg-gate {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px; text-align: center;
  background: linear-gradient(180deg, #FBFAF6 0%, var(--bg) 100%);
}
:root[data-theme="dark"] .tg-gate { background: radial-gradient(90% 60% at 50% 20%, #241C1B 0%, var(--bg) 70%); }
.tg-gate .hero-sign { width: 72px; height: 84px; }
.tg-gate .hero-word { width: 150px; }
.tg-gate h1 { margin: 34px 0 10px; max-width: 360px; font: 600 30px/1.12 var(--serif); color: var(--ink); text-wrap: balance; }
.tg-gate p { margin: 0 0 28px; max-width: 340px; font-size: 15px; line-height: 1.55; color: var(--ink-soft); text-wrap: pretty; }
.tg-gate .btn-solid { gap: 10px; min-width: 240px; }
.tg-gate-qr { display: none; margin-top: 36px; flex-direction: column; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-faint); }
.tg-gate-qr img { width: 148px; height: 148px; padding: 12px; background: #fff; border-radius: 16px; border: 1px solid var(--line); }
/* QR faqat kompyuterda: telefonda tugma yetarli */
@media (hover: hover) and (pointer: fine) { .tg-gate-qr { display: flex; } }

/* ---------- qidiruv ---------- */
.search {
  flex: 1; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: 23px; transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent); }
.search svg { flex: none; color: var(--ink-faint); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; }
.search input::placeholder, .search.as-button span { color: var(--ink-faint); }
.search.as-button { margin-top: -6px; box-shadow: var(--shadow); font-size: 15px; }
/* aksiya bannerlari: 16:9, balandlik px — iOS'da foizli qutilar chizilmay qolgan */
.banners { margin: 14px 0 2px; }
.banner-track { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  border-radius: 18px; overscroll-behavior-x: contain; }
.banner-track::-webkit-scrollbar { display: none; }
.banner { position: relative; flex: 0 0 100%; height: calc((min(100vw, 720px) - 32px) * 9 / 16); border-radius: 18px; overflow: hidden;
  scroll-snap-align: center; scroll-snap-stop: always; background: linear-gradient(160deg, var(--placeholder-a), var(--placeholder-b));
  box-shadow: var(--shadow); cursor: pointer; }
.banner[role="img"] { cursor: default; }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner:active { transform: scale(.99); }
.banner-mid { margin: 40px 16px 0; }
.banner-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.banner-dots i { width: 6px; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--ink-faint) 40%, transparent); transition: width .2s, background .2s; }
.banner-dots i.on { width: 18px; background: var(--gold); }
.sticky-search {
  position: sticky; top: 0; z-index: 10; padding: calc(8px + var(--safe-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.icon-btn {
  position: relative; flex: none; width: 44px; height: 44px; border-radius: 22px;
  display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--dark-red);
}
.icon-btn:active { transform: scale(.96); }
.filter-btn.on::after { content: ""; position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 4px; background: var(--crimson); box-shadow: 0 0 0 2px var(--surface); }

/* ---------- boʻlim sarlavhalari ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 40px 18px 12px; }
.view:not(.home) .section-head { padding-top: 26px; }
.section-head h2 { margin: 0; font: 600 26px/1.1 var(--serif); color: var(--dark-red); letter-spacing: .005em; }
.see-all { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.see-all svg { width: 16px; height: 16px; }
.section-sub { margin: -6px 18px 12px; font-size: 13px; color: var(--ink-faint); }
.demo-tag { padding: 0; font-size: inherit; font-weight: 600; color: var(--gold-ink); text-decoration: underline dotted; text-underline-offset: 3px; }

/* ---------- Asosiy (header ostida): kam element, koʻp havo, bitta qizil blok ---------- */
.group-tile:active, .brand-tile:active, .mini:active, .step:active, .concern-tile:active, .brand-row:active { transform: scale(.98); }
.home-top { padding-top: 2px; }
.greet { margin: 14px 4px 10px; font: italic 500 19px/1.2 var(--serif); color: var(--ink-soft); }
.home-top .search.as-button { margin-top: 0; }
.order-strip { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 14px 16px; border-radius: 16px;
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); text-align: left; }
.pulse { flex: none; width: 10px; height: 10px; border-radius: 5px; background: var(--gold); box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 60%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.order-strip-main { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.order-strip-main b { font-size: 14.5px; font-weight: 600; }
.order-strip-main small { font-size: 12.5px; color: var(--ink-faint); }
.mini-head { margin: 18px 4px 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); }
.recent-rail { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.recent-rail::-webkit-scrollbar { display: none; }
.recent { flex: none; width: 64px; }
.recent .thumb { height: 64px; padding-top: 0; border-radius: 14px; box-shadow: var(--shadow); }
.recent .ph { padding: 6px; }
.recent .ph img { width: 56%; }
.recent .ph i, .recent .badge { display: none; }

.ritual .section-head { padding-top: 36px; }
.steps { margin: 0 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.step { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 62px; padding: 8px 16px; text-align: left; }
.step + .step { border-top: 1px solid var(--line); }
.step-n { flex: none; width: 26px; font: 500 30px/1 var(--serif); color: var(--gold); text-align: center; }
.step-main { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.step-main b { font-size: 15px; font-weight: 600; }
.step-main small { font-size: 12.5px; color: var(--ink-faint); }
.extras { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 0; }
.extra { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 18px;
  font-size: 13.5px; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.extra small { font-size: 12px; font-weight: 500; color: var(--ink-faint); }
.mini-note { font: italic 500 13.5px/1.25 var(--serif); color: var(--gold-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.diag { position: relative; margin: 40px 16px 0; padding: 26px 22px 24px; border-radius: 22px; overflow: hidden; text-align: center;
  color: #F4F1EA; border: 1px solid rgba(198, 161, 91, .45);
  background: radial-gradient(120% 100% at 50% 0%, #8C0F14 0%, #5A0A0D 60%, #4A0E1A 100%); }
.diag img { width: 44px; margin: 0 auto 12px; filter: brightness(1.2); }
.diag h3 { margin: 0 auto 6px; max-width: 280px; font: 600 23px/1.15 var(--serif); color: #F1DDB0; }
.diag p { margin: 0; font-size: 12.5px; color: rgba(244, 241, 234, .72); }
.diag-btn { margin-top: 16px; height: 44px; padding: 0 28px; border-radius: 22px; font-weight: 700; font-size: 14.5px; color: #8C0F14; background: #F4F1EA; }
.diag-btn:active { transform: scale(.97); }
:root[data-theme="dark"] .diag { border-color: rgba(207, 171, 105, .3); background: radial-gradient(120% 100% at 50% 0%, #6E1217 0%, #430C11 60%, #2A0B0E 100%); }

.concern-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 16px; }
.concern-tile { min-height: 76px; padding: 14px; border-radius: 16px; text-align: left; display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); }
.concern-tile b { font: 600 17px/1.15 var(--serif); color: var(--dark-red); }
.concern-tile small { font-size: 12px; color: var(--ink-faint); }

.brand-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; padding: 0 18px; }
.brand-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-height: 46px; padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; }
.brand-row span { font: 600 17px/1.1 var(--serif); letter-spacing: .08em; text-transform: uppercase; color: var(--dark-red); }
.brand-row small { font-size: 12px; color: var(--ink-faint); }


.quote { margin: 46px 28px 8px; text-align: center; }
.quote img { width: 34px; margin: 0 auto 12px; opacity: .8; }
.quote p { margin: 0 0 6px; font: italic 500 22px/1.3 var(--serif); color: var(--ink-soft); }
.quote .see-all { justify-content: center; }

.scroller { display: flex; gap: 12px; overflow-x: auto; padding: 2px 16px 8px; scroll-padding: 0 16px; scrollbar-width: none; scroll-snap-type: x proximity; }
.scroller::-webkit-scrollbar { display: none; }
.mini { flex: none; width: 140px; display: flex; flex-direction: column; gap: 3px; text-align: left; scroll-snap-align: start; cursor: pointer; }
/* kenglik qatʼiy — balandlik ham px (4:5): iOS'da foizli padding-hiylasi gorizontal lentada chizilmay qolardi */
.mini .thumb { flex: none; height: 175px; padding-top: 0; border-radius: 16px; margin-bottom: 7px; box-shadow: var(--shadow); }
.mini .ph img { width: 42%; }
.mini .ph i { font-size: 12px; }
.mini .name { font-size: 12.5px; min-height: 2.6em; }
.mini .price { font-size: 13.5px; }

.brand-rail { display: flex; gap: 10px; overflow-x: auto; padding: 2px 16px 8px; scrollbar-width: none; }
.brand-rail::-webkit-scrollbar { display: none; }
.brand-tile {
  position: relative; flex: none; width: 128px; height: 112px; padding: 14px; border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; text-align: left; box-shadow: var(--shadow);
  background: linear-gradient(160deg, var(--placeholder-a), var(--placeholder-b));
}
.brand-tile.t1 { --placeholder-a: #FAF3E4; --placeholder-b: #EDDCB6; }
.brand-tile.t2 { --placeholder-a: #FAF0EC; --placeholder-b: #EED8D0; }
.brand-tile.t3 { --placeholder-a: #F6F4EF; --placeholder-b: #E3DFD6; }
:root[data-theme="dark"] .brand-tile.t1 { --placeholder-a: #272019; --placeholder-b: #1A1613; }
:root[data-theme="dark"] .brand-tile.t2 { --placeholder-a: #291E20; --placeholder-b: #1B1516; }
:root[data-theme="dark"] .brand-tile.t3 { --placeholder-a: #232021; --placeholder-b: #181617; }
.brand-tile img { position: absolute; top: 12px; right: 12px; width: 26px; opacity: .5; }
.brand-tile b { font: 600 17px/1.05 var(--serif); letter-spacing: .08em; text-transform: uppercase; color: var(--dark-red); }
.brand-tile small { font-size: 11.5px; font-weight: 600; color: var(--ink-faint); }


/* ---------- Katalog: guruhlar ---------- */
.all-row {
  display: flex; align-items: center; gap: 12px; width: calc(100% - 32px); margin: 4px 16px 0; padding: 14px 16px;
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); text-align: left;
}
.all-icon { flex: none; width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; color: var(--on-crimson); background: var(--crimson); }
.all-row > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.all-row b { font: 600 19px/1.15 var(--serif); color: var(--dark-red); }
.all-row small { font-size: 12.5px; color: var(--ink-faint); }
.group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 16px; }
.group-tile {
  position: relative; min-height: 92px; padding: 14px; border-radius: 16px; overflow: hidden; text-align: left;
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  background: linear-gradient(160deg, var(--placeholder-a), var(--placeholder-b)); box-shadow: var(--shadow);
}
.group-tile b { position: relative; z-index: 1; font: 600 18px/1.1 var(--serif); color: var(--dark-red); }
.group-tile small { position: relative; z-index: 1; font-size: 12px; font-weight: 600; color: var(--ink-faint); }
.group-tile img { position: absolute; right: -6px; bottom: -10px; width: 64px; opacity: .28; }

/* ---------- sahifa sarlavhasi ---------- */
.page-head {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; min-height: calc(60px + var(--safe-top));
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.page-head h1 { flex: 1; min-width: 0; margin: 0; padding-left: 4px; font: 600 30px/1.1 var(--serif); color: var(--dark-red);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-head.sub h1 { font-size: 26px; padding-left: 0; }
.page-head .back { flex: none; width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center; color: var(--dark-red); }
.in-tg .page-head .back { display: none; }
.in-tg .page-head.sub h1 { padding-left: 4px; }
.page-head + .sticky-search { top: calc(60px + var(--safe-top)); padding-top: 0; }
/* tovar sahifasida Telegram'da sarlavha boʻsh (ortga — Telegram tugmasi): faqat xavfsiz zona qoladi */
.in-tg .page-head.sub:not(:has(h1)) { min-height: 0; padding: calc(var(--safe-top) + 6px) 0 0; }

/* ---------- roʻyxat: maʼlumot va faol filtrlar ---------- */
.list-meta { margin: -2px 20px 10px; font-size: 13px; color: var(--ink-faint); }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.active-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 14px; border-radius: 16px;
  font-size: 13px; font-weight: 600; color: var(--dark-red); background: color-mix(in srgb, var(--gold) 16%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent);
}
.active-chip span { font-size: 11px; color: var(--ink-faint); }

/* ---------- tovar panjarasi ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 16px; }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); text-align: left; animation: viewIn .25s ease-out backwards;
}
.card:active { transform: scale(.985); }
.card.out { opacity: .62; }
/* 4:5 quti padding-top bilan: iOS'ning ayrim versiyalarida flex ustundagi aspect-ratio balandlikni 0 qiladi */
.thumb { position: relative; height: 0; padding-top: 125%; overflow: hidden; background: linear-gradient(160deg, var(--placeholder-a), var(--placeholder-b)); }
/* Rasm boʻlmaguncha katalog bir xil koʻrinmasin: kategoriya boʻyicha brend palitrasidagi tus */
[data-cat="serum"], [data-cat="spf"] { --placeholder-a: #FAF3E4; --placeholder-b: #EDDCB6; }
[data-cat="mask"], [data-cat="makeup"] { --placeholder-a: #FAF0EC; --placeholder-b: #EED8D0; }
[data-cat="toner"], [data-cat="pads"] { --placeholder-a: #F6F4EF; --placeholder-b: #E3DFD6; }
[data-cat="cleanse"], [data-cat="hair"] { --placeholder-a: #F7F5EE; --placeholder-b: #E6E2D2; }
[data-cat="kits"], [data-cat="eye"] { --placeholder-a: #F8EEEA; --placeholder-b: #E7CFC8; }
:root[data-theme="dark"] [data-cat="serum"], :root[data-theme="dark"] [data-cat="spf"] { --placeholder-a: #272019; --placeholder-b: #1A1613; }
:root[data-theme="dark"] [data-cat="mask"], :root[data-theme="dark"] [data-cat="makeup"] { --placeholder-a: #291E20; --placeholder-b: #1B1516; }
:root[data-theme="dark"] [data-cat="toner"], :root[data-theme="dark"] [data-cat="pads"] { --placeholder-a: #232021; --placeholder-b: #181617; }
:root[data-theme="dark"] [data-cat="cleanse"], :root[data-theme="dark"] [data-cat="hair"] { --placeholder-a: #22211B; --placeholder-b: #171613; }
:root[data-theme="dark"] [data-cat="kits"], :root[data-theme="dark"] [data-cat="eye"] { --placeholder-a: #2A2020; --placeholder-b: #1C1616; }
/* oq fonli mahsulot surati qorongʻida koʻzni qamashtirmasin — tus oʻzgarmaydi, faqat yorqinlik */
:root[data-theme="dark"] img.photo { filter: brightness(.93); }
.thumb img.photo, .pd-media img.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 14px; text-align: center; }
.ph img { width: 38%; max-width: 72px; opacity: .55; }
.ph i { font: 700 10px/1.2 var(--sans); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
/* Rasm oʻrnida: ingichka oltin ramka — boʻsh quti emas, ataylab qilingan «qadoq» */
.ph::after { content: ""; position: absolute; inset: 8px; border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); border-radius: 12px; pointer-events: none; }
.row .ph::after, .recent .ph::after { display: none; }
.badge.low { color: var(--heart); }
.price small { font-size: .74em; font-weight: 600; color: var(--ink-soft); }
/* belgilar ustma-ust: chegirma, keyin qoldiq */
.badges { position: absolute; top: 10px; left: 10px; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.badge.sale { color: var(--on-crimson); background: var(--crimson); letter-spacing: .02em; }
.old-price { display: block; font: 500 12px/1.2 var(--sans); color: var(--ink-faint); text-decoration-thickness: 1px; }
.pd-price .old-price { display: inline; margin-left: 8px; font-size: 16px; }
.sale-chip { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 8px; vertical-align: 4px;
  font: 700 13px/1.4 var(--sans); color: var(--on-crimson); background: var(--crimson); }
.promo-note { margin-top: -2px; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.row-foot .old-price { margin-bottom: 1px; }
.sum-row.saved span:last-child { font-weight: 700; color: var(--accent); }
.badge {
  position: static; padding: 4px 9px; border-radius: 10px;
  font: 700 10.5px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase;
  background: var(--surface); color: var(--ink-soft); box-shadow: var(--shadow);
}
.card-body { display: flex; flex-direction: column; gap: 3px; padding: 11px 12px 12px; flex: 1; }
.brand-line { font: 700 10.5px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
.brand-line.as-link { display: inline-block; padding: 0; }
.name { font-size: 13.5px; font-weight: 500; line-height: 1.3; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.rating-sm { font-size: 12px; font-weight: 600; color: var(--gold-ink); }
.rating-sm em { font-style: normal; font-weight: 500; color: var(--ink-faint); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 8px; }
.price { font: 700 15px/1.2 var(--sans); color: var(--dark-red); white-space: nowrap; }

/* Savat boshqaruvi rasm ustida: narx qatori toʻliq kenglikda, kartochka balandligi oʻzgarmaydi */
.card-action { position: absolute; right: 10px; bottom: 10px; z-index: 1; }
.add {
  flex: none; width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center;
  background: var(--crimson); color: var(--on-crimson); transition: transform .12s, background .15s;
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--crimson) 70%, transparent);
}
.add:active { transform: scale(.9); background: var(--crimson-press); }
.stepper {
  flex: none; display: inline-flex; flex-direction: row; align-items: center; height: 38px; border-radius: 19px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent);
}
.stepper button { width: 36px; height: 38px; display: grid; place-items: center; color: var(--accent); }
.stepper b { min-width: 20px; text-align: center; font-weight: 700; font-size: 14px; }
.card-action .stepper { background: var(--surface); box-shadow: var(--shadow); }
.stepper.lg { height: 46px; border-radius: 23px; }
.stepper.lg button { width: 46px; height: 46px; }
.stepper.lg b { min-width: 28px; font-size: 16px; }
.pop { animation: pop .28s ease-out; }
.more { height: 1px; }

.empty { padding: 56px 32px; text-align: center; color: var(--ink-soft); }
.empty img { width: 64px; margin: 0 auto 16px; opacity: .6; }
.empty h3 { margin: 0 0 6px; font: 600 24px/1.2 var(--serif); color: var(--dark-red); }
.empty p { margin: 0 0 18px; font-size: 14px; }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 23px;
  font-weight: 600; color: var(--accent); border: 1.5px solid var(--accent);
}
.btn-solid {
  display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 24px; border-radius: 25px;
  font-weight: 700; color: var(--on-crimson); background: var(--crimson);
}
.btn-solid:disabled { opacity: .55; }
.btn-outline.sm, .btn-solid.sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn-outline.wide { width: 100%; margin-top: 12px; }
.link-btn { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 36px; padding: 0 12px; border-radius: 18px;
  font-weight: 600; font-size: 13.5px; color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }

/* skeleton */
.skel { background: linear-gradient(90deg, var(--placeholder-a) 25%, var(--placeholder-b) 50%, var(--placeholder-a) 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite linear; border-radius: var(--radius); }
.skel.card { aspect-ratio: 4 / 6.2; box-shadow: none; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- tovar sahifasi ---------- */
/* 4:5 — roʻyxatdagi bilan bir xil kadr: surat kesilmaydi */
.pd-media { position: relative; margin: 0 16px; aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden;
  background: linear-gradient(160deg, var(--placeholder-a), var(--placeholder-b)); box-shadow: var(--shadow); }
.pd-media img.photo { width: 100%; height: 100%; object-fit: cover; }
.pd-media .ph img { width: 30%; max-width: 110px; }
.fav { position: absolute; top: 12px; right: 12px; z-index: 1; width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center;
  color: var(--dark-red); background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(8px); box-shadow: var(--shadow); }
.fav.on { color: var(--heart); }
.fav.on svg path { fill: currentColor; }
.fav:active { transform: scale(.92); }
.pd { padding: 18px 20px 0; }
.pd h1 { margin: 6px 0 6px; font: 600 30px/1.08 var(--serif); color: var(--dark-red); }
.pd-vol { margin: -2px 0 8px; font-size: 13.5px; font-weight: 600; letter-spacing: .02em; color: var(--ink-faint); }
.unit-note { align-self: flex-start; margin-top: -4px; font-size: 12.5px; color: var(--ink-faint); }
.fit { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; padding: 13px 14px; border-radius: var(--radius-sm);
  color: var(--gold-ink); background: color-mix(in srgb, var(--gold) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gold) 26%, var(--line)); }
.fit svg { flex: none; margin-top: 1px; }
.fit div { display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.fit small { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-ink); }
.fit span { font-size: 14px; line-height: 1.45; }
/* yigʻiladigan boʻlimlar */
.acc { border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.acc-item + .acc-item { border-top: 1px solid var(--line); }
.acc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 54px; padding: 12px 16px;
  font-size: 15px; font-weight: 600; text-align: left; color: var(--ink); }
.acc-head .chev { transition: transform .2s; }
.acc-item.open .acc-head .chev { transform: rotate(90deg); color: var(--gold-ink); }
.acc-body { padding: 0 16px 16px; font-size: 14px; line-height: 1.6; color: var(--ink-soft); animation: fade .2s ease-out; }
/* qoʻllash: raqamli qadamlar */
.steps-title { margin: 6px 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); }
.steps-list + .steps-title { margin-top: 16px; }
.steps-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.steps-list li { display: flex; align-items: flex-start; gap: 12px; }
.step-no { flex: none; width: 24px; height: 24px; margin-top: 0; border-radius: 12px; display: grid; place-items: center;
  font: 700 12px/1 var(--sans); color: var(--gold-ink); background: color-mix(in srgb, var(--gold) 16%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--gold) 38%, transparent); }
.steps-list li div { flex: 1; min-width: 0; padding-top: 1px; }
.steps-list li p { margin: 0; color: var(--ink); }
.steps-list li p + p { margin-top: 4px; color: var(--ink-soft); font-size: 13.5px; }
.txt { margin: 0 0 10px; }
.txt:last-child { margin-bottom: 0; }
/* ehtiyot choralari: bandlar */
.dots { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.dots li { position: relative; padding-left: 16px; }
.dots li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 5px; height: 5px; border-radius: 3px; background: var(--gold); }
.card-body .vol { font-size: 12px; color: var(--ink-faint); }
.fact b { overflow-wrap: anywhere; }
.rating-line { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-soft); }
.rating-line b { color: var(--ink); font-weight: 700; }
.stars { color: var(--gold); letter-spacing: 1px; font-size: 15px; }
.stars.sm { font-size: 12.5px; }
.stars.dim { color: var(--line); }
.pd-price { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 4px; }
.price-block { display: flex; flex-direction: column; gap: 8px; }
.pd-price .price { font-size: 25px; }
.stock-pill { align-self: flex-start; padding: 3px 10px; border-radius: 10px; font-size: 12px; font-weight: 600;
  color: var(--ok); background: color-mix(in srgb, var(--ok) 11%, transparent); }
.stock-pill.out { color: var(--ink-soft); background: color-mix(in srgb, var(--ink-faint) 16%, transparent); }
.pd-section { margin: 22px 20px 0; }
.pd-section h3 { margin: 0 0 10px; font: 600 22px/1.15 var(--serif); color: var(--dark-red); }
.pd-section .link-btn { margin-top: 8px; }
.pd-section .scroller { margin: 0 -20px; padding-left: 20px; padding-right: 20px; scroll-padding: 0 20px; }
.desc { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink); }
/* yigʻilgan holat: kirish xatboshisi + yumshoq soʻnish (qator kesilib «….» chiqmaydi) */
.desc.clamp { max-height: 11.5em; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
.desc .lead { font-size: 15px; }
.desc-cap { margin: 18px 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); }
.ings { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.ing { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ing b { font-size: 14px; font-weight: 700; color: var(--ink); }
.ing span { font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.checks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.checks li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.45; }
.checks svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--ok); }
.result { margin-top: 18px; padding: 12px 14px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--gold) 9%, var(--surface));
  box-shadow: inset 3px 0 0 var(--gold); }
.result .desc-cap { margin: 0 0 4px; }
.result p:last-child { margin: 0; font: italic 500 17px/1.4 var(--serif); color: var(--dark-red); }
.info-list { display: flex; flex-direction: column; padding: 4px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.info-row { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 11px 0; color: var(--gold-ink); text-align: left; }
.info-row + .info-row { border-top: 1px solid var(--line); }
.info-row div { flex: 1; display: flex; flex-direction: column; gap: 1px; color: var(--ink); }
.info-row b { font-size: 14px; font-weight: 600; }
.info-row span { font-size: 13px; color: var(--ink-soft); }
.info-row .chev { align-self: center; }
.facts { border-top: 1px solid var(--line); }
.fact { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.fact span { flex: none; max-width: 45%; color: var(--ink-soft); }
.fact b { font-weight: 600; text-align: right; }

/* izohlar */
.review-summary { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.review-summary > b { font: 600 40px/1 var(--serif); color: var(--dark-red); }
.review-summary div { display: flex; flex-direction: column; gap: 2px; }
.review-summary small { font-size: 12.5px; color: var(--ink-faint); }
.review { padding: 12px 0; border-top: 1px solid var(--line); }
.review-top { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; }
.review-top b { font-weight: 600; }
.review-top time { margin-left: auto; font-size: 12px; color: var(--ink-faint); }
.buyer { padding: 2px 7px; border-radius: 8px; font-size: 11px; font-weight: 700; color: var(--ok); background: color-mix(in srgb, var(--ok) 11%, transparent); }
.review p { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink); white-space: pre-line; }
.review-form { margin-top: 12px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.form-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.star-input { display: flex; gap: 4px; margin: 4px 0 10px; }
.star-input button { width: 44px; height: 44px; font-size: 30px; line-height: 44px; text-align: center; color: var(--line); transition: color .12s, transform .12s; }
.star-input button.on { color: var(--gold); }
.star-input button:active { transform: scale(.88); }
.review-form textarea { width: 100%; min-height: 84px; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); outline: 0; resize: vertical; font-size: 14.5px; }
.review-form textarea:focus { border-color: var(--gold); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.hint { margin: 0 18px; font-size: 12.5px; line-height: 1.5; color: var(--ink-faint); }
.hint.flush { margin: 0 0 4px; }

/* ---------- savat ---------- */
.list { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.list.flush { padding: 0; margin-bottom: 18px; }
.row { display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); text-align: left; }
.row .thumb { width: 66px; height: 66px; padding-top: 0; flex: none; border-radius: 12px; }
.row .ph { padding: 6px; }
.row .ph img { width: 52%; }
.row .ph i { display: none; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-main .name { min-height: 0; font-size: 13.5px; }
.row-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.row .chev, .chev { flex: none; color: var(--ink-faint); }
.summary { margin: 16px; padding: 16px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 14px; color: var(--ink-soft); }
.sum-row.total { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink); font-size: 16px; font-weight: 700; }
.sum-row.total b { font: 700 20px/1 var(--sans); color: var(--dark-red); }

/* ---------- rasmiylashtirish ---------- */
.form { padding: 0 16px; }
.group { margin-bottom: 18px; }
.group-title { margin: 0 4px 8px; font: 600 20px/1.2 var(--serif); color: var(--dark-red); }
.field { display: block; margin-bottom: 10px; }
.field span { display: block; margin: 0 4px 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea {
  width: 100%; padding: 13px 14px; border-radius: var(--radius-sm); outline: 0;
  background: var(--surface); border: 1px solid var(--line); font-size: 15px; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
.field input:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent); }
.field.err input, .field.err textarea { border-color: var(--danger); }
.field .err-msg { display: none; margin: 6px 4px 0; font-size: 12.5px; font-style: normal; color: var(--danger); }
.field.err .err-msg { display: block; }
.segment { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 14px; background: color-mix(in srgb, var(--dark-red) 7%, var(--surface)); }
.segment button { height: 40px; border-radius: 11px; font-weight: 600; font-size: 14px; color: var(--ink-soft); text-align: center; }
.segment button.on { background: var(--surface); color: var(--dark-red); box-shadow: var(--shadow); }
.option {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; margin-bottom: 8px; padding: 13px 14px; text-align: left;
  border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, background .15s;
}
.option.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.radio { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 10px; border: 1.5px solid var(--ink-faint); display: grid; place-items: center; }
.on > .radio { border-color: var(--accent); }
.on > .radio::after { content: ""; width: 10px; height: 10px; border-radius: 5px; background: var(--accent); }
.option b { display: block; font-size: 14.5px; font-weight: 600; }
.option small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; }
.group.err .option { border-color: var(--danger); }
.contact-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.contact-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.contact-main b { font-size: 15.5px; font-weight: 600; }
.contact-main span { font-size: 14.5px; color: var(--ink-soft); }
.contact-main small { margin-top: 4px; font-size: 12px; color: var(--gold-ink); }
.contact-main small.muted { color: var(--ink-soft); line-height: 1.4; }
.admin-link { align-items: center; }
.admin-link > span:nth-child(2) { flex: 1; }
.radio-icon { flex: none; width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent); }

/* ---------- rahmat ---------- */
.success { min-height: calc(var(--tg-viewport-stable-height, 100vh) - 40px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 28px; text-align: center; }
.halo { position: relative; width: 132px; height: 132px; display: grid; place-items: center; margin-bottom: 22px; }
.halo::before, .halo::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--gold) 60%, transparent); animation: halo 2.4s ease-out infinite; }
.halo::after { animation-delay: 1.2s; }
.halo img { width: 74px; position: relative; animation: rise .8s ease-out both; }
@keyframes halo { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.success h1 { margin: 0 0 10px; font: 600 38px/1.05 var(--serif); color: var(--dark-red); }
.success p { margin: 0 0 26px; font-size: 15px; line-height: 1.55; color: var(--ink-soft); max-width: 320px; }
.success .actions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 320px; }

/* ---------- buyurtmalar ---------- */
.order { padding: 14px 16px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.order-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.order-top b { font: 600 20px/1.1 var(--serif); color: var(--dark-red); }
.status { padding: 4px 10px; border-radius: 10px; font: 700 11px/1.3 var(--sans); letter-spacing: .04em; }
.status.new { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold-ink); }
.status.accepted, .status.delivering { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.status.done { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.status.cancelled { background: color-mix(in srgb, var(--ink-faint) 18%, transparent); color: var(--ink-soft); }
.order-meta { margin-top: 6px; font-size: 12.5px; color: var(--ink-faint); }
.order-items { margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); list-style: none; font-size: 13px; color: var(--ink-soft); }
.order-items li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.order-total { display: flex; justify-content: space-between; margin-top: 8px; font-weight: 700; }

/* ---------- profil ---------- */
.profile-card { margin-bottom: 18px; }
.avatar { flex: none; width: 48px; height: 48px; border-radius: 24px; display: grid; place-items: center; color: var(--gold-ink);
  background: color-mix(in srgb, var(--gold) 16%, var(--surface)); }
.stores { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.store { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.store-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.store-main b { font-size: 14.5px; font-weight: 600; }
.store-main span { font-size: 13px; color: var(--ink-soft); }
.store-main small { font-size: 12px; color: var(--ink-faint); }
.fav-empty { margin-bottom: 18px; }
/* Sozlamalar uslubi (iOS/Telegram): guruhlangan roʻyxat, ingichka ajratgich, oʻngda joriy qiymat */
.account { display: flex; align-items: center; gap: 14px; margin: 4px 0 6px; padding: 4px 4px 0; }
.account ~ .group-title { margin-top: 24px; }
.set-row .chev svg[width="16"] { color: var(--gold-ink); }
.monogram { flex: none; width: 56px; height: 56px; border-radius: 28px; display: grid; place-items: center;
  font: 600 22px/1 var(--serif); letter-spacing: .02em; color: var(--dark-red);
  background: color-mix(in srgb, var(--gold) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); }
.group-card { margin-bottom: 6px; border-radius: 16px; overflow: hidden; background: var(--surface); }
.set-row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 10px 14px; text-align: left; }
.set-row:active { background: color-mix(in srgb, var(--dark-red) 5%, var(--surface)); }
.set-row + .set-row::before { content: ""; position: absolute; top: 0; left: 56px; right: 0; height: 1px; background: var(--line); }
.set-icon { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--gold-ink);
  background: color-mix(in srgb, var(--gold) 14%, var(--surface)); }
.set-icon svg { width: 18px; height: 18px; }
.set-label { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 15px; font-weight: 500; }
.set-label small { font-size: 12px; font-weight: 400; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-value { flex: none; font-size: 14px; color: var(--ink-faint); }
.set-row .chev { margin-left: -6px; }
.set-row .chev svg { width: 16px; height: 16px; }

/* ixcham tanlov oynasi */
.sheet.compact { max-height: 60vh; }
.sheet.compact .sheet-head { padding-bottom: 8px; }
.sheet.compact .sheet-body { padding: 0 16px calc(16px + var(--safe-bottom)); }
.pick-row { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 10px 6px; text-align: left; }
.pick-row + .pick-row::before { content: ""; position: absolute; top: 0; left: 50px; right: 0; height: 1px; background: var(--line); }
.pick-label { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.pick-label b { font-size: 15.5px; font-weight: 500; }
.pick-label small { font-size: 12.5px; color: var(--ink-faint); }
.pick-row.on .pick-label b { font-weight: 700; color: var(--dark-red); }
.pick-check { flex: none; color: var(--accent); opacity: 0; transform: scale(.6); transition: opacity .12s, transform .12s; }
.pick-row.on .pick-check { opacity: 1; transform: none; }
.swatch { flex: none; width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line); }
.swatch.light { background: linear-gradient(160deg, #FFFFFF, #F4F1EA); }
.swatch.dark { background: linear-gradient(160deg, #2A2425, #121011); border-color: #2D2728; }
.swatch.auto { background: linear-gradient(135deg, #F4F1EA 0 50%, #1C1819 50% 100%); }
.lang-code { flex: none; width: 32px; height: 32px; border-radius: 16px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; color: var(--gold-ink); background: color-mix(in srgb, var(--gold) 15%, var(--surface)); }
.concern-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.about { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 26px 0 8px; font: italic 500 16px/1.3 var(--serif); color: var(--ink-soft); }
.about img { width: 28px; opacity: .8; }

/* ---------- pastki menyu ---------- */
body.with-tabbar #app { padding-bottom: calc(84px + var(--safe-bottom)); }
body.with-tabbar #app .has-cta { padding-bottom: 76px; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px calc(6px + var(--safe-bottom));
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(18px); -webkit-backdrop-filter: saturate(1.4) blur(18px);
  border-top: 1px solid var(--line);
}
.tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 4px;
  font: 600 10.5px/1.1 var(--sans); color: var(--ink-faint); text-align: center; transition: color .15s; }
.tab svg { transition: transform .2s; }
.tab.on { color: var(--accent); }
.tab.on svg { transform: translateY(-1px); }
.tab.on::after { content: ""; position: absolute; top: 0; width: 18px; height: 2px; border-radius: 1px; background: var(--gold); }
.tab-badge { position: absolute; top: 1px; left: calc(50% + 5px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  font: 700 10.5px/18px var(--sans); font-style: normal; text-align: center; color: var(--on-crimson); background: var(--crimson);
  box-shadow: 0 0 0 2px var(--surface); animation: pop .3s ease-out; }
.cta-bar { position: fixed; left: 0; right: 0; z-index: 24; bottom: calc(62px + var(--safe-bottom)); padding: 14px 16px 10px;
  background: linear-gradient(180deg, transparent, var(--bg) 38%); }
.cta-bar .btn-solid { width: 100%; height: 52px; border-radius: 14px; font-size: 15px; box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--crimson) 80%, transparent); }

/* ---------- filtr oynasi (bottom sheet) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(28, 6, 9, .42); backdrop-filter: blur(2px); animation: fade .2s ease-out; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 82vh; display: flex; flex-direction: column;
  border-radius: 24px 24px 0 0; background: var(--sheet); box-shadow: 0 -12px 40px -12px rgba(28, 6, 9, .35);
  animation: sheetUp .28s cubic-bezier(.2, .8, .2, 1);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet-handle { width: 40px; height: 4px; margin: 10px auto 2px; border-radius: 2px; background: var(--line); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px 4px; }
.sheet-head h3 { margin: 0; font: 600 24px/1.2 var(--serif); color: var(--dark-red); }
.sheet-body { flex: 1; overflow-y: auto; padding: 0 12px 8px; overscroll-behavior: contain; }
.sheet-caption { margin: 16px 8px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); }
.sheet-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 10px; border-radius: 12px; text-align: left; }
.sheet-row:active { background: color-mix(in srgb, var(--dark-red) 5%, transparent); }
.sheet-row.on { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.sheet-row .radio { margin-top: 0; }
.sheet-label { flex: 1; font-size: 15px; font-weight: 500; }
.sheet-row.on .sheet-label { font-weight: 700; color: var(--dark-red); }
.sheet-row small { font-size: 12.5px; color: var(--ink-faint); }
.sheet-foot { padding: 10px 16px calc(12px + var(--safe-bottom)); border-top: 1px solid var(--line); }
.sheet-foot .btn-solid { width: 100%; height: 52px; border-radius: 14px; font-size: 15px; }

/* fallback bar (brauzerda — Telegram MainButton oʻrniga) */
.fallback-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 16px calc(10px + var(--safe-bottom));
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.fallback-bar button { width: 100%; height: 52px; border-radius: 14px; font-weight: 700; font-size: 15px; text-align: center; color: var(--on-crimson); background: var(--crimson); }
.fallback-bar button:disabled { opacity: .6; }

.toast { position: fixed; left: 16px; right: 16px; bottom: calc(84px + var(--safe-bottom)); z-index: 50; padding: 13px 16px; border-radius: 14px;
  font-size: 14px; color: var(--on-crimson); background: color-mix(in srgb, var(--dark-red) 94%, #000); box-shadow: var(--shadow); animation: viewIn .2s ease-out; }
:root[data-theme="dark"] .toast { color: var(--ink); background: #2A2425; border: 1px solid var(--line); }
:root[data-theme="dark"] .sheet-backdrop { background: rgba(0, 0, 0, .58); }
:root[data-theme="dark"] .sheet { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 -12px 40px -12px rgba(0, 0, 0, .8); }

@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #app { max-width: 720px; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
