/* Aldamuratov AI — logodagi ranglar: terrakota, krem, bej */
:root {
  --brand: #b95b2e;
  --brand-2: #d0743f;
  --brand-soft: #f3e3d6;
  --cream: #faf7f1;
  --bg: #ece8de;
  --card: #fbf9f4;
  --ink: #2b231e;
  --muted: #8a7d72;
  --line: #e2dbcf;
  --green: #4f9a63;
  --green-soft: #dcefe0;
  --red: #c4513f;
  --red-soft: #f6dcd6;
  --amber: #c98a2b;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(60, 40, 20, 0.06), 0 6px 20px rgba(60, 40, 20, 0.06);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --on-ink: #faf7f1;   /* to'q (ink) fon ustidagi matn */
  --field: #faf7f1;    /* kiritiş maydonlari, variantlar */
  --panel: #faf7f1;    /* yon panellar, ustunlar */
  --on-color: #fff;    /* yaşil/qizil fon ustidagi matn */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #c4612f;
    --brand-2: #e3884f;
    --brand-soft: #3a2a20;
    --cream: #f3ede4;
    --bg: #171310;
    --card: #221c18;
    --ink: #f3ede4;
    --muted: #a99c90;
    --line: #342b25;
    --green: #6cbf82;
    --green-soft: #1f3324;
    --red: #e07060;
    --red-soft: #3a211d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --on-ink: #171310;
    --field: #1a1512;
    --panel: #1c1713;
    --on-color: #14100d;
  }
}
:root[data-theme="dark"] {
  --brand: #c4612f; --brand-2: #e3884f; --brand-soft: #3a2a20; --cream: #f3ede4; --bg: #171310; --card: #221c18;
  --ink: #f3ede4; --muted: #a99c90; --line: #342b25; --green: #6cbf82; --green-soft: #1f3324; --red: #e07060;
  --red-soft: #3a211d; --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --on-ink: #171310; --field: #1a1512; --panel: #1c1713; --on-color: #14100d;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  min-height: 100vh;
  padding-bottom: calc(76px + var(--safe-b));
}
button, input, textarea, select { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* ---------- Yuqori panel ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}
.logo { width: 38px; height: 38px; border-radius: 11px; }
.brand { flex: 1; min-width: 0; }
.brand-name { font-weight: 900; letter-spacing: -0.2px; }
.brand-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips { display: flex; gap: 6px; }
.chip {
  padding: 5px 10px; border-radius: 999px; font-weight: 800; font-size: 13px;
  background: var(--card); box-shadow: var(--shadow); white-space: nowrap;
}
.chip-accent { background: var(--brand); color: var(--cream); }

/* ---------- Asosiy maydon ---------- */
.view { padding: 4px 16px 16px; max-width: 720px; margin: 0 auto; }
h1 { font-size: 24px; font-weight: 900; margin: 10px 2px 12px; letter-spacing: -0.4px; }
h2 { font-size: 17px; font-weight: 800; margin: 0 0 10px; }
h3 { font-size: 15px; font-weight: 800; margin: 14px 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.gap { height: 12px; }

.card {
  background: var(--card); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.card.brand { background: var(--brand); color: var(--cream); }
.card.brand .muted { color: color-mix(in srgb, var(--cream) 75%, transparent); }
.card.soft { background: var(--brand-soft); box-shadow: none; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.card-title h2 { margin: 0; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  background: var(--card); border-radius: 18px; padding: 14px; box-shadow: var(--shadow);
  border: 0; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px;
  transition: transform 0.12s;
}
.tile:active { transform: scale(0.97); }
.tile .ico { font-size: 24px; }
.tile b { font-weight: 800; }

/* ---------- Tugmalar ---------- */
.btn {
  border: 0; border-radius: 14px; padding: 11px 16px; font-weight: 800; cursor: pointer;
  background: var(--brand); color: var(--cream); transition: transform 0.1s, opacity 0.2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn-ghost { background: var(--brand-soft); color: var(--brand); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-green { background: var(--green); color: var(--on-color); }
.btn-red { background: var(--red); color: var(--on-color); }
.btn-sm { padding: 7px 12px; border-radius: 11px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }

.seg { display: flex; background: var(--brand-soft); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button {
  flex: 1; border: 0; background: transparent; padding: 8px 6px; border-radius: 11px;
  font-weight: 800; font-size: 13px; color: var(--muted); cursor: pointer;
}
.seg button.on { background: var(--card); color: var(--brand); box-shadow: var(--shadow); }

input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"], textarea, select {
  width: 100%; border: 1.5px solid var(--line); background: var(--field); border-radius: 14px;
  padding: 11px 13px; outline: none;
}
:root[data-theme="dark"] input, :root[data-theme="dark"] textarea, :root[data-theme="dark"] select { background: #1a1512; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) input, :root:not([data-theme="light"]) textarea, :root:not([data-theme="light"]) select { background: #1a1512; } }
input:focus, textarea:focus { border-color: var(--brand); }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
label.field { display: block; margin-bottom: 10px; }
label.field span { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin: 0 0 5px 2px; }

/* ---------- Vazifalar ---------- */
.task {
  display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.task:last-child { border-bottom: 0; }
.check {
  width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 2px solid var(--line); font-size: 14px; color: var(--on-color); transition: all 0.25s;
}
.task.done .check { background: var(--green); border-color: var(--green); }
.task.done .t-title { color: var(--muted); text-decoration: line-through; }
.t-title { font-weight: 700; }
.t-sub { font-size: 12px; color: var(--muted); }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width 0.4s; }
.bar.green > i { background: var(--green); }

/* ---------- Taymer ---------- */
.timer-face { font-size: 54px; font-weight: 900; text-align: center; letter-spacing: -1px; font-variant-numeric: tabular-nums; margin: 4px 0; }
.timer-face.paused { color: var(--muted); }
.float-timer { position: fixed; right: 14px; bottom: calc(86px + var(--safe-b)); z-index: 40; }
.ft-pill {
  display: flex; align-items: center; gap: 7px; background: var(--brand); color: var(--cream);
  padding: 8px 14px; border-radius: 999px; font-weight: 900; box-shadow: 0 6px 20px rgba(185, 91, 46, 0.35); cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.ft-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cream); animation: pulse 1.2s infinite; }
.float-timer.paused .ft-dot { animation: none; opacity: 0.4; }
@keyframes pulse { 50% { opacity: 0.3; } }
.ft-panel {
  display: none; position: absolute; right: 0; bottom: 48px; width: 220px; background: var(--card); border-radius: 18px;
  padding: 14px; box-shadow: 0 10px 30px rgba(60, 40, 20, 0.2);
}
.float-timer:hover .ft-panel, .float-timer.pinned .ft-panel { display: block; }
.ft-big { font-size: 34px; font-weight: 900; text-align: center; font-variant-numeric: tabular-nums; }
.ft-meta { text-align: center; color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.ft-actions { display: flex; gap: 6px; }
.ft-actions .btn { flex: 1; }

/* ---------- Taqvim ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal .dow { font-size: 11px; color: var(--muted); text-align: center; font-weight: 700; }
.cal .d {
  aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-size: 12px; font-weight: 800;
  background: var(--bg); color: var(--muted);
}
.cal .d.active { background: var(--green); color: var(--on-color); }
.cal .d.missed { background: var(--red-soft); color: var(--red); }
.cal .d.today { box-shadow: inset 0 0 0 2px var(--brand); color: var(--brand); }
.cal .d.future { opacity: 0.45; }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

/* ---------- Bilim kartochkalari ---------- */
.k-item { border: 1.5px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 8px; }
.k-item.done { border-color: var(--green); background: var(--green-soft); }
.k-type { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.5px; color: var(--brand); margin-bottom: 4px; }

/* ---------- Test ---------- */
.opt {
  display: block; width: 100%; text-align: left; border: 1.5px solid var(--line); background: var(--field);
  border-radius: 14px; padding: 11px 13px; margin-bottom: 8px; font-weight: 700; cursor: pointer;
}
:root[data-theme="dark"] .opt { background: #1a1512; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .opt { background: #1a1512; } }
.opt.right { border-color: var(--green); background: var(--green-soft); }
.opt.wrong { border-color: var(--red); background: var(--red-soft); }
.opt.sel { border-color: var(--brand); background: var(--brand-soft); }
.opt:disabled { cursor: default; }
.explain { background: var(--brand-soft); border-radius: 14px; padding: 10px 12px; font-size: 14px; margin: 4px 0 10px; }
.q-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.q-text { font-size: 17px; font-weight: 800; margin-bottom: 12px; white-space: pre-wrap; }

/* ---------- Ro'yxatlar ---------- */
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.list-item:last-child { border-bottom: 0; }
.badge { font-size: 11px; font-weight: 900; padding: 3px 8px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.amber { background: color-mix(in srgb, var(--amber) 18%, transparent); color: var(--amber); }
.num { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 900; flex: none; font-size: 13px; }

/* ---------- Dars ---------- */
.lesson p { margin: 6px 0 12px; white-space: pre-wrap; }
.scheme { background: var(--ink); color: var(--on-ink); border-radius: 14px; padding: 12px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; white-space: pre; overflow-x: auto; }
pre.mono { background: var(--bg); border-radius: 12px; padding: 10px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; white-space: pre; overflow-x: auto; margin: 6px 0; }
.terms { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; }
.terms b { color: var(--brand); }
.answer-text { white-space: pre-wrap; }

/* ---------- Flashcard ---------- */
.flash {
  min-height: 220px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow); padding: 22px;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; cursor: pointer;
}
.flash .word { font-size: 32px; font-weight: 900; letter-spacing: -0.5px; }
.flash .tr { font-size: 19px; font-weight: 800; color: var(--brand); margin-top: 8px; }
.flash .ex { color: var(--muted); margin-top: 8px; font-style: italic; }

/* ---------- Belgilar klaviaturasi ---------- */
.symkeys { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.symkeys button { border: 0; background: var(--brand-soft); color: var(--brand); border-radius: 9px; padding: 6px 9px; font-weight: 800; min-width: 34px; cursor: pointer; }

/* ---------- IELTS natija ---------- */
.band-big { font-size: 56px; font-weight: 900; color: var(--brand); text-align: center; line-height: 1; }
.crit { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; font-size: 14px; }
.corr { border-left: 3px solid var(--brand); padding: 4px 10px; margin: 8px 0; font-size: 14px; }
.corr s { color: var(--red); }
.corr b { color: var(--green); }
.rec-btn {
  width: 92px; height: 92px; border-radius: 50%; border: 0; background: var(--brand); color: var(--cream); font-size: 34px;
  display: grid; place-items: center; margin: 10px auto; cursor: pointer; box-shadow: 0 8px 24px rgba(185, 91, 46, 0.35);
}
.rec-btn.on { background: var(--red); animation: pulse 1s infinite; }

/* ---------- Grafik ---------- */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 110px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bars .b i { width: 100%; background: var(--brand); border-radius: 7px 7px 3px 3px; min-height: 3px; }
.bars .b span { font-size: 10px; color: var(--muted); font-weight: 700; }

/* ---------- Pastki menyu ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex;
  background: var(--card); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + var(--safe-b));
}
.tabbar button {
  flex: 1; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-size: 11px; font-weight: 800; color: var(--muted); padding: 4px 0; cursor: pointer; border-radius: 12px;
}
.tabbar button span { font-size: 21px; filter: grayscale(1) opacity(0.6); transition: filter 0.2s; }
.tabbar button.active { color: var(--brand); }
.tabbar button.active span { filter: none; }

/* ---------- Bildirishnoma va yuklanish ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--on-ink); padding: 10px 16px; border-radius: 14px; font-weight: 700; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all 0.25s; z-index: 60; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.loader { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 0; color: var(--muted); font-weight: 700; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--brand-soft); border-top-color: var(--brand); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.back { border: 0; background: transparent; color: var(--brand); font-weight: 800; padding: 6px 0; cursor: pointer; font-size: 15px; }
.banner { display: flex; gap: 12px; align-items: center; }
.banner .emoji { font-size: 34px; }
.collapse-head { cursor: pointer; }
@media (max-width: 340px) { .grid2 { grid-template-columns: 1fr; } .timer-face { font-size: 44px; } }

/* ---------- 💬 Chat ---------- */
body.chat-mode { padding-bottom: 0; }
body.chat-mode .view {
  display: flex; flex-direction: column; padding-bottom: 0;
  height: calc(100dvh - 58px - 62px - var(--safe-b));
}
.chat-head { padding: 4px 2px 8px; }
.chat-tools { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; flex: none; }
.chat-tools::-webkit-scrollbar { display: none; }
.chat-tools button {
  flex: none; border: 0; border-radius: 999px; padding: 7px 12px; font-weight: 800; font-size: 13px;
  background: var(--card); box-shadow: var(--shadow); cursor: pointer; white-space: nowrap;
}
.chat-tools button.on { background: var(--brand); color: var(--cream); }
.chat-log { flex: 1; overflow-y: auto; padding: 6px 2px 10px; display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; flex-direction: column; max-width: 88%; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg.bot { align-self: flex-start; }
.bubble {
  padding: 10px 13px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow);
  overflow-wrap: anywhere; line-height: 1.5;
}
.msg.me .bubble { background: var(--brand); color: var(--cream); border-bottom-right-radius: 6px; white-space: pre-wrap; }
.msg.bot .bubble { border-bottom-left-radius: 6px; }
.msg.bot .bubble pre.mono { background: var(--bg); }
.msg-actions { display: flex; gap: 4px; margin-top: 3px; }
.msg-actions button { border: 0; background: transparent; font-size: 15px; cursor: pointer; padding: 2px 6px; border-radius: 8px; opacity: 0.7; }
.msg-actions button:hover { opacity: 1; background: var(--brand-soft); }
.cursor { color: var(--brand); animation: pulse 0.9s infinite; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: pulse 1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
.chat-bar { flex: none; padding: 8px 0 10px; border-top: 1px solid var(--line); background: var(--bg); }
.chat-bar textarea { min-height: 42px; max-height: 140px; resize: none; border-radius: 21px; padding: 10px 14px; flex: 1; }
.icon-btn {
  width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); box-shadow: var(--shadow); font-size: 18px; cursor: pointer;
}
.icon-btn.send { background: var(--brand); color: var(--cream); font-size: 17px; }
.icon-btn.send:disabled { opacity: 0.5; }
.icon-btn.rec { background: var(--red); color: var(--on-color); animation: pulse 1s infinite; }
.attach { display: flex; align-items: center; gap: 8px; background: var(--brand-soft); border-radius: 12px; padding: 6px 10px; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.attach img { width: 34px; height: 34px; object-fit: cover; border-radius: 8px; }
.attach button { border: 0; background: transparent; cursor: pointer; font-size: 15px; color: var(--muted); }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.chips-row .chip { border: 0; cursor: pointer; font-size: 12px; }
.tabbar button { font-size: 10.5px; }

/* =====================================================================
   ChatGPT / Claude uslubidagi tuzilma: yon panel + asosiy maydon
   ===================================================================== */
body { padding-bottom: 0; }
.shell { display: flex; min-height: 100dvh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.only-mobile { display: none; }
.icon-plain { border: 0; background: transparent; font-size: 20px; cursor: pointer; color: var(--ink); padding: 6px 8px; border-radius: 10px; }
.icon-plain:hover { background: var(--brand-soft); }

/* ---- Yon panel ---- */
.sidebar {
  width: 272px; flex: none; height: 100dvh; position: sticky; top: 0;
  display: flex; flex-direction: column; gap: 6px; padding: 12px 10px;
  background: var(--card); border-right: 1px solid var(--line);
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 8px; }
.side-brand .logo { width: 32px; height: 32px; border-radius: 10px; }
.side-brand b { flex: 1; font-weight: 900; }
.side-home { flex: 1; display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; cursor: pointer; }
.new-chat {
  border: 1.5px solid var(--line); background: var(--bg); border-radius: 14px; padding: 10px 12px;
  font-weight: 800; text-align: left; cursor: pointer; color: var(--ink);
}
.new-chat:hover { border-color: var(--brand); color: var(--brand); }
.side-label { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 10px 8px 2px; }
.conv-list { flex: 1; overflow-y: auto; min-height: 80px; display: flex; flex-direction: column; gap: 1px; scrollbar-width: thin; }
.conv-group { font-size: 11px; color: var(--muted); font-weight: 800; padding: 8px 8px 3px; }
.conv { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.conv:hover { background: var(--bg); }
.conv.active { background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.conv-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-title input { width: 100%; padding: 4px 8px; border-radius: 8px; font-size: 13px; }
.conv-act { display: none; gap: 2px; }
.conv:hover .conv-act, .conv.active .conv-act { display: flex; }
.conv-act button { border: 0; background: transparent; cursor: pointer; font-size: 12px; padding: 2px 4px; border-radius: 6px; opacity: .7; }
.conv-act button:hover { opacity: 1; background: var(--card); }
.side-empty { color: var(--muted); font-size: 13px; padding: 6px 10px; }
.side-nav { display: flex; flex-direction: column; gap: 1px; }
.side-nav button {
  border: 0; background: transparent; text-align: left; padding: 8px 10px; border-radius: 10px; cursor: pointer;
  font-weight: 700; font-size: 14px; color: var(--ink); display: flex; gap: 10px; align-items: center;
}
.side-nav button:hover { background: var(--bg); }
.side-nav button.active { background: var(--brand-soft); color: var(--brand); }
.side-nav .admin-link {
  padding: 8px 10px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--brand);
  display: flex; gap: 10px; align-items: center; text-decoration: none;
}
.side-nav .admin-link:hover { background: var(--bg); }
.side-user { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.su-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; cursor: pointer; padding: 6px; border-radius: 12px; text-align: left; color: var(--ink); }
.su-main:hover { background: var(--bg); }
.su-main small { display: block; color: var(--muted); font-size: 12px; }
.su-main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-ava { width: 34px; height: 34px; border-radius: 11px; background: var(--brand-soft); display: grid; place-items: center; font-weight: 900; color: var(--brand); flex: none; object-fit: cover; font-size: 18px; }
.scrim { display: none; }

/* ---- Yuqori panel (asosiy maydon) ---- */
.topbar { position: sticky; top: 0; }
.view { width: 100%; }

/* ---- Telefon: yon panel suriladi ---- */
@media (max-width: 899px) {
  .only-mobile { display: inline-flex; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 70; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 0 40px rgba(0,0,0,.15); }
  body.side-open .sidebar { transform: none; }
  body.side-open .scrim { display: block; position: fixed; inset: 0; background: rgba(30, 20, 10, .35); z-index: 60; }
}

/* =====================================================================
   Suhbat sahifasi
   ===================================================================== */
body.chat-mode .view { max-width: none; padding: 0; height: calc(100dvh - 58px); display: flex; }
.chat-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-wrap .chat-log { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 18px; }
.chat-wrap .chat-log > * { width: 100%; max-width: 780px; margin: 0 auto; }
.chat-wrap.empty { justify-content: center; }
.chat-wrap.empty .chat-log { flex: none; overflow: visible; }

.hero { text-align: center; padding: 10px 0 6px; }
.hero-logo { width: 58px; height: 58px; border-radius: 18px; }
.hero-title { font-size: 28px; line-height: 1.25; margin: 14px 0 18px; }
.hero-title span { color: var(--muted); font-weight: 800; font-size: 22px; }
.hero-tips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 640px; margin: 0 auto; }
.tip {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 16px; padding: 12px 14px; text-align: left;
  cursor: pointer; font-weight: 700; font-size: 14px; color: var(--ink); display: flex; gap: 10px; align-items: flex-start;
}
.tip:hover { border-color: var(--brand); }

.chat-wrap .msg { display: flex; gap: 12px; max-width: 780px; }
.chat-wrap .msg.me { justify-content: flex-end; align-items: flex-start; flex-direction: row; }
.chat-wrap .msg.me .bubble {
  max-width: 80%; background: var(--brand-soft); color: var(--ink); border-radius: 20px; padding: 10px 16px;
  white-space: pre-wrap; box-shadow: none; border-bottom-right-radius: 20px;
}
.chat-wrap .msg.bot { align-items: flex-start; }
.bot-ava { width: 30px; height: 30px; border-radius: 10px; flex: none; margin-top: 2px; }
.answer { flex: 1; min-width: 0; line-height: 1.65; font-size: 15.5px; overflow-wrap: anywhere; }
.answer pre.mono { background: var(--card); border: 1px solid var(--line); }
.answer .msg-actions { margin-top: 6px; opacity: .55; }
.answer:hover .msg-actions { opacity: 1; }
.live-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }

/* ---- Yoziş maydoni ---- */
.composer-wrap { flex: none; padding: 8px 16px calc(10px + var(--safe-b)); }
.composer {
  max-width: 780px; margin: 0 auto; background: var(--card); border: 1.5px solid var(--line); border-radius: 26px;
  padding: 10px 10px 8px 16px; box-shadow: 0 8px 30px rgba(60, 40, 20, .08);
}
.composer:focus-within { border-color: var(--brand); }
.composer textarea {
  width: 100%; border: 0; background: transparent; resize: none; outline: none; padding: 4px 0;
  min-height: 26px; max-height: 200px; font-size: 16px; line-height: 1.5; border-radius: 0;
}
:root[data-theme="dark"] .composer textarea { background: transparent; }
.composer-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.round-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card);
  cursor: pointer; font-size: 17px; display: grid; place-items: center; flex: none; color: var(--ink);
}
.round-btn:hover { border-color: var(--brand); }
.round-btn.send { background: var(--brand); color: var(--cream); border-color: var(--brand); font-weight: 900; }
.round-btn.send:disabled { opacity: .45; }
.round-btn.rec { background: var(--red); color: var(--on-color); border-color: var(--red); animation: pulse 1s infinite; }
.mode-chips { flex: 1; display: flex; gap: 4px; overflow: hidden; }
.mode-chip { font-size: 12px; font-weight: 800; background: var(--brand-soft); color: var(--brand); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.tools-anchor { position: relative; }
.tools-menu {
  position: absolute; bottom: 44px; left: 0; z-index: 30; width: 270px; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 6px; box-shadow: 0 12px 40px rgba(60, 40, 20, .18);
}
.tm-item {
  display: flex; justify-content: space-between; align-items: center; width: 100%; border: 0; background: transparent;
  padding: 9px 10px; border-radius: 10px; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--ink); text-align: left;
}
.tm-item:hover { background: var(--brand-soft); }
.tm-state { font-size: 11px; color: var(--green); font-weight: 900; }
.tm-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.disclaimer { text-align: center; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.chat-wrap.empty .composer-wrap { padding-top: 18px; }
@media (max-width: 600px) {
  .hero-title { font-size: 23px; }
  .hero-title span { font-size: 18px; }
  .hero-tips { grid-template-columns: 1fr; }
  .chat-wrap .msg.me .bubble { max-width: 88%; }
}

/* =====================================================================
   Kiriş sahifasi
   ===================================================================== */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px 16px; }
.login-card {
  width: 100%; max-width: 400px; background: var(--card); border-radius: 28px; padding: 30px 24px; text-align: center;
  box-shadow: 0 20px 60px rgba(60, 40, 20, .12);
}
.login-logo { width: 64px; height: 64px; border-radius: 20px; }
.login-card h1 { margin: 12px 0 4px; }
.oauth { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 18px 0 6px; }
.oauth-slot { min-height: 40px; display: flex; justify-content: center; }
.oauth-btn { width: 300px; max-width: 100%; border-radius: 99px; padding: 11px 16px; font-weight: 800; cursor: pointer; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); }
.oauth-btn.apple { background: #000; color: #fff; border-color: #000; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.email-form { display: flex; flex-direction: column; gap: 8px; }
.email-form input { text-align: left; }
.err { color: var(--red); font-size: 13px; font-weight: 700; min-height: 18px; margin-top: 8px; }
.switch { font-size: 14px; margin-top: 6px; }
.switch a { color: var(--brand); font-weight: 800; }

/* Suzuvçi taymer — pastki menyu yöq, pastroqqa tuşadi */
.float-timer { bottom: calc(96px + var(--safe-b)); }
.chat-wrap .msg { flex-direction: row; align-self: auto; }
.chat-wrap .msg.bot .answer .msg-actions { display: flex; }

/* Kartoçkalar orasidagi masofa: grid'dan keyingi kartoçka tiqilib qolmasin */
.grid2 + .card, .grid2 + .gap + .card { margin-top: 12px; }
.grid2 { margin-bottom: 12px; }
.grid2 + .gap { display: none; }

/* =====================================================================
   Profil menyusi (yon panel pastida)
   ===================================================================== */
.user-menu {
  position: fixed; z-index: 90; width: 250px; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 6px; box-shadow: 0 16px 50px rgba(60, 40, 20, .2);
}
.user-menu .um-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.user-menu .um-head b { display: block; }
.user-menu .um-head small { color: var(--muted); }
.user-menu button {
  display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 10px;
  border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--ink);
}
.user-menu button:hover { background: var(--brand-soft); }
.user-menu button.danger { color: var(--red); }
.um-sep { height: 1px; background: var(--line); margin: 4px 6px; }

/* =====================================================================
   ⚙️ Sozlamalar oynasi (Claude uslubida)
   ===================================================================== */
body.modal-open { overflow: hidden; }
.settings-modal { position: fixed; inset: 0; z-index: 95; background: rgba(30, 20, 10, .4); display: grid; place-items: center; padding: 20px; }
.sm-box {
  width: min(960px, 100%); height: min(680px, 100%); background: var(--card); border-radius: 22px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
}
.sm-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 18px; }
.sm-body { flex: 1; display: flex; min-height: 0; }
.sm-nav { width: 240px; flex: none; border-right: 1px solid var(--line); padding: 12px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.sm-search { margin-bottom: 8px; padding: 9px 12px !important; border-radius: 12px !important; font-size: 14px; }
.sm-nav button {
  border: 0; background: transparent; text-align: left; padding: 9px 12px; border-radius: 10px; cursor: pointer;
  font-weight: 700; font-size: 14.5px; color: var(--ink); display: flex; gap: 10px; align-items: center;
}
.sm-nav button:hover { background: var(--bg); }
.sm-nav button.active { background: var(--brand-soft); color: var(--brand); }
.sm-panel { flex: 1; overflow-y: auto; padding: 20px 26px 30px; }
.sm-panel h2 { font-size: 20px; margin: 0 0 14px; }
.sm-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sm-title { font-weight: 800; }
.sm-desc { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.sm-ctl { flex: none; }
.sm-seg { flex-wrap: wrap; }
.sm-seg button { flex: none; padding: 7px 12px; }
.sm-panel input[type="time"] { border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--field); color: var(--ink); }
/* Yoqiş/öçiriş tugmasi */
.switch-t { position: relative; width: 46px; height: 26px; display: inline-block; cursor: pointer; }
.switch-t input { display: none; }
.switch-t span { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: background .2s; }
.switch-t span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch-t input:checked + span { background: var(--brand); }
.switch-t input:checked + span::after { transform: translateX(20px); }
.only-mobile-sm { display: none; }
@media (max-width: 720px) {
  .settings-modal { padding: 0; }
  .sm-box { height: 100%; border-radius: 0; }
  .sm-nav { width: 100%; border-right: 0; }
  .sm-panel { display: none; padding: 14px 16px 30px; }
  .settings-modal.show-panel .sm-nav { display: none; }
  .settings-modal.show-panel .sm-panel { display: block; }
  .only-mobile-sm { display: inline-block; margin-bottom: 6px; }
  .sm-row { flex-wrap: wrap; }
}

/* =====================================================================
   Kiriş sahifasi — chiroyli maydonlar
   ===================================================================== */
.login { background: radial-gradient(1200px 600px at 50% -10%, var(--brand-soft), transparent 60%), var(--bg); }
.login-card { border: 1px solid var(--line); }
.login-card h1 { font-size: 26px; letter-spacing: -.4px; }
.login-card > p { margin: 0 0 4px; font-size: 14.5px; }
.email-form { gap: 10px; margin-top: 4px; }
.lf { position: relative; text-align: left; }
.lf label { display: block; font-size: 12.5px; font-weight: 800; color: var(--muted); margin: 0 0 5px 4px; }
.lf input {
  width: 100%; height: 50px; border: 1.5px solid var(--line); background: var(--bg); border-radius: 14px;
  padding: 0 44px 0 44px; font-size: 15.5px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.lf input:focus { border-color: var(--brand); background: var(--card); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.lf .lf-ico { position: absolute; left: 15px; bottom: 15px; font-size: 17px; opacity: .6; pointer-events: none; }
.lf .lf-eye { position: absolute; right: 8px; bottom: 7px; width: 36px; height: 36px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; font-size: 17px; opacity: .65; }
.lf .lf-eye:hover { opacity: 1; background: var(--brand-soft); }
.email-form .btn { height: 50px; border-radius: 14px; font-size: 16px; margin-top: 4px; box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 30%, transparent); }
.login-tabs { display: flex; background: var(--bg); border-radius: 14px; padding: 4px; margin: 16px 0 4px; }
.login-tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 11px; font-weight: 800; color: var(--muted); cursor: pointer; }
.login-tabs button.on { background: var(--card); color: var(--brand); box-shadow: var(--shadow); }
.pw-hint { font-size: 12px; color: var(--muted); text-align: left; margin: -2px 4px 0; }
.forgot { align-self: flex-end; font-size: 13px; font-weight: 800; color: var(--brand); text-decoration: none; margin: -2px 4px 0; }
.forgot:hover { text-decoration: underline; }

/* Yon panelni yiğiş/oçiş (kompyuterda) */
.side-toggle { font-size: 18px; line-height: 1; }
@media (min-width: 900px) {
  .sidebar { transition: width .22s ease, padding .22s ease, opacity .18s ease; overflow: hidden; }
  body.side-collapsed .sidebar { width: 0; padding-left: 0; padding-right: 0; opacity: 0; border-right: 0; pointer-events: none; }
  body:not(.side-collapsed) #sideOpen { opacity: .55; }
}

/* Biriktirilgan fayl va tezkor amallar (Konspekt, Asosiy fikrlar...) */
.attach { flex-direction: column; align-items: stretch; gap: 8px; }
.att-row { display: flex; align-items: center; gap: 8px; }
.att-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.att-quick button {
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 99px;
  padding: 6px 12px; font-weight: 800; font-size: 13px; cursor: pointer;
}
.att-quick button:hover { border-color: var(--brand); color: var(--brand); }

/* =====================================================================
   🎧 Ovozli suhbat oynasi
   ===================================================================== */
.round-btn.voice { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.voice-ov {
  position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 20px calc(26px + var(--safe-b));
  background: radial-gradient(900px 600px at 50% 40%, var(--brand-soft), transparent 70%), var(--bg);
  color: var(--ink); animation: voIn .25s ease;
}
@keyframes voIn { from { opacity: 0; transform: scale(.98); } }
.vo-top { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.vo-top img { width: 30px; height: 30px; border-radius: 10px; }
.vo-orb { position: relative; width: min(56vw, 46vh, 260px); height: min(56vw, 46vh, 260px); padding: 0; flex: none; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.vo-core {
  width: 100%; height: 100%; border-radius: 50%; transition: transform .09s linear;
  background: radial-gradient(circle at 35% 30%, var(--brand-2), var(--brand) 55%, #7a3415);
  box-shadow: 0 20px 60px color-mix(in srgb, var(--brand) 45%, transparent);
}
.vo-ring { position: absolute; inset: -14px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); opacity: 0; }
.voice-ov[data-phase="listening"] .vo-ring { animation: voRing 1.6s ease-out infinite; }
.voice-ov[data-phase="thinking"] .vo-core { animation: voThink 1.1s ease-in-out infinite; }
.voice-ov[data-phase="speaking"] .vo-core { animation: voSpeak .5s ease-in-out infinite alternate; }
.voice-ov[data-phase="paused"] .vo-core, .voice-ov[data-phase="idle"] .vo-core { filter: grayscale(.6); opacity: .7; }
@keyframes voRing { from { transform: scale(.92); opacity: .9; } to { transform: scale(1.25); opacity: 0; } }
@keyframes voThink { 50% { transform: scale(.9); filter: brightness(1.15); } }
@keyframes voSpeak { from { transform: scale(.97); } to { transform: scale(1.06); } }
.vo-status { font-weight: 800; font-size: 17px; text-align: center; min-height: 24px; }
.vo-text { width: min(640px, 100%); text-align: center; min-height: 70px; max-height: 26vh; overflow-y: auto; }
.vo-heard { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.vo-reply { font-size: 16.5px; line-height: 1.55; }
.vo-actions { display: flex; gap: 18px; }
.vo-btn { width: 60px; height: 60px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); font-size: 24px; cursor: pointer; color: var(--ink); }
.vo-btn.off { background: var(--red-soft); border-color: var(--red); }
.vo-btn.end { background: var(--red); border-color: var(--red); color: var(--on-color); }

/* =====================================================================
   📱💻📺 Har qanday ekranga moslaşiş
   ===================================================================== */
html { -webkit-text-size-adjust: 100%; }
img, video { max-width: 100%; }
.answer pre, .answer table { max-width: 100%; overflow-x: auto; }
.answer table { display: block; }

/* Kiçik telefonlar (iPhone SE va h.k.) */
@media (max-width: 380px) {
  .composer-wrap { padding: 6px 8px calc(8px + var(--safe-b)); }
  .composer { padding: 8px 8px 6px 12px; border-radius: 22px; }
  .composer-row { gap: 4px; }
  .round-btn { width: 34px; height: 34px; font-size: 16px; }
  .mode-chip { display: none; }
  .chat-wrap .chat-log { padding: 12px 10px 6px; }
  .chat-wrap .msg { gap: 8px; }
  .bot-ava { width: 26px; height: 26px; }
  .answer { font-size: 15px; }
  .hero-title { font-size: 21px; }
  .tools-menu { width: min(270px, calc(100vw - 30px)); }
  .login-card { padding: 24px 16px; border-radius: 22px; }
  .vo-btn { width: 54px; height: 54px; }
}
/* Telefon yotiq holatda (past balandlik) */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-logo { width: 40px; height: 40px; }
  .hero-title { margin: 6px 0 10px; font-size: 20px; }
  .hero-tips { grid-template-columns: repeat(4, 1fr); }
  .tip { padding: 8px 10px; font-size: 13px; }
  .disclaimer { display: none; }
  .voice-ov { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 12px 30px; }
  .vo-top { width: 100%; justify-content: center; }
  .vo-orb { width: min(40vh, 160px); height: min(40vh, 160px); }
}
/* Planşet */
@media (min-width: 600px) and (max-width: 899px) {
  .chat-wrap .chat-log { padding-left: 24px; padding-right: 24px; }
  .sidebar { width: 300px; }
}
/* Katta monitor */
@media (min-width: 1440px) {
  .chat-wrap .chat-log > *, .chat-wrap .msg, .composer { max-width: 880px; }
  .answer { font-size: 16.5px; }
  .hero-tips { max-width: 760px; }
}
/* Televizor va 4K ekranlar — hammasini proporsional kattalaştiramiz */
@media (min-width: 2200px) { html { zoom: 1.35; } }
@media (min-width: 3000px) { html { zoom: 1.8; } }
/* Sensorli ekranlar — tugmalar barmoq uçun qulay */
@media (pointer: coarse) {
  .conv-act { display: flex; }
  .side-nav button, .conv, .tm-item { min-height: 42px; }
}

/* 🧠 Xotira röyxati */
.mem-list { display: flex; flex-direction: column; gap: 6px; }
.mem-item { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font-size: 14.5px; }
.mem-item button { border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 13px; padding: 4px 6px; border-radius: 8px; }
.mem-item button:hover { color: var(--red); background: var(--red-soft); }
.answer a { color: var(--brand); font-weight: 700; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.answer a:hover { border-bottom-color: var(--brand); }
.legal-note { margin-top: 10px; font-size: 12px; } .legal-note a { color: var(--brand); font-weight: 700; }

/* =====================================================================
   📱 Soddalaştirilgan navigatsiya: pastki menyu, «Köproq», tepada «‹»
   ===================================================================== */
.top-back { font-size: 30px; line-height: 1; padding: 0 6px 4px; font-weight: 700; color: var(--brand); }
.view .back { display: none; } /* içki sahifalardagi eski «Orqaga» — endi tepada turadi */

.tabbar { display: none; }
.sheet { position: fixed; inset: 0; z-index: 80; background: rgba(30, 20, 10, .35); display: flex; align-items: flex-end; justify-content: center; }
.sheet-card {
  width: 100%; max-width: 520px; background: var(--card); border-radius: 24px 24px 0 0;
  padding: 8px 12px calc(84px + var(--safe-b)); box-shadow: 0 -10px 40px rgba(0, 0, 0, .15);
  animation: sheetUp .2s ease;
}
@keyframes sheetUp { from { transform: translateY(30px); opacity: 0; } }
.sheet-grip { width: 40px; height: 5px; border-radius: 9px; background: var(--line); margin: 4px auto 10px; }
.sheet-item {
  display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  width: 100%; border: 0; background: transparent; color: var(--ink); text-align: left; text-decoration: none;
  padding: 10px 8px; border-radius: 14px; cursor: pointer;
}
.sheet-item:hover, .sheet-item:active { background: var(--brand-soft); }
.sheet-item span { grid-row: span 2; font-size: 24px; text-align: center; }
.sheet-item small { color: var(--muted); font-size: 12.5px; }
.sheet-item.hidden { display: none; }

@media (max-width: 899px) {
  .tabbar { display: flex; z-index: 85; } /* «Köproq» oçiq bölsa ham menyu körinib turadi */
  body:not([data-tab="chat"]) #sideOpen { display: none; } /* ☰ faqat suhbatda — suhbatlar röyxati uçun */
  body.chat-mode .view { height: calc(100dvh - 58px - 64px - var(--safe-b)); }
  body.chat-mode { padding-bottom: calc(64px + var(--safe-b)); }
  body.chat-mode .composer-wrap { padding-bottom: 10px; }
}
@media (min-width: 900px) { .sheet { display: none !important; } }

/* 📴 Internet yöq */
.offline-bar {
  position: fixed; top: calc(8px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 90;
  background: var(--ink); color: var(--on-ink); font-weight: 800; font-size: 13px; padding: 6px 14px; border-radius: 99px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .2); white-space: nowrap;
}

/* 📝 Testlar: tanlangan javob va oldingi/keyingi */
.opt.picked { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.quiz-nav { margin-top: 14px; }
.quiz-nav .btn:disabled { opacity: .4; }

/* 🗺 Maqsad yöl xaritasi */
.road { padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.road:first-of-type { border-top: 0; }
.road-steps { display: flex; gap: 4px; margin: 8px 0 6px; }
.road-steps span {
  flex: 1; text-align: center; font-size: 11.5px; font-weight: 800; padding: 5px 2px; border-radius: 8px;
  background: var(--line); color: var(--muted);
}
.road-steps span.done { background: var(--green); color: var(--on-color); }
.road-steps span.now { background: var(--brand-soft); color: var(--brand); outline: 1.5px solid var(--brand); }
.seg button { white-space: nowrap; }

/* =====================================================================
   📓 Yonma-yon daftar
   ===================================================================== */
.note-panel {
  position: fixed; z-index: 70; background: var(--card); display: flex; flex-direction: column;
  box-shadow: -10px 0 40px rgba(60, 40, 20, .15);
}
.np-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; border-bottom: 1px solid var(--line); }
.np-parts { display: flex; gap: 6px; padding: 0 14px; flex-wrap: wrap; }
.np-parts:not(:empty) { padding-top: 8px; }
.np-parts button { border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 800; cursor: pointer; }
.np-parts button.on { border-color: var(--brand); color: var(--brand); }
.np-paper {
  flex: 1; min-height: 0; width: 100%; border: 0; border-radius: 0; resize: none; outline: none;
  padding: 6px 16px 16px 16px; font-size: 16px; line-height: 28px; background-attachment: local; color: var(--ink);
}
/* Çiziqli daftar */
.np-paper.lined {
  background-color: var(--card);
  background-image: repeating-linear-gradient(to bottom, transparent 0 27px, color-mix(in srgb, #4a7bd0 28%, transparent) 27px 28px);
  background-position: 0 6px;
}
/* Katakli daftar (iqtisod, biznes) */
.np-paper.grid {
  background-color: var(--card);
  background-image:
    linear-gradient(to right, color-mix(in srgb, #4a7bd0 20%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, #4a7bd0 20%, transparent) 1px, transparent 1px);
  background-size: 14px 14px; background-position: 0 6px;
}
/* Qaydnoma (yangiliklar) — sarğiş qoğoz, çapda qizil hoşiya */
.np-paper.note {
  padding-left: 30px;
  background-color: color-mix(in srgb, #ffe9a8 35%, var(--card));
  background-image:
    linear-gradient(to right, transparent 20px, color-mix(in srgb, #d0453a 55%, transparent) 20px 21.5px, transparent 21.5px),
    repeating-linear-gradient(to bottom, transparent 0 27px, color-mix(in srgb, #b98a2e 30%, transparent) 27px 28px);
  background-position: 0 6px;
}
.np-foot { display: flex; justify-content: space-between; padding: 8px 14px calc(8px + var(--safe-b)); border-top: 1px solid var(--line); }
.note-btn { margin-top: 10px; }

@media (min-width: 900px) {
  .note-panel { top: 0; right: 0; bottom: 0; width: min(420px, 36vw); border-left: 1px solid var(--line); }
  body.note-open .main { margin-right: min(420px, 36vw); }
}
@media (max-width: 899px) {
  /* Telefonda — pastdan çiqadi, tepada dars körinib turadi */
  .note-panel { left: 0; right: 0; bottom: calc(64px + var(--safe-b)); height: 58vh; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(60, 40, 20, .18); }
  .note-panel .np-foot { padding-bottom: 8px; }
  body.note-open { padding-bottom: calc(58vh + 70px); }
}

/* =====================================================================
   🎯 Missiyalar va 🎮 öyinlar
   ===================================================================== */
.mission { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.card-title + .mission { border-top: 0; }
.mission .m-ico { font-size: 24px; width: 38px; height: 38px; display: grid; place-items: center; background: var(--brand-soft); border-radius: 12px; flex: none; }
.mission.claimed { opacity: .6; cursor: default; }
.mission.done { cursor: default; }
.clickable { cursor: pointer; }
.games .tile { min-height: 118px; }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match .opt { margin: 0 0 8px; text-align: center; padding: 11px 6px; font-size: 14px; }
.opt.right:disabled { opacity: .55; }
.sprint-q { font-size: 44px; font-weight: 900; margin: 22px 0; letter-spacing: -1px; }
.opt.big { font-size: 22px; font-weight: 900; text-align: center; margin: 0; }
.note-prev { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sheet-item.active { background: var(--brand-soft); }

/* =====================================================================
   📰 Yangiliklar va audio pleer
   ===================================================================== */
.chips-row { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.chips-row::-webkit-scrollbar { display: none; }
.chips-row button {
  flex: none; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 99px;
  padding: 6px 12px; font-weight: 800; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.chips-row button.on { background: var(--brand); border-color: var(--brand); color: var(--cream); }
.news-card { cursor: pointer; }
.news-card.read { opacity: .72; }
.news-title { margin: 8px 0 4px; font-size: 17px; line-height: 1.35; }
.article-title { font-size: 24px; line-height: 1.3; margin: 10px 0 12px; }
.article p { font-size: 16.5px; line-height: 1.7; margin: 0 0 12px; padding: 4px 8px; border-radius: 10px; transition: background .25s; }
.article p.reading { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.player { position: sticky; top: 62px; z-index: 15; }
.pl-row { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 12px 0 8px; }
.pl-row .round-btn { width: 46px; height: 46px; font-size: 13px; font-weight: 900; }
.pl-row .round-btn.play { width: 60px; height: 60px; font-size: 24px; background: var(--brand); color: var(--cream); border-color: var(--brand); }
.pl-row .round-btn:disabled { opacity: .5; }
.player input[type=range] { width: 100%; accent-color: var(--brand); margin: 4px 0; }
.seg.accent { flex: none; }
.seg.accent button { padding: 6px 12px; }
.word-row { padding: 8px 0; border-top: 1px solid var(--line); }
.card h2 + .word-row { border-top: 0; }
.invite-card h2 { margin-bottom: 4px; }
.invite-card .btn-row .btn { font-size: 14px; }

/* 🌙 Tez almaştiriş tugmasi */
.theme-btn { font-size: 18px; width: 36px; height: 36px; border-radius: 12px; flex: none; }
.theme-btn:hover { background: var(--brand-soft); }
.sheet-switch { cursor: pointer; grid-template-columns: 40px 1fr auto; }
.sheet-switch input { display: none; }
.sheet-switch i { grid-row: span 2; grid-column: 3; width: 44px; height: 26px; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; align-self: center; }
.sheet-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.sheet-switch input:checked + i { background: var(--brand); }
.sheet-switch input:checked + i::after { transform: translateX(18px); }
/* Brauzer parolni özi terganini aniqlaş uçun (login.js) */
@keyframes lfAutofill { from { opacity: 1; } to { opacity: 1; } }
.email-form input:-webkit-autofill { animation: lfAutofill 0.01s; }

/* 📘 Darslik paragrafi */
.num.par { font-size: 12px; font-weight: 900; color: var(--brand); }
.tb-chapter { margin: 4px 0 -4px; font-weight: 700; }
.tb-goals div { margin: 4px 0; }
.tb-concepts { margin: 6px 0 0; }
.tb-concepts dt { font-weight: 900; margin-top: 10px; color: var(--brand); }
.tb-concepts dd { margin: 2px 0 0; }
.lesson.textbook h3 { margin-top: 18px; }
.lesson.textbook h3:first-child { margin-top: 0; }
.lesson.textbook p { line-height: 1.7; white-space: normal; }
.tb-table-wrap { overflow-x: auto; margin-top: 8px; }
.tb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tb-table th, .tb-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.tb-table th { background: var(--brand-soft); color: var(--brand); font-weight: 900; }
.tb-case { border-left: 4px solid var(--amber); }
.tb-facts { background: var(--brand-soft); }
.tb-q { padding: 10px 0; border-top: 1px solid var(--line); }
.tb-q:first-of-type { border-top: 0; }
.link-btn { display: block; border: 0; background: none; color: var(--brand); font-weight: 800; padding: 4px 0 0; cursor: pointer; font-size: 13.5px; }
.tb-task { margin-top: 12px; padding: 12px; border-radius: 14px; background: var(--bg); }

/* 🔐 Google / Telegram tugmalari — sayt uslubida */
.oauth { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 6px; align-items: stretch; }
.oauth .oauth-btn { width: 100%; height: 50px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 15.5px; font-weight: 800; padding: 0 14px;
  transition: border-color .15s, background .15s, transform .1s; }
.oauth .oauth-btn:hover { border-color: var(--brand); background: var(--card); }
.oauth .oauth-btn:active { transform: scale(.98); }
.oauth .oauth-btn:disabled { opacity: .6; cursor: wait; }
.oauth .oauth-btn svg { flex: none; }
.oauth .oauth-btn.apple { grid-column: 1 / -1; background: #000; color: #fff; border-color: #000; }
.oauth > :only-child { grid-column: 1 / -1; }
.oauth > .small { grid-column: 1 / -1; }
.g-link { display: inline-flex; align-items: center; gap: 6px; }

/* 📱 Pastki menyu sahifaning oxirini yopmasin */
@media (max-width: 899px) {
  body:not(.chat-mode) { padding-bottom: calc(88px + var(--safe-b)); }
}

/* 🧠 Singdiriş */
.grow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grow-tile { text-align: left; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 16px; padding: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.grow-tile span { font-size: 12.5px; color: var(--muted); }
.grow-tile.wide { grid-column: 1 / -1; }
.grow-tile.hot { border-color: var(--brand); background: var(--brand-soft); }
.grow-tile:active { transform: scale(.98); }
.mist { padding: 10px 0; border-top: 1px solid var(--line); }
.mist:first-of-type { border-top: 0; }
.mist-q { font-weight: 700; margin-bottom: 4px; }
.link-btn.inline { display: inline; padding: 0; }
.km-bars { display: flex; align-items: flex-end; gap: 6px; height: 90px; margin: 10px 0 6px; }
.km-bar { flex: 1; max-width: 42px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.km-bar i { display: block; width: 100%; background: var(--brand); border-radius: 6px 6px 2px 2px; }
.km-bar span { font-size: 10.5px; color: var(--muted); font-weight: 800; }
.list-item.locked { opacity: .6; }
.verified-badge { display: inline-block; font-size: 12.5px; font-weight: 800; color: var(--green); background: var(--green-soft); padding: 5px 10px; border-radius: 99px; margin-bottom: 8px; }
.opt.right { border-color: var(--green); background: var(--green-soft); }
.opt.wrong { border-color: var(--red); background: var(--red-soft); }
.rt-q { padding: 10px 0; border-top: 1px solid var(--line); }
.rt-q:first-of-type { border-top: 0; }
.ex-res { margin-top: 12px; padding: 12px; border-radius: 14px; background: var(--bg); }
.report-btn { margin: 4px auto 14px; text-align: center; color: var(--muted); font-weight: 700; }

/* 🎯 Şaxsiy reja va onboarding */
.ob { max-width: 560px; margin: 0 auto; }
.ob-top { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.ob-bar { flex: 1; margin: 0; }
.ob-body h1 { margin: 0 0 6px; }
.ob-choices { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.ob-choice { display: flex; align-items: center; gap: 14px; text-align: left; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 16px; padding: 14px; cursor: pointer; }
.ob-choice b { display: block; font-size: 16px; }
.ob-choice small { color: var(--muted); font-size: 13px; }
.ob-choice.on, .ob-grade.on, .ob-sub.on { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); }
.ob-ic { font-size: 28px; }
.ob-grades { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ob-grade { min-width: 56px; height: 52px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 14px; font-size: 18px; font-weight: 900; cursor: pointer; }
.ob-grade.wide { font-size: 14px; padding: 0 14px; }
.ob-subjects { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ob-sub { border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 99px; padding: 9px 14px; font-weight: 800; cursor: pointer; font-size: 14px; }
.ob-label { display: block; font-weight: 800; margin: 16px 0 6px; }
.ob-date { width: 100%; height: 50px; border: 1.5px solid var(--line); background: var(--field); color: var(--ink); border-radius: 14px; padding: 0 14px; font-size: 16px; }
.ob-next { height: 52px; font-size: 16px; margin-top: 18px; }
.ob-skip { margin: 10px auto 0; text-align: center; color: var(--muted); }
.ob-sum { display: grid; grid-template-columns: 90px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.ob-sum:first-child { border-top: 0; }
.ob-sum span { color: var(--muted); font-size: 13px; }
.ob-cta { display: flex; gap: 12px; align-items: center; }
.card.warn { border: 1.5px solid var(--amber); }
.card.checkin { border: 1.5px solid var(--brand); background: var(--brand-soft); }
.bar.thin { height: 6px; }
details.pw { border-top: 1px solid var(--line); padding: 8px 0; }
details.pw:first-of-type { border-top: 0; }
details.pw summary { cursor: pointer; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; display: inline-block; vertical-align: middle; margin: 0 6px 0 0; }
#lSeg button { font-size: 12.5px; padding-left: 4px; padding-right: 4px; }

/* 📝 Sinov imtihoni */
.exam-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 6px 0; }
.exam-clock { font-weight: 900; font-variant-numeric: tabular-nums; background: var(--brand-soft); color: var(--brand); padding: 6px 12px; border-radius: 99px; }
.exam-clock.low { background: var(--red-soft); color: var(--red); }
.exam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; margin-top: 10px; }
.exam-grid button { height: 36px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font-weight: 800; cursor: pointer; }
.exam-grid button.done { background: var(--brand-soft); border-color: var(--brand); }
.exam-grid button.cur { outline: 2px solid var(--brand); }

/* Çap menyu: guruhlar */
.side-nav .side-label { margin: 14px 10px 4px; }
.side-nav .side-label:first-child { margin-top: 4px; }
.side-badge { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 900; background: var(--amber); color: var(--on-color); padding: 1px 7px; border-radius: 99px; }
.side-nav button { display: flex; align-items: center; }

/* Kurs: yig'iladigan boblar */
details.unit > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }
details.unit > summary::-webkit-details-marker { display: none; }
details.unit > summary h2 { margin: 0; font-size: 16.5px; }
details.unit[open] > summary { margin-bottom: 8px; }
details.unit > summary::after { content: "›"; color: var(--muted); transform: rotate(90deg); transition: transform .15s; }
details.unit[open] > summary::after { transform: rotate(-90deg); }

.card.plan-cta { border: 2px solid var(--brand); background: var(--brand-soft); }

/* 🏫 Sinflar, 🏆 liga, 🎓 sertifikat */
.ed-in { width: 100%; height: 46px; border: 1.5px solid var(--line); background: var(--field); color: var(--ink); border-radius: 12px; padding: 0 12px; font: inherit; font-size: 15px; margin: 6px 0; }
select.ed-in { appearance: auto; }
.asg { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.asg:first-of-type { border-top: 0; }
.asg-new { margin-top: 10px; }
.asg-new > summary { list-style: none; text-align: center; }
.asg-new > summary::-webkit-details-marker { display: none; }
.asg-new[open] > summary { margin-bottom: 8px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--line); }
.lb-row:first-child { border-top: 0; }
.lb-row.me { background: var(--brand-soft); border-radius: 10px; }
.lb-pos { width: 28px; text-align: center; font-weight: 900; }
.cert-card { border: 1.5px solid var(--brand); }

/* «Köproq» va boşqa pastki oynalar: içi aylanadi, orqa sahifa qotadi */
.sheet { overscroll-behavior: contain; }
.sheet-card { max-height: calc(100dvh - 24px - var(--safe-b, 0px)); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
body.sheet-open { overflow: hidden; }

/* 🎙 Jonli Speaking */
.live-hero { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; border: 2px solid var(--brand); background: var(--brand-soft); color: var(--ink); border-radius: 18px; padding: 16px; margin-bottom: 12px; cursor: pointer; }
.live-hero b { display: block; font-size: 17px; }
.live-hero small { color: var(--muted); font-size: 13px; }
.lh-ic { font-size: 34px; }
.live-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.live-stage { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0 8px; text-align: center; }
.ex-av { width: 110px; height: 110px; border-radius: 50%; background: var(--brand-soft); display: flex; align-items: center; justify-content: center; font-size: 60px; transition: box-shadow .2s; }
.ex-av.talking { box-shadow: 0 0 0 8px color-mix(in srgb, var(--brand) 25%, transparent), 0 0 0 16px color-mix(in srgb, var(--brand) 12%, transparent); animation: exPulse 1.2s infinite; }
@keyframes exPulse { 50% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--brand) 20%, transparent), 0 0 0 24px color-mix(in srgb, var(--brand) 8%, transparent); } }
.ex-line { max-width: 520px; font-size: 16px; font-weight: 700; margin-top: 6px; }
.mic { display: block; margin: 14px auto 6px; width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--brand); color: var(--on-color); font-size: 34px; cursor: pointer; box-shadow: 0 10px 26px color-mix(in srgb, var(--brand) 35%, transparent); }
.mic.on { background: var(--red); animation: exPulse 1.2s infinite; }
.mic:disabled { opacity: .5; }
.live-status { text-align: center; min-height: 20px; font-weight: 700; color: var(--muted); }
.card.cue { border: 2px dashed var(--brand); }
.card.cue .prep { margin-top: 8px; font-weight: 800; color: var(--brand); }
.live-log .ll { padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.live-log .ll:first-child { border-top: 0; }
.live-log .ll.me b { color: var(--brand); }

/* Çap menyu uzun — butun panel aylanadi; suhbatlar röyxati ixçam */
.sidebar { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
@media (min-width: 900px) { body:not(.side-collapsed) .sidebar { overflow-y: auto; overflow-x: hidden; } }
.sidebar .conv-list { flex: 0 1 auto; max-height: 32vh; min-height: 40px; }
.sidebar .side-nav, .sidebar .side-user { flex: none; }

/* 🧪 Amaliy maşqlar */
.lab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.lab-tile { text-align: left; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 18px; padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.lab-tile .ico { font-size: 28px; }
.lab-tile:hover { border-color: var(--brand); }
.lab-script { margin-top: 8px; padding: 10px; background: var(--bg); border-radius: 12px; font-size: 14px; line-height: 1.6; }
.tl-picked { margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.tl-item { padding: 8px 10px; border-radius: 10px; background: var(--brand-soft); font-weight: 700; font-size: 14px; }
.tl-item.ok { background: var(--green-soft); }
.tl-item.bad { background: var(--red-soft); }
.lab-chat { max-height: 55vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.lc { padding: 10px 12px; border-radius: 14px; max-width: 88%; line-height: 1.55; }
.lc.ai { background: var(--bg); align-self: flex-start; }
.lc.me { background: var(--brand-soft); align-self: flex-end; }
.lab-input { display: flex; gap: 8px; align-items: flex-end; }
.lab-input textarea { flex: 1; margin: 0; }
.career-info details { margin-top: 6px; }

/* 🎙 Ovozli AI ustoz */
.ask-row { display: flex; gap: 8px; }
.mic-sm { width: 52px; padding: 0; font-size: 20px; }
.mic-sm.on { background: var(--red); animation: exPulse 1.2s infinite; }
.vt-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(30, 20, 10, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.vt-card { width: 100%; max-width: 520px; max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--card); border-radius: 24px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.vt-top { display: flex; justify-content: space-between; align-items: flex-start; }
.vt-orb { width: 140px; height: 140px; margin: 8px auto; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 64px; background: var(--brand-soft); transition: transform .08s, box-shadow .3s; }
.vt-orb.listen { box-shadow: 0 0 0 10px color-mix(in srgb, var(--green) 22%, transparent); }
.vt-orb.think { animation: exPulse 1s infinite; }
.vt-orb.talk { box-shadow: 0 0 0 10px color-mix(in srgb, var(--brand) 25%, transparent); animation: exPulse 1.4s infinite; }
.vt-state { text-align: center; font-weight: 800; color: var(--muted); min-height: 22px; }
.vt-log { max-height: 34vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.vl { padding: 8px 12px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; }
.vl.me { background: var(--brand-soft); align-self: flex-end; max-width: 88%; }
.vl.ai { background: var(--bg); }

/* 📥 Offline */
.unit-r { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.dl-btn { border: 1.5px solid var(--line); background: var(--card); border-radius: 10px; width: 34px; height: 30px; cursor: pointer; font-size: 15px; }
.dl-btn:hover { border-color: var(--brand); }
.dl-mark { margin-left: 6px; font-size: 12px; opacity: .7; }
details.unit > summary::after { margin-left: 4px; }

/* 🃏 Fleşkartalar */
.fc { position: relative; height: min(56vh, 380px); perspective: 1200px; cursor: pointer; margin-bottom: 14px; }
.fc-face { position: absolute; inset: 0; border-radius: 22px; background: var(--card); border: 1.5px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 22px; text-align: center; font-size: 20px; font-weight: 800;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .45s cubic-bezier(.2,.8,.2,1); overflow-y: auto; }
.fc-back { transform: rotateY(180deg); font-size: 17px; font-weight: 600; }
.fc.flip .fc-front { transform: rotateY(-180deg); }
.fc.flip .fc-back { transform: rotateY(0); }
.fc-ans { font-size: 18px; line-height: 1.55; }
.fc-hint { position: absolute; bottom: 14px; font-weight: 700; }
.fc-grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fc-g { border: 0; border-radius: 14px; padding: 10px 4px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font: inherit; }
.fc-g span { font-size: 11.5px; opacity: .8; }
.fc-g.red { background: var(--red-soft); color: var(--red); }
.fc-g.amber { background: color-mix(in srgb, var(--amber) 18%, transparent); color: var(--amber); }
.fc-g.green { background: var(--green-soft); color: var(--green); }
.fc-g.brand { background: var(--brand-soft); color: var(--brand); }

/* 🗂 Portfolio */
.pf-pub { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; cursor: pointer; }
.pf-pub input { width: 20px; height: 20px; accent-color: var(--brand); margin-top: 2px; }
.pf-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pf-stats div { background: var(--bg); border-radius: 14px; padding: 10px 6px; text-align: center; }
.pf-stats b { display: block; font-size: 20px; }
.pf-stats span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.pf-it { padding: 8px 0; border-top: 1px solid var(--line); }
.pf-it:first-of-type { border-top: 0; }

/* 👪 Ota-ona kabineti */
.pc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.pc-stats div { background: var(--bg); border-radius: 12px; padding: 8px 4px; text-align: center; }
.pc-stats b { display: block; font-size: 18px; }
.pc-stats span { font-size: 11px; color: var(--muted); font-weight: 700; }
.pc-chart { display: flex; align-items: flex-end; gap: 6px; height: 70px; margin: 6px 0 10px; }
.pc-chart div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.pc-chart i { display: block; width: 100%; background: var(--brand); border-radius: 5px 5px 2px 2px; }
.pc-chart span { font-size: 10.5px; color: var(--muted); font-weight: 800; }
.pc-goal { margin-top: 10px; padding: 10px; border-radius: 14px; background: var(--brand-soft); }
.pc-cheer { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 6px; }
.pc-cheer .chip { cursor: pointer; border: 0; }
.pc-note { margin-top: 8px; padding: 10px; border-radius: 12px; background: var(--bg); font-weight: 700; }
.card.pc-home { border: 1.5px solid var(--brand); }

/* 📲 Ijtimoiy tarmoqlar */
.social-card { position: relative; overflow: hidden; border: 0; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #feda75 0%, #fa7e1e 22%, #d62976 48%, #962fbf 72%, #4f5bd5 100%); }
.social-card::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, #2AABEE 0%, transparent 70%); opacity: .55; pointer-events: none; }
.social-card h2 { color: #fff; margin: 8px 0 4px; font-size: 20px; line-height: 1.25; }
.sc-x { position: absolute; top: 10px; right: 12px; border: 0; background: rgba(255,255,255,.18); color: #fff; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; z-index: 1; }
.sc-badge { display: inline-block; background: #fff; color: #d62976; font-weight: 900; font-size: 12.5px; padding: 4px 10px; border-radius: 99px; box-shadow: 0 4px 14px rgba(0,0,0,.15); animation: scPulse 2.4s ease-in-out infinite; }
@keyframes scPulse { 50% { transform: scale(1.06); } }
.sc-sub { opacity: .92; font-size: 14px; }
.sc-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; font-size: 14.5px; position: relative; z-index: 1; }
.sc-list b { color: #fff; }
.sc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: relative; z-index: 1; }
.sc-btn { display: flex; align-items: center; gap: 10px; border: 0; border-radius: 16px; padding: 12px; cursor: pointer; text-align: left; font: inherit; color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.18); transition: transform .12s; }
.sc-btn:active { transform: scale(.97); }
.sc-btn span { display: flex; flex-direction: column; line-height: 1.2; }
.sc-btn b { font-size: 15.5px; }
.sc-btn small { font-size: 12px; opacity: .9; font-weight: 700; }
.sc-btn.ig { background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); }
.sc-btn.tg { background: linear-gradient(135deg, #37bbfe, #1e96c8); }
.sc-btn.done { opacity: .75; }
.sc-foot { margin-top: 10px; font-size: 12px; opacity: .85; text-align: center; position: relative; z-index: 1; }
.sc-thanks { text-align: center; font-weight: 900; padding: 10px; }
.sc-row { display: flex; align-items: center; gap: 8px; padding: 10px 8px; font-size: 13px; font-weight: 800; color: var(--muted); }
.sc-row span { flex: 1; }
.sc-ico { width: 38px; height: 38px; border-radius: 12px; border: 0; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .12s; }
.sc-ico:hover { transform: translateY(-2px); }
.sc-ico.ig { background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); }
.sc-ico.tg { background: linear-gradient(135deg, #37bbfe, #1e96c8); }
.login-social { margin-top: 14px; font-size: 13px; font-weight: 800; color: var(--muted); display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.login-social a { color: #fff; text-decoration: none; padding: 6px 12px; border-radius: 99px; }
.login-social .ls-ig { background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); }
.login-social .ls-tg { background: linear-gradient(135deg, #37bbfe, #1e96c8); }

/* 📲 Obuna kartaçasi — ilova uslubida (krem fon, jigarrang urğu; tarmoq ranglari faqat ikonkalarda) */
.social-card { color: var(--ink); background: var(--card); border: 1.5px solid var(--line); }
.social-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, #f58529, #dd2a7b 45%, #8134af 70%, #2AABEE); }
.social-card::after { display: none; }
.social-card h2 { color: var(--ink); font-size: 19px; }
.sc-x { background: var(--bg); color: var(--muted); }
.sc-badge { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
.sc-sub { color: var(--muted); opacity: 1; }
.sc-list li { padding: 8px 10px; border-radius: 12px; background: var(--bg); }
.sc-list b { color: var(--brand); }
.sc-btn { background: var(--bg) !important; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }
.sc-btn:hover { border-color: var(--brand); }
.sc-btn svg { flex: none; width: 40px; height: 40px; padding: 9px; border-radius: 12px; color: #fff; }
.sc-btn.ig svg { background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); }
.sc-btn.tg svg { background: linear-gradient(135deg, #37bbfe, #1e96c8); }
.sc-btn small { color: var(--muted); opacity: 1; }
.sc-btn.done small { color: var(--green); }
.sc-foot { color: var(--muted); opacity: 1; }
.sc-claim { margin-top: 10px; position: relative; z-index: 1; animation: scPulse 2.4s ease-in-out infinite; }

.sc-btn.li svg, .sc-ico.li { background: #0a66c2; }
.sc-btn.xx svg, .sc-ico.xx { background: #111; }
.login-social .ls-li { background: #0a66c2; }
.login-social .ls-x { background: #111; }

/* 📲 Hamjamiyat kartaçasi v2 */
.sc2 .sc2-head { display: flex; gap: 12px; align-items: flex-start; padding-right: 30px; }
.sc2-medal { font-size: 40px; line-height: 1; filter: drop-shadow(0 4px 10px rgba(176,88,44,.25)); animation: scPulse 2.6s ease-in-out infinite; }
.sc2 h2 { margin: 8px 0 4px; }
.sc2-prog { margin: 12px 0; padding: 10px 12px; border-radius: 14px; background: var(--brand-soft); }
.sc2-list { display: flex; flex-direction: column; gap: 8px; }
.sc2-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: var(--bg); border: 1.5px solid transparent; transition: border-color .15s; }
.sc2-item:hover { border-color: var(--line); }
.sc2-item.done { opacity: .7; }
.sc2-ic { flex: none; width: 44px; height: 44px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.sc2-ic.instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); }
.sc2-ic.telegram { background: linear-gradient(135deg, #37bbfe, #1e96c8); }
.sc2-ic.linkedin { background: #0a66c2; }
.sc2-ic.x { background: #111; }
.sc2-tag { font-size: 10.5px; font-weight: 900; padding: 2px 7px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); }
.sc2-cta { flex: none; white-space: nowrap; }
.sc2-ok { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: inline-flex; align-items: center; justify-content: center; font-weight: 900; }
.sc2-bonus { margin-top: 12px; padding: 10px 12px; border-radius: 14px; border: 1.5px dashed var(--brand); font-size: 13.5px; }
.sc2-bonus.won { border-style: solid; background: var(--green-soft); border-color: var(--green); }
.sc2-proof { margin-top: 8px; text-align: center; font-size: 13px; color: var(--muted); }

.sc2-ic.youtube, .sc-ico.yt, .login-social .ls-yt { background: #ff0033; }
.sc2-prog .row { flex-wrap: wrap; gap: 4px 10px; }
.sc2-count { white-space: nowrap; }
.sc2-tag { white-space: nowrap; }
.sc-row { flex-wrap: wrap; }
.sc-row span { flex-basis: 100%; }

/* 🤝 Döstni taklif qiliş */
.inv-hero { text-align: center; background: linear-gradient(160deg, var(--brand-soft), var(--card) 70%); border: 1.5px solid var(--line); }
.inv-hero h1 { font-size: 22px; line-height: 1.25; margin: 6px 0; }
.inv-gift { font-size: 46px; animation: scPulse 2.4s ease-in-out infinite; }
.inv-gift.sm { font-size: 30px; }
.inv-sub { color: var(--muted); font-size: 14px; }
.inv-rew { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px 0; }
.inv-rew div:not(.inv-plus) { background: var(--card); border-radius: 16px; padding: 10px 16px; box-shadow: var(--shadow); }
.inv-rew b { display: block; font-size: 22px; color: var(--brand); }
.inv-rew span { font-size: 12px; color: var(--muted); font-weight: 800; }
.inv-plus { font-size: 22px; font-weight: 900; color: var(--muted); }
.inv-link { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 14px; padding: 6px 6px 6px 12px; margin: 6px 0 10px; }
.inv-link span { flex: 1; font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.inv-share { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.inv-sh { border: 0; border-radius: 14px; padding: 12px 6px; font: inherit; font-weight: 900; color: #fff; cursor: pointer; }
.inv-sh.tg { background: linear-gradient(135deg, #37bbfe, #1e96c8); }
.inv-sh.wa { background: #25d366; }
.inv-sh.ot { background: var(--brand); }
.inv-badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.inv-b { text-align: center; padding: 10px 4px; border-radius: 14px; background: var(--bg); opacity: .5; }
.inv-b.got { opacity: 1; background: var(--brand-soft); }
.inv-b span { font-size: 24px; display: block; }
.inv-b b { display: block; font-size: 11.5px; }
.inv-b small { font-size: 10.5px; color: var(--muted); }
.inv-card { border: 1.5px dashed var(--brand); }
.share-ach { margin: 8px 0; }
.login-about { display: block; margin-top: 14px; font-weight: 900; color: var(--brand); text-decoration: none; font-size: 14px; }
