/* ------------------------------------------------------------------
   Макеты сторонних приложений для раздела «Где вы будете говорить».
   Каждое окно повторяет настоящее приложение: боковые списки, история
   переписки, панели инструментов. Все размеры заданы в em и зависят от
   font-size окна, поэтому макет целиком масштабируется под ширину экрана.
   ------------------------------------------------------------------ */

/* ---------- островок записи ----------
   Точные пропорции классического стиля из RecordingOverlayController.swift:
   окно 262x56, радиус 18, поля 14, промежуток 12, индикатор 36 с точкой 12,
   волна 186x30 из 48 полос шириной 1,92 с промежутком 2. Все размеры
   пересчитаны в долях высоты, поэтому островок масштабируется целиком. */
.ev-island {
  --island-h: 56px;
  position: relative;
  display: flex;
  align-items: center;
  gap: calc(var(--island-h) * .2143);
  width: calc(var(--island-h) * 4.6786);
  height: var(--island-h);
  padding: 0 calc(var(--island-h) * .25);
  border-radius: calc(var(--island-h) * .3214);
  background: linear-gradient(175deg, #212228, #17181c 65%);
  border: 0;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .5);
  transform-origin: center bottom;
  /* Оболочка меняет размер так же, как shellSize в RecordingOverlayView:
     easeOut 0,22 с между пилюлей 30x30 и окном 262x56. */
  transition: width .22s ease-out, height .22s ease-out, padding .22s ease-out,
              gap .22s ease-out, border-radius .22s ease-out;
}
/* Содержимое появляется как .transition(.opacity + .scale(0.96)) в приложении. */
@keyframes ev-island-content { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.ev-island[data-state="recording"] .ev-island-dot,
.ev-island[data-state="recording"] .ev-island-wave { animation: ev-island-content .2s ease-out both; }
.ev-island[data-state="processing"] .ev-island-dot { animation: ev-island-content .22s ease-out both; }
.ev-island[data-state="idle"] .ev-island-idle { animation: ev-island-content .2s ease-out both; }
.ev-island-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: calc(var(--island-h) * .6429);
  height: calc(var(--island-h) * .6429);
  flex: none;
}
.ev-island-dot i {
  width: calc(var(--island-h) * .2143);
  height: calc(var(--island-h) * .2143);
  border-radius: 50%;
  background: linear-gradient(135deg, #ff453a, #e8362c);
  box-shadow: 0 0 calc(var(--island-h) * .107) rgba(255, 69, 58, .7);
  animation: ev-dot-beat .85s ease-in-out infinite alternate;
}
.ev-island-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, rgba(255, 69, 58, .55) 8%, rgba(255, 69, 58, 0) 100%);
  animation: ev-dot-halo 1.1s ease-in-out infinite alternate;
}
@keyframes ev-dot-beat { from { transform: scale(.92); } to { transform: scale(1.12); } }
@keyframes ev-dot-halo { from { transform: scale(.85); opacity: .55; } to { transform: scale(1.15); opacity: .9; } }

.ev-island-wave {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--island-h) * .0357);
  flex: 1;
  height: calc(var(--island-h) * .5357);
}
.ev-island-wave b {
  display: block;
  width: calc(var(--island-h) * .0343);
  min-width: 1px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(to bottom, rgba(10, 132, 255, .96), rgba(10, 132, 255, .72));
  transition: height .08s linear;
}
/* Обработка - точный перенос ShimmerDots из RecordingOverlayController.swift:
   пять кругов 7 px с промежутком 7, фаза `t * 1.6 - i * 0.18` рад,
   bounce = max(0, sin(фаза)), масштаб 0,7 + bounce * 0,7, подъём до 6 px,
   свечение accent с прозрачностью 0,4 * bounce.

   Отсюда и числа: полный оборот 2p / 1,6 = 3,927 с, сдвиг соседней точки
   0,18 / 1,6 = 0,1125 с. Половину периода bounce равен нулю - точки стоят
   на месте, и лишь потом по ним слева направо проходит одна волна. Раньше
   все пять пульсировали разом и в обе стороны: на это и было не похоже. */
.ev-island[data-state="processing"] .ev-island-wave {
  justify-content: center;
  gap: calc(var(--island-h) * .125);
  animation: ev-island-swap .22s ease-out both;
}
@keyframes ev-island-swap { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.ev-island[data-state="processing"] .ev-island-wave b {
  width: calc(var(--island-h) * .125);
  height: calc(var(--island-h) * .125);
  min-width: 0;
  border-radius: 50%;
  background: linear-gradient(to bottom, rgba(10, 132, 255, 1), rgba(10, 132, 255, .72));
  transition: none;
  animation: ev-shimmer 3.927s linear infinite;
  animation-delay: calc(var(--dot, 0) * .1125s - 3.927s);
}
.ev-island[data-state="processing"] .ev-island-wave b:nth-child(2) { --dot: 1; }
.ev-island[data-state="processing"] .ev-island-wave b:nth-child(3) { --dot: 2; }
.ev-island[data-state="processing"] .ev-island-wave b:nth-child(4) { --dot: 3; }
.ev-island[data-state="processing"] .ev-island-wave b:nth-child(5) { --dot: 4; }
.ev-island[data-state="processing"] .ev-island-wave b:nth-child(n + 6) { display: none; }
.ev-island[data-state="processing"] .ev-island-dot i {
  background: linear-gradient(135deg, #ffb340, #ff9f0a);
  box-shadow: 0 0 calc(var(--island-h) * .107) rgba(255, 159, 10, .7);
}
.ev-island[data-state="processing"] .ev-island-dot::before {
  background: radial-gradient(circle closest-side, rgba(255, 159, 10, .5) 8%, rgba(255, 159, 10, 0) 100%);
}
/* Ключевые кадры считаны по формуле: 12,5 % - sin 45 градусов (0,707),
   25 % - вершина, дальше спад и ровно половина периода покоя. */
@keyframes ev-shimmer {
  0% { transform: translateY(0) scale(.7); opacity: .6; box-shadow: 0 0 0 rgba(10, 132, 255, 0); }
  12.5% { transform: translateY(calc(var(--island-h) * -.0757)) scale(1.195); opacity: .88; box-shadow: 0 0 calc(var(--island-h) * .0714) rgba(10, 132, 255, .28); }
  25% { transform: translateY(calc(var(--island-h) * -.1071)) scale(1.4); opacity: 1; box-shadow: 0 0 calc(var(--island-h) * .0714) rgba(10, 132, 255, .4); }
  37.5% { transform: translateY(calc(var(--island-h) * -.0757)) scale(1.195); opacity: .88; box-shadow: 0 0 calc(var(--island-h) * .0714) rgba(10, 132, 255, .28); }
  50%, 100% { transform: translateY(0) scale(.7); opacity: .6; box-shadow: 0 0 0 rgba(10, 132, 255, 0); }
}
/* Ожидание: окно 30x30 с радиусом 15 и значком волны. */
.ev-island-idle { display: none; color: #0a84ff; }
.ev-island-idle .ev-ic {
  width: calc(var(--island-h) * .2);
  height: calc(var(--island-h) * .2);
}
.ev-island[data-state="idle"] .ev-island-idle { display: grid; place-items: center; }
.ev-island[data-state="idle"] .ev-island-dot { display: none; }
.ev-island[data-state="idle"] {
  width: calc(var(--island-h) * .5357);
  height: calc(var(--island-h) * .5357);
  min-width: 0;
  padding: 0;
  gap: 0;
  border-radius: calc(var(--island-h) * .268);
  justify-content: center;
}
.ev-island[data-state="idle"] .ev-island-wave { display: none; }

/* ---------- секция ----------
   Окно нарисовано в оформлении лендинга: это наш продукт, а не копия
   чужого интерфейса. Все высоты зафиксированы, поэтому при печати,
   обработке и переключении сценариев ничего не смещается. */
.places-section { background: #232323; border-block: 1px solid #383838; overflow: hidden; }

.places-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.place-tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px 9px 10px;
  border-radius: 11px;
  border: 1px solid #3d3d3d;
  background: #2c2c2c;
  color: #b4b4b4;
  font-size: 13px;
  font-weight: 600;
  transition: background .22s, border-color .22s, color .22s, transform .22s;
}
.place-tab-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #383838;
  color: #a8a8a8;
  flex: none;
  transition: background .22s, color .22s;
}
.place-tab:hover { background: #343434; color: #efefef; transform: translateY(-1px); }
.place-tab.on { background: #21344b; border-color: #35618f; color: #fff; }
.place-tab.on .place-tab-mark { background: #0a84ff; color: #fff; }
/* Точки справа от названия нет: она сдвигала подпись влево от центра
   вкладки, и выбранная вкладка выглядела набранной не по центру. */

/* ---------- сцена с окном ---------- */
/* Окно - главное, рассказ стоит рядом узкой колонкой: так делают
   разборы «как это работает» - шаг за шагом рядом с самим экраном. */
.places-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 18px;
}
.place-stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 28px 24px 22px;
  border-radius: 18px;
  background: radial-gradient(120% 90% at 50% 0%, #34383f 0%, #2a2c30 45%, #242528 100%);
  border: 1px solid #3f3f3f;
  overflow: hidden;
}
.place-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.place-hint {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
  max-width: 46ch;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.5;
  color: #9d9d9d;
}
.place-hint kbd {
  font: inherit;
  font-weight: 650;
  color: #ececec;
  background: #3a3a3a;
  border: 1px solid #505050;
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 2px 8px;
}

/* ---------- окно ---------- */
.place-window-wrap { position: relative; width: 100%; display: flex; justify-content: center; }
@supports (width: 1cqi) {
  .place-window-wrap { container-type: inline-size; }
  .appwin { font-size: clamp(9px, 1.42cqi, 12.5px); }
}
.appwin {
  position: relative;
  width: 100%;
  max-width: 860px;
  font-size: clamp(9px, .82vw, 12px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  border-radius: 13px;
  overflow: hidden;
  color: var(--ev-text);
  background: var(--ev-bg);
  border: 1px solid #3c3c3c;
  box-shadow: 0 26px 60px rgba(0, 0, 0, .5);
  animation: ev-win-in .45s ease-out both;
}
@keyframes ev-win-in { from { opacity: 0; transform: scale(.994); } to { opacity: 1; transform: none; } }
/* Полоса заголовка macOS: единая с фоном окна, как в приложении. */
.appwin-bar {
  display: flex;
  align-items: center;
  gap: 1em;
  height: 3.2em;
  padding: 0 1.2em;
  background: var(--ev-bg);
  border-bottom: 1px solid var(--ev-stroke);
  color: var(--ev-text-2);
}
.appwin-lights { display: flex; gap: .55em; flex: none; }
.appwin-lights i { width: .95em; height: .95em; border-radius: 50%; background: #ff5f57; }
.appwin-lights i:nth-child(2) { background: #febc2e; }
.appwin-lights i:nth-child(3) { background: #28c840; }
.appwin-title { display: flex; align-items: center; gap: .6em; font-size: 1.05em; font-weight: 600; color: #f0f0f0; }
.appwin-mark {
  display: grid; place-items: center; width: 1.9em; height: 1.9em; flex: none;
  border-radius: var(--ev-r-chip); background: rgba(10, 132, 255, .14); color: var(--ev-accent);
}
.appwin-spacer { margin-left: auto; font-size: .92em; white-space: nowrap; }

/* Тело окна: содержимое сверху, подвал снизу. Высота зафиксирована,
   поэтому при печати и смене сценария ничего не смещается. */
.appwin-body {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 1em;
  height: 30em;
  padding: 1.3em 1.5em;
}
.appwin-content { position: relative; min-height: 0; overflow: hidden; }
/* Раскладка окна повторяет устройство настоящих приложений: у чата и
   мессенджера слева список, у письма и документа сверху панель. */
.appwin.rail .appwin-content { display: grid; grid-template-columns: 13em minmax(0, 1fr); gap: 1.1em; }
.appwin.plain .appwin-content { display: flex; flex-direction: column; gap: .8em; }
.ev-pane { position: relative; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; flex: 1; }
/* Переписка продолжается выше видимой части. Раньше сверху лежала полоса
   с backdrop-filter: у неё были видны боковые кромки - слева и справа
   сообщение обрывалось ровной вертикалью. Теперь затухает само содержимое
   панели (маска): кромок нет ни с одной стороны, переход идёт на треть
   высоты и выглядит мягче.

   Затухание нужно только там, где выше действительно есть история, -
   в чате с ИИ и мессенджере. У письма и документа сверху стоят поля
   «Кому», «Тема» и заголовок: их гасить нечем и незачем. */
.appwin.rail .ev-pane {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, .35) 11%, #000 32%);
  mask-image: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, .35) 11%, #000 32%);
}
/* Островок живёт под окном отдельной строкой: это своё окно записи,
   а не часть чужого приложения. Высота строки постоянная, поэтому
   переход между пилюлей 30x30 и окном 262x56 ничего не двигает. */
.place-island-row { display: grid; place-items: center; height: 48px; }
.place-island { display: inline-flex; transition: transform .3s cubic-bezier(.32, 1.4, .5, 1); }
.place-island.live { transform: scale(1.03); }

/* ---------- подвал: строка ввода ----------
   У чата и ассистента - карточка с полем и действиями, у мессенджера -
   пилюля со скрепкой и отправкой. Подписей над полем нет: в настоящих
   приложениях их тоже нет. */
.appwin-composer {
  border: 1px solid var(--ev-stroke);
  background: var(--ev-fill-3);
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.appwin-composer.box { border-radius: var(--ev-r-card); padding: .85em 1em .7em; }
.appwin-composer.pill {
  display: flex;
  align-items: center;
  gap: .8em;
  border-radius: 1.4em;
  padding: .55em .7em;
}
/* Поле не подсвечивается синим: о готовности говорить сообщает
   мигающий курсор внутри поля, как в настоящем текстовом поле. */
/* Высота поля задана сценарием, поэтому текст не сдвигает содержимое. */
.appwin-composer-field {
  height: var(--field-h, 5.4em);
  overflow: hidden;
  font-size: 1.05em;
  line-height: 1.5;
  color: var(--ev-text);
}
.appwin-composer.pill .appwin-composer-field { flex: 1; min-width: 0; display: flex; align-items: center; }
.appwin-ph { color: var(--ev-text-3); }
.appwin-composer-foot {
  display: flex;
  align-items: center;
  gap: .7em;
  margin-top: .6em;
  color: var(--ev-text-2);
}
.appwin-chip {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  margin-right: auto;
  padding: .3em .7em;
  border-radius: 99px;
  border: 1px solid var(--ev-stroke);
  background: var(--ev-fill-3);
  font-size: .92em;
  color: var(--ev-text-2);
}
.appwin-round {
  display: grid;
  place-items: center;
  width: 2em;
  height: 2em;
  flex: none;
  border-radius: 50%;
  color: var(--ev-text-2);
}
.appwin-send {
  display: grid;
  place-items: center;
  width: 2em;
  height: 2em;
  flex: none;
  border-radius: 50%;
  background: var(--ev-accent);
  color: #fff;
}
.appwin .ev-ic { width: 1.1em; height: 1.1em; flex: none; }
.appwin .ev-ic-glyph { width: auto; height: auto; font-size: 1em; font-weight: 700; }

/* ---------- содержимое сценариев ---------- */
.ev-thread { position: relative; display: flex; flex-direction: column; gap: .8em; justify-content: flex-end; height: 100%; }
.ev-msg { display: flex; gap: .7em; font-size: 1.02em; line-height: 1.55; }
.ev-msg p { margin: 0; }
.ev-msg.out { justify-content: flex-end; }
.ev-msg.out p {
  max-width: 70%;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: .8em;
  padding: .6em .8em;
}
.ev-msg.in p { max-width: 80%; color: #dedede; }
.ev-avatar {
  display: grid; place-items: center; width: 1.9em; height: 1.9em; flex: none;
  border-radius: 50%; font-size: .95em; color: #fff; background: #4a4a4c;
}
.ev-avatar.accent { background: #0a84ff; }

.ev-thread.chat { gap: .5em; }
.ev-bubble {
  max-width: 62%;
  padding: .55em .75em .4em;
  border-radius: .9em;
  font-size: 1.02em;
  line-height: 1.5;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .07);
}
.ev-bubble.out { align-self: flex-end; background: rgba(10, 132, 255, .18); border-color: rgba(10, 132, 255, .3); }
.ev-bubble time { float: right; font-size: .72em; color: #8e8e93; margin: .5em -.1em -.1em .8em; }

/* Письмо пишется сверху вниз, поэтому содержимое прижато к верху
   и обрезки сверху нет - в отличие от переписки и документа. */
.appwin.app-mail .ev-pane { justify-content: flex-start; }
.appwin.app-mail .ev-pane::before { display: none; }
.ev-letter { display: grid; gap: .55em; align-content: start; height: 100%; }
.ev-field-row {
  display: flex; align-items: center; gap: .9em;
  padding: .7em .9em;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: .7em;
  background: rgba(255, 255, 255, .03);
  font-size: 1.02em;
}
.ev-field-row span { color: #8a8a8a; min-width: 4em; }
.ev-field-row b { font-weight: 550; color: #f0f0f0; }
.ev-letter-body {
  height: var(--field-h, 5.4em);
  overflow: hidden;
  padding: .55em .1em;
  font-size: 1.02em;
  line-height: 1.55;
  color: var(--ev-text);
  border-radius: var(--ev-r-chip);
  transition: box-shadow .3s, background .3s;
}
.ev-letter-ph { color: var(--ev-text-3); }
.ev-letter-note { display: flex; align-items: center; gap: .5em; font-size: .92em; color: #8a8a8a; }

.ev-doc { display: grid; gap: .5em; align-content: end; height: 100%; }
.ev-doc h4 { margin: 0; font-size: 1.5em; letter-spacing: -.02em; }
.ev-doc-meta { display: flex; align-items: center; gap: .5em; font-size: .92em; color: #8a8a8a; }
.ev-doc p { margin: 0; font-size: 1.02em; line-height: 1.55; color: #c9c9c9; }

/* Блоки, которые появляются в документе. */
.ev-block { font-size: 1.02em; line-height: 1.5; margin-bottom: .2em; }
.ev-block.head { font-weight: 650; margin: .5em 0 .2em; color: #fff; }
.ev-block.head:first-child { margin-top: 0; }
.ev-block.bullet { display: grid; grid-template-columns: 1.1em minmax(0, 1fr); }
.ev-block.bullet::before { content: "•"; color: #4ba1ff; }
.ev-block.todo { display: grid; grid-template-columns: 1.6em minmax(0, 1fr); align-items: start; }
/* Галочка ставилась по фиксированным отступам от левого верхнего угла
   и из-за поворота на 45 градусов уезжала из квадрата. Теперь она
   центрируется от середины - и по горизонтали, и по вертикали. */
.ev-check {
  width: 1.02em; height: 1.02em; margin-top: .26em; position: relative; flex: none;
  border: 1.5px solid #6a6a6e; border-radius: .3em;
}
.ev-check.on { background: #0a84ff; border-color: #0a84ff; }
.ev-check.on::after {
  content: "";
  position: absolute;
  left: 50%; top: 48%;
  width: .21em; height: .44em;
  border: solid #fff; border-width: 0 .14em .14em 0;
  transform: translate(-50%, -52%) rotate(45deg);
}
.ev-appear { animation: ev-block-in .4s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes ev-block-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* Цитата письма, на которое отвечаем. */
.ev-quote {
  border-left: 2px solid rgba(255, 255, 255, .14);
  padding: .1em 0 .1em .9em;
  margin-bottom: .3em;
  color: #9a9a9e;
}
.ev-quote-head { font-size: .92em; color: #7f7f83; margin-bottom: .3em; }
.ev-quote p { margin: 0; font-size: .98em; line-height: 1.5; }

.ev-caret {
  display: inline-block;
  width: .09em;
  min-width: 1.5px;
  height: 1.05em;
  margin-left: .06em;
  vertical-align: -.17em;
  background: currentColor;
  animation: ev-caret 1s steps(1) infinite;
}
@keyframes ev-caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ---------- рассказ рядом с окном ----------
   Три шага одной колонкой, с номерами и линией между ними. Каждая
   карточка заполнена с первого кадра: место под текст, подсказку и
   шкалы отведено заранее, поэтому пустых прямоугольников не бывает. */
.place-story {
  position: relative;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  align-content: start;
}
.place-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px 16px;
  background: #2b2b2b;
  border: 1px solid #3f3f3f;
  border-radius: 14px;
  min-width: 0;
}
/* Соединительная линия между шагами - чтобы читалось как последовательность. */
.place-card + .place-card::before {
  content: "";
  position: absolute;
  left: 30px;
  top: -11px;
  width: 1px;
  height: 11px;
  background: #4a4a4a;
}
.place-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 9.5px;
  letter-spacing: .1em;
  font-weight: 750;
  color: #8f8f8f;
}
.place-card-head b { font-size: 9.5px; letter-spacing: .1em; color: #b9b9b9; }
.place-card-head .ev-ic { margin-left: auto; color: #6f6f6f; }
.place-card-no {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  flex: none;
  border-radius: 6px;
  background: #383838;
  color: #c4c4c4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}
.place-card.said .place-card-no { background: #4a2724; color: #ff8078; }
.place-card.said .place-card-head .ev-ic, .place-card.said .place-card-head b { color: #ff7a70; }
.place-said {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #d5d5d5;
  min-height: 6.4em;
}
.place-card.said .ev-caret { background: #ff5f56; }
.place-card-foot {
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px solid #383838;
  font-size: 11px;
  color: #8d8d8d;
}

.place-steps { display: grid; gap: 5px; }
.place-step {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  line-height: 1.35;
  color: #7d7d7d;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid transparent;
  transition: color .3s, background .3s, border-color .3s;
}
.place-step span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #3a3a3a;
  color: #8a8a8a;
  flex: none;
  transition: background .3s, color .3s;
}
.place-step.on { color: #eaeaea; background: #2f3c4b; border-color: #3a5a80; }
.place-step.done { color: #b6b6b6; }
.place-step.done span { background: #1f4a30; color: #34d058; }

/* Подсказка видна с первого кадра - гаснущей, а не отсутствующей:
   карточка не «схлопывается» и не выглядит пустой до конца ролика. */
.place-note {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  font-size: 11.5px;
  line-height: 1.4;
  color: #8e8e8e;
  background: #323232;
  border: 1px solid #414141;
  border-radius: 9px;
  padding: 10px 11px;
  transition: color .4s, background .4s, border-color .4s;
}
.place-note.on { color: #cfe6ff; background: #1e344d; border-color: #2f557f; }
.place-note > span:first-child { color: #6d6d6d; display: grid; place-items: center; flex: none; transition: color .4s; }
.place-note.on > span:first-child { color: #58a9ff; }

.place-race { display: grid; gap: 8px; margin-top: auto; padding-top: 4px; }
.place-race-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  color: #9a9a9a;
}
.place-race-label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.place-race-row b {
  color: #d8d8d8;
  font-weight: 650;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  min-width: 3.4em;
}
.place-race-bar { height: 6px; border-radius: 99px; background: #3a3a3a; overflow: hidden; }
.place-race-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #0a84ff, #45a9ff);
}
.place-race-row.keys .place-race-bar i { background: linear-gradient(90deg, #6a6a6a, #8a8a8a); }

/* ---------- островок на главном экране ---------- */
.hero-app-icon { width: 22px; height: 22px; flex: none; }
.hero-app-state {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: #8f8f8f; transition: color .3s;
}
.hero-app-state.rec { color: #ff6b61; }
.hero-app-state.rec::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ff453a;
  box-shadow: 0 0 8px rgba(255, 69, 58, .8); animation: ev-dot-beat .85s ease-in-out infinite alternate;
}
.hero-app-state.ok { color: #34d058; }
.hero-island { display: inline-flex; transition: transform .3s cubic-bezier(.32, 1.4, .5, 1); }
.hero-island.live { transform: scale(1.02); }
.hero-text.raw { color: #8f8f8f; }
.hero-text { transition: color .3s; min-height: 3.2em; }
/* Островок под окном по центру, подпись - под ним. */
.hero-rec {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 0 0;
  background: none;
  border: 0;
  min-height: 0;
}
.hero-rec-note { font-size: 12.5px; color: #9a9a9a; text-align: center; }

/* Мини-островок в карточке рабочего сценария. */
.workflow-demo .ev-island { margin: 0 auto 10px; }

/* ---------- адаптив ---------- */
@media (max-width: 1120px) {
  .places-stage { grid-template-columns: minmax(0, 1fr); }
  .place-story { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
  .place-card + .place-card::before { display: none; }
  .place-said { min-height: 4.8em; }
}
@media (max-width: 860px) {
  .place-story { grid-template-columns: minmax(0, 1fr); }
  .place-said { min-height: 3.2em; }
  .place-card-foot { margin-top: 0; }
}
@media (max-width: 760px) {
  .place-stage { padding: 16px 12px 16px; border-radius: 14px; }
  .appwin { font-size: 9px; }
  .appwin-body { height: 29em; padding: 1.1em 1.1em; }
  .place-island-row { height: 40px; }
  .place-island-row .ev-island { --island-h: 40px !important; }
  /* На узком окне текст переносится чаще - поле выше, чтобы ничего не резалось. */
  .appwin-composer-field, .ev-letter-body { height: var(--field-h-sm, var(--field-h)); }
  .place-tab { font-size: 12px; padding: 7px 12px 7px 7px; }
  .place-tab-mark { width: 22px; height: 22px; }
  .place-hint, .place-hint kbd { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .ev-island-dot i, .ev-island-dot::before, .ev-island-wave b, .place-tab.on::after { animation: none !important; }
  .ev-island-dot, .ev-island-wave, .ev-island-idle { animation: none !important; }
  .ev-island { transition: none; }
  .appwin, .ev-appear { animation: none !important; }
}

/* ---------- главный экран: строка задачи ----------
   Раньше строка стояла в двух равных колонках: слово прижималось к левому
   краю своей половины, и при коротком слове («заметки») справа зияла дыра,
   а вся строка казалась смещённой. Теперь строка просто центрируется, а
   место под слово плавно сжимается и растягивается по его ширине -
   ширину замеряет script.js и выставляет в --task-w. */
.hero-task {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.hero-task-lead { white-space: nowrap; flex: none; }
.hero-task b {
  display: inline-block;
  position: relative;
  flex: none;
  width: var(--task-w, auto);
  height: 1.5em;
  overflow: hidden;
  white-space: nowrap;
  text-align: left;
  transition: width .5s cubic-bezier(.3, .8, .25, 1);
}
/* Слово меняется с подменой: старое уходит вверх, новое приходит снизу -
   ширина при этом уже едет к новому значению, поэтому рывка не видно. */
.hero-task b > span {
  display: block;
  line-height: 1.5em;
  transition: transform .42s cubic-bezier(.3, .8, .25, 1), opacity .3s;
}
.hero-task b.swap > span { transform: translateY(-105%); opacity: 0; }
/* Двойник для замера ширины: лежит в том же начертании внутри блока
   с overflow: hidden, поэтому не виден и ничего не сдвигает. */
.hero-task-probe {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
  left: 0;
  top: 0;
}
/* На узком телефоне самое длинное слово оставляет по 3 px с каждой стороны -
   запаса нет. Ниже 400 px строка разворачивается в две: подпись сверху,
   слово под ней, обе по центру. Ширину там анимировать нечего. */
@media (max-width: 400px) {
  .hero-task { flex-wrap: wrap; gap: 2px; }
  .hero-task-lead { flex-basis: 100%; text-align: center; }
  .hero-task b { flex-basis: 100%; width: auto; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-task b, .hero-task b > span { transition: none; }
}
/* Под островок отведена постоянная высота, поэтому при сворачивании
   в пилюлю подпись под ним остаётся на месте. */
.hero-island {
  display: grid;
  place-items: center;
  height: 38px;
  min-width: 172px;
}
.hero-rec-note { min-height: 1.4em; }

/* ---------- боковой список (чат с ИИ, мессенджер) ---------- */
.ev-rail {
  display: flex;
  flex-direction: column;
  gap: .25em;
  min-height: 0;
  overflow: hidden;
  padding-right: 1.1em;
  border-right: 1px solid rgba(255, 255, 255, .07);
}
.ev-rail-action {
  display: flex; align-items: center; gap: .5em;
  font-size: .98em; font-weight: 600; color: #4ba1ff;
  background: rgba(10, 132, 255, .12);
  border: 1px solid rgba(10, 132, 255, .28);
  border-radius: .6em; padding: .55em .7em; margin-bottom: .4em;
}
.ev-rail-cap { font-size: .82em; letter-spacing: .06em; font-weight: 700; color: #7d7d81; margin: .5em 0 .1em .2em; }
.ev-rail-item {
  font-size: .95em; color: #b4b4b8; padding: .45em .6em; border-radius: .5em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ev-rail-item.on { background: rgba(255, 255, 255, .08); color: #fff; }
.ev-rail-search {
  display: flex; align-items: center; gap: .5em;
  font-size: .92em; color: #86868a;
  background: rgba(255, 255, 255, .05);
  border-radius: .55em; padding: .45em .6em; margin-bottom: .5em;
}
.ev-rail-chat {
  display: grid; grid-template-columns: 2.1em minmax(0, 1fr); gap: .6em; align-items: center;
  padding: .45em .5em; border-radius: .6em; min-width: 0;
}
.ev-rail-chat.on { background: rgba(255, 255, 255, .08); }
.ev-rail-chat .ev-avatar { width: 2.1em; height: 2.1em; font-size: .9em; }
.ev-rail-chat b { display: block; font-size: .95em; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-rail-chat small { display: block; font-size: .85em; color: #86868a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: .1em; }

/* ---------- панель инструментов (письмо, документ) ---------- */
.ev-toolbar {
  display: flex; align-items: center; gap: .5em; flex: none;
  padding-bottom: .7em;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  color: #9a9a9e;
  font-size: .95em;
}
.ev-tool {
  display: inline-flex; align-items: center; gap: .4em;
  padding: .35em .6em; border-radius: .5em;
  background: rgba(255, 255, 255, .05);
}
.ev-tool.primary { background: rgba(10, 132, 255, .16); color: #6bb4ff; font-weight: 600; }
.ev-tool-sep { width: 1px; height: 1.3em; background: rgba(255, 255, 255, .12); }
.ev-tool-note { margin-left: auto; display: inline-flex; align-items: center; gap: .4em; font-size: .92em; color: #7d7d81; white-space: nowrap; }

@media (max-width: 760px) {
  .appwin.rail .appwin-content { grid-template-columns: minmax(0, 1fr); }
  .ev-rail { display: none; }
}

/* ---------- документ: текст приземляется прямо в страницу ---------- */
.ev-doc-ins { margin-top: .5em; }
.ev-doc-ph, .ev-letter-ph { color: #4ba1ff; }
/* Курсор в пустом поле виден и без подсветки - он и есть приглашение говорить. */
.ev-letter-ph .ev-caret, .ev-doc-ph .ev-caret { background: #4ba1ff; margin-right: .25em; }
/* В композере курсор стоит прямо перед словом плейсхолдера - без
   пробела, будто текст вот-вот продолжится от места ввода. */
.appwin-ph .ev-caret { background: #4ba1ff; margin-right: .05em; }
.appwin-statusbar {
  display: flex;
  align-items: center;
  gap: .6em;
  padding-top: .8em;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: .95em;
  color: #86868a;
}
.appwin-statusbar > span:first-child { display: inline-flex; align-items: center; gap: .5em; }
.appwin-statusbar-right { margin-left: auto; }
