:root {
  --bg: #0b1020;
  --ink: #0f172a;
  --muted: #64748b;
  --primary: #6d5dfc;
  --primary-dark: #4f3fe0;
  --accent: #22c3a6;
  --bubble-in: #ffffff;
  --chat-bg: #efeae2;
  --radius: 18px;
  --phone-w: 390px;
  --phone-h: 820px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Fundo animado ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  animation: drift 22s ease-in-out infinite alternate;
}

.blob-a { top: -18vmax; left: -12vmax; background: #5b4bff; }
.blob-b { bottom: -22vmax; right: -14vmax; background: #109e86; animation-delay: -7s; }
.blob-c { top: 30%; left: 38%; width: 30vmax; height: 30vmax; background: #8b3bd9; opacity: .22; animation-delay: -14s; }

@keyframes drift {
  to { transform: translate(6vmax, 4vmax) scale(1.12); }
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
}

/* ---------- Palco (desktop) ---------- */

.stage {
  position: relative;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  padding: 16px 32px;
}

.stage-info {
  max-width: 420px;
  color: #e2e8f0;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo svg {
  display: block;
  filter: drop-shadow(0 8px 24px rgba(109, 93, 252, .5));
}

.wordmark {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #fff;
}

.wordmark span,
.hl {
  background: linear-gradient(90deg, #a99bff, #34d8b9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stage-info h1 {
  margin: 30px 0 14px;
  font-size: 46px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.03em;
  color: #fff;
}

.lead {
  margin: 0 0 28px;
  color: #94a3b8;
  font-size: 17px;
  line-height: 1.6;
}

.lead strong {
  color: #e2e8f0;
}

.steps {
  position: relative;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 15px;
  width: 2px;
  background: rgba(255, 255, 255, .08);
}

.steps li {
  position: relative;
  counter-increment: step;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 0;
  color: #64748b;
  transition: color .35s;
}

.steps li::before {
  content: counter(step);
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #161b33;
  border: 1.5px solid rgba(255, 255, 255, .12);
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  transition: background .35s, border-color .35s, box-shadow .35s, color .35s;
}

.steps li strong {
  font-weight: 600;
}

.steps li.is-done {
  color: #94a3b8;
}

.steps li.is-done::before {
  content: "✓";
  background: rgba(34, 195, 166, .15);
  border-color: rgba(34, 195, 166, .5);
  color: #34d8b9;
}

.steps li.is-current {
  color: #fff;
}

.steps li.is-current::before {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 0 6px rgba(109, 93, 252, .2), 0 8px 24px rgba(109, 93, 252, .45);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.chip {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  color: #cbd5e1;
  font-size: 13px;
}

.btn-restart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .15);
  color: #e2e8f0;
  font-weight: 600;
  transition: background .2s;
}

.btn-restart:hover {
  background: rgba(255, 255, 255, .08);
}

/* ---------- Painel direito ---------- */

.stage-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 340px;
  height: min(var(--phone-h), calc(100vh - 32px));
}

.card {
  border-radius: 24px;
  background: rgba(15, 20, 42, .6);
  border: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #e2e8f0;
}

.card-kicker {
  color: #34d8b9;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.qr-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
}

.qr-box {
  flex: none;
  width: 116px;
  height: 116px;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
}

.qr-box svg {
  display: block;
  width: 100%;
  height: 100%;
}

.qr-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.qr-text strong {
  font-size: 16px;
  line-height: 1.3;
}

.qr-text small {
  color: #94a3b8;
  font-size: 12px;
  word-break: break-all;
}

.live-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 18px;
}

.live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

.live-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #475569;
}

.live-card.is-live .live-pill {
  background: rgba(239, 68, 68, .15);
  color: #fecaca;
}

.live-card.is-live .live-pill i {
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, .6);
  animation: live-ping 1.4s infinite;
}

@keyframes live-ping {
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.live-mode {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.live-feed {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.live-empty {
  margin: auto 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.live-line {
  animation: bubble-in .3s ease;
}

.live-line b {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #a99bff;
}

.live-line p {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  color: #f1f5f9;
}

.live-line.is-user b {
  color: #34d8b9;
}

.live-line.is-user p {
  color: #cbd5e1;
}

/* ---------- Celular ---------- */

.phone {
  position: relative;
  flex: none;
  width: var(--phone-w);
  height: var(--phone-h);
  padding: 12px;
  border-radius: 56px;
  background: #1b1d24;
  box-shadow:
    0 0 0 2px #3a3d48,
    0 40px 80px rgba(0, 0, 0, .55),
    inset 0 0 0 2px #2a2c34;
}

.phone-notch {
  position: absolute;
  top: 22px;
  left: 50%;
  z-index: 20;
  width: 118px;
  height: 34px;
  border-radius: 20px;
  background: #000;
  transform: translateX(-50%);
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overflow: clip;
  border-radius: 44px;
  background: #000;
}

.status-bar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 6px 30px 0 36px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  pointer-events: none;
  transition: color .3s;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-icons svg {
  fill: currentColor;
}

.phone-screen[data-current="chat"] .status-bar,
.phone-screen[data-current="choice"] .status-bar,
.phone-screen[data-current="text"] .status-bar {
  color: var(--ink);
}

/* ---------- Telas ---------- */

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateX(24px);
  transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s;
}

.screen.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .35s ease, transform .35s ease, visibility 0s;
}

/* Tela 1: bloqueio */

.screen-lock {
  align-items: center;
  padding: 80px 14px 14px;
  color: #fff;
  background:
    radial-gradient(400px 400px at 20% 20%, #7c6cff 0%, transparent 60%),
    radial-gradient(400px 400px at 90% 80%, #1fb89c 0%, transparent 60%),
    linear-gradient(160deg, #241b5e, #0d3b4a);
}

.lock-clock {
  text-align: center;
  margin-bottom: 40px;
}

.lock-date {
  font-size: 17px;
  font-weight: 500;
  opacity: .9;
}

.lock-date::first-letter {
  text-transform: uppercase;
}

.lock-time {
  font-size: 88px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
}

.notification {
  display: flex;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .22);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #fff;
  opacity: 0;
  transform: translateY(-20px) scale(.96);
  transition: transform .2s, background .2s;
}

.screen-lock.is-active .notification {
  animation: notif-in .6s cubic-bezier(.2, .9, .3, 1.2) .6s forwards;
}

.notification:hover {
  background: rgba(255, 255, 255, .3);
}

.notification:active {
  transform: scale(.98);
}

@keyframes notif-in {
  to {
    opacity: 1;
    transform: none;
  }
}

.app-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #34c759;
  color: #fff;
}

.notification-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.notification-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: .8;
}

.notification-app {
  text-transform: uppercase;
  letter-spacing: .04em;
}

.notification-title {
  margin-top: 2px;
  font-weight: 700;
  font-size: 15px;
}

.notification-text {
  font-size: 14px;
  line-height: 1.35;
  opacity: .95;
}

.lock-hint {
  margin-top: auto;
  margin-bottom: 18px;
  font-size: 13px;
  opacity: .75;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: .35;
  }
}

.home-indicator {
  width: 134px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .85);
}

/* Tela 2: conversa */

.screen-chat {
  background: var(--chat-bg);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 56px 14px 10px;
  background: #f7f7f7;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #007aff;
}

.icon-btn:hover {
  background: rgba(0, 0, 0, .05);
}

.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.avatar-lg {
  width: 44px;
  height: 44px;
  font-size: 16px;
}

.chat-contact {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.chat-contact small {
  color: var(--muted);
  font-size: 12px;
}

.chat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 12px;
  overflow-y: auto;
}

.chat-day {
  align-self: center;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .8);
  color: var(--muted);
  font-size: 12px;
}

.bubble {
  position: relative;
  max-width: 82%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.4;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .08);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s, transform .3s;
}

.bubble.is-visible {
  opacity: 1;
  transform: none;
}

.bubble-in {
  align-self: flex-start;
  background: var(--bubble-in);
  border-top-left-radius: 4px;
}

.bubble-link {
  padding: 4px 4px 8px;
  width: 82%;
}

.link-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: #f1f5f9;
  transition: filter .2s;
}

.link-card:hover {
  filter: brightness(.97);
}

.link-card-cover {
  display: grid;
  place-items: center;
  height: 96px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}

.link-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
}

.link-card-info strong {
  font-size: 14px;
}

.link-card-info small {
  color: var(--muted);
  font-size: 12px;
}

.link-card-url {
  color: var(--muted);
  font-size: 11px;
  text-transform: lowercase;
}

.link-text {
  display: block;
  padding: 6px 8px 0;
  color: #027eb5;
  font-size: 14px;
  text-decoration: underline;
  word-break: break-all;
  cursor: pointer;
}

.bubble-time {
  display: block;
  padding-right: 6px;
  text-align: right;
  color: var(--muted);
  font-size: 11px;
}

.typing {
  align-self: flex-start;
  display: none;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border-top-left-radius: 4px;
  background: #fff;
}

.typing.is-visible {
  display: flex;
}

.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  animation: typing 1s infinite ease-in-out;
}

.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 28px;
  background: #f7f7f7;
}

.chat-input-field {
  flex: 1;
  padding: 9px 14px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #94a3b8;
  font-size: 15px;
}

.chat-input-send {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #007aff;
  color: #fff;
}

/* Tela 3: escolha */

.screen-choice {
  background: linear-gradient(180deg, #f5f3ff 0%, #ffffff 45%);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 54px 12px 10px;
  background: #fff;
  border-bottom: 1px solid #eef2f7;
}

.browser-url {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-right: 42px;
  padding: 7px 12px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  font-size: 13px;
}

.choice-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 22px 28px;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
}

.choice-title {
  margin: 28px 0 6px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.choice-subtitle {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 16px;
}

.vehicle-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid #eef2f7;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .05);
}

.vehicle-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #ede9fe;
  color: var(--primary);
}

.vehicle-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vehicle-info strong {
  overflow: hidden;
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.vehicle-info span {
  color: var(--muted);
  font-size: 13px;
}

.status-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-pill.is-inactive {
  background: #fee2e2;
  color: #b91c1c;
}

.choice-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 28px;
}

.choice-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  overflow: hidden;
  transition: transform .15s, box-shadow .2s;
}

.choice-btn:hover {
  transform: translateY(-2px);
}

.choice-btn:active {
  transform: scale(.98);
}

.choice-btn:focus-visible {
  outline: 3px solid rgba(109, 93, 252, .45);
  outline-offset: 3px;
}

.choice-voice {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 12px 28px rgba(109, 93, 252, .35);
}

.choice-text {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
}

.choice-btn-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
}

.choice-voice .choice-btn-icon {
  background: rgba(255, 255, 255, .18);
}

.choice-text .choice-btn-icon {
  background: #ccfbf1;
  color: #0f766e;
}

.choice-btn-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.choice-btn-text strong {
  font-size: 17px;
}

.choice-btn-text small {
  font-size: 13px;
  opacity: .8;
}

.wave {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  height: 24px;
}

.wave i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: rgba(255, 255, 255, .85);
  animation: wave 1.1s ease-in-out infinite;
}

.wave i:nth-child(2) { animation-delay: .15s; }
.wave i:nth-child(3) { animation-delay: .3s; }
.wave i:nth-child(4) { animation-delay: .45s; }

@keyframes wave {
  0%, 100% { transform: scaleY(.3); }
  50% { transform: scaleY(1); }
}

.choice-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: auto 0 0;
  padding-top: 24px;
  color: var(--muted);
  font-size: 12px;
}

.choice-btn:disabled {
  opacity: .6;
  cursor: progress;
}

/* Tela 4: voz */

.screen-voice {
  align-items: center;
  padding: 64px 20px 34px;
  color: #fff;
  background:
    radial-gradient(420px 420px at 50% 32%, rgba(109, 93, 252, .45), transparent 70%),
    linear-gradient(180deg, #14123a 0%, #0b1020 100%);
}

.voice-top {
  display: flex;
  justify-content: center;
  width: 100%;
}

.voice-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  font-size: 13px;
  font-weight: 600;
}

.voice-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fbbf24;
  animation: pulse 1.2s ease-in-out infinite;
}

.voice-badge[data-state="listening"] .voice-dot { background: var(--accent); }
.voice-badge[data-state="speaking"] .voice-dot { background: #a78bfa; }
.voice-badge[data-state="muted"] .voice-dot { background: #f87171; animation: none; }

.voice-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 36px;
}

.orb {
  --level: 0;
  position: relative;
  display: grid;
  place-items: center;
  width: 170px;
  height: 170px;
  margin-bottom: 22px;
}

.orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, .5), rgba(34, 195, 166, .15) 60%, transparent 72%);
  transform: scale(calc(1 + var(--level) * .45));
  transition: transform .08s linear;
}

.orb-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 20px 50px rgba(109, 93, 252, .45);
  transform: scale(calc(1 + var(--level) * .12));
  transition: transform .08s linear;
}

.orb[data-state="connecting"] .orb-core {
  animation: breathe 1.6s ease-in-out infinite;
}

@keyframes breathe {
  50% { transform: scale(.92); opacity: .75; }
}

.voice-name {
  font-size: 22px;
  font-weight: 700;
}

.voice-company {
  color: #a5b4fc;
  font-size: 14px;
}

.voice-timer {
  margin-top: 6px;
  color: #94a3b8;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.captions {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  min-height: 0;
  margin: 18px 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40%);
  mask-image: linear-gradient(to bottom, transparent, #000 40%);
}

.caption {
  font-size: 15px;
  line-height: 1.4;
  color: #e2e8f0;
}

.caption b {
  display: block;
  margin-bottom: 1px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.caption-user {
  color: #99f6e4;
  text-align: right;
}

.voice-controls {
  display: flex;
  justify-content: center;
  gap: 26px;
}

.ctrl {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 12px;
}

.ctrl-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  transition: background .2s, transform .15s;
}

.ctrl:hover .ctrl-icon {
  background: rgba(255, 255, 255, .22);
}

.ctrl:active .ctrl-icon {
  transform: scale(.94);
}

.ctrl-end .ctrl-icon {
  background: #ef4444;
}

.ctrl-end:hover .ctrl-icon {
  background: #dc2626;
}

.ctrl .icon-mic-off,
.ctrl[aria-pressed="true"] .icon-mic {
  display: none;
}

.ctrl[aria-pressed="true"] .icon-mic-off {
  display: block;
}

.ctrl[aria-pressed="true"] .ctrl-icon {
  background: #fff;
  color: var(--ink);
}

/* Tela 5: texto */

.screen-text {
  background: var(--chat-bg);
}

.icon-btn-right {
  margin-left: auto;
}

.bubble-out {
  align-self: flex-end;
  background: #d9fdd3;
  border-top-right-radius: 4px;
}

.screen-text .bubble {
  opacity: 1;
  transform: none;
  animation: bubble-in .25s ease;
  white-space: pre-wrap;
  word-break: break-word;
}

@keyframes bubble-in {
  from { opacity: 0; transform: translateY(8px); }
}

.chat-input-live .chat-input-field {
  color: var(--ink);
  outline: none;
  font: inherit;
  font-size: 15px;
}

.chat-input-live .chat-input-field:focus {
  border-color: #93c5fd;
}

.chat-input-live .chat-input-field:disabled {
  background: #f1f5f9;
}

.chat-input-live .chat-input-send:disabled {
  background: #94a3b8;
  cursor: default;
}

/* Encerramento / erro */

.session-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  background: rgba(2, 6, 23, .55);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility 0s linear .25s;
}

.session-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  transition: opacity .25s, visibility 0s;
}

.overlay-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 26px 20px 20px;
  border-radius: 28px;
  background: #fff;
  text-align: center;
  transform: translateY(30px);
  transition: transform .3s cubic-bezier(.2, .9, .3, 1.1);
}

.session-overlay.is-visible .overlay-card {
  transform: none;
}

.overlay-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
}

.overlay-icon.is-error {
  background: #fee2e2;
  color: #b91c1c;
}

.overlay-card strong {
  font-size: 19px;
}

.overlay-card p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.overlay-btn {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  background: #f1f5f9;
  font-weight: 600;
  text-align: center;
}

.overlay-btn-primary {
  background: var(--primary);
  color: #fff;
}

/* ---------- Responsivo ---------- */

@media (max-width: 1360px) {
  .stage-side {
    display: none;
  }
}

@media (max-width: 960px) {
  .stage-info {
    display: none;
  }
}

/* Celular real: sem moldura, tela cheia */
@media (max-width: 500px) {
  body {
    background: #000;
  }

  .backdrop {
    display: none;
  }

  .stage {
    display: block;
    padding: 0;
    min-height: 0;
    height: 100dvh;
  }

  .phone {
    width: 100%;
    height: 100%;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    background: none;
  }

  .phone-notch,
  .status-bar,
  .home-indicator {
    display: none;
  }

  .phone-screen {
    border-radius: 0;
  }

  .screen-lock {
    padding-top: calc(48px + env(safe-area-inset-top));
  }

  .chat-header {
    padding-top: calc(12px + env(safe-area-inset-top));
  }

  .browser-bar {
    display: none;
  }

  .choice-body {
    padding-top: calc(24px + env(safe-area-inset-top));
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .chat-input {
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  .screen-voice {
    padding-top: calc(20px + env(safe-area-inset-top));
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .session-overlay {
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
}

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