/* Full-screen game stage. Native DOM controls sit over a persistent Canvas scene. */
:root{--gold:#e4bf77;--bright:#ffe4a4;--line:#caa25e4d}
html,body{width:100%;min-height:100%;overflow-x:hidden}body{background:#070e19 url('./assets/court.webp') center/cover fixed no-repeat;background-blend-mode:normal}body:before{content:'';position:fixed;inset:0;pointer-events:none;z-index:0;background:radial-gradient(ellipse at 53% 42%,#102d3e22 0%,#060c1688 70%,#020712d9 100%)}
#court-canvas{position:fixed;inset:0;width:100%;height:100%;z-index:20;pointer-events:none}#app{position:relative;min-height:100dvh}.scene-ready #app .play-area .card,.scene-ready #app .menu-cards .card{opacity:0!important;box-shadow:none!important}.scene-ready #app .play-area .card:hover{transform:none!important}.scene-ready #app .play-area .card.selected{transform:translateY(-7px)}
.topbar{position:relative;z-index:30;height:62px;max-width:none;margin:0;padding:13px 27px;border:0;background:none;pointer-events:none}.topbar button{pointer-events:auto}.brand{gap:10px;filter:drop-shadow(0 3px 8px #000)}.brand-mark{font-size:32px;line-height:1}.brand-name{font-size:18px;letter-spacing:4px}.brand-en{font-size:7px;letter-spacing:2.4px}.top-actions{gap:8px}.top-actions button{font-size:12px;width:auto;min-width:35px;min-height:35px;padding:7px 10px;border-radius:50%;background:radial-gradient(#12243bb3,#07111fcc);border:1px solid #b2935755;box-shadow:0 3px 12px #0006}.top-actions .edition{margin-right:10px;font-size:9px;letter-spacing:2px;color:#b4b5af}
.game-layout{position:relative;display:block;margin:0;max-width:none;width:100%;height:calc(100dvh - 62px);min-height:730px;padding:0}.rivals{position:absolute;left:24px;top:5%;bottom:7%;width:86px;padding:0;border:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;z-index:26}.sidebar-title,.sidebar-bottom{display:none}.rival{height:62px;width:76px;border:0;padding:0;justify-content:center;flex-shrink:0;background:none!important}.rival .avatar{width:51px;height:51px;border:2px solid #d0ae75;box-shadow:0 5px 12px #000b,inset 0 0 0 2px #0c1c2c}.rival.me .avatar{border-color:#f7dba1;box-shadow:0 0 18px #dcb46844,0 5px 12px #000b}.rival.next:before{content:'◆';font-size:11px;left:0;top:20px;text-shadow:0 0 8px #ffc76d}.rival-info{position:absolute;left:64px;width:100px;top:16px;pointer-events:none;opacity:0;transform:translateX(-8px);transition:.15s}.rival:hover .rival-info,.rival:focus-visible .rival-info{opacity:1;transform:none}.rival-name{font-size:12px;padding:5px 8px;background:#08192dee;border:1px solid #ae945566;border-radius:3px;white-space:nowrap}.rival-hp,.rival-sub,.hp-line{display:none}.rival:after{content:attr(data-hp);position:absolute;bottom:0;left:42px;font:700 15px Georgia,serif;color:#ffe2d2;min-width:24px;min-height:24px;border-radius:50%;background:radial-gradient(#a74353,#5d1525);border:1px solid #d2a179;box-shadow:0 2px 7px #000b;display:grid;place-items:center;padding:1px 4px}.rival.out .avatar{filter:grayscale(1)}
.play-area{position:absolute;left:130px;right:38px;top:0;bottom:0;min-width:0}.roundbar{position:absolute;left:20px;right:22px;top:1%;height:62px;margin:0;z-index:28;pointer-events:none}.roundbar button{pointer-events:auto}.round-badge{gap:10px;min-width:130px;filter:drop-shadow(0 2px 5px #000)}.round-number{font-size:37px;color:#e6cd99}.round-label{font-size:10px}.opponent-label{font-size:10px;color:#c0c6c7;position:absolute;left:50%;transform:translateX(-50%);padding:8px 24px;background:radial-gradient(ellipse,#122136af,transparent 75%);min-width:210px}.opponent-label b{font-size:16px;letter-spacing:3px;margin-top:6px}.coins{filter:drop-shadow(0 2px 6px #000);background:linear-gradient(90deg,transparent,#132337bb);border-radius:30px;padding:4px 12px 4px 8px}.coin-icon{width:34px;height:34px;font-size:23px;box-shadow:inset 0 0 0 3px #e3c88855,0 2px 12px #d2a34233}.coin-value{font-size:36px}.coin-meta{font-size:9px}
.market-section{position:absolute;left:8%;right:5%;top:13%;height:29%}.market-section>.section-line{justify-content:center;margin:0 0 10px;gap:12px}.section-line:after{display:none}.section-line h2{font-size:12px;letter-spacing:3px;color:#d3c09c}.section-line .small{font-size:10px;color:#a6b3bc}.section-line button{font-size:10px}.market-section .section-line h2{display:none}.shop-container{position:absolute;left:28px;right:16px;top:30px;bottom:0;min-height:0;padding:0 56px 0 0}.shop-row{height:100%;min-height:0;justify-content:center;align-items:flex-start;gap:14px;overflow:visible;padding:0}.shop-slot{width:clamp(103px,8.6vw,145px);flex:0 1 145px;min-width:0;transform:translateY(calc(var(--fan-lift)*8px)) rotate(calc(var(--fan)*2.6deg));transform-origin:50% 110%;transition:none}.shop-slot .card,.card-back{height:clamp(147px,20vh,202px);width:100%}.card-back{border-color:#c6a25740;background:radial-gradient(#29465822,#071b2844);box-shadow:inset 0 0 0 4px #b8945144;color:#b9a06e44}.buy-label{margin-top:12px;height:20px;font-size:11px;transform:rotate(calc(var(--fan)*-2.6deg));position:relative;z-index:26}.buy-label button{min-height:24px;color:#e4c896;text-shadow:0 2px 4px #000;padding:2px 7px;background:#06182a99;border-radius:15px;border:1px solid #c7aa6344}.shop-slot.sold .card-back{opacity:.1}.shop-slot.sold .buy-label{opacity:0}.shop-tools{right:-17px;top:22px;gap:16px;z-index:27}.round-control{font-size:10px;gap:6px;width:47px}.round-control .control-symbol{width:43px;height:43px;font-size:31px;box-shadow:0 4px 14px #0009,inset 0 0 0 3px #d3ac5444;background:radial-gradient(#254059,#091a2c);border-color:#c6a368}.round-control.active .control-symbol{background:radial-gradient(#72a8c3,#183955);box-shadow:0 0 22px #7be1ff66,inset 0 0 0 3px #bbeeff44}.deck-anchor{position:absolute;width:63px;height:97px;left:-50px;top:80px;pointer-events:none}
.board-section{position:absolute;top:49%;left:4%;right:3%;margin:0}.board-section>.section-line{margin-bottom:18px;justify-content:space-between}.board-section>.section-line h2{display:none}.board-section>.section-line .small:last-child{color:#94a5ab;font-size:9px;letter-spacing:3px}.board-row{gap:clamp(7px,1vw,16px)}.board-row .card,.board-row .empty-slot{height:clamp(145px,19vh,190px);border-radius:9px}.empty-slot{background:radial-gradient(ellipse at 50% 90%,#78bad00c,#02101d55);border:1px solid #b1a27528;box-shadow:0 4px 0 #0002,inset 0 0 15px #0004;color:#c2aa6c22}.empty-slot:before{inset:8px;border-color:#cab37613}.empty-slot:after{font-size:9px;color:#b29d6c66}.seat{font-size:8px;letter-spacing:2px;bottom:-17px;color:#b5a88088}.formation-ribbon{position:absolute;top:calc(100% + 30px);left:8%;right:8%;border:0;padding:0;margin:0;min-height:45px;background:radial-gradient(ellipse,#0c243ba1,transparent 80%);z-index:26}.formation-main{gap:9px}.formation-symbol{font-size:26px;color:#d9c48e;text-shadow:0 0 18px #f9d37c77}.formation-name{font-size:15px;letter-spacing:3px}.formation-desc{font-size:10px;color:#b8c5c9;max-width:470px}.formation-button{border-radius:20px;padding:8px 15px;font-size:11px;background:linear-gradient(#1f3a51,#0b2033);border:1px solid #c3a36588;box-shadow:0 3px 12px #0006}.suit-traits{position:absolute;left:20%;right:20%;top:calc(100% + 78px);justify-content:center;gap:22px;margin:0;z-index:26}.suit-trait{font-size:10px}.suit-trait strong{font-size:18px}.suit-trait.active{filter:drop-shadow(0 0 8px #eaca7277)}.suit-trait .pips{font-size:7px;letter-spacing:2px}
.bottom-zone{position:absolute;left:24%;right:0;bottom:3%;margin:0;gap:20px;align-items:center}.reserve-section{flex:0 1 340px}.reserve-section .section-line{margin-bottom:10px;justify-content:center}.reserve-section .section-line h2{font-size:10px;letter-spacing:3px}.reserve-section .section-line .small{font-size:9px}.reserve-row{gap:9px}.reserve-row .card,.reserve-row .empty-slot{height:91px}.selection-bar{justify-content:center;font-size:10px;margin-top:12px;white-space:nowrap;gap:9px}.selection-bar button{font-size:10px;color:#f0cb87;min-height:22px}.turn-tools{gap:26px;margin-left:auto;align-items:center}.upgrade-wrap{margin:0}.upgrade-button{padding:12px 8px;width:110px;border:0;background:radial-gradient(ellipse,#213a50bb,transparent 70%);clip-path:none}.upgrade-button .tier-icon{font-size:20px;letter-spacing:1px}.upgrade-button .upgrade-label{font-size:11px}.upgrade-button .cost{font-size:11px;color:#e6c985}.turn-action{min-width:135px;margin:0}.turn-action .battle-button{border-radius:50%;clip-path:none;min-width:112px;min-height:112px;width:112px;padding:11px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:radial-gradient(circle at 40% 30%,#ba5960,#8a2837 57%,#501323 100%);border:3px double #dfbd7a;box-shadow:0 6px 0 #371121,0 10px 24px #000a,inset 0 0 0 5px #5d223baa,inset 0 0 20px #e6817122;color:#ffe4bb;font-size:16px;letter-spacing:4px;text-indent:4px;margin:auto;text-shadow:0 2px 3px #592229}.battle-glyph{font-size:33px;line-height:1.1;text-indent:0;letter-spacing:0}.turn-action .battle-button:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 8px 0 #371121,0 15px 30px #000a,0 0 35px #e58b623b,inset 0 0 0 5px #5d223baa}.turn-action .hint{font-size:8px;color:#b4b0a1;margin-top:13px;max-width:145px;line-height:1.6}.player-seal{position:absolute;bottom:5%;left:5%;width:105px;height:117px;display:flex;flex-direction:column;align-items:center;justify-content:center;filter:drop-shadow(0 7px 15px #0009);z-index:26}.player-seal>span{display:grid;place-items:center;width:77px;height:77px;border-radius:50%;font:45px Georgia,serif;background:radial-gradient(#315b71,#0e243b 70%);border:3px double #d3b77d;color:#e7cf9b;box-shadow:inset 0 0 0 4px #112838,0 0 25px #739bb720}.player-seal strong{position:absolute;right:6px;top:66px;min-width:36px;min-height:36px;border-radius:50%;display:grid;place-items:center;font:700 22px Georgia,serif;color:#ffe2d7;background:radial-gradient(#b45464,#5f142a);border:2px solid #be936f}.player-seal small{margin-top:11px;font:11px var(--serif);letter-spacing:3px;color:#c4b087}.coach{position:absolute;top:40%;left:18%;right:18%;padding:7px 18px;min-height:40px;border:0;border-radius:30px;background:linear-gradient(90deg,transparent,#10283cc7,transparent);font-size:11px;text-align:center;line-height:1.8;z-index:25}.coach strong{font-size:11px;color:#dfbf7f}.coach button{font-size:13px;min-width:20px}.bottom-status{position:absolute;left:0;right:0;bottom:0;margin:0;font-size:8px;letter-spacing:.5px;opacity:.5;pointer-events:none}
/* A duel is an arena, not a rearranged form. */
.combat-stage{position:absolute;inset:13% 2% 2%;padding:0}.combat-stage>.combat-head:first-child{position:absolute;top:-20px;left:2%;right:2%;margin:0;font-size:14px;letter-spacing:2px}.combat-stage>.board-row:nth-child(2){position:absolute;top:4%;left:2%;right:2%}.combat-stage .board-row .card{height:clamp(151px,20vh,205px)}.combat-center{position:absolute;top:31%;left:8%;right:8%;height:125px;min-height:0;gap:8px;pointer-events:none}.vs-symbol{font-size:35px;color:#d5b98077;letter-spacing:9px;text-shadow:0 0 30px #ffe3a155}.combat-message{font-size:13px;min-height:24px;text-shadow:0 2px 5px #000;color:#e9d8ba}.combat-index{font-size:9px;color:#9fadb3;letter-spacing:2px}.combat-stage>.board-row:nth-child(4){position:absolute;top:52%;left:2%;right:2%}.combat-stage>.combat-head:nth-child(5){position:absolute;top:calc(52% + clamp(151px,20vh,205px) + 13px);left:2%;right:2%;margin:0!important;font-size:12px}.combat-progress{position:absolute;left:20%;right:20%;bottom:5.5%;margin:0;height:2px;background:#a9997022}.combat-controls{position:absolute;bottom:0;left:0;right:0;gap:10px;margin:0;z-index:28}.combat-controls .ghost{border-radius:18px;padding:7px 14px;font-size:10px;background:#0a1b2ba1;border-color:#bdaa6666}.battle-outcome{position:absolute;left:23%;right:23%;top:31%;padding:8px 0;margin:0;border:0;background:radial-gradient(ellipse,#0b1931ed 20%,#0b1931bb 55%,transparent 80%);z-index:30}.battle-outcome~*{pointer-events:none}.battle-outcome .outcome-title{font-size:25px;margin-bottom:8px;letter-spacing:5px;text-shadow:0 0 22px #f7d69d77}.battle-outcome p{font-size:10px;margin:0 0 10px;line-height:1.7}.battle-outcome button.ornate{padding:9px 22px;font-size:12px}.battle-outcome .quiet{font-size:10px}.replay-banner{position:absolute;top:9%;left:20%;right:20%;padding:5px 12px;font-size:10px;margin:0;border:0;background:linear-gradient(90deg,transparent,#584a28aa,transparent);z-index:25}.empty-battle{height:clamp(151px,20vh,205px);padding:50px 10px;font-size:12px;color:#81919b}
/* The title is a live card altar, with parallax and a breathing magical orbit. */
.menu{min-height:calc(100dvh - 62px);padding:30px 20px 40px;overflow:hidden}.menu-content{position:relative;z-index:26;pointer-events:none}.menu-content button{pointer-events:auto}.menu .eyebrow{font-size:10px;letter-spacing:7px;margin-bottom:13px}.menu h1{font-size:clamp(48px,5.5vw,76px);letter-spacing:17px;text-shadow:0 4px 0 #1a2026,0 7px 25px #000d;line-height:1.35}.title-rule{font-size:11px;letter-spacing:6px}.menu-cards{margin:30px 0 28px;height:235px;pointer-events:none}.menu-cards .card{width:145px;height:215px}.menu-caption{font-size:14px;color:#d1b788;margin-bottom:18px;letter-spacing:4px}.menu-buttons{min-width:236px;gap:9px}.menu-buttons .ornate{padding:14px 30px;font-size:18px;letter-spacing:5px;filter:drop-shadow(0 7px 12px #0007)}.menu-foot{font-size:10px;margin-top:17px;opacity:.7}.menu-orbit{position:absolute;width:590px;height:590px;border:1px solid #dabb6344;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%);box-shadow:0 0 100px #8ddaf811,inset 0 0 90px #76b2ce11;pointer-events:none}.menu-orbit:before,.menu-orbit:after{content:'';position:absolute;border-radius:50%;border:1px dashed #dabb6322;inset:20px;animation:orbit-spin 80s linear infinite}.menu-orbit:after{inset:-28px;border-style:solid;border-color:#dabb6317;animation:none}.result-menu{position:relative;z-index:25;max-width:760px;margin:0 auto;padding:20px 20px 35px}.result-hero{margin-bottom:24px}.crown{font-size:57px}.result-hero h1{font-size:34px}.result-stats{margin:22px 0}.result-row{background:linear-gradient(90deg,transparent,#0a1b2dcc,transparent);padding:9px 13px}.result-row.me{background:linear-gradient(90deg,transparent,#a4814366,transparent)}.result-actions button{font-size:12px}.modal-scrim{z-index:100;background:#030b16db;backdrop-filter:blur(12px)}.modal{background:linear-gradient(130deg,#203851f2,#0b182cf5);border:2px solid #b79a6480;box-shadow:0 30px 120px #000c,inset 0 0 0 5px #070f1b99;border-radius:8px}.modal:before{inset:8px;border-radius:4px}.modal-title h2{font-size:22px}.modal .card{opacity:1!important}.scene-ready .card:focus-visible{outline:3px solid #ffe7a8!important;opacity:.12!important}
@keyframes orbit-spin{to{transform:rotate(360deg)}}
@media(min-height:950px) and (min-width:1000px){.market-section{top:15%}.board-section{top:50%}.bottom-zone{bottom:4%}.coach{top:41%}.suit-traits{top:calc(100% + 82px)}}
@media(max-width:1100px){.game-layout{min-height:700px}.rivals{left:10px;width:70px}.rival{width:65px;height:57px}.rival .avatar{width:44px;height:44px}.rival:after{left:35px;font-size:13px;min-height:21px;min-width:21px}.play-area{left:86px;right:23px}.shop-row{gap:10px}.market-section{left:8%;right:3%}.shop-container{left:10px;right:5px;padding-right:42px}.shop-tools{right:-10px}.round-control .control-symbol{width:37px;height:37px;font-size:27px}.deck-anchor{left:-38px;top:85px;width:50px;height:78px}.board-row{gap:9px}.board-row .card,.board-row .empty-slot{height:clamp(134px,18vh,176px)}.formation-ribbon{left:2%;right:2%}.formation-desc{font-size:9px;max-width:335px}.suit-traits{left:10%;right:10%;gap:17px}.bottom-zone{left:20%;gap:13px}.reserve-section{flex-basis:290px}.reserve-row .card,.reserve-row .empty-slot{height:85px}.turn-tools{gap:10px}.upgrade-button{width:87px}.upgrade-button .tier-icon{font-size:17px}.turn-action{min-width:116px}.turn-action .battle-button{width:99px;min-width:99px;min-height:99px;font-size:14px}.battle-glyph{font-size:30px}.player-seal{left:2%;width:90px}.player-seal>span{width:67px;height:67px;font-size:37px}.player-seal strong{top:68px;right:4px;min-width:31px;min-height:31px;font-size:20px}.coach{left:10%;right:10%;font-size:10px}.combat-stage .board-row .card{height:clamp(136px,19vh,180px)}.combat-stage>.combat-head:nth-child(5){top:calc(52% + clamp(136px,19vh,180px) + 13px)}.battle-outcome{left:15%;right:15%}}
@media(max-width:780px){.topbar{height:59px;padding:10px 15px}.brand-name{font-size:16px;letter-spacing:3px}.brand-mark{font-size:27px}.brand-en{font-size:6px;letter-spacing:2px}.top-actions{gap:5px}.top-actions button{font-size:10px;padding:6px;min-height:32px;min-width:32px}.top-actions .edition{display:none}.game-layout{height:calc(100dvh - 59px);min-height:750px}.rivals{position:absolute;left:12px;right:12px;width:auto;top:0;bottom:auto;height:46px;flex-direction:row;justify-content:center;gap:12px}.rival{width:42px;height:44px}.rival .avatar{height:33px;width:33px;border-width:1px}.rival:after{left:25px;bottom:0;min-width:18px;min-height:18px;font-size:11px;border-width:1px}.rival.next:before{font-size:6px;left:0;top:15px}.rival-info{display:none}.play-area{left:15px;right:15px;top:53px}.roundbar{left:7px;right:7px;top:0;height:46px}.round-number{font-size:28px}.round-label{font-size:8px}.round-badge{gap:8px;min-width:90px}.coin-icon{width:25px;height:25px;font-size:17px}.coin-value{font-size:28px}.coin-meta{font-size:7px}.coins{gap:7px;padding:4px 7px}.opponent-label{min-width:150px;padding:4px 10px;font-size:8px}.opponent-label b{font-size:12px;letter-spacing:2px}.market-section{top:10%;left:8%;right:3%;height:29%}.market-section .section-line{gap:8px}.section-line .small{font-size:9px}.shop-container{left:8px;right:1px;top:29px;padding-right:32px}.shop-row{gap:9px;justify-content:center}.shop-slot{flex:0 1 110px;width:110px;min-width:0;transform:translateY(calc(var(--fan-lift)*5px)) rotate(calc(var(--fan)*2.6deg))}.shop-slot .card,.card-back{height:clamp(124px,19vh,160px)}.buy-label{font-size:9px;margin-top:11px}.buy-label button{font-size:9px;padding:2px 6px;min-height:22px}.shop-tools{right:-12px;top:17px;gap:14px}.round-control{width:34px;font-size:8px;gap:5px}.round-control .control-symbol{width:32px;height:32px;font-size:24px}.deck-anchor{left:-31px;top:72px;width:40px;height:62px}.board-section{left:0;right:0;top:48%}.board-section>.section-line{margin-bottom:14px}.board-section>.section-line .small:last-child{font-size:8px;letter-spacing:2px}.board-row{gap:7px}.board-row .card,.board-row .empty-slot{height:clamp(104px,15.5vh,139px)}.formation-ribbon{top:calc(100% + 24px);left:2%;right:2%;min-height:40px}.formation-name{font-size:12px;letter-spacing:2px}.formation-desc{font-size:9px;max-width:330px}.formation-symbol{font-size:22px}.formation-button{font-size:10px;padding:7px 11px}.suit-traits{top:calc(100% + 70px);left:8%;right:8%;gap:18px}.suit-trait{font-size:9px}.suit-trait strong{font-size:16px}.suit-trait .pips{display:none}.coach{left:8%;right:8%;top:39%;font-size:10px;padding:6px 12px;gap:8px;min-height:34px}.coach strong{font-size:10px}.player-seal{left:0;bottom:5%;width:70px;height:100px}.player-seal>span{width:56px;height:56px;font-size:32px}.player-seal strong{top:57px;right:-1px;min-width:27px;min-height:27px;font-size:18px}.player-seal small{font-size:9px;letter-spacing:1px;margin-top:12px}.bottom-zone{left:16%;right:0;bottom:4%;flex-wrap:nowrap;gap:8px}.reserve-section{flex:0 1 245px;min-width:0}.reserve-row{gap:6px}.reserve-row .card,.reserve-row .empty-slot{height:82px}.reserve-section .section-line h2{font-size:9px;letter-spacing:2px}.reserve-section .section-line .small{font-size:8px}.selection-bar{font-size:8px;gap:6px;margin-top:8px;white-space:normal;line-height:1.5}.selection-bar button{font-size:9px}.turn-tools{width:auto;display:flex;flex-direction:row;align-items:center;gap:5px;margin-left:auto}.upgrade-button{width:76px;flex-direction:column;padding:7px 3px;gap:4px}.upgrade-button .tier-icon{font-size:15px;letter-spacing:0}.upgrade-button .upgrade-label{font-size:9px}.upgrade-button .cost{font-size:9px}.turn-action{min-width:97px}.turn-action .battle-button{width:87px;min-width:87px;min-height:87px;font-size:12px;letter-spacing:3px;text-indent:3px;border-width:2px}.battle-glyph{font-size:25px}.turn-action .hint{font-size:7px;max-width:100px;margin-top:8px}.bottom-status{font-size:7px;opacity:.45}.combat-stage{inset:13% 0 3%}.combat-stage>.combat-head:first-child{font-size:12px;top:-15px}.combat-stage .board-row .card{height:clamp(112px,16vh,150px)}.combat-stage>.combat-head:nth-child(5){top:calc(52% + clamp(112px,16vh,150px) + 10px);font-size:10px}.combat-center{height:105px;top:30%;left:5%;right:5%;gap:7px}.combat-message{font-size:11px}.vs-symbol{font-size:29px}.combat-index{font-size:8px}.combat-controls{gap:8px}.combat-controls .ghost{font-size:9px;padding:7px 11px}.battle-outcome{top:29%;left:10%;right:10%;padding:7px 0}.outcome-title{font-size:21px!important}.battle-outcome p{font-size:9px;margin-bottom:8px}.battle-outcome button.ornate{font-size:11px;padding:8px 17px}.battle-outcome .quiet{font-size:9px}.menu{min-height:calc(100dvh - 59px)}.menu h1{font-size:51px;letter-spacing:9px;text-indent:9px}.menu .eyebrow{font-size:9px;letter-spacing:5px}.menu-cards{height:225px;margin:30px 0 24px}.menu-cards .card{width:135px;height:203px}.menu-orbit{width:510px;height:510px}.modal .card{height:unset}.detail-layout>.card{height:190px}.codex-item .card{height:175px}.scout-board .card{height:113px}}
@media(max-width:500px){.topbar{padding:10px 12px;height:55px}.brand-name{font-size:15px;letter-spacing:2px}.brand-en{font-size:6px;letter-spacing:1.5px}.brand-mark{font-size:25px}.brand{gap:7px}.top-actions{gap:4px}.top-actions button{font-size:9px;min-width:29px;min-height:29px;padding:5px}.game-layout{height:calc(100dvh - 55px);min-height:730px}.rivals{gap:7px;left:7px;right:7px;height:43px}.rival{width:34px;height:40px}.rival .avatar{height:29px;width:29px}.rival:after{left:20px;min-width:17px;min-height:17px;font-size:10px}.play-area{left:12px;right:12px;top:48px}.roundbar{left:0;right:0;height:44px}.round-label{font-size:7px}.round-number{font-size:25px}.opponent-label{min-width:128px;font-size:7px;padding:3px}.opponent-label b{font-size:11px;letter-spacing:1px}.coins{gap:5px}.coin-icon{width:22px;height:22px;font-size:15px}.coin-value{font-size:25px}.coin-meta{display:none}.market-section{left:6%;right:2%;top:10%;height:29%}.market-section .section-line{margin-bottom:7px;gap:7px}.market-section .section-line .small,.market-section .section-line button{font-size:8px}.shop-container{left:5px;right:0;top:25px;padding-right:25px}.shop-row{gap:5px;overflow:visible;padding:0;min-height:0}.shop-slot{flex:1 1 0;width:auto;min-width:0;transform:translateY(calc(var(--fan-lift)*4px)) rotate(calc(var(--fan)*2.6deg))}.shop-slot .card,.card-back{height:116px;min-width:0;border-radius:5px}.buy-label{font-size:8px;margin-top:12px;white-space:nowrap}.buy-label button{font-size:8px;padding:1px 3px;min-height:20px}.shop-tools{right:-10px;top:16px;gap:12px}.round-control{width:29px;font-size:7px}.round-control .control-symbol{width:28px;height:28px;font-size:22px}.deck-anchor{left:-22px;top:61px;width:28px;height:46px}.board-section{top:45%;left:0;right:0}.board-section>.section-line{margin-bottom:12px}.board-section>.section-line .small{font-size:8px}.board-section>.section-line .small:last-child{font-size:7px;letter-spacing:1px}.board-row{gap:4px}.board-row .card,.board-row .empty-slot{height:91px;border-radius:5px}.seat{font-size:7px;letter-spacing:1px;bottom:-14px}.formation-ribbon{top:calc(100% + 25px);left:0;right:0;min-height:45px;gap:4px}.formation-name{font-size:12px;letter-spacing:1px}.formation-name .tiny{font-size:8px}.formation-desc{font-size:8px;max-width:205px;line-height:1.7}.formation-symbol{font-size:20px}.formation-main{gap:7px}.formation-button{font-size:9px;padding:7px 9px}.suit-traits{top:calc(100% + 77px);left:2%;right:2%;gap:0;justify-content:space-between}.suit-trait{font-size:8px;gap:4px}.suit-trait strong{font-size:15px}.coach{top:34%;left:5%;right:5%;font-size:9px;padding:6px 8px;gap:6px;min-height:42px;line-height:1.7}.coach strong{font-size:9px;min-width:40px;white-space:normal}.coach button{min-width:17px;font-size:11px}.player-seal{left:0;bottom:13%;width:57px;height:85px}.player-seal>span{width:46px;height:46px;font-size:27px;border-width:2px}.player-seal strong{top:48px;right:0;min-width:24px;min-height:24px;font-size:17px;border-width:1px}.player-seal small{font-size:8px;letter-spacing:0;margin-top:10px}.bottom-zone{left:20%;right:0;bottom:4%;display:block}.reserve-section{width:calc(100% - 90px);min-width:0}.reserve-row{gap:5px}.reserve-row .card,.reserve-row .empty-slot{height:70px;border-radius:4px}.reserve-section .section-line{gap:5px;margin-bottom:9px;justify-content:flex-start}.reserve-section .section-line h2{font-size:9px;letter-spacing:1px}.reserve-section .section-line .small{font-size:7px}.selection-bar{font-size:8px;gap:6px;line-height:1.6;min-height:25px;margin-top:11px}.selection-bar button{font-size:8px;min-height:23px}.turn-tools{position:absolute;right:-3px;bottom:5px;display:flex;flex-direction:column;gap:7px;width:88px}.upgrade-button{width:88px;flex-direction:row;gap:4px;padding:7px 1px;flex-wrap:wrap}.upgrade-button .tier-icon{font-size:13px}.upgrade-button .upgrade-label{font-size:8px}.upgrade-button .cost{font-size:8px}.turn-action{min-width:83px}.turn-action .battle-button{width:79px;min-width:79px;min-height:79px;font-size:12px;padding:8px}.battle-glyph{font-size:25px}.turn-action .hint{font-size:7px;max-width:90px;margin-top:7px}.bottom-status{bottom:0;font-size:6px;letter-spacing:0}.combat-stage{inset:13% 0 3%}.combat-stage>.board-row:nth-child(2){left:0;right:0;top:5%}.combat-stage>.board-row:nth-child(4){left:0;right:0;top:53%}.combat-stage .board-row .card{height:94px}.combat-center{top:27%;height:112px;left:2%;right:2%;gap:10px}.vs-symbol{font-size:27px;letter-spacing:6px}.combat-message{font-size:10px;line-height:1.8}.combat-index{font-size:8px}.combat-stage>.combat-head:first-child{top:-8px;font-size:11px}.combat-head .tiny{font-size:8px}.combat-stage>.combat-head:nth-child(5){top:calc(53% + 110px);font-size:10px}.combat-controls{bottom:0;gap:6px;flex-wrap:wrap}.combat-controls .ghost{font-size:9px;padding:7px 10px}.combat-progress{bottom:8%;left:8%;right:8%}.battle-outcome{top:27%;left:1%;right:1%;padding:10px 5px;background:radial-gradient(ellipse,#0b1931ed 20%,#0b1931cc 60%,transparent 90%)}.battle-outcome .outcome-title{font-size:20px!important;letter-spacing:4px;margin-bottom:7px}.battle-outcome p{font-size:9px;line-height:1.7;max-width:300px;margin:0 auto 8px}.battle-outcome button.ornate{font-size:10px;padding:8px 15px}.battle-outcome .quiet{font-size:9px;padding:8px}.replay-banner{top:9%;left:8%;right:8%;font-size:8px}.empty-battle{height:94px;padding:35px 5px;font-size:10px}.menu{min-height:calc(100dvh - 55px);padding:25px 15px 40px}.menu h1{font-size:42px;letter-spacing:8px;text-indent:8px}.menu .eyebrow{font-size:8px;letter-spacing:3px;margin-bottom:15px}.title-rule{font-size:9px;letter-spacing:4px}.title-rule:before,.title-rule:after{width:40px}.menu-cards{height:205px;margin:29px 0 23px}.menu-cards .card{width:119px;height:181px}.menu-caption{font-size:12px;letter-spacing:3px;margin-bottom:18px}.menu-buttons{min-width:225px;gap:8px}.menu-buttons .ornate{font-size:17px;padding:14px 30px}.menu-foot{font-size:8px;line-height:1.9;margin-top:16px}.menu-orbit{width:380px;height:380px}.detail-layout>.card{height:158px}.codex-item .card{height:135px}.scout-board .card{height:76px}.modal-title h2{font-size:19px}.result-menu{padding:20px 14px}.result-hero h1{font-size:30px}.result-actions{gap:7px}.result-actions button{padding:10px 14px;font-size:10px}}
@media(prefers-reduced-motion:reduce){.menu-orbit:before{animation:none}.rival-info{transition:none}.turn-action .battle-button:hover{transform:none}}
/* Keep the three physical card zones separated on short desktop viewports. */
@media(min-width:781px){.market-section{top:9%}.board-section{top:44%}.coach{top:40.5%}}
@media(min-width:1000px) and (min-height:950px){.market-section{top:11%}.board-section{top:45%}.coach{top:41%}.bottom-zone{bottom:4%}}
@media(min-width:781px) and (max-height:850px){.game-layout{min-height:660px}.market-section{top:6%}.shop-slot .card,.card-back{height:clamp(115px,18vh,153px)}.board-section{top:40%}.board-row .card,.board-row .empty-slot{height:clamp(104px,17vh,145px)}.coach{top:37%;min-height:34px}.reserve-row .card,.reserve-row .empty-slot{height:clamp(60px,10.5vh,85px)}.formation-ribbon{top:calc(100% + 24px);min-height:38px}.suit-traits{top:calc(100% + 70px)}.bottom-zone{bottom:3%}.rivals{gap:5px}.rival{height:55px}.rival .avatar{width:44px;height:44px}.turn-action .battle-button{width:97px;min-width:97px;min-height:97px}.turn-action .hint{font-size:8px}.selection-bar{margin-top:9px}.reserve-section .section-line{margin-bottom:8px}}
@media(min-width:501px) and (max-width:780px){.market-section{top:9%}.board-section{top:45%}.coach{top:41%}}

html[data-motion='reduced'] .menu-orbit:before{animation:none!important}
/* Public-browser QA: retain true playing-card proportions and separate market metadata from opponent HUD. */
@media(min-width:781px){.market-section>.section-line{justify-content:flex-start;padding-left:55px}.shop-slot{flex:0 0 clamp(94px,13.4vh,140px);width:clamp(94px,13.4vh,140px)}.board-row{width:min(100%,calc(7 * clamp(88px,12.5vh,125px) + 6 * clamp(7px,1vw,16px)));margin-inline:auto}.reserve-section{flex-basis:280px}.reserve-row{max-width:280px;margin-inline:auto}.combat-stage>.board-row:nth-child(2),.combat-stage>.board-row:nth-child(4){left:50%;right:auto;transform:translateX(-50%);width:min(100%,calc(7 * clamp(92px,13vh,133px) + 6 * clamp(7px,1vw,16px)))}}
@media(min-width:781px) and (max-height:850px){.shop-slot{flex-basis:clamp(82px,12vh,103px);width:clamp(82px,12vh,103px)}.board-row{width:min(100%,calc(7 * clamp(78px,11.3vh,96px) + 6 * clamp(7px,1vw,16px)))}.combat-stage>.board-row:nth-child(2),.combat-stage>.board-row:nth-child(4){width:min(100%,calc(7 * clamp(85px,12.5vh,107px) + 6 * clamp(7px,1vw,16px)))}}
/* Occupied reserves need an explicit grid-cell width because their face children are absolutely positioned. */
.reserve-row .card{width:100%}
.combat-reason{font-size:11px;color:#c9b993;letter-spacing:.5px;line-height:1.6;text-align:center;max-width:95%;min-height:17px}.combat-center{gap:7px}.combat-message{font-size:12px;max-width:100%;line-height:1.8}
@media(max-width:500px){.combat-reason{font-size:9px;letter-spacing:0;min-height:15px}.combat-message{font-size:10px}.combat-center{height:124px;gap:5px}}
