/* Real 3D field + screen-aligned, accessible game controls. */
#duel3d-view{position:fixed;inset:58px 0 0;display:none;background:radial-gradient(ellipse at 24% 0%,#f0dbb5 0,transparent 47%),linear-gradient(#759b9c,#b1c8bf 52%,#506e68);z-index:0}#duel3d-view canvas{display:block;width:100%;height:100%}
#field-notice{position:fixed;left:50%;bottom:30px;transform:translateX(-50%);z-index:150;background:#e0c48a;color:#172c27;padding:13px 24px;border-radius:5px}
.duel3d body{background:#839b90}.duel3d #app{position:relative;z-index:1;pointer-events:none}.duel3d button,.duel3d input,.duel3d select,.duel3d dialog{pointer-events:auto}
.duel3d .game{background:none;min-height:100svh;padding:0}.duel3d .game .topbar,.duel3d[lang=en] .game .topbar{height:58px;min-height:58px;background:linear-gradient(90deg,#0d2528,#173733ed);border-bottom:1px solid #d1bc8170;padding:8px 24px;pointer-events:auto}.duel3d .game .brand{font-size:19px;letter-spacing:3px}.duel3d .game .nav button{font-size:11px;padding:7px 8px}.duel3d .game .layout{position:relative;display:block;width:100%;max-width:none;height:calc(100svh - 58px);padding:0;margin:0;pointer-events:none}
.duel3d .arena{position:absolute;inset:0;display:block;height:100%;width:100%;padding:0;border:0;background:none;box-shadow:none;overflow:hidden;pointer-events:none}.duel3d .arena::before{display:none}
.duel3d .battle-hud,.duel3d[lang=en] .battle-hud{position:absolute;left:24px;right:24px;top:12px;grid-template-columns:160px 340px 1fr;height:40px;background:linear-gradient(90deg,#0e282bdd,#193f38be);border:1px solid #d4c39565;border-radius:4px;margin:0;padding:4px 12px;z-index:25;backdrop-filter:blur(6px)}.duel3d .phase-rail li{min-height:25px}.duel3d .duel-pulse{justify-self:end;color:#e9e1c5;font-size:12px}.duel3d .duel-turn strong{font-size:18px}.duel3d .duel-turn small{color:#aecfc4}
.duel3d .master{position:absolute;width:162px;height:auto;min-height:142px;display:flex;gap:6px;padding:12px 14px;background:linear-gradient(130deg,#132d31ed,#17352cd4);border:1px solid #e1c88d75;border-left:3px solid #e5ca86;box-shadow:0 9px 28px #142c3040;z-index:20;overflow:visible;backdrop-filter:blur(5px)}.duel3d .master-foe{left:24px;top:72px;border-left-color:#d4957d}.duel3d .master-mine{left:24px;bottom:204px;border-left-color:#9cdbc0}.duel3d .master-name,.duel3d[lang=en] .master-name{font-size:12px;line-height:1.4}.duel3d .master .avatar{display:none}.duel3d .master .master-sub{display:flex;font-size:9px;gap:8px;opacity:.85}.duel3d .master .vitals{display:grid;gap:5px}.duel3d .master .hp b{font-size:33px;font-weight:500;color:#f2d7b1}.duel3d .master .track{width:112px}.duel3d .master .qi{font-size:12px;padding:4px 8px}.duel3d .master .grave-link{font-size:10px;padding:4px}.duel3d .master .strike-master{background:#dfbb79;color:#18332f}
.duel3d .row,.duel3d .spell-row{position:absolute;inset:0;display:block;margin:0;padding:0;border:0;background:none;pointer-events:none;min-height:0}.duel3d .row>.unit,.duel3d .row>.slot,.duel3d .spell-row>.spell-slot{position:absolute!important;display:block!important;min-height:0!important;max-height:none!important;max-width:none!important;padding:0!important;margin:0;transform:none!important;border:0!important;border-radius:0;background:none!important;box-shadow:none!important;overflow:visible!important;outline:none!important;text-align:center;pointer-events:auto;transition:none!important}
.duel3d .row>.unit{z-index:8}.duel3d .row>.unit:hover{filter:brightness(1.15)}.duel3d .row>.unit:focus-visible,.duel3d .spell-slot:focus-visible{outline:2px solid #fff0bc!important;outline-offset:5px}.duel3d .row>.slot{color:transparent;pointer-events:none}.duel3d .slot::before,.duel3d .slot::after,.duel3d .unit-art,.duel3d .unit-corner,.duel3d .card-back-seal,.duel3d .unit-meta,.duel3d .row .unit .board-chip{display:none!important}
.duel3d .row .unit .unit-title,.duel3d .row .unit.defense-form .unit-title,.duel3d[lang=en] .row .unit .unit-title{position:absolute;top:100%;bottom:auto;left:50%;right:auto;transform:translateX(-50%);display:block;width:155px;max-width:180px;padding:3px 6px;line-height:1.2;font-size:11px;color:#fff0cc;letter-spacing:0;text-shadow:0 1px 4px #071b19;background:linear-gradient(90deg,transparent,#102c2aeb 15%,#102c2aeb 85%,transparent);pointer-events:none;white-space:normal;overflow-wrap:normal}
.duel3d .row .unit .unit-stats,.duel3d .row .unit.defense-form .unit-stats{position:absolute;top:calc(100% + 21px);bottom:auto;left:50%;right:auto;transform:translateX(-50%);display:flex;justify-content:center;align-items:center;gap:15px;width:125px;padding:3px 6px;min-height:21px;font-size:14px;line-height:1.1;background:#102c2ade;border:1px solid #c5b27655;border-radius:3px;color:#f6e2aa;pointer-events:none}.duel3d .row .unit .unit-stats b{font-size:9px;color:#a8cfc3}.duel3d .row .unit.hidden-unit .unit-title{top:100%;font-size:11px}.duel3d .row .unit.hidden-unit .unit-stats{top:calc(100% + 20px);font-size:12px}.duel3d .unit.ready .unit-stats{border-color:#9cffe0!important;box-shadow:0 0 10px #7cebc175}.duel3d .unit.target .unit-stats{border-color:#ffe09a!important}
.duel3d .spell-slot{z-index:5}.duel3d .spell-slot>span:not(.slot-number),.duel3d[lang=en] .spell-slot>span:not(.slot-number){position:absolute;left:50%;top:100%;transform:translateX(-50%);width:145px;font-size:10px;padding:3px 6px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:center;background:linear-gradient(90deg,transparent,#163f35d9 15%,#163f35d9 85%,transparent);color:#f3dfb4}.duel3d .spell-slot .slot-number,.duel3d .spell-slot small,.duel3d .spell-slot .board-chip{display:none}.duel3d .spell-slot.empty>span{opacity:0}.duel3d .spell-slot.empty:hover>span,.duel3d .spell-slot.empty.target>span{opacity:1}.duel3d .spell-slot.target{outline:2px solid #ffdda1!important;outline-offset:2px!important;background:#f7dba229!important}
.duel3d .scene-brand{position:absolute;right:28px;top:79px;text-align:right;color:#f8edcf;text-shadow:0 2px 10px #133e3c;z-index:2}.duel3d .scene-brand small{display:block;font-size:9px;letter-spacing:3px;margin-bottom:7px}.duel3d .scene-brand span{font-family:SimSun,serif;font-size:23px;letter-spacing:4px}
.duel3d .side{position:absolute;top:140px;right:24px;bottom:auto;width:218px;max-height:calc(100% - 355px);height:auto;padding:0;border:0;background:none;box-shadow:none;pointer-events:auto;overflow-y:auto;z-index:23;scrollbar-width:thin}.duel3d .side>.inspect{display:none}.duel3d .side.has-detail>.inspect{display:block;padding:13px 15px 10px;background:#112d2cf0;border:1px solid #bbaa7480;border-radius:4px;backdrop-filter:blur(6px);margin-bottom:8px}.duel3d .side .inspect-art{height:145px;width:100%;background-size:contain;background-color:transparent;margin:5px 0 8px}.duel3d .side .inspect strong,.duel3d[lang=en] .side .inspect strong{font-size:19px;margin:8px 0}.duel3d .side .inspect p{font-size:11px;line-height:1.65}.duel3d .side .inspect .small{font-size:10px}.duel3d .side .guide-panel,.duel3d .side .quick-guide-coach,.duel3d .side .tutorial-coach{background:#122e2dda;border:1px solid #c7b57b70;padding:11px;margin:0 0 8px;backdrop-filter:blur(6px)}.duel3d .side .guide-panel strong,.duel3d .side .quick-guide-coach strong{font-size:12px}.duel3d .side .guide-panel p{display:none}.duel3d .side .review-log{background:#112d2ddd;font-size:10px;padding:7px;margin-top:0;border-color:#d3c09155}.duel3d .mobile-inspect{display:none}
.duel3d .action-dock,.duel3d[lang=en] .action-dock{position:absolute;right:24px;bottom:198px;left:auto;top:auto;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px;max-width:220px;width:auto;background:none;padding:0;border:0;transform:none;z-index:26;pointer-events:auto}.duel3d .action-dock .hint{flex-basis:100%;width:100%;text-align:right;font-size:11px;color:#e6ecde;text-shadow:0 1px 4px #001f22;background:#163a31d9;border-radius:4px;padding:7px;line-height:1.5}.duel3d .action-dock button,.duel3d[lang=en] .action-dock button{font-size:12px;min-height:38px;padding:9px 13px;border-color:#d9c48b99;background:#173d36}.duel3d .action-dock button.gold{background:linear-gradient(110deg,#f0d7a1,#c2a267);color:#17302a}
.duel3d .play-controls,.duel3d .choice-prompt,.duel3d[lang=en] .choice-prompt{position:absolute;left:50%;right:auto;top:auto;bottom:148px;transform:translateX(-50%);display:flex;align-items:center;gap:14px;width:max-content;max-width:calc(100% - 430px);min-height:45px;margin:0;padding:7px 12px;background:#122e2ced;border:1px solid #d8c187a0;border-radius:5px;z-index:32;pointer-events:auto;box-shadow:0 7px 24px #10251e50}.duel3d .play-controls.is-idle{display:none}.duel3d .play-controls.choosing{display:none}.duel3d .play-actions{flex:none;gap:6px}.duel3d .play-actions button,.duel3d[lang=en] .play-actions button{font-size:11px;min-height:30px;padding:7px 9px;white-space:nowrap}.duel3d .play-summary{max-width:170px}.duel3d .play-summary strong{font-size:12px}.duel3d .play-summary small{font-size:10px}.duel3d .choice-prompt p{font-size:12px}.duel3d .choice-prompt strong{font-size:12px}.duel3d .choice-prompt em{display:none}.duel3d .choice-prompt button{font-size:11px}
.duel3d .hand{position:absolute;left:50%;bottom:0;transform:translateX(-50%);width:calc(100% - 310px);max-width:1100px;height:145px;display:flex;align-items:flex-end;justify-content:center;gap:9px;padding:9px 12px 5px;margin:0;background:linear-gradient(0deg,#0c252bf5,#1238309c 65%,transparent);border-top:0;border-radius:12px 12px 0 0;overflow-x:auto;overflow-y:hidden;z-index:30;pointer-events:auto}.duel3d .hand .card,.duel3d[lang=en] .hand .card{flex:0 0 99px;min-width:99px;max-width:99px;width:99px;height:130px;min-height:0;display:grid;grid-template-columns:1fr;grid-template-rows:81px 30px 19px;border:1px solid #ac9b6d;border-radius:5px;background:#17392f;box-shadow:0 4px 13px #051c25a0;transition:transform .15s,border-color .15s;overflow:hidden;transform-origin:center bottom}.duel3d .hand .card .card-art{height:81px;width:100%;background-size:100% 100%,cover;background-position:center,center 27%}.duel3d .hand .card>strong,.duel3d[lang=en] .hand .card>strong{font-size:10px;line-height:1.15;padding:3px 4px;min-height:0}.duel3d .hand .card .stats{font-size:9px;padding:2px 5px}.duel3d .hand .card .action-chip,.duel3d[lang=en] .hand .card .action-chip{bottom:49px;top:auto;font-size:8px;padding:2px 4px;background:#183e32ed;border:1px solid #acc8aa55}.duel3d .hand .card.selected,.duel3d .hand .card:hover{transform:translateY(-6px);border-color:#f9dd9e;box-shadow:0 0 0 1px #f3cc81,0 0 23px #e9d99744}.duel3d .hand-label{display:none}
.duel3d .action-stage{top:32%;width:570px;max-width:65vw;padding:12px;opacity:1;background:#122c2de8;box-shadow:0 12px 45px #0b252b88;z-index:50}.duel3d .action-portrait .action-art{height:82px}.duel3d .action-stage .action-portrait strong{font-size:13px}.duel3d .action-stage .action-versus b{font-size:30px}.duel3d .response:not(.discard-panel){top:auto;bottom:204px;width:max-content;max-width:75vw;min-width:420px;padding:12px 18px;background:#182c2af5;z-index:65!important}.duel3d .response p{font-size:12px}.duel3d .response button{font-size:12px;padding:9px 12px}.duel3d .discard-panel{position:absolute;top:auto;bottom:150px;left:50%;right:auto;transform:translateX(-50%);width:500px;max-width:65vw;background:#1b322df5}.duel3d .combat-call{display:none}.duel3d .winner{position:absolute;left:50%;top:35%;transform:translate(-50%,-50%);width:540px;max-width:80vw;z-index:80;background:#112c2bf5;box-shadow:0 20px 80px #092d36ba;pointer-events:auto}.duel3d .toast{z-index:150;bottom:220px!important}.duel3d .camera-focus{filter:none;outline:0!important;box-shadow:none!important}.duel3d .quick-guide-target{outline-offset:-2px!important}
#duel3d-hero{position:fixed;inset:0;z-index:90;display:flex;align-items:center;justify-content:center;gap:45px;pointer-events:none;opacity:0;visibility:hidden;background:radial-gradient(ellipse at 40% 45%,#c5b77842,transparent 65%),linear-gradient(90deg,#03191cde,#0e292add 70%,#03191cd9);transition:opacity .3s}#duel3d-hero.show{opacity:1;visibility:visible}#duel3d-hero img{height:76vh;width:36vw;object-fit:contain;filter:drop-shadow(0 0 30px #dcca8066);mask-image:linear-gradient(0deg,transparent,#000 15%,#000 90%,transparent);transform:translateY(25px);transition:transform 1.5s}#duel3d-hero.show img{transform:translateY(0)}#duel3d-hero>div{max-width:40vw;color:#f0dcac;text-shadow:0 2px 20px #132924}#duel3d-hero small{letter-spacing:5px;font-size:12px}#duel3d-hero strong{display:block;font:46px/1.4 SimSun,serif;letter-spacing:4px;margin:22px 0}#duel3d-hero span{font-size:14px;letter-spacing:2px}
@media(min-width:1000px) and (max-height:680px){.duel3d .master{width:139px;min-height:112px;padding:7px 9px;gap:3px}.duel3d .master .master-sub{display:none}.duel3d .master .hp b{font-size:25px}.duel3d .master .grave-link{font-size:9px;padding:2px}.duel3d .master-mine{bottom:165px}.duel3d .master-foe{top:66px}.duel3d .side{width:185px;top:104px;max-height:calc(100% - 270px);right:18px}.duel3d .side .inspect-art{height:82px}.duel3d .side .inspect strong{font-size:15px}.duel3d .side .inspect p{font-size:10px}.duel3d .side .guide-panel,.duel3d .side .quick-guide-coach,.duel3d .side .tutorial-coach{padding:8px}.duel3d .side .guide-panel strong{font-size:11px}.duel3d .scene-brand{top:64px;right:20px}.duel3d .scene-brand small{display:none}.duel3d .scene-brand span{font-size:18px}.duel3d .battle-hud{height:35px;top:10px}.duel3d .action-dock,.duel3d[lang=en] .action-dock{bottom:147px;max-width:183px;right:18px}.duel3d .action-dock .hint{font-size:10px;padding:5px}.duel3d .action-dock button{min-height:32px;padding:6px 9px;font-size:11px}.duel3d .hand{height:111px;width:calc(100% - 240px);gap:7px}.duel3d .hand .card,.duel3d[lang=en] .hand .card{height:99px;flex-basis:81px;min-width:81px;max-width:81px;grid-template-rows:52px 29px 18px}.duel3d .hand .card .card-art{height:52px}.duel3d .hand .card>strong{font-size:9px}.duel3d .hand .card .action-chip{bottom:47px;font-size:7px}.duel3d .play-controls,.duel3d .choice-prompt,.duel3d[lang=en] .choice-prompt{bottom:112px;min-height:37px;padding:5px 8px;max-width:calc(100% - 360px);gap:8px}.duel3d .play-summary{max-width:135px}.duel3d .play-summary strong{font-size:11px}.duel3d .play-actions button,.duel3d[lang=en] .play-actions button{font-size:10px;padding:5px 7px;min-height:28px}.duel3d .row .unit .unit-title,.duel3d[lang=en] .row .unit .unit-title{font-size:9px;width:125px;padding:2px 4px}.duel3d .row .unit .unit-stats,.duel3d .row .unit.defense-form .unit-stats{top:calc(100% + 17px);font-size:11px;min-height:17px;padding:2px 4px;width:94px}.duel3d .spell-slot>span:not(.slot-number){font-size:8px;width:115px}.duel3d .action-stage{top:34%;width:500px}.duel3d .action-stage .action-art{height:64px}.duel3d .response:not(.discard-panel){bottom:154px;padding:8px 15px;min-width:360px}.duel3d .response p{margin-bottom:5px}.duel3d .response button{font-size:11px;padding:7px 10px}.duel3d .discard-panel{bottom:116px}.duel3d .game .nav button{padding:6px;font-size:10px}}
/* Fix the flat fallback's hidden creature labels, independent of 3D support. */
html:not(.duel3d) .row .unit.hidden-unit .unit-title,html:not(.duel3d) .row .unit.hidden-unit .unit-meta,html:not(.duel3d) .row .unit.hidden-unit .unit-stats{flex-shrink:0;line-height:1.1;margin:0;min-height:0}
@media(min-width:1000px) and (max-height:680px){html:not(.duel3d) .row .unit.hidden-unit{gap:1px;padding:4px}html:not(.duel3d) .row .unit.hidden-unit .unit-meta{display:none}}
.showcase-entry{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin-top:12px;padding:12px 14px;border-color:#c5b37a77;background:linear-gradient(110deg,#2c473d,#13312a)}.showcase-entry span{font-size:14px;color:#ecd6a3;white-space:nowrap}.showcase-entry small{font-size:10px;color:#b6cdbf;text-align:right}
#duel3d-view{background:linear-gradient(180deg,#25494d70,#65887c45 55%,#1b4148a8),url('home-mountains-v2.jpg') center 37%/cover}
.duel3d .side .tutorial-coach small,.duel3d .side .tutorial-coach strong{display:block}.duel3d .side .tutorial-coach strong{margin-top:4px;line-height:1.4}
.duel3d .row .unit .unit-stats,.duel3d .row .unit.defense-form .unit-stats,.duel3d .row .unit.hidden-unit .unit-stats{top:calc(100% + var(--name-height,21px) + 1px)}
.duel3d .hand{background:linear-gradient(0deg,#0a262cec,#12383055 55%,transparent);border-radius:0}
.duel3d .side{bottom:302px;max-height:none}.duel3d .side.has-detail .tutorial-coach,.duel3d .side.has-detail .guide-panel{display:none}.duel3d .side .inspect{margin-bottom:8px}
@media(min-width:1000px) and (max-height:680px){.duel3d .side{bottom:245px;max-height:none}.duel3d .side .inspect-art{display:none}.duel3d .side.has-detail>.inspect{padding:8px 10px}.duel3d .side .inspect strong{font-size:15px}.duel3d .side .inspect p{font-size:11px;line-height:1.45;margin:5px 0}.duel3d .side.has-detail .quick-guide-coach{display:none}.duel3d .battle-hud,.duel3d[lang=en] .battle-hud{grid-template-columns:135px 280px 1fr}.duel3d .duel-pulse{font-size:10px}}
.duel3d .action-stage{top:132px;transform:translateX(-50%);width:540px}.duel3d .action-stage .action-art,.duel3d .action-stage .action-card-back,.duel3d .action-stage .action-master-seal{display:none}.duel3d .action-stage .action-portrait{grid-template-columns:1fr;grid-template-rows:auto auto auto;min-height:76px;padding:8px}.duel3d .action-stage .action-portrait>*{grid-column:1;grid-row:auto}.duel3d .action-stage .action-portrait strong{font-size:13px;line-height:1.2}.duel3d .action-stage .action-portrait b{font-size:21px}.duel3d .action-stage .action-versus small{font-size:9px}.duel3d .action-stage .cast-copy p{font-size:11px}
@media(min-width:1000px) and (max-height:680px){.duel3d .action-stage{top:109px;width:480px;padding:8px}.duel3d .action-stage .action-portrait{min-height:58px;padding:5px}.duel3d .action-stage .action-portrait strong{font-size:11px}.duel3d .action-stage .action-versus b{font-size:23px}.duel3d .action-stage-title{margin-bottom:6px;padding-bottom:6px}}
.scene-brand{display:none}.duel3d .scene-brand{display:block}
@media(min-width:1000px) and (max-height:680px){.duel3d .row .unit .unit-title,.duel3d .row .unit.defense-form .unit-title,.duel3d[lang=en] .row .unit .unit-title{width:91px;font-size:9px;padding:2px;line-height:1.1}.duel3d .row .unit .unit-stats,.duel3d .row .unit.defense-form .unit-stats,.duel3d .row .unit.hidden-unit .unit-stats{width:85px;gap:7px;font-size:10px}.duel3d .spell-slot>span:not(.slot-number),.duel3d[lang=en] .spell-slot>span:not(.slot-number){width:90px;font-size:8px}}
.duel3d .action-stage{animation:none}.duel3d .side .review-log{display:none}
/* v0.26: shared layout reservations drive both the WebGL camera and DOM controls. */
.duel3d .hand{height:var(--hand-h);width:calc(100% - 32px);max-width:1440px;gap:10px;padding:12px 10px 6px;justify-content:safe center;scroll-padding:12px;scrollbar-width:thin;touch-action:pan-x;background:linear-gradient(0deg,#092328ed,#12383066 72%,transparent)}
.duel3d .hand .card,.duel3d[lang=en] .hand .card{height:var(--hand-card-h);width:var(--hand-card-w);min-width:var(--hand-card-w);max-width:var(--hand-card-w);flex-basis:var(--hand-card-w);grid-template-rows:minmax(0,1fr) 34px 23px;gap:0;padding:0}
.duel3d .hand .card .card-art{height:100%;min-height:0;background-size:100% 100%,cover}
.duel3d .hand .card>strong,.duel3d[lang=en] .hand .card>strong{font-size:12px;line-height:1.2;padding:3px 5px;letter-spacing:0;display:flex;align-items:center;justify-content:center}
.duel3d .hand .card .stats{font-size:11px;padding:3px 6px}
.duel3d .hand .card .cost{width:24px;height:24px;font-size:12px;top:4px;left:4px}
.duel3d .hand .card .action-chip,.duel3d[lang=en] .hand .card .action-chip{bottom:57px;font-size:9px;padding:3px 5px}
.duel3d .play-controls,.duel3d .choice-prompt,.duel3d[lang=en] .choice-prompt{bottom:calc(var(--hand-h) + 4px);max-width:calc(100% - var(--rail-left) - var(--rail-right) - 20px);min-height:46px;gap:10px;padding:6px 10px;left:calc(50% + (var(--rail-left) - var(--rail-right))/2)}
.duel3d .play-actions button,.duel3d[lang=en] .play-actions button{font-size:12px;min-height:34px;padding:7px 10px}
.duel3d .play-summary{max-width:156px}.duel3d .play-summary strong{font-size:13px}
.duel3d .master-mine{bottom:calc(var(--hand-h) + 16px)}
.duel3d .action-dock,.duel3d[lang=en] .action-dock{bottom:calc(var(--hand-h) + 12px);max-width:calc(var(--rail-right) - 32px)}
.duel3d .side{display:block;width:calc(var(--rail-right) - 30px);top:130px;bottom:calc(var(--hand-h) + 144px);max-height:none}
.duel3d .side .inspect-art{height:130px}.duel3d .side .inspect p{font-size:12px;line-height:1.65}
.duel3d .row .unit .unit-title,.duel3d .row .unit.defense-form .unit-title,.duel3d[lang=en] .row .unit .unit-title,.duel3d .row .unit.hidden-unit .unit-title{width:var(--field-label-w);max-width:none;font-size:12px;line-height:1.15;padding:3px 4px}
.duel3d .row .unit .unit-stats,.duel3d .row .unit.defense-form .unit-stats,.duel3d .row .unit.hidden-unit .unit-stats{width:var(--field-stat-w);font-size:15px;gap:12px;padding:3px 5px;min-height:23px}
.duel3d .row .unit .unit-stats b{font-size:10px}
.duel3d .spell-slot>span:not(.slot-number),.duel3d[lang=en] .spell-slot>span:not(.slot-number){width:var(--field-label-w);font-size:11px;padding:3px 4px}
.duel3d .response:not(.discard-panel){bottom:calc(var(--hand-h) + 66px)}
.duel3d .discard-panel{bottom:calc(var(--hand-h) + 4px)}
.duel3d .toast{bottom:calc(var(--hand-h) + 65px)!important}
.duel3d .game .nav{flex-wrap:nowrap;gap:2px}.duel3d .game .brand small{font-size:9px;letter-spacing:1px}
@media(min-width:1000px) and (max-height:719px){
 .duel3d .hand{gap:8px}.duel3d .hand .card>strong,.duel3d[lang=en] .hand .card>strong{font-size:11px}.duel3d .hand .card .stats{font-size:10px}
 .duel3d .master{width:130px;min-height:110px;padding:7px 8px;gap:3px}.duel3d .master-foe,.duel3d .master-mine{left:16px}.duel3d .master-foe{top:64px}.duel3d .master .master-sub{display:none}.duel3d .master .hp b{font-size:25px}.duel3d .master .grave-link{font-size:9px;padding:2px}
 .duel3d .side{top:100px;right:16px;bottom:calc(var(--hand-h) + 122px)}.duel3d .side .inspect-art{display:none}.duel3d .side.has-detail>.inspect{padding:8px 10px}.duel3d .side .inspect p{font-size:11px;line-height:1.5}.duel3d .side .inspect strong{font-size:16px}
 .duel3d .action-dock,.duel3d[lang=en] .action-dock{right:16px}.duel3d .action-dock button,.duel3d[lang=en] .action-dock button{padding:7px 9px;font-size:11px;min-height:33px}
 .duel3d .row .unit .unit-title,.duel3d .row .unit.defense-form .unit-title,.duel3d[lang=en] .row .unit .unit-title,.duel3d .row .unit.hidden-unit .unit-title{font-size:10px;padding:2px 3px}
 .duel3d .row .unit .unit-stats,.duel3d .row .unit.defense-form .unit-stats,.duel3d .row .unit.hidden-unit .unit-stats{font-size:12px;gap:8px;min-height:19px;padding:2px 4px}.duel3d .row .unit .unit-stats b{font-size:9px}
 .duel3d .spell-slot>span:not(.slot-number),.duel3d[lang=en] .spell-slot>span:not(.slot-number){font-size:10px}
 .duel3d .play-actions button,.duel3d[lang=en] .play-actions button{font-size:11px;padding:6px 8px;min-height:32px}.duel3d .play-summary{max-width:118px}.duel3d .play-summary strong{font-size:11px}.duel3d .play-summary small{font-size:9px}
 .duel3d .response:not(.discard-panel){bottom:calc(var(--hand-h) + 58px)}
}
.duel3d .row .unit .unit-stats{white-space:nowrap}
@media(min-width:1000px) and (max-height:819px){
 .duel3d .row .unit .unit-title,.duel3d .row .unit.defense-form .unit-title,.duel3d[lang=en] .row .unit .unit-title,.duel3d .row .unit.hidden-unit .unit-title{top:auto;bottom:0;background:#112e29ed;font-size:10px}
 .duel3d .row .unit .unit-stats,.duel3d .row .unit.defense-form .unit-stats,.duel3d .row .unit.hidden-unit .unit-stats{top:calc(100% + 2px)}
}
/* Keep both players' vitals separate when English wraps in a shallow window. */
@media(min-width:1000px) and (max-height:719px){
 .duel3d .master{height:126px;min-height:126px;max-height:126px;gap:2px;padding:6px 8px;justify-content:flex-start}
 .duel3d .master-name,.duel3d[lang=en] .master-name{font:600 10px/1.15 system-ui,sans-serif;max-width:110px;flex:none}
 .duel3d .master .vitals{gap:3px;margin:0;flex:none}
 .duel3d .master .hp{font-size:10px;line-height:1}.duel3d .master .hp b{font-size:23px;line-height:1}
 .duel3d .master .track{height:2px;margin-top:3px;width:105px}
 .duel3d .master .qi{font-size:10px;line-height:1.15;margin-top:0;padding:3px 5px}
 .duel3d .master .grave-link{font-size:9px;line-height:1.15;padding:2px;flex:none}
}
