/* =========================================================================
   TezSlot Mini App — iOS "Liquid Glass" uslubi.
   Mavzu Telegram'dan (light/dark), aksent rangi admin paneldagi brend rangidan (--accent).
   ========================================================================= */
:root {
  --accent: #6e56cf;
  --accent-rgb: 110, 86, 207;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  --r-xl: 30px; --r-lg: 24px; --r-md: 18px; --r-sm: 13px;
  --safe-t: var(--tg-content-safe-area-inset-top, 0px);
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --tab-h: 66px;
  --ease: cubic-bezier(.2, .9, .25, 1.15);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- mavzular ---------- */
[data-theme="light"] {
  --bg: #eef0f6;
  --text: #0b0b12;
  --muted: #6b6f80;
  --hair: rgba(15, 18, 40, .08);
  --glass-bg: rgba(255, 255, 255, .58);
  --glass-bg-strong: rgba(255, 255, 255, .78);
  --glass-edge: rgba(255, 255, 255, .85);
  --glass-shadow: 0 1px 1px rgba(15, 20, 60, .04), 0 10px 30px -8px rgba(30, 30, 80, .18);
  --glass-hi: rgba(255, 255, 255, .95);
  --glass-lo: rgba(255, 255, 255, .25);
  --fill: rgba(118, 118, 128, .12);
  --fill-2: rgba(118, 118, 128, .2);
  --ok: #1fae5b; --warn: #e08a00; --bad: #e5484d;
  --blob-a: rgba(var(--accent-rgb), .42);
  --blob-b: rgba(64, 196, 255, .35);
  --blob-c: rgba(255, 140, 200, .30);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #07070b;
  --text: #f4f4f8;
  --muted: #9a9cab;
  --hair: rgba(255, 255, 255, .08);
  --glass-bg: rgba(38, 38, 48, .46);
  --glass-bg-strong: rgba(44, 44, 56, .72);
  --glass-edge: rgba(255, 255, 255, .14);
  --glass-shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 14px 40px -10px rgba(0, 0, 0, .65);
  --glass-hi: rgba(255, 255, 255, .22);
  --glass-lo: rgba(255, 255, 255, .03);
  --fill: rgba(120, 120, 140, .18);
  --fill-2: rgba(120, 120, 140, .28);
  --ok: #34d17a; --warn: #ffb547; --bad: #ff6369;
  --blob-a: rgba(var(--accent-rgb), .5);
  --blob-b: rgba(40, 120, 255, .28);
  --blob-c: rgba(255, 80, 160, .18);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.42 var(--font);
  letter-spacing: -.01em;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none; user-select: none;
}
input, textarea { -webkit-user-select: text; user-select: text; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hidden { display: none !important; }

/* ---------- jonli fon (shisha ortida rang bo'lishi uchun) ---------- */
.mesh { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.mesh i { position: absolute; border-radius: 50%; filter: blur(60px); will-change: transform; }
.mesh .b1 { width: 80vw; height: 80vw; left: -25vw; top: -20vw; background: radial-gradient(circle, var(--blob-a), transparent 68%); animation: drift 22s ease-in-out infinite alternate; }
.mesh .b2 { width: 70vw; height: 70vw; right: -30vw; top: 25vh; background: radial-gradient(circle, var(--blob-b), transparent 68%); animation: drift 28s ease-in-out infinite alternate-reverse; }
.mesh .b3 { width: 75vw; height: 75vw; left: 5vw; bottom: -35vw; background: radial-gradient(circle, var(--blob-c), transparent 68%); animation: drift 34s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(8vw, 6vh) scale(1.12); } }

/* ---------- Liquid Glass ---------- */
.glass {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  backdrop-filter: blur(28px) saturate(190%);
  border: .5px solid var(--glass-edge);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-hi), inset 0 -1px 0 var(--glass-lo);
  border-radius: var(--r-lg);
}
/* yorug'lik aksi (specular highlight) */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .1));
  mix-blend-mode: soft-light;
}
[data-theme="dark"] .glass::before { background: linear-gradient(155deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0) 72%, rgba(255, 255, 255, .05)); mix-blend-mode: normal; }
.glass > * { position: relative; }

/* ---------- sahifa ---------- */
.view {
  padding: calc(var(--safe-t) + 14px) 16px calc(var(--tab-h) + var(--safe-b) + 34px);
  max-width: 640px; margin: 0 auto;
  animation: enter .45s var(--ease-out);
}
.view.flow { padding-bottom: calc(var(--safe-b) + 120px); }
@keyframes enter { from { opacity: 0; transform: translateY(10px) scale(.99); } }
.large-title { font: 800 32px/1.08 var(--display); letter-spacing: -.035em; margin: 8px 4px 16px; }
.eyebrow { font-size: 14px; color: var(--muted); margin: 0 4px; display: flex; align-items: center; gap: 6px; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; margin: 26px 6px 10px; font: 700 20px/1.2 var(--display); letter-spacing: -.02em; }
.section-title a, .link { font: 500 15px var(--font); color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 12px; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }

/* ---------- balans kartasi ---------- */
.hero {
  padding: 22px 22px 20px; border-radius: var(--r-xl); overflow: hidden;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(var(--accent-rgb), .55), transparent 55%),
    radial-gradient(90% 120% at 0% 100%, rgba(var(--accent-rgb), .28), transparent 60%),
    var(--glass-bg);
}
.hero .label { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.hero .amount { font: 800 46px/1 var(--display); letter-spacing: -.045em; margin: 8px 0 4px; display: flex; align-items: baseline; gap: 8px; }
.hero .amount small { font: 600 17px var(--font); letter-spacing: -.01em; color: var(--muted); }
.hero .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 99px; background: var(--fill); font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill svg { width: 15px; height: 15px; }
.pill.accent { background: rgba(var(--accent-rgb), .16); color: var(--accent); }
.pill.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.pill.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.pill.bad { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.hero .actions { display: flex; gap: 10px; margin-top: 18px; }

/* ---------- tugmalar ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 22px; border-radius: 99px; font-weight: 650; font-size: 17px; letter-spacing: -.015em;
  transition: transform .25s var(--ease), opacity .2s, background .2s; overflow: hidden; white-space: nowrap;
}
.btn:active { transform: scale(.965); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.block { width: 100%; }
.btn.sm { height: 40px; padding: 0 16px; font-size: 15px; }
.btn.primary {
  color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent));
  box-shadow: 0 8px 24px -6px rgba(var(--accent-rgb), .6), inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -1px 0 rgba(0, 0, 0, .12);
}
.btn.primary::after { /* shisha yaltirashi */
  content: ""; position: absolute; inset: 0 0 50% 0; border-radius: 99px 99px 40% 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .32), rgba(255, 255, 255, 0)); pointer-events: none;
}
.btn.glassy { background: var(--glass-bg-strong); border: .5px solid var(--glass-edge); box-shadow: inset 0 1px 0 var(--glass-hi); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.btn.tinted { background: rgba(var(--accent-rgb), .14); color: var(--accent); }
.btn.danger { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.btn .spin { width: 18px; height: 18px; border-radius: 50%; border: 2.4px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }

/* ---------- katta harakat kartasi ---------- */
.cta { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-lg); margin-top: 14px; transition: transform .25s var(--ease); }
.cta:active { transform: scale(.98); }
.cta .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; flex: none;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent)); box-shadow: 0 8px 20px -6px rgba(var(--accent-rgb), .7), inset 0 1px 0 rgba(255, 255, 255, .45); }
.cta .ico svg { width: 26px; height: 26px; stroke-width: 2.2; }
.cta b { display: block; font-size: 18px; letter-spacing: -.02em; }
.cta span { font-size: 14px; color: var(--muted); }
.cta > svg { color: var(--muted); }

/* ---------- ro'yxatlar (inset grouped) ---------- */
.list { border-radius: var(--r-lg); overflow: hidden; }
.list .item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; min-height: 54px; position: relative; }
.list .item + .item::before { content: ""; position: absolute; top: 0; left: 56px; right: 0; height: .5px; background: var(--hair); }
.list .item.plain + .item.plain::before { left: 16px; }
.list .item .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: var(--accent); flex: none; }
.list .item .ic svg { width: 18px; height: 18px; stroke-width: 2; }
.list .item .grow { flex: 1; min-width: 0; }
.list .item .t { font-weight: 550; }
.list .item .s { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .item .v { color: var(--muted); font-size: 15px; text-align: right; }
.list .item > svg:last-child { color: var(--muted); width: 18px; height: 18px; opacity: .6; }
.list .item:active:not(.static) { background: var(--fill); }
.ic.green { background: #30c35b !important; } .ic.orange { background: #ff9500 !important; } .ic.blue { background: #0a84ff !important; }
.ic.pink { background: #ff375f !important; } .ic.gray { background: #8e8e93 !important; } .ic.teal { background: #14b8a6 !important; }

/* ---------- vazifa kartasi ---------- */
.task { padding: 16px; border-radius: var(--r-lg); }
.task + .task { margin-top: 12px; }
.task .head { display: flex; align-items: center; gap: 12px; }
.task .num { font: 700 17px var(--display); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task .head .grow { flex: 1; min-width: 0; }
.task .shop { font-size: 13px; color: var(--muted); }
.radar { position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(var(--accent-rgb), .14); color: var(--accent); }
.radar svg { width: 19px; height: 19px; stroke-width: 2.2; }
.radar.live::before, .radar.live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); animation: ping 2.4s var(--ease-out) infinite; }
.radar.live::after { animation-delay: 1.2s; }
@keyframes ping { from { transform: scale(1); opacity: .65; } to { transform: scale(1.9); opacity: 0; } }
.radar.done { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.radar.failed { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.radar.cancelled { background: var(--fill); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { height: 30px; padding: 0 11px; border-radius: 10px; display: inline-flex; align-items: center; background: var(--fill); font-size: 14px; font-weight: 550; }
.chip.hit { background: var(--ok); color: #fff; }
.task .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.task .note { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* ---------- segment ---------- */
.segment { display: flex; position: relative; padding: 3px; border-radius: 12px; background: var(--fill); margin-bottom: 14px; }
.segment button { flex: 1; height: 34px; border-radius: 9px; font-size: 14px; font-weight: 600; position: relative; z-index: 1; transition: color .2s; }
.segment .thumb { position: absolute; top: 3px; bottom: 3px; border-radius: 9px; background: var(--glass-bg-strong); box-shadow: 0 3px 10px rgba(0, 0, 0, .12), inset 0 1px 0 var(--glass-hi); transition: left .35s var(--ease), width .35s var(--ease); }

/* ---------- tariflar ---------- */
.pkgs { display: grid; gap: 12px; }
.pkg { padding: 18px; border-radius: var(--r-lg); display: flex; align-items: center; gap: 14px; transition: transform .25s var(--ease); }
.pkg:active { transform: scale(.98); }
.pkg .gem { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; flex: none; color: var(--accent); background: rgba(var(--accent-rgb), .14); }
.pkg .gem svg { width: 26px; height: 26px; }
.pkg .grow { flex: 1; min-width: 0; }
.pkg .name:empty { display: none; }
.pkg .name { margin-bottom: 2px; font-size: 13px; color: var(--muted); font-weight: 600; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.pkg .tok { font: 800 24px/1.1 var(--display); letter-spacing: -.03em; }
.pkg .tok em { font: 600 14px var(--font); font-style: normal; color: var(--ok); margin-left: 4px; }
.pkg .slots { font-size: 13px; color: var(--muted); }
.pkg .price { text-align: right; white-space: nowrap; flex: none; }
.pkg .price b { display: block; font-size: 17px; letter-spacing: -.02em; }
.pkg .price s { font-size: 13px; color: var(--muted); }
.pkg .price .stars { font-size: 13px; color: var(--muted); }
.pkg.hot { border-color: rgba(var(--accent-rgb), .55); box-shadow: var(--glass-shadow), 0 0 0 1.5px rgba(var(--accent-rgb), .35), inset 0 1px 0 var(--glass-hi); }
.badge { white-space: nowrap; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--accent); color: #fff; letter-spacing: .01em; text-transform: uppercase; }
.banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); margin-top: 14px; }
.banner .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(140deg, #ff9f0a, #ff375f); }
.banner b { display: block; }
.banner span { font-size: 13px; color: var(--muted); }
.banner.warn .ic { background: linear-gradient(140deg, #ffd60a, #ff9f0a); }

/* ---------- tanga ---------- */
.coin { display: block; width: 44px; height: 44px; filter: drop-shadow(0 6px 10px rgba(80, 40, 0, .28)); -webkit-user-drag: none; }
.hero { isolation: isolate; }
.hero-coins { position: absolute; right: 14px; top: 12px; width: 130px; height: 120px; z-index: 0; pointer-events: none; }
.hero-coins .coin { position: absolute; }
.hero-coins .c1 { width: 74px; height: 74px; right: 8px; top: 6px; animation: bob 5s ease-in-out infinite; }
.hero-coins .c2 { width: 52px; height: 52px; right: 70px; top: 46px; opacity: .92; animation: bob 6s .8s ease-in-out infinite; }
.hero-coins .c3 { width: 34px; height: 34px; right: 24px; top: 82px; opacity: .8; animation: bob 7s 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-7px) rotate(-6deg); } }
.hero > :not(.hero-coins) { position: relative; z-index: 1; }
.stack { position: relative; display: block; width: 58px; height: 52px; flex: none; }
.stack .coin { position: absolute; width: 44px; height: 44px; left: 7px; top: 4px; }
.stack.s2 .coin:nth-child(1) { left: 0; top: 10px; } .stack.s2 .coin:nth-child(2) { left: 14px; top: 0; }
.stack.s3 .coin:nth-child(1) { left: 0; top: 12px; } .stack.s3 .coin:nth-child(2) { left: 14px; top: 6px; } .stack.s3 .coin:nth-child(3) { left: 8px; top: -4px; width: 46px; height: 46px; }
.pkg .tok .word { font: 600 15px var(--font); color: var(--muted); letter-spacing: -.01em; }
.save { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); white-space: nowrap; }
.buyer { padding: 22px 18px 18px; border-radius: var(--r-xl); text-align: center; }
.buyer-coin { width: 112px; height: 112px; margin: 0 auto 10px; perspective: 600px; }
.buyer-coin .coin { width: 112px; height: 112px; }
.coin.spin { animation: coinspin 6s ease-in-out infinite; }
@keyframes coinspin { 0%, 70%, 100% { transform: rotateY(0); } 85% { transform: rotateY(360deg); } }
.unit-price { color: var(--muted); font-size: 15px; } .unit-price b { color: var(--text); } .unit-price s { font-size: 13px; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 16px 0 12px; }
.stepper button { width: 52px; height: 52px; border-radius: 50%; font-size: 26px; font-weight: 600; color: var(--accent); background: rgba(var(--accent-rgb), .13); transition: transform .2s var(--ease); }
.stepper button:active { transform: scale(.9); }
.stepper input { width: 110px; height: 60px; text-align: center; border: 0; outline: 0; border-radius: 18px; background: var(--fill); font: 800 34px var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.qchips { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.qchips button { min-width: 48px; height: 36px; padding: 0 12px; border-radius: 12px; background: var(--fill); font-weight: 650; transition: background .2s, color .2s; }
.qchips button.on { background: var(--accent); color: #fff; }
.buyer .total { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 4px 14px; font-size: 15px; color: var(--muted); }
.buyer .total b { font: 800 22px var(--display); color: var(--text); letter-spacing: -.02em; }
.sheet-coins { display: flex; justify-content: center; margin: 4px 0 8px; } .sheet-coins .stack { transform: scale(1.35); margin: 8px 0; }
.center { text-align: center; }

/* ---------- forma ---------- */
.field { display: flex; align-items: center; gap: 10px; padding: 0 8px 0 18px; height: 60px; border-radius: var(--r-md); }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 22px; font-weight: 650; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.field input::placeholder { color: var(--muted); opacity: .6; font-weight: 500; }
.field.sm { height: 50px; } .field.sm input { font-size: 17px; letter-spacing: 0; }
.hint { font-size: 13px; color: var(--muted); margin: 8px 6px 0; }
.err { color: var(--bad); }

/* ---------- qadamlar ---------- */
.steps { display: flex; gap: 6px; margin: 4px 4px 18px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--fill-2); overflow: hidden; position: relative; }
.steps i.on::after { content: ""; position: absolute; inset: 0; background: var(--accent); animation: grow .5s var(--ease-out); transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.topbar { display: flex; align-items: center; gap: 8px; margin: 0 0 6px -6px; }
.topbar .icon-btn { color: var(--accent); }

/* ---------- postavka kartasi ---------- */
.inv { padding: 16px 18px; border-radius: var(--r-lg); }
.inv .kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 15px; }
.inv .kv + .kv { border-top: .5px solid var(--hair); }
.inv .kv span:first-child { color: var(--muted); }
.inv .kv span:last-child { text-align: right; font-weight: 550; }

/* ---------- taqvim ---------- */
.cal { padding: 14px 12px 10px; border-radius: var(--r-lg); margin-top: 12px; }
.cal + .cal { margin-top: 10px; }
.cal h4 { margin: 0 6px 10px; font: 700 17px var(--display); text-transform: capitalize; letter-spacing: -.02em; }
.cal .grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .wd { font-size: 12px; color: var(--muted); text-align: center; font-weight: 600; padding-bottom: 4px; }
.cal .d { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: 16px; font-weight: 550; position: relative; transition: transform .25s var(--ease), background .2s, color .2s; font-variant-numeric: tabular-nums; }
.cal .d:active { transform: scale(.88); }
.cal .d.off { color: var(--muted); opacity: .35; pointer-events: none; }
.cal .d.today { box-shadow: inset 0 0 0 1.5px rgba(var(--accent-rgb), .6); }
.cal .d.cur::after { content: ""; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--warn); }
.cal .d.sel { background: var(--accent); color: #fff; box-shadow: 0 6px 14px -4px rgba(var(--accent-rgb), .7); animation: pop .35s var(--ease); }
@keyframes pop { 50% { transform: scale(1.12); } }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin: 10px 8px 0; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }

/* ---------- pastki doimiy tugma ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(var(--safe-b) + 12px); z-index: 20; display: flex; gap: 10px; max-width: 640px; margin: 0 auto;
  background: linear-gradient(to top, var(--bg) 40%, transparent); }
.dock .btn { flex: 1; }

/* ---------- tab bar (suzuvchi shisha kapsula) ---------- */
.tabbar {
  position: fixed; left: 50%; bottom: calc(var(--safe-b) + 12px); transform: translateX(-50%);
  width: min(420px, calc(100% - 28px)); height: var(--tab-h); border-radius: 99px; z-index: 30;
  display: flex; align-items: center; padding: 6px; gap: 2px;
}
.tabbar a { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10.5px; font-weight: 600; color: var(--muted); border-radius: 99px; position: relative; z-index: 1; transition: color .25s; }
.tabbar a svg { width: 25px; height: 25px; transition: transform .35s var(--ease); }
.tabbar a.on { color: var(--accent); }
.tabbar a.on svg { transform: translateY(-1px) scale(1.06); }
.tab-pill { position: absolute; top: 6px; bottom: 6px; border-radius: 99px; background: rgba(var(--accent-rgb), .13); transition: left .45s var(--ease), width .45s var(--ease); }

/* ---------- sheet ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .32); z-index: 40; animation: fade .3s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; left: 8px; right: 8px; bottom: calc(8px + var(--safe-b)); z-index: 41; max-width: 620px; margin: 0 auto;
  border-radius: 34px; padding: 10px 18px 20px; max-height: 86vh; overflow-y: auto; background: var(--glass-bg-strong);
  animation: up .5s var(--ease-out);
}
@keyframes up { from { transform: translateY(110%); } }
.sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: var(--fill-2); margin: 0 auto 12px; }
.sheet h3 { margin: 4px 2px 4px; font: 750 22px var(--display); letter-spacing: -.03em; }
.sheet .sub { color: var(--muted); font-size: 15px; margin: 0 2px 14px; }
.method { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r-md); background: var(--fill); width: 100%; text-align: left; transition: transform .2s var(--ease); }
.method + .method { margin-top: 10px; }
.method:active { transform: scale(.98); }
.method .ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; flex: none; }
.method b { display: block; } .method span { font-size: 13px; color: var(--muted); }
.method .amt { margin-left: auto; font-weight: 700; white-space: nowrap; }
.cardbox { padding: 18px; border-radius: 22px; color: #fff; margin: 6px 0 14px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 70%, #000), var(--accent) 60%, color-mix(in srgb, var(--accent) 70%, #fff));
  box-shadow: 0 16px 34px -12px rgba(var(--accent-rgb), .8), inset 0 1px 0 rgba(255, 255, 255, .35); }
.cardbox::after { content: ""; position: absolute; width: 220px; height: 220px; right: -70px; top: -90px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.cardbox .no { font: 700 22px/1.2 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .06em; margin: 18px 0 6px; }
.cardbox .holder { opacity: .85; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
.cardbox .copy { position: absolute; right: 14px; bottom: 14px; z-index: 1; background: rgba(255, 255, 255, .22); color: #fff; }
.numbered { counter-reset: n; padding: 0; margin: 0 0 16px; list-style: none; }
.numbered li { counter-increment: n; display: flex; gap: 12px; padding: 8px 0; font-size: 15px; }
.numbered li::before { content: counter(n); width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--accent); background: rgba(var(--accent-rgb), .14); }
.numbered li b, .numbered li code { font-weight: 650; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .92em; background: var(--fill); padding: 1px 6px; border-radius: 6px; }

/* ---------- natija ekrani ---------- */
.success { text-align: center; padding: 34px 10px 10px; }
.success .big { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--ok) 70%, #fff), var(--ok)); box-shadow: 0 18px 40px -12px color-mix(in srgb, var(--ok) 80%, transparent);
  animation: pop2 .7s var(--ease); }
.success .big svg { width: 48px; height: 48px; stroke-width: 2.6; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .6s .25s var(--ease-out) forwards; }
@keyframes pop2 { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.08); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success h2 { font: 800 28px var(--display); letter-spacing: -.03em; margin: 0 0 8px; }
.success p { color: var(--muted); margin: 0 auto 24px; max-width: 320px; }

/* ---------- bo'sh holat, skelet ---------- */
.empty { text-align: center; padding: 38px 20px; border-radius: var(--r-lg); color: var(--muted); }
.empty svg { width: 42px; height: 42px; margin-bottom: 8px; opacity: .55; }
.skel { border-radius: var(--r-lg); background: linear-gradient(90deg, var(--fill) 25%, var(--fill-2) 50%, var(--fill) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; top: calc(var(--safe-t) + 14px); transform: translateX(-50%); z-index: 60; padding: 12px 18px; border-radius: 99px; font-weight: 600; font-size: 15px; max-width: calc(100% - 32px); text-align: center; animation: drop .45s var(--ease); background: var(--glass-bg-strong); }
.toast.bad { color: var(--bad); }
@keyframes drop { from { transform: translate(-50%, -30px); opacity: 0; } }

/* ---------- accordion ---------- */
details.qa { padding: 0 16px; }
details.qa + details.qa { border-top: .5px solid var(--hair); }
details.qa summary { list-style: none; padding: 15px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 10px; cursor: pointer; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary svg { transition: transform .3s var(--ease); color: var(--muted); width: 18px; }
details.qa[open] summary svg { transform: rotate(90deg); }
details.qa p { margin: -4px 0 14px; color: var(--muted); font-size: 15px; }

/* ---------- konfetti ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: fall 1.8s var(--ease-out) forwards; }
@keyframes fall { to { transform: translate(var(--dx), 105vh) rotate(var(--r)); opacity: .9; } }

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