/* Altura disponible, contenido desplazable y controles siempre a mano. */
body.immersive-study{--studio-accent:#3155c8;--studio-wash:#edf0ff;--studio-paper:#fffefa;--studio-glow:#f4bfa3;background:var(--studio-wash)}
body[data-studio-palette=peach]{--studio-accent:#ad5138;--studio-wash:#fff0e7;--studio-paper:#fffdf9;--studio-glow:#efbc91}
body[data-studio-palette=mint]{--studio-accent:#217b69;--studio-wash:#e8f5ee;--studio-paper:#fcfffa;--studio-glow:#acd3bc}
.immersive-study .studio-page{height:100vh;height:100dvh;min-height:0;padding:0;display:flex;flex-direction:column;background:radial-gradient(ellipse at 0 100%,var(--studio-glow),transparent 50%),var(--studio-wash);overflow:hidden}
.immersive-study .studio-page .study-header{height:56px;min-height:56px;padding:0 24px;gap:14px;flex-wrap:nowrap;background:transparent;border:0;flex-shrink:0;backdrop-filter:none}
.studio-page .study-header .brand{font-size:24px}.studio-page .study-header .orbit{width:32px;height:32px}.studio-page .study-header .cluster{gap:15px;flex-wrap:nowrap}.studio-page .study-breadcrumb{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:40%;order:0;width:auto}.studio-page .study-header button{font-size:12px;padding:5px 10px;min-height:36px}
.immersive-study .studio-main{flex:1;min-height:0;width:min(100%,1120px);margin:0 auto;padding:0 24px 10px;display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;gap:10px}
.immersive-study .compact-queue{width:100%;max-width:none;margin:0;padding:3px 10px;display:flex;align-items:center;gap:12px;border:0;border-radius:14px;background:#ffffff80;min-width:0;min-height:45px}
.queue-count{display:flex;align-items:center;gap:6px;white-space:nowrap;font-size:12px;color:var(--studio-accent)}.queue-count small{font-size:10px;color:#65738a}.compact-queue .queue-track{flex:1;min-width:0;min-height:0;padding:5px 3px;gap:5px;align-items:center}.compact-queue .queue-tile{flex-basis:26px;height:25px;border-radius:7px;font-size:10px;gap:2px}.compact-queue .queue-tile small{font-size:8px}.compact-queue .queue-tile.current{outline-width:1.5px;outline-offset:1px}.queue-divider{color:#bac7d6}.compact-queue .map-trigger{flex-shrink:0;width:36px;min-height:36px;padding:0;border:0;background:var(--studio-accent);color:white;font-size:24px;border-radius:11px}
.immersive-study .studio-page .flash-wrap{margin:0;max-width:none;width:100%;height:100%;min-height:0;perspective:1400px}.studio-page .flash-wrap:before,.studio-page .flash-wrap:after{display:none}
.immersive-study .studio-page .flashcard{height:100%;min-height:0;max-width:none;padding:16px 26px!important;border-radius:26px;border:1px solid #ffffffdd;background:var(--studio-paper);box-shadow:0 10px 30px #29345b10;overflow:hidden;display:flex;flex-direction:column;isolation:isolate}
.studio-page .flashcard:before{content:attr(data-chapter);width:auto;height:auto;inset:auto 20px -60px auto;background:none;color:var(--studio-accent);opacity:.055;font:italic 280px/1 Georgia,serif;border:0;z-index:-1}.studio-page .flashcard:after{width:180px;height:180px;left:-130px;bottom:10%;border:24px solid var(--studio-wash);background:none;opacity:.8}.studio-page .coral-dot{display:none}
.studio-page .card-top{flex:0 0 auto;min-height:36px;gap:8px;display:flex;align-items:center}.studio-page .card-top .tag{font-size:10px;background:var(--studio-wash);color:var(--studio-accent);letter-spacing:1px;max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}.studio-page .card-top .bookmark{margin-left:auto;order:5;width:36px;min-height:36px;padding:7px}.studio-page .card-top .studio-turn,.studio-page .card-top .studio-size{font-size:12px;min-height:36px;padding:5px 8px;color:var(--studio-accent)}
.immersive-study .studio-page .flash-center,.immersive-study .studio-page .answer-side .flash-center{min-height:0;max-height:none;max-width:none;flex:1 1 0;width:100%;overflow:auto;overscroll-behavior:contain;margin:0;padding:18px 14px;gap:12px;scrollbar-width:thin;scrollbar-color:#cbd3e4 transparent;justify-content:flex-start;align-items:stretch;touch-action:pan-y}
.studio-page .flash-center:focus-visible{outline:2px solid var(--studio-accent);outline-offset:-2px;border-radius:12px}.studio-page .flash-center>.flash-question:first-child{margin-top:auto}.studio-page .flash-center>.flash-subtitle:last-child{margin-bottom:auto}
.immersive-study .studio-page .flash-question{font-family:Georgia,'Times New Roman',serif;font-weight:400;font-size:clamp(26px,3.2vw,44px);line-height:1.23;color:#26344b;letter-spacing:-.025em;width:100%;max-width:820px;align-self:center;overflow-wrap:anywhere}.immersive-study .studio-page .flash-question.long{font-size:clamp(22px,2.5vw,32px)}.studio-page .flash-subtitle{font-size:12px;color:#788497;margin:8px 0}
.studio-page .answer-side .answer-question{font-size:13px!important;border-left:2px solid var(--studio-glow);margin:0 0 10px!important;color:#778292!important}.studio-page .answer-label{margin:0 0 8px;font-size:9px;color:var(--studio-accent);letter-spacing:2px}.immersive-study .studio-page .answer-side .flash-answer{font-family:Georgia,serif;font-size:clamp(20px,2.1vw,27px)!important;line-height:1.5!important;color:#26344b}.studio-page .flash-answer p{margin:0 0 12px}.studio-page .flash-answer strong{color:var(--studio-accent);background:linear-gradient(transparent 65%,var(--studio-wash) 65%)}.studio-page .flash-answer{flex-shrink:0;overflow:visible;max-height:none}.studio-page .flash-img{max-height:220px;max-width:100%;object-fit:contain;flex-shrink:0;align-self:center}.studio-page .mcq-options{flex-shrink:0;gap:8px;margin:6px 0}.studio-page .mcq-option{padding:10px 14px;font-size:14px;border-radius:13px}
.studio-page .card-bottom{flex-shrink:0;font-size:11px;min-height:0}.studio-page .card-bottom .due-label{font-size:10px;margin:0;color:#7e8999}.studio-page .hint-button{padding:5px 8px;min-height:32px;font-size:12px}.studio-page .hint-text{flex-shrink:0;font-size:15px;padding:10px;background:var(--studio-wash);border-radius:10px}.studio-page .gesture-guide{margin:6px 0 0;padding:8px 2px 0;font-size:10px;border-color:#e9e9e3;flex-shrink:0}.studio-page .gesture-guide span{color:#8b806a}.studio-page .gesture-guide>span:nth-child(2){max-width:none}
.immersive-study .studio-page .study-controls{margin:0;padding:0;gap:10px;flex-wrap:nowrap;width:100%;max-width:760px;justify-self:center}.studio-page .study-controls button{min-height:46px;border-radius:15px;font-size:13px;padding:8px 18px;flex:1;min-width:0}.studio-page .study-controls .grade{display:flex;flex-direction:row;justify-content:space-between;gap:12px}.studio-page .study-controls .grade span{white-space:nowrap}.studio-page .study-controls .grade small{font-size:10px;line-height:1.2;text-align:right;max-width:95px}.studio-page .study-controls .primary,.studio-page .study-controls .good{background:var(--studio-accent);color:white;border-color:transparent;box-shadow:0 5px 14px #31475d18}.studio-page .study-controls kbd{display:none}
.immersive-study .studio-page .studio-foot{margin:0;padding:0;display:flex;gap:10px;align-items:center;flex-wrap:nowrap;min-height:28px;font-size:10px;min-width:0}.studio-foot .studio-feedback{margin-right:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#637184}.studio-foot button{padding:2px 6px;min-height:28px;font-size:10px;white-space:nowrap}.studio-foot .studio-clock{display:flex;align-items:center;gap:3px;white-space:nowrap;font-variant-numeric:tabular-nums}.studio-palette{display:flex;align-items:center;gap:5px}.studio-page .study-header .studio-palette button{width:23px;height:23px;min-height:23px;border-radius:50%;padding:0;border:3px solid #ffffffaa;box-shadow:0 0 0 1px transparent}.studio-palette [data-palette=aurora]{background:#6373cc}.studio-palette [data-palette=peach]{background:#d6896d}.studio-palette [data-palette=mint]{background:#75b59e}.studio-page .studio-palette [aria-pressed=true]{box-shadow:0 0 0 1px var(--studio-accent)}
.studio-page .living-card.drag-good{background:#e7f8ef;border-color:#39ac89}.studio-page .living-card.drag-again{background:#fff0e9;border-color:#ed897d}.studio-page .living-card.drag-hard{background:#fff7dc;border-color:#d4ab48}
.constellation-map{height:300px;max-width:380px;margin:12px auto;position:relative;border-radius:50%;background:radial-gradient(circle,#fff 0 25%,#ecf0ff 26% 26.5%,#fff 27% 48%,#ecf0ff 49% 49.5%,#fff 50% 69%,#ecf0ff 70% 70.5%,#fff 71%)}.constellation-star{position:absolute;transform:translate(-50%,-50%);min-height:28px;width:28px;height:28px;padding:0;border-radius:50%;font-size:24px;color:#adb9d0;border:0;background:#edf1fb}.constellation-star.lit{color:#b27a30;background:#fff0cb;box-shadow:0 0 12px #edc88850}.constellation-star:hover{scale:1.15}.map-legend{font-size:12px;color:#667990}#star-detail{min-height:50px;font-size:14px}.constellation-result{background:#fff4df;color:#967031;border-color:#efdcad}
.immersive-study .studio-page.large-reading .flash-question{font-size:clamp(30px,4vw,54px)}.immersive-study .studio-page.large-reading .flash-answer{font-size:clamp(25px,2.8vw,36px)!important}
.studio-page .study-progress{margin:0;padding:7px 14px;font-size:12px;gap:12px}.studio-page .study-progress .progress{margin:0}.studio-page .study-progress .tag{font-size:10px}.studio-page .study-progress>span{min-width:0}
@media(max-width:800px){.immersive-study .studio-page .study-header{padding:0 14px;gap:8px}.studio-page .study-header .cluster>.quiet{display:none}.immersive-study .studio-main{padding:0 14px 8px;gap:8px}.immersive-study .studio-page .flashcard{padding:12px 18px!important;border-radius:22px}.studio-page .study-controls .grade{flex-direction:column;gap:3px;padding:7px 10px}.studio-page .study-controls .grade small{text-align:center;max-width:none}.studio-foot .studio-feedback{display:none}.studio-foot .studio-clock{margin-right:auto}.studio-page .study-breadcrumb{max-width:35%}.studio-page .card-top .tag{max-width:45%}.studio-page .flash-center{padding:12px 6px!important}}
@media(max-width:480px){.queue-count small{display:none}.studio-page .study-breadcrumb{display:none}.studio-page .study-header .brand{font-size:21px}.studio-palette{margin-left:auto}.studio-page .study-controls button{font-size:11px;padding:7px}.studio-page .gesture-guide{font-size:8px}.studio-page .card-top .tag{max-width:38%;font-size:8px}.studio-page .card-top .studio-turn{font-size:10px}.studio-page .card-top{gap:3px}.studio-page .studio-foot>.quiet{font-size:9px}.immersive-study .studio-main{padding:0 9px 7px}}
@media(max-height:600px){.immersive-study .studio-page .study-header{height:44px;min-height:44px}.immersive-study .studio-main{gap:5px}.studio-page .gesture-guide{padding-top:4px;margin-top:3px}.immersive-study .studio-page .flashcard{padding:8px 18px!important}.studio-page .card-top{min-height:30px}.studio-page .card-top .bookmark,.studio-page .card-top .studio-turn,.studio-page .card-top .studio-size{min-height:30px}.studio-page .card-bottom .due-label{font-size:9px}}
/* With strong zoom or very short windows, permit page scrolling rather than hide controls. */
@media(max-height:420px){.immersive-study .studio-page{height:auto;min-height:100dvh;overflow:visible}.immersive-study .studio-main{flex:none;grid-template-rows:auto minmax(260px,1fr) auto auto}.immersive-study .studio-page .flash-wrap{height:350px}}
.constellation-map.map-dense{display:grid;grid-template-columns:repeat(auto-fit,minmax(34px,1fr));gap:5px;max-height:300px;height:auto;overflow:auto;border-radius:16px;padding:12px;background:#f4f6fc}.map-dense .constellation-star{position:static;transform:none;width:34px;height:34px;min-height:34px}
.studio-page .flash-center>*{flex-shrink:0}.studio-page .answer-side .flash-center>.answer-question:first-child{margin-top:auto!important}.studio-page .answer-side .flash-center>:last-child{margin-bottom:auto!important}
