/* All photo layouts override the HTML height hint. Keep the entire source visible. */
.idol-card .portrait-media,.card-detail .card-portrait,.draw-card .portrait-media,.welcome-card .portrait-media,.evolution .portrait-media{width:100%;height:auto;aspect-ratio:1;object-fit:contain;object-position:center;background:#f6f1f7}
.evolution .portrait-media{width:190px}
.roster-small .portrait-media{height:auto;aspect-ratio:1;object-fit:contain}
.lesson-row .portrait-media,.lineup-slots .slot .portrait-media,.room-team .solo-photo,.team-portraits img{object-fit:contain;background:#f6f1f7}
.card-detail .card-portrait{border-bottom-color:var(--line)}
.name-input{display:flex;align-items:stretch;gap:9px}.name-input input{min-width:0;flex:1}.dice-button{width:46px;flex:0 0 46px;border-radius:11px;background:var(--soft);color:var(--purple);display:grid;place-items:center}.dice-button:hover{background:#e4d8ed}.dice-button:active svg{transform:rotate(90deg)}.dice-button svg{width:23px;height:23px;stroke-width:2.2}
.dialog-header>div:first-child{min-width:0}.dialog-header-actions{display:flex;align-items:center;gap:5px;flex-shrink:0}.dialog-header-actions .button{white-space:nowrap}.dialog-footer .tiny{align-self:center;margin-right:auto}.last-draw-link{margin:-3px 0 16px}
.scene-toolbar{margin-top:7px}.scene-toolbar .text-button{padding:5px 0}.weekly-results{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:13px 0 8px}.weekly-results .result-stat{min-width:0;padding:11px 9px}.weekly-results .result-stat span{white-space:nowrap}.weekly-results .result-stat b{font-size:clamp(14px,3.4vw,21px);line-height:1.45;white-space:nowrap}.weekly-results .result-stat small{font-size:10px;display:block;line-height:1.4;color:var(--muted)}.weekly-breakdown{font-size:12px;color:var(--muted);border-top:1px solid var(--line);padding-top:8px}.weekly-breakdown summary{cursor:pointer;padding:7px 0;list-style-position:inside}.weekly-breakdown .account-row{font-size:12px}.cinema-progress{height:3px;background:#eee6f2;border-radius:5px;overflow:hidden;margin:8px 0}.cinema-progress span{display:block;width:100%;height:100%;background:#ac75b2;transform-origin:left;animation:cinema-progress 4s linear}.cinema-hint{font-size:11px;text-align:center;color:var(--muted);padding:15px 0 2px}

/* Scouting uses the actual drawn sprites/cards: no generated identities or rerolls. */
.scout-cinema{position:relative;aspect-ratio:16/10;overflow:hidden;border-radius:16px;isolation:isolate;background:#242037;color:#fff;perspective:900px}.scout-office{position:absolute;inset:0;background:linear-gradient(145deg,#69617c,#8b7c9c 48%,#413b55);overflow:hidden}.scout-office:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,#261e3666,transparent 20%,transparent 66%,#171020cc)}.office-floor{position:absolute;inset:63% -20% -25%;transform:perspective(220px) rotateX(25deg);background:repeating-linear-gradient(0deg,transparent 0 33px,#ffffff0b 34px 35px),repeating-linear-gradient(90deg,#55475f 0 83px,#6d5a74 84px 86px)}.office-window{position:absolute;left:8%;top:12%;width:30%;height:43%;border:8px solid #b7a4c2;box-shadow:0 0 60px #e0baf526;background:linear-gradient(160deg,#8cb0da,#e7c7e3 60%,#d5b0d6);display:flex;gap:3px}.office-window i{background:linear-gradient(0deg,#837bab55,transparent);width:33%;border-right:3px solid #b7a4c2}.office-sign{position:absolute;top:17%;left:43%;right:21%;font-size:clamp(9px,1.8vw,15px);text-align:center;color:#ffe7fa;letter-spacing:1px;border:1px solid #d8b7e85c;padding:8px 5px;border-radius:5px;background:#51415f80;box-shadow:0 0 20px #e6b4e518}.office-shelf{position:absolute;left:46%;top:41%;width:22%;height:21%;background:repeating-linear-gradient(90deg,#cebed1 0 7px,#9f86ad 8px 16px,#776a8d 17px 24px);border:5px solid #49405a;border-bottom-width:9px;box-shadow:0 7px 13px #211c3122}.office-door{position:absolute;right:4%;top:17%;width:19%;height:50%;border:7px solid #45394f;background:linear-gradient(180deg,#ffdec7,#eed1f0);perspective:250px;box-shadow:0 0 24px #f9d5f13d}.door-panel{position:absolute;inset:0;transform-origin:100% 50%;background:linear-gradient(90deg,#54465f,#796782);border:2px solid #947e9f;transform:rotateY(-75deg)}.door-panel:after{content:'';position:absolute;left:10%;top:55%;width:6px;height:6px;border-radius:50%;background:#e9d2c3}.office-desk{position:absolute;left:-5%;top:66%;width:31%;height:13%;border-top:8px solid #a38ba6;background:#4b3b58;transform:skewY(4deg);box-shadow:0 14px 17px #211a2d33}.scout-cast{position:absolute;inset:0;z-index:2}.scout-person{position:absolute;bottom:24%;left:var(--slot);width:17%;max-width:150px;transform:translateX(-50%);z-index:2}.scout-person .sprite-frame{position:relative;display:block;aspect-ratio:5/6;width:100%}.scout-body{filter:brightness(0) drop-shadow(0 0 8px #e9d0f02a);transform-origin:50% 95%}.scout-shadow{width:75%;height:9px;border-radius:50%;background:#1a102b70;filter:blur(3px);margin:-6px auto 0}.scout-person.met{opacity:.35}.scout-person.met .scout-body{filter:brightness(.65)}.scout-turn .scout-person:not(.chosen),.scout-card .scout-person{opacity:.18}.scout-turn .scout-person.chosen{z-index:4;left:50%;width:25%;bottom:23%}.scout-card .scout-person.chosen{opacity:0}.scout-caption{position:absolute;left:12px;right:12px;bottom:6%;text-align:center;z-index:8;text-shadow:0 2px 6px #0004}.scout-caption span{font-size:9px;letter-spacing:2px;color:#c9b3d7}.scout-caption p{font-size:13px;font-weight:600;margin-top:5px}.scout-progress{display:flex;gap:7px;justify-content:center;margin:14px 0 0}.scout-progress i{width:22px;height:4px;border-radius:6px;background:#ebe2f1}.scout-progress i.revealed{background:#ac75b2}.scout-card-reveal{position:absolute;inset:0;z-index:6;display:flex;align-items:center;justify-content:center;padding-bottom:8%;background:#241b3950;backdrop-filter:blur(3px)}.reveal-card{position:relative;width:30%;max-width:220px;border:2px solid #eee1f6;border-bottom:5px solid var(--member-color);background:#fff;border-radius:14px;overflow:hidden;color:var(--ink);box-shadow:0 12px 50px #0004;z-index:2}.reveal-card>img{width:100%;height:auto;aspect-ratio:1;object-fit:contain;background:#f6f1f7}.reveal-card>div{text-align:center;padding:10px 6px}.reveal-card>div>span{font-size:10px;color:var(--muted)}.reveal-card h3{font-size:21px;margin:2px 0}.reveal-card p{font-size:11px;color:var(--rose)}.reveal-card .grade{position:absolute;left:8px;top:8px;border-radius:6px;background:#ffffffe0;font-size:12px;font-weight:700;padding:2px 7px}.reveal-halo{position:absolute;width:85%;aspect-ratio:1;border-radius:50%;background:conic-gradient(from 20deg,transparent,#edcee455,transparent,#b8c7ee55,transparent,#efd8b755,transparent);filter:blur(7px)}
.motion-on .scout-arrival .scout-person{animation:office-arrive 1.25s ease-out both;animation-delay:calc(var(--i)*.14s)}.motion-on .scout-arrival .scout-body{animation:walk-sway .32s ease-in-out alternate 5}.motion-on .scout-arrival .door-panel{animation:office-door .8s ease-out both}.motion-on .scout-turn .scout-person.chosen{animation:scout-approach 1.1s ease-out both}.motion-on .scout-turn .chosen .scout-body{animation:scout-turn 1.1s ease-out both}.motion-on .scout-card .reveal-card{animation:card-appear .65s cubic-bezier(.2,.7,.3,1) both}.motion-on .scout-card .reveal-halo{animation:halo-spin 7s linear infinite}

/* Schedule video production is deferred. Preserve the existing browser cutscenes. */
.actor .actor-motion{width:100%;max-width:170px;transform-origin:50% 100%;position:relative}.actor .actor-motion .sprite-frame{width:100%;max-width:none}.motion-on .activity-scene.live .sprite-frame img{animation:none}.motion-on .activity-scene .background{animation:scene-camera 6s ease-in-out infinite alternate}.scene-particles{position:absolute;inset:12% 6% 15%;pointer-events:none}.scene-particles i{position:absolute;left:calc(5% + var(--i)*17%);bottom:10%;font-size:18px;font-style:normal;color:#f0dbf0;opacity:0;text-shadow:0 0 14px #fff8}.motion-on .scene-particles i{animation:scene-particle 3s ease-out infinite;animation-delay:calc(var(--i)*-.6s)}.motion-on .motion-live .actor-motion{animation:perform-step .85s ease-in-out infinite;animation-delay:calc(var(--i)*-.12s)}.motion-on .motion-vocal .actor-motion{animation:sing-phrase 1.6s ease-in-out infinite;animation-delay:calc(var(--i)*-.2s)}.motion-on .motion-dance .actor-motion,.motion-on .motion-balance .actor-motion{animation:practice-step 1.2s ease-in-out infinite;animation-delay:calc(var(--i)*-.15s)}.motion-on .motion-talk .actor-motion,.motion-on .motion-stream .actor-motion{animation:greeting 2.4s ease-in-out infinite;animation-delay:calc(var(--i)*-.4s)}.motion-on .motion-rest .actor-motion{animation:rest-breathe 3.5s ease-in-out infinite;animation-delay:calc(var(--i)*-.2s)}.motion-on .motion-promote .actor-motion{animation:flyer-step 1.4s ease-in-out infinite;animation-delay:calc(var(--i)*-.3s)}.motion-on .motion-parttime .actor-motion{animation:work-step 1.7s ease-in-out infinite;animation-delay:calc(var(--i)*-.3s)}.motion-on .scene-mistake .event-actor .actor-motion{animation:stage-stumble 1.4s ease-out .9s both}.practice-beats{position:absolute;bottom:10%;left:39%;right:39%;display:flex;gap:7px;justify-content:center}.practice-beats i{width:8px;height:8px;border-radius:50%;background:#fff4}.motion-on .practice-beats i{animation:beat-count 1.6s infinite}.practice-beats i:nth-child(2){animation-delay:.4s}.practice-beats i:nth-child(3){animation-delay:.8s}.practice-beats i:nth-child(4){animation-delay:1.2s}.stream-frame{position:absolute;inset:9% 7% 11%;border:1px solid #fff7;border-radius:10px;pointer-events:none}.stream-frame span{position:absolute;top:10px;right:10px;background:#eb5990;color:white;padding:3px 7px;font-size:9px;border-radius:5px}.stream-frame>i{position:absolute;bottom:8px;right:10px;font-size:22px;color:#f49bca;font-style:normal}.work-counter{position:absolute;left:9%;right:9%;bottom:7%;height:14%;background:linear-gradient(#c8a78b 0 7px,#785e5b 8px);border-radius:5px;z-index:4;display:flex;align-items:center;justify-content:center;gap:20px;color:#dcccbd;font-size:10px;letter-spacing:2px}.work-counter i{font-style:normal;font-size:18px}.stage-lights{position:absolute;inset:0;pointer-events:none;mix-blend-mode:screen;opacity:.26}.stage-lights i{position:absolute;top:-5%;left:20%;height:100%;width:20%;background:linear-gradient(#dd91ff,transparent);clip-path:polygon(44% 0,56% 0,100% 100%,0 100%);transform-origin:50% 0}.stage-lights i:nth-child(2){left:48%;background:linear-gradient(#91c5ff,transparent)}.stage-lights i:nth-child(3){left:68%;background:linear-gradient(#ff91c1,transparent)}.motion-on .stage-lights i{animation:light-swing 3s ease-in-out infinite alternate}.stage-lights i:nth-child(2){animation-delay:-1s}.stage-lights i:nth-child(3){animation-delay:-2s}
@keyframes cinema-progress{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes office-arrive{from{left:84%;bottom:33%;opacity:0;transform:translateX(-50%) scale(.42)}15%{opacity:1}to{left:var(--slot);bottom:24%;transform:translateX(-50%) scale(1)}}
@keyframes walk-sway{from{transform:translateY(0) rotate(-3deg)}to{transform:translateY(-5px) rotate(3deg)}}
@keyframes office-door{from{transform:rotateY(0)}to{transform:rotateY(-75deg)}}
@keyframes scout-approach{from{left:var(--slot);width:17%;filter:drop-shadow(0 0 0 transparent)}to{left:50%;width:25%;filter:drop-shadow(0 0 12px var(--color))}}
@keyframes scout-turn{0%{transform:perspective(600px) rotateY(180deg) scale(.9);filter:brightness(0)}45%{transform:perspective(600px) rotateY(90deg) scale(1);filter:brightness(0)}75%{filter:brightness(1.25)}100%{transform:perspective(600px) rotateY(0) scale(1.07);filter:brightness(1)}}
@keyframes card-appear{0%{opacity:0;transform:scale(.6) translateY(25px);filter:brightness(2)}50%{opacity:1;filter:brightness(1.3)}100%{opacity:1;transform:scale(1) translateY(0);filter:brightness(1)}}
@keyframes halo-spin{to{transform:rotate(360deg)}}
@keyframes scene-camera{from{transform:scale(1.015) translateX(-.4%)}to{transform:scale(1.055) translateX(.4%)}}
@keyframes scene-particle{0%{opacity:0;transform:translateY(0) scale(.7)}25%{opacity:.7}100%{opacity:0;transform:translateY(-100px) scale(1.1) rotate(15deg)}}
@keyframes perform-step{0%,100%{transform:translateX(-3px) rotate(-3deg)}50%{transform:translateX(3px) translateY(-8px) rotate(3deg)}}
@keyframes sing-phrase{0%,100%{transform:rotate(-1deg) scaleY(1)}40%{transform:translateY(-4px) rotate(2deg) scaleY(1.02)}70%{transform:rotate(0) scaleY(.99)}}
@keyframes practice-step{0%,100%{transform:translateX(-7px) rotate(-5deg)}25%{transform:translateX(0) translateY(-8px) rotate(0)}50%{transform:translateX(7px) rotate(5deg)}75%{transform:translateX(0) translateY(-5px) rotate(0)}}
@keyframes greeting{0%,100%{transform:rotate(0)}20%,40%{transform:rotate(4deg)}30%,50%{transform:rotate(-2deg)}70%{transform:translateY(-3px)}}
@keyframes rest-breathe{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(3px) rotate(1deg) scaleY(.98)}}
@keyframes flyer-step{0%,100%{transform:translateX(-5px) rotate(-3deg)}35%{transform:translateX(5px) rotate(3deg)}55%{transform:translateX(5px) scale(1.02)}75%{transform:translateX(0) rotate(0)}}
@keyframes work-step{0%,100%{transform:translateX(-8px) rotate(0)}30%{transform:translateX(5px) rotate(5deg) translateY(3px)}65%{transform:translateX(9px) rotate(-2deg)}}
@keyframes stage-stumble{0%,100%{transform:translateX(0) rotate(0)}25%{transform:translateX(15px) rotate(17deg) translateY(7px)}50%{transform:translateX(-5px) rotate(-8deg)}75%{transform:translateX(3px) rotate(3deg)}}
@keyframes beat-count{0%,20%{background:#edb6d5;box-shadow:0 0 10px #f2bcdf}25%,100%{background:#fff4;box-shadow:none}}
@keyframes light-swing{from{transform:rotate(-23deg)}to{transform:rotate(23deg)}}
@media(max-width:760px){.dialog-header-actions{gap:2px}.dialog-header-actions .button{font-size:10px;min-height:32px;padding:7px 9px}.dialog-header-actions .icon-button{width:30px;height:32px}.dialog-header:has(.dialog-header-actions .button) h2{font-size:18px}.weekly-results{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.weekly-results .result-stat{padding:10px 7px;border-radius:9px}.weekly-results .result-stat span{font-size:10px}.weekly-results .result-stat b{font-size:clamp(12px,3.7vw,18px);margin:3px 0}.weekly-results .result-stat small{font-size:9px}.weekly-results+.weekly-breakdown{font-size:11px}.scout-cinema{aspect-ratio:4/4.6}.scout-person{width:19%;bottom:25%}.scout-turn .scout-person.chosen{width:40%;bottom:28%;max-width:none}.scout-caption{bottom:7%}.scout-caption p{font-size:12px}.reveal-card{width:63%;max-width:220px}.reveal-card h3{font-size:21px}.reveal-card>div{padding:9px}.scout-card-reveal{padding-bottom:15%}.office-sign{font-size:10px;left:40%;right:25%;padding:7px 3px}.office-window{border-width:5px;height:36%}.office-door{border-width:5px;right:5%;top:24%;height:43%;width:24%}.office-shelf{left:43%;width:22%;top:44%;height:16%}.office-desk{width:27%}.motion-on .scout-turn .scout-person.chosen{animation-name:scout-approach-mobile}.scene-particles i{font-size:14px}.work-counter{bottom:8%;height:13%;gap:13px}.activity-scene .actor-name{position:relative;z-index:5}.scout-progress{margin-top:11px}.draw-grid .draw-card b{margin:6px 0 2px}.draw-grid .draw-card small{font-size:9px}.weekly-breakdown summary{min-height:32px}}
@keyframes scout-approach-mobile{from{left:var(--slot);width:19%;bottom:25%}to{left:50%;width:40%;bottom:28%;filter:drop-shadow(0 0 12px var(--color))}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.motion-off *,.motion-off *::before,.motion-off *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}

/* Shared movie, actual saved card. Keep the whole video visible on both phone and desktop. */
.scout-film-scene{aspect-ratio:16/10;background:#20172f;display:flex;align-items:center;padding-bottom:35px}.scout-film{width:100%;height:100%;object-fit:contain;display:block}.scout-film-caption{position:absolute;bottom:0;left:0;right:0;height:39px;background:#20172f;display:flex;align-items:center;justify-content:center;gap:12px;padding:0 10px;font-size:11px}.scout-film-caption span{color:#d0badf;font-size:10px;white-space:nowrap}.scout-film-caption p{margin:0}.scout-film-backdrop{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:blur(7px) brightness(.6)}.scout-film-reveal .scout-office,.scout-film-reveal .scout-cast{display:none}.scout-progress i.current{background:#d8c2df}.scout-film-reveal .scout-card-reveal{background:#241b3926}
/* The revealed card and caption participate in normal flow. The card may grow
   with translated text or a narrow viewport without clipping under an inset. */
.scout-film-reveal{aspect-ratio:auto;display:grid;grid-template-rows:auto auto;padding:22px 16px 18px;gap:12px;min-height:360px}
.scout-film-reveal .scout-card-reveal{position:relative;inset:auto;padding:0;min-width:0;align-self:center;background:transparent;backdrop-filter:none}
.scout-film-reveal .reveal-card{width:clamp(140px,45%,210px);max-width:100%;flex-shrink:0}
.scout-film-reveal .reveal-card>div{padding:8px 6px}
.scout-film-reveal .scout-caption{position:relative;inset:auto;align-self:end;margin:0;min-width:0}
.scout-film-reveal .scout-caption p{margin-top:3px}
.scout-film-reveal .reveal-halo{width:min(330px,100%);pointer-events:none}
@media(max-width:760px){.scout-film-scene{aspect-ratio:4/3}.scout-film-caption{font-size:10px;gap:8px}.scout-film-reveal{padding:17px 14px 14px;gap:10px;min-height:310px}.scout-film-reveal .reveal-card{width:clamp(138px,54%,190px)}.scout-film-reveal .reveal-card h3{font-size:19px}.scout-film-reveal .reveal-card p{font-size:10px}}

/* The entire scouting dialog and scene stay fixed across video, reveal and results. */
.dialog.scout-dialog[open]{display:grid;grid-template-rows:96px minmax(0,1fr) 78px;width:min(780px,calc(100vw - 24px));height:min(780px,calc(100dvh - 32px));max-height:calc(100dvh - 32px);overflow:hidden}
.scout-dialog .dialog-header,.scout-dialog .dialog-footer{position:static;min-height:0}
.scout-dialog .dialog-header{gap:10px;align-items:center;padding-top:16px;padding-bottom:16px}
.scout-dialog .dialog-header h2{font-size:clamp(17px,3vw,23px)}
.scout-dialog .dialog-footer{align-items:center}
.scout-dialog .dialog-body{min-height:0;overflow-y:auto;overscroll-behavior:contain}
.scout-dialog .dialog-body:has(.scout-cinema){display:flex;flex-direction:column;overflow:hidden}
.scout-dialog .scout-cinema{flex:1 1 0;min-height:0;height:100%;width:100%;aspect-ratio:auto}
.scout-dialog .scout-progress{flex:0 0 4px}
.scout-dialog .scout-film-scene{padding-bottom:42px}
.scout-dialog .scout-film{min-height:0;object-fit:contain}
.scout-dialog .scout-film-reveal{display:grid;grid-template-rows:minmax(0,1fr) auto;padding:18px 16px;gap:12px}
.scout-dialog .scout-card-reveal{height:100%;min-height:0;align-self:stretch;overflow:visible}
.scout-dialog .reveal-card{display:grid;grid-template-rows:minmax(0,1fr) auto;height:min(100%,390px);width:min(230px,70%);max-height:100%;flex:none}
.scout-dialog .reveal-card>img{width:100%;height:100%;min-height:0;aspect-ratio:auto;object-fit:contain}
.scout-dialog .reveal-card>div{padding:9px 6px;flex-shrink:0}
.scout-dialog .scout-caption{position:relative;inset:auto}
.scout-dialog .draw-grid{align-items:start;align-content:start}
@media(max-width:760px){.scout-dialog .dialog-body{padding-bottom:18px}.scout-dialog .dialog-header{padding-inline:16px}.scout-dialog .dialog-footer{padding-inline:16px}.scout-dialog .reveal-card{width:min(230px,76%)}.scout-dialog .scout-film-reveal{padding:15px 12px;gap:10px}}
@media(max-height:500px){.dialog.scout-dialog[open]{grid-template-rows:70px minmax(0,1fr) 56px}.scout-dialog .dialog-header{padding-block:8px}.scout-dialog .dialog-body{padding-bottom:8px}.scout-dialog .dialog-footer{padding-block:6px}.scout-dialog .scout-caption{display:none}.scout-dialog .scout-film-reveal{grid-template-rows:minmax(0,1fr);padding:8px}.scout-dialog .reveal-card>div{padding:3px}.scout-dialog .reveal-card h3{font-size:15px}.scout-dialog .reveal-card p,.scout-dialog .reveal-card>div>span{font-size:9px}.scout-dialog .scout-progress{margin-top:6px}}
