/* «Стоп, мошенник» — основной стиль. Сделано проектом «Светлый Казань». */
:root {
  --bg0: #060B20;
  --bg1: #0B1437;
  --bg2: #101B47;
  --card: #15214F;
  --card2: #1B2A60;
  --line: rgba(255, 255, 255, .09);
  --line2: rgba(255, 255, 255, .16);
  --text: #EEF2FF;
  --muted: #9DABD8;
  --dim: #6F7DAE;
  --accent: #5B8CFF;
  --accent2: #36D1FF;
  --danger: #FF4D5E;
  --danger-bg: rgba(255, 77, 94, .14);
  --warn: #FFB020;
  --warn-bg: rgba(255, 176, 32, .14);
  --ok: #22C58B;
  --ok-bg: rgba(34, 197, 139, .14);
  --gold: #FFC94D;
  --radius: 18px;
  --font: "Manrope", "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg0);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent2); }
:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }

/* ---------- Фон ---------- */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.bg::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(91, 140, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 140, 255, .07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);
  animation: gridMove 30s linear infinite;
}
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.blob.b1 { width: 520px; height: 520px; left: -120px; top: -140px; background: #2B3FD6; animation: drift1 24s ease-in-out infinite alternate; }
.blob.b2 { width: 460px; height: 460px; right: -140px; bottom: -160px; background: #0E7FB8; animation: drift2 28s ease-in-out infinite alternate; }
.blob.b3 { width: 300px; height: 300px; left: 45%; top: 55%; background: #6A35C9; opacity: .35; animation: drift3 32s ease-in-out infinite alternate; }
.float-shield { position: absolute; width: 60px; opacity: .07; animation: floaty 14s ease-in-out infinite; }
.float-shield.s1 { left: 8%; top: 70%; }
.float-shield.s2 { right: 10%; top: 14%; width: 90px; animation-delay: -5s; }
.float-shield.s3 { left: 38%; top: 8%; width: 40px; animation-delay: -9s; }

@keyframes gridMove { to { background-position: 48px 48px, 48px 48px; } }
@keyframes drift1 { to { transform: translate(140px, 90px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-120px, -80px) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-180px, -120px) scale(.9); } }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-26px) rotate(4deg); } }

/* ---------- Сцена: интро + телефон ---------- */
.stage {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  gap: 72px; padding: 28px;
}
.intro { max-width: 440px; display: none; }
.intro .brand-row { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.intro .brand-row svg { width: 58px; height: 58px; filter: drop-shadow(0 8px 24px rgba(255, 77, 94, .45)); }
.intro h1 { font-size: 44px; line-height: 1.05; margin: 0; letter-spacing: -.02em; }
.intro .kicker { color: var(--gold); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.intro p.lead { color: var(--muted); font-size: 17px; margin: 18px 0 26px; }
.intro ul { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.intro li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 14px; }
.intro li b { display: block; }
.intro li span.e { font-size: 22px; line-height: 1; }
.intro li small { color: var(--muted); }
.intro .links { display: flex; gap: 10px; flex-wrap: wrap; }
.intro .links a { text-decoration: none; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line2); color: var(--text); font-weight: 600; font-size: 14px; }
.intro .links a:hover { background: rgba(255, 255, 255, .1); }
.made-by { margin-top: 26px; color: var(--dim); font-size: 13px; }
.made-by b { color: var(--gold); font-weight: 700; }

.device {
  position: relative;
  width: 410px; height: min(880px, calc(100dvh - 56px)); min-height: 620px;
  padding: 11px; border-radius: 50px;
  background: linear-gradient(160deg, #26316A, #0C1335 60%, #1A2357);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08) inset, 0 0 80px rgba(91, 140, 255, .18);
}
.app {
  position: relative; width: 100%; height: 100%;
  border-radius: 40px; overflow: hidden;
  background: var(--bg1);
  display: flex; flex-direction: column;
}

@media (min-width: 960px) {
  .intro { display: block; }
}
@media (max-width: 600px) {
  .stage { padding: 0; display: block; }
  .device { width: 100%; height: 100vh; height: 100dvh; min-height: 0; padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .app { border-radius: 0; }
  .bg { display: none; }
}

/* ---------- Шапка чата ---------- */
.topbar {
  position: relative; z-index: 5;
  display: flex; align-items: center; gap: 11px;
  padding: 16px 14px 12px;
  background: linear-gradient(180deg, rgba(16, 27, 71, .98), rgba(13, 22, 60, .94));
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.device .topbar { padding-top: 22px; }
.avatar { position: relative; width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, #2C3D9A, #121C4D); box-shadow: 0 0 0 1px var(--line2); }
.avatar svg { width: 28px; height: 28px; }
.avatar::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid rgba(255, 77, 94, .55); animation: pulseRing 2.6s ease-out infinite; }
@keyframes pulseRing { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.topbar .who { flex: 1; min-width: 0; }
.topbar .name { font-weight: 800; font-size: 16.5px; display: flex; align-items: center; gap: 6px; }
.topbar .name .verified { width: 16px; height: 16px; }
.topbar .sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .sub b { color: var(--gold); font-weight: 700; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); display: grid; place-items: center; font-size: 18px; transition: background .2s, transform .2s; }
.icon-btn:hover { background: rgba(255, 255, 255, .1); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 9px; height: 9px; background: var(--danger); border-radius: 50%; box-shadow: 0 0 0 2px var(--bg2); animation: blink 1.8s ease-in-out infinite; }
@keyframes blink { 50% { transform: scale(.7); opacity: .6; } }

/* ---------- Лента ---------- */
.chat {
  position: relative; flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 14px 12px 18px;
  scroll-behavior: smooth;
  background-color: var(--bg1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%235B8CFF' stroke-opacity='.06' stroke-width='2'%3E%3Cpath d='M30 12l16 6c0 16-6 26-16 32-10-6-16-16-16-32z'/%3E%3Cpath d='M90 70l12 4.5c0 12-4.5 19.5-12 24-7.5-4.5-12-12-12-24z'/%3E%3C/g%3E%3C/svg%3E");
}
.chat::-webkit-scrollbar { width: 6px; }
.chat::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 3px; }
.sys {
  text-align: center; margin: 4px auto 14px; max-width: 92%;
  font-size: 12px; color: var(--muted);
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px; width: fit-content;
}
.sys b { color: var(--gold); }

.msg { display: flex; gap: 8px; margin: 8px 0; align-items: flex-end; animation: msgIn .42s var(--ease) both; }
.msg.user { justify-content: flex-end; }
.msg .mini-av { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, #2C3D9A, #121C4D); }
.msg .mini-av svg { width: 19px; height: 19px; }
.bubble {
  position: relative; max-width: 84%;
  padding: 10px 13px 8px; border-radius: 18px 18px 18px 6px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  word-wrap: break-word; overflow-wrap: anywhere;
}
.msg.user .bubble { background: linear-gradient(135deg, #5B8CFF, #3B5BEF); border-color: transparent; border-radius: 18px 18px 6px 18px; color: #fff; }
.bubble .t { display: block; text-align: right; font-size: 11px; color: var(--dim); margin-top: 3px; }
.msg.user .bubble .t { color: rgba(255, 255, 255, .7); }
.bubble.wide { max-width: calc(100% - 38px); width: calc(100% - 38px); padding: 0; background: transparent; border: 0; box-shadow: none; }
.bubble p { margin: 0 0 6px; }
.bubble p:last-of-type { margin-bottom: 0; }
@keyframes msgIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

.typing .bubble { padding: 12px 16px; }
.typing .dots { display: flex; gap: 5px; }
.typing .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1.1s infinite ease-in-out; }
.typing .dots i:nth-child(2) { animation-delay: .15s; }
.typing .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-5px); opacity: 1; } }

/* Инлайн-кнопки под сообщением */
.inline-kb { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.inline-kb.one { grid-template-columns: 1fr; }
.ibtn {
  border: 1px solid var(--line2); background: rgba(91, 140, 255, .12);
  border-radius: 12px; padding: 10px 10px; font-weight: 700; font-size: 13.5px; text-align: center;
  transition: background .2s, transform .15s;
}
.ibtn:hover { background: rgba(91, 140, 255, .22); }
.ibtn:active { transform: scale(.97); }
.ibtn.primary { background: linear-gradient(135deg, #5B8CFF, #3B5BEF); border-color: transparent; color: #fff; }
.ibtn.danger { background: var(--danger-bg); border-color: rgba(255, 77, 94, .4); }
.ibtn.ghost { background: transparent; }
.ibtn:disabled { opacity: .5; cursor: default; }

.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip {
  flex: none; border: 1px solid var(--line2); background: rgba(255, 255, 255, .05);
  border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: background .2s, border-color .2s, transform .15s;
}
.chip:hover { background: rgba(255, 255, 255, .1); }
.chip:active { transform: scale(.96); }
.chip.on { background: rgba(91, 140, 255, .25); border-color: var(--accent); }
.chip .k { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.k.danger { background: var(--danger); } .k.suspicious { background: var(--warn); } .k.clean { background: var(--ok); } .k.official { background: var(--accent2); }
.label-sm { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin: 10px 0 6px; }

/* ---------- Карточки ---------- */
.card {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--line2); border-radius: 22px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
}
.card-body { padding: 14px; }
.card-foot { padding: 9px 14px 11px; font-size: 11.5px; color: var(--dim); border-top: 1px solid var(--line); text-align: center; }
.card-foot b { color: var(--gold); font-weight: 700; }
.sec-title { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 14px 0 8px; }
.sec-title:first-child { margin-top: 0; }

/* Сканирование */
.scan { padding: 18px 14px 14px; text-align: center; }
.scan-vis { position: relative; width: 132px; height: 150px; margin: 0 auto 10px; }
.scan-vis svg.big-shield { width: 132px; height: 150px; filter: drop-shadow(0 0 22px rgba(91, 140, 255, .55)); animation: shieldBreath 1.6s ease-in-out infinite; }
.scan-vis .ring { position: absolute; left: 50%; top: 50%; width: 170px; height: 170px; margin: -85px 0 0 -85px; border-radius: 50%; border: 2px dashed rgba(54, 209, 255, .35); animation: spin 6s linear infinite; }
.scan-vis .scanline {
  position: absolute; left: 8px; right: 8px; height: 3px; top: 10%;
  background: linear-gradient(90deg, transparent, #36D1FF, transparent);
  box-shadow: 0 0 18px 4px rgba(54, 209, 255, .6);
  border-radius: 2px; animation: scanY 1.4s ease-in-out infinite alternate;
}
@keyframes scanY { to { top: 86%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shieldBreath { 50% { transform: scale(1.04); } }
.scan-host { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; margin: 6px 0 12px; word-break: break-all; }
.steps { list-style: none; padding: 0; margin: 0; text-align: left; display: grid; gap: 7px; }
.steps li { display: flex; gap: 9px; align-items: center; font-size: 13.5px; color: var(--dim); transition: color .3s; }
.steps li::before { content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid var(--line2); transition: all .3s; }
.steps li.run { color: var(--text); }
.steps li.run::before { border-color: var(--accent2); border-top-color: transparent; animation: spin .8s linear infinite; }
.steps li.done { color: var(--muted); }
.steps li.done::before { border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }

/* Вердикт */
.verdict { animation: verdictIn .55s var(--ease) both; }
@keyframes verdictIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.v-head { display: flex; gap: 12px; align-items: center; padding: 16px 14px 14px; position: relative; overflow: hidden; }
.v-head::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .12) 50%, transparent 70%); transform: translateX(-100%); animation: shine 1.4s .3s var(--ease) forwards; }
@keyframes shine { to { transform: translateX(100%); } }
.v-icon { width: 54px; height: 60px; flex: none; animation: pop .6s .1s var(--ease) both; }
@keyframes pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
.v-title { font-size: 19px; font-weight: 800; line-height: 1.15; }
.v-sub { font-size: 13px; color: rgba(255, 255, 255, .78); margin-top: 3px; }
.lv-danger .v-head { background: linear-gradient(135deg, #C42A3D, #7E1530); }
.lv-suspicious .v-head { background: linear-gradient(135deg, #C77A06, #7A4304); }
.lv-clean .v-head { background: linear-gradient(135deg, #138A62, #0B4F43); }
.lv-official .v-head { background: linear-gradient(135deg, #1E5BD8, #123A8F); }
.v-url { display: flex; gap: 8px; align-items: center; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; word-break: break-all; }
.v-url .v-lock { flex: none; font-size: 14px; }
.v-url .reg { color: #fff; font-weight: 700; }
.v-url .rest { color: var(--dim); }
.meter { margin: 14px 0 4px; height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--ok), var(--warn) 50%, var(--danger)); position: relative; opacity: .95; }
.meter .needle { position: absolute; top: -5px; width: 6px; height: 20px; margin-left: -3px; border-radius: 3px; background: #fff; box-shadow: 0 0 0 2px var(--bg1), 0 2px 8px rgba(0, 0, 0, .5); left: 0; transition: left 1.1s var(--ease); }
.meter-l { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); }
.signs, .advice { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.signs li { display: flex; gap: 10px; font-size: 14px; padding: 9px 11px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); animation: msgIn .4s var(--ease) both; }
.signs li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; }
.signs li.high::before { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
.signs li.mid::before { background: var(--warn); }
.signs li.low::before { background: var(--dim); }
.signs li.good::before { background: var(--ok); }
.advice li { display: flex; gap: 9px; font-size: 14px; }
.advice li::before { content: "→"; color: var(--accent2); font-weight: 800; flex: none; }
.v-note { margin-top: 12px; font-size: 12px; color: var(--muted); background: rgba(255, 255, 255, .04); border-radius: 10px; padding: 8px 10px; border: 1px dashed var(--line2); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
.btn-row .wide { grid-column: 1 / -1; }

/* Схема недели */
.scheme .s-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 999px; background: rgba(255, 77, 94, .16); color: #FF9AA4; border: 1px solid rgba(255, 77, 94, .35); }
.pill.arch { background: rgba(255, 255, 255, .06); color: var(--muted); border-color: var(--line2); }
.s-week { font-size: 12px; color: var(--muted); }
.s-hero { display: flex; gap: 12px; align-items: center; padding: 12px 14px 4px; }
.s-emoji { width: 58px; height: 58px; flex: none; border-radius: 16px; display: grid; place-items: center; font-size: 32px; background: linear-gradient(135deg, rgba(91, 140, 255, .3), rgba(54, 209, 255, .12)); border: 1px solid var(--line2); }
.s-hero h3 { margin: 0; font-size: 20px; line-height: 1.15; }
.s-hero p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }
.s-teaser { margin: 10px 14px 0; padding: 10px 12px; background: var(--danger-bg); border-left: 3px solid var(--danger); border-radius: 0 12px 12px 0; font-weight: 700; font-size: 14.5px; }
.s-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; counter-reset: n; }
.s-list li { display: flex; gap: 10px; font-size: 14px; }
.s-list.signs3 li::before { counter-increment: n; content: counter(n); width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--warn); color: #241400; font-weight: 800; font-size: 12px; display: grid; place-items: center; }
.s-list.todo li::before { content: "✓"; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--ok); color: #03281B; font-weight: 900; font-size: 12px; display: grid; place-items: center; }
.sources { display: grid; gap: 6px; }
.sources a { display: flex; gap: 8px; align-items: center; text-decoration: none; font-size: 13px; color: var(--text); padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.sources a:hover { background: rgba(255, 255, 255, .08); }
.sources a::after { content: "↗"; margin-left: auto; color: var(--accent2); }
.partner { margin-top: 12px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: linear-gradient(90deg, rgba(255, 201, 77, .14), rgba(255, 201, 77, .03)); border: 1px solid rgba(255, 201, 77, .3); font-size: 13px; }
.partner .sun { font-size: 20px; color: var(--gold); animation: spin 18s linear infinite; display: inline-block; }
.partner b { color: var(--gold); }
.arch-list { display: grid; gap: 6px; }
.arch-item { display: flex; gap: 10px; align-items: center; text-align: left; width: 100%; padding: 9px 10px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); transition: background .2s, transform .15s; }
.arch-item:hover { background: rgba(255, 255, 255, .09); }
.arch-item:active { transform: scale(.98); }
.arch-item .e { font-size: 22px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: rgba(91, 140, 255, .14); flex: none; }
.arch-item b { display: block; font-size: 14px; }
.arch-item small { color: var(--dim); font-size: 12px; }

/* Памятка */
.memo-canvas-wrap { position: relative; border-radius: 14px; overflow: hidden; background: #FFF9EF; border: 1px solid var(--line2); aspect-ratio: 4 / 5; }
.memo-canvas-wrap canvas { width: 100%; height: 100%; display: block; transition: opacity .25s; }
.memo-canvas-wrap.busy canvas { opacity: .35; }

/* Формы */
.form { display: grid; gap: 10px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); font-weight: 700; margin-bottom: 5px; }
.field .opt { font-weight: 500; color: var(--dim); }
.input, select.input, textarea.input {
  width: 100%; border-radius: 12px; border: 1px solid var(--line2);
  background: rgba(0, 0, 0, .22); padding: 10px 12px; font-size: 15px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91, 140, 255, .25); }
select.input { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239DABD8' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
select.input option { background: #101B47; color: #fff; }
textarea.input { min-height: 78px; resize: vertical; }
.hint { font-size: 12px; color: var(--dim); margin-top: 4px; }
.hint.warn { color: var(--warn); }
.privacy { font-size: 12px; color: var(--muted); background: rgba(34, 197, 139, .08); border: 1px solid rgba(34, 197, 139, .25); padding: 8px 10px; border-radius: 10px; }
.done-badge { display: flex; gap: 12px; align-items: center; }
.done-badge .ok-circle { width: 46px; height: 46px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; font-size: 24px; color: #03281B; font-weight: 900; animation: pop .5s var(--ease) both; flex: none; }

/* ---------- Нижняя панель ---------- */
.kbd { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 10px 0; background: var(--bg2); border-top: 1px solid var(--line); transition: max-height .3s var(--ease), padding .3s; max-height: 140px; overflow: hidden; }
.kbd.hidden { max-height: 0; padding-top: 0; }
.kbtn { padding: 9px 6px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); font-weight: 700; font-size: 13.5px; line-height: 1.2; transition: background .2s, transform .15s; }
@media (max-width: 420px) { .kbtn { font-size: 13px; padding: 8px 4px; } }
.kbtn:hover { background: rgba(255, 255, 255, .11); }
.kbtn:active { transform: scale(.97); }
.composer { display: flex; gap: 8px; align-items: center; padding: 8px 10px 12px; background: var(--bg2); }
.device .composer { padding-bottom: 18px; }
.composer .input { border-radius: 22px; padding: 11px 16px; background: rgba(0, 0, 0, .25); }
.round-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; background: linear-gradient(135deg, #5B8CFF, #3B5BEF); color: #fff; font-size: 18px; box-shadow: 0 6px 16px rgba(59, 91, 239, .45); transition: transform .15s; }
.round-btn:active { transform: scale(.92); }
.round-btn.alt { background: rgba(255, 255, 255, .07); box-shadow: none; border: 1px solid var(--line); transition: transform .15s, background .2s; }
.round-btn.alt.active { background: rgba(91, 140, 255, .25); border-color: var(--accent); }

/* ---------- Экран уведомлений ---------- */
.screen {
  position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column;
  background: var(--bg1);
  transform: translateX(104%); transition: transform .45s var(--ease); visibility: hidden;
}
.screen.open { transform: none; visibility: visible; }
.screen-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 10px; border-bottom: 1px solid var(--line); background: var(--bg2); }
.device .screen-head { padding-top: 22px; }
.screen-head h2 { margin: 0; font-size: 17px; flex: 1; }
.badge-demo { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: rgba(255, 201, 77, .15); color: var(--gold); border: 1px solid rgba(255, 201, 77, .35); }
.screen-body { flex: 1; overflow-y: auto; }

.lock {
  position: relative; overflow: hidden; color: #fff;
  min-height: 600px; padding: 14px 14px 26px;
  background:
    radial-gradient(120% 70% at 20% 0%, rgba(91, 140, 255, .55), transparent 60%),
    radial-gradient(90% 60% at 100% 100%, rgba(255, 77, 94, .35), transparent 60%),
    linear-gradient(180deg, #1A2A7A, #0B1437 70%);
}
.lock::before { content: ""; position: absolute; width: 360px; height: 360px; left: 50%; top: 42%; margin-left: -180px; border-radius: 50%; background: radial-gradient(circle, rgba(54, 209, 255, .25), transparent 65%); animation: drift3 14s ease-in-out infinite alternate; }
.lock > * { position: relative; }
.lock-status { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; opacity: .9; }
.lock-status .icons { display: flex; gap: 6px; align-items: center; }
.lock-lockico { text-align: center; margin-top: 16px; font-size: 18px; opacity: .9; }
.lock-date { text-align: center; font-size: 17px; font-weight: 600; opacity: .92; margin-top: 4px; }
.lock-time { text-align: center; font-size: 84px; font-weight: 800; line-height: 1; letter-spacing: -.03em; margin: 2px 0 22px; text-shadow: 0 6px 30px rgba(0, 0, 0, .25); font-variant-numeric: tabular-nums; }
.notifs { display: grid; gap: 9px; min-height: 260px; align-content: start; }
.notif {
  background: rgba(240, 244, 255, .86); color: #0B1437;
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  border-radius: 20px; padding: 11px 13px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  animation: notifIn .7s var(--ease) both;
}
@keyframes notifIn { 0% { opacity: 0; transform: translateY(-40px) scale(.94); } 60% { opacity: 1; transform: translateY(4px) scale(1.01); } 100% { transform: none; } }
.notif-h { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #4A5585; font-weight: 700; margin-bottom: 4px; }
.notif-h .app-ico { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, #1A2A7A, #0B1437); display: grid; place-items: center; font-size: 12px; }
.notif-h .when { margin-left: auto; font-weight: 600; color: #6A73A0; }
.notif-t { font-weight: 800; font-size: 14.5px; line-height: 1.25; }
.notif-b { font-size: 14px; line-height: 1.38; margin-top: 2px; color: #1B2554; }
.notif-f { font-size: 12.5px; color: #5B6596; margin-top: 6px; font-weight: 600; }
.notif.urgent .notif-t { color: #B4192C; }
.lock-empty { text-align: center; opacity: .75; font-size: 14px; padding: 24px; }
.lock-bottom { display: flex; justify-content: space-between; align-items: center; padding: 0 22px; margin-top: 24px; }
.lock-bottom .lb { width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .16); display: grid; place-items: center; font-size: 19px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.home-ind { width: 130px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .85); margin: 18px auto 0; }

.settings { padding: 16px 14px 24px; }
.settings h3 { margin: 0 0 4px; font-size: 18px; }
.settings p.m { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; }
.toggle-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); margin-bottom: 8px; cursor: pointer; }
.toggle-row .tx { flex: 1; }
.toggle-row b { display: block; font-size: 14.5px; }
.toggle-row small { color: var(--muted); font-size: 12.5px; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, .15); transition: background .25s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(20px); }
.status-line { font-size: 13px; color: var(--muted); margin-top: 10px; min-height: 18px; }
.status-line.ok { color: var(--ok); } .status-line.warn { color: var(--warn); }

/* Всплывающие уведомления внутри приложения */
.toasts { position: absolute; left: 8px; right: 8px; top: 8px; z-index: 50; display: grid; gap: 8px; pointer-events: none; }
.device .toasts { top: 14px; }
.toasts .notif { pointer-events: auto; animation: notifIn .7s var(--ease) both; }
.toasts .notif.out { animation: toastOut .45s var(--ease) forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(-30px) scale(.95); } }

.footer-sign { text-align: center; font-size: 12px; color: var(--dim); padding: 6px 0 2px; }
.footer-sign b { color: var(--gold); }

/* ---------- Доступность: меньше движения ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .bg::before, .blob, .float-shield, .avatar::after { animation: none !important; }
  .scan-vis .scanline { top: 48%; }
}

/* ---------- Серверная версия: кнопка Telegram ---------- */
.tg-box { display: grid; gap: 10px; padding: 12px; margin-bottom: 16px; border-radius: 16px; background: linear-gradient(135deg, rgba(42, 171, 238, .16), rgba(91, 140, 255, .1)); border: 1px solid rgba(42, 171, 238, .45); }
.tg-box b { display: block; font-size: 15px; }
.tg-box small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.4; }
a.ibtn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.ibtn.tg-btn, .tg-box .ibtn.primary { background: linear-gradient(135deg, #2AABEE, #229ED9); border-color: #2AABEE; color: #fff; }
.intro .links a.tg-link { background: linear-gradient(135deg, #2AABEE, #229ED9); border-color: #2AABEE; color: #fff; }
[hidden] { display: none !important; }
