/* Estilos de la plataforma del 7-a Virtuala Kongreso, tomados del prototipo aprobado (prototipo/verda-kurso.html). */
/* Layout: app shell — sidebar + columna principal + barra de anuncio fija abajo.
   Colores del logo del Virtuala Kongreso (verde, azul, amarillo, rojo); botones en píldora y tarjetas suaves. */
:root {
  --r-card: 12px;
  --r-input: 8px;
  --r-pill: 10px;
  --r-chip: 6px;
  --logo: url("../img/logo.png");
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --soft: #F2F3F2;
  --soft-2: #E5E7E5;
  --fg: #16301B;
  --muted: #5F6862;
  --line: #E0E3E0;
  --primary: #2F6B21;
  --primary-hover: #245619;
  --on-primary: #FFFFFF;
  --deep: #1C4318;
  --on-deep: #FFFFFF;
  --green: #55983C;
  --blue: #1B87AD;
  --blue-soft: #DDF0F7;
  --yellow: #F7C30F;
  --yellow-soft: #FDF2CC;
  --on-yellow: #3D2E00;
  --red: #E11419;
  --red-soft: #FCE3E3;
  --player: #12290F;
  --shadow: 0 10px 30px rgba(22, 48, 27, .10);
  --f-display: "Oswald", "Arial Narrow", sans-serif;
  --f-body: "Poppins", "Segoe UI", system-ui, sans-serif;
}
/* La plataforma se ve siempre en modo claro, sin importar la configuración del computador. */
:root, :root[data-theme="dark"] { color-scheme: light; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 14.5px; line-height: 1.55; }
h1, h2, h3 { font-family: var(--f-body); font-weight: 600; line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.logo { display: block; background: var(--logo) center / contain no-repeat; flex: none; }
.stripe { display: flex; height: 6px; }
.stripe span { flex: 1; }
.stripe span:nth-child(1) { background: #E11419; }
.stripe span:nth-child(2) { background: #F7C30F; }
.stripe span:nth-child(3) { background: #55983C; }
.stripe span:nth-child(4) { background: #1B99C4; }

/* ---- Botones (píldoras) ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1.5px solid transparent; border-radius: var(--r-pill); padding: 11px 24px; font-weight: 500; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; line-height: 1.2; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-ghost:hover { background: var(--soft); }
.btn-soft { background: var(--soft); color: var(--fg); justify-content: space-between; }
.btn-soft:hover { background: var(--soft-2); }
.btn-sm { padding: 7px 16px; font-size: 13.5px; }
/* Botón con "píldora" de flechas a la derecha */
.btn-go { background: var(--primary); color: var(--on-primary); padding: 6px 6px 6px 22px; gap: 16px; justify-content: space-between; }
.btn-go:hover { background: var(--primary-hover); }
.btn-go .go { display: inline-grid; place-items: center; height: 36px; padding: 0 14px; border-radius: var(--r-chip); background: var(--surface); color: var(--fg); border: 1.5px solid var(--fg); }
.btn-go .go .icon { width: 22px; height: 18px; stroke-width: 2.2; }
.btn-go.btn-sm { padding: 4px 4px 4px 16px; gap: 12px; }
.btn-go.btn-sm .go { height: 28px; padding: 0 10px; }
.play { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--deep); color: var(--on-deep); display: grid; place-items: center; cursor: pointer; flex: none; text-decoration: none; }
.play:hover { background: var(--primary); }
.play .icon { fill: currentColor; stroke: none; width: 16px; height: 16px; margin-left: 3px; }
.play-light { background: var(--surface); color: var(--deep); }
.play-light:hover { background: var(--soft); }
.round { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--deep); color: var(--on-deep); display: grid; place-items: center; cursor: pointer; text-decoration: none; flex: none; }
.link-u { background: none; border: 0; padding: 0; color: var(--fg); font-weight: 500; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px; cursor: pointer; }

/* ---- Chips ---- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--r-chip); white-space: nowrap; }
.chip-s1 { background: var(--green); color: #fff; }
.chip-s2 { background: var(--blue); color: #fff; }
.chip-video { background: var(--yellow); color: var(--on-yellow); }
.chip-live { background: var(--red); color: #fff; }
.chip-done { background: var(--soft-2); color: var(--muted); }
.chip-next { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.chip-ghost { background: rgba(255,255,255,.14); color: #fff; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-live .dot { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.tag { font-size: 12.5px; padding: 4px 12px; border-radius: var(--r-chip); background: var(--soft-2); color: var(--fg); }
.open { color: var(--primary); font-size: 13px; font-weight: 500; }

/* ---- Segmentado (tipo Income / Expense) y opciones ---- */
.segment { display: inline-flex; gap: 4px; padding: 6px; background: var(--soft); border-radius: var(--r-card); flex-wrap: wrap; }
.segment button { border: 0; background: transparent; padding: 11px 20px; border-radius: 7px; cursor: pointer; font-weight: 500; color: var(--fg); display: inline-flex; align-items: center; gap: 10px; }
.segment button.on { background: var(--primary); color: var(--on-primary); }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { border: 0; background: var(--soft); border-radius: var(--r-pill); padding: 9px 18px; cursor: pointer; font-weight: 500; color: var(--fg); }
.opt:hover { background: var(--soft-2); }
.opt.on { background: var(--primary); color: var(--on-primary); }

/* ====== LOGIN ====== */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.login-art { background: var(--soft); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.login-art-in { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 28px; padding-block: 48px; padding-left: max(56px, env(safe-area-inset-left, 0px)); padding-right: 56px; }
.login-art .logo { width: 110px; height: 187px; }
.login-art h1 { font-family: var(--f-display); font-weight: 600; text-transform: uppercase; font-size: clamp(34px, 4.2vw, 54px); line-height: 1.05; color: var(--primary); max-width: 14ch; letter-spacing: .005em; }
.login-art .when { color: var(--blue); font-size: 18px; font-weight: 500; margin-top: 10px; }
.login-art .motto { font-weight: 600; color: var(--primary); font-size: 16px; margin-top: 10px; }
.login-art .lead { font-size: 15.5px; max-width: 42ch; color: var(--muted); margin-top: 14px; }
.login-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.login-facts span { background: var(--surface); border-radius: var(--r-pill); padding: 8px 16px; font-size: 13.5px; font-weight: 500; }
.login-form-wrap { display: grid; place-items: center; padding-block: 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.login-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 18px; }
.login-form h2 { font-size: 26px; }
.login-form .sub { color: var(--muted); }
.login-form .btn { width: 100%; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.input { width: 100%; background: var(--soft); border: 1.5px solid transparent; border-radius: var(--r-input); padding: 12px 16px; }
.input::placeholder { color: var(--muted); opacity: .8; }
.input:focus { border-color: var(--primary); outline: none; background: var(--surface); }
textarea.input { resize: vertical; min-height: 100px; }
.hint { font-size: 13px; color: var(--muted); }
.note { font-size: 13px; background: var(--soft); border-radius: var(--r-input); padding: 12px 14px; color: var(--muted); }

/* ====== APP SHELL ====== */
.app { display: grid; grid-template-columns: 276px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.side-head { padding: 22px 22px 18px; display: flex; gap: 14px; align-items: center; }
.side-head .logo { width: 34px; height: 58px; }
.side-head h2 { font-family: var(--f-display); font-weight: 600; text-transform: uppercase; font-size: 17px; line-height: 1.15; color: var(--primary); }
.side-head .meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.nav { padding: 6px 12px; display: flex; flex-direction: column; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: var(--r-pill); color: var(--fg); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--soft); }
.nav a.active { background: var(--primary); color: var(--on-primary); }
.nav .live-pip { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.6s infinite; }
.nav a.active .live-pip { background: #fff; }
.subnav { display: flex; flex-direction: column; gap: 2px; padding: 4px 0 6px 30px; }
.subnav a, .subnav button { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; text-align: left; padding: 8px 14px; border-radius: var(--r-pill); cursor: pointer; font-weight: 500; font-size: 14px; color: var(--fg); }
.subnav a:hover, .subnav a.on, .subnav button:hover { background: var(--soft); }
.subnav .dot { color: var(--yellow); }
.nav-sep { height: 1px; background: var(--line); margin: 8px 16px; }
.side-foot { margin-top: auto; padding: 16px 22px 72px; display: flex; flex-direction: column; gap: 12px; font-size: 12.5px; color: var(--muted); }
.me-mini { display: flex; align-items: center; gap: 10px; color: var(--fg); min-width: 0; }
.me-mini > div { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.me-mini b { display: block; font-size: 14px; font-weight: 600; }
.scrim { display: none; }
.powered-by { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 11.5px; color: var(--muted); letter-spacing: .02em; text-decoration: none; }
.powered-by:hover { color: var(--fg); }
.kunejo-mark { display: inline-flex; align-items: center; gap: 6px; }
.kunejo-word { width: auto; }
.side-foot .powered-by { justify-content: flex-start; padding-top: 12px; border-top: 1px solid var(--line); }
.login-form-wrap .powered-by { margin-top: 18px; }

.main { min-width: 0; display: flex; flex-direction: column; padding-bottom: 64px; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); display: flex; align-items: center; gap: 14px; padding-block: 14px; padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.menu-btn { display: none; }
.top-title { min-width: 0; }
.top-title h1 { font-family: var(--f-display); font-weight: 600; text-transform: uppercase; font-size: 24px; letter-spacing: .01em; }
.top-title .eo { font-size: 12.5px; color: var(--muted); font-style: italic; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.clock { text-align: right; font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.clock b { display: block; font-size: 16px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.tz-select { background: var(--soft); border: 0; border-radius: var(--r-pill); padding: 9px 16px; font-size: 13.5px; cursor: pointer; max-width: 200px; font-weight: 500; }
.lang-pick { display: inline-flex; align-items: center; gap: 6px; background: var(--soft); border-radius: var(--r-pill); padding: 0 6px 0 14px; color: var(--fg); }
.lang-pick .icon { color: var(--primary); }
.lang-select { border: 0; background: transparent; padding: 9px 8px 9px 0; font-size: 13.5px; font-weight: 500; cursor: pointer; max-width: 140px; }
.tr { background: none; border: 0; padding: 0; margin-top: 2px; font-size: 12.5px; font-weight: 500; color: var(--primary); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.tr .icon { width: 14px; height: 14px; }
.tr-out { margin-top: 4px; padding: 8px 12px; border-radius: 8px; background: var(--surface); font-size: 14px; }
.avatar-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }

.view { padding-block: 12px 40px; padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); width: 100%; max-width: 1160px; display: flex; flex-direction: column; gap: 30px; }
.section { display: flex; flex-direction: column; gap: 14px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.intro { color: var(--muted); max-width: 64ch; }
.card { background: var(--soft); border-radius: var(--r-card); padding: 22px 24px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Avatar */
.av { border-radius: 50%; background: var(--soft-2); color: var(--fg); display: grid; place-items: center; font-weight: 600; flex: none; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Inicio ---- */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.hello h2 { font-family: var(--f-display); font-weight: 600; text-transform: uppercase; font-size: clamp(30px, 3.6vw, 40px); color: var(--primary); }
.hello p { color: var(--muted); margin-top: 4px; }
.banner { display: flex; align-items: center; gap: 16px; background: var(--soft); border-radius: var(--r-card); padding: 16px 18px 16px 20px; flex-wrap: wrap; }
.banner p { flex: 1; min-width: 200px; font-weight: 500; }
.live-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
/* Tarjeta oscura tipo "podcast" */
.live-card { background: var(--deep); color: var(--on-deep); border-radius: var(--r-card); padding: 24px; min-height: 250px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; position: relative; overflow: hidden; }
.live-card::after { content: ""; position: absolute; right: -30px; bottom: -40px; width: 170px; height: 290px; background: var(--logo) center / contain no-repeat; opacity: .14; pointer-events: none; }
.live-card:hover { box-shadow: var(--shadow); }
.live-card h3 { font-size: 22px; font-weight: 600; max-width: 18ch; }
.live-card .who { opacity: .75; font-size: 14px; }
.live-card .lc-bottom { margin-top: auto; display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; }
.live-card .lc-meta { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.live-card .mins { font-size: 14px; text-align: right; opacity: .9; font-variant-numeric: tabular-nums; }
.live-card.is-idle { background: var(--soft); color: var(--fg); }
.live-card.is-idle::after { opacity: .1; }
.progress { height: 4px; border-radius: 4px; background: rgba(255,255,255,.2); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--yellow); }
.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }

/* Tarjeta tipo "Event 10.00 AM" con flecha ↗ */
.tile { position: relative; background: var(--soft); border-radius: var(--r-card); padding: 20px 22px; border: 0; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; color: var(--fg); text-decoration: none; }
.tile:hover { background: var(--soft-2); }
.tile .ne { position: absolute; right: 18px; top: 18px; width: 26px; height: 26px; }
.tile b { font-size: 17px; font-weight: 600; }
.tile .big { font-size: 15px; color: var(--muted); }

/* Fila tipo "Podcast or song title / 10.00 AM" */
.slot { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 18px; align-items: center; background: var(--soft); border-radius: var(--r-card); padding: 18px 20px 18px 24px; }
.slot .time { font-size: 22px; font-weight: 400; font-variant-numeric: tabular-nums; line-height: 1.1; }
.slot .time small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.slot .body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.slot h3 { font-size: 16.5px; font-weight: 600; }
.slot .sub { font-size: 13.5px; color: var(--muted); }
.slot.is-done { opacity: .55; }
.slot.is-live { background: var(--surface); box-shadow: inset 0 0 0 2px var(--primary); }

/* ---- Programación ---- */
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.tz-pick { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.special { background: var(--deep); color: var(--on-deep); border-radius: var(--r-card); padding: 26px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.special::after { content: ""; position: absolute; right: 10px; top: -20px; width: 120px; height: 205px; background: var(--logo) center / contain no-repeat; opacity: .16; pointer-events: none; }
.special h3 { font-size: 22px; max-width: 26ch; }
.special p { opacity: .8; max-width: 62ch; }
.zones { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 18px; margin-top: 8px; font-size: 13.5px; position: relative; z-index: 1; }
.zones span { background: rgba(255,255,255,.1); border-radius: 8px; padding: 8px 12px; font-variant-numeric: tabular-nums; }
.zones b { font-weight: 600; opacity: .7; margin-right: 6px; font-size: 11.5px; }

/* ---- Sala en vivo ---- */
.stage { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.stage-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.stage-links { display: flex; flex-wrap: wrap; gap: 10px; }
.stage-links .btn { flex: 1 1 200px; }
.player { aspect-ratio: 16 / 9; width: 100%; background: var(--player); border-radius: var(--r-card); position: relative; overflow: hidden; display: grid; place-items: center; color: #D6EBD0; }
.player::after { content: ""; position: absolute; right: 30px; bottom: -30px; width: 220px; height: 375px; background: var(--logo) center / contain no-repeat; opacity: .12; pointer-events: none; }
.player .center { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 16px; }
.player .play { width: 76px; height: 76px; }
.player .play .icon { width: 24px; height: 24px; }
.player .ph { font-size: 13px; opacity: .75; max-width: 40ch; }
.player .badges { position: absolute; left: 18px; top: 18px; display: flex; gap: 8px; z-index: 1; }
.now-info { display: flex; flex-direction: column; gap: 8px; }
.now-info h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 600; }
.now-info .who { color: var(--muted); }
.mini-slot { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mini-slot:last-child { border-bottom: 0; }
.mini-slot .time { font-weight: 500; font-size: 15px; font-variant-numeric: tabular-nums; }
.mini-slot .time span { display: block; font-size: 12px; color: var(--muted); }
.mini-slot b { font-size: 14.5px; font-weight: 600; display: block; }
.mini-slot span { font-size: 13px; color: var(--muted); }
.room-chat { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); height: min(680px, calc(100vh - 170px)); min-height: 420px; background: var(--soft); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.room-chat-head { padding: 16px 20px 12px; }
.room-chat-head b { font-size: 16px; font-weight: 600; }
.room-chat-head p { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.pinned { display: flex; gap: 10px; align-items: flex-start; margin: 0 12px; padding: 12px 14px; background: var(--surface); border-radius: var(--r-card); font-size: 13px; }
.pinned .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--primary); }
.room-chat .msgs { max-height: none; min-height: 0; padding: 14px 20px; gap: 12px; }
.room-chat .msg { grid-template-columns: 30px minmax(0, 1fr); }
.room-chat .msg p { font-size: 14px; }
.room-chat .composer { background: var(--soft); border-top: 0; padding: 12px; }
.room-chat .composer .input { background: var(--surface); }
.mod { font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; background: var(--primary); color: var(--on-primary); border-radius: var(--r-chip); padding: 2px 7px; margin-left: 4px; vertical-align: 1px; }
@media (max-width: 1180px) {
  .stage { display: flex; flex-direction: column; gap: 18px; }
  .stage-main { display: contents; }
  .stage .player { order: 0; }
  .stage .now-info { order: 1; }
  .stage .room-chat { order: 2; position: static; height: 480px; min-height: 0; }
  .stage .stage-main > .card { order: 3; }
  .stage .stage-links { order: 4; }
}

/* ---- Salas de video ---- */
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 18px; }
.room-card { position: relative; background: var(--soft); border-radius: var(--r-card); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.room-card .ne { position: absolute; right: 22px; top: 22px; width: 28px; height: 28px; color: var(--fg); }
.room-card h3 { font-size: 24px; font-weight: 600; margin-top: 24px; }
.room-card .es { color: var(--primary); font-weight: 500; font-size: 14px; margin-top: -6px; }
.room-card .desc { color: var(--muted); font-size: 14px; flex: 1; }
.stack { display: flex; align-items: center; }
.stack .av { border: 2px solid var(--soft); margin-left: -8px; }
.stack .av:first-child { margin-left: 0; }
.stack small { margin-left: 10px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.room-card .btn { align-self: flex-start; margin-top: 6px; }

/* ---- Chats ---- */
.chat { background: var(--soft); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; min-height: 520px; }
.chat-top { padding: 18px 20px 14px; display: flex; flex-direction: column; gap: 12px; }
.chat-top p { font-size: 13.5px; color: var(--muted); }
.thread { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.msgs { flex: 1; padding: 6px 20px 16px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; max-height: 440px; }
.msg { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
.msg .who { font-size: 13.5px; font-weight: 600; }
.msg .who time { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; font-variant-numeric: tabular-nums; }
.msg p { font-size: 14.5px; overflow-wrap: anywhere; }
.composer { display: flex; gap: 8px; padding: 12px; }
.composer .input { border-radius: var(--r-pill); background: var(--surface); }
.composer .round { width: 48px; height: 48px; }

/* ---- Asistentes ---- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.person { position: relative; background: var(--soft); border: 0; border-radius: var(--r-card); padding: 18px; display: flex; gap: 14px; text-align: left; cursor: pointer; width: 100%; color: var(--fg); }
.person:hover { background: var(--soft-2); }
.person .ne { position: absolute; right: 16px; top: 16px; width: 20px; height: 20px; color: var(--muted); }
.person .body { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-right: 18px; }
.person b { font-size: 15.5px; font-weight: 600; }
.person .role { font-size: 12.5px; color: var(--primary); font-weight: 600; }
.person .country { font-size: 13.5px; color: var(--muted); }
.person .tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.person .tags .tag { font-size: 11.5px; padding: 2px 10px; background: var(--surface); }
.search { position: relative; }
.search .icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 48px; border-radius: var(--r-pill); padding-block: 14px; }

/* ---- Anuncios y reglas ---- */
.announce .from { font-size: 12.5px; color: var(--muted); }
.announce h3 { font-size: 19px; font-weight: 600; margin: 4px 0 10px; }
.announce p + p { margin-top: 8px; }
.announce.is-special { background: var(--deep); color: var(--on-deep); }
.announce.is-special .from, .announce.is-special .hint { color: inherit; opacity: .75; }
.announce.is-special a { color: var(--yellow); }
.rule { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: start; }
.rule .n { width: 44px; height: 44px; border-radius: 50%; background: var(--deep); color: var(--on-deep); display: grid; place-items: center; font-weight: 600; font-size: 16px; }
.rule h3 { font-size: 16.5px; font-weight: 600; margin-bottom: 4px; }
.rule p { color: var(--muted); font-size: 14.5px; }

/* ---- Perfil ---- */
.profile { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.form-card { display: flex; flex-direction: column; gap: 18px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-card); padding: 26px; }
.photo-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.photo-row .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.file-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.contact-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; padding-bottom: 12px; white-space: nowrap; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 42px; height: 24px; border-radius: 999px; background: var(--soft-2); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--primary); outline-offset: 2px; }
.form-actions { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.preview-wrap { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 10px; }
.pcard { display: flex; flex-direction: column; gap: 14px; }
.pcard .head { display: flex; gap: 16px; align-items: center; }
.pcard h3 { font-size: 20px; font-weight: 600; }
.pcard .role { font-size: 12.5px; color: var(--primary); font-weight: 600; margin-bottom: 2px; }
.pcard .country { color: var(--muted); font-size: 14px; }
.pcard .bio { font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pcard .tag { background: var(--surface); }
.contacts { display: flex; flex-direction: column; gap: 8px; }
.contact { display: flex; align-items: center; gap: 12px; font-size: 14px; min-width: 0; background: var(--surface); border-radius: var(--r-pill); padding: 6px 6px 6px 16px; }
.contact .icon { color: var(--primary); }
.contact span { min-width: 0; overflow-wrap: anywhere; flex: 1; user-select: all; }
.copy { border: 0; background: var(--soft); border-radius: var(--r-pill); font-size: 12.5px; padding: 6px 14px; cursor: pointer; color: var(--fg); font-weight: 500; }
.copy:hover { background: var(--soft-2); }
.counter { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

/* ---- Ticker ---- */
.ticker { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--deep); color: var(--on-deep); }
.ticker-in { display: flex; align-items: center; gap: 12px; padding-top: 11px; padding-bottom: calc(11px + env(safe-area-inset-bottom, 0px)); padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); font-size: 14px; }
.ticker p { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker a { color: var(--yellow); font-weight: 600; white-space: nowrap; }
.ticker .stripe { height: 4px; }

/* ---- Modal y toast ---- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(8, 20, 9, .55); display: grid; place-items: center; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 24px; }
.modal-card { background: var(--surface); border-radius: var(--r-card); width: 100%; max-width: 520px; max-height: 100%; overflow-y: auto; padding: 26px; position: relative; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-x { position: absolute; right: 16px; top: 16px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--soft); cursor: pointer; display: grid; place-items: center; }
.modal-card .pcard { background: var(--soft); border-radius: var(--r-card); padding: 22px; }
.prejoin { aspect-ratio: 16 / 10; border-radius: var(--r-card); background: var(--player); color: #D6EBD0; display: grid; place-items: center; text-align: center; position: relative; overflow: hidden; }
.prejoin .av { width: 88px; height: 88px; font-size: 30px; }
.prejoin .state { position: absolute; bottom: 12px; left: 0; right: 0; font-size: 13px; opacity: .8; }
.toggles { display: flex; gap: 10px; justify-content: center; }
.tbtn { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--deep); color: var(--on-deep); display: grid; place-items: center; cursor: pointer; }
.tbtn.off { background: var(--red-soft); color: var(--red); }
.toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; background: var(--fg); color: var(--bg); padding: 11px 20px; border-radius: var(--r-pill); font-weight: 500; font-size: 14px; box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center; }
.demo-flag { font-size: 11.5px; color: var(--on-yellow); background: var(--yellow-soft); border-radius: var(--r-chip); padding: 3px 10px; font-weight: 500; }

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .two-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 980px) {
  .profile { grid-template-columns: minmax(0, 1fr); }
  .preview-wrap { position: static; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); z-index: 50; transform: translateX(-102%); transition: transform .22s ease; padding-left: env(safe-area-inset-left, 0px); padding-top: env(safe-area-inset-top, 0px); }
  .app.nav-open .side { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.3); }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(8, 20, 9, .45); }
  .menu-btn { display: grid; }
  .live-grid { grid-template-columns: minmax(0, 1fr); }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-art-in { padding-block: 32px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); gap: 20px; }
  .login-art .logo { width: 70px; height: 119px; }
}
@media (max-width: 600px) {
  .top { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); gap: 10px; }
  .view { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 8px 32px; }
  #tzTop, .clock span { display: none; }
  .top .lang-select { max-width: 52px; }
  .top-title h1 { font-size: 20px; }
  .slot { grid-template-columns: 58px minmax(0, 1fr); padding: 16px; gap: 12px; }
  .slot .time { font-size: 18px; }
  .slot .act { grid-column: 2; justify-self: start; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .contact-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .switch { padding-bottom: 0; }
  .ticker-in { font-size: 13px; }
  .segment { width: 100%; }
  .segment button { flex: 1; justify-content: center; padding: 10px 12px; }
  .form-card { padding: 20px; }
  .live-card { min-height: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- Formularios de la app (mensajes de error y confirmación) ---- */
.input.is-invalid { border-color: var(--red); background: var(--surface); }
.field-error { font-size: 13px; color: var(--red); font-weight: 500; }
.alert { font-size: 14px; border-radius: var(--r-input); padding: 12px 14px; }
.alert-ok { background: #E6F2E1; color: var(--primary); font-weight: 500; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
/* ---- Pantallas de la app ---- */
.player.has-video { background: #000; }
.player.has-video::after { display: none; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.subnav a { text-decoration: none; }
a.person, a.tile { text-decoration: none; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.pager [aria-disabled="true"] { opacity: .45; pointer-events: none; }
.room-chat .msgs .hint { margin: auto 0; text-align: center; }
.opt { display: inline-block; }
/* ---- Chats en vivo ---- */
.chat-box { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat .chat-box { min-height: 460px; }
.chat .chat-box .msgs { max-height: 520px; }
.room-chat .chat-box .msgs { flex: 1; }
.chat-box .msgs .hint { margin: auto 0; text-align: center; }
.chat-error { padding: 0 16px; }
a.opt { text-decoration: none; }
/* ---- Asistente de ayuda (botón flotante y ventanita) ---- */
.helper { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: 76px; z-index: 30; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.helper-fab { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 18px 10px 10px; background: var(--deep); color: var(--on-deep); font-weight: 600; cursor: pointer; box-shadow: var(--shadow); }
.helper-fab > span[aria-hidden] { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--yellow); color: var(--on-yellow); font-weight: 700; }
.helper.is-open .helper-fab { display: none; }
.helper-panel { width: min(380px, calc(100vw - 32px)); height: min(520px, calc(100vh - 140px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.helper-panel[hidden] { display: none; }
.helper-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--deep); color: var(--on-deep); }
.helper-head p { font-size: 12px; opacity: .8; }
.helper-close { border: 0; background: transparent; color: inherit; font-size: 24px; line-height: 1; cursor: pointer; }
.helper-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--soft); }
.helper-msg { max-width: 88%; padding: 10px 13px; border-radius: var(--r-input); font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.helper-msg.from-bot { align-self: flex-start; background: var(--surface); }
.helper-msg.from-me { align-self: flex-end; background: var(--primary); color: var(--on-primary); }
.helper-msg.is-busy { color: var(--muted); font-style: italic; }
.helper-msg a { color: var(--primary); font-weight: 600; }
.helper-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.helper-form .input { padding: 9px 12px; }

/* ---- Salas de video: contador en vivo, llamada y "Mi venos" ---- */
.chip-now { background: var(--green); color: #fff; }
.chip-now .dot { animation: pulse 1.6s infinite; }
.chip-now.is-empty { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.chip-now.is-empty .dot { animation: none; opacity: .5; }
.subnav-count { margin-left: auto; font-size: 12px; font-weight: 600; color: #fff; background: var(--green); border-radius: var(--r-pill); min-width: 22px; padding: 1px 7px; text-align: center; }
.subnav-count.is-empty { display: none; }
.player.has-video { aspect-ratio: auto; height: min(75vh, 720px); }
.call-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.faces { display: inline-flex; align-items: center; }
.faces .av { border: 2px solid var(--surface); }
.faces .av + .av { margin-left: -8px; }
.faces-lg { flex-wrap: wrap; justify-content: center; }
.faces-lg .av { border-color: var(--player); }
.section-title { font-size: clamp(20px, 2.2vw, 24px); font-weight: 600; margin-top: -6px; }
.meetup, .plan { display: flex; align-items: center; gap: 14px; background: var(--soft); border-radius: var(--r-card); padding: 12px 16px; color: var(--fg); text-decoration: none; flex-wrap: wrap; }
a.meetup:hover { background: var(--soft-2); }
.meetup-time { font-weight: 600; min-width: 150px; }
.meetup-body { display: flex; flex-direction: column; flex: 1; min-width: 140px; }
.plan-people { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 180px; }
.plan.is-mine { box-shadow: inset 0 0 0 1.5px var(--green); }
.plan form { margin-left: auto; }
.plan-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-card); padding: 18px; }
.plan-form .field { flex: 1 1 180px; }
.plan-form .field-error, .plan-form .hint { flex-basis: 100%; }[data-call] .player:not(.has-video) { aspect-ratio: auto; min-height: min(56vw, 480px); padding-block: 20px; }
