/* ==========================================================================
   ESTEEM — INTERFAZ
   Chrome, primitivas y las vistas. Todo sobre los tokens de tokens.css.
   ========================================================================== */

/* ==========================================================================
   1 · CHROME
   ========================================================================== */

/* `fixed` y no `absolute`: al volver a él con Tab desde abajo de la página se
   quedaba enfocado pero fuera de la vista. */
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 1000;
  padding: 8px 14px; border-radius: var(--r-sm);
  background: var(--brand); color: var(--brand-ink); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 10px; }

.topbar {
  position: sticky; top: 0; z-index: var(--z-nav);
  display: flex; align-items: center; gap: 18px;
  padding: 10px 22px; min-height: 60px;
  background: rgba(10,10,11,.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.lockup { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 0 1 auto; text-decoration: none; color: inherit; }
a.lockup:hover .lockup-name { color: var(--brand-text); }
.lockup-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(150deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #000));
  color: var(--brand-ink);
  box-shadow: 0 3px 14px color-mix(in srgb, var(--brand) 26%, transparent);
}
.lockup-mark.has-logo { width: auto; min-width: 34px; max-width: 96px; padding: 3px 6px; background: #fff; box-shadow: none; }
.lockup-mark.has-logo img { max-height: 28px; width: auto; object-fit: contain; }
.lockup-text { display: flex; flex-direction: column; min-width: 0; }
.lockup-name {
  font-family: var(--serif); font-size: 1.2rem; letter-spacing: .06em; line-height: 1.05;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 26ch;
}
.lockup-sub {
  font-family: var(--mono); font-size: .58rem; color: var(--ink-3);
  letter-spacing: .17em; text-transform: uppercase; margin-top: 3px; white-space: nowrap;
}

/* Selector de sección: control segmentado */
.nav-seg {
  display: flex; gap: 2px; margin: 0 auto;
  padding: 3px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--line);
}
.nav-spacer { margin: 0 auto; }
.nav-seg-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 15px; border-radius: var(--r-full);
  font-size: .82rem; color: var(--ink-2); white-space: nowrap;
  transition: color var(--fast), background var(--fast);
}
.nav-seg-btn:hover { color: var(--ink); }
.nav-seg-btn.is-active {
  background: var(--brand); color: var(--brand-ink); font-weight: 600;
  box-shadow: 0 2px 12px color-mix(in srgb, var(--brand) 30%, transparent);
}

.topbar-status { display: flex; align-items: center; gap: 8px; flex: none; }
.net-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: var(--r-full);
  font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-line);
}
.role-badge {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  font-family: var(--mono); font-size: .6rem;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 5px 11px; border-radius: var(--r-full);
  color: var(--brand-text); border: 1px dashed var(--brand-line); background: var(--brand-dim);
}
.role-badge .chip-dot { background: currentColor; animation: pulse-dot 2.2s var(--ease) infinite; }

.tools { display: flex; align-items: center; gap: 7px; flex: none; }

.icon-btn {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  display: grid; place-items: center; flex: none;
  color: var(--ink-2);
  border: 1px solid var(--line); background: var(--surface);
  transition: color var(--fast), border-color var(--fast), background var(--fast);
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface-2); }
.icon-btn.is-off { color: var(--ink-3); }
#ico-sound-off { display: none; }

/* Menú de presentación */
.menu { position: relative; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: var(--z-menu);
  min-width: 270px; padding: 6px;
  border-radius: var(--r-md);
  background: rgba(18,18,20,.98);
  border: 1px solid var(--line-strong);
  box-shadow: 0 22px 50px rgba(0,0,0,.75);
  animation: rise .22s var(--ease);
}
.menu-label {
  padding: 8px 10px 4px;
  font-family: var(--mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
}
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: var(--r-sm);
  font-size: .84rem; color: var(--ink); text-align: left; text-decoration: none;
}
.menu-item .ico { color: var(--ink-3); flex: none; }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); outline: none; }
.menu-item.is-armed { background: var(--no-soft); color: var(--no); }
.menu-item.is-armed .ico { color: var(--no); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }

/* Navegación inferior móvil */
.botnav {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-nav);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  background: rgba(10,10,11,.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}
.botnav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 2px; color: var(--ink-3);
  font-family: var(--mono); font-size: .6rem; letter-spacing: .12em;
  transition: color var(--fast);
}
.botnav-item.is-active { color: var(--brand-text); }

/* Contenedor de vistas */
.main { position: relative; z-index: 2; padding: 28px 22px 72px; outline: none; }
.view { display: none; }
.view.is-active { display: block; animation: fade .35s var(--ease); }

.fatal {
  max-width: 560px; margin: 60px auto; padding: 26px;
  border-radius: var(--r-lg); border: 1px dashed var(--line-strong); background: var(--surface);
  font-size: .9rem; color: var(--ink-2);
}
.fatal strong { display: block; margin-bottom: 8px; color: var(--ink); font-size: 1rem; }
.fatal p + p { margin-top: 10px; }

/* ==========================================================================
   2 · PRIMITIVAS
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border-radius: var(--r-sm);
  font-size: .84rem; font-weight: 500; white-space: nowrap; text-decoration: none;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
  transition: transform var(--med) var(--ease), background var(--fast), border-color var(--fast), opacity var(--fast);
}
.btn:hover { transform: translateY(-1px); background: var(--surface); }
.btn:active { transform: translateY(0); }
.btn .ico { flex: none; }
.btn[disabled] { opacity: .4; pointer-events: none; }

.btn--primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.btn--primary:hover { background: color-mix(in srgb, var(--brand) 86%, white); }
.btn--danger { border-color: var(--no-line); color: var(--no); }
.btn--danger:hover { background: var(--no-soft); }
.btn--ghost { border-color: transparent; color: var(--ink-2); }
.btn--sim { border-color: var(--brand-line); color: var(--brand-text); background: var(--brand-dim); }

.btn--sm { padding: 7px 12px; font-size: .78rem; }
.btn--xs { padding: 5px 10px; font-size: .74rem; border-radius: var(--r-xs); }

.panel {
  background: linear-gradient(168deg, var(--surface-2), var(--surface) 46%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--lift-1);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.panel-title { font-family: var(--serif); font-weight: 400; font-size: 1.28rem; line-height: 1.2; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: .62rem;
  letter-spacing: .13em; text-transform: uppercase; white-space: nowrap;
  padding: 4px 9px; border-radius: var(--r-full);
  border: 1px solid var(--line-strong); color: var(--ink-2);
}
.chip--brand { color: var(--brand-text); border-color: var(--brand-line); background: var(--brand-soft); }
.chip--ok    { color: var(--ok);  border-color: var(--ok-line);  background: var(--ok-soft); }
.chip--no    { color: var(--no);  border-color: var(--no-line);  background: var(--no-soft); }
.chip-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
.chip-dot--live { animation: pulse-dot 1.9s var(--ease) infinite; }

/* Credencial por tipo: color funcional, siempre con su nombre escrito */
.cred-chip { --c: var(--cred-visitante-ink); color: var(--c); border-color: color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); }
.cred-chip.tone-ponente   { --c: var(--cred-ponente-ink); }
.cred-chip.tone-expositor { --c: var(--cred-expositor-ink); }
.cred-chip.tone-prensa    { --c: var(--cred-prensa-ink); }
.cred-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--cred-visitante-band); }
.cred-dot.tone-ponente { background: var(--cred-ponente-band); }
.cred-dot.tone-expositor { background: var(--cred-expositor-band); }
.cred-dot.tone-prensa { background: var(--cred-prensa-band); }

.field {
  display: flex; align-items: center; gap: 9px;
  padding: 0 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-3);
  transition: border-color var(--fast);
}
.field:focus-within { border-color: var(--brand-line); }
.field input {
  flex: 1; min-width: 0; padding: 10px 0;
  background: none; border: none; outline: none;
  font-size: .86rem; color: var(--ink);
}
.field input::placeholder { color: var(--ink-3); }

.select {
  padding: 10px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--bg-raise);
  font-size: .84rem; color: var(--ink); outline: none; min-width: 0;
  transition: border-color var(--fast);
}
.select:focus { border-color: var(--brand-line); }
.select option { background: var(--bg-raise); color: var(--ink); }

/* Buscador con lista */
.combo { position: relative; flex: 1; min-width: 0; }
.combo-input {
  width: 100%;
  padding: 10px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--bg-raise);
  font-size: .86rem; color: var(--ink); outline: none;
  transition: border-color var(--fast);
}
.combo-input::placeholder { color: var(--ink-3); }
.combo-input:focus { border-color: var(--brand-line); }
/* El foco de los campos era solo el borde de 1 px pasando a la marca al 38 %:
   1,7:1 frente al estado sin foco (WCAG 2.4.7 / 1.4.11). Llevan el mismo
   anillo que el resto de controles (tokens.css). */
.field:focus-within,
.select:focus-visible,
.combo-input:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; }
.combo-list {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px);
  max-height: 300px; overflow-y: auto;
  border-radius: var(--r-md);
  background: rgba(18,18,20,.99);
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 44px rgba(0,0,0,.75);
  animation: rise .2s var(--ease);
}
.combo-item {
  display: flex; flex-direction: column; gap: 2px;
  width: 100%; padding: 9px 13px; text-align: left; cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.combo-item:last-child { border-bottom: 0; }
.combo-item:hover, .combo-item.is-active { background: var(--brand-soft); }
.combo-name { font-size: .86rem; color: var(--ink); }
.combo-meta { font-family: var(--mono); font-size: .66rem; color: var(--ink-3); }
.combo-empty { padding: 14px; font-size: .82rem; color: var(--ink-3); text-align: center; }

/* Medidor: una barra que crece con --p (0…1), escrita por CSSOM */
.meter { height: 7px; border-radius: var(--r-full); background: var(--bg-sunken); overflow: hidden; border: 1px solid var(--line); }
.meter-fill {
  display: block; height: 100%; border-radius: var(--r-full);
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 55%, transparent), var(--brand));
  transform-origin: left; transform: scaleX(var(--p, 0));
  transition: transform .9s var(--ease), background var(--med);
}

/* Avisos */
.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: var(--z-toast); pointer-events: none; }
.toast {
  position: relative; pointer-events: auto;
  max-width: 360px; padding: 13px 17px 13px 20px;
  border-radius: var(--r-md);
  background: rgba(18,18,20,.97);
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 44px rgba(0,0,0,.7);
  animation: rise .35s var(--ease);
  transition: opacity var(--med), transform var(--med) var(--ease);
}
.toast::before {
  content: ''; position: absolute; left: 0; top: 12px; bottom: 12px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.toast.is-ok::before { background: var(--ok); }
.toast.is-no::before { background: var(--no); }
.toast-title {
  font-family: var(--mono); font-size: .66rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: 3px;
}
.toast.is-ok .toast-title { color: var(--ok); }
.toast.is-no .toast-title { color: var(--no); }
.toast-text { font-size: .82rem; color: var(--ink-2); }
.toast.is-leaving { opacity: 0; transform: translateY(12px); }

/* Diálogos */
.modal {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center; padding: 22px;
  background: rgba(4,4,5,.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade .25s var(--ease);
}
.modal-card {
  width: 100%; max-width: 760px; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--r-lg); border: 1px solid var(--line-strong);
  background: var(--bg-raise);
  box-shadow: 0 40px 90px rgba(0,0,0,.85);
  animation: rise .35s var(--ease);
}
.modal-card--wide { max-width: 980px; }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding: 20px 22px; border-bottom: 1px solid var(--line);
}
.modal-title { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; line-height: 1.2; }
.modal-sub { font-size: .82rem; color: var(--ink-3); margin-top: 4px; max-width: 60ch; }
.modal-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.modal-body { padding: 22px; overflow-y: auto; }
html.has-modal body { overflow: hidden; }

/* ==========================================================================
   3 · CREDENCIAL DEL ASISTENTE
   ========================================================================== */

.attendee { max-width: 440px; margin: 0 auto; }

.picker {
  display: grid; gap: 7px;
  padding: 12px 14px; margin-bottom: 20px;
  border-radius: var(--r-md);
  background: var(--surface); border: 1px dashed var(--line-strong);
}

.pass {
  --band: var(--cred-visitante-band);
  --band-ink: #ffffff;
  position: relative; overflow: hidden;
  background: linear-gradient(170deg, #1a1a1d, #111113 55%);
  border: 1px solid var(--line-strong); border-radius: 24px;
  box-shadow: var(--lift-2);
  animation: rise .7s var(--ease) both;
}
.pass.tone-ponente   { --band: var(--cred-ponente-band); --band-ink: var(--brand-ink); }
.pass.tone-expositor { --band: var(--cred-expositor-band); }
.pass.tone-prensa    { --band: var(--cred-prensa-band); }

/* Destello lento. Sutil a propósito. */
.pass::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 34%, rgba(255,255,255,.05) 47%, transparent 60%);
  transform: translateX(-130%);
  animation: sheen 8s var(--ease) 1.2s infinite;
}
@keyframes sheen { 0%, 75% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }

.pass-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 22px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--brand) 22%, #141416), #141416 70%);
  border-bottom: 1px solid var(--line);
}
.pass-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pass-mark {
  width: 22px; height: 22px; border-radius: 6px; flex: none;
  background: linear-gradient(150deg, var(--brand), color-mix(in srgb, var(--brand) 50%, #000));
}
.pass-logo { max-height: 26px; max-width: 110px; width: auto; object-fit: contain; background: #fff; border-radius: 5px; padding: 2px 5px; }
.pass-org {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pass-day {
  flex: none; font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-text); padding: 4px 9px; border-radius: var(--r-full); border: 1px solid var(--brand-line);
}

.pass-event { padding: 22px 24px 18px; }
.pass--missing .pass-event { padding: 28px 24px 26px; }
.missing-title { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; line-height: 1.1; margin: 10px 0 12px; }
.missing-text { color: var(--ink-2); font-size: .92rem; line-height: 1.55; }
.missing-text strong { color: var(--ink); font-family: var(--mono); font-weight: 500; }
.event-name {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2rem, 8.4vw, 2.5rem); line-height: 1.04;
  letter-spacing: -.015em; margin: 10px 0 10px;
}
.event-name em, .hero-title em, .cc-title em { font-style: italic; color: var(--brand-text); }
.event-meta, .hero-meta {
  display: flex; flex-wrap: wrap; gap: 4px 10px;
  font-family: var(--mono); font-size: .72rem; color: var(--ink-2); letter-spacing: .05em; text-transform: uppercase;
}
.event-meta span:not(:last-child)::after, .hero-meta span:not(:last-child)::after { content: ' ·'; color: var(--ink-3); }
.event-venue { font-size: .8rem; color: var(--ink-3); margin-top: 4px; }

.holder { display: flex; align-items: center; gap: 16px; padding: 4px 24px 18px; }
.holder-text { min-width: 0; }
.holder-name { font-family: var(--serif); font-size: 1.62rem; line-height: 1.1; }
.holder-role { font-size: .84rem; color: var(--ink-2); margin-top: 3px; }
.holder-org { font-size: .84rem; color: var(--ink-3); }

/* La franja de color del tipo de credencial: lo que el staff mira primero. */
.cred-band {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 24px; background: var(--band); color: var(--band-ink);
}
.cred-band-kind { font-family: var(--mono); font-size: .8rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.cred-band-where { font-size: .78rem; opacity: .92; text-align: right; }

/* Talón perforado: convierte la tarjeta en un boleto */
.perf {
  position: relative; height: 1px; margin: 22px 26px 0;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 5px, transparent 5px 11px);
}
.perf::before, .perf::after {
  content: ''; position: absolute; top: 50%;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); transform: translateY(-50%);
  box-shadow: 0 0 0 1px var(--line-strong) inset;
}
.perf::before { left: -38px; }
.perf::after  { right: -38px; }

.qr-zone { padding: 22px 24px 18px; display: grid; justify-items: center; gap: 12px; }
.qr-plate {
  background: #fff; padding: 14px; border-radius: 18px; line-height: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 16px 36px -12px rgba(0,0,0,.8);
}
.qr-plate img, .qr-plate canvas { display: block; }
.qr-id { font-family: var(--mono); font-size: .76rem; color: var(--ink-2); letter-spacing: .2em; }
.qr-hint { font-size: .76rem; color: var(--ink-3); text-align: center; max-width: 32ch; }

.rights { list-style: none; margin: 0 18px; border-top: 1px solid var(--line); }
.rights li {
  display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 10px;
  padding: 9px 6px; border-bottom: 1px solid var(--line); font-size: .84rem;
}
.rights li:last-child { border-bottom: 0; }
.rights .is-yes .ico { color: var(--ok); }
.rights .is-no { color: var(--ink-3); }
.rights .is-no .ico { color: var(--ink-3); }
.rights-detail { font-family: var(--mono); font-size: .66rem; color: var(--ink-3); text-align: right; }

.pass-status {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin: 12px 0 0; padding: 12px 22px 16px;
  font-size: .8rem; color: var(--ink-2);
  border-top: 1px solid var(--line); background: rgba(0,0,0,.22);
}
.pass-state { display: inline-flex; align-items: center; gap: 8px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.status-dot.is-in { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.pass-offline { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .64rem; letter-spacing: .08em; color: var(--ok); }

.pass-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }

/* Tu día */
.agenda { margin-top: 30px; animation: rise .7s var(--ease) .1s both; }
.agenda-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.agenda-title { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; }
.slots { list-style: none; }
.slot {
  position: relative;
  display: grid; grid-template-columns: 58px 1fr; gap: 14px;
  padding: 15px 0; border-bottom: 1px solid var(--line);
}
.slot-time { font-size: .76rem; color: var(--ink-3); padding-top: 2px; }
.slot-title { font-size: .95rem; font-weight: 500; }
.slot-desc { font-size: .82rem; color: var(--ink-2); margin-top: 3px; }
.slot-where {
  display: inline-block; margin-top: 8px;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .06em;
  color: var(--ink-2); padding: 3px 8px; border-radius: 5px;
  background: var(--surface); border: 1px solid var(--line);
}
.slot-flag {
  display: inline-block; margin-bottom: 5px; padding: 2px 8px; border-radius: var(--r-full);
  font-family: var(--mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase;
  background: var(--brand); color: var(--brand-ink); font-weight: 600;
}
.slot-flag.is-soft { background: transparent; color: var(--brand-text); border: 1px solid var(--brand-line); font-weight: 500; }
.slot.is-mine .slot-time { color: var(--brand-text); }
.slot.is-mine .slot-where { color: var(--brand-text); border-color: var(--brand-line); background: var(--brand-soft); }
.slot.is-now::before, .slot.is-mine::before {
  content: ''; position: absolute; left: -14px; top: 19px;
  width: 3px; height: 22px; border-radius: 2px; background: var(--brand);
}

/* ==========================================================================
   4 · EVENTO
   ========================================================================== */

.event-page { max-width: 1000px; margin: 0 auto; display: grid; gap: 22px; }

.event-hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  min-height: 300px; display: flex; align-items: flex-end;
  box-shadow: var(--lift-2);
  animation: rise .7s var(--ease) both;
}
/* Fondo generado con el color de marca: sin fotos de otro evento, y se viste
   solo con la identidad del cliente. */
.event-hero-art {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 90% at 88% 10%, color-mix(in srgb, var(--brand) 38%, transparent), transparent 62%),
    radial-gradient(50% 70% at 10% 110%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 1px, transparent 1px 28px),
    linear-gradient(160deg, #16161a, #0b0b0d);
}
.event-hero-body { position: relative; padding: 34px; max-width: 640px; }
.event-hero-logo { max-height: 44px; width: auto; margin-bottom: 18px; background: #fff; border-radius: 8px; padding: 6px 10px; }
.hero-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.3rem, 5.4vw, 3.4rem); line-height: 1.04;
  letter-spacing: -.02em; margin: 12px 0 12px;
}
.hero-text { font-size: .95rem; color: var(--ink-2); margin: 14px 0 18px; max-width: 54ch; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.map-wrap { padding: 14px; }
.venue-map { width: 100%; height: auto; display: block; }
.venue-map .map-outline { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 6 4; }
.venue-map .map-room { fill: rgba(255,255,255,.03); stroke: rgba(255,255,255,.2); stroke-width: 1.5; }
.venue-map .is-lobby { fill: rgba(255,255,255,.05); }
.venue-map .is-zone .map-room { fill: color-mix(in srgb, var(--cred-expositor-band) 16%, transparent); stroke: color-mix(in srgb, var(--cred-expositor-ink) 50%, transparent); }
.venue-map .is-mine .map-room { fill: var(--brand-soft); stroke: var(--brand); stroke-width: 2; }
.venue-map .map-name { fill: var(--ink); font-family: var(--serif); }
.venue-map .map-meta { fill: var(--ink-3); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; }
.venue-map .map-tag { fill: var(--brand-text); font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .12em; }
.venue-map .map-door rect { fill: var(--brand); }
.venue-map .map-door text, .venue-map .map-here text { fill: var(--brand-text); font-family: var(--mono); font-size: 10px; letter-spacing: .12em; }
.venue-map .map-here-dot { fill: var(--brand); }
.venue-map .map-here-pulse { fill: var(--brand-soft); animation: here 2.4s var(--ease) infinite; transform-origin: center; transform-box: fill-box; }
@keyframes here { 0%, 100% { transform: scale(.7); opacity: .9; } 50% { transform: scale(1.5); opacity: .15; } }

.event-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.room-list { list-style: none; }
.room-list li {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center;
  padding: 13px 20px; border-bottom: 1px solid var(--line);
}
.room-list li:last-child { border-bottom: 0; }
.room-list li.is-mine { background: var(--brand-dim); }
.room-list-name { font-weight: 500; }
.room-list-kind { grid-column: 1; font-size: .78rem; color: var(--ink-3); }
.room-list-cap { grid-row: 1; grid-column: 2; font-size: .78rem; color: var(--ink-2); text-align: right; }
.room-list .chip { grid-column: 2; justify-self: end; }
.info-list { display: grid; }
.info-list div { padding: 13px 20px; border-bottom: 1px solid var(--line); }
.info-list div:last-child { border-bottom: 0; }
.info-list dt { font-family: var(--mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.info-list dd { font-size: .88rem; color: var(--ink-2); margin-top: 3px; }
.event-back { justify-self: center; }

/* ==========================================================================
   5 · ESCÁNER DEL STAFF
   ========================================================================== */

.scan {
  max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start;
}
.scan-main, .scan-side { display: grid; gap: 16px; min-width: 0; }

.stations { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.station {
  display: flex; flex-direction: column; gap: 3px; text-align: left; min-width: 0;
  padding: 12px 14px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface);
  transition: border-color var(--fast), background var(--fast);
}
.station:hover { border-color: var(--line-strong); }
.station.is-active { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand-line) inset; }
.station-name { display: flex; align-items: center; gap: 7px; font-size: .86rem; font-weight: 500; }
.station-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.station.is-active .station-name { color: var(--brand-text); }
.station-sub { font-family: var(--mono); font-size: .62rem; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }

/* Puerta de una sala: cuál y cuánta gente hay dentro */
.door {
  display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: end;
  padding: 14px 16px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface);
}
.door-pick { display: grid; gap: 6px; min-width: 0; }
.door-count { text-align: right; }
.door-num { font-size: 2.2rem; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.door-num small { font-size: 1rem; color: var(--ink-3); font-weight: 400; }
.door-state { display: block; font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ok); margin-top: 4px; }
.door-bar { grid-column: 1 / -1; height: 8px; border-radius: var(--r-full); background: var(--bg-sunken); overflow: hidden; border: 1px solid var(--line); }
.door-fill { display: block; height: 100%; background: var(--ok); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .6s var(--ease), background var(--med); }
.door[data-state="tight"] .door-state { color: var(--warn); }
.door[data-state="tight"] .door-fill { background: var(--warn); }
.door[data-state="full"] { border-color: var(--no-line); background: var(--no-soft); }
.door[data-state="full"] .door-state { color: var(--no); }
.door[data-state="full"] .door-fill { background: var(--no); }

.scanner { overflow: hidden; }
.scanner-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 16px; border-bottom: 1px solid var(--line);
}
.viewport {
  position: relative; width: 100%; height: clamp(250px, 46vh, 400px);
  background: radial-gradient(ellipse at center, #0e0e10, var(--bg-sunken) 70%);
  overflow: hidden; display: grid; place-items: center;
}
.viewport #camera-reader { position: absolute; inset: 0; }
.viewport #camera-reader video { width: 100% !important; height: 100% !important; object-fit: cover; }
.viewport #camera-reader img, .viewport #camera-reader > div:not(:has(video)) { display: none !important; }

.reticle { position: absolute; inset: 0; pointer-events: none; }
.reticle-box {
  position: absolute; top: 50%; left: 50%;
  width: min(62%, 220px); aspect-ratio: 1; transform: translate(-50%, -52%);
}
.corner { position: absolute; width: 28px; height: 28px; border: 3px solid var(--brand); }
.corner.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.corner.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.corner.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.corner.br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.sweep {
  position: absolute; left: 12%; right: 12%; height: 2px; top: 12%;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  box-shadow: 0 0 14px var(--brand);
  animation: sweep 2.8s var(--ease) infinite;
}
@keyframes sweep { 0%, 100% { transform: translateY(0); opacity: .25; } 50% { transform: translateY(min(30vh, 290px)); opacity: 1; } }
.viewport-hint {
  position: absolute; bottom: 14px; left: 0; right: 0; text-align: center;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-3);
}
.is-camera .viewport-hint { color: var(--ink); text-shadow: 0 1px 6px #000; }

/* El veredicto: ocupa el visor entero y se lee a un brazo de distancia */
.verdict {
  position: absolute; inset: 0; z-index: 5; cursor: pointer;
  display: grid; place-items: center; text-align: center; padding: 18px;
  color: #fff;
}
.verdict.is-ok { background: linear-gradient(160deg, #0f7a3f, #0a5a2e); }
.verdict.is-no { background: linear-gradient(160deg, #b0163a, #7d0f28); }
.verdict.is-in { animation: verdict-in .32s var(--ease); }
@keyframes verdict-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.verdict-inner { display: grid; justify-items: center; gap: 8px; max-width: 34ch; }
.verdict-icon {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.16); box-shadow: 0 0 0 6px rgba(255,255,255,.07);
}
.verdict-title { font-family: var(--mono); font-size: 1.05rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.verdict-who { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.verdict-who .avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.5); }
.verdict-name { font-family: var(--serif); font-size: 1.85rem; line-height: 1.1; }
.verdict .cred-chip { --c: #fff; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.4); }
.verdict-reason { font-size: 1rem; line-height: 1.4; }
.verdict-meta { font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; opacity: .85; }
.verdict-hint { position: absolute; bottom: 10px; right: 14px; font-family: var(--mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }

.scanner-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line);
}
.scanner-note { font-size: .76rem; color: var(--ink-3); }

.manual { padding: 14px 16px 16px; display: grid; gap: 8px; }
.manual-label { font-size: .82rem; color: var(--ink-2); }

.sim { padding: 14px 16px 16px; display: grid; gap: 10px; }
.sim-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sim-note { font-size: .76rem; color: var(--ink-3); }
.sim-extra { display: flex; gap: 8px; flex-wrap: wrap; }

.last-body { padding: 14px 16px; }
.last-row { display: flex; align-items: center; gap: 12px; }
.last-verdict { font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; }
.last-row.is-ok .last-verdict { color: var(--ok); }
.last-row.is-no .last-verdict { color: var(--no); }
.last-name { font-family: var(--serif); font-size: 1.2rem; line-height: 1.2; }
.last-reason { font-size: .8rem; color: var(--ink-2); }

.stream { list-style: none; display: grid; gap: 1px; background: var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); overflow: hidden; }
.stream-row {
  display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 4px 11px; align-items: center;
  padding: 10px 16px; background: var(--bg-raise); font-size: .84rem;
}
.stream-dot { width: 7px; height: 7px; border-radius: 50%; }
.stream-row.is-ok .stream-dot { background: var(--ok); box-shadow: 0 0 9px var(--ok); }
.stream-row.is-no .stream-dot { background: var(--no); box-shadow: 0 0 9px var(--no); }
.stream-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stream-org { color: var(--ink-3); margin-left: 6px; }
.stream-meta { grid-column: 2; font-family: var(--mono); font-size: .64rem; color: var(--ink-3); letter-spacing: .05em; }
.stream-why { color: var(--no); margin-right: 8px; text-transform: uppercase; letter-spacing: .1em; }
.stream-empty { padding: 18px 16px; text-align: center; font-size: .82rem; color: var(--ink-3); background: var(--bg-raise); }

/* ==========================================================================
   6 · COMMAND CENTER
   ========================================================================== */

.cc { max-width: 1480px; margin: 0 auto; display: grid; gap: 18px; }
.cc > * { min-width: 0; scroll-margin-top: 80px; }

.cc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cc-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.1; margin-top: 6px; }
.cc-meta { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-top: 6px; }
.cc-live {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 13px; border-radius: var(--r-full);
  border: 1px solid var(--ok-line); background: var(--ok-soft); color: var(--ok);
  font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse-dot 1.8s var(--ease) infinite; }
.cc-clock { color: var(--ink); letter-spacing: 0; font-size: .78rem; }

.cc-alerts { display: grid; gap: 10px; }
.cc-alerts:empty { display: none; }
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 16px; border-radius: var(--r-md);
  border: 1px solid var(--warn-line); background: var(--warn-soft);
}
.alert .ico { color: var(--warn); flex: none; margin-top: 2px; }
.alert strong { display: block; font-weight: 600; font-size: .92rem; }
.alert span { font-size: .84rem; color: var(--ink-2); }
.alert.is-full { border-color: var(--no-line); background: var(--no-soft); }
.alert.is-full .ico { color: var(--no); }
.alert.is-new { animation: alert-in .6s var(--ease); }
@keyframes alert-in {
  0% { opacity: 0; transform: translateY(-8px); }
  40% { opacity: 1; box-shadow: 0 0 0 4px color-mix(in srgb, var(--no) 35%, transparent); }
  100% { transform: none; box-shadow: none; }
}

.cc-kpis { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi {
  display: grid; align-content: start; gap: 6px; min-width: 0;
  padding: 16px 18px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color var(--med), background var(--med);
}
.kpi--lead { border-color: var(--brand-line); background: var(--brand-dim); }
.kpi.is-alert { border-color: var(--no-line); }
.kpi-label { font-size: .8rem; color: var(--ink-2); }
.kpi-value { font-size: 2.1rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.kpi-value small { font-size: .9rem; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.kpi.is-alert .kpi-value { color: var(--no); }
.kpi-sub { font-size: .78rem; color: var(--ink-3); }
.kpi--lead .meter { margin-top: 4px; }
.is-bump { animation: bump .6s var(--ease); }
@keyframes bump { 30% { color: var(--brand-text); } }

.cc-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }

.rooms-live { list-style: none; padding: 8px 20px 14px; display: grid; }
.room-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.room-row:last-child { border-bottom: 0; }
.room-row-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.room-row-name { font-weight: 500; }
.room-row-kind { font-size: .76rem; color: var(--ink-3); }
.room-row-count { margin-left: auto; font-size: .95rem; font-weight: 500; }
.meter--room { height: 9px; }
.room-row-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; min-height: 1.2em; }
.room-state { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ok); }
.room-denied { font-size: .76rem; color: var(--no); }
.room-row[data-state="tight"] .room-state { color: var(--warn); }
.room-row[data-state="tight"] .meter-fill { background: var(--warn); }
.room-row[data-state="full"] .room-state { color: var(--no); }
.room-row[data-state="full"] .meter-fill { background: var(--no); }
.room-row[data-state="full"] .room-row-count { color: var(--no); }

.feed-list { list-style: none; }
.feed-row {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 10px 18px; border-bottom: 1px solid var(--line);
}
.feed-row:last-child { border-bottom: 0; }
.feed-mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.feed-row.is-ok .feed-mark { color: var(--ok); background: var(--ok-soft); }
.feed-row.is-no .feed-mark { color: var(--no); background: var(--no-soft); }
.feed-who { min-width: 0; display: grid; }
.feed-who strong { font-weight: 500; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-who span { font-size: .76rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-row.is-no .feed-who span { color: var(--no); }
.feed-time { font-size: .74rem; color: var(--ink-3); }
.feed-row.is-new { animation: feed-in .8s var(--ease); }
@keyframes feed-in { from { background: var(--brand-soft); transform: translateX(-6px); } to { background: transparent; transform: none; } }
.feed-empty { padding: 20px 18px; font-size: .84rem; color: var(--ink-3); }

/* Llegadas: una serie, columnas finas con el extremo redondeado y el pico rotulado */
.arrivals { padding: 18px 20px 14px; }
.arrivals-empty { font-size: .84rem; color: var(--ink-3); }
.arr-plot { position: relative; height: 190px; padding-left: 34px; }
.arr-grid { position: absolute; inset: 0 0 24px 34px; pointer-events: none; }
.arr-grid span { position: absolute; left: 0; right: 0; bottom: calc(var(--y) * 100%); border-top: 1px solid var(--line); }
.arr-grid em { position: absolute; left: -34px; top: -.6em; width: 28px; text-align: right; font-style: normal; font-family: var(--mono); font-size: .62rem; color: var(--ink-3); }
.arr-cols { list-style: none; position: absolute; inset: 0 0 24px 34px; display: flex; align-items: flex-end; gap: 2px; }
.arr-col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; outline: none; cursor: default; }
.arr-bar {
  width: min(24px, 70%); height: calc(var(--h, 0) * 100%); min-height: 2px;
  background: color-mix(in srgb, var(--brand) 62%, #2a2a2e); border-radius: 4px 4px 0 0;
  transition: height .6s var(--ease), filter var(--fast);
}
.arr-col.is-peak .arr-bar { background: var(--brand); }
.arr-col.is-hover .arr-bar, .arr-col:focus-visible .arr-bar { filter: brightness(1.25); }
.arr-col:focus-visible { box-shadow: inset 0 0 0 2px var(--brand-text); border-radius: 4px; }
.arr-peak { position: absolute; bottom: calc(var(--h, 0) * 100% + 4px); left: 50%; transform: translateX(-50%); font-size: .7rem; color: var(--ink); }
.arr-tick { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); font-size: .62rem; color: var(--ink-3); white-space: nowrap; }
.arr-tip {
  position: absolute; top: -6px; left: calc(34px + var(--x, 0px)); transform: translate(-50%, -100%);
  display: grid; gap: 1px; padding: 7px 10px; border-radius: var(--r-sm);
  background: rgba(20,20,22,.98); border: 1px solid var(--line-strong); box-shadow: 0 10px 24px rgba(0,0,0,.6);
  font-size: .76rem; white-space: nowrap; pointer-events: none; z-index: 3;
}
.arr-tip strong { font-size: .9rem; }
.arr-tip span { color: var(--ink-3); font-family: var(--mono); font-size: .66rem; }

/* Directorio */
.dir-tools { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.dir-tools .field { min-width: 250px; }
/* position: relative no es decorativo: sin él, el texto solo para lectores de
   pantalla de la cabecera (absoluto) se sale del contenedor con scroll y
   ensancha la página entera en un celular. */
.table-wrap { overflow-x: auto; position: relative; }
.dtable { width: 100%; border-collapse: collapse; font-size: .85rem; }
.dtable th {
  text-align: left; white-space: nowrap; padding: 11px 16px;
  font-family: var(--mono); font-size: .62rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 400;
  background: var(--bg-raise); border-bottom: 1px solid var(--line);
}
.dtable td { padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dtable tbody tr { transition: background var(--fast); }
.dtable tbody tr:hover { background: var(--surface); }
.person { display: flex; align-items: center; gap: 11px; }
.person-name { font-weight: 500; white-space: nowrap; }
.person-id { font-family: var(--mono); font-size: .66rem; color: var(--ink-3); }
.cell-muted { color: var(--ink-2); }
.cell-room { font-size: .8rem; color: var(--ink-2); white-space: nowrap; }
.cell-stand { font-family: var(--mono); font-size: .76rem; color: var(--cred-expositor-ink); white-space: nowrap; }
.cell-none { color: var(--ink-3); }
.dir-empty { padding: 18px; text-align: center; font-size: .84rem; color: var(--ink-3); }
.pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 13px 18px; border-top: 1px solid var(--line);
}
.pager-status { font-size: .78rem; color: var(--ink-2); }
.pager-page { color: var(--ink-3); }

/* ==========================================================================
   7 · MODO PRESENTACIÓN Y MARCOS
   Lo que solo debe ver quien enseña la demo, nunca quien la recibe.
   ========================================================================== */

html:not(.is-presenter) .presenter-only { display: none !important; }

/* Dentro del recorrido guiado la página se ve como la vería su usuario: sin
   el pie del portafolio, que ya lleva la página que la contiene. */
html.en-marco [data-volver-portafolio], html.en-marco .skip { display: none !important; }

/* ==========================================================================
   8 · RESPONSIVO
   ========================================================================== */

@media (max-width: 1180px) {
  .cc-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi--lead { grid-column: span 3; }
}

@media (max-width: 1000px) {
  .nav-seg-btn span { display: none; }
  .nav-seg-btn { padding: 8px 12px; }
  .cc-grid { grid-template-columns: minmax(0, 1fr); }
  .scan { grid-template-columns: minmax(0, 1fr); max-width: 660px; }
}

@media (max-width: 860px) {
  .topbar { padding: 8px 14px; gap: 10px; min-height: 56px; }
  .lockup-sub, .role-badge { display: none; }
  .lockup-name { max-width: 16ch; }
  .nav-seg { display: none; }
  .botnav { display: flex; }
  .main { padding: 18px 14px 40px; }
  /* La barra inferior es fija: el final de la página, incluido cualquier pie
     que añada quien la aloja, tiene que quedar por encima de ella. */
  body.page-guest { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .btn--sim span { display: none; }
  .btn--sim { padding: 0; width: 36px; height: 36px; }

  .event-hero-body { padding: 26px 22px; }
  .event-cols { grid-template-columns: 1fr; }

  .cc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi--lead { grid-column: span 2; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 1.7rem; }
  .dir-tools { width: 100%; }
  .dir-tools .field { min-width: 0; flex: 1 1 100%; }
  .dir-tools .select { flex: 1 1 auto; }
  .dtable th:nth-child(3), .dtable td:nth-child(3),
  .dtable th:nth-child(5), .dtable td:nth-child(5) { display: none; }

  .modal { padding: 10px; align-items: flex-end; }
  .modal-card { max-height: 94vh; }
  .toast-region { left: 14px; right: 14px; bottom: 86px; }
  .toast { max-width: none; }
  body:not(.page-guest) .toast-region { bottom: 16px; }
}

@media (max-width: 560px) {
  .stations { gap: 6px; }
  .station { padding: 9px 6px; align-items: center; text-align: center; justify-content: center; }
  .station-sub { display: none; }
  .station-name { flex-direction: column; gap: 4px; font-size: .78rem; line-height: 1.2; }
  .station-name span { white-space: normal; overflow: visible; }
  .door-num { font-size: 1.8rem; }
  .pass-actions { grid-template-columns: 1fr; }
  .arr-plot { height: 160px; }

  /* En un celular de 360 px el veredicto no cabía: el motivo pisaba «Toca
     para seguir» y la línea de la puerta se cortaba. Visor un poco más alto,
     hueco abajo para el aviso y todo más compacto. */
  .viewport { height: min(84vw, 340px); }
  .verdict { padding: 12px 14px 30px; }
  .verdict-inner { gap: 6px; }
  .verdict-icon { width: 44px; height: 44px; box-shadow: 0 0 0 4px rgba(255,255,255,.07); }
  .verdict-icon .ico { width: 28px; height: 28px; }
  .verdict-title { font-size: .92rem; }
  .verdict-who { gap: 8px; }
  .verdict-who .avatar { width: 40px; height: 40px; font-size: 1rem; }
  .verdict-name { font-size: 1.32rem; }
  .verdict-reason { font-size: .88rem; line-height: 1.35; }
  .verdict-meta { font-size: .62rem; }
  .verdict-hint { bottom: 8px; right: 0; left: 0; text-align: center; }
  .dtable th:nth-child(4), .dtable td:nth-child(4) { display: none; }
}

/* ==========================================================================
   9 · PERSONALIZAR PARA UN CLIENTE
   ========================================================================== */

.cz { display: grid; gap: 18px; }
.cz-group {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px 16px;
}
.cz-group legend {
  padding: 0 6px; margin-left: -6px;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
}
.cz-field { display: grid; gap: 5px; min-width: 0; }
.cz-field > span:first-child { font-size: .8rem; color: var(--ink-2); }
.cz-field input:not([type="color"]):not([type="file"]), .cz-field select {
  width: 100%; padding: 9px 11px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: .86rem; outline: none;
}
.cz-field input:focus, .cz-field select:focus { border-color: var(--cz-accent, var(--brand-line)); }
.cz-field input::placeholder { color: var(--ink-3); }
.cz-group small, .cz-field small { font-size: .74rem; color: var(--ink-3); }
.cz-wide { grid-column: 1 / -1; }

.cz-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cz-swatches .swatch {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  border: 1px solid rgba(255,255,255,.25);
  transition: transform var(--med) var(--ease), box-shadow var(--fast);
}
.cz-swatches .swatch:hover { transform: scale(1.12); }
.cz-swatches .swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--bg-raise), 0 0 0 4px var(--ink); }
.cz-custom-color {
  position: relative; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; cursor: pointer;
  background: conic-gradient(#f43f5e, #f59e0b, #84cc16, #06b6d4, #6366f1, #d946ef, #f43f5e);
  border: 1px solid rgba(255,255,255,.25);
}
.cz-custom-color.is-picked { background: var(--picked); box-shadow: 0 0 0 2px var(--bg-raise), 0 0 0 4px var(--ink); }
.cz-custom-color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

.cz-logo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cz-logo-preview {
  width: 150px; height: 56px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: #fff; color: #6b6760; font-size: .72rem; overflow: hidden; padding: 6px;
}
.cz-logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cz-file { position: relative; overflow: hidden; cursor: pointer; }
.cz-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.cz-rooms, .cz-creds { grid-column: 1 / -1; display: grid; gap: 8px; }
.cz-creds { grid-template-columns: 1fr 1fr; }
.cz-creds .cz-field { grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
.cz-room { display: grid; grid-template-columns: 22px 1fr 110px; gap: 8px; align-items: center; }
.cz-room-n { font-family: var(--mono); font-size: .74rem; color: var(--ink-3); text-align: center; }

.cz-error { padding: 10px 12px; border-radius: var(--r-sm); background: var(--no-soft); border: 1px solid var(--no-line); color: var(--ink); font-size: .84rem; }

.cz-links { border: 1px solid var(--ok-line); background: var(--ok-soft); border-radius: var(--r-md); padding: 14px 16px; }
.cz-links h3 { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; }
.cz-links p { font-size: .8rem; color: var(--ink-2); margin: 4px 0 10px; }
.cz-links code { font-family: var(--mono); color: var(--ink); }
.cz-link-list { list-style: none; display: grid; gap: 6px; }
.cz-link-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .86rem; }

.cz-actions {
  position: sticky; bottom: -22px; margin: 0 -22px -22px; padding: 14px 22px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--bg-raise); border-top: 1px solid var(--line);
}
.cz-spacer { flex: 1; }

@media (max-width: 560px) {
  .cz-group, .cz-creds { grid-template-columns: 1fr; }
  .cz-room { grid-template-columns: 18px 1fr 84px; }
}

/* ==========================================================================
   10 · ÍNDICE DE LA DEMOSTRACIÓN
   ========================================================================== */

.hub { max-width: 1080px; margin: 0 auto; padding-top: 18px; display: grid; gap: 26px; }

.hub-head { max-width: 700px; animation: rise .7s var(--ease) both; }
.hub-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.3rem, 6vw, 3.4rem); line-height: 1.04;
  letter-spacing: -.02em; margin: 14px 0 12px;
}
.hub-title em { font-style: italic; color: var(--brand-text); }
.hub-sub { font-size: 1rem; color: var(--ink-2); max-width: 54ch; }
.hub-event { margin-top: 14px; font-family: var(--serif); font-size: 1.2rem; }
.hub-event em { font-style: italic; color: var(--brand-text); }
.hub-event span { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.hub-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.btn--lg { padding: 13px 20px; font-size: .92rem; }
.hub-cta-note { font-size: .82rem; color: var(--ink-3); }

.hub-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  animation: rise .7s var(--ease) .08s both;
}
.hub-card {
  position: relative; display: flex; flex-direction: column; gap: 9px;
  padding: 22px 20px 20px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(168deg, var(--surface-2), var(--surface) 46%);
  text-decoration: none; color: inherit;
  transition: transform var(--med) var(--ease), border-color var(--med), box-shadow var(--med);
}
.hub-card:hover { transform: translateY(-3px); border-color: var(--brand-line); box-shadow: 0 24px 50px -18px rgba(0,0,0,.9); }
.hub-card-icon {
  width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-text); margin-bottom: 4px;
}
.hub-card-title { font-family: var(--serif); font-weight: 400; font-size: 1.55rem; line-height: 1.12; }
.hub-card-text { font-size: .86rem; color: var(--ink-2); flex: 1; }
.hub-card-cta {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 6px;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-text);
  transition: gap var(--med) var(--ease);
}
.hub-card:hover .hub-card-cta { gap: 12px; }
.hub-card-note { font-size: .74rem; color: var(--ink-3); }

.hub-tip {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 16px 18px; border-radius: var(--r-md);
  background: var(--brand-dim); border: 1px solid var(--brand-line);
}
.hub-tip .ico { flex: none; color: var(--brand-text); margin-top: 2px; }
.hub-tip p { font-size: .88rem; color: var(--ink-2); }
.hub-tip strong { color: var(--ink); font-weight: 600; }

.hub-h2 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; margin-bottom: 12px; }
.truth-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.truth { padding: 18px 20px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.truth h3 { display: flex; align-items: center; gap: 8px; font-size: .95rem; font-weight: 600; margin-bottom: 10px; }
.truth.is-real h3 .ico { color: var(--ok); }
.truth.is-sim h3 .ico { color: var(--brand-text); }
.truth ul { list-style: none; display: grid; gap: 7px; }
.truth li { position: relative; padding-left: 16px; font-size: .86rem; color: var(--ink-2); }
.truth li::before { content: ''; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }

.hub-switch {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 18px; border-radius: var(--r-md);
  background: var(--surface); border: 1px dashed var(--line-strong);
}
.hub-switch-text { flex: 1; min-width: 240px; }
.hub-switch-text p { font-size: .84rem; color: var(--ink-3); margin-top: 4px; }
.hub-switch-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.hub-foot { padding-top: 16px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--ink-3); }

@media (max-width: 900px) {
  .hub-grid, .truth-cols { grid-template-columns: 1fr; }
}
