:root {
  --black: #050303;
  --panel: #14100e;
  --panel-2: #211815;
  --line: #6b3a25;
  --amber: #f6b35b;
  --amber-dim: #a66a33;
  --red: #ff251e;
  --red-deep: #5e0202;
  --cream: #ffe2ad;
  --green: #9cffc5;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--cream);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  background:
    radial-gradient(circle at 50% 28%, rgba(110, 7, 5, .34), transparent 28rem),
    linear-gradient(115deg, rgba(255,255,255,.035) 0 1px, transparent 1px 11px),
    #050303;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 4px),
    radial-gradient(circle at center, transparent 45%, rgba(0,0,0,.64));
  mix-blend-mode: screen;
  opacity: .32;
  z-index: 10;
}

.shell {
  width: min(1180px, calc(100vw - 28px));
  margin: 18px auto;
  min-height: calc(100vh - 36px);
  border: 1px solid rgba(246,179,91,.28);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(32,22,18,.92), rgba(5,3,3,.96));
  box-shadow: 0 35px 100px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.08);
  padding: 16px;
}

.status-strip {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(246,179,91,.22);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(0,0,0,.34);
  color: var(--amber);
  letter-spacing: .08em;
  font-size: clamp(.68rem, 1vw, .84rem);
}
.sig {
  font-family: 'Michroma', sans-serif;
  color: #fff0ce;
  text-shadow: 0 0 16px rgba(255,60,42,.54);
}
strong { color: var(--green); font-weight: 600; }

.console-grid {
  display: grid;
  grid-template-columns: minmax(300px, 430px) 1fr;
  gap: 16px;
  margin-top: 16px;
  min-height: calc(100vh - 132px);
}

.lens-bay, .transcript-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(246,179,91,.18);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), transparent 26%),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(246,179,91,.035) 18px 19px),
    var(--panel);
}
.lens-bay {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  place-items: center;
  padding: 24px;
}
.warning-label {
  justify-self: stretch;
  padding: 10px 12px;
  border: 1px solid rgba(255,65,42,.32);
  color: #ff8d70;
  background: rgba(84,5,3,.22);
  border-radius: 12px;
  letter-spacing: .18em;
  font-size: .72rem;
  text-align: center;
}
.lens {
  width: min(70vw, 310px);
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 48% 45%, #fff7c7 0 2%, #ffae70 3% 7%, #ff2d23 12%, #940706 31%, #240000 55%, #050000 71%),
    #120101;
  box-shadow:
    0 0 18px #ff291d,
    0 0 70px rgba(255,37,30,.68),
    0 0 140px rgba(255,37,30,.34),
    inset 0 0 42px #000;
  animation: breathe 4.4s ease-in-out infinite;
}
.lens::before, .lens::after, .iris, .glint { content: ''; position: absolute; border-radius: 50%; }
.lens::before { inset: -16px; border: 8px solid #0d0a09; box-shadow: inset 0 0 0 2px #5d3526, 0 16px 42px rgba(0,0,0,.8); }
.lens::after { inset: 18%; border: 1px solid rgba(255,225,180,.36); filter: blur(.2px); }
.iris-a { inset: 28%; border: 2px solid rgba(255,78,49,.44); }
.iris-b { inset: 39%; border: 1px solid rgba(255,245,198,.38); }
.iris-c { inset: 46%; background: radial-gradient(circle, #fff4c6, #ff2a1d 28%, #130000 68%); box-shadow: 0 0 24px #ff2a1d; }
.glint { width: 22%; height: 9%; left: 34%; top: 27%; background: rgba(255,255,230,.82); filter: blur(8px); transform: rotate(-28deg); }
.lens.listening { animation-duration: 1.1s; }
.lens.thinking { animation-duration: .72s; filter: saturate(1.25); }

@keyframes breathe { 0%,100% { transform: scale(.985); } 50% { transform: scale(1.015); } }

.meter-stack { display: flex; align-items: end; gap: 8px; height: 58px; margin: 12px 0; }
.meter-stack span { width: 12px; height: var(--h); background: linear-gradient(#fff1bf, #ff382d 45%, #3b0302); border-radius: 999px; box-shadow: 0 0 12px rgba(255,50,35,.5); animation: meter 1.8s infinite ease-in-out alternate; }
.meter-stack span:nth-child(2n) { animation-delay: .25s; }
@keyframes meter { to { height: calc(var(--h) * .55); opacity: .74; } }
.quote { color: #ffd69b; line-height: 1.6; text-align: center; max-width: 34ch; }

.transcript-panel { display: grid; grid-template-rows: auto 1fr auto; }
.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(246,179,91,.18);
  color: var(--amber);
  letter-spacing: .14em;
  font-size: .78rem;
}
.tiny { color: var(--amber-dim); letter-spacing: .06em; }
.transcript {
  padding: 22px;
  overflow-y: auto;
  max-height: calc(100vh - 270px);
  scroll-behavior: smooth;
}
.bubble {
  width: fit-content;
  max-width: min(680px, 92%);
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.55;
  animation: arrive .28s ease-out both;
}
.bubble .speaker { display: block; margin-bottom: 6px; font-size: .68rem; letter-spacing: .18em; opacity: .72; }
.bubble p { margin: 0; white-space: pre-wrap; }
.bubble.hall { background: rgba(255,64,43,.1); border: 1px solid rgba(255,78,49,.26); color: #ffe0b2; box-shadow: 0 0 34px rgba(255,30,20,.08); }
.bubble.user { margin-left: auto; background: rgba(246,179,91,.12); border: 1px solid rgba(246,179,91,.26); color: #fff3d6; }
@keyframes arrive { from { opacity: 0; transform: translateY(8px); } }

.composer {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid rgba(246,179,91,.18);
  background: rgba(0,0,0,.28);
}
textarea {
  resize: none;
  min-height: 54px;
  max-height: 150px;
  border: 1px solid rgba(246,179,91,.28);
  border-radius: 16px;
  padding: 14px 16px;
  color: #fff0cf;
  background: rgba(0,0,0,.4);
  font: inherit;
  outline: none;
}
textarea:focus { border-color: rgba(255,73,48,.72); box-shadow: 0 0 0 3px rgba(255,73,48,.12); }
button {
  border: 0;
  font-family: 'Michroma', sans-serif;
  color: #190605;
  background: linear-gradient(180deg, #ffe0a5, #f68b43 52%, #c1442c);
  box-shadow: 0 10px 26px rgba(0,0,0,.38), inset 0 1px rgba(255,255,255,.55);
  cursor: pointer;
}
button:disabled { opacity: .58; cursor: wait; }
.voice { border-radius: 50%; font-size: 1.3rem; color: #fff4ce; background: radial-gradient(circle, #ff2d23, #580302 70%); text-shadow: 0 0 12px #fff; }
.voice.active { animation: breathe .7s infinite; }
.send { border-radius: 16px; padding: 0 18px; letter-spacing: .08em; font-size: .72rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

@media (max-width: 820px) {
  .status-strip { grid-template-columns: 1fr 1fr; }
  .console-grid { grid-template-columns: 1fr; }
  .lens-bay { min-height: 430px; }
  .composer { grid-template-columns: 48px 1fr; }
  .send { grid-column: 1 / -1; min-height: 46px; }
  .transcript { max-height: 52vh; }
}
