/* ============ Design tokens ============ */

:root {
  color-scheme: light dark;

  /* Surfaces come from the Telegram theme so the app matches the user's client */
  --bg: var(--tg-theme-bg-color, #ffffff);
  --surface: var(--tg-theme-secondary-bg-color, #f2f3f7);
  --card: var(--tg-theme-section-bg-color, var(--tg-theme-bg-color, #ffffff));
  --text: var(--tg-theme-text-color, #0f1115);
  --hint: var(--tg-theme-hint-color, #8a8f98);
  --separator: rgba(128, 132, 142, 0.18);

  /* Brend rangi Telegram mavzusidan QAT'I NAZAR o'zgarmaydi — ilovaning
     o'z identikasi. Scout'dagi to'q ko'k (#315CDF) — avvalgi #0057FF juda
     och va "chaqnoq" ko'rinardi.

     `--accent-ink` — aynan shu rang MATN/IKONKA sifatida ishlatilganda.
     Yorug' mavzuda u `--accent`ning o'zi, qorong'ida esa yorug'roq:
     #315CDF Telegram tungi foniga (#17212b) nisbatan past kontrast beradi,
     ya'ni o'qilmaydi. To'ldirilgan tugmada esa aksincha — to'q rang kerak
     (oq matn ustida ~5.3:1). Shuning uchun ikkita alohida o'zgaruvchi. */
  --accent: #315cdf;
  --accent-2: #4d74e6;
  --accent-ink: var(--accent);
  --accent-soft: rgba(49, 92, 223, 0.10);
  --on-accent: #ffffff;

  --green: #22a565;
  --green-soft: rgba(34, 165, 101, 0.13);
  --amber: #e8912a;
  --amber-soft: rgba(232, 145, 42, 0.14);
  --red: #e5484d;
  --red-soft: rgba(229, 72, 77, 0.13);

  --r-xl: 22px;
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;

  --shadow-sm: 0 1px 2px rgba(16, 20, 40, 0.05);
  --shadow-md: 0 2px 6px rgba(16, 20, 40, 0.06), 0 8px 24px rgba(16, 20, 40, 0.05);
  --shadow-accent: 0 8px 24px rgba(49, 92, 223, 0.30);

  --pad: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --separator: rgba(160, 165, 180, 0.16);
    /* Qorong'ida matn yorug'roq bo'ladi (5.73:1), fon esa o'zgarmaydi. */
    --accent-ink: #7c9cf5;
    --accent-soft: rgba(124, 156, 245, 0.18);
    --green-soft: rgba(34, 165, 101, 0.2);
    --amber-soft: rgba(232, 145, 42, 0.2);
    --red-soft: rgba(229, 72, 77, 0.2);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--surface);
  color: var(--text);
  /* Butun ilova Manrope'da (onboarding'dagi geometrik shrift). Yuklanmasa — tizim shrifti. */
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  /* Ilova oddiy sahifa emas: ikki marta bosishda iOS ekranni kattalashtirib
     yuborardi. `manipulation` — kattalashtirish yo'q, bosish kechikmaydi. */
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

/* Ilova qaysi ekranni ko'rsatishni hal qilguncha tepa qator va menyu
   ko'rinmaydi: aks holda onboarding'dan oldin logo bir lahza chaqnab o'tardi. */
body.booting .topbar,
body.booting .tabbar { display: none; }

/* Brauzer forma elementlariga tizim shriftini beradi — ular ham Manrope'da bo'lsin. */
button,
input,
textarea,
select {
  font-family: inherit;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.ico { width: 18px; height: 18px; }

/* ============ Top bar ============ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--pad);
  /* Chegarasiz: fon sahifa bilan bir xil, oq tasma va chiziq yo'q. */
  background: var(--surface); /* fallback for engines without color-mix */
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Loyiha logotipi (shaffof PNG) — ilgari bu yerda gradientli kvadrat ichida
   umumiy "shapka" ikonkasi turardi. */
.brand-mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: none;
}

/* ============ Layout ============ */

#views {
  flex: 1;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 14px var(--pad) 108px;
}

.view[hidden] { display: none; }

/* `display: flex` ustunligi tufayli `hidden` atributi o'zi yetarli emas. */
[hidden] { display: none !important; }
.view { animation: enter 0.22s cubic-bezier(0.2, 0.8, 0.3, 1); }

@keyframes enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 22px 2px 10px;
}
.section-head:first-child { margin-top: 4px; }

.section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hint);
}

.section-action {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-ink);
}

/* ============ Alert ============ */

.alert {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 13px 14px;
  margin-top: 12px;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--amber);
}
.alert.urgent { border-left-color: var(--red); }

.alert-ico {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--amber-soft);
  color: var(--amber);
  flex-shrink: 0;
}
.alert.urgent .alert-ico { background: var(--red-soft); color: var(--red); }

.alert-title { font-size: 13.5px; font-weight: 700; }
.alert-body { font-size: 12.5px; color: var(--hint); }

/* ============ Cards ============ */

.card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

.card-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

/* Tappable shortcut row on the home screen */
.shortcut {
  cursor: pointer;
  transition: transform 0.12s ease;
}
.shortcut:active { transform: scale(0.98); }
.shortcut .card-top { align-items: center; }
.shortcut .card-title { font-size: 14.5px; }
.shortcut > .card-top > .ico:last-child {
  color: var(--hint);
  flex-shrink: 0;
  opacity: 0.6;
}

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--on-accent);
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
}

.card-body { flex: 1; min-width: 0; }

.card-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.card-sub {
  font-size: 13px;
  color: var(--hint);
  margin-top: 2px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--hint);
}
.pill .ico { width: 13px; height: 13px; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.accent { background: var(--accent-soft); color: var(--accent-ink); }

/* Saqlangan dastur kartasidagi amallar.

   Ularning soni to'rttagacha yetadi (rasmiy sayt, eslatmani o'chirish,
   sanani bilaman, olib tashlash) va odatdagi `card-actions` da ular ikki
   qatorga yoyilib, kartani og'irlashtirib yuborardi. Shuning uchun matn
   kichikroq, tugma ixcham va qator kerak bo'lsa yon tomonga suriladi. */
.saved-actions {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.saved-actions::-webkit-scrollbar { display: none; }
.saved-actions .btn {
  flex: none;
  padding: 8px 11px;
  font-size: 12.5px;
  white-space: nowrap;
}
.saved-actions .btn .ico { width: 14px; height: 14px; }

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ============ Buttons ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  text-decoration: none; /* .btn <a> sifatida ham ishlatiladi (grant "Batafsil") */
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.btn:active { transform: scale(0.97); }
.btn .ico { width: 16px; height: 16px; }

.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-soft { background: var(--accent-soft); color: var(--accent-ink); }
.btn-quiet { background: var(--surface); color: var(--hint); }
.btn-done { background: var(--green-soft); color: var(--green); }
.btn:disabled { opacity: 1; cursor: default; transform: none; }

.btn-block { width: 100%; padding: 14px; font-size: 16px; border-radius: 14px; }

/* ============ Form ============ */

.group {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 4px 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}

.field { padding: 12px 0; }
.field + .field { border-top: 1px solid var(--separator); }

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--hint);
  margin-bottom: 8px;
}

.field input[type="text"],
.field input[type="number"] {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  padding: 0;
}
.field input::placeholder { color: var(--hint); opacity: 0.7; }
.field input:focus { outline: none; }

.chip-group { display: flex; flex-wrap: wrap; gap: 7px; }

.chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}
.chip:active { transform: scale(0.95); }
.chip.active {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 4px 12px rgba(49, 92, 223, 0.25);
}

/* Segmented control (saved status) */
/* Holat tanlagichi. `margin-top` SHART: u kartaning yuqori qismiga
   yopishib turardi, "O'chirish" tugmasining ustida esa 12px joy bor edi —
   natijada ikki blok bir-birining ustiga chiqqandek ko'rinardi. */
.seg {
  display: flex;
  gap: 3px;
  margin-top: 12px;
  background: var(--surface);
  border-radius: 11px;
  padding: 3px;
  /* Yorliq uzun bo'lsa ham hech narsa chiziqdan tashqariga chiqmaydi. */
  overflow: hidden;
}

.seg-item {
  flex: 1;
  /* `min-width: 0` bo'lmasa, flex element o'z min-content kengligidan
     pastga siqilmaydi: boshqa tilda uzunroq yorliq ("Rejalashtirilmoqda")
     qo'yilsa, to'rttasi chiziqqa sig'may tashqariga chiqib ketardi. */
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 4px;
  border-radius: 9px;
  color: var(--hint);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.seg-item.active {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.disclaimer {
  display: flex;
  gap: 7px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--hint);
  margin-top: 10px;
}

/* ============ Skeleton / empty ============ */

.skeleton {
  border-radius: var(--r-lg);
  height: 74px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, var(--card) 25%, var(--surface) 37%, var(--card) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}
.skeleton.short { height: 60px; }

@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.empty {
  text-align: center;
  padding: 56px 24px;
}

.empty-ico {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.empty-ico .ico { width: 28px; height: 28px; }

.empty-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.empty-text {
  font-size: 13.5px;
  color: var(--hint);
  line-height: 1.5;
}

/* ============ Tab bar ============ */

/* Suzuvchi panel: ekran chetiga yopishmaydi, kontent ustida "ko'tarilib"
   turadi. Yorliqlar olib tashlandi — faol bo'lim rangli kvadrat bilan
   ajralib turadi, shuning uchun matnsiz ham qaysi sahifada ekani ko'rinadi. */
.tabbar {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  gap: 4px;
  padding: 7px;
  max-width: 592px;
  margin: 0 auto;
  border-radius: 26px;
  background: var(--card); /* fallback for engines without color-mix */
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border: 1px solid var(--separator);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 10px 30px rgba(16, 20, 40, 0.16), 0 2px 8px rgba(16, 20, 40, 0.08);
}

.tab {
  flex: 1;
  display: grid;
  place-items: center;
  height: 46px;
  border: none;
  background: none;
  font-family: inherit;
  color: var(--hint);
  border-radius: 18px;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.12s ease, background 0.18s ease;
}
.tab:active { transform: scale(0.94); }

/* Yorliq ekranda ko'rinmaydi, lekin skrinrider uchun qoladi. */
.tab-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.tab-ico { width: 23px; height: 23px; }

.tab.active {
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow-accent);
}
.tab.active .tab-ico { filter: drop-shadow(0 2px 4px rgba(16, 20, 40, 0.28)); }

/* ============ Tafsilot oynasi (sheet) ============ */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(10, 12, 22, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 10px 18px calc(24px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.sheet.open { transform: none; }

.sheet-handle {
  cursor: pointer;
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--hint);
  opacity: 0.35;
  margin: 2px auto 14px;
}

.sheet-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 10px;
}

.sheet-section {
  margin-top: 18px;
}

.sheet-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--hint);
  margin-bottom: 8px;
}

.sheet-text {
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-line;
}

.sheet-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--separator);
  font-size: 14px;
}
.sheet-row:last-child { border-bottom: none; }
.sheet-row-label { color: var(--hint); }
.sheet-row-value { font-weight: 600; text-align: right; }

/* Tugmalar pastda yopishib turadi. Ilgari fon yarim shaffof gradient edi va
   ostidagi matn tugmalar orasidan ko'rinib, chalkash ko'rinardi — endi fon
   to'liq va tepasida yupqa chiziq bor. Chekka bo'shliqlar manfiy margin bilan
   qoplanadi, shunda chiziq oynaning butun enini egallaydi. */
.sheet-actions {
  position: sticky;
  bottom: calc(-1 * (24px + env(safe-area-inset-bottom)));
  margin: 18px -18px calc(-1 * (24px + env(safe-area-inset-bottom)));
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--separator);
}

.sheet-verified {
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--hint);
}

/* ============ Toast ============ */

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 60;
  transform: translate(-50%, 8px);
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 40px);
  padding: 11px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.toast.show { opacity: 0.96; transform: translate(-50%, 0); }
/* Bekor qilish tugmali toast bosiladigan bo'lishi kerak. */
.toast.has-action { pointer-events: auto; padding-right: 8px; }
.toast-undo {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--bg);
  cursor: pointer;
}
.toast .ico { width: 15px; height: 15px; }

/* ============ Yo'nalish tanlagich ============ */

.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--hint);
}

/* ============ Davlatlar ro'yxati (bayroq bilan) ============ */

/* ============ Bir qatorli filtr lentasi ============ */

.filter-scroll {
  display: flex;
  gap: 7px;
  margin-bottom: 14px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-scroll .chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.chip-flag { font-size: 15px; line-height: 1; }
.pill .chip-flag { font-size: 13px; }

/* Ilova tayyor bo'lmaguncha tab bosilmaydi (app.js `init` qo'yadi/oladi). */
.tabbar[aria-busy="true"] { pointer-events: none; opacity: 0.55; }
/* Matn yoziladigan ekranlarda (Uni Buddy formasi va chati) menyu yo'q:
   iPhone'da klaviatura ochilganda u yozish maydonini yopardi. */
body.no-tabbar .tabbar { display: none; }

/* ============ Universitet logotipi ============ */

.avatar { position: relative; overflow: hidden; }
/* Rasm bosh harflar ustiga tushadi; yuklanmasa `onerror` uni olib tashlaydi
   va ostidagi harflar ko'rinib qoladi. */
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  padding: 5px;
}

/* ============ Bosiladigan dastur kartasi ============ */

.card-top.program-open { cursor: pointer; }
.card-top.program-open:active { opacity: 0.75; }

.card-chevron {
  display: grid;
  place-items: center;
  align-self: center;
  flex: none;
  color: var(--hint);
}
/* `#i-chevron` allaqachon o'ngga qaragan — burish shart emas. */
.card-chevron .ico { width: 16px; height: 16px; }

/* ============ Dastur tafsilot oynasi ============ */

.sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.sheet-head > div { min-width: 0; }

.sheet-sub {
  font-size: 13px;
  color: var(--hint);
  margin-top: 2px;
}

.sheet-empty {
  padding: 10px 0;
  font-size: 13.5px;
  color: var(--hint);
}

.sheet-note {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--hint);
}

.sheet-muted { color: var(--hint); font-weight: 500; }

.sheet-actions .btn + .btn { margin-top: 8px; }

/* ============ Profilni tozalash ============ */

.btn-danger-soft {
  margin-top: 8px;
  background: var(--red-soft);
  color: var(--red);
}

/* Diplom qisqartmasi (MBA, LLM, B.Sc.) — dastur nomi yonida.
   DIQQAT: bu blok ilgari obuna ekrani uslublari bilan birga tasodifan
   o'chib ketgan edi (ikki belgi orasidagi hamma narsa kesilgan). */
.abbr {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

/* ============ Bosh sahifa ============ */

/* Ikki ustunli blok: chapda katta karta, o'ngda ikkita kichik. */
.hx-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
  /* Ikkala ustun bir xil balandlikda tugaydi (standart `stretch`).
     Ilgari bu sakrashga sabab bo'lardi: o'ng ustun ma'lumot kelgach
     balandlashar va chapdagi kartani ham cho'zardi. Endi sakrash yo'q,
     chunki `.hx-mini-foot` da yorliq joyi oldindan band qilingan —
     o'ng ustunning balandligi yuklanishdan oldin ham, keyin ham bir xil. */
  align-items: stretch;
}
.hx-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  min-width: 0;
}

.hx-recap,
.hx-mini {
  position: relative;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--separator);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.hx-recap:active,
.hx-mini:active { transform: scale(0.98); }

.hx-recap {
  display: flex;
  flex-direction: column;
  padding: 15px 14px 14px;
  overflow: hidden;
}
.hx-recap-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.hx-recap-text {
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--hint);
}
/* Rasm o'rnidagi yumshoq panel — hero bilan bir rang oilasida. */
.hx-recap-art {
  flex: 1;
  min-height: 96px;
  margin: 12px 0 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  background: linear-gradient(
    150deg,
    color-mix(in srgb, var(--accent) 16%, transparent),
    color-mix(in srgb, var(--accent-2) 13%, transparent)
  );
}
.hx-recap-art img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(16, 20, 40, 0.3))
          drop-shadow(0 2px 3px rgba(16, 20, 40, 0.18));
}
/* Tugma rasm ustiga chiqib turadi — namunadagi "Get Started" kabi. */
.hx-recap-cta {
  position: relative;
  align-self: center;
  margin-top: -17px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--card);
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: -0.01em;
  box-shadow: var(--shadow-md);
}

.hx-mini {
  display: flex;
  flex-direction: column;
  padding: 13px 13px 12px;
}
.hx-mini-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.hx-mini-label {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.hx-mini-ico {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.hx-mini-ico .ico { width: 14px; height: 14px; }

.hx-mini-value {
  margin-top: auto;
  padding-top: 10px;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
/* Yorliq ("100 close", "No deadline") faqat ma'lumot kelgach paydo bo'ladi.
   Joyi oldindan band qilinmasa, kichik kartalar yuklanish paytida past,
   keyin balandroq bo'lib sakrab turardi. */
.hx-mini-foot {
  margin-top: 6px;
  min-height: 22px;
}

.hx-tag {
  display: inline-block;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 10.5px;
  font-weight: 650;
  color: var(--hint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hx-mini .split { margin: 9px 0 0; height: 5px; }

/* Yashil/sariq nisbati — bir qarashda holat ko'rinadi. */
.split {
  display: flex;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}
.split span { display: block; height: 100%; transition: width 0.6s ease; }
.split-green { background: var(--green); }
.split-amber { background: var(--amber); }
.split-accent { background: var(--accent); }

/* Eng mos dastur kartasi — hero bilan bir rangda, faqat ochroq. */

/* --- Tezkor amallar: uchta ixcham plitka --- */

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* Kartaning o'zi — 3D ikonka ustidan yumshoq rangli gradient bilan. Ikonka
   kartadan biroz chiqib turadi, shuning uchun `overflow` kesilmaydi. */
.quick {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 8px 13px;
  border: 1px solid var(--separator);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
/* Yuqoridan pastga so'nuvchi rang dog'i — uchta amal bir-biridan ajralib
   tursin, lekin matn kontrasti buzilmasin. */
.quick::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 70% at 50% -10%, var(--quick-tint), transparent 70%);
  pointer-events: none;
}
.quick.accent { --quick-tint: color-mix(in srgb, var(--accent) 16%, transparent); }
.quick.amber { --quick-tint: color-mix(in srgb, var(--amber) 22%, transparent); }
.quick.violet { --quick-tint: color-mix(in srgb, #6d3fe0 18%, transparent); }

.quick:active {
  transform: scale(0.96);
  box-shadow: none;
}

.quick-ico {
  width: 46px;
  height: 46px;
  object-fit: contain;
  /* 3D ikonkaning o'z soyasi yo'q — kartadan sezilarli "ko'tarilib" tursin.
     Ikki qatlam: yumshoq uzoq soya hajm beradi, tig'iz yaqin soya chetini
     kartadan ajratadi. */
  filter: drop-shadow(0 7px 12px rgba(16, 20, 40, 0.3))
          drop-shadow(0 2px 3px rgba(16, 20, 40, 0.18));
  transition: transform 0.16s ease;
}
.quick:active .quick-ico { transform: translateY(1px) scale(0.94); }


.quick-label {
  position: relative;
  font-size: 12.5px;
  font-weight: 650;
  text-align: center;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* ============ Grant kartasi (mobil uchun qayta tuzilgan) ============ */

/* Muammo: nom, davlat, qoplash va qo'shimchalar bitta oqimga tashlangan edi
   va tor ekranda bir-biriga tiqilib ketardi. Endi uchta aniq qavat:
   sarlavha -> asosiy faktlar -> qo'shimchalar. */
.gr-card {
  display: block;
  padding: 14px;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.gr-card:active { transform: scale(0.99); }

.gr-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.gr-head-text { flex: 1; min-width: 0; }
.gr-head .card-title { line-height: 1.3; }

.gr-countries {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}
/* Davlat chiplari sarlavha ostida — kichikroq va bosiqroq */
.gr-countries .pill {
  padding: 2px 8px;
  font-size: 11.5px;
  background: transparent;
  color: var(--hint);
  border: 1px solid var(--separator);
}

.gr-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.gr-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  padding-top: 9px;
  border-top: 1px solid var(--separator);
}
.gr-extras .pill {
  padding: 3px 9px;
  font-size: 11.5px;
  background: transparent;
  color: var(--hint);
}
.gr-extras .pill .ico { width: 13px; height: 13px; }

.sheet-extras { margin-top: 10px; }

/* ============ Ariza hujjatlari va dastur stipendiyasi ============ */

.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.doc-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 0;
  font-size: 14px;
  line-height: 1.4;
}
.doc-list li + li { border-top: 1px solid var(--separator); }
.doc-list .ico {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 2px;
  color: var(--green);
}

/* Dastur stipendiyasi — bitta karta (holat + izoh + o'tish) */
.sch-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--green) 22%, transparent);
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--green-soft), transparent 140%);
  color: var(--text);
  font-family: inherit;
  text-align: left;
}
button.sch-card { cursor: pointer; transition: transform 0.12s ease, background 0.15s ease; }
button.sch-card:active { transform: scale(0.985); }

.sch-ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--green) 35%, transparent);
}
.sch-ico .ico { width: 21px; height: 21px; }

.sch-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.sch-title { font-size: 15px; font-weight: 700; }
.sch-sub { font-size: 12.5px; color: var(--hint); line-height: 1.35; }

.sch-go {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--green) 14%, transparent);
  color: var(--green);
}
.sch-go .ico { width: 15px; height: 15px; }

/* Stipendiya yo'q — betaraf rang, grantlarga yo'naltiradi */
.sch-card.sch-none {
  border-color: var(--separator);
  background: var(--surface);
}
.sch-none .sch-ico { background: var(--card); color: var(--hint); box-shadow: none; }
.sch-none .sch-go { background: var(--card); color: var(--hint); }

/* ============ Dastur kartasi (grant kartasi bilan bir xil tuzilish) ============ */

.pr-card { padding: 14px; }

.pr-head {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  transition: opacity 0.12s ease;
}
.pr-head:active { opacity: 0.75; }

.pr-head-text { flex: 1; min-width: 0; }
.pr-head .card-title { line-height: 1.3; }
.pr-head .card-sub { margin-top: 2px; }

.pr-countries {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
/* Davlat chipi sarlavha ostida — bosiqroq, grantlardagidek */
.pr-countries .pill {
  padding: 2px 8px;
  font-size: 11.5px;
  background: transparent;
  color: var(--hint);
  border: 1px solid var(--separator);
}

.pr-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.pr-actions {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--separator);
}
.pr-actions .btn { width: 100%; }

/* ============ Profil ekrani ============ */

/* Bo'lim sarlavhasi yonidagi ikonka (faqat profilda) */
.section-title.sec-ico {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.section-title.sec-ico .ico {
  width: 14px;
  height: 14px;
  opacity: 0.9;
}

/* ============ Yig'iladigan bo'lim (davlatlar ro'yxati) ============ */

/* Universitet reytingi (QS) — dastur kartasi va tafsilot oynasida */
.pill.rank-pill {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 700;
}

/* ============ GPA konvertor ============ */
.quick.rose { --quick-tint: color-mix(in srgb, #e0365a 16%, transparent); }

.gpa-head-ico {
  width: 52px;
  height: 52px;
  flex: none;
  object-fit: contain;
}

.gpa-input {
  width: 100%;
  border: 0;
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  padding: 12px 14px;
}
.gpa-input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.gpa-input::placeholder { color: var(--hint); opacity: 0.6; font-weight: 500; }

.gpa-range { margin-top: 6px; font-size: 12px; color: var(--hint); }
.gpa-error { padding: 10px 0; font-size: 13.5px; color: var(--red); }

.gpa-results { display: flex; flex-direction: column; gap: 8px; }
.gpa-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
}
.gpa-result-flag {
  display: grid;
  place-items: center;
  width: 30px;
  flex: none;
  font-size: 22px;
  line-height: 1;
}
.gpa-result-text { flex: 1; min-width: 0; }
.gpa-result-label { font-size: 14.5px; font-weight: 700; }
.gpa-result-sub { margin-top: 2px; font-size: 12px; color: var(--hint); }
.gpa-result-value {
  flex: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-ink);
}

/* ============ Baland varaq (GPA konvertor kabi to'liq sahifali oynalar) ============ */

/* Oddiy varaq kontent bo'yicha o'lchanadi. GPA konvertorda natija paydo
   bo'lganda varaq sakrab kattayib ketardi; `sheet-tall` uni boshidanoq
   balandligi belgilangan sahifa qilib ochadi, ichki aylantirish bilan. */
.sheet.sheet-tall {
  height: 92vh;
  height: 92dvh;
  max-height: 92vh;
  max-height: 92dvh;
}

/* ============ "Dasturlar jamlanmoqda" oynasi ============ */

.finding {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 12, 22, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.finding.open { opacity: 1; pointer-events: auto; }

.finding-card {
  width: min(340px, 100%);
  padding: 26px 22px 22px;
  border-radius: var(--r-xl);
  background: var(--bg);
  box-shadow: var(--shadow-md);
  text-align: center;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.26s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.finding.open .finding-card { transform: none; }

/* Aylanuvchi halqalar — qidiruv jarayonini bildiradi. */
.finding-orb {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
}
.finding-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: finding-pulse 1.8s ease-out infinite;
}
.finding-ring-2 { animation-delay: 0.6s; }
.finding-ring-3 { animation-delay: 1.2s; }
.finding-core {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow-accent);
  animation: finding-breathe 1.6s ease-in-out infinite;
}
.finding-core .ico { width: 24px; height: 24px; }

@keyframes finding-pulse {
  0% { transform: scale(0.62); opacity: 0.55; }
  100% { transform: scale(1); opacity: 0; }
}
@keyframes finding-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

.finding-title {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.finding-steps {
  margin: 16px 0 18px;
  text-align: left;
  display: grid;
  gap: 9px;
}
.finding-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--hint);
  opacity: 0.4;
  animation: finding-step-in 0.45s ease forwards;
  animation-delay: var(--d, 0ms);
}
.finding-step-dot {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--separator);
  position: relative;
  animation: finding-dot-on 0.45s ease forwards;
  animation-delay: var(--d, 0ms);
}
.finding-step-dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  animation: finding-dot-fill 0.35s ease forwards;
  animation-delay: calc(var(--d, 0ms) + 120ms);
}

@keyframes finding-step-in {
  to { opacity: 1; color: var(--text); }
}
@keyframes finding-dot-on {
  to { border-color: var(--accent-ink); }
}
@keyframes finding-dot-fill {
  to { transform: scale(1); }
}

.finding-bar {
  height: 5px;
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}
.finding-bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: finding-bar-fill var(--dur, 2200ms) cubic-bezier(0.3, 0.7, 0.3, 1) forwards;
}
@keyframes finding-bar-fill {
  0% { width: 4%; }
  70% { width: 82%; }
  100% { width: 100%; }
}

/* Animatsiyani kamaytirish yoqilgan bo'lsa — harakat o'rniga oddiy ko'rinish. */
@media (prefers-reduced-motion: reduce) {
  .finding-ring { display: none; }
  .finding-core,
  .finding-step,
  .finding-step-dot,
  .finding-step-dot::after,
  .finding-bar > span { animation-duration: 0.01ms; animation-iteration-count: 1; }
  .finding-step { opacity: 1; color: var(--text); }
  .finding-bar > span { width: 100%; }
}

/* ============ Filtr qo'yilmagan holat ============ */

/* Natijalar sahifasining o'z elementi: joriy filtr holatini ko'rsatadigan
   ixcham chiziq. Ataylab karta EMAS — kartalar ro'yxatidan ajralib tursin va
   "istalgan ilovaga yopishtirsa bo'ladigan blok" ko'rinishida bo'lmasin.
   Uzuq-uzuq chegara "bu yer hali to'ldirilmagan" degan ma'noni beradi. */
.fx-bar {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
  padding: 11px 12px;
  border-radius: var(--r-md);
  border: 1.5px dashed var(--accent);
  background: var(--accent-soft);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.fx-bar:active { transform: scale(0.99); }

.fx-bar-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.fx-bar-mark .ico { width: 16px; height: 16px; }

.fx-bar-text { flex: 1; min-width: 0; }

.fx-bar-title {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.fx-bar-sub {
  display: block;
  margin-top: 1px;
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--hint);
}

.fx-bar-go {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: none;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-ink);
}
.fx-bar-go .ico { width: 14px; height: 14px; }

/* ============ Birinchi kirishda yo'naltirish ============ */

/* ============ Admission Kit ============ */

/* Sahifa sarlavhasi: 3D ikonka + nom + izoh. */
.kit-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2px 2px 4px;
}
.kit-head-ico {
  flex: none;
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 7px 12px rgba(16, 20, 40, 0.24));
}
.kit-head-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.kit-head-sub {
  margin: 3px 0 0;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--hint);
}

/* Xizmat kartasi: ilovaning boshqa kartalari (grant karuseli, dastur
   sahifasi) kabi oq, soyali; turi chapdagi rangli ikonkadan bilinadi. */
.svc-card {
  margin-bottom: 12px;
  padding: 16px;
  border-radius: var(--r-xl);
  background: var(--card);
  box-shadow: var(--shadow-md);
}
.svc-card.tone-blue { --tone: #315cdf; --tone-2: #5b8cff; }
.svc-card.tone-teal { --tone: #0f9488; --tone-2: #34c6b4; }
.svc-card.tone-violet { --tone: #7a4fe0; --tone-2: #a77ff5; }
.svc-card.tone-rose { --tone: #db3f6d; --tone-2: #f47a94; }
.svc-card.tone-amber { --tone: #e8722f; --tone-2: #f4a24f; }

.svc-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* Ikonka plitkasi: tusli gradient + oq belgi (oddiy och kvadrat "bo'sh"
   ko'rinardi). Admin rasm havolasini qo'ysa — o'sha rasm. */
.svc-ico {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--tone-2), var(--tone));
  color: #ffffff;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--tone) 30%, transparent);
}
.svc-ico .ico { width: 24px; height: 24px; }
.svc-ico-tag {
  position: absolute;
  bottom: -5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--tone);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 6px rgba(16, 20, 40, 0.14);
}
.svc-ico-img { background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.svc-ico-img img { width: 100%; height: 100%; object-fit: cover; }
.svc-head { flex: 1; min-width: 0; }
.svc-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}
.svc-meta {
  margin-top: 3px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--hint);
}
.svc-text {
  margin: 12px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--hint);
}

.svc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--separator);
}
.svc-price {
  min-width: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* Asosiy amal — brend rangidagi to'ldirilgan "pill" (ilovadagi boshqa
   asosiy tugmalar kabi). */
.svc-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 6px 16px rgba(49, 92, 223, 0.26);
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.svc-btn .ico { width: 15px; height: 15px; }
.svc-btn:active { transform: scale(0.96); }
/* Sotib olingan PDF: faylni botga qayta yuborish — ikkinchi darajali amal. */
.svc-btn.is-get {
  background: var(--accent-soft);
  color: var(--accent-ink);
  box-shadow: none;
}
/* So'rov yuborilgan / PDF hali tayyor emas: tugma emas, holat. */
.svc-btn.is-done,
.svc-btn:disabled {
  background: var(--surface);
  color: var(--hint);
  box-shadow: none;
  cursor: default;
}
.svc-btn.is-done:active,
.svc-btn:disabled:active { transform: none; }

.svc-tag {
  flex: none;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.svc-tag .ico { width: 12px; height: 12px; }
.svc-tag.is-locked { background: var(--surface); color: var(--hint); }
.svc-tag.is-open { background: var(--green-soft); color: var(--green); }
.svc-tag.is-soon { background: var(--amber-soft); color: var(--amber); }

/* Admission Kit pastki panelda yo'q, shuning uchun sahifaning o'zida
   qaytish yo'li bo'lishi kerak. Strelka chapga qaratiladi. */
.kit-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0 0 10px -6px;
  padding: 6px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-ink);
  cursor: pointer;
}
.kit-back .ico {
  width: 16px;
  height: 16px;
  transform: rotate(180deg);
}

/* ============ Profil: akkaunt menyusi ============ */

.acc-group {
  background: var(--card);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Eslatmalar toggle'i. `acc-row` bosiladigan qator, bu esa joyida
   o'zgaradigan sozlama — shuning uchun chevron o'rnida tugmacha. */
.acc-row-static { cursor: pointer; }

.switch {
  flex: none;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--separator);
  transition: background 0.18s ease;
  position: relative;
}
.switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(16, 20, 40, 0.3);
  transition: transform 0.18s ease;
}
.switch.is-on { background: var(--accent); }
.switch.is-on .switch-knob { transform: translateX(18px); }

.acc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border: none;
  border-bottom: 1px solid var(--separator);
  background: none;
  font-family: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}
.acc-row:last-child { border-bottom: none; }
.acc-row:active { background: var(--surface); }

.acc-ico {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.acc-ico .ico { width: 17px; height: 17px; }

.acc-text { flex: 1; min-width: 0; }
.acc-title {
  display: block;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.acc-value {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--hint);
}

.acc-chevron {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--hint);
  opacity: 0.55;
}

/* ---- Profil sahifasi (Scout uslubi) ---- */
.pf-card,
.pf-group {
  display: block;
  width: 100%;
  margin-bottom: 14px;
  border-radius: var(--r-xl);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.pf-user {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 0;
  font: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.pf-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
  font-size: 21px;
  font-weight: 800;
}
.pf-avatar .ico { width: 26px; height: 26px; }
.pf-text { flex: 1; min-width: 0; display: block; }
.pf-name {
  display: block;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pf-sub {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--hint);
}

/* Balans: brend rangidagi karta (Scout'dagi "Talk to an advisor" o'rnida) */
.pf-balance {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 18px 16px;
  border-radius: var(--r-xl);
  background: linear-gradient(140deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: var(--shadow-accent);
  color: #ffffff;
}
.pf-balance-ico {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.pf-balance-ico .ico { width: 24px; height: 24px; }
.pf-balance-label { display: block; font-size: 12.5px; font-weight: 600; color: rgba(255, 255, 255, 0.82); }
.pf-balance-value {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.pf-balance-hint { display: block; margin-top: 3px; font-size: 12px; line-height: 1.35; color: rgba(255, 255, 255, 0.8); }
.pf-balance-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 9px 12px 9px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.pf-balance-btn .ico { width: 15px; height: 15px; }

.pf-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 12px 16px;
  border: 0;
  background: none;
  font: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  position: relative;
}
/* Ajratuvchi chiziq ikonkadan keyin boshlanadi */
.pf-row + .pf-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 54px;
  right: 16px;
  border-top: 1px solid var(--separator);
}
.pf-row:active { background: var(--surface); }
.pf-ico { flex: none; display: grid; place-items: center; width: 24px; color: var(--accent-ink); }
.pf-ico .ico { width: 23px; height: 23px; }
.pf-title { display: block; font-size: 16.5px; font-weight: 500; letter-spacing: -0.01em; }
.pf-value {
  flex: none;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  color: var(--hint);
}
.pf-chevron { width: 17px; height: 17px; flex: none; color: var(--hint); opacity: 0.7; }
/* Qiymatli qatorda sarlavha bo'linmaydi — sig'masa qiymat "…" bilan qisqaradi. */
.pf-row.has-value .pf-text { flex: 1 0 auto; max-width: 62%; }
.pf-row.has-value .pf-title { white-space: nowrap; }
.pf-row.has-value .pf-value { flex: 0 1 auto; min-width: 0; max-width: none; margin-left: auto; }
.pf-row-static .switch { margin-left: auto; }

/* Profil sarlavhasi — sahifa ichida, markazda (Scout'dagidek) */
.pf-heading {
  margin: 4px 0 16px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
}

/* Til tanlashda faol qator brend rangida. */
.lang-pick.is-active .acc-title { color: var(--accent-ink); }
.lang-pick .acc-chevron { color: var(--accent-ink); opacity: 1; }

/* ============ Yordam va fikr ============ */

.faq-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--separator);
}
.faq-item:last-child { border-bottom: none; }

.faq-q {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.faq-a {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--hint);
}

.fb-text {
  width: 100%;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid var(--separator);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.45;
  resize: vertical;
}
.fb-text:focus {
  outline: none;
  border-color: var(--accent-ink);
}

/* ---- Uchrashuv vaqtini tanlash ----
   Vaqtlar KUN bo'yicha guruhlanadi va yonma-yon tursin: bitta ustunga
   tizilgan ro'yxatda "qaysi kun nechta vaqt bor" ko'rinmas edi. */
.slot-day { margin-top: 16px; }
.slot-day:first-child { margin-top: 8px; }

.slot-day-title {
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: 0.01em;
  color: var(--hint);
}

.slot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slot-btn {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 104px;
  padding: 10px 12px;
  border: 1.5px solid var(--separator);
  border-radius: 12px;
  font-family: inherit;
  text-align: left;
  background: var(--card);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.16s ease, background 0.16s ease;
}
.slot-btn:active {
  transform: scale(0.97);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.slot-btn:disabled { opacity: 0.5; cursor: default; transform: none; }

.slot-time {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--text);
}
.slot-meta {
  font-size: 11px;
  line-height: 1.3;
  color: var(--hint);
}

/* ---- Ixcham filtr (Dasturlar ro'yxati tepasida) ----
   Filtr qo'yilgach uni o'zgartirish uchun alohida sahifaga o'tish kerak
   edi. Ko'p hollarda bitta narsa almashtiriladi, shuning uchun joriy
   tanlovlar ro'yxat tepasida turadi.

   Qator YONMA-YON suriladi: chiplar pastga tushib, ro'yxatni ekrandan
   itarib yuborsa, sahifaning maqsadi — dasturlar — ko'rinmay qolardi. */
.mf-bar {
  display: flex;
  gap: 8px;
  margin: 0 -16px 12px;
  padding: 0 16px 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mf-bar::-webkit-scrollbar { display: none; }

.mf-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  max-width: 190px;
  padding: 7px 12px;
  border: 1.5px solid var(--separator);
  border-radius: 12px;
  font-family: inherit;
  text-align: left;
  background: var(--card);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.16s ease, background 0.16s ease;
}
.mf-chip:active { transform: scale(0.97); background: var(--surface); }

/* Tanlov qo'yilgan chip ajralib tursin — qaysi biri ishlayotgani darrov
   ko'rinadi. */
.mf-chip.is-set { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }

.mf-chip-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hint);
  white-space: nowrap;
}
.mf-chip-value {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.mf-chip.is-set .mf-chip-value { color: var(--accent-ink, var(--text)); }

/* To'liq filtrga o'tish — matn bilan ikonka bir qatorda. */
.mf-chip.mf-all {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--hint);
}
.mf-chip.mf-all .ico { width: 15px; height: 15px; }

/* Variantlar varag'i */
.mf-options { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.mf-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  text-align: left;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}
.mf-option:active { background: var(--surface); }
.mf-option.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.mf-option .ico { flex: none; width: 17px; height: 17px; }


/* ============ Mentordan so'rash ============ */

/* Bosh sahifadagi Uni Buddy kartasi — qo'shni "To'liq mos" kartasi bilan bir
   o'lchamda. Katta raqam o'rnida qisqa chaqiriq turadi. */
/* Uni Buddy kartasi: matn o'rnida o'rtada katta 3D ikonka. Kartalar
   ustunda bir xil balandlikda (`.hx-side` 1fr 1fr), shuning uchun ikonka
   bo'sh joyni egallaydi va qo'shni "To'liq mos" kartasini cho'zmaydi. */
.hx-buddy-art {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
}
.hx-buddy-art img {
  width: 64px;
  height: 64px;
  margin: -6px 0;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(16, 20, 40, 0.26))
          drop-shadow(0 2px 4px rgba(16, 20, 40, 0.16));
}

.mnt-go { flex: none; width: 18px; height: 18px; color: var(--hint); }

.mnt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.mnt-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 4px;
}
.mnt-head .mnt-title { margin-bottom: 0; }
.mnt-sub { font-size: 13px; color: var(--hint); margin-bottom: 14px; line-height: 1.4; }
.mnt-new { flex: none; padding: 9px 14px; font-size: 13px; }

.mnt-flag { font-size: 24px; line-height: 1; flex: none; }

.mnt-item,
.mnt-country {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  margin-bottom: 8px;
  padding: 13px 14px;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.mnt-item-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mnt-item-title {
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.mnt-item-sub { font-size: 12px; color: var(--hint); }
.mnt-item .pill { flex: none; }
.mnt-country-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; }
.mnt-quota { margin-top: 6px; font-size: 12.5px; color: var(--hint); text-align: center; }

.mnt-textarea { margin: 0; resize: vertical; min-height: 96px; }
.mnt-count-bad { color: var(--amber); }

.mnt-warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 12px;
  padding: 11px 13px;
  border-radius: var(--r-md);
  background: var(--amber-soft);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.4;
}
.mnt-warn .ico { flex: none; width: 16px; height: 16px; color: var(--amber); }

/* Chat: foydalanuvchi o'ngda, mentor chapda. Mentorning ismi yo'q —
   faqat "{davlat}dagi mentor". */
.mnt-chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.mnt-chat-head-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mnt-chat-head .pill { flex: none; }

.mnt-chat { display: grid; gap: 10px; margin-bottom: 12px; }
.mnt-msg { display: grid; gap: 3px; max-width: 86%; min-width: 0; }
.mnt-msg.mine { justify-self: end; justify-items: end; }
.mnt-msg.theirs { justify-self: start; }
.mnt-bubble {
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.mnt-msg.mine .mnt-bubble {
  background: var(--accent);
  color: var(--on-accent);
  border-bottom-right-radius: 5px;
}
.mnt-msg.theirs .mnt-bubble {
  background: var(--card);
  box-shadow: var(--shadow-sm);
  border-bottom-left-radius: 5px;
}
.mnt-from { font-size: 12px; font-weight: 700; color: var(--accent-ink); padding-left: 4px; }
.mnt-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  font-size: 11px;
  color: var(--hint);
}
.mnt-report {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 11px;
  color: var(--hint);
  text-decoration: underline;
  cursor: pointer;
}

.mnt-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  padding: 11px 13px;
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--hint);
  font-size: 12.5px;
  line-height: 1.4;
}
.mnt-note .ico { flex: none; width: 16px; height: 16px; }

.mnt-followup .btn { margin-top: 10px; }

.mnt-rate { padding: 14px; text-align: center; }
.mnt-rate-title { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.mnt-stars { display: flex; justify-content: center; gap: 6px; }
.mnt-star {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  color: var(--hint);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.mnt-star.on { background: var(--amber-soft); color: var(--amber); }

.mnt-actions { display: grid; gap: 8px; }
.mnt-actions:empty { display: none; }

/* Muddati o'tgan grant: ro'yxatda pastda va xira — ochiq grantlardan
   bir qarashda ajralib turadi. */
.gr-card.is-closed { opacity: 0.6; }

/* Dasturlar: qidiruv va saralash */
.pr-tools { display: grid; gap: 8px; margin: 4px 0 12px; }
.pr-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--separator);
}
.pr-search .ico { width: 18px; height: 18px; opacity: 0.55; flex: none; }
.pr-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  padding: 11px 0;
}

/* SVG bayroq: matn balandligida, 4:3 */
.flag-img {
  display: inline-block;
  height: 0.85em;
  width: auto;
  aspect-ratio: 4 / 3;
  border-radius: 2px;
  vertical-align: -0.08em;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12);
  object-fit: cover;
}
.mnt-title .flag-img { margin-right: 4px; }

/* ============ Qadamli onboarding (filtr) ============ */
body.wizard-mode .topbar { display: none; }
body.wizard-mode #views { padding-top: 8px; padding-bottom: 0; }

.wz {
  display: flex;
  flex-direction: column;
  min-height: calc(var(--tg-viewport-stable-height, 100vh) - 8px);
}
.wz-top {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
}
.wz-back {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: -8px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.wz-back .ico { width: 22px; height: 22px; transform: rotate(180deg); }
.wz-progress { flex: 1; display: flex; gap: 6px; }
.wz-progress span {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--separator);
  transition: background 0.25s ease;
}
.wz-progress span.on { background: var(--accent); }
.wz-top > span:first-child { flex: 1; }
.wz-skip {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--hint);
  font: inherit;
  font-weight: 600;
  padding: 8px 0 8px 8px;
  cursor: pointer;
}
.wz-title {
  margin: 22px 0 6px;
  font-size: 27px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.wz-hint { margin: 0 0 4px; color: var(--hint); }
.wz-body { display: grid; gap: 10px; margin-top: 14px; }
.wz-group { display: grid; gap: 10px; }
.wz-sub {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.wz-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 1.5px solid var(--separator);
  border-radius: var(--r-md);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.wz-opt-label { flex: 1; min-width: 0; }
.wz-flag { flex: none; display: inline-flex; font-size: 20px; }
.wz-flag .flag-img { height: 18px; }
.wz-flag .ico { width: 20px; height: 20px; color: var(--accent-ink); }
/* Radio (bitta tanlov) — doira, ko'p tanlov — yumaloq kvadrat */
.wz-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--separator);
  border-radius: 50%;
  color: transparent;
}
.wz-opt.is-multi .wz-mark { border-radius: 7px; }
.wz-mark .ico { width: 14px; height: 14px; }
.wz-opt.active { border-color: var(--accent); background: var(--accent-soft); }
.wz-opt.active .wz-mark { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }

.wz-scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wz-score {
  padding: 12px 0;
  border: 1.5px solid var(--separator);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.wz-score.active { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.wz-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--separator);
  border-radius: var(--r-md);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
.wz-input:focus { outline: 0; border-color: var(--accent); }

.wz-foot {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  display: grid;
  gap: 4px;
  padding: 16px 0 calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, transparent, var(--surface) 28%);
}
.wz-foot .btn:disabled { opacity: 0.45; }

.wz-welcome .wz-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 8px;
}
.wz-logo {
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  /* Logotip PNG'sining foni oq — doira ham oq, aks holda ichida kvadrat ko'rinadi. */
  background: #fff;
  box-shadow: 0 0 0 10px var(--accent-soft), var(--shadow-sm);
}
.wz-logo img { width: 112px; height: 112px; object-fit: contain; }
.wz-brand {
  margin: 28px 0 8px;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.wz-tagline { margin: 0; max-width: 300px; color: var(--hint); font-size: 16px; font-weight: 500; }
.wz .btn-block { font-weight: 700; }

/* ============ Dastur sahifasi (Scout uslubi) ============ */
/* To'liq sahifa: tepa qator va menyu yo'q, pastda doimiy panel */
body.page-mode .topbar,
body.page-mode .tabbar { display: none; }
body.page-mode #views { padding-top: 10px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

.pg { padding-bottom: 8px; }
.pg-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pg-back {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.pg-back .ico { width: 20px; height: 20px; transform: rotate(180deg); }
body.tg-back .pg-back { display: none; }
.pg-hero { margin: 18px 0 14px; }
.pg-hero .avatar { width: 60px; height: 60px; border-radius: 18px; font-size: 18px; }
.pg-country {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  font-size: 14px;
  font-weight: 600;
}
.pg-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
}
.pg-title .abbr { font-size: 15px; vertical-align: 4px; }
.pg-sub { margin-top: 6px; color: var(--hint); font-size: 15px; }
.pg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 16px; }
.pg-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--card);
  font-size: 13.5px;
  font-weight: 700;
}
.pg-chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pg-chip.is-soon { background: var(--accent-soft); color: var(--accent-ink); }
.pg-chip.is-urgent { background: var(--red-soft); color: var(--red); }
.pg-chip.is-closed { background: var(--separator); color: var(--hint); }

.pg-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 14px 0;
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.pg-fact { min-width: 0; padding: 0 14px; }
.pg-fact + .pg-fact { border-left: 1px solid var(--separator); }
.pg-fact span { display: block; color: var(--hint); font-size: 13px; }
.pg-fact b {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pg-source { margin: 10px 4px 16px; color: var(--hint); font-size: 12.5px; line-height: 1.4; }

.pg-card {
  margin-bottom: 12px;
  padding: 16px 16px 12px;
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.pg-card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.pg-card .sheet-row:last-child { border-bottom: 0; }
.pg-card .doc-list li .ico {
  flex: none;
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.pg-card .sch-card { margin: 4px 0 4px; }

.pg-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  gap: 10px;
  padding: 12px max(16px, calc((100vw - 588px) / 2)) calc(12px + env(safe-area-inset-bottom));
  background: var(--card);
  border-top: 1px solid var(--separator);
}
.pg-save {
  flex: none;
  display: grid;
  place-items: center;
  width: 54px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--accent-ink);
  cursor: pointer;
}
.pg-save .ico { width: 22px; height: 22px; }
.pg-save.is-saved { background: var(--accent); color: var(--on-accent); }
.pg-share .ico { width: 21px; height: 21px; }

/* Havoladan kelgan vaqtinchalik filtr (profil filtriga tegmaydi). */
.tf-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 2px 0 12px; }
.tf-caption { font-size: 12.5px; color: var(--hint); }
.tf-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px 6px 12px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.tf-chip .ico { width: 16px; height: 16px; opacity: 0.8; }
.tf-chip .chip-flag { display: inline-flex; }
.pg-save.is-saved .ico { fill: currentColor; }
.pg-open { flex: 1; padding: 15px; font-size: 16px; border-radius: var(--r-md); }

/* Dastur sahifasi: shu davlat mentoriga savol (Uni Buddy) */
.pg-mentor {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 4px 0 12px;
  padding: 16px;
  border: 0;
  border-radius: var(--r-xl);
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow-accent);
  color: #ffffff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.pg-mentor img { width: 54px; height: 54px; flex: none; object-fit: contain; }
.pg-mentor-text { flex: 1; min-width: 0; }
.pg-mentor-title { display: block; font-size: 17px; font-weight: 800; line-height: 1.25; }
.pg-mentor-sub { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.35; color: rgba(255, 255, 255, 0.82); }
.pg-mentor-go {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: #ffffff;
  color: var(--accent);
}
.pg-mentor-go .ico { width: 20px; height: 20px; }

/* ============ Majburiy obuna: o'rtadagi dialog ============ */
.sg {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 16, 32, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.sg.open { opacity: 1; }
.sg-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 30px 20px 20px;
  border-radius: 28px;
  background: var(--card);
  text-align: center;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(16, 20, 40, 0.3);
  transform: scale(0.88) translateY(14px);
  transition: transform 0.38s cubic-bezier(0.2, 0.9, 0.3, 1.25);
}
.sg.open .sg-card { transform: none; }
/* Tepada brend rangidagi tasma — ikonka uning chetida "suzib" turadi */
.sg-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 112px;
  background: linear-gradient(160deg, var(--accent), var(--accent-2));
}
.sg-card > * { position: relative; }
.sg-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  cursor: pointer;
}
.sg-close .ico { width: 16px; height: 16px; }
.sg-art {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(49, 92, 223, 0.35);
}
.sg-art img { width: 64px; height: 64px; object-fit: contain; animation: sg-float 2.6s ease-in-out infinite; }
.sg-halo {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: sg-pulse 2.4s ease-out infinite;
}
.sg-halo-2 { animation-delay: 1.2s; }
@keyframes sg-pulse {
  from { transform: scale(0.92); opacity: 0.55; }
  to { transform: scale(1.4); opacity: 0; }
}
@keyframes sg-float {
  50% { transform: translateY(-5px) rotate(-7deg); }
}
.sg-step {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 700;
}
.sg-title { font-size: 22px; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
.sg-text { margin-top: 8px; color: var(--hint); font-size: 14px; line-height: 1.45; }
.sg-channels { display: grid; gap: 8px; margin: 18px 0 14px; text-align: left; }
.sg-channel {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 10px 10px 12px;
  border: 1.5px solid var(--separator);
  border-radius: 16px;
  background: var(--card);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sg-channel-ava {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  position: relative;
  overflow: hidden;
}
.sg-channel-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sg-channel-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sg-channel-join {
  flex: none;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.2s ease;
}
.sg-channel.is-joined {
  border-color: color-mix(in srgb, var(--green) 45%, transparent);
  background: color-mix(in srgb, var(--green) 8%, var(--card));
  cursor: default;
  opacity: 1;
}
.sg-channel.is-joined .sg-channel-join {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--green);
}
.sg-channel-join .ico { width: 14px; height: 14px; }

/* ============ "Sizga eng mos dasturlar" ============ */
.fmx {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.fmx.open { opacity: 1; transform: none; }
.fmx-body {
  flex: 1;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  overflow-y: auto;
  padding: 40px 16px 16px;
}
.fmx-title { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.fmx-sub { margin: 4px 0 18px; font-size: 14.5px; color: var(--hint); }
/* Karta — universitet rasmi ustida matn. Rasm kiritilmagan bo'lsa: brend foni
   va davlat bayrog'idan xira dog'. Pastdagi soya matnni har qanday rasmda
   o'qiladigan qiladi. */
.fmx-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  min-height: 172px;
  margin-bottom: 12px;
  padding: 12px;
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(140deg, #315cdf, #4d74e6);
  box-shadow: var(--shadow-md);
  color: #ffffff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  animation: fmx-in 0.5s cubic-bezier(0.2, 0.8, 0.3, 1) both;
  animation-delay: calc(var(--i) * 130ms + 120ms);
  transition: transform 0.15s ease;
}
.fmx-card:active { transform: scale(0.98); }
@keyframes fmx-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
}
.fmx-flag-bg {
  position: absolute;
  inset: -25%;
  width: 150%;
  height: 150%;
  object-fit: cover;
  filter: blur(26px) saturate(1.2);
  opacity: 0.4;
}
.fmx-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: fmx-zoom 7s ease-out both;
}
@keyframes fmx-zoom {
  from { transform: scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .fmx-cover { animation: none; }
}
.fmx-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 14, 30, 0.82) 0%, rgba(10, 14, 30, 0.28) 52%, rgba(10, 14, 30, 0) 78%);
}
.fmx-top,
.fmx-info { position: relative; display: flex; }
.fmx-top { justify-content: space-between; align-items: flex-start; gap: 8px; }
.fmx-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #0f1115;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.fmx-pill.is-open { color: #315cdf; }
.fmx-info { align-items: center; gap: 10px; margin-top: 44px; }
.fmx-info .avatar {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 13px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}
.fmx-text { min-width: 0; }
.fmx-card-title { display: block; font-size: 16.5px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; }
.fmx-card-sub {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fmx-bar {
  padding: 12px max(16px, calc((100vw - 588px) / 2)) calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--separator);
  background: var(--bg);
}

/* Grant sahifasi: to'liq grant — yashil chip, qo'shimcha imtiyozlar */
.pg-chip.is-full { background: var(--green-soft); color: var(--green); }
.pg-extras { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.pg-extra {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 700;
}
.pg-extra .ico { width: 15px; height: 15px; }
.pg-card .sheet-text { font-size: 14.5px; line-height: 1.55; }

/* GPA sahifasi: ikonka + sarlavha yonma-yon */
.pg-hero-row { display: flex; align-items: center; gap: 14px; }
.pg-hero-ico { width: 64px; height: 64px; flex: none; object-fit: contain; }
.pg-hero-row .pg-title { font-size: 24px; }

/* Xizmat so'rovi sahifasi */
.svc-page-title { margin-top: 18px; }
#view-service .pg-card:first-of-type { margin-top: 18px; }
.inq-card { padding-bottom: 16px; }
.inq-label { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 700; }
.inq-label:first-child { margin-top: 2px; }
.inq-field {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--separator);
  border-radius: var(--r-md);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
.inq-field:focus { outline: 0; border-color: var(--accent); }
.inq-text { resize: vertical; }
.inq-select-wrap { position: relative; }
.inq-select { padding-right: 40px; -webkit-appearance: none; appearance: none; cursor: pointer; }
.inq-caret {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 16px;
  height: 16px;
  color: var(--hint);
  transform: translateY(-50%) rotate(90deg);
  pointer-events: none;
}

/* Dastur/grant sahifasi tepasidagi rasm (admin yuklagan) */
.pg-cover {
  position: relative;
  margin: 14px 0 0;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--separator);
  box-shadow: var(--shadow-sm);
}
/* Faqat asosiy rasm — yorliqdagi bayroq rasmi emas */
.pg-cover > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pg-cover-pill { position: absolute; top: 14px; left: 14px; }
/* Ko'rishlar soni: sahifaning o'ng burchagida */
.pg-views {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  font-size: 13px;
}
.pg-views b { font-weight: 600; }
.pg-views .ico { width: 16px; height: 16px; }
.pg-cover .pg-views { position: absolute; top: 14px; right: 14px; margin-left: 0; }
/* Rasm bo'lsa logotip uning pastki chetiga chiqib turadi */
.pg-hero.has-cover { position: relative; margin-top: -34px; margin-left: 14px; }
.pg-hero.has-cover .avatar { box-shadow: 0 0 0 4px var(--surface), var(--shadow-sm); }

/* ============ Home: muddati yaqin grantlar karuseli ============ */
#home-grants .section-head { margin-top: 4px; }
.section-action {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.gs-track {
  display: flex;
  gap: var(--pad);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--pad);
  /* Lenta ekran chetigacha boradi, kartalar esa sahifa chizig'ida turadi. */
  margin: 0 calc(-1 * var(--pad));
  padding: 2px var(--pad) 18px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.gs-track::-webkit-scrollbar { display: none; }
/* Bir vaqtda bitta karta to'liq ko'rinadi (keyingisi chetdan chiqib turmaydi). */
.gs-card {
  flex: 0 0 100%;
  scroll-snap-align: start;
  background: var(--card);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.gs-card:active { transform: scale(0.98); }
.gs-skeleton {
  height: 252px;
  background: linear-gradient(90deg, var(--card) 25%, var(--surface) 37%, var(--card) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}
.gs-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 8px 8px 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--accent-soft);
}
.gs-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gs-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--accent-soft), rgba(49, 92, 223, 0.22));
}
.gs-flag-bg {
  position: absolute;
  inset: -20%;
  width: 140%;
  height: 140%;
  object-fit: cover;
  filter: blur(22px) saturate(1.25);
  opacity: 0.55;
}
.gs-logo {
  position: relative;
  padding: 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 20px rgba(16, 20, 40, 0.12);
}
.gs-logo .avatar { width: 56px; height: 56px; font-size: 18px; border-radius: 14px; }
.gs-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 20px);
  padding: 5px 11px 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #0f1115;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 8px rgba(16, 20, 40, 0.10);
}
.gs-body { padding: 12px 14px 14px; }
.gs-title {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gs-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  min-width: 0;
}
.gs-left {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}
.gs-left::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.gs-left.red { color: var(--red); background: var(--red-soft); }
.gs-left.amber { color: var(--amber); background: var(--amber-soft); }
.gs-left.blue { color: var(--accent-ink); background: var(--accent-soft); }
.gs-sub {
  min-width: 0;
  font-size: 13px;
  color: var(--hint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gs-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: -6px 0 6px;
}
.gs-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--separator);
  transition: width 0.25s ease, background 0.25s ease;
}
.gs-dots span.on { width: 18px; background: var(--accent); }

/* "Full match" plitkasi: 3D ikonka o'rnida mos dasturlar soni. */
.quick.green { --quick-tint: color-mix(in srgb, var(--green) 20%, transparent); }
.quick-num {
  position: relative;
  display: grid;
  place-items: center;
  height: 46px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--green);
}

/* Suzib turuvchi menyu ostidagi bo'shliq: sahifa u yerdan ko'rinib qolmasin. */
body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(46px + env(safe-area-inset-bottom));
  z-index: 29;
  pointer-events: none;
  background: linear-gradient(to top, var(--surface) 35%, color-mix(in srgb, var(--surface) 70%, transparent));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(to top, #000 65%, transparent);
  mask-image: linear-gradient(to top, #000 65%, transparent);
}
body.booting::after,
body.page-mode::after,
body.no-tabbar::after { display: none; }

/* ============ Home: Yangiliklar ============ */
#home-updates .section-head { margin-top: 22px; }
.up-card {
  padding: 6px 0;
  border-radius: var(--r-xl);
  background: var(--card);
  box-shadow: var(--shadow-md);
}
.up-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  color: var(--text);
  font-family: inherit;
  text-align: left;
}
.up-row.is-link { cursor: pointer; }
.up-row.is-link:active { background: var(--surface); }
.up-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--hint);
}
.up-dot.up-new { background: var(--accent); }
.up-dot.up-open { background: var(--green); }
.up-dot.up-deadline { background: var(--amber); }
.up-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.up-title { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.up-meta { font-size: 12.5px; color: var(--hint); }
.up-go { flex: none; width: 16px; height: 16px; color: var(--hint); }

/* ============ Dasturlar: filtr oynalari ============ */
.mf-option-main { display: inline-flex; align-items: center; gap: 9px; }
.mf-multi .mf-option .ico { visibility: hidden; }
.mf-multi .mf-option.active .ico { visibility: visible; }
.mf-sheet-foot {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  background: var(--card);
}
.mf-rows { display: flex; flex-direction: column; margin-top: 4px; }
.mf-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 4px;
  border: none;
  border-bottom: 1px solid var(--separator);
  background: none;
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.mf-row:last-child { border-bottom: none; }
.mf-row-label { flex: 1; font-size: 14.5px; font-weight: 600; }
.mf-row-value {
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-ink);
}
.mf-row .ico { flex: none; width: 16px; height: 16px; color: var(--hint); }

/* ============ Brend nomi: Assist -> Kit -> Buddy ============ */
.brand-word {
  display: inline-block;
  transition: transform 0.26s ease, opacity 0.26s ease;
}
.brand-word[data-word="kit"] { color: #e8722f; }
.brand-word[data-word="buddy"] { color: #7a4fe0; }
@media (prefers-color-scheme: dark) {
  .brand-word[data-word="kit"] { color: #f39a5c; }
  .brand-word[data-word="buddy"] { color: #a98bf6; }
}
.brand-word.is-out { transform: translateY(-60%); opacity: 0; }
.brand-word.is-in { transform: translateY(60%); opacity: 0; transition: none; }

/* Do'st taklif qilib bepul olish: ilova rangida, ixcham blok. */
.svc-invite {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 9px 10px;
  border-radius: 14px;
  background: var(--accent-soft);
}
.svc-invite-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--accent);
  color: #ffffff;
}
.svc-invite-ico .ico { width: 16px; height: 16px; }
.svc-invite-body { flex: 1; min-width: 0; }
.svc-invite-title { font-size: 12.5px; font-weight: 700; line-height: 1.25; color: var(--text); }
.svc-invite-bar {
  height: 4px;
  margin: 5px 0 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  overflow: hidden;
}
.svc-invite-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.svc-invite-count { font-size: 11px; font-weight: 700; color: var(--accent-ink); }
.svc-invite-btn {
  flex: none;
  padding: 7px 12px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.svc-invite-btn:active { transform: scale(0.96); }

/* ============ Qo'ng'iroqcha (bildirishnomalar) ============ */

.topbar-bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  flex: none;
}
.topbar-bell .ico { width: 21px; height: 21px; }
.topbar-bell:active { transform: scale(0.94); }
.bell-badge {
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
}
.bell-badge[hidden] { display: none; }

.inbox-list { margin-top: 4px; max-height: 70vh; overflow-y: auto; }
.up-row.is-unread { background: var(--accent-soft); }
.up-row.is-unread .up-title::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--red);
  vertical-align: middle;
}
.up-dot.up-match { background: var(--accent); }
.up-dot.up-reminder { background: var(--amber); }
.up-dot.up-grant_reminder { background: var(--green); }

/* ============ Sovg'a qutisi ============ */

.quick.gift { --quick-tint: color-mix(in srgb, var(--red) 18%, transparent); }
.quick-gift { width: 58px; height: 58px; object-fit: contain; animation: gift-idle 2.4s ease-in-out infinite; }
@keyframes gift-idle {
  0%, 70%, 100% { transform: rotate(0) scale(1); }
  76% { transform: rotate(-8deg) scale(1.06); }
  82% { transform: rotate(7deg) scale(1.06); }
  88% { transform: rotate(-4deg) scale(1.03); }
}

.gift-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, rgba(40, 30, 90, 0.78), rgba(6, 8, 20, 0.9));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gift-overlay.open { opacity: 1; }
.gift-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
}
.gift-close .ico { width: 18px; height: 18px; }
.gift-overlay.is-open .gift-close { display: none; }

.gift-stage {
  position: relative;
  width: min(340px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Orqadagi aylanadigan nurlar va porlash */
.gift-rays {
  position: absolute;
  top: -70px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 220, 120, 0.22) 0deg 9deg, transparent 9deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 68%);
  mask: radial-gradient(circle, #000 18%, transparent 68%);
  opacity: 0.45;
  animation: gift-spin 14s linear infinite;
  transition: opacity 0.4s ease, transform 0.6s ease;
}
.gift-overlay[data-level="1"] .gift-rays { opacity: 0.6; animation-duration: 9s; }
.gift-overlay[data-level="2"] .gift-rays { opacity: 0.8; animation-duration: 5s; }
.gift-overlay[data-level="3"] .gift-rays { opacity: 0.95; animation-duration: 2.5s; }
.gift-overlay.is-open .gift-rays { opacity: 1; transform: scale(1.35); animation-duration: 7s; }
@keyframes gift-spin { to { rotate: 360deg; } }

.gift-glow {
  position: absolute;
  top: -10px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 90, 0.6), transparent 66%);
  opacity: 0.35;
  transition: opacity 0.35s ease, transform 0.5s ease;
}
.gift-overlay[data-level="2"] .gift-glow { opacity: 0.6; transform: scale(1.1); }
.gift-overlay[data-level="3"] .gift-glow { opacity: 0.85; transform: scale(1.2); }
.gift-overlay.is-open .gift-glow { opacity: 1; transform: scale(1.6); }

.gift-sparkles { position: absolute; top: 95px; left: 50%; width: 0; height: 0; }
.gift-sparkles b {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #ffe48a;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  transform: rotate(var(--a)) translateY(calc(-1 * var(--dist)));
  animation: gift-twinkle 1.3s ease-in-out var(--d) infinite;
}
@keyframes gift-twinkle {
  0%, 100% { opacity: 0; scale: 0.4; }
  50% { opacity: 1; scale: 1.4; }
}
.gift-overlay.is-open .gift-sparkles { display: none; }

/* Quti */
.gift-box-wrap {
  position: relative;
  z-index: 2;
  width: 190px;
  height: 190px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.gift-box, .gift-half {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
}
.gift-half { visibility: hidden; }
.gift-top { clip-path: inset(0 0 52% 0); }
.gift-bottom { clip-path: inset(48% 0 0 0); }

.gift-box-wrap.is-dropping { animation: gift-drop 0.75s cubic-bezier(0.3, 1.4, 0.5, 1) both; }
@keyframes gift-drop {
  0% { transform: translateY(-120vh) rotate(-20deg); }
  60% { transform: translateY(0) rotate(4deg) scale(1.06, 0.9); }
  80% { transform: translateY(-14px) rotate(-2deg); }
  100% { transform: none; }
}
.gift-box-wrap:not(.is-dropping):not(.hit-1):not(.hit-2):not(.is-charging):not(.is-exploding) {
  animation: gift-breathe 1.6s ease-in-out infinite;
}
@keyframes gift-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05) rotate(-2deg); }
}
.gift-box-wrap.hit-1 { animation: gift-hit1 0.5s ease both; }
@keyframes gift-hit1 {
  0% { transform: scale(1); }
  20% { transform: scale(1.12, 0.86); }
  40% { transform: scale(0.94, 1.08) rotate(-8deg); }
  60% { transform: rotate(7deg); }
  80% { transform: rotate(-4deg); }
  100% { transform: none; }
}
.gift-box-wrap.hit-2 { animation: gift-hit2 0.6s ease both; }
@keyframes gift-hit2 {
  0% { transform: scale(1); }
  15% { transform: scale(1.2, 0.8); }
  30% { transform: scale(0.9, 1.15) rotate(-14deg) translateY(-12px); }
  45% { transform: rotate(13deg) translateY(-6px); }
  60% { transform: rotate(-10deg); }
  80% { transform: rotate(6deg); }
  100% { transform: none; }
}
.gift-overlay[data-level="2"] .gift-box { filter: drop-shadow(0 0 22px rgba(255, 210, 90, 0.7)) drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45)); }
.gift-box-wrap.is-charging { animation: gift-charge 0.09s linear infinite; }
.gift-box-wrap.is-charging .gift-box { filter: drop-shadow(0 0 34px rgba(255, 230, 140, 0.95)) brightness(1.15); }
@keyframes gift-charge {
  0% { transform: translate(0, 0) rotate(0) scale(1.08); }
  25% { transform: translate(-5px, 2px) rotate(-5deg) scale(1.1); }
  50% { transform: translate(4px, -3px) rotate(5deg) scale(1.12); }
  75% { transform: translate(-3px, -2px) rotate(-3deg) scale(1.1); }
  100% { transform: translate(0, 0) rotate(0) scale(1.08); }
}

/* Portlash: quti yo'qoladi, ikki yarmi otiladi */
.gift-box-wrap.is-exploding { cursor: default; }
.gift-box-wrap.is-exploding .gift-box { visibility: hidden; }
.gift-box-wrap.is-exploding .gift-half { visibility: visible; }
.gift-box-wrap.is-exploding .gift-top { animation: gift-lid 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
.gift-box-wrap.is-exploding .gift-bottom { animation: gift-base 0.9s cubic-bezier(0.3, 0, 0.6, 1) forwards; }
@keyframes gift-lid {
  0% { transform: none; opacity: 1; }
  100% { transform: translate(-90px, -230px) rotate(-75deg) scale(0.8); opacity: 0; }
}
@keyframes gift-base {
  0% { transform: none; opacity: 1; }
  100% { transform: translate(70px, 160px) rotate(40deg) scale(0.7); opacity: 0; }
}

.gift-flash {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(circle at 50% 38%, #fff, rgba(255, 245, 210, 0.9) 30%, transparent 70%);
  opacity: 0;
}
.gift-overlay.is-open .gift-flash { animation: gift-flash 0.7s ease-out; }
@keyframes gift-flash {
  0% { opacity: 0; }
  15% { opacity: 1; }
  100% { opacity: 0; }
}

.gift-hint {
  margin-top: 18px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  animation: gift-hint 1.4s ease-in-out infinite;
}
@keyframes gift-hint {
  0%, 100% { opacity: 0.75; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}
.gift-dots { display: flex; gap: 8px; margin-top: 12px; }
.gift-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: background 0.2s ease, transform 0.2s ease;
}
.gift-dots i.on { background: #ffd65c; transform: scale(1.25); box-shadow: 0 0 10px rgba(255, 214, 92, 0.8); }

.gift-confetti { position: absolute; top: 95px; left: 50%; width: 0; height: 0; z-index: 4; }
.gift-confetti i {
  position: absolute;
  width: var(--s);
  height: calc(var(--s) * 1.5);
  border-radius: var(--br);
  background: var(--c);
  opacity: 0;
  animation: gift-burst 1.7s cubic-bezier(0.1, 0.6, 0.3, 1) var(--d) forwards;
}
@keyframes gift-burst {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  45% { transform: translate(var(--dx), var(--dy)) rotate(calc(var(--r) * 0.5)); opacity: 1; }
  100% { transform: translate(calc(var(--dx) * 1.15), calc(var(--dy) + var(--fall))) rotate(var(--r)); opacity: 0; }
}

.gift-card {
  position: relative;
  z-index: 4;
  width: 100%;
  margin-top: -40px;
  padding: 26px 18px 14px;
  border-radius: var(--r-xl);
  background: var(--card);
  color: var(--text);
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 214, 92, 0.35);
  animation: gift-card-in 0.55s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.gift-card[hidden] { display: none; }
@keyframes gift-card-in {
  from { transform: translateY(40px) scale(0.7); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.gift-badge {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff5f6d, #ffc371);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(255, 95, 109, 0.5);
  animation: gift-badge 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) 0.15s both;
}
@keyframes gift-badge {
  from { transform: translateX(-50%) scale(0) rotate(-20deg); }
  to { transform: translateX(-50%) scale(1) rotate(0); }
}
.gift-congrats {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--text) 0%, var(--accent) 40%, #ff5f6d 60%, var(--text) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gift-shimmer 2.4s linear infinite;
}
@keyframes gift-shimmer { to { background-position: -250% 0; } }
.gift-title { margin-top: 8px; font-size: 16px; font-weight: 700; line-height: 1.35; }
.gift-price { margin-top: 6px; color: var(--green); font-weight: 700; }
.gift-where { margin-top: 8px; color: var(--hint); font-size: 13.5px; }
.gift-claim { width: 100%; margin-top: 16px; animation: gift-pulse 1.6s ease-in-out 1s infinite; }
@keyframes gift-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  50% { box-shadow: 0 0 0 10px transparent; }
}
.gift-later {
  margin-top: 6px;
  padding: 8px 12px;
  border: 0;
  background: none;
  color: var(--hint);
  font: inherit;
  cursor: pointer;
}

.svc-old { color: var(--hint); font-weight: 500; margin-right: 2px; }
.svc-gift {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .quick-gift, .gift-rays, .gift-sparkles b, .gift-hint, .gift-congrats, .gift-claim,
  .gift-box-wrap, .gift-box-wrap.is-charging { animation: none !important; }
  .gift-confetti i { animation-duration: 0.01s; }
}
