:root {
  color-scheme: dark;
  --bg: #000a0b;
  --surface: #071313;
  --surface-soft: #0b1b1a;
  --surface-raised: #0d211f;
  --surface-user: #12322e;
  --line: rgba(126, 181, 174, .18);
  --line-strong: rgba(0, 209, 180, .46);
  --text: #f2fbfa;
  --muted: #8eaaa7;
  --accent: #00d1b4;
  --accent-bright: #16f1d2;
  --cta: #c60b9f;
  --danger: #ff8791;
  --shadow: 0 24px 80px rgba(0, 0, 0, .44);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body {
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0, rgba(0, 209, 180, .11), transparent 30rem),
    radial-gradient(circle at 92% 94%, rgba(198, 11, 159, .08), transparent 28rem),
    var(--bg);
}
button, textarea, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.eyebrow { margin: 0; color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }

.app-shell { height: 100svh; display: grid; grid-template-rows: 72px minmax(0, 1fr); }
.topbar {
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 clamp(18px, 3vw, 44px);
  border-bottom: 1px solid var(--line);
  background: rgba(0, 10, 11, .88);
  backdrop-filter: blur(22px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; line-height: 1; }
.brand b { font-size: 22px; letter-spacing: .2em; }
/* Сияние логотипа во втором фирменном цвете: рядом с бирюзовым интерфейсом
   зелёная подсветка сливалась бы с фоном и ничего не выделяла. */
.brand-logo {
  display: block;
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 0 6px rgba(198, 11, 159, .85)) drop-shadow(0 0 16px rgba(198, 11, 159, .45));
  animation: brand-glow 3.2s ease-in-out infinite;
}
@keyframes brand-glow {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(198, 11, 159, .6)) drop-shadow(0 0 14px rgba(198, 11, 159, .3)); }
  50% { filter: drop-shadow(0 0 9px rgba(198, 11, 159, .95)) drop-shadow(0 0 24px rgba(198, 11, 159, .55)); }
}
.agent-status { display: flex; align-items: center; gap: 9px; color: #b8d0cd; font-size: 13px; }
.agent-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(0, 209, 180, .1), 0 0 18px var(--accent); }
.site-link {
  position: relative;
  z-index: 3;
  isolation: isolate;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.site-link:hover { border-color: var(--line-strong); background: rgba(0, 209, 180, .06); transform: translateY(-1px); }
.site-link svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.mobile-switch { display: none; }
.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(500px, 1.1fr);
  gap: 1px;
  background: var(--line);
}
.chat-panel, .project-panel { min-width: 0; min-height: 0; background: var(--bg); }
/* Колонка, а не грид с фиксированными строками: полоса записи то есть, то нет,
   и при её скрытии строки съезжали - растягивался то баннер, то поле ввода.
   Во flex растягивается ровно переписка, независимо от числа соседей. */
.chat-panel { display: flex; flex-direction: column; }
.chat-panel > .conversation { flex: 1 1 auto; }
.chat-panel > .booking-banner, .chat-panel > .composer-zone { flex: 0 0 auto; }
.project-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 18%, rgba(0, 209, 180, .09), transparent 26rem),
    linear-gradient(145deg, #061313, #020b0c 58%, #090510);
}

.conversation {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(0, 209, 180, .36) transparent;
  padding: clamp(28px, 5vh, 58px) clamp(20px, 4vw, 56px) 34px;
}
.welcome { min-height: min(420px, 56vh); display: grid; align-content: center; animation: rise 500ms ease both; }
.welcome h1 { max-width: 600px; margin: 12px 0 0; font-size: clamp(36px, 4.5vw, 64px); line-height: .98; letter-spacing: -.055em; }
.welcome > p:not(.eyebrow) { max-width: 560px; margin: 20px 0 0; color: #a9c0bd; font-size: clamp(15px, 1.5vw, 18px); line-height: 1.55; }
.starter-list { display: grid; gap: 9px; max-width: 620px; margin-top: 30px; }
.starter-list button {
  width: max-content;
  max-width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 19, 19, .72);
  color: #bed0ce;
  text-align: left;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.starter-list button:hover { color: white; border-color: var(--line-strong); transform: translateX(3px); }
.messages { display: grid; gap: 24px; }
.message { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 14px; max-width: 720px; animation: rise 320ms ease both; }
.message.user { grid-template-columns: minmax(0, 1fr); justify-self: end; max-width: min(640px, 90%); }
.message-body { min-width: 0; }
.message-meta { margin-bottom: 7px; color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.message-text { color: #e8f2f1; font-size: 15px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-text a { color: var(--accent-bright); text-underline-offset: 3px; }
.message.user .message-text { padding: 13px 17px; border: 1px solid rgba(0, 209, 180, .16); border-radius: 16px 16px 3px 16px; background: var(--surface-user); }
.avatar-small { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(0, 209, 180, .34); border-radius: 50%; background: #0b2220; color: var(--accent); font-size: 13px; font-weight: 900; }
.thinking { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 14px; max-width: 720px; margin-top: 26px; }
.thinking div:nth-child(2) { display: grid; gap: 4px; }
.thinking b { font-size: 13px; }
.thinking span { color: var(--muted); font-size: 12px; }
.thinking em { display: flex; gap: 4px; }
.thinking em i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: dots 1.2s infinite ease-in-out; }
.thinking em i:nth-child(2) { animation-delay: 150ms; }
.thinking em i:nth-child(3) { animation-delay: 300ms; }

.composer-zone { position: relative; z-index: 5; padding: 14px clamp(16px, 3vw, 42px) max(14px, env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(0, 10, 11, 0), rgba(0, 10, 11, .96) 28%, var(--bg) 64%); }
.composer { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: end; gap: 6px; padding: 8px; border: 1px solid rgba(0, 209, 180, .27); border-radius: 18px; background: rgba(10, 28, 27, .97); box-shadow: var(--shadow); }
.composer:focus-within { border-color: rgba(0, 209, 180, .7); box-shadow: 0 20px 70px rgba(0, 0, 0, .5), 0 0 0 3px rgba(0, 209, 180, .07); }
.composer textarea { width: 100%; min-height: 44px; max-height: 160px; resize: none; padding: 11px 4px 8px; border: 0; outline: 0; overflow-y: auto; background: transparent; color: var(--text); line-height: 1.45; }
.composer textarea::placeholder { color: #78918e; }
.send-button, .attach-button { display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 13px; cursor: pointer; }
.send-button { background: var(--cta); box-shadow: 0 8px 24px rgba(198, 11, 159, .22); }
.attach-button { background: transparent; color: var(--text); }
.send-button:hover:not(:disabled) { transform: translateY(-2px); background: #df19b7; }
.attach-button:hover:not(:disabled) { background: rgba(242, 251, 250, .08); }
.send-button:disabled, .attach-button:disabled { cursor: not-allowed; opacity: .46; }
.send-button svg, .attach-button svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.session-note { margin: 9px 2px 0; color: #627b78; font-size: 10px; text-align: center; }
.pending-files { display: flex; gap: 7px; overflow-x: auto; padding: 0 2px 9px; }
.pending-file { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; padding: 7px 8px 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: #b8cfcc; font-size: 11px; }
.pending-file button { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.07); cursor: pointer; }

.project-intro { position: relative; height: 100%; min-height: 0; overflow: hidden; isolation: isolate; }
.project-intro::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0,10,11,.3), transparent 38%), linear-gradient(0deg, rgba(0,10,11,.58), transparent 48%); }
.project-intro img { position: absolute; inset: 0 0 0 auto; z-index: -2; width: 100%; height: 100%; object-fit: contain; object-position: right center; filter: saturate(.92) contrast(1.04); }
.intro-card { position: absolute; z-index: 2; left: clamp(22px, 4vw, 62px); top: 50%; width: min(390px, 48%); padding: clamp(22px, 3vw, 34px); border: 1px solid rgba(0, 209, 180, .3); border-radius: 22px; background: rgba(4, 16, 17, .84); box-shadow: var(--shadow); backdrop-filter: blur(18px); transform: translateY(-50%); }
.intro-card h2 { margin: 11px 0 0; font-size: clamp(28px, 3.4vw, 48px); line-height: 1; letter-spacing: -.045em; }
.intro-card > p:not(.eyebrow) { margin: 17px 0 0; color: #b2c9c6; line-height: 1.55; }
.intro-card button, .back-to-chat { margin-top: 24px; min-height: 42px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(0, 209, 180, .08); color: var(--accent-bright); cursor: pointer; }
.intro-card button { display: none; }

.project-data { height: 100%; overflow-y: auto; padding: clamp(24px, 4vw, 56px); scrollbar-color: rgba(0, 209, 180, .36) transparent; animation: rise 480ms ease both; }
.project-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.project-head h2 { margin: 9px 0 0; font-size: clamp(30px, 4vw, 52px); line-height: 1; letter-spacing: -.05em; }
.lead-id { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.status-pill { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 1px solid rgba(0, 209, 180, .32); border-radius: 999px; background: rgba(0, 209, 180, .08); color: var(--accent-bright); font-size: 12px; white-space: nowrap; }
.status-pill::before { content: ""; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.summary-card { margin-top: 28px; padding: 22px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 14px; background: rgba(11, 27, 26, .72); }
.summary-card span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.summary-card p { margin: 12px 0 0; color: #deebea; font-size: 15px; line-height: 1.65; }
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.resource-card { min-width: 0; display: grid; grid-template-rows: auto minmax(116px, 1fr) auto; gap: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7, 19, 19, .78); }
.resource-card > header { display: flex; align-items: center; gap: 11px; }
.resource-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(0, 209, 180, .24); border-radius: 10px; background: rgba(0, 209, 180, .07); color: var(--accent); }
.resource-icon svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.resource-card header div { display: grid; gap: 2px; }
.resource-card small { color: var(--muted); font-size: 11px; }
.resource-card b { font-size: 18px; }
.latest-item { min-width: 0; display: grid; align-content: start; }
.latest-item .empty { color: #627b78; font-size: 12px; line-height: 1.5; }
.latest-link { min-width: 0; display: grid; gap: 7px; text-decoration: none; }
.latest-link img { width: 100%; height: 112px; object-fit: cover; border-radius: 9px; background: var(--surface-soft); }
.latest-link div { min-width: 0; display: grid; gap: 5px; }
.latest-link strong { overflow: hidden; color: #dfedeb; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.latest-link span { color: var(--muted); font-size: 10px; }
.view-all { min-height: 36px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: #acd0cc; font-size: 11px; cursor: pointer; }
.view-all:hover:not(:disabled) { border-color: var(--line-strong); color: white; }
.view-all:disabled { opacity: .42; cursor: default; }
.back-to-chat { display: none; }

.architect-card { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7, 19, 19, .78); }
.architect-card__profile { display: flex; align-items: center; gap: 12px; }
.architect-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-strong); }
.architect-card__profile b { display: block; margin-top: 2px; font-size: 15px; }
.architect-facts { display: grid; gap: 8px; margin: 16px 0 0; }
.architect-fact { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.architect-fact dt { margin: 0; color: var(--muted); font-size: 11px; }
.architect-fact dd { margin: 0; text-align: right; color: #deebea; font-size: 12px; }
.architect-actions { display: grid; gap: 8px; margin-top: 16px; }
.architect-cta, .architect-alt { display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 14px; border-radius: 10px; text-decoration: none; text-align: center; font-size: 13px; }
.architect-cta { border: 0; background: var(--cta); color: white; font-weight: 700; box-shadow: 0 8px 24px rgba(198, 11, 159, .22); }
.architect-cta:hover { background: #df19b7; }
.architect-alt { border: 1px solid var(--line); color: #acd0cc; }
.architect-alt:hover { border-color: var(--line-strong); color: white; }

dialog { width: min(680px, calc(100vw - 28px)); max-height: calc(100svh - 28px); padding: 0; border: 1px solid var(--line-strong); border-radius: 18px; background: #071313; color: var(--text); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0, 4, 5, .78); backdrop-filter: blur(7px); }
.dialog-shell { padding: 24px; }
.dialog-shell > header { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.dialog-shell h2 { margin: 8px 0 0; font-size: 26px; }
.dialog-shell > header button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; font-size: 24px; line-height: 1; }
.all-resources { max-height: min(540px, 65svh); overflow-y: auto; display: grid; gap: 9px; margin-top: 20px; }
.resource-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); text-decoration: none; }
.resource-row img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.resource-row .file-symbol { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 8px; background: rgba(0, 209, 180, .08); color: var(--accent); font-weight: 900; }
.resource-row div { min-width: 0; display: grid; gap: 4px; }
.resource-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.resource-row small, .resource-row > span { color: var(--muted); font-size: 10px; }
.lead-form { display: grid; gap: 15px; padding: 28px; }
.lead-form h2 { margin: -2px 0 0; font-size: clamp(26px, 5vw, 38px); line-height: 1.05; letter-spacing: -.035em; }
.lead-form > p:not(.eyebrow) { margin: -5px 0 5px; color: var(--muted); line-height: 1.5; }
.lead-form label { display: grid; gap: 7px; color: #b8cdca; font-size: 12px; }
.lead-form input, .lead-form select { min-width: 0; height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: var(--surface-soft); color: var(--text); }
.lead-form input:focus, .lead-form select:focus { border-color: var(--line-strong); }
.privacy-notice { display: flex; align-items: center; gap: 10px; margin: 0; padding: 11px 13px; border: 1px solid rgba(0, 209, 180, .24); border-radius: 11px; background: rgba(0, 209, 180, .06); color: #b8cdca; font-size: 12px; line-height: 1.4; animation: privacy-notice-attention .72s ease-in-out 2; }
.privacy-notice-icon { display: inline-grid; flex: 0 0 20px; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(0, 209, 180, .14); color: var(--accent-bright); font-size: 12px; font-weight: 900; }
.lead-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 4px; }
.lead-actions button { min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 9px; background: transparent; cursor: pointer; }
.lead-actions .confirm { border-color: transparent; background: var(--cta); }
.error-message { color: var(--danger); }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes dots { 0%, 70%, 100% { transform: translateY(0); opacity: .35; } 35% { transform: translateY(-4px); opacity: 1; } }
@keyframes privacy-notice-attention {
  0%, 100% { border-color: rgba(0, 209, 180, .24); box-shadow: none; }
  50% { border-color: rgba(0, 209, 180, .72); box-shadow: 0 0 22px rgba(0, 209, 180, .2); }
}

@media (max-width: 1060px) {
  .workspace { grid-template-columns: minmax(340px, .95fr) minmax(410px, 1.05fr); }
  .resource-grid { grid-template-columns: 1fr; }
  .resource-card { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto; align-items: center; }
  .resource-card .latest-item { min-height: 50px; }
  .latest-link img { display: none; }
  .intro-card { width: min(360px, 58%); }
}

@media (max-width: 720px) {
  body { overflow: hidden; }
  .app-shell { grid-template-rows: 62px 48px minmax(0, 1fr); }
  .topbar { grid-template-columns: 1fr auto; padding: 0 14px; }
  .agent-status { display: none; }
  .brand b { font-size: 16px; }
  .site-link { min-width: 40px; padding: 0 11px; justify-content: center; }
  .mobile-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 6px 10px 0; border-bottom: 1px solid var(--line); background: var(--bg); }
  .mobile-switch button { position: relative; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
  .mobile-switch button.active { border-color: var(--accent); color: var(--text); }
  .mobile-switch i { display: inline-grid; place-items: center; min-width: 17px; height: 17px; margin-left: 6px; padding: 0 4px; border-radius: 999px; background: rgba(0, 209, 180, .12); color: var(--accent); font-size: 9px; font-style: normal; }
  .workspace { height: 100%; grid-template-columns: 1fr; gap: 0; background: transparent; }
  .app-shell[data-mobile-panel="chat"] .project-panel,
  .app-shell[data-mobile-panel="project"] .chat-panel { display: none; }
  .chat-panel, .project-panel { height: 100%; min-height: 0; }
  .conversation { padding: 24px 14px 26px; }
  .welcome { min-height: 52vh; }
  /* Заголовок должен лечь в одну строку на телефоне: «С чего начнём проект?»
     длиннее прежнего, и 12vw разрывали его на три строки. Ширина буквы у
     Inter около 0.52em, поэтому берём запас по самой длинной локали. */
  .welcome h1 { font-size: clamp(24px, 7.4vw, 40px); letter-spacing: -.03em; text-wrap: balance; }
  .starter-list button { width: 100%; border-radius: 10px; }
  .message { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
  .message.user { max-width: 94%; }
  .avatar-small { width: 32px; height: 32px; font-size: 11px; }
  .message-text { font-size: 14px; }
  .composer-zone { padding: 10px 10px max(10px, env(safe-area-inset-bottom)); }
  .composer { grid-template-columns: 40px minmax(0, 1fr) 44px; border-radius: 15px; }
  .send-button { width: 44px; height: 44px; }
  .attach-button { width: 40px; height: 44px; }
  .project-intro img { object-position: center; }
  .project-intro::after { background: linear-gradient(0deg, rgba(0,10,11,.82), rgba(0,10,11,.06) 65%); }
  .intro-card { left: 14px; right: 14px; top: auto; bottom: 18px; width: auto; padding: 22px; transform: none; }
  .intro-card h2 { font-size: 34px; }
  .intro-card button { display: inline-flex; align-items: center; }
  .project-data { padding: 22px 14px max(20px, env(safe-area-inset-bottom)); }
  .project-head { align-items: start; }
  .project-head h2 { font-size: 36px; }
  .status-pill { margin-top: 2px; }
  .summary-card { margin-top: 20px; }
  .resource-grid { grid-template-columns: 1fr; }
  .resource-card { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; }
  .resource-card > header { grid-column: 1 / -1; }
  .view-all { width: 100%; min-width: 0; }
  .back-to-chat { display: inline-flex; align-items: center; justify-content: center; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* Website request chat: message kind labels, glowing offer, booking banner */
.message-kind-label { margin-bottom: 6px; color: var(--accent-bright); font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.message.user .message-kind-label { text-align: right; }
.message.offer .message-text { padding: 16px 18px; border: 1px solid rgba(22, 241, 210, .55); border-radius: 16px; background: rgba(0, 209, 180, .07); animation: offerGlow 2.4s ease-in-out infinite; }
@keyframes offerGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(22, 241, 210, .22); border-color: rgba(22, 241, 210, .4); }
  50% { box-shadow: 0 0 24px rgba(22, 241, 210, .5); border-color: rgba(22, 241, 210, .85); }
}
.message.system .message-text { color: var(--muted); font-style: italic; }
/* Быстрая реплика-заглушка: тише обычного ответа, чтобы не спорить с настоящим. */
.message.preface .message-text { color: var(--muted); border-left: 2px solid rgba(0, 209, 180, .45); padding-left: 12px; }
.message.preface .message-kind-label { opacity: .75; }
/* Оценка проекта - главный аргумент предложения, поэтому она вынесена крупно. */
.offer-estimate { margin-top: 12px; padding: 12px 16px; border: 1px solid rgba(22, 241, 210, .45); border-radius: 14px; background: rgba(0, 209, 180, .1); display: grid; gap: 2px; }
.offer-estimate b { font-size: 19px; line-height: 1.25; color: var(--accent-bright); }
.offer-estimate span { font-size: 11.5px; color: var(--muted); }
.booking-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px 12px; flex-wrap: wrap; margin: 12px 18px 0; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(0, 209, 180, .08); }
/* Кнопки держим в одну строку, ужимается подпись: перенос делал из узкой
   полосы трёхэтажный блок. */
.booking-banner > div:first-child { flex: 1 1 140px; min-width: 0; }
.booking-banner__actions { display: flex; flex-wrap: nowrap; gap: 8px; flex: 0 0 auto; }
/* Только подпись, иначе правило накрывает и контейнер кнопок. */
.booking-banner > div:first-child { display: grid; gap: 2px; }
.booking-banner b { color: var(--accent-bright); font-size: 14px; }
.booking-banner small { color: var(--muted); font-size: 12px; }
.booking-banner button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(0, 209, 180, .12); color: var(--accent-bright); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; }
.booking-banner button.is-secondary { background: transparent; color: var(--muted); font-weight: 600; }
.booking-banner button.is-secondary:hover { color: var(--accent-bright); border-color: var(--line-strong); }
.waiting-note { margin: 10px 0 0 52px; color: var(--muted); font-size: 12px; line-height: 1.5; }


/* Стартовый выбор сценария */
.welcome h1 { margin-bottom: 22px; }
.option-list { position: relative; display: grid; gap: 12px; max-width: 560px; }
.option-hand { flex: 0 0 auto; font-size: 20px; line-height: 1; animation: handNudge 1.5s ease-in-out infinite; }
@keyframes handNudge {
  0%, 100% { transform: translateX(0); opacity: .75; }
  50% { transform: translateX(7px); opacity: 1; }
}
.option-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: 16px; background: rgba(0, 209, 180, .06); color: var(--text); text-align: left; cursor: pointer; transition: transform .16s ease, background .16s ease, border-color .16s ease; animation: optionAttention 3.6s ease-in-out infinite; }
.option-card:nth-child(2) { animation-delay: 0s; }
.option-card:nth-child(3) { animation-delay: .5s; }
.option-card:nth-child(4) { animation-delay: 1s; }
.option-card:hover, .option-card:focus-visible { transform: translateX(4px); background: rgba(0, 209, 180, .12); border-color: var(--accent-bright); outline: none; }
.option-emoji { flex: 0 0 auto; font-size: 22px; line-height: 1; }
.option-body { display: grid; gap: 3px; min-width: 0; }
.option-body b { font-size: 15px; font-weight: 700; }
.option-body small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
@keyframes optionAttention {
  0%, 82%, 100% { box-shadow: 0 0 0 rgba(22, 241, 210, 0); }
  88% { box-shadow: 0 0 18px rgba(22, 241, 210, .3); }
}
@media (prefers-reduced-motion: reduce) {
  .option-hand, .option-card, .message.offer .message-text { animation: none; }
}

/* Запись на консультацию прямо в чате */
.booking-widget { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(11, 27, 26, .72); }
.booking-nav { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.booking-nav button { min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.booking-nav button:disabled { opacity: .4; cursor: default; }
.booking-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px; }
.booking-day { display: grid; align-content: start; gap: 6px; }
.booking-day b { color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.booking-day small { color: var(--muted); font-size: 11.5px; }
.booking-slot { min-height: 34px; border: 1px solid rgba(0, 209, 180, .28); border-radius: 9px; background: rgba(0, 209, 180, .07); color: var(--accent-bright); font-size: 13px; cursor: pointer; }
.booking-slot:hover { border-color: var(--accent-bright); }
.booking-slot.is-selected { background: var(--accent); color: #04201d; font-weight: 700; }
.booking-status { margin: 10px 0 0; color: var(--danger); font-size: 12.5px; }
.booking-form { display: grid; gap: 8px; margin-top: 12px; }
.booking-form input { min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(2, 12, 12, .6); color: var(--text); font-size: 14px; }
.booking-form button { min-height: 42px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(0, 209, 180, .14); color: var(--accent-bright); font-size: 14px; font-weight: 700; cursor: pointer; }
.booking-note { margin: 2px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.booking-done { display: grid; gap: 10px; justify-items: start; }
.booking-done a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(0, 209, 180, .12); color: var(--accent-bright); text-decoration: none; }


/* Печать «мыслей» в ожидании ответа */
.thinking { align-items: flex-start; }
.thinking-body { display: grid; gap: 6px; min-width: 0; }
.thinking-line { display: flex; align-items: center; gap: 6px; min-height: 20px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.thinking-line mark { background: rgba(80, 170, 255, .45); color: var(--text); border-radius: 2px; }
.thinking-cursor { display: inline-block; width: 8px; height: 15px; margin: 0 1px; vertical-align: text-bottom; background: var(--accent-bright); animation: cursorBlink 1s steps(1) infinite; }
@keyframes cursorBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* Повторное меню сценариев в переписке */
.option-list--inline { margin-top: 12px; max-width: 100%; }
.options-again { margin: 0 0 4px; color: var(--muted); font-size: 12.5px; }

/* Палец у поля ввода */
.input-hand { position: absolute; top: -26px; left: 14px; font-size: 22px; animation: handDown 1.3s ease-in-out infinite; pointer-events: none; }
@keyframes handDown {
  0%, 100% { transform: translateY(0); opacity: .8; }
  50% { transform: translateY(6px); opacity: 1; }
}
.composer-zone { position: relative; }

/* Факт брони в карточке проекта */
.booking-fact { display: grid; gap: 8px; justify-items: start; margin-top: 22px; padding: 16px 18px; border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); border-radius: 14px; background: rgba(0, 209, 180, .07); }
.booking-fact b { font-size: 15px; }
.booking-fact a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(0, 209, 180, .12); color: var(--accent-bright); font-size: 13px; text-decoration: none; }

/* Контакты архитектора */
.architect-now { margin: 20px 0 10px; color: var(--muted); font-size: 13px; }
.architect-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.architect-cta--wa { background: rgba(37, 211, 102, .12); border-color: rgba(37, 211, 102, .45); color: #7ff0ad; }

/* Изученные материалы */
.studied-line { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 5px 11px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(0, 209, 180, .08); color: var(--accent-bright); font-size: 12px; }

/* Демо-заметка ушла в подвал */
.app-footer { grid-column: 1 / -1; padding: 10px 20px 14px; text-align: center; }
.app-footer small { color: rgba(142, 170, 167, .55); font-size: 10.5px; line-height: 1.4; }

/* Бронирование в два шага: сначала время, потом контакты. */
.booking-chosen { margin: 0 0 10px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.booking-chosen b { color: var(--accent-bright); font-size: 14.5px; }
.booking-change { padding: 0; border: 0; background: none; color: var(--muted); font-size: 12.5px; text-decoration: underline; cursor: pointer; }
.booking-change:hover { color: var(--accent-bright); }
.booking-step-title { margin: 0 0 2px; font-size: 13px; color: var(--text); }

/* ---- Мобильная читабельность ----
   iOS зумит страницу на любом поле мельче 16px, и после этого макет уже не
   возвращается. Плюс подписи в форме брони на телефоне надо просто читать. */
@media (max-width: 720px) {
  .booking-form input { font-size: 16px; min-height: 44px; }
  .booking-form button { min-height: 46px; }
  .booking-note { font-size: 12.5px; }
  .booking-step-title { font-size: 14px; }
  .booking-change { font-size: 13px; padding: 4px 0; }
  .booking-slot { min-height: 38px; }
}

/* Служебные подписи на телефоне: 10-11px в руках читаются плохо. */
@media (max-width: 720px) {
  .eyebrow,
  .lead-id,
  .view-all,
  .resource-card small,
  .architect-fact dt,
  .summary-card span,
  .latest-link span,
  .message-meta,
  .message-kind-label { font-size: 12px; }
  .session-note { font-size: 11px; }
  .booking-status { font-size: 13.5px; }
}

/* Метка «в карточке проекта появилось новое»: точка на вкладке, а не рывок
   на другой экран посреди чтения ответа. */
@media (max-width: 720px) {
  .mobile-switch button.has-news { color: var(--text); }
  .mobile-switch button.has-news::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(0, 209, 180, .5);
    animation: tab-news-ripple 2.4s ease-out infinite, tab-news-blink 1.1s steps(1) infinite;
  }
  .mobile-switch button.has-news i { background: rgba(0, 209, 180, .24); color: var(--accent-bright); }
}
@keyframes tab-news-ripple {
  0% { box-shadow: 0 0 0 0 rgba(0, 209, 180, .5); }
  60% { box-shadow: 0 0 0 9px rgba(0, 209, 180, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 209, 180, 0); }
}
@keyframes tab-news-blink {
  0%, 64% { opacity: 1; }
  65%, 100% { opacity: .18; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-switch button.has-news::after { animation: none; }
}

/* ---- Загрузочная маска ----
   Интерфейс собран в разметке целиком, поэтому до загрузки app.js его было
   видно и по нему можно было кликать - только ничего не происходило.
   Маска закрывает его, пока приложение не готово. Живёт в общей таблице
   стилей: CSP реле запрещает инлайновые стили, а таблица и так
   блокирует первый кадр. */
/* Показываем маску только когда скрипты работают: без JS приложение всё равно
   мертво, и чёрный экран вместо интерфейса ничего не улучшит. */
.boot-mask { display: none; }
html.js .boot-mask {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(120% 120% at 50% 0%, #06181a 0%, #000a0b 62%);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #eafffb;
  transition: opacity 420ms ease, visibility 420ms ease;
}
html.js .boot-mask[hidden] { display: none; }
.boot-mask.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-card { width: min(420px, 100%); display: grid; justify-items: center; text-align: center; gap: 18px; }
.boot-logo {
  position: relative;
  width: 84px; height: 84px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(0, 209, 180, .1);
  color: #16f1d2;
  font-size: 30px; font-weight: 800; letter-spacing: .04em;
}
.boot-logo::after {
  content: ""; position: absolute; inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(0, 209, 180, .18);
  border-top-color: #16f1d2;
  animation: bootSpin 1.15s linear infinite;
}
@keyframes bootSpin { to { transform: rotate(360deg); } }
.boot-title { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: .01em; }
.boot-line {
  min-height: 42px;
  display: flex; align-items: center; justify-content: center; gap: 2px;
  color: #8fb2b2; font-size: 14px; line-height: 1.45;
}
.boot-caret {
  display: inline-block; width: 7px; height: 14px; margin-left: 2px;
  background: #16f1d2; animation: bootCaret 1s steps(1) infinite;
}
@keyframes bootCaret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.boot-track { width: 100%; height: 3px; border-radius: 999px; background: rgba(0, 209, 180, .13); overflow: hidden; }
.boot-track i { display: block; width: 40%; height: 100%; border-radius: 999px; background: linear-gradient(90deg, transparent, #16f1d2, transparent); animation: bootSlide 1.6s ease-in-out infinite; }
@keyframes bootSlide { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) {
  .boot-logo::after, .boot-track i, .boot-caret { animation: none; }
}
