:root {
  --navy: #0b1f3a;
  --navy-2: #13294b;
  --gold: #c9a13f;
  --gold-soft: #f6efdc;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --red: #c2410c;
  --red-bg: #fff1ea;
  --amber: #b45309;
  --amber-bg: #fef6e4;
  --green: #15803d;
  --green-bg: #eaf7ee;
  --blue: #1d4ed8;
  --blue-bg: #eef3ff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .05);
  --serif: "Source Serif 4", Georgia, serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1220;
    --surface: #111b2d;
    --ink: #e8edf5;
    --ink-2: #b4c0d3;
    --ink-3: #8794aa;
    --line: #1f2c43;
    --line-2: #2c3b57;
    --gold-soft: #2a2414;
    --red-bg: #2c1710;
    --amber-bg: #2a200d;
    --green-bg: #0f2418;
    --blue-bg: #121d38;
    --red: #fb923c;
    --amber: #fbbf24;
    --green: #4ade80;
    --blue: #93b4ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.muted { color: var(--ink-3); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg { stroke-linecap: round; stroke-linejoin: round; }

/* ---------- topbar ---------- */
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; min-width: 0; }
.logo { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(201,161,63,.45); display: grid; place-items: center; flex: none; }
.logo svg { width: 24px; height: 24px; fill: none; stroke: var(--gold); stroke-width: 1.7; }
.logo circle { fill: var(--gold); stroke: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text b { font-size: 16px; letter-spacing: .2px; }
.brand-text small { color: #9fb0c9; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; align-items: center; gap: 10px; }
.nav-btn { display: flex; align-items: center; gap: 7px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #fff; padding: 7px 13px; border-radius: 9px; font-size: 13.5px; font-weight: 500; }
.nav-btn:hover { background: rgba(255,255,255,.14); }
.nav-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.corpus-pill { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #c7d3e6; white-space: nowrap; }
.corpus-pill i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.18); }

/* ---------- hero ---------- */
.hero { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 52px 0 64px; }
.eyebrow { margin: 0 0 12px; color: var(--gold); font-size: 12.5px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 4.4vw, 44px); line-height: 1.15; margin: 0 0 16px; max-width: 820px; letter-spacing: -.3px; }
.hero h1 em { font-style: italic; color: var(--gold); }
.lead { color: #c3cfe1; max-width: 780px; margin: 0 0 30px; font-size: 16px; }
.composer { background: #fff; border-radius: 16px; padding: 8px; box-shadow: 0 20px 50px rgba(0,0,0,.25); color: #0f172a; }
.composer textarea { width: 100%; border: 0; outline: 0; resize: vertical; min-height: 84px; padding: 14px 14px 6px; font-size: 16px; background: transparent; color: #0f172a; }
.composer textarea::placeholder { color: #94a3b8; }
.composer-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 6px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.chip { border: 1px solid #e2e8f0; background: #f8fafc; color: #334155; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; text-align: left; }
.chip:hover { border-color: var(--gold); background: #fffbef; }
.btn-primary { display: inline-flex; align-items: center; gap: 8px; background: var(--navy); color: #fff; border: 0; border-radius: 11px; padding: 12px 20px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.btn-primary:hover { background: #163261; }
.btn-primary:disabled { opacity: .55; cursor: wait; }
.btn-primary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.btn-ghost { border: 1px solid var(--line-2); background: var(--surface); border-radius: 9px; padding: 7px 13px; font-size: 13.5px; font-weight: 500; }
.btn-ghost:hover { border-color: var(--gold); }

/* ---------- progress ---------- */
.progress { margin-top: -28px; position: relative; }
.steps { list-style: none; margin: 0; padding: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.steps li { display: flex; gap: 11px; align-items: flex-start; opacity: .45; transition: opacity .3s; }
.steps li b { display: block; font-size: 14px; }
.steps li small { color: var(--ink-3); font-size: 12.5px; line-height: 1.4; display: block; }
.steps .dot { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); margin-top: 1px; position: relative; }
.steps li.active, .steps li.done { opacity: 1; }
.steps li.active .dot { border-color: var(--gold); border-top-color: transparent; animation: spin .8s linear infinite; }
.steps li.done .dot { background: var(--green); border-color: var(--green); }
.steps li.done .dot::after { content: ""; position: absolute; left: 6px; top: 2.5px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
@keyframes spin { to { transform: rotate(360deg); } }
.interp { margin: 14px 2px 0; padding: 12px 16px; border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: 0 10px 10px 0; font-size: 14px; color: var(--ink-2); }
.interp b { color: var(--ink); }
.alert { margin-top: 20px; padding: 14px 16px; border-radius: 12px; background: var(--red-bg); color: var(--red); border: 1px solid color-mix(in srgb, var(--red) 25%, transparent); font-weight: 500; }

/* ---------- results ---------- */
.results { margin-top: 26px; }
.verdict-card { display: flex; gap: 26px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow); }
.gauge { flex: none; width: 168px; }
.gauge svg { width: 100%; display: block; }
.verdict-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.verdict-body h2 { font-family: var(--serif); font-weight: 600; font-size: 24px; margin: 8px 0 6px; line-height: 1.25; }
.verdict-body p { margin: 0; color: var(--ink-2); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.b-green { background: var(--green-bg); color: var(--green); }
.b-amber { background: var(--amber-bg); color: var(--amber); }
.b-red { background: var(--red-bg); color: var(--red); }
.b-blue { background: var(--blue-bg); color: var(--blue); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0 22px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.kpi small { color: var(--ink-3); font-size: 12.5px; display: block; }
.kpi b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.5px; margin: 2px 0; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--ink-3); font-size: 12px; line-height: 1.4; display: block; }
.kpi.ai small::after { content: "AI baho"; font-size: 10px; font-weight: 600; letter-spacing: .3px; color: var(--blue); background: var(--blue-bg); padding: 1px 6px; border-radius: 5px; margin-left: 6px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; padding: 10px 14px; font-weight: 500; font-size: 14px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--ink); border-bottom-color: var(--gold); font-weight: 600; }
.tabs .count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; font-size: 11.5px; border-radius: 10px; background: var(--line); color: var(--ink-2); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px; }
.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.art-link { font-weight: 700; color: var(--navy); background: var(--gold-soft); border: 0; padding: 3px 9px; border-radius: 7px; font-size: 13.5px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .art-link { color: var(--gold); } }
.art-link:hover { outline: 1px solid var(--gold); }
.card-title { font-weight: 600; font-size: 15px; flex: 1; min-width: 200px; }
.card p { margin: 0 0 10px; color: var(--ink-2); }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.diff > div { border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.55; }
.diff small { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 4px; }
.diff .old { background: var(--red-bg); }
.diff .old small { color: var(--red); }
.diff .old span { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--red) 45%, transparent); }
.diff .new { background: var(--green-bg); }
.diff .new small { color: var(--green); }
.ver { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.ver.ok { color: var(--green); }
.ver.no { color: var(--ink-3); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sec-title { font-size: 13px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--ink-3); margin: 18px 0 10px; }
.sec-title:first-child { margin-top: 0; }
.empty { color: var(--ink-3); font-size: 14px; padding: 14px 18px; border: 1px dashed var(--line-2); border-radius: 12px; }
.list-item { display: flex; gap: 12px; align-items: flex-start; }
.sev { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; }
.sev-yuqori { background: var(--red); }
.sev-oʻrta { background: var(--amber); }
.sev-past { background: var(--green); }
.refs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.impact { display: grid; grid-template-columns: 1fr; gap: 10px; }
.imp-row { display: grid; grid-template-columns: 210px 1fr; gap: 16px; align-items: center; }
.imp-row b { font-size: 14px; }
.imp-row .dir { font-size: 12px; font-weight: 600; }
.bar { height: 8px; background: var(--line); border-radius: 6px; overflow: hidden; margin: 6px 0; }
.bar i { display: block; height: 100%; border-radius: 6px; }
.imp-row p { margin: 0; font-size: 13.5px; color: var(--ink-2); }

.voices { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.voice { display: flex; flex-direction: column; gap: 10px; }
.voice-head { display: flex; gap: 12px; align-items: center; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex: none; }
.voice-head b { display: block; font-size: 14.5px; }
.voice-head small { color: var(--ink-3); font-size: 12.5px; }
.voice blockquote { margin: 0; font-family: var(--serif); font-size: 16px; line-height: 1.5; color: var(--ink); }
.senti { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); margin-top: auto; }
.senti .track { flex: 1; height: 6px; border-radius: 4px; background: linear-gradient(90deg, var(--red) 0%, var(--line-2) 50%, var(--green) 100%); position: relative; opacity: .85; }
.senti .track i { position: absolute; top: -4px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); transform: translateX(-50%); }
.consensus { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; }
.consensus b { font-size: 30px; letter-spacing: -.5px; }

.graph-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.graph-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 12.5px; padding: 2px 6px 10px; }
.graph-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.lg-primary { background: var(--red); }
.lg-secondary { background: var(--amber); }
.lg-linked { background: var(--ink-3); }
.lg-external { background: #7c3aed; }
.doc-select { margin-bottom: 0; cursor: pointer; }
.doc-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 7px; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.doc-chip i { font-style: normal; font-size: 10.5px; letter-spacing: .4px; text-transform: uppercase; color: #fff; padding: 1px 6px; border-radius: 4px; background: var(--ink-3); }
.t-Konstitutsiya { background: #b45309 !important; }
.t-Kodeks { background: #0b1f3a !important; }
.t-Qonun { background: #1d4ed8 !important; }
.t-Farmon { background: #be123c !important; }
.t-Qaror { background: #0f766e !important; }
.t-Nizom, .t-Plenum { background: #7c3aed !important; }
.rel-group { margin-bottom: 18px; }
.s-item small { display: block; color: var(--ink-3); font-size: 11.5px; margin-top: 1px; }
.modal-foot a { color: var(--blue); font-weight: 600; text-decoration: none; margin-right: auto; }
#graph { width: 100%; height: 560px; display: block; }
#graph .edge { stroke: var(--line-2); stroke-width: 1.3; fill: none; }
#graph .edge.hot { stroke: var(--gold); stroke-width: 2; }
#graph .node { cursor: pointer; }
#graph .node circle { stroke: var(--surface); stroke-width: 3; }
#graph .node text { font-size: 11px; font-weight: 700; fill: #fff; pointer-events: none; }
#graph .node .lbl { fill: var(--ink-2); font-weight: 500; font-size: 11px; }
#graph .node:hover circle { stroke: var(--gold); }
#graph .center circle { fill: var(--navy); stroke: var(--gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #graph .center circle { fill: #1c3563; } }

.draft-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.draft-actions { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 12px; }
.draft-doc { max-width: 760px; margin: 0 auto; padding: 36px 44px; background: #fffef9; color: #1e1b14; border: 1px solid #ece6d4; border-radius: 6px; font-family: var(--serif); font-size: 16px; line-height: 1.7; white-space: pre-wrap; box-shadow: 0 6px 24px rgba(15,23,42,.08); }
.disclaimer { color: var(--ink-3); font-size: 12.5px; margin: 22px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.feat span { font-family: var(--serif); color: var(--gold); font-weight: 600; font-size: 20px; }
.feat b { display: block; margin: 6px 0 4px; }
.feat p { margin: 0; color: var(--ink-2); font-size: 14px; }
.foot { margin-top: 48px; padding: 22px 0 30px; color: var(--ink-3); font-size: 13px; border-top: 1px solid var(--line); }

/* ---------- drawer & modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(8, 15, 30, .45); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: var(--surface); z-index: 50; transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.icon-btn { border: 0; background: var(--bg); width: 32px; height: 32px; border-radius: 8px; font-size: 14px; }
.search { margin: 14px 18px 6px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); outline: 0; }
.search:focus { border-color: var(--gold); }
.search-res { overflow-y: auto; padding: 6px 10px 20px; }
.s-item { display: flex; gap: 10px; width: 100%; text-align: left; background: none; border: 0; padding: 9px 8px; border-radius: 9px; }
.s-item:hover { background: var(--bg); }
.s-item b { flex: none; min-width: 38px; color: var(--gold); font-variant-numeric: tabular-nums; }
.s-item span { font-size: 14px; line-height: 1.4; }
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal-box { background: var(--surface); width: min(760px, 100%); max-height: 86vh; border-radius: 16px; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.3); position: relative; z-index: 61; }
.modal-head { display: flex; justify-content: space-between; gap: 16px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.modal-head small { color: var(--ink-3); font-size: 12.5px; }
.modal-head h3 { font-family: var(--serif); font-weight: 600; font-size: 20px; margin: 4px 0 0; line-height: 1.3; }
.modal-body { padding: 16px 22px; overflow-y: auto; white-space: pre-wrap; font-size: 15px; line-height: 1.7; }
.modal-foot { padding: 12px 22px 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ---------- ilova (PWA) elementlari ---------- */
.install-btn { background: var(--gold); border-color: var(--gold); color: var(--navy); font-weight: 600; }
.install-btn:hover { background: #dbb45a; }
.tabbar { display: none; }
.sheet { position: fixed; inset: 0; z-index: 70; background: rgba(8, 15, 30, .5); display: flex; align-items: flex-end; justify-content: center; }
.sheet-box { background: var(--surface); width: 100%; max-width: 480px; border-radius: 20px 20px 0 0; padding: 24px 22px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; animation: up .25s ease; }
.sheet-box img { border-radius: 14px; }
.sheet-box ol { text-align: left; margin: 4px 0 8px; padding-left: 20px; color: var(--ink-2); line-height: 1.9; }
.sheet-box .btn-primary { width: 100%; justify-content: center; }
.share-ico { display: inline-block; color: var(--blue); font-weight: 700; }
@keyframes up { from { transform: translateY(100%); } }

/* ================= QONUN AKADEMIYASI ================= */
.narrow { max-width: 640px; }
.mainnav { display: flex; gap: 4px; margin-left: 18px; margin-right: auto; }
.mainnav button { background: none; border: 0; color: #b9c6db; font-weight: 500; font-size: 14px; padding: 8px 12px; border-radius: 9px; }
.mainnav button:hover { color: #fff; background: rgba(255,255,255,.06); }
.mainnav button.on { color: #fff; background: rgba(255,255,255,.1); box-shadow: inset 0 -2px 0 var(--gold); }
.btn-big { width: 100%; justify-content: center; padding: 15px 20px; font-size: 16px; border-radius: 14px; }
.sec-h { font-size: 15px; font-weight: 700; margin: 26px 0 12px; }
.page-h { font-family: var(--serif); font-size: 28px; margin: 26px 0 4px; }

/* tanishuv */
.onboard { background: linear-gradient(180deg, var(--navy), var(--navy-2)); color: #fff; min-height: calc(100vh - 64px); padding: 36px 0 40px; }
.ob-logo { text-align: center; }
.ob-logo img { border-radius: 22px; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.ob-title { font-family: var(--serif); text-align: center; font-size: 34px; margin: 16px 0 6px; }
.ob-sub { text-align: center; color: #c3cfe1; margin: 0 auto 26px; max-width: 460px; }
.ob-label { display: block; font-weight: 600; font-size: 14px; color: #dbe4f1; margin: 16px 0 8px; }
.ob-input { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.07); color: #fff; font-size: 16px; outline: 0; }
.ob-input:focus { border-color: var(--gold); }
.ob-input::placeholder { color: #8fa1bd; }
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 22px; }
.tier { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px; border-radius: 16px; border: 2px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #fff; transition: transform .15s, border-color .15s; }
.tier:hover { transform: translateY(-2px); }
.tier.on { border-color: var(--gold); background: rgba(212,168,67,.16); }
.tier-emoji { font-size: 34px; line-height: 1.2; }
.tier b { font-size: 15px; }
.tier small { color: #b9c6db; font-size: 12px; }
.tiers.small .tier { background: var(--surface); color: var(--ink); border-color: var(--line); }
.tiers.small .tier small { color: var(--ink-3); }
.tiers.small .tier.on { border-color: var(--gold); background: var(--gold-soft); }

/* asosiy */
.home-hero { background: linear-gradient(180deg, var(--navy), var(--navy-2)); color: #fff; padding: 26px 0 70px; }
.hello { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.hello small { color: var(--gold); font-weight: 600; font-size: 13px; }
.hello h2 { margin: 2px 0 0; font-family: var(--serif); font-size: 28px; }
.avatar-big { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; background: rgba(255,255,255,.1); border: 2px solid var(--gold); flex: none; }
button.avatar-big { cursor: pointer; background: var(--gold-soft); }
.lvl-card { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 16px 18px; }
.lvl-card.light { background: var(--surface); border-color: var(--line); margin-top: 16px; }
.lvl-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.lvl-top span { color: #b9c6db; font-variant-numeric: tabular-nums; }
.lvl-card.light .lvl-top span { color: var(--ink-3); }
.xpbar { height: 10px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; }
.lvl-card.light .xpbar { background: var(--line); }
.xpbar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #d4a843, #f3cf72); transition: width .6s ease; }
.lvl-stats { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: #c3cfe1; }
.lvl-stats b { color: #fff; }
.daily { margin-top: -44px; position: relative; width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px 18px; border-radius: 16px; border: 0; background: var(--surface); box-shadow: var(--shadow), 0 10px 30px rgba(11,31,58,.12); }
.daily-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: var(--gold-soft); flex: none; }
.daily b { display: block; font-size: 15px; }
.daily small { color: var(--ink-3); font-size: 13px; }
.daily > span:nth-child(2) { flex: 1; }
.daily-go { font-weight: 700; color: var(--navy); white-space: nowrap; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .daily-go { color: var(--gold); } }
.daily.done .daily-ico { background: var(--green-bg); }
.daily.done .daily-go { color: var(--green); }

.game-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.game { --gc: var(--navy); display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.game::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--gc); }
.game:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.game-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 28px; background: color-mix(in srgb, var(--gc) 12%, transparent); flex: none; }
.game-body { flex: 1; min-width: 0; }
.game-body b { display: block; font-size: 16px; }
.game-body small { color: var(--ink-3); font-size: 13px; line-height: 1.4; display: block; margin-top: 2px; }
.game-xp { font-size: 12px; font-weight: 700; color: var(--gc); background: color-mix(in srgb, var(--gc) 10%, transparent); padding: 3px 8px; border-radius: 8px; white-space: nowrap; }
.game.locked { opacity: .55; }
.game-lock { font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }

/* oʻyin ekrani */
.play { padding-bottom: 30px; }
.play-top { display: flex; align-items: center; gap: 12px; padding: 16px 0 10px; position: sticky; top: 64px; background: var(--bg); z-index: 5; }
.play-progress { flex: 1; height: 12px; border-radius: 8px; background: var(--line); overflow: hidden; }
.play-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #4ade80); border-radius: 8px; transition: width .4s; width: 0; }
.play-score { font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }
.q-meta { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 13px; font-weight: 600; margin: 8px 2px 10px; }
.qcard { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px 22px; text-align: center; box-shadow: var(--shadow); position: relative; touch-action: pan-y; user-select: none; transition: transform .25s, background .25s, border-color .25s; }
.qcard.swipe { cursor: grab; }
.q-emoji { font-size: 54px; line-height: 1.1; display: block; margin-bottom: 10px; }
.q-text { font-size: 19px; font-weight: 600; line-height: 1.45; margin: 0; }
.q-text.small { font-size: 16px; text-align: center; margin: 14px 0 4px; }
.q-story { color: var(--ink-2); font-size: 16px; margin: 0 0 12px; line-height: 1.55; }
.swipe-hint { display: block; color: var(--ink-3); font-size: 12px; margin-top: 14px; letter-spacing: .5px; }
.qcard.lean-yes { border-color: var(--green); background: var(--green-bg); }
.qcard.lean-no { border-color: var(--red); background: var(--red-bg); }
.qcard.right { border-color: var(--green); background: var(--green-bg); }
.qcard.wrong { border-color: var(--red); background: var(--red-bg); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.speak { position: absolute; top: 12px; right: 12px; border: 0; background: var(--bg); width: 40px; height: 40px; border-radius: 50%; font-size: 18px; }
.answers { display: grid; gap: 10px; margin-top: 14px; }
.answers.two { grid-template-columns: 1fr 1fr; }
.ans { border: 2px solid var(--line); background: var(--surface); border-radius: 14px; padding: 14px; font-size: 15px; font-weight: 600; text-align: left; display: flex; gap: 12px; align-items: flex-start; transition: border-color .15s, background .15s; }
.ans:hover:not(:disabled) { border-color: var(--gold); }
.answers.two .ans { justify-content: center; font-size: 16px; padding: 16px; }
.ans.yes:hover:not(:disabled) { border-color: var(--green); }
.ans.no:hover:not(:disabled) { border-color: var(--red); }
.ans span { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--bg); font-size: 13px; font-weight: 800; color: var(--ink-3); }
.ans div b { display: block; font-size: 14px; }
.ans div small { display: block; color: var(--ink-3); font-weight: 500; font-size: 13px; margin-top: 2px; }
.ans.correct { border-color: var(--green); background: var(--green-bg); }
.ans.wrong { border-color: var(--red); background: var(--red-bg); }
.ans:disabled { cursor: default; }
.fb { margin-top: 14px; border-radius: 18px; padding: 16px 18px; animation: fadeUp .25s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
.fb.ok { background: var(--green-bg); border: 1px solid color-mix(in srgb, var(--green) 30%, transparent); }
.fb.bad { background: var(--red-bg); border: 1px solid color-mix(in srgb, var(--red) 30%, transparent); }
.fb-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.fb-head b { font-size: 18px; }
.fb.ok .fb-head b, .fb.ok .fb-head span { color: var(--green); }
.fb.bad .fb-head b { color: var(--red); }
.fb-head span { font-weight: 800; }
.fb p { margin: 8px 0; color: var(--ink); }
.fb-answer { font-size: 14px; }
.fb-quote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--gold); font-family: var(--serif); font-size: 15px; color: var(--ink-2); background: rgba(255,255,255,.35); border-radius: 0 8px 8px 0; }
.src-link { border: 0; background: rgba(255,255,255,.55); border-radius: 9px; padding: 6px 10px; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 12px; text-align: left; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .src-link { background: rgba(0,0,0,.25); color: var(--gold); } }
.timer { height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; margin-bottom: 12px; }
.timer i { display: block; height: 100%; width: 100%; background: var(--blue); transition: width .2s linear; }
.timer i.low { background: var(--red); }
.draft-mini { background: #fffef9; color: #1e1b14; border: 1px solid #ece6d4; border-radius: 12px; padding: 16px 18px; font-family: var(--serif); box-shadow: 0 4px 16px rgba(15,23,42,.06); }
.draft-mini small { font-family: Inter, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 1px; color: #a1782a; }
.draft-mini p { margin: 6px 0 0; font-size: 17px; line-height: 1.55; }
.finish { text-align: center; padding: 30px 6px; }
.stars { font-size: 54px; letter-spacing: 6px; color: var(--line-2); }
.stars .on { color: #f5b301; text-shadow: 0 4px 14px rgba(245,179,1,.4); }
.finish h2 { font-family: var(--serif); font-size: 26px; margin: 8px 0; }
.finish-score { color: var(--ink-2); font-size: 17px; margin: 0; }
.finish-xp { font-size: 34px; font-weight: 800; color: var(--gold); margin: 12px 0; }
.finish-xp small { font-size: 14px; color: var(--ink-3); font-weight: 600; }
.levelup { display: inline-block; background: var(--gold-soft); color: var(--ink); border-radius: 12px; padding: 10px 16px; font-weight: 700; margin-bottom: 10px; }
.new-badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 6px 0 14px; }
.new-badges span { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 14px; }
.finish-actions { display: grid; gap: 10px; max-width: 360px; margin: 20px auto 0; }

/* profil */
.prof-head { display: flex; align-items: center; gap: 16px; margin-top: 26px; }
.prof-head h2 { margin: 0; font-family: var(--serif); font-size: 26px; }
.prof-head small { color: var(--ink-3); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center; }
.stat span { font-size: 20px; }
.stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.stat small { color: var(--ink-3); font-size: 12px; }
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.badge-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; text-align: center; opacity: .45; filter: grayscale(1); }
.badge-item.got { opacity: 1; filter: none; border-color: var(--gold); background: var(--gold-soft); }
.badge-item span { font-size: 28px; display: block; }
.badge-item b { display: block; font-size: 13px; margin-top: 4px; }
.badge-item small { display: block; color: var(--ink-3); font-size: 11px; line-height: 1.3; margin-top: 2px; }

/* deputat rejimi */
.dep-banner { background: rgba(212,168,67,.16); border: 1px solid rgba(212,168,67,.5); color: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-size: 14px; }
.dep-result { background: var(--gold-soft); border: 1px solid var(--gold); border-radius: 14px; padding: 14px 18px; margin-bottom: 14px; font-size: 16px; }
.dep-result small { color: var(--ink-3); display: block; margin-top: 2px; font-size: 13px; }

/* xabar va konfetti */
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 80; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100vw - 32px); text-align: center; animation: toastIn .25s ease; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 16px); } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall 2.2s ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); opacity: .8; } }

/* ================= QAHRAMONLAR ================= */
.char { display: block; width: 100%; height: auto; }
.avatar-big svg { width: 100%; height: 100%; }
.avatar-big { overflow: hidden; padding: 2px; }
.char-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 22px; }
.char-pick { border: 2px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); border-radius: 14px; padding: 6px 4px 6px; color: #fff; display: flex; flex-direction: column; align-items: center; transition: transform .15s; }
.char-pick svg { width: 60px; height: 60px; }
.char-pick small { font-size: 11.5px; font-weight: 600; margin-top: 2px; }
.char-pick:hover { transform: translateY(-2px); }
.char-pick.on { border-color: var(--gold); background: rgba(212,168,67,.18); }
.char-grid.light .char-pick { background: var(--surface); border-color: var(--line); color: var(--ink); }
.char-grid.light .char-pick.on { border-color: var(--gold); background: var(--gold-soft); }
.char-happy { animation: bob 2.4s ease-in-out infinite; }
.char-sad .tear { animation: tear 1.6s ease-in infinite; }
.char-shocked { animation: jolt .5s ease; }
@keyframes bob { 50% { transform: translateY(-3px); } }
@keyframes tear { from { transform: translateY(0); opacity: 1; } to { transform: translateY(12px); opacity: 0; } }
@keyframes jolt { 30% { transform: scale(1.08) rotate(-3deg); } 60% { transform: scale(.97) rotate(2deg); } }
.game.featured { border-color: color-mix(in srgb, var(--gc) 40%, var(--line)); }
.game-new { position: absolute; top: 8px; right: 10px; font-size: 10px; font-weight: 800; letter-spacing: .6px; color: #fff; background: var(--gc); padding: 2px 7px; border-radius: 6px; }

/* ================= VIRTUAL SUD ================= */
.court-steps { flex: 1; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.court-steps span { font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 8px; background: var(--line); color: var(--ink-3); white-space: nowrap; }
.court-steps span.done { background: var(--green-bg); color: var(--green); }
.court-steps span.on { background: var(--navy); color: #fff; }
.courtroom { position: relative; background: linear-gradient(180deg, #5b3a1e 0%, #7a4f2a 38%, #e8dcc8 38%, #f3ece0 100%); border-radius: 20px; padding: 14px 12px 12px; margin-bottom: 14px; overflow: hidden; box-shadow: inset 0 -6px 0 rgba(0,0,0,.06); }
.courtroom::before { content: "⚖️ SUD ZALI"; position: absolute; top: 8px; left: 12px; font-size: 10px; font-weight: 800; letter-spacing: 1.5px; color: #f3d9a4; }
.bench { display: flex; justify-content: center; }
.seat { position: relative; display: flex; flex-direction: column; align-items: center; }
.seat small { font-size: 11px; font-weight: 700; color: #3f2a14; background: rgba(255,255,255,.75); padding: 1px 8px; border-radius: 6px; margin-top: 2px; text-align: center; }
.seat.judge svg { width: 92px; height: 92px; }
.seat.judge small { color: #fff; background: rgba(0,0,0,.35); }
.floor { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 6px; margin-top: 18px; }
.seat.side svg { width: 84px; height: 84px; }
.duo { position: relative; }
.duo .mini { position: absolute; right: -30px; bottom: 0; width: 46px; }
.duo .mini svg { width: 46px; height: 46px; }
.vs { font-size: 26px; padding-bottom: 26px; }
.bubble { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(300px, 78vw); background: #fff; color: #111827; border-radius: 14px; padding: 9px 12px; font-size: 13.5px; font-weight: 600; line-height: 1.4; box-shadow: 0 6px 20px rgba(0,0,0,.18); z-index: 3; animation: pop .25s ease; }
.bubble::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -7px; border: 7px solid transparent; border-top-color: #fff; }
.seat.judge .bubble { position: relative; bottom: auto; left: auto; transform: none; margin-bottom: 6px; }
.seat.judge .bubble::after { left: 50%; }
.floor .bubble { left: 0; transform: none; }
.floor .seat:last-child .bubble { left: auto; right: 0; }
.floor .seat:last-child .bubble::after { left: auto; right: 30px; }
.floor .seat:first-child .bubble::after { left: 30px; }
.floor .seat.side { padding-top: 64px; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.seat.judge .bubble { animation: popc .25s ease; }
@keyframes popc { from { transform: scale(.85); opacity: 0; } }
.gavel { position: absolute; top: 10px; right: 14px; font-size: 40px; animation: gavel .6s ease 2; transform-origin: 80% 80%; z-index: 4; }
@keyframes gavel { 40% { transform: rotate(-40deg); } 70% { transform: rotate(8deg); } }
.case-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin-bottom: 14px; }
.case-emoji { font-size: 40px; }
.case-card h3 { font-family: var(--serif); font-size: 22px; margin: 4px 0 8px; }
.case-card p { color: var(--ink-2); margin: 0 0 12px; }
.claim { background: var(--blue-bg); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-top: 8px; }
.claim.opp { background: var(--amber-bg); }
.c-task { font-weight: 700; margin: 0 0 10px; }
.law-cards { display: grid; gap: 10px; }
.law-card { text-align: left; border: 2px solid var(--line); background: #fffef9; color: #1e1b14; border-radius: 14px; padding: 12px 14px; position: relative; box-shadow: 0 3px 0 #ece6d4; }
.law-card b { display: block; font-size: 14px; color: #7a5a17; }
.law-card small { display: block; font-family: var(--serif); font-size: 14.5px; margin-top: 3px; }
.law-card:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-1px); }
.law-card.on { border-color: var(--navy); background: #e8efff; box-shadow: 0 0 0 3px rgba(29,78,216,.25), 0 3px 0 #c7d4f5; }
.law-card.on::after, .suspect.pick.on::after, .ans.mot.chosen::after { content: "✓"; position: absolute; top: 8px; right: 10px; font-weight: 900; color: var(--navy); }
.ans.mot { position: relative; }
.law-card.correct { border-color: var(--green); background: #eaf7ee; }
.law-card.wrong { border-color: var(--red); background: #fff1ea; }
.ev-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.ev-card { text-align: left; border: 2px dashed var(--line-2); background: var(--surface); border-radius: 14px; padding: 12px; font-size: 14px; font-weight: 600; min-height: 72px; }
.ev-card small { display: block; font-weight: 500; color: var(--ink-2); margin-top: 6px; font-size: 12.5px; }
.ev-card.on { border-style: solid; border-color: var(--navy); background: var(--blue-bg); }
.ev-card.good { border-style: solid; border-color: var(--green); }
.ev-card.bad { border-style: solid; border-color: var(--red); opacity: .8; }
.speech { width: 100%; border: 2px solid var(--line); border-radius: 14px; padding: 12px; font-size: 15px; background: var(--surface); resize: vertical; outline: 0; }
.speech:focus { border-color: var(--gold); }
.verdict-stamp { display: inline-block; font-weight: 900; letter-spacing: 1.5px; font-size: 15px; padding: 8px 14px; border: 4px double; border-radius: 10px; transform: rotate(-4deg); margin-bottom: 10px; animation: stamp .35s ease; }
.verdict-stamp.win { color: var(--green); border-color: var(--green); }
.verdict-stamp.lose { color: var(--red); border-color: var(--red); }
@keyframes stamp { from { transform: scale(2.2) rotate(-4deg); opacity: 0; } }

/* ================= DUEL ================= */
.duel-title { flex: 1; font-size: 16px; }
.duel-hero { text-align: center; padding: 10px 4px 16px; }
.duel-hero h2 { font-family: var(--serif); font-size: 28px; margin: 6px 0; }
.duel-hero p { color: var(--ink-2); margin: 0; }
.duel-vs { display: flex; align-items: center; justify-content: center; gap: 14px; }
.duel-vs svg { width: 96px; height: 96px; }
.duel-vs b { font-size: 30px; font-weight: 900; color: var(--red); font-style: italic; }
.join-row { display: flex; gap: 8px; margin-top: 12px; }
.ob-input.light { background: var(--surface); color: var(--ink); border-color: var(--line-2); flex: 1; letter-spacing: 3px; font-weight: 700; text-align: center; }
.ob-input.light::placeholder { letter-spacing: 0; font-weight: 400; color: var(--ink-3); }
.lobby-code { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.lobby-code small { color: var(--ink-3); font-weight: 600; }
.lobby-code > b { display: block; font-size: 44px; letter-spacing: 10px; font-weight: 900; color: var(--navy); line-height: 1.1; margin: 2px 0 8px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lobby-code > b { color: var(--gold); } }
.lobby-code img { background: #fff; border-radius: 12px; padding: 4px; }
.share-row { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.share-row a { text-decoration: none; color: inherit; }
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.team { border-radius: 18px; padding: 12px 10px; border: 2px solid; text-align: center; }
.team-A { border-color: #2563eb; background: color-mix(in srgb, #2563eb 7%, var(--surface)); }
.team-B { border-color: #dc2626; background: color-mix(in srgb, #dc2626 7%, var(--surface)); }
.team-h { font-weight: 800; margin-bottom: 8px; }
.team-ps { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-height: 80px; }
.you-here { display: inline-block; font-size: 12px; font-weight: 700; color: var(--ink-3); margin-top: 6px; }
.btn-ghost.small { font-size: 12.5px; padding: 6px 10px; margin-top: 6px; }
.pchip { display: flex; flex-direction: column; align-items: center; width: 74px; }
.pchip svg { width: 58px; height: 58px; }
.pchip b { font-size: 12px; max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pchip small { font-size: 11px; color: var(--ink-3); }
.pchip.me b { color: var(--blue); }
.revenge { text-align: center; font-weight: 900; color: var(--red); font-size: 18px; margin-top: 12px; animation: jolt .6s ease 2; }
.center { text-align: center; }
.leave { width: 100%; margin-top: 10px; }
.tug { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; margin: 4px 0 6px; }
.tug span { white-space: nowrap; }
.rope { flex: 1; height: 6px; border-radius: 4px; background: linear-gradient(90deg, #2563eb, #dc2626); position: relative; }
.rope i { position: absolute; top: -10px; transform: translateX(-50%); font-style: normal; font-size: 18px; transition: left .6s ease; }
.ans.chosen { border-color: var(--navy); background: var(--blue-bg); }
.dplayers { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.end-banner { text-align: center; font-size: 22px; font-weight: 900; padding: 16px; border-radius: 18px; background: linear-gradient(135deg, #fef3c7, #fde68a); color: #78350f; }
.end-banner.draw { background: var(--blue-bg); color: var(--blue); }
.end-banner small { display: block; font-size: 14px; font-weight: 700; margin-top: 4px; }
.podium { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.podium .pchip svg { width: 70px; height: 70px; }
.jail { background: #334155; border-radius: 18px; padding: 12px; margin: 12px 0; color: #e2e8f0; }
.jail .muted { color: #cbd5e1; }
.jail-sign { text-align: center; font-weight: 900; letter-spacing: 3px; color: #fbbf24; margin-bottom: 8px; }
.jail-cell { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; background: repeating-linear-gradient(90deg, transparent 0 22px, rgba(0,0,0,.25) 22px 26px); border-radius: 12px; padding: 10px; }
.jail .pchip b, .jail .pchip small { color: #f1f5f9; }
.pchip.jailed svg { animation: jailshake 3s ease-in-out infinite; }
@keyframes jailshake { 92% { transform: none; } 94% { transform: translateX(-2px); } 96% { transform: translateX(2px); } }
.bail { border: 3px dashed #f59e0b; border-radius: 18px; padding: 14px; margin: 12px 0; background: var(--amber-bg); }
.bail-h { font-weight: 800; text-align: center; margin-bottom: 10px; }
.qcard.small { padding: 16px; }
.qcard.small .q-emoji { font-size: 36px; }
.qcard.small .q-text { font-size: 16px; }
.bail-res { font-weight: 700; margin: 10px 0 0; }
.bail-res.ok { color: var(--green); }
.bail-res.bad { color: var(--red); }
.bail-res small { display: block; font-weight: 500; color: var(--ink-2); margin-top: 4px; }
.free-banner { text-align: center; font-weight: 800; color: var(--green); background: var(--green-bg); border-radius: 14px; padding: 12px; margin: 12px 0; }
@media (max-width: 560px) {
  .char-grid { grid-template-columns: repeat(4, 1fr); }
  .ev-cards { grid-template-columns: 1fr; }
  .lobby-code > b { font-size: 38px; }
  .seat.side svg { width: 72px; height: 72px; }
  .duo .mini { right: -22px; width: 40px; }
  .duo .mini svg { width: 40px; height: 40px; }
}

/* ================= JINOYAT DETEKTIVI ================= */
.dossier { background: #f5efe0; color: #2b2111; border: 1px solid #e3d6b8; border-radius: 6px 18px 18px 18px; padding: 18px; margin: 18px 0 14px; position: relative; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.dossier-tab { position: absolute; top: -14px; left: 0; background: #c2a35a; color: #2b2111; font-size: 11px; font-weight: 800; letter-spacing: 1px; padding: 3px 12px; border-radius: 8px 8px 0 0; }
.dossier h3 { font-family: var(--serif); font-size: 23px; margin: 4px 0 6px; }
.dossier p { color: #4a3b20; }
.dossier .muted { color: #6b5a3a; }
.dossier-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; font-weight: 700; color: #7a5a17; margin-bottom: 8px; }
.dossier .claim { background: rgba(255,255,255,.6); color: #2b2111; }
.suspect-row { display: flex; justify-content: center; gap: 10px; margin: 14px 0 4px; }
.suspect-row .pchip { width: 90px; }
.suspect-row .pchip small { color: #6b5a3a; text-align: center; line-height: 1.25; }
.scene { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 400 / 260; box-shadow: 0 8px 24px rgba(0,0,0,.15); margin-bottom: 14px; background: #111; }
.scene-svg { width: 100%; height: 100%; display: block; }
.hotspot { position: absolute; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.88); box-shadow: 0 0 0 3px rgba(250,204,21,.9), 0 4px 12px rgba(0,0,0,.3); font-size: 24px; display: grid; place-items: center; cursor: pointer; animation: glow 1.8s ease-in-out infinite; padding: 0; }
.hotspot::after { content: "🔍"; position: absolute; right: -8px; top: -8px; font-size: 14px; }
.hotspot.found { animation: none; box-shadow: 0 0 0 3px #16a34a, 0 4px 12px rgba(0,0,0,.25); }
.hotspot.found::after { content: "✅"; }
@keyframes glow { 50% { box-shadow: 0 0 0 7px rgba(250,204,21,.45), 0 4px 12px rgba(0,0,0,.3); transform: translate(-50%, -50%) scale(1.06); } }
.notebook { background: #fffef7; color: #1e1b14; border: 1px solid #ece6d4; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; background-image: repeating-linear-gradient(transparent 0 27px, #e7e1cf 27px 28px); }
.nb-h { font-weight: 800; margin-bottom: 6px; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.note > span { font-size: 22px; }
.note b { display: block; font-size: 14px; }
.note small { display: block; color: #4a3b20; font-size: 13px; line-height: 1.4; }
.notebook .muted { color: #7c6f55; }
.clue-pop { position: fixed; inset: 0; z-index: 85; background: rgba(8,15,30,.55); display: grid; place-items: center; padding: 20px; animation: fadeUp .2s ease; }
.clue-box { background: #fffef7; color: #1e1b14; border-radius: 20px; padding: 22px; max-width: 360px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.4); border: 3px solid #facc15; }
.clue-emoji { font-size: 58px; display: block; animation: jolt .5s ease; }
.clue-box b { font-size: 18px; display: block; margin: 4px 0; }
.clue-box p { margin: 6px 0 10px; color: #3f3418; }
.clue-box small { display: block; color: #7c6f55; margin-bottom: 12px; }
.clue-box .btn-primary { width: 100%; justify-content: center; }
.suspects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.suspect { position: relative; border: 2px solid var(--line); background: var(--surface); border-radius: 16px; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.suspect svg { width: 70px; height: 70px; }
.suspect b { font-size: 13.5px; }
.suspect small { font-size: 11.5px; color: var(--ink-3); line-height: 1.25; }
.suspect.on { border-color: var(--navy); background: var(--blue-bg); }
.suspect.seen { border-style: dashed; }
.suspect.pick.on { border-color: var(--red); border-style: solid; background: var(--red-bg); box-shadow: 0 0 0 3px rgba(194,65,12,.2); }
.suspect.pick.on::after { color: var(--red) !important; }
.seen-tag { position: absolute; top: 6px; right: 8px; color: var(--green); font-weight: 900; }
.interro { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin-bottom: 14px; animation: fadeUp .25s ease; }
.interro-h { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.interro-h svg { width: 52px; height: 52px; }
.interro-h b { display: block; }
.interro-h small { color: var(--ink-3); }
.talks { display: flex; flex-direction: column; gap: 6px; }
.talk { max-width: 86%; padding: 8px 12px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; animation: fadeUp .2s ease; }
.talk.q { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.talk.a { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.asks { display: grid; gap: 8px; margin-top: 10px; }
.ask { text-align: left; border: 2px dashed var(--line-2); background: none; border-radius: 12px; padding: 10px 12px; font-weight: 600; font-size: 14px; }
.ask:hover { border-color: var(--gold); }
.motive-hint { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); background: var(--amber-bg); padding: 8px 12px; border-radius: 10px; }
.stmts { display: grid; gap: 8px; }
.stmt { display: flex; gap: 10px; align-items: flex-start; text-align: left; border: 2px solid var(--line); background: var(--surface); border-radius: 14px; padding: 8px 10px; font-size: 14px; }
.stmt.on { border-color: var(--red); background: var(--red-bg); }
.mini-av { width: 34px; flex: none; }
.mini-av svg { width: 34px; height: 34px; }
.ev-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.evp { border: 2px solid var(--line); background: #fffef7; color: #1e1b14; border-radius: 12px; padding: 8px 12px; font-weight: 600; font-size: 13.5px; display: flex; gap: 6px; align-items: center; }
.evp span { font-size: 20px; }
.evp.on { border-color: var(--red); background: #fff1ea; }
.caught { display: flex; gap: 12px; align-items: center; }
.caught svg { width: 70px; height: 70px; flex: none; }
.caught p { margin: 0; }
.presume { background: var(--amber-bg); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 12px 0; text-align: left; }
.lineup { display: flex; justify-content: center; gap: 10px; margin: 12px 0; }
.lineup .pchip { width: 92px; }
.lineup .pchip svg { width: 76px; height: 76px; }
.case-card.left { text-align: left; }
.law-res { background: var(--bg); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.lesson { background: var(--green-bg); border-radius: 12px; padding: 10px 12px; margin: 10px 0 0 !important; color: var(--ink) !important; }
body.crime-kid .hotspot { width: 54px; height: 54px; font-size: 28px; }

/* ================= UMUMIY YANGI ELEMENTLAR ================= */
.game-grid.one { grid-template-columns: 1fr; }
.loading { text-align: center; color: var(--ink-2); padding: 28px 12px; font-weight: 600; }
.loading small { display: block; color: var(--ink-3); font-weight: 500; margin-top: 4px; }
.disc { display: block; color: var(--ink-3); font-size: 12px; margin-top: 10px; }
.chip.on { border-color: var(--navy); background: var(--navy); color: #fff; }
.speak.inline { position: static; width: 30px; height: 30px; font-size: 14px; vertical-align: middle; margin-left: 4px; }
.prof-fields { display: grid; gap: 10px; }
.prof-fields label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.prof-fields .ob-input.light { text-align: left; letter-spacing: 0; font-weight: 500; }
select.ob-input { appearance: auto; }
.onboard select.ob-input option { color: #111; }
.ob-label small { font-weight: 500; color: #9fb0c9; }
.kpi b.kpi-sm { font-size: 17px; line-height: 1.25; }

/* reyting */
.seg { display: flex; gap: 4px; background: var(--line); padding: 4px; border-radius: 12px; margin: 14px 0 10px; overflow-x: auto; }
.seg button { flex: 1; border: 0; background: none; padding: 8px 10px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.lb-filter { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.lb-me { background: var(--gold-soft); border: 1px solid var(--gold); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; font-weight: 600; }
.lb-row { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; margin-bottom: 8px; }
.lb-row.me { border-color: var(--gold); background: var(--gold-soft); }
.lb-rank { width: 30px; text-align: center; font-weight: 800; font-size: 18px; flex: none; }
.lb-av { width: 40px; flex: none; }
.lb-av svg { width: 40px; height: 40px; }
.lb-main { flex: 1; min-width: 0; }
.lb-main b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-main small { color: var(--ink-3); font-size: 12px; }
.lb-score { font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }

/* yordamchi chat */
.chat { display: flex; flex-direction: column; gap: 12px; padding: 6px 0 110px; }
.msg { display: flex; gap: 8px; align-items: flex-end; }
.msg.me { justify-content: flex-end; }
.bot-av { width: 38px; flex: none; }
.bot-av svg { width: 38px; height: 38px; }
.bubble-msg { max-width: 88%; background: var(--surface); border: 1px solid var(--line); border-radius: 18px 18px 18px 4px; padding: 12px 14px; font-size: 14.5px; line-height: 1.55; }
.bubble-msg p { margin: 4px 0 8px; }
.bubble-msg ol { margin: 4px 0 8px; padding-left: 20px; }
.msg.me .bubble-msg { background: var(--navy); color: #fff; border-color: var(--navy); border-radius: 18px 18px 4px 18px; }
.cite { cursor: pointer; background: var(--gold-soft); color: #7a5a17; border-radius: 4px; padding: 0 4px; font-weight: 700; font-size: 11px; margin-left: 1px; }
.srcs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.src-chip { border: 1px solid var(--line-2); background: var(--bg); border-radius: 8px; padding: 4px 8px; font-size: 12px; font-weight: 600; text-align: left; }
.src-chip b { color: var(--gold); margin-right: 3px; }
.sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sugg .chip { white-space: normal !important; flex: 0 1 auto !important; text-align: left; max-width: 100%; }
.typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); margin-right: 3px; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }
.chat-form { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; gap: 8px; padding: 10px max(16px, calc((100vw - 640px) / 2)) calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.chat-form textarea { flex: 1; resize: none; border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 12px; font-size: 15px; background: var(--bg); outline: 0; }
.chat-form textarea:focus { border-color: var(--gold); }
.chat-form .btn-primary { padding: 0 18px; font-size: 18px; width: auto !important; flex: none; }
.chat-form textarea { min-width: 0; }

/* hujjat generatori */
.dg-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.dg-kind { text-align: left; border: 2px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.dg-kind span { font-size: 24px; }
.dg-kind b { font-size: 14px; }
.dg-kind small { color: var(--ink-3); font-size: 12px; }
.dg-kind.on { border-color: var(--navy); background: var(--blue-bg); }
.dg-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.dg-fields .ob-input.light { text-align: left; letter-spacing: 0; font-weight: 500; font-size: 14px; padding: 11px 12px; }
.dg-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.paper { background: #fff; color: #111; border: 1px solid #ddd; border-radius: 4px; padding: 40px 44px; font-family: "Times New Roman", var(--serif); font-size: 15.5px; line-height: 1.6; box-shadow: 0 8px 30px rgba(15,23,42,.1); margin-bottom: 14px; }
.paper-to { margin-left: 50%; font-size: 14.5px; }
.paper-title { text-align: center; font-size: 18px; letter-spacing: 3px; margin: 26px 0 16px; }
.paper p { text-indent: 1.25em; margin: 0 0 8px; text-align: justify; }
.paper ol { margin: 0 0 10px; }
.paper-sign { display: flex; justify-content: space-between; margin-top: 30px; }

/* radar */
.radar-item .card-head { align-items: flex-start; }
.radar-emoji { font-size: 26px; }
.radar-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin: 4px 0 6px; }
.radar-item .src-link { display: inline-block; margin-top: 8px; text-decoration: none; }

/* monitoring */
.mrow { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 44px; gap: 8px; align-items: center; margin: 7px 0; font-size: 13.5px; }
.mrow small { grid-column: 1 / -1; margin-top: -6px; color: var(--ink-3); font-size: 11.5px; text-align: right; }
.mlabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbar { height: 10px; background: var(--line); border-radius: 6px; overflow: hidden; }
.mbar i { display: block; height: 100%; border-radius: 6px; }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 6px; }
.spark div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.spark i { width: 100%; background: linear-gradient(180deg, var(--gold), #b8892b); border-radius: 4px 4px 0 0; min-height: 2px; }
.spark small { font-size: 10px; color: var(--ink-3); margin-top: 3px; }
.hard { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hard > b { width: 44px; font-size: 16px; flex: none; }
.hard div { flex: 1; min-width: 0; }
.hard span { display: block; font-size: 14px; }
.hard small { color: var(--ink-3); font-size: 12px; }

/* huquq xaritasi */
.world { background: color-mix(in srgb, var(--wc) 7%, var(--surface)); border: 2px solid color-mix(in srgb, var(--wc) 35%, transparent); border-radius: 22px; padding: 14px; margin-bottom: 16px; }
.world.locked { opacity: .6; --wc: var(--ink-3); }
.world-h { font-weight: 800; font-size: 17px; margin-bottom: 6px; }
.path { position: relative; padding: 6px 0; }
.node { --wc: var(--navy); display: flex; flex-direction: column; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--wc); color: #fff; font-size: 22px; font-weight: 800; margin: 10px 0; box-shadow: 0 6px 0 color-mix(in srgb, var(--wc) 60%, #000), 0 10px 20px rgba(0,0,0,.15); position: relative; transition: transform .15s; }
.node:hover:not(:disabled) { transform: translateY(-2px); }
.node:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 color-mix(in srgb, var(--wc) 60%, #000); }
.node.boss { width: 80px; height: 80px; font-size: 30px; background: linear-gradient(135deg, #f59e0b, #b45309); box-shadow: 0 6px 0 #78350f, 0 10px 24px rgba(180,83,9,.35); }
.node.lock { background: var(--line-2); box-shadow: 0 6px 0 var(--ink-3); cursor: default; }
.node i { position: absolute; bottom: -18px; font-style: normal; font-size: 13px; color: #f5b301; letter-spacing: 1px; white-space: nowrap; text-shadow: 0 1px 0 #fff; }
.node.done { outline: 3px solid #f5b301; outline-offset: 3px; }

/* sud jangi */
.role-banner { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; border-radius: 14px; padding: 10px 14px; margin: 10px 0 14px; font-size: 14px; }
.role-banner.role-A { background: color-mix(in srgb, #2563eb 10%, var(--surface)); border: 1px solid #2563eb; }
.role-banner.role-B { background: color-mix(in srgb, #dc2626 10%, var(--surface)); border: 1px solid #dc2626; }
.role-banner span { font-weight: 800; font-variant-numeric: tabular-nums; }
.c2-scores { display: grid; gap: 12px; margin: 14px 0; text-align: left; }
.c2-score { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.c2-score .mbar { grid-column: 1 / -1; height: 12px; }
.c2-score small { grid-column: 1 / -1; color: var(--ink-2); font-size: 13px; }

@media (max-width: 560px) {
  .dg-kinds, .dg-fields { grid-template-columns: 1fr; }
  .paper { padding: 24px 18px; font-size: 14.5px; }
  .paper-to { margin-left: 30%; }
}

/* chop etish: faqat hujjat */
@media print {
  body * { visibility: hidden !important; }
  #dgPaper, #dgPaper * { visibility: visible !important; }
  #dgPaper { position: absolute; left: 0; top: 0; width: 100%; border: 0; box-shadow: none; padding: 0; }
  .topbar, .tabbar { display: none !important; }
}

/* bolajon rejimi — katta, yorqin, oʻynoqi */
body.tier-kid { --radius: 20px; }
body.tier-kid .q-text { font-size: 22px; }
body.tier-kid .q-emoji { font-size: 72px; }
body.tier-kid .ans { font-size: 17px; border-width: 3px; border-radius: 18px; }
body.tier-kid .answers.two .ans { font-size: 19px; padding: 20px; }
body.tier-kid .game { border-radius: 22px; }
body.tier-kid .game-ico { width: 62px; height: 62px; font-size: 34px; border-radius: 18px; }
body.tier-kid .home-hero { background: linear-gradient(160deg, #1d4ed8, #7c3aed); }
body.tier-kid .fb-head b { font-size: 21px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) { .corpus-pill { display: none; } }
@media (max-width: 860px) { .brand-text small { display: none; } .mainnav { margin-left: 8px; } .mainnav button { padding: 8px 9px; } }
@media (max-width: 560px) { .mainnav { display: none; } }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .features { grid-template-columns: 1fr; }
  .diff, .grid2 { grid-template-columns: 1fr; }
  .imp-row { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .corpus-pill, .brand-text small { display: none; }
  .hero { padding: 34px 0 52px; }
  .composer-bar { flex-direction: column; align-items: stretch; }
  .chips { flex: none; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .chip { white-space: nowrap; flex: none; }
  .btn-primary { justify-content: center; width: 100%; }
  .verdict-card { flex-direction: column; align-items: flex-start; padding: 18px; }
  .gauge { width: 140px; }
  .steps { grid-template-columns: 1fr; }
  .kpi b { font-size: 22px; }
  .draft-doc { padding: 22px 18px; font-size: 15px; }
  #graph { height: 440px; }

  /* telefon: ilovaga oʻxshash koʻrinish */
  .hide-mobile { display: none; }
  .topbar-in { height: 56px; }
  .tabs { position: sticky; top: calc(56px + env(safe-area-inset-top)); z-index: 15; background: var(--bg); margin: 0 -16px 16px; padding: 0 16px; }
  .game-grid { grid-template-columns: 1fr; }
  .tiers { grid-template-columns: 1fr 1fr; }
  .badges { grid-template-columns: repeat(3, 1fr); }
  .play-top { top: 56px; }
  .onboard { min-height: calc(100vh - 56px); }
  .tabbar {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 11px; font-weight: 600; color: var(--ink-3); border-radius: 10px; }
  .tabbar button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .tabbar button.on { color: var(--navy); }
  .tabbar button.on svg { stroke: var(--gold); }
  .tabbar button:disabled { opacity: .35; cursor: default; }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .foot { margin-top: 28px; }
}
@media (max-width: 560px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tabbar button.on { color: var(--gold); }
}

/* oʻrnatilgan ilova sifatida ochilganda (bosh ekrandan) */
@media (display-mode: standalone) {
  .topbar { padding-top: env(safe-area-inset-top); }
  .install-btn { display: none !important; }
  #view-sim .lead, #view-sim .eyebrow, .features, .foot { display: none; }
  .hero { padding-top: 22px; }
  .hero h1 { font-size: 26px; }
  body { -webkit-user-select: none; user-select: none; overscroll-behavior-y: none; }
  textarea, .draft-doc, .modal-body { -webkit-user-select: text; user-select: text; }
}
