/* ─────────────────────────────────────────────────────────────────────────────
   Окси — интерфейс. Тёмная премиальная тема, без внешних шрифтов и CDN.
   ───────────────────────────────────────────────────────────────────────────── */
:root {
  --bg: #0a0b10;
  --bg-2: #10121a;
  --glass: rgba(22, 24, 34, .72);
  --glass-strong: rgba(26, 28, 40, .9);
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #eceef5;
  --muted: #8b90a3;
  --faint: #5b6074;
  --a1: #8b5cf6;            /* фиолетовый */
  --a2: #22d3ee;            /* бирюзовый  */
  --a3: #f472b6;            /* розовый    */
  --accent: linear-gradient(135deg, var(--a1), var(--a2));
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --r-xl: 26px;
  --r-lg: 20px;
  --r-md: 14px;
  --shadow: 0 10px 40px -12px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --level: 0;               /* громкость голоса 0..1 — задаётся из JS */
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  overflow-wrap: anywhere;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ── фон: медленное «северное сияние» ─────────────────────────────────────── */
.aurora { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.aurora i {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(90px); opacity: .16; animation: drift 28s var(--ease) infinite alternate;
}
.aurora i:nth-child(1) { background: var(--a1); top: -25vmax; left: -15vmax; }
.aurora i:nth-child(2) { background: var(--a2); bottom: -30vmax; right: -20vmax; animation-delay: -9s; opacity: .11; }
.aurora i:nth-child(3) { background: var(--a3); top: 30%; left: 45%; width: 35vmax; height: 35vmax; animation-delay: -17s; opacity: .07; }
@keyframes drift { to { transform: translate(6vmax, 4vmax) scale(1.12); } }

/* ── каркас ───────────────────────────────────────────────────────────────── */
.app {
  position: relative; z-index: 1;
  height: 100dvh; display: flex; flex-direction: column;
  max-width: 920px; margin: 0 auto;
}

/* ── шапка ────────────────────────────────────────────────────────────────── */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(14px + var(--safe-t)) 20px 14px;
  position: sticky; top: 0; z-index: 5;
  background: linear-gradient(to bottom, var(--bg) 30%, rgba(10, 11, 16, 0));
}
.who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.who-text { min-width: 0; }
.name { font-weight: 650; font-size: 18px; letter-spacing: .2px; }
.status { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); transition: background .3s; }
body[data-state="thinking"] .status .dot { background: var(--a1); box-shadow: 0 0 10px var(--a1); animation: blink 1s infinite; }
body[data-state="speaking"] .status .dot { background: var(--a2); box-shadow: 0 0 10px var(--a2); }
body[data-state="listening"] .status .dot { background: var(--bad); box-shadow: 0 0 10px var(--bad); animation: blink .8s infinite; }
body[data-state="offline"] .status .dot { background: var(--faint); box-shadow: none; }
@keyframes blink { 50% { opacity: .3; } }

.top-actions { display: flex; align-items: center; gap: 8px; }

/* ── «сфера» Окси ─────────────────────────────────────────────────────────── */
.orb {
  --s: 44px;
  width: var(--s); height: var(--s); border-radius: 50%; flex: none; position: relative;
  background: conic-gradient(from 0deg, var(--a1), var(--a2), var(--a3), var(--a1));
  animation: spin 9s linear infinite;
  box-shadow: 0 0 calc(18px + 40px * var(--level)) rgba(139, 92, 246, calc(.35 + .5 * var(--level)));
  transform: scale(calc(1 + .14 * var(--level)));
  transition: transform .08s linear, box-shadow .08s linear;
}
.orb span {
  position: absolute; inset: 3px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 38%),
              radial-gradient(circle at 50% 60%, #1b1730, #0c0d14 70%);
}
.orb span::after {
  content: ""; position: absolute; inset: 28%; border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, .9), rgba(139, 92, 246, .3) 60%, transparent 72%);
  filter: blur(2px); animation: breathe 3.2s ease-in-out infinite;
}
body[data-state="thinking"] .orb { animation-duration: 2.2s; }
body[data-state="thinking"] .orb span::after { animation-duration: 1.1s; }
.orb.big { --s: 112px; margin: 0 auto 26px; }
@keyframes spin { to { rotate: 360deg; } }
@keyframes breathe { 50% { transform: scale(1.25); opacity: .65; } }

/* ── кнопки ───────────────────────────────────────────────────────────────── */
.icon-btn {
  width: 46px; height: 46px; flex: none; border-radius: 15px; border: 1px solid var(--line);
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: grid; place-items: center; cursor: pointer; color: var(--muted);
  transition: transform .18s var(--ease), background .2s, color .2s, border-color .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); background: var(--glass-strong); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.small { width: 36px; height: 36px; border-radius: 12px; }
.icon-btn[aria-pressed="false"] { color: var(--faint); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn.small svg { width: 17px; height: 17px; }

.pill {
  height: 46px; padding: 0 14px; border-radius: 15px; border: 1px solid var(--line);
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text); font-size: 14px;
  transition: border-color .2s, background .2s;
}
.pill:hover { border-color: var(--line-2); background: var(--glass-strong); }
.pill svg { width: 17px; height: 17px; color: var(--a2); }
.pill .chev svg { width: 14px; height: 14px; color: var(--muted); transition: rotate .2s; }
.pill[aria-expanded="true"] .chev svg { rotate: 180deg; }

.preset { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; padding: 6px;
  background: var(--glass-strong); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--shadow);
  animation: pop .18s var(--ease); z-index: 20;
}
.menu button {
  width: 100%; text-align: left; border: 0; background: none; border-radius: 10px; padding: 10px 12px;
  cursor: pointer; display: grid; grid-template-columns: 20px 1fr; column-gap: 8px;
}
.menu button:hover { background: rgba(255, 255, 255, .06); }
.menu button b { font-weight: 600; }
.menu button small { grid-column: 2; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.menu button .tick { color: var(--a2); grid-row: span 2; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } }

/* ── лента сообщений ──────────────────────────────────────────────────────── */
.chat {
  flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scroll-behavior: smooth;
  padding: 6px 20px 24px;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .12) transparent;
}
.messages { display: flex; flex-direction: column; gap: 18px; }

.welcome { text-align: center; padding: 9vh 10px 20px; animation: rise .6s var(--ease); }
.welcome h1 {
  margin: 0 0 10px; font-size: clamp(26px, 5vw, 34px); font-weight: 700; letter-spacing: -.4px;
  background: linear-gradient(120deg, #fff, #c4b5fd 45%, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.welcome p { margin: 0 auto 26px; max-width: 470px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chip {
  border: 1px solid var(--line-2); background: var(--glass); border-radius: 999px; padding: 10px 16px;
  cursor: pointer; font-size: 14px; transition: transform .2s var(--ease), border-color .2s, background .2s;
}
.chip:hover { transform: translateY(-2px); border-color: rgba(139, 92, 246, .55); background: rgba(139, 92, 246, .12); }

.msg { display: flex; gap: 12px; animation: rise .38s var(--ease); max-width: 100%; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.msg .ava { --s: 30px; margin-top: 4px; }
.msg.user { justify-content: flex-end; }
.bubble { position: relative; min-width: 0; max-width: min(680px, 86%); }
.msg.user .bubble {
  background: linear-gradient(135deg, rgba(139, 92, 246, .9), rgba(99, 102, 241, .9));
  padding: 11px 16px; border-radius: var(--r-lg) var(--r-lg) 6px var(--r-lg);
  box-shadow: 0 8px 26px -10px rgba(139, 92, 246, .7);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg.oxy .bubble {
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 13px 17px 9px; border-radius: 6px var(--r-lg) var(--r-lg) var(--r-lg);
  box-shadow: var(--shadow);
}
.msg.oxy.speaking .bubble { border-color: rgba(34, 211, 238, .45); box-shadow: 0 0 0 1px rgba(34, 211, 238, .15), var(--shadow); }
.body { overflow-wrap: anywhere; }
.body p { margin: 0 0 .6em; }
.body p:last-child { margin-bottom: 0; }
.body code { font-family: "Cascadia Code", Consolas, monospace; font-size: .88em; background: rgba(255, 255, 255, .08); padding: 1px 6px; border-radius: 6px; }
.body pre { background: #07080c; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; overflow-x: auto; margin: .5em 0; }
.body pre code { background: none; padding: 0; font-size: 13.5px; line-height: 1.5; }
.body ul { margin: .3em 0 .6em; padding-left: 1.3em; }
.body .notice { display: block; margin-top: .6em; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .04); color: var(--muted); font-size: 14px; }

.meta { display: flex; align-items: center; gap: 4px; margin-top: 6px; min-height: 30px; }
.meta time { font-size: 12px; color: var(--faint); margin-right: auto; }
.emotion { font-size: 12px; color: #c4b5fd; background: rgba(139, 92, 246, .14); border-radius: 999px; padding: 2px 10px; margin-right: 6px; }
.act {
  width: 32px; height: 32px; border: 0; border-radius: 10px; background: none; color: var(--faint);
  display: grid; place-items: center; cursor: pointer; transition: color .2s, background .2s, transform .15s;
}
.act:hover { color: var(--text); background: rgba(255, 255, 255, .07); }
.act:active { transform: scale(.88); }
.act svg { width: 17px; height: 17px; }
.act.done { color: var(--ok); }
.msg.user .meta { justify-content: flex-end; }
.msg.user .meta time { margin-right: 0; color: rgba(255, 255, 255, .6); }

.typing { display: flex; gap: 5px; padding: 6px 2px 8px; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-6px); opacity: 1; } }

.sys { align-self: center; font-size: 13px; color: var(--muted); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; animation: rise .3s var(--ease); max-width: 92%; text-align: center; }
.day { align-self: center; font-size: 12px; color: var(--faint); letter-spacing: .5px; text-transform: uppercase; }

/* ── карточка разрешения ──────────────────────────────────────────────────── */
.ask {
  margin-left: 42px; max-width: min(640px, 86%); padding: 14px 16px; border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(251, 191, 36, .09), rgba(251, 191, 36, .03));
  border: 1px solid rgba(251, 191, 36, .32); animation: rise .35s var(--ease);
}
.ask-title { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--warn); font-weight: 600; margin-bottom: 4px; }
.ask-title svg { width: 16px; height: 16px; }
.ask-what { font-size: 14.5px; margin-bottom: 12px; overflow-wrap: anywhere; }
.ask-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); cursor: pointer; font-weight: 600; font-size: 14px; transition: transform .15s, filter .2s; }
.btn:active { transform: scale(.95); }
.btn.yes { background: var(--ok); border-color: transparent; color: #05261a; }
.btn.yes:hover { filter: brightness(1.08); }
.ask.done { opacity: .55; }
.ask.done .ask-btns { display: none; }

/* ── нижняя панель ────────────────────────────────────────────────────────── */
.dock { position: relative; padding: 0 16px calc(12px + var(--safe-b)); }
.to-bottom {
  position: absolute; right: 26px; top: -56px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--glass-strong); color: var(--muted); cursor: pointer;
  display: grid; place-items: center; box-shadow: var(--shadow); animation: pop .2s var(--ease);
}
.to-bottom svg { width: 18px; height: 18px; }

.speaking {
  display: flex; align-items: center; gap: 12px; margin: 0 auto 10px; width: fit-content; max-width: 100%;
  padding: 6px 6px 6px 14px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid rgba(34, 211, 238, .28);
  box-shadow: 0 8px 30px -10px rgba(34, 211, 238, .45); animation: pop .25s var(--ease);
}
.speaking canvas { width: 150px; height: 30px; display: block; }
.speaking-label { font-size: 13px; color: var(--muted); white-space: nowrap; }

.attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.attachments:empty { display: none; }
.att {
  display: flex; align-items: center; gap: 8px; max-width: 260px; padding: 6px 8px 6px 6px;
  border-radius: 12px; background: var(--glass-strong); border: 1px solid var(--line-2);
  font-size: 13px; animation: pop .2s var(--ease); position: relative; overflow: hidden;
}
.att img, .att .ficon { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex: none; background: rgba(255, 255, 255, .06); display: grid; place-items: center; color: var(--muted); }
.att .ficon svg { width: 18px; height: 18px; }
.att span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att small { color: var(--faint); }
.att .bar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--accent); transition: width .2s; }
.att.err { border-color: rgba(248, 113, 113, .5); }
.att button { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 2px; display: grid; }
.att button svg { width: 15px; height: 15px; }

.composer {
  display: flex; align-items: flex-end; gap: 8px; padding: 8px;
  background: var(--glass-strong); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow);
  transition: border-color .25s, box-shadow .25s;
}
.composer:focus-within { border-color: rgba(139, 92, 246, .55); box-shadow: 0 0 0 4px rgba(139, 92, 246, .12), var(--shadow); }
.composer .icon-btn { background: transparent; border-color: transparent; backdrop-filter: none; }
.composer .icon-btn:hover { background: rgba(255, 255, 255, .06); }
.field { flex: 1; min-width: 0; position: relative; align-self: center; }
textarea {
  width: 100%; display: block; resize: none; border: 0; outline: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 16px; line-height: 1.5; padding: 10px 4px; max-height: 40vh; min-height: 46px;
}
textarea::placeholder { color: var(--faint); }
.send {
  width: 46px; height: 46px; flex: none; border: 0; border-radius: 15px; cursor: pointer; color: #fff;
  background: var(--accent); display: grid; place-items: center;
  box-shadow: 0 6px 20px -6px rgba(139, 92, 246, .8);
  transition: transform .18s var(--ease), opacity .2s, filter .2s;
}
.send svg { width: 20px; height: 20px; }
.send:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.send:active:not(:disabled) { transform: scale(.9); }
.send:disabled { opacity: .35; cursor: default; box-shadow: none; }
.send.stop { background: #2a2d3a; box-shadow: none; }

.mic.on { color: #fff; background: var(--bad) !important; animation: micpulse 1.4s infinite; }
.mic.busy { color: var(--a2); }
.mic.busy svg { animation: spin 1s linear infinite; }
@keyframes micpulse { 0% { box-shadow: 0 0 0 0 rgba(248, 113, 113, .55); } 100% { box-shadow: 0 0 0 16px rgba(248, 113, 113, 0); } }
.rec { position: absolute; inset: 0; display: flex; align-items: center; gap: 10px; padding: 0 6px; background: var(--glass-strong); border-radius: 12px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); animation: blink .9s infinite; flex: none; }
.rec canvas { flex: 1; height: 28px; min-width: 0; }
.rec span { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }

.hint { text-align: center; font-size: 12px; color: var(--faint); margin-top: 8px; }

/* ── перетаскивание файлов ────────────────────────────────────────────────── */
.drop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(6, 7, 11, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .15s; }
.drop-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 42px 56px; border-radius: 28px; border: 2px dashed rgba(139, 92, 246, .7); background: rgba(139, 92, 246, .08); }
.drop-card svg { width: 40px; height: 40px; color: var(--a2); margin-bottom: 6px; }
.drop-card small { color: var(--muted); }
@keyframes fade { from { opacity: 0; } }

/* ── уведомления ──────────────────────────────────────────────────────────── */
.toasts { position: fixed; left: 50%; top: calc(16px + var(--safe-t)); transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--glass-strong); border: 1px solid var(--line-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); padding: 10px 16px; border-radius: 14px; font-size: 14px; box-shadow: var(--shadow); animation: pop .25s var(--ease); max-width: 90vw; }
.toast.bad { border-color: rgba(248, 113, 113, .5); }
.toast.out { opacity: 0; transform: translateY(-6px); transition: .3s; }

/* ── телефон ──────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .top { padding: calc(10px + var(--safe-t)) 14px 10px; }
  .chat { padding: 4px 12px 18px; }
  .dock { padding: 0 10px calc(10px + var(--safe-b)); }
  .bubble { max-width: 90%; }
  .msg .ava { display: none; }
  .ask { margin-left: 0; max-width: 100%; }
  .hint { display: none; }
  .pill #presetName { display: none; }
  .composer { border-radius: 24px; padding: 6px; gap: 4px; }
  .speaking canvas { width: 110px; }
}
@media (pointer: coarse) {
  .act { width: 40px; height: 40px; }
  .icon-btn, .send { width: 48px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* ── окно «Телефон» ───────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(5, 6, 10, .66); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade .2s; }
.sheet {
  position: relative; width: min(440px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto;
  padding: 26px 24px 22px; border-radius: 26px; background: var(--glass-strong); border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); animation: pop .25s var(--ease);
}
.sheet h2 { margin: 0 0 8px; font-size: 21px; letter-spacing: -.2px; }
.sheet .close { position: absolute; top: 14px; right: 14px; }
.muted { color: var(--muted); margin: 0 0 16px; font-size: 14.5px; }
.muted.small { font-size: 13px; margin: 10px 0 14px; }
.pin {
  width: 100%; height: 50px; margin-bottom: 10px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, .25); color: var(--text); font: inherit; font-size: 18px; letter-spacing: 4px; outline: 0;
  transition: border-color .2s, box-shadow .2s;
}
.pin:focus { border-color: rgba(139, 92, 246, .6); box-shadow: 0 0 0 4px rgba(139, 92, 246, .14); }
.btn.wide { width: 100%; height: 50px; font-size: 15px; margin-top: 4px; }
.btn.danger { color: var(--bad); border-color: rgba(248, 113, 113, .35); }
.btn:disabled { opacity: .5; }
.tunnel-status { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.tunnel-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 10px var(--warn); animation: blink 1s infinite; }
.tunnel-status .dot.ok { background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: none; }
.qr { width: 236px; height: 236px; margin: 0 auto 14px; border-radius: 20px; background: #fff; padding: 10px; display: grid; place-items: center; box-shadow: 0 10px 40px -10px rgba(139, 92, 246, .55); }
.qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.qr-wait { color: #555; font-size: 14px; text-align: center; padding: 20px; }
.url-row { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); margin-bottom: 14px; }
.url-row code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: #c4b5fd; }
.steps { margin: 0; padding-left: 20px; color: var(--text); font-size: 14px; display: grid; gap: 6px; }

/* ── вход с телефона ─────────────────────────────────────────────────────── */
.login { position: relative; z-index: 1; min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login-card {
  width: min(380px, 100%); text-align: center; padding: 36px 26px 26px; border-radius: 28px;
  background: var(--glass); border: 1px solid var(--line-2); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow); animation: rise .5s var(--ease);
}
.login-card .orb.big { --s: 92px; margin-bottom: 20px; }
.login-card h1 { margin: 0 0 6px; font-size: 28px; }
.login-card p { margin: 0 0 22px; color: var(--muted); font-size: 14.5px; }
.login-card input {
  width: 100%; height: 58px; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .3);
  color: var(--text); text-align: center; font: inherit; font-size: 26px; letter-spacing: 10px; outline: 0; margin-bottom: 12px;
}
.login-card input:focus { border-color: rgba(139, 92, 246, .6); box-shadow: 0 0 0 4px rgba(139, 92, 246, .14); }
.login-card .btn.wide { height: 54px; }
.login-err { min-height: 22px; margin-top: 12px; color: var(--bad); font-size: 14px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ── где считает Окси (видеокарта / процессор) ──────────────────────────── */
.compute { color: var(--faint); margin-left: 2px; }
.compute:empty { display: none; }
.compute::before { content: "·"; margin: 0 6px 0 2px; }
.legion-btn {
  margin-top: 4px; border: 1px solid rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .08); color: var(--warn);
  border-radius: 999px; padding: 2px 10px; font-size: 12px; cursor: pointer;
}
.legion-btn:hover { background: rgba(251, 191, 36, .16); }
