/* Dirección B · «Aula»: la sala. Dos zonas (el directo fijo arriba; lo que pasa en la sala debajo)
   y Clara siempre presente en la franja inferior. Al final, «qué se ve según el estado»
   (contrato: docs/tecnico/contrato-sala.md). */

.b-room { --strip-h: 76px; --live-w: 720px; background: var(--canvas); }
.b-noscript { padding: 14px var(--gutter); background: var(--peach); color: var(--peach-ink); }

/* ---------------------------------------------------------------- antes de entrar */
.b-lobby {
  min-height: 100dvh; padding: max(28px, env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 18px;
  background:
    radial-gradient(80% 50% at 50% 0%, rgb(58 114 240 / .16), rgb(58 114 240 / 0) 70%),
    linear-gradient(180deg, var(--paper) 0%, var(--canvas) 100%);
}
.b-lobby-card { width: 100%; max-width: 420px; padding: 18px 20px 20px; border-radius: 26px; background: var(--paper); box-shadow: var(--shadow-2); border: 1px solid var(--line); }
.b-lobby-event { display: flex; gap: 12px; align-items: center; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.b-lobby-event img { width: 56px; height: 56px; border-radius: 16px; object-fit: cover; flex: none; box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px var(--peach-2); }
.b-lobby-live { display: inline-flex; align-items: center; gap: 6px; font: 700 .72rem/1.4 var(--font-display); text-transform: uppercase; letter-spacing: .08em; color: var(--rose); }
.b-lobby-title { font: 800 1rem/1.25 var(--font-display); letter-spacing: -.01em; }
.b-lobby-by { font-size: .85rem; color: var(--ink-3); }
.b-lobby-form { display: grid; gap: 8px; }
.b-lobby-form h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.025em; margin-bottom: 8px; text-wrap: balance; }
.b-lobby-form label { font: 700 .95rem/1.3 var(--font-display); }
.b-lobby-form .b-help { margin-bottom: 10px; }
.b-lobby-ticket { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; font-size: .82rem; color: var(--ink-3); }
.b-lobby-ticket .i { width: 18px; height: 18px; }
.b-lobby-ticket.has-ticket { color: var(--green-ink); font-weight: 600; }
.b-lobby-foot { font-size: .8rem; color: var(--ink-3); }

.b-live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.b-live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid currentColor; opacity: .5; animation: b-ping 1.6s ease-out infinite; }
@keyframes b-ping { from { transform: scale(.5); opacity: .7; } to { transform: scale(1.5); opacity: 0; } }

.b-loading { min-height: 100dvh; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; color: var(--ink-2); font-weight: 600; }

/* ---------------------------------------------------------------- zona 1: el directo */
.b-live { max-width: var(--live-w); margin: 0 auto; }
.b-top { position: sticky; top: 0; z-index: 30; background: var(--paper); box-shadow: 0 1px 0 var(--line), 0 8px 20px rgb(15 26 51 / .06); }
.b-live-head {
  display: flex; align-items: center; gap: 10px; min-height: 48px;
  padding: max(4px, env(safe-area-inset-top)) 108px 4px 12px; /* a la derecha, el mando de simulación */
  font-size: .85rem;
}
.b-badge-live {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 9px; border-radius: 99px;
  background: var(--rose); color: #fff; font: 800 .7rem/1.3 var(--font-display); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; flex: none;
}
.b-badge-ended { display: none; padding: 4px 10px; border-radius: 99px; background: var(--canvas); color: var(--ink-2); font: 800 .7rem/1.3 var(--font-display); letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line-2); }
.b-stat { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.b-stat .i { width: 17px; height: 17px; color: var(--ink-3); }
.b-stat strong { font-weight: 700; color: var(--ink); }
.b-stat-min { color: var(--ink-3); }
.b-iconbtn { display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; }
.b-iconbtn .i { width: 22px; height: 22px; }
.b-iconbtn:active { background: var(--canvas); }

.b-stage-wrap { position: relative; }
.b-stage-wrap .a54stage { --stage-radius: 0; --stage-font: var(--font); }
.b-conn {
  position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 3;
  display: none; align-items: center; gap: 8px; width: max-content; max-width: calc(100% - 24px);
  padding: 8px 14px; border-radius: 99px; font-size: .84rem; font-weight: 600; line-height: 1.3;
  box-shadow: 0 6px 20px rgb(0 0 0 / .25);
}
.b-conn-lost { background: rgb(15 26 51 / .88); color: #fff; }
.b-conn-lost .b-spinner { border-color: rgb(255 255 255 / .25); border-top-color: #fff; }
.b-conn-back { background: var(--green); color: #fff; }
.b-conn .i { width: 18px; height: 18px; }
[data-conn="lost"] .a54stage { filter: grayscale(.7) brightness(.55); transition: filter .3s ease; }

/* ---------------------------------------------------------------- zona 2: lo que pasa */
.b-flow { display: flex; flex-direction: column; gap: 12px; padding: 12px 12px calc(var(--strip-h) + 28px + env(safe-area-inset-bottom)); }

.b-note {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px;
  background: var(--paper); box-shadow: var(--shadow-1); font-size: .92rem; line-height: 1.45; color: var(--ink-2);
  animation: b-rise .35s var(--ease);
}
.b-note-ico { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--blue-50); color: var(--blue); }
.b-note-ico .i { width: 19px; height: 19px; }
.b-note-late { background: var(--peach); box-shadow: none; border: 1px solid var(--peach-2); color: var(--peach-ink); align-items: flex-start; flex-wrap: wrap; }
.b-note-late .b-note-ico { background: #fff; color: var(--peach-ink); }
.b-note-late p { flex: 1 1 200px; padding-top: 6px; color: #5d3410; }
.b-note-late .b-btn { margin-left: auto; color: var(--peach-ink); min-height: 40px; }
.b-note-answering { background: var(--blue-50); box-shadow: none; border: 1px solid var(--blue-100); color: var(--blue); font: 700 .95rem/1.3 var(--font-display); }
.b-note-floor .b-note-ico { background: var(--rose-50); color: var(--rose); }
.b-note-floor { color: var(--ink); font-weight: 600; }
.b-note-watching { color: var(--ink); }
@keyframes b-rise { from { opacity: 0; transform: translateY(6px); } }

.b-pulse { position: relative; width: 10px; height: 10px; flex: none; border-radius: 50%; background: currentColor; }
.b-pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; animation: b-ping 1.4s ease-out infinite; }

/* Clara habla: presentadora que da paso a Marta */
.b-clara {
  position: relative; padding: 16px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, var(--blue-50) 0%, var(--paper) 60%);
  border: 1.5px solid var(--blue-200); box-shadow: var(--shadow-2);
  animation: b-clara-in .45s var(--ease);
}
.b-clara::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--blue-bright), var(--blue)); }
@keyframes b-clara-in { from { opacity: 0; transform: translateY(-8px) scale(.985); } }
.b-clara-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.b-clara-face { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--blue); }
.b-clara-who { min-width: 0; }
.b-clara-who p:first-child { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.b-clara-who strong { font: 800 1.08rem/1.2 var(--font-display); }
.b-clara-kicker { margin-top: 3px; font: 600 .82rem/1.35 var(--font); color: var(--blue); }
.b-clara-kicker-round [data-slot="clara-round"] { font-weight: 800; }
.b-clara-text { font: 500 1.06rem/1.55 var(--font); color: var(--ink); min-height: 3.1em; text-wrap: pretty; }
[data-clara-typing="true"] .b-clara-text::after {
  content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -.18em;
  background: var(--blue); animation: b-caret 1s steps(1) infinite;
}
@keyframes b-caret { 50% { opacity: 0; } }
.b-clara-mine {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 6px 12px 6px 8px; border-radius: 99px;
  background: var(--blue); color: #fff; font: 700 .88rem/1.3 var(--font-display);
  animation: b-pop .45s var(--ease);
}
.b-clara-mine .i { width: 18px; height: 18px; stroke-width: 2.6; }
@keyframes b-pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.05); } }

/* Tu pregunta y su recorrido */
.b-myq { padding: 16px; border-radius: 22px; background: var(--paper); box-shadow: var(--shadow-1); border: 1px solid var(--line); animation: b-rise .35s var(--ease); }
.b-myq-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.b-myq-head h2 { font-size: 1.12rem; font-weight: 800; }
.b-myq-kind { display: none; align-items: center; gap: 5px; padding: 3px 10px 3px 8px; border-radius: 99px; background: var(--canvas); color: var(--ink-2); font-size: .78rem; font-weight: 600; }
.b-myq-kind .i { width: 15px; height: 15px; }
.b-myq-text {
  margin: 0 0 14px; padding: 10px 14px; border-radius: 14px; background: var(--blue-50);
  font: 500 .98rem/1.45 var(--font); color: var(--ink); quotes: "«" "»" "“" "”";
}
.b-myq-text::before { content: open-quote; color: var(--blue); }
.b-myq-text::after { content: close-quote; color: var(--blue); }
.b-myq-text:empty { display: none; }
.b-steps { display: grid; gap: 0; }
.b-step { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding-bottom: 14px; }
.b-step:last-child { padding-bottom: 0; }
.b-step::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 2px; width: 2px; border-radius: 2px; background: var(--line); }
.b-step:last-child::before { display: none; }
.b-step-dot {
  position: relative; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--line-2); background: var(--paper); color: transparent;
  transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}
.b-step-dot .i { width: 16px; height: 16px; stroke-width: 2.8; }
.b-step > div { display: grid; gap: 1px; padding-top: 3px; min-width: 0; }
.b-step strong { font: 700 .98rem/1.3 var(--font-display); color: var(--ink-3); transition: color .3s ease; }
.b-step [data-slot] { font-size: .88rem; line-height: 1.45; color: var(--ink-3); overflow-wrap: anywhere; }
@keyframes b-breathe-dot { 50% { transform: scale(.55); opacity: .6; } }
.b-myq-sim { display: none; margin-top: 12px; font-size: .8rem; color: var(--ink-3); }
.b-myq-another { margin-top: 14px; }

/* Lo que se pregunta en la sala */
.b-topics { padding-top: 6px; }
.b-topics-head { padding: 0 4px 10px; }
.b-topics-head h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: 4px; }
.b-topic-list { display: grid; gap: 10px; }
.b-topics-empty { display: none; padding: 18px; border-radius: 18px; border: 1.5px dashed var(--line-2); text-align: center; color: var(--ink-3); }
.b-topic {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 14px 12px 14px 16px; border-radius: 18px; background: var(--paper);
  border: 1.5px solid transparent; box-shadow: var(--shadow-1);
  transition: background-color .3s ease, border-color .3s ease, opacity .3s ease;
}
.b-topic-main { min-width: 0; display: grid; gap: 8px; }
.b-topic-flags { display: none; flex-wrap: wrap; gap: 6px; }
.b-flag { display: none; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font: 700 .72rem/1.6 var(--font-display); letter-spacing: .01em; }
.b-flag .i { width: 14px; height: 14px; stroke-width: 2.6; }
.b-flag .b-pulse { width: 7px; height: 7px; }
.b-flag-new { background: var(--peach); color: var(--peach-ink); }
.b-flag-answering { background: var(--blue); color: #fff; }
.b-flag-answered { background: var(--green-50); color: var(--green-ink); }
.b-flag-mine { background: var(--blue-100); color: var(--blue-700); }
.b-topic-label { font: 650 1rem/1.35 var(--font); color: var(--ink); overflow-wrap: anywhere; }
.b-topic-meter { display: flex; align-items: center; gap: 10px; }
.b-topic-bar { position: relative; flex: 1; height: 8px; border-radius: 8px; background: var(--blue-50); overflow: hidden; }
.b-topic-bar span {
  position: absolute; inset: 0 auto 0 0; border-radius: 8px;
  width: max(6%, calc(var(--share, 0) * 100%));
  background: linear-gradient(90deg, var(--blue-bright), var(--blue));
  transition: width .7s var(--ease);
}
.b-topic-count { flex: none; font-size: .82rem; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

.b-metoo {
  display: grid; justify-items: center; align-content: center; gap: 4px;
  width: 82px; min-height: 64px; padding: 8px 4px; border-radius: 16px;
  border: 1.5px solid var(--line-2); background: var(--paper); color: var(--blue);
  font: 700 .78rem/1.15 var(--font-display); cursor: pointer; text-align: center;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.b-metoo:active:not([disabled]) { transform: scale(.96); }
.b-metoo-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--blue-50); color: var(--blue); transition: inherit; }
.b-metoo-ico .i-on, .b-metoo[aria-pressed="true"] .b-metoo-ico .i-off { display: none; }
.b-metoo[aria-pressed="true"] .b-metoo-ico .i-on { display: block; }
.b-metoo-ico .i { width: 15px; height: 15px; stroke-width: 2.8; }
.b-metoo-on { display: none; }
.b-metoo[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.b-metoo[aria-pressed="true"] .b-metoo-ico { background: #fff; border-color: #fff; color: var(--blue); }
.b-metoo[aria-pressed="true"] .b-metoo-off { display: none; }
.b-metoo[aria-pressed="true"] .b-metoo-on { display: inline; }
.b-metoo[disabled] { opacity: .45; cursor: default; }

.b-topic:is([data-status="new"], [data-status="answering"], [data-status="answered"], [data-mine="true"]) .b-topic-flags { display: flex; }
.b-topic[data-status="new"] .b-flag-new,
.b-topic[data-status="answering"] .b-flag-answering,
.b-topic[data-status="answered"] .b-flag-answered,
.b-topic[data-mine="true"] .b-flag-mine { display: inline-flex; }
.b-topic[data-status="new"] { animation: b-rise .45s var(--ease); }
.b-topic[data-status="answering"] { border-color: var(--blue); background: linear-gradient(180deg, var(--blue-50), var(--paper)); }
.b-topic[data-status="answered"] { background: #fafbfd; box-shadow: none; border-color: var(--line); }
.b-topic[data-status="answered"] .b-topic-label { color: var(--ink-3); }
.b-topic[data-status="answered"] .b-topic-bar span { background: #b5c0d6; }
.b-topic[data-mine="true"]:not([data-status="answering"]) { border-color: var(--blue-200); }
.b-topic[data-mine="true"]::before { content: ""; position: absolute; left: -1.5px; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--blue); }

.b-room-foot { text-align: center; font-size: .78rem; color: var(--ink-3); padding: 8px 0 0; }

/* Fin de la clase */
.b-end { display: none; padding: 24px 20px; border-radius: 24px; background: var(--paper); box-shadow: var(--shadow-2); text-align: center; animation: b-rise .4s var(--ease); }
.b-end-clara { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--blue); }
.b-end h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.025em; }
.b-end-lead { margin: 6px 0 16px; color: var(--ink-2); }
.b-end-list { display: grid; gap: 10px; text-align: left; margin-bottom: 14px; }
.b-end-list li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--canvas); font-weight: 600; font-size: .95rem; line-height: 1.4; }
.b-end-ico { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 11px; background: var(--blue); color: #fff; }
.b-end-when { font-size: .88rem; color: var(--ink-3); margin-bottom: 18px; line-height: 1.5; }

/* ---------------------------------------------------------------- lo que pide decidir ahora */
.b-dock {
  position: fixed; z-index: 45; bottom: calc(var(--strip-h) + 8px + env(safe-area-inset-bottom));
  left: max(8px, calc((100% - var(--live-w)) / 2 + 8px)); right: max(8px, calc((100% - var(--live-w)) / 2 + 8px));
  max-height: calc(100dvh - var(--strip-h) - 120px); overflow: auto; overscroll-behavior: contain;
  padding: 16px 16px 14px; border-radius: 24px; background: var(--paper);
  box-shadow: 0 0 0 1px var(--line), 0 18px 50px rgb(15 26 51 / .24);
  animation: b-dock-in .35s var(--ease);
}
@keyframes b-dock-in { from { opacity: 0; transform: translateY(16px); } }
.b-dock-kicker { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font: 700 .75rem/1.3 var(--font-display); text-transform: uppercase; letter-spacing: .08em; color: var(--blue); }
.b-dock-kicker .i { width: 17px; height: 17px; }
.b-dock-title { font: 800 1.15rem/1.3 var(--font-display); letter-spacing: -.015em; color: var(--ink); text-wrap: pretty; }
.b-dock-text { margin: 6px 0 14px; color: var(--ink-2); font-size: .93rem; line-height: 1.45; }
.b-dock-hint { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; font-size: .82rem; color: var(--ink-3); text-align: center; }
.b-dock-hint .i { width: 16px; height: 16px; }
.b-dock .b-simline { margin-top: 10px; text-align: center; }
.b-dock .b-choice .b-btn { min-height: 54px; }

.b-floor-connecting, .b-pairs-searching { display: grid; justify-items: center; gap: 12px; padding: 10px 0 4px; text-align: center; }
.b-speaking-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.b-levels { display: flex; align-items: center; gap: 3px; height: 28px; padding: 0 10px; border-radius: 12px; background: var(--rose-50); }
.b-levels i { display: block; width: 4px; height: 8px; border-radius: 2px; background: var(--rose); animation: b-level 1s ease-in-out infinite; }
.b-levels i:nth-child(2) { animation-delay: -.2s; } .b-levels i:nth-child(3) { animation-delay: -.5s; }
.b-levels i:nth-child(4) { animation-delay: -.7s; } .b-levels i:nth-child(5) { animation-delay: -.35s; }
@keyframes b-level { 50% { height: 22px; } }

.b-pairs-invited .b-dock-title { font-size: 1.05rem; }
.b-pairs-topic { margin: 12px 0 14px; padding: 10px 12px; border-radius: 14px; background: var(--blue-50); font-size: .93rem; line-height: 1.45; color: var(--ink); }
.b-pairs-topic > span:first-child { display: block; font: 700 .7rem/1.4 var(--font-display); text-transform: uppercase; letter-spacing: .08em; color: var(--blue); }
.b-partner { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; }
.b-partner-avatar { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--peach); color: var(--peach-ink); }
.b-partner-avatar .i { width: 22px; height: 22px; }
.b-partner-label { font-size: .8rem; color: var(--ink-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.b-partner-name { font: 800 1.08rem/1.25 var(--font-display); }
.b-countdown { display: grid; justify-items: end; }
.b-countdown-n { font: 800 1.7rem/1 var(--font-display); color: var(--blue); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.b-countdown-l { font-size: .72rem; color: var(--ink-3); }
.b-pairs-paired .b-pairs-topic { margin-bottom: 6px; }
.b-pairs-back { margin-top: 12px; }

/* ---------------------------------------------------------------- zona 3: la franja de Clara */
.b-strip {
  position: fixed; z-index: 40; bottom: 0;
  left: max(0px, calc((100% - var(--live-w)) / 2)); right: max(0px, calc((100% - var(--live-w)) / 2));
  display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: stretch;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  background: rgb(255 255 255 / .96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 -1px 0 var(--line), 0 -12px 30px rgb(15 26 51 / .07);
}
.b-strip-clara {
  display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 60px; padding: 6px 12px 6px 6px;
  border-radius: 18px; border: 1.5px solid var(--blue-200); background: var(--blue-50); text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background-color .15s ease, transform .1s ease, border-color .15s ease;
}
.b-strip-clara:active { background: var(--blue-100); transform: scale(.985); }
.b-strip-face { position: relative; flex: none; }
.b-strip-face img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #fff; }
.b-strip-face::after { /* Clara está ahí: punto azul */
  content: ""; position: absolute; right: -1px; bottom: -1px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--blue-bright); border: 2.5px solid var(--blue-50);
}
.b-strip-text { display: grid; min-width: 0; }
.b-strip-title { font: 800 1rem/1.25 var(--font-display); color: var(--blue-700); letter-spacing: -.01em; }
.b-strip-sub { display: none; font-size: .78rem; line-height: 1.3; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.b-strip-sub:not(.b-strip-sub-idle) { display: none; }
.b-strip-btn {
  display: grid; justify-items: center; align-content: center; gap: 3px; min-width: 60px; padding: 0 6px; min-height: 60px;
  border-radius: 16px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink-2);
  font: 700 .72rem/1.1 var(--font-display); text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.b-strip-btn .i { width: 22px; height: 22px; }
.b-strip-btn:active { background: var(--canvas); }
.b-hand-up-label { display: none; }
[data-hand="up"] .b-strip-hand, [data-hand="offered"] .b-strip-hand { background: var(--blue); border-color: var(--blue); color: #fff; }
[data-hand="up"] .b-strip-hand .b-hand-up-label, [data-hand="offered"] .b-strip-hand .b-hand-up-label { display: inline; }
[data-hand="up"] .b-strip-hand .b-hand-down-label, [data-hand="offered"] .b-strip-hand .b-hand-down-label { display: none; }
[data-hand="up"] .b-strip-hand .i { animation: b-wave 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes b-wave { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-12deg); } 80% { transform: rotate(10deg); } 90% { transform: rotate(-6deg); } }

/* El subtítulo de la franja cuenta qué hace Clara ahora */
:is([data-question="received"], [data-question="transcribed"], [data-question="grouped"]) .b-strip-sub-idle { display: none; }
:is([data-question="received"], [data-question="transcribed"], [data-question="grouped"]) .b-strip-sub-question { display: -webkit-box; }
[data-clara="round"] .b-strip-sub-idle, [data-clara="round"] .b-strip-sub-question { display: none; }
[data-clara="round"] .b-strip-sub-round { display: -webkit-box; color: var(--blue); font-weight: 600; }
:is([data-clara="intro"], [data-clara="round"]) .b-strip-face img { animation: b-talk 1.6s ease-in-out infinite; }
@keyframes b-talk { 50% { box-shadow: 0 0 0 2px #fff, 0 0 0 6px rgb(58 114 240 / .35); } }

.b-toast { position: fixed; z-index: 60; left: 16px; right: 16px; bottom: calc(var(--strip-h) + 16px + env(safe-area-inset-bottom)); max-width: 480px; margin: 0 auto; pointer-events: none; }
.b-toast:not(:empty) { padding: 12px 16px; border-radius: 14px; background: var(--ink); color: #fff; font-size: .9rem; box-shadow: 0 10px 30px rgb(15 26 51 / .3); animation: b-rise .3s var(--ease); }

/* ---------------------------------------------------------------- hojas de la sala */
.b-ask-head { align-items: flex-start; }
.b-ask-face { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue); }
.b-ask-who { flex: 1; min-width: 0; }
.b-ask-who p { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.b-ask-who strong { font: 800 .98rem/1.2 var(--font-display); }
.b-ask-who h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }

.b-callout { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--blue-50); color: var(--ink); font-size: .93rem; line-height: 1.45; margin-bottom: 12px; }
.b-callout-warm { background: var(--peach); color: #5d3410; align-items: flex-start; }
.b-callout-ico { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: #fff; color: var(--peach-ink); }
.b-callout-warm p { padding-top: 6px; }

.b-ask-choose { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.b-tile {
  display: grid; justify-items: center; align-content: start; gap: 6px; min-height: 132px; padding: 18px 10px 16px;
  border-radius: 20px; border: 1.5px solid var(--blue-200); background: var(--paper); color: var(--ink); cursor: pointer; text-align: center;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
@media (hover: hover) { .b-tile:hover { background: var(--blue-50); } }
.b-tile:active { transform: scale(.98); background: var(--blue-100); }
.b-tile-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--blue); color: #fff; margin-bottom: 4px; box-shadow: 0 6px 14px rgb(11 68 168 / .25); }
.b-tile-ico .i { width: 26px; height: 26px; }
.b-tile-title { font: 800 1.08rem/1.2 var(--font-display); }
.b-tile-sub { font-size: .8rem; color: var(--ink-3); line-height: 1.3; }
.b-ask-voice-note { padding: 0 2px; }

.b-ask-mic-problem .b-btn { margin-top: 2px; }
.b-rec { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px; padding: 18px; margin-bottom: 14px; border-radius: 20px; background: var(--rose-50); }
.b-rec-dot { grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 0 rgb(196 31 92 / .4); animation: b-rec 1.4s ease-out infinite; }
@keyframes b-rec { to { box-shadow: 0 0 0 14px rgb(196 31 92 / 0); } }
.b-rec-label { font: 700 .8rem/1.2 var(--font-display); text-transform: uppercase; letter-spacing: .08em; color: var(--rose); }
.b-rec-time { font: 800 1.6rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--ink); }
.b-rec-time-done { font-size: .9rem; font-weight: 600; color: var(--ink-3); margin: 6px 0 14px; text-align: center; }
.b-ask-listen { font-weight: 600; margin-bottom: 10px; }
.b-ask audio { width: 100%; height: 48px; }
.b-room .b-ask textarea { min-height: 128px; resize: vertical; line-height: 1.5; margin-bottom: 12px; display: block; }
.b-ask .error { margin-top: 8px; }

.b-hand-up-state { display: flex; gap: 12px; align-items: center; padding: 14px; margin-bottom: 10px; border-radius: 16px; background: var(--blue-50); font: 700 1rem/1.4 var(--font-display); color: var(--ink); }
.b-hand-up-ico { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--blue); color: #fff; }
.b-hand-up-ico .i { width: 24px; height: 24px; }
.b-hand .b-help { margin-bottom: 16px; }

.b-info-title { font: 800 1.1rem/1.3 var(--font-display); }
.b-info-by { color: var(--ink-3); font-size: .9rem; margin-bottom: 14px; }
.b-info-list { display: grid; gap: 0; margin-bottom: 14px; }
.b-info-list li { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); font-size: .93rem; line-height: 1.4; color: var(--ink-2); }
.b-info-list li:first-child { border-top: 0; }
.b-info-list .i { color: var(--blue); }
.b-info-list strong { color: var(--ink); }
.b-info-clara { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--blue-50); font-size: .86rem; line-height: 1.45; color: var(--ink-2); }
.b-info-clara img { width: 40px; height: 40px; border-radius: 50%; flex: none; }

/* ---------------------------------------------------------------- pantallas anchas */
@media (max-width: 370px) {
  .b-live-head { gap: 8px; padding-left: 10px; }
  .b-stat-min { display: none; }
  .b-strip-btn { width: 54px; }
  .b-strip-clara { gap: 10px; }
  .b-metoo { width: 74px; }
}
@media (min-width: 760px) {
  .b-top { top: 0; padding: 0 0 12px; background: var(--canvas); box-shadow: none; }
  .b-live-head { background: transparent; }
  .b-stage-wrap { padding: 0 12px; }
  .b-stage-wrap .a54stage { --stage-radius: 18px; box-shadow: var(--shadow-2); }
  .b-flow { padding-inline: 12px; }
}

/* ---------------------------------------------------------------- qué se ve según el estado */

/* Fase */
.b-lobby, .b-loading, .b-live { display: none; }
[data-phase="lobby"] .b-lobby { display: flex; }
[data-phase="loading"] .b-loading { display: flex; }
:is([data-phase="live"], [data-phase="ended"]) .b-live { display: block; }
[data-phase="ended"] .b-end { display: block; }
[data-phase="ended"] :is(.b-strip, .b-dock, .b-clara, .b-note, .b-stage-wrap, .b-badge-live, .b-myq-another) { display: none !important; }
[data-phase="ended"] .b-badge-ended { display: inline-block; }
[data-phase="ended"] .b-stat { display: none; }
[data-phase="ended"] .b-flow { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
[data-phase="ended"] .b-top { position: static; }

/* Conexión */
[data-conn="lost"] .b-conn-lost, [data-conn="back"] .b-conn-back { display: flex; }
[data-conn="lost"] :is(.b-strip > *, .b-metoo) { opacity: .5; }

/* Llegas tarde · Marta responde · otra persona habla · parejas mientras miras */
.b-note-late, .b-note-answering, .b-note-floor, .b-note-watching { display: none; }
[data-late="true"] .b-note-late { display: flex; }
[data-marta="answering"] .b-note-answering { display: flex; }
[data-floor="other"] .b-note-floor { display: flex; }
[data-pairs="watching"] .b-note-watching { display: flex; }

/* Clara: cuando se presenta o da una ronda */
.b-clara, .b-clara-mine, .b-clara-kicker-intro, .b-clara-kicker-round { display: none; }
:is([data-clara="intro"], [data-clara="round"]) .b-clara { display: block; }
[data-clara="intro"] .b-clara-kicker-intro { display: block; }
[data-clara="round"] .b-clara-kicker-round { display: block; }
[data-clara="round"][data-clara-mine="true"] .b-clara-mine { display: inline-flex; }
[data-clara="round"][data-clara-mine="true"] .b-clara { border-color: var(--blue); }

/* La palabra */
.b-dock-floor, .b-floor-offered, .b-floor-connecting, .b-floor-speaking { display: none; }
:is([data-hand="offered"], [data-hand="connecting"], [data-hand="speaking"]) .b-dock-floor { display: block; }
[data-hand="offered"] .b-floor-offered, [data-hand="speaking"] .b-floor-speaking { display: block; }
[data-hand="connecting"] .b-floor-connecting { display: grid; }
[data-hand="speaking"] .b-dock-floor { border: 2px solid var(--rose); }
.b-hand-sheet-down, .b-hand-sheet-up { display: none; }
[data-hand="down"] .b-hand-sheet-down { display: block; }
:is([data-hand="up"], [data-hand="offered"], [data-hand="connecting"], [data-hand="speaking"]) .b-hand-sheet-up { display: block; }

/* Parejas */
.b-dock-pairs, .b-pairs-invited, .b-pairs-searching, .b-pairs-paired, .b-pairs-back { display: none; }
:is([data-pairs="invited"], [data-pairs="searching"], [data-pairs="paired"]) .b-dock-pairs { display: block; }
[data-pairs="invited"] .b-pairs-invited, [data-pairs="paired"] .b-pairs-paired { display: block; }
[data-pairs="searching"] .b-pairs-searching { display: grid; }
:is([data-pairs="searching"], [data-pairs="paired"]) .b-pairs-back { display: flex; }
/* Si a la vez te dan la palabra, manda la palabra (no se apilan dos tarjetas) */
:is([data-hand="offered"], [data-hand="connecting"], [data-hand="speaking"]) .b-dock-pairs { display: none; }

/* Tu pregunta y su recorrido */
.b-myq, .b-myq-another { display: none; }
[data-question]:not([data-question="none"]) .b-myq { display: block; }
[data-question-kind="text"] .b-myq-kind-text, [data-question-kind="audio"] .b-myq-kind-audio { display: inline-flex; }
[data-question-kind="audio"] .b-myq-sim { display: block; }
[data-question-kind="audio"] .b-myq-text { display: none; }
[data-question="told"] .b-myq-another { display: flex; }
[data-question="told"] .b-myq { border-color: var(--green-100); }
/* hechos */
[data-question]:not([data-question="none"]) .b-step-received .b-step-dot,
:is([data-question="transcribed"], [data-question="grouped"], [data-question="told"]) .b-step-transcribed .b-step-dot,
:is([data-question="grouped"], [data-question="told"]) .b-step-grouped .b-step-dot,
[data-question="told"] .b-step-told .b-step-dot { background: var(--green); border-color: var(--green); color: #fff; }
[data-question]:not([data-question="none"]) .b-step-received::before,
:is([data-question="transcribed"], [data-question="grouped"], [data-question="told"]) .b-step-transcribed::before,
:is([data-question="grouped"], [data-question="told"]) .b-step-grouped::before { background: var(--green); }
[data-question]:not([data-question="none"]) .b-step-received strong,
:is([data-question="transcribed"], [data-question="grouped"], [data-question="told"]) .b-step-transcribed strong,
:is([data-question="grouped"], [data-question="told"]) .b-step-grouped strong,
[data-question="told"] .b-step-told strong { color: var(--ink); }
[data-question]:not([data-question="none"]) .b-step-received [data-slot],
:is([data-question="transcribed"], [data-question="grouped"], [data-question="told"]) .b-step-transcribed [data-slot],
:is([data-question="grouped"], [data-question="told"]) .b-step-grouped [data-slot],
[data-question="told"] .b-step-told [data-slot] { color: var(--ink-2); }
/* en curso: el siguiente paso */
[data-question="received"] .b-step-transcribed .b-step-dot,
[data-question="transcribed"] .b-step-grouped .b-step-dot,
[data-question="grouped"] .b-step-told .b-step-dot { border-color: var(--blue); }
[data-question="received"] .b-step-transcribed .b-step-dot::after,
[data-question="transcribed"] .b-step-grouped .b-step-dot::after,
[data-question="grouped"] .b-step-told .b-step-dot::after {
  content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--blue); animation: b-breathe-dot 1.6s ease-in-out infinite;
}
[data-question="received"] .b-step-transcribed strong,
[data-question="transcribed"] .b-step-grouped strong,
[data-question="grouped"] .b-step-told strong { color: var(--blue); }
[data-question="received"] .b-step-transcribed [data-slot],
[data-question="transcribed"] .b-step-grouped [data-slot],
[data-question="grouped"] .b-step-told [data-slot] { color: var(--ink-2); }
/* Agrupada: tema (azul) o pregunta singular (cálida) */
[data-question-group="topic"] .b-step-grouped [data-slot] { color: var(--blue-700); font-weight: 600; }
[data-question-group="singular"] .b-step-grouped [data-slot] { margin-top: 4px; padding: 8px 10px; border-radius: 10px; background: var(--peach); color: #5d3410; }
[data-question="told"] .b-step-told [data-slot] { color: var(--green-ink); font-weight: 600; }

/* Lista vacía */
[data-topics="0"] .b-topics-empty { display: block; }

/* Hoja de pregunta: qué se ve en cada momento (data-ask) */
.b-ask-pending, .b-ask-choose, .b-ask-voice-note, .b-ask-mic-asking, .b-ask-mic-problem, .b-ask-mic-unavailable, .b-ask-mic-denied,
.b-ask-recording, .b-ask-recorded, .b-ask-writing, .b-ask-sending { display: none; }
[data-ask="pending"] .b-ask-pending { display: flex; }
[data-ask="choose"] .b-ask-choose { display: grid; }
:is([data-ask="choose"], [data-ask="recording"]) .b-ask-voice-note { display: flex; }
[data-ask="mic-asking"] .b-ask-mic-asking { display: flex; }
:is([data-ask="mic-unavailable"], [data-ask="mic-denied"]) .b-ask-mic-problem { display: block; }
[data-ask="mic-unavailable"] .b-ask-mic-unavailable, [data-ask="mic-denied"] .b-ask-mic-denied { display: block; }
[data-ask="recording"] .b-ask-recording { display: block; }
[data-ask="recorded"] .b-ask-recorded { display: block; }
[data-ask="writing"] .b-ask-writing { display: block; }
[data-ask="sending"] .b-ask-sending { display: flex; }

/* Plus Jakarta tiene el espacio estrecho: un poco de aire entre palabras en sus usos de texto */
:is(.b-dock-title, .b-clara-who strong, .b-strip-title, .b-flag, .b-metoo, .b-lobby-title, .b-tile-title, .b-step strong,
    .b-partner-name, .b-clara-mine, .b-note-answering, .b-hand-up-state, .b-info-title, .b-clara-kicker-round, .b-strip-btn,
    .b-badge-live, .b-lobby-live, .b-dock-kicker, .b-rec-label) { word-spacing: .06em; }

/* Título de la hoja de la mano según el estado */
:is([data-hand="up"], [data-hand="offered"], [data-hand="connecting"], [data-hand="speaking"]) .b-hand .b-hand-up-label { display: inline; }
:is([data-hand="up"], [data-hand="offered"], [data-hand="connecting"], [data-hand="speaking"]) .b-hand .b-hand-down-label { display: none; }
