/* Eski Musofir AI web chat (Musofir AI/public/index.html) uslubi — o'zgarishsiz ko'chirildi. Qo'shimchalar faylning oxirida. */

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

:root {
  --surface:  #13213c;
  --surface2: #1b2b4a;
  --text:   #f1f5f9;
  --muted:  #94a3b8;
  --accent: #3b82f6;
  --green:  #34d399;
  --amber:  #fbbf24;
  --border: rgba(120, 155, 215, 0.24);
  --hero: linear-gradient(120deg, #8b5cf6 0%, #6d8bf7 50%, #4cc4f5 100%);
  --brand: linear-gradient(110deg, #2f6fed, #38a8f8);
}

html, body { height: 100%; overflow: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0b1630;
  color: var(--text);
  display: flex;
  flex-direction: column;
}

.screen { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.hidden { display: none !important; }

/* ========== PROFILE SCREEN ========== */
.p-shell {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 14px; display: flex; flex-direction: column; gap: 12px;
}

.brand { text-align: center; padding: 10px 0 4px; }

.brand-logo {
  font-size: 26px; font-weight: 800; letter-spacing: -0.5px;
  background: linear-gradient(110deg, var(--accent), var(--green));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-img { display: block; width: min(320px, 80vw); height: auto; margin: 0 auto; }
.brand-tag { font-size: 12px; color: var(--muted); margin-top: 3px; }

.step-bar { display: flex; gap: 5px; justify-content: center; }

.sdot {
  height: 4px; border-radius: 2px; background: var(--border);
  transition: all 0.3s ease; flex: 1; max-width: 36px;
}
.sdot.done   { background: var(--accent); }
.sdot.active { background: rgba(59,130,246,0.5); }

.step-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 22px; padding: 22px 18px 18px;
  backdrop-filter: blur(16px); flex: 1;
}

.step-meta {
  font-size: 11px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 8px;
}

.step-q { font-size: 19px; font-weight: 700; line-height: 1.3; margin-bottom: 20px; }

.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.opt-grid.c1 { grid-template-columns: 1fr; }

.opt-btn {
  background: var(--surface2); border: 1.5px solid var(--border);
  color: var(--text); border-radius: 15px; padding: 13px 10px;
  cursor: pointer; text-align: center; font-size: 13px; font-weight: 500;
  font-family: inherit; transition: border-color .15s, background .15s, transform .1s;
  display: flex; flex-direction: column; align-items: center; gap: 5px; user-select: none;
}
.opt-icon { font-size: 22px; }
.opt-btn:hover { border-color: rgba(59,130,246,.55); }
.opt-btn.sel {
  border-color: var(--accent); background: rgba(59,130,246,0.16); transform: scale(0.98);
}

.date-inp {
  width: 100%; background: var(--surface2); border: 1.5px solid var(--border);
  color: var(--text); border-radius: 15px; padding: 15px 16px;
  font-size: 15px; font-family: inherit; color-scheme: dark;
}
.date-inp:focus { outline: none; border-color: var(--accent); }

.nav-row { display: flex; gap: 10px; margin-top: 18px; }

.btn-back {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--muted); border-radius: 14px; padding: 14px 18px;
  cursor: pointer; font-size: 14px; font-family: inherit;
}

.btn-next {
  flex: 1; background: var(--brand);
  border: none; color: white; border-radius: 14px; padding: 14px;
  cursor: pointer; font-size: 15px; font-weight: 600; font-family: inherit;
}
.btn-next:disabled { opacity: 0.35; cursor: not-allowed; }

/* ========== CHAT SCREEN ========== */
.c-shell {
  flex: 1; display: flex; flex-direction: column;
  min-height: 0; padding: 10px 10px 0; gap: 8px; overflow: hidden;
}

.c-header {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; backdrop-filter: blur(14px);
}

.c-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--green));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}

.c-head-text { flex: 1; min-width: 0; }
.c-name  { font-weight: 700; font-size: 14px; }
.c-sub   {
  font-size: 11px; color: var(--muted); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.c-edit {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--muted); border-radius: 10px; padding: 5px 10px;
  font-size: 11px; cursor: pointer; flex-shrink: 0; font-family: inherit;
}

.c-msgs {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 8px; padding: 2px 0 4px;
}

.msg { display: flex; animation: msgIn .22s ease; }

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

.msg.user      { justify-content: flex-end; }
.msg.assistant { justify-content: flex-start; }

.bubble {
  max-width: 80%; padding: 10px 14px; border-radius: 18px;
  font-size: 14px; line-height: 1.55; word-break: break-word; white-space: pre-wrap;
}

.msg.user .bubble {
  background: var(--brand);
  color: white; border-bottom-right-radius: 5px;
}

.msg.assistant .bubble {
  background: var(--surface); border: 1px solid var(--border);
  border-bottom-left-radius: 5px;
}

.att-tag {
  font-size: 11px; color: rgba(255,255,255,.75);
  background: rgba(255,255,255,.12); border-radius: 7px;
  padding: 2px 7px; margin-bottom: 5px; display: inline-block;
}

.dots { display: flex; gap: 5px; align-items: center; }
.dots span {
  width: 7px; height: 7px; background: var(--muted); border-radius: 50%;
  animation: blink 1.4s infinite;
}
.dots span:nth-child(2) { animation-delay: .2s; }
.dots span:nth-child(3) { animation-delay: .4s; }

@keyframes blink {
  0%,80%,100% { opacity: .25; transform: scale(.85); }
  40%          { opacity: 1;   transform: scale(1); }
}

.empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; gap: 14px; padding: 20px;
}

.empty-ico  { font-size: 44px; opacity: .45; }
.empty-hint { font-size: 13px; color: var(--muted); line-height: 1.5; }

.quick-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

.qbtn {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); border-radius: 999px; padding: 7px 13px;
  font-size: 12px; cursor: pointer; font-family: inherit;
}
.qbtn:hover { border-color: var(--accent); color: var(--accent); }

.att-bar {
  display: none; background: rgba(56,189,248,.08);
  border: 1px solid rgba(56,189,248,.22); border-radius: 12px;
  padding: 8px 12px; font-size: 12px; color: var(--accent);
  align-items: center; gap: 8px; flex-shrink: 0;
}
.att-bar.show { display: flex; }
.att-bar span { flex: 1; }

.att-rm {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 15px; padding: 0; line-height: 1;
}

.err-bar {
  flex-shrink: 0; background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.25); color: #fca5a5;
  border-radius: 10px; padding: 7px 12px; font-size: 12px;
}

.c-inp {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 8px 8px 8px 10px;
  display: flex; gap: 6px; align-items: flex-end;
  flex-shrink: 0; margin-bottom: 10px; backdrop-filter: blur(14px);
}

.file-btn {
  background: none; border: none; color: var(--muted);
  font-size: 20px; cursor: pointer; padding: 6px;
  display: flex; align-items: center; flex-shrink: 0; line-height: 1;
}
.file-btn:hover { color: var(--accent); }

.c-ta {
  flex: 1; background: none; border: none; color: var(--text);
  font-size: 14px; font-family: inherit; resize: none;
  max-height: 100px; padding: 6px 0; line-height: 1.45;
}
.c-ta:focus { outline: none; }
.c-ta::placeholder { color: var(--muted); }

.send-btn {
  background: linear-gradient(135deg, var(--accent), var(--green));
  border: none; border-radius: 12px; width: 36px; height: 36px;
  color: white; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: opacity .2s;
}
.send-btn:disabled { opacity: .35; cursor: not-allowed; }
  
/* ===== Yangi loyiha qo'shimchalari ===== */
html, body { background-color: #0b1630; }
.c-actions { display: flex; gap: 6px; flex-shrink: 0; }
.c-act {
  background: var(--surface2); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 6px 9px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.c-act.sos { border-color: rgba(239,68,68,.45); color: #fecaca; }

.bubble a { color: var(--accent); }
.msg.user .bubble a { color: white; }
.sources { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); white-space: normal; }
.sources a { color: var(--accent); text-decoration: none; }

.card-title { font-weight: 700; margin-bottom: 6px; }
.card-list { margin: 4px 0 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; white-space: normal; }
.card-btns { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.card-btn {
  background: var(--surface2); border: 1px solid var(--border); color: var(--text);
  border-radius: 12px; padding: 10px 12px; font-size: 14px; cursor: pointer; font-family: inherit; text-align: center;
  text-decoration: none; display: block;
}
.card-btn.primary { background: var(--brand); color: white; border: none; font-weight: 700; }
.card-btn:disabled { opacity: .45; cursor: default; }
/* 💳 To'lov tizimi tanlovi (Payme / Click) — narx kartasida, tugmalar ustida. */
.pay-provider { display: flex; gap: 6px; margin-top: 10px; }
.pay-prov {
  background: var(--surface2); border: 1px solid var(--border); color: var(--muted);
  border-radius: 10px; padding: 7px 14px; font: inherit; font-size: 13px; cursor: pointer;
}
.pay-prov.on { color: var(--text); border-color: var(--accent); font-weight: 600; }
/* To'lov kartasidagi qisqa holat satri: "Payme ochilmoqda", "To'lov qabul qilindi". */
.card-note:empty { display: none; }
.card-note { margin-top: 8px; font-size: 13px; color: var(--muted); white-space: normal; }
.sos-html { white-space: pre-wrap; }

.mic-btn {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 12px;
  width: 36px; height: 36px; color: var(--text); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.mic-btn.rec { background: #ef4444; border-color: #ef4444; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.5); } 50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); } }
.hidden-input { display: none; }

/* Logotip ikonkasi (chat sarlavhasi) — gradient doira o'rniga */
img.c-avatar { background: none; object-fit: contain; }

/* 💬 Fikr va 👍👎 */
.rate-row { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.rate-btn { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 4px 10px; font-size: 15px; cursor: pointer; }
.rate-btn:hover { border-color: var(--accent); }
.fb-done { font-size: 13px; color: var(--muted); margin-top: 6px; }
.fb-box { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.fb-ta { width: 100%; min-height: 56px; }
.fb-stars, .fb-btns { flex-direction: row; }
.fb-stars .card-btn, .fb-btns .card-btn { flex: 1; }
.fb-stars .card-btn { padding: 8px 4px; }

/* 💬 AI yordamchi */
.empty-note { font-size: 12px; color: var(--muted); line-height: 1.45; max-width: 320px; opacity: .85; }
.src-date { color: var(--muted); }

/* 🌐 Tarjimon */
.tr-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; flex-shrink: 0; }
.tr-side {
  background: var(--surface); border: 1.5px solid var(--border); color: var(--muted);
  border-radius: 12px; padding: 9px 6px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.tr-side.sel { border-color: var(--accent); color: var(--text); background: rgba(59,130,246,0.16); }
.tr-bubble { max-width: 92%; }
.tr-orig { font-size: 12px; opacity: .75; margin-bottom: 4px; }
.tr-out { font-size: 20px; font-weight: 700; line-height: 1.35; }

/* Pastki menyu: Asosiy · AI chat · Yangiliklar · Profil */
.screen { height: auto; flex: 1; min-height: 0; }
.tab-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); flex-shrink: 0;
  background: var(--surface); border-top: 1px solid var(--border); backdrop-filter: blur(14px);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tab {
  position: relative; background: none; border: none; color: var(--muted); font-family: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 4px;
}
.tab .ic { width: 24px; height: 24px; }
.tab.sel::before {
  content: ""; position: absolute; top: -7px; left: 22%; right: 22%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent);
}
.tab-lbl { font-size: 12px; white-space: nowrap; }
.tab.sel { color: var(--accent); }
.acc-val { color: var(--muted); font-size: 12px; text-align: right; }
/* 💳 Profildagi obuna qatori: bosilmaydi; faol obuna ajralib turadi. */
.h-row.plan-on { border-color: var(--accent); }
#accPlan .h-row { cursor: default; }
.acc-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.acc-inp {
  background: var(--surface2); border: 1.5px solid var(--border); color: var(--text);
  border-radius: 12px; padding: 11px 12px; font-size: 14px; font-family: inherit; width: 100%;
}
.acc-inp:focus { outline: none; border-color: var(--accent); }
.acc-inp::placeholder { color: var(--muted); opacity: .7; }
.acc-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.acc-opt {
  background: var(--surface2); border: 1.5px solid var(--border); color: var(--text);
  border-radius: 12px; padding: 10px; font-size: 14px; cursor: pointer; font-family: inherit;
}
.acc-opt.sel { border-color: var(--accent); background: rgba(59,130,246,0.16); }

/* 📝 Hujjat tayyorlash: tanlov ro'yxati va tayyor matn. */
.pk-hint { text-align: left; display: block; margin-top: 3px; white-space: normal; }
.paper-text {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; margin: 10px 0 0; font-family: inherit; font-size: 14px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word; color: var(--text);
}
/* Tayyor hujjat matni tahrirlanadi: ko'rinishi bir xil, lekin yozish mumkin. */
textarea.paper-edit {
  width: 100%; display: block; box-sizing: border-box; resize: vertical; min-height: 220px;
  -webkit-appearance: none; appearance: none;
}
textarea.paper-edit:focus { outline: none; border-color: var(--accent, var(--border)); }

#gScreen .acc-field { margin-top: 10px; }
#gScreen textarea.acc-inp { resize: vertical; min-height: 92px; }


/* Ikonkalar */
.ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* Umumiy bo'laklar */
.chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 12px; font-size: 14px; color: var(--text); max-width: 100%;
}
.chip:empty { display: none; }
.icon-btn {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0; cursor: pointer; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.icon-btn.accent { color: #7cc4fb; border-color: var(--accent); }
.note-chip {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; font-size: 13px; line-height: 1.35; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 7px 11px;
}
.note-chip .ic { font-size: 15px; }
.ai-note { font-size: 11px; font-weight: 400; line-height: 1.3; opacity: .6; margin-top: 6px; }

/* 🏠 Bosh sahifa */
.h-shell {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 16px 24px; display: flex; flex-direction: column; gap: 22px;
}
.h-top { display: flex; align-items: center; gap: 12px; }
.h-logo { width: 62px; height: 62px; border-radius: 50%; object-fit: contain; flex-shrink: 0; }
.h-brand { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.sos-btn {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0; cursor: pointer; font-family: inherit;
  background: #f87171; color: #450a0a; border: none; border-radius: 999px; padding: 12px 16px; font-size: 16px; font-weight: 800;
}
.sos-btn .ic { font-size: 20px; }
.h-ask {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  background: var(--hero); color: white; border-radius: 22px; padding: 18px 76px 20px 18px; cursor: pointer;
  box-shadow: 0 10px 34px rgba(109, 116, 247, .32);
}
.h-ask-ico {
  width: 54px; height: 54px; border-radius: 15px; background: rgba(255,255,255,.2); font-size: 28px;
  display: flex; align-items: center; justify-content: center;
}
.h-ask b { font-size: 26px; line-height: 1.2; }
.h-ask small { font-size: 16px; line-height: 1.35; opacity: .92; }
.h-ask-mic {
  position: absolute; right: 16px; bottom: 18px; width: 58px; height: 58px; border-radius: 50%; border: none;
  background: white; color: #16233f; font-size: 26px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.h-sec { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.h-sec-head { font-weight: 700; font-size: 21px; line-height: 1.25; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.h-more { background: none; border: none; color: #60a5fa; font-size: 16px; cursor: pointer; font-family: inherit; flex-shrink: 0; }
.h-note { font-size: 13px; color: var(--muted); line-height: 1.45; }
/* Huquqiy hujjatlar bosh sahifaning eng pastida — kichik va bosinqiramaydigan. */
.h-legal { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; padding: 4px 0 2px; }
.h-legal a { color: var(--muted); font-size: 12px; text-decoration: none; border-bottom: 1px solid transparent; }
.h-legal a:hover, .h-legal a:focus-visible { border-bottom-color: var(--muted); }
.h-note:empty { display: none; }
.h-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.h-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 148px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 18px;
  padding: 16px 10px; font-size: 17px; font-weight: 600; line-height: 1.25; cursor: pointer; font-family: inherit; text-align: center;
}
.h-tile-ico { font-size: 46px; line-height: 1; display: flex; color: #38bdf8; }
#remTile .h-tile-ico { color: var(--amber); }
.h-list { display: flex; flex-direction: column; gap: 10px; }
.h-row {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 14px; padding: 15px 14px; font-size: 16px; font-weight: 600; cursor: pointer; font-family: inherit; line-height: 1.35;
}
.h-row > span:first-child { flex: 1; min-width: 0; }
.h-row-go { color: var(--muted); font-size: 20px; display: flex; }
/* Skaner o'zi qo'ygan eslatma: ko'rsatish uchun, bosilmaydi. */
.h-row-flat { cursor: default; }
.h-rem { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; }
.h-rem-ico {
  width: 46px; height: 46px; border-radius: 12px; background: rgba(251,191,36,.14); color: var(--amber); font-size: 23px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.h-rem-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.h-rem-text b { font-size: 17px; font-weight: 600; }
.h-rem-text small { font-size: 14px; color: var(--muted); }
.h-rem-left { background: rgba(251,191,36,.18); color: var(--amber); border-radius: 999px; padding: 6px 11px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.h-rem.soon { border-color: rgba(251,191,36,.55); }

/* Yashash · Ishlash · O'qish */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px; }
.seg-btn { background: none; border: none; color: var(--muted); border-radius: 999px; padding: 11px 6px; font-size: 16px; font-weight: 600; cursor: pointer; font-family: inherit; }
.seg-btn.sel { background: var(--brand); color: white; }
.h-checks { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 6px 14px; }
.h-check {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: none; color: var(--text);
  padding: 11px 0; font-size: 16px; line-height: 1.3; cursor: pointer; font-family: inherit;
}
.h-check-ok { width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #052e22; font-size: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.h-check-ok .ic { stroke-width: 3; }
.h-fold { background: none; border: none; color: #60a5fa; font-family: inherit; font-size: 15px; padding: 4px 2px; cursor: pointer; align-self: flex-start; }
.h-fold::after { content: " ▾"; }
.h-fold.open::after { content: " ▴"; }

/* 📰 Yangiliklar */
.n-cover { display: block; width: 100%; height: 132px; border-radius: 12px; object-fit: cover; background: #c9defc; }
.n-title { font-weight: 700; font-size: 17px; line-height: 1.3; }
.n-meta { font-size: 13px; color: var(--muted); line-height: 1.35; }
.n-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.h-news-row { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
.h-news-row::-webkit-scrollbar, .n-chips::-webkit-scrollbar { display: none; }
.n-mini {
  flex: 0 0 72%; max-width: 270px; display: flex; flex-direction: column; gap: 8px; text-align: left; scroll-snap-align: start; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 10px; color: var(--text); font-family: inherit;
}
.n-chips { display: flex; gap: 8px; overflow-x: auto; margin: -8px -16px; padding: 0 16px; scrollbar-width: none; flex-shrink: 0; }
.n-chips:empty { display: none; }
.n-cat { flex-shrink: 0; background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 999px; padding: 8px 14px; font-size: 15px; cursor: pointer; font-family: inherit; }
.n-cat.sel { background: var(--brand); border-color: transparent; color: white; }
.n-list { display: flex; flex-direction: column; gap: 12px; }
.n-feat, .n-row {
  display: flex; text-align: left; width: 100%; cursor: pointer; font-family: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 10px;
}
.n-feat { flex-direction: column; gap: 12px; }
.n-feat .n-cover { height: 164px; }
.n-feat .n-title { font-size: 21px; }
.n-row { gap: 12px; align-items: center; }
.n-row .n-cover { width: 88px; height: 88px; flex-shrink: 0; }
.n-feat.high, .n-row.high { border-color: rgba(251,191,36,.55); }
.n-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.n-chip { align-self: flex-start; background: var(--surface2); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; color: #7cc4fb; font-size: 14px; }
.n-link { font-size: 15px; color: #60a5fa; text-decoration: none; align-self: flex-start; }
.n-empty { color: var(--muted); font-size: 15px; text-align: center; padding: 30px 10px; }
.n-note { font-size: 12px; color: var(--muted); line-height: 1.5; padding: 2px; }
.n-note a { color: #60a5fa; text-decoration: none; }
.d-body { display: flex; flex-direction: column; gap: 14px; }
.d-body .n-cover { height: 200px; border-radius: 16px; }
.d-title { font-size: 28px; line-height: 1.2; font-weight: 800; }
.d-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--muted); }
.d-meta span { display: inline-flex; align-items: center; gap: 6px; }
.d-text { font-size: 17px; line-height: 1.55; white-space: pre-wrap; }
.d-ask { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 10px 12px; font-size: 15px; line-height: 1.3; }
.d-ask img { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.d-ask span { flex: 1; min-width: 0; }
.d-ask-btn { flex-shrink: 0; border: none; border-radius: 999px; padding: 11px 14px; color: white; font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer; background: var(--hero); }

/* 💬 AI chat */
.c-shell { padding: 14px 14px 0; gap: 10px; }
.c-top { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.c-top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0; }
.c-title { font-size: 28px; font-weight: 800; line-height: 1.2; }
.new-btn {
  display: inline-flex; align-items: center; gap: 6px; border: none; border-radius: 12px; padding: 10px 14px; color: white; flex-shrink: 0;
  background: var(--brand); font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer;
}
.new-btn .ic { font-size: 18px; }
.empty { justify-content: flex-start; gap: 14px; padding: 18px 0 4px; }
.ai-orb {
  position: relative; width: 112px; height: 112px; border-radius: 50%; margin-top: auto; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 800; color: white;
  background: linear-gradient(135deg, #a78bfa, #4cc4f5); box-shadow: 0 0 44px rgba(109, 116, 247, .5);
}
.ai-orb-star { position: absolute; top: -6px; right: -8px; font-size: 34px; color: #a78bfa; display: flex; }
.empty-hint {
  font-size: 16px; color: var(--text); line-height: 1.4; max-width: 330px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px;
}
.empty .note-chip { align-self: center; }
.ex-sec { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: auto; text-align: left; }
.ex-head { font-size: 14px; color: var(--muted); }
.ex-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ex-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; cursor: pointer; font-family: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 10px; color: var(--text); font-size: 14px; line-height: 1.3;
}
.ex-ico { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.ex-card.blue .ex-ico { background: rgba(56,189,248,.16); color: #38bdf8; }
.ex-card.red .ex-ico { background: rgba(248,113,113,.16); color: #f87171; }
.ex-card.amber .ex-ico { background: rgba(251,191,36,.16); color: var(--amber); }
.ex-card.amber { border-color: rgba(251,191,36,.45); }
.msg { gap: 8px; align-items: flex-start; }
.msg-ava { width: 34px; height: 34px; border-radius: 10px; object-fit: contain; flex-shrink: 0; }
.msg-col { display: flex; flex-direction: column; gap: 8px; max-width: 86%; min-width: 0; }
.msg.user .msg-col { align-items: flex-end; }
.msg-col .bubble { max-width: 100%; }
.bubble { font-size: 16px; }
.bubble.tr-bubble { font-size: 14px; }
.msg-col > .rate-row, .msg-col > .fb-box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 8px 12px; margin: 0; }
.rate-row { justify-content: flex-start; }
.rate-q { flex: 1; font-size: 15px; }
.rate-btn { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; padding: 0; color: var(--amber); font-size: 19px; }
.c-inp { border-radius: 999px; padding: 6px 6px 6px 8px; align-items: center; }
.c-ta { font-size: 16px; }
.file-btn { font-size: 22px; }
.mic-btn { background: var(--surface2); border: none; border-radius: 50%; width: 42px; height: 42px; font-size: 20px; }
.send-btn { background: var(--hero); border-radius: 50%; width: 44px; height: 44px; font-size: 19px; }

/* ⏰ Eslatmalar sahifasi */
#remList .h-rem { cursor: pointer; }
.r-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.r-date { color-scheme: dark; min-height: 46px; }
.r-del { background: none; border: none; color: var(--muted); font-size: 20px; padding: 6px; cursor: pointer; display: flex; flex-shrink: 0; }
.h-rem-text b { overflow-wrap: anywhere; }

/* 💬 Izoh qutisi: yozadigan joy aniq ko'rinadi */
.fb-title { font-size: 15px; font-weight: 600; }
.fb-box { gap: 10px; }
.fb-ta {
  flex: none; width: 100%; min-height: 76px; max-height: 160px; padding: 11px 12px; font-size: 16px;
  background: var(--surface2); border: 1.5px solid var(--border); border-radius: 12px;
}
.fb-ta:focus { border-color: var(--accent); }
.step-note { margin-top: 12px; }
