@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(assets/montserrat-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 113%;
  ascent-override: 85%;
  descent-override: 22%;
  line-gap-override: 0%;
}

:root {
  --cyan: #02B1DF;
  --cyan-hot: #01ACEB;
  --sky: #00A3D7;
  --mid: #0086CA;
  --deep: #0267B1;
  --navy: #00548F;
  --ray: #006B9C;
  --bg: #007FC4;
  --bg-deep: #012A4F;
  --ink: #FFFFFF;
  --muted: #FFFFFF;
  --line: rgba(255, 255, 255, 0.22);
  --white: #FFFFFF;
  --red: #E23B3B;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: "Montserrat", ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--bg-deep);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button, input { font-family: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

#app {
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  background:
    radial-gradient(circle at 72% 8%, rgba(2, 177, 223, 0.28), transparent 38%),
    linear-gradient(180deg, #011E3A 0%, #003A6C 48%, #00548F 100%);
}
.screen {
  width: 100%;
  max-width: 430px;
  min-height: 100%;
  min-height: 100dvh;
  padding: calc(28px + var(--safe-top)) 28px calc(28px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  position: relative;
  background:
    radial-gradient(circle at 80% 0%, rgba(1, 172, 235, 0.22), transparent 36%),
    linear-gradient(180deg, #012A4F 0%, #00548F 46%, #0077BE 100%);
  overflow: hidden;
  color: var(--ink);
}

.screen-start {
  padding: 0 0 calc(28px + var(--safe-bottom));
  justify-content: flex-start;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.hero-brand {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: min(32vh, 260px);
  padding: calc(22px + var(--safe-top)) 28px 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}
.logo-lockup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.logo-lockup-inline {
  flex-direction: column;
  align-items: flex-start;
  margin-right: 8px;
}
.logo-start {
  height: 42px;
  width: auto;
  display: block;
  filter: drop-shadow(0 6px 16px rgba(0, 30, 60, 0.35));
}
.logo-seguros {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
}
.selo-190 {
  width: 92px;
  height: 92px;
  border-radius: 20px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 12px 28px rgba(0, 16, 40, 0.32);
}
.start-copy { position: relative; z-index: 1; padding: 8px 28px 0; }
.brand-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: #FFFFFF;
}

h1, h1.display {
  font-family: "Montserrat", ui-sans-serif, sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 10vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 16px;
}
.display {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.display-light {
  font-weight: 300;
  font-size: 0.58em;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.display-bold {
  font-weight: 800;
  letter-spacing: -0.045em;
}
.lead {
  font-size: 16px;
  line-height: 1.5;
  color: #FFFFFF;
  margin: 0 0 28px;
  max-width: 24em;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0, 30, 70, 0.35);
}
.lead strong { font-weight: 700; }
.fine {
  font-size: 13px;
  line-height: 1.45;
  color: #FFFFFF;
  margin: 16px 0 0;
  background: rgba(0, 36, 82, 0.42);
  padding: 10px 12px;
  border-radius: 12px;
}

.btn-primary, .btn-secondary {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 16px 28px;
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary {
  background: #fff;
  color: var(--deep);
  box-shadow: 0 10px 24px rgba(0, 40, 80, 0.18);
}
.btn-secondary {
  background: var(--cyan-hot);
  color: #003A5C;
}
.btn-primary:active, .btn-secondary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.4; }
.btn-text {
  background: none;
  border: 0;
  color: #FFFFFF;
  font-size: 14px;
  min-height: 44px;
  min-width: 44px;
  padding: 12px 16px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.screen-talk {
  align-items: center;
  text-align: center;
  padding: calc(20px + var(--safe-top)) 20px 0;
  padding-bottom: calc(186px + var(--safe-bottom));
  overflow: hidden;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
}
.screen-talk > * { flex-shrink: 0; }

.talk-kicker {
  position: relative;
  z-index: 1;
  margin: 4px 116px 14px 0;
  min-height: 44px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FFFFFF;
  font-weight: 700;
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 10px;
}
.logo-kicker { height: 18px; width: auto; }
.logo-lockup-inline .logo-seguros { font-size: 6px; letter-spacing: 0.24em; }

.btn-score-mute,
button.btn-score-mute:disabled {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  z-index: 21;
  top: calc(16px + var(--safe-top));
  right: 72px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(0, 34, 68, 0.18);
  backdrop-filter: blur(8px);
}
.btn-score-mute .mute-off { display: none; font-size: 15px; font-weight: 700; }
.btn-score-mute.is-muted .mute-on { display: none; }
.btn-score-mute.is-muted .mute-off { display: block; }
.btn-score-mute.is-muted { background: rgba(255, 255, 255, 0.1); opacity: 0.85; }
.screen-talk.el-live .story-tap-hint,
.screen-talk.el-live .story-tap { display: none !important; }

.btn-end,
button.btn-end:disabled {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  z-index: 20;
  top: calc(16px + var(--safe-top));
  right: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-size: 28px;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(226, 59, 59, 0.28);
  opacity: 1;
}
button.btn-end:disabled {
  pointer-events: none;
  cursor: default;
  filter: none;
}

.orb {
  width: 210px;
  height: 210px;
  margin: 20px 0 16px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.orb-rays, .orb-halo, .orb-ring, .orb-core {
  position: absolute;
  border-radius: 50%;
}
.orb-rays {
  inset: -8px;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 255, 255, 0) 0deg 5.2deg,
    rgba(0, 72, 122, 0.55) 5.4deg 7.1deg,
    rgba(255, 255, 255, 0) 7.3deg 7.8deg
  );
  -webkit-mask: radial-gradient(circle, transparent 30%, #000 34%, #000 68%, transparent 72%);
  mask: radial-gradient(circle, transparent 30%, #000 34%, #000 68%, transparent 72%);
  animation: spin-rays 28s linear infinite;
}
.orb-halo {
  inset: 0;
  background: radial-gradient(circle, rgba(1, 172, 235, 0.45), transparent 68%);
  transform: scale(0.88);
}
.orb-ring {
  inset: 32px;
  border: 2px solid transparent;
}
.orb-core {
  inset: 58px;
  background: radial-gradient(circle at 38% 32%, #fff 0%, #7FD4F3 34%, var(--cyan) 68%, var(--deep) 100%);
  box-shadow: 0 12px 36px rgba(2, 103, 177, 0.45);
}
.orb.idle .orb-core { animation: breathe 3.2s ease-in-out infinite; }
.orb.speaking .orb-halo { animation: glow 1.1s ease-in-out infinite; }
.orb.speaking .orb-core { animation: pulse 1.1s ease-in-out infinite; }
.orb.speaking .orb-rays { animation-duration: 8s; }
.orb.listening .orb-ring {
  border-color: #fff;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.12);
  animation: listen 1.3s ease-in-out infinite;
}
.orb.listening .orb-core {
  background: radial-gradient(circle at 38% 32%, #fff 0%, var(--cyan-hot) 55%, var(--deep) 140%);
}
.orb.listening .orb-rays { animation-duration: 5s; }
.orb.thinking .orb-core { animation: pulse 0.7s ease-in-out infinite; }

@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes glow { 0%,100% { transform: scale(0.9); opacity: 0.7; } 50% { transform: scale(1.12); opacity: 1; } }
@keyframes listen { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes spin-rays { to { transform: rotate(360deg); } }

.status {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 10px;
  flex-shrink: 0;
}
.status:empty { display: none; margin: 0; }

.caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.subtitle {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 auto 12px;
  max-width: 22em;
  width: 100%;
  max-height: 9.2em;
  overflow: hidden;
  padding: 10px 14px;
  text-shadow: 0 2px 12px rgba(0, 20, 50, 0.45);
  transition: opacity 0.28s ease;
  background: rgba(0, 24, 56, 0.38);
  border-radius: 16px;
  flex-shrink: 0;
}
.subtitle:empty { display: none; margin: 0; padding: 0; }

.subtitle.is-swap { opacity: 0; }
.name-confirm {
  width: 100%;
  margin-top: 8px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(0, 36, 82, 0.38);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}
.name-confirm p { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.name-confirm strong { font-weight: 800; }

.panel { width: 100%; margin-top: 12px; flex-shrink: 0; }
.panel .btn-primary { width: 100%; }
#clip {
  width: 100%;
  max-height: 42vh;
  border-radius: 18px;
  background: #003A5C;
  margin: 0 0 14px;
  display: block;
}
.row-actions { display: flex; gap: 10px; }
.row-actions .btn-primary, .row-actions .btn-secondary { flex: 1; padding: 14px 12px; }

.dock {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  bottom: 0;
  padding: 12px 16px calc(20px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 30;
  pointer-events: none;
}
.dock > * { pointer-events: auto; }
.btn-mic {
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--deep);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px rgba(0, 40, 80, 0.28);
  transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
}
.btn-mic:disabled { opacity: 0.38; filter: grayscale(0.2); }
.btn-mic.speaking-lock { opacity: 0.45; }
.btn-mic.hot {
  background: var(--cyan-hot);
  color: #003A5C;
  transform: scale(1.04);
}
.type-form {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 390px;
  bottom: calc(154px + var(--safe-bottom));
  z-index: 31;
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px;
  backdrop-filter: blur(10px);
}
.type-form input {
  flex: 1;
  border: 0;
  outline: none;
  font-size: 16px;
  padding: 8px 10px;
  background: transparent;
  color: #fff;
}
.type-form input::placeholder { color: rgba(255, 255, 255, 0.65); }
.type-form .btn-secondary { padding: 12px 16px; min-height: 44px; }

@media (min-width: 860px) {
  #app {
    background:
      radial-gradient(circle at 50% 0%, rgba(1, 172, 235, 0.28), transparent 48%),
      linear-gradient(180deg, #006B9C, #004A7A);
  }
  .screen {
    margin: 24px 0;
    min-height: calc(100dvh - 48px);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(0, 20, 50, 0.35);
    overflow: hidden;
  }
  .screen-talk { height: calc(100dvh - 48px); max-height: calc(100dvh - 48px); min-height: calc(100dvh - 48px); }
}

#render-canvas {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: #013868;
}
#render-canvas.previewing {
  position: relative;
  left: auto;
  top: auto;
  right: auto;
  bottom: auto;
  visibility: visible;
  opacity: 1;
  display: block;
  width: min(200px, 48vw);
  height: auto;
  aspect-ratio: 9 / 16;
  max-height: min(42vh, 360px);
  margin: 28px auto 0;
  border-radius: 18px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px rgba(0, 16, 40, 0.45);
  z-index: 2;
  background: #013868;
  flex-shrink: 0;
}
.screen-talk:not(.is-rendering) #render-canvas {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  visibility: hidden;
}

@media (max-height: 520px), (orientation: landscape) and (max-height: 520px) {
  .hero-brand { min-height: 88px; padding: calc(12px + var(--safe-top)) 24px 4px; }
  .selo-190 { width: 64px; height: 64px; }
  .start-copy { padding: 4px 24px 0; }
  h1, h1.display { font-size: clamp(28px, 8vw, 40px); margin-bottom: 10px; }
  .lead { margin-bottom: 14px; font-size: 14px; }
  .btn-primary { padding: 14px 24px; }
  .orb { width: 140px; height: 140px; margin: 12px 0 10px; }
  .caption { min-height: 2.2em; }
}

button:focus-visible, input:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}
.btn-credits { display: inline-block; margin-top: 4px; }
.mic-hint.hidden { display: none; }
.mic-hint {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.86);
  min-height: 18px;
  padding: 0 12px;
  text-align: center;
}
.progress {
  width: min(280px, 80%);
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
  overflow: hidden;
  margin: 12px auto 16px;
  flex-shrink: 0;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: #fff;
  border-radius: 999px;
  transition: width 0.25s ease;
}
.offline-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: #8A1F1F;
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
}
.credits-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 24, 56, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.credits-modal.hidden { display: none !important; }
.credits-sheet {
  width: 100%;
  max-width: 430px;
  max-height: min(86dvh, 720px);
  overflow: auto;
  background: linear-gradient(180deg, #0086CA, #00548F);
  color: #fff;
  border-radius: 24px 24px 0 0;
  padding: 22px 22px calc(28px + var(--safe-bottom));
  box-shadow: 0 -12px 40px rgba(0,20,50,0.35);
}
.credits-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.credits-head h2 { margin: 0; font-size: 20px; }
.credits-lead { font-size: 14px; line-height: 1.45; margin: 12px 0 16px; }
.credits-list { font-size: 13px; line-height: 1.4; }
.credit-item { padding: 10px 0; border-top: 1px solid rgba(255,255,255,0.16); }
.credit-item strong { display: block; margin-bottom: 4px; }
.credit-item a { color: #B8EAF8; }
@media (min-width: 860px) {
  .credits-modal { align-items: center; }
  .credits-sheet { border-radius: 24px; max-height: 80dvh; }
}
@media (prefers-reduced-motion: reduce) {
  .orb-rays, .orb-core, .orb-halo, .orb-ring { animation: none !important; }
  .progress-bar { transition: none; }
}

.screen-talk.story-on { padding-bottom: 0; }
.screen-talk.story-on > .mag-sky,
.screen-talk.story-on > .talk-kicker,
.screen-talk.story-on > .orb,
.screen-talk.story-on > .status,
.screen-talk.story-on > .progress,
.screen-talk.story-on > #render-canvas,
.screen-talk.story-on > .subtitle,
.screen-talk.story-on > .name-confirm,
.screen-talk.story-on > .consent-panel,
.screen-talk.story-on > .panel,
.screen-talk.story-on > .dock,
.screen-talk.story-on > .type-form { display: none !important; }
.screen-talk.story-on.story-subs > .subtitle {
  display: block !important;
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: calc(36px + var(--safe-bottom));
  z-index: 20;
  margin: 0 auto;
}

.story-stage {
  position: absolute;
  inset: 0;
  z-index: 14;
  overflow: hidden;
  background: #003A6C;
  border-radius: inherit;
}
.story-stage[hidden] { display: none !important; }
.story-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(1,172,235,0.45), transparent 42%),
    linear-gradient(180deg, #015f9a 0%, #007FC4 48%, #013868 100%);
}
.story-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  will-change: transform, opacity;
}
.story-photo.is-on {
  opacity: 1;
  animation: kenburns 14s ease-out both;
}
.story-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,24,56,0.18) 0%, rgba(0,24,56,0.08) 38%, rgba(0,16,40,0.72) 100%);
  pointer-events: none;
}
.story-rewind {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  z-index: 2;
}
.story-rewind.hidden, .story-copy.hidden { display: none; }
.story-eyebrow, .story-scene-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: #B8EAF8;
}
.story-year-flip {
  margin: 0;
  font-size: clamp(72px, 22vw, 120px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: 0 10px 40px rgba(0, 20, 50, 0.35);
}
.story-rewind-cap {
  margin: 14px 0 0;
  font-size: 16px;
  font-weight: 600;
}
.story-copy {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(72px + var(--safe-bottom));
  padding: 0 24px;
  z-index: 3;
  text-align: left;
}
.story-copy h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 7vw, 36px);
  line-height: 1.12;
  font-weight: 800;
}
.story-copy #story-line {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
  max-width: 22em;
}
.story-credit {
  margin: 12px 0 0;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.82;
}
.story-dots {
  position: absolute;
  top: calc(58px + var(--safe-top));
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 7px;
  z-index: 4;
}
.story-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
}
.story-dot.is-on { background: #fff; transform: scale(1.2); }
.story-tap-hint {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(22px + var(--safe-bottom));
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.86);
  z-index: 4;
}
.story-tap {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
@keyframes kenburns {
  from { transform: scale(1.05) translate3d(0, 8px, 0); }
  to { transform: scale(1.14) translate3d(0, -18px, 0); }
}
@keyframes yearpop {
  from { opacity: 0.35; transform: scale(0.86); }
  to { opacity: 1; transform: scale(1); }
}
.story-year-flip.is-tick { animation: yearpop 0.22s ease; }

@media (prefers-reduced-motion: reduce) {
  .story-photo.is-on { animation: none; transform: none; }
  .story-year-flip.is-tick { animation: none; }
}
@media (min-width: 860px) {
  .story-copy { padding: 0 36px; }
}

.consent-panel { display: flex; flex-direction: column; gap: 10px; }
.consent-panel.hidden { display: none; }
.consent-panel .btn-primary, .consent-panel .btn-secondary { width: 100%; }
.story-brand {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  width: min(180px, 42%);
  height: auto;
  z-index: 3;
  filter: drop-shadow(0 8px 24px rgba(0,16,40,0.35));
  pointer-events: none;
}
.story-brand.hidden { display: none; }
.screen-talk.is-typing .dock { display: none !important; }
.screen-talk.has-panel .orb,
.screen-talk:has(#name-confirm:not(.hidden)) .orb,
.screen-talk:has(#consent-panel:not(.hidden)) .orb,
.screen-talk:has(#photo-panel:not(.hidden)) .orb,
.screen-talk:has(#video-panel:not(.hidden)) .orb { display: none; }
.screen-talk.is-typing .type-form {
  bottom: calc(20px + var(--safe-bottom) + var(--kb-offset, 0px));
}
.screen-talk:has(#type-form:not(.hidden)) .subtitle {
  visibility: hidden;
}
@media (max-height: 520px) {
  .consent-panel {
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
  }
  .consent-panel .btn-primary,
  .consent-panel .btn-secondary {
    flex: 1;
    width: auto;
  }
}

@media (max-height: 520px), (orientation: landscape) and (max-height: 520px) {
  .story-copy { bottom: calc(56px + var(--safe-bottom)); }
  .story-copy h2 { font-size: 22px; }
  .name-confirm { padding: 12px; }
}

.mag-sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.mag-globe {
  position: absolute;
  width: 150%;
  aspect-ratio: 1;
  left: 18%;
  top: -28%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 40%, rgba(184,234,248,0.2), transparent 46%),
    repeating-radial-gradient(circle at 50% 50%, rgba(184,234,248,0.5) 0 1.15px, transparent 1.4px 16px),
    repeating-conic-gradient(from 0deg, rgba(2,177,223,0.08) 0 8deg, transparent 8deg 16deg);
  -webkit-mask-image: radial-gradient(circle, #000 54%, transparent 71%);
  mask-image: radial-gradient(circle, #000 54%, transparent 71%);
  animation: globe-spin 80s linear infinite;
  opacity: 0.55;
}
.mag-globe.globe-talk {
  width: 120%;
  left: 28%;
  top: -18%;
  opacity: 0.32;
}
.mag-tri {
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  filter: drop-shadow(0 0 10px rgba(2, 177, 223, 0.35));
  animation: tri-float 11s ease-in-out infinite;
}
.mag-tri.t1 { top: 18%; left: 8%; border-width: 0 9px 16px 9px; border-color: transparent transparent rgba(2,177,223,0.55) transparent; }
.mag-tri.t2 { top: 28%; right: 12%; border-width: 0 13px 22px 13px; border-color: transparent transparent rgba(184,234,248,0.45) transparent; animation-delay: -3s; }
.mag-tri.t3 { top: 48%; left: 16%; border-width: 0 7px 12px 7px; border-color: transparent transparent rgba(2,177,223,0.4) transparent; animation-delay: -6s; }
.mag-tri.t4 { top: 12%; right: 28%; border-width: 0 8px 14px 8px; border-color: transparent transparent rgba(1,172,235,0.5) transparent; animation-delay: -2s; }
.mag-tri.t5 { bottom: 22%; right: 10%; border-width: 0 11px 18px 11px; border-color: transparent transparent rgba(184,234,248,0.35) transparent; animation-delay: -8s; }
@keyframes globe-spin { to { transform: rotate(360deg); } }
@keyframes tri-float {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.85; }
  50% { transform: translateY(-14px) rotate(12deg); opacity: 1; }
}
.clip-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  flex-shrink: 0;
  gap: 10px;
}
.pride-tag {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-align: center;
}
.end-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0 4px;
}
.end-links .btn-text {
  min-height: 40px;
  padding: 8px 10px;
}
.selo-190-mini {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  margin: 4px auto 0;
}

.orb, .status, .subtitle, .name-confirm, .panel, .start-copy { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) {
  .mag-globe, .mag-tri { animation: none !important; }
}

/* Modes: generating clip and final screen — hide orb/dock so content never collides */
.screen-talk.is-rendering,
.screen-talk.is-clip {
  padding-bottom: calc(32px + var(--safe-bottom));
  justify-content: flex-start;
}
.screen-talk.is-rendering .orb,
.screen-talk.is-clip .orb,
.screen-talk.is-rendering .dock,
.screen-talk.is-clip .dock,
.screen-talk.is-rendering .type-form,
.screen-talk.is-clip .type-form {
  display: none !important;
}
.screen-talk.is-rendering #status {
  margin-top: 36px;
}
.screen-talk.is-clip #status {
  margin: 4px 0 10px;
}
.screen-talk.is-clip #subtitle {
  margin: 0 auto 12px;
  max-height: 9.2em;
}
.screen-talk.is-clip #video-panel,
.screen-talk.is-rendering #video-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 8px;
  overflow: hidden;
}
.screen-talk.is-clip #clip {
  flex: 1 1 auto;
  width: 100%;
  min-height: 120px;
  max-height: none;
  height: auto;
  object-fit: contain;
  margin: 0 0 12px;
}
.screen-talk.is-clip .clip-meta {
  flex: 0 0 auto;
}
.screen-talk.is-clip .row-actions {
  width: 100%;
  margin: 0;
}

@media (max-height: 720px) and (min-height: 521px) {
  .hero-brand { min-height: 120px; padding: calc(16px + var(--safe-top)) 24px 8px; }
  .selo-190 { width: 76px; height: 76px; }
  .start-copy { padding: 4px 24px 0; }
  h1, h1.display { font-size: clamp(32px, 9vw, 44px); margin-bottom: 12px; }
  .lead { margin-bottom: 18px; font-size: 15px; }
  .screen-talk:not(.is-clip):not(.is-rendering) .orb {
    width: 150px;
    height: 150px;
    margin: 12px 0 10px;
  }
}
@media (max-height: 700px) and (min-height: 521px) {
  .screen-talk.is-clip .selo-190-mini { width: 44px; height: 44px; }
  .screen-talk.is-clip #clip { min-height: 110px; }
}

@media (max-height: 520px), (orientation: landscape) and (max-height: 520px) {
  .hero-brand { min-height: 56px; padding: calc(8px + var(--safe-top)) 20px 0; }
  .selo-190 { width: 52px; height: 52px; }
  .logo-start { height: 32px; }
  .start-copy { padding: 2px 20px 0; }
  h1, h1.display { font-size: clamp(24px, 6vw, 32px); margin-bottom: 8px; }
  .lead { margin-bottom: 10px; font-size: 13px; line-height: 1.35; }
  .fine { margin: 8px 0 0; padding: 8px 10px; font-size: 12px; line-height: 1.35; }
  .screen-start { padding-bottom: calc(12px + var(--safe-bottom)); }
  .btn-credits { min-height: 36px; padding: 8px 12px; }

  .screen-talk.is-clip #video-panel {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    min-height: 0;
    margin-top: 0;
  }
  .screen-talk.is-clip #clip {
    width: auto;
    flex: 0 1 auto;
    max-width: 34%;
    height: auto;
    max-height: calc(100% - 4px);
    aspect-ratio: 9 / 16;
    margin: 0;
    min-height: 0;
  }
  .screen-talk.is-clip .clip-meta {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "tag seal"
      "actions actions"
      "links links";
    column-gap: 12px;
    row-gap: 6px;
    padding-top: 2px;
    align-items: center;
  }
  .screen-talk.is-clip #subtitle { margin-bottom: 6px; }
  #render-canvas.previewing {
    width: min(90px, 18vw);
    max-height: 36vh;
    margin: 12px auto 0;
  }
  .screen-talk.is-clip, .screen-talk.is-rendering { padding-bottom: calc(36px + var(--safe-bottom)); }
  .screen-talk.is-clip .pride-tag { grid-area: tag; text-align: left; }
  .screen-talk.is-clip .selo-190-mini { grid-area: seal; margin: 0; width: 36px; height: 36px; }
  .screen-talk.is-clip .row-actions { grid-area: actions; }
  .screen-talk.is-clip .end-links { grid-area: links; }
  .screen-talk.is-clip #status { margin-top: 0; }
  .screen-talk:not(.is-clip):not(.is-rendering) .orb {
    width: 72px;
    height: 72px;
    margin: 6px 0;
  }
  .btn-mic { width: 52px; height: 52px; }
  .dock {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 8px 16px calc(12px + var(--safe-bottom));
    gap: 8px 14px;
  }
  .dock .btn-text { min-height: 36px; padding: 8px 12px; }
  .mic-hint { margin: 0; min-height: 0; }
  .screen-talk:not(.is-clip):not(.is-rendering) {
    padding-bottom: calc(88px + var(--safe-bottom));
  }
  .type-form { bottom: calc(80px + var(--safe-bottom)); }
  .screen-talk.is-typing .type-form {
    bottom: calc(16px + var(--safe-bottom) + var(--kb-offset, 0px));
  }
  .subtitle { font-size: 14px; padding: 8px 12px; }
}

@media (min-width: 860px) {
  .screen-talk.is-clip, .screen-talk.is-rendering { padding-bottom: calc(24px + var(--safe-bottom)); }
}

/* ==========================================================================
   Polimento profissional (rodada "deixar profissional", 11/11)
   ========================================================================== */
body, button, input { font-family: "Montserrat", "Montserrat Fallback", ui-sans-serif, system-ui, -apple-system, sans-serif; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }

/* Abertura */
/* entrada só com movimento (sem opacidade 0), para o primeiro paint contar na hora */
.start-copy { animation: drift-in 0.8s cubic-bezier(.2,.7,.2,1) both; }
.display-bold { background: linear-gradient(180deg, #FFFFFF 30%, #CFF1FC 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.btn-primary { box-shadow: 0 12px 30px rgba(0, 24, 60, 0.28), 0 0 0 1px rgba(255,255,255,0.6) inset; }
#btn-start { min-width: 168px; position: relative; overflow: hidden; }
#btn-start::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(2,177,223,0.28) 50%, transparent 65%);
  transform: translateX(-120%); animation: shine 3.6s ease-in-out 1.2s infinite;
}
.btn-primary:hover { transform: translateY(-1px); }
.fine { background: rgba(0, 30, 70, 0.34); border: 1px solid rgba(255,255,255,0.10); }

/* Tela de conversa: orbe centralizado, legenda com espaço reservado (sem pulos) */
.screen-talk { justify-content: center; padding-top: calc(76px + var(--safe-top)); }
.talk-kicker {
  position: absolute; top: calc(16px + var(--safe-top)); left: 20px; right: 128px;
  margin: 0; z-index: 2;
}
.status {
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(222, 245, 253, 0.92); margin: 0 0 12px; min-height: 16px;
}
.status:empty { display: block; visibility: hidden; margin: 0 0 12px; }
.subtitle {
  font-size: 17px; line-height: 1.45; font-weight: 600; letter-spacing: -0.005em;
  max-width: 23em; min-height: calc(1.45em * 4 + 28px); max-height: calc(1.45em * 6 + 28px);
  padding: 14px 18px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(0, 36, 82, 0.46), rgba(0, 24, 60, 0.38));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 14px 34px rgba(0, 12, 34, 0.22);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  text-wrap: pretty;
}
.subtitle:empty { display: flex; visibility: hidden; margin: 0 auto 12px; padding: 14px 18px; }
.subtitle.is-new { animation: sub-in 0.42s cubic-bezier(.2,.7,.2,1) both; }
.screen-talk.has-panel:not(.is-clip) .subtitle:empty,
.screen-talk.is-rendering .subtitle:empty { display: none; }
.screen-talk.is-clip .subtitle { font-size: 15px; min-height: calc(1.45em * 3 + 24px); max-height: calc(1.45em * 4 + 24px); padding: 12px 16px; margin-bottom: 12px; }
.orb { margin: 0 0 18px; }
@media (min-height: 800px) { .subtitle { min-height: calc(1.45em * 5 + 28px); } }
.screen-talk:not(.el-live) .orb.idle .orb-core { animation-duration: 3.6s; }

/* Painéis (consentimento e foto) */
.panel { max-width: 390px; }
.consent-panel, .photo-panel {
  padding: 22px 18px 18px; border-radius: 24px;
  background: linear-gradient(180deg, rgba(0, 40, 90, 0.5), rgba(0, 26, 64, 0.42));
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 18px 44px rgba(0, 12, 34, 0.28);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  animation: rise-in 0.5s cubic-bezier(.2,.7,.2,1) both;
}
.photo-panel { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.photo-panel.hidden { display: none; }
.panel-title { margin: 0 0 6px; font-size: 20px; line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; }
.panel-sub { margin: 0 0 14px; font-size: 14px; line-height: 1.4; font-weight: 500; color: rgba(232, 247, 253, 0.9); }
.photo-panel .panel-sub { margin: 4px 0 0; font-size: 13px; }
.photo-panel .btn-text { align-self: center; }
.btn-secondary { background: rgba(255,255,255,0.14); color: #FFFFFF; box-shadow: 0 0 0 1.5px rgba(255,255,255,0.55) inset; }
.btn-secondary:active { background: rgba(255,255,255,0.22); }

/* Botões do topo */
.btn-score-mute, button.btn-score-mute:disabled {
  background: rgba(255, 255, 255, 0.14); box-shadow: 0 0 0 1px rgba(255,255,255,0.18) inset, 0 8px 20px rgba(0, 34, 68, 0.18);
  -webkit-backdrop-filter: blur(8px);
}
.btn-score-mute svg { display: block; }
.btn-score-mute .mute-off { display: none; }
.btn-score-mute.is-muted .mute-off { display: block; }
.btn-end svg { display: block; }
.btn-end:active, .btn-score-mute:active { transform: scale(0.94); }

/* Microfone */
.btn-mic { box-shadow: 0 14px 32px rgba(0, 30, 70, 0.32), 0 0 0 6px rgba(255,255,255,0.10); }
.screen-talk.el-live .btn-mic:not(.is-muted)::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid rgba(184, 234, 248, 0.55); animation: mic-ring 2.4s ease-out infinite; pointer-events: none;
}
.btn-mic { position: relative; }
.btn-mic.is-muted { background: rgba(255,255,255,0.22); color: #FFFFFF; }
.mic-hint { letter-spacing: 0.02em; color: rgba(232, 247, 253, 0.82); }

/* História: cenas */
.story-copy h2 { text-shadow: 0 2px 18px rgba(0, 16, 40, 0.45); letter-spacing: -0.015em; text-wrap: balance; }
.story-copy #story-line { text-shadow: 0 1px 10px rgba(0, 16, 40, 0.5); text-wrap: pretty; }
.story-copy.is-in > * { animation: rise-in 0.6s cubic-bezier(.2,.7,.2,1) both; }
.story-copy.is-in > :nth-child(2) { animation-delay: 0.06s; }
.story-copy.is-in > :nth-child(3) { animation-delay: 0.12s; }
.story-copy.is-in > :nth-child(4) { animation-delay: 0.18s; }
.story-veil { background: linear-gradient(180deg, rgba(0,24,56,0.42) 0%, rgba(0,24,56,0.0) 22%, rgba(0,24,56,0.05) 42%, rgba(0,14,36,0.86) 100%); }
.story-photo.is-on { transition: opacity 0.6s ease; }
.story-art { position: absolute; inset: 0; display: none; pointer-events: none; z-index: 1; overflow: hidden; }
.story-stage.no-photo.mode-news .story-art,
.story-stage.mode-marco .story-art,
.story-stage.mode-rewind .story-art { display: block; }
.story-art-year {
  position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%);
  font-size: clamp(96px, 33vw, 150px); font-weight: 800; letter-spacing: -0.06em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px rgba(184, 234, 248, 0.42);
  text-shadow: 0 0 60px rgba(2, 177, 223, 0.35);
  animation: art-float 9s ease-in-out infinite;
}
.story-stage.mode-rewind .story-art-year { display: none; }
.story-stage.mode-marco .story-art-year { display: none; }
.story-art-ring {
  position: absolute; left: 50%; top: 34%; width: 150vmax; height: 150vmax; transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, rgba(184,234,248,0.22) 0 1px, transparent 1.5px 22px),
    repeating-conic-gradient(from 0deg, rgba(2,177,223,0.10) 0 6deg, transparent 6deg 12deg);
  -webkit-mask-image: radial-gradient(circle, #000 18%, transparent 52%); mask-image: radial-gradient(circle, #000 18%, transparent 52%);
  animation: globe-spin 90s linear infinite; opacity: 0.8;
}
.story-stage.mode-marco .story-art-ring { top: 24%; }
.story-stage.mode-rewind .story-art-ring { top: 50%; animation-duration: 6s; opacity: 0.9; }
.story-year-flip { background: linear-gradient(180deg, #FFFFFF 40%, #BDEBFA 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 10px 30px rgba(0, 20, 50, 0.4)); text-shadow: none; }
.story-rewind-cap { color: rgba(232, 247, 253, 0.95); }
.story-dots { gap: 6px; }
.story-dot { width: 18px; height: 3px; border-radius: 3px; transition: background 0.3s ease, width 0.3s ease; }
.story-dot.is-on { width: 28px; transform: none; background: #FFFFFF; }
.story-brand { animation: rise-in 0.6s cubic-bezier(.2,.7,.2,1) both; }
.story-credit { opacity: 0.72; font-weight: 500; }

/* Gerando e final */
#render-canvas.previewing { border: 0; box-shadow: 0 0 0 1px rgba(255,255,255,0.35), 0 22px 50px rgba(0, 12, 34, 0.45); }
.screen-talk.is-clip #clip {
  align-self: center; width: auto; max-width: 100%; aspect-ratio: 9 / 16; object-fit: cover;
  background: #012A4F; box-shadow: 0 22px 50px rgba(0, 12, 34, 0.4); border-radius: 20px;
}
.end-links .btn-text { min-height: 44px; }
.pride-tag { letter-spacing: 0.02em; background: linear-gradient(90deg, #FFFFFF, #BDEBFA); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Sem conexão: aviso discreto que não cobre os controles */
.offline-banner {
  top: auto; left: 50%; right: auto; bottom: calc(132px + var(--safe-bottom)); transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 40px); border-radius: 999px; padding: 10px 18px;
  background: rgba(10, 22, 44, 0.92); border: 1px solid rgba(255,255,255,0.16); font-size: 13px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3); z-index: 70; animation: rise-in 0.35s ease both;
}

/* Desktop: palco de marca ao redor do cartão */
@media (min-width: 860px) {
  #app {
    align-items: center;
    background:
      radial-gradient(900px 520px at 50% -10%, rgba(1, 172, 235, 0.35), transparent 60%),
      radial-gradient(700px 500px at 12% 110%, rgba(2, 177, 223, 0.18), transparent 60%),
      linear-gradient(180deg, #01386A 0%, #002B55 100%);
  }
  #app::before {
    content: ""; position: fixed; width: 1400px; height: 1400px; left: 50%; top: 50%; transform: translate(-50%, -50%);
    border-radius: 50%; pointer-events: none;
    background: repeating-radial-gradient(circle, rgba(184,234,248,0.08) 0 1px, transparent 1.5px 28px);
    -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 62%); mask-image: radial-gradient(circle, #000 30%, transparent 62%);
  }
  .screen { max-height: 920px; min-height: min(calc(100dvh - 48px), 920px); box-shadow: 0 0 0 1px rgba(255,255,255,0.10), 0 40px 90px rgba(0, 10, 30, 0.5); }
  .screen-talk { height: min(calc(100dvh - 48px), 920px); max-height: min(calc(100dvh - 48px), 920px); min-height: min(calc(100dvh - 48px), 920px); }
  .dock { bottom: max(24px, calc((100dvh - 920px) / 2)); }
}

/* Telas baixas e paisagem */
@media (max-height: 720px) and (min-height: 521px) {
  .screen-talk { padding-top: calc(68px + var(--safe-top)); }
  .subtitle { font-size: 16px; min-height: calc(1.45em * 3 + 24px); padding: 12px 16px; }
  .panel-title { font-size: 18px; }
}
@media (max-height: 520px) {
  .screen-talk { padding-top: calc(60px + var(--safe-top)); }
  .talk-kicker { top: calc(10px + var(--safe-top)); }
  .btn-score-mute, button.btn-score-mute:disabled, .btn-end, button.btn-end:disabled { top: calc(10px + var(--safe-top)); }
  .subtitle { font-size: 14px; min-height: 0; max-height: 5.6em; padding: 8px 14px; }
  .subtitle:empty { display: none; }
  .status { margin-bottom: 6px; }
  .btn-credits { min-height: 44px; }
  .consent-panel, .photo-panel { padding: 14px; }
  .panel-title { font-size: 16px; margin-bottom: 2px; }
  .panel-sub { margin-bottom: 8px; font-size: 13px; }
  .consent-panel { flex-wrap: wrap; }
  .consent-panel .panel-title, .consent-panel .panel-sub { flex-basis: 100%; }
  .story-art-year { font-size: 120px; top: 30%; }
  .offline-banner { bottom: calc(76px + var(--safe-bottom)); }
}

@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes drift-in { from { transform: translateY(10px); } to { transform: none; } }
@keyframes sub-in { from { opacity: 0; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes mic-ring { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes art-float { 0%, 100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, -53%); } }
@media (prefers-reduced-motion: reduce) {
  .start-copy, .subtitle.is-new, .story-copy.is-in > *, .story-brand, .consent-panel, .photo-panel, .offline-banner { animation: none !important; }
  #btn-start::after, .story-art-year, .story-art-ring, .btn-mic::before { animation: none !important; }
}
.story-year-flip, .story-art-year { font-variant-numeric: tabular-nums; }

/* ================= Ondas 1 e 2 (11/11) ================= */
/* Abertura: CTA com microfone e aviso antes do pedido */
.btn-start { display: inline-flex; align-items: center; justify-content: center; gap: 10px; position: relative; overflow: hidden; }
.btn-start svg { flex: none; }
.start-note { margin: 12px 0 0; font-size: 13px; font-weight: 600; color: #FFFFFF; letter-spacing: 0.01em; opacity: 0.95; }
.screen-start .btn-credits { padding-left: 0; padding-right: 0; margin-left: 0; }
.screen-start .mag-tri.t3 { display: none; }
@media (max-height: 700px) { .screen-start .mag-tri.t5 { display: none; } }
.inapp-note {
  margin: 0 0 18px; padding: 14px 16px; border-radius: 16px;
  background: rgba(0, 26, 64, 0.55); border: 1px solid rgba(255,255,255,0.18);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.inapp-note[hidden] { display: none; }
.inapp-title { margin: 0 0 4px; font-size: 15px; font-weight: 800; }
.inapp-sub { margin: 0 0 10px; font-size: 13px; line-height: 1.4; color: rgba(232,247,253,0.95); }
.inapp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-inapp {
  appearance: none; border: 0; min-height: 44px; padding: 10px 16px; border-radius: 999px;
  background: #FFFFFF; color: var(--deep); font: inherit; font-size: 14px; font-weight: 700; text-decoration: none;
  display: inline-flex; align-items: center;
}
.btn-inapp + .btn-inapp, #btn-copy-link { background: rgba(255,255,255,0.14); color: #FFFFFF; box-shadow: 0 0 0 1.5px rgba(255,255,255,0.5) inset; }
.btn-inapp[hidden] { display: none; }

/* X discreto, irmão do botão de som */
.btn-end, button.btn-end:disabled {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18) inset, 0 8px 20px rgba(0, 34, 68, 0.18);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

/* Folhas com o visual da MAG (encerrar, ano, microfone) */
.mag-sheet {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 18, 44, 0); transition: background 0.25s ease;
}
.mag-sheet.hidden { display: none !important; }
.mag-sheet.is-open { background: rgba(0, 18, 44, 0.58); }
.mag-sheet-card {
  width: 100%; max-width: 430px; padding: 24px 22px calc(24px + var(--safe-bottom));
  border-radius: 26px 26px 0 0; color: #FFFFFF; text-align: center;
  background:
    radial-gradient(420px 220px at 50% -40%, rgba(2,177,223,0.45), transparent 70%),
    linear-gradient(180deg, #0077BE 0%, #00548F 100%);
  box-shadow: 0 -16px 44px rgba(0, 10, 30, 0.42), 0 0 0 1px rgba(255,255,255,0.12) inset;
  display: flex; flex-direction: column; gap: 10px;
  transform: translateY(24px); opacity: 0; transition: transform 0.32s cubic-bezier(.2,.8,.2,1), opacity 0.22s ease;
}
.mag-sheet.is-open .mag-sheet-card { transform: none; opacity: 1; }
.mag-sheet-title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; }
.mag-sheet-sub { margin: 0 0 8px; font-size: 14px; line-height: 1.45; color: rgba(232,247,253,0.95); }
.mag-sheet-card .btn-primary, .mag-sheet-card .btn-secondary { width: 100%; }
@media (min-width: 860px) {
  .mag-sheet { align-items: center; }
  .mag-sheet-card { border-radius: 26px; padding-bottom: 24px; }
}
.mic-steps { margin: 4px 0 10px; padding: 0 0 0 22px; text-align: left; font-size: 15px; line-height: 1.5; }
.mic-steps li + li { margin-top: 6px; }
.year-decades { display: flex; gap: 6px; justify-content: center; margin: 6px 0 4px; }
.year-decades .year-decade { flex: 1 1 0; min-width: 0; padding: 8px 2px; font-size: 12px; }
.year-decade {
  appearance: none; border: 0; min-height: 40px; padding: 8px 12px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 700;
  background: rgba(255,255,255,0.12); color: #FFFFFF;
}
.year-decade.is-on { background: #FFFFFF; color: var(--deep); }
.year-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 6px 0 4px; }
.year-pick {
  appearance: none; border: 0; min-height: 48px; border-radius: 14px; font: inherit; font-size: 16px; font-weight: 800;
  background: rgba(255,255,255,0.14); color: #FFFFFF; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.16) inset;
}
.year-pick.is-current { background: rgba(2,177,223,0.5); }
.year-pick:active, .year-decade:active { transform: scale(0.96); }

/* Máquina do tempo: correção do ano */
.btn-year-fix {
  appearance: none; margin-top: 18px; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 0;
  font: inherit; font-size: 14px; font-weight: 600; color: #FFFFFF;
  background: rgba(0, 24, 56, 0.45); box-shadow: 0 0 0 1px rgba(255,255,255,0.28) inset;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); position: relative; z-index: 6;
  animation: rise-in 0.5s cubic-bezier(.2,.7,.2,1) 1.4s both;
}
.btn-year-fix span { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.screen-talk:not(.el-live) .btn-year-fix { display: none; }

/* “Você disse: …” */
.heard-chip {
  position: fixed; left: 50%; bottom: calc(176px + var(--safe-bottom)); transform: translate(-50%, 8px);
  z-index: 40; max-width: min(360px, calc(100% - 40px)); margin: 0; padding: 8px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; line-height: 1.35; color: #FFFFFF; text-align: center;
  background: rgba(0, 18, 44, 0.78); border: 1px solid rgba(255,255,255,0.16);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transition: opacity 0.25s ease, transform 0.25s ease; pointer-events: none;
}
.heard-chip[hidden] { display: none; }
.heard-chip.is-on { opacity: 1; transform: translate(-50%, 0); }
.screen-talk.story-on .heard-chip { bottom: calc(150px + var(--safe-bottom)); }

/* Três estados de turno */
.status { text-transform: none; letter-spacing: 0.01em; font-size: 15px; font-weight: 700; color: #FFFFFF; }
.mic-hint { font-size: 13px; color: #FFFFFF; opacity: 1; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 20, 50, 0.45); }
.btn-mic { --vol: 0; }
.dock.is-listening .btn-mic::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%; pointer-events: none;
  border: 3px solid rgba(184, 234, 248, 0.9);
  transform: scale(calc(1 + var(--vol) * 0.35)); opacity: calc(0.45 + var(--vol) * 0.55);
  transition: transform 0.08s linear, opacity 0.08s linear;
}
.dock.is-speaking .btn-mic { box-shadow: 0 14px 32px rgba(0, 30, 70, 0.32), 0 0 0 6px rgba(255,255,255,0.06); }
.screen-talk.el-live .dock.is-speaking .btn-mic::before { animation: none; opacity: 0; }
.orb.thinking .orb-core { animation: think 1.6s ease-in-out infinite; }
.orb.thinking .orb-halo { animation: glow 1.6s ease-in-out infinite; opacity: 0.6; }
@keyframes think { 0%, 100% { transform: scale(0.97); filter: brightness(1); } 50% { transform: scale(1.02); filter: brightness(1.18); } }

/* Contraste: créditos das fotos */
.story-credit { opacity: 1; color: rgba(255,255,255,0.92); text-shadow: 0 1px 3px rgba(0, 10, 30, 0.9), 0 0 12px rgba(0, 10, 30, 0.6); font-size: 12px; }

/* Reconexão visível */
.reconnect-bar {
  position: fixed; left: 0; right: 0; margin: 0 auto; top: calc(84px + var(--safe-top)); z-index: 75;
  width: max-content; white-space: nowrap; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px);
  padding: 8px 8px 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #FFFFFF;
  background: rgba(0, 18, 44, 0.9); border: 1px solid rgba(255,255,255,0.18); box-shadow: 0 12px 30px rgba(0,0,0,0.3);
  animation: rise-in 0.3s ease both;
}
.reconnect-bar[hidden] { display: none; }
.reconnect-bar:not(.is-failed) { padding-right: 16px; }
.reconnect-bar:not(.is-failed)::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 2px solid rgba(255,255,255,0.35); border-top-color: #FFFFFF; animation: spin-rays 0.9s linear infinite;
}
.btn-resume {
  appearance: none; border: 0; min-height: 40px; padding: 8px 14px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 800;
  background: #FFFFFF; color: var(--deep); white-space: nowrap;
}
.btn-resume[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .mag-sheet-card, .heard-chip { transition: none; }
  .btn-year-fix, .reconnect-bar { animation: none; }
  .orb.thinking .orb-core, .orb.thinking .orb-halo, .reconnect-bar::before { animation: none !important; }
  .dock.is-listening .btn-mic::after { transition: none; transform: none; }
}

/* ================= Ondas 3, 4 e WhatsApp (11/11, rodada 2) ================= */
/* Mini prévia do clipe na abertura */
.mini-clip {
  position: relative; flex: none; width: 96px; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden;
  border: 2px solid rgba(255,255,255,0.85); box-shadow: 0 14px 30px rgba(0, 16, 40, 0.4);
  background: #013868; transform: rotate(4deg);
}
.mc-frame {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 0 6px 14px; text-align: center; color: #FFFFFF; opacity: 0;
  animation: mc-cycle 9s infinite;
}
.mc-f1 { background: linear-gradient(180deg, rgba(0,30,72,0) 40%, rgba(0,24,60,0.92) 100%), url("assets/hero-moon.jpg") center 30% / cover; animation-delay: 0s; }
.mc-f2 { background: radial-gradient(120px 120px at 50% 45%, rgba(2,177,223,0.5), transparent 70%), linear-gradient(180deg, #0277C4, #013A6E); justify-content: center; animation-delay: 3s; }
.mc-f3 { background: radial-gradient(90px 90px at 50% 30%, rgba(184,234,248,0.35), transparent 70%), linear-gradient(180deg, #0067B1, #012A4F); justify-content: center; animation-delay: 6s; }
.mc-k { font-size: 7px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #B8EAF8; }
.mc-t { font-size: 10px; font-weight: 300; line-height: 1.1; margin-top: 2px; }
.mc-t b { display: block; font-size: 15px; font-weight: 800; }
.mc-year { font-size: 26px; font-weight: 800; letter-spacing: -0.04em; margin-top: 2px; }
.mc-face { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 800; background: linear-gradient(160deg, #38C8F0, #013A6E); border: 2px solid #FFFFFF; }
.mc-n { font-size: 30px; font-weight: 800; line-height: 1; margin-top: 6px; }
.mc-play { position: absolute; left: 6px; right: 6px; bottom: 5px; height: 2px; border-radius: 2px; background: rgba(255,255,255,0.3); overflow: hidden; }
.mc-play::after { content: ""; position: absolute; inset: 0; background: #FFFFFF; transform-origin: left; animation: mc-bar 9s linear infinite; }
@keyframes mc-cycle { 0% { opacity: 0; } 3% { opacity: 1; } 31% { opacity: 1; } 35% { opacity: 0; } 100% { opacity: 0; } }
@keyframes mc-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-height: 700px) { .mini-clip { width: 78px; } }
@media (prefers-reduced-motion: reduce) {
  .mc-frame { animation: none; }
  .mc-f1 { opacity: 1; }
  .mc-play::after { animation: none; transform: scaleX(0.33); }
}

/* Painel único: consentimento + foto */
.photo-panel .panel-sub-top { margin: 0 0 10px; font-size: 14px; }
.photo-panel .btn-secondary { margin-top: 2px; }

/* Clipe montando ao vivo, com etapas nomeadas */
#render-canvas.previewing { width: min(232px, 56vw); max-height: min(50vh, 412px); margin-top: 16px; }
.render-steps {
  list-style: none; margin: 14px auto 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  max-width: 360px; position: relative; z-index: 2;
}
.render-steps li {
  font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px; color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.08); box-shadow: 0 0 0 1px rgba(255,255,255,0.14) inset; transition: background 0.3s ease, color 0.3s ease;
}
.render-steps li.is-done { color: #FFFFFF; background: rgba(2,177,223,0.35); }
.render-steps li.is-done::before { content: "✓ "; }
.render-steps li.is-on { color: var(--deep); background: #FFFFFF; }
.screen-talk:not(.is-rendering) .render-steps { display: none; }
.screen-talk.is-rendering #render-canvas.previewing { order: 0; }

/* Final: salvar ou enviar */
.clip-note { margin: 2px 0 10px; text-align: center; font-size: 13px; font-weight: 600; color: #FFFFFF; }
.clip-note[hidden] { display: none; }
#btn-download[hidden] { display: none; }
.btn-link { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.btn-link[hidden] { display: none; }
#save-sheet .btn-text { color: #FFFFFF; min-height: 40px; }
#save-sheet [hidden] { display: none; }
#video-panel { position: relative; }
.burst { position: absolute; left: 50%; top: 40%; width: 0; height: 0; pointer-events: none; z-index: 5; }
.burst span {
  position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: #FFFFFF;
  animation: burst-out 1.3s cubic-bezier(.1,.7,.2,1) both;
}
.burst span:nth-child(3n) { background: #B8EAF8; }
.burst span:nth-child(3n+1) { background: #FFD98A; width: 6px; height: 6px; }
@keyframes burst-out {
  0% { transform: translate(0, 0) scale(0.4); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translate(var(--dx), calc(var(--dy) + 30px)) scale(1); opacity: 0; }
}

/* Modo voz: escrever e escolher o ano por botão */
.screen-talk.el-live .dock #btn-type,
.btn-year-quick {
  position: absolute; top: 30px; max-width: calc(50% - 56px); min-height: 40px; padding: 8px 12px; border-radius: 999px; border: 0;
  font: inherit; font-size: 13px; font-weight: 700; line-height: 1.2; color: #FFFFFF; text-decoration: none;
  background: rgba(255,255,255,0.12); box-shadow: 0 0 0 1px rgba(255,255,255,0.28) inset;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.screen-talk.el-live .dock #btn-type { display: inline-block !important; left: 12px; }
.btn-year-quick { right: 12px; animation: rise-in 0.35s ease both; }
.btn-year-quick[hidden] { display: none; }
.screen-talk:not(.el-live) .btn-year-quick { display: none; }
.screen-talk.el-live .type-form:not(.hidden) ~ .dock #btn-type { display: none !important; }

/* Picos: contador da máquina do tempo, Ken Burns lento */
.story-year-flip.is-landed { animation: year-land 0.6s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes year-land { 0% { transform: scale(1.18); } 100% { transform: scale(1); } }
.story-photo.is-on { animation: kenburns-slow 22s ease-out both; }
@keyframes kenburns-slow {
  from { transform: scale(1.03) translate3d(0, 4px, 0); }
  to { transform: scale(1.1) translate3d(0, -10px, 0); }
}
.story-copy h2.is-long { font-size: clamp(20px, 5.6vw, 26px); line-height: 1.25; }
@media (prefers-reduced-motion: reduce) {
  .story-year-flip.is-landed, .story-photo.is-on, .btn-year-quick { animation: none !important; }
  .burst { display: none; }
  .render-steps li { transition: none; }
}
.is-wait { opacity: 0.5; pointer-events: none; }
.render-steps li.is-done::before { content: none; }
.screen-talk.is-rendering #status { white-space: nowrap; }
.screen-talk.el-live .dock #btn-type, .btn-year-quick { max-width: calc(50% - 64px); font-size: 12px; padding: 8px 10px; }
#render-canvas:not(.previewing) ~ .render-steps { display: none; }
/* 11/11 (tarde): etapas numa linha só, no fluxo, logo abaixo da moldura; a legenda tem espaço reservado
   embaixo delas. Nada muda de tamanho durante a montagem (sem pulo) e legenda e etapas nunca se cruzam. */
.screen-talk.is-rendering #render-canvas.previewing {
  width: auto; height: clamp(150px, calc(100dvh - 420px), 412px); max-height: none; max-width: 60vw; margin-top: 14px;
}
.screen-talk.is-rendering .render-steps {
  position: relative; display: flex; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; width: max-content; max-width: calc(100% - 8px); height: 28px; margin: 12px auto 0; flex-shrink: 0;
}
.screen-talk.is-rendering .render-steps::-webkit-scrollbar { display: none; }
.screen-talk.is-rendering .render-steps { gap: 4px; scroll-behavior: smooth; }
.screen-talk.is-rendering .render-steps li { flex-shrink: 0; white-space: nowrap; font-size: 10.5px; line-height: 18px; padding: 5px 7px; }
.screen-talk.is-rendering #render-canvas:not(.previewing) ~ .render-steps { display: flex; visibility: hidden; }
.screen-talk.is-rendering .subtitle,
.screen-talk.is-rendering .subtitle:empty {
  display: flex; position: relative; font-size: 15px; line-height: 1.4; padding: 10px 14px; margin: 12px auto 0;
  min-height: calc(1.4em * 4 + 20px); max-height: calc(1.4em * 4 + 20px); overflow: hidden; flex-shrink: 0;
}
.screen-talk.is-rendering .subtitle:empty { visibility: hidden; }
.screen-talk.is-rendering #caption { display: none; }
@media (max-height: 560px) { .screen-talk.is-rendering .render-steps { display: none; } }
.story-credit:empty { display: none; }
.type-form input { min-width: 0; text-overflow: ellipsis; }
/* 11/11: a pergunta da agente fica logo acima do campo (a legenda some enquanto se digita) */
.type-form { position: fixed; }
.type-q { position: absolute; left: 4px; right: 4px; bottom: calc(100% + 12px); margin: 0; text-align: center; font-size: 17px; line-height: 1.35; font-weight: 600; color: #fff; text-shadow: 0 1px 8px rgba(0, 16, 44, 0.6); pointer-events: none; }
.type-q:empty { display: none; }
/* ao parar a gravação a moldura perde .previewing: durante a montagem ela continua no lugar (sem pulo da legenda) */
.screen-talk.is-rendering #render-canvas:not(.previewing) {
  position: relative; left: auto; display: block; visibility: visible; opacity: 1; width: auto; height: clamp(150px, calc(100dvh - 420px), 412px);
  max-width: 60vw; aspect-ratio: 9 / 16; margin: 14px auto 0; border-radius: 18px; flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.35), 0 22px 50px rgba(0, 12, 34, 0.45);
}
.screen-talk.is-rendering #render-canvas:not(.previewing) ~ .render-steps { visibility: visible; }
/* 11/11 (t427u): microfone desligado depois do ano — aviso discreto durante a história */
.mic-off { display: none; }
.screen-talk.mic-locked.story-on .mic-off {
  display: inline-flex; align-items: center; gap: 6px; position: fixed; left: 50%; transform: translateX(-50%);
  top: calc(var(--safe-top) + 84px); z-index: 20; margin: 0; padding: 5px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.01em; color: rgba(255,255,255,0.92); white-space: nowrap;
  background: rgba(0, 20, 48, 0.42); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); pointer-events: none;
}
.screen-talk.mic-locked .btn-mic { opacity: 0.45; }

/* 12/11 (t438u): sem aviso de microfone; fim leve — uma coisa por tela e legenda curta, sincronizada */
.mic-off { display: none !important; }
.screen-talk.mic-locked .dock > :not(#btn-year-quick),
.screen-talk.mic-locked .type-form,
.screen-talk.mic-locked #heard,
.screen-talk.mic-locked #caption { display: none !important; }
.screen-talk.mic-locked .dock #btn-year-quick:not([hidden]) { display: inline-block !important; }
.screen-talk.has-panel .subtitle,
.screen-talk.is-rendering .subtitle,
.screen-talk.is-clip .subtitle,
.screen-talk.is-clip #subtitle {
  display: block; position: absolute; left: 20px; right: 20px; bottom: calc(28px + var(--safe-bottom)); top: auto;
  z-index: 20; width: auto; max-width: 24em; margin: 0 auto !important;
  min-height: 0 !important; max-height: calc(1.4em * 2 + 18px) !important; overflow: hidden;
  font-size: 15px; line-height: 1.4; font-weight: 600; text-align: center; padding: 9px 14px;
  background: rgba(0, 22, 52, 0.46); border: 0; box-shadow: none; border-radius: 14px;
}
.screen-talk.has-panel .subtitle:empty,
.screen-talk.is-rendering .subtitle:empty,
.screen-talk.is-clip .subtitle:empty { display: none !important; }
/* no clipe pronto a legenda fica no lugar do título, no alto (os botões ficam embaixo) */
.screen-talk.is-clip .subtitle,
.screen-talk.is-clip #subtitle { top: calc(var(--safe-top) + 74px); bottom: auto; }
.screen-talk.is-clip:has(#subtitle:not(:empty)) #status { visibility: hidden; }
.screen-talk.is-rendering .render-steps,
.screen-talk.is-rendering #render-canvas:not(.previewing) ~ .render-steps { display: none !important; }
.photo-panel .panel-sub { margin-bottom: 18px; }

.screen-talk.is-clip .end-links { flex-wrap: nowrap; justify-content: center; gap: 0 18px; }
.screen-talk.is-clip .end-links .btn-text { white-space: nowrap; }

/* ---- 12/11 (t446) ---- */
/* telas estreitas (< 380 px): legenda com até 3 linhas */
@media (max-width: 380px) {
  .screen-talk.has-panel #subtitle, .screen-talk.is-rendering #subtitle, .screen-talk.is-clip #subtitle { max-height: calc(1.35em * 3 + 18px) !important; font-size: 14px; line-height: 1.35; }
}
/* links do clipe quebram linha em vez de sair da tela */
.screen-talk.is-clip .end-links { flex-wrap: wrap !important; gap: 0 14px !important; }
/* paisagem baixa: a legenda cobria “Salvar ou enviar”; com painel ou clipe na tela, a fala fica só no áudio */
@media (orientation: landscape) and (max-height: 520px) {
  .screen-talk.has-panel #subtitle, .screen-talk.is-clip #subtitle, .screen-talk.is-rendering #subtitle { display: none !important; }
}
.screen-talk #subtitle { pointer-events: none; }
/* nome por toque com o microfone travado */
.screen-talk.mic-locked.name-ask .type-form:not(.hidden) { display: flex !important; flex-wrap: wrap; }
.type-form .type-q:empty { display: none; }
.type-form .type-q { flex-basis: 100%; margin: 2px 4px 6px; font-weight: 700; font-size: 15px; }
/* aviso de erro no painel da foto */
.panel-error { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 196, 0, 0.16); border: 1px solid rgba(255, 196, 0, 0.5); color: #FFF4CC; font-size: 14px; line-height: 1.4; font-weight: 600; text-align: center; }
.panel-error[hidden] { display: none; }
#btn-retry-clip { width: 100%; margin-top: 10px; }
#btn-retry-clip[hidden] { display: none; }
/* tela final da saída antecipada */
.end-panel { padding: 24px 18px 18px; border-radius: 24px; text-align: center; background: linear-gradient(180deg, rgba(0, 40, 90, 0.5), rgba(0, 26, 64, 0.42)); border: 1px solid rgba(255,255,255,0.14); margin: auto auto 24px; }
.end-panel .panel-sub { margin: 6px 0 18px; }
.screen-talk.is-ended .dock, .screen-talk.is-ended #subtitle, .screen-talk.is-ended #caption, .screen-talk.is-ended #heard, .screen-talk.is-ended .type-form, .screen-talk.is-ended .mic-off { display: none !important; }
/* créditos: “fonte” com área de toque de verdade; crédito na tela em até 2 linhas, sem corte no meio da palavra */
.credit-item a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; margin: -10px 0 -10px -6px; font-weight: 700; text-decoration: underline; }
.credit-item { overflow-wrap: anywhere; }
.story-credit { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

#wa-guard,
#wa-bypass { display: none; }
html.wa-blocked #app { display: none !important; }
html.wa-blocked #wa-guard {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #f8fafc;
  color: #0f172a;
  font-family: Montserrat, system-ui, sans-serif;
}
.wa-guard-card {
  width: min(100%, 420px);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(0, 56, 84, 0.08);
}
.wa-guard-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0267B1, #02B1DF);
  color: #fff;
}
.wa-guard-icon svg { width: 36px; height: 36px; }
.wa-guard-card h2 { margin: 0 0 8px; color: #0f172a; font-size: 24px; font-weight: 800; }
.wa-guard-kicker {
  margin: 0 0 20px;
  color: #0267B1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.wa-guard-copy { margin: 0 0 24px; color: #475569; font-size: 14px; line-height: 1.6; }
.wa-guard-note {
  padding: 16px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
}
.wa-guard-legal { margin: 32px 0 0; color: #94a3b8; font-size: 12px; }
html.wa-bypass #wa-bypass {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(255, 198, 1, 0.18);
  border-bottom: 1px solid rgba(255, 198, 1, 0.28);
  color: #003854;
  font-size: 12px;
  font-family: Montserrat, system-ui, sans-serif;
}
#wa-bypass button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
