/* =========================================================================
   TDIU yakuniy test — Mini App
   Dizayn tizimi: webapp.cardxabar.uz (1:1 tokenlar)
   ========================================================================= */

/* ------------------------------------------------------------- tokenlar */
:root{
  color-scheme: light;

  --bg: #e7ecf3;
  --header-bg: rgba(231, 236, 243, .6);
  --line-header: #d9dce0;
  --stroke-70: rgba(255, 255, 255, .7);
  --block-tr-40: rgba(255, 255, 255, .4);
  --block-tr-100: #ffffff;
  --nav: rgba(255, 255, 255, .8);
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-soft: #ffffff;
  --surface-muted: #f4f6fa;

  --text: #0b1220;
  --text-secondary: #5b6478;
  --text-muted: #8e95a8;
  --hint: #b3b9c9;

  --border: rgba(16, 24, 48, .06);
  --hairline: rgba(16, 24, 48, .06);

  --primary: #2f7bf6;
  --primary-strong: #1d63e0;
  --primary-soft: #6ea4ff;
  --primary-glow: rgba(47, 123, 246, .35);
  --accent: #4d8bff;
  --accent-glow: rgba(77, 139, 255, .32);

  --success: #22c55e;
  --success-soft: #dcfce7;
  --success-text: #16a34a;
  --danger: #ef4444;
  --danger-soft: #fee2e2;
  --danger-text: #dc2626;
  --warning: #f59e0b;
  --warning-soft: #fef3c7;

  --pill-bg: rgba(255, 255, 255, .92);
  --pill-shadow: 0 12px 30px rgba(16, 24, 48, .12);
  --tile-shadow: 0 2px 8px rgba(16, 24, 48, .04);

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --shell: 480px;
  --pad: 20px;

  --ease: cubic-bezier(.32, .72, 0, 1);

  /* Ikonka rangi — .ico-* sinflari qayta belgilaydi */
  --ico: #2f7bf6;
  --ico-soft: rgba(47, 123, 246, .12);
}

html[data-theme="dark"]{
  color-scheme: dark;

  --bg: #071125;
  --header-bg: rgba(22, 38, 70, .6);
  --line-header: #283958;
  --stroke-70: rgba(255, 255, 255, .06);
  --block-tr-40: rgba(22, 38, 70, .4);
  --block-tr-100: #162646;
  --nav: rgba(22, 38, 70, .8);
  --bg-elevated: #0e1530;
  --surface: #131b3a;
  --surface-soft: #16204a;
  --surface-muted: #0e1530;

  --text: #f3f6ff;
  --text-secondary: #aab4d4;
  --text-muted: #7b85a8;
  --hint: #5a6485;

  --border: rgba(140, 160, 220, .12);
  --hairline: rgba(140, 160, 220, .1);

  --primary: #3b7bf6;
  --primary-strong: #2563eb;
  --primary-soft: #6ea4ff;
  --primary-glow: rgba(59, 123, 246, .45);
  --accent: #6ea4ff;
  --accent-glow: rgba(110, 164, 255, .34);

  --success: #34d399;
  --success-soft: rgba(34, 197, 94, .16);
  --success-text: #4ade80;
  --danger: #f87171;
  --danger-soft: rgba(239, 68, 68, .18);
  --danger-text: #fb7185;
  --warning: #fbbf24;
  --warning-soft: rgba(245, 158, 11, .18);

  --pill-bg: rgba(20, 28, 60, .92);
  --pill-shadow: 0 16px 40px rgba(0, 0, 0, .48);
  --tile-shadow: 0 2px 12px rgba(0, 0, 0, .24);
}

/* ----------------------------------------------------------------- base */
*,*::before,*::after{ box-sizing:border-box; }

html,body{
  margin:0; padding:0;
  background:var(--bg);
  color:var(--text);
  font-family:Inter,Outfit,system-ui,-apple-system,sans-serif;
  -webkit-font-smoothing:antialiased;
  -webkit-tap-highlight-color:transparent;
  overscroll-behavior-y:none;
}
body{ min-height:100dvh; }

button,input,textarea,select{ font-family:inherit; color:inherit; }
button{ cursor:pointer; border:none; background:none; padding:0; }
a{ color:var(--primary); text-decoration:none; }
img{ display:block; max-width:100%; }
svg{ display:block; }
::-webkit-scrollbar{ width:0; height:0; }

/* ---------------------------------------------------------------- shell */
.app-shell{
  max-width:var(--shell);
  margin:0 auto;
  min-height:100dvh;
  padding:0 var(--pad) calc(108px + env(safe-area-inset-bottom));
  position:relative;
}

/* Kontent balandligi nolga tushmasligi uchun — sahifa sakramaydi */
.app-main{
  padding-top:16px;
  min-height:calc(100dvh - 190px);
}

/* --------------------------------------------------------- header band */
.header-band{
  position:sticky;
  top:0;
  z-index:30;
  margin-top:calc(-1 * max(env(safe-area-inset-top), 18px) + 8px);
  margin-inline:calc(-1 * var(--pad));
  padding:calc(max(env(safe-area-inset-top), 18px) + 22px) var(--pad) 16px;
  background:var(--header-bg);
  backdrop-filter:blur(15px);
  -webkit-backdrop-filter:blur(15px);
  border-radius:0 0 var(--radius-lg) var(--radius-lg);
  border:1px solid var(--hairline);
  border-top:none;
  box-shadow:0 4px 16px rgba(16,24,48,.08);
}

.ident{ display:flex; align-items:center; justify-content:center; gap:12px; }
.ident-left{ display:flex; align-items:center; justify-content:center; gap:12px; min-width:0; }

.ident-ava{
  flex:none;
  width:42px; height:42px;
  border-radius:var(--radius-pill);
  overflow:hidden;
  background:linear-gradient(140deg, var(--primary), var(--primary-strong));
  display:grid; place-items:center;
  color:#fff;
  box-shadow:0 4px 14px var(--primary-glow);
}
.ident-ava img{ width:100%; height:100%; object-fit:cover; }
.ident-ava svg{ width:20px; height:20px; }

.ident-meta{ min-width:0; text-align:center; }
.ident-fio{
  display:flex;
  align-items:center;
  margin:0;
  max-width:16rem;
  font-size:15px; font-weight:600; line-height:1.25;
}
.ident-fio-text{
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ident-sub{
  margin:2px 0 0;
  font-size:12.5px; font-weight:500;
  color:var(--text-muted);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:15rem;
}

/* ------------------------------------------------------------ bottom nav */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(calc(env(safe-area-inset-bottom) + 16px), 20px);
  z-index: 900;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: calc(100% - 28px);
  max-width: 430px;
  height: 66px;
  padding: 5px 6px;
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(240, 245, 255, 0.74) 100%);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.16), inset 0 1.5px 1.5px rgba(255, 255, 255, 0.9), inset 0 -1.5px 1.5px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(28px) saturate(210%);
  -webkit-backdrop-filter: blur(28px) saturate(210%);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

html[data-theme="dark"] .bottom-nav {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.88) 0%, rgba(15, 23, 42, 0.82) 100%);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.52), inset 0 1.5px 1.5px rgba(255, 255, 255, 0.22);
}

.bottom-nav .liquid-pill {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 0;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 8px 24px rgba(47, 123, 246, 0.42), inset 0 1.5px 1.5px rgba(255, 255, 255, 0.5);
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  overflow: hidden;
}

.bottom-nav .liquid-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.1) 40%, transparent 80%);
  pointer-events: none;
}

.bottom-nav .liquid-pill.is-visible {
  opacity: 1;
}

.bottom-nav.is-dragging .liquid-pill {
  transition: transform 0.04s linear, width 0.04s linear;
  transform: scaleY(0.92) scaleX(1.03);
  box-shadow: 0 12px 28px rgba(47, 123, 246, 0.55), inset 0 1.5px 2px rgba(255, 255, 255, 0.6);
  filter: brightness(1.08);
}

.bottom-nav .nav-item {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 28px;
  z-index: 2;
  cursor: pointer;
  outline: none;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
  touch-action: none;
}

.bottom-nav .nav-item svg {
  width: 23px;
  height: 23px;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), stroke 0.2s ease, filter 0.2s ease;
}

.bottom-nav .nav-item.nav-item-active,
.bottom-nav .nav-item.is-hover-drag {
  color: #ffffff !important;
}

.bottom-nav .nav-item.nav-item-active svg,
.bottom-nav .nav-item.is-hover-drag svg {
  transform: translateY(-3px) scale(1.15);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
  stroke: #ffffff;
}

.bottom-nav .nav-item span {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1px;
}

/* ------------------------------------------------------------ typography */
/* Faqat shaffoflik — transform sahifani tebratardi */
.page{ animation:fade .18s ease-out; }
@keyframes fade{ from{ opacity:0; } to{ opacity:1; } }

/* --- Tema almashuvi ------------------------------------------------------- */
html.theme-anim *,
html.theme-anim *::before,
html.theme-anim *::after{
  transition:background-color .42s cubic-bezier(.4, 0, .2, 1),
             border-color     .42s cubic-bezier(.4, 0, .2, 1),
             color            .32s cubic-bezier(.4, 0, .2, 1),
             fill             .32s cubic-bezier(.4, 0, .2, 1),
             stroke           .32s cubic-bezier(.4, 0, .2, 1),
             box-shadow       .42s cubic-bezier(.4, 0, .2, 1) !important;
  transition-delay:0s !important;
}

html.theme-anim .nav-item,
html.theme-anim .cardbox,
html.theme-anim .list-row{ pointer-events:none; }

html.theme-anim .app-main{ animation:themeBreath .42s cubic-bezier(.4, 0, .2, 1); }
@keyframes themeBreath{
  0%   { opacity:.82; transform:scale(.995); }
  100% { opacity:1;   transform:none; }
}

/* --- Til almashuvi -------------------------------------------------------- */
.app-main{
  opacity:1;
  transform:none;
  transition:opacity .16s cubic-bezier(.4, 0, 1, 1),
             transform .16s cubic-bezier(.4, 0, 1, 1);
  will-change:opacity;
}
.app-shell.is-swapping .app-main{
  opacity:0;
  transform:translateY(6px);
}
.app-shell:not(.is-swapping) .app-main{
  transition:opacity .26s cubic-bezier(0, 0, .2, 1),
             transform .26s cubic-bezier(0, 0, .2, 1);
}

@media (prefers-reduced-motion: no-preference){
  ::view-transition-old(root){
    animation:vtOut .18s cubic-bezier(.4, 0, 1, 1) both;
  }
  ::view-transition-new(root){
    animation:vtIn .28s cubic-bezier(0, 0, .2, 1) both;
  }
}
@keyframes vtOut{
  from { opacity:1; transform:none; }
  to   { opacity:0; transform:translateY(-4px); }
}
@keyframes vtIn{
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:none; }
}

@media (prefers-reduced-motion: reduce){
  .page{ animation:none; }
  .app-main{ transition:none; }
  .app-shell.is-swapping .app-main{ opacity:1; transform:none; }
  html.theme-anim *,
  html.theme-anim *::before,
  html.theme-anim *::after{ transition:none !important; }
  html.theme-anim .app-main{ animation:none; }
  .sheet, .sheet-backdrop, .sheet > *{ animation:none !important; }
  .sheet{ transition:none; }
  *{ scroll-behavior:auto !important; }
}

.h1{ margin:0; font-size:24px; font-weight:700; line-height:1.2; letter-spacing:-.02em; }
.h2{ margin:0; font-size:17px; font-weight:600; }
.h3{ margin:0; font-size:15px; font-weight:600; }

.kicker{
  margin:0 0 6px;
  font-size:12px; font-weight:600;
  color:var(--primary);
  letter-spacing:.02em;
}

.muted{ color:var(--text-secondary); font-size:14px; }
.tiny{ font-size:12px; color:var(--text-muted); }

.section-title{
  margin:24px 2px 10px;
  font-size:15px;
  font-weight:600;
  color:var(--text);
}

.stack{ display:flex; flex-direction:column; gap:12px; }
.row-between{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.mt-10{ margin-top:10px; } .mt-14{ margin-top:14px; } .mt-18{ margin-top:18px; }
.btn-block{ display:flex; align-items:center; justify-content:center; gap:7px; width:100%; }
/* Pastki bo'shliqlar — .mb-* klasslari markupda ishlatilgan, ammo aniqlanmagan edi
   (natijada "Profil to'ldirilmagan" kartasi keyingi blokka tegib turardi). */
.mb-8{ margin-bottom:8px; } .mb-10{ margin-bottom:10px; } .mb-12{ margin-bottom:12px; }
.mb-14{ margin-bottom:14px; } .mb-16{ margin-bottom:16px; } .mb-18{ margin-bottom:18px; }

/* --------------------------------------------------------------- cards */
.card{
  background:var(--surface);
  border-radius:var(--radius-lg);
  box-shadow:var(--tile-shadow);
  padding:18px;
}

.tile{
  background:var(--surface);
  border:1px solid var(--hairline);
  border-radius:var(--radius-lg);
  box-shadow:none;
  padding:16px;
}

/* ---------------------------------------------------------------- stats */
.stat-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }

.stat-card{
  background:var(--surface);
  border:1px solid var(--hairline);
  border-radius:var(--radius-lg);
  padding:16px;
}
.stat-ico{
  width:38px; height:38px;
  border-radius:var(--radius-sm);
  display:grid; place-items:center;
  background:var(--surface-muted);
  color:var(--primary);
  margin-bottom:10px;
}
.stat-ico svg{ width:18px; height:18px; }
.stat-val{ font-size:24px; font-weight:700; line-height:1.05; letter-spacing:-.02em; }
.stat-lab{ font-size:12.5px; color:var(--text-muted); margin-top:3px; }

/* -------------------------------------------------------------- buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  padding:15px 20px;
  border-radius:var(--radius-md);
  font-size:15px;
  font-weight:600;
  background:var(--primary);
  color:#fff;
  transition:transform .14s ease, background .14s ease, opacity .14s;
  box-shadow:0 8px 22px var(--primary-glow);
}
.btn:active{ transform:scale(.98); }
.btn svg{ width:18px; height:18px; }
.btn[disabled]{ opacity:.5; pointer-events:none; }

.btn-ghost{
  background:var(--surface);
  color:var(--text);
  border:1px solid var(--hairline);
  box-shadow:none;
}
.btn-soft{
  background:var(--surface-muted);
  color:var(--primary);
  border:1px solid var(--hairline);
  box-shadow:none;
}
.btn-sm{ padding:11px 16px; font-size:13.5px; border-radius:var(--radius-sm); width:auto; }
.btn-row{ display:flex; gap:10px; }
.btn-row .btn{ flex:1; }

/* ---------------------------------------------------------------- lists */
.list{ display:flex; flex-direction:column; gap:10px; }

.list-row{
  display:flex;
  align-items:center;
  gap:13px;
  width:100%;
  text-align:left;
  padding:14px 16px;
  background:var(--surface);
  border:1px solid var(--hairline);
  border-radius:var(--radius-lg);
  box-shadow:none;
  transition:transform .14s ease, background .14s ease;
}
.list-row:active{ transform:scale(.99); background:var(--surface-muted); }

.row-ico{
  flex:none;
  width:42px; height:42px;
  border-radius:var(--radius-sm);
  display:grid; place-items:center;
  background:var(--surface-muted);
  color:var(--primary);
}
.row-ico svg{ width:19px; height:19px; }
.row-ico.green{ background:var(--success-soft); color:var(--success-text); }
.row-ico.red{ background:var(--danger-soft); color:var(--danger-text); }
.row-ico.amber{ background:var(--warning-soft); color:var(--warning); }
.row-ico.blue{ background:var(--surface-muted); color:var(--primary); }

.row-body{ flex:1; min-width:0; }
.row-title{ font-size:14.5px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.row-sub{
  font-size:12.5px;
  color:var(--text-muted);
  margin-top:2px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.row-body{ min-width:0; }
.sheet .row-sub{ white-space:normal; }
.row-right{ flex:none; color:var(--hint); display:flex; align-items:center; gap:8px; }
.row-right svg{ width:18px; height:18px; }

.group{
  background:var(--surface);
  border:1px solid var(--hairline);
  border-radius:var(--radius-lg);
  overflow:hidden;
}
.group .list-row{ border:none; border-radius:0; background:transparent; }
.group-div{ height:1px; background:var(--hairline); margin-left:71px; }

.row-check{ flex:none; color:var(--primary); display:flex; align-items:center; }
.row-check svg{ width:19px; height:19px; }

.setting-row{
  display:flex;
  align-items:center;
  gap:13px;
  width:100%;
  padding:14px 16px;
}
.setting-row .row-body{ flex:1; min-width:0; }

/* --------------------------------------------------------------- badges */
.badge{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:4px 10px;
  border-radius:var(--radius-pill);
  font-size:12px;
  font-weight:600;
  background:var(--surface-muted);
  color:var(--text-secondary);
}
.badge-primary{ background:var(--surface-muted); color:var(--primary); }
.badge-ok{ background:var(--success-soft); color:var(--success-text); }
.badge-bad{ background:var(--danger-soft); color:var(--danger-text); }
.badge-warn{ background:var(--warning-soft); color:var(--warning); }

.badge-skip{
  background:rgba(146, 100, 60, .14);
  color:#8a5a2b;
}
html[data-theme="dark"] .badge-skip{
  background:rgba(196, 150, 100, .18);
  color:#d3a06a;
}

/* ------------------------------------------------------------- segmented */
.segmented{
  display:flex;
  gap:4px;
  padding:4px;
  border:1px solid var(--hairline);
  border-radius:var(--radius-md);
  background:var(--surface-muted);
  box-shadow:none;
}
.segmented button{
  flex:1;
  padding:10px 8px;
  border-radius:var(--radius-sm);
  font-size:13px;
  font-weight:600;
  color:var(--text-secondary);
  transition:.16s;
}
.segmented button.is-active{
  background:var(--surface);
  color:var(--primary);
  box-shadow:var(--tile-shadow);
}

/* ---------------------------------------------------------------- forms */
.field{ margin-bottom:14px; }
.field-label{
  display:block;
  font-size:13px; font-weight:600;
  color:var(--text-secondary);
  margin-bottom:7px;
}
.input, .textarea, .select{
  width:100%;
  padding:14px 16px;
  border-radius:var(--radius-md);
  border:1px solid var(--hairline);
  background:var(--surface);
  font-size:15px;
  color:var(--text);
  outline:none;
  transition:border-color .16s, box-shadow .16s;
}
.input:focus, .textarea:focus, .select:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 3px var(--primary-glow);
}
.textarea{
  min-height:140px; resize:vertical;
  font-size:13px; line-height:1.6;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
}
.select{ appearance:none; }
.input::placeholder, .textarea::placeholder{ color:var(--hint); }

.num-input{
  flex:none;
  width:88px;
  padding:10px 12px;
  text-align:center;
  border-radius:var(--radius-sm);
  border:1px solid var(--hairline);
  background:var(--surface-muted);
  font-size:15px; font-weight:600;
  color:var(--text);
  outline:none;
  transition:border-color .16s;
}
.num-input:focus{ border-color:var(--primary); }
.num-input::-webkit-outer-spin-button,
.num-input::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
.num-input[type=number]{ -moz-appearance:textfield; }

.file-drop{
  display:flex; flex-direction:column; align-items:center; gap:8px;
  padding:26px 18px;
  border-radius:var(--radius-lg);
  border:1.5px dashed var(--border);
  background:var(--surface-muted);
  text-align:center;
  transition:.16s;
}
.file-drop:active{ border-color:var(--primary); }
.file-drop svg{ width:28px; height:28px; color:var(--primary); }
.file-drop-title{ font-size:14px; font-weight:600; }
.file-drop-sub{ font-size:12px; color:var(--text-muted); }
.file-input{ display:none; }

/* ---------------------------------------------------------------- quiz */
.quiz-bar{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.quiz-meta{ font-size:13px; color:var(--text-muted); min-width:0; }
.quiz-meta strong{ color:var(--text); font-weight:600; font-size:14.5px; }

.timer{
  display:inline-flex; align-items:center; gap:7px;
  padding:9px 14px;
  border-radius:var(--radius-pill);
  font-size:14px; font-weight:700;
  font-variant-numeric:tabular-nums;
  background:var(--surface);
  color:var(--primary);
  border:1px solid var(--hairline);
  box-shadow:var(--tile-shadow);
}
.timer svg{ width:15px; height:15px; }
.timer.is-warn{ background:var(--warning-soft); color:var(--warning); border-color:transparent; }
.timer.is-danger{ background:var(--danger-soft); color:var(--danger-text); border-color:transparent; animation:pulse 1s infinite; }
@keyframes pulse{ 50%{ opacity:.55; } }

.progress{
  height:8px;
  border-radius:var(--radius-pill);
  background:var(--surface-muted);
  overflow:hidden;
  margin-bottom:16px;
}
.progress-bar{
  height:100%;
  border-radius:var(--radius-pill);
  background:linear-gradient(90deg, #2d9ff0, #2d59f0);
  transition:width .3s ease;
}

.q-text{
  font-size:17px; font-weight:600; line-height:1.5;
  margin:0 0 18px;
  white-space:pre-wrap; word-break:break-word;
  letter-spacing:-.01em;
}

.opt{
  display:flex; align-items:flex-start; gap:13px;
  width:100%; text-align:left;
  padding:14px 16px;
  border-radius:var(--radius-md);
  border:1px solid var(--hairline);
  background:var(--surface);
  transition:border-color .16s, background .16s, transform .14s;
  margin-bottom:10px;
}
.opt:active{ transform:scale(.99); }
.opt-key{
  flex:none;
  width:30px; height:30px;
  border-radius:10px;
  display:grid; place-items:center;
  font-size:13px; font-weight:700;
  background:var(--surface-muted);
  color:var(--text-muted);
  transition:.16s;
}
.opt-text{ font-size:14.5px; line-height:1.5; padding-top:4px; word-break:break-word; }

.opt.is-selected{ border-color:var(--primary); background:var(--surface-muted); }
.opt.is-selected .opt-key{ background:var(--primary); color:#fff; }
.opt.is-correct{ border-color:var(--success); background:var(--success-soft); }
.opt.is-correct .opt-key{ background:var(--success); color:#fff; }
.opt.is-wrong{ border-color:var(--danger); background:var(--danger-soft); }
.opt.is-wrong .opt-key{ background:var(--danger); color:#fff; }

.palette{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(42px,1fr));
  gap:8px;
  margin-top:8px;
}
.pal-btn{
  aspect-ratio:1;
  border-radius:var(--radius-sm);
  border:1px solid var(--hairline);
  background:var(--surface);
  font-size:13px; font-weight:600;
  color:var(--text-muted);
  display:grid; place-items:center;
  transition:.14s;
}
.pal-btn.is-answered{ background:var(--surface-muted); border-color:var(--primary); color:var(--primary); }
.pal-btn.is-current{ background:var(--primary); border-color:var(--primary); color:#fff; }

/* -------------------------------------------------------------- results */
.ring-wrap{ display:flex; align-items:center; gap:18px; }
.ring{ position:relative; width:104px; height:104px; flex:none; }
.ring svg{ width:100%; height:100%; transform:rotate(-90deg); }
.ring-txt{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.ring-pct{ font-size:25px; font-weight:700; line-height:1; letter-spacing:-.02em; }
.ring-lab{ font-size:11px; color:var(--text-muted); margin-top:3px; }

.rev-item{
  background:var(--surface);
  border:1px solid var(--hairline);
  border-radius:var(--radius-lg);
  padding:16px;
  margin-bottom:10px;
}
.rev-head{ display:flex; align-items:center; gap:9px; margin-bottom:10px; }
.rev-num{
  width:26px; height:26px;
  border-radius:9px;
  display:grid; place-items:center;
  font-size:12px; font-weight:700;
  background:var(--surface-muted);
  color:var(--text-muted);
}
.rev-q{ font-size:14.5px; font-weight:600; line-height:1.5; margin:0 0 12px; word-break:break-word; }
.rev-opt{
  display:flex; align-items:flex-start; gap:10px;
  padding:10px 12px;
  border-radius:var(--radius-sm);
  font-size:13.5px; line-height:1.45;
  border:1px solid transparent;
  background:var(--surface-muted);
  margin-bottom:6px;
  word-break:break-word;
}
.rev-item.is-skipped{
  border-color:rgba(146, 100, 60, .35);
  background:rgba(146, 100, 60, .04);
}
html[data-theme="dark"] .rev-item.is-skipped{
  border-color:rgba(196, 150, 100, .3);
  background:rgba(196, 150, 100, .05);
}

.rev-opt.ok{ background:var(--success-soft); color:var(--success-text); }
.rev-opt.bad{ background:var(--danger-soft); color:var(--danger-text); }
.rev-opt-key{ flex:none; font-weight:700; opacity:.75; }

/* --------------------------------------------------------------- sheets */
.sheet-root{ position:fixed; inset:0; z-index:1000; display:none; }
.sheet-root.is-open{ display:block; }

.sheet-backdrop{
  position:absolute; inset:0;
  background:rgba(7,17,37,.55);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
  animation:bdIn .26s cubic-bezier(0, 0, .2, 1) both;
  transition:opacity .2s linear;
}
@keyframes bdIn{ from{ opacity:0; } to{ opacity:1; } }
@keyframes bdOut{ from{ opacity:1; } to{ opacity:0; } }

.sheet{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:0;
  width:100%;
  max-width:var(--shell);
  max-height:92dvh;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  border-radius:var(--radius-xl) var(--radius-xl) 0 0;
  background:var(--bg-elevated);
  padding:12px var(--pad) calc(max(env(safe-area-inset-bottom), 18px) + 40px);
  box-shadow:0 -10px 40px rgba(16,24,48,.18);
  animation:sheetIn .38s cubic-bezier(.22, 1, .3, 1) both;
  transition:transform .32s cubic-bezier(.22, 1, .3, 1);
  will-change:transform;
}
@keyframes sheetIn{
  from { transform:translate(-50%, 100%); }
  to   { transform:translate(-50%, 0); }
}
@keyframes sheetOut{
  from { transform:translate(-50%, 0); }
  to   { transform:translate(-50%, 101%); }
}

.sheet-root.is-closing .sheet{
  animation:sheetOut .24s cubic-bezier(.4, 0, 1, 1) both;
  transition:none;
}
.sheet-root.is-closing .sheet-backdrop{
  animation:bdOut .2s linear both;
}

.sheet > *:not(.sheet-grip){
  animation:sheetItem .34s cubic-bezier(.22, 1, .3, 1) both;
  animation-delay:.05s;
}
.sheet > *:nth-child(2){ animation-delay:.04s; }
.sheet > *:nth-child(3){ animation-delay:.07s; }
.sheet > *:nth-child(4){ animation-delay:.10s; }
.sheet > *:nth-child(5){ animation-delay:.13s; }
.sheet > *:nth-child(n+6){ animation-delay:.15s; }
@keyframes sheetItem{
  from { opacity:0; transform:translateY(9px); }
  to   { opacity:1; transform:none; }
}
.sheet-root.is-closing .sheet > *{ animation:none; }

.sheet-grip{ cursor:grab; touch-action:none; }
.sheet-grip:active{ cursor:grabbing; }

.sheet-grip{
  width:40px; height:4px;
  border-radius:var(--radius-pill);
  background:var(--hint);
  opacity:.5;
  margin:6px auto 16px;
}
.sheet-title{ margin:0 0 5px; font-size:19px; font-weight:700; letter-spacing:-.02em; }
.sheet-sub{ margin:0 0 18px; font-size:13.5px; color:var(--text-secondary); }

.mode-grid{ display:flex; flex-direction:column; gap:10px; margin-bottom:18px; }
.mode-btn{
  display:flex; align-items:center; gap:13px;
  width:100%; text-align:left;
  padding:14px 16px;
  border-radius:var(--radius-md);
  border:1px solid var(--hairline);
  background:var(--surface);
  transition:.16s;
}
.mode-btn.is-active{ border-color:var(--primary); background:var(--surface-muted); }
.mode-btn.is-locked{ opacity:.55; }

/* -------------------------------------------------------------- helpers */
.loader-wrap{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; padding:70px 0; }
.spinner{
  width:32px; height:32px;
  border-radius:var(--radius-pill);
  border:3px solid var(--hairline);
  border-top-color:var(--primary);
  animation:spin .8s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }
.loader-text{ font-size:13.5px; color:var(--text-muted); margin:0; }

.empty{ display:flex; flex-direction:column; align-items:center; gap:11px; padding:52px 20px; text-align:center; }
.empty-ico{
  width:60px; height:60px;
  border-radius:var(--radius-lg);
  display:grid; place-items:center;
  background:var(--surface-muted);
  color:var(--primary);
}
.empty-ico svg{ width:26px; height:26px; }
.empty-title{ font-size:16px; font-weight:700; margin:0; }
.empty-sub{ font-size:13.5px; color:var(--text-secondary); margin:0; max-width:18rem; line-height:1.55; }

/* --------------------------------------------------------------- toasts */
.toast-root{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:calc(96px + env(safe-area-inset-bottom));
  z-index:120;
  width:calc(100% - 32px);
  max-width:440px;
  display:flex; flex-direction:column; gap:8px;
  pointer-events:none;
}
.toast{
  display:flex; align-items:flex-start; gap:11px;
  padding:14px 16px;
  border-radius:var(--radius-md);
  background:var(--pill-bg);
  box-shadow:var(--pill-shadow);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  border:1px solid var(--stroke-70);
  font-size:13.5px; line-height:1.45;
  animation:toastIn .22s ease;
}
@keyframes toastIn{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:none; } }
.toast.is-out{ opacity:0; transform:translateY(8px); transition:.2s; }
.toast svg{ flex:none; width:18px; height:18px; margin-top:1px; }
.toast.ok svg{ color:var(--success); }
.toast.bad svg{ color:var(--danger); }
.toast.info svg{ color:var(--primary); }

/* ---------------------------------------------------------- kichik bloklar */
.group-head{ display:flex; align-items:center; gap:10px; margin:24px 2px 10px; }
.group-head .txt{ font-size:15px; font-weight:600; color:var(--text); }
.group-head .line{ flex:1; }

.search-wrap{ position:relative; margin-bottom:6px; }
.search-wrap svg{
  position:absolute; left:15px; top:50%;
  transform:translateY(-50%);
  width:17px; height:17px;
  color:var(--hint);
  pointer-events:none;
}
.search-wrap .input{ padding-left:43px; }

.preview-box{
  border-radius:var(--radius-md);
  border:1px solid var(--hairline);
  background:var(--surface-muted);
  padding:14px 16px;
  margin-bottom:14px;
  max-height:200px;
  overflow-y:auto;
}
.preview-q{ font-size:13px; line-height:1.5; margin:0 0 9px; padding-bottom:9px; border-bottom:1px solid var(--hairline); }
.preview-q:last-child{ border-bottom:none; margin-bottom:0; padding-bottom:0; }
.preview-q b{ color:var(--success-text); font-weight:600; }

.acc-head{ display:flex; align-items:center; gap:13px; width:100%; text-align:left; padding:14px 16px; }
.acc-arrow{ flex:none; color:var(--hint); transition:transform .2s ease; }
.acc-arrow svg{ width:18px; height:18px; }
.acc.is-open .acc-arrow{ transform:rotate(180deg); }
.acc-body{
  display:none;
  padding:0 16px 16px 71px;
  font-size:13px; line-height:1.65;
  color:var(--text-secondary);
}
.acc.is-open .acc-body{ display:block; }
.acc-body code{
  background:var(--surface-muted);
  padding:2px 6px;
  border-radius:6px;
  font-size:12px;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
}
.acc-body pre{
  margin:10px 0 0;
  padding:12px 14px;
  border-radius:var(--radius-sm);
  background:var(--surface-muted);
  font-size:11.5px; line-height:1.6;
  overflow-x:auto; white-space:pre;
  color:var(--text-secondary);
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
}

/* ================================ OBUNA =============================== */
.sub-card{
  position:relative;
  margin-top:14px;
  padding:17px;
  border-radius:var(--radius-xl);
  background:var(--surface);
  border:1px solid var(--hairline);
  box-shadow:var(--tile-shadow);
  color:var(--text);
}

.sub-head{ display:flex; align-items:center; gap:12px; }

.sub-ico{
  flex:none;
  position:relative;
  display:grid;
  place-items:center;
  width:46px; height:46px;
  border-radius:15px;
  background:var(--ico-soft, var(--surface-muted));
  color:var(--ico, var(--primary));
  overflow:hidden;
}
.sub-ico svg{ width:22px; height:22px; }

.sub-head-text{ flex:1; min-width:0; }
.sub-kicker{ margin:0; font-size:11.5px; font-weight:600; color:var(--text-muted); }
.sub-plan{
  margin:2px 0 0;
  font-size:23px; font-weight:800;
  letter-spacing:-.02em; line-height:1.05;
  color:var(--text);
}
.sub-head .badge{ flex:none; }

.sub-meta{
  display:flex;
  align-items:center;
  gap:7px;
  margin:14px 0 0;
  font-size:13.5px;
  color:var(--text-secondary);
}
.sub-meta b{ font-weight:700; color:var(--text); }
.sub-meta-ico{
  display:flex;
  color:var(--text-muted);
}
.sub-meta-ico svg{ width:14px; height:14px; }

.sub-bar{
  position:relative;
  margin-top:11px;
  height:8px;
  border-radius:var(--radius-pill);
  background:var(--surface-muted);
  overflow:hidden;
}
.sub-bar-fill{
  position:relative;
  height:100%;
  border-radius:var(--radius-pill);
  background:linear-gradient(90deg, #2f7bf6, #5b9bff);
  transition:width .45s cubic-bezier(.22, 1, .3, 1);
  overflow:hidden;
}
.sub-bar-fill::after{
  content:'';
  position:absolute; inset:0;
  background:linear-gradient(90deg,
    transparent 0%, rgba(255,255,255,.42) 50%, transparent 100%);
  transform:translateX(-100%);
  animation:barShine 2.4s ease-in-out infinite;
}
.sub-bar-fill.is-full{ background:linear-gradient(90deg, #ef4444, #f87171); }
@keyframes barShine{
  0%       { transform:translateX(-100%); }
  55%, 100%{ transform:translateX(100%); }
}
html[data-theme="dark"] .sub-bar-fill{ background:linear-gradient(90deg, #3b7bf6, #6ba5ff); }

.sub-remaining{ margin:9px 0 0; font-size:12.5px; color:var(--text-secondary); }
.sub-remaining b{ font-weight:700; color:var(--text); }

.sub-warn{
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin:12px 0 0;
  padding:10px 12px;
  border-radius:var(--radius-sm);
  background:var(--danger-soft);
  color:var(--danger-text);
  font-size:12.5px;
  line-height:1.45;
}
.sub-warn svg{ flex:none; margin-top:1px; width:15px; height:15px; }

/* ------------------------- cardbox (2 ta tugma) ----------------------- */
.cardbox-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.cardbox-grid-single{ grid-template-columns:1fr; }

.cardbox{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:11px;
  padding:16px;
  border-radius:var(--radius-lg);
  background:var(--surface);
  border:1px solid var(--hairline);
  box-shadow:var(--tile-shadow);
  text-align:left;
  transition:transform .14s var(--ease), box-shadow .18s var(--ease);
}
.cardbox:active{ transform:scale(.98); }

.cardbox-ico{
  width:42px; height:42px;
  border-radius:14px;
  display:grid; place-items:center;
  background:var(--ico-soft, var(--surface-muted));
  color:var(--ico, var(--primary));
  transition:background .18s var(--ease), color .18s var(--ease);
}
.cardbox-ico svg{ width:21px; height:21px; }

.cardbox-title{
  font-size:13.5px;
  font-weight:600;
  line-height:1.3;
  color:var(--text);
}
.cardbox-sub{
  font-size:11.5px;
  line-height:1.3;
  color:var(--text-muted);
  margin-top:-5px;
}

/* ====================================================================== */
/* Admin panel kirish tugmasi (faqat admin profilida)                      */
/* ====================================================================== */

.admin-entry{
  display:flex;
  align-items:center;
  gap:13px;
  width:100%;
  padding:15px 16px;
  border-radius:var(--radius-lg);
  border:1px solid rgba(139,92,246,.28);
  background:
    linear-gradient(135deg, rgba(139,92,246,.10) 0%, rgba(99,102,241,.07) 55%, rgba(47,123,246,.06) 100%),
    var(--surface);
  box-shadow:0 4px 16px rgba(139,92,246,.13), var(--tile-shadow);
  text-align:left;
  position:relative;
  overflow:hidden;
  transition:transform .14s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.admin-entry::after{
  content:'';
  position:absolute;
  top:-60%; right:-14%;
  width:190px; height:190px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(139,92,246,.16) 0%, transparent 68%);
  pointer-events:none;
}
.admin-entry:active{
  transform:scale(.982);
  box-shadow:0 2px 9px rgba(139,92,246,.16);
}
html[data-theme="dark"] .admin-entry{
  border-color:rgba(139,92,246,.34);
  box-shadow:0 4px 18px rgba(0,0,0,.34);
}

.admin-entry-ico{
  flex:none;
  display:grid;
  place-items:center;
  width:46px; height:46px;
  border-radius:15px;
  background:linear-gradient(135deg,#8b5cf6,#6366f1);
  color:#fff;
  box-shadow:0 4px 12px rgba(139,92,246,.36);
}
.admin-entry-ico svg{ width:23px; height:23px; }

.admin-entry-text{ flex:1; min-width:0; }
.admin-entry-title{
  display:block;
  font-size:15px;
  font-weight:700;
  letter-spacing:-.015em;
  color:var(--text);
}
.admin-entry-sub{
  display:block;
  margin-top:3px;
  font-size:12px;
  line-height:1.35;
  color:var(--text-muted);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.admin-entry-arrow{
  flex:none;
  display:flex;
  color:#8b5cf6;
  opacity:.75;
  transition:transform .18s var(--ease);
}
.admin-entry:active .admin-entry-arrow{ transform:translateX(2px); }

@media (prefers-reduced-motion: reduce){
  .admin-entry, .admin-entry-arrow{ transition:none; }
}

.ico-blue   { --ico:#2f7bf6; --ico-soft:rgba(47,123,246,.12); }
.ico-green  { --ico:#12b76a; --ico-soft:rgba(18,183,106,.12); }
.ico-amber  { --ico:#f79009; --ico-soft:rgba(247,144,9,.13);  }
.ico-violet { --ico:#8b5cf6; --ico-soft:rgba(139,92,246,.13); }
.ico-pink   { --ico:#ec4899; --ico-soft:rgba(236,72,153,.12); }
.ico-cyan   { --ico:#06b6d4; --ico-soft:rgba(6,182,212,.13);  }

html[data-theme="dark"] .ico-blue   { --ico:#5b9bff; --ico-soft:rgba(91,155,255,.17); }
html[data-theme="dark"] .ico-green  { --ico:#3ddc97; --ico-soft:rgba(61,220,151,.15); }
html[data-theme="dark"] .ico-amber  { --ico:#fbbf24; --ico-soft:rgba(251,191,36,.16); }
html[data-theme="dark"] .ico-violet { --ico:#a78bfa; --ico-soft:rgba(167,139,250,.18); }
html[data-theme="dark"] .ico-pink   { --ico:#f472b6; --ico-soft:rgba(244,114,182,.16); }
html[data-theme="dark"] .ico-cyan   { --ico:#22d3ee; --ico-soft:rgba(34,211,238,.16); }

/* ------------------------------ tariflar ------------------------------ */
.plan-list{ display:flex; flex-direction:column; gap:10px; }

.plan-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  width:100%;
  padding:16px;
  border-radius:var(--radius-lg);
  border:1px solid var(--hairline);
  background:var(--surface);
  text-align:left;
  transition:border-color .16s, transform .14s, background .16s;
}
.plan-row:active{ transform:scale(.99); }
.plan-row.is-current{ border-color:var(--success); background:var(--success-soft); }
.plan-row.is-ultra:not(.is-current){ border-color:rgba(139,92,246,.45); }

.plan-left{ min-width:0; }
.plan-name{ font-size:17px; font-weight:800; letter-spacing:-.01em; }
.plan-hint{ font-size:12.5px; color:var(--text-muted); margin-top:3px; }
.plan-right{ text-align:right; flex:none; }
.plan-price{ font-size:16px; font-weight:700; white-space:nowrap; }
.plan-cur{ font-size:12px; font-weight:600; color:var(--text-muted); }
.plan-right .badge{ margin-top:6px; }

/* ------------------------------- to'lov ------------------------------- */
.pay-rows{
  border-radius:var(--radius-lg);
  border:1px solid var(--hairline);
  background:var(--surface);
  overflow:hidden;
}
.pay-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 16px;
  border-bottom:1px solid var(--hairline);
}
.pay-row:last-child{ border-bottom:none; }
.pay-row[data-copy]{ cursor:pointer; }
.pay-row[data-copy]:active{ background:var(--surface-muted); }
.pay-row.is-highlight{ background:var(--surface-muted); }

.pay-label{ font-size:13px; color:var(--text-secondary); }
.pay-value{
  display:inline-flex; align-items:center; gap:8px;
  font-size:14.5px; font-weight:700;
  font-variant-numeric:tabular-nums;
  text-align:right;
}
.pay-value svg{ color:var(--primary); opacity:.75; }

.pay-note{
  display:flex; align-items:flex-start; gap:9px;
  margin-top:14px;
  padding:12px 14px;
  border-radius:var(--radius-md);
  background:var(--surface-muted);
  font-size:12.5px; line-height:1.5;
  color:var(--text-secondary);
}
.pay-note svg{ flex:none; color:var(--primary); margin-top:1px; }

.pay-total{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px;
  margin-bottom:12px;
  border-radius:var(--radius-lg);
  background:var(--success-soft);
  color:var(--success-text);
  font-size:13.5px;
}
.pay-total b{ font-size:15px; font-weight:700; }

/* ============================ AKKORDION KARTALAR ====================== */
.acc-list{ display:flex; flex-direction:column; gap:10px; }

.acc-card{
  background:var(--surface);
  border:1px solid var(--hairline);
  border-radius:var(--radius-lg);
  overflow:hidden;
}

.acc-card-head{
  display:flex; align-items:center; gap:13px;
  width:100%; text-align:left;
  padding:14px 16px;
  transition:background .15s;
}
.acc-card-head:active{ background:var(--surface-muted); }

.acc-card .acc-arrow{ flex:none; color:var(--hint); transition:transform .25s ease; }
.acc-card.is-open .acc-arrow{ transform:rotate(180deg); }

.acc-card-body{
  max-height:0;
  overflow:hidden;
  transition:max-height .28s cubic-bezier(.4,0,.2,1);
}
.acc-card-inner{ padding:2px 16px 16px; }

/* ---------------------------- 3 ustunli tanlov ------------------------ */
.opt-block{ margin-bottom:16px; }
.opt-block-label{
  margin:0 0 8px;
  font-size:12.5px; font-weight:600;
  color:var(--text-secondary);
}

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

.tri-cell{
  position:relative;
  display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:6px;
  padding:14px 6px 12px;
  border-radius:var(--radius-md);
  border:1px solid var(--hairline);
  background:var(--surface-muted);
  transition:border-color .16s, background .16s, transform .14s;
}
.tri-cell:active{ transform:scale(.97); }

.tri-top{
  display:grid; place-items:center;
  height:22px;
  font-size:13px; font-weight:700;
  color:var(--text-secondary);
  letter-spacing:.04em;
}
.tri-top svg{ width:20px; height:20px; }

.tri-label{
  font-size:11.5px; font-weight:600;
  color:var(--text-secondary);
  text-align:center;
  line-height:1.25;
}

.tri-check{
  position:absolute;
  top:6px; right:6px;
  width:16px; height:16px;
  border-radius:var(--radius-pill);
  display:grid; place-items:center;
  background:var(--primary);
  color:#fff;
  opacity:0;
  transform:scale(.6);
  transition:opacity .16s, transform .16s;
}
.tri-check svg{ width:11px; height:11px; }

.tri-cell.is-active{
  border-color:var(--primary);
  background:var(--surface);
  box-shadow:0 0 0 2px var(--primary-glow);
}
.tri-cell.is-active .tri-top,
.tri-cell.is-active .tri-label{ color:var(--primary); }
.tri-cell.is-active .tri-check{ opacity:1; transform:scale(1); }

/* --------------------------- ichki akkordion -------------------------- */
.sub-acc{ border-bottom:1px solid var(--hairline); }
.sub-acc:last-child{ border-bottom:none; }

.sub-acc-head{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  width:100%; text-align:left;
  padding:13px 2px;
  font-size:13.5px; font-weight:600;
  color:var(--text);
}
.sub-acc-head svg{ flex:none; color:var(--hint); transition:transform .22s ease; }
.sub-acc.is-open .sub-acc-head svg{ transform:rotate(180deg); }

.sub-acc-body{
  display:none;
  padding:0 2px 14px;
  font-size:13px; line-height:1.65;
  color:var(--text-secondary);
}
.sub-acc.is-open .sub-acc-body{ display:block; }
.sub-acc-body p{ margin:0 0 8px; }
.sub-acc-body p:last-child{ margin-bottom:0; }
.sub-acc-body code{
  background:var(--surface-muted);
  padding:2px 6px; border-radius:6px;
  font-size:12px;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
}
.sub-acc-body pre{
  margin:10px 0;
  padding:12px 14px;
  border-radius:var(--radius-sm);
  background:var(--surface-muted);
  font-size:11.5px; line-height:1.6;
  overflow-x:auto; white-space:pre;
  color:var(--text-secondary);
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
}

/* ------------------------------ "tez orada" --------------------------- */
.soon-box{
  display:flex; flex-direction:column; align-items:center; gap:10px;
  padding:26px 16px;
  border-radius:var(--radius-md);
  background:var(--surface-muted);
  text-align:center;
}
.soon-box svg{ color:var(--warning); }
.soon-box p{ margin:0; font-size:13px; color:var(--text-secondary); max-width:16rem; line-height:1.5; }

/* ------------------------------ sahifalash ---------------------------- */
.mt-track{ min-height:60px; }

@keyframes slideInRight{ from{ opacity:0; transform:translateX(22px); } to{ opacity:1; transform:none; } }
@keyframes slideInLeft{  from{ opacity:0; transform:translateX(-22px); } to{ opacity:1; transform:none; } }
.slide-in-right{ animation:slideInRight .24s cubic-bezier(.32,.72,0,1); }
.slide-in-left{  animation:slideInLeft .24s cubic-bezier(.32,.72,0,1); }

.pager{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px;
  margin-top:14px;
}

.pg-btn{
  flex:none;
  width:42px; height:42px;
  border-radius:var(--radius-md);
  display:grid; place-items:center;
  background:var(--surface-muted);
  border:1px solid var(--hairline);
  color:var(--primary);
  transition:.15s;
}
.pg-btn:active{ transform:scale(.94); }
.pg-btn[disabled]{ opacity:.35; pointer-events:none; color:var(--text-muted); }

.pg-dots{ display:flex; align-items:center; gap:7px; }
.pg-dot{
  width:8px; height:8px;
  border-radius:var(--radius-pill);
  background:var(--hint);
  opacity:.45;
  transition:.2s;
}
.pg-dot.is-active{
  width:22px;
  background:var(--primary);
  opacity:1;
}

.icon-btn{
  flex:none;
  width:32px; height:32px;
  border-radius:10px;
  display:grid; place-items:center;
  background:var(--danger-soft);
  color:var(--danger-text);
  transition:.15s;
}
.icon-btn:active{ transform:scale(.92); }
.icon-btn[disabled]{ opacity:.4; pointer-events:none; }

.prof-card{
  display:flex; align-items:center; gap:15px;
  background:var(--surface);
  border-radius:var(--radius-xl);
  padding:20px;
  box-shadow:var(--tile-shadow);
}
.prof-ava{
  flex:none;
  width:60px; height:60px;
  border-radius:var(--radius-pill);
  overflow:hidden;
  background:linear-gradient(140deg, var(--primary), var(--primary-strong));
  display:grid; place-items:center;
  color:#fff;
  box-shadow:0 6px 18px var(--primary-glow);
}
.prof-ava img{ width:100%; height:100%; object-fit:cover; }
.prof-ava svg{ width:26px; height:26px; }
.prof-name{
  display:flex;
  align-items:center;
  margin:0;
  max-width:13.5rem;
  font-size:17px; font-weight:700; letter-spacing:-.01em;
}
.prof-name-text{
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.prof-user{ margin:3px 0 0; font-size:13px; color:var(--text-muted); }
.id-btn{
  margin-top:9px;
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 12px;
  border-radius:var(--radius-pill);
  font-size:12px; font-weight:600;
  background:var(--surface-muted);
  color:var(--text-secondary);
}
.id-btn svg{ width:13px; height:13px; }
.id-btn:active{ transform:scale(.97); }

/* ====================================================================== */
/* Bayroqlar                                                               */
/* ====================================================================== */

.flag{
  display:inline-flex;
  width:24px;
  height:16px;
  border-radius:3px;
  overflow:hidden;
  box-shadow:0 0 0 1px var(--hairline), 0 1px 2px rgba(16,24,48,.14);
}
.flag svg{ display:block; width:100%; height:100%; }
.tri-cell .flag{ margin-bottom:2px; }

/* ====================================================================== */
/* Qulflangan satr + eslatma                                               */
/* ====================================================================== */

.list-row.is-locked{
  opacity:.6;
  cursor:default;
  pointer-events:none;
}
.list-row.is-locked .row-right{ color:var(--text-muted); }

.hint-note{
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin:10px 2px 0;
  font-size:12.5px;
  line-height:1.45;
  color:var(--text-muted);
}
.hint-note svg{
  flex:none;
  margin-top:1px;
  width:15px; height:15px;
  opacity:.85;
}

/* ====================================================================== */
/* Imtihon: tartib tanlash                                                 */
/* ====================================================================== */

.order-grid{
  display:grid;
  gap:10px;
  margin-bottom:4px;
}
.order-cell{
  display:flex; align-items:center; gap:12px;
  width:100%;
  padding:13px 14px;
  border:1.5px solid transparent;
  border-radius:var(--radius-md);
  background:var(--surface-muted);
  color:var(--text);
  text-align:left;
  font-family:inherit;
  cursor:pointer;
  transition:border-color .18s var(--ease), background .18s var(--ease), transform .12s var(--ease);
}
.order-cell:active{ transform:scale(.985); }
.order-cell.is-active{
  border-color:var(--primary);
  background:color-mix(in srgb, var(--primary) 9%, var(--surface));
}
.order-ico{
  display:grid;
  place-items:center;
  flex:none;
  width:36px; height:36px;
  border-radius:12px;
  background:var(--surface);
  color:var(--text-secondary);
  transition:background .18s var(--ease), color .18s var(--ease);
}
.order-cell.is-active .order-ico{
  background:var(--primary);
  color:#fff;
}
.order-body{ display:block; flex:1; min-width:0; }
.order-title{
  display:block;
  font-size:14.5px; font-weight:600;
  letter-spacing:-.01em;
}
.order-hint{
  display:block;
  margin-top:2px;
  font-size:12px;
  line-height:1.35;
  color:var(--text-muted);
}
.order-check{
  display:grid;
  place-items:center;
  flex:none;
  width:22px; height:22px;
  border-radius:50%;
  background:var(--primary);
  color:#fff;
  opacity:0;
  transform:scale(.7);
  transition:opacity .18s var(--ease), transform .18s var(--ease);
}
.order-cell.is-active .order-check{ opacity:1; transform:scale(1); }

/* ====================================================================== */
/* Hujjat matni                                                            */
/* ====================================================================== */

.doc-body{
  max-height:min(62vh, 520px);
  overflow-y:auto;
  padding-right:4px;
  -webkit-overflow-scrolling:touch;
  font-size:14px;
  line-height:1.6;
  color:var(--text-secondary);
}
.doc-body h3{
  margin:18px 0 6px;
  font-size:14.5px;
  font-weight:700;
  letter-spacing:-.01em;
  color:var(--text);
}
.doc-body h3:first-child{ margin-top:2px; }
.doc-body p{ margin:0 0 10px; }
.doc-body b{ color:var(--text); font-weight:600; }
.doc-body code{
  padding:1px 5px;
  border-radius:6px;
  background:var(--surface-muted);
  color:var(--text);
  font-family:ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size:12.5px;
}
.doc-body pre{
  margin:8px 0 12px;
  padding:12px 14px;
  border-radius:var(--radius-sm);
  background:var(--surface-muted);
  color:var(--text);
  font-family:ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size:12px;
  line-height:1.55;
  white-space:pre-wrap;
  overflow-x:auto;
}
.doc-body::-webkit-scrollbar{ width:4px; }
.doc-body::-webkit-scrollbar-thumb{
  border-radius:4px;
  background:var(--hairline);
}

.locked-tag{
  margin-right:7px;
  font-size:11.5px;
  font-weight:500;
  color:var(--text-muted);
}

.list-row.is-locked .row-body{ min-width:0; }
.list-row.is-locked .row-right{
  flex:none;
  display:flex;
  align-items:center;
  white-space:nowrap;
}
.locked-tag{ white-space:nowrap; }

/* ====================================================================== */
/* Tarif ikonkalari                                                        */
/* ====================================================================== */

.plan-row{ gap:13px; }

.plan-ico{
  flex:none;
  display:grid;
  place-items:center;
  width:44px; height:44px;
  border-radius:14px;
  background:var(--ico-soft, var(--surface-muted));
  color:var(--ico, var(--primary));
  overflow:hidden;
}
.plan-ico svg{ width:21px; height:21px; }

.anim-pulse svg{ animation:planPulse 2.4s ease-in-out infinite; }
@keyframes planPulse{
  0%, 100% { transform:scale(1);    opacity:.85; }
  50%      { transform:scale(1.14); opacity:1; }
}

.anim-launch svg{ animation:planLaunch 2.6s ease-in-out infinite; }
@keyframes planLaunch{
  0%, 100%  { transform:translate(0, 0) rotate(0deg); }
  35%       { transform:translate(2px, -3px) rotate(-6deg); }
  70%       { transform:translate(-1px, 1px) rotate(3deg); }
}

.anim-loop{ position:relative; }
.anim-loop .plan-ico-base,
.anim-loop .plan-ico-run{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
}
.anim-loop .plan-ico-base{ opacity:.3; }
.anim-loop .plan-ico-run svg{
  stroke-dasharray:14 46;
  animation:planLoop 2.8s linear infinite;
}
@keyframes planLoop{
  from { stroke-dashoffset:60; }
  to   { stroke-dashoffset:0; }
}

.plan-row.is-current .plan-ico{ box-shadow:0 0 0 1.5px var(--ico, var(--primary)) inset; }

@media (prefers-reduced-motion: reduce){
  .anim-pulse svg, .anim-launch svg, .anim-loop .plan-ico-run svg{ animation:none; }
  .anim-loop .plan-ico-run svg{ stroke-dasharray:none; }
  .anim-loop .plan-ico-base{ opacity:0; }
}

/* ====================================================================== */
/* Ulashish oynasi                                                         */
/* ====================================================================== */

.share-done{
  display:grid;
  place-items:center;
  width:64px; height:64px;
  margin:2px auto 14px;
  border-radius:50%;
  background:var(--success-soft);
  color:var(--success);
  animation:sharePop .34s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes sharePop{
  from { transform:scale(.4); opacity:0; }
  to   { transform:scale(1);  opacity:1; }
}

.share-box{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:16px;
  padding:13px 14px;
  border-radius:var(--radius-md);
  background:var(--surface-muted);
  border:1px dashed var(--hairline);
  cursor:pointer;
  transition:border-color .16s var(--ease), background .16s var(--ease);
}
.share-box:active{ border-color:var(--primary); }

.share-url{
  flex:1;
  min-width:0;
  font-size:12.5px;
  line-height:1.4;
  color:var(--text);
  word-break:break-all;
  font-family:ui-monospace, SFMono-Regular, Menlo, monospace;
}
.share-copy{
  flex:none;
  display:grid;
  place-items:center;
  width:32px; height:32px;
  border-radius:10px;
  background:var(--surface);
  color:var(--primary);
}

@media (prefers-reduced-motion: reduce){
  .share-done{ animation:none; }
}

/* ====================================================================== */
/* Kontakt ulashish                                                        */
/* ====================================================================== */

.prof-phone{
  display:flex;
  align-items:center;
  gap:6px;
  margin:7px 0 0;
  font-size:12.5px;
  color:var(--text-secondary);
}
.prof-phone svg{ width:13px; height:13px; color:var(--text-muted); }

.contact-cta{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  padding:13px 15px;
  border-radius:var(--radius-lg);
  background:var(--surface);
  border:1px solid var(--hairline);
  box-shadow:var(--tile-shadow);
  text-align:left;
  transition:transform .14s var(--ease), opacity .18s var(--ease);
}
.contact-cta:active{ transform:scale(.985); }
.contact-cta:disabled{ cursor:default; }
.contact-cta.is-busy{ opacity:.6; }

.contact-ico{
  flex:none;
  display:grid;
  place-items:center;
  width:38px; height:38px;
  border-radius:13px;
  background:rgba(18,183,106,.12);
  color:#12b76a;
}
html[data-theme="dark"] .contact-ico{
  background:rgba(61,220,151,.15);
  color:#3ddc97;
}
.contact-cta.is-busy .contact-ico{ animation:contactPing 1.1s ease-in-out infinite; }
@keyframes contactPing{
  0%, 100% { transform:scale(1);    opacity:.75; }
  50%      { transform:scale(1.08); opacity:1; }
}

.contact-body{ flex:1; min-width:0; }
.contact-title{
  display:block;
  font-size:14px; font-weight:600;
  letter-spacing:-.01em;
  color:var(--text);
}
.contact-sub{
  display:block;
  margin-top:2px;
  font-size:12px;
  line-height:1.3;
  color:var(--text-muted);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.contact-arrow{ flex:none; color:var(--hint); display:flex; }

@media (prefers-reduced-motion: reduce){
  .contact-cta.is-busy .contact-ico{ animation:none; }
}

/* ====================================================================== */
/* Bosh sahifa: salomlashish kartasi                                       */
/* ====================================================================== */

.welcome{
  margin-bottom:14px;
  padding:17px;
  border-radius:var(--radius-xl);
  background:var(--surface);
  border:1px solid var(--hairline);
  box-shadow:var(--tile-shadow);
}
.welcome-top{
  display:flex;
  align-items:center;
  gap:12px;
}
.welcome-text{ flex:1; min-width:0; }
.welcome-title{
  margin:2px 0 0;
  font-size:21px;
  font-weight:800;
  letter-spacing:-.02em;
  line-height:1.2;
  color:var(--text);
}
.welcome-sub{
  margin:11px 0 0;
  font-size:13.5px;
  line-height:1.45;
  color:var(--text-secondary);
}
.welcome-ico{
  flex:none;
  display:grid;
  place-items:center;
  width:48px; height:48px;
  border-radius:16px;
  background:var(--ico-soft, var(--surface-muted));
  color:var(--ico, var(--primary));
}
.welcome-ico svg{ width:24px; height:24px; }

.stat-ico{
  background:var(--ico-soft, var(--surface-muted));
  color:var(--ico, var(--primary));
}

.mini-stats{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:8px;
  text-align:center;
}
.mini-stat{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:3px;
}
.mini-stat + .mini-stat{ border-left:1px solid var(--hairline); }
.mini-ico{
  display:grid;
  place-items:center;
  width:28px; height:28px;
  margin-bottom:2px;
  border-radius:99px;
  background:var(--ico-soft, var(--surface-muted));
  color:var(--ico, var(--primary));
}
.mini-ico svg{ width:15px; height:15px; }
.mini-val{ font-size:17px; font-weight:700; letter-spacing:-.01em; }

/* ====================================================================== */
/* Kalit (switch)                                                          */
/* ====================================================================== */

.switch-row{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 13px;
  border-radius:var(--radius-md);
  background:var(--surface-muted);
}
.switch-ico{
  flex:none;
  display:grid;
  place-items:center;
  width:38px; height:38px;
  border-radius:13px;
  background:var(--ico-soft, var(--surface));
  color:var(--ico, var(--primary));
}
.switch-body{ flex:1; min-width:0; }
.switch-title{
  display:block;
  font-size:14px; font-weight:600;
  letter-spacing:-.01em;
  color:var(--text);
}
.switch-sub{
  display:block;
  margin-top:2px;
  font-size:12px;
  line-height:1.3;
  color:var(--text-muted);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.switch{
  flex:none;
  position:relative;
  width:50px; height:30px;
  border-radius:var(--radius-pill);
  background:var(--hairline);
  border:1px solid transparent;
  cursor:pointer;
  transition:background .26s cubic-bezier(.4, 0, .2, 1);
}
html[data-theme="dark"] .switch{ background:rgba(255,255,255,.14); }
.switch.is-on{ background:var(--primary); }

.switch-knob{
  position:absolute;
  top:3px; left:3px;
  width:22px; height:22px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 2px 6px rgba(16,24,48,.28);
  transition:transform .26s cubic-bezier(.22, 1, .3, 1);
}
.switch.is-on .switch-knob{ transform:translateX(20px); }
.switch:active .switch-knob{ width:25px; }

/* ====================================================================== */
/* Ikonka animatsiyalari                                                   */
/* ====================================================================== */

.anim-wave svg{
  transform-origin:70% 80%;
  animation:icoWave 2.8s ease-in-out infinite;
}
@keyframes icoWave{
  0%, 62%, 100% { transform:rotate(0deg); }
  68%           { transform:rotate(13deg); }
  74%           { transform:rotate(-8deg); }
  80%           { transform:rotate(11deg); }
  86%           { transform:rotate(-5deg); }
}

.anim-stack svg{ animation:icoStack 2.6s ease-in-out infinite; }
@keyframes icoStack{
  0%, 100% { transform:translateY(0); }
  50%      { transform:translateY(-2.5px); }
}

.anim-target svg{ animation:icoTarget 2.8s ease-in-out infinite; }
@keyframes icoTarget{
  0%, 70%, 100% { transform:scale(1); }
  80%           { transform:scale(.86); }
  90%           { transform:scale(1.07); }
}

.anim-flame svg{
  transform-origin:50% 90%;
  animation:icoFlame 1.7s ease-in-out infinite;
}
@keyframes icoFlame{
  0%, 100% { transform:scale(1) rotate(0deg); }
  30%      { transform:scale(1.07, .96) rotate(-3deg); }
  65%      { transform:scale(.96, 1.06) rotate(3deg); }
}

.anim-medal svg{
  transform-origin:50% 15%;
  animation:icoMedal 3.2s ease-in-out infinite;
}
@keyframes icoMedal{
  0%, 70%, 100% { transform:rotate(0deg); }
  78%           { transform:rotate(-7deg); }
  86%           { transform:rotate(6deg); }
  93%           { transform:rotate(-3deg); }
}

.anim-tick svg{
  transform-origin:50% 50%;
  animation:icoTick 2.4s cubic-bezier(.4, 0, .2, 1) infinite;
}
@keyframes icoTick{
  0%, 55%, 100% { transform:scale(1);    opacity:.9; }
  70%           { transform:scale(1.11); opacity:1; }
}

.anim-spark svg{ animation:icoSpark 2.2s ease-in-out infinite; }
@keyframes icoSpark{
  0%, 100% { transform:scale(1) rotate(0deg);    opacity:.85; }
  45%      { transform:scale(1.12) rotate(9deg); opacity:1; }
}

/* ====================================================================== */
/* Animatsiyalarni o'chirish                                               */
/* ====================================================================== */

html.anim-off .anim-wave svg,
html.anim-off .anim-stack svg,
html.anim-off .anim-target svg,
html.anim-off .anim-flame svg,
html.anim-off .anim-medal svg,
html.anim-off .anim-tick svg,
html.anim-off .anim-spark svg,
html.anim-off .anim-pulse svg,
html.anim-off .anim-launch svg,
html.anim-off .anim-loop .plan-ico-run svg,
html.anim-off .contact-cta.is-busy .contact-ico,
html.anim-off .sub-bar-fill::after{
  animation:none !important;
  transform:none !important;
}
html.anim-off .anim-loop .plan-ico-base{ opacity:0; }
html.anim-off .anim-loop .plan-ico-run svg{ stroke-dasharray:none; }

/* ====================================================================== */
/* Telegram Premium galochkasi                                             */
/* ====================================================================== */

.premium-tick{
  display:inline-flex;
  vertical-align:-2px;
  margin-left:5px;
  color:#2f7bf6;
  flex:none;
}
html[data-theme="dark"] .premium-tick{ color:#5b9bff; }

.premium-tick svg{
  width:1em; height:1em;
  fill:currentColor;
  stroke:currentColor;
  stroke-width:1.6;
}
.premium-tick svg path:last-child{
  fill:none;
  stroke:var(--surface);
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.ident-fio .premium-tick svg path:last-child{ stroke:var(--bg); }

.anim-tilt svg{
  transform-origin:50% 55%;
  animation:tickTilt 3.4s ease-in-out infinite;
}
@keyframes tickTilt{
  0%, 58%, 100% { transform:rotate(0deg)   scale(1); }
  66%           { transform:rotate(-11deg) scale(1.06); }
  74%           { transform:rotate(9deg)   scale(1.06); }
  82%           { transform:rotate(-5deg)  scale(1.02); }
  90%           { transform:rotate(2deg)   scale(1); }
}

html.anim-off .anim-tilt svg{
  animation:none !important;
  transform:none !important;
}

/* ====================================================================== */
/* Mavzulashtirilgan testlar                                               */
/* ====================================================================== */

.back-link{
  display:inline-flex;
  align-items:center;
  gap:5px;
  margin-bottom:14px;
  padding:7px 13px 7px 9px;
  border-radius:var(--radius-pill);
  background:var(--surface);
  border:1px solid var(--hairline);
  font-size:13px;
  font-weight:600;
  color:var(--text-secondary);
  transition:transform .14s var(--ease);
}
.back-link:active{ transform:scale(.97); }
.back-link svg{ width:17px; height:17px; }

.topics-head{ margin-bottom:14px; }
.page-title{
  margin:0;
  font-size:22px;
  font-weight:800;
  letter-spacing:-.02em;
  line-height:1.2;
  color:var(--text);
}
.page-sub{
  margin:6px 0 0;
  font-size:13px;
  line-height:1.45;
  color:var(--text-secondary);
}

.topics-progress{ padding:14px 15px; margin-bottom:16px; }
.tp-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:2px;
}
.tp-ico{
  flex:none;
  display:grid;
  place-items:center;
  width:32px; height:32px;
  border-radius:11px;
  background:var(--ico-soft, var(--surface-muted));
  color:var(--ico, var(--primary));
}
.tp-text{ flex:1; min-width:0; font-size:13px; color:var(--text-secondary); }
.tp-stars{
  flex:none;
  font-size:13px;
  font-weight:700;
  color:var(--text);
  font-variant-numeric:tabular-nums;
}

.topic-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(104px, 1fr));
  gap:11px;
}

.topic-card{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  aspect-ratio:1 / 1;
  padding:10px 8px;
  border-radius:22px;
  background:var(--surface);
  border:1px solid var(--hairline);
  box-shadow:var(--tile-shadow);
  transition:transform .14s var(--ease), border-color .18s var(--ease),
             box-shadow .18s var(--ease);
}
.topic-card:active{ transform:scale(.96); }
.topic-card.is-done{ border-color:rgba(18,183,106,.4); }
html[data-theme="dark"] .topic-card.is-done{ border-color:rgba(61,220,151,.35); }

.topic-card.is-busy{ opacity:.55; pointer-events:none; }
.topic-card.is-busy::after{
  content:'';
  position:absolute;
  width:22px; height:22px;
  border-radius:50%;
  border:2px solid var(--hairline);
  border-top-color:var(--primary);
  animation:spin .7s linear infinite;
}
.topic-card.is-busy > *{ opacity:.25; }

.topic-num{
  font-size:26px;
  font-weight:800;
  letter-spacing:-.03em;
  line-height:1;
  color:var(--text);
}
.topic-count{
  font-size:10.5px;
  color:var(--text-muted);
  line-height:1.2;
}

.topic-stars{
  display:flex;
  gap:1px;
  margin-top:4px;
}
.star{ display:flex; line-height:0; }
.star svg{
  width:13px; height:13px;
  stroke:none;
}

.star.is-empty svg{ fill:var(--hairline); }
html[data-theme="dark"] .star.is-empty svg{ fill:rgba(255,255,255,.14); }

.star.is-full svg{ fill:#f5b301; }

.star.is-half{ position:relative; }
.star.is-half svg{ fill:var(--hairline); }
html[data-theme="dark"] .star.is-half svg{ fill:rgba(255,255,255,.14); }
.star.is-half::after{
  content:'';
  position:absolute;
  inset:0;
  width:50%;
  overflow:hidden;
  background:#f5b301;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6l2.9 5.88 6.5.95-4.7 4.58 1.11 6.47L12 17.43l-5.81 3.05 1.11-6.47-4.7-4.58 6.5-.95z'/%3E%3C/svg%3E") 0 0 / 13px 13px no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6l2.9 5.88 6.5.95-4.7 4.58 1.11 6.47L12 17.43l-5.81 3.05 1.11-6.47-4.7-4.58 6.5-.95z'/%3E%3C/svg%3E") 0 0 / 13px 13px no-repeat;
}

.topic-best{
  margin-top:2px;
  font-size:11px;
  font-weight:700;
  color:#12b76a;
}
html[data-theme="dark"] .topic-best{ color:#3ddc97; }
.topic-best.is-empty{
  font-weight:500;
  color:var(--text-muted);
}

/* ====================================================================== */
/* Scroll rejimi                                                           */
/* ====================================================================== */

.quiz-bar.is-sticky{
  position:sticky;
  top:0;
  z-index:20;
  margin-inline:calc(-1 * var(--pad));
  padding-inline:var(--pad);
  padding-block:10px;
  background:var(--nav, var(--bg));
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.quiz-subject{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:12rem;
}

.q-list{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:14px;
}
.q-list-tail{ height:72px; }

.q-item{
  padding:16px;
  border-radius:var(--radius-lg);
  background:var(--surface);
  border:1px solid var(--hairline);
  box-shadow:var(--tile-shadow);
  scroll-margin-top:84px;
  transition:border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.q-item.is-answered{ border-color:rgba(47,123,246,.32); }
html[data-theme="dark"] .q-item.is-answered{ border-color:rgba(91,155,255,.3); }

.q-item.is-flash{
  border-color:#f79009;
  box-shadow:0 0 0 3px rgba(247,144,9,.16);
  animation:qFlash 1.4s ease-out;
}
@keyframes qFlash{
  0%, 60% { box-shadow:0 0 0 3px rgba(247,144,9,.22); }
  100%    { box-shadow:0 0 0 0 rgba(247,144,9,0); }
}

.q-item-head{
  display:flex;
  align-items:center;
  gap:6px;
  margin-bottom:10px;
}
.q-num{
  display:grid;
  place-items:center;
  min-width:26px; height:26px;
  padding:0 7px;
  border-radius:99px;
  background:var(--surface-muted);
  font-size:13px; font-weight:700;
  color:var(--text);
}
.q-total{ font-size:11.5px; color:var(--text-muted); }
.q-mark{
  margin-left:auto;
  display:grid;
  place-items:center;
  width:22px; height:22px;
  border-radius:50%;
  background:var(--primary);
  color:#fff;
  opacity:0;
  transform:scale(.6);
  transition:opacity .2s var(--ease), transform .2s var(--ease);
}
.q-item.is-answered .q-mark{ opacity:1; transform:scale(1); }
.q-mark svg{ width:14px; height:14px; }

.q-item .q-text{
  margin:0 0 12px;
  font-size:15px;
  font-weight:600;
  line-height:1.5;
  word-break:break-word;
}
.opt-list{ display:flex; flex-direction:column; gap:8px; }
.opt-list .opt{ margin-bottom:0; }

/* ====================================================================== */
/* Yakunlash modali                                                        */
/* ====================================================================== */

.finish-ico{
  display:grid;
  place-items:center;
  width:62px; height:62px;
  margin:2px auto 14px;
  border-radius:50%;
  background:var(--ico-soft, var(--surface-muted));
  color:var(--ico, var(--primary));
  animation:sharePop .34s cubic-bezier(.34,1.56,.64,1) both;
}
html.anim-off .finish-ico{ animation:none; }

.miss-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(46px, 1fr));
  gap:8px;
  margin-top:16px;
  max-height:184px;
  overflow-y:auto;
  padding:2px;
}
.miss-chip{
  display:grid;
  place-items:center;
  aspect-ratio:1 / 1;
  border-radius:14px;
  background:var(--danger-soft);
  color:var(--danger-text);
  border:1px solid transparent;
  font-size:14px;
  font-weight:700;
  transition:transform .14s var(--ease), border-color .16s var(--ease);
}
.miss-chip:active{ transform:scale(.94); }
.miss-chip:hover{ border-color:var(--danger); }

.res-stars{
  display:flex;
  align-items:center;
  gap:2px;
  margin-top:7px;
}
.res-stars .star svg{ width:15px; height:15px; }
.res-stars .star.is-half::after{
  -webkit-mask-size:15px 15px;
          mask-size:15px 15px;
}
.res-stars-val{
  margin-left:6px;
  font-size:12.5px;
  font-weight:700;
  color:var(--text-secondary);
  font-variant-numeric:tabular-nums;
}

.res-stat-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:8px;
}
.res-stat-grid .stat-lab{ font-size:10.5px; line-height:1.25; }
.skip-val{ color:#8a5a2b; }
html[data-theme="dark"] .skip-val{ color:#d3a06a; }

/* ====================================================================== */
/* QUIZ REJIMI                                                             */
/* ====================================================================== */

.quiz-live{
  position:relative;
  min-height:60vh;
  padding-bottom:calc(max(env(safe-area-inset-bottom), 16px) + 60px);
}

.quiz-score{
  display:inline-flex; align-items:center; gap:6px;
  padding:7px 13px; border-radius:var(--radius-pill);
  background:var(--success-soft); color:var(--success-text);
  font-weight:700; font-size:13px; white-space:nowrap;
}

.qtimer-wrap{
  height:6px; margin-top:12px;
  background:var(--surface-muted); border-radius:999px; overflow:hidden;
}
.qtimer-bar{
  height:100%; width:100%; border-radius:999px;
  background:linear-gradient(90deg, var(--primary), #2d9ff0);
  transition:width .25s linear, background .3s var(--ease);
  will-change:width;
}
.qtimer-bar.is-danger{ background:linear-gradient(90deg, var(--danger), #ff7a7a); }

.qtimer-row{
  display:flex; align-items:baseline; gap:6px;
  margin:8px 0 2px; justify-content:center;
}
.qtimer-num{
  font-size:22px; font-weight:800; color:var(--text);
  font-variant-numeric:tabular-nums; transition:color .25s var(--ease);
  min-width:2.1ch; text-align:right;
}
.qtimer-num.is-danger{ color:var(--danger); }
.qtimer-lab{ font-size:12px; color:var(--text-muted); }

.quiz-card{
  margin-top:12px;
  contain:layout paint style;
}
.quiz-card.is-enter{ animation:quizIn .26s var(--ease) both; }
@keyframes quizIn{
  from{ opacity:0; transform:translateY(10px) scale(.99); }
  to{ opacity:1; transform:none; }
}
.q-counter{
  margin:0 0 6px; font-size:12px; font-weight:600;
  color:var(--text-muted); letter-spacing:.02em;
}

.quiz-card .opt{
  position:relative;
  transition:background .2s var(--ease), color .2s var(--ease), transform .18s var(--ease);
  contain:paint;
}
.quiz-card .opt:disabled{ cursor:default; }
.quiz-card .opt.is-picked{ background:var(--surface-muted); }

.quiz-card .opt.is-correct{
  background:var(--success-soft); color:var(--success-text);
  animation:optPop .32s var(--ease);
}
.quiz-card .opt.is-correct .opt-key{ background:var(--success); color:#fff; }

.quiz-card .opt.is-wrong{
  background:var(--danger-soft); color:var(--danger-text);
  animation:optShake .34s var(--ease);
}
.quiz-card .opt.is-wrong .opt-key{ background:var(--danger); color:#fff; }

.opt-mark{
  margin-left:auto; flex:0 0 auto;
  width:18px; text-align:center; line-height:1;
}
/* Avatar bloki bo'lsa — u chap tarafga suradi, nishon esa oxirida qoladi */
.opt-picks.is-on ~ .opt-mark{ margin-left:8px; }
.quiz-card .opt.is-correct .opt-mark::after{ content:'✓'; font-weight:800; }
.quiz-card .opt.is-wrong .opt-mark::after{ content:'✕'; font-weight:800; }

@keyframes optPop{
  0%{ transform:scale(1); } 45%{ transform:scale(1.035); } 100%{ transform:scale(1); }
}
@keyframes optShake{
  0%,100%{ transform:translateX(0); }
  20%{ transform:translateX(-7px); } 40%{ transform:translateX(6px); }
  60%{ transform:translateX(-4px); } 80%{ transform:translateX(3px); }
}

.quiz-foot{
  min-height:56px; margin-top:14px; margin-bottom:40px;
  contain:layout paint style;
}
.quiz-verdict{
  display:flex; align-items:center; justify-content:center; gap:8px;
  padding:11px 16px; border-radius:var(--radius-md);
  font-weight:700; font-size:14px;
  animation:quizIn .22s var(--ease) both;
}
.quiz-verdict.is-ok{ background:var(--success-soft); color:var(--success-text); }
.quiz-verdict.is-bad{ background:var(--danger-soft); color:var(--danger-text); }

.confetti-layer{
  position:fixed; inset:0; pointer-events:none; z-index:60; overflow:hidden;
  contain:strict;
}
.confetti-bit{
  position:absolute; top:-14px; width:9px; height:9px; border-radius:2px;
  opacity:0; animation:confettiFly 1.25s cubic-bezier(.25,.6,.35,1) forwards;
}
@keyframes confettiFly{
  0%{ opacity:0; transform:translate3d(0, 0, 0) rotate(0) scale(.7); }
  12%{ opacity:1; }
  80%{ opacity:1; }
  100%{
    opacity:0;
    transform:translate3d(var(--dx,0), 104vh, 0) rotate(var(--rot,360deg)) scale(1);
  }
}

html.anim-off .quiz-card.is-enter,
html.anim-off .quiz-card .opt.is-correct,
html.anim-off .quiz-card .opt.is-wrong,
html.anim-off .quiz-verdict{ animation:none; }
html.anim-off .confetti-layer{ display:none; }

@media (prefers-reduced-motion: reduce){
  .quiz-card.is-enter, .quiz-verdict,
  .quiz-card .opt.is-correct, .quiz-card .opt.is-wrong{ animation:none; }
  .confetti-layer{ display:none; }
}

.topics-mode-note{
  display:flex; align-items:center; gap:6px;
  margin-top:6px; color:var(--primary); font-weight:600;
}
.topics-mode-note svg{ flex:0 0 auto; }

.sub-card.is-premium{
  background:
    linear-gradient(135deg, rgba(245,179,1,.16), rgba(245,179,1,.04)),
    var(--surface);
  border-color:rgba(245,179,1,.4);
}
.sub-card.is-premium .sub-plan{
  background:linear-gradient(96deg,#f5b301,#f97316);
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent;
}
html[data-theme="dark"] .sub-card.is-premium{
  background:
    linear-gradient(135deg, rgba(245,179,1,.2), rgba(245,179,1,.05)),
    var(--surface);
  border-color:rgba(245,179,1,.34);
}

/* ====================================================================== */
/* Testlar: qidiruv                                                        */
/* ====================================================================== */

.search-row{ display:flex; gap:8px; align-items:stretch; }
.search-row .search-wrap{ margin:0; }
.search-row .btn{ padding-inline:14px; }

/* ====================================================================== */
/* Mening testlarim                                                        */
/* ====================================================================== */

.mt-card{
  background:var(--surface);
  border:1px solid var(--hairline);
  border-radius:var(--radius-lg);
  padding:12px;
  margin-bottom:10px;
}
.mt-card-head{ display:flex; align-items:center; gap:11px; }
.mt-card-head .row-body{ min-width:0; flex:1; }
.mt-card-head .row-sub{
  display:flex; align-items:center; gap:4px; flex-wrap:wrap;
}
.mt-card-head .row-sub svg{ opacity:.7; }

.mt-code{
  display:inline-flex; align-items:center; gap:6px;
  margin-top:10px; padding:6px 11px;
  background:var(--surface-muted); border-radius:var(--radius-pill);
  font-size:12.5px; font-weight:700; letter-spacing:.06em;
  color:var(--primary); cursor:pointer; user-select:all;
  transition:background .18s var(--ease);
}
.mt-code:active{ background:var(--hairline); }

.mt-actions{ display:flex; gap:8px; margin-top:11px; flex-wrap:wrap; }
.mt-act{
  flex:1 1 0; min-width:96px;
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:9px 10px; border:0; border-radius:var(--radius-md);
  background:var(--surface-muted); color:var(--text);
  font-size:12.5px; font-weight:650; font-family:inherit; cursor:pointer;
  transition:transform .16s var(--ease), background .18s var(--ease);
}
.mt-act:active{ transform:scale(.97); }
.mt-act.is-primary{ background:var(--primary); color:#fff; }

/* ====================================================================== */
/* Test statistikasi modali                                                 */
/* ====================================================================== */

.ts-head{ display:flex; align-items:center; gap:11px; margin-bottom:14px; }
.ts-head .row-body{ min-width:0; }

.ts-grid{
  display:grid; grid-template-columns:repeat(4, 1fr); gap:8px;
}
.ts-grid .stat-lab{ font-size:10.5px; line-height:1.25; }

.top-list{ display:flex; flex-direction:column; gap:8px; }
.top-row{
  display:flex; align-items:center; gap:11px;
  padding:10px 12px; border-radius:var(--radius-md);
  background:var(--surface-muted);
}
.top-row.is-me{
  background:rgba(47,123,246,.1);
  box-shadow:inset 0 0 0 1px rgba(47,123,246,.28);
}
.top-place{
  flex:0 0 auto; width:26px; height:26px; border-radius:50%;
  display:grid; place-items:center;
  font-size:12.5px; font-weight:800;
  background:var(--surface); color:var(--text-secondary);
}
.top-place.ico-amber{ background:rgba(245,179,1,.18); color:#b8860b; }
.top-place.ico-slate{ background:rgba(148,163,184,.22); color:#64748b; }
.top-place.ico-bronze{ background:rgba(180,110,60,.18); color:#a0522d; }
.top-body{ flex:1; min-width:0; }
.top-name{
  font-size:13.5px; font-weight:650; color:var(--text);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.top-you{
  font-size:10.5px; font-weight:700; color:var(--primary);
  padding:1px 6px; border-radius:var(--radius-pill);
  background:rgba(47,123,246,.14);
}
.top-sub{ font-size:11.5px; color:var(--text-muted); margin-top:1px; }
.top-pct{
  flex:0 0 auto; font-size:14px; font-weight:800; color:var(--ok);
  font-variant-numeric:tabular-nums;
}

.ts-link{
  display:flex; align-items:center; gap:7px;
  padding:11px 13px; border-radius:var(--radius-md);
  background:var(--surface-muted); cursor:pointer;
  font-size:12px; color:var(--text-secondary);
  word-break:break-all; line-height:1.4;
}
.ts-link svg{ flex:0 0 auto; color:var(--primary); }

html[data-theme="dark"] .top-place.ico-amber{ color:#f5b301; }
html[data-theme="dark"] .top-place.ico-slate{ color:#cbd5e1; }
html[data-theme="dark"] .top-place.ico-bronze{ color:#d69b6a; }

/* ====================================================================== */
/* Testlar sahifasi — boshlang'ich holat                                   */
/* ====================================================================== */

.subj-idle{
  display:flex; flex-direction:column; align-items:center;
  text-align:center; padding:30px 20px 34px;
}
.subj-idle-ico{
  width:60px; height:60px; border-radius:50%;
  display:grid; place-items:center; margin-bottom:16px;
  background:var(--surface-muted); color:var(--text-muted);
}

.subj-idle-stats{
  display:flex; align-items:center; gap:18px;
  padding:14px 22px; margin-bottom:18px;
  background:var(--surface); border:1px solid var(--hairline);
  border-radius:var(--radius-lg); box-shadow:var(--tile-shadow);
}
.subj-idle-stat{ display:flex; flex-direction:column; gap:2px; }
.subj-idle-val{
  font-size:22px; font-weight:800; color:var(--text);
  font-variant-numeric:tabular-nums; line-height:1.1;
}
.subj-idle-lab{ font-size:11.5px; color:var(--text-muted); }
.subj-idle-div{ width:1px; align-self:stretch; background:var(--hairline); }

.subj-idle-title{
  margin:0 0 6px; font-size:15px; font-weight:700; color:var(--text);
}
.subj-idle-sub{
  margin:0; font-size:13px; color:var(--text-secondary);
  line-height:1.5; max-width:280px;
}

/* ====================================================================== */
/* Fikr bildirish                                                          */
/* ====================================================================== */

.rate-box{
  display:flex; flex-direction:column; align-items:center;
  gap:8px; margin:4px 0 18px;
}
.rate-stars{ display:flex; gap:6px; }

.rate-star{
  border:0; background:none; padding:4px; cursor:pointer;
  color:var(--hairline); line-height:0;
  transition:transform .18s var(--ease), color .18s var(--ease);
}
.rate-star svg{ fill:currentColor; stroke:none; }
.rate-star.is-on{ color:#f5b301; }
.rate-star:active{ transform:scale(.88); }
.rate-star.is-pop{ animation:ratePop .26s var(--ease); }

@keyframes ratePop{
  0%{ transform:scale(1); } 45%{ transform:scale(1.28) rotate(-7deg); } 100%{ transform:scale(1); }
}

.rate-label{
  margin:0; font-size:13.5px; font-weight:650;
  color:var(--text-muted); transition:color .2s var(--ease);
  min-height:19px;
}
.rate-label.is-set{ color:#f5b301; }

html[data-theme="dark"] .rate-star:not(.is-on){ color:rgba(255,255,255,.16); }

/* ====================================================================== */
/* Bosh sahifa — fikrlar slayderi                                          */
/* ====================================================================== */

.rv-box{ margin-top:2px; }

.rv-track{
  display:flex; gap:12px;
  overflow-x:auto; scroll-snap-type:x mandatory;
  scrollbar-width:none; -ms-overflow-style:none;
  padding:2px 0 4px;
  -webkit-overflow-scrolling:touch;
}
.rv-track::-webkit-scrollbar{ display:none; }

.rv-card{
  position:relative; flex:0 0 100%; scroll-snap-align:center;
  background:var(--surface);
  border:1px solid var(--hairline);
  border-radius:var(--radius-lg);
  box-shadow:var(--tile-shadow);
  padding:18px 16px 15px;
  min-height:168px;
  display:flex; flex-direction:column;
  overflow:hidden;
}
.rv-card::before{
  content:''; position:absolute; inset:0 0 auto 0; height:3px;
  background:linear-gradient(90deg, var(--primary), #2d9ff0);
  opacity:.85;
}

.rv-quote{
  position:absolute; top:12px; right:12px;
  color:var(--primary); opacity:.14; line-height:0;
}
.rv-quote svg{ fill:currentColor; stroke:none; }

.rv-stars{ display:flex; gap:3px; margin-bottom:9px; }
.rv-star{ color:var(--hairline); line-height:0; }
.rv-star svg{ fill:currentColor; stroke:none; }
.rv-star.is-on{ color:#f5b301; }

.rv-text{
  margin:0 0 14px; flex:1;
  font-size:14px; line-height:1.55; color:var(--text);
  display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical;
  overflow:hidden;
}

.rv-author{ display:flex; align-items:center; gap:10px; }

.rv-ava{
  position:relative; flex:0 0 auto;
  width:36px; height:36px; border-radius:50%;
  display:grid; place-items:center; overflow:hidden;
  background:linear-gradient(135deg, var(--primary), #2d9ff0);
  color:#fff; font-size:14px; font-weight:700;
}
.rv-ava img{
  position:absolute; inset:0;
  width:100%; height:100%; object-fit:cover;
}
.rv-ava-txt{ line-height:1; }

.rv-meta{ display:flex; flex-direction:column; min-width:0; gap:1px; }
.rv-name{
  display:flex; align-items:center; gap:4px;
  font-size:13.5px; font-weight:700; color:var(--text);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.rv-user{ font-size:11.5px; color:var(--text-muted); }

.rv-dots{
  display:flex; justify-content:center; gap:6px; margin-top:12px;
}
.rv-dot{
  width:6px; height:6px; padding:0; border:0; border-radius:999px;
  background:var(--hairline); cursor:pointer;
  transition:width .24s var(--ease), background .24s var(--ease);
}
.rv-dot.is-active{ width:20px; background:var(--primary); }

.rv-empty{
  display:flex; flex-direction:column; align-items:center; text-align:center;
  padding:28px 20px;
  background:var(--surface);
  border:1px dashed var(--hairline);
  border-radius:var(--radius-lg);
}
.rv-empty .empty-ico{ color:var(--text-muted); margin-bottom:10px; }

html[data-theme="dark"] .rv-star:not(.is-on){ color:rgba(255,255,255,.16); }
html[data-theme="dark"] .rv-quote{ opacity:.2; }

/* ========================================================================== */
/* inPAY checkout                                                              */
/* ========================================================================== */
.checkout-wrap{padding:14px 14px 30px}

.pay-summary{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:18px;border-radius:22px;color:#fff;
  background:linear-gradient(135deg,#2f7bf6 0%,#6f48ff 58%,#a855f7 100%);
  box-shadow:0 18px 38px -22px rgba(47,123,246,.75);
}
.pay-summary-plan{display:flex;flex-direction:column;gap:6px;min-width:0}
.pay-summary-badge{
  display:inline-block;align-self:flex-start;padding:5px 11px;border-radius:999px;
  background:rgba(255,255,255,.2);font-size:12.5px;font-weight:900;letter-spacing:.06em;
}
.pay-summary-plan .tiny{color:rgba(255,255,255,.78)}
.pay-summary-amount{text-align:right;flex:none}
.pay-summary-amount b{display:block;font-size:26px;font-weight:900;line-height:1.05;font-variant-numeric:tabular-nums}
.pay-summary-amount span{font-size:12px;opacity:.8}

.pay-copy-box{
  margin-top:14px;border:1px solid var(--hairline);background:var(--surface);
  border-radius:16px;overflow:hidden
}
.pay-copy-row{
  display:flex;align-items:center;gap:12px;padding:13px 14px;width:100%;
  text-align:left;color:var(--text);border-bottom:1px solid var(--hairline);background:none
}
.pay-copy-row:last-child{border-bottom:none}
.pay-copy-row:active{background:var(--surface-muted)}
.pcr-label{font-size:12.5px;color:var(--text-secondary);min-width:110px;flex:none}
.pcr-value{flex:1;min-width:0;font-size:14px;font-weight:700;font-variant-numeric:tabular-nums;word-break:break-all;text-align:right}
.pcr-copy{flex:none;color:var(--primary);display:inline-flex}

.pay-countdown{
  margin-top:14px;padding:13px 14px;border-radius:16px;background:var(--surface);
  border:1px solid var(--hairline);display:flex;align-items:center;gap:11px
}
.pay-countdown.is-warn{border-color:rgba(245,158,11,.45);background:rgba(245,158,11,.09)}
.pay-countdown.is-expired{border-color:rgba(239,68,68,.45);background:rgba(239,68,68,.09)}
.pay-countdown svg{flex:none;color:var(--primary)}
.pay-countdown.is-warn svg{color:#f59e0b}
.pay-countdown.is-expired svg{color:#ef4444}
.pc-text{flex:1;min-width:0}
.pc-title{font-size:13.5px;font-weight:800}
.pc-sub{font-size:12px;color:var(--text-secondary);margin-top:2px;line-height:1.42}
.pc-time{font-size:20px;font-weight:900;font-variant-numeric:tabular-nums;flex:none}

.pay-methods-note{
  margin-top:12px;padding:12px 14px;border-radius:14px;
  background:var(--surface-muted);border:1px solid var(--hairline);
  display:flex;align-items:flex-start;gap:10px;font-size:12.5px;line-height:1.5;
  color:var(--text-secondary)
}
.pay-methods-note svg{flex:none;color:var(--primary);margin-top:1px}

.pay-actions{display:grid;gap:10px;margin-top:16px}
.btn-lg{padding:15px 18px;font-size:16px;font-weight:800;border-radius:16px}
.spinner-sm{width:15px;height:15px;border-width:2px;display:inline-block;vertical-align:-2px;margin-right:6px}

/* To'lov tafsilotlari / fiskal chek */
.pay-detail-box{
  margin-top:12px;border:1px solid var(--hairline);background:var(--surface);
  border-radius:16px;overflow:hidden
}
.pay-detail-row{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px 14px;border-bottom:1px solid var(--hairline);font-size:13.5px
}
.pay-detail-row:last-child{border-bottom:none}
.pay-detail-row>span:first-child{color:var(--text-secondary);flex:none}
.pay-detail-row>b,.pay-detail-row>span:last-child{text-align:right;min-width:0;word-break:break-word}

.fiscal-card{
  margin-top:12px;padding:14px;border-radius:16px;
  background:rgba(34,197,94,.08);border:1px solid rgba(34,197,94,.28)
}
.fiscal-head{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:800}
.fiscal-head svg{color:#22c55e;flex:none}
.fiscal-sub{font-size:12px;color:var(--text-secondary);margin:6px 0 0;line-height:1.45}
.fiscal-id{
  font-size:12.5px;font-weight:700;font-variant-numeric:tabular-nums;
  margin-top:8px;color:var(--text-secondary)
}
.fiscal-btn{margin-top:10px;width:100%}
.fiscal-pending{
  margin-top:12px;padding:12px 14px;border-radius:14px;
  background:rgba(245,158,11,.09);border:1px solid rgba(245,158,11,.24);
  display:flex;align-items:flex-start;gap:10px;font-size:12.5px;line-height:1.45;color:var(--text-secondary)
}
.fiscal-pending svg{flex:none;color:#f59e0b;margin-top:1px}

.succ-meta{
  margin-top:16px;padding:12px 14px;border-radius:14px;
  background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);text-align:left
}
.succ-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:5px 0;font-size:13.5px}
.succ-row span{color:rgba(255,255,255,.68)}
.succ-row b{font-weight:800}

.success-overlay{
  position:fixed;inset:0;z-index:9999;background:rgba(4,10,22,.72);backdrop-filter:blur(8px);
  display:grid;place-items:center;padding:26px;text-align:center;color:#fff;
  animation:successFade .25s ease both
}
.success-card{max-width:330px;width:100%}
.success-ring{
  width:112px;height:112px;border-radius:999px;margin:0 auto 22px;position:relative;
  background:conic-gradient(#22c55e 0deg, rgba(255,255,255,.12) 0deg);
  display:grid;place-items:center;box-shadow:0 22px 60px rgba(34,197,94,.34)
}
.success-ring::before{content:"";position:absolute;inset:8px;border-radius:inherit;background:rgba(7,17,37,.92)}
.success-ring svg{position:relative;z-index:1;width:54px;height:54px;color:#22c55e;stroke-dasharray:50;stroke-dashoffset:50;animation:checkDraw .62s cubic-bezier(.2,.9,.25,1) .28s forwards}
.success-ring.premium{background:conic-gradient(from 0deg,#22c55e,#86efac,#22c55e)}
.success-title{font-size:23px;font-weight:900;letter-spacing:-.03em;margin:0 0 8px}
.success-sub{margin:0;color:rgba(255,255,255,.78);font-size:14px;line-height:1.5}
.confetti{position:absolute;width:8px;height:12px;border-radius:2px;top:50%;left:50%;opacity:0}
.success-overlay.premium .confetti{animation:confetti 1.15s ease-out forwards}
.success-overlay.premium .confetti:nth-child(1){background:#22c55e;--x:-130px;--y:-160px;animation-delay:.05s}
.success-overlay.premium .confetti:nth-child(2){background:#3b82f6;--x:120px;--y:-150px;animation-delay:.12s}
.success-overlay.premium .confetti:nth-child(3){background:#f59e0b;--x:-90px;--y:120px;animation-delay:.18s}
.success-overlay.premium .confetti:nth-child(4){background:#a855f7;--x:145px;--y:95px;animation-delay:.24s}
.success-overlay.premium .confetti:nth-child(5){background:#ef4444;--x:0;--y:-190px;animation-delay:.10s}
.success-overlay.premium .confetti:nth-child(6){background:#06b6d4;--x:160px;--y:-20px;animation-delay:.20s}
@keyframes successFade{from{opacity:0}to{opacity:1}}
@keyframes checkDraw{to{stroke-dashoffset:0}}
@keyframes confetti{0%{transform:translate(-50%,-50%) rotate(0);opacity:1}100%{transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y))) rotate(540deg);opacity:0}}

.admin-section{margin:16px 0}
.admin-card{background:var(--surface);border:1px solid var(--hairline);border-radius:16px;padding:14px;margin-bottom:10px}
.admin-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.admin-stat{background:var(--surface-muted);border-radius:14px;padding:12px}
.admin-stat b{display:block;font-size:20px;margin-top:4px}
.admin-row{display:flex;align-items:center;gap:10px;padding:11px 0;border-bottom:1px solid var(--hairline)}
.admin-row:last-child{border-bottom:none}
.admin-row .row-body{flex:1;min-width:0}
.dot{width:9px;height:9px;border-radius:999px;background:#94a3b8;display:inline-block;margin-right:6px}
.dot.online{background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.14)}
.dot.offline{background:#ef4444}
.input,.select,.textarea{
  width:100%;border:1px solid var(--hairline);background:var(--surface);color:var(--text);
  border-radius:12px;padding:11px 12px;font:inherit;outline:none
}
.input:focus,.select:focus,.textarea:focus{border-color:var(--primary)}
.field-label{display:block;font-size:12.5px;color:var(--text-secondary);margin:10px 0 6px}
#admin-sheet{position:fixed;inset:0;z-index:1200;pointer-events:none;opacity:0;transition:opacity .2s ease}
#admin-sheet.is-open{pointer-events:auto;opacity:1}
#admin-sheet.is-closing{opacity:0}
#admin-sheet .sheet-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.55);backdrop-filter:blur(4px)}
#admin-sheet .sheet{position:absolute;left:50%;bottom:0;transform:translateX(-50%);width:100%;max-width:480px;max-height:88vh;overflow:auto;background:var(--surface);border-radius:24px 24px 0 0;padding:10px 16px 22px;box-shadow:0 -20px 60px rgba(0,0,0,.35)}
#admin-sheet .sheet-content{padding-top:8px}
.sheet-close{position:absolute;right:14px;top:12px;width:32px;height:32px;border:0;border-radius:999px;background:var(--surface-muted);color:var(--text-secondary);display:grid;place-items:center;z-index:2}

/* ========================================================================== */
/* Hujjatlar va Qo'llanma: Callouts & AI Prompts                               */
/* ========================================================================== */
.doc-body {
  font-size: 14px;
  line-height: 1.62;
  color: var(--text);
  padding-bottom: 24px;
}
.doc-body h3 {
  font-size: 16px;
  font-weight: 800;
  margin: 20px 0 10px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.doc-body h3 svg {
  color: var(--primary);
  flex-shrink: 0;
}
.doc-body h4 {
  font-size: 14.5px;
  font-weight: 700;
  margin: 16px 0 8px;
  color: var(--text);
}
.doc-body p {
  margin: 0 0 10px;
  color: var(--text-secondary);
}
.doc-body ul, .doc-body ol {
  margin: 0 0 14px 20px;
  padding: 0;
  color: var(--text-secondary);
}
.doc-body li {
  margin-bottom: 6px;
}
.doc-body b {
  color: var(--text);
}

.doc-callout {
  position: relative;
  border-radius: 16px;
  padding: 14px 16px;
  margin: 14px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.52;
}
.doc-callout-ico {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-top: 1px;
}
.doc-callout-ico svg {
  width: 18px;
  height: 18px;
}
.doc-callout-content {
  flex: 1;
  min-width: 0;
}
.doc-callout-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
}

.doc-callout-red {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.26);
  color: var(--text);
}
.doc-callout-red .doc-callout-ico {
  background: rgba(239, 68, 68, 0.16);
  color: #ef4444;
}
.doc-callout-red .doc-callout-title {
  color: #dc2626;
}
html[data-theme="dark"] .doc-callout-red .doc-callout-title {
  color: #f87171;
}

.doc-callout-green {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.26);
  color: var(--text);
}
.doc-callout-green .doc-callout-ico {
  background: rgba(16, 185, 129, 0.16);
  color: #10b981;
}
.doc-callout-green .doc-callout-title {
  color: #059669;
}
html[data-theme="dark"] .doc-callout-green .doc-callout-title {
  color: #34d399;
}

.doc-callout-brown {
  background: rgba(180, 83, 9, 0.09);
  border: 1px solid rgba(180, 83, 9, 0.26);
  color: var(--text);
}
.doc-callout-brown .doc-callout-ico {
  background: rgba(180, 83, 9, 0.16);
  color: #b45309;
}
.doc-callout-brown .doc-callout-title {
  color: #92400e;
}
html[data-theme="dark"] .doc-callout-brown {
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.32);
}
html[data-theme="dark"] .doc-callout-brown .doc-callout-ico {
  background: rgba(217, 119, 6, 0.22);
  color: #f59e0b;
}
html[data-theme="dark"] .doc-callout-brown .doc-callout-title {
  color: #fbbf24;
}

.doc-prompt-card {
  margin: 16px 0;
  border: 1px solid var(--hairline);
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}
.doc-prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-secondary, var(--surface-muted));
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
  font-weight: 700;
}
.doc-prompt-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
}
.doc-prompt-body {
  position: relative;
  padding: 14px;
  background: var(--bg-secondary, #1e293b);
  color: var(--text, #f8fafc);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: all;
  border-radius: 0 0 16px 16px;
}
html[data-theme="light"] .doc-prompt-body {
  background: #0f172a;
  color: #f1f5f9;
}

.doc-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 10px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  box-shadow: 0 2px 8px rgba(47, 123, 246, 0.28);
}
.doc-copy-btn:active {
  transform: scale(0.95);
  opacity: 0.9;
}
.doc-copy-btn.copied {
  background: #10b981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.28);
}

.sheet-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline);
  cursor: pointer;
  z-index: 20;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), transform 0.14s var(--ease);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.sheet-close-btn:active {
  transform: scale(0.92);
  background: var(--border);
  color: var(--text);
}
.sheet-close-btn svg {
  width: 18px;
  height: 18px;
}
/* ------------------------------------------------- bildirishnomalar tarixi */
/* Saralash chiplari — to'lovlar tarixidagi filtr uslubida */
.notif-sort-bar{
  display:flex;gap:6px;overflow-x:auto;padding:0 0 10px;margin-bottom:4px;
  -webkit-overflow-scrolling:touch;scrollbar-width:none
}
.notif-sort-bar::-webkit-scrollbar{display:none}
.notif-sort-chip{
  flex:none;padding:7px 13px;border-radius:999px;font-size:12.5px;font-weight:600;
  background:var(--bg-secondary);color:var(--text-secondary);
  border:1px solid var(--hairline);cursor:pointer;white-space:nowrap;
  transition:background .15s ease,color .15s ease,border-color .15s ease
}
.notif-sort-chip.is-active{
  background:var(--primary);color:#fff;border-color:var(--primary)
}
.notif-sort-chip:active{transform:scale(.97)}

/* Ro'yxat elementi bosiladigan bo'lgani uchun <button> reset */
.notif-history-card{
  font:inherit;color:inherit;appearance:none;-webkit-appearance:none;
  transition:border-color .15s ease,transform .12s ease
}
.notif-history-card:active{transform:scale(.985)}
.notif-history-card:hover{border-color:var(--primary)}

/* ---------------------------------------------- Animatsiyali korzinka tugmasi */
/* Matnli «Tozalash» tugmasi o'rnini bosadi: qopqoq ochiladi, korzinka silkinadi. */
.notif-trash-btn{
  flex:none; width:36px; height:36px; padding:0;
  display:grid; place-items:center;
  border-radius:11px; cursor:pointer;
  background:rgba(239,68,68,.10);
  border:1px solid rgba(239,68,68,.22);
  color:var(--danger,#ef4444);
  transition:background .18s ease, border-color .18s ease, transform .12s ease;
}
.notif-trash-btn:hover{ background:rgba(239,68,68,.18); border-color:rgba(239,68,68,.45); }
.notif-trash-btn:active{ transform:scale(.92); }
.notif-trash-btn:disabled{ opacity:.6; cursor:default; }

.notif-trash-btn svg{ overflow:visible; }

/* Qopqoq — o'ng burchakdan ochiladi */
.notif-trash-btn .trash-lid{
  transform-origin:19px 6px;
  transition:transform .28s cubic-bezier(.34,1.56,.64,1);
}
.notif-trash-btn .trash-can,
.notif-trash-btn .trash-lines{
  transition:transform .28s cubic-bezier(.34,1.56,.64,1);
}
.notif-trash-btn:hover .trash-lid{ transform:rotate(-22deg) translateY(-1px); }
.notif-trash-btn:hover .trash-lines{ transform:translateY(1px); }

/* Bosilganda: qopqoq keng ochiladi + korzinka silkinadi */
.notif-trash-btn.is-armed .trash-lid{
  transform:rotate(-38deg) translate(-1px,-2px);
}
.notif-trash-btn.is-armed .trash-can{ animation:trash-shake .5s ease-in-out; }

/* O'chirish jarayoni */
.notif-trash-btn.is-busy{ pointer-events:none; }
.notif-trash-btn.is-busy .trash-lid{ transform:rotate(-38deg) translate(-1px,-2px); }
.notif-trash-btn.is-busy .trash-can{ animation:trash-shake .45s ease-in-out infinite; }

@keyframes trash-shake{
  0%,100%{ transform:translateX(0) rotate(0deg); }
  20%{ transform:translateX(-1.4px) rotate(-5deg); }
  45%{ transform:translateX(1.4px) rotate(5deg); }
  70%{ transform:translateX(-1px) rotate(-3deg); }
}

/* Ro'yxat elementlari «korzinkaga tushadi» */
.notif-history-card.is-trashed{
  animation:notif-trash-out .34s cubic-bezier(.4,0,.7,.2) forwards;
  pointer-events:none;
}
@keyframes notif-trash-out{
  0%{ opacity:1; transform:translateX(0) scale(1); }
  30%{ transform:translateX(8px) scale(.99); }
  100%{ opacity:0; transform:translateX(-120%) scale(.9); }
}

/* Animatsiya o'chirilgan rejim */
.anim-off .notif-trash-btn .trash-lid,
.anim-off .notif-trash-btn .trash-can,
.anim-off .notif-trash-btn .trash-lines{ transition:none; animation:none; }
.anim-off .notif-history-card.is-trashed{ animation:none; opacity:0; }

/* =========================================================================
   GURUH TESTI (Battle) — /web-app/pages/room.js
   ========================================================================= */

.room-page{ padding-bottom:40px; }

/* ------------------------------------------------------- xona yaratish */
.room-hero{ text-align:center; padding:18px 8px 4px; }
.room-hero-ico{
  width:64px; height:64px; margin:0 auto 12px;
  display:grid; place-items:center; border-radius:22px;
  background:linear-gradient(135deg, var(--primary), #7c5cff);
  color:#fff; box-shadow:0 12px 28px var(--primary-glow);
}
.room-hero-title{ margin:0 0 6px; font-size:22px; font-weight:800; color:var(--text); }
.room-hero-sub{
  margin:0 auto; max-width:22rem;
  font-size:13.5px; line-height:1.55; color:var(--text-secondary);
}

.room-card{ margin-top:14px; padding:16px; }
.room-field{ display:block; margin-bottom:16px; }
.room-field:last-of-type{ margin-bottom:18px; }
.room-label{
  display:flex; align-items:center; gap:6px; margin-bottom:8px;
  font-size:12.5px; font-weight:700; color:var(--text-secondary);
  letter-spacing:.01em;
}
.room-label svg{ opacity:.75; }

/* ---- Tanlangan fan chipi (fan bu sahifada TANLANMAYDI, faqat ko'rsatiladi) */
.room-subject-chip{
  display:flex; align-items:center; gap:11px;
  margin-bottom:16px; padding:12px 14px;
  border-radius:var(--radius-md);
  background:linear-gradient(135deg,
    color-mix(in srgb, var(--primary) 12%, transparent),
    color-mix(in srgb, var(--primary) 4%, transparent));
  border:1px solid color-mix(in srgb, var(--primary) 26%, transparent);
}
.room-subject-ico{
  flex:0 0 auto; display:grid; place-items:center;
  width:36px; height:36px; border-radius:11px;
  background:var(--surface); color:var(--primary);
  box-shadow:0 1px 4px rgba(0,0,0,.08);
}
.room-subject-txt{ min-width:0; display:flex; flex-direction:column; gap:2px; }
.room-subject-label{
  font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:var(--text-muted);
}
.room-subject-name{
  font-size:14.5px; font-weight:800; color:var(--text); line-height:1.3;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

/* ---- Qo'lda raqam kiritish (slider O'RNIGA) --------------------------- */
.room-numbox{
  display:flex; align-items:center; gap:10px;
  padding:4px 14px 4px 4px;
  background:var(--surface-muted);
  border:1.5px solid var(--border); border-radius:var(--radius-md);
  transition:border-color .16s ease, box-shadow .16s ease;
}
.room-numbox:focus-within{
  border-color:var(--primary);
  box-shadow:0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}
.room-num{
  flex:1; min-width:0; width:100%;
  padding:11px 12px; border:0; outline:none; background:transparent;
  font:inherit; font-size:19px; font-weight:800; letter-spacing:.02em;
  font-variant-numeric:tabular-nums; color:var(--text);
  text-align:left; -moz-appearance:textfield;
}
.room-num::-webkit-outer-spin-button,
.room-num::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
.room-num-unit{
  flex:0 0 auto; font-size:13px; font-weight:700; color:var(--text-muted);
}
.room-help{
  display:block; margin-top:6px; padding-left:2px;
  font-size:11.5px; color:var(--text-muted);
}

.room-cta{ width:100%; }

/* ---- Fan tanlanmaganda ko'rinadigan bo'sh holat ---------------------- */
.room-card-empty{ text-align:center; padding:22px 18px; }
.room-empty-ico{
  display:inline-grid; place-items:center;
  width:52px; height:52px; margin-bottom:12px; border-radius:16px;
  background:var(--surface-muted); color:var(--text-muted);
}
.room-empty-txt{
  margin:0 auto 16px; max-width:19rem;
  font-size:13.5px; line-height:1.55; color:var(--text-secondary);
}

/* ---- «Kod bilan qo'shilish» ochuvchi tugma --------------------------- */
.room-join-open{
  display:flex; align-items:center; gap:12px; width:100%;
  margin-top:14px; padding:14px 15px; text-align:left;
  background:var(--surface); color:inherit; font:inherit;
  border:1px solid var(--border); border-radius:var(--radius-lg);
  box-shadow:var(--tile-shadow); cursor:pointer;
  transition:transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.room-join-open:active{ transform:scale(.985); }
.room-join-open:hover{ border-color:color-mix(in srgb, var(--primary) 40%, var(--border)); }
.room-join-open-ico{
  flex:0 0 auto; display:grid; place-items:center;
  width:40px; height:40px; border-radius:12px;
  background:color-mix(in srgb, var(--primary) 12%, transparent);
  color:var(--primary);
}
.room-join-open-txt{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.room-join-open-txt strong{ font-size:14.5px; font-weight:800; color:var(--text); }
.room-join-open-txt small{ font-size:12px; color:var(--text-muted); line-height:1.4; }
.room-join-open-arrow{ flex:0 0 auto; color:var(--text-muted); display:grid; place-items:center; }

/* ====================================================================== */
/* KOD BILAN XONAGA KIRISH MODALI (.rj-*)                                 */
/* ====================================================================== */
body.rj-lock{ overflow:hidden; }

.rj-backdrop{
  position:fixed; inset:0; z-index:120;
  display:flex; align-items:flex-end; justify-content:center;
  padding:0; background:rgba(8,10,16,.55);
  -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px);
  opacity:0; transition:opacity .2s ease;
}
.rj-backdrop.is-open{ opacity:1; }
.rj-backdrop[hidden]{ display:none; }

.rj-sheet{
  position:relative; width:100%; max-width:26rem;
  padding:10px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  background:var(--surface);
  border-radius:22px 22px 0 0;
  box-shadow:0 -10px 40px rgba(0,0,0,.28);
  transform:translateY(16px); transition:transform .22s cubic-bezier(.22,1,.36,1);
}
.rj-backdrop.is-open .rj-sheet{ transform:translateY(0); }

.rj-grip{
  width:38px; height:4px; margin:0 auto 12px;
  border-radius:999px; background:var(--border);
}
.rj-close{
  position:absolute; top:12px; right:12px;
  display:grid; place-items:center; width:32px; height:32px;
  border:0; border-radius:50%; cursor:pointer;
  background:var(--surface-muted); color:var(--text-muted);
}
.rj-close:active{ transform:scale(.94); }

.rj-head{ text-align:center; margin-bottom:18px; }
.rj-ico{
  display:inline-grid; place-items:center;
  width:54px; height:54px; margin-bottom:10px; border-radius:17px;
  background:linear-gradient(135deg,
    color-mix(in srgb, var(--primary) 18%, transparent),
    color-mix(in srgb, var(--primary) 6%, transparent));
  color:var(--primary);
}
.rj-title{ margin:0 0 4px; font-size:18px; font-weight:800; color:var(--text); }
.rj-sub{
  margin:0 auto; max-width:17rem;
  font-size:12.5px; line-height:1.5; color:var(--text-secondary);
}

/* Kod katakchalari */
.rj-cells{
  display:grid; grid-template-columns:repeat(6, 1fr); gap:7px;
  margin-bottom:12px; cursor:text;
}
.rj-cell{
  display:grid; place-items:center; height:52px;
  border:1.5px solid var(--border); border-radius:12px;
  background:var(--surface-muted);
  font-size:21px; font-weight:800; color:var(--text);
  font-variant-numeric:tabular-nums; text-transform:uppercase;
  transition:border-color .15s ease, background .15s ease, transform .12s ease;
}
.rj-cell.is-filled{
  background:var(--surface);
  border-color:color-mix(in srgb, var(--primary) 45%, var(--border));
  transform:translateY(-1px);
}
.rj-cell.is-active{
  border-color:var(--primary);
  box-shadow:0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}

/* Yashirin haqiqiy input — katakchalar shu inputni aks ettiradi */
.rj-ghost{
  position:absolute; opacity:0; pointer-events:none;
  width:1px; height:1px; left:50%; bottom:90px;
}

.rj-err{
  margin:0 0 10px; text-align:center;
  font-size:12.5px; font-weight:600; color:var(--danger, #e5484d);
}
.rj-err[hidden]{ display:none; }

.rj-go{ width:100%; }
.rj-go:disabled{ opacity:.5; cursor:not-allowed; }

.rj-foot{
  display:flex; align-items:flex-start; justify-content:center; gap:6px;
  margin:12px 0 0; font-size:11.5px; line-height:1.45; color:var(--text-muted);
}
.rj-foot svg{ flex:0 0 auto; margin-top:2px; opacity:.7; }

@media (min-width:480px){
  .rj-backdrop{ align-items:center; padding:20px; }
  .rj-sheet{ border-radius:22px; }
  .rj-grip{ display:none; }
}

.room-hint{
  display:flex; align-items:flex-start; gap:8px;
  margin-top:14px; padding:12px 14px;
  border-radius:var(--radius-md); background:var(--surface-muted);
  font-size:12.5px; line-height:1.5; color:var(--text-secondary);
}
.room-hint svg{ flex:0 0 auto; margin-top:1px; opacity:.7; }

/* ------------------------------------------------------- kutish xonasi */
.room-code-box{ text-align:center; padding:16px 0 4px; }
.room-code-lab{
  display:block; margin-bottom:8px;
  font-size:11.5px; font-weight:700; letter-spacing:.08em;
  text-transform:uppercase; color:var(--text-muted);
}
.room-code-val{
  display:inline-flex; align-items:center; gap:10px;
  padding:10px 18px; border:1px dashed var(--primary);
  border-radius:var(--radius-md); background:var(--surface);
  font-size:26px; font-weight:800; letter-spacing:.16em;
  color:var(--primary); cursor:pointer; font-variant-numeric:tabular-nums;
  transition:transform .14s var(--ease), background .18s var(--ease);
}
.room-code-val:active{ transform:scale(.97); background:var(--surface-muted); }
.room-code-val svg{ opacity:.6; }

/* Kutish xonasi kartasi: yuqorida fan nomi (markazda),
   pastki qatorda savollar soni va vaqt. */
.room-summary{ display:flex; flex-direction:column; gap:12px; }

.room-sum-top{
  display:flex; flex-direction:column; align-items:center; gap:6px;
  text-align:center; padding-bottom:12px;
  border-bottom:1px solid var(--border);
}
.room-sum-top .room-sum-ico{ width:38px; height:38px; border-radius:12px; }
.room-sum-title{
  display:block; max-width:100%;
  font-size:16px; font-weight:800; line-height:1.3; color:var(--text);
  overflow-wrap:anywhere;
}
.room-sum-top small{ font-size:11px; color:var(--text-muted); }

.room-sum-row{ display:flex; gap:10px; }
.room-sum-item{ flex:1; display:flex; align-items:center; gap:9px; min-width:0; }
.room-sum-ico{
  flex:0 0 auto; width:34px; height:34px; border-radius:11px;
  display:grid; place-items:center; color:#fff;
}
.ico-violet{ background:linear-gradient(135deg,#8b5cf6,#6d28d9); }
.ico-amber{ background:linear-gradient(135deg,#f59e0b,#d97706); }
.ico-blue{ background:linear-gradient(135deg,#3b82f6,#1d4ed8); }
.room-sum-item b{
  display:block; font-size:13.5px; font-weight:700; color:var(--text);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.room-sum-item small{ display:block; font-size:11px; color:var(--text-muted); }

.room-share-txt{
  margin:0 0 10px; font-size:12.5px; line-height:1.55; color:var(--text-secondary);
}
.room-cmd{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  width:100%; padding:11px 14px; text-align:left;
  border:1px solid var(--border); border-radius:var(--radius-md);
  background:var(--surface-muted); cursor:pointer;
  transition:border-color .16s var(--ease), transform .12s var(--ease);
}
.room-cmd:active{ transform:scale(.99); }
.room-cmd:hover{ border-color:var(--primary); }
.room-cmd code{
  font-size:13px; font-weight:600; color:var(--text);
  word-break:break-all; font-family:ui-monospace, SFMono-Regular, Menlo, monospace;
}
.room-cmd svg{ flex:0 0 auto; opacity:.55; }

.room-linked{
  display:flex; align-items:center; gap:7px; margin-top:10px;
  padding:9px 12px; border-radius:var(--radius-sm);
  background:var(--success-soft); color:var(--success-text);
  font-size:12.5px; font-weight:600;
}

/* --- Guruhga e'lon qilish: tugma + guruh tanlash oynasi --------------- */
.room-share-btn{ width:100%; }

.room-share-alt{
  display:flex; align-items:center; justify-content:center; gap:6px;
  width:100%; margin-top:8px; padding:8px 12px;
  border:0; background:none; cursor:pointer;
  font-size:12px; font-weight:600; color:var(--text-muted);
  transition:color .16s var(--ease);
}
.room-share-alt:hover{ color:var(--primary); }
.room-share-alt svg{ opacity:.7; }

.room-gp{ padding:4px 2px 2px; }

.room-gp-steps{
  list-style:none; margin:0 0 14px; padding:0;
  display:flex; flex-direction:column; gap:11px;
}
.room-gp-steps li{
  display:flex; align-items:flex-start; gap:11px;
  font-size:13px; line-height:1.5; color:var(--text-secondary);
}
.room-gp-steps li b{ color:var(--text); font-weight:700; }
.room-gp-steps li span{
  flex:0 0 auto;
  display:inline-flex; align-items:center; justify-content:center;
  width:22px; height:22px; border-radius:50%;
  background:var(--primary); color:#fff;
  font-size:11.5px; font-weight:700; line-height:1;
}

.room-gp-note{
  display:flex; align-items:flex-start; gap:7px;
  margin:0 0 16px; padding:10px 12px;
  border-radius:var(--radius-sm); background:var(--surface-muted);
  font-size:11.5px; line-height:1.5; color:var(--text-muted);
}
.room-gp-note svg{ flex:0 0 auto; margin-top:1px; opacity:.7; }

/* Guruhga yuboriladigan tayyor buyruq */
.room-gp-cmd{
  margin:0 0 12px; padding:10px 12px;
  border-radius:var(--radius-sm);
  background:var(--surface-muted);
  border:1px dashed var(--border);
  text-align:center; overflow-x:auto;
}
.room-gp-cmd code{
  font-family:ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size:12.5px; font-weight:600; color:var(--primary);
  white-space:nowrap;
}

/* «Botni guruhga qo'shish» — ikkilamchi, kichik havola-tugma */
.room-gp-add{
  display:flex; align-items:center; justify-content:center; gap:6px;
  width:100%; margin-top:10px; padding:8px;
  background:none; border:0; cursor:pointer;
  font-size:12px; font-weight:600; color:var(--text-muted);
}
.room-gp-add:hover{ color:var(--primary); }
.room-gp-add svg{ opacity:.7; }

.room-players-head{
  display:flex; align-items:center; justify-content:space-between;
  margin:20px 2px 10px; font-size:13px; font-weight:700; color:var(--text);
}
.room-players-head > span:first-child{ display:flex; align-items:center; gap:6px; }
.room-ready-count{
  font-size:12px; font-weight:700; color:var(--text-muted);
  font-variant-numeric:tabular-nums;
}

.room-players{ display:flex; flex-direction:column; gap:8px; }
.room-player{
  display:flex; align-items:center; gap:11px;
  padding:10px 13px; border-radius:var(--radius-md);
  background:var(--surface); border:1px solid var(--border);
  transition:border-color .2s var(--ease), background .2s var(--ease);
}
.room-player.is-ready{ border-color:var(--success); background:var(--success-soft); }
.room-player.is-me{ box-shadow:0 0 0 2px var(--primary-glow); }
.room-player-av{
  flex:0 0 auto; width:38px; height:38px; border-radius:50%;
  overflow:hidden; display:grid; place-items:center;
  background:var(--surface-muted); color:var(--text-muted);
}
.room-player-av img{ width:100%; height:100%; object-fit:cover; display:block; }
.room-player-info{ flex:1; min-width:0; }
.room-player-info b{
  display:block; font-size:14px; font-weight:700; color:var(--text);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.room-player-info b small{ font-weight:500; color:var(--text-muted); }
.room-player-info > small{ font-size:11.5px; color:var(--text-muted); }
.room-player-state{ flex:0 0 auto; }

.room-chip{
  display:inline-flex; align-items:center; gap:4px;
  padding:4px 9px; border-radius:999px;
  background:var(--surface-muted); color:var(--text-muted);
  font-size:11px; font-weight:700; white-space:nowrap;
}
.room-chip-ok{ background:var(--success); color:#fff; }

.room-actions{ display:flex; flex-direction:column; gap:9px; margin-top:18px; }
.room-ready-btn{ width:100%; transition:background .2s var(--ease); }
.room-ready-btn.is-ready{ background:var(--success); border-color:var(--success); color:#fff; }
.room-leave{ color:var(--danger); }

.room-note{
  display:flex; align-items:flex-start; gap:7px;
  margin:14px 2px 0; font-size:12px; line-height:1.5; color:var(--text-muted);
}
.room-note svg{ flex:0 0 auto; margin-top:1px; }

/* ---------------------------------------------------------- sanoq ekrani */
.room-countdown{
  min-height:70vh; display:grid; place-items:center; text-align:center;
}
.rc-label{
  margin:0 0 6px; font-size:13px; font-weight:700;
  letter-spacing:.08em; text-transform:uppercase; color:var(--text-muted);
}
.rc-num{
  font-size:88px; line-height:1; font-weight:900;
  background:linear-gradient(135deg, var(--primary), #7c5cff);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  font-variant-numeric:tabular-nums;
}
.rc-num.is-pop{ animation:rcPop .5s var(--ease); }
@keyframes rcPop{
  0%{ transform:scale(.6); opacity:0; }
  45%{ transform:scale(1.12); opacity:1; }
  100%{ transform:scale(1); opacity:1; }
}
.rc-sub{ margin:10px 0 0; font-size:13.5px; color:var(--text-secondary); }
.rc-players{
  display:flex; flex-wrap:wrap; gap:6px; justify-content:center;
  margin-top:20px; max-width:20rem;
}
.rc-chip{
  padding:5px 11px; border-radius:999px;
  background:var(--surface-muted); color:var(--text-secondary);
  font-size:12px; font-weight:600;
}

/* ----------------------------------------------------------------- jang */
.room-battle{ padding-bottom:40px; }
.rb-bar{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:10px 0 4px;
}
.rb-meta{ min-width:0; }
.rb-meta strong{
  display:block; font-size:14px; font-weight:700; color:var(--text);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:13rem;
}
.rb-meta span{ font-size:11.5px; color:var(--text-muted); }
.rb-score{
  flex:0 0 auto; display:inline-flex; align-items:center; gap:5px;
  padding:6px 12px; border-radius:999px;
  background:linear-gradient(135deg, var(--primary), #7c5cff); color:#fff;
  font-size:14px; font-weight:800; font-variant-numeric:tabular-nums;
}

.rb-timer{
  height:6px; border-radius:999px; overflow:hidden;
  background:var(--surface-muted); margin-top:6px;
}
.rb-timer-bar{
  height:100%; border-radius:999px;
  background:linear-gradient(90deg, var(--primary), #2d9ff0);
  transition:background .3s var(--ease); will-change:width;
}
.rb-timer-bar.is-low{ background:linear-gradient(90deg, var(--danger), #ff7a7a); }

.rb-timer-row{
  display:flex; align-items:baseline; gap:6px;
  margin:8px 0 2px; justify-content:center; position:relative;
}
.rb-sec{
  font-size:22px; font-weight:800; color:var(--text);
  font-variant-numeric:tabular-nums; min-width:2.1ch; text-align:right;
  transition:color .25s var(--ease);
}
.rb-sec.is-low{ color:var(--danger); }
.rb-sec-lab{ font-size:12px; color:var(--text-muted); }
.rb-answered{
  position:absolute; right:0; font-size:11.5px; color:var(--text-muted);
  font-variant-numeric:tabular-nums;
}

.rb-card{ margin-top:12px; }
.rb-card.is-locked .opt{ cursor:default; }
.rb-card .opt.is-picked{ border-color:var(--primary); background:var(--surface-muted); }

.rb-foot{ min-height:52px; margin-top:14px; }
.rb-verdict{
  display:flex; align-items:center; justify-content:center; gap:8px;
  padding:11px 16px; border-radius:var(--radius-md);
  font-weight:700; font-size:14px;
  animation:quizIn .22s var(--ease) both;
}
.rb-verdict em{ font-style:normal; opacity:.8; font-size:12.5px; }
.rb-verdict.is-ok{ background:var(--success-soft); color:var(--success-text); }
.rb-verdict.is-bad{ background:var(--danger-soft); color:var(--danger-text); }
.rb-verdict.is-warn{ background:var(--warning-soft); color:#b45309; }

/* --------------------------------------- variant ro'parasidagi avatarlar
 *
 * Javob berilgach har bir variant yonida uni tanlaganlarning dumaloq
 * rasmlari chiqadi. Bir variantni bir necha kishi tanlasa avatarlar
 * ustma-ust joylashadi: manfiy margin har bir keyingi doiraning
 * chap yarmini oldingisining ostiga suradi, natijada yarim aylana
 * ko'rinib turadigan stack hosil bo'ladi.
 */
.opt-picks{
  flex:0 0 auto;
  display:flex; align-items:center;
  align-self:center;               /* .opt flex-start bo'lsa ham markazda */
  margin-left:auto; padding-left:8px;
  opacity:0; transform:translateX(6px);
  transition:opacity .22s var(--ease), transform .22s var(--ease);
  pointer-events:none;
}
.opt-picks.is-on{ opacity:1; transform:none; }

.opt-av{
  position:relative;
  flex:0 0 auto;
  width:26px; height:26px;
  border-radius:50%;
  overflow:hidden;
  display:grid; place-items:center;
  background:var(--surface-muted);
  color:var(--text-secondary);
  font-size:11px; font-weight:800; line-height:1;
  /* Fon rangidagi halqa — ustma-ust turganda chegara aniq ko'rinadi */
  box-shadow:0 0 0 2px var(--surface), 0 1px 3px rgba(0,0,0,.14);
  animation:optAvIn .26s var(--ease) both;
}
.opt-av + .opt-av{ margin-left:-11px; }   /* ~yarmi ustma-ust tushadi */
.opt-av img{ width:100%; height:100%; object-fit:cover; display:block; }
.opt-av.is-me{ box-shadow:0 0 0 2px var(--primary), 0 1px 3px rgba(0,0,0,.18); }
.opt-av-more{
  background:var(--text-muted); color:#fff;
  font-size:10.5px; letter-spacing:-.02em;
}

/* Javob ochilganda halqa varianti rangiga moslashadi */
.quiz-card .opt.is-correct .opt-av{ box-shadow:0 0 0 2px var(--success-soft), 0 1px 3px rgba(0,0,0,.14); }
.quiz-card .opt.is-wrong   .opt-av{ box-shadow:0 0 0 2px var(--danger-soft),  0 1px 3px rgba(0,0,0,.14); }

@keyframes optAvIn{
  from{ opacity:0; transform:scale(.6); }
  to{ opacity:1; transform:none; }
}

@media (max-width:360px){
  .opt-av{ width:23px; height:23px; }
  .opt-av + .opt-av{ margin-left:-10px; }
}

@media (prefers-reduced-motion:reduce){
  .opt-picks{ transition:none; }
  .opt-av{ animation:none; }
}

/* ------------------------------------------------------------ natijalar */
.room-results{ padding-bottom:40px; }
.rr-head{ text-align:center; padding:18px 8px 10px; }
.rr-head-ico{
  width:60px; height:60px; margin:0 auto 12px;
  display:grid; place-items:center; border-radius:20px;
  background:linear-gradient(135deg,#f59e0b,#d97706); color:#fff;
  box-shadow:0 12px 28px rgba(245,158,11,.3);
}
.rr-head h1{ margin:0 0 5px; font-size:21px; font-weight:800; color:var(--text); }
.rr-head p{ margin:0; font-size:13px; color:var(--text-secondary); }

.rr-me{
  display:flex; align-items:center; gap:16px;
  margin-top:14px; padding:16px;
}
.rr-me-rank{ flex:0 0 auto; text-align:center; }
.rr-me-place{
  display:block; font-size:34px; font-weight:900; line-height:1;
  background:linear-gradient(135deg, var(--primary), #7c5cff);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.rr-me-rank small{ font-size:11px; color:var(--text-muted); }
.rr-me-stats{ flex:1; display:flex; gap:10px; }
.rr-me-stats > div{ flex:1; text-align:center; }
.rr-me-stats b{
  display:block; font-size:17px; font-weight:800; color:var(--text);
  font-variant-numeric:tabular-nums;
}
.rr-me-stats small{ font-size:11px; color:var(--text-muted); }

.rr-podium{
  display:flex; align-items:flex-end; justify-content:center; gap:9px;
  margin-top:18px;
}
.rr-pod{
  flex:1; max-width:7.5rem; text-align:center;
  padding:14px 8px 12px; border-radius:var(--radius-lg);
  background:var(--surface); border:1px solid var(--border);
  position:relative;
}
.rr-pod.is-gold{ order:2; padding-top:22px; border-color:#f5b301; box-shadow:0 8px 24px rgba(245,179,1,.18); }
.rr-pod.is-silver{ order:1; }
.rr-pod.is-bronze{ order:3; }
.rr-pod-av{
  display:grid; place-items:center; width:46px; height:46px;
  margin:0 auto 6px; border-radius:50%; overflow:hidden;
  background:var(--surface-muted); color:var(--text-muted);
}
.rr-pod-av img{ width:100%; height:100%; object-fit:cover; display:block; }
.rr-pod-medal{ display:block; font-size:20px; line-height:1; margin-bottom:4px; }
.rr-pod-name{
  display:block; font-size:12.5px; font-weight:700; color:var(--text);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.rr-pod-score{
  display:block; margin-top:3px; font-size:15px; font-weight:800;
  color:var(--primary); font-variant-numeric:tabular-nums;
}

.rr-table{ margin-top:14px; padding:6px; }
.rr-row{
  display:flex; align-items:center; gap:10px;
  padding:9px 8px; border-radius:var(--radius-sm); font-size:13px;
}
.rr-row + .rr-row{ border-top:1px solid var(--hairline); }
.rr-row.is-me{ background:var(--surface-muted); }
.rr-row-rank{
  flex:0 0 auto; width:22px; text-align:center;
  font-weight:800; color:var(--text-muted); font-variant-numeric:tabular-nums;
}
.rr-row-av{
  flex:0 0 auto; width:30px; height:30px; border-radius:50%;
  overflow:hidden; display:grid; place-items:center;
  background:var(--surface-muted); color:var(--text-muted);
}
.rr-row-av img{ width:100%; height:100%; object-fit:cover; display:block; }
.rr-row-name{
  flex:1; min-width:0; font-weight:600; color:var(--text);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.rr-row-correct{ flex:0 0 auto; font-size:12px; color:var(--text-muted); }
.rr-row-score{
  flex:0 0 auto; min-width:3rem; text-align:right;
  font-weight:800; color:var(--primary); font-variant-numeric:tabular-nums;
}

.rr-actions{ display:flex; flex-direction:column; gap:9px; margin-top:20px; }

html.anim-off .rc-num.is-pop,
html.anim-off .rb-verdict{ animation:none; }
@media (prefers-reduced-motion: reduce){
  .rc-num.is-pop, .rb-verdict{ animation:none; }
}

/* =========================================================================
   MAJBURIY OBUNA EKRANI — app.js › renderSubscriptionGate()
   ========================================================================= */

.gate-page{ padding:18px 0 44px; }

.gate-hero{
  display:flex; flex-direction:column; align-items:center; gap:9px;
  text-align:center; margin-bottom:20px;
}
.gate-hero-ico{
  width:74px; height:74px; border-radius:26px; display:grid; place-items:center;
  color:#f59e0b;
  background:linear-gradient(140deg, rgba(245,158,11,.20), rgba(239,68,68,.14));
  border:2px solid rgba(245,158,11,.45);
  box-shadow:0 14px 34px rgba(245,158,11,.20);
  animation:gate-pulse 2.6s ease-in-out infinite;
}
@keyframes gate-pulse{
  0%,100%{ transform:translateY(0); box-shadow:0 14px 34px rgba(245,158,11,.20); }
  50%{ transform:translateY(-3px); box-shadow:0 20px 40px rgba(245,158,11,.30); }
}
.gate-badge{ font-size:11.5px; font-weight:800; letter-spacing:.4px; padding:4px 14px; border-radius:20px; }
.gate-title{ margin:2px 0 0; font-size:21px; font-weight:800; line-height:1.25; color:var(--text); }
.gate-sub{
  margin:0; max-width:34ch; font-size:13.5px; line-height:1.55; color:var(--text-secondary);
}

.gate-steps{
  list-style:none; margin:0 0 16px; padding:0;
  display:flex; flex-direction:column; gap:10px;
}
.gate-steps li{
  display:flex; align-items:flex-start; gap:10px;
  font-size:13px; line-height:1.5; color:var(--text-secondary);
}
.gate-steps li b{ color:var(--text); font-weight:700; }
.gate-steps li span{
  flex:0 0 auto; width:21px; height:21px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  background:var(--primary); color:#fff; font-size:11px; font-weight:700;
}

.gate-list{ display:flex; flex-direction:column; gap:10px; margin-bottom:18px; }

.gate-ch{
  display:flex; align-items:center; gap:12px;
  padding:13px 14px; border-radius:16px; text-decoration:none;
  background:var(--bg-secondary); border:1.5px solid var(--hairline);
  transition:border-color .16s ease, transform .12s ease, background .16s ease;
}
.gate-ch:active{ transform:scale(.985); }
.gate-ch:hover{ border-color:var(--primary); }
.gate-ch.is-opened{ border-color:var(--success,#10b981); background:rgba(16,185,129,.07); }

.gate-ch-ico{
  flex:0 0 auto; width:40px; height:40px; border-radius:13px; display:grid; place-items:center;
  background:rgba(47,123,246,.12); color:var(--primary);
}
.gate-ch.is-opened .gate-ch-ico{ background:rgba(16,185,129,.14); color:var(--success,#10b981); }

.gate-ch-body{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.gate-ch-body b{ font-size:14.5px; font-weight:700; color:var(--text); overflow-wrap:anywhere; }
.gate-ch-body small{ font-size:11.5px; color:var(--text-muted); }

.gate-ch-cta{
  flex:0 0 auto; display:inline-flex; align-items:center; gap:3px;
  font-size:12.5px; font-weight:700; color:var(--primary);
}
.gate-ch.is-opened .gate-ch-cta{ color:var(--success,#10b981); }

.gate-check{ width:100%; font-size:15px; font-weight:800; padding:14px; border-radius:14px; }
.gate-count{ margin:10px 0 0; text-align:center; font-size:11.5px; color:var(--text-muted); }

.spinner-inline{
  display:inline-block; width:16px; height:16px; border-width:2px; vertical-align:-3px;
}

/* Kattaroq ekranlarda kanallar ikki ustunda */
@media (min-width:560px){
  .gate-list{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); }
  .gate-check{ max-width:340px; margin:0 auto; display:flex; }
}

/* =========================================================================
   APPS BO'LIMI — /web-app/apps/apps.js
   ========================================================================= */

.apps-page{ padding-bottom:40px; }

/* ------------------------------------------------------------------ hero */
.apps-hero{
  position:relative; overflow:hidden;
  padding:16px 16px 15px; margin-bottom:14px;
  border-radius:20px;
  background:linear-gradient(140deg, rgba(139,92,246,.16), rgba(47,123,246,.12) 55%, transparent);
  border:1px solid var(--hairline);
}
.apps-hero-glow{
  position:absolute; inset:auto -40px -70px auto; width:190px; height:190px;
  background:radial-gradient(circle, rgba(139,92,246,.35), transparent 68%);
  filter:blur(6px); pointer-events:none;
  animation:apps-glow 7s ease-in-out infinite;
}
@keyframes apps-glow{
  0%,100%{ transform:translate3d(0,0,0) scale(1); opacity:.85 }
  50%{ transform:translate3d(-14px,-10px,0) scale(1.12); opacity:1 }
}

.apps-hero-row{ position:relative; display:flex; align-items:center; gap:12px; }
.apps-hero-ico{
  flex:0 0 auto; width:46px; height:46px; border-radius:15px;
  display:grid; place-items:center; color:#fff;
  background:linear-gradient(135deg,#8b5cf6,#6d28d9);
  box-shadow:0 12px 26px rgba(109,40,217,.32);
}
.apps-hero-txt{ min-width:0; }
.apps-hero-title{ margin:1px 0 0; font-size:22px; font-weight:800; line-height:1.1; color:var(--text); }
.apps-hero-sub{
  position:relative; margin:10px 0 0; font-size:13px; line-height:1.55; color:var(--text-secondary);
}
.apps-hero-stats{ position:relative; display:flex; gap:7px; flex-wrap:wrap; margin-top:11px; }
.apps-hero-chip{
  display:inline-flex; align-items:center; gap:5px;
  padding:5px 11px; border-radius:999px;
  font-size:11.5px; font-weight:700;
  background:rgba(139,92,246,.14); color:#8b5cf6;
}
.apps-hero-chip.is-soft{ background:var(--bg-secondary); color:var(--text-muted); }

/* ------------------------------------------------------- kategoriyalar */
.apps-cats{
  display:flex; gap:7px; overflow-x:auto; padding-bottom:10px; margin-bottom:4px;
  -webkit-overflow-scrolling:touch; scrollbar-width:none;
}
.apps-cats::-webkit-scrollbar{ display:none; }
.apps-cat{
  flex:none; padding:7px 14px; border-radius:999px; cursor:pointer; white-space:nowrap;
  font-size:12.5px; font-weight:600;
  background:var(--bg-secondary); color:var(--text-secondary);
  border:1px solid var(--hairline);
  transition:background .15s ease, color .15s ease, border-color .15s ease, transform .12s ease;
}
.apps-cat:active{ transform:scale(.96); }
.apps-cat.is-active{ background:var(--primary); color:#fff; border-color:var(--primary); }

/* --------------------------------------------------------- kartochkalar */
.apps-grid{
  display:grid; gap:10px;
  grid-template-columns:repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.apps-grid.is-enter > *{ animation:apps-in .28s ease both; }
.apps-grid.is-enter > *:nth-child(2){ animation-delay:.04s }
.apps-grid.is-enter > *:nth-child(3){ animation-delay:.08s }
.apps-grid.is-enter > *:nth-child(4){ animation-delay:.12s }
.apps-grid.is-enter > *:nth-child(5){ animation-delay:.16s }
.apps-grid.is-enter > *:nth-child(6){ animation-delay:.2s }
@keyframes apps-in{ from{ opacity:0; transform:translateY(8px) } to{ opacity:1; transform:none } }

.apps-card{
  position:relative; display:flex; align-items:center; gap:12px;
  width:100%; text-align:left; cursor:pointer;
  padding:14px 13px; border-radius:18px;
  background:var(--bg-secondary); border:1.5px solid var(--hairline);
  transition:border-color .16s ease, transform .12s ease, box-shadow .16s ease;
}
.apps-card:hover{ border-color:var(--primary); box-shadow:0 10px 24px rgba(15,23,42,.10); }
.apps-card:active{ transform:scale(.985); }
.apps-card.is-shake{ animation:apps-shake .42s ease; }
@keyframes apps-shake{
  0%,100%{ transform:translateX(0) } 25%{ transform:translateX(-4px) }
  60%{ transform:translateX(4px) } 85%{ transform:translateX(-2px) }
}

.apps-card-ico{
  flex:0 0 auto; width:46px; height:46px; border-radius:15px;
  display:grid; place-items:center; color:#fff;
}
.tone-violet .apps-card-ico, .apps-soon-ico.tone-violet{ background:linear-gradient(135deg,#8b5cf6,#6d28d9); }
.tone-blue   .apps-card-ico, .apps-soon-ico.tone-blue  { background:linear-gradient(135deg,#3b82f6,#1d4ed8); }
.tone-green  .apps-card-ico, .apps-soon-ico.tone-green { background:linear-gradient(135deg,#10b981,#059669); }
.tone-amber  .apps-card-ico, .apps-soon-ico.tone-amber { background:linear-gradient(135deg,#f59e0b,#d97706); }

.apps-card-txt{ flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; padding-right:52px; }
.apps-card-txt b{ font-size:14.5px; font-weight:700; color:var(--text); overflow-wrap:anywhere; }
.apps-card-txt small{ font-size:11.5px; line-height:1.4; color:var(--text-muted); }
.apps-card-arrow{ flex:0 0 auto; color:var(--text-muted); }

.apps-card-badge{
  position:absolute; top:10px; right:10px;
  display:inline-flex; align-items:center; gap:4px;
  padding:3px 9px; border-radius:999px;
  font-size:10px; font-weight:800; letter-spacing:.2px;
  background:rgba(245,158,11,.16); color:#f59e0b;
}
.apps-card.is-soon{ opacity:.97; }
.apps-card-badge.is-live{ background:rgba(16,185,129,.16); color:#10b981; }
.apps-card.is-live{ border-color:rgba(16,185,129,.35); }
.apps-card.is-live:hover{ border-color:#10b981; }
.apps-hero-chip.is-live{ background:rgba(16,185,129,.14); color:#10b981; }
.apps-card.is-soon .apps-card-ico{ filter:saturate(.85); }

/* -------------------------------------------------------------- izoh */
.apps-note{
  display:flex; align-items:flex-start; gap:8px; margin-top:16px; padding:12px 13px;
  border-radius:14px; background:var(--bg-secondary); border:1px dashed var(--hairline);
  font-size:11.5px; line-height:1.5; color:var(--text-muted);
}
.apps-note svg{ flex:0 0 auto; margin-top:1px; opacity:.7; }

/* ------------------------------------------------- «Tez kunda» oynasi */
.apps-soon{ text-align:center; padding:6px 2px 2px; }
.apps-soon-ico{
  position:relative; width:76px; height:76px; border-radius:26px;
  display:grid; place-items:center; color:#fff; margin:0 auto 14px;
}
.apps-soon-pulse{
  position:absolute; inset:-6px; border-radius:30px;
  border:2px solid currentColor; opacity:.35;
  animation:apps-pulse 2.2s ease-out infinite;
}
@keyframes apps-pulse{
  0%{ transform:scale(.92); opacity:.45 }
  70%{ transform:scale(1.12); opacity:0 }
  100%{ opacity:0 }
}
.apps-soon-badge{ font-size:11.5px; font-weight:800; padding:4px 13px; border-radius:20px; }
.apps-soon-title{ margin:10px 0 4px; font-size:19px; font-weight:800; color:var(--text); }
.apps-soon-sub{ margin:0 0 14px; font-size:13px; color:var(--text-secondary); }
.apps-soon-box{
  display:flex; align-items:flex-start; gap:8px; text-align:left;
  padding:12px 13px; margin-bottom:16px; border-radius:14px;
  background:rgba(139,92,246,.10); border:1px solid rgba(139,92,246,.22);
  font-size:12.5px; line-height:1.55; color:var(--text-secondary);
}
.apps-soon-box svg{ flex:0 0 auto; margin-top:1px; color:#8b5cf6; }

/* Animatsiya o'chirilgan rejim */
.anim-off .apps-hero-glow,
.anim-off .apps-soon-pulse,
.anim-off .apps-grid.is-enter > *,
.anim-off .apps-card.is-shake{ animation:none; }

/* Sahifa almashinuvi — startViewTransition o'rniga (u ekranni muzlatardi) */
.page-enter{ animation:page-enter .3s cubic-bezier(.22,1,.36,1) both; }
@keyframes page-enter{
  from{ opacity:0; transform:translate3d(0,10px,0); }
  to{ opacity:1; transform:none; }
}
.anim-off .page-enter{ animation:none; }

/* =========================================================================
   PROFIL: BALANS va REFERAL (profil kartochkasi tarkibida)
   ========================================================================= */

.prof-wallet{
  margin-top:12px; padding:14px; border-radius:18px;
  background:linear-gradient(140deg, rgba(16,185,129,.10), rgba(59,130,246,.07));
  border:1px solid var(--hairline);
}
.prof-wallet-main{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.prof-wallet-lbl{ display:block; font-size:11px; color:var(--text-muted); }
.prof-wallet-val{ display:block; font-size:24px; font-weight:800; color:var(--text); line-height:1.2; }
.prof-wallet-grid{
  display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:12px 0 10px;
}
.prof-wallet-grid div{
  padding:9px 8px; border-radius:12px; text-align:center;
  background:color-mix(in srgb, var(--bg-secondary) 80%, transparent);
}
.prof-wallet-grid span{ display:block; font-size:10px; color:var(--text-muted); }
.prof-wallet-grid b{ display:block; font-size:13.5px; font-weight:800; color:var(--text); margin-top:2px; }
.prof-wallet-actions{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.prof-wallet-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:10px 8px; border-radius:12px; cursor:pointer;
  font-size:12px; font-weight:700; color:var(--text-secondary);
  background:var(--bg-secondary); border:1px solid var(--hairline);
}
.prof-wallet-btn:hover{ color:var(--primary); border-color:var(--primary); }

/* Sheet ichidagi balans/referal bloklari */
.pw-sheet .field{ margin-top:12px; }
.pw-preset{ display:grid; grid-template-columns:repeat(4,1fr); gap:7px; margin-top:12px; }
.pw-preset-btn{
  padding:9px 4px; border-radius:12px; cursor:pointer; font-size:11.5px; font-weight:700;
  background:var(--bg-secondary); border:1px solid var(--hairline); color:var(--text-secondary);
}
.pw-preset-btn.is-active{ background:var(--primary); color:#fff; border-color:var(--primary); }

.pw-ref-stats{ display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin:12px 0; }
.pw-ref-stats div{
  padding:10px 6px; border-radius:12px; text-align:center;
  background:var(--bg-secondary); border:1px solid var(--hairline);
}
.pw-ref-stats b{ display:block; font-size:16px; font-weight:800; color:var(--text); }
.pw-ref-stats span{ font-size:10px; color:var(--text-muted); }
.pw-link{
  padding:11px 12px; border-radius:12px; overflow-x:auto;
  background:var(--bg-secondary); border:1px solid var(--hairline);
}
.pw-link code{ font-size:11.5px; color:var(--primary); white-space:nowrap; }
.pw-ref-actions{ display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:12px; }
.pw-note{
  display:flex; align-items:flex-start; gap:6px; margin:12px 0 0;
  font-size:11.5px; line-height:1.5; color:var(--text-muted);
}
.pw-ref-list{ display:flex; flex-direction:column; gap:8px; margin-top:14px; }
.pw-ref-row{
  display:flex; align-items:center; gap:10px; padding:10px 11px; border-radius:13px;
  background:var(--bg-secondary); border:1px solid var(--hairline);
}
.pw-ref-row > div{ flex:1; min-width:0; }
.pw-ref-row b{ display:block; font-size:13px; color:var(--text); }
.pw-ref-row small{ font-size:10.5px; color:var(--text-muted); }
.pw-ref-av{
  width:32px; height:32px; border-radius:11px; display:grid; place-items:center;
  font-size:13px; font-weight:800; color:#fff; background:linear-gradient(135deg,#3b82f6,#1d4ed8);
}
.pw-ref-badge{
  padding:3px 9px; border-radius:999px; font-size:10px; font-weight:800;
  background:rgba(245,158,11,.14); color:#f59e0b;
}
.pw-ref-badge.is-ok{ background:rgba(16,185,129,.14); color:#10b981; }

.pw-tx-list{ display:flex; flex-direction:column; gap:8px; margin-top:12px; }
.pw-tx{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:11px 12px; border-radius:13px;
  background:var(--bg-secondary); border:1px solid var(--hairline);
}
.pw-tx b{ display:block; font-size:12.5px; color:var(--text); }
.pw-tx small{ font-size:10.5px; color:var(--text-muted); }
.pw-tx .is-in{ color:#10b981; font-weight:800; font-size:13px; }
.pw-tx .is-out{ color:#ef4444; font-weight:800; font-size:13px; }

/* =========================================================================
   CHECKOUT: balansdan to'lash tanlovi
   ========================================================================= */

.co-balance{ padding:16px; }
.co-balance-head{ display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.co-balance-ico{
  width:44px; height:44px; border-radius:15px; display:grid; place-items:center;
  color:#fff; background:linear-gradient(135deg,#10b981,#059669);
}
.co-balance-head b{ display:block; font-size:12px; color:var(--text-muted); font-weight:600; }
.co-balance-head p{ margin:2px 0 0; font-size:20px; font-weight:800; color:var(--text); }
.co-rows{ display:flex; flex-direction:column; gap:9px; }
.co-row{ display:flex; align-items:center; justify-content:space-between; font-size:13px; color:var(--text-secondary); }
.co-row b{ color:var(--text); font-weight:700; }
.co-row.is-total{
  padding-top:9px; margin-top:2px; border-top:1px dashed var(--hairline); font-size:14px;
}
.co-row.is-total b{ color:var(--primary); font-size:16px; font-weight:800; }
.co-mixed{ margin:12px 0 0; font-size:11.5px; color:var(--text-muted); text-align:center; }
