@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&family=Inter:wght@400;600&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --green: #01CB9D; --dark: #04110C; --bg: #0A0F0D; --bg2: #060908; --card: #121C18;
  --line: #20322A; --white: #F2F5F3; --soft: #A9B8B1; --dim: #6E7F77; --red: #FF4747;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--white); font-family: Inter, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: 'Space Grotesk', Arial, sans-serif; font-weight: 700; margin: 0; }
p { margin: 0; }
.g { color: var(--green); }
.mono { font-family: 'JetBrains Mono', monospace; }
button { font: inherit; cursor: pointer; }
.btn { min-height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--white); padding: 0 18px; font-size: 14px; font-weight: 600; }
.btn.primary { background: var(--green); color: var(--dark); border: none; }
.btn:disabled { opacity: .5; cursor: default; }
.live { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 600; letter-spacing: 1px; }
.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.live.off::before { background: var(--dim); }

/* ================= SCHERMO ================= */
body.screen { overflow: hidden; background: #000; }
.stage-wrap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
.stage { width: 1920px; height: 1080px; flex: none; transform-origin: center; position: relative; overflow: hidden;
  background: linear-gradient(155deg, #0E2A21 0%, #0A0F0D 55%); padding: 56px 112px 48px; display: flex; flex-direction: column; }
.stage.hot { background: linear-gradient(200deg, #0B231C 0%, #060908 60%); }
.topbar { display: flex; justify-content: space-between; align-items: center; height: 56px; }
.topbar .logo { height: 48px; }
.topbar .right { display: flex; gap: 24px; align-items: center; }
.topbar .live { font-size: 20px; padding: 8px 18px; }
.topbar .live::before { width: 14px; height: 14px; }
.topbar .count { font-family: 'JetBrains Mono', monospace; font-size: 22px; color: var(--soft); }
.content { flex: 1; display: flex; min-height: 0; padding: 32px 0 24px; }
.lay { flex: 1; display: flex; flex-direction: column; animation: rise .6s ease-out both; }
.stage .eyebrow { font-family: 'Space Grotesk', sans-serif; font-size: 28px; font-weight: 700; letter-spacing: 4px; color: var(--green); margin-bottom: 20px; }
.stage h1 { font-size: 100px; line-height: 1.04; letter-spacing: -2px; }
.stage h2 { font-size: 72px; line-height: 1.08; letter-spacing: -1px; max-width: 1650px; }
.stage h2.mid { font-size: 60px; }
.stage h3 { font-size: 40px; line-height: 1.15; }
.stage .en { font-size: 28px; font-style: italic; color: var(--soft); margin-top: 14px; }
.stage .statement { font-family: 'Space Grotesk', sans-serif; font-size: 92px; font-weight: 700; line-height: 1.08; letter-spacing: -2px; max-width: 1600px; }
.stage .statement.s2 { font-size: 48px; margin-top: 40px; color: var(--white); }
.stage .big { font-family: 'Space Grotesk', sans-serif; font-size: 220px; font-weight: 700; line-height: 1; letter-spacing: -6px; color: var(--green); margin: 16px 0 8px; animation: pop .8s ease-out both; }
.stage .foot { font-size: 24px; color: var(--soft); }
.stage .spacer { flex: 1; }
.stage .cards { display: flex; gap: 32px; margin-top: 56px; }
.stage .cards.small { margin-top: 36px; gap: 24px; }
.stage .card { flex: 1; background: var(--card); border: 2px solid var(--line); padding: 40px; border-radius: 24px; display: flex; flex-direction: column; gap: 16px; animation: rise .6s ease-out both; animation-delay: calc(var(--i) * 140ms); }
.stage .cards.small .card { padding: 28px 32px; }
.stage .card.hl { border-color: var(--green); box-shadow: 0 0 40px rgba(1, 203, 157, .25); }
.stage .card .num { font-family: 'Space Grotesk', sans-serif; font-size: 76px; font-weight: 700; color: var(--green); line-height: 1; }
.stage .cards.small .num { font-size: 56px; }
.stage .card .body { font-size: 30px; line-height: 1.4; color: var(--soft); }
.stage .cards.small .body { font-size: 26px; }
.stage .card .tag { font-size: 22px; font-weight: 600; letter-spacing: 3px; color: var(--green); }
.stage .row { display: flex; gap: 20px; align-items: center; }
.stage .avrow { margin-top: auto; }
.stage .avrow .who { margin-left: auto; text-align: right; }
.stage .avrow.sm { margin-top: 24px; gap: 12px; }
.av { border-radius: 50%; object-fit: cover; border: 5px solid var(--c); box-shadow: 0 0 40px var(--c); flex: none; animation: pop .6s ease-out both; }
.stage .agents { display: grid; grid-template-columns: repeat(7, 1fr); gap: 20px; margin-top: 40px; }
.stage .agent { background: var(--card); border-radius: 22px; overflow: hidden; border: 3px solid var(--c); box-shadow: 0 0 30px var(--c); animation: rise .6s ease-out both; animation-delay: calc(var(--i) * 110ms + 200ms); }
.stage .agent img { width: 100%; height: 190px; object-fit: cover; display: block; }
.stage .agent .name { font-family: 'Space Grotesk', sans-serif; font-size: 34px; font-weight: 700; color: var(--c); padding: 14px 18px 0; }
.stage .agent .role { font-size: 22px; color: var(--soft); padding: 2px 18px 18px; line-height: 1.3; }
.stage .cards.four .card { padding: 22px 26px; }
.stage .cards.four h3 { font-size: 30px; }
.stage .cards.four .body { font-size: 22px; }
.stage .steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 44px; }
.stage .steps-grid .av { margin-bottom: 4px; }
.stage .steps-grid h3 { font-size: 34px; }
.stage .steps-grid .body { font-size: 24px; }
.stage .prompt { background: #050807; border: 2px solid var(--green); box-shadow: 0 0 40px rgba(1, 203, 157, .25); padding: 36px 44px; border-radius: 20px; font-family: 'JetBrains Mono', monospace; font-size: 30px; line-height: 1.45; margin-top: 40px; }
.stage ol.steps { margin: 36px 0 0; padding-left: 44px; font-size: 32px; line-height: 1.5; color: var(--soft); }
.stage ol.steps b { color: var(--white); }
.stage .split { flex-direction: row; gap: 56px; }
.stage .split .left { flex: 3; display: flex; flex-direction: column; }
.stage .split .right { flex: 2; display: flex; flex-direction: column; }
.stage .split h2 { font-size: 60px; }
.stage .pill { align-self: flex-start; margin-top: 40px; background: var(--green); color: var(--dark); border-radius: 999px; padding: 14px 32px; font-family: 'Space Grotesk', sans-serif; font-size: 30px; font-weight: 700; }
.bars { display: flex; flex-direction: column; gap: 22px; margin-top: 44px; }
.bar-head { display: flex; justify-content: space-between; gap: 16px; font-size: 30px; margin-bottom: 10px; }
.bar-head b { color: var(--green); }
.track { height: 26px; border-radius: 13px; background: var(--card); overflow: hidden; }
.fill { height: 100%; border-radius: 13px; background: var(--line); transition: width .8s ease; }
.bar.win .fill { background: var(--green); }
.panel { background: var(--card); border: 2px solid var(--green); border-radius: 22px; padding: 32px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 0 32px rgba(1, 203, 157, .2); }
.panel.muted { border-color: var(--line); box-shadow: none; }
.panel .tag { font-size: 20px; font-weight: 600; letter-spacing: 3px; color: var(--green); }
.panel .tag.dim { color: var(--soft); margin-top: 12px; }
.panel h3 { font-size: 34px; }
.panel .body { font-size: 24px; line-height: 1.45; color: var(--soft); white-space: pre-wrap; }
.panel .clamp { display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical; overflow: hidden; }
.bottombar { display: flex; align-items: center; gap: 40px; height: 120px; }
.progress { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.ticks { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.ticks span { height: 8px; border-radius: 4px; background: var(--line); }
.ticks span.done { background: var(--green); }
.ticks span.now { background: var(--white); }
.progress p { font-size: 20px; color: var(--soft); }
.qrbox { display: flex; align-items: center; gap: 18px; }
.qrbox img { width: 120px; height: 120px; border-radius: 10px; background: var(--white); }
.qrbox p { font-size: 22px; line-height: 1.35; }
.qrbox span { color: var(--soft); font-family: 'JetBrains Mono', monospace; }
.offline { position: absolute; right: 24px; bottom: 16px; font-size: 16px; color: var(--dim); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }

/* ================= TELEFONO ================= */
body.phone { min-height: 100svh; display: flex; flex-direction: column; }
.ph-head { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 16px 16px 12px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ph-head .t { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 18px; }
.ph-head .s { font-size: 12px; color: var(--soft); margin-top: 2px; }
.ph-main { flex: 1; padding: 16px 16px 110px; max-width: 640px; width: 100%; margin: 0 auto; }
.tab { display: none; flex-direction: column; gap: 10px; }
.tab.on { display: flex; }
.ch { background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.ch > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 48px; cursor: pointer; font-size: 15px; }
.ch > summary::-webkit-details-marker { display: none; }
.ch > summary .k { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--green); }
.ch > summary .r { margin-left: auto; font-size: 12px; color: var(--soft); }
.ch[open] > summary .r { display: none; }
.ch .inner { padding: 0 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.ch.now { border: 2px solid var(--green); box-shadow: 0 0 24px rgba(1, 203, 157, .2); }
.ch.now > summary .k::after { content: ' · ORA IN SALA'; letter-spacing: 1px; }
.ch.locked { background: none; border: 1px dashed var(--line); color: var(--dim); }
.ch.locked > summary { cursor: default; }
.ch.locked > summary::before { content: ''; width: 12px; height: 12px; border: 2px solid var(--dim); border-radius: 3px; }
.ch h2 { font-size: 22px; line-height: 1.2; }
.ch .lead { font-size: 16px; line-height: 1.45; }
.ch .en { font-size: 13px; font-style: italic; color: var(--soft); }
.ch .bignum { font-family: 'Space Grotesk', sans-serif; font-size: 44px; font-weight: 700; color: var(--green); }
.ch .item { display: flex; gap: 10px; }
.ch .item .n { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--green); font-size: 17px; min-width: 18px; }
.ch .item p { font-size: 14px; line-height: 1.45; color: var(--soft); }
.ch .item b { color: var(--white); }
.ch .extra { background: var(--bg); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.45; }
.tag { font-size: 11px; font-weight: 600; letter-spacing: 2px; color: var(--soft); }
.ch .foot { font-size: 12px; color: var(--soft); }
.agents-ph { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.agent-ph { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.agent-ph img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--c); }
.agent-ph b { display: block; color: var(--c); }
.agent-ph span { color: var(--soft); font-size: 12px; }
.prompt-ph { background: #050807; border: 1px solid var(--green); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.prompt-ph pre { margin: 0; white-space: pre-wrap; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; line-height: 1.5; }
.prompt-ph .btn { align-self: flex-start; }
.langs { display: flex; gap: 6px; flex-wrap: wrap; }
.langs button { min-height: 36px; min-width: 44px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--soft); font-size: 13px; }
.langs button.on { background: var(--green); border-color: var(--green); color: var(--dark); font-weight: 600; }
.note-small { font-size: 11px; color: var(--soft); }
.seg { display: flex; flex-direction: column; gap: 4px; }
.seg time { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--soft); }
.seg p { font-size: 15px; line-height: 1.5; }
.seg .orig { font-size: 12px; color: var(--dim); }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.box.hi { border: 2px solid var(--green); }
.box h3 { font-size: 18px; }
.opt { display: flex; gap: 12px; align-items: center; min-height: 56px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--bg); color: var(--white); text-align: left; font-size: 15px; width: 100%; }
.opt b { font-family: 'Space Grotesk', sans-serif; color: var(--green); font-size: 20px; }
.opt.sel { border: 2px solid var(--green); background: rgba(1, 203, 157, .08); }
textarea, input[type=text], input[type=password] { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; color: var(--white); font: inherit; font-size: 16px; padding: 12px; }
textarea { min-height: 88px; resize: vertical; }
.download { background: var(--green); color: var(--dark); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.download h3 { font-size: 20px; }
.download p { font-size: 13px; line-height: 1.45; }
.download a { align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--dark); color: var(--white); text-decoration: none; font-size: 14px; font-weight: 600; padding: 0 18px; }
.note-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.note-card summary { padding: 14px; min-height: 48px; cursor: pointer; font-size: 14px; font-weight: 600; list-style: none; }
.note-card .b { padding: 0 14px 14px; font-size: 14px; line-height: 1.5; color: var(--soft); white-space: pre-wrap; }
.ph-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--bg2); border-top: 1px solid var(--line); padding: 6px 4px calc(10px + env(safe-area-inset-bottom)); }
.ph-nav button { min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: none; border: none; color: var(--soft); font-size: 11px; position: relative; }
.ph-nav button.on { color: var(--green); font-weight: 600; }
.ph-nav button .dot { position: absolute; top: 6px; right: calc(50% - 18px); width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: none; }
.ph-nav button.alert .dot { display: block; }
.toast { position: fixed; left: 50%; top: 12px; transform: translate(-50%, -300%); transition: transform .4s; background: var(--green); color: var(--dark); font-weight: 600; font-size: 14px; padding: 10px 18px; border-radius: 999px; z-index: 20; }
.toast.show { transform: translate(-50%, 0); }
.msg { font-size: 13px; color: var(--soft); }
.msg.ok { color: var(--green); }
.msg.err { color: var(--red); }

/* ================= REGIA ================= */
body.regia { background: var(--bg2); }
.rg { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 16px; padding: 16px; min-height: 100vh; }
.rg .col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rg .box h3 { font-size: 13px; font-weight: 600; letter-spacing: 2px; color: var(--soft); font-family: Inter, sans-serif; }
.rg-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rg-top h1 { font-size: 20px; }
.rg-top .clock { font-family: 'JetBrains Mono', monospace; color: var(--green); font-size: 20px; }
.mini-stage { width: 100%; aspect-ratio: 16 / 9; position: relative; overflow: hidden; border: 2px solid var(--green); border-radius: 12px; }
.mini-stage .stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.navbtns { display: flex; gap: 12px; }
.navbtns button { min-height: 76px; border-radius: 14px; font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 700; }
.navbtns .prev { flex: 1; background: var(--card); color: var(--white); border: 1px solid var(--line); }
.navbtns .next { flex: 2; background: var(--green); color: var(--dark); border: none; font-size: 26px; }
.kw p { font-size: 19px; line-height: 1.45; }
.chlist { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.chlist button { min-height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--soft); font-family: 'JetBrains Mono', monospace; }
.chlist button.now { background: var(--green); color: var(--dark); font-weight: 700; }
.chlist button.off { opacity: .35; }
.stat { display: flex; justify-content: space-between; font-size: 14px; gap: 8px; }
.stat .ok { color: var(--green); }
.stat .ko { color: var(--red); }
.toggles label { display: flex; justify-content: space-between; align-items: center; font-size: 14px; min-height: 36px; gap: 8px; }
.toggles input { width: 22px; height: 22px; accent-color: var(--green); }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; }
.q { display: flex; gap: 8px; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 8px; font-size: 14px; }
.q p { flex: 1; line-height: 1.4; }
.q.shown p { color: var(--green); }
.q.hidden p { color: var(--dim); text-decoration: line-through; }
.q button { min-height: 32px; padding: 0 10px; font-size: 12px; }
.qlist { max-height: 300px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.login { max-width: 360px; margin: 18vh auto; display: flex; flex-direction: column; gap: 12px; padding: 16px; }
@media (max-width: 1100px) { .rg { grid-template-columns: 1fr; } }
