:root{color-scheme:dark;--bg:#151522;--panel:#232134;--line:#494054;--pink:#ffa2bf;--text:#fff4eb;--muted:#c2b5c9;--gold:#ffe0a0;font-family:'Hiragino Kaku Gothic ProN','Yu Gothic',system-ui,sans-serif}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}body{background:#10121d;color:var(--text);font-size:14px}button,input,select{font:inherit}button{border:1px solid #655368;border-radius:10px;padding:10px 12px;background:#332c41;color:var(--text);cursor:pointer;transition:background .15s;touch-action:manipulation}button:hover{background:#493950}button:disabled{opacity:.4;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #fff2bd;outline-offset:2px}button.active,button[aria-pressed=true]{background:#68475b;border-color:var(--pink)}button.primary{background:#ffafc3;color:#352131;border-color:#ffc6d4;font-weight:750}button.primary:hover{background:#ffcad6}input,select{width:100%;min-height:42px;background:#191826;color:var(--text);border:1px solid #625068;border-radius:8px;padding:9px}label{display:block;font-size:12px;color:var(--muted);margin:12px 0}label input,label select{margin-top:6px}h1,h2,h3,p{margin:0 0 14px}h2{font-size:23px;line-height:1.35}h3{font-size:16px;margin-top:22px}p{line-height:1.75}small,.fine{font-size:11px;line-height:1.65;color:var(--muted)}.muted{color:var(--muted);font-size:12px}.wide{width:100%;margin:6px 0}.actions,.segmented{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.notice{padding:14px;background:#372d43;border-left:3px solid var(--pink);border-radius:6px}.game-shell{height:100dvh;height:100svh;max-width:1100px;margin:auto;display:flex;flex-direction:column;background:var(--bg);padding-top:env(safe-area-inset-top);overflow:hidden}.game-screen{flex:1;min-height:0;position:relative;overflow:hidden;background:#171b28}.control-dock{flex:0 0 auto;height:calc(124px + env(safe-area-inset-bottom));padding:9px max(20px,env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));display:flex;align-items:center;border-top:2px solid #554257;background:linear-gradient(#302637,#221f2e);position:relative;z-index:50;gap:10px;box-shadow:0 -5px 25px #0004}.joystick{width:100px;height:100px;position:relative;flex:none;touch-action:none;user-select:none}.stick-rim{position:absolute;inset:3px;border:2px solid #706174;border-radius:50%;background:radial-gradient(#151421 45%,#403547 47%,#2a2234 72%);box-shadow:inset 0 3px 10px #0007}.stick-knob{position:absolute;left:28px;top:28px;width:44px;height:44px;border-radius:50%;border:2px solid #ddabc2;background:radial-gradient(circle at 40% 30%,#c68ca6,#70506e);box-shadow:0 5px 8px #0009;pointer-events:none}.inactive{opacity:.4}.dock-label{font-size:9px;letter-spacing:2px;color:#998197;margin:auto}.dock-buttons{display:flex;gap:12px;margin-left:auto}.dock-button{width:72px;height:74px;border-radius:22px;font-size:25px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:#45344a;border-bottom:5px solid #18151e}.dock-button span{font-size:11px;white-space:nowrap}.talk-button{background:#71506a;border-color:#a17991;border-bottom-color:#302137}.town-screen,.town-screen canvas{width:100%;height:100%;display:block;image-rendering:pixelated}.map-hud{position:absolute;top:12px;left:12px;right:12px;display:flex;justify-content:space-between;pointer-events:none;gap:10px}.map-hud>*{background:#1b2031dd;padding:7px 12px;border:1px solid #897c9166;border-radius:8px;font-size:12px;box-shadow:0 2px 8px #0005}.map-objective{position:absolute;left:12px;right:12px;bottom:10px;background:#1e1e30df;border:1px solid #7b6b8344;padding:8px 12px;border-radius:8px;font-size:11px;pointer-events:none}.map-loading{position:absolute;inset:0;z-index:12;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;background:#171b28;color:#e7cee3;text-align:center;padding:40px;font-size:13px}.loader{width:28px;height:28px;border:3px solid #544055;border-top-color:#ffacc6;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.dialogue-box{position:absolute;left:12px;right:12px;bottom:16px;z-index:15;background:#252033f5;border:2px solid #aa829d;box-shadow:0 8px 30px #0008;border-radius:14px;padding:14px;max-height:65%;overflow:auto}.speaker{display:flex;align-items:center;gap:10px;margin-bottom:10px}.speaker img{width:50px;height:58px;object-fit:cover;object-position:center 15%;border-radius:8px}.speaker b{color:var(--pink);font-size:15px}.speaker button{margin-left:auto;padding:5px 12px}.dialogue-box p{font-size:13px;line-height:1.8}.dialogue-actions{display:flex;gap:7px;flex-wrap:wrap}.dialogue-actions button{flex:1;font-size:12px;white-space:nowrap}.title-screen{position:relative;height:100%;display:flex;align-items:center;justify-content:center;text-align:center;overflow:hidden}.title-art{position:absolute;inset:0;background:#222235 center/cover;image-rendering:pixelated;transform:scale(1.02)}.title-copy{position:relative;max-width:420px;width:100%;padding:20px}.title-copy>small{color:#ffe0ad;font-size:10px;letter-spacing:4px}.title-copy h1{font-size:clamp(29px,6vw,50px);line-height:1.4;letter-spacing:.04em;margin:20px 0;text-shadow:0 3px #463451}.title-copy em{font-style:normal;color:#ffa7c5}.title-copy p{font-size:12px}.title-options{display:grid;gap:12px;margin:30px auto 16px;max-width:250px}.title-options button{min-height:48px;letter-spacing:.15em}.title-copy .fine{margin-top:18px}.panel{height:100%;overflow:auto;padding:20px}.creator{max-width:580px;margin:auto}.creator>small,.panel-content>small{display:block;letter-spacing:2px;color:#dfabc7;margin-bottom:8px}.creator>p{font-size:12px}.avatar-preview{display:flex;align-items:end;justify-content:center;gap:25px;background:radial-gradient(#77577555,#272333);border:1px solid #776279;border-radius:12px;padding:8px;height:154px}.avatar-preview img{width:120px;height:140px;object-fit:contain;image-rendering:pixelated}.avatar-preview canvas{height:120px;width:80px;image-rendering:pixelated}.segmented button{flex:1}.part-list{margin:15px 0}.part-list>div{display:flex;gap:8px;align-items:center;margin:7px 0}.part-list b{font-size:12px;width:30px}.part-list span{flex:1;text-align:center;font-size:12px}.part-list button{padding:5px 14px;min-height:35px}.panel-backdrop,.detail-backdrop{position:absolute;inset:0;background:#10101aa8;z-index:25;display:flex;justify-content:center;align-items:stretch;padding:12px}.panel-modal{width:100%;max-width:800px;display:flex;flex-direction:column;min-height:0;background:#242031;border:1px solid #7e647e;border-radius:15px;box-shadow:0 15px 50px #0009;overflow:hidden}.panel-top{flex:none;display:flex;justify-content:space-between;align-items:center;padding:9px 14px;border-bottom:1px solid #534153;background:#2d2539}.panel-top button{font-size:12px;padding:7px 10px}.panel-top span{font-size:9px;letter-spacing:3px;color:#b195b4}.panel-content{padding:18px;overflow:auto;overscroll-behavior:contain;min-height:0}.profile-row{display:flex;gap:18px;align-items:center;margin:10px 0 20px}.avatar-face{height:75px;width:64px;object-fit:contain;image-rendering:pixelated;background:#3e324c;border-radius:10px}.menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:15px 0}.menu-grid button{min-height:51px;font-size:12px;text-align:left}.resident-list{display:grid;gap:8px}.resident-list>div{display:flex;gap:12px;align-items:center;padding:8px;background:#30293d;border-radius:8px}.resident-list img{height:60px;width:44px;object-fit:cover;object-position:top;border-radius:5px}.resident-list small{display:block;margin-top:5px}.card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(125px,1fr));gap:14px}.card-grid article{display:flex;flex-direction:column;gap:6px;min-width:0}.card-grid article>button:not(.art-button){font-size:11px;padding:9px 3px}.card-grid article>small{text-align:center}.art-button{border:0;padding:0;background:transparent!important;text-align:initial}.card-art{position:relative;isolation:isolate;aspect-ratio:2/3;border:3px solid #eb96b6;border-radius:9px;overflow:hidden;background:#513147;width:100%;height:100%;min-height:0}.card-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;z-index:-1;pointer-events:none}.card-art.whisper{border-color:#b6a2f0}.card-art.tsundere{border-color:#f3d460}.card-art.coordinate{border-color:#f1a04f}.card-cost{position:absolute;top:3px;left:3px;padding:2px 5px;border-radius:5px;background:#251a2cd9;font-size:10px;font-weight:800}.card-name{position:absolute;bottom:18px;left:0;right:0;background:linear-gradient(transparent,#1a112bea 32%);text-align:center;padding:12px 1px 5px;font-size:12px;line-height:1.2;text-shadow:0 1px 3px #000}.card-type{position:absolute;bottom:0;left:0;right:0;height:19px;display:flex;align-items:center;justify-content:center;background:#f8aac7;color:#3d1830;font-size:9px;font-weight:800;white-space:nowrap}.whisper .card-type{background:#b7a1f0}.tsundere .card-type{background:#f2d76c}.coordinate .card-type{background:#f2ac63}.shop-pack{padding:18px;border-radius:12px;border:1px solid #98749b;background:linear-gradient(135deg,#50405c,#302438);margin:16px 0}.shop-pack p{font-size:12px;margin-top:9px}.shop-pack button{margin-right:5px;font-size:12px}.pack-cover{width:170px;height:255px;border-radius:10px;border:3px solid #dda1c3;background:linear-gradient(135deg,#734c7a,#28243f);box-shadow:inset 0 0 0 6px #b786a944;display:flex;flex-direction:column;justify-content:space-between;padding:20px;text-align:center;margin:25px auto}.pack-cover span{font-size:9px;letter-spacing:2px}.pack-cover b{font-size:23px;line-height:1.6;color:#ffcce0}.pack-cover small{font-size:8px}.pack-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:10px;margin:15px 0}.pack-grid>div{aspect-ratio:2/3;margin-bottom:25px}.card-back{aspect-ratio:2/3;background:linear-gradient(135deg,#915578,#33263e);border:3px solid #dda1c3;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;font-size:45px}.card-back span{font-size:10px}.deck-tabs{display:flex;flex-wrap:wrap;gap:5px}.deck-tabs button{font-size:11px}.deck-summary{display:flex;justify-content:space-between;margin:12px 0;color:#ffc4d7}.deck-selected{display:flex;flex-wrap:wrap;gap:5px;padding:10px;background:#1a1828;border-radius:8px;margin-bottom:12px}.deck-selected button{font-size:10px;padding:6px}.skill-row{display:flex;align-items:center;justify-content:space-between;padding:14px;background:#31293e;margin:12px 0;border-radius:9px;gap:12px}.skill-row p{margin:5px 0;font-size:12px}.detail-backdrop{z-index:40;background:#121019e8;align-items:center}.detail-card{overflow:auto;max-height:100%;width:340px;text-align:center;padding:18px;background:#30253c;border:1px solid #9a7792;border-radius:14px}.detail-card>.card-art{width:min(180px,33vh);height:auto;margin:0 auto 15px}.detail-card p{font-size:13px}.detail-card small{display:block}.boot{height:100dvh;display:flex;align-items:center;justify-content:center}.duel-screen{height:100%;display:flex;flex-direction:column;padding:8px 10px;gap:5px;position:relative;background:radial-gradient(ellipse at center,#433047,#191e30)}.duel-status,.player-status{height:36px;flex:none;display:flex;align-items:center;gap:8px;font-size:11px;min-width:0}.duel-status img{width:27px;height:34px;object-fit:cover;object-position:top;border-radius:4px}.duel-status b,.player-status b{max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.duel-status span,.player-status span{margin-left:auto;white-space:nowrap;color:#ffaec8}.duel-status strong,.player-status strong{font-size:22px}.duel-status small,.player-status small{font-size:9px;white-space:nowrap}.player-status .avatar-face{width:28px;height:34px}.field{display:flex;flex:1;min-height:0;align-items:center;justify-content:center;gap:12px;padding:2px 10px 9px;border-radius:10px;background:#12132255}.unit{height:100%;max-height:175px;aspect-ratio:2/3;width:auto;max-width:30%;min-height:0;border:0;padding:0;position:relative;border-radius:8px;background:transparent!important;flex:0 1 auto}.unit .card-art{width:100%;height:100%}.unit .card-name{font-size:10px}.unit .card-cost{font-size:8px}.unit .card-type{font-size:8px}.unit-cp{position:absolute;bottom:-8px;left:50%;transform:translateX(-50%);font-size:10px;background:#221c30;border:1px solid #d29aba;border-radius:6px;padding:1px 8px;white-space:nowrap;z-index:3}.gear-under{position:absolute;inset:8px -5px -7px 5px;border:2px solid #ffa952;background:#a6602f;border-radius:8px;color:#23140a;font-size:7px;display:flex;align-items:end;justify-content:end;padding:0 3px}.equipped .card-art{transform:translate(-2px,-2px)}.empty-slot{height:90%;aspect-ratio:2/3;max-width:30%;border:1px dashed #ac849866;border-radius:8px;display:flex;align-items:center;justify-content:center;letter-spacing:2px;font-size:10px;color:#b896a688}.turn-line{flex:none;display:flex;align-items:center;gap:6px;min-height:30px}.turn-line b{font-size:10px;flex:1;color:#eedbc8}.turn-line button{font-size:10px;padding:6px 9px}.hand{flex:0 0 112px;min-height:0;display:flex;align-items:center;gap:7px;overflow-x:auto;overflow-y:hidden;padding:4px 4px 6px;scrollbar-width:thin;background:#11132180;border-radius:8px;touch-action:pan-x}.hand-card{flex:none;height:100%;width:69px;position:relative;padding:0;border:0;background:transparent!important;touch-action:pan-x;user-select:none}.hand-card .card-name{font-size:8px;bottom:14px;padding:12px 0 3px}.hand-card .card-type{font-size:6px;height:15px}.hand-card .card-cost{font-size:8px}.selected .card-art{outline:2px solid #fff0b8;outline-offset:-5px;box-shadow:0 0 15px #ffc2b477}.duel-hint{flex:none;min-height:35px;max-height:85px;display:flex;gap:5px;align-items:center;font-size:10px}.duel-hint p{font-size:10px;line-height:1.5;margin:0;flex:1;max-height:52px;overflow:auto}.duel-hint>div{display:flex;flex-wrap:wrap;gap:4px;max-width:52%}.duel-hint button{font-size:10px;padding:7px 8px}.reaction,.target-picker{position:absolute;bottom:135px;left:12px;right:12px;z-index:20;padding:15px;background:#42343df8;border:2px solid #f2cf66;border-radius:12px;box-shadow:0 5px 30px #000a;max-height:60%;overflow:auto}.reaction b,.target-picker b{display:block;font-size:12px;margin-bottom:10px}.reaction div,.target-picker{display:flex;flex-wrap:wrap;gap:6px}.reaction button,.target-picker button{font-size:11px}.result-overlay{position:absolute;inset:0;z-index:22;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:#1a1528f3;padding:20px;overflow:auto}.result-overlay h2{color:#ffbaca;letter-spacing:2px}.result-overlay p{font-size:13px}.result-overlay small{margin-top:12px}.reward-art{width:110px;margin-bottom:12px}.result-overlay>.primary{min-width:180px}.result-overlay .card-art{height:auto}#toast{position:fixed;left:50%;bottom:calc(135px + env(safe-area-inset-bottom));transform:translate(-50%,12px);width:max-content;max-width:90vw;padding:12px 16px;border-radius:10px;background:#fff0dc;color:#33243a;box-shadow:0 4px 20px #0007;font-size:12px;z-index:100;opacity:0;pointer-events:none;transition:opacity .15s,transform .15s}#toast.show{opacity:1;transform:translate(-50%,0)}
@media(min-width:700px){.game-shell{border-left:1px solid #574353;border-right:1px solid #574353}.control-dock{padding-left:40px;padding-right:40px}.field{gap:35px}.hand{justify-content:center}.duel-screen{padding:10px 30px}.duel-status,.player-status{font-size:14px}.card-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}.panel-content{padding:24px}.creator{padding:28px 40px}}
@media(max-height:680px){.control-dock{height:calc(94px + env(safe-area-inset-bottom));padding-top:4px;padding-bottom:calc(4px + env(safe-area-inset-bottom))}.joystick{width:80px;height:80px}.stick-knob{left:21px;top:21px;width:38px;height:38px}.dock-button{height:64px;width:64px;font-size:21px;border-radius:18px}.dock-label{display:none}.hand{flex-basis:86px}.hand-card{width:51px}.duel-screen{gap:3px;padding:4px 7px}.duel-status,.player-status{height:28px}.duel-status img,.player-status .avatar-face{height:27px}.duel-status strong,.player-status strong{font-size:19px}.turn-line{min-height:25px}.turn-line button{padding:5px}.field{gap:8px;padding-bottom:6px}.unit .card-name{font-size:8px}.unit .card-type{font-size:6px;height:14px}.unit .card-name{bottom:13px}.unit-cp{font-size:8px}.duel-hint{min-height:27px;max-height:60px}.title-copy h1{margin:10px 0}.title-options{margin-top:18px}.title-copy .fine{margin:10px 0}.result-overlay{justify-content:flex-start}.reward-art{width:85px}.panel-backdrop{padding:6px}#toast{bottom:110px}}
@media(max-width:360px){.control-dock{padding-left:10px;padding-right:10px}.dock-buttons{gap:7px}.dock-label{display:none}.card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.duel-status small{max-width:62px;white-space:normal}.panel-content{padding:14px}.menu-grid{gap:7px}.menu-grid button{font-size:11px}}
@media(orientation:landscape) and (max-height:500px){.control-dock{height:80px}.joystick{width:70px;height:70px}.stick-knob{top:17px;left:17px;width:36px;height:36px}.dock-button{height:60px}.duel-screen{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:28px minmax(0,1fr) 28px 68px;gap:4px}.duel-status{grid-column:1;grid-row:1}.player-status{grid-column:2;grid-row:1}.enemy{grid-column:1;grid-row:2}.own{grid-column:2;grid-row:2}.turn-line{grid-column:1/3;grid-row:3}.hand{grid-column:1/3;grid-row:4;justify-content:flex-start}.hand-card{width:38px}.duel-hint{position:absolute;right:10px;bottom:5px;background:#251d33;padding:5px;max-width:45%}.title-options{display:flex;max-width:360px;justify-content:center}.title-options button{min-width:130px}.title-copy h1{font-size:23px}.title-copy p{margin-bottom:6px}.title-copy>small,.title-copy .fine{display:none}.title-copy{padding:10px}.reaction,.target-picker{bottom:80px}.result-overlay .reward-art{display:none}}
/* v8: in-game confirmations also work in embedded browsers without native modal support. */
.control-dock.duel-dock{height:calc(82px + env(safe-area-inset-bottom));justify-content:center;padding:10px 20px calc(10px + env(safe-area-inset-bottom))}.retire-button,.return-button{width:min(100%,360px);min-height:50px;font-weight:750;font-size:14px;letter-spacing:.04em}.retire-button{background:#573349;border:1px solid #c78aa2;border-bottom:4px solid #271c2c;color:#ffd9e4}.retire-button:hover{background:#72425b}.confirmation-backdrop{position:absolute;inset:0;z-index:80;background:#14111cdb;display:flex;align-items:center;justify-content:center;padding:20px}.confirmation-box{width:100%;max-width:370px;border:2px solid #b086a3;border-radius:16px;padding:24px 20px;background:linear-gradient(145deg,#3c2f49,#251f33);box-shadow:0 16px 45px #0009;text-align:center;max-height:100%;overflow:auto}.confirmation-label{font-size:9px;letter-spacing:3px;color:#e2abc8;display:block;margin-bottom:14px}.confirmation-box h2{font-size:19px;line-height:1.65;margin-bottom:12px}.confirmation-box p{font-size:12px;color:#dfd0e0}.confirmation-actions{display:flex;gap:12px;margin-top:22px}.confirmation-actions button{flex:1;min-height:46px;font-size:14px}.avatar-preview{height:210px;gap:22px;align-items:end}.avatar-preview figure{margin:0;display:flex;flex-direction:column;align-items:center;gap:3px}.avatar-preview figcaption{font-size:10px;color:#cbb7d0}.avatar-preview #hero-portrait{width:155px;height:174px;image-rendering:auto;object-fit:contain}.avatar-preview canvas{width:64px;height:96px;margin-bottom:0;image-rendering:pixelated}.avatar-face{image-rendering:auto;object-fit:cover;object-position:center 30%;height:88px;width:78px}.player-status .avatar-face{width:30px;height:34px}@media(max-height:680px){.control-dock.duel-dock{height:calc(72px + env(safe-area-inset-bottom));padding-top:8px;padding-bottom:calc(8px + env(safe-area-inset-bottom))}.retire-button,.return-button{min-height:45px}.avatar-preview{height:178px}.avatar-preview #hero-portrait{width:130px;height:144px}.confirmation-backdrop{padding:12px}.confirmation-box{padding:18px 16px}.player-status .avatar-face{height:27px}}@media(orientation:landscape) and (max-height:500px){.control-dock.duel-dock{height:60px;padding:6px 20px}.retire-button,.return-button{min-height:42px}.confirmation-box{max-width:430px;padding:12px 18px}.confirmation-box h2{font-size:17px;margin-bottom:5px}.confirmation-label{display:none}.confirmation-actions{margin-top:10px}.confirmation-box p{margin-bottom:5px}}
/* v9: portraits stay visible above and below the stage. */
.part-list b{width:54px;flex:none}.part-list span{line-height:1.45}.avatar-preview #hero-portrait{width:174px;height:174px}.hero-card{background:radial-gradient(circle at 50% 35%,#9479a7,#442841 65%)}.hero-card .hero-card-face{object-position:center 20%}.ace-badge{position:absolute;right:3px;top:4px;color:#fff0a1;background:#38263ac9;padding:2px 4px;font-size:8px;letter-spacing:1px;border:1px solid #ffe0a0;border-radius:4px}.speaker img{object-position:center;object-fit:contain;background:#413247}.speaker .avatar-face{width:58px;height:58px}.resident-list img{object-fit:contain;object-position:center;background:#44334f;width:62px;height:62px}
.fighter-status{height:76px;min-height:0;flex:none;display:flex;align-items:center;gap:9px;position:relative;border:1px solid #a1799155;border-radius:10px;padding:3px 8px;background:#241c32c9;overflow:hidden}.fighter-status .fighter-face{width:66px;height:68px;border-radius:8px;flex:none;object-fit:contain;object-position:center;background:linear-gradient(135deg,#665273,#392b46);image-rendering:auto}.fighter-info{min-width:0;flex:1}.fighter-name{display:flex;align-items:baseline;gap:8px;justify-content:space-between}.fighter-status .fighter-name b{font-size:13px;max-width:unset;flex:1}.fighter-status .fighter-name span{font-size:11px;margin:0}.fighter-status .fighter-name strong{font-size:22px}.lp-track{height:6px;background:#181624;border-radius:5px;overflow:hidden;margin:5px 0 6px}.lp-track i{display:block;height:100%;background:linear-gradient(90deg,#ed729e,#ffcad7);border-radius:5px;transition:width .25s}.fighter-status[data-mood=critical] .lp-track i{background:#ffad59}.zone-counts{display:flex;justify-content:space-between;gap:4px;white-space:nowrap}.fighter-status .zone-counts span{font-size:10px;color:#dfcddd;margin:0;letter-spacing:-.025em}.empty-slot{font-size:9px;letter-spacing:0;text-align:center;padding:4px}.field{position:relative}.duel-screen>.hand{border-top:1px solid #b697b633}.duel-screen>.duel-hint{min-height:30px}.hurt-face .fighter-face{animation:face-hit .65s ease-out}.hurt-face{border-color:#ffc2c2;box-shadow:inset 0 0 30px #d8396133}
.duel-fx{position:absolute;inset:0;z-index:21;overflow:hidden;pointer-events:none;--fx:#ff8bad;--origin:28%;--target:75%}.fx-owner-0{--origin:75%;--target:28%}.fx-origin{position:absolute;left:50%;top:var(--origin);transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;width:90%;min-height:90px}.fx-origin b{font-size:clamp(22px,6vw,36px);font-weight:900;color:#fff6fd;text-shadow:0 0 20px var(--fx),2px 3px 0 #35203e;letter-spacing:.09em;z-index:2;animation:fx-label .6s ease-out both}.fx-origin small{font-size:12px;color:white;background:#21152be6;border-radius:20px;padding:4px 12px;z-index:2;margin-top:7px}.fx-origin i{position:absolute;width:115px;height:115px;border:3px solid var(--fx);border-radius:50%;box-shadow:0 0 22px var(--fx),inset 0 0 20px var(--fx);animation:fx-ring .7s ease-out both}.fx-origin i:nth-child(2){animation-delay:.09s}.fx-origin i:nth-child(3){animation-delay:.18s}.fx-attack .fx-origin{top:var(--target)}.fx-attack .fx-origin i{width:80%;height:8px;border:0;border-radius:100%;background:white;box-shadow:0 0 30px #ffb0ca;animation:fx-slash .48s ease-out both}.fx-attack .fx-origin i:nth-child(2){transform:rotate(-25deg);animation-delay:.07s}.fx-attack .fx-origin i:nth-child(3){display:none}.fx-attack .fx-origin b{font-size:20px}.fx-damage{background:#ff496912;animation:fx-flash .35s ease-out}.fx-damage .fx-origin{top:var(--origin)}.fx-damage .fx-origin b{color:#ffe1dd;font-size:42px}.fx-damage i{display:none}.fx-tsundere{--fx:#ffe06a;background:radial-gradient(ellipse at 50% var(--origin),#ffd34f35,transparent 55%)}.fx-tsundere .fx-origin i{border-radius:25%;transform:rotate(45deg);border-width:5px}.fx-coordinate{--fx:#ffad52;background:radial-gradient(ellipse at 50% var(--origin),#ffb14842,transparent 65%)}.fx-coordinate .fx-origin i{height:180px;width:180px;border:3px dashed #ffd196;animation:fx-orbit .76s ease-out both}.fx-whisper{--fx:#cb8fff;background:radial-gradient(ellipse at 50% var(--origin),#b777eb44,transparent 65%)}.fx-whisper .fx-origin i{width:180px;height:75px;transform:rotate(-18deg);border-width:2px}.fx-call{--fx:#ffacd0}.cutin{z-index:24;background:#100e2277;display:flex;align-items:center;animation:cutin-back 1.3s ease-out both}.cutin-band{height:clamp(170px,42%,300px);width:100%;display:flex;align-items:center;position:relative;border-top:3px solid #ffdc9f;border-bottom:3px solid #ffdc9f;background:linear-gradient(110deg,#442445,#7f3f63 50%,#2c2040);box-shadow:0 12px 60px #000a;animation:cutin-enter 1.3s ease both;overflow:hidden}.cutin-band img{height:130%;width:52%;object-fit:contain;object-position:center bottom;align-self:end;filter:drop-shadow(8px 0 0 #ffdbc52b)}.cutin-band>div{position:relative;margin-left:-5%;padding-right:12px;flex:1;display:flex;flex-direction:column;gap:8px;transform:rotate(-3deg)}.cutin-band small{letter-spacing:3px;color:#ffe7a6;font-size:11px}.cutin-band strong{font-size:clamp(18px,4vw,31px);color:#fff0e1}.cutin-band b{font-size:clamp(15px,3.5vw,23px);line-height:1.5}.cutin-band span{font-size:12px;color:#ffc2de}.fx-paused .duel-fx *,.fx-paused .duel-fx,.fx-paused .hurt-face *{animation-play-state:paused!important}
@keyframes face-hit{0%,30%{transform:translateX(-5px);filter:brightness(1.6)}15%,45%{transform:translateX(5px)}60%,100%{transform:translateX(0);filter:brightness(1)}}@keyframes fx-label{from{opacity:0;transform:scale(1.35) translateY(6px)}20%,75%{opacity:1;transform:scale(1)}to{opacity:0;transform:translateY(-10px)}}@keyframes fx-ring{from{opacity:1;scale:.3}to{opacity:0;scale:1.8}}@keyframes fx-slash{0%{opacity:0;scale:.2;rotate:-25deg}25%{opacity:1;scale:1.2}to{opacity:0;scale:1.8;rotate:-25deg}}@keyframes fx-flash{0%,45%{background:#ff49694a}25%,100%{background:transparent}}@keyframes fx-orbit{from{opacity:1;scale:.4;rotate:-50deg}to{opacity:0;scale:1.5;rotate:90deg}}@keyframes cutin-enter{0%{transform:translateX(-105%) skewX(-6deg)}15%,80%{transform:translateX(0) skewX(0)}100%{transform:translateX(105%)}}@keyframes cutin-back{0%,100%{opacity:0}15%,80%{opacity:1}}
@media(max-height:680px){.fighter-status{height:61px;padding:2px 5px;gap:6px}.fighter-status .fighter-face{width:48px;height:53px}.fighter-status .fighter-name b{font-size:11px}.fighter-status .fighter-name strong{font-size:19px}.fighter-status .zone-counts span{font-size:9px}.lp-track{margin:3px 0 4px;height:4px}.avatar-preview #hero-portrait{width:144px;height:144px}.duel-screen .field{min-height:40px}.duel-screen .duel-hint{min-height:25px}.fx-origin b{font-size:25px}}
@media(orientation:landscape) and (max-height:500px){.duel-screen{grid-template-rows:58px minmax(0,1fr) 28px 68px}.fighter-status{height:58px}.fighter-status .fighter-face{height:50px;width:45px}.fighter-status .zone-counts span{font-size:8px}.fighter-status .fighter-name b{font-size:10px}.cutin-band{height:80%}.cutin-band img{height:120%}}
@media(prefers-reduced-motion:reduce){.duel-fx *,.duel-fx,.hurt-face *{animation:none!important}.fx-origin i{display:none}.cutin-band{transform:none}.lp-track i{transition:none}}

/* Startup recovery stays inside the existing title screen. */
.title-options .sign-in-button{display:block;padding:12px 16px;border:1px solid #ffc4d8;border-radius:10px;background:#ff97bb;color:#271633;text-decoration:none;font-size:14px;text-align:center}.boot>div{padding:24px;max-width:420px;text-align:center}.boot h1{font-size:20px}.boot p{font-size:14px}

/* V15 keeps the adventure and up to five stage slots inside the phone viewport. */
.history-screen{height:100%;position:relative;overflow:auto;display:flex;align-items:center;justify-content:center;padding:20px}.history-art{position:absolute;inset:0;background-size:cover;background-position:center;image-rendering:pixelated;opacity:.3}.history-screen article{position:relative;max-width:540px;padding:24px;border:1px solid #cc98b8;border-radius:16px;background:#241d31eb}.history-screen h2{margin:18px 0;color:#ffc5db}.history-screen p{font-size:16px;line-height:1.9}.history-screen small{font-size:13px}.history-screen .actions button{flex:1;min-height:46px}.history-exit{margin-top:16px;font-size:13px}.skill-row{align-items:center;gap:12px}.skill-row>div{min-width:0}.skill-row p{font-size:14px}.skill-row>button{flex:none;min-width:50px;min-height:44px}.travel-list p{font-size:14px;padding:10px;background:#30283d;border-radius:8px}.field{grid-template-columns:repeat(var(--slots,3),minmax(0,1fr));gap:6px}.field .unit{max-width:100%;min-width:0}.result-overlay{overflow:auto}.result-overlay p{margin-bottom:8px}.result-overlay .reward-art{max-height:125px;width:83px;flex:none}@media(max-height:680px){.history-screen{padding:10px;align-items:flex-start}.history-screen article{padding:18px}.history-screen p{font-size:14px;line-height:1.8}.field{gap:4px}.result-overlay .reward-art{max-height:95px;width:64px}}

.field .unit,.field .empty-slot{max-width:calc((100% - (var(--slots,3) - 1)*6px)/var(--slots,3));flex-shrink:1}.field[style*="--slots:5"] .card-type{font-size:7px}.field[style*="--slots:5"] .card-name{font-size:9px}.field[style*="--slots:5"] .unit-cp{padding:1px 4px}
.forge-targets{display:grid;gap:.65rem}.forge-targets button{text-align:left;padding:.85rem;display:grid;gap:.35rem}.forge-targets span,.forge-materials small{font-size:.875rem;color:var(--muted,#c3b8cd)}.forge-preview{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:360px;margin:1rem auto}.forge-preview small{display:block;margin:.4rem 0;line-height:1.5}.forge-materials{display:grid;gap:.55rem}.forge-materials>div{display:grid;grid-template-columns:minmax(0,1fr) 44px 44px;gap:.4rem;align-items:center;padding:.55rem 0;border-bottom:1px solid #64546d}.forge-materials span{min-width:0;overflow-wrap:anywhere}.forge-materials small{display:block}.forge-materials button{min-width:44px;min-height:44px}.forge-preview .card-art{width:100%}

.panel-content:has(.forge-preview),.panel-content:has(.forge-targets){font-size:16px}.panel-content:has(.forge-preview) .fine,.panel-content:has(.forge-targets) .fine{font-size:14px}

/* The creator owns the full viewport; only its selected controls are shown. */
.creator.creator-compact{max-width:680px;width:100%;height:100%;padding:10px 14px max(10px,env(safe-area-inset-bottom));overflow:hidden;display:grid;grid-template-rows:auto minmax(44px,1fr) 44px 188px auto;gap:8px}
.creator-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:28px}
.creator-heading h2{font-size:20px;margin:0;line-height:1.35}
.creator-heading>span{font-size:12px;color:var(--muted)}
.creator-compact .avatar-preview{height:auto;min-height:0;gap:20px;padding:4px 10px;border-color:#85607d;background:radial-gradient(ellipse at 50% 100%,#69506d 0,#282436 72%);align-items:center;overflow:hidden}
.creator-compact .avatar-preview figure{height:100%;min-height:0;justify-content:end;gap:0}
.creator-compact .avatar-preview .portrait-preview{width:65%;max-width:310px}
.segmented.forge-tracks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.forge-tracks button{min-height:42px;font-size:14px}
.recovery-status{position:absolute;left:6px;bottom:3px;z-index:1;max-width:70px;padding:2px 3px;border:1px solid #d6a3ff;border-radius:4px;background:#342047;color:#f5e7ff;font-size:12px;line-height:1.2;font-weight:700;white-space:nowrap}
.creator-compact .avatar-preview .pixel-preview{width:25%;max-width:90px}
.creator-compact .avatar-preview #hero-portrait{width:100%;height:calc(100% - 18px);min-height:0;object-fit:contain;image-rendering:auto}
.creator-compact .avatar-preview canvas{width:auto;max-width:100%;height:calc(100% - 18px);max-height:144px;object-fit:contain}
.creator-compact .avatar-preview figcaption{font-size:12px;line-height:18px;flex:none}
.creator-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.creator-tabs button{font-size:14px;font-weight:700;padding:8px;min-height:44px;border-radius:9px}
.creator-tabs .active{background:#ffd2e3;color:#452238;border-color:#ffd2e3}
.creator-settings{display:grid;grid-template-rows:repeat(4,44px);gap:4px;min-width:0}
.creator-name{display:flex;align-items:center;gap:8px;margin:0;font-size:14px;color:var(--text)}
.creator-name input{margin:0;min-height:44px;height:44px;font-size:16px;flex:1;min-width:0}
.creator-settings .segmented{flex-wrap:nowrap;gap:6px}
.creator-settings .segmented button{min-height:44px;font-size:14px;padding:8px}
.creator-part{display:grid;grid-template-columns:52px 44px minmax(0,1fr) 44px;gap:4px;align-items:center}
.creator-part b{font-size:14px;font-weight:500;color:var(--muted)}
.creator-part button{min-width:44px;height:44px;font-size:24px;padding:0;line-height:1}
.creator-part span{font-size:14px;line-height:1.2;text-align:center;overflow-wrap:anywhere}
.creator-tip{margin:0;align-self:center;font-size:12px;line-height:1.45;color:var(--muted);grid-column:1/-1}
.creator-footer{display:grid;gap:5px}
.creator-actions{display:grid;grid-template-columns:64px minmax(0,1fr);gap:8px}
.creator-actions button{min-height:44px;font-size:14px;padding:8px 4px}
.creator-actions .primary{font-size:16px;font-weight:700}
.creator-footer p{font-size:12px;line-height:1.4;color:var(--muted);margin:0;text-align:center}
@media(max-height:480px) and (max-width:599px){.creator.creator-compact{padding:5px 10px;gap:4px}.creator-heading{min-height:24px}.creator-heading h2{font-size:18px}.creator-heading>span{display:none}.creator-compact .avatar-preview figcaption{display:none}.creator-compact .avatar-preview #hero-portrait,.creator-compact .avatar-preview canvas{height:100%}.creator-footer{gap:3px}}
@media(min-width:600px) and (max-height:650px){.creator.creator-compact{max-width:950px;grid-template-columns:minmax(180px,1fr) minmax(320px,1.2fr);grid-template-rows:28px 44px minmax(188px,1fr) auto;gap:8px 18px}.creator-heading{grid-column:1/-1}.creator-compact .avatar-preview{grid-column:1;grid-row:2/5}.creator-tabs{grid-column:2;grid-row:2}.creator-settings{grid-column:2;grid-row:3;align-content:center}.creator-footer{grid-column:2;grid-row:4}}

@media(max-width:599px){.creator-compact:has(#hero-name:focus){grid-template-rows:auto 44px 44px 188px auto;align-content:start}}

@media(min-width:600px) and (max-height:380px){.creator.creator-compact{grid-template-rows:44px minmax(44px,1fr) auto;padding:6px 12px}.creator-heading{grid-column:1;grid-row:1}.creator-heading h2{font-size:18px}.creator-heading>span{display:none}.creator-compact .avatar-preview{grid-row:2;grid-column:1}.creator-tabs{grid-row:1;grid-column:2}.creator-settings{grid-row:2/4;grid-column:2;align-self:center}.creator-footer{grid-row:3;grid-column:1}.creator-actions .primary{font-size:14px}.creator-footer p{font-size:12px}}

/* Collection and atlas artwork keep the game inside the existing mobile viewport. */
.card-art .atlas-art{position:absolute;inset:0;z-index:-1;background-repeat:no-repeat;pointer-events:none}
.rarity-badge{position:absolute;right:4px;top:5px;padding:2px 5px;background:#36254ce8;border:1px solid #ffe6a2;color:#ffe6a2;border-radius:5px;font-size:12px;font-weight:800}
.limited-art{box-shadow:inset 0 0 0 1px #ffe3a6,0 0 10px #bf8dcb33}
.collection-progress{display:grid;gap:9px;padding:16px;background:#30263e;border:1px solid #bb819c;border-radius:12px;margin-bottom:12px;font-size:16px}
.collection-progress progress{width:100%;height:12px;accent-color:#ffacd0}.collection-progress span{font-size:14px}.collection-filters{display:flex;gap:7px;flex-wrap:wrap;margin:18px 0}.collection-filters button{font-size:14px;min-height:42px;padding:8px 11px}.collection-titles{padding:12px;border:1px solid #665369;border-radius:9px}.collection-titles p{margin:12px 0}.collection-titles small,.card-grid small{font-size:12px}.unregistered .atlas-art,.unregistered .card-art img{filter:grayscale(1);opacity:.25}.pack-choice{padding:16px;border:1px solid #846185;border-radius:12px;margin:14px 0;background:#292135}.pack-choice h3{margin:0 0 10px}.forge-math{padding:14px;border:1px solid #b1869b;border-radius:10px;margin:14px 0}.forge-math p{font-size:14px;margin:8px 0}details>summary{min-height:40px;cursor:pointer;font-size:14px}details p{font-size:14px;margin-top:10px}.card-grid article{min-width:0}.card-grid small{display:block;overflow-wrap:anywhere}

/* Compact touch controls, full-height menus and a non-scrolling detail header. */
.joystick{width:126px;height:126px}.stick-knob{left:calc(50% - 28px);top:calc(50% - 28px);width:56px;height:56px}.control-dock:not(.duel-dock){height:calc(146px + env(safe-area-inset-bottom))}.dock-label{display:none}
.hand-card,.unit{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.unit{touch-action:manipulation}
.detail-backdrop{padding:10px;align-items:stretch}.detail-card{width:min(100%,480px);height:100%;padding:0;display:flex;flex-direction:column;overflow:hidden;text-align:left}.detail-top{flex:none;display:flex;align-items:center;justify-content:space-between;padding:10px 14px;gap:12px;background:#3c2d47;border-bottom:1px solid #896a88}.detail-top button{min-height:44px;min-width:78px}.detail-content{overflow:auto;overscroll-behavior:contain;min-height:0;padding:16px}.detail-content>.card-art{width:min(180px,35vh);height:auto;margin:0 auto 16px}.detail-content p{font-size:16px;line-height:1.75}.detail-content small{font-size:14px}
.menu-open .panel-backdrop{padding:8px}.compact-menu{height:100%;max-height:100%;max-width:760px}.compact-menu .panel-content{flex:1;display:flex;flex-direction:column;overflow:hidden;padding:10px 14px;gap:8px}.menu-profile{display:flex;align-items:center;gap:12px;flex:none}.menu-profile img{width:44px;height:52px;object-fit:cover}.menu-profile h2{font-size:18px;margin:0}.menu-profile p{font-size:14px;margin:2px 0;line-height:1.35}.menu-profile small{font-size:12px}.compact-menu .menu-grid{flex:1;min-height:0;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(6,minmax(44px,1fr));gap:8px;margin:0}.compact-menu .menu-grid button{min-height:44px;min-width:0;padding:8px;font-size:14px;text-align:center;line-height:1.25}.menu-save-info{flex:none;font-size:12px;line-height:1.3;margin:0;text-align:center;overflow-wrap:anywhere}
@media(min-width:600px),(max-height:570px){.compact-menu .menu-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(4,minmax(44px,1fr))}.compact-menu .panel-top{padding:6px 10px}.menu-profile img{height:42px;width:36px}.menu-profile h2{font-size:16px}.menu-profile p{font-size:13px}.compact-menu .panel-content{padding:8px;gap:6px}.compact-menu .menu-grid{gap:6px}}
@media(max-height:380px) and (min-width:540px){.compact-menu .panel-content{display:grid;grid-template-columns:140px minmax(0,1fr);grid-template-rows:minmax(0,1fr) 16px}.menu-profile{grid-column:1;grid-row:1;flex-direction:column;justify-content:center}.compact-menu .menu-grid{grid-column:2;grid-row:1;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(3,minmax(44px,1fr))}.menu-save-info{grid-column:1/-1;grid-row:2}}
@media(max-width:359px){.control-dock{padding-left:10px;padding-right:10px;gap:6px}.dock-buttons{gap:6px}.dock-button{width:66px}.joystick{width:120px;height:120px}}

@media(max-height:430px) and (max-width:539px){.compact-menu .menu-grid{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(3,minmax(44px,1fr));gap:4px}.compact-menu .menu-grid button{padding:4px}.menu-profile img,.menu-profile small{display:none}.menu-profile h2{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.menu-profile>div{min-width:0}.compact-menu .panel-content{gap:4px;padding:6px}.compact-menu .panel-top{padding:4px 8px}.menu-save-info{font-size:12px}.menu-open .panel-backdrop{padding:4px}}
:root{--sound-accent:#ffd0df}.title-sound{position:absolute;right:12px;top:12px;min-width:60px;min-height:44px;font-size:14px;z-index:3;background:#292035e8}.panel-top>span{margin-left:auto}.panel-top>[data-action="sound-settings"]{margin-left:auto;min-height:40px;font-size:14px;padding:6px 12px}.sound-backdrop{position:fixed;inset:0;z-index:85;display:flex;align-items:center;justify-content:center;background:#100e1bee;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}.sound-panel{width:min(100%,420px);max-height:100%;display:flex;flex-direction:column;overflow:hidden;background:#282033;border:1px solid #a87e9c;border-radius:16px;box-shadow:0 14px 50px #0007}.sound-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-bottom:1px solid #695065;flex:none}.sound-top h2{font-size:20px;margin:0}.sound-top button{min-height:44px}.sound-body{padding:18px;overflow:auto;min-height:0}.sound-body #sound-status{font-size:14px;line-height:1.5;min-height:42px;margin:0 0 14px;color:var(--sound-accent)}.sound-slider{margin:12px 0 18px;font-size:16px;color:#fff4eb}.sound-slider>span{display:flex;align-items:center;justify-content:space-between}.sound-slider output{font-size:14px;font-variant-numeric:tabular-nums;color:#ffd0df}.sound-slider input{padding:0;border:0;height:44px;margin:0;accent-color:#ffafc3;background:transparent;cursor:pointer;touch-action:pan-x}.sound-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.sound-actions button{font-size:14px;min-height:44px}.sound-actions [data-action="sound-mute"]{grid-column:1/-1}.sound-note{font-size:12px;line-height:1.6;color:var(--muted);margin:14px 0 0}@media(max-height:500px){.sound-panel{width:min(100%,560px)}.sound-top{padding:8px 14px}.sound-body{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px;padding:12px 16px}.sound-body #sound-status{grid-column:1/-1;min-height:0;margin:0}.sound-slider{margin:0}.sound-actions{grid-column:1/-1;grid-template-columns:1.4fr 1fr 1fr}.sound-actions [data-action="sound-mute"]{grid-column:auto}.sound-note{grid-column:1/-1;margin:0;font-size:11px}}

/* Card gestures own touch input; horizontal closet scrolling is handled by the same pointer gesture. */
.duel-screen .hand,.duel-screen .hand-card,.duel-screen .unit{touch-action:none}.duel-screen .hand-card,.duel-screen .unit,.duel-screen .card-art,.drag-ghost{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.duel-screen .card-art img,.drag-ghost img{-webkit-user-drag:none;pointer-events:none}.drag-ghost,.drag-ghost *{pointer-events:none!important}

/* Image failures keep controls and progress usable while the same art is retried. */
[hidden]{display:none!important}
img[data-image-state="loading"],img[data-image-state="error"],.avatar-face:not([src]),.hero-card-face:not([src]),#hero-portrait:not([src]){visibility:hidden}
.map-loading{gap:12px;text-align:center;padding:24px;z-index:18;flex-direction:column;justify-content:center;align-items:center}
.map-loading p{margin:0}.map-loading small{display:block}.map-loading button{min-height:44px}
.image-retry-button{font-size:11px;min-height:36px;padding:7px 9px;border-color:#e9b18c;color:#ffe3c7;flex:none}
.game-screen>.image-retry-button{position:absolute;right:8px;top:48px;z-index:21;box-shadow:0 2px 12px #0008}
.detail-top .image-retry-button{margin-left:auto}.detail-top b{flex-shrink:1}
.card-art:has([data-image-state="error"])::after{content:'画像を再読み込み';position:absolute;top:40%;left:3px;right:3px;text-align:center;font-size:9px;color:#ffe3c7;pointer-events:none}

.title-art::after{content:"";position:absolute;inset:0;background:linear-gradient(#22223588,#171727dd)}
.panel-top:has(.image-retry-button:not([hidden]))>span{display:none}
.opening-screen{height:100%;display:flex;flex-direction:column;position:relative;overflow:hidden;background:#121323;color:#fff1e7}.opening-backdrop{position:absolute;inset:0;background-size:cover;background-position:center;opacity:.12;filter:blur(2px)}.opening-screen>header{position:relative;flex:none;text-align:center;padding:24px 12px 15px;background:linear-gradient(#121323,transparent);z-index:2}.opening-screen>header small{display:block;letter-spacing:.2em;font-size:12px;color:#e5afca;margin-bottom:8px}.opening-screen>header b{font-size:18px}.opening-window{position:relative;flex:1;min-height:0;overflow:hidden;mask-image:linear-gradient(transparent,#000 9%,#000 89%,transparent);container-type:size}.opening-crawl{margin:0 auto;max-width:520px;padding:0 28px;animation:opening-rise 85s linear both;will-change:transform}.opening-crawl section{padding:20px 0 65px;text-align:center}.opening-crawl h2{font-size:23px;line-height:1.6;color:#ffbdcf;margin:0 0 24px}.opening-crawl p{font-size:18px;line-height:2.2;letter-spacing:.045em;margin:0;white-space:normal}.opening-final{text-align:center;padding:20px 0 60px}.opening-screen>footer{position:relative;z-index:3;display:flex;gap:8px;flex-wrap:wrap;justify-content:center;padding:15px 12px max(16px,env(safe-area-inset-bottom));background:#171525}.opening-screen>footer button{font-size:14px;min-height:44px;padding:10px 12px}.opening-screen>footer .primary{flex:1;max-width:230px}@keyframes opening-rise{from{transform:translateY(50vh)}to{transform:translateY(-100%)}}@supports(height:1cqh){@keyframes opening-rise{from{transform:translateY(90cqh)}to{transform:translateY(-100%)}}}
.lesson-backdrop{padding:8px;background:#151321eb;z-index:30}.lesson-modal{display:flex;flex-direction:column;width:100%;max-width:600px;max-height:100%;height:100%;min-height:0;border:1px solid #b987a5;border-radius:14px;background:#261f32;overflow:hidden}.lesson-top,.lesson-controls{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;flex:none;background:#31273f}.lesson-top span{font-size:13px;color:#e6c3d8}.lesson-top button{min-height:44px;white-space:nowrap;font-size:14px}.lesson-content{flex:1;min-height:0;overflow:auto;padding:14px 18px}.lesson-mother{display:flex;align-items:center;gap:14px}.lesson-mother img{width:65px;height:80px;object-fit:cover;object-position:top;border-radius:10px;flex:none}.lesson-mother small{color:#e7b2cf;font-size:13px}.lesson-mother h2{font-size:18px;line-height:1.5;margin:4px 0}.lesson-explanation{font-size:16px;line-height:1.8;margin:12px 0}.lesson-card{display:flex;align-items:center;gap:18px;margin:18px auto;max-width:420px}.lesson-card>.card-art{width:120px;height:180px;flex:none}.lesson-card p{font-size:14px;line-height:1.7}.lesson-note{padding:14px;border:1px solid #83637b;border-radius:10px;font-size:14px;line-height:1.8}.lesson-zones{display:grid;grid-template-columns:1fr 1fr;gap:10px}.lesson-zones>div{padding:12px;background:#382c45;border-radius:8px}.lesson-zones dt{font-size:15px;color:#ffd0e5}.lesson-zones dd{margin:7px 0 0;font-size:14px}.lesson-controls button{min-height:46px;font-size:14px}.lesson-controls .primary{flex:1}.lesson-table{padding:9px;border-radius:10px;background:#181725;border:1px solid #674b64}.lesson-lp{display:flex;align-items:center;justify-content:space-between;font-size:14px;gap:10px}.lesson-lp span{font-size:12px;color:#d6bed6}.lesson-stage{height:82px;display:flex;align-items:center;justify-content:center;border:1px dashed #68506c;border-radius:8px;margin:7px 0;color:#b89eb9;font-size:13px;gap:10px}.lesson-unit{position:relative;height:70px;width:47px}.lesson-unit .card-art{height:100%;width:100%}.lesson-unit>span{position:absolute;bottom:-4px;left:50%;transform:translateX(-50%);padding:2px 4px;background:#482f48;color:white;border-radius:4px;font-size:11px;white-space:nowrap}.lesson-hand{display:flex;gap:6px;justify-content:center;margin-top:9px;height:68px;overflow:hidden}.lesson-hand>div{height:100%;width:44px;flex:none}.lesson-hand .card-art{height:100%;width:100%}.lesson-table .card-name{font-size:7px}.lesson-table .card-type,.lesson-table .card-cost{font-size:6px}.lesson-table .card-type{height:12px}.lesson-table .card-name{bottom:11px;padding:7px 0 2px}.lesson-controls{padding-bottom:max(10px,env(safe-area-inset-bottom))}@media(max-height:700px){.lesson-mother img{width:45px;height:55px}.lesson-mother h2{font-size:16px}.lesson-content{padding:10px 12px}.lesson-explanation{font-size:14px;line-height:1.7;margin:9px 0}.lesson-stage{height:65px;margin:5px 0}.lesson-unit{height:56px;width:38px}.lesson-hand{height:52px}.lesson-hand>div{width:34px}.opening-screen>header{padding:16px 10px 8px}.opening-crawl h2{font-size:21px}}

/* Keep diagnostics inside the map viewport; the retry control stays above them. */
.map-loading details{max-width:100%;max-height:35%;overflow:auto;overflow-wrap:anywhere;font-size:12px}.map-loading details small{padding-top:8px;text-align:left}

.connection-backdrop{position:absolute;inset:0;z-index:100;background:#151522f5;display:flex;align-items:center;justify-content:center;padding:20px}.connection-box{max-width:420px;max-height:100%;overflow:auto;display:flex;flex-direction:column;gap:12px;text-align:center}.connection-box h2,.connection-box p{margin:0}.connection-box p{font-size:14px}.connection-box button,.connection-box a{min-height:44px;flex-shrink:0}.connection-box small{font-size:12px}

/* v31: stay within the phone viewport; full-bleed illustrations keep one fixed close control. */
.title-options .sign-in-button{display:block;text-align:center;text-decoration:none;border-radius:14px;padding:14px;font-weight:700}
.enemy-closet{height:25px;position:relative;max-width:210px;overflow:hidden;margin-top:3px}.enemy-closet img{position:absolute;width:16px;height:24px;object-fit:cover;border:1px solid #e9b4db;border-radius:2px;transform:translateX(-1px)}.enemy-closet small{font-size:12px}
.duel-status{min-height:87px}.duel-status .fighter-face{align-self:center}
.art-viewer{position:fixed;inset:0;z-index:90;background:#09070c;display:flex;align-items:center;justify-content:center;padding:0}.illustration-only{display:block;max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain}.illustration-atlas{height:min(100dvh,150vw);width:min(100vw,66.666dvh);background-repeat:no-repeat;flex:none;aspect-ratio:2/3}.art-close{position:absolute;right:max(10px,env(safe-area-inset-right));top:max(10px,env(safe-area-inset-top));width:48px;height:48px;border:1px solid #fff9;border-radius:50%;background:#17121edb;color:#fff;font-size:28px;z-index:2}.art-viewer>.image-retry-button{position:absolute;bottom:12px;left:12px}
@media(orientation:landscape) and (max-height:500px){.duel-status{min-height:58px}.enemy-closet{height:16px;margin:0}.enemy-closet img{height:16px;width:11px}.duel-status .zone-counts{display:none}}

/* v32: three entry choices and a compact, explicit program indicator. */
.title-options{display:grid;grid-template-columns:1fr;max-width:370px;gap:10px;margin:20px auto 12px}.title-options .sign-in-button{min-height:48px;padding:12px}
.save-manager{height:100%;padding:24px;display:flex;flex-direction:column;justify-content:center;gap:14px;max-width:650px;margin:auto;overflow:auto}.save-manager header{display:flex;align-items:center;justify-content:space-between;gap:10px}.save-manager p{margin:0}.save-manager button,.save-manager a{flex-shrink:0;min-height:44px}.save-manager small{font-size:13px}
.program-status{flex:none;min-height:38px;text-align:center}.program-status ol{display:flex;list-style:none;padding:0;margin:0;justify-content:space-between;gap:3px}.program-status li{font-size:11px;padding:3px;border-radius:4px;color:#cbb9cd}.program-status li[aria-current]{background:#ffa2bf;color:#271633;font-weight:bold}.program-status small{font-size:10px}
@media(max-height:500px) and (min-width:650px){.program-status{grid-column:1/3;grid-row:3;position:absolute;bottom:65px;left:10px;right:10px;background:#251f31}.turn-line{padding-bottom:40px}.title-copy h1{font-size:24px}.title-options{margin:8px auto;gap:5px}.title-options .sign-in-button{min-height:36px;padding:7px}}
/* v33: physical stores, compact singles, and a five-card opening stage. */
.shop-heading h2{font-size:20px;margin:4px 0 8px}.shop-heading{position:relative}.shop-heading>b{color:var(--gold)}.shop-help{font-size:14px;margin:10px 0}.shop-services{display:grid;gap:12px;margin:22px 0}.shop-services button{min-height:52px;font-size:16px}.pack-store{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}.pack-store article{display:flex;flex-direction:column;align-items:stretch;text-align:center;padding:10px;border:1px solid #795270;border-radius:16px;background:linear-gradient(155deg,#38223e,#1a2136)}.pack-store h3{font-size:16px;line-height:1.4;margin:6px 0}.pack-store p{font-size:14px;margin:5px 0}.pack-store small{font-size:12px;margin:5px 0 10px}.pack-store button{font-size:14px;padding:10px 5px;min-height:44px;margin-top:7px}.booster-art{width:100%;height:clamp(100px,25dvh,220px);object-fit:contain;filter:drop-shadow(0 5px 8px #08031280)}.pack-odds{font-size:14px}.shop-filters{display:flex;flex-wrap:wrap;gap:5px;margin:10px 0}.shop-filters button{font-size:14px;padding:7px 10px;min-height:40px}.shop-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.shop-card-grid article{min-width:0;display:flex;flex-direction:column;gap:5px;text-align:center}.shop-card-grid .art-button{padding:0;display:block;width:100%;border:0;background:none}.shop-card-grid .card-art{width:100%;max-height:170px;aspect-ratio:2/3}.shop-card-grid .card-name{font-size:11px;line-height:1.2}.shop-card-grid .card-type{font-size:9px}.shop-card-grid .card-cost{font-size:10px}.shop-card-grid article>button:last-child{padding:8px 2px;font-size:12px;min-height:40px}.shop-card-grid small{font-size:12px}.shop-pagination{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px}.shop-pagination button{min-height:44px}.growth-summary{padding:15px;border:1px solid #a16a87;border-radius:12px;background:#39283e}.growth-summary>b{font-size:20px;color:var(--pink)}.growth-summary p{line-height:1.7}.growth-power{align-items:center}.growth-power>div{min-width:0}.growth-power>button{flex:none;max-width:116px;white-space:normal;font-size:14px}.growth-power strong{font-size:14px;color:var(--gold)}
.panel-modal.pack-modal{height:100%;max-height:100%;max-width:860px}.pack-modal .panel-content{min-height:0;flex:1;overflow:auto;padding:12px}.pack-modal:has(.pack-opening-screen) .panel-content{overflow:hidden;display:flex}.pack-opening-screen{position:relative;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:10px;width:100%;min-height:0;height:100%}.pack-opening-screen h2{font-size:18px;margin:3px 0}.pack-opening-screen header p{margin:3px 0;font-size:13px}.pack-opening-screen header small{font-size:12px;color:var(--gold)}.pack-five{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:12px 8px;min-height:0;align-items:stretch}.pack-result{min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;gap:4px}.pack-result>.art-button,.pack-result>.pack-card-back{flex:1;min-height:0;width:100%;max-width:180px;padding:0;background:none;border:0;position:relative;display:block;overflow:hidden}.pack-result .card-art{height:100%;width:100%;min-height:0;aspect-ratio:auto;max-height:none}.pack-result .card-art>img{object-fit:cover}.pack-result .card-name{font-size:12px;line-height:1.2}.pack-result .card-type{font-size:9px}.pack-result .card-cost{font-size:11px}.pack-result>small{font-size:12px;color:#ffe7ad;height:16px;flex:none}.pack-card-back{border:1px solid #a96fa2!important;border-radius:10px!important}.pack-card-back img{width:100%;height:100%;object-fit:cover}.pack-card-back span{position:absolute;inset:auto 0 12px;background:#20122bd9;padding:8px 2px;font-size:12px}.pack-result.face-up>.art-button{animation:pack-card-flip .36s ease-out both}.pack-opening-screen footer button{min-height:44px}.pack-opening-animation{position:absolute;z-index:10;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;background:radial-gradient(ellipse,#67455beF,#171222fa);overflow:hidden;border-radius:16px}.tearing-pack{height:65%;width:65%;animation:pack-tear 1.45s ease-in forwards}.tearing-pack .booster-art{height:100%;max-height:500px}.pack-opening-animation strong{font-size:32px;letter-spacing:.2em;color:#fff6d6;text-shadow:0 0 16px #ffd88b}.pack-opening-animation button{position:absolute;bottom:14px;min-height:44px}.pack-flash{position:absolute;width:50%;height:50%;background:#fff5cb;border-radius:50%;filter:blur(28px);animation:pack-flash 1.45s ease-in forwards;pointer-events:none}@keyframes pack-tear{0%{transform:scale(.8) rotate(-5deg);opacity:1}30%{transform:scale(1.02) rotate(3deg)}48%{transform:rotate(-3deg)}62%{transform:rotate(3deg)}75%{transform:scale(1.07);filter:brightness(1.6)}100%{transform:translateY(-45px) scale(1.16);opacity:0;clip-path:inset(0 0 100% 0)}}@keyframes pack-flash{0%,65%{opacity:0;transform:scale(.1)}80%{opacity:1}100%{opacity:0;transform:scale(5)}}@keyframes pack-card-flip{from{transform:rotateY(90deg);filter:brightness(1.8)}to{transform:rotateY(0);filter:brightness(1)}}
@media(max-height:600px) and (min-width:500px){.pack-five{grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:minmax(0,1fr)}.pack-opening-screen h2{font-size:16px}.pack-store .booster-art{height:110px}.pack-store article{padding:6px}.pack-store{gap:8px}}
@media(max-width:360px){.shop-card-grid{gap:7px}.pack-five{gap:7px 5px}.pack-modal .panel-content{padding:8px}.pack-result .card-name{font-size:10px}.growth-power{flex-wrap:wrap}.growth-power>button{max-width:none;width:100%}}
@media(prefers-reduced-motion:reduce){.tearing-pack,.pack-flash,.pack-result.face-up>.art-button{animation:none}.pack-opening-animation{display:none}}

.single-card-modal .shop-filters{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}.single-card-modal .shop-filters button{font-size:12px;padding:8px 1px}.single-card-modal .shop-help{font-size:12px;line-height:1.5;margin:7px 0}
@media(max-height:680px){.pack-store article{padding:7px}.pack-store .booster-art{height:clamp(80px,20svh,130px)}.pack-store h3{font-size:14px;margin:5px 0;min-height:40px}.pack-store p{line-height:1.35;font-size:13px;margin:3px 0}.pack-store small{margin:3px 0}.pack-store button{padding:8px 4px;font-size:13px;margin-top:6px}}
/* v34: one voice per bubble; choices use the open map area above it. */
.conversation-open .map-objective{display:none}
#dialogue-layer{position:absolute;inset:0;pointer-events:none;z-index:15}
.conversation{position:absolute;inset:54px 12px 12px;display:flex;flex-direction:column;gap:12px;pointer-events:none}
.conversation-space{flex:1;min-height:0;display:flex;align-items:flex-end;justify-content:flex-end}
.conversation-choices{pointer-events:auto;display:flex;flex-direction:column;gap:7px;width:min(280px,85%);padding:10px;border:1px solid #d5abc3;border-radius:12px;background:#231c32f5;box-shadow:0 5px 20px #0007}
.conversation-choices button{width:100%;min-height:40px;text-align:left;font-size:14px;padding:8px 10px;line-height:1.4;white-space:normal}
.conversation-choices small{font-size:12px;color:#f2d1e1}
.conversation-choices .choice-page{min-height:32px;font-size:12px;background:#211e2c;color:#d9bad3;text-align:center}
.conversation-reading{flex:none;pointer-events:auto}
.speech-row{display:flex;align-items:flex-end;gap:12px;min-width:0}
.dialogue-portrait,.speech-row .avatar-face{flex:none;width:72px;height:100px;object-fit:cover;object-position:50% 12%;border-radius:10px;background:#392640;border:1px solid #ac759d;image-rendering:auto}
.speech-bubble{position:relative;flex:1;min-width:0;background:#fff6fc;color:#332239;border:2px solid #e9a8c5;border-radius:18px;padding:12px 14px;box-shadow:0 5px 18px #0006}
.speech-bubble:before{content:'';position:absolute;left:-10px;bottom:27px;width:16px;height:16px;background:#fff6fc;border-left:2px solid #e9a8c5;border-bottom:2px solid #e9a8c5;transform:rotate(45deg)}
.speech-bubble b{display:block;color:#9d3765;font-size:14px;margin-bottom:6px}
.speech-bubble p{font-size:16px;line-height:1.65;margin:0;overflow-wrap:anywhere}
.speaker-mark{font-size:34px;width:54px;text-align:center;color:#ffd4e7}
.narration-panel{border-radius:4px;border-left:3px solid #bbadc7;background:#181b2af5;padding:16px;color:#f4eaf7;box-shadow:0 5px 18px #0008}
.narration-panel p{margin:0;font-size:16px;line-height:1.7}
.conversation-controls{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:10px}
.conversation-controls small{margin-right:auto;background:#191b2cee;border-radius:6px;padding:5px 7px;font-size:12px}
.conversation-controls button{font-size:14px;min-height:40px;box-shadow:0 4px 12px #0004}
.monster-status{height:68px;flex:none}.monster-status p{margin:3px 0;font-size:13px}.monster-status b{font-size:14px}.monster-status .fighter-face{height:60px;width:58px;object-fit:contain}
.temptation-unit .unit-cp{background:#483065;border-color:#dbc4ff}
.lesson-explanation.speech-bubble{margin-left:10px;color:#332239;font-size:16px}
@media(max-width:360px){.conversation{inset:48px 9px 9px;gap:8px}.dialogue-portrait,.speech-row .avatar-face{width:52px;height:78px}.speech-row{gap:10px}.speech-bubble{padding:10px}.speech-bubble p,.narration-panel p{font-size:15px;line-height:1.55}.conversation-choices{gap:5px;padding:8px}.conversation-choices button{min-height:36px;font-size:13px}}
@media(max-height:480px){.conversation-choices{width:min(310px,100%);gap:4px;padding:7px}.conversation-choices button{min-height:32px;padding:5px 9px}.conversation{gap:7px}.speech-bubble p,.narration-panel p{line-height:1.45}.conversation-controls{margin-top:6px}.conversation-controls button{min-height:34px;padding:6px 10px}}
/* Story expansion: compact battle reveals, home streaming and No.1 records. */
.opponent-card-reveal{position:absolute;inset:0;z-index:35;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:#160f28e8;padding:12px;pointer-events:none;text-align:center}.opponent-card-reveal>.card-art,.inspect-played-card{width:min(120px,28vh);height:auto;max-height:none;aspect-ratio:2/3;flex:none;box-shadow:0 0 28px #ffd17166;animation:opponent-reveal 1.2s ease both}.inspect-played-card{pointer-events:auto;padding:0;border:0;border-radius:12px;background:transparent;cursor:pointer}.inspect-played-card .card-art{width:100%;height:100%}.inspect-played-card:focus-visible{outline:3px solid #fff;outline-offset:5px}.opponent-card-reveal>p{font-size:12px;line-height:1.5;max-width:340px;max-height:24%;overflow:hidden;margin:0}.opponent-card-reveal>small{color:#ffda94}.leader-marks{display:grid;grid-template-columns:1fr 1fr;gap:8px}.leader-marks span{font-size:12px;padding:9px;background:#292538;border:1px solid #50425d;border-radius:10px;color:#aa9bae}.leader-marks .earned{color:#ffdc8b;border-color:#b79859;background:#3a2d36}.star-stats{margin:18px 0;padding:12px;border:1px solid #79566d;border-radius:15px}.stream-options{display:grid;gap:10px;margin:15px 0}.stream-options button{text-align:left;padding:13px 15px;display:grid;gap:5px}.stream-options small{font-size:11px;opacity:.8}.stream-on-air{color:#ff90ad;background:#431d38;padding:12px;border-radius:12px}.superchat-receipt{display:grid;gap:8px;text-align:center;padding:20px 8px;background:linear-gradient(130deg,#8b3b5c,#4e3b78);border:1px solid #ffb5ce;border-radius:18px}.superchat-receipt strong{font-size:24px;color:#fff3ae}.superchat-receipt p{margin:0;font-size:12px}@keyframes opponent-reveal{0%{opacity:0;transform:translateY(20px) scale(.9)}18%,85%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:0;transform:scale(1.04)}}
/* v37: the entire three-reply broadcast fits inside the game viewport. */
.streaming-modal {height:100%;max-height:100%;display:flex;flex-direction:column;overflow:hidden}
.streaming-modal .panel-content {padding:10px 12px;overflow:hidden;min-height:0;display:flex;flex:1}
.stream-screen {width:100%;min-height:0;display:flex;flex-direction:column;gap:8px}
.stream-title {display:flex;justify-content:space-between;align-items:center;gap:8px;flex-shrink:0}
.stream-title h2 {font-size:20px;margin:2px 0}
.stream-title small,.stream-title>span {font-size:10px;color:#d8bed4}
.stream-title>span {text-align:right;line-height:1.6}
.stream-monitor {background:#141a29;border:5px solid #453d55;border-bottom-width:13px;border-radius:13px;box-shadow:0 5px 0 #1b1525;display:flex;flex:1;min-height:0;flex-direction:column;overflow:hidden}
.monitor-bar {display:flex;align-items:center;gap:6px;padding:9px 10px;background:#2c283c;flex-shrink:0;font-size:11px}
.monitor-bar small {margin-left:auto;font-size:9px;color:#dcc9e5}
.live-light {width:7px;height:7px;border-radius:50%;background:#ff86b7;box-shadow:0 0 9px #ff86b7}
.monitor-feed {flex:1;min-height:32px;overflow:auto;padding:6px 11px;display:flex;flex-direction:column;justify-content:flex-end;gap:8px;background:linear-gradient(160deg,#152332,#241b36)}
.monitor-feed p {margin:0;display:flex;gap:8px;font-size:14px;line-height:1.45;flex-shrink:0}
.monitor-feed b {color:#9cded7;font-size:10px;min-width:60px;max-width:60px;overflow-wrap:anywhere}
.monitor-feed .viewer-reply {opacity:.65;font-size:11px}
.stream-question {padding:8px 11px 0;flex-shrink:0}
.stream-question small {font-size:9px;letter-spacing:.1em;color:#ffc591}
.stream-question p {font-size:14px;line-height:1.5;margin:4px 0 7px}
.stream-screen .stream-options {display:grid;grid-template-columns:1fr;gap:6px;padding:3px 9px 7px;margin:0;flex-shrink:0}
.stream-screen .stream-options button {min-height:40px;padding:8px 10px;text-align:left;font-size:14px;line-height:1.35;border:1px solid #6e536f;background:#392f49;color:#fff5fa;border-radius:8px;white-space:normal}
.stream-screen .stream-options button:active {background:#655071}
.stream-screen .stream-options button b {font-size:13px;display:block}
.stream-screen .stream-options button small {display:block;font-size:10px;color:#eac4dc;margin-top:4px}
.stream-rounds {display:flex;align-items:center;gap:5px;padding:0 11px 7px;flex-shrink:0}
.stream-rounds i {width:15px;height:4px;border-radius:5px;background:#5f546b}
.stream-rounds i.done {background:#9cded7}.stream-rounds i.current {background:#ff9bbe}
.stream-rounds small {margin-left:auto;font-size:9px;color:#d7c0d7}
.stream-welcome {flex:1;min-height:0;padding:10px;display:flex;align-items:center;justify-content:center;text-align:center}
.stream-welcome p {font-size:12px;line-height:1.6;margin:0}
.coin-receipt {display:flex;flex-direction:column;gap:7px}
.coin-receipt small {font-size:11px;color:#ffe298}.coin-receipt strong {color:#ffb4d1;font-size:20px}.coin-receipt span {font-size:10px}
.stream-footnote {font-size:10px;line-height:1.5;text-align:center;margin:1px 7px 8px;flex-shrink:0;color:#c5bdd1}
.stream-save-note {font-size:9px;text-align:center;color:#c6afc9;flex-shrink:0}
.side-events article {padding:12px;margin:10px 0;border:1px solid #745967;border-radius:10px;background:#382e42}
.side-events article p {margin:7px 0;font-size:13px}.side-events article small {color:#f0c896}
.fx-up .fx-origin {color:#b8ffdf;text-shadow:0 0 18px #5bd2b6}.fx-up .fx-origin i {border-color:#9ceaca}
@media(max-height:540px){.streaming-modal .panel-content{padding:6px 9px}.stream-title h2{font-size:16px}.stream-title small{display:none}.stream-screen{gap:5px}.monitor-feed{gap:4px;padding:4px 8px}.monitor-feed p{font-size:13px}.stream-question{padding-top:5px}.stream-question p{font-size:13px;margin:2px 0 4px}.stream-screen .stream-options button{min-height:36px;padding:6px 9px}.stream-screen .stream-options{gap:4px}.stream-footnote{font-size:9px}.coin-receipt{gap:3px}.coin-receipt strong{font-size:17px}}
@media(max-height:540px){.streaming-modal .panel-top{padding:5px 8px}.streaming-modal .panel-top button{padding:5px 8px;min-height:30px;font-size:12px}.stream-save-note{display:none}.streaming-modal .monitor-feed{min-height:82px;justify-content:flex-start}.monitor-feed .viewer-reply{display:none}.stream-rounds{padding-bottom:4px}}

.setting-choice{display:flex;align-items:center;gap:12px;padding:14px 10px;margin:8px 0;border:1px solid #79566d;border-radius:12px;font-size:16px}.setting-choice input{width:20px;height:20px;accent-color:#f575a9}.setting-choice select{margin-left:auto;min-height:38px;background:#35243f;color:#fff;border:1px solid #a977a3;border-radius:8px;padding:5px 10px}

.played-card-name{flex:none;text-align:center;padding:4px 8px;font-size:12px;line-height:1.4;color:#edcfe4;background:#251b31}.played-card-name strong{color:#fff}

.evolved-card{width:180px;height:270px;margin:16px auto}.evolved-card .card-art{width:100%;height:100%}

/* Game gestures must not start native text selection or iOS callouts. */
body,body *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
/* Keep normal selection and editing in player/deck names and other text fields. */
input,textarea,[contenteditable]:not([contenteditable="false"]),[contenteditable]:not([contenteditable="false"]) *{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}

/* Keep both card sources visible; horizontal rails never move the whole editor. */
.panel-modal.deck-modal{width:min(100%,1040px);height:100%;max-height:100%;display:flex;flex-direction:column;margin:0 auto;border-radius:14px}
.deck-modal .panel-top{flex:none}.deck-modal .panel-content{padding:10px 14px;flex:1;min-height:0;overflow:auto}
.deck-editor{height:100%;min-height:490px;display:flex;flex-direction:column;gap:8px}.deck-title{display:flex;justify-content:space-between;align-items:center;gap:12px}.deck-title h2{margin:0;font-size:20px}.deck-title strong{font-size:23px;color:var(--gold);white-space:nowrap}
.deck-tools{flex:none}.deck-tools .deck-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:5px;margin:5px 0}.deck-tabs button{flex:none;padding:6px 9px;font-size:11px}.deck-options{display:flex;gap:10px;align-items:flex-end}.deck-options>label{flex:1;min-width:0;margin:3px 0}.deck-options input,.deck-options select{min-height:32px;padding:5px 7px;margin-top:3px;font-size:12px}.card-sort{display:flex;align-items:center;gap:7px}.card-sort select{width:auto;min-width:0;flex:1}.deck-options .card-sort{display:block}.deck-options .card-sort select{width:100%}
.deck-zone{flex:1;min-height:0;border:1px solid #665474;background:#292239;border-radius:12px;display:flex;flex-direction:column;overflow:hidden}.deck-zone h3{font-size:13px;margin:0;padding:7px 10px;display:flex;align-items:center;justify-content:space-between;gap:6px;border-bottom:1px solid #655079;flex:none}.deck-zone h3 span{font-size:10px;font-weight:400;color:#d3bedb}.reserve-zone{background:#182c36;border-color:#446879}.reserve-zone h3{border-color:#446879}
.deck-rail{display:flex;gap:9px;overflow-x:auto;overflow-y:hidden;overscroll-behavior:contain;min-height:0;padding:8px 10px;flex:1;scrollbar-width:thin;scrollbar-color:#b392bc #1a1725;touch-action:pan-x}.deck-tile{display:flex;flex-direction:column;flex:0 0 105px;min-width:0;gap:3px;touch-action:none;position:relative}.deck-tile .deck-art{flex:1;min-height:35px;padding:0;border:0;background:none;overflow:hidden;touch-action:none;border-radius:7px}.deck-tile .card-art{width:100%;height:100%;min-height:0;max-height:none;aspect-ratio:auto}.deck-tile .card-type,.deck-tile .card-name{display:none}.deck-tile .card-cost{font-size:10px;min-width:16px;padding:1px 3px}.deck-card-name{font-size:10px;line-height:1.3;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.deck-tile>small{font-size:9px;line-height:1.2}.deck-tile>button:last-child{padding:4px;font-size:11px;min-height:30px;flex:none}.deck-tile img{pointer-events:none;-webkit-user-drag:none}.deck-empty{align-self:center;font-size:12px;margin:0}.deck-footer{flex:none}.deck-footer .actions{gap:6px;justify-content:space-between}.deck-footer button{padding:7px 10px;min-height:36px;font-size:12px}.deck-footer>small{display:block;margin-top:4px;font-size:10px}
.forge-source{padding:12px;background:#191d2d;border:1px solid #57536e;border-radius:12px;margin:14px 0}.forge-source .segmented{display:flex;flex-wrap:nowrap}.forge-source .segmented button{flex:1}.forge-source .fine{margin:8px 0 0}.forge-card-targets{display:grid;grid-template-columns:repeat(auto-fill,minmax(125px,1fr));gap:10px}.forge-card-targets>button{min-width:0;display:flex;flex-direction:column;gap:7px;text-align:left;padding:8px}.forge-card-targets .card-art{width:100%;height:145px;min-height:0;aspect-ratio:auto}.forge-card-targets .card-name{display:none}.forge-card-targets>button>b{font-size:12px}.forge-card-targets>button>span{font-size:10px;line-height:1.5}
.ending-screen,.clear-choice{width:100%;height:100%;overflow:auto;text-align:center;padding:clamp(20px,5vh,48px) max(20px,6%);background:radial-gradient(ellipse at 50% 25%,#614f77,#241e38 60%,#111926);display:flex;flex-direction:column;align-items:center;gap:16px}.ending-screen>* ,.clear-choice>*{flex-shrink:0}.ending-screen h1,.clear-choice h1{font-size:clamp(24px,5vw,42px);color:#ffe5ae;margin:0}.ending-screen p{max-width:600px;font-size:14px;line-height:2;margin:0}.ending-stars{font-size:34px;color:#ffdfa2;letter-spacing:20px}.ending-art{width:130px;height:170px;box-shadow:0 0 50px #ffcaa532;border-radius:12px}.ending-art .card-art{width:100%;height:100%;min-height:0;aspect-ratio:auto}.ending-art .card-name,.ending-art .card-type,.ending-art .card-cost{display:none}.ending-screen>button{min-width:220px;min-height:46px}.ending-credit{margin-top:auto;padding-top:10px;letter-spacing:2px}.ending-save-status{padding:12px 18px;border:1px solid #dcb987;border-radius:10px}.clear-option{max-width:550px;width:100%;display:flex;flex-direction:column;gap:10px;padding:24px;text-align:left}.clear-option b{font-size:18px;color:#ffe0a0}.clear-option span{font-size:13px;line-height:1.8}.clear-choice>p{max-width:550px;margin:0}
@media(max-width:500px){.deck-modal .panel-content{padding:6px 8px}.deck-editor{gap:5px;min-height:470px}.deck-title h2{font-size:17px}.deck-title strong{font-size:20px}.deck-tile{flex-basis:83px}.deck-rail{gap:7px;padding:6px 7px}.deck-zone h3{padding:5px 7px;font-size:12px}.deck-zone h3 span{font-size:9px}.deck-tools>small{font-size:9px}.deck-footer .actions>span{font-size:11px}.forge-card-targets{grid-template-columns:repeat(2,minmax(0,1fr))}.ending-screen{gap:12px}.ending-stars{font-size:24px}.ending-screen p{font-size:13px}.ending-art{width:108px;height:140px}}
.deck-card-name,.deck-tile>small{flex-shrink:0}.deck-tile .card-art>img{object-position:center 22%}
@media(max-height:650px){.deck-editor{min-height:590px}.deck-tile .deck-art{min-height:64px}.deck-zone{min-height:174px}}

/* V47: retain both complete scores and switch inside the existing sound panel. */
.sound-edition{border:0;padding:0;margin:0 0 18px;grid-column:1/-1}.sound-edition legend{font-size:16px;color:#fff4eb;margin-bottom:8px}.sound-edition>div{display:grid;grid-template-columns:1fr 1fr;gap:8px}.sound-edition button{min-height:44px;font-size:14px}.sound-edition button[aria-pressed="true"]{background:#77455f;border-color:#ffc4d8;box-shadow:inset 0 0 0 1px #ffc4d8;color:#fff}.sound-edition button:focus-visible{outline:2px solid #fff;outline-offset:3px}

/* Information is revealed through conversations and books. */
.map-objective[hidden]{display:none}.inquiry-notes article{padding:14px;margin:12px 0;border-left:3px solid var(--pink);background:#292236;border-radius:8px}.inquiry-notes h4{margin:0 0 8px;font-size:16px}.knowledge-entry{border:1px solid var(--line);padding:14px;border-radius:10px;margin:10px 0}.knowledge-entry summary{font-size:16px;cursor:pointer}.knowledge-entry p{padding-top:12px}
/* Preserve the light pixel-art rendering in play; smooth only the collection. */
[data-panel="collection"] .card-art img,[data-panel="collection"] .atlas-art,.art-viewer .illustration-only{image-rendering:auto!important}

/* V55: fixed workspaces; lists use pages, explanations open on demand. */
.title-language{display:flex;justify-content:center;gap:8px;margin:12px 0}.title-language button{min-width:104px;min-height:42px;font-size:15px}.title-language button[aria-pressed=true]{border-color:var(--pink);background:#68475b}
.fixed-workspace-modal{height:100%;max-height:100%;max-width:760px}.fixed-workspace-modal>.panel-content{flex:1;min-height:0;overflow:hidden;padding:10px 12px}.fixed-workspace-modal .panel-top{flex:none}.forge-workspace,.growth-workspace{height:100%;min-height:0;display:flex;flex-direction:column;gap:8px}.forge-workspace h2,.growth-workspace h2{font-size:20px;margin:0}.forge-heading,.growth-workspace>header{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none}.forge-heading b{font-size:14px;white-space:nowrap}.forge-heading button,.growth-workspace>header button{padding:7px 10px;min-height:38px;font-size:14px}.forge-workspace p{margin:0}.forge-source{flex:none;display:grid;gap:6px;padding:6px;margin:0}.forge-source .segmented{display:flex;margin:0;gap:6px}.forge-source .segmented button{flex:1;font-size:14px;min-height:36px;padding:6px 8px}.forge-selectors{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:center}.forge-selectors select,.forge-track-label select{min-height:36px;padding:5px;font-size:14px;margin:0}.forge-selectors .card-sort{display:flex;gap:4px;align-items:center;margin:0;font-size:12px;white-space:nowrap}.forge-selectors .card-sort select{min-width:0}.forge-selected{display:grid;grid-template-columns:76px minmax(0,1fr);gap:12px;align-items:center;flex:none;min-height:112px}.forge-art-button{padding:0;background:none;border:0}.forge-selected .card-art{height:108px;width:72px;min-height:0;max-height:108px}.forge-selected>div{min-width:0;font-size:14px}.forge-selected>div>b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.forge-selected>div>button{font-size:12px;min-height:30px;margin-top:4px;padding:4px 8px}.forge-result{font-size:14px;line-height:1.45}.forge-result strong{font-weight:500;font-size:12px;color:var(--pink)}.forge-empty{min-height:112px;display:flex;justify-content:center;flex-direction:column;gap:8px;text-align:center;background:#302637;border-radius:12px}.forge-empty span{font-size:14px}.forge-track-label{display:flex;align-items:center;gap:12px;margin:0;font-size:14px;flex:none}.forge-track-label select{flex:1;min-width:0}.forge-list{flex:1;min-height:0;display:flex;flex-direction:column;gap:6px}.forge-list h3{font-size:15px;margin:0;flex:none}.forge-name-list{min-height:0;display:flex;flex:1;flex-direction:column;justify-content:flex-start;gap:5px}.forge-name-target{display:flex;flex-direction:column;justify-content:center;min-height:48px;text-align:left;padding:6px 10px;gap:3px}.forge-name-target b,.forge-material-name b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;font-size:14px}.forge-name-target span,.forge-material-name span{font-size:12px;color:var(--muted)}.forge-material-row{display:grid;grid-template-columns:minmax(0,1fr) 36px 20px 36px;align-items:center;gap:4px;min-height:46px;border:1px solid var(--line);border-radius:8px;padding:3px 5px;background:#262132}.forge-material-row>button:not(.forge-material-name){min-height:36px;padding:3px;font-size:20px}.forge-material-name{text-align:left;background:none;border:0;min-width:0;padding:1px 3px;min-height:38px}.forge-material-row output{font-size:14px;text-align:center}.forge-pagination{display:flex;align-items:center;justify-content:space-between;flex:none;gap:12px}.forge-pagination button{min-height:34px;min-width:58px;padding:3px 10px;font-size:20px}.forge-pagination span{font-size:14px}.forge-footer{flex:none;display:grid;gap:5px}.forge-footer>.primary{min-height:42px;padding:8px;font-size:15px}.forge-footer>small{font-size:12px;line-height:1.3;text-align:center}.material-warning{font-size:12px;line-height:1.4;color:#ffd39c}.info-detail .detail-content{display:block;text-align:left}.info-detail .detail-content p{font-size:16px;line-height:1.65}.info-detail .detail-content h3{margin:14px 0 8px}.growth-identity{display:flex;align-items:center;gap:14px;flex:none}.growth-identity img{width:62px;height:62px;object-fit:cover;border-radius:10px}.growth-identity>div{display:grid;grid-template-columns:1fr auto;gap:5px 16px;flex:1;min-width:0}.growth-identity b{font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.growth-identity span{font-size:13px;grid-column:1/-1}.growth-points{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:54px;padding:9px 12px;text-align:left;background:#482b44;border-color:#a97b92}.growth-points b{font-size:15px}.growth-points strong{font-size:23px;color:var(--pink)}.growth-points span{font-size:12px}.growth-allocations{display:grid;grid-template-rows:repeat(4,minmax(0,1fr));gap:8px;flex:1;min-height:0}.growth-allocation{display:grid;grid-template-columns:minmax(0,1fr) 56px;align-items:center;gap:8px;padding:6px 10px;background:#292437;border:1px solid var(--line);border-radius:10px}.growth-stat{border:0;background:none;text-align:left;display:grid;gap:4px;padding:0;min-width:0}.growth-stat b{font-size:15px}.growth-stat span{font-size:16px;color:var(--pink)}.growth-stat small{font-size:12px}.growth-allocation>.primary{min-height:42px;padding:7px;font-size:17px}.growth-workspace>footer{flex:none;display:flex;flex-direction:column;gap:6px;align-items:center}.growth-workspace>footer button{min-height:36px;padding:7px 14px;font-size:14px}.growth-workspace>footer small{font-size:12px;line-height:1.3}.forge-name-target,.forge-material-name,.growth-stat,.growth-points{touch-action:manipulation;-webkit-touch-callout:none}
@media(max-height:699px){.fixed-workspace-modal>.panel-content{padding:7px 10px}.forge-workspace,.growth-workspace{gap:6px}.forge-selected{min-height:90px;grid-template-columns:60px minmax(0,1fr);gap:8px}.forge-selected .card-art{height:86px;width:58px;max-height:86px}.forge-empty{min-height:90px}.forge-heading h2,.growth-workspace h2{font-size:18px}.growth-identity img{width:46px;height:46px}.growth-points{min-height:44px;padding:6px 10px}.growth-allocations{gap:5px}.growth-stat{gap:2px}.growth-stat b{font-size:14px}.growth-stat span{font-size:14px}.growth-allocation{padding:4px 8px}.forge-result{font-size:13px}.forge-footer>small{font-size:11px}}
@media(orientation:landscape) and (max-height:500px){.growth-workspace{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:auto auto 1fr auto}.growth-workspace>header{grid-column:1}.growth-identity{grid-column:1}.growth-points{grid-column:1;display:block}.growth-allocations{grid-column:2;grid-row:1/5}.growth-workspace>footer{grid-column:1}.forge-workspace{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto 1fr auto}.forge-heading{grid-column:1}.forge-source{grid-column:1}.forge-selected,.forge-empty{grid-column:1}.forge-track-label{grid-column:1}.forge-list{grid-column:2;grid-row:1/4}.forge-footer{grid-column:2;grid-row:4}.forge-empty{min-height:0}}
.forge-footer>.wide{margin:0}.forge-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;flex:none}.forge-options .forge-track-label,.forge-options .card-sort{display:grid;gap:3px;margin:0;font-size:12px;min-width:0}.forge-options select{min-width:0;min-height:36px;margin:0;padding:5px;font-size:14px}.forge-material-row{flex-shrink:0}.forge-name-target{flex-shrink:0}
@media(orientation:landscape) and (max-height:500px){.forge-options{grid-column:1}.forge-selected{min-height:80px}.forge-selected .card-art{height:76px;max-height:76px;width:52px}.forge-selected>div>button{margin-top:0}.forge-heading button{min-height:32px;padding:4px 8px}.forge-result{line-height:1.25}}
.growth-stat b,.growth-stat span,.growth-stat small{line-height:1.2}.forge-footer>small{font-size:12px}
@media(max-height:699px){.forge-result{line-height:1.25}.forge-selected>div>button{min-height:28px;padding:3px 8px}}
/* V59 tournament: fixed arena camera, compact bracket, compositor-only fade. */
.ws-screen{position:relative;display:flex;flex-direction:column;height:100%;min-height:0;background:#181b32;color:#fff2f5;overflow:hidden}.ws-screen>header{display:flex;align-items:center;gap:10px;padding:12px 16px;background:#24233b;z-index:1}.ws-screen>header small{font-size:10px;letter-spacing:1.4px;color:#ffd49c}.ws-screen>header b{font-size:14px;flex:1}.ws-screen>header button{padding:7px 10px;font-size:12px;min-height:34px}.ws-stage-wrap{position:relative;flex:1;min-height:110px;overflow:hidden;background:#151a2c}.ws-stage-wrap canvas{display:block;width:100%;height:100%;object-fit:contain;image-rendering:pixelated}.ws-content{position:relative;padding:14px 18px 20px;background:linear-gradient(#28243c,#211d34);flex:none;max-height:75%;overflow:auto}.ws-content>button{display:block;width:100%;margin-top:12px}.ws-commentary small{font-weight:800;color:#ffb6cf;letter-spacing:1px}.ws-commentary p{font-size:16px;line-height:1.7;margin:10px 0 16px}.ws-commentary>button{width:100%}.ws-bracket h2{font-size:20px;margin:0 0 6px}.ws-bracket>p{font-size:12px;line-height:1.5;margin:6px 0 10px}.ws-bracket ol{padding:0;margin:0;display:grid;gap:7px;list-style:none}.ws-bracket li{display:grid;grid-template-columns:18px 1fr 24px 1fr;align-items:center;background:#ffffff09;border:1px solid #ffffff26;border-radius:8px;padding:10px 8px;gap:4px;text-align:center;font-size:13px}.ws-bracket li>span{color:#b2aabf;font-size:10px}.ws-bracket li>small{font-size:10px;color:#ecabbf}.ws-bracket .is-hero{color:#ffd386}.ws-seed{padding:12px 5px 0;text-align:center;color:#ffd386;font-size:12px;font-weight:700}.ws-advancers{color:#ddd1ee}.ws-versus{display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:center;padding:8px 0 18px}.ws-versus>b{flex:1;font-size:16px}.ws-versus>small{color:#ffc98c;font-weight:800}.ws-rival{display:flex;align-items:center;gap:12px}.ws-rival img{width:72px;height:84px;object-fit:cover;border-radius:10px;border:1px solid #cdaa90;flex:none}.ws-rival p{font-size:14px;margin:6px 0}.ws-rival b{font-size:12px;color:#ffc4d8}.ws-arrival-caption{text-align:center;font-size:14px;line-height:1.7;margin:5px 0}.ws-waiting{text-align:center;padding:12px 0}.ws-waiting>small{color:#dfbfd0;font-size:12px}.ws-waiting h2{font-size:19px;margin:10px 0 16px}.ws-waiting p{font-size:15px;line-height:1.6}.ws-actions{display:flex;gap:12px;margin:20px 0}.ws-actions>button{flex:1;min-height:48px}.ws-gate,.ws-gameover{height:100%;display:flex;flex-direction:column;justify-content:center;padding:clamp(20px,6vw,36px);box-sizing:border-box;background:radial-gradient(ellipse at top,#382b4c,#17192e);color:#fff0f5}.ws-gate>small,.ws-gameover>small{color:#e3b77d;letter-spacing:3px}.ws-gate h1,.ws-gameover h1{font-size:28px;margin:20px 0}.ws-gate p,.ws-gameover p{font-size:15px;line-height:1.8;margin:8px 0}.ws-gate .ws-warning{border-left:3px solid #ffc98c;padding:10px 12px;font-size:19px;font-weight:800;background:#ffe1a610}.ws-gameover h1{font-size:40px;letter-spacing:3px;color:#ffb8cc}.ws-gameover>button{margin-top:16px}.ws-fade{position:fixed;inset:0;background:#000;z-index:30;animation:ws-blackout .65s ease-out both;pointer-events:none}.ws-retry{position:absolute;top:40%;left:20%;width:60%}.menu-grid button:disabled{opacity:.38;filter:saturate(.3);cursor:not-allowed}.ws-screen~.control-dock{display:none}@keyframes ws-blackout{from{opacity:0}to{opacity:1}}@media(max-height:650px){.ws-screen>header{padding:7px 12px}.ws-content{padding:10px 14px;max-height:78%}.ws-bracket li{padding:6px;font-size:12px}.ws-commentary p{font-size:14px;line-height:1.55}.ws-gate h1{margin:10px 0;font-size:24px}.ws-gate p{font-size:13px;line-height:1.65}.ws-gate .ws-warning{font-size:16px}.ws-stage-wrap{min-height:85px}.ws-waiting{padding:0}}
/* v60: tournament portraits and loading companions */
.ws-announcer{display:flex;align-items:center;gap:14px;min-width:0}.ws-announcer>img{width:92px;height:100px;object-fit:cover;object-position:center;border:1px solid #b58979;border-radius:12px;flex:none;background:#302335}.ws-announcer>div{min-width:0}.ws-announcer p{font-size:15px;line-height:1.65;margin:6px 0 0}.ws-commentary>.ws-announcer{margin-bottom:16px}.ws-announcer small{font-size:12px;letter-spacing:.05em}.ws-entry-call>.ws-announcer{margin-bottom:0}.ws-entry-call img{width:64px;height:68px}.ws-entry-call p{font-size:14px}
.loading-screen{background:radial-gradient(ellipse at 50% 35%,#51324f 0%,#282239 48%,#171b28 80%);text-align:center;align-items:center;gap:12px;width:100%;max-width:none;padding:24px 20px}.loading-eyebrow{font-size:12px!important;letter-spacing:.2em;color:#f1bad4!important}.loading-duo{display:block;width:min(100%,420px);height:auto;aspect-ratio:3/2;max-height:40svh;object-fit:contain;margin:0 auto;flex:0 1 auto}.loading-screen h2{font-size:26px;letter-spacing:.08em;margin:0;color:#ffd4e5}.loading-screen p{font-size:14px;line-height:1.65;max-width:460px}.loading-screen progress{width:min(100%,300px);height:10px;border:0;border-radius:6px;overflow:hidden;background:#46384f;accent-color:#ffaccc;flex-shrink:0}.loading-screen progress::-webkit-progress-bar{background:#46384f;border-radius:6px}.loading-screen progress::-webkit-progress-value{background:linear-gradient(90deg,#ff9cbc,#ffd99d);border-radius:6px}.loading-screen progress::-moz-progress-bar{background:#ffaccc;border-radius:6px}.loading-screen #prepare-progress{font-size:13px;font-variant-numeric:tabular-nums;color:#e0c6dc}.loading-screen .loading-error{padding:10px 12px;background:#351e30;border:1px solid #a96781;border-radius:8px}.boot.loading-screen>div{width:100%;max-width:460px;display:flex;flex-direction:column;gap:18px;align-items:center;padding:0}.boot.loading-screen button{min-height:44px}.boot.loading-screen .loading-duo{margin-top:8px}
@media(max-height:650px){.ws-announcer>img{width:70px;height:80px}.ws-announcer p{font-size:14px;line-height:1.55}.ws-commentary>.ws-announcer{margin-bottom:10px}.ws-entry-call .ws-announcer>img{width:54px;height:58px}.loading-screen{gap:8px;padding:16px}.loading-duo{max-height:34svh}.loading-screen h2{font-size:23px}.loading-screen small{font-size:12px}}
/* V61 title: keep both characters clear of the logo and controls. */
.title-v61{flex-direction:column;justify-content:center;background:radial-gradient(ellipse at 50% 25%,#59415b,#272338 65%,#181a29);padding:58px 0 max(12px,env(safe-area-inset-bottom));gap:12px;overflow-y:auto;overscroll-behavior:contain}
.title-v61 .title-heading{flex:none;width:100%;padding:0 16px}
.title-v61 .title-heading h1{margin:0;color:#ffe6f1;font-size:clamp(26px,7vw,42px);line-height:1.2;font-weight:850;letter-spacing:.01em;text-shadow:0 2px 0 #b04d7d,0 4px 18px #100e21}
.title-v61 .title-art{position:relative;inset:auto;flex:0 1 260px;width:100%;max-width:720px;min-height:100px;max-height:min(480px,66.666vw);transform:none;background:none;image-rendering:auto;overflow:hidden}
.title-v61 .title-art::after{display:none}
.title-v61 .title-art img{display:block;width:100%;height:100%;object-fit:contain;object-position:center;image-rendering:auto;user-select:none;pointer-events:none}
.title-v61 .title-copy{flex:none;max-width:420px;padding:0 20px;width:100%}
.title-v61 .title-language{margin:0 0 10px}
.title-v61 .title-language button{min-height:42px}
.title-v61 .title-options{margin:0 auto 10px;gap:8px;max-width:320px}
.title-v61 .title-options .sign-in-button{min-height:46px;padding:10px 12px;display:flex;align-items:center;justify-content:center;font-size:14px;line-height:1.45}
.title-v61 .title-copy .muted{display:block;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.title-v61 .title-copy .fine{display:block;font-size:12px;line-height:1.5;margin:6px 0 0}
@media(max-height:650px){.title-v61{padding-top:52px;gap:8px;padding-bottom:8px}.title-v61 .title-heading h1{font-size:26px}.title-v61 .title-copy{padding:0 14px}.title-v61 .title-options{gap:6px;margin-bottom:6px}.title-v61 .title-language{margin-bottom:6px}.title-v61 .title-language button{min-height:36px;padding:5px 12px}.title-v61 .title-options .sign-in-button{min-height:40px;padding:7px 10px}.title-v61 .title-copy .fine{font-size:11px}}
@media(min-width:760px) and (min-height:580px){.title-v61{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(300px,1fr);grid-template-rows:auto 1fr;align-content:center;align-items:center;gap:24px;padding:68px 28px 36px}.title-v61 .title-heading{grid-column:1/-1}.title-v61 .title-art{height:100%;max-height:620px;min-height:220px}.title-v61 .title-copy{padding:0 12px}.title-v61 .title-language{margin-bottom:20px}.title-v61 .title-options{gap:12px}}

.route-stars{display:inline-flex;gap:.25em;vertical-align:middle;font-size:1.1em}.route-star.normal{color:#ff8dbb}.route-star.cult{color:#17111f;-webkit-text-stroke:1px #d9cddd;text-shadow:0 0 2px #f2e9f5}

/* The diary loads only its selected entry; maps retain their cached base layer. */
.diary-detail{width:min(640px,100%);height:min(780px,100%);display:flex;flex-direction:column;overflow:hidden;background:#302439;color:#fff3f4}
.diary-detail .detail-top{flex-shrink:0;gap:10px}
.diary-detail .detail-top b{font-size:clamp(15px,4vw,21px)}
.diary-detail .detail-top button{padding:10px 16px}
.diary-body{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;padding:18px 20px!important;line-height:1.85}
.diary-body article>small{color:#e4a5c4}
.diary-body h2{font-size:21px;line-height:1.5;margin:14px 0 20px}
.diary-body h3{font-size:14px;color:#eab8cb;margin:22px 0 8px}
.diary-body blockquote{white-space:pre-wrap;margin:0;padding:14px 16px;border-left:3px solid #ebacc9;border-radius:0 10px 10px 0;background:#ffffff0a;font-size:14px}
.diary-body p{font-size:15px;margin:0 0 18px}
.diary-index{margin-bottom:24px;border-bottom:1px solid #eeb2cd33;padding-bottom:12px}
.diary-index summary{cursor:pointer;font-size:14px;color:#f2c5d8;min-height:32px}
.diary-index nav{display:grid;gap:7px;margin-top:12px}
.diary-index button{text-align:left;padding:10px;font-size:14px}
.diary-index button[aria-current]{background:#90516c}
.diary-nav{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px;border-top:1px solid #eeb2cd55;flex-shrink:0;background:#3c2942}
.diary-nav button{padding:10px;font-size:13px;min-height:44px}
.diary-nav span{font-size:12px;white-space:nowrap;color:#f1c7da}
@media(max-width:360px){.diary-body{padding:14px!important}.diary-body h2{font-size:19px}.diary-detail .detail-top{padding:12px}.diary-nav{padding:10px 8px;gap:4px}}

/* Scripted family duel: only mounted during its two story beats. */
.family-clash{display:flex;align-items:center;justify-content:center;gap:12px;position:absolute;inset:8% 4% auto;padding:16px;border-radius:24px;background:#181025de;box-shadow:0 0 42px #da8dcc99;pointer-events:none}
.family-clash>.card-art{width:min(32vw,138px);aspect-ratio:2/3;animation:family-card-flash 1.8s ease-in-out 2}
.family-clash>.card-art:last-child{animation-delay:.35s}
.family-clash .card-type{display:none}
.family-clash>b{color:#ffe1a1;font-size:22px}
@keyframes family-card-flash{50%{transform:translateY(-5px);filter:brightness(1.35)}}
.staff-roll{--staff-window:min(38vh,330px);height:var(--staff-window);overflow:auto;overscroll-behavior:contain;width:min(100%,330px);margin:12px auto;mask-image:linear-gradient(transparent,#000 8%,#000 92%,transparent)}
.staff-roll-track{padding:12px 0;animation:staff-arrive 12s linear both}
.staff-roll-track p{display:flex;justify-content:space-between;align-items:center;margin:0!important;padding:9px 8px;border-bottom:1px solid #efb5d52b;font-size:15px!important}
.staff-roll-track small{font-size:11px;letter-spacing:0}
.staff-roll-track b{color:#ffc4df}
@keyframes staff-arrive{0%,20%{transform:translateY(0)}85%,100%{transform:translateY(min(0px,calc(var(--staff-window) - 100%)))}}
@media(prefers-reduced-motion:reduce){.family-clash>.card-art,.staff-roll-track{animation:none}}

/* Action participants: static, UID-bound markers; no animation/render loop. */
.battle-cue{flex:none;min-height:65px;display:flex;align-items:center;gap:9px;padding:6px 10px;border:1px solid #a77d9c;border-radius:10px;background:#211c30;box-shadow:inset 3px 0 #ff9bbf;pointer-events:none}
.battle-cue-copy{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px;text-align:left;line-height:1.35;font-size:12px}
.battle-cue-copy>b{color:#fff3ee;font-size:13px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.battle-cue-copy small{font-size:10px;color:#e3cde2}
.cue-from,.cue-to{overflow-wrap:anywhere}.cue-from{color:#ffb9d2}.cue-to{color:#ffe49b}
.cue-played-card{height:65px;width:44px;flex:none;padding:0;border:0;background:transparent;pointer-events:auto;touch-action:manipulation}
.cue-played-card .card-art{border-width:2px}.cue-played-card .card-name{font-size:7px}.cue-played-card .card-type{font-size:6px}.cue-played-card .card-cost{font-size:7px}
.unit.cue-source,.fighter-status.cue-source{outline:3px solid #ff86b5;outline-offset:2px;box-shadow:0 0 14px #ff86b566}
.unit.cue-target,.fighter-status.cue-target{outline:3px solid #ffe18b;outline-offset:2px;box-shadow:0 0 14px #ffe18b66}
.battle-cursor{position:absolute;inset:0;z-index:5;pointer-events:none;border-radius:7px}
.battle-cursor>span{position:absolute;top:-8px;left:50%;transform:translateX(-50%);white-space:nowrap;border:1px solid currentColor;border-radius:5px;padding:2px 5px;background:#201827;font-size:11px!important;line-height:1.3;font-weight:800}
.battle-cursor-source{color:#ffabd0}.battle-cursor-target{color:#ffe49b}
.battle-cursor-target::after{content:'';position:absolute;left:50%;top:40%;transform:translate(-50%,-50%);width:22px;height:22px;border:2px solid #ffe49b;border-radius:50%;box-shadow:0 0 0 2px #251c30b3;background:linear-gradient(#ffe49b,#ffe49b) center/2px 10px no-repeat,linear-gradient(#ffe49b,#ffe49b) center/10px 2px no-repeat}
.fighter-status>.battle-cursor>span{top:3px;left:4px;transform:none;font-size:10px!important;margin:0;color:#ffe49b}
.fighter-status>.battle-cursor::after{left:28px;top:65%}
@media(max-height:650px){.battle-cue{min-height:51px;padding:4px 7px;gap:7px}.cue-played-card{height:60px;width:44px}.battle-cue-copy{font-size:11px}.battle-cue-copy>b{font-size:12px}.battle-cursor>span{font-size:10px!important;padding:1px 3px}}
@media(max-height:650px){.has-battle-cue .hand{flex-basis:48px}.has-battle-cue .duel-status{height:61px;min-height:61px}.has-battle-cue .enemy-closet{display:none}}
