/* =====================================================================
   BilimWay — "Spatial Glass" dizayn tizimi
   Yorug' mavzu "Pearl": marvarid fon + iliq aurora yorug'ligi
   Qorong'i mavzu "Ember": qahrabo yorug'lik, shisha panellar
   Fon yorug'liklari o'zi xira chizilgan — kartalar blur'siz ham shisha bo'lib ko'rinadi (telefon uchun tez)
   ===================================================================== */
:root {
  color-scheme: light;
  --bg: #eceef4;
  --bg-2: #e4e6ee;
  --glass: rgba(255, 255, 255, .58);
  --glass-strong: rgba(255, 255, 255, .78);
  --glass-line: rgba(255, 255, 255, .75);
  --surface: rgba(255, 255, 255, .62);
  --surface-2: rgba(255, 255, 255, .42);
  --solid: #ffffff;
  --border: rgba(24, 28, 45, .08);
  --text: #171a26;
  --text-2: #4a4f63;
  --muted: #868a9c;
  --primary: #171a26;
  --primary-2: #2a2e40;
  --primary-soft: rgba(255, 255, 255, .7);
  --on-primary: #ffffff;
  --accent: #f07b3f;
  --accent-2: #e2632a;
  --accent-soft: rgba(255, 168, 112, .2);
  --grad: linear-gradient(135deg, #ffb46b 0%, #ff8a5c 45%, #b08cff 100%);
  --grad-warm: linear-gradient(135deg, #ffc58a 0%, #ff8f5e 100%);
  --gold: #e07a36;
  --gold-2: #ffb46b;
  --gold-soft: rgba(255, 180, 107, .18);
  --link: #d4602a;
  --series: #f08a4b;
  --good: #1f9d6b;
  --good-soft: rgba(52, 199, 140, .14);
  --warn: #c27a12;
  --warn-soft: rgba(255, 190, 80, .18);
  --bad: #e0464a;
  --bad-soft: rgba(255, 99, 99, .13);
  --a1: #ffb27a; --a2: #ffcfb8; --a3: #c7c3ff; --a4: #b9dcff; --a-base: #eef0f6;
  --radius: 26px;
  --radius-sm: 16px;
  --shadow: 0 1px 1px rgba(20, 24, 40, .03), 0 12px 32px -12px rgba(30, 34, 60, .16);
  --shadow-lg: 0 30px 60px -24px rgba(30, 34, 60, .28);
  --inner: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 1px rgba(255, 255, 255, .45);
  --nav-h: 74px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Arial, sans-serif;
  --serif: var(--font);
  --display: var(--font);
  --italic: "Cormorant Garamond", ui-serif, Georgia, serif;
  --mono: var(--font);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #120e0c; --bg-2: #18120f;
  --glass: rgba(255, 240, 225, .07); --glass-strong: rgba(255, 240, 225, .12); --glass-line: rgba(255, 230, 210, .14);
  --surface: rgba(255, 240, 225, .07); --surface-2: rgba(255, 240, 225, .05); --solid: #1d1714;
  --border: rgba(255, 230, 210, .1);
  --text: #f7eee6; --text-2: #cdbfb3; --muted: #9a8c80;
  --primary: #f7eee6; --primary-2: #ffffff; --primary-soft: rgba(255, 240, 225, .1); --on-primary: #17110e;
  --accent: #ff9d5c; --accent-2: #ffb27a; --accent-soft: rgba(255, 157, 92, .16);
  --gold: #ffad6e; --gold-2: #ffcf9e; --gold-soft: rgba(255, 173, 110, .14);
  --link: #ffb27a; --series: #ff9d5c;
  --good: #5fd6a1; --good-soft: rgba(95, 214, 161, .14); --warn: #ffc56b; --warn-soft: rgba(255, 197, 107, .14); --bad: #ff7d7d; --bad-soft: rgba(255, 125, 125, .14);
  --a1: #8a3f17; --a2: #c2662b; --a3: #3a2e4f; --a4: #1f2b3d; --a-base: #120e0c;
  --shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, .7);
  --inner: inset 0 1px 0 rgba(255, 235, 215, .12), inset 0 0 0 1px rgba(255, 235, 215, .06);
}
/* Kombinatsiya: yorug' shisha yuzalar + to'q (binafsha-grafit) boshqaruv qismlari, shafaq aurorasi */
:root[data-theme="combo"] {
  color-scheme: light;
  --bg: #e8e3ee; --bg-2: #e1dbe9;
  --glass: rgba(255, 255, 255, .6); --glass-strong: rgba(255, 255, 255, .8); --glass-line: rgba(255, 255, 255, .78);
  --surface: rgba(255, 255, 255, .64); --surface-2: rgba(255, 255, 255, .44); --solid: #ffffff;
  --border: rgba(40, 24, 60, .09);
  --text: #1d1726; --text-2: #4d4560; --muted: #8a8299;
  --primary: #231a30; --primary-2: #33264a; --primary-soft: rgba(255, 255, 255, .72); --on-primary: #ffffff;
  --accent: #ee6f45; --accent-2: #d9572d; --accent-soft: rgba(255, 140, 110, .2);
  --grad: linear-gradient(135deg, #ffb46b 0%, #ff7f8f 50%, #8f7cf0 100%);
  --grad-warm: linear-gradient(135deg, #ffbe7a 0%, #ff7f6a 100%);
  --gold: #e0703a; --gold-2: #ffb27a; --gold-soft: rgba(255, 178, 122, .18);
  --link: #c9542a; --series: #ef7a52;
  --a1: #ffb27a; --a2: #ff9fb4; --a3: #a48cf5; --a4: #8fd0d6; --a-base: #ebe6f0;
  --chrome: rgba(30, 22, 42, .86); --chrome-line: rgba(255, 255, 255, .09); --chrome-text: #f4eefa; --chrome-muted: rgba(244, 238, 250, .55);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
a { color: var(--link); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-family: var(--serif); font-size: 34px; font-weight: 600; letter-spacing: -.01em; line-height: 1.1; }
h2 { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -.005em; line-height: 1.15; }
h1 em, h2 em { font-style: italic; }
.eyebrow { font-family: var(--font); font-size: 10.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
h3 { font-size: 16px; font-weight: 650; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100dvh; }
.sidebar { display: none; }
.main { flex: 1; min-width: 0; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px); }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
}
.topbar .title { flex: 1; font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page { padding: 4px 16px 24px; max-width: 1100px; margin: 0 auto; }
.page.narrow { max-width: 720px; }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-top: 1px solid var(--border);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: 11px; font-weight: 600; position: relative;
}
.bottom-nav a svg { width: 24px; height: 24px; }
.bottom-nav a.active { color: var(--accent-2); }
.bottom-nav a .dot { position: absolute; top: 8px; left: calc(50% + 8px); }

@media (min-width: 900px) {
  .sidebar {
    display: flex; flex-direction: column; gap: 4px;
    width: 248px; flex-shrink: 0; padding: 20px 14px;
    position: sticky; top: 0; height: 100dvh;
    background: var(--surface); border-right: 1px solid var(--border);
  }
  .sidebar .brand { padding: 4px 10px 20px; }
  .sidebar a {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600;
  }
  .sidebar a svg { width: 20px; height: 20px; }
  .sidebar a:hover { background: var(--surface-2); }
  .sidebar a.active { background: var(--primary-soft); color: var(--primary); }
  .sidebar .spacer { flex: 1; }
  .bottom-nav { display: none; }
  .main { padding-bottom: 32px; }
  .topbar { padding: 18px 28px; }
  .page { padding: 4px 28px 32px; }
  .hide-desktop { display: none !important; }
}
@media (max-width: 899px) { .hide-mobile { display: none !important; } }

.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; font-size: 26px; letter-spacing: .01em; color: var(--text); }
.brand .logo {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(150deg, #2c3a5c, #1a2338); color: #e5c88f; font-size: 22px; font-family: var(--serif); font-style: italic; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(229, 200, 143, .45);
}

/* ---------- Components ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.card + .card, .stack > * + * { margin-top: 12px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.card.flat { box-shadow: none; }
.card.hero {
  background: radial-gradient(130% 150% at 0% 0%, #34446a 0%, #1f2a44 50%, #141b2e 100%); color: #fdfaf2; border: 0; position: relative; overflow: hidden;
  box-shadow: 0 18px 40px -22px rgba(20, 27, 46, .7), inset 0 0 0 1px rgba(201, 165, 106, .35);
}
.card.hero .muted { color: rgba(255, 255, 255, .8); }
.section { margin-top: 22px; }
.section > .section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }

.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .grid.tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.tile .label { color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.tile .value { font-family: var(--serif); font-size: 38px; font-weight: 600; letter-spacing: -.01em; margin-top: 2px; line-height: 1.05; }
.tile .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.bold { font-weight: 700; }
.center { text-align: center; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt { margin-top: 12px; } .mt-s { margin-top: 6px; } .mt-l { margin-top: 20px; }
.mb { margin-bottom: 12px; }
.gap-s { gap: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  background: var(--primary); color: var(--on-primary); font-weight: 650; cursor: pointer;
  transition: transform .08s, background .15s, opacity .15s; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.btn.block { width: 100%; }
.btn.lg { min-height: 52px; font-size: 16px; border-radius: 14px; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.secondary { background: var(--primary-soft); color: var(--primary); }
.btn.ghost { background: transparent; color: var(--text-2); border-color: var(--border); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.good { background: var(--good); color: #fff; }
.btn.white { background: #fff; color: var(--primary); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); cursor: pointer; position: relative;
}
.icon-btn svg { width: 20px; height: 20px; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--surface); outline: none;
  transition: border-color .15s, box-shadow .15s; font-size: 16px;
}
textarea.input { min-height: 90px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.search { position: relative; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.search .input { padding-left: 40px; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 13.5px; cursor: pointer;
}
.chip.active { background: var(--text); color: var(--surface); border-color: var(--text); }
.chip.sel { background: var(--accent-soft); color: var(--accent-2); border-color: var(--accent); }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 650; background: var(--surface-2); color: var(--text-2); white-space: nowrap;
}
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.primary { background: var(--accent-soft); color: var(--accent-2); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bad); border: 2px solid var(--surface); }
.count-dot {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
}

.list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border);
  color: inherit; cursor: pointer; transition: background .1s;
}
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--surface-2); }
.chev { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 15px;
}
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }
.icon-box { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--primary-soft); color: var(--primary); }
.icon-box svg { width: 22px; height: 22px; }
.icon-box.good { background: var(--good-soft); color: var(--good); }
.icon-box.warn { background: var(--warn-soft); color: var(--warn); }
.icon-box.bad { background: var(--bad-soft); color: var(--bad); }

.progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.progress > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .4s; }
.progress.good > i { background: var(--good); }
.progress.thin { height: 6px; }
.hero .progress { background: rgba(255, 255, 255, .25); border: 0; }
.hero .progress > i { background: #fff; }

.stage { display: inline-flex; gap: 3px; }
.stage i { width: 7px; height: 7px; border-radius: 2px; background: var(--border); }
.stage i.on { background: var(--good); }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 14px; overflow-x: auto; }
.tabs button { flex: 1; padding: 9px 12px; border: 0; background: none; border-radius: 9px; font-weight: 650; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 650; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--surface-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty svg { width: 44px; height: 44px; margin: 0 auto 10px; opacity: .6; }

/* ---------- Chart ---------- */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 18px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; position: relative; cursor: default; }
.bars .bar i { width: 100%; max-width: 34px; background: var(--series); border-radius: 4px 4px 0 0; min-height: 2px; transition: height .4s; }
.bars .bar.zero i { background: var(--border); }
.bars .bar span { font-size: 11px; color: var(--muted); }
.bars .bar .tip {
  position: absolute; bottom: calc(100% - 10px); left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--surface); font-size: 12px; padding: 4px 8px; border-radius: 6px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 2;
}
.bars .bar:hover .tip, .bars .bar:focus .tip { opacity: 1; }

.ring { position: relative; width: 76px; height: 76px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .ring-label { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 750; font-size: 16px; }

/* ---------- Modal / toast ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(10, 12, 20, .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet {
  background: var(--surface); width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto;
  border-radius: 22px 22px 0 0; padding: 20px 18px calc(20px + var(--safe-b)); animation: up .22s cubic-bezier(.2, .9, .3, 1);
}
.sheet .sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
@media (min-width: 640px) {
  .overlay { align-items: center; }
  .sheet { border-radius: 22px; }
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.toast-wrap { position: fixed; left: 0; right: 0; top: calc(12px + env(safe-area-inset-top, 0px)); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { background: var(--text); color: var(--surface); padding: 11px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); animation: up .2s; max-width: 480px; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.good { background: var(--good); color: #fff; }

.spinner { width: 22px; height: 22px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
.loading { display: grid; place-items: center; padding: 60px 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Login ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 18px; background: radial-gradient(900px 520px at 50% -10%, color-mix(in srgb, var(--gold) 20%, transparent), transparent 70%), var(--bg); }
.auth .card { width: 100%; max-width: 400px; padding: 26px 22px; }
.lang-switch { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.lang-switch button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-weight: 650; cursor: pointer; color: var(--text-2); font-size: 13px; }
.lang-switch button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- Review / spelling ---------- */
.review-card { text-align: center; padding: 28px 18px; }
.review-card .prompt { font-family: var(--serif); font-size: 42px; font-weight: 600; letter-spacing: -.02em; margin: 6px 0; word-break: break-word; }
.review-card .hint { color: var(--text-2); font-size: 14px; }
.options { display: grid; gap: 10px; margin-top: 18px; }
.option {
  padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface);
  font-weight: 650; font-size: 16px; text-align: left; cursor: pointer; transition: all .12s;
}
.option:active { transform: scale(.98); }
.option.selected { border-color: var(--accent); background: var(--accent-soft); }
.option.right { border-color: var(--good); background: var(--good-soft); color: var(--good); }
.option.wrong { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }

.spell { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 20px 0 6px; cursor: text; }
.spell .box {
  width: 38px; height: 48px; border-radius: 10px; border: 2px solid var(--border); background: var(--surface-2);
  display: grid; place-items: center; font-size: 22px; font-weight: 750; text-transform: lowercase; transition: border-color .12s, transform .12s;
}
.spell .box.filled { border-color: var(--text); background: var(--surface); }
.spell .box.cursor { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.spell .box.space { width: 14px; border: 0; background: none; }
.spell .box.fixed { border-style: dashed; color: var(--muted); }
.spell .box.right { border-color: var(--good); background: var(--good-soft); color: var(--good); }
.spell .box.wrong { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.spell input {
  position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; font-size: 16px; border: 0; caret-color: transparent;
}
@media (max-width: 380px) { .spell .box { width: 32px; height: 42px; font-size: 19px; } }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.feedback { border-radius: 14px; padding: 14px; margin-top: 16px; text-align: left; }
.feedback.right { background: var(--good-soft); }
.feedback.wrong { background: var(--bad-soft); }

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; height: calc(100dvh - 88px - var(--nav-h) - var(--safe-b)); }
@media (min-width: 900px) { .chat { height: calc(100dvh - 120px); } .sticky-submit { bottom: 12px !important; } }
.chat-log { flex: 1; overflow-y: auto; padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.5; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 6px; }
.msg.assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.msg ul, .msg ol { margin: 6px 0; padding-left: 20px; }
.msg p + p { margin-top: 6px; }
.chat-input { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-input textarea { flex: 1; min-height: 44px; max-height: 120px; resize: none; }
.suggestions { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 8px; scrollbar-width: none; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .3; } }

/* ---------- Questions ---------- */
.question { margin-bottom: 14px; }
.question .q-num { font-size: 10.5px; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: .18em; }
.question .q-prompt { font-size: 16px; font-weight: 600; margin: 4px 0 12px; white-space: pre-wrap; }
.radio {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px; margin-bottom: 8px; cursor: pointer;
}
.radio input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.result-line { padding: 10px 12px; border-radius: 10px; margin-top: 8px; font-size: 14px; }
.result-line.right { background: var(--good-soft); }
.result-line.wrong { background: var(--bad-soft); }
.result-line.partial { background: var(--warn-soft); }

.cred {
  border: 1.5px dashed var(--border); border-radius: 14px; padding: 14px; background: var(--surface-2);
}
.cred code { font-size: 16px; font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }

.banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: 14px; margin-bottom: 12px; }
.banner.primary { background: var(--accent-soft); color: var(--accent-2); }

.word-card .w { font-family: var(--serif); font-size: 32px; font-weight: 600; letter-spacing: -.01em; }
.speak { width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); cursor: pointer; flex-shrink: 0; }
.speak svg { width: 18px; height: 18px; }

@media print {
  .sidebar, .bottom-nav, .topbar, .no-print { display: none !important; }
  body { background: #fff; }
  .cred { break-inside: avoid; border-color: #999; }
}

/* =====================================================================
   SPATIAL GLASS QATLAMI
   ===================================================================== */

/* ---------- Aurora fon (fixed, faqat transform animatsiya — GPU) ---------- */
html { background: var(--a-base); }
body { background: transparent; font-feature-settings: "cv11", "ss01"; letter-spacing: -.005em; }
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--a-base); }
.aurora i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .9; will-change: transform; }
.aurora i:nth-child(1) { width: 62vmax; height: 62vmax; left: -18vmax; top: -22vmax; background: radial-gradient(circle at 40% 40%, var(--a1), transparent 68%); animation: drift1 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 56vmax; height: 56vmax; right: -20vmax; top: -10vmax; background: radial-gradient(circle at 50% 50%, var(--a3), transparent 66%); animation: drift2 30s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { width: 60vmax; height: 60vmax; left: 10vmax; bottom: -30vmax; background: radial-gradient(circle at 50% 50%, var(--a4), transparent 66%); animation: drift3 34s ease-in-out infinite alternate; }
.aurora i:nth-child(4) { width: 34vmax; height: 34vmax; right: 6vmax; bottom: 6vmax; background: radial-gradient(circle at 50% 50%, var(--a2), transparent 66%); animation: drift1 22s ease-in-out infinite alternate-reverse; }
.aurora::after { /* nozik shovqin (grain) — premium tekstura */
  content: ''; position: absolute; inset: 0; opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift1 { to { transform: translate3d(8vmax, 6vmax, 0) scale(1.08); } }
@keyframes drift2 { to { transform: translate3d(-10vmax, 8vmax, 0) scale(.92); } }
@keyframes drift3 { to { transform: translate3d(6vmax, -8vmax, 0) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .aurora i { animation: none; } }

/* ---------- Tipografiya ---------- */
h1 { font-family: var(--display); font-size: 32px; font-weight: 300; letter-spacing: -.035em; line-height: 1.08; }
h2 { font-family: var(--display); font-size: 22px; font-weight: 400; letter-spacing: -.025em; line-height: 1.2; }
h3 { font-weight: 550; letter-spacing: -.01em; }
h1 em, h2 em, .em {
  font-family: var(--italic); font-style: italic; font-weight: 600; letter-spacing: -.01em; font-size: 1.12em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em;
}
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.brand { font-family: var(--display); font-weight: 500; font-size: 21px; letter-spacing: -.03em; color: var(--text); }
.brand .logo {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 30% 25%, #fff6 0 18%, transparent 40%), var(--grad); font-family: var(--display); font-style: normal; font-weight: 400; font-size: 19px;
  box-shadow: 0 8px 20px -8px rgba(240, 123, 63, .7), inset 0 1px 0 rgba(255, 255, 255, .6);
}

/* ---------- Shisha yuzalar ---------- */
.card, .tile, .list, .table-wrap, .tabs, .read-card, .l-glass {
  background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow), var(--inner);
}
.card { border-radius: var(--radius); padding: 18px; }
.tile { border-radius: 22px; padding: 16px; }
.list { border-radius: var(--radius); }
.list-item { border-bottom-color: var(--border); }
.list-item:hover { background: var(--glass-strong); }
.table-wrap { border-radius: 22px; }
.table th { background: transparent; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.table td { border-bottom-color: var(--border); }
.tile .label { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tile .value { font-family: var(--display); font-weight: 300; font-size: 38px; letter-spacing: -.045em; line-height: 1.05; margin-top: 6px; }
.tile .sub { font-size: 12px; }

/* Blur faqat suzuvchi qatlamlarda */
.topbar { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.topbar .title { font-weight: 500; letter-spacing: -.02em; font-size: 19px; }
.icon-btn { border-radius: 50%; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow), var(--inner); color: var(--text); width: 42px; height: 42px; }
.count-dot { background: var(--accent); box-shadow: 0 0 0 3px var(--a-base); }

/* Pastki menyu — suzuvchi shisha pill */
.bottom-nav {
  left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); height: 66px; padding: 7px; border-radius: 999px; border: 1px solid var(--glass-line);
  background: color-mix(in srgb, var(--glass-strong) 85%, transparent);
  backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: 0 20px 40px -18px rgba(30, 34, 60, .45), var(--inner); gap: 4px;
}
.bottom-nav a { border-radius: 999px; font-size: 10.5px; font-weight: 550; gap: 2px; color: var(--muted); transition: background .25s, color .25s; }
.bottom-nav a svg { width: 22px; height: 22px; }
.bottom-nav a.active { color: var(--text); background: var(--solid); box-shadow: 0 6px 16px -8px rgba(30, 34, 60, .4); }
.bottom-nav a.active svg { color: var(--accent); }
.main { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 28px); }

/* Kompyuter: suzuvchi shisha yon panel */
@media (min-width: 900px) {
  .sidebar {
    position: sticky; top: 14px; height: calc(100dvh - 28px); margin: 14px 0 14px 14px; border-radius: 28px; border: 1px solid var(--glass-line);
    background: var(--glass); box-shadow: var(--shadow), var(--inner);
    backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5);
  }
  .sidebar a { border-radius: 999px; font-weight: 500; color: var(--text-2); }
  .sidebar a:hover { background: var(--glass-strong); }
  .sidebar a.active { background: var(--solid); color: var(--text); box-shadow: 0 6px 16px -8px rgba(30, 34, 60, .35); }
  .sidebar a.active svg { color: var(--accent); }
  .main { padding-bottom: 32px; }
}

/* ---------- Tugmalar: pill ---------- */
.btn { border-radius: 999px; font-weight: 550; letter-spacing: -.01em; box-shadow: 0 10px 22px -12px rgba(23, 26, 38, .55); }
.btn.lg { border-radius: 999px; min-height: 54px; }
.btn.sm { border-radius: 999px; }
.btn.secondary { background: var(--glass-strong); color: var(--text); border: 1px solid var(--glass-line); box-shadow: var(--inner); }
.btn.ghost { background: transparent; border-color: var(--border); box-shadow: none; color: var(--text-2); }
.btn.danger { box-shadow: none; }
.btn.accent, .btn.good { background: var(--grad-warm); color: #fff; box-shadow: 0 12px 26px -12px rgba(240, 123, 63, .75); }
.btn.white { background: #fff; color: #171a26; }

/* ---------- Kirish maydonlari ---------- */
.input, select.input, textarea.input { border-radius: 16px; background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: var(--inner); }
.input:focus { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 4px var(--accent-soft), var(--inner); }

/* ---------- Chip, tab — segmentli pill ---------- */
.chip { border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); font-weight: 550; box-shadow: var(--inner); }
.chip.active { background: var(--primary); color: var(--on-primary); border-color: transparent; box-shadow: 0 8px 18px -10px rgba(23, 26, 38, .6); }
.chip.sel { background: var(--accent-soft); color: var(--accent-2); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.tabs { border-radius: 999px; padding: 5px; }
.tabs button { border-radius: 999px; font-weight: 550; }
.tabs button.active { background: var(--solid); box-shadow: 0 6px 16px -8px rgba(30, 34, 60, .35); }

/* ---------- Belgilar, ikonlar ---------- */
.badge { border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--glass-line); font-weight: 600; }
.badge.good, .badge.warn, .badge.bad, .badge.primary { border-color: transparent; }
.badge.primary { background: var(--accent-soft); color: var(--accent-2); }
.icon-box { border-radius: 50%; background: var(--solid); color: var(--accent); box-shadow: 0 6px 14px -8px rgba(30, 34, 60, .35), var(--inner); }
.icon-box.good { background: var(--good-soft); color: var(--good); box-shadow: none; }
.icon-box.warn { background: var(--warn-soft); color: var(--warn); box-shadow: none; }
.icon-box.bad { background: var(--bad-soft); color: var(--bad); box-shadow: none; }
.avatar { background: var(--grad); color: #fff; font-weight: 500; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
.banner { border-radius: 18px; border: 1px solid var(--glass-line); }
.banner.primary { background: var(--accent-soft); color: var(--accent-2); }

/* ---------- 3D "loy" sharlar (orb) ---------- */
.orb {
  --c1: #ffd7a8; --c2: #ffa25f; --c3: #e8692e; --glow: rgba(240, 123, 63, .55);
  position: relative; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; color: #fff;
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .95) 0 6%, var(--c1) 20%, var(--c2) 55%, var(--c3) 100%);
  box-shadow: inset -8px -12px 20px rgba(0, 0, 0, .14), inset 6px 8px 14px rgba(255, 255, 255, .5), 0 18px 30px -12px var(--glow);
}
.orb svg { width: 24px; height: 24px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .2)); }
.orb.sm { width: 44px; height: 44px; } .orb.sm svg { width: 19px; height: 19px; }
.orb.lg { width: 84px; height: 84px; } .orb.lg svg { width: 34px; height: 34px; }
.orb.sun { --c1: #ffe1a6; --c2: #ffb35c; --c3: #f07b3f; --glow: rgba(240, 123, 63, .55); }
.orb.rose { --c1: #ffd0dc; --c2: #ff8fae; --c3: #e1557e; --glow: rgba(225, 85, 126, .45); }
.orb.violet { --c1: #e4dcff; --c2: #a68bff; --c3: #6c4be0; --glow: rgba(108, 75, 224, .45); }
.orb.sky { --c1: #d8ecff; --c2: #7fb6ff; --c3: #3f7de0; --glow: rgba(63, 125, 224, .45); }
.orb.mint { --c1: #d4f7e6; --c2: #6fd8a8; --c3: #1f9d6b; --glow: rgba(31, 157, 107, .45); }
.orb.graphite { --c1: #8d93a8; --c2: #3c4256; --c3: #171a26; --glow: rgba(23, 26, 38, .5); }

/* ---------- Bosh kartа (hero) — iliq yorug'lik ---------- */
.card.hero {
  position: relative; overflow: hidden; color: var(--text); border: 1px solid var(--glass-line);
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 180, 107, .55), transparent 55%), radial-gradient(90% 120% at 0% 100%, rgba(176, 140, 255, .35), transparent 60%), var(--glass-strong);
  box-shadow: var(--shadow-lg), var(--inner);
}
.card.hero h1 { font-weight: 300; font-size: 34px; }
.card.hero .muted { color: var(--text-2); }
.card.hero .progress { background: rgba(255, 255, 255, .5); }
.ring .ring-label { font-weight: 300; font-size: 20px; letter-spacing: -.03em; }

/* ---------- Progress va diagramma ---------- */
.progress { background: rgba(127, 130, 150, .14); border: 0; height: 8px; }
.progress > i { background: var(--grad-warm); }
.progress.good > i { background: linear-gradient(90deg, #6fd8a8, #1f9d6b); }
.bars .bar i { background: linear-gradient(180deg, #ffb46b, #f07b3f); border-radius: 10px 10px 4px 4px; }
.bars .bar.zero i { background: rgba(127, 130, 150, .2); }
.bars .bar .tip { background: var(--primary); color: var(--on-primary); border-radius: 10px; }

/* ---------- Modal / toast — kuchli shisha ---------- */
.overlay { background: rgba(20, 22, 35, .28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.sheet {
  background: color-mix(in srgb, var(--solid) 82%, transparent); border: 1px solid var(--glass-line); box-shadow: var(--shadow-lg), var(--inner);
  backdrop-filter: blur(30px) saturate(1.6); -webkit-backdrop-filter: blur(30px) saturate(1.6); border-radius: 30px 30px 0 0;
}
@media (min-width: 640px) { .sheet { border-radius: 30px; } }
.toast { border-radius: 999px; background: color-mix(in srgb, var(--primary) 92%, transparent); color: var(--on-primary); backdrop-filter: blur(12px); }

/* ---------- Kirish sahifasi ---------- */
.auth { background: transparent; }
.auth .card { background: var(--glass-strong); backdrop-filter: blur(30px) saturate(1.5); -webkit-backdrop-filter: blur(30px) saturate(1.5); border-radius: 32px; padding: 30px 24px; box-shadow: var(--shadow-lg), var(--inner); }
.lang-switch { border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); }
.lang-switch button { border-radius: 999px; }
.lang-switch button.active { background: var(--solid); }

/* ---------- Takrorlash, savollar, chat ---------- */
.review-card .prompt { font-family: var(--display); font-weight: 300; font-size: 44px; letter-spacing: -.04em; }
.option, .radio { border-radius: 18px; background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: var(--inner); }
.option.selected, .radio:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: var(--accent-soft); }
.option.right, .radio.right, .radio.right:has(input:checked) { border-color: var(--good); background: var(--good-soft); color: var(--good); }
.option.wrong, .radio.wrong, .radio.wrong:has(input:checked) { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.radio input { accent-color: var(--accent); }
.spell .box { border-radius: 14px; background: var(--glass-strong); border: 1.5px solid var(--glass-line); box-shadow: var(--inner); font-weight: 500; }
.spell .box.filled { border-color: var(--text); background: var(--solid); }
.spell .box.cursor { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.question .q-num { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); }
.word-card .w { font-family: var(--display); font-weight: 300; font-size: 34px; letter-spacing: -.035em; }
.speak { background: var(--solid); color: var(--accent); box-shadow: 0 6px 14px -8px rgba(30, 34, 60, .35); }
.feedback { border-radius: 20px; }
.chat-input { background: var(--glass-strong); border-top: 1px solid var(--glass-line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.msg { border-radius: 22px; }
.msg.assistant { background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: var(--inner); }
.msg.user { background: var(--primary); color: var(--on-primary); }
.result-line { border-radius: 14px; }
.cred { border-radius: 20px; background: var(--glass); }

/* =====================================================================
   KO'NIKMALAR: Speaking / Reading / Writing
   ===================================================================== */
.skill-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .skill-grid { grid-template-columns: repeat(3, 1fr); } }
.skill-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px; color: var(--text); overflow: hidden;
  border-radius: 30px; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow), var(--inner);
  transition: transform .3s cubic-bezier(.2, .8, .3, 1), box-shadow .3s;
}
.skill-card::after { content: ''; position: absolute; width: 220px; height: 220px; right: -70px; top: -90px; border-radius: 50%; background: radial-gradient(closest-side, var(--tone), transparent); opacity: .55; pointer-events: none; }
.skill-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg), var(--inner); }
.skill-card .orb { margin-bottom: 12px; }
.skill-card h3 { font-family: var(--display); font-size: 26px; font-weight: 400; letter-spacing: -.03em; }
.skill-card p { font-size: 14px; color: var(--text-2); line-height: 1.55; flex: 1; }
.skill-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.skill-foot .go { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); }
.skill-foot .go svg { width: 16px; height: 16px; }
.sk-speaking { --tone: #ffb46b; } .sk-reading { --tone: #7fb6ff; } .sk-writing { --tone: #b08cff; }

.arch-card { text-align: center; padding-top: 26px; }
.arch-card h2 { max-width: 520px; margin-left: auto; margin-right: auto; }
.sentence { font-family: var(--display); font-weight: 300; font-size: 30px; letter-spacing: -.035em; line-height: 1.3; margin: 14px auto 16px; max-width: 540px; }
.sentence.words span { border-bottom: 2px solid transparent; padding: 0 1px; }
.sentence.words .ok { color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.sentence.words .miss { color: var(--bad); text-decoration: underline wavy; text-underline-offset: 6px; }
.small-sentence { font-size: 22px; text-align: left; }

/* Mikrofon — 3D shar tugma */
.rec { display: grid; justify-items: center; gap: 12px; }
.rec-btn {
  position: relative; width: 92px; height: 92px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .95) 0 6%, #ffd7a8 20%, #ffa25f 55%, #e8692e 100%);
  box-shadow: inset -8px -12px 22px rgba(0, 0, 0, .16), inset 6px 8px 14px rgba(255, 255, 255, .5), 0 22px 40px -14px rgba(240, 123, 63, .7);
  transition: transform .15s;
}
.rec-btn:active { transform: scale(.94); }
.rec-btn:disabled { filter: grayscale(1); opacity: .5; }
.rec-btn svg { width: 34px; height: 34px; position: relative; z-index: 1; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25)); }
.rec-ring { position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.rec.recording .rec-btn { background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .95) 0 6%, #ffc2c2 20%, #ff7070 55%, #d93a3a 100%); box-shadow: inset -8px -12px 22px rgba(0, 0, 0, .16), inset 6px 8px 14px rgba(255, 255, 255, .5), 0 22px 40px -14px rgba(217, 58, 58, .7); }
.rec.recording .rec-ring { animation: recPulse 1.4s ease-out infinite; border-color: #ff7070; }
@keyframes recPulse { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.4); opacity: 0; } }
.rec-meta { display: grid; justify-items: center; gap: 6px; }
.rec-time { font-weight: 300; font-size: 26px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.rec-wave { display: flex; align-items: center; gap: 3px; height: 28px; }
.rec-wave i { width: 4px; height: 100%; border-radius: 3px; background: var(--grad-warm); transform: scaleY(.15); transition: transform .08s; }
.rec-live { font-size: 18px; font-weight: 300; letter-spacing: -.02em; color: var(--text-2); min-height: 28px; text-align: center; max-width: 520px; }
.rec-review { display: grid; gap: 12px; margin-top: 18px; text-align: left; }
.rec-review audio, .result-card audio { width: 100%; height: 40px; }
.transcript { background: var(--glass-strong); border: 1px solid var(--glass-line); border-radius: 18px; padding: 12px 14px; box-shadow: var(--inner); }
.transcript p { font-size: 17px; font-weight: 300; letter-spacing: -.02em; margin-top: 4px; }
.result-card { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); text-align: left; }
.read-result .sentence { text-align: left; margin-left: 0; }
.fix { background: var(--glass-strong); border: 1px solid var(--glass-line); border-left: 3px solid var(--accent); border-radius: 6px 16px 16px 6px; padding: 10px 12px; font-size: 14.5px; }
.fix s { color: var(--bad); }
.improved summary { cursor: pointer; font-weight: 600; color: var(--accent-2); }
.serif-quote { font-size: 17px; font-weight: 300; line-height: 1.55; letter-spacing: -.015em; }
.big-score { font-weight: 200; font-size: 72px; letter-spacing: -.06em; line-height: 1; margin: 6px 0; }
.big-score span { font-size: 28px; color: var(--muted); }

/* Reading */
.read-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .read-grid { grid-template-columns: repeat(2, 1fr); } }
.read-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 24px; color: var(--text); min-height: 150px; transition: transform .25s; }
.read-card:hover { transform: translateY(-3px); }
.read-card h3 { font-size: 22px; font-weight: 400; letter-spacing: -.03em; margin-top: 8px; }
.read-foot { margin-top: auto; }
.reading h1 { font-size: 36px; }
.reading-body { margin-top: 18px; font-size: 18px; line-height: 1.75; letter-spacing: -.01em; }
.reading-body p + p { margin-top: 14px; }
.reading-body p:first-child::first-letter { float: left; font-family: var(--italic); font-style: italic; font-size: 3.6em; line-height: .8; padding: 6px 10px 0 0; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.reading-body .w { cursor: pointer; border-radius: 6px; transition: background .15s; }
.reading-body .w:hover { background: var(--accent-soft); }
.reading-body .w.saved { box-shadow: inset 0 -2px 0 var(--accent); }

/* Writing */
textarea.writing-area { font-size: 18px; font-weight: 300; line-height: 1.7; letter-spacing: -.01em; min-height: 260px; }
h1, h2, .tile .value, .big-score, .ring-label, .rec-time { font-variant-numeric: lining-nums tabular-nums; }

/* =====================================================================
   NATIVE ILOVA HISSIYOTI (telefon)
   ===================================================================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overscroll-behavior-y: none; }
body { overscroll-behavior-y: none; -webkit-touch-callout: none; }
a, button, .chip, .list-item, .option, .radio, .bottom-nav a, .icon-btn, .tile { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
input, textarea, .msg, .reading-body, .transcript, [contenteditable] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img { -webkit-user-drag: none; }
/* Bosilganda native "press" effekti */
.list-item:active, .card[href]:active, a.card:active, .skill-card:active, .read-card:active, .option:active { transform: scale(.985); transition: transform .08s; }
.bottom-nav a:active svg { transform: scale(.88); }
.bottom-nav a svg { transition: transform .15s; }
/* Sahifa almashinuvi: chuqurroq sahifa o'ngdan siljib kiradi, bo'limlar — yumshoq paydo bo'ladi */
.view-push { animation: viewPush .32s cubic-bezier(.2, .9, .3, 1); }
.view-pop { animation: viewPop .32s cubic-bezier(.2, .9, .3, 1); }
.view-fade { animation: viewFade .26s ease; }
@keyframes viewPush { from { transform: translateX(28px); opacity: 0; } }
@keyframes viewPop { from { transform: translateX(-28px); opacity: 0; } }
@keyframes viewFade { from { transform: translateY(8px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .view-push, .view-pop, .view-fade { animation: none; } }
/* O'rnatilgan ilova rejimi */
.standalone .auth { padding-top: calc(24px + env(safe-area-inset-top, 0px)); }
.auth { padding-top: calc(24px + env(safe-area-inset-top, 0px)); padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }


/* =====================================================================
   KOMBINATSIYA MAVZUSI — to'q boshqaruv qismlari
   ===================================================================== */
:root[data-theme="combo"] .bottom-nav { background: var(--chrome); border-color: var(--chrome-line); box-shadow: 0 22px 44px -18px rgba(30, 20, 45, .65), inset 0 1px 0 rgba(255, 255, 255, .08); }
:root[data-theme="combo"] .bottom-nav a { color: var(--chrome-muted); }
:root[data-theme="combo"] .bottom-nav a.active { background: #fff; color: var(--text); }
:root[data-theme="combo"] .icon-btn { background: var(--chrome); border-color: var(--chrome-line); color: var(--chrome-text); box-shadow: 0 10px 22px -12px rgba(30, 20, 45, .6); }
:root[data-theme="combo"] .count-dot { box-shadow: 0 0 0 3px var(--primary); }
:root[data-theme="combo"] .card.hero {
  color: var(--chrome-text); border-color: rgba(255, 255, 255, .1);
  background: radial-gradient(110% 130% at 100% 0%, rgba(255, 154, 92, .55), transparent 55%), radial-gradient(90% 120% at 0% 100%, rgba(143, 124, 240, .5), transparent 60%), #231a30;
  box-shadow: 0 30px 60px -26px rgba(35, 26, 48, .7), inset 0 1px 0 rgba(255, 255, 255, .1);
}
:root[data-theme="combo"] .card.hero .muted { color: var(--chrome-muted); }
:root[data-theme="combo"] .card.hero .progress { background: rgba(255, 255, 255, .15); }
:root[data-theme="combo"] .msg.user { background: var(--primary); }
@media (min-width: 900px) {
  :root[data-theme="combo"] .sidebar { background: var(--chrome); border-color: var(--chrome-line); box-shadow: 0 24px 50px -24px rgba(30, 20, 45, .6), inset 0 1px 0 rgba(255, 255, 255, .08); }
  :root[data-theme="combo"] .sidebar .brand, :root[data-theme="combo"] .sidebar .row { color: var(--chrome-text); }
  :root[data-theme="combo"] .sidebar a { color: var(--chrome-muted); }
  :root[data-theme="combo"] .sidebar a:hover { background: rgba(255, 255, 255, .07); color: var(--chrome-text); }
  :root[data-theme="combo"] .sidebar a.active { background: #fff; color: var(--text); }
}

/* Mavzu almashganda yumshoq o'tish (faqat qisqa vaqt yoqiladi) */
.theme-anim, .theme-anim * { transition: background-color .45s ease, color .45s ease, border-color .45s ease, box-shadow .45s ease !important; }

/* Mavzu tanlagich (Profil) */
.theme-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.theme-pick button {
  position: relative; display: grid; gap: 8px; justify-items: center; padding: 10px 8px 12px; border-radius: 20px; cursor: pointer; font: 600 13px var(--font); color: var(--text);
  background: var(--glass); border: 1.5px solid var(--glass-line); box-shadow: var(--inner); transition: transform .15s, border-color .2s;
}
.theme-pick button:active { transform: scale(.97); }
.theme-pick button.on { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--inner); }
.theme-pick .sw { width: 100%; aspect-ratio: 4 / 3; border-radius: 14px; position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.theme-pick .sw i { position: absolute; left: 10%; right: 10%; height: 18%; border-radius: 6px; }
.theme-pick .sw i:nth-child(1) { top: 14%; height: 30%; }
.theme-pick .sw i:nth-child(2) { top: 52%; right: 52%; }
.theme-pick .sw i:nth-child(3) { top: 52%; left: 52%; }
.theme-pick .sw b { position: absolute; left: 16%; right: 16%; bottom: 8%; height: 14%; border-radius: 99px; }
.sw.light { background: radial-gradient(70% 70% at 10% 10%, #ffd2ad, transparent 70%), radial-gradient(70% 70% at 100% 40%, #d6d2ff, transparent 70%), #eef0f6; }
.sw.light i { background: rgba(255, 255, 255, .85); } .sw.light b { background: rgba(255, 255, 255, .9); }
.sw.combo { background: radial-gradient(70% 70% at 10% 10%, #ffb27a, transparent 70%), radial-gradient(70% 70% at 100% 40%, #a48cf5, transparent 70%), radial-gradient(70% 70% at 50% 110%, #8fd0d6, transparent 70%), #ebe6f0; }
.sw.combo i { background: rgba(255, 255, 255, .85); } .sw.combo i:nth-child(1) { background: linear-gradient(135deg, #3a2a4f, #231a30); } .sw.combo b { background: #231a30; }
.sw.dark { background: radial-gradient(70% 70% at 15% 15%, #7a3a17, transparent 70%), radial-gradient(70% 70% at 100% 90%, #3a2a52, transparent 70%), #120e0c; }
.sw.dark i { background: rgba(255, 240, 225, .1); } .sw.dark b { background: rgba(255, 240, 225, .14); }
.theme-btn svg { width: 19px; height: 19px; }

/* ---------- Google / Apple / Telegram tugmalari ---------- */
.social { display: grid; gap: 10px; margin-bottom: 4px; }
.soc-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; border-radius: 999px; font-weight: 600; font-size: 15px;
  text-decoration: none; transition: transform .12s, box-shadow .2s;
}
.soc-btn:active { transform: scale(.98); }
.soc-btn.google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .35); }
.soc-btn.apple { background: #000; color: #fff; box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .6); }
:root[data-theme="dark"] .soc-btn.apple { background: #fff; color: #000; }
.soc-tg { display: flex; justify-content: center; min-height: 44px; }
.soc-tg iframe { max-width: 100%; }
.soc-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.soc-or::before, .soc-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.soc-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 9px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--glass-line); font-size: 13px; font-weight: 600; }
.soc-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--solid); box-shadow: 0 6px 14px -8px rgba(30, 34, 60, .35); flex-shrink: 0; color: var(--text); }

/* =====================================================================
   BilimWay brendi: shar belgi + "Bilim" (Inter) "Way" (kursiv gradient)
   ===================================================================== */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font); font-size: 21px; color: var(--text); letter-spacing: -.035em; line-height: 1; }
.brand .logo, .logo {
  width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0; color: #fff; font-size: 0;
  background: radial-gradient(circle at 34% 28%, #fff 0 5%, #ffe2c2 13%, #ff9a62 50%, #ef6a4a 82%, #b85bd6 100%);
  box-shadow: inset -4px -6px 10px rgba(0, 0, 0, .12), inset 3px 4px 8px rgba(255, 255, 255, .45), 0 8px 18px -8px rgba(239, 106, 74, .7);
}
.logo svg { width: 58%; height: 58%; filter: drop-shadow(0 1px 1px rgba(120, 40, 20, .25)); }
.wm { font-weight: 650; white-space: nowrap; }
.wm em {
  font-family: var(--italic); font-style: italic; font-weight: 600; font-size: 1.14em; letter-spacing: -.01em; margin-left: -.035em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .08em;
}
.sidebar .brand { font-size: 22px; }
:root[data-theme="combo"] .sidebar .wm em, :root[data-theme="combo"] .l-nav .wm em { background: linear-gradient(135deg, #ffc58a, #ff8f7a 55%, #c3a6ff); -webkit-background-clip: text; background-clip: text; }
/* Kichik ekranda brend + til tanlagich bir qatorga sig'sin */
.auth .card > .row.between { flex-wrap: nowrap; gap: 8px; min-width: 0; }
@media (max-width: 420px) {
  .auth .brand { font-size: 18px; gap: 8px; }
  .auth .brand .logo { width: 32px; height: 32px; }
  .auth .lang-switch button { padding: 6px 9px; font-size: 12.5px; }
}

/* Muallif: Shamshod Academy · Buxoro */
.auth { grid-template-rows: 1fr auto; }
.credit { margin: 18px 0 0; text-align: center; font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.credit.side { margin: 2px 12px 6px; text-align: left; font-size: 10.5px; letter-spacing: .12em; opacity: .8; }

/* =====================================================================
   AI kurs, dars va Premium
   ===================================================================== */
/* Yuqori paneldagi Premium / energiya belgisi */
.pro-pill { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 12px; border-radius: 999px; font-weight: 650; font-size: 13.5px;
  background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: var(--inner); color: var(--text); text-decoration: none; flex-shrink: 0; }
.pro-pill:empty { display: none; }
.pro-pill svg { width: 15px; height: 15px; color: var(--gold); }
.pro-pill.on { background: var(--grad-warm); color: #fff; border-color: transparent; }
.pro-pill.on svg { color: #fff; }
.pro-pill.empty { color: var(--bad); }
.pro-pill.empty svg { color: var(--bad); }
:root[data-theme="combo"] .pro-pill:not(.on) { background: var(--chrome); border-color: var(--chrome-line); color: var(--chrome-text); }
.badge.pro { background: var(--gold-soft); color: var(--gold); gap: 4px; display: inline-flex; align-items: center; }
.badge.tiny { font-size: 10.5px; padding: 2px 7px; }

/* Kurs xaritasi */
.course-hero { padding: 20px; }
.pro-banner { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px 16px; border-radius: var(--radius); color: inherit; text-decoration: none;
  background: linear-gradient(135deg, var(--gold-soft), var(--accent-soft)); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); }
.level-card { background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius); box-shadow: var(--shadow), var(--inner); overflow: hidden; }
.level-card > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; }
.level-card > summary::-webkit-details-marker { display: none; }
.level-card .progress { margin-top: 6px; }
.lv-id { font-size: 14px; font-weight: 700; color: #fff; letter-spacing: -.02em; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.lv-chev { transition: transform .2s; }
.level-card[open] .lv-chev { transform: rotate(90deg); }
.lesson-list { display: grid; gap: 2px; padding: 0 8px 10px; }
.lesson-row { display: flex; align-items: center; gap: 12px; padding: 10px; min-height: 56px; border-radius: 18px; color: inherit; text-decoration: none; }
.lesson-row:active { transform: scale(.99); }
.lesson-row.next { background: var(--accent-soft); }
.lesson-row.locked, .lesson-row.premium { opacity: .72; }
.lesson-mark { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: 13.5px;
  background: var(--glass-strong); border: 1px solid var(--glass-line); color: var(--text-2); box-shadow: var(--inner); }
.lesson-mark svg { width: 16px; height: 16px; }
.lesson-row.done .lesson-mark { background: var(--good); border-color: transparent; color: #fff; }
.lesson-row.next .lesson-mark { background: var(--accent); border-color: transparent; color: #fff; }
.lesson-row.premium .lesson-mark { color: var(--gold); }

/* Dars */
.lesson-wrap { max-width: 680px; margin: 0 auto; display: grid; gap: 14px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.steps span { font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--muted); text-align: center; padding-top: 8px; border-top: 3px solid var(--border); }
.steps span.on { color: var(--accent-2); border-color: var(--accent); }
.steps span.done { color: var(--good); border-color: var(--good); }
.lesson-goal h2 { font-weight: 400; letter-spacing: -.03em; }
.lesson-text p { margin: 0 0 10px; }
.lesson-text ul, .lesson-text ol { margin: 0 0 10px; padding-left: 20px; }
.lesson-text b { color: var(--accent-2); font-weight: 650; }
.examples { display: grid; gap: 8px; }
.example { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.vocab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.vocab-card { position: relative; display: grid; gap: 2px; text-align: left; padding: 12px 34px 12px 12px; min-height: 64px; border-radius: 16px; cursor: pointer;
  background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: var(--inner); color: var(--text); font: inherit; }
.vocab-card .vc-ic { position: absolute; right: 10px; top: 12px; width: 16px; height: 16px; color: var(--accent); }
.ex-card { padding: 20px; }
.ex-q { font-weight: 400; font-size: 21px; letter-spacing: -.02em; line-height: 1.35; }
.blank { display: inline-block; min-width: 64px; border-bottom: 2.5px solid var(--accent); margin: 0 4px; transform: translateY(-3px); }
.input.lg { min-height: 54px; font-size: 18px; margin-top: 16px; }
.input.right { border-color: var(--good); background: var(--good-soft); color: var(--good); }
.input.wrong { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.order-answer { min-height: 64px; margin-top: 16px; padding: 10px; border-radius: 18px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  border: 1.5px dashed color-mix(in srgb, var(--text) 18%, transparent); }
.order-answer.right { border: 1.5px solid var(--good); background: var(--good-soft); }
.order-answer.wrong { border: 1.5px solid var(--bad); background: var(--bad-soft); }
.order-pool { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.word-chip { min-height: 44px; padding: 0 16px; border-radius: 14px; font: inherit; font-weight: 550; cursor: pointer; color: var(--text);
  background: var(--solid); border: 1px solid var(--border); box-shadow: 0 4px 10px -6px rgba(30, 34, 60, .3); }
.word-chip.used { opacity: .25; box-shadow: none; }
.word-chip:disabled { cursor: default; }
.feedback { margin-top: 16px; padding: 12px 14px; border-radius: 16px; }
.feedback.good { background: var(--good-soft); color: var(--good); }
.feedback.bad { background: var(--bad-soft); color: var(--bad); }
.feedback .small { color: var(--text-2); }
.result-card { padding: 26px 20px; }
.result-card .ring { margin: 0 auto; }
.blocked { max-width: 460px; margin: 30px auto; padding: 28px 22px; }
.loading-msg #gen-msg { max-width: 320px; margin: 0 auto; }
.course-cta { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.lesson-ctx { display: flex; align-items: center; gap: 6px; justify-content: center; font-size: 12.5px; color: var(--text-2); padding: 6px 0; }
.lv-mini { display: grid; gap: 4px; }
.lv-mini .progress { margin: 0; }

/* Profil */
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.profile-stats div { display: grid; gap: 2px; padding: 10px 4px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.profile-stats b { font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.profile-stats span { font-size: 11px; color: var(--muted); }

/* Premium sahifasi */
.pro-hero { text-align: center; padding: 6px 0 16px; }
.pro-orb { margin: 0 auto; }
.pro-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--radius);
  background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: var(--shadow), var(--inner); }
.pro-status > svg { width: 26px; height: 26px; color: var(--gold); flex-shrink: 0; }
.pro-status.on { background: var(--grad-warm); color: #fff; border-color: transparent; }
.pro-status.on svg { color: #fff; }
.pro-status > div:nth-child(2) { flex: 1; min-width: 160px; }
.energy-bar { display: flex; gap: 4px; width: 100%; }
.energy-bar i { flex: 1; height: 6px; border-radius: 3px; background: var(--border); }
.energy-bar i.on { background: var(--gold); }
.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { padding: 10px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.compare tr:last-child td { border-bottom: 0; }
.compare .c { text-align: center; width: 92px; }
.compare th.pro-col { color: var(--gold); }
.compare td.pro-col { background: var(--gold-soft); font-weight: 600; }
.compare .yes { width: 18px; height: 18px; color: var(--good); vertical-align: middle; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.plan { position: relative; display: grid; gap: 4px; justify-items: center; text-align: center; padding: 20px 8px 14px; border-radius: 22px; cursor: pointer; font: inherit; color: var(--text);
  background: var(--glass-strong); border: 1.5px solid var(--glass-line); box-shadow: var(--inner); }
.plan.sel { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 12px 26px -16px color-mix(in srgb, var(--accent) 80%, transparent); }
.plan-m { font-size: 13px; font-weight: 600; color: var(--text-2); }
.plan-p { font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.plan-badge { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 10px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 999px; background: var(--grad-warm); color: #fff; }
.pay-steps { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 6px; color: var(--text-2); }
.pay-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px; border-radius: 20px; color: #fff;
  background: linear-gradient(135deg, #2a2e40, #171a26); box-shadow: 0 16px 30px -18px rgba(20, 24, 40, .7); }
.pay-card .muted, .pay-card .text-2 { color: rgba(255, 255, 255, .7); }
.card-num { font-size: 20px; font-weight: 500; letter-spacing: .08em; margin: 2px 0; font-variant-numeric: tabular-nums; }
.pro-btn { background: var(--grad-warm); color: #fff; border-color: transparent; }
.pending-card .icon-box { flex-shrink: 0; }
.pay-note { color: var(--text-2); font-style: italic; }
.tile .value.small-val { font-size: 22px; }
.pro-ic { width: 18px; height: 18px; color: var(--gold); }
@media (max-width: 420px) {
  .plans { gap: 6px; }
  .plan { padding: 18px 4px 12px; }
  .plan-p { font-size: 14.5px; }
  .compare .c { width: 74px; }
  .ex-q { font-size: 19px; }
  .pro-pill { padding: 0 10px; }
}
.pay-row { flex-wrap: wrap; align-items: flex-start; }
.pay-row > .grow { flex: 1 1 180px; }
.pay-actions { display: flex; gap: 8px; }
@media (max-width: 600px) { .pay-actions { width: 100%; } .pay-actions .btn { flex: 1; min-height: 44px; } }
.ai-card .card-title .orb { flex-shrink: 0; }
.ai-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
