:root{--bg:#0d1321;--panel:#ffffff;--accent:#ffb703;--accent2:#fb8500;--text:#172033;--muted:#6b7280;--danger:#c1121f}
*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#f3f5f9;color:var(--text)}
.container{max-width:1150px;margin:0 auto;padding:28px}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}h1,h2,h3{margin-top:0}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:20px}.card{background:#fff;border-radius:18px;padding:22px;box-shadow:0 8px 24px rgba(0,0,0,.08);margin-bottom:20px}.card h2{display:flex;justify-content:space-between}.card h2 span{font-size:.85rem;color:var(--muted)}
.inline-form{display:flex;gap:10px;margin-bottom:15px}.inline-form input{flex:1;padding:12px 14px;border:1px solid #d7dce5;border-radius:10px;font-size:16px}.btn,.icon{border:0;border-radius:10px;padding:11px 16px;cursor:pointer;font-weight:700;text-decoration:none;display:inline-block}.primary{background:var(--accent2);color:#fff}.danger{background:var(--danger);color:#fff}.ghost{background:rgba(255,255,255,.15);color:#fff}.icon{padding:7px 10px}.list{max-height:340px;overflow:auto}.row{display:flex;justify-content:space-between;align-items:center;padding:9px 4px;border-bottom:1px solid #eee}.muted{opacity:.48}.empty{color:var(--muted)}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:10px;border-bottom:1px solid #eee}.flash{padding:12px 15px;border-radius:10px;margin-bottom:15px;background:#fff3cd}.actions{text-align:right}

/* Pantalla del sorteo */
.play-body{background:radial-gradient(circle at top,#26395f 0,#0d1321 62%);color:#fff;height:100vh;min-height:100vh;overflow:hidden}
.play-wrap{height:100vh;padding:16px;display:grid;grid-template-columns:minmax(0,1fr) 300px;grid-template-rows:42px minmax(0,1fr);gap:10px 18px}
.topbar{grid-column:1/3;display:flex;justify-content:space-between;align-items:center;min-width:0}.top-actions{display:flex;align-items:center;gap:12px}.sound-btn{border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.12);color:#fff;border-radius:10px;min-width:132px;height:38px;padding:0 13px;cursor:pointer;font-size:15px;font-weight:800;transition:.2s ease}.sound-btn:hover{background:rgba(255,255,255,.2)}.sound-btn.sound-off{opacity:.72;background:rgba(255,255,255,.06)}
.stage{text-align:center;display:flex;min-height:0;flex-direction:column;align-items:center;justify-content:flex-start;padding-top:4px}.stage h1{font-size:clamp(34px,4vw,58px);line-height:1;margin:0 0 10px;letter-spacing:.5px}.prize-box{font-size:clamp(20px,2.1vw,32px);background:rgba(255,255,255,.12);padding:9px 20px;border-radius:15px;margin-bottom:9px;min-height:52px;display:flex;align-items:center;justify-content:center;transition:.25s ease}.prize-box.prize-reveal{animation:prizePop .75s ease both}@keyframes prizePop{0%{transform:scale(.82);opacity:.2}55%{transform:scale(1.08)}100%{transform:scale(1);opacity:1}}
.wheel-shell{position:relative;width:min(55vh,445px);height:min(55vh,445px);flex:0 0 auto;filter:drop-shadow(0 16px 25px rgba(0,0,0,.35))}.wheel-canvas{display:block;width:100%;height:100%;border-radius:50%}.pointer{position:absolute;left:50%;top:-5px;transform:translate(-50%,-42%);z-index:5;width:0;height:0;border-left:18px solid transparent;border-right:18px solid transparent;border-top:0;border-bottom:34px solid #ffb703;filter:drop-shadow(0 3px 2px rgba(0,0,0,.4))}.wheel-center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:4;font-size:clamp(22px,3vh,36px);pointer-events:none}
.spin-btn{margin-top:10px;border:0;background:linear-gradient(135deg,#ffb703,#fb8500);font-size:clamp(20px,2.2vw,30px);font-weight:900;padding:12px 28px;border-radius:16px;cursor:pointer;box-shadow:0 9px 22px rgba(251,133,0,.35);transition:transform .15s ease}.spin-btn:hover:not(:disabled){transform:translateY(-2px)}.spin-btn:disabled{opacity:.55;cursor:not-allowed}.message{height:30px;margin-top:7px;font-size:clamp(16px,1.55vw,22px);font-weight:700;line-height:30px}
.winner-panel{background:rgba(255,255,255,.08);border-radius:18px;padding:16px;align-self:start;max-height:calc(100vh - 84px);overflow:auto}.winner-panel h3{margin-bottom:10px}.winner-item{display:flex;flex-direction:column;padding:9px 10px;border-bottom:1px solid rgba(255,255,255,.15)}.winner-item span{font-size:.9rem;opacity:.8;margin-top:3px}

/* Pregunta / reto */
.modal{position:fixed;inset:0;background:rgba(3,8,20,.86);backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;padding:20px;z-index:20}.hidden{display:none!important}.modal-card{background:linear-gradient(180deg,#fff 0,#f7f9fc 100%);color:#172033;width:min(760px,94vw);max-height:92vh;overflow:auto;border-radius:24px;padding:24px 30px;text-align:center;box-shadow:0 25px 80px rgba(0,0,0,.55);animation:modalIn .35s ease both}@keyframes modalIn{from{opacity:0;transform:scale(.9) translateY(16px)}to{opacity:1;transform:scale(1) translateY(0)}}.challenge-title{font-size:16px;font-weight:900;letter-spacing:1.7px;color:#6b7280;margin-bottom:5px}.selected-name{font-size:clamp(32px,5vw,48px);font-weight:900;color:#172033;line-height:1.05}.selected-prize{font-size:clamp(20px,3vw,26px);color:#fb8500;margin:5px 0 10px;font-weight:800}.category{display:inline-block;background:#eaf0f8;padding:6px 14px;border-radius:999px;font-weight:800;margin-bottom:8px}.modal-card h2{font-size:clamp(22px,3vw,30px);margin:8px 0 15px;line-height:1.25}.options{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin:14px 0}.option-btn{display:flex;align-items:center;gap:10px;text-align:left;padding:13px 14px;border:2px solid #d6dbe5;border-radius:14px;background:#fff;font-size:17px;font-weight:700;cursor:pointer;transition:.15s ease}.option-btn:hover:not(:disabled){border-color:#fb8500;transform:translateY(-1px)}.option-letter{flex:0 0 31px;width:31px;height:31px;border-radius:50%;background:#eef1f6;display:inline-flex;align-items:center;justify-content:center;font-weight:900}.option-btn.correct{background:#d8f3dc;border-color:#2d6a4f}.option-btn.correct .option-letter{background:#2d6a4f;color:#fff}.option-btn.correct-answer{border-color:#2d6a4f;box-shadow:inset 0 0 0 1px #2d6a4f}.option-btn.wrong{background:#ffe5e5;border-color:#c1121f}.option-btn.wrong .option-letter{background:#c1121f;color:#fff}.answer-result{font-size:21px;line-height:1.35;margin:10px 0}.small-result{font-size:16px;color:#6b7280}.continue-btn{font-size:17px;padding:11px 24px}.confetti-canvas{position:fixed;inset:0;pointer-events:none;z-index:35}

@media(max-height:760px) and (min-width:901px){.play-wrap{padding:10px 14px;grid-template-rows:38px minmax(0,1fr)}.stage h1{font-size:42px;margin-bottom:6px}.prize-box{font-size:23px;padding:7px 18px;min-height:44px;margin-bottom:7px}.wheel-shell{width:min(52vh,390px);height:min(52vh,390px)}.spin-btn{margin-top:7px;padding:10px 24px;font-size:23px}.message{margin-top:3px;height:26px;line-height:26px;font-size:17px}}
@media(max-width:900px){.play-body{height:auto;min-height:100vh;overflow:auto}.play-wrap{height:auto;min-height:100vh;grid-template-columns:1fr;grid-template-rows:auto auto auto;padding:12px}.topbar{grid-column:1}.stage{padding-top:8px}.winner-panel{max-height:none}.wheel-shell{width:min(76vw,430px);height:min(76vw,430px)}.options{grid-template-columns:1fr}}


/* Celebracion visible al acertar */
.celebration{position:fixed;inset:0;z-index:80;display:flex;align-items:center;justify-content:center;overflow:hidden;pointer-events:none;background:radial-gradient(circle at center,rgba(255,183,3,.16),rgba(3,8,20,.42));animation:celebrationIn .28s ease both}
.celebration-out{animation:celebrationOut .45s ease both}
.celebration-card{position:relative;z-index:82;min-width:min(620px,88vw);padding:24px 34px 28px;border-radius:28px;text-align:center;color:#fff;background:linear-gradient(145deg,rgba(15,27,50,.96),rgba(35,54,90,.96));border:3px solid #ffb703;box-shadow:0 0 0 7px rgba(255,183,3,.14),0 28px 90px rgba(0,0,0,.55);animation:winnerPop .65s cubic-bezier(.2,.9,.25,1.25) both}
.celebration-trophy{font-size:64px;line-height:1}.celebration-title{font-size:clamp(36px,5vw,66px);font-weight:1000;color:#ffcf33;letter-spacing:2px;line-height:1.05;margin:4px 0 8px;text-shadow:0 4px 18px rgba(255,183,3,.35)}
.celebration-headline{font-size:clamp(24px,3.3vw,42px);font-weight:1000;color:#fff;line-height:1.05;margin:3px 0 5px;text-transform:uppercase}.celebration-name{font-size:clamp(30px,4vw,52px);font-weight:1000;line-height:1.05;text-transform:uppercase}.celebration-prize{font-size:clamp(20px,2.4vw,30px);font-weight:800;color:#ffd166;margin-top:10px}
.confetti-layer{position:absolute;inset:0;z-index:81;overflow:hidden}.confetti-piece{position:absolute;top:-28px;display:block;border-radius:2px;opacity:.98;animation:confettiFall var(--fall) linear var(--delay) both}
@keyframes confettiFall{0%{transform:translate3d(0,-8vh,0) rotate(0deg)}100%{transform:translate3d(var(--drift),112vh,0) rotate(var(--spin))}}
@keyframes winnerPop{0%{opacity:0;transform:scale(.55) rotate(-3deg)}65%{opacity:1;transform:scale(1.08) rotate(1deg)}100%{transform:scale(1) rotate(0)}}
@keyframes celebrationIn{from{opacity:0}to{opacity:1}}@keyframes celebrationOut{to{opacity:0;transform:scale(1.03)}}
@media(max-height:760px){.celebration-card{padding:16px 28px 20px}.celebration-trophy{font-size:48px}}

@media(max-width:600px){.sound-btn{min-width:46px;width:46px;padding:0;font-size:0}.sound-btn::first-letter{font-size:20px}}

/* Configuracion de preguntas */
.question-config{display:grid;grid-template-columns:1.5fr 1fr auto;gap:18px;align-items:end}.category-checks,.difficulty-options{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}.category-checks label,.difficulty-options label{background:#f3f5f9;border:1px solid #d7dce5;border-radius:10px;padding:9px 12px;cursor:pointer;font-weight:700}.question-config small{grid-column:1/-1;color:var(--muted)}@media(max-width:800px){.question-config{grid-template-columns:1fr}}

/* Administrador: nombre, gestion segura e historial */
.event-name-form{display:flex;gap:10px;align-items:center}.event-name-form input{flex:1;padding:13px 14px;border:1px solid #d7dce5;border-radius:10px;font-size:17px;font-weight:700}.event-card small,.admin-help{color:var(--muted)}
.admin-action-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:14px}.admin-action{border:1px solid #e3e7ee;border-radius:14px;padding:17px;background:#f8fafc}.admin-action h3{margin-bottom:7px}.admin-action p{margin:0 0 14px;color:var(--muted);line-height:1.45}.safe-action{border-left:5px solid var(--accent2)}.danger-zone{border-left:5px solid var(--danger);background:#fff8f8}.danger-buttons{display:flex;gap:9px;flex-wrap:wrap}.history-wrap{max-height:330px;overflow:auto}.flash.ok{background:#dff5e5;color:#174b2a}.flash.error{background:#ffe2e2;color:#7a1010}
@media(max-width:800px){.event-name-form{flex-direction:column;align-items:stretch}.admin-action-grid{grid-template-columns:1fr}}

/* Administrador avanzado */
.editable-row{gap:8px}.edit-inline{display:flex;align-items:center;gap:6px;flex:1;min-width:0}.edit-inline input{width:100%;min-width:0;border:1px solid transparent;background:transparent;border-radius:8px;padding:8px 9px;font:inherit;font-weight:700;color:inherit}.edit-inline input:focus{background:#fff;border-color:#9fb1c9;outline:none}.icon.edit{background:#e9f2ff;color:#184f8f;border:0;border-radius:8px;cursor:pointer}.status-badge{flex:0 0 auto}.advanced-config{grid-template-columns:1.25fr .8fr 1.35fr auto}.failure-options{display:flex;flex-direction:column;gap:8px;margin-top:10px}.failure-options label{background:#f3f5f9;border:1px solid #d7dce5;border-radius:10px;padding:9px 12px;cursor:pointer;font-weight:700}.config-save{align-self:end}.section-title-row{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}.section-title-row h2{margin-bottom:4px}.outline-danger{white-space:nowrap}.history-groups{display:flex;flex-direction:column;gap:10px}.history-event{border:1px solid #e1e6ee;border-radius:12px;overflow:hidden}.history-event summary{display:flex;justify-content:space-between;gap:15px;padding:13px 15px;background:#f7f9fc;cursor:pointer}.history-event summary span{color:var(--muted);font-weight:700}.history-event .history-wrap{max-height:300px}.history-event table{margin:0}
@media(max-width:1000px){.advanced-config{grid-template-columns:1fr 1fr}.failure-config{grid-column:1/-1}.config-save{justify-self:start}}
@media(max-width:700px){.advanced-config{grid-template-columns:1fr}.failure-config{grid-column:auto}.section-title-row{flex-direction:column}.edit-inline input{padding:7px 5px}}

/* Resumen previo y modo presentación */
.start-overlay{position:fixed;inset:0;z-index:70;display:flex;align-items:center;justify-content:center;padding:22px;background:radial-gradient(circle at top,#2d4673 0,#0d1321 68%);color:#fff}.start-card{width:min(850px,94vw);border:2px solid rgba(255,183,3,.65);border-radius:28px;padding:28px 34px;text-align:center;background:rgba(19,31,54,.96);box-shadow:0 28px 90px rgba(0,0,0,.5)}.start-kicker{font-weight:900;color:#ffd166;letter-spacing:1.5px}.start-card h2{font-size:clamp(34px,5vw,58px);margin:8px 0 20px}.summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:12px 0 18px}.summary-grid>div{display:flex;flex-direction:column;align-items:center;background:rgba(255,255,255,.08);border-radius:16px;padding:15px 10px}.summary-grid span{font-size:28px}.summary-grid strong{font-size:25px;margin:4px 0}.summary-grid small{opacity:.75}.summary-line{margin:8px 0;font-size:17px}.start-actions{display:flex;justify-content:center;align-items:center;gap:14px;margin-top:20px}.start-game-btn{margin-top:0}.start-admin{border:1px solid rgba(255,255,255,.18)}
@media(max-width:700px){.summary-grid{grid-template-columns:1fr 1fr}.start-card{padding:22px 18px}.start-actions{flex-direction:column}.start-actions>*{width:100%}.start-game-btn{font-size:20px}}

/* Empresa / Familia, estados y ciclo de eventos */
.admin-header{gap:18px}.header-actions{display:flex;gap:10px;align-items:center}.scope-switch{display:flex;gap:10px;margin:-4px 0 10px}.scope-tab{padding:12px 22px;border-radius:12px;background:#e7ebf2;color:#334155;text-decoration:none;font-weight:900;border:2px solid transparent}.scope-tab.active{background:#172033;color:#fff;border-color:#ffb703;box-shadow:0 6px 18px rgba(23,32,51,.16)}.scope-note{margin:0 0 20px;color:#64748b;font-size:.95rem}.event-status{display:inline-flex;align-items:center;padding:8px 12px;border-radius:999px;font-weight:900;font-size:.9rem;background:#eef2f7;color:#334155}.status-preparacion{background:#fff2c6;color:#765300}.status-en-curso{background:#dff4e7;color:#155b32}.status-finalizado{background:#eceff3;color:#59616e}.icon.toggle{background:#f2f4f7;color:#334155}.disabled-row{opacity:.55;background:#f4f5f7}.status-badge.neutral{filter:grayscale(1)}
.lifecycle-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.new-event-action{grid-column:1/-1;border-left:5px solid #3a86ff}.finish-action{border-left:5px solid #64748b}.btn.finish{background:#475569;color:#fff}.btn:disabled,.spin-btn:disabled{opacity:.45;cursor:not-allowed;filter:grayscale(.5)}.new-event-form{display:grid;grid-template-columns:minmax(240px,1fr) auto auto;gap:12px;align-items:center}.new-event-form input[type=text],.new-event-form input:not([type]){padding:12px 14px;border:1px solid #d7dce5;border-radius:10px;font-size:16px}.new-event-form label{font-weight:700;white-space:nowrap}.history-filter{display:flex;align-items:center;gap:10px;margin:12px 0 16px}.history-filter label{font-weight:800}.history-filter select{min-width:min(520px,70vw);padding:10px 12px;border:1px solid #d7dce5;border-radius:10px;background:#fff;font-size:15px}.play-admin-group{display:flex;align-items:center;gap:9px}.play-scope-badge{display:inline-flex;padding:8px 12px;border-radius:999px;background:rgba(255,183,3,.15);border:1px solid rgba(255,183,3,.55);color:#ffd166;font-weight:900}.summary-warning{margin:14px auto 0;max-width:700px;padding:11px 14px;border-radius:12px;background:rgba(255,183,3,.13);border:1px solid rgba(255,183,3,.55);color:#ffe29a;font-weight:700;line-height:1.4}
@media(max-width:800px){.header-actions{flex-wrap:wrap;justify-content:flex-end}.scope-switch{display:grid;grid-template-columns:1fr 1fr}.scope-tab{text-align:center}.lifecycle-grid{grid-template-columns:1fr}.new-event-action{grid-column:auto}.new-event-form{grid-template-columns:1fr}.history-filter{align-items:stretch;flex-direction:column}.history-filter select{min-width:0;width:100%}.play-admin-group{gap:5px}.play-scope-badge{font-size:12px;padding:6px 8px}}

/* Estadisticas, exportacion y resumen final */
.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:0 0 20px}.stat-card{display:flex;align-items:center;gap:14px;background:#fff;border-radius:16px;padding:16px 18px;box-shadow:0 7px 20px rgba(0,0,0,.07);border-top:4px solid var(--accent2)}.stat-card>span{font-size:30px}.stat-card div{display:flex;flex-direction:column;min-width:0}.stat-card strong{font-size:27px;line-height:1}.stat-card small{font-weight:800;margin-top:4px}.stat-card em{font-size:12px;color:var(--muted);font-style:normal;margin-top:3px}.secondary{background:#e8eef8;color:#253a5b}.history-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.history-actions form{margin:0}
.theme-familia{--accent:#ff8fab;--accent2:#b565d9}.theme-familia.play-body{background:radial-gradient(circle at top,#5b376f 0,#24112f 65%)}.theme-familia .scope-tab.active{border-color:#ff8fab}.theme-familia .play-scope-badge{background:rgba(255,143,171,.17);border-color:rgba(255,143,171,.65);color:#ffd0dc}.theme-familia .spin-btn{background:linear-gradient(135deg,#ff8fab,#b565d9);box-shadow:0 9px 22px rgba(181,101,217,.34)}.theme-familia .pointer{border-bottom-color:#ff8fab}.theme-familia .wheel-shell{filter:drop-shadow(0 16px 25px rgba(58,21,72,.4))}.theme-familia .prize-box{background:rgba(255,255,255,.14)}
.event-complete{position:fixed;inset:0;z-index:75;display:flex;align-items:center;justify-content:center;background:rgba(5,10,22,.84);backdrop-filter:blur(5px);padding:20px}.event-complete-card{width:min(620px,92vw);text-align:center;background:#fff;color:#172033;border-radius:26px;padding:30px 32px;box-shadow:0 30px 90px rgba(0,0,0,.5);border:3px solid var(--accent)}.event-complete-icon{font-size:60px}.event-complete-card h2{font-size:clamp(32px,5vw,52px);margin:4px 0 8px}.event-complete-card p{font-size:18px;color:#64748b}.event-complete-actions{display:flex;justify-content:center;gap:12px;margin-top:20px}.event-complete .ghost{background:#eef2f7;color:#334155}
.summary-page{min-height:100vh;background:#f3f5f9}.summary-container{max-width:1000px;margin:0 auto;padding:28px}.summary-hero{border-radius:26px;padding:30px;text-align:center;color:#fff;background:linear-gradient(145deg,#172033,#2f466c);box-shadow:0 15px 35px rgba(0,0,0,.15);margin-bottom:20px}.theme-familia .summary-hero{background:linear-gradient(145deg,#4d2f5d,#7b4a8e)}.summary-hero .eyebrow{font-weight:900;letter-spacing:1.4px;color:#ffd166}.summary-hero h1{font-size:clamp(34px,5vw,58px);margin:8px 0}.summary-hero p{margin:0;opacity:.85}.summary-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:18px 0}.summary-kpi{background:#fff;border-radius:16px;padding:18px;text-align:center;box-shadow:0 6px 18px rgba(0,0,0,.06)}.summary-kpi strong{display:block;font-size:32px}.summary-kpi span{color:#64748b;font-weight:700}.summary-table-card{background:#fff;border-radius:20px;padding:22px;box-shadow:0 8px 24px rgba(0,0,0,.08)}.summary-actions{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:18px}.print-note{color:#64748b;font-size:13px;margin-top:10px}
@media(max-width:900px){.stats-grid{grid-template-columns:1fr 1fr}.summary-kpis{grid-template-columns:1fr 1fr 1fr}}@media(max-width:600px){.stats-grid{grid-template-columns:1fr}.event-complete-actions{flex-direction:column}.summary-kpis{grid-template-columns:1fr}.summary-container{padding:14px}.summary-hero{padding:22px 16px}}
@media print{.summary-actions,.print-note{display:none!important}.summary-page{background:#fff}.summary-container{max-width:none;padding:0}.summary-hero,.summary-table-card,.summary-kpi{box-shadow:none}.summary-hero{color:#000;background:#fff;border:2px solid #000}.summary-hero .eyebrow{color:#000}}

/* Identidad visual definitiva por ambito */
.theme-empresa{--accent:#d71920;--accent2:#b5121b;--text:#151515;--danger:#9d1117}
.theme-empresa.play-body{background:radial-gradient(circle at top,#3a3a3a 0,#101010 67%)}
.theme-empresa .scope-tab.active{background:#111;color:#fff;border-color:#d71920}
.theme-empresa .primary{background:#d71920;color:#fff}.theme-empresa .secondary{background:#efefef;color:#171717}
.theme-empresa .stat-card{border-top-color:#d71920}.theme-empresa .play-scope-badge{background:rgba(215,25,32,.16);border-color:rgba(215,25,32,.65);color:#fff}
.theme-empresa .spin-btn{background:linear-gradient(135deg,#e11b22,#9d1117);box-shadow:0 9px 22px rgba(215,25,32,.33)}.theme-empresa .pointer{border-bottom-color:#d71920}
.theme-empresa .selected-prize{color:#d71920}.theme-empresa .option-btn:hover:not(:disabled){border-color:#d71920}
.theme-empresa .celebration{background:radial-gradient(circle at center,rgba(215,25,32,.18),rgba(0,0,0,.56))}.theme-empresa .celebration-card{background:linear-gradient(145deg,#0e0e0e,#2a2a2a);border-color:#d71920;box-shadow:0 0 0 7px rgba(215,25,32,.13),0 28px 90px rgba(0,0,0,.62)}.theme-empresa .celebration-title,.theme-empresa .celebration-prize{color:#fff}.theme-empresa .start-overlay{background:radial-gradient(circle at top,#3b3b3b 0,#0d0d0d 70%)}.theme-empresa .start-card{border-color:rgba(215,25,32,.72);background:rgba(20,20,20,.97)}.theme-empresa .start-kicker{color:#fff}
.theme-familia{--accent:#ff8a00;--accent2:#1976d2}.theme-familia.play-body,.theme-familia.presentation-body{background:radial-gradient(circle at top,#1c6fa8 0,#123e68 46%,#153b2d 100%)}.theme-familia .scope-tab.active{background:#1976d2;border-color:#ff8a00}.theme-familia .primary{background:#1976d2}.theme-familia .spin-btn{background:linear-gradient(135deg,#ff8a00,#1f9d55);box-shadow:0 9px 22px rgba(255,138,0,.28)}.theme-familia .pointer{border-bottom-color:#ff8a00}.theme-familia .stat-card{border-top-color:#1f9d55}.theme-familia .play-scope-badge{background:rgba(31,157,85,.16);border-color:rgba(255,138,0,.65);color:#fff}

/* Logo y marca */
.admin-brand-block{display:grid;grid-template-columns:auto 1fr;column-gap:14px;align-items:center}.admin-brand-block h1,.admin-brand-block p{grid-column:2}.admin-logo-wrap{grid-row:1/3;display:flex;align-items:center}.admin-logo-wrap img{max-width:185px;max-height:66px;object-fit:contain}.brand-fallback{display:none;font-size:28px;font-weight:1000;letter-spacing:1.5px;color:#d71920}.play-brand{height:44px;margin-bottom:2px;display:flex;align-items:center;justify-content:center}.play-brand img{max-width:220px;max-height:44px;object-fit:contain}.play-brand .brand-fallback{color:#fff;font-size:28px}.family-brand{font-weight:1000;letter-spacing:1px;color:#fff}.admin-family-brand{grid-row:1/3;font-size:28px;background:linear-gradient(90deg,#1f9d55,#1976d2,#ff8a00);padding:12px 18px;border-radius:14px}

/* Importacion masiva */
.import-form{border:1px dashed #c8ced8;border-radius:12px;padding:12px;margin:0 0 14px;background:#fafbfc}.import-label{display:block;font-weight:900;margin-bottom:8px}.import-row{display:flex;gap:9px;align-items:center}.import-row input[type=file]{flex:1;min-width:0}.import-form small{display:block;margin-top:7px;color:var(--muted)}

/* Modo anfitrion */
.host-body{min-height:100vh;background:#eef1f5}.host-wrap{max-width:980px;margin:0 auto;padding:24px}.host-header{display:flex;justify-content:space-between;gap:20px;align-items:center}.host-header p{margin:4px 0;color:#64748b}.host-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.host-stats>div{text-align:center;background:#f6f7f9;padding:16px;border-radius:14px}.host-stats strong{display:block;font-size:30px}.host-stats span{font-weight:800;color:#64748b}.host-control{text-align:center}.host-prize{font-size:25px;font-weight:900;margin:10px 0}.host-person{font-size:38px;font-weight:1000;margin:8px 0;color:var(--accent2)}.host-question{margin-top:22px}.host-question h3{font-size:25px}.host-question .options{max-width:720px;margin:15px auto}.host-question .option-btn{justify-content:center;text-align:center}

/* Pantalla remota de presentacion */
.presentation-body{min-height:100vh;overflow:hidden;background:radial-gradient(circle at top,#3a3a3a 0,#101010 67%);color:#fff}.presentation-wrap{height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:18px}.presentation-brand{height:58px;display:flex;justify-content:center;align-items:center}.presentation-brand img{max-width:250px;max-height:56px;object-fit:contain}.presentation-brand .brand-fallback{display:none;color:#fff;font-size:34px}.presentation-wrap h1{font-size:clamp(32px,4.2vw,56px);margin:6px 0 10px}.present-wheel{width:min(59vh,500px);height:min(59vh,500px);margin-top:8px}.presentation-message{font-size:clamp(18px,2vw,28px);font-weight:900;margin-top:14px;min-height:36px;text-align:center}

@media(max-width:800px){.admin-brand-block{display:block}.admin-logo-wrap{margin-bottom:8px}.header-actions{justify-content:flex-start}.host-header{flex-direction:column;align-items:flex-start}.host-stats{grid-template-columns:1fr 1fr 1fr}.import-row{flex-direction:column;align-items:stretch}}
.theme-empresa .summary-hero{background:linear-gradient(145deg,#101010,#2a2a2a);border-bottom:5px solid #d71920}.theme-empresa .summary-hero .eyebrow{color:#fff}.theme-familia .summary-hero{background:linear-gradient(135deg,#1976d2,#1f9d55);border-bottom:5px solid #ff8a00}.theme-familia .summary-hero .eyebrow{color:#fff}
.presentation-body.theme-empresa .pointer{border-bottom-color:#d71920}.presentation-body.theme-familia .pointer{border-bottom-color:#ff8a00}

/* ============================================================
   EMPRESA - TEMA CLARO CRISTACRYL
   Blanco dominante + rojo corporativo + negro como contraste.
   ============================================================ */
.theme-empresa.play-body{
  background:
    radial-gradient(circle at 12% 8%,rgba(215,25,32,.09),transparent 23%),
    radial-gradient(circle at 88% 92%,rgba(215,25,32,.06),transparent 27%),
    linear-gradient(145deg,#ffffff 0%,#f7f7f8 58%,#eeeeef 100%);
  color:#171717;
}
.theme-empresa .topbar{color:#171717}
.theme-empresa .ghost{background:#fff;color:#171717;border:1px solid #d8d8da;box-shadow:0 3px 10px rgba(0,0,0,.06)}
.theme-empresa .sound-btn{background:#fff;color:#171717;border:1px solid #d8d8da;box-shadow:0 3px 10px rgba(0,0,0,.06)}
.theme-empresa .sound-btn:hover{background:#f4f4f5}.theme-empresa .sound-btn.sound-off{background:#f1f1f2;color:#666;opacity:1}
.theme-empresa .play-scope-badge{background:#fff;border:1px solid rgba(215,25,32,.42);color:#b5121b;box-shadow:0 3px 10px rgba(0,0,0,.05)}
.theme-empresa .prize-box{background:#fff;color:#171717;border:1px solid #e1e1e3;box-shadow:0 8px 22px rgba(0,0,0,.08)}
.theme-empresa .wheel-shell{filter:drop-shadow(0 14px 24px rgba(0,0,0,.18))}
.theme-empresa .winner-panel{background:rgba(255,255,255,.92);color:#171717;border:1px solid #e1e1e3;box-shadow:0 10px 28px rgba(0,0,0,.08)}
.theme-empresa .winner-item{border-bottom-color:#e5e5e7}.theme-empresa .winner-item span{color:#555;opacity:1}
.theme-empresa .message{color:#202020}
.theme-empresa .play-brand img{max-width:250px;max-height:56px;background:#fff;border-radius:10px;padding:3px 8px;box-shadow:0 4px 14px rgba(0,0,0,.06)}
.theme-empresa .play-brand .brand-fallback{color:#d71920}

/* Pantalla inicial del sorteo */
.theme-empresa .start-overlay{
  background:
    radial-gradient(circle at 10% 10%,rgba(215,25,32,.11),transparent 24%),
    radial-gradient(circle at 90% 90%,rgba(215,25,32,.07),transparent 28%),
    linear-gradient(145deg,#ffffff,#f1f1f2);
  color:#171717;
}
.theme-empresa .start-card{background:rgba(255,255,255,.97);border:2px solid rgba(215,25,32,.48);color:#171717;box-shadow:0 24px 70px rgba(0,0,0,.16)}
.theme-empresa .start-kicker{color:#d71920}.theme-empresa .summary-grid>div{background:#f5f5f6;border:1px solid #e4e4e6}.theme-empresa .summary-grid small{color:#666;opacity:1}.theme-empresa .start-admin{background:#f2f2f3!important;color:#171717!important;border:1px solid #d4d4d6}

/* Celebracion clara */
.theme-empresa .celebration{background:radial-gradient(circle at center,rgba(215,25,32,.13),rgba(255,255,255,.86))}
.theme-empresa .celebration-card{background:linear-gradient(145deg,#fff,#f7f7f8);color:#171717;border-color:#d71920;box-shadow:0 0 0 7px rgba(215,25,32,.10),0 28px 75px rgba(0,0,0,.20)}
.theme-empresa .celebration-title{color:#d71920;text-shadow:none}.theme-empresa .celebration-headline,.theme-empresa .celebration-name{color:#171717}.theme-empresa .celebration-prize{color:#b5121b}

/* Presentacion proyectada */
.presentation-body.theme-empresa{
  background:
    radial-gradient(circle at 8% 10%,rgba(215,25,32,.10),transparent 24%),
    radial-gradient(circle at 91% 89%,rgba(215,25,32,.07),transparent 29%),
    linear-gradient(145deg,#ffffff 0%,#f8f8f9 54%,#eeeeef 100%);
  color:#171717;
}
.presentation-body.theme-empresa::before,.presentation-body.theme-empresa::after{content:"";position:fixed;z-index:0;width:310px;height:310px;border-radius:50%;pointer-events:none;opacity:.12}
.presentation-body.theme-empresa::before{left:-155px;top:-145px;background:#d71920}.presentation-body.theme-empresa::after{right:-165px;bottom:-160px;background:#d71920}
.presentation-body.theme-empresa .presentation-wrap{position:relative;z-index:1}
.presentation-body.theme-empresa .presentation-brand{height:76px;margin-top:2px}
.presentation-body.theme-empresa .presentation-brand img{max-width:315px;max-height:72px;background:#fff;border-radius:10px;padding:4px 10px;box-shadow:0 5px 16px rgba(0,0,0,.07)}
.presentation-body.theme-empresa .presentation-brand .brand-fallback{color:#d71920}
.presentation-body.theme-empresa .presentation-wrap h1{color:#181818;letter-spacing:.4px}
.presentation-body.theme-empresa .prize-box{background:#fff;color:#171717;border:1px solid #dedee0;box-shadow:0 8px 22px rgba(0,0,0,.08)}
.presentation-body.theme-empresa .present-wheel{filter:drop-shadow(0 14px 24px rgba(0,0,0,.16))}
.presentation-body.theme-empresa .presentation-message{color:#202020;background:rgba(255,255,255,.82);border:1px solid #e1e1e3;border-left:5px solid #d71920;border-radius:12px;padding:8px 18px;box-shadow:0 5px 16px rgba(0,0,0,.06)}
.presentation-body.theme-empresa .pointer{border-bottom-color:#d71920}

/* Administrador y anfitrion Empresa */
.theme-empresa.host-body{background:linear-gradient(145deg,#f8f8f9,#ededee);color:#171717}
.theme-empresa.host-body .card{border-top:4px solid #d71920}.theme-empresa .host-person{color:#d71920}
.theme-empresa .admin-logo-wrap img{max-width:220px;max-height:76px;background:#fff;border-radius:9px;padding:4px 8px}

/* Resumen final Empresa */
.theme-empresa.summary-page{background:linear-gradient(145deg,#fafafa,#efeff0)}
.theme-empresa .summary-hero{color:#171717;background:linear-gradient(145deg,#fff,#f4f4f5);border:1px solid #dedee0;border-bottom:5px solid #d71920;box-shadow:0 12px 30px rgba(0,0,0,.08)}
.theme-empresa .summary-hero .eyebrow{color:#d71920}.theme-empresa .summary-hero p{color:#555;opacity:1}

@media(max-height:760px) and (min-width:901px){
  .presentation-body.theme-empresa .presentation-brand{height:58px}
  .presentation-body.theme-empresa .presentation-brand img{max-height:54px;max-width:260px}
}


/* ============================================================
   EXPERIENCIA DE EVENTO - PRESENTACION Y ANFITRION
   ============================================================ */
.event-pop{animation:eventPrizePop .72s cubic-bezier(.2,.9,.25,1.18) both}
@keyframes eventPrizePop{0%{transform:scale(.82);opacity:.2}60%{transform:scale(1.07)}100%{transform:scale(1);opacity:1}}
.wheel-live{animation:wheelAnticipation .42s ease-in-out 2}
@keyframes wheelAnticipation{0%,100%{transform:scale(1)}50%{transform:scale(1.018)}}
.present-selected{position:fixed;z-index:18;left:50%;top:50%;transform:translate(-50%,-50%);min-width:min(620px,86vw);padding:22px 32px;text-align:center;border-radius:24px;background:rgba(255,255,255,.97);border:3px solid #d71920;box-shadow:0 22px 70px rgba(0,0,0,.22);animation:selectedReveal .55s cubic-bezier(.2,.9,.25,1.2) both;color:#171717}
.present-selected span{display:block;color:#d71920;font-size:15px;font-weight:1000;letter-spacing:2px;margin-bottom:5px}.present-selected strong{display:block;font-size:clamp(38px,6vw,74px);line-height:1;text-transform:uppercase}
@keyframes selectedReveal{0%{opacity:0;transform:translate(-50%,-44%) scale(.72)}65%{opacity:1;transform:translate(-50%,-50%) scale(1.06)}100%{transform:translate(-50%,-50%) scale(1)}}
.presentation-body.theme-familia .present-selected{border-color:#ff8a00}.presentation-body.theme-familia .present-selected span{color:#1976d2}
.presentation-body .modal-card{animation:questionStageIn .48s cubic-bezier(.2,.8,.2,1) both}
@keyframes questionStageIn{from{opacity:0;transform:translateY(28px) scale(.94)}to{opacity:1;transform:translateY(0) scale(1)}}
.presentation-body.theme-empresa .modal{background:rgba(245,245,246,.88);backdrop-filter:blur(8px)}
.presentation-body.theme-empresa .modal-card{border:2px solid rgba(215,25,32,.32);box-shadow:0 24px 75px rgba(0,0,0,.18)}
.presentation-body.theme-empresa .selected-prize{color:#b5121b}.presentation-body.theme-empresa .category{background:#fff0f0;color:#a70f15;border:1px solid #f0c7c9}
.presentation-body.theme-empresa .option-btn{border-color:#ddd}.presentation-body.theme-empresa .option-btn:hover{border-color:#d71920}
.presentation-body.theme-empresa .celebration-card{animation:winnerPop .7s cubic-bezier(.2,.9,.25,1.25) both}
.host-step{display:inline-block;padding:7px 13px;margin-bottom:7px;border-radius:999px;background:#f1f1f2;color:#666;font-size:12px;font-weight:1000;letter-spacing:1.5px}
.theme-empresa .host-step{background:#fff0f0;color:#b5121b;border:1px solid #f0c7c9}.theme-familia .host-step{background:#eaf5ff;color:#1976d2}
.host-control .spin-btn{min-width:310px;min-height:62px}.host-control .answer-result{font-weight:900}
.theme-empresa.host-body .host-control{border-top:5px solid #d71920}.theme-empresa.host-body .spin-btn{background:linear-gradient(135deg,#d71920,#a90f15);color:#fff;box-shadow:0 9px 22px rgba(215,25,32,.22)}
@media(max-height:760px) and (min-width:901px){.present-selected{padding:16px 26px}.presentation-message{margin-top:8px}.host-wrap{padding:14px}.host-body .card{padding:16px;margin-bottom:12px}}
