/* ============================================================================
   Unidad de Chequeos — sistema de diseño premium
   Paleta: blanco · azul corporativo rgb(16,12,46) · gris claro · dorado discreto
   ========================================================================== */
:root {
  /* Paleta Premium Hospital: azul del logo · blanco · gris claro · gris oscuro */
  --navy:        #232061;          /* azul corporativo del logo */
  --navy-700:    #2C2974;
  --navy-600:    #3A3690;          /* tono claro para degradados */
  --navy-300:    #8E8AC0;
  --accent:      #2F2C7A;          /* acento (azul más claro, sustituye al dorado) */
  --accent-soft: #C9C7E6;
  /* alias retro-compatibles (el acento ya no es dorado, es azul del logo) */
  --gold:        var(--accent);
  --gold-soft:   var(--accent-soft);
  --paper:       #FBFBFD;
  --grey-50:     #F5F6F8;          /* gris claro */
  --grey-100:    #ECEEF2;
  --grey-200:    #DCDFE6;
  --grey-400:    #9AA0AE;
  --ink:         #1F2230;          /* gris oscuro (texto) */
  --ink-soft:    #565B6B;

  --ok:          #2E7D5B;
  --ok-bg:       #E7F2EC;
  --warn:        #B5862F;
  --warn-bg:     #FBF1DC;
  --danger:      #B23A48;
  --danger-bg:   #F8E7E9;
  --info:        #2F5BB5;
  --info-bg:     #E7EDF9;

  --radius:      18px;
  --radius-sm:   12px;
  --shadow:      0 10px 40px -12px rgba(35,32,97,.16);
  --shadow-lg:   0 24px 70px -20px rgba(35,32,97,.28);
  --ring:        0 0 0 3px rgba(47,44,122,.28);

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; cursor: pointer; }
a { color: var(--navy-600); }

/* ── Utilidades ───────────────────────────────────────────────────────────── */
.center-screen { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 40px 20px; }
.fade-in { animation: fade .5s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.muted { color: var(--ink-soft); }
.tiny { font-size: 12.5px; }
.hidden { display: none !important; }

/* ── Botones ──────────────────────────────────────────────────────────────── */
.btn {
  border: 1px solid transparent; border-radius: 999px; padding: 13px 24px;
  font-size: 15px; font-weight: 600; letter-spacing: .01em;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  display: inline-flex; align-items: center; gap: 9px;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-700); box-shadow: var(--shadow); }
.btn-gold { background: linear-gradient(180deg, var(--navy-600) 0%, var(--navy) 100%); color: #fff; }
.btn-gold:hover { box-shadow: 0 12px 30px -12px rgba(35,32,97,.6); }
.btn-ghost { background: transparent; color: var(--navy-600); border-color: var(--grey-200); }
.btn-ghost:hover { background: var(--grey-50); }
.btn-soft { background: var(--grey-50); color: var(--ink-soft); border-color: var(--grey-100); padding: 9px 16px; font-size: 13.5px; }
.btn-soft:hover { background: var(--grey-100); }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── Tarjetas ─────────────────────────────────────────────────────────────── */
.card {
  background: #fff; border: 1px solid var(--grey-100); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 36px;
}
.brandmark { display: flex; align-items: center; gap: 12px; }
.brandmark .logo {
  width: 44px; height: 44px; border-radius: 12px;
  background: #fff; display: grid; place-items: center; position: relative;
  box-shadow: inset 0 0 0 1px var(--grey-200), 0 2px 10px -5px rgba(35,32,97,.35);
}
.brandmark .logo svg { width: 26px; height: 26px; }
/* Logo oficial como imagen */
.brandlogo-img { height: 42px; width: auto; max-width: 230px; display: block; object-fit: contain; }
.brandmark.on-dark .brandlogo-img { background: #fff; border-radius: 10px; padding: 7px 12px; box-shadow: 0 2px 12px -6px rgba(35,32,97,.45); }
.brandmark .name { font-weight: 700; letter-spacing: .02em; }
.brandmark .sub { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
/* Wordmark recreado (Baloo 2), estilo Premium Hospital */
.brandmark .wordmark { font-family: 'Baloo 2', var(--sans); display: flex; flex-direction: column; line-height: .98; }
.brandmark .wordmark span:first-child { font-size: 23px; }
.brandmark .wordmark span:last-child { font-size: 15.5px; letter-spacing: .01em; opacity: .92; margin-top: -1px; }
.eyebrow { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

/* ── Pantalla bienvenida ──────────────────────────────────────────────────── */
.welcome { max-width: 940px; width: 100%; position: relative; }
.welcome-grid { display: grid; grid-template-columns: 1.05fr .95fr; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; }
.welcome-aside {
  background: radial-gradient(120% 120% at 0% 0%, var(--navy-600) 0%, var(--navy) 55%);
  color: #fff; padding: 48px 44px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.welcome-aside::after {
  content: ''; position: absolute; right: -80px; bottom: -80px; width: 240px; height: 240px;
  border-radius: 50%; background: radial-gradient(circle, rgba(201,162,75,.22), transparent 70%);
}
/* Marca + título de unidad en la portada (logo más grande) */
.welcome-aside .brand-block { display: flex; flex-direction: column; gap: 12px; }
.welcome-aside .brandlogo-img { height: 60px; max-width: 280px; }
.welcome-aside .unit-title { font-size: 13px; letter-spacing: .26em; text-transform: uppercase; font-weight: 600; color: var(--gold-soft); padding-left: 2px; }
[dir="rtl"] .welcome-aside .unit-title { letter-spacing: normal; }
.welcome-aside h1 { font-family: var(--serif); font-weight: 500; font-size: 34px; line-height: 1.15; margin: 22px 0 14px; }
.welcome-aside p { color: #C9C6DC; line-height: 1.6; font-size: 15px; }
.assurances { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.assurances li { display: flex; gap: 11px; align-items: flex-start; color: #DAD8EC; font-size: 14px; }
.assurances svg { flex: none; margin-top: 2px; color: var(--gold); }
.welcome-main { padding: 48px 44px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.welcome-main h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; margin: 6px 0 0; }
.lang-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-lang { border: 1px solid var(--grey-200); background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 13px; color: var(--ink-soft); }
.chip-lang[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }
/* Selector de idioma discreto (esquina) */
.lang-switch-wrap { position: absolute; top: 18px; right: 18px; z-index: 6; }
[dir="rtl"] .lang-switch-wrap { right: auto; left: 18px; }
.lang-switch { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.85); border: 1px solid var(--grey-200); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--ink); backdrop-filter: blur(8px); transition: .15s; }
.lang-switch:hover { background: #fff; box-shadow: var(--shadow); }
.lang-switch svg:first-child { color: var(--navy); }
.lang-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 160px; background: #fff; border: 1px solid var(--grey-100); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; display: none; }
[dir="rtl"] .lang-menu { right: auto; left: 0; text-align: right; }
.lang-menu.open { display: block; }
.lang-menu button { display: block; width: 100%; text-align: inherit; background: transparent; border: none; padding: 10px 12px; border-radius: 9px; font-size: 14px; color: var(--ink); }
.lang-menu button:hover { background: var(--grey-50); }
.lang-menu button[aria-pressed="true"] { color: var(--navy); font-weight: 600; background: var(--grey-50); }
.disclaimer-box { background: var(--grey-50); border: 1px solid var(--grey-100); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 13px; color: var(--ink-soft); line-height: 1.55; }

/* ── Layout de flujo paciente (steps) ─────────────────────────────────────── */
.flow { max-width: 720px; width: 100%; margin: 0 auto; }
.flow-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.steps { display: flex; gap: 8px; }
.step-dot { width: 28px; height: 4px; border-radius: 999px; background: var(--grey-200); }
.step-dot.active { background: var(--gold); }
.step-dot.done { background: var(--navy); }

/* Formulario identificación */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.col-2 { grid-column: span 2; }
label.lbl { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); letter-spacing: .02em; }
.input, .select {
  border: 1px solid var(--grey-200); border-radius: var(--radius-sm); padding: 12px 14px;
  font-size: 15px; font-family: inherit; color: var(--ink); background: #fff; transition: border .15s, box-shadow .15s;
}
.input:focus, .select:focus { outline: none; border-color: var(--gold); box-shadow: var(--ring); }
.hint { font-size: 12px; color: var(--grey-400); }
.age-pill { align-self: flex-start; background: var(--navy); color: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; }

/* Consentimientos */
.consent-item { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--grey-100); border-radius: var(--radius-sm); margin-bottom: 10px; background: #fff; transition: border .15s, background .15s; }
.consent-item[data-on="true"] { border-color: var(--gold); background: #FFFDF8; }
.consent-item .txt { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.consent-item .txt b { color: var(--ink); font-weight: 600; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: var(--grey-200); border-radius: 999px; transition: .2s; }
.slider::before { content: ''; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--navy); }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* ── Entrevista conversacional ────────────────────────────────────────────── */
.interview { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; background:
  radial-gradient(140% 90% at 50% -10%, #fff 0%, var(--grey-50) 100%); }
.iv-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 26px; }
.iv-top .brandlogo-img { height: 71px; max-width: 340px; } /* logo +70% durante la entrevista */
.iv-progress { flex: 1; max-width: 320px; height: 4px; background: var(--grey-200); border-radius: 999px; overflow: hidden; margin: 0 20px; }
.iv-progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), var(--navy-300)); border-radius: 999px; transition: width .5s ease; }
.iv-block-label { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

.iv-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 22px 0; text-align: center; }
.orb-wrap { margin-bottom: 26px; }
.orb {
  width: 116px; height: 116px; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 35% 30%, var(--navy-600), var(--navy) 70%);
  box-shadow: 0 18px 50px -16px rgba(16,12,46,.55), inset 0 0 0 1px rgba(201,162,75,.35);
  display: grid; place-items: center;
}
.orb::before { content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 1px solid rgba(201,162,75,.25); animation: ring 3.4s ease-in-out infinite; }
.orb .core { width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle, var(--gold-soft), var(--gold) 75%); opacity: .9; }
.orb.speaking .core { animation: pulse 1.1s ease-in-out infinite; }
.orb.listening { box-shadow: 0 18px 50px -16px rgba(178,58,72,.4), inset 0 0 0 1px rgba(201,162,75,.45); }
.orb.listening::before { border-color: rgba(178,58,72,.4); animation-duration: 1.4s; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.18); opacity: 1; } }
@keyframes ring { 0%,100% { transform: scale(1); opacity: .5; } 50% { transform: scale(1.08); opacity: .9; } }

.iv-prompt { font-family: var(--serif); font-weight: 500; font-size: clamp(21px, 3.2vw, 30px); line-height: 1.32; max-width: 680px; color: var(--ink); margin: 0 auto; }
.iv-prompt.is-followup { color: var(--navy-600); }
.iv-followup-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 12px; }
.iv-state { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-top: 14px; min-height: 16px; }
/* Ecualizador: barras que oscilan con el sonido del micrófono */
.iv-eq { display: none; gap: 6px; align-items: center; justify-content: center; height: 40px; margin-top: 10px; }
.iv-eq.on { display: flex; }
.iv-eq span { width: 6px; height: 40px; border-radius: 4px; background: linear-gradient(180deg, var(--accent), var(--navy)); transform: scaleY(.16); transform-origin: center; transition: transform .07s linear; }
.mic-btn.muted { background: var(--grey-100); color: var(--grey-400); }
.iv-heard { margin-top: 14px; min-height: 22px; color: var(--ink-soft); font-size: 15px; font-style: italic; }

/* Dock de entrada */
.iv-dock { padding: 18px 22px 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.iv-options { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; max-width: 720px; }
.opt-chip { border: 1px solid var(--grey-200); background: #fff; border-radius: 999px; padding: 10px 18px; font-size: 14px; color: var(--ink); transition: .15s; }
.opt-chip:hover { border-color: var(--gold); }
.opt-chip[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.iv-inputbar { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 640px; background: #fff; border: 1px solid var(--grey-200); border-radius: 999px; padding: 7px 7px 7px 20px; box-shadow: var(--shadow); }
.iv-inputbar input { flex: 1; border: none; outline: none; font-size: 15.5px; font-family: inherit; background: transparent; color: var(--ink); }
.mic-btn { width: 46px; height: 46px; border-radius: 50%; border: none; background: var(--grey-50); color: var(--navy-600); display: grid; place-items: center; transition: .15s; }
.mic-btn:hover { background: var(--grey-100); }
.mic-btn.on { background: var(--danger); color: #fff; animation: micpulse 1.2s infinite; }
@keyframes micpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(178,58,72,.4); } 50% { box-shadow: 0 0 0 8px rgba(178,58,72,0); } }
.send-btn { width: 46px; height: 46px; border-radius: 50%; border: none; background: var(--navy); color: #fff; display: grid; place-items: center; }
.send-btn:hover { background: var(--navy-700); }
.iv-controls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ── Revisión final ───────────────────────────────────────────────────────── */
.review-list { display: grid; gap: 1px; background: var(--grey-100); border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--grey-100); }
.review-row { display: grid; grid-template-columns: 200px 1fr; gap: 16px; background: #fff; padding: 13px 16px; }
.review-row .k { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.review-row .v { font-size: 14px; color: var(--ink); }
.notice { border-radius: var(--radius-sm); padding: 14px 16px; font-size: 13.5px; line-height: 1.55; display: flex; gap: 11px; }
.notice svg { flex: none; margin-top: 1px; }
.notice.warn { background: var(--warn-bg); color: #7A5A18; }
.notice.info { background: var(--info-bg); color: #294C8F; }

/* ── Panel médico ─────────────────────────────────────────────────────────── */
.doc-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; min-height: 100dvh; }
.doc-side { background: var(--navy); color: #fff; padding: 26px 20px; display: flex; flex-direction: column; gap: 8px; }
.doc-side .brandmark .name, .doc-side .brandmark { color: #fff; }
.doc-nav { margin-top: 22px; display: flex; flex-direction: column; gap: 4px; }
.doc-nav button { text-align: left; background: transparent; border: none; color: #C9C6DC; padding: 11px 14px; border-radius: 10px; font-size: 14px; font-weight: 500; }
.doc-nav button:hover { background: var(--navy-700); color: #fff; }
.doc-nav button.active { background: var(--navy-600); color: #fff; }
.doc-side .footer { margin-top: auto; font-size: 12px; color: var(--navy-300); }
.doc-main { padding: 30px 38px; background: var(--grey-50); overflow-y: auto; }
.doc-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.doc-h h1 { font-family: var(--serif); font-weight: 500; font-size: 26px; margin: 0; }

/* Tabla pacientes */
.ptable { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--grey-100); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.ptable th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--grey-400); font-weight: 600; padding: 14px 18px; background: var(--grey-50); border-bottom: 1px solid var(--grey-100); }
.ptable td { padding: 15px 18px; border-bottom: 1px solid var(--grey-100); font-size: 14px; }
.ptable tr:last-child td { border-bottom: none; }
.ptable tbody tr { cursor: pointer; transition: background .12s; }
.ptable tbody tr:hover { background: var(--grey-50); }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.b-pending { background: var(--warn-bg); color: var(--warn); }
.b-reviewed { background: var(--info-bg); color: var(--info); }
.b-validated { background: var(--ok-bg); color: var(--ok); }
.b-needs_info { background: var(--grey-100); color: var(--ink-soft); }
.b-priority { background: var(--danger-bg); color: var(--danger); }

/* Ficha individual */
.ficha-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--grey-100); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 18px; }
.panel h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; font-weight: 600; }
.panel h2 { font-family: var(--serif); font-weight: 500; font-size: 20px; margin: 0 0 6px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--ink-soft); font-weight: 500; }
.kv dd { margin: 0; }
.risk-item, .flag-item, .area-item, .extra-item { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 9px; font-size: 13.5px; }
.risk-item { background: var(--warn-bg); }
.flag-item { background: var(--danger-bg); color: #7A2630; display: flex; gap: 10px; align-items: flex-start; }
.area-item { background: var(--info-bg); color: #2A427A; }
.extra-item { border: 1px solid var(--grey-100); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.extra-item .lv { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 9px; border-radius: 999px; }
.lv-recomendado { background: var(--ok-bg); color: var(--ok); }
.lv-valorar { background: var(--warn-bg); color: var(--warn); }
.lv-opcional { background: var(--grey-100); color: var(--ink-soft); }
.status-tag { font-size: 11px; color: var(--grey-400); font-style: italic; }
.pkg-card { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-600) 100%); color: #fff; border-radius: var(--radius); padding: 22px 24px; }
.pkg-card .price { color: var(--gold-soft); font-weight: 600; }
.pkg-card ul { margin: 12px 0 0; padding-left: 18px; color: #CFCDE2; font-size: 13px; line-height: 1.7; columns: 2; }

.transcript { max-height: 420px; overflow-y: auto; padding-right: 6px; }
.t-line { margin-bottom: 12px; }
.t-line .who { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.t-assistant .who { color: var(--gold); }
.t-user .who { color: var(--navy-300); }
.t-line .msg { font-size: 14px; line-height: 1.5; margin-top: 2px; }
.t-user .msg { color: var(--ink-soft); }

.actions-bar { display: flex; flex-wrap: wrap; gap: 9px; }
.modal-back { position: fixed; inset: 0; background: rgba(16,12,46,.45); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: #fff; border-radius: var(--radius); padding: 26px; width: 100%; max-width: 460px; box-shadow: var(--shadow-lg); }
.textarea { border: 1px solid var(--grey-200); border-radius: var(--radius-sm); padding: 12px 14px; font-family: inherit; font-size: 14px; width: 100%; min-height: 90px; resize: vertical; }
.textarea:focus { outline: none; border-color: var(--gold); box-shadow: var(--ring); }

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 13px 22px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: .3s; z-index: 100; box-shadow: var(--shadow-lg); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.spinner { width: 22px; height: 22px; border: 2.5px solid var(--grey-200); border-top-color: var(--navy); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .welcome-grid, .ficha-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field.col-2 { grid-column: span 1; }
  .doc-shell { grid-template-columns: 1fr; }
  .doc-side { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .doc-nav { flex-direction: row; margin: 0; }
  .review-row { grid-template-columns: 1fr; gap: 4px; }
  .pkg-card ul { columns: 1; }
}

/* Entrevista en pantallas de móvil: cabecera compacta, orbe y textos más
   contenidos y controles que caben sin desbordar. */
@media (max-width: 640px) {
  .iv-top { padding: 12px 14px; gap: 10px; }
  .iv-top .brandlogo-img { height: 46px; max-width: 180px; }
  .iv-top .btn { padding: 8px 12px; font-size: 13px; }
  .iv-progress { margin: 0 10px; }
  .orb { transform: scale(.8); }
  .orb-wrap { margin-bottom: 10px; }
  /* La barra de escribir/micrófono DEBE quedar siempre visible: se fija la
     altura a la pantalla real y el escenario cede espacio (con scroll propio
     si una pregunta fuese muy larga). */
  .interview { height: 100dvh; }
  .iv-stage { padding: 4px 16px 0; justify-content: center; min-height: 0; overflow-y: auto; }
  .iv-prompt { font-size: clamp(18px, 5.4vw, 22px); }
  .iv-dock { padding: 12px 14px 20px; gap: 10px; }
  .iv-inputbar { padding: 5px 5px 5px 14px; }
  .iv-controls { gap: 6px; }
  .iv-controls .btn { padding: 7px 11px; font-size: 12.5px; }
}
