:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --field: #0e201e;
  --ink: #f2f5ec;
  --quiet: #b6c5be;
  --line: #ffffff28;
  --mint: #c4f5d7;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 31% 51%, #193c33 0, #122924 31%, var(--field) 62%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button, summary { -webkit-tap-highlight-color: transparent; font: inherit; }
button:focus-visible, summary:focus-visible { outline: 2px solid #a6edd5; outline-offset: 5px; }
.studio {
  width: min(100%, 1512px);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  padding: 0 clamp(22px, 5.3vw, 96px);
}
.masthead {
  min-height: clamp(68px, 9.3svh, 92px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; gap: 10px; align-items: center; font-size: 22px; font-weight: 700; letter-spacing: -.07em; }
.brand-mark { display: inline-flex; gap: 3px; align-items: center; height: 22px; transform: skew(-8deg); }
.brand-mark i { background: var(--mint); width: 3px; height: 12px; border-radius: 3px; }
.brand-mark i:nth-child(2) { height: 19px; }
.brand-mark i:nth-child(3) { height: 23px; }
.brand-mark i:nth-child(4) { height: 15px; }
.session-type, .presence-status, .permission-hint { font-size: 14px; color: var(--quiet); }
.session-type { letter-spacing: .015em; }
.room {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 72px);
  padding: clamp(26px, 5.4svh, 80px) 0;
}
.presence { min-width: 0; display: grid; justify-items: center; align-content: center; }
.orb-frame { width: min(100%, 60svh, 580px); aspect-ratio: 1; display: grid; place-items: center; }
#orb { display: block; width: min(100%, 310px); aspect-ratio: 1; height: auto; }
.motion-toggle { appearance: none; border: 0; background: transparent; color: #a3bab0; font: inherit; font-size: 12px; min-height: 36px; padding: 7px 10px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #adc7b350; }
.motion-toggle:hover { color: var(--ink); }
.presence-status {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 1.6em; font-size: 13px; font-weight: 550; color: #d0ded4;
}
.signal { display: inline-block; width: 7px; height: 7px; flex: none; border-radius: 50%; background: #99d6b4; box-shadow: 0 0 0 4px #9de1c214; }
[data-room-phase="listening"] .signal { background: #b2ffc8; box-shadow: 0 0 0 4px #a0ffbf22; }
[data-room-phase="thinking"] .signal { background: #ffe0ad; }
[data-room-phase="error"] .signal { background: #ffb29c; }
.timer:not(:empty) { color: var(--quiet); padding-left: 8px; border-left: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.interview { max-width: 515px; min-width: 0; padding-bottom: 6px; }
.context { display: flex; align-items: center; gap: 12px; margin: 0 0 clamp(12px, 2.4vh, 22px); color: #bfddcb; font-size: 14px; font-weight: 550; letter-spacing: .01em; }
.context::before { content: ""; display: inline-block; width: 30px; height: 1px; background: #9ac6ae; }
h1 {
  margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: normal;
  font-size: clamp(84px, 9vw, 142px); letter-spacing: -.064em; line-height: .96;
}
.caption { margin: clamp(20px, 3.5vh, 38px) 0 0; font-size: clamp(18px, 1.48vw, 23px); line-height: 1.47; letter-spacing: -.025em; color: #e0e8df; overflow-wrap: anywhere; }
.controls { margin-top: clamp(24px, 4.6vh, 48px); display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.action { min-height: 50px; border-radius: 30px; cursor: pointer; padding: 12px 24px; font-size: 15px; font-weight: 650; transition: background-color .18s, transform .18s; }
.action-primary { background: var(--mint); color: #10291f; border: 1px solid transparent; }
.action-primary:hover { background: #dcffe7; }
.action-quiet { color: #e1e8e0; border: 1px solid #7d928a; background: transparent; }
.action-quiet:hover { background: #ffffff11; }
.action:active { transform: translateY(1px); }
.action:disabled { opacity: .62; cursor: wait; }
#start { display: inline-flex; align-items: center; gap: 10px; }
#start::before { content: ""; width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid currentColor; }
.permission-hint { margin: 12px 0 0; font-size: 13px; line-height: 1.45; color: #b5c8bc; }
body:not([data-room-phase="idle"]) .permission-hint { display: none; }
.error { font-size: 15px; line-height: 1.55; color: #ffd7c8; margin: 14px 0 0; }
.error:empty { display: none; }
.error a { color: inherit; text-underline-offset: 3px; }
.history { border-top: 1px solid var(--line); }
.history summary {
  width: min(100%, max-content); display: flex; align-items: center; gap: 11px;
  cursor: pointer; list-style: none; min-height: 66px; color: #d3dfd5; font-size: 14px;
}
.history summary::-webkit-details-marker { display: none; }
.transcript-icon { width: 14px; height: 12px; border-block: 1.5px solid #b6c8bd; position: relative; }
.transcript-icon::before { content: ""; position: absolute; top: 4px; width: 9px; border-top: 1.5px solid #b6c8bd; }
.chevron { width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.2px 1.2px 0; transform: translateY(-2px) rotate(45deg); margin-left: 4px; }
details[open] .chevron { transform: translateY(2px) rotate(225deg); }
.lines { max-width: 850px; display: grid; gap: 12px; font-size: 16px; line-height: 1.55; padding: 0 0 24px; color: #d2dfd4; overflow-wrap: anywhere; }
.lines:empty::before { content: "Здесь появятся вопросы Алёны и ваши ответы."; color: var(--quiet); }
.lines > * { margin: 0; }
.lines strong, .lines b { color: var(--ink); }
@media (max-width: 720px) {
  body { background: radial-gradient(ellipse at 50% 28%, #1a3a30, #132a24 30%, var(--field) 70%); }
  .studio { padding: 0 clamp(18px, 5.5vw, 38px); }
  .masthead { min-height: 58px; }
  .brand { font-size: 20px; }
  .room { grid-template-columns: 1fr; align-content: center; gap: clamp(16px, 3vh, 28px); padding: 18px 0 25px; }
  .orb-frame { width: min(80vw, 34.5svh, 310px); }
  .interview { max-width: 520px; width: 100%; justify-self: center; }
  .context { margin-bottom: 8px; font-size: 13px; gap: 9px; }
  .context::before { width: 22px; }
  h1 { font-size: clamp(60px, 11vw, 78px); }
  .caption { font-size: clamp(17px, 3.5vw, 19px); margin-top: 14px; line-height: 1.42; }
  .controls { margin-top: 19px; }
  .action { min-height: 46px; }
  .history summary { min-height: 54px; }
}
@media (max-height: 650px) and (min-width: 721px) {
  .room { padding: 20px 0; }
  .orb-frame { width: min(100%, 55svh, 450px); }
}
@media (prefers-reduced-motion: reduce) {
  .signal { opacity: var(--signal-energy, 1); }
  *, *::before, *::after { transition-duration: 0s !important; }
}

.heard-panel { margin-top: 18px; padding-left: 14px; border-left: 2px solid #76c8ad; }
body:not([data-phase="listening"]) .silence-hint { display: none; }
.heard-label, .mic-tools label { color: #afcbbf; font-size: 13px; }
#heard-text { margin: 4px 0 0; max-height: 5.6em; overflow-y: auto; line-height: 1.4; color: #f2f7ef; overflow-wrap: anywhere; }
.mic-tools { margin-top: 16px; display: flex; gap: 6px 9px; align-items: center; flex-wrap: wrap; max-width: 100%; }
.mic-tools select { color: #d9ebe1; background: #172d27; border: 1px solid #55726a; border-radius: 6px; font: inherit; font-size: 13px; max-width: min(100%, 18em); padding: 4px; }
.mic-tools meter { width: 52px; height: 9px; accent-color: #81d7ad; }
#mic-state { font-size: 12px; color: #c0d6c9; }

.brand { color: inherit; text-decoration: none; }
.brand:focus-visible { outline: 2px solid #9dd5bc; outline-offset: 6px; }
