* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #f3efe4;
  --ink-2: rgba(243, 239, 228, 0.72);
  --ink-3: rgba(243, 239, 228, 0.46);
  --glass: rgba(16, 20, 26, 0.62);
  --glass-2: rgba(16, 20, 26, 0.78);
  --line: rgba(243, 239, 228, 0.14);
  --accent: #6fd0f5;
  --warm: #f0a35e;
}

html, body { height: 100%; overflow: hidden; background: #0d1116; }
body.director {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  position: relative;
}

#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.vignette {
  position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 40%, rgba(6, 9, 14, 0.55) 100%),
    linear-gradient(to bottom, rgba(6, 9, 14, 0.55) 0%, transparent 22%, transparent 62%, rgba(6, 9, 14, 0.72) 100%);
}

.hud-top, .hud-bottom, .card { position: fixed; z-index: 3; }

/* ---------- cabecera ---------- */
.hud-top {
  top: 0; left: 0; right: 0;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 22px 28px; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.uni-logo { height: 46px; width: auto; opacity: 0.95; }
.brand-text h1 {
  font-size: 25px; font-weight: 650; letter-spacing: -0.3px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}
.brand-text p {
  font-size: 12px; color: var(--ink-2); letter-spacing: 1.6px;
  text-transform: uppercase; margin-top: 2px;
}
.top-right { display: flex; align-items: center; gap: 18px; }
.live {
  display: flex; align-items: center; gap: 8px;
  background: var(--glass); border: 1px solid var(--line);
  border-radius: 20px; padding: 6px 14px 6px 11px;
  font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase;
  backdrop-filter: blur(10px);
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #ff5f56;
  box-shadow: 0 0 0 0 rgba(255, 95, 86, 0.6); animation: pulse 2s infinite;
}
.live-dot.off { background: #7c7a72; animation: none; box-shadow: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 95, 86, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(255, 95, 86, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 95, 86, 0); }
}
.clock { text-align: right; line-height: 1.1; }
.clock span:first-child {
  display: block; font-size: 25px; font-weight: 600; font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
.clock span:last-child { font-size: 10.5px; color: var(--ink-3); letter-spacing: 1.3px; text-transform: uppercase; }

/* ---------- tarjetas ---------- */
.card {
  background: var(--glass); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px 18px; backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.32);
}
.card-label {
  font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 9px;
}
.warn { color: var(--warm); }

.society { left: 28px; bottom: 148px; width: 310px; }
.society h2 { font-size: 19px; font-weight: 600; letter-spacing: -0.2px; }
.society-sub { font-size: 12px; color: var(--ink-2); margin-top: 3px; line-height: 1.45; }
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line);
}
.stats .k { display: block; font-size: 9.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-3); }
.stats b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fams { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 11px; }
.fams span { font-size: 10.5px; color: var(--ink-2); display: flex; align-items: center; gap: 4px; }
.fams i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

.milestones { right: 28px; top: 104px; width: 348px; max-height: 46vh; overflow: hidden; }
.milestones ul {
  list-style: none; display: flex; flex-direction: column; gap: 9px;
  max-height: calc(46vh - 40px); overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
}
.milestones li {
  font-size: 12.5px; line-height: 1.45; color: var(--ink-2);
  border-left: 2px solid var(--line); padding-left: 11px;
  animation: slideIn 0.5s ease;
}
.milestones li.big { border-left-color: var(--accent); color: var(--ink); }
.milestones li b { color: var(--ink); font-weight: 600; }
.milestones li .ms-when { display: block; font-size: 10px; color: var(--ink-3); margin-top: 2px; letter-spacing: 0.5px; }
.ms-empty { opacity: 0.5; }
@keyframes slideIn { from { opacity: 0; transform: translateX(10px); } }

.question { right: 28px; bottom: 148px; width: 348px; }
.question p { font-size: 13.5px; line-height: 1.55; color: var(--ink); }

/* ---------- pie ---------- */
.hud-bottom {
  bottom: 0; left: 0; right: 0;
  display: grid; grid-template-columns: auto 1fr; gap: 8px 26px;
  align-items: center;
  padding: 16px 28px 18px;
  background: linear-gradient(to top, rgba(6, 9, 14, 0.88), transparent);
}
.author { display: flex; align-items: center; gap: 13px; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(243, 239, 228, 0.28);
}
.author-name { font-size: 15px; font-weight: 600; }
.author-aff { font-size: 11px; color: var(--ink-2); line-height: 1.45; margin-top: 1px; }
.foot-links { display: flex; gap: 18px; justify-self: end; flex-wrap: wrap; }
.foot-links a {
  font-size: 11.5px; color: var(--ink-2); text-decoration: none;
  border-bottom: 1px solid var(--line); padding-bottom: 1px;
}
.foot-links a:hover { color: var(--ink); border-color: var(--ink-3); }
.disclaimer {
  grid-column: 1 / -1;
  font-size: 10.5px; line-height: 1.5; color: var(--ink-3); max-width: 1080px;
}
.disclaimer strong { color: var(--ink-2); font-weight: 500; }

@media (max-width: 1100px) {
  .question { display: none; }
  .milestones { width: 300px; max-height: 34vh; }
  .society { width: 270px; }
}
@media (max-width: 780px) {
  .milestones, .society { display: none; }
  .disclaimer { display: none; }
  .hud-bottom { grid-template-columns: 1fr; }
  .foot-links { justify-self: start; }
}

/* pista de interacción */
.hint-click { font-size: 11px !important; color: var(--ink-3) !important; text-transform: none !important; letter-spacing: 0.2px !important; margin-top: 6px !important; }

/* ¿qué se está decidiendo? */
.debate { right: 28px; bottom: 148px; width: 348px; }
.debate-row { display: flex; gap: 10px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--line); }
.debate-row:last-child { border-bottom: none; }
.d-k { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-3); min-width: 86px; }
.debate-row b { font-size: 13.5px; font-weight: 550; line-height: 1.4; }

/* la pregunta pasa arriba-derecha si no cabe: la ocultamos en pantallas medianas */
.question { right: 28px; bottom: 288px; width: 348px; }

/* subtítulos: lo último dicho en público, grande y legible */
.subtitle {
  position: fixed; z-index: 4; left: 50%; transform: translateX(-50%);
  bottom: 128px; max-width: min(760px, 62vw);
  background: rgba(10, 13, 18, 0.82); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 18px; backdrop-filter: blur(12px);
  text-align: center;
}
.sub-who { display: block; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.sub-text { font-size: 16.5px; line-height: 1.5; font-weight: 450; }

/* mini-ficha al seguir a un agente */
.follow-mini { left: 28px; bottom: 148px; width: 310px; }
.follow-mini h3 { font-size: 18px; font-weight: 650; }
.fm-sub { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.fm-thought { font-size: 12.5px; font-style: italic; color: var(--ink-2); margin-top: 8px; border-left: 2px solid var(--line); padding-left: 10px; line-height: 1.5; }
#fmClose { position: absolute; top: 10px; right: 10px; background: none; border: 1px solid var(--line); color: var(--ink-3); width: 24px; height: 24px; border-radius: 7px; cursor: pointer; }
#fmClose:hover { color: var(--ink); }
#stage { cursor: pointer; }
@media (max-width: 1100px) { .subtitle { display: none; } .debate { bottom: 148px; } }

/* ---------- selector de idioma ---------- */
.lang-switch {
  display: flex; gap: 2px;
  background: var(--glass); border: 1px solid var(--line);
  border-radius: 20px; padding: 4px 6px; backdrop-filter: blur(10px);
}
.lang-switch button {
  background: none; border: none; color: var(--ink-3); cursor: pointer;
  font-size: 11px; letter-spacing: 1px; font-weight: 600;
  padding: 3px 8px; border-radius: 14px;
}
.lang-switch button.on { color: var(--ink); background: rgba(243, 239, 228, 0.12); }
.lang-switch button:hover { color: var(--ink); }

/* ---------- identidad de sociedad ---------- */
.society h2 { display: inline-block; }
.era-chip {
  display: inline-block; margin-left: 8px; vertical-align: 3px;
  font-size: 9px; letter-spacing: 1.4px; font-weight: 650;
  color: var(--accent); border: 1px solid rgba(111, 208, 245, 0.35);
  border-radius: 10px; padding: 2.5px 8px;
}
.soc-tech {
  display: block; font-size: 9.5px; color: var(--ink-3);
  letter-spacing: 0.6px; margin-top: 5px; font-variant-numeric: tabular-nums;
}

/* ---------- bienvenida (primera visita) ---------- */
.welcome {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 9, 14, 0.66); backdrop-filter: blur(6px);
  animation: wFade 0.4s ease;
  padding: 20px;
}
@keyframes wFade { from { opacity: 0; } }
.welcome-card {
  max-width: 520px; width: 100%;
  background: var(--glass-2); border: 1px solid var(--line);
  border-radius: 20px; padding: 30px 32px 26px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px);
  animation: wUp 0.45s ease;
}
@keyframes wUp { from { opacity: 0; transform: translateY(14px); } }
.w-badges { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.w-badges span {
  font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--accent); border: 1px solid rgba(111, 208, 245, 0.35);
  border-radius: 11px; padding: 3px 9px;
}
.welcome-card h2 { font-size: 23px; font-weight: 650; letter-spacing: -0.3px; line-height: 1.25; margin-bottom: 13px; }
.welcome-card p { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); margin-bottom: 10px; }
.welcome-card .w-note { font-size: 12px; color: var(--ink-3); font-style: italic; }
.w-cta {
  margin-top: 14px; width: 100%;
  background: var(--accent); color: #0d1116; border: none; cursor: pointer;
  font-size: 14px; font-weight: 650; letter-spacing: 0.2px;
  border-radius: 12px; padding: 12px 16px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.w-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(111, 208, 245, 0.3); }

@media (max-width: 780px) {
  .lang-switch { padding: 3px 4px; }
  .welcome-card { padding: 24px 22px 20px; }
  .welcome-card h2 { font-size: 19px; }
}

/* hidden siempre gana: sin esto, display:flex/inline-block lo anularían */
[hidden] { display: none !important; }
