/* AI Reply — интерактивті өнім симуляторы.
   Сыртқы CDN жоқ: қаріп те, стиль де осы доменнен. */

:root {
  --brand: #3b5bfd;
  --brand-2: #00b8d9;
  --brand-ink: #24379e;
  --brand-soft: #eef2ff;
  --ink: #0b1020;
  --ink-2: #1c2438;
  --muted: #5b6577;
  --muted-2: #8b93a5;
  --line: #e7e9f0;
  --line-2: #f1f2f7;
  --bg: #f6f7fb;
  --panel: #ffffff;
  --panel-2: #fbfcfe;
  --stage: radial-gradient(120% 90% at 50% 0%, #1b2440 0%, #0b1020 62%, #070a16 100%);
  --stage-ink: #e8ecf8;
  --stage-muted: #98a2bf;
  --stage-line: rgba(255, 255, 255, .10);
  --ok: #0ca678;
  --ok-soft: #e6f7f1;
  --warn: #e8590c;
  --warn-soft: #fff1e6;
  --danger: #e03131;
  --danger-soft: #fff0f0;
  --r-xs: 8px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(11, 16, 32, .05), 0 1px 3px rgba(11, 16, 32, .04);
  --shadow: 0 8px 24px rgba(11, 16, 32, .07);
  --shadow-lg: 0 28px 60px rgba(11, 16, 32, .14), 0 8px 20px rgba(11, 16, 32, .06);
  --sidebar: 244px;
  --dur: .22s;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

:root[data-theme="dark"] {
  --ink: #eef1fa;
  --ink-2: #c8cfe4;
  --muted: #9aa3bd;
  --muted-2: #767f99;
  --line: #242c44;
  --line-2: #1b2137;
  --bg: #0a0e1a;
  --panel: #111728;
  --panel-2: #141b2f;
  --brand-soft: #1a2352;
  --brand-ink: #a7b6ff;
  --ok-soft: #0e2c24;
  --warn-soft: #34210f;
  --danger-soft: #341418;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 10px 28px rgba(0, 0, 0, .45);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, .6);
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur: .001s; }
  * { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; scroll-behavior: auto !important; }
}

* { box-sizing: border-box; }
/* Лендингтегідей: көлденең айналдыру ешқашан пайда болмайды.
   clip — hidden емес, сондықтан sticky тақырып жұмысын жалғастырады. */
html, body { max-width: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
               "Noto Sans", "Noto Sans Kazakh", sans-serif;
  font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { letter-spacing: -.021em; margin: 0; }
button { font: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* ------------------------------------------------------------------ boot */
.app-loading { min-height: 100vh; display: grid; place-items: center; }
.boot-spinner span {
  display: block; width: 26px; height: 26px; border-radius: 50%;
  border: 2.5px solid var(--line); border-top-color: var(--brand);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ----------------------------------------------------------------- login */
.login-page {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
  background: var(--panel);
}
.login-aside { background: var(--stage); color: var(--stage-ink); padding: 48px 56px; display: flex; flex-direction: column; }
.login-aside .mark-row { display: flex; align-items: center; gap: 11px; font-weight: 640; font-size: 16px; }
.login-aside h2 { font-size: 34px; line-height: 1.16; margin: auto 0 18px; max-width: 15ch; font-weight: 660; }
.login-aside p { color: var(--stage-muted); max-width: 42ch; margin: 0 0 34px; font-size: 15.5px; }
.login-flow { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: auto; }
.login-flow span {
  font-size: 12.5px; font-weight: 600; letter-spacing: .01em; padding: 6px 11px;
  border: 1px solid var(--stage-line); border-radius: 999px; color: var(--stage-ink);
  background: rgba(255, 255, 255, .05);
}
.login-foot { color: var(--stage-muted); font-size: 13px; }
.login-main { display: grid; place-items: center; padding: 40px 24px; }
.login-card { width: 100%; max-width: 372px; }
.login-card h1 { font-size: 25px; margin-bottom: 6px; }
.login-card .sub { color: var(--muted); margin: 0 0 26px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--panel); color: var(--ink); font: inherit;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 91, 253, .16); }
.login-error {
  background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(224, 49, 49, .25);
  padding: 10px 12px; border-radius: var(--r-sm); font-size: 13.5px; margin-bottom: 16px;
}
.login-lang { display: flex; gap: 2px; margin-top: 22px; }
.login-lang a { font-size: 12px; font-weight: 650; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; color: var(--muted-2); }
.login-lang a.is-active { background: var(--brand-soft); color: var(--brand-ink); }

@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-aside { padding: 32px 24px; }
  .login-aside h2 { font-size: 26px; margin-top: 26px; }
  .login-aside p { margin-bottom: 22px; }
}

/* ----------------------------------------------------------------- shell */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex: none; background: var(--panel); border-right: 1px solid var(--line);
  padding: 18px 12px 14px; display: flex; flex-direction: column; gap: 3px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 16px; font-weight: 650; }
.mark {
  width: 30px; height: 30px; border-radius: 9px; color: #fff; font-size: 13px; font-weight: 700;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: grid; place-items: center;
  flex: none; box-shadow: 0 6px 16px rgba(59, 91, 253, .3);
}
.brand-text b { display: block; font-size: 14.5px; line-height: 1.2; }
.brand-text span { display: block; font-size: 11.5px; color: var(--muted-2); font-weight: 500; }
.nav-group { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted-2); padding: 14px 12px 6px; }
.sidebar .item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--r-sm);
  color: var(--muted); font-weight: 550; font-size: 14px; cursor: pointer; border: none;
  background: none; width: 100%; text-align: left; transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.sidebar .item:hover { background: var(--line-2); color: var(--ink); }
.sidebar .item.is-active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 620; }
.sidebar .item svg { width: 17px; height: 17px; flex: none; }
.sidebar .spacer { flex: 1; min-height: 10px; }
.side-status {
  margin: 8px 6px 0; padding: 10px 11px; border-radius: var(--r-sm); background: var(--line-2);
  font-size: 12px; color: var(--muted); display: grid; gap: 4px;
}
.side-status .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dot {
  display: inline-block; vertical-align: middle; width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted-2); flex: none; margin-right: 6px;
}
.dot.is-ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(12, 166, 120, .18); }
.dot.is-bad { background: var(--danger); box-shadow: 0 0 0 3px rgba(224, 49, 49, .18); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; background: var(--panel); border-bottom: 1px solid var(--line); display: flex;
  align-items: center; gap: 12px; padding: 0 22px; position: sticky; top: 0; z-index: 30;
}
.topbar h1 {
  font-size: 17px; font-weight: 640; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar .right form { display: flex; }
.burger { display: none; width: 36px; height: 36px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.content { padding: 24px 22px 60px; flex: 1; }
.content-wide { max-width: 1240px; margin: 0 auto; width: 100%; }

.lang { display: flex; gap: 2px; padding: 3px; background: var(--bg); border-radius: 999px; border: 1px solid var(--line); }
.lang button { font-size: 11.5px; font-weight: 680; text-transform: uppercase; padding: 4px 8px;
  border-radius: 999px; color: var(--muted-2); background: none; border: none; cursor: pointer; }
.lang button.is-active { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------------------------------------------------------------- bits */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px;
  padding: 0 15px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--panel);
  color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:hover:not(:disabled) { border-color: #d7dbe6; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
:root[data-theme="dark"] .btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { box-shadow: var(--shadow); }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover:not(:disabled) { box-shadow: 0 8px 20px rgba(59, 91, 253, .3); }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: var(--r-xs); }
.btn-icon { width: 36px; min-height: 36px; padding: 0; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { background: var(--line-2); color: var(--ink); }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px; box-shadow: var(--shadow-sm);
}
.card-pad-lg { padding: 24px; }
.card h3 { font-size: 15.5px; margin-bottom: 6px; }
.card p { color: var(--muted); margin: 0; font-size: 14px; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650; letter-spacing: .01em; border: 1px solid var(--line);
  color: var(--muted); background: var(--panel-2);
}
.pill-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill-bad { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.pill-brand { background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; }
.pill-demo { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill-real { background: var(--ok-soft); color: var(--ok); border-color: transparent; }

.section-head { margin-bottom: 18px; }
.section-head h2 { font-size: 21px; margin-bottom: 5px; }
.section-head p { color: var(--muted); margin: 0; max-width: 76ch; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }

.meter { height: 7px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width var(--dur) var(--ease); }
.meter.is-full i { background: linear-gradient(90deg, #e8590c, #e03131); }

.toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 200; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--r-sm); box-shadow: var(--shadow); font-size: 13.5px; max-width: 340px; }
:root[data-theme="dark"] .toast { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.toast-error { background: var(--danger); color: #fff; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 300; background: var(--panel); padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); }

/* ================================================================ stage */
.stage-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 420px); gap: 22px; align-items: start; }
.stage {
  background: var(--stage); border-radius: var(--r-lg); padding: 52px 20px 26px;
  display: grid; place-items: center; position: relative; overflow: hidden;
  min-height: 560px; border: 1px solid rgba(255, 255, 255, .06);
}
.stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 40% at 50% 110%, rgba(59, 91, 253, .22), transparent 70%);
}
.stage-head {
  position: absolute; top: 16px; left: 18px; right: 18px; display: flex; align-items: center;
  gap: 10px; color: var(--stage-muted); font-size: 12px; z-index: 3;
}
.stage-head .pill { background: rgba(255, 255, 255, .07); border-color: var(--stage-line); color: var(--stage-ink); }
.stage-scaler { transform-origin: top center; will-change: transform; }

/* --------------------------------------------------------- device frame */
.device { position: relative; }
.device-ios {
  width: 390px; height: 844px; border-radius: 55px; padding: 11px;
  background: linear-gradient(150deg, #3a4157 0%, #171c2b 28%, #0e1220 60%, #2b3145 100%);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.device-android {
  width: 400px; height: 866px; border-radius: 38px; padding: 8px;
  background: linear-gradient(160deg, #2f3546 0%, #141826 40%, #0d111c 100%);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, .10);
}
.screen {
  position: relative; width: 100%; height: 100%; overflow: hidden; background: #f4f5f9;
  color: #0b1020; display: flex; flex-direction: column;
}
.device-ios .screen { border-radius: 45px; }
.device-android .screen { border-radius: 31px; }

.island {
  position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 124px; height: 35px;
  background: #05070d; border-radius: 20px; z-index: 12;
}
.punch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 11px; height: 11px; background: #05070d; border-radius: 50%; z-index: 12; }

.statusbar {
  height: 54px; flex: none; display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 26px 7px; font-size: 13.5px; font-weight: 640; letter-spacing: .01em; z-index: 11;
}
.device-android .statusbar { height: 34px; padding: 0 16px 5px; font-size: 12.5px; font-weight: 600; }
.statusbar .sb-right { display: flex; align-items: center; gap: 5px; }
.statusbar svg { height: 12px; width: auto; }

.home-indicator { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 140px; height: 5px; border-radius: 3px; background: rgba(11, 16, 32, .32); z-index: 14; }
.nav-gesture { height: 26px; flex: none; display: grid; place-items: center; background: inherit; }
.nav-gesture i { width: 108px; height: 4px; border-radius: 2px; background: rgba(11, 16, 32, .42); display: block; }

.app-body { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; background: #f4f5f9; }
.device-android .app-body { background: #f6f6fa; }

/* ------------------------------------------------------------ app chrome */
.app-nav {
  flex: none; display: flex; align-items: center; gap: 10px; padding: 4px 18px 12px;
  font-weight: 640; font-size: 17px;
}
.app-nav .back { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(11, 16, 32, .06); border: none; cursor: pointer; }
.device-android .app-nav { padding: 8px 14px 10px; font-size: 19px; font-weight: 600; }

.app-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 18px 20px; scrollbar-width: thin; }
.app-scroll::-webkit-scrollbar { width: 4px; }
.app-scroll::-webkit-scrollbar-thumb { background: rgba(11, 16, 32, .16); border-radius: 4px; }

.ios-card { background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(11, 16, 32, .07); }
.md-card { background: #fff; border-radius: 18px; padding: 15px; margin-bottom: 12px; border: 1px solid rgba(11, 16, 32, .07); }
.app-title { font-size: 25px; font-weight: 700; letter-spacing: -.02em; margin: 8px 0 6px; }
.app-lede { color: #5b6577; font-size: 14.5px; margin: 0 0 18px; }
.app-label { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #8b93a5; margin: 18px 0 8px; }

.opt {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px; background: #fff;
  border-radius: 12px; margin-bottom: 7px; cursor: pointer; border: 1.5px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
  font-size: 14.5px; width: 100%; text-align: left;
}
.opt:hover { background: #fdfdff; }
.opt.is-on { border-color: var(--brand); background: #f5f7ff; }
.opt .radio { width: 19px; height: 19px; border-radius: 50%; border: 2px solid #c8cddc; flex: none; display: grid; place-items: center; }
.opt.is-on .radio { border-color: var(--brand); }
.opt.is-on .radio::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.opt b { font-weight: 620; display: block; }
.opt small { color: #8b93a5; font-size: 12.5px; }
.device-android .opt { border-radius: 16px; }

.app-input {
  width: 100%; border: 1.5px solid #e2e5ef; border-radius: 12px; padding: 11px 13px; font: inherit;
  font-size: 14.5px; background: #fff; color: #0b1020; resize: none; line-height: 1.5;
}
.app-input:focus { outline: none; border-color: var(--brand); }
.app-btn {
  width: 100%; min-height: 50px; border-radius: 14px; border: none; background: var(--brand); color: #fff;
  font-size: 16px; font-weight: 640; cursor: pointer; display: inline-flex; align-items: center;
  justify-content: center; gap: 8px; transition: filter var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.app-btn:hover:not(:disabled) { filter: brightness(1.06); }
.app-btn:active:not(:disabled) { transform: scale(.985); }
.app-btn:disabled { opacity: .5; cursor: not-allowed; }
.app-btn-quiet { background: rgba(11, 16, 32, .06); color: #0b1020; }
.device-android .app-btn { border-radius: 100px; min-height: 48px; font-size: 15px; letter-spacing: .01em; }

.otp-row { display: flex; gap: 9px; justify-content: center; margin: 22px 0; }
.otp-box {
  width: 54px; height: 62px; border-radius: 13px; border: 1.5px solid #e2e5ef; background: #fff;
  display: grid; place-items: center; font-size: 25px; font-weight: 650;
}
.otp-box.is-on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 91, 253, .14); }

.setup-steps { counter-reset: st; }
.setup-step { display: flex; gap: 11px; padding: 10px 0; align-items: flex-start; }
.setup-step .n {
  width: 23px; height: 23px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink);
  font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; margin-top: 1px;
}
:root[data-theme="dark"] .setup-step .n { background: #eef2ff; color: #24379e; }
.setup-step b { font-weight: 620; font-size: 14.5px; }
.setup-step p { margin: 2px 0 0; color: #5b6577; font-size: 13.5px; }

/* ------------------------------------------------------------- messenger */
.msgr { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #eceef5; }
.msgr-top {
  flex: none; display: flex; align-items: center; gap: 10px; padding: 6px 14px 11px; background: #fff;
  border-bottom: 1px solid rgba(11, 16, 32, .07);
}
.msgr-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #8a94b5, #59617d); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.msgr-top b { font-size: 15px; font-weight: 640; display: block; }
.msgr-top small { color: #8b93a5; font-size: 11.5px; }
.msgr-feed { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 13px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 82%; padding: 9px 12px; border-radius: 17px; font-size: 14.5px; line-height: 1.42; position: relative; animation: pop var(--dur) var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.msg-in { align-self: flex-start; background: #fff; border-bottom-left-radius: 6px; box-shadow: 0 1px 1px rgba(11, 16, 32, .07); }
.msg-out { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 6px; }
.msg-time { font-size: 10.5px; opacity: .6; margin-left: 8px; }
.msg-copy {
  position: absolute; right: -6px; bottom: -12px; font-size: 11px; font-weight: 650; padding: 3px 9px;
  border-radius: 999px; border: 1px solid rgba(11, 16, 32, .1); background: #fff; color: #3b5bfd;
  cursor: pointer; box-shadow: 0 2px 6px rgba(11, 16, 32, .1); white-space: nowrap;
}
.msg.is-selected { box-shadow: 0 0 0 2.5px rgba(59, 91, 253, .45); }
.msgr-compose {
  flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 9px 11px; background: #fff;
  border-top: 1px solid rgba(11, 16, 32, .07);
}
.msgr-field {
  flex: 1; min-height: 38px; max-height: 96px; overflow-y: auto; border-radius: 19px; background: #f1f2f7;
  padding: 9px 13px; font-size: 14.5px; line-height: 1.35; color: #0b1020; cursor: text;
}
.msgr-field.is-empty { color: #a6adbd; }
.msgr-send { width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; cursor: pointer; }
.msgr-send:disabled { background: #c6cbd9; cursor: not-allowed; }

/* -------------------------------------------------------------- keyboard */
.kbd {
  flex: none; background: #d3d6de; padding: 7px 5px 5px; user-select: none;
  animation: kbdUp .26s var(--ease);
}
.device-android .kbd { background: #e8e9ef; }
@keyframes kbdUp { from { transform: translateY(100%); } }
.kbd-bar {
  display: flex; align-items: center; gap: 6px; padding: 3px 5px 8px; overflow-x: auto; scrollbar-width: none;
}
.kbd-bar::-webkit-scrollbar { display: none; }
.kbd-logo {
  display: inline-flex; align-items: center; gap: 6px; background: #fff; border-radius: 999px;
  padding: 5px 11px 5px 6px; font-size: 12.5px; font-weight: 700; border: none; cursor: pointer;
  box-shadow: 0 1px 2px rgba(11, 16, 32, .16); color: #0b1020; flex: none;
}
.kbd-logo .mark { width: 20px; height: 20px; border-radius: 6px; font-size: 9.5px; box-shadow: none; }
.kbd-chip {
  flex: none; border: none; border-radius: 999px; background: rgba(255, 255, 255, .7); padding: 6px 11px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; color: #1c2438;
}
.kbd-chip.is-on { background: var(--brand); color: #fff; }
.kbd-chip:disabled { opacity: .45; cursor: not-allowed; }
.kbd-lang { margin-left: auto; font-size: 11.5px; font-weight: 700; color: #5b6577; padding: 0 6px; flex: none; }

.kbd-panel { background: #fff; border-radius: 13px; padding: 11px; margin: 0 4px 7px; box-shadow: 0 2px 8px rgba(11, 16, 32, .1); }
.kbd-quote { font-size: 12.5px; color: #5b6577; background: #f5f6fa; border-radius: 9px; padding: 8px 10px; margin-bottom: 9px; border-left: 2.5px solid var(--brand); }
.kbd-quote b { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: #8b93a5; margin-bottom: 3px; }
.kbd-instruction { width: 100%; border: 1.5px solid #e2e5ef; border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 13.5px; resize: none; color: #0b1020; }
.kbd-instruction:focus { outline: none; border-color: var(--brand); }
.kbd-actions { display: flex; gap: 7px; margin-top: 9px; }
.kbd-actions .app-btn { min-height: 42px; font-size: 14.5px; border-radius: 11px; }
.kbd-mic {
  width: 42px; min-height: 42px; border-radius: 11px; border: none; background: rgba(11, 16, 32, .07);
  color: #0b1020; display: grid; place-items: center; flex: none; cursor: pointer; position: relative;
}
.kbd-mic.is-live { background: #e03131; color: #fff; }
.kbd-mic.is-live::after {
  content: ""; position: absolute; inset: -4px; border-radius: 14px; border: 2px solid rgba(224, 49, 49, .45);
  animation: pulse 1.4s ease-out infinite;
}
@keyframes pulse { to { transform: scale(1.18); opacity: 0; } }

.kbd-stage { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #5b6577; padding: 3px 2px 0; }
.kbd-stage .bar { flex: 1; height: 3px; border-radius: 2px; background: #e6e8f0; overflow: hidden; }
.kbd-stage .bar i { display: block; height: 100%; background: var(--brand); transition: width .3s var(--ease); }
.kbd-draft { font-size: 14px; line-height: 1.45; color: #0b1020; background: #f5f7ff; border-radius: 10px; padding: 10px 11px; border: 1px solid #dfe5ff; white-space: pre-wrap; }
.kbd-draft[contenteditable="true"]:focus { outline: none; border-color: var(--brand); background: #fff; }
.kbd-error { font-size: 12.5px; color: #e03131; background: #fff0f0; border-radius: 9px; padding: 8px 10px; }

.keys { display: grid; gap: 6px; padding: 0 3px 3px; }
.keys .row { display: flex; gap: 5px; justify-content: center; }
.key {
  flex: 1; min-width: 0; height: 40px; border-radius: 6px; background: #fff; border: none;
  box-shadow: 0 1px 0 rgba(11, 16, 32, .28); font-size: 16px; color: #0b1020; cursor: default;
  display: grid; place-items: center;
}
.device-android .key { border-radius: 8px; box-shadow: none; background: #fff; font-size: 15px; }
.key-wide { flex: 1.5; background: #adb3c0; }
.key-space { flex: 5; }
.key-dim { background: #adb3c0; }
.device-android .key-dim, .device-android .key-wide { background: #d6d8e2; }

/* ------------------------------------------------------------ mic dialog */
.md-scrim { position: absolute; inset: 0; background: rgba(11, 16, 32, .42); display: grid; place-items: center; z-index: 30; padding: 22px; animation: fade var(--dur) var(--ease); }
@keyframes fade { from { opacity: 0; } }
.md-dialog { background: #fff; border-radius: 26px; padding: 22px 20px 12px; width: 100%; max-width: 300px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); animation: pop var(--dur) var(--ease); }
.md-dialog .mic-round { width: 46px; height: 46px; border-radius: 50%; background: #e8ebff; color: var(--brand); display: grid; place-items: center; margin-bottom: 14px; }
.md-dialog h4 { font-size: 16.5px; font-weight: 620; margin-bottom: 6px; }
.md-dialog p { font-size: 13.5px; color: #5b6577; margin: 0 0 12px; }
.md-choice { width: 100%; text-align: left; border: none; background: none; padding: 12px 6px; font-size: 14.5px; font-weight: 600; color: var(--brand); cursor: pointer; border-radius: 10px; }
.md-choice:hover { background: #f4f6ff; }
.md-choice.is-deny { color: #5b6577; }

.wave { display: flex; align-items: center; gap: 3px; height: 22px; }
.wave i { width: 3px; border-radius: 2px; background: var(--brand); height: 20%; animation: wv 1s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: .1s; } .wave i:nth-child(3) { animation-delay: .2s; }
.wave i:nth-child(4) { animation-delay: .3s; } .wave i:nth-child(5) { animation-delay: .4s; }
.wave i:nth-child(6) { animation-delay: .5s; } .wave i:nth-child(7) { animation-delay: .6s; }
.wave i:nth-child(8) { animation-delay: .7s; } .wave i:nth-child(9) { animation-delay: .8s; }
@keyframes wv { 0%, 100% { height: 20%; } 50% { height: 100%; } }
.wave.is-idle i { animation: none; height: 20%; background: #c6cbd9; }

/* ------------------------------------------------------------- ios sheet */
.ios-sheet { position: absolute; inset: 0; background: rgba(11, 16, 32, .34); display: flex; align-items: flex-end; z-index: 30; animation: fade var(--dur) var(--ease); }
.ios-sheet-body { background: #f4f5f9; width: 100%; border-radius: 22px 22px 0 0; padding: 18px; max-height: 76%; overflow-y: auto; animation: sheetUp .28s var(--ease); }
@keyframes sheetUp { from { transform: translateY(100%); } }
.ios-sheet-grab { width: 38px; height: 4px; border-radius: 2px; background: rgba(11, 16, 32, .2); margin: -6px auto 14px; }

/* ============================================================ side panel */
.panel-stack { display: grid; gap: 14px; position: sticky; top: 76px; }
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.step-head .num {
  width: 26px; height: 26px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-ink);
  font-size: 12.5px; font-weight: 700; display: grid; place-items: center; flex: none;
}
.step-head b { font-size: 15.5px; font-weight: 640; }
.step-body { color: var(--muted); font-size: 14px; }
.step-body ul { margin: 10px 0 0; padding-left: 18px; }
.step-body li { margin-bottom: 5px; }
.step-nav { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.step-nav .count { margin-left: auto; font-size: 12.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

.steps-rail { display: grid; gap: 2px; margin-top: 12px; }
.rail-item {
  display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: var(--r-xs);
  font-size: 13.5px; color: var(--muted); cursor: pointer; border: none; background: none;
  width: 100%; text-align: left;
}
.rail-item:hover { background: var(--line-2); color: var(--ink); }
.rail-item.is-on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 620; }
.rail-item.is-done { color: var(--ink); }
.rail-item .tick { width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; display: grid; place-items: center; font-size: 10px; }
.rail-item.is-done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.rail-item.is-on .tick { border-color: var(--brand); }

.kv { display: grid; gap: 7px; }
.kv-stack { display: grid; gap: 11px; }
.kv-stack > div { display: grid; gap: 2px; }
.kv-stack span { font-size: 12px; color: var(--muted-2); font-weight: 600; letter-spacing: .01em; }
.kv-stack b { font-size: 13.5px; font-weight: 620; color: var(--ink); overflow-wrap: anywhere; }
.kv .row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.kv .row span { color: var(--muted); }
.kv .row b { font-weight: 620; font-variant-numeric: tabular-nums; text-align: right; }

/* ------------------------------------------------------------ inspector */
.inspector { background: #0d1222; color: #cbd4ef; border-radius: var(--r); padding: 14px; border: 1px solid #1d2540; }
.inspector h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #7b87ad; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.inspector pre { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.8px; line-height: 1.62; white-space: pre-wrap; word-break: break-word; }
.inspector .ok { color: #5fd3a5; } .inspector .key { color: #8fa6ff; } .inspector .str { color: #f0c987; }
.inspector-note { font-size: 11.5px; color: #6b78a0; margin-top: 9px; }

/* ------------------------------------------------------------- workflow */
.flow-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.flow-list { display: grid; gap: 3px; max-height: 620px; overflow-y: auto; padding-right: 4px; }
.flow-node {
  display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; border-radius: var(--r-sm);
  cursor: pointer; border: 1px solid transparent; background: none; text-align: left; width: 100%;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.flow-node:hover { background: var(--line-2); }
.flow-node.is-on { background: var(--panel); border-color: var(--brand); box-shadow: var(--shadow-sm); }
.flow-node .idx { font-size: 11px; font-weight: 700; color: var(--muted-2); width: 20px; flex: none; padding-top: 2px; font-variant-numeric: tabular-nums; }
.flow-node b { font-size: 14px; font-weight: 600; display: block; }
.flow-node small { color: var(--muted-2); font-size: 12px; }

.flow-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.flow-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.flow-chip.is-live { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.flow-arrow { color: var(--muted-2); font-size: 14px; }

/* --------------------------------------------------------- architecture */
.arch { display: grid; gap: 12px; justify-items: center; }
.arch-node {
  width: 100%; max-width: 420px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--panel); padding: 13px 16px; cursor: pointer; text-align: left;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
  box-shadow: var(--shadow-sm);
}
.arch-node:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.arch-node.is-on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 91, 253, .14); }
.arch-node .top { display: flex; align-items: center; gap: 9px; }
.arch-node b { font-size: 14.5px; font-weight: 640; }
.arch-node small { color: var(--muted-2); font-size: 12.5px; display: block; margin-top: 2px; }
.arch-link { width: 2px; height: 20px; background: linear-gradient(var(--line), var(--brand)); border-radius: 2px; }
.arch-pair { display: flex; gap: 12px; width: 100%; max-width: 420px; }
.arch-pair .arch-node { max-width: none; min-width: 0; flex: 1 1 0; }
.arch-node b, .arch-node small { overflow-wrap: anywhere; }

/* -------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 680px; }
table.t th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2);
  font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tr:last-child td { border-bottom: none; }
table.t tbody tr { cursor: pointer; transition: background var(--dur) var(--ease); }
table.t tbody tr:hover { background: var(--line-2); }
table.t tbody tr.is-on { background: var(--brand-soft); }
.num { font-variant-numeric: tabular-nums; }

.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 15px 16px; }
.stat .label { font-size: 12px; color: var(--muted); font-weight: 550; }
.stat .value { font-size: 25px; font-weight: 660; letter-spacing: -.02em; margin-top: 3px; font-variant-numeric: tabular-nums; }
.stat .foot { font-size: 12px; color: var(--muted-2); margin-top: 3px; }

.bars { display: grid; gap: 8px; }
.bars .b { display: grid; grid-template-columns: 78px 1fr 52px; gap: 10px; align-items: center; font-size: 13px; }
.bars .track { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.bars .track i { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width .45s var(--ease); }
.spark { width: 100%; height: 72px; display: block; }
.spark .ln { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark .ar { fill: rgba(59, 91, 253, .12); }

/* -------------------------------------------------------- plan editor */
.plan-card { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 17px; display: flex; flex-direction: column; gap: 11px; }
.plan-card.is-draft { border-color: var(--warn); box-shadow: 0 0 0 3px rgba(232, 89, 12, .1); }
.plan-card .head { display: flex; align-items: center; gap: 8px; }
.plan-card .price { font-size: 25px; font-weight: 660; letter-spacing: -.02em; }
.plan-card .price s { font-size: 14px; font-weight: 500; color: var(--muted-2); margin-left: 7px; }
.mini-field { display: grid; gap: 4px; }
.mini-field label { font-size: 11.5px; font-weight: 650; color: var(--muted); }
.mini-field input {
  min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-xs);
  background: var(--panel-2); color: var(--ink); font: inherit; font-size: 13.5px; width: 100%;
}
.mini-field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 91, 253, .14); }

.scope-note {
  display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border-radius: var(--r-sm);
  background: var(--warn-soft); color: #8a3a05; font-size: 13px; border: 1px solid rgba(232, 89, 12, .2);
}
:root[data-theme="dark"] .scope-note { color: #ffb783; }

/* ------------------------------------------------------------- screens */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.shot { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); }
.shot .cap { padding: 11px 13px; border-top: 1px solid var(--line-2); }
.shot .cap b { font-size: 13.5px; display: block; }
.shot .cap small { color: var(--muted-2); font-size: 12px; }
.shot .art { aspect-ratio: 9 / 16; background: var(--stage); display: grid; place-items: center; padding: 14px; }
.shot .idx { position: absolute; }

/* --------------------------------------------------- presentation mode */
body.is-presenting .sidebar,
body.is-presenting .topbar .lang,
body.is-presenting .topbar .who { display: none; }
body.is-presenting .content { padding: 18px 20px 40px; }
body.is-presenting .stage { min-height: 70vh; }
.present-bar {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 150;
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.present-bar .count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 96px; text-align: center; }

/* ---------------------------------------------------------------- tour */
.tour-card {
  position: fixed; right: 20px; bottom: 20px; width: 320px; z-index: 160; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 16px;
}
.tour-card .n { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; color: var(--brand-ink); }
.tour-card h4 { font-size: 15.5px; margin: 4px 0 6px; }
.tour-card p { font-size: 13.5px; color: var(--muted); margin: 0 0 12px; }

/* --------------------------------------------------------- responsive */
@media (max-width: 1280px) {
  .stage-layout { grid-template-columns: minmax(0, 1fr) minmax(330px, 380px); }
}
@media (max-width: 1080px) {
  .stage-layout { grid-template-columns: 1fr; }
  .panel-stack { position: static; }
  .flow-grid { grid-template-columns: 1fr; }
  .flow-list { max-height: none; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 120; transform: translateX(-100%);
    transition: transform var(--dur) var(--ease); box-shadow: var(--shadow-lg);
  }
  .sidebar.is-open { transform: none; }
  .burger { display: grid; place-items: center; }
  .scrim { position: fixed; inset: 0; background: rgba(11, 16, 32, .4); z-index: 110; }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Телефонда жоғарғы жолда орын аз: email мен көрсетілім түймесі — үлкен экран үшін. */
  .topbar .who { display: none; }
}
@media (max-width: 720px) {
  .content { padding: 16px 14px 56px; }
  .topbar { padding: 0 14px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .stage { padding: 46px 8px 16px; border-radius: var(--r); min-height: 0; }
  .stage-head { top: 14px; left: 12px; right: 12px; }
  .section-head h2 { font-size: 19px; }
  .tour-card { right: 10px; left: 10px; width: auto; bottom: 10px; }
  .present-bar { bottom: 10px; padding: 7px 10px; }
  .shots { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .topbar { gap: 8px; }
  .topbar .right { gap: 6px; }
  .topbar .present-toggle { display: none; }
  .lang { padding: 2px; }
  .lang button { padding: 4px 7px; font-size: 11px; }
}
@media (max-width: 420px) {
  /* 320px-те де көлденең айналдыру болмауы керек: жоғарғы жол тарылады. */
  .topbar { padding: 0 10px; gap: 6px; }
  .topbar h1 { font-size: 15px; }
  .topbar .right { gap: 4px; }
  .lang { padding: 2px; }
  .lang button { padding: 3px 5px; font-size: 10.5px; letter-spacing: 0; }
  .topbar .btn-icon { width: 32px; min-height: 32px; }
  .topbar .right .btn-sm { padding: 0 8px; font-size: 12px; min-height: 32px; }
  .burger { width: 32px; height: 32px; }
}
@media (max-width: 360px) {
  /* Ең тар экранда бет тақырыбы бүйір мәзірде де тұр — жоғарыда орын босатамыз. */
  .topbar h1 { display: none; }
}

/* ------------------------------------------------------------- selects */
.sel {
  min-height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-xs);
  background: var(--panel-2); color: var(--ink); font: inherit; font-size: 13px; max-width: 100%;
}
.sel:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 91, 253, .14); }
