/* =========================================================
   NATURAL SISTEMA — Telegram Mini App
   Ranglar va shriftlar gymbro.uz saytidan olingan
   ========================================================= */

:root {
  --sans: "Instrument Sans", "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", "Cormorant Garamond", Georgia, "Times New Roman", serif;

  --bg: #F3F7FD;
  --bg-2: #EEF8F5;
  --surface: #FFFFFF;
  --surface-2: #F2F6FC;
  --ink: #0C1F3F;
  --ink-2: #33476A;
  --muted: #5D6F8A;
  --line: rgba(12, 31, 63, .08);
  --line-2: rgba(12, 31, 63, .14);

  --blue: #1A5FC4;
  --blue-soft: rgba(26, 95, 196, .09);
  --sky: #3A97EC;
  --mint: #7AE0D0;
  --mint-btn: #A8EFE3;
  --teal: #14A08E;
  --danger: #D14343;

  --grad-text: linear-gradient(92deg, #1A5FC4 0%, #2C86D9 45%, #14A08E 100%);
  --glow-blue: rgba(58, 151, 236, .30);
  --glow-mint: rgba(122, 224, 208, .34);

  /* Makros ranglari (rang ko‘rlik uchun tekshirilgan) */
  --m-p: #1A5FC4;
  --m-f: #E39A2D;
  --m-c: #14A08E;

  --tab-bg: rgba(255, 255, 255, .78);
  --shadow: 0 1px 2px rgba(12, 31, 63, .04), 0 14px 34px -16px rgba(26, 95, 196, .25);
  --shadow-lg: 0 24px 48px -20px rgba(18, 60, 134, .55);
  --radius: 22px;

  --tab-h: 64px;
  --cta-h: 0px;
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --safe-t: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #08111F;
  --bg-2: #071A1E;
  --surface: #111E36;
  --surface-2: #172743;
  --ink: #EAF1FB;
  --ink-2: #C3D1E6;
  --muted: #8FA3C2;
  --line: rgba(234, 241, 251, .08);
  --line-2: rgba(234, 241, 251, .16);

  --blue: #5B9BF0;
  --blue-soft: rgba(91, 155, 240, .14);
  --mint-btn: #7AE0D0;
  --teal: #3CC8B4;
  --danger: #F07070;

  --grad-text: linear-gradient(92deg, #6AA6F5 0%, #5BBDEB 45%, #5FDCC8 100%);
  --glow-blue: rgba(58, 151, 236, .22);
  --glow-mint: rgba(60, 200, 180, .16);

  --m-p: #4F8BE3;
  --m-f: #BA7F1F;
  --m-c: #1FA894;

  --tab-bg: rgba(17, 30, 54, .78);
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 14px 34px -18px rgba(0, 0, 0, .7);
  --shadow-lg: 0 24px 48px -20px rgba(0, 0, 0, .75);

  color-scheme: dark;
}

/* ---------- Asos ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  overflow-x: hidden;
}
body.web { --cta-h: 74px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button:focus-visible, [role="button"]:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px;
}

.bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 42% at 100% 0%, var(--glow-mint), transparent 70%),
    radial-gradient(80% 46% at 0% 100%, var(--glow-blue), transparent 70%),
    linear-gradient(165deg, var(--bg), var(--bg-2));
}

.wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 4px 16px calc(var(--tab-h) + var(--cta-h) + var(--safe-b) + 36px);
}

/* ---------- Yuqori panel ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  padding-top: var(--safe-t);
  transition: background .25s, box-shadow .25s;
}
.topbar.scrolled {
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: 0 1px 0 var(--line);
}
.topbar-in {
  max-width: 520px; margin: 0 auto; height: 56px;
  padding: 0 16px; display: flex; align-items: center; justify-content: space-between;
}
.logo { font-size: 13px; font-weight: 600; letter-spacing: .22em; color: var(--ink); }
.logo span { color: var(--blue); }
.lang {
  display: flex; padding: 3px; gap: 2px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.lang button {
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  padding: 5px 11px; border-radius: 999px; color: var(--muted);
  transition: background .2s, color .2s, box-shadow .2s;
}
.lang button[aria-pressed="true"] { background: var(--surface); color: var(--blue); box-shadow: 0 2px 8px -2px rgba(12, 31, 63, .18); }

/* ---------- Ekranlar va animatsiya ---------- */
.screen[hidden] { display: none; }
.screen.enter .reveal { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card + .card, .card + .price-card, .price-card + .card { margin-top: 14px; }

.sec-title {
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin: 28px 4px 12px;
}
.page-head { padding: 8px 2px 18px; }
.page-head h1 { font-size: 28px; line-height: 1.12; font-weight: 500; letter-spacing: -.02em; }
.page-head p { color: var(--muted); font-size: 15px; margin-top: 8px; }

/* ---------- Tugmalar ---------- */
.btn {
  height: 50px; border-radius: 16px; padding: 0 14px;
  font-weight: 600; font-size: 15px; letter-spacing: -.005em;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .15s, filter .15s, box-shadow .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-light { background: #FFFFFF; color: #0C1F3F; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .35); }
.btn-mint { background: var(--mint-btn); color: #0C1F3F; }
.btn-blue { background: #1A5FC4; color: #FFFFFF; box-shadow: 0 10px 22px -10px rgba(26, 95, 196, .7); }

/* =========================================================
   ASOSIY
   ========================================================= */
.hello { display: flex; align-items: center; gap: 12px; padding: 6px 2px 18px; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none; object-fit: cover;
  display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 17px;
  background: linear-gradient(140deg, #3A97EC, #1A5FC4 55%, #14A08E);
  box-shadow: 0 6px 16px -6px rgba(26, 95, 196, .6);
}
.hello b { display: block; font-size: 16px; font-weight: 600; }
.hello small { display: block; font-size: 13px; color: var(--muted); }

.hero-title {
  font-size: clamp(31px, 9.4vw, 41px); line-height: 1.12; font-weight: 500;
  letter-spacing: -.025em; text-align: center; text-wrap: balance;
}
.hero-title > span { display: block; }
.hero-title em {
  font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.14em;
  letter-spacing: -.01em; line-height: 1; padding: 0 .06em .02em;
  background: var(--grad-text); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  animation: sheen 7s ease-in-out infinite alternate;
}
@keyframes sheen { from { background-position: 0% 0; } to { background-position: 100% 0; } }

/* Muallif videosi */
.video-card { margin: 24px 0 0; }
.video-frame {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: var(--ratio, 16 / 9); margin: 0 auto;
  /* vertikal video ekran balandligining 72% idan oshmasin */
  width: min(100%, calc(72vh * var(--ratio, 16 / 9)));
  border-radius: 24px; background: #0B2350; box-shadow: var(--shadow-lg);
}
.video-frame video, .video-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
  object-fit: cover; background: #000;
}
.video-ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; gap: clamp(8px, 3.5cqw, 14px);
  padding-top: 30px; /* "Video tez orada" belgisi bilan ustma-ust tushmasin */
  container-type: inline-size; color: #fff; text-align: center;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(122, 224, 208, .38), transparent 55%),
    radial-gradient(90% 90% at 0% 100%, rgba(58, 151, 236, .6), transparent 62%),
    linear-gradient(135deg, #0B2350 0%, #123C86 48%, #1A5FC4 100%);
}
.video-ph::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(118deg, rgba(255, 255, 255, .045) 0 1.5px, transparent 1.5px 11px);
  -webkit-mask-image: linear-gradient(to top, #000, transparent 75%); mask-image: linear-gradient(to top, #000, transparent 75%);
}
.vp-chip {
  position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 6px 11px 6px 9px; border-radius: 999px;
  background: rgba(3, 10, 22, .4); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.vp-chip svg.i { width: 16px; height: 16px; }
.vp-play {
  width: 58px; height: 58px; width: clamp(46px, 16cqw, 66px); height: clamp(46px, 16cqw, 66px);
  border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: #1A5FC4; animation: vp-pulse 2.4s ease-out infinite;
}
.vp-play svg.i { width: 40%; height: 40%; fill: currentColor; stroke-width: 1.4; margin-left: 7%; }
@keyframes vp-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .35), 0 14px 30px -10px rgba(0, 0, 0, .5); }
  100% { box-shadow: 0 0 0 18px rgba(255, 255, 255, 0), 0 14px 30px -10px rgba(0, 0, 0, .5); }
}
.vp-text { font-size: 14px; font-weight: 600; letter-spacing: -.005em; }

/* Narx kartasi */
.price-card {
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: 14px; padding: 22px 18px 18px; border-radius: 26px; color: #fff;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(122, 224, 208, .38), transparent 55%),
    radial-gradient(90% 90% at 0% 100%, rgba(58, 151, 236, .6), transparent 62%),
    linear-gradient(135deg, #0B2350 0%, #123C86 48%, #1A5FC4 100%);
  box-shadow: var(--shadow-lg);
}
.price-card::after {
  content: ""; position: absolute; inset: -40% auto -40% -60%; width: 45%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .16), transparent);
  transform: skewX(-18deg); animation: shine 6s ease-in-out infinite;
}
@keyframes shine { 0%, 62% { left: -60%; } 100% { left: 130%; } }
.price-title { font-size: 20px; font-weight: 500; letter-spacing: -.01em; text-align: center; margin-bottom: 6px; }
.price { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.price b { font-size: clamp(40px, 12vw, 50px); font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.price span { font-size: 18px; font-weight: 500; color: var(--mint); }
.price-meta { text-align: center; font-size: 13px; color: rgba(255, 255, 255, .72); margin-top: 2px; }
.price-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 18px; }
.price-actions .btn, .webcta .btn { white-space: normal; text-align: center; line-height: 1.2; padding: 0 10px; }

/* Kurs kartalari (Start / Baza) */
.courses { display: grid; gap: 12px; }
.course {
  padding: 18px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.course-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.step { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); }
.course.base .step { background: rgba(60, 200, 180, .16); color: var(--teal); }
.course-meta { font-size: 13px; color: var(--muted); }
.course h3 { font-size: 21px; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; margin-top: 12px; }
.mini-list { list-style: none; display: grid; gap: 8px; margin-top: 12px; }
.mini-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.mini-list li b { font-weight: 600; color: var(--ink); }
.mini-list svg.i { width: 18px; height: 18px; color: var(--teal); stroke-width: 2.2; margin-top: 1px; }
.course-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
}
.course-price b { font-size: 24px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.course-price span { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 5px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: 14px; font-weight: 600; color: var(--blue);
  padding: 9px 13px; border-radius: 12px; background: var(--blue-soft); transition: transform .15s;
}
.link-btn:active { transform: scale(.96); }
.link-btn svg.i { width: 16px; height: 16px; }

/* Komplekt banneri */
.bundle { text-align: center; padding-top: 20px; }
.bundle .ribbon { display: inline-block; margin-bottom: 10px; }
.bundle-title { font-size: 21px; font-weight: 600; letter-spacing: -.015em; }
.bundle-sub { font-size: 13px; color: rgba(255, 255, 255, .75); margin: 2px 0 10px; }
.bundle-old { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 4px; }
.bundle-old s { font-size: 15px; color: rgba(255, 255, 255, .6); }
.save {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  color: var(--mint); background: rgba(122, 224, 208, .14); border: 1px solid rgba(122, 224, 208, .35);
}
.btn-wide { width: 100%; margin-top: 18px; }
.ribbon {
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
  padding: 5px 10px; border-radius: 999px; color: #0C1F3F;
  background: linear-gradient(90deg, #C4F5EC, #7AE0D0);
}

/* =========================================================
   DASTUR
   ========================================================= */
.seg {
  display: grid; gap: 4px; padding: 4px; border-radius: 18px;
  background: var(--surface-2); border: 1px solid var(--line);
}
/* Bosqich navigatori (tepada qotib turadi) */
.stage-nav {
  position: sticky; top: calc(56px + var(--safe-t)); z-index: 15;
  display: flex; align-items: center; gap: 4px; padding: 5px;
  border-radius: 20px; background: var(--surface-2); border: 1px solid var(--line);
  transition: box-shadow .25s, background .25s;
}
.stage-nav.stuck {
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: 0 12px 26px -14px rgba(12, 31, 63, .35);
}
.sn-btn {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 15px; text-align: left; color: var(--muted);
  transition: background .25s, color .25s, box-shadow .25s;
}
.sn-btn.on { background: var(--surface); color: var(--ink); box-shadow: 0 4px 14px -6px rgba(12, 31, 63, .25); }
.stage-nav.stuck .sn-btn.on { background: var(--surface-2); box-shadow: none; }
.sn-n {
  width: 28px; height: 28px; border-radius: 9px; flex: none; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #fff; background: var(--line-2); transition: background .25s;
}
.sn-btn.start.on .sn-n { background: linear-gradient(150deg, #5EA0F0, #1A5FC4); }
.sn-btn.base.on .sn-n { background: linear-gradient(150deg, #8BE6D6, #1A9E8C); }
.sn-txt { min-width: 0; }
.sn-txt b { display: block; font-size: 14px; font-weight: 600; line-height: 1.2; }
.sn-txt small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; }
.sn-arrow { flex: none; display: grid; place-items: center; color: var(--muted); }
.sn-arrow svg.i { width: 16px; height: 16px; }

/* Bosqichlar va modul muqovalari */
.journey { margin-top: 22px; }
.j-sec + .j-sec { margin-top: 30px; }
.j-stage { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; }
.s-node {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center; color: #fff; font-size: 19px; font-weight: 700;
  background: linear-gradient(150deg, #5EA0F0, #1A5FC4);
  box-shadow: 0 10px 20px -8px rgba(26, 95, 196, .8);
}
.j-sec.base .s-node { background: linear-gradient(150deg, #8BE6D6, #1A9E8C); box-shadow: 0 10px 20px -8px rgba(20, 160, 142, .8); }
/* Modul va darslar soni — kurs nomi tepasida */
.s-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px;
  font-size: 15px; font-weight: 600; line-height: 1.2; color: var(--blue);
}
.j-sec.base .s-meta { color: var(--teal); }
.s-meta span { display: inline-flex; align-items: center; gap: 6px; }
.s-meta svg.i { width: 17px; height: 17px; stroke-width: 2; }
.s-body h2 { font-size: 22px; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; margin-top: 4px; }

.covers { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.cover {
  position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 1;
  container-type: inline-size; border-radius: 20px; padding: 12px; color: #fff;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background:
    radial-gradient(110% 80% at 100% 0%, rgba(122, 224, 208, .42), transparent 55%),
    radial-gradient(90% 90% at 0% 100%, rgba(58, 151, 236, .6), transparent 62%),
    linear-gradient(150deg, #154697, #0B2350);
  box-shadow: 0 16px 30px -18px rgba(18, 60, 134, .75), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.cover.base {
  background:
    radial-gradient(110% 80% at 100% 0%, rgba(168, 239, 227, .5), transparent 55%),
    radial-gradient(90% 90% at 0% 100%, rgba(60, 200, 180, .5), transparent 62%),
    linear-gradient(150deg, #0F6467, #07323C);
  box-shadow: 0 16px 30px -18px rgba(8, 70, 70, .75), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
/* yengil chiziqli fakturasi */
.cover::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(118deg, rgba(255, 255, 255, .045) 0 1.5px, transparent 1.5px 11px);
  -webkit-mask-image: linear-gradient(to top, #000, transparent 70%); mask-image: linear-gradient(to top, #000, transparent 70%);
}
.cv-lessons {
  position: absolute; top: 9px; right: 9px; font-size: 11px; font-weight: 600; line-height: 1;
  padding: 5px 8px; border-radius: 999px; color: #fff; background: rgba(3, 10, 22, .42);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.cv-num { position: absolute; left: 11px; bottom: 10px; font-size: 12px; font-weight: 700; letter-spacing: .01em; }
.cv-title {
  display: flex; flex-direction: column; align-items: center; gap: .28em; margin-top: -6px;
  font-size: 15px; font-size: calc(var(--fs) * 1cqw);
  font-weight: 700; line-height: 1.02; letter-spacing: -.01em; text-transform: uppercase;
}
.cv-main { display: block; }
.cv-hl {
  display: inline-block; white-space: nowrap; padding: .14em .34em .1em; border-radius: .14em;
  background: #A8EFE3; color: #0C1F3F;
}
.cover.base .cv-hl { background: #FFFFFF; color: #0E6B66; }
.cv-brand {
  font-size: 7px; font-size: max(6px, 4cqw); font-weight: 600; letter-spacing: .24em;
  opacity: .55; margin-top: .55em;
}

.j-buy { margin-top: 12px; }
.buy-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 12px 12px 16px; border-radius: 16px; text-align: left;
  background: var(--blue-soft); border: 1.5px solid rgba(26, 95, 196, .22); transition: transform .15s;
}
.buy-row:active { transform: scale(.98); }
.buy-row small { display: block; font-size: 12px; color: var(--muted); }
.buy-row b { display: block; font-size: 18px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.buy-go {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 12px;
  font-size: 14px; font-weight: 600; color: #fff; background: #1A5FC4;
}
.buy-go svg.i { width: 16px; height: 16px; }
.j-sec.base .buy-row { background: rgba(60, 200, 180, .12); border-color: rgba(20, 160, 142, .28); }
.j-sec.base .buy-go { background: #1A9E8C; }
.journey > .bundle-hint { margin-top: 22px; }

.bundle-hint {
  width: 100%; margin-top: 12px; padding: 11px 12px; border-radius: 14px;
  display: flex; align-items: center; gap: 10px; text-align: left;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  background: linear-gradient(135deg, rgba(122, 224, 208, .22), rgba(58, 151, 236, .12));
}
.bundle-hint span { flex: 1; }
.bundle-hint svg.i { width: 18px; height: 18px; color: var(--teal); }
.bundle-hint svg.i:last-child { color: var(--muted); width: 16px; height: 16px; }

.row-card {
  width: 100%; margin-top: 18px; display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 16px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .15s;
}
.row-card:active { transform: scale(.98); }
.row-card > span:nth-child(2) { flex: 1; min-width: 0; }
.row-card b { display: block; font-size: 15px; font-weight: 600; }
.row-card small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.row-card > .i:last-child { color: var(--muted); width: 18px; height: 18px; }
.row-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.row-ic.mint { background: var(--mint-btn); color: #0C1F3F; }
.row-ic.blue { background: var(--blue-soft); color: var(--blue); }
.row-card-tight { margin-top: 10px; }
.row-card.tinted {
  background:
    linear-gradient(135deg, rgba(122, 224, 208, .22), rgba(58, 151, 236, .14)),
    var(--surface);
}

/* =========================================================
   KURS: muqovalar, modul darslari, pleyer
   ========================================================= */
.cover { cursor: pointer; transition: transform .15s; }
.cover:active { transform: scale(.97); }
/* Bepul modul — keng muqova, ikki bosqich ranglari aralashmasi */
.cover.free {
  grid-column: 1 / -1; aspect-ratio: 2 / 1;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(168, 239, 227, .45), transparent 55%),
    linear-gradient(115deg, #123C86 0%, #1A5FC4 40%, #1A9E8C 100%);
}
.cover.free .cv-brand { font-size: max(6px, 2cqw); }
.covers + .j-sec, .j-sec + .covers { margin-top: 30px; }
.cv-lock {
  position: absolute; top: 9px; left: 9px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: rgba(3, 10, 22, .42);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.cv-lock svg.i { width: 14px; height: 14px; stroke-width: 2.2; }

.eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }
.back-btn { margin: 2px 0 10px; }
.back-btn svg.i { transform: scaleX(-1); }

.lessons { list-style: none; display: grid; gap: 8px; }
.lesson {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 12px 12px 12px 14px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .15s;
}
.lesson:active { transform: scale(.98); }
.ls-n {
  width: 30px; height: 30px; border-radius: 10px; flex: none; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: var(--blue); background: var(--blue-soft);
}
.ls-txt { flex: 1; min-width: 0; }
.ls-txt b { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.ls-txt small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.ls-ic { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--mint-btn); color: #0C1F3F; }
.ls-ic svg.i { width: 16px; height: 16px; fill: currentColor; stroke-width: 1.4; margin-left: 2px; }
.lesson.locked .ls-txt b { color: var(--ink-2); }
.lesson.locked .ls-n { color: var(--muted); background: var(--surface-2); }
.lesson.locked .ls-ic { background: var(--surface-2); color: var(--muted); }
.lesson.locked .ls-ic svg.i { fill: none; stroke-width: 2; margin-left: 0; }

.player { margin-top: 4px; }
.video-ph .btn { height: 42px; }
.lesson-head { padding-top: 18px; }
.lesson-head h1 { font-size: 23px; }

/* Bosh sahifadagi "Mening kursim" kartasi */
.access { margin-top: 24px; }
.access .field-label { margin-bottom: 0; }
.btn svg.i { width: 18px; height: 18px; }

/* Ma’lumot yuklanayotganda / xatoda */
.loading { display: grid; justify-items: center; gap: 16px; padding: 30vh 16px 0; text-align: center; color: var(--muted); font-size: 15px; }
#tabbar:empty { display: none; }

/* =========================================================
   KALORIYA HISOBLAGICH
   ========================================================= */
.result { padding: 20px 18px 16px; }
.res-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.res-label { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.chip {
  font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px;
  background: var(--blue-soft); color: var(--blue); white-space: nowrap;
}
.res-kcal { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.res-kcal b { font-size: clamp(46px, 14vw, 58px); font-weight: 600; letter-spacing: -.035em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.res-kcal span { font-size: 16px; color: var(--muted); font-weight: 500; }

.mbar { display: flex; gap: 2px; height: 14px; margin-top: 16px; }
.mbar i { display: block; height: 100%; flex: 1 1 0; border-radius: 4px; min-width: 6px; transition: flex-grow .6s cubic-bezier(.2, .7, .2, 1); }
.mbar .s-p { background: var(--m-p); }
.mbar .s-f { background: var(--m-f); }
.mbar .s-c { background: var(--m-c); }

.legend { list-style: none; margin-top: 14px; display: grid; gap: 2px; }
.legend li { display: grid; grid-template-columns: 12px 1fr auto 44px; align-items: center; gap: 10px; padding: 7px 0; font-size: 15px; }
.legend li + li { border-top: 1px solid var(--line); }
.dot { width: 10px; height: 10px; border-radius: 3px; }
.legend .nm { color: var(--ink-2); }
.legend b { font-weight: 600; font-variant-numeric: tabular-nums; }
.legend .pc { color: var(--muted); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }

.res-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.res-mini > div {
  background: var(--surface-2); border-radius: 14px; padding: 10px 11px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 4px;
}
.res-mini small { display: block; font-size: 12px; color: var(--muted); line-height: 1.25; }
.res-mini b { display: block; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }
.res-mini b span:not(.v) { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }

.field-label { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .02em; margin-bottom: 10px; }
.seg3 { grid-template-columns: repeat(3, 1fr); }
.seg2 { grid-template-columns: repeat(2, 1fr); }
.opt {
  height: 42px; border-radius: 14px; font-size: 14px; font-weight: 600; color: var(--muted);
  transition: background .25s, color .25s, box-shadow .25s;
}
.opt.on { background: #1A5FC4; color: #fff; box-shadow: 0 8px 18px -10px rgba(26, 95, 196, .9); }
.hint { font-size: 13px; color: var(--muted); margin-top: 10px; min-height: 1.45em; }

.steppers { margin-top: 8px; }
.st-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.st-row + .st-row { border-top: 1px solid var(--line); }
.st-row label { font-size: 15px; font-weight: 500; }
.st-ctl { display: flex; align-items: center; gap: 6px; }
.st-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--blue); border: 1px solid var(--line);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
  transition: transform .12s, background .2s;
}
.st-btn:active { transform: scale(.9); background: var(--blue-soft); }
.st-btn svg.i { width: 18px; height: 18px; stroke-width: 2.2; }
.st-val { display: flex; align-items: baseline; justify-content: center; gap: 3px; width: 92px; }
.st-val input {
  width: 58px; border: 0; background: transparent; color: var(--ink); text-align: right;
  font: 600 21px/1.2 var(--sans); font-variant-numeric: tabular-nums; padding: 2px 0; border-radius: 6px;
}
.st-val input:focus { outline: none; background: var(--blue-soft); }
.st-val input.invalid { color: var(--danger); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.st-val span { font-size: 13px; color: var(--muted); min-width: 26px; }

.acts { display: grid; gap: 8px; }
.act {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px;
  border-radius: 16px; border: 1.5px solid var(--line); transition: border-color .2s, background .2s;
}
.radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center; transition: border-color .2s; }
.radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); transform: scale(0); transition: transform .2s cubic-bezier(.3, .7, .2, 1.4); }
.on > .radio { border-color: var(--blue); }
.on > .radio::after { transform: scale(1); }
.act b { display: block; font-size: 15px; font-weight: 600; }
.act small { display: block; font-size: 13px; color: var(--muted); }
.act.on { border-color: var(--blue); background: var(--blue-soft); }

.note { font-size: 13px; color: var(--muted); margin: 16px 4px 0; }

/* =========================================================
   TARIFLAR
   ========================================================= */
.tariffs { display: grid; gap: 14px; }
.tariff {
  --tc: #1A5FC4;                          /* tarif rangi */
  --tc-soft: rgba(26, 95, 196, .18);
  position: relative; cursor: pointer; overflow: hidden;
  border-radius: var(--radius); background: var(--surface);
  border: 1.5px solid var(--line); box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .25s, transform .15s;
  -webkit-user-select: none; user-select: none;
}
.tariff.base { --tc: #1A9E8C; --tc-soft: rgba(26, 158, 140, .2); }
.tariff:active { transform: scale(.99); }
.tariff.on { border-color: var(--tc); box-shadow: 0 0 0 3px var(--tc-soft), var(--shadow); }

/* Rangli sarlavha: Start — ko‘k, Baza — yashil, Start + Baza — ikkalasining aralashmasi */
.tf-head {
  position: relative; isolation: isolate; color: #fff;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 14px;
  padding: 16px 18px 15px;
  background:
    radial-gradient(110% 90% at 100% 0%, rgba(122, 224, 208, .38), transparent 55%),
    linear-gradient(150deg, #2C86D9, #1A5FC4 55%, #123C86);
}
.tariff.base .tf-head {
  background:
    radial-gradient(110% 90% at 100% 0%, rgba(196, 245, 236, .45), transparent 55%),
    linear-gradient(150deg, #2BB3A0, #1A9E8C 55%, #0F6467);
}
.tariff.full .tf-head {
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(168, 239, 227, .4), transparent 55%),
    linear-gradient(115deg, #123C86 0%, #1A5FC4 35%, #1A9E8C 100%);
}
.tf-head::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(118deg, rgba(255, 255, 255, .05) 0 1.5px, transparent 1.5px 11px);
  -webkit-mask-image: linear-gradient(to left, #000, transparent 75%); mask-image: linear-gradient(to left, #000, transparent 75%);
}
.tf-head .ribbon { grid-column: 1 / -1; justify-self: start; }
.tf-name { min-width: 0; }
.tf-name b {
  display: block; font-size: 27px; font-weight: 700; line-height: 1.05;
  letter-spacing: .01em; text-transform: uppercase;
}
.tf-name b i { font-style: normal; font-weight: 500; color: #C4F5EC; padding: 0 .04em; }
.tf-name small { display: block; font-size: 13px; color: rgba(255, 255, 255, .8); margin-top: 5px; }
.tf-head .radio { width: 24px; height: 24px; border-color: rgba(255, 255, 255, .55); }
.tf-head .radio::after { width: 12px; height: 12px; background: #fff; }
.tariff.on .tf-head .radio { border-color: #fff; }
.tariff.on .tf-head .radio::after { transform: scale(1); }

.tf-body { padding: 14px 18px 16px; }
.tf-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.tf-price b { font-size: 32px; font-weight: 600; letter-spacing: -.025em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tf-price span { font-size: 15px; font-weight: 500; color: var(--muted); }
.tf-price s { font-size: 15px; color: var(--muted); margin-left: 4px; }
.save-chip {
  display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; background: rgba(60, 200, 180, .16); color: var(--teal);
}
.tariff .mini-list { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.tariff.start .mini-list svg.i { color: var(--blue); }
.h2 { font-size: 22px; font-weight: 500; letter-spacing: -.015em; line-height: 1.2; margin: 30px 2px 14px; }
.foot { text-align: center; font-size: 12px; color: var(--muted); margin-top: 26px; }

/* =========================================================
   PASTKI MENYU
   ========================================================= */
/* Menyu ortidagi matn ko‘rinmasligi uchun yumshoq parda */
body::after {
  content: ""; position: fixed; z-index: 29; left: 0; right: 0; pointer-events: none;
  bottom: calc(var(--cta-h) + var(--safe-b));
  height: calc(var(--tab-h) + 30px);
  background: linear-gradient(to bottom, transparent, var(--bg) 55%);
}
.tabbar {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--cta-h) + var(--safe-b) + 10px);
  width: min(calc(100% - 24px), 496px); height: var(--tab-h);
  display: grid; grid-template-columns: repeat(var(--tabs, 4), 1fr); padding: 6px;
  border-radius: 24px; background: var(--tab-bg); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: 0 16px 36px -16px rgba(12, 31, 63, .35);
}
.tab-ind {
  position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / var(--tabs, 4));
  border-radius: 18px; background: var(--blue-soft);
  transform: translateX(calc(var(--ti, 0) * 100%));
  transition: transform .4s cubic-bezier(.3, .8, .25, 1.15);
}
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); border-radius: 18px; transition: color .25s;
}
.tab span { font-size: 11px; font-weight: 600; letter-spacing: .01em; }
.tab svg.i { transition: transform .3s cubic-bezier(.3, .8, .25, 1.3); }
.tab.on { color: var(--blue); }
.tab.on svg.i { transform: translateY(-1px) scale(1.06); }

/* Telegramdan tashqarida (brauzerda) pastki tugmalar */
.webcta { display: none; }
body.web .webcta {
  display: block; position: fixed; z-index: 31; left: 0; right: 0; bottom: 0;
  padding: 10px 12px calc(10px + var(--safe-b));
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.webcta-in { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.webcta-in.single { grid-template-columns: 1fr; }
.webcta .btn { height: 54px; border-radius: 14px; }

@media (max-width: 350px) {
  .buy-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .buy-go { justify-content: center; padding: 10px 14px; }
  .tf-price b { font-size: 28px; }
}

/* =========================================================
   ADMIN
   ========================================================= */
.ad-seg { grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; }
.ad-seg .opt { height: 38px; font-size: 13px; padding: 0 2px; }
.ad-card { margin-top: 14px; }
.ad-h { font-size: 17px; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.ad-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ad-tile { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.ad-tile b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.ad-tile small { font-size: 12px; color: var(--muted); }
.ad-list { list-style: none; display: grid; }
.ad-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 0; font-size: 14px; }
.ad-row + .ad-row { border-top: 1px solid var(--line); }
.ad-main { flex: 1 1 140px; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.ad-sub { font-size: 12px; color: var(--muted); }
.ad-end { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.ad-off .ad-main { opacity: .55; }
.ad-click { cursor: pointer; }
.ad-flag { font-size: 12px; color: var(--danger); font-style: normal; font-weight: 600; }
.ad-btn {
  min-height: 36px; padding: 0 12px; border-radius: 12px; font-size: 13px; font-weight: 600;
  background: var(--blue-soft); color: var(--blue);
}
.ad-btn:disabled { opacity: .35; cursor: default; }
.ad-btn.primary { background: #1A5FC4; color: #fff; }
.ad-btn.danger { color: var(--danger); background: rgba(209, 67, 67, .1); }
.ad-btn.ghost { margin-bottom: 4px; }
.ad-btn.wide { width: 100%; min-height: 46px; margin-top: 14px; }
.ad-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ad-mh { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ad-mh > span { display: inline-flex; gap: 6px; flex-shrink: 0; }
.ad-search { display: flex; gap: 8px; margin-bottom: 14px; }
.ad-in {
  width: 100%; min-width: 0; height: 44px; padding: 0 12px; border-radius: 12px; font: inherit; font-size: 15px;
  color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-2);
}
.ad-in:focus { outline: none; border-color: var(--blue); }
.ad-field { display: block; margin-top: 12px; }
.ad-field .field-label { margin-bottom: 6px; }
.ad-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ad-checks { display: grid; gap: 6px; margin-bottom: 10px; }
.ad-check { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 4px 0; }
.ad-check input { width: 18px; height: 18px; accent-color: var(--blue); flex-shrink: 0; }
.ad-msg { margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; font-size: 14px; color: var(--danger); background: rgba(209, 67, 67, .1); overflow-wrap: anywhere; }
.ad-msg.ok { color: var(--teal); background: rgba(20, 160, 142, .12); }

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