*{box-sizing:border-box}body{font:16px system-ui,sans-serif;background:#f2f5fa;color:#17243a;margin:0;padding:24px}main{max-width:650px;margin:20px auto;background:white;border-radius:18px;padding:30px;box-shadow:0 8px 30px #17243a12}h1{margin:0 0 8px}h2{font-size:1.2rem}.muted{color:#66748a;font-size:.9rem}label{display:block;margin:14px 0}input[type=text],input[type=password],input[name=account],input[type=file]{display:block;width:100%;padding:12px;border:1px solid #aab5c4;border-radius:8px;margin-top:6px}fieldset{border:1px solid #cbd5e1;border-radius:10px;margin:20px 0}fieldset label{margin:12px}button{background:#1d4ed8;color:white;border:0;border-radius:10px;padding:13px 22px;font-weight:700;cursor:pointer}button:hover{background:#1e40af}.error{background:#fee2e2;padding:12px;border-radius:8px;color:#991b1b}table{width:100%;border-collapse:collapse;font-size:.85rem}td,th{padding:10px;border:1px solid #cbd5e1;text-align:left}.reveal{text-align:center;background:#eff6ff;padding:18px;border-radius:12px}.reveal img{width:160px;height:160px;object-fit:cover;border-radius:50%}.check{font-size:.9rem}a{color:#1d4ed8}@media(max-width:500px){body{padding:8px}main{padding:18px}}
/* Versión 2: narrativa de revelación */
:root{color-scheme:light}body{background:linear-gradient(135deg,#eaf0fa 0%,#f7f8fc 65%,#e7edfa 100%);min-height:100vh}.game-shell{max-width:700px;padding:clamp(20px,4vw,38px);border:1px solid #e5eaf3;box-shadow:0 22px 60px #152e5920}.game-header{margin-bottom:26px}.eyebrow{font-size:.72rem;letter-spacing:.19em;font-weight:800;color:#325bc4;margin-bottom:9px}.game-header h1{font-size:clamp(1.65rem,4.5vw,2.35rem);letter-spacing:-.045em}.progress{height:6px;background:#e4eaf5;border-radius:99px;overflow:hidden;margin-top:18px}.progress span{height:100%;display:block;background:#315dd6;border-radius:99px;transition:width .3s}.reveal-stage{margin:22px 0 30px}.reveal-intro{text-align:center}.reveal-intro h2{font-size:clamp(1.45rem,4vw,1.9rem);margin:14px 0 6px}.reveal-intro p{color:#66748a;margin:0 0 20px}.pill{display:inline-block;border-radius:100px;background:#e6edff;color:#2447a5;font-size:.72rem;font-weight:800;letter-spacing:.11em;padding:8px 13px}.reveal-card{border:1px solid #cbd8f6;border-radius:20px;min-height:330px;background:radial-gradient(circle at 50% 5%,#dfe9ff,transparent 60%),#f8faff;padding:26px;display:flex;align-items:center;justify-content:center;box-shadow:0 14px 28px #163a7912;transition:background .4s,transform .4s}.reveal-card.revealed{background:radial-gradient(circle at 50% 0%,#dcecff,transparent 70%),#fff;animation:card-pop .55s ease}.reveal-front,.reveal-back{text-align:center;max-width:390px}.reveal-front p,.reveal-back p{color:#5c6c83;line-height:1.55}.reveal-front strong{display:block;font-size:1.2rem}.mystery-symbol{display:grid;place-items:center;width:105px;height:105px;margin:0 auto 20px;border-radius:50%;background:#d8e3fc;color:#3158bc;font-size:4rem;font-weight:800;box-shadow:0 0 0 12px #e9effe}.reveal-back img{display:block;width:174px;height:174px;object-fit:cover;border-radius:50%;border:6px solid white;box-shadow:0 9px 25px #102c5c33;margin:0 auto 18px}.reveal-back h3{font-size:1.45rem;margin:12px 0 4px}.instruction{background:#f3f6fc;border-left:4px solid #315dd6;padding:15px 18px;border-radius:8px;margin:18px 0}.instruction p{margin:6px 0 0;color:#536278}.primary-action{width:100%;font-size:1rem;padding:16px}.reveal-front button{margin-top:12px}.reveal-front[hidden],.reveal-back[hidden]{display:none!important}@keyframes card-pop{0%{transform:scale(.96);opacity:.7}100%{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.reveal-card,.progress span{animation:none;transition:none}}@media(max-width:500px){.reveal-card{padding:22px 15px;min-height:330px}table{font-size:.75rem}td,th{padding:7px}}

.dashboard{max-width:850px}.dashboard-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:22px 0}.dashboard-stats section{background:#eff6ff;border-radius:14px;padding:16px}.dashboard-stats small{display:block;color:#64748b}.dashboard-stats strong{display:block;font-size:2rem;margin-top:5px}.round-list{display:grid;gap:16px}.round-line>div:first-child{display:flex;justify-content:space-between;gap:12px;margin-bottom:6px}.round-line span{color:#64748b}.meter{height:10px;background:#e2e8f0;border-radius:20px;overflow:hidden}.meter span{display:block;background:#2563eb;height:100%;transition:width .3s}.teacher-actions{border:1px solid #cbd5e1;border-radius:16px;padding:20px;margin-top:24px}.teacher-actions form{margin-top:12px}.reveal-action{background:#7c3aed}.reveal-action:hover{background:#6d28d9}.success{background:#dcfce7;color:#166534;padding:12px;border-radius:10px}@media(max-width:600px){.dashboard-stats{grid-template-columns:repeat(2,1fr)}}

/* Reporte v5 */
.report-page{max-width:1250px}.report-scroll{overflow-x:auto;margin:12px 0 30px;border:1px solid #dbe4f0;border-radius:12px}.report-scroll table{min-width:800px}.report-scroll th{white-space:nowrap;background:#f1f5fc}.report-scroll td{white-space:nowrap}.report-scroll tr:nth-child(even){background:#f8fafc}.report-link{display:inline-block;padding:10px 15px;border-radius:10px;background:#e4edff;color:#1744a2;font-weight:700;text-decoration:none}

/* Reporte compacto v6: una fila por pareja */
.pair-report table{min-width:640px;width:100%;table-layout:fixed}.pair-report th:first-child{width:32%}.pair-report th:nth-child(2),.pair-report th:nth-child(3){width:34%}.pair-report td{white-space:normal;vertical-align:top}.pair-person{display:flex;flex-direction:column;gap:3px;padding:4px 0}.pair-person+ .pair-person{border-top:1px solid #e2e8f0;margin-top:7px;padding-top:10px}.pair-person small{color:#64748b}.pair-votes{margin-bottom:8px}.pair-outcome{font-size:.85rem;line-height:1.5;color:#475569}

/* Reporte v7: miniaturas privadas de los participantes */
.pair-person{flex-direction:row;align-items:center;gap:12px;min-height:62px}
.pair-person>div{min-width:0;display:flex;flex-direction:column;gap:3px;overflow-wrap:anywhere}
.pair-avatar{width:48px;height:48px;min-width:48px;object-fit:cover;border-radius:50%;border:2px solid #dbe4f0;background:#edf2fa}
@media(max-width:600px){.pair-report table{min-width:760px}}

/* v9: zona de operaciones peligrosas */
.danger-zone{margin-top:32px;border:2px solid #dc2626;border-radius:18px;background:#fff5f5;padding:20px;box-shadow:0 8px 25px #991b1b16}
.danger-head{display:flex;gap:12px;align-items:flex-start;color:#991b1b}.danger-head>span{font-size:2rem;line-height:1}.danger-head h2{font-size:1.35rem;margin:0}.danger-head p{margin:6px 0 12px}
.danger-option{background:white;border:1px solid #fca5a5;border-radius:12px;padding:18px;margin-top:14px}.danger-option h3{margin:0 0 8px;color:#7f1d1d}.danger-option p{line-height:1.5;color:#7f1d1d}.danger-form label{font-weight:600}.danger-form input{max-width:420px}.danger-form button{width:100%;font-size:1rem}.reset-button{background:#b45309}.reset-button:hover{background:#92400e}.danger-delete{background:#fee2e2;border:2px solid #b91c1c}.danger-delete h3{font-size:1.3rem}.delete-button{background:#b91c1c}.delete-button:hover{background:#7f1d1d}

/* v10 */
.final-buttons{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px}.final-buttons form{border:2px solid #2563eb;border-radius:14px;padding:16px}.final-buttons button{width:100%;white-space:normal}.teacher-actions{margin:18px 0;padding:20px;border:1px solid #cbd5e1;border-radius:14px}.teacher-actions form{margin:12px 0}.pair-person{display:flex;align-items:center;gap:10px;margin:8px 0}.pair-person small{display:block}.pair-avatar{width:48px;height:48px;object-fit:cover;border-radius:50%}.pair-outcome{margin-top:8px}.report-scroll{overflow-x:auto}

/* v10 */
.final-buttons{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px}.final-buttons form{border:2px solid #2563eb;border-radius:14px;padding:16px}.final-buttons button{width:100%;white-space:normal}.teacher-actions{margin:18px 0;padding:20px;border:1px solid #cbd5e1;border-radius:14px}.teacher-actions form{margin:12px 0}.pair-person{display:flex;align-items:center;gap:10px;margin:8px 0}.pair-person small{display:block}.pair-avatar{width:48px;height:48px;object-fit:cover;border-radius:50%}.pair-outcome{margin-top:8px}.report-scroll{overflow-x:auto}

/* v11: acceso inicial */
.experiment-gate{max-width:520px;margin:1.5rem auto;padding:1.5rem;border:1px solid #d4dae3;border-radius:18px;background:#fff;}
.experiment-gate input[name="experiment_code"]{font-size:1.65rem;letter-spacing:.35em;text-align:center;font-variant-numeric:tabular-nums;width:100%;box-sizing:border-box;}
.experiment-gate button{width:100%;}

/* v12: eliminación individual */
.single-experiment-delete {margin-top:1rem;padding:1rem;border:2px solid #b91c1c;border-radius:12px;background:rgba(185,28,28,.07)}
.single-experiment-delete label{display:block;margin:.65rem 0}
.single-experiment-delete .delete-button{background:#b91c1c;color:#fff;border-color:#991b1b}


/* V14 — Identidad visual premium, sin dependencias externas */
:root{--ink:#10213a;--ink-soft:#50617b;--blue:#3758ef;--blue-deep:#233ac5;--line:#dce5f3;--surface:#fff;--radius:22px;color-scheme:light}
html{scroll-behavior:smooth}
body{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:radial-gradient(ellipse 62% 45% at 4% 0%,#cbdcff 0%,transparent 78%),radial-gradient(ellipse 48% 36% at 100% 8%,#e4dafa 0%,transparent 75%),linear-gradient(155deg,#f4f7ff 0%,#edf2fb 48%,#f9faff 100%);background-attachment:fixed;line-height:1.55;min-height:100svh;padding:clamp(12px,3vw,38px)}
body:before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;opacity:.22;background-image:radial-gradient(#8da2d1 .65px,transparent .65px);background-size:23px 23px}
main,.game-shell,.dashboard{background:rgba(255,255,255,.96);border:1px solid rgba(255,255,255,.9);border-radius:28px;box-shadow:0 26px 80px rgba(34,56,105,.12),0 4px 15px rgba(34,56,105,.04);margin:clamp(12px,3vw,34px) auto;padding:clamp(22px,4vw,44px)}
.game-shell{max-width:740px}.dashboard{max-width:960px}.report-page{max-width:1360px}
h1,h2,h3{line-height:1.18;letter-spacing:-.035em;color:#122344}h1{font-size:clamp(1.85rem,4.5vw,2.8rem);font-weight:830}h2{font-size:clamp(1.2rem,2.8vw,1.55rem);margin-top:1.6em}h3{font-size:1.1rem}
p{line-height:1.65}.muted{color:var(--ink-soft)}.eyebrow{color:var(--blue);letter-spacing:.2em;font-size:.72rem;font-weight:850}.game-header{position:relative;padding-bottom:20px;margin-bottom:25px;border-bottom:1px solid #e7ecf7}.game-header:after{content:"";position:absolute;bottom:-2px;left:0;width:80px;height:3px;border-radius:5px;background:linear-gradient(90deg,#3858f1,#a47df7)}.game-header h1{max-width:15ch}
button,.report-link{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;background:linear-gradient(135deg,#4667f7,#2c48d9);border:1px solid transparent;border-radius:12px;color:#fff;padding:12px 20px;font:inherit;font-weight:750;letter-spacing:-.01em;text-decoration:none;box-shadow:0 7px 16px rgba(55,88,239,.19);transition:transform .16s,box-shadow .16s,filter .16s;cursor:pointer}
button:hover,.report-link:hover{background:linear-gradient(135deg,#3557ed,#243bb8);color:white;transform:translateY(-1px);box-shadow:0 11px 24px rgba(55,88,239,.25)}button:active{transform:translateY(0)}button:disabled{opacity:.55;cursor:not-allowed;transform:none;box-shadow:none}
:focus-visible{outline:3px solid #9874ff!important;outline-offset:3px}input[type=text],input[type=password],input[type=number],input[name=account],input[type=file],select,textarea{border:1.5px solid #d5dfed;background:#f9fbff;color:#152541;min-height:48px;padding:12px 14px;border-radius:12px;font:inherit;transition:border-color .2s,box-shadow .2s,background .2s}
input[type=text]:focus,input[type=password]:focus,input[type=number]:focus,input[name=account]:focus,input[type=file]:focus,select:focus,textarea:focus{outline:none;border-color:#6b83f4;background:#fff;box-shadow:0 0 0 4px #4768f01c}input::placeholder{color:#97a3b7}label{font-weight:600;color:#243757}fieldset{border:1px solid #dce4f3;background:#f9fbff;border-radius:18px;padding:16px 20px}legend{font-weight:800;color:#21375b;padding:0 9px}fieldset label{padding:12px 14px;border:1px solid #e0e8f4;background:white;border-radius:12px;display:flex;align-items:center;gap:10px;cursor:pointer;transition:border-color .2s,background .2s}fieldset label:hover{background:#eef3ff;border-color:#b8c7f9}input[type=radio],input[type=checkbox]{accent-color:var(--blue);width:17px;height:17px;flex-shrink:0}
.experiment-gate{border:1px solid #dce5f5;border-radius:22px;background:linear-gradient(160deg,#fff,#f7f9ff);box-shadow:0 18px 45px #233d7610;padding:clamp(22px,4vw,36px)}.experiment-gate h2{margin-top:0}.experiment-gate input[name=experiment_code]{font-size:clamp(1.25rem,4vw,1.9rem);letter-spacing:.23em;font-weight:800;text-align:center;background:white;min-height:65px;border:2px solid #cbd7f2}.experiment-gate button{min-height:54px}
.progress{height:8px;background:#e9eef9}.progress span,.meter span{background:linear-gradient(90deg,#4268f4,#8a6af1)}.pill{background:#e9eeff;color:#334bc0}.reveal-card{border-radius:24px;background:radial-gradient(circle at 50% 10%,#e6edff,transparent 70%),#f9fbff;border-color:#d5dff7;box-shadow:inset 0 1px 0 #fff,0 14px 30px #163a7910}.instruction{border-left-color:#546af1;background:#f1f5ff;border-radius:12px}.reveal-back img{border:5px solid white;box-shadow:0 12px 28px #20375d35}
.dashboard-stats{gap:14px}.dashboard-stats section{background:linear-gradient(150deg,#f1f5ff,#eaf0ff);border:1px solid #e0e8fc;border-radius:18px;padding:18px}.dashboard-stats strong{font-weight:850;letter-spacing:-.05em;color:#1f3a84}.dashboard-stats small{font-weight:650}.teacher-actions{border:1px solid #dce4f2;background:linear-gradient(160deg,#fff,#fafbff);border-radius:20px;box-shadow:0 8px 28px #142b5410}.teacher-actions h2:first-child{margin-top:0}.round-list{gap:20px}.round-line{padding:7px 0}.meter{height:11px}
.report-scroll{border:1px solid #dfe6f2;border-radius:16px;box-shadow:0 8px 24px #1b34530a}.report-scroll th{background:#eef3ff;color:#263b6b;font-weight:800}.report-scroll tr:nth-child(even){background:#f8faff}.report-scroll tr:hover{background:#f0f5ff}.pair-avatar{border:3px solid #fff;box-shadow:0 2px 10px #1d376426}.pair-person{min-height:65px}.pair-outcome{padding:8px 10px;background:#eef4ff;border-radius:9px;color:#28416d}
.error,.success{padding:16px 18px;border-radius:14px;line-height:1.5;border:1px solid}.error{background:#fff1f2;color:#9f1239;border-color:#fecdd3}.success{background:#effcf4;color:#166534;border-color:#b7ebc9}.success h2:first-child{margin-top:0}.danger-zone{border-radius:22px;background:#fff7f7}.danger-option{border-radius:15px}.danger-delete{background:#fff0f0}.delete-button,.delete-button:hover{background:#b91c1c}.reset-button,.reset-button:hover{background:#a75b0b}.reveal-action,.reveal-action:hover{background:#6e46d7}.final-buttons form{border-color:#b6c6ff;border-radius:16px;background:#f8faff}.single-experiment-delete{border-radius:15px}
a{color:#304bd4;text-underline-offset:3px}a:hover{color:#192da1}
@media(max-width:620px){body{padding:10px}main,.game-shell,.dashboard{margin:8px auto;border-radius:20px;padding:22px 18px}h1{font-size:1.95rem}.dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.dashboard-stats section{padding:13px}.dashboard-stats strong{font-size:1.65rem}.teacher-actions{padding:15px}.experiment-gate{padding:20px 16px}.report-scroll{margin-left:-6px;margin-right:-6px}button{max-width:100%;white-space:normal}.danger-zone{padding:14px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* v15: mantenimiento contextual del experimento */
.experiment-maintenance{margin-top:1.4rem;padding:1.25rem;border:1px solid #e7b98a;border-radius:16px;background:#fffaf4}
.experiment-maintenance h3{margin:0 0 .55rem;color:#75430b}
.experiment-maintenance p{line-height:1.55}
.experiment-maintenance form{margin-top:1rem}

/* v17: revelación móvil y actividad cinematográfica */
.reveal-stage{min-width:0}.reveal-card{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:16px!important;width:100%;min-width:0;min-height:280px;padding:clamp(16px,4vw,28px)!important;overflow:hidden}.reveal-front,.reveal-back{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:100%;max-width:100%;min-width:0;text-align:center}.reveal-front[hidden],.reveal-back[hidden]{display:none!important}.reveal-card #reveal-button{position:static!important;display:block!important;width:100%;max-width:320px;margin:12px auto 0!important;white-space:normal;font-size:clamp(1rem,4vw,1.2rem);line-height:1.35}.reveal-back img,#partner-photo{position:static!important;display:block;width:min(100%,240px)!important;height:auto!important;max-height:300px;aspect-ratio:3/4;object-fit:cover;border-radius:20px!important;margin:0 auto!important;float:none!important}.reveal-back p{max-width:34ch;margin:8px auto!important;line-height:1.5}.movie-mission{display:grid;grid-template-columns:minmax(120px,180px) minmax(0,1fr);gap:22px;align-items:start;margin-top:20px;padding:20px;border:1px solid #cdd9f4;border-radius:18px;background:#f8faff}.movie-mission img{width:100%;height:auto;border-radius:12px;box-shadow:0 10px 25px #14223b24}.movie-mission h3{margin:14px 0 8px}.movie-mission p{margin:8px 0}.movie-mission .pill{letter-spacing:.08em}@media(max-width:620px){.reveal-card{padding:18px 14px!important}.reveal-card #reveal-button{min-height:54px}.reveal-back img,#partner-photo{width:min(100%,220px)!important;max-height:260px}.movie-mission{grid-template-columns:1fr;gap:16px;padding:16px}.movie-mission img{width:min(60%,200px);justify-self:center}}

/* Misión de cine, versión 17 definitiva */
.movie-mission{display:grid;grid-template-columns:minmax(120px,200px) minmax(0,1fr);align-items:start;gap:1.2rem;margin:1.5rem 0;padding:1rem;background:#f1f5ff;border-radius:18px}.movie-mission img{display:block;width:100%;max-width:200px;height:auto;aspect-ratio:2/3;object-fit:cover;border-radius:12px;box-shadow:0 10px 25px #14234724}.movie-mission h3{margin:.5rem 0}.movie-brief{margin:1.5rem 0}.movie-brief li{margin:.6rem 0}.mission-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem}.mission-step{background:#f4f6fd;border:1px solid #dbe4f6;border-radius:12px;padding:1rem}.mission-step p{margin:.5rem 0 0}.tmdb-credit{font-size:.8rem;color:#52627e}@media(max-width:620px){.movie-mission{grid-template-columns:1fr;text-align:center;justify-items:center}.movie-mission img{width:min(65%,220px)}.mission-steps{grid-template-columns:1fr}}
