@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&family=Rajdhani:wght@500;600;700&display=swap');
:root{font-family:Kanit,system-ui,sans-serif;color:#f3f1de;background:#09130f;font-synthesis:none}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 50% -20%,#214534 0,transparent 48%),#09130f}button{font:inherit;cursor:pointer}button:disabled{opacity:.38;cursor:not-allowed}.app-shell{max-width:1560px;margin:auto;padding:0 26px}.topbar{height:83px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ffffff1c}.brand{display:flex;gap:11px;align-items:center;font-family:Rajdhani,sans-serif;letter-spacing:.09em;line-height:.92}.brand strong{font-size:27px}.brand small{display:block;color:#abbbac;font-size:11px;letter-spacing:.25em;margin-top:8px}.brand-mark{display:grid;place-items:center;width:40px;height:40px;border:2px solid #e7bb67;color:#e7bb67;font-size:29px;font-weight:700;transform:skew(-8deg)}.top-actions{display:flex;align-items:center;gap:9px}.build-tag{font:700 12px Rajdhani,sans-serif;letter-spacing:.14em;color:#c9aa6d;margin-right:14px}.ghost{border:1px solid #60806b85;border-radius:7px;background:#15291f;color:#e9e4ca;padding:9px 14px}.ghost:hover{background:#23422f}.layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:18px;padding-top:24px}.arena-panel,.side-card,.hand-panel{border:1px solid #55715a70;background:#101d17;border-radius:13px;box-shadow:0 16px 40px #0004}.arena-panel{overflow:hidden}.match-header{height:93px;display:flex;align-items:center;justify-content:space-between;padding:18px 25px;background:linear-gradient(90deg,#1a3526,#14251b)}.eyebrow{font:700 12px Rajdhani,sans-serif;letter-spacing:.21em;color:#c7a66c}.match-header h1{font-size:27px;line-height:1;margin:8px 0 0;font-weight:600}.turn-pill{border:1px solid #a1874f;color:#e9c982;border-radius:100px;padding:7px 13px;font-size:13px;background:#a1874f1c}.phase-track{display:flex;border-top:1px solid #ffffff12;border-bottom:1px solid #ffffff18;background:#0b1b14}.phase-step{flex:1;text-align:center;padding:9px 3px;color:#80998a;font:700 13px Rajdhani,sans-serif;letter-spacing:.11em;border-right:1px solid #ffffff13}.phase-step.active{color:#f5d185;background:#a58a4630;box-shadow:inset 0 -3px #d7ae5d}.arena{position:relative;padding:15px 24px 19px;background:radial-gradient(ellipse at center,#315039 0%,#1b3225 36%,#13271d 78%);overflow:hidden}.arena:before{content:"";position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(90deg,transparent 0 90px,#ffffff05 91px 92px),linear-gradient(0deg,#050e0860,transparent 25%,transparent 75%,#050e0860)}.arena>*{position:relative}.fighter{min-height:64px;display:flex;align-items:center;gap:12px;padding:7px 12px;border:1px solid #9bb59a33;border-radius:8px;background:#0a1a13bd}.fighter-enemy{border-color:#bc817b55}.fighter .avatar{display:grid;place-items:center;width:42px;height:42px;border-radius:7px;background:#735245;color:#ffe1c9;font:700 15px Rajdhani,sans-serif}.fighter-player .avatar{background:#376347;color:#d5f4ce}.fighter strong{display:block;font-size:16px;font-weight:600;line-height:1.2}.fighter .eyebrow{font-size:10px}.fighter-stats{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap}.fighter-stats span{min-width:58px;text-align:center;background:#ffffff10;border:1px solid #ffffff15;padding:6px 8px;border-radius:5px;color:#e6d8ad;font:600 16px Rajdhani,sans-serif}.fighter-stats b{font-weight:700}.field-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;max-width:620px;margin:16px auto}.zone{height:153px;display:grid;place-items:center;border:1px dashed #c5d4b462;border-radius:9px;background:#07170d70;transition:.15s;overflow:hidden;position:relative}.zone:before{content:attr(data-label);position:absolute;top:8px;left:10px;z-index:2;color:#f2d89a;font:700 11px Rajdhani,sans-serif;letter-spacing:.13em;text-shadow:0 1px 4px #000}.zone.selectable:hover,.zone.targetable:hover{border-color:#ffcf69;background:#a68b4629;transform:translateY(-2px)}.zone.selected{border:2px solid #ffcd6c;box-shadow:0 0 0 3px #c9993c35,0 0 24px #d6a8575c}.zone.targetable{border-color:#e6ab72}.zone-placeholder{font:600 12px Rajdhani,sans-serif;letter-spacing:.13em;color:#aac2a47d}.field-card{width:100%;height:100%;display:flex;align-items:flex-end;background-size:cover;background-position:center 21%;position:relative}.field-card:after{content:"";position:absolute;inset:40% 0 0;background:linear-gradient(transparent,#041008ed 80%)}.field-card.rest:before{content:"REST";position:absolute;z-index:3;right:7px;top:7px;color:#ffdfbd;background:#713c2e;padding:1px 7px;border-radius:3px;font:700 12px Rajdhani,sans-serif}.field-caption{position:relative;z-index:2;width:100%;padding:19px 8px 6px;line-height:1.1}.field-caption strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}.field-caption small{display:block;margin-top:4px;color:#efcf8a;font:700 14px Rajdhani,sans-serif}.arena-divider{display:flex;align-items:center;gap:12px;color:#ae995e;font:700 11px Rajdhani,sans-serif;letter-spacing:.16em;max-width:650px;margin:0 auto}.arena-divider i{height:1px;flex:1;background:#ae995e69}.status-bar{min-height:42px;display:flex;gap:9px;align-items:center;padding:7px 23px;background:#091a12;font-size:13px;color:#cbd8c3}.status-dot{width:7px;height:7px;border-radius:50%;background:#d8b765;box-shadow:0 0 12px #d8b765}.sidebar{display:flex;flex-direction:column;gap:15px}.side-card{padding:18px 20px}.action-card{min-height:240px;background:linear-gradient(145deg,#243a29,#121e17)}.side-card h2{font-size:23px;margin:7px 0 5px;line-height:1.2;font-weight:600}.side-card p{font-size:13px;color:#b8c7b5;margin:0 0 14px;line-height:1.45}.actions{display:flex;flex-wrap:wrap;gap:7px}.action-btn{border:1px solid #ad8b4e;border-radius:6px;background:#c49c53;color:#182118;padding:8px 11px;font-weight:600;font-size:13px;box-shadow:inset 0 1px #ffffff5c}.action-btn:hover:not(:disabled){background:#e2bb73}.action-btn.secondary{background:#193323;color:#eee7cb;border-color:#5d8062}.action-btn.danger{background:#6b302c;color:#ffe3d5;border-color:#a56c5e}.section-title{display:flex;justify-content:space-between;align-items:center;color:#8ca18d;font:600 12px Rajdhani,sans-serif}.detail-card{min-height:233px}.empty-detail{font-size:13px;color:#8fa092;padding:30px 5px;text-align:center}.detail-inner{display:flex;gap:12px;margin-top:11px}.detail-inner img{width:82px;height:114px;object-fit:cover;border-radius:4px;border:1px solid #cdb571}.detail-inner strong{display:block;font-size:15px;line-height:1.2}.detail-inner .detail-meta{font:600 13px Rajdhani,sans-serif;color:#d4bf81;margin:7px 0}.detail-inner p{font-size:12px;line-height:1.4;margin:0}.log-card{flex:1;min-height:160px}.log-card ol{list-style:none;margin:11px 0 0;padding:0;max-height:170px;overflow:auto}.log-card li{padding:7px 0;border-top:1px solid #ffffff13;font-size:12px;line-height:1.3;color:#b8c8b6}.log-card li:first-child{color:#e7d29d}.hand-panel{margin-top:17px;padding:16px 20px 20px}.hand-heading{display:flex;align-items:end;justify-content:space-between}.hand-heading h2{margin:2px 0 9px;font-size:19px;font-weight:600}.hand-heading h2 span{color:#d7b46f}.hand-help{font-size:12px;color:#9fae9c;margin-bottom:11px}.hand-scroll{display:flex;gap:10px;min-height:185px;overflow-x:auto;padding:5px 2px 8px}.hand-card{position:relative;flex:0 0 112px;height:161px;border:2px solid #8eaa8b;border-radius:7px;background:#1e3327;overflow:hidden;padding:0;color:#fff;text-align:left}.hand-card:hover{transform:translateY(-4px);border-color:#e5c16e}.hand-card.selected{transform:translateY(-5px);border-color:#f2c666;box-shadow:0 0 0 3px #e4b84e60}.hand-card img{width:100%;height:100%;object-fit:cover}.hand-card .card-fallback{display:grid;place-items:center;height:100%;padding:15px;text-align:center;font-size:13px}.hand-card .card-badge{position:absolute;bottom:0;left:0;right:0;background:#07160de0;padding:3px 5px;font:700 11px Rajdhani,sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hand-card .shield-badge{position:absolute;top:5px;right:5px;background:#bd8d3c;color:#101e13;padding:1px 5px;border-radius:3px;font:700 11px Rajdhani,sans-serif}.hand-empty{color:#95a994;font-size:14px;padding:40px}footer{padding:16px 0 26px;text-align:center;color:#778e7e;font-size:11px}dialog{width:min(570px,calc(100vw - 28px));border:1px solid #ab995f;border-radius:12px;background:#14251b;color:#f2e9d3;box-shadow:0 25px 80px #000b;padding:22px}dialog::backdrop{background:#030c08cf}.dialog-head{display:flex;align-items:center;justify-content:space-between}.dialog-head h2{margin:4px 0 0}.rules-body{font-size:14px;line-height:1.65;color:#cedbc9}.rules-body ol{padding-left:24px}.rules-body li{margin:8px 0}.rules-body b{color:#e5c47c}
@media(max-width:1050px){.layout{grid-template-columns:1fr}.sidebar{display:grid;grid-template-columns:repeat(2,1fr)}.log-card{grid-column:1/-1}.log-card ol{max-height:100px}}@media(max-width:650px){.app-shell{padding:0 10px}.topbar{height:auto;padding:12px 2px;gap:8px}.brand strong{font-size:20px}.brand small{font-size:9px}.brand-mark{width:34px;height:34px;font-size:24px}.build-tag{display:none}.top-actions{gap:5px}.ghost{padding:6px 8px;font-size:12px}.layout{padding-top:10px;gap:10px}.match-header{height:70px;padding:10px 13px}.match-header h1{font-size:21px}.turn-pill{font-size:11px;padding:5px 7px}.phase-step{font-size:10px}.arena{padding:9px 7px}.fighter{gap:6px;padding:5px}.fighter .avatar{width:34px;height:34px;font-size:11px}.fighter strong{font-size:12px}.fighter-stats{gap:3px}.fighter-stats span{min-width:36px;padding:4px 2px;font-size:12px}.field-row{gap:5px;margin:12px auto}.zone{height:122px}.field-caption strong{font-size:10px}.field-caption small{font-size:11px}.arena-divider{font-size:8px;gap:5px}.sidebar{grid-template-columns:1fr;gap:10px}.log-card{grid-column:auto}.side-card{padding:13px}.action-card{min-height:0}.detail-card{min-height:0}.hand-panel{margin-top:10px;padding:11px}.hand-help{display:none}.hand-card{flex-basis:94px;height:137px}.hand-scroll{min-height:151px}}

/* Battle layout follows ui_studies/24-29 and the Field1 playmat. */
.topbar{height:auto;min-height:83px;gap:18px;flex-wrap:wrap;padding:12px 0}.main-nav{display:flex;gap:2px;flex-wrap:wrap}.nav-link{border:0;background:transparent;color:#a8c6c4;padding:8px 9px;font:700 13px Rajdhani,sans-serif;letter-spacing:.1em;border-bottom:2px solid transparent}.nav-link:hover,.nav-link.active{color:#f0cb81;border-color:#c99952}.layout{grid-template-columns:minmax(0,1.05fr) minmax(320px,.95fr);align-items:start}.match-header{background:#10252b}.arena-panel,.side-card,.hand-panel{border-color:#d4aa63}.arena{background:#0e252a;padding:12px}.arena:before{display:none}.scoreboard{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:11px}.fighter{min-height:61px;background:#142b31}.fighter-enemy{border-color:#b1856259}.fighter-stats span{background:#1e444a}.playmat-wrap{display:flex;justify-content:center;background:#112b2f;border:1px solid #e2b46d;border-radius:13px;padding:10px}.playmat{width:min(100%,536px);aspect-ratio:536/554;position:relative;background:url('assets/field1.png') center/100% 100% no-repeat;box-shadow:0 3px 17px #0008}.field-row{display:contents}.zone{position:absolute;z-index:2;width:17%;height:21%;margin:0;border:1px solid transparent;border-radius:8px;background:transparent;overflow:visible}.zone:before{display:none}.zone-placeholder{display:none}.zone.selectable,.zone.targetable{border-color:#f3d075;background:#f1cf6e26}.zone.selected{border:2px solid #ffd682;background:#edc56936;box-shadow:0 0 0 3px #b9863c5e,0 0 22px #ffbf5599}.zone:hover{background:#efc87630}.zone .field-card{border:2px solid #e1b76c;border-radius:7px;box-shadow:0 4px 12px #000b;overflow:hidden;background-color:#183d44}.zone .field-caption{background:linear-gradient(transparent,#061410e8);padding:14px 5px 4px}.zone .field-caption strong{font-size:10px}.zone .field-caption small{font-size:10px}.zone[data-label="ENEMY L"]{left:58%;top:21%}.zone[data-label="ENEMY C"]{left:39%;top:26%}.zone[data-label="ENEMY R"]{left:21%;top:21%}.zone[data-label="YOUR L"]{left:21%;top:55%}.zone[data-label="YOUR C"]{left:39%;top:50%}.zone[data-label="YOUR R"]{left:58%;top:55%}.mat-marker{position:absolute;z-index:2;border-radius:4px;padding:3px 5px;background:#103a40e6;color:#f8dfaa;font:700 11px Rajdhani,sans-serif;letter-spacing:.06em}.bot-drop{left:4%;top:39%}.player-drop{right:4%;top:70%}.action-card{background:#142f35;border-color:#78b6b4;min-height:245px}.action-card .eyebrow,.section-title .eyebrow{color:#8ce3df}.side-card{background:#132a30}.hand-panel{background:#132a30}.hand-card{border-color:#81b4b0}.hand-card.selected{border-color:#e8b85e}.status-bar{background:#10252a}.phase-track{background:#0a2025}.phase-step.active{background:#b17c3c;color:#fff}.action-btn{background:#bf833d;border-color:#e9b66f}.action-btn.secondary{background:#20464c;border-color:#71aaa8;color:#ecf7ee}.action-btn:hover:not(:disabled){background:#e0a65b}.side-card h2{font-size:25px}.hand-panel{margin-top:12px}.hand-scroll{min-height:145px}.hand-card{height:140px;flex-basis:102px}.detail-card{min-height:195px}.log-card ol{max-height:125px}
.system-page{padding:22px 0 50px}.system-page[hidden],#battlePage[hidden],#battleHand[hidden]{display:none!important}
@media(max-width:1050px){.layout{grid-template-columns:1fr}.sidebar{display:grid;grid-template-columns:repeat(2,1fr)}.action-card{grid-column:1/-1}.log-card{grid-column:1/-1}.playmat{width:min(100%,536px)}}
@media(max-width:650px){.topbar{gap:7px}.main-nav{order:3;width:100%;overflow-x:auto;flex-wrap:nowrap}.nav-link{flex:0 0 auto;font-size:11px;padding:6px 7px}.top-actions{margin-left:auto}.build-tag{display:none}.arena{padding:7px}.scoreboard{gap:4px;margin-bottom:7px}.fighter{min-height:47px;padding:4px;gap:4px}.fighter .avatar{display:none}.fighter-stats{gap:2px}.fighter-stats span{font-size:10px;min-width:29px;padding:2px}.fighter strong{font-size:11px}.playmat-wrap{padding:5px;border-radius:9px}.zone{height:21%}.zone .field-caption strong{font-size:8px}.zone .field-caption small{font-size:8px}.mat-marker{font-size:8px;padding:2px}.sidebar{grid-template-columns:1fr}.action-card{grid-column:auto}.log-card{grid-column:auto}.hand-panel{margin-top:8px}.hand-card{height:136px;flex-basis:95px}}

/* Hub, decks, collection, tutorial, shop and settings follow ui_studies/01-13. */
.page-heading{display:flex;justify-content:space-between;align-items:start;gap:18px;margin-bottom:18px}.page-heading h1{font-size:34px;line-height:1.05;margin:6px 0}.page-heading p{margin:0;color:#a8c7c4;font-size:14px}.coins-pill{flex:0 0 auto;border:1px solid #d5ac69;border-radius:30px;padding:9px 15px;color:#f7d896;background:#634a2a50;font:700 15px Rajdhani,sans-serif}.notice{padding:10px 15px;margin-bottom:14px;background:#244d49;border:1px solid #83c6bf;border-radius:7px;color:#e2f6e9}.notice button{float:right;border:0;background:transparent;color:inherit}.hub-hero{display:flex;justify-content:space-between;align-items:center;min-height:240px;padding:25px 35px;margin-bottom:16px;border:1px solid #d6aa63;border-radius:12px;background:radial-gradient(circle at 85% 40%,#28545d 0,transparent 32%),linear-gradient(110deg,#183c43,#10272f)}.hub-hero h2{font-size:30px;margin:8px 0}.hub-hero p{color:#bbd5d0;margin:0 0 16px}.hub-sigil{display:grid;place-items:center;width:150px;height:150px;border:7px double #d2aa66;border-radius:50%;font:700 100px Rajdhani,sans-serif;color:#efc57e;transform:rotate(-8deg)}.feature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.feature-card{min-height:145px;text-align:left;padding:19px;border:1px solid #6da5a4;border-radius:9px;background:#16333a;color:#f3efe0}.feature-card:hover{border-color:#eccb84;background:#204851}.feature-card b{display:block;color:#93d8d1;font:700 12px Rajdhani,sans-serif;letter-spacing:.16em}.feature-card strong{display:block;font-size:20px;margin:13px 0 4px}.feature-card span{display:block;color:#adc6c3;font-size:12px}.system-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:16px}.system-panel{border:1px solid #689e9e;border-radius:12px;background:#142e35;padding:19px;margin-bottom:15px}.system-panel h2{font-size:22px;margin:5px 0 12px}.system-panel p{color:#b5cbc8;font-size:13px;line-height:1.5}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.panel-head span{color:#e7c785;font:700 14px Rajdhani,sans-serif}.deck-status{padding:9px 12px;margin:5px 0 13px;border-radius:5px;font-size:13px}.deck-status.good{background:#275743;color:#d4f4d9}.deck-status.bad{background:#5d3535;color:#ffd9d5}.deck-list{max-height:490px;overflow:auto;border-top:1px solid #ffffff25}.deck-line{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 3px;border-bottom:1px solid #ffffff16}.deck-line strong{font-size:13px;display:block}.deck-line small{display:block;color:#9db9b7;font-size:11px}.deck-line>div:last-child{display:flex;align-items:center;gap:5px}.deck-line button{border:1px solid #88aaa8;border-radius:4px;color:#fff;background:#244d50;width:28px;height:28px}.deck-line b{min-width:20px;text-align:center;color:#edce8d}.panel-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px}.rules-check{padding-left:20px;color:#c3d9d3;font-size:14px;line-height:1.85}.filter-row{display:flex;gap:9px;flex-wrap:wrap}.filter-row input{flex:1;min-width:220px}.filter-row input,.filter-row select,.settings-panel select{background:#092126;border:1px solid #689e9e;border-radius:6px;color:#f0f3e2;padding:8px 10px;font:inherit}.result-count{font-size:12px!important}.catalog-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:10px}.catalog-card{display:block;text-align:left;padding:9px;border:1px solid #638f92;border-radius:8px;background:#10272e;color:#f2eee2;min-width:0}.catalog-card:hover{border-color:#ecc879;background:#1b3940}.catalog-art{height:160px;border-radius:5px;display:grid;place-items:center;overflow:hidden;background:linear-gradient(140deg,#24515a,#173036)}.catalog-art img{height:100%;max-width:100%;object-fit:contain}.catalog-art>span{text-align:center;color:#d8be83;font-size:17px}.catalog-art small{display:block;color:#a9c9c8;font-size:10px}.catalog-card strong{display:block;margin-top:7px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.catalog-card>small{display:block;color:#9ebfbd;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px}.catalog-flags{display:flex;gap:3px;justify-content:space-between;margin-top:7px}.catalog-flags em{font-style:normal;color:#dfc68a;font:700 9px Rajdhani,sans-serif}.lesson-list{display:grid;grid-template-columns:repeat(2,1fr);gap:5px;max-height:310px;overflow:auto}.lesson-tab{background:#173d44;border:1px solid #4f8587;border-radius:5px;color:#d9f1e8;text-align:left;padding:7px;font-size:12px}.lesson-tab.active{background:#b58244;color:#162728;border-color:#efc27b}.lesson-content{border-top:1px solid #86aba758;margin-top:15px;padding-top:10px}.lesson-content h3{margin:5px 0}.keyword-list{max-height:570px;overflow:auto}.keyword-list details{border-top:1px solid #ffffff24;padding:8px 2px}.keyword-list summary{cursor:pointer;color:#e9dab0;font-size:13px}.keyword-list small{color:#90bcb8;margin-left:8px}.keyword-list p{font-size:12px;margin:7px 0}.keyword-list a{color:#8cd4ce;font-size:11px}.store-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.store-card{display:flex;flex-direction:column;align-items:flex-start;min-height:230px}.store-card strong{margin-top:auto;color:#ecc87d;font:700 26px Rajdhani,sans-serif}.store-card .action-btn{margin-top:8px}.shop-item{border:1px solid #5f9190;border-radius:8px;padding:12px;background:#10272d}.shop-item h3{margin:8px 0;font-size:18px}.settings-panel{max-width:650px}.settings-panel label{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px 0;border-bottom:1px solid #ffffff22}.settings-panel input{width:180px;accent-color:#d3a25e}.settings-panel b{margin-left:auto;color:#e1bd7d}.system-dialog{width:min(780px,calc(100vw - 20px));max-height:85vh;overflow:auto}.card-detail-layout{display:grid;grid-template-columns:220px 1fr;gap:22px;margin-top:18px}.detail-large-art{min-height:300px;display:grid;place-items:center;background:#16393e;border:1px solid #b69b67;border-radius:7px;text-align:center;padding:8px}.detail-large-art img{width:100%;max-height:320px;object-fit:contain}.detail-chips{display:flex;flex-wrap:wrap;gap:5px}.detail-chips span{border:1px solid #779b99;border-radius:20px;padding:3px 8px;color:#e4d6a9;font:700 11px Rajdhani,sans-serif}.card-rules-text{white-space:pre-wrap;max-height:220px;overflow:auto;font-size:13px}.printing-list{max-height:150px;overflow:auto;display:flex;flex-wrap:wrap;gap:5px}.printing-list span{padding:3px 6px;background:#244c51;border-radius:3px;font-size:10px}.pack-result{line-height:2;color:#e9d8ab}
@media(max-width:800px){.feature-grid{grid-template-columns:repeat(2,1fr)}.system-grid{grid-template-columns:1fr}.store-grid{grid-template-columns:1fr 1fr}}@media(max-width:540px){.page-heading{display:block}.page-heading h1{font-size:27px}.coins-pill{display:inline-block;margin-top:12px}.hub-hero{min-height:190px;padding:17px}.hub-sigil{width:80px;height:80px;font-size:55px}.feature-grid{grid-template-columns:1fr 1fr}.feature-card{min-height:115px;padding:12px}.feature-card strong{font-size:16px}.feature-card span{font-size:10px}.store-grid{grid-template-columns:1fr}.card-detail-layout{grid-template-columns:1fr}.detail-large-art{min-height:200px}.detail-large-art img{max-height:250px}.system-panel{padding:13px}}
.match-header{height:64px}.scoreboard .fighter{min-height:45px}.scoreboard .avatar{display:none}.scoreboard .fighter strong{font-size:13px}.scoreboard .fighter-stats span{min-width:37px;font-size:12px;padding:3px 4px}.playmat{width:min(100%,470px)}.hand-card{flex-basis:calc(102px * var(--card-scale,1));height:calc(140px * var(--card-scale,1))}@media(max-width:650px){.match-header{height:62px}.playmat{width:100%}.hand-card{flex-basis:calc(95px * var(--card-scale,1));height:calc(136px * var(--card-scale,1))}}
.room-label{display:block;color:#c7ded8;margin:12px 0}.room-label input,.filter-row input{background:#092126;border:1px solid #689e9e;border-radius:6px;color:#f0f3e2;padding:8px 10px;font:inherit}.room-label input{display:block;width:100%;margin-top:5px}.room-check{display:block;margin:9px 0;color:#c6dcd7;font-size:13px}.room-check input{accent-color:#cc9c57}.room-line{display:flex;justify-content:space-between;align-items:center;gap:10px;border-top:1px solid #ffffff25;padding:12px 0}.room-line strong,.room-line small{display:block}.room-line small{color:#a8c5c1}.room-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 0 17px;color:#c8ded6}.room-toolbar span{margin-right:auto}.room-wait{min-height:180px;display:grid;align-content:center;text-align:center}.pvp-battle{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(300px,.95fr);gap:16px}.pvp-board,.pvp-side .system-panel{border:1px solid #76a8a5;border-radius:10px;background:#132d34}.pvp-board{padding:11px}.pvp-phase h2{margin:5px 0 8px}.pvp-score{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-bottom:8px}.pvp-score>div{padding:7px;background:#1c4449;border:1px solid #548685;border-radius:5px}.pvp-score strong,.pvp-score span{display:block}.pvp-score span{color:#e4cf9e;font:700 12px Rajdhani,sans-serif}.pvp-log{list-style:none;padding:0;margin:8px 0;max-height:250px;overflow:auto}.pvp-log li{border-top:1px solid #ffffff20;padding:6px;color:#c9ded4;font-size:12px}.pvp-side .action-btn{margin:4px}.pvp-side .system-panel{min-height:140px}@media(max-width:900px){.pvp-battle{grid-template-columns:1fr}}
.room-label select,.room-deck-choice select,.settings-panel select{display:block;width:100%;min-height:40px;margin-top:6px;padding:8px 12px;border:1px solid #78aaa6;border-radius:8px;background:#092126;color:#f0f3e2;font:inherit;color-scheme:dark}
.room-check{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #548685;border-radius:8px;background:#16383b;cursor:pointer}
.room-check input{width:18px;height:18px;margin:0;flex:none}
.room-check:has(input:checked){border-color:#e0b767;background:#314039}
.room-wait .room-deck-choice{text-align:left;max-width:420px;width:100%;margin:12px auto 4px}
.room-wait p{color:#b8d2cc}
.playmat[data-own-playmat="aqua"]:after,.playmat[data-opponent-playmat="aqua"]:before{content:"";position:absolute;left:0;right:0;height:50%;z-index:1;background:linear-gradient(#1cd8e01b,#1cd8e035);pointer-events:none}.playmat[data-own-playmat="aqua"]:after{bottom:0}.playmat[data-opponent-playmat="aqua"]:before{top:0}body.cosmetic-ember .fighter-player,body.cosmetic-ember .pvp-score>div:first-child{border-color:#e39b53;box-shadow:0 0 14px #e47b3470}.skin-sr{border-color:#edc765!important;box-shadow:0 0 0 2px #bb883d90!important}.skin-ssr{border-color:#c6e5ff!important;box-shadow:0 0 0 2px #a473d5,0 0 18px #bd77edaa!important}
.collection-pager{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:12px 0;color:#b9d3ce;font-size:13px}.collection-pager>div{display:flex;gap:6px}.system-dialog textarea{display:block;width:100%;resize:vertical;min-height:130px;background:#081f24;color:#eedfba;border:1px solid #79aaa7;border-radius:7px;padding:12px;font:12px/1.5 Consolas,monospace;margin:12px 0}@media(max-width:540px){.collection-pager{align-items:flex-start;flex-direction:column}}
.printing-list button{border:1px solid #659796;border-radius:4px;background:#244c51;color:#e0f1e9;padding:4px 6px;font:11px Rajdhani,sans-serif;cursor:pointer}.printing-list button:hover,.printing-list button.active{border-color:#edbf72;background:#725738;color:#fff}.printing-list button:disabled{opacity:.45;cursor:not-allowed}
.layout{grid-template-areas:"arena sidebar" "hand hand"}.arena-panel{grid-area:arena}.sidebar{grid-area:sidebar}.hand-panel{grid-area:hand;margin-top:0}@media(max-width:1050px){.layout{grid-template-areas:"arena" "hand" "sidebar"}.sidebar{display:grid;grid-template-columns:repeat(2,1fr)}.action-card{grid-column:1/-1}}@media(max-width:650px){.layout{grid-template-areas:"arena" "hand" "sidebar"}.sidebar{display:flex;flex-direction:column}.action-card{position:sticky;bottom:8px;z-index:20;box-shadow:0 8px 28px #000b}.hand-panel{margin-top:0}}
.layout,.arena-panel,.sidebar,.hand-panel{min-width:0}.hand-panel{max-width:100%;overflow:hidden}@media(max-width:1050px){.layout{grid-template-columns:minmax(0,1fr)}}
.match-dialog{width:min(800px,calc(100vw - 24px));max-height:90vh;overflow:auto;padding:24px;background:#172d34;border:1px solid #d4ad6d}.result-head{display:flex;align-items:center;justify-content:space-between}.result-title{text-align:center;font:900 clamp(42px,8vw,72px) Rajdhani,sans-serif;letter-spacing:.08em;margin:18px 0 0}.result-title.won{color:#f3ce83}.result-title.lost{color:#efa6a0}.result-reason{text-align:center;color:#dce8e1;margin:0 0 20px}.result-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;border-top:1px solid #ffffff35;padding:20px 0}.result-stats>div{padding:12px;background:#203c44;border:1px solid #47757a;border-radius:9px}.result-stats span{display:block;color:#a9c7c7;font:700 12px Rajdhani,sans-serif;letter-spacing:.1em}.result-stats strong{display:block;color:#f3ddb2;font:800 42px Rajdhani,sans-serif;line-height:1.2}.result-event{padding:12px 16px;background:#203b45;border-radius:9px}.result-event small{color:#aac8c7}.result-event p{margin:5px 0 0}.result-buttons{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:20px}.result-log{max-height:180px;overflow:auto;margin:18px 0 0;padding:0;list-style:none}.result-log li{padding:6px 0;border-top:1px solid #ffffff26;font-size:12px;color:#c5d9d4}.result-log[hidden]{display:none}@media(max-width:600px){.match-dialog{padding:15px}.result-stats{gap:5px}.result-stats>div{padding:7px}.result-stats strong{font-size:27px}.result-buttons{grid-template-columns:1fr}}
.pvp-result{border-color:#d4ad6d;background:#1b343c;text-align:center}.pvp-result h2{font:900 48px Rajdhani,sans-serif;letter-spacing:.08em;margin:4px 0}.pvp-result h2.won{color:#f3ce83}.pvp-result h2.lost{color:#efa6a0}.pvp-result .result-stats{text-align:left;margin:12px 0}.pvp-result .action-btn{min-width:180px}
.deck-filter{margin:12px 0 4px}.deck-line>img{flex:0 0 36px;width:36px;height:50px;object-fit:contain;border-radius:3px;background:#24464b}.deck-line>div:nth-last-child(2){flex:1;min-width:0}.deck-line strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:800px){.system-grid{grid-template-columns:minmax(0,1fr)}.system-panel,.deck-list,.deck-line{min-width:0}.deck-line>div:last-child{flex:0 0 auto}}
@media(max-width:650px){.action-card{min-height:0}.detail-card{min-height:0}}
.system-dialog .recovery-input{display:block;width:100%;background:#081f24;color:#eedfba;border:1px solid #79aaa7;border-radius:7px;padding:12px;font:14px Consolas,monospace;letter-spacing:.05em}.system-dialog #recoveryCodeText{min-height:72px;resize:none;font-size:15px;letter-spacing:.04em;overflow-wrap:anywhere}.system-dialog .recovery-error{color:#ffd4c9}
.soul-kit{border-color:#c7a764;background:linear-gradient(105deg,#243b3a,#162d34)}.soul-kit h2{color:#f1d390}.soul-kit .action-btn{margin-top:4px}
.soul-chip{position:absolute;z-index:4;top:8px;right:8px;background:#122521e8;border:1px solid #e4bc73;border-radius:5px;padding:3px 7px;color:#f8dc9e;font:700 11px Rajdhani,sans-serif;box-shadow:0 3px 9px #0008}.soul-list{margin-top:10px;border-top:1px solid #ffffff25;padding-top:8px}.soul-list strong{display:block;color:#ecd18f;margin-bottom:5px;font-size:12px}.soul-list button{display:block;width:100%;text-align:left;margin:4px 0;padding:5px 7px;border:1px solid #5b8a8a;border-radius:4px;background:#17383c;color:#e5f0e7;font-size:11px}
.soul-stack{position:absolute;z-index:4;top:26px;left:8px;display:flex;align-items:flex-start;filter:drop-shadow(0 3px 3px #000c)}.soul-stack img,.soul-stack>span{width:30px;height:43px;object-fit:cover;background:#183a40;border:1px solid #f0d48e;border-radius:2px;margin-right:-14px;transform:rotate(-8deg)}.soul-stack img:nth-child(2),.soul-stack>span:nth-child(2){transform:rotate(0deg) translateY(-3px)}.soul-stack img:nth-child(3),.soul-stack>span:nth-child(3){transform:rotate(8deg)}
.zone.insert-target{outline:3px solid #f6d37a;outline-offset:-3px;box-shadow:0 0 0 2px #4ac8b3,0 0 24px #f6cb6a9a;animation:soul-pulse 1.5s ease-in-out infinite}.zone.insert-target:after{content:"INSERT SOUL";position:absolute;z-index:6;bottom:3px;left:50%;transform:translateX(-50%);white-space:nowrap;padding:2px 5px;border-radius:3px;background:#e6ba69;color:#142a2a;font:800 10px Rajdhani,sans-serif;letter-spacing:.04em;pointer-events:none}@keyframes soul-pulse{50%{box-shadow:0 0 0 2px #4ac8b3,0 0 35px #f6cb6add}}
.analyzer-battle-rules{margin-top:14px;padding:12px 15px;border:1px solid #d5aa62;border-radius:8px;background:#5a402f55;color:#f5dbac;font-size:12px}.analyzer-battle-rules strong{font-size:13px}.analyzer-battle-rules ul{margin:6px 0 0;padding-left:19px;line-height:1.65}
/* Field zones: show card art without text covering the printed card. */
.zone .field-card{display:block;background:none;overflow:hidden}.zone .field-card:after,.zone .field-card.rest:before{display:none}.field-art{display:block;width:100%;height:100%;object-fit:contain;background:#0b2528}.field-card.rest .field-art{filter:grayscale(1) brightness(.64)}.zone .field-caption{display:none}.zone .soul-chip{top:2px;right:2px}.zone .soul-stack{top:20px;left:3px}.zone .soul-stack img{width:22px;height:32px;margin-right:-12px}
.fighter-stats .life-stat{min-width:60px;background:#623439;border-color:#e2a39c;color:#fff1ee;font-size:20px}.fighter-stats .life-stat b{font-size:25px}.fighter-stats span:not(.life-stat){min-width:43px}.scoreboard .fighter{min-height:56px}.scoreboard .fighter strong{font-size:14px}
.mat-marker{border:1px solid #d6b675;cursor:pointer}.mat-marker:hover,.mat-card:hover{outline:2px solid #ffe1a3}.bot-gauge{right:3%;top:8%}.player-gauge{left:3%;top:72%}.bot-drop{left:4%;top:39%}.player-drop{right:4%;top:70%}.mat-card{position:absolute;z-index:2;width:13%;height:19%;border:1px solid #d1ad68;border-radius:5px;background:#10272b9e;padding:0;overflow:hidden}.mat-card img{width:100%;height:100%;object-fit:contain}.mat-card:empty{border-style:dashed}.bot-flag{right:27%;top:0}.bot-buddy{right:43%;top:0}.player-flag{left:34%;bottom:0}.player-buddy{left:53%;bottom:0}.buddy-used{position:absolute;right:0;bottom:0;background:#643d31;color:#ffe0ba;padding:1px 3px;font:700 9px Rajdhani,sans-serif}.buddy-zone-count{position:absolute;left:50%;bottom:2px;transform:translateX(-50%);white-space:nowrap;padding:2px 4px;border-radius:3px;background:#153c41ed;color:#ffe6a8;font:800 8px Rajdhani,sans-serif;text-shadow:0 1px 2px #000;pointer-events:none}
.log-card{min-height:0;flex:0 0 auto}.log-card ol[hidden]{display:none}.log-card ol{max-height:260px}.log-card .ghost{padding:3px 8px;font-size:11px}.pile-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(105px,1fr));gap:10px;margin-top:16px}.pile-grid button{border:1px solid #78a6a4;border-radius:7px;background:#17383d;color:#f4e6cc;padding:7px}.pile-grid img{display:block;width:100%;height:130px;object-fit:contain}.pile-grid strong{display:block;font-size:11px;line-height:1.3;margin-top:5px}
@media(max-width:650px){.fighter-stats .life-stat{min-width:47px;font-size:15px}.fighter-stats .life-stat b{font-size:19px}.fighter-stats span:not(.life-stat){min-width:32px}.mat-card{width:12%;height:17%}.mat-marker{font-size:8px;padding:1px 2px}.zone .soul-chip{font-size:8px;padding:1px 2px}}
.pvp-score>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.pvp-score strong{margin-right:auto}.pvp-score .pvp-life{background:#623439;border:1px solid #d99691;border-radius:5px;color:#fff;font-size:19px;padding:3px 9px}.pvp-log-panel{min-height:0!important}.pvp-log-panel .action-btn{font-size:11px;padding:4px 8px}.pvp-log{max-height:280px}
.playmat .mat-marker{display:flex;justify-content:center;align-items:flex-end;background:linear-gradient(transparent 88%,#103a40e8 88%);border:1px solid transparent;border-radius:4px;padding:0 1px 4px;text-align:center;font-size:10px}.playmat .mat-marker:hover{border-color:#ffe1a3;background:#d6a45a33}.playmat .bot-gauge{right:3%;top:1%;width:15%;height:34%}.playmat .player-gauge{left:3%;top:59%;width:15%;height:36%}.playmat .bot-drop{left:3%;top:38%;width:13%;height:17%}.playmat .player-drop{right:3%;top:68%;width:13%;height:18%}
.mat-card.used img{filter:grayscale(1) brightness(.65)}
.deck-workshop{display:grid;grid-template-columns:minmax(270px,330px) minmax(0,1fr);gap:15px;align-items:start}.deck-library{position:sticky;top:10px}.deck-tabs{display:grid;gap:6px;max-height:190px;overflow:auto}.deck-tab{display:flex;align-items:center;justify-content:space-between;text-align:left;gap:10px;padding:8px 10px;border:1px solid #5d8b8b;border-radius:6px;background:#0e252b;color:#e4efe8}.deck-tab.active{border-color:#e6bb6e;background:#5c4732}.deck-tab strong{font-size:13px}.deck-tab small{font-size:10px;color:#d9c68e}.deck-name-label{display:block;margin-top:14px;color:#c7ded8;font-size:12px}.deck-name-label input,.deck-name-label select,.deck-toolbar input,.deck-toolbar select{display:block;width:100%;margin-top:5px;background:#092126;border:1px solid #689e9e;border-radius:6px;color:#f0f3e2;padding:8px 10px;font:inherit}.deck-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin:13px 0}.deck-summary span{padding:9px 4px;text-align:center;border:1px solid #5a8584;border-radius:5px;background:#0c262a;font-size:11px}.deck-summary b{display:block;color:#f1d291;font:800 22px Rajdhani,sans-serif}.deck-identity{display:grid;grid-template-columns:1fr 1fr;gap:8px}.deck-identity button{display:flex;align-items:center;gap:7px;min-width:0;padding:5px;border:1px solid #b69a65;border-radius:6px;background:#17353b;color:#f3e0b0;text-align:left;font:700 10px Rajdhani,sans-serif}.deck-identity img{width:40px;height:56px;object-fit:contain}.deck-identity span{overflow:hidden;text-overflow:ellipsis}.deck-toolbar{display:grid;grid-template-columns:1fr auto 150px;gap:7px;margin-bottom:12px}.deck-toolbar input,.deck-toolbar select{margin:0}.deck-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:9px;max-height:690px;overflow:auto;padding:2px 3px 6px}.deck-tile{min-width:0;border:1px solid #557d7d;border-radius:8px;background:#10282e;padding:7px}.deck-tile.in-deck{border-color:#c79e60;background:#21373a}.deck-tile-art{display:grid;place-items:center;width:100%;height:160px;border:0;background:#0b1c24;border-radius:4px;padding:2px}.deck-tile-art img{max-width:100%;height:100%;object-fit:contain}.deck-tile strong,.deck-tile small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.deck-tile strong{font-size:11px;margin-top:6px}.deck-tile small{font-size:10px;color:#b6ccc4}.deck-stepper{display:flex;justify-content:space-between;align-items:center;gap:4px;margin-top:7px}.deck-stepper button{width:29px;height:27px;border:1px solid #a9c5c0;border-radius:4px;background:#27545a;color:#fff}.deck-stepper b{font:800 18px Rajdhani,sans-serif;color:#f0d28a}@media(max-width:930px){.deck-workshop{grid-template-columns:1fr}.deck-library{position:static}.deck-grid{max-height:570px}}@media(max-width:540px){.deck-toolbar{grid-template-columns:1fr auto}.deck-toolbar select{grid-column:1/-1}.deck-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.deck-tile-art{height:145px}}
.system-dialog{width:min(980px,calc(100vw - 20px))}.card-detail-layout{grid-template-columns:minmax(250px,340px) minmax(0,1fr)}.detail-large-art{padding:12px;min-height:420px}.detail-large-art img{max-height:460px}.analyzer-stats{display:grid;grid-template-columns:repeat(2,1fr);gap:7px;margin-top:13px}.analyzer-stats span{padding:8px 10px;border:1px solid #648f8e;border-radius:6px;background:#0d252a;color:#a9cfcd;font:700 11px Rajdhani,sans-serif}.analyzer-stats b{display:block;color:#f0d28f;font-size:20px}.analyzer-attributes{color:#d1bd86!important}.card-rules-text{white-space:pre-wrap}.choice-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;margin-top:16px}.choice-card{display:flex;flex-direction:column;align-items:center;gap:8px;min-height:170px;border:1px solid #668f90;border-radius:8px;background:#10272d;color:#eef1e2;padding:9px}.choice-card:hover{border-color:#e8c47e;background:#1c3a3f}.choice-card img{height:125px;max-width:100%;object-fit:contain}.choice-card strong{font-size:12px;line-height:1.25;text-align:center}
@media(max-width:680px){.card-detail-layout{grid-template-columns:1fr}.detail-large-art{min-height:0}.detail-large-art img{max-height:350px}}
.pvp-focus-main{display:flex;gap:10px;align-items:flex-start;margin-top:10px}.pvp-focus-main>img{flex:0 0 80px;width:80px;max-height:112px;object-fit:contain;border:1px solid #b99d66;border-radius:4px}.pvp-focus-main>div{min-width:0}.pvp-focus-main strong{display:block;font-size:14px;line-height:1.25}.pvp-focus-main small{display:block;color:#d8c18e;font-size:11px;margin:5px 0}.pvp-focus-main p{white-space:pre-wrap;max-height:120px;overflow:auto;font-size:11px}.pvp-focus-main .action-btn{margin-top:5px}

/* Analyzer layouts keep the artwork unobstructed in every context. */
.system-dialog.analyzer-builder,.system-dialog.analyzer-collection{width:min(980px,calc(100vw - 20px))}
.system-dialog.analyzer-battle{width:min(1160px,calc(100vw - 20px));background:#111719;border-color:#d7ad57}
.analyzer-battle .card-detail-layout{grid-template-columns:minmax(320px,1.15fr) minmax(280px,.85fr);gap:28px}
.analyzer-battle .detail-large-art img{max-height:min(76vh,760px)}
.detail-large-art{min-height:0;padding:0;border:0;border-radius:0;background:transparent;overflow:visible}
.detail-large-art img{display:block;width:100%;max-height:min(65vh,620px);object-fit:contain;filter:drop-shadow(0 12px 18px #0009)}
.analyzer-info{min-width:0;max-height:72vh;overflow:auto;padding-right:5px}
.analyzer-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:13px}.analyzer-tags button,.analyzer-tags span{border:1px solid #799c98;border-radius:20px;background:#17363b;color:#dcece7;padding:4px 9px;font:700 12px Rajdhani,sans-serif}.analyzer-tags button:hover{background:#b68847;color:#10242a}
.analyzer-printings{margin-top:18px;border-top:1px solid #ffffff30;padding-top:8px}.analyzer-printings p{font-size:12px;color:#bad2cd}.printing-list button{padding:6px 9px;border:1px solid #769c99;border-radius:5px;background:#244c51;color:#f0e8d0;font:700 11px Rajdhani,sans-serif}.printing-list button.active{border-color:#ebc87c;background:#70512f}.printing-list button:disabled{opacity:.45}
.deck-extra-filters{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 11px}.deck-extra-filters select{min-width:130px;background:#092126;border:1px solid #689e9e;border-radius:6px;color:#f0f3e2;padding:7px 9px;font:inherit}
.deck-tile{display:flex;flex-direction:column;min-height:248px}.deck-tile-art{height:auto;aspect-ratio:0.715;background:transparent;padding:0}.deck-tile-art img{display:block;width:100%;height:100%;max-width:none;object-fit:contain}.deck-tile strong{min-height:1.5em}.deck-tile small{min-height:1.5em}.deck-stepper{margin-top:auto}
.playmat{width:min(100%,536px)}.zone{width:13%;height:18%;border:0}.zone[data-label="ENEMY L"]{left:60.5%;top:20.5%}.zone[data-label="ENEMY C"]{left:40.5%;top:25.2%}.zone[data-label="ENEMY R"]{left:22.5%;top:20.5%}.zone[data-label="YOUR L"]{left:22.5%;top:54.5%}.zone[data-label="YOUR C"]{left:40.5%;top:49.8%}.zone[data-label="YOUR R"]{left:60.5%;top:54.5%}
.zone .field-card,.mat-card{border:0;border-radius:0;box-shadow:none;background:transparent;overflow:visible}.zone .field-art,.mat-card img{width:100%;height:100%;object-fit:fill;background:transparent;border:0;border-radius:0}.mat-card{width:12%;height:17%}.bot-flag{right:27%;top:1%}.bot-buddy{right:43%;top:1%}.player-flag{left:34%;bottom:1%}.player-buddy{left:53%;bottom:1%}
.playmat .mat-marker{background:transparent;border:0;align-items:flex-end;padding:0 0 2px}.playmat .mat-marker:hover{background:#d6a45a20}.playmat .bot-gauge{right:1%;top:1%;width:15%;height:34%}.playmat .player-gauge{left:1%;top:60%;width:15%;height:36%}.playmat .bot-drop{left:3%;top:38%;width:13%;height:16%}.playmat .player-drop{right:3%;top:68%;width:13%;height:17%}
.playmat .mat-marker{align-items:center;text-shadow:0 1px 2px #000,0 0 5px #000;color:#fff5ce}
.analyzer-battle{max-height:90vh}.analyzer-battle .detail-large-art img{max-height:min(64vh,620px);width:auto;max-width:100%;margin:auto}
@media(max-width:680px){.analyzer-battle .card-detail-layout{grid-template-columns:1fr}.analyzer-info{max-height:none}.detail-large-art img,.analyzer-battle .detail-large-art img{max-height:48vh}.deck-tile{min-height:0}}

/* Card and pile footprints measured against the original 536×554 Field1 artwork. */
.playmat .zone{width:12%;height:auto;aspect-ratio:429/600;padding:0;overflow:visible}
.playmat .zone[data-label="ENEMY L"]{left:60.3%;top:24%}.playmat .zone[data-label="ENEMY C"]{left:41.8%;top:29.8%}.playmat .zone[data-label="ENEMY R"]{left:23.5%;top:24%}
.playmat .zone[data-label="YOUR L"]{left:23.5%;top:58.1%}.playmat .zone[data-label="YOUR C"]{left:41.8%;top:52.5%}.playmat .zone[data-label="YOUR R"]{left:60.3%;top:58.1%}
.playmat .zone .field-card{width:100%;height:100%;box-shadow:none;overflow:visible}.playmat .zone .field-art{display:block;width:100%;height:100%;object-fit:contain;aspect-ratio:429/600}
.playmat .mat-card{width:11.5%;height:auto;aspect-ratio:429/600;overflow:visible}.playmat .mat-card img{display:block;width:100%;height:100%;object-fit:contain}
.playmat .bot-buddy{left:23.8%;right:auto;top:0.5%;bottom:auto}.playmat .bot-flag{left:42.8%;right:auto;top:3%;bottom:auto}.playmat .player-flag{left:43%;right:auto;top:auto;bottom:5%}.playmat .player-buddy{left:60.5%;right:auto;top:auto;bottom:4.5%}
.playmat .bot-item{left:60.5%;right:auto;top:0.5%;bottom:auto}.playmat .player-item{left:23.8%;right:auto;top:auto;bottom:4.5%}.playmat .mat-card[hidden]{display:none}
.playmat .bot-gauge{left:81%;right:auto;top:1.5%;width:16.5%;height:50%}.playmat .player-gauge{left:1.8%;right:auto;top:47.5%;width:17%;height:49.5%}
.playmat .bot-drop{left:3.7%;right:auto;top:22.5%;width:13.5%;height:18%}.playmat .player-drop{left:81%;right:auto;top:59.5%;width:15%;height:17.5%}
.playmat .mat-marker{display:flex;align-items:center;justify-content:center;background:transparent;border:0;color:#fff7ce;font:800 10px Rajdhani,sans-serif;text-shadow:0 1px 2px #000,0 0 5px #000}
.attack-lines{position:absolute;z-index:5;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.attack-lines .attack-path{fill:none;stroke-linecap:round;stroke-linejoin:round}.attack-halo{filter:url(#attack-glow);opacity:.45}.attack-halo .attack-path{stroke:#ff5b35;stroke-width:6}.attack-strokes .attack-path{stroke:#ffd77a;stroke-width:2.4;stroke-dasharray:7 7;animation:attack-flow .7s linear infinite}.attack-lines-active .attack-halo{opacity:.7}.attack-lines-active .attack-strokes .attack-path{stroke-width:3.2;animation:attack-flow .4s linear infinite,attack-flash .45s ease-in-out 2}@keyframes attack-flow{to{stroke-dashoffset:-28}}@keyframes attack-flash{50%{opacity:.35}}
.system-dialog.analyzer-battle{background:rgba(10,20,22,.84);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}.analyzer-battle .detail-large-art{background:transparent;overflow:visible;filter:drop-shadow(0 18px 22px #000b)}.analyzer-battle .detail-large-art img{display:block;max-height:min(68vh,680px);border:0;border-radius:0;clip-path:inset(3px round 14px);filter:none}
.analyzer-battle .card-detail-layout{grid-template-columns:minmax(280px,1fr) minmax(300px,.92fr);align-items:start;gap:clamp(18px,4vw,48px)}.analyzer-battle .analyzer-info{max-height:74vh;overflow:auto;padding:0 4px 10px 0}
.battle-info-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:5px 0 18px;border-bottom:1px solid #d5b77055}.battle-info-head span{padding:4px 10px;border:1px solid #8baba5;border-radius:999px;color:#d7e9e3;font:700 12px Rajdhani,sans-serif}.battle-info-head .battle-ready{border-color:#d5aa68;color:#f2d08d}
.battle-stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:18px}.battle-stat{position:relative;min-height:100px;padding:13px 15px;overflow:hidden;border:1px solid #536e71;border-radius:10px;background:linear-gradient(145deg,#203b40,#102529);box-shadow:inset 0 1px #ffffff17}.battle-stat:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--stat-color)}.battle-stat small{display:block;color:#aac9c4;font:800 12px Rajdhani,sans-serif;letter-spacing:.1em}.battle-stat b{display:block;margin-top:10px;color:#fff3d1;font:800 clamp(24px,3vw,36px) Rajdhani,sans-serif;line-height:1}.battle-stat.size{--stat-color:#e5bd70}.battle-stat.power{--stat-color:#de8058}.battle-stat.defense{--stat-color:#61bcba}.battle-stat.critical{--stat-color:#db6b79}
.battle-ability{margin-top:18px;padding:17px 19px;border:1px solid #826d4f;border-radius:10px;background:linear-gradient(150deg,#222b2b,#171f21)}.battle-ability .eyebrow{color:#e7c17b}.battle-ability h3{font-size:20px;margin:5px 0 10px}.battle-ability p{white-space:pre-wrap;font-size:14px;line-height:1.65;color:#e8e7d8;margin:0}.battle-ability .analyzer-battle-rules{margin-top:14px}
.analyzer-battle .analyzer-tags{margin-top:14px}
@media(max-width:680px){.analyzer-battle .card-detail-layout{grid-template-columns:1fr}.analyzer-battle .analyzer-info{max-height:none}.analyzer-battle .detail-large-art img{max-height:48vh}.playmat .mat-marker{font-size:8px}}
@media(prefers-reduced-motion:reduce){body:not(.battle-motion-full) .attack-strokes .attack-path,body:not(.battle-motion-full) .attack-lines-active .attack-strokes .attack-path{animation:none}}

/* Fighter display and visible card piles. */
.scoreboard .fighter{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;min-height:78px;padding:7px 9px;background:linear-gradient(130deg,#26343a,#14292f)}
.fighter-identity{display:flex;align-items:center;gap:7px;min-width:0}.fighter-identity>div{min-width:0}.fighter-identity strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fighter-portrait,.profile-emblem{display:grid;place-items:center;flex:0 0 auto;width:43px;height:48px;clip-path:polygon(12% 0,88% 0,100% 17%,100% 83%,88% 100%,12% 100%,0 83%,0 17%);border:2px solid #e5b574;background:linear-gradient(145deg,#bb5637,#41273d);color:#fff2cb;font:800 17px Rajdhani,sans-serif;text-shadow:0 2px 4px #000}
.fighter-portrait[data-avatar="azure"],.profile-emblem[data-avatar="azure"]{background:linear-gradient(145deg,#349fbd,#182d63)}.fighter-portrait[data-avatar="gold"],.profile-emblem[data-avatar="gold"]{background:linear-gradient(145deg,#d0a548,#684629)}.bot-portrait{background:linear-gradient(145deg,#567276,#213238);font-size:13px}
.scoreboard .fighter-stats{display:flex;align-items:center;justify-content:flex-end;gap:5px;margin:0}.life-display{min-width:90px;color:#fff1c4}.life-display>span{display:block;color:#ffb873;font:800 22px Rajdhani,sans-serif;line-height:1;text-shadow:1px 2px #172125}.life-display b{font-size:28px}.life-track{position:relative;height:11px;margin-bottom:4px;border:2px solid #19272b;border-radius:3px;background:#222f34;overflow:hidden;box-shadow:0 0 0 1px #bdada0}.life-track i{display:block;width:var(--life-fill,100%);height:100%;background:linear-gradient(#fff28a,#ffd23f 58%,#e99728);transition:width .35s ease}.life-track:after{content:"";position:absolute;inset:0;background:repeating-linear-gradient(90deg,transparent 0 8px,#26333c 8px 10px);pointer-events:none}
.scoreboard .fighter-stats .hand-count{min-width:34px;padding:3px 4px;background:#1d4248;color:#f4d68d;font-size:11px}.scoreboard .fighter-stats .hand-count b{font-size:13px}
.scoreboard .fighter-stats{flex-direction:column;align-items:flex-end;gap:0}.life-display{display:flex;flex-direction:column}.life-track{order:-1}
.playmat .mat-marker{overflow:visible}.playmat .mat-marker img{position:absolute;display:block;left:50%;top:45%;width:78%;height:73%;object-fit:fill;transform:translate(-50%,-50%);border-radius:4px;box-shadow:-3px 3px 0 #26393b88,-5px 5px 7px #0007;pointer-events:none}.playmat .mat-marker span,.mat-deck span{position:absolute;z-index:2;bottom:2px;left:50%;transform:translateX(-50%);white-space:nowrap;padding:2px 5px;background:#112d32e8;color:#fff4c7;text-shadow:0 1px 2px #000;font:800 10px Rajdhani,sans-serif;letter-spacing:.04em}.playmat .mat-marker b,.mat-deck b{color:#ffe49a}
.playmat .bot-drop{left:3.8%;top:22.4%;width:13.2%;height:17.7%}.playmat .player-drop{left:82.8%;top:59.4%;width:13.3%;height:17.7%}.playmat .bot-drop img,.playmat .player-drop img{width:91%;height:90%;top:50%;object-fit:contain}
.playmat .bot-gauge img,.playmat .player-gauge img{width:68%;height:auto;max-height:55%;top:43%;object-fit:contain;transform:translate(-50%,-50%) rotate(90deg)}
.mat-deck{position:absolute;z-index:2;width:11%;aspect-ratio:429/600;display:grid;place-items:center}.mat-deck img{display:block;width:100%;height:100%;object-fit:fill;border-radius:4px;box-shadow:-3px 3px 0 #29393a,-6px 6px 0 #111d23,0 8px 10px #0008}.playmat .bot-deck{left:4%;top:1.5%}.playmat .player-deck{left:84%;top:81%}.mat-deck span{bottom:-2px}
.field-card.rest .field-art,.mat-card.used img{transform:rotate(90deg);filter:grayscale(1) brightness(.75)}.playmat .zone .field-art{transition:transform .22s ease,filter .22s ease}.field-combat-stats{position:absolute;z-index:5;left:50%;bottom:-10px;transform:translateX(-50%);display:flex;gap:1px;white-space:nowrap;pointer-events:none}.field-combat-stats b{padding:1px 2px;border:1px solid #9aaba5;border-radius:3px;background:#102b30ee;color:#f8e8be;font:800 9px Rajdhani,sans-serif;line-height:1.1}.field-combat-stats b:first-child{color:#ffc29b}.field-combat-stats b:nth-child(2){color:#ffeb9e}.field-combat-stats b:last-child{color:#9fe0e8}
.pvp-score .pvp-fighter{display:flex;align-items:center;gap:7px;min-height:76px}.pvp-fighter-info{flex:1;min-width:0}.pvp-fighter-info strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pvp-fighter-info span{display:block!important}.pvp-score .life-display{min-width:80px}.pvp-score .life-display>span{font-size:21px;color:#ffb873}.pvp-score .life-display b{font-size:26px}
.profile-layout{display:grid;grid-template-columns:minmax(260px,.85fr) minmax(300px,1.15fr);gap:16px}.profile-card{text-align:center}.profile-card .profile-emblem{width:100px;height:112px;margin:8px auto 17px;font-size:40px}.profile-card h2{font-size:30px}.profile-summary{display:grid;gap:7px;margin-top:20px;text-align:left}.profile-summary span{padding:9px;border:1px solid #5e8785;border-radius:5px;color:#b5d6ce;font-size:12px}.profile-summary b{display:block;color:#f4dcaa;font-size:15px}.profile-editor label{display:block;color:#cce3db;font-size:13px}.profile-editor input:not([type="hidden"]){display:block;width:100%;margin:6px 0 16px;padding:9px;border:1px solid #8dafaa;border-radius:6px;background:#0c252b;color:#fff;font:inherit}.profile-avatar-options{display:flex;gap:8px;margin:10px 0 18px}.profile-avatar-choice{display:grid;justify-items:center;gap:5px;min-width:86px;padding:8px;border:1px solid #638d88;border-radius:7px;background:#102c32;color:#e6e4d3}.profile-avatar-choice.selected{border-color:#ffd27e;box-shadow:0 0 0 2px #b68a4c55}.profile-avatar-choice .profile-emblem{width:45px;height:52px}.profile-avatar-choice b{font:700 12px Rajdhani,sans-serif}
.analyzer-battle .detail-large-art{perspective:900px}.analyzer-battle .detail-large-art img{clip-path:inset(.5% 2.3% .6% 2.3% round 14px);transition:transform .16s ease-out;transform-style:preserve-3d;will-change:transform}
@media(max-width:700px){.scoreboard .fighter{grid-template-columns:1fr;gap:3px;min-height:93px}.scoreboard .fighter-stats{justify-content:space-between}.fighter-portrait{width:32px;height:37px;font-size:12px}.life-display{min-width:70px}.life-display>span{font-size:18px}.life-display b{font-size:23px}.profile-layout{grid-template-columns:1fr}.mat-deck span,.playmat .mat-marker span{font-size:8px}}
@media(prefers-reduced-motion:reduce){.analyzer-battle .detail-large-art img,.field-card.rest .field-art{transition:none}}

/* Foil effects from the supplied showcase, shared by analyzer and battle cards. */
.card-visual{position:relative;display:block;width:fit-content;max-width:100%;margin:auto;isolation:isolate;filter:drop-shadow(0 12px 18px #0009)}
.system-dialog .card-detail-layout{column-gap:48px}
.analyzer-battle .card-visual{transition:transform .16s ease-out;transform-style:preserve-3d;will-change:transform}
.card-visual img{filter:none;clip-path:inset(.5% 2.3% .6% 2.3% round 14px)}
.analyzer-collection .detail-large-art img,.analyzer-builder .detail-large-art img{clip-path:inset(.5% 2.3% .6% 2.3% round 14px)}
.foil-layer{position:absolute;z-index:4;inset:.5% 2.3% .6%;border-radius:14px;pointer-events:none;overflow:visible}
.card-face{position:absolute;display:block;inset:0;transform-origin:center;transition:transform .22s ease}
.card-face>img{display:block;width:100%;height:100%;object-fit:fill}
.field-card.rest .card-face,.mat-card.used .card-face{transform:rotate(90deg)}
.field-card.rest .field-art,.mat-card.used img{transform:none}
.field-card.rest .card-face>img,.mat-card.used .card-face>img{filter:grayscale(1) brightness(.75)}
.card-face>.foil-layer{inset:1% 2.3%;border-radius:3px}
.hand-card{overflow:visible}.hand-card .card-face{inset:0;border-radius:5px}.hand-card .card-face>img{border-radius:5px}
.hand-scroll{padding:20px 18px 24px;min-height:205px}
@media(max-width:650px){.hand-scroll{padding:16px 12px 19px;min-height:175px}}
.hand-card .card-badge,.hand-card .shield-badge{z-index:6}
.foil-layer>span{position:absolute;pointer-events:none;opacity:0}
.foil-layer>.foil-aura{inset:-15% -18%;border-radius:42px;background:radial-gradient(circle,#ffffff33 0%,#ffdc482e 22%,#4da3ff1f 50%,transparent 72%);filter:blur(clamp(6px,1.5vw,24px))}
.foil-layer>.foil-shine{inset:0;border-radius:inherit;background:linear-gradient(110deg,transparent 40%,#ffffff08 44%,#ffffffe6 49%,#ffefa485 51%,transparent 57%);background-size:300% 100%;background-position:100% 0;mix-blend-mode:screen}
.foil-layer>.foil-border{inset:0;border-radius:inherit;border:2px solid #fff2a052;box-shadow:inset 0 0 12px #ffffff30,0 0 8px #ffd53261}
.foil-layer>.foil-stars{position:absolute;inset:0;width:100%;height:100%;z-index:5;pointer-events:none}
.foil-glow .foil-aura,.foil-glow .foil-border{opacity:1}.foil-glow .foil-aura{animation:foil-aura-pulse 2s ease-in-out infinite alternate}.foil-glow .foil-border{animation:foil-border-glow 1.1s ease-in-out infinite alternate}
.foil-shine .foil-shine{opacity:1;animation:foil-sweep 2.8s linear infinite}
.foil-float{animation:foil-float 3.2s ease-in-out infinite}
.field-card.foil-float,.mat-card.foil-float{animation-duration:3.2s}
@keyframes foil-aura-pulse{from{opacity:.52;scale:.95}to{opacity:1;scale:1.06}}
@keyframes foil-border-glow{from{opacity:.42}to{opacity:1}}
@keyframes foil-sweep{to{background-position:-100% 0}}
@keyframes foil-float{0%,100%{translate:0 0;rotate:-.25deg}50%{translate:0 -7px;rotate:.25deg}}
.mat-deck[hidden]{display:none}.playmat .bot-lost-deck{left:17%;top:1.5%}.playmat .player-lost-deck{left:71%;top:81%}.mat-deck .lost-card-back{border-color:#a96dd0;box-shadow:-3px 3px 0 #33213e,-6px 6px 0 #1c1429,0 8px 12px #000a}.mat-deck.no-lost-deck,.mat-deck.lost-active{width:auto;min-width:42px;aspect-ratio:auto;min-height:20px;padding:2px 5px;border:1px solid #9273a8;border-radius:4px;background:#171524eF;color:#f3ddff;font:800 8px Rajdhani,sans-serif;letter-spacing:.03em}.mat-deck.no-lost-deck span,.mat-deck.lost-active span{position:static;transform:none;padding:0;background:none;color:inherit;font:inherit}
.deck-stepper .choose-flag{width:100%;height:auto;min-height:27px;padding:4px 6px;font-size:11px}
.lost-deck-panel{margin-top:16px}.lost-deck-panel p{font-size:12px;color:#bad2cd;margin:4px 0 14px}.lost-deck-panel .deck-grid{max-height:420px}.card-effect-setting{display:block;margin-top:15px;color:#c7ded8;font-size:12px}.card-effect-setting select{display:block;width:100%;margin-top:5px;background:#092126;border:1px solid #689e9e;border-radius:6px;color:#f0f3e2;padding:8px 10px;font:inherit}
@media(prefers-reduced-motion:reduce){.analyzer-battle .card-visual{transition:none}}
.foil-options{display:grid;gap:6px;margin-top:10px}.foil-options label{display:flex;align-items:center;gap:8px;color:#c7ded8;font-size:12px}.foil-options input{accent-color:#ffd453}

/* Field labels stay unframed; each number gets a frame sized by its text. */
.field-combat-stats{width:max-content;max-width:none;bottom:-20px;gap:2px;align-items:flex-end;font-family:Impact,"Arial Black",sans-serif;font-style:italic;font-weight:900;filter:drop-shadow(0 2px 2px #000b)}
.field-combat-stats .stat{display:flex;flex-direction:column;align-items:center;flex:0 0 auto;min-width:0;line-height:1}
.field-combat-stats .stat-label{font-size:clamp(8px,.8vw,10px);-webkit-text-stroke:.3px #071014;paint-order:stroke fill;text-shadow:1px 1px 0 #000,0 0 2px #000}
.field-combat-stats .stat-value{display:block;width:max-content;padding:2px 4px 1px;border:1px solid #f3d37e;border-radius:3px;font-size:clamp(11px,1.1vw,13px);-webkit-text-stroke:.3px #071014;paint-order:stroke fill;text-align:center;text-shadow:1px 1px 0 #000,0 0 2px #000;box-shadow:inset 0 1px #ffffff85,0 1px 2px #000a}
.field-combat-stats .stat-atk .stat-label{color:#ff7c22}.field-combat-stats .stat-atk .stat-value{color:#ffdf60;background:linear-gradient(#a32306,#d94b0a 55%,#6d1808)}
.field-combat-stats .stat-crt .stat-label{color:#ffba38}.field-combat-stats .stat-crt .stat-value{color:#fff;background:linear-gradient(#6544a0,#287e9a 55%,#34596b)}
.field-combat-stats .stat-def .stat-label{color:#7aeaff}.field-combat-stats .stat-def .stat-value{color:#7aeaff;background:linear-gradient(#064990,#087dbe 55%,#073b72)}
.battle-set-panel{padding:12px 14px}.battle-set-row{margin-top:9px;padding-top:8px;border-top:1px solid #ffffff24}.battle-set-row strong{display:block;color:#f2dca6;font:800 12px Rajdhani,sans-serif;letter-spacing:.06em}.set-card-strip{display:flex;align-items:center;gap:6px;min-height:53px;overflow-x:auto;padding:6px 1px}.set-card-strip>span{color:#9eb9b7;font-size:12px}.set-card{flex:0 0 38px;width:38px;height:53px;padding:0;border:1px solid #d4b56b;border-radius:4px;background:#193a3c;color:#f2dfbb;overflow:hidden;cursor:pointer}.set-card:hover,.set-card:focus-visible{outline:2px solid #f5ce78;outline-offset:1px}.set-card img{display:block;width:100%;height:100%;object-fit:contain}
.deck-mode-help,.room-mode-help{margin:4px 0 10px;color:#a9c8c3;font-size:12px;line-height:1.45}
.nav-link[hidden]{display:none}
.reward-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px;margin:18px 0 5px}.reward-tile{min-width:0;padding:10px;text-align:left;color:#f5ead3;background:#102a30;border:1px solid #6d9e9b;border-radius:9px;cursor:pointer}.reward-tile:hover{border-color:#f2ca7f;background:#1b3a40}.reward-art{position:relative;display:grid;place-items:center;height:175px;padding:5px;background:linear-gradient(145deg,#204b52,#10232a);border:2px solid #789b9a;border-radius:7px;overflow:hidden}.reward-art img{display:block;max-width:100%;height:100%;object-fit:contain}.reward-art.skin-sr{border-color:#e9c165}.reward-art.skin-ssr{border-color:#dcb4ff;box-shadow:0 0 0 2px #a373d5,0 0 18px #bd77edaa}.reward-image-note{position:absolute;bottom:5px;padding:2px 5px;background:#10232ae8;color:#f1d899;font-size:10px}.reward-tile strong{display:block;margin-top:8px;font-size:12px;line-height:1.3}.reward-tile small{display:block;margin-top:4px;color:#b7cfca;font-size:11px}.cosmetic-preview{display:grid;place-items:center;width:100%;height:150px;margin:10px 0 13px;padding:9px;border:1px solid #729a97;border-radius:8px;background:radial-gradient(circle,#2a5156,#10252c);overflow:hidden}.cosmetic-preview img{display:block;max-width:100%;max-height:100%;object-fit:contain}.cosmetic-playmat img{width:100%;height:100%;object-fit:contain;filter:hue-rotate(155deg) saturate(1.3)}.cosmetic-sleeve img{height:100%;padding:3px;border:4px solid #e4c477;border-radius:6px;box-shadow:0 0 0 2px #815726,0 8px 15px #0008}.cosmetic-frame .profile-emblem{width:78px;height:90px;border:5px solid #e39b53;box-shadow:0 0 0 4px #703f29,0 0 24px #ec8a4b}.shop-reward{max-width:360px;margin:14px auto;text-align:center}.shop-reward .cosmetic-preview{height:240px}.shop-reward p{color:#c9ddd5;font-size:14px}
.reward-art,.cosmetic-preview{display:flex;align-items:center;justify-content:center}.reward-art img,.cosmetic-preview img{flex:0 1 auto;width:auto;height:auto;max-width:100%;max-height:100%}.reward-art .reward-image-note{left:50%;transform:translateX(-50%);white-space:nowrap}
.reward-grid{grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}
.shop-option{display:flex;align-items:center;gap:10px;margin-top:15px;padding:12px;border:1px solid #628c89;border-radius:7px;color:#d5ebe0;font-size:13px}.shop-option input{accent-color:#d9b36b}.cosmetic-sleeve img{padding:0;border:0;box-shadow:0 8px 15px #0008}

/* Battle layout: a tall log on the left, field in the middle, commands on the right. */
.layout{grid-template-columns:210px minmax(0,1fr) 350px;grid-template-areas:"log arena sidebar" "hand hand hand";gap:16px}
.layout>.log-card{grid-area:log;min-width:0;align-self:stretch;min-height:0}
.layout>.log-card ol{max-height:min(790px,75vh)}
.sidebar .action-card{order:10;min-height:0}
.playmat-wrap{overflow:visible;padding:10px 65px}
.playmat{flex:none}
.pvp-battle{grid-template-columns:210px minmax(0,1fr) 350px;align-items:start}
.pvp-battle>.pvp-log-panel{grid-column:1;grid-row:1;align-self:stretch;min-height:550px!important}
.pvp-battle>.pvp-board{grid-column:2;grid-row:1;min-width:0}
.pvp-battle>.pvp-side{grid-column:3;grid-row:1;min-width:0}
.pvp-battle>.pvp-hand-panel{grid-column:1/-1;grid-row:2;min-width:0}
.pvp-log{max-height:min(790px,75vh)}

/* Align pile targets with the printed Field1 zones. Lost decks sit beside the mat. */
.playmat .bot-gauge{left:80.5%;top:0;width:19.5%;height:50.5%}
.playmat .player-gauge{left:0;top:50.5%;width:19.2%;height:49.5%}
.playmat .bot-drop{left:4.1%;top:23.1%;width:13%;height:17.3%}
.playmat .player-drop{left:82.8%;top:60.3%;width:13%;height:17.3%}
.playmat .bot-deck{left:4%;top:1.5%}
.playmat .player-deck{left:84%;top:81%}
.playmat .bot-lost-deck{left:-13%;top:1.5%}
.playmat .player-lost-deck{left:102%;top:81%}
.playmat .mat-deck.no-lost-deck,.playmat .mat-deck.lost-active{width:11%;min-width:0;min-height:24px;text-align:center}
.playmat .bot-buddy{left:23.8%;top:.5%}
.playmat .bot-flag,.playmat .bot-item{left:42.8%;top:3%}
.playmat .player-flag,.playmat .player-item{left:43%;bottom:5%}
.playmat .player-buddy{left:60.5%;bottom:4.5%}
.playmat .flag-effect{filter:drop-shadow(0 0 5px #f3ce74b8);animation:flag-aura 2.8s ease-in-out infinite alternate}
@keyframes flag-aura{to{filter:drop-shadow(0 0 11px #ffe39bd9)}}

/* Center the card footprints on the printed hexes and Flag/Buddy circles. */
.playmat .zone[data-label="ENEMY L"]{left:65.1%;top:25.1%}
.playmat .zone[data-label="ENEMY C"]{left:46.6%;top:31%}
.playmat .zone[data-label="ENEMY R"]{left:28.5%;top:25.1%}
.playmat .zone[data-label="YOUR L"]{left:28.5%;top:60.1%}
.playmat .zone[data-label="YOUR C"]{left:46.6%;top:53.8%}
.playmat .zone[data-label="YOUR R"]{left:65.1%;top:60.1%}
.playmat .bot-buddy{left:29.7%;top:3.1%}
.playmat .bot-flag,.playmat .bot-item{left:47%;top:4.3%}
.playmat .player-flag,.playmat .player-item{left:47%;bottom:3.8%}
.playmat .player-buddy{left:64.2%;bottom:3.8%}
.playmat .mat-card .field-combat-stats{z-index:7;bottom:-20px}

/* Portrait cards keep their full art; Impact cards use their native landscape art. */
.hand-scroll{min-height:260px;align-items:flex-start;gap:14px;padding:18px 18px 24px}
.hand-card{flex:0 0 150px;height:226px}
.hand-card .card-face{inset:0 0 20px}
.hand-card .card-face>img{object-fit:contain}
.hand-card .card-badge{height:20px;line-height:14px}
.hand-card.hand-impact{flex-basis:218px;height:177px}
.hand-card.hand-impact .card-face{inset:0 0 20px}
.hand-card .card-badge{height:34px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;white-space:normal;word-break:break-word;line-height:11px;padding:2px 5px;overflow:hidden}
.hand-card .card-face,.hand-card.hand-impact .card-face{inset:0 0 34px}

@media(max-width:1250px){
  .layout{grid-template-columns:minmax(0,1fr) 330px;grid-template-areas:"arena sidebar" "hand hand" "log log"}
  .layout>.log-card{min-height:160px}
  .pvp-battle{grid-template-columns:minmax(0,1fr) 330px}
  .pvp-battle>.pvp-board{grid-column:1}
  .pvp-battle>.pvp-side{grid-column:2}
  .pvp-battle>.pvp-hand-panel{grid-column:1/-1;grid-row:2}
  .pvp-battle>.pvp-log-panel{grid-column:1/-1;grid-row:3;min-height:160px!important}
}
@media(max-width:900px){
  .layout{grid-template-columns:minmax(0,1fr);grid-template-areas:"arena" "hand" "sidebar" "log"}
  .sidebar{display:flex;flex-direction:column}
  .pvp-battle{grid-template-columns:minmax(0,1fr)}
  .pvp-battle>.pvp-board{grid-column:1;grid-row:1}
  .pvp-battle>.pvp-hand-panel{grid-column:1;grid-row:2}
  .pvp-battle>.pvp-side{grid-column:1;grid-row:3}
  .pvp-battle>.pvp-log-panel{grid-column:1;grid-row:4}
}
@media(max-width:650px){
  .playmat-wrap{padding:8px 12%}
  .hand-scroll{min-height:225px;padding:14px 12px 20px}
  .hand-card{flex-basis:130px;height:198px}
  .hand-card.hand-impact{flex-basis:190px;height:157px}
}
@media(prefers-reduced-motion:reduce){.playmat .flag-effect{animation:none}}

/* Rewards show the card art without nested frames. */
.reward-tile,.reward-tile:hover{border:0;border-radius:0;background:transparent;box-shadow:none;padding:6px;color:#f5ead3}
.reward-art,.reward-art.skin-sr,.reward-art.skin-ssr{border:0!important;border-radius:0;background:transparent;box-shadow:none!important;padding:0}
.reward-art img{border:0;box-shadow:none;object-fit:contain}
.reward-tile:focus-visible{outline:2px solid #e2b66d;outline-offset:3px}
.starter-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:18px}
.starter-option{min-width:0}.starter-option>img{display:block;width:130px;height:180px;object-fit:contain;margin:auto}
.starter-option h3{color:#f1d29a}.starter-option details{margin:12px 0}.starter-option summary{cursor:pointer;color:#a4d4d0}
.starter-option table{width:100%;border-collapse:collapse;font-size:11px;margin-top:8px}.starter-option td,.starter-option th{padding:5px 3px;text-align:left;border-bottom:1px solid #ffffff20}.starter-option td:first-child{white-space:nowrap}.starter-option td:last-child{text-align:center}
.archive-editor{width:min(1050px,calc(100vw - 28px));max-height:90vh;overflow:auto}
.archive-editor>p{font-size:13px;color:#bad4cf}.archive-selected{display:flex;flex-wrap:wrap;gap:6px;margin:16px 0;padding:12px 0;border-block:1px solid #ffffff24;max-height:180px;overflow:auto}
.archive-selected .ghost{font-size:11px;padding:5px 7px}.archive-options{display:grid;grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:12px}
.archive-option{display:flex;flex-direction:column;align-items:center;gap:5px;border:0;background:transparent;padding:5px;color:#f0e4ca;text-align:center}
.archive-option img{width:100%;height:160px;object-fit:contain}.archive-option strong{font-size:12px}.archive-option small{font-size:11px;color:#afd1cb}.archive-option>span{color:#f3ca76}.archive-option:hover:not(:disabled){background:#ffffff0a}
.archive-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0;color:#bdd5d0;font-size:13px}.archive-pagination>div{display:flex;gap:8px}.archive-pagination button:disabled{opacity:.45}
.admin-panel,.admin-grant-panel{margin-bottom:16px}.admin-grant-panel{max-width:760px}.admin-grant-panel>p{color:#bad1cd}.admin-grant-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;margin:18px 0}.admin-grant-grid label{display:block;color:#d8e4db;font-size:13px}.admin-grant-grid label[hidden]{display:none}.admin-grant-grid input,.admin-grant-grid select{display:block;width:100%;min-height:40px;margin-top:6px;padding:8px 10px;border:1px solid #78aaa6;border-radius:7px;background:#092126;color:#f0f3e2;font:inherit}.admin-grant-grid input:focus,.admin-grant-grid select:focus{outline:2px solid #edbf72}.admin-grant-account{grid-column:1/-1}.admin-grant-help{font-size:12px}
.collection-effect-preview{margin:20px 0;padding:14px;border:1px solid #597f7c;border-radius:8px;background:#102a30}.collection-effect-preview h3{margin:0 0 6px}.collection-effect-preview p{font-size:12px;color:#bad1cd}.effect-preview-options{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.effect-preview-options button{padding:7px 9px;border:1px solid #6b9893;border-radius:6px;background:#183b40;color:#e9f2e7;cursor:pointer}.effect-preview-options button:hover,.effect-preview-options button.active{border-color:#edc77e;background:#6b5238;color:#fff}.deck-search-note{margin:8px 0;color:#bad1cd;font-size:12px}
@media(max-width:650px){.archive-pagination{align-items:flex-start;flex-direction:column}.admin-grant-grid{grid-template-columns:1fr}.admin-grant-account{grid-column:auto}}
@media(max-width:800px){.starter-options{grid-template-columns:1fr}.starter-option{padding-bottom:15px;border-bottom:1px solid #ffffff20}}
@media(max-width:540px){.archive-options{grid-template-columns:repeat(2,minmax(0,1fr))}.archive-option img{height:140px}}

/* Battle action effects: card calls, attacks, destruction, and life changes. */
.battle-fx-card{position:fixed;z-index:1200;display:block;object-fit:cover;border:2px solid #f4d17c;border-radius:7px;box-shadow:0 12px 30px #000b;pointer-events:none;will-change:left,top,width,height,transform,opacity,filter}
.battle-fx-card.destroy{border-color:#ff8a66;box-shadow:0 0 18px #ff624b99,0 12px 30px #000b}
.zone.call-enter{animation:zone-call-arrive .68s ease-out}
.zone.call-enter .field-card{animation:call-card-arrive .52s cubic-bezier(.16,.82,.27,1) both}
.mat-card.call-enter{animation:zone-call-arrive .68s ease-out}
.battle-fx-ring{position:absolute;z-index:8;inset:13%;border:3px solid #f7d27b;border-radius:12px;box-shadow:0 0 18px #ffdb83b8;pointer-events:none;animation:destroy-ring .72s ease-out both}
.battle-fx-ring.destroy{border-color:#ff8067;box-shadow:0 0 24px #ff5e45c9}
.battle-damage-float{position:absolute;z-index:15;top:0;left:50%;color:#ff8a6d;font:900 25px Rajdhani,sans-serif;text-shadow:0 2px 3px #24110e,0 0 14px #ff5a42;pointer-events:none;animation:damage-float 1s cubic-bezier(.17,.74,.27,1) both}
.battle-damage-float.healing{color:#8ef0bb;text-shadow:0 2px 3px #092319,0 0 14px #4ed68c}
.battle-life-hit{animation:life-hit .58s ease-out}
.attack-lunge .field-card,.mat-card.attack-lunge{animation:attack-lunge .56s cubic-bezier(.18,.78,.26,1)}
.attack-impact{animation:attack-impact .52s ease-out}
.battle-animations-off .attack-strokes .attack-path,.battle-animations-off .attack-lines-active .attack-strokes .attack-path{animation:none!important}
@keyframes zone-call-arrive{0%{box-shadow:0 0 0 0 #f6d17a00}38%{box-shadow:0 0 0 5px #f6d17a9c,0 0 28px #f6d17a9c}100%{box-shadow:0 0 0 0 #f6d17a00}}
@keyframes call-card-arrive{0%{opacity:0;transform:translateY(-18px) scale(.68);filter:brightness(1.6) blur(2px)}72%{opacity:1;transform:translateY(2px) scale(1.045);filter:brightness(1.18) blur(0)}100%{transform:translateY(0) scale(1);filter:none}}
@keyframes destroy-ring{0%{opacity:1;transform:scale(.55);border-width:5px}100%{opacity:0;transform:scale(1.45);border-width:1px}}
@keyframes damage-float{0%{opacity:0;transform:translate(-50%,12px) scale(.7)}18%{opacity:1;transform:translate(-50%,-6px) scale(1.18)}75%{opacity:1;transform:translate(-50%,-40px) scale(1)}100%{opacity:0;transform:translate(-50%,-56px) scale(.92)}}
@keyframes life-hit{0%,100%{filter:none}24%{filter:drop-shadow(0 0 12px #ff725a);transform:translateX(-3px)}48%{transform:translateX(3px)}70%{transform:translateX(-1px)}}
@keyframes attack-lunge{0%,100%{transform:translateY(0) scale(1);filter:none}36%{transform:translateY(-11px) scale(1.08);filter:drop-shadow(0 0 10px #ffe28a)}68%{transform:translateY(3px) scale(.98)}}
@keyframes attack-impact{0%,100%{filter:none;transform:translateX(0)}22%{filter:brightness(1.8) drop-shadow(0 0 12px #ff9c58);transform:translateX(-4px)}48%{transform:translateX(4px)}72%{transform:translateX(-2px)}}
.life-display{position:relative}.settings-motion{display:flex!important;align-items:center;gap:9px}.settings-motion input{width:18px;height:18px;accent-color:#e3b766}
.battle-motion-reduced .battle-fx-card{display:none!important}.battle-motion-reduced .zone.call-enter,.battle-motion-reduced .zone.call-enter .field-card,.battle-motion-reduced .mat-card.call-enter,.battle-motion-reduced .battle-fx-ring,.battle-motion-reduced .battle-damage-float,.battle-motion-reduced .battle-life-hit,.battle-motion-reduced .attack-lunge .field-card,.battle-motion-reduced .mat-card.attack-lunge,.battle-motion-reduced .attack-impact,.battle-motion-reduced .attack-strokes .attack-path{animation:none!important}.battle-motion-reduced .zone.call-enter,.battle-motion-reduced .mat-card.call-enter{box-shadow:0 0 0 3px #f6d17a9c,0 0 18px #f6d17a70}.battle-motion-reduced .battle-damage-float{transform:translateX(-50%);top:-18px}.battle-motion-reduced .battle-life-hit{box-shadow:0 0 12px #ff725a}.battle-motion-reduced .attack-lunge .field-card,.battle-motion-reduced .mat-card.attack-lunge{filter:drop-shadow(0 0 10px #ffe28a)}.battle-motion-reduced .attack-impact{box-shadow:0 0 14px #ff9c58}
.battle-effects-preview{max-width:320px;margin:18px auto 8px;pointer-events:none}.battle-effects-preview .battle-preview-hand{position:absolute;right:9%;bottom:3%;width:48px;height:67px;min-width:0;margin:0;padding:0;flex:none}.battle-effects-preview .battle-preview-hand .card-face{position:absolute;inset:0}.battle-effects-preview .battle-preview-hand img{width:100%;height:100%;object-fit:contain}.battle-preview-life{position:absolute;left:50%;transform:translateX(-50%);z-index:10;padding:5px 10px;background:#102b30e8;border:1px solid #dfba6e;border-radius:7px}.battle-preview-life.enemy{top:1%}.battle-preview-life.own{bottom:1%}.battle-preview-life .life-display{min-width:0;font:800 20px Rajdhani,sans-serif;color:#fff1c4}.battle-effects-preview .zone{pointer-events:none}

/* Resource provenance and defensive response scenes, shared by PvBot and PvP. */
.hand-scroll[data-battle-hand] { position:relative; }
.battle-resource-label { position:absolute; z-index:30; left:50%; top:0; transform:translate(-50%,-90%); padding:5px 9px; border:1px solid #9bf5ff; border-radius:8px; background:#073644ed; color:#d4fbff; font:700 11px/1.2 sans-serif; white-space:nowrap; pointer-events:none; animation:resource-label 1.35s ease both; }
.battle-resource-arrive { box-shadow:0 0 9px #63e7ff; }
.battle-fx-card.soul { z-index:1199; }
.battle-defense-fx { position:absolute; z-index:50; transform:translate(-50%,-50%); min-width:110px; padding:22px 12px; border:3px solid #94eaff; border-radius:45% 45% 55% 55%; color:white; background:radial-gradient(ellipse,#2183bdeb,#113d67e6); box-shadow:0 0 30px #5ce5ff,inset 0 0 20px #d6fbff; text-align:center; font:800 13px/1.2 sans-serif; pointer-events:none; animation:defense-shield 1.5s ease both; }
.battle-defense-fx.soulguard { border-color:#e5b4ff; background:radial-gradient(ellipse,#8936b9eb,#36205ae6); box-shadow:0 0 32px #dca3ff; }
.battle-defense-guide { position:absolute; inset:0; pointer-events:none; z-index:24; }
.battle-counter-pause .attack-path, .battle-counter-pause .attack-lunge, .battle-counter-pause .attack-impact { animation-play-state:paused!important; }
.battle-attack-shatter { animation:attack-shatter .65s ease both; }
@keyframes resource-label { 0%{opacity:0} 15%,80%{opacity:1} 100%{opacity:0} }
@keyframes defense-shield { 0%{opacity:0;transform:translate(-50%,-50%) scale(.65)} 15%,75%{opacity:1;transform:translate(-50%,-50%) scale(1)} 100%{opacity:0;transform:translate(-50%,-50%) scale(1.15)} }
@keyframes attack-shatter { to{opacity:0;filter:blur(7px);transform:scale(1.07)} }
body.battle-motion-reduced .battle-defense-fx, body.battle-motion-reduced .battle-resource-label, body.battle-motion-reduced .battle-attack-shatter { animation:none; }

.battle-hand-anchor { position:absolute; top:12%; left:81%; width:10%; height:14%; pointer-events:none; }

.battle-defense-fx.nullify::after, .battle-defense-fx.soulguard::after { content:"✦ · ✧ · ✦"; position:absolute; inset:-20px -18px; color:#d7f9ff; font-size:28px; text-shadow:0 0 12px #b6f4ff; pointer-events:none; }

.playmat .mat-marker .battle-resource-label, .playmat .mat-deck .battle-resource-label { top:4px; bottom:auto; left:50%; transform:translateX(-50%); padding:3px 5px; font-size:9px; border:0; background:#073644ed; }

.deck-search-scope{display:flex;align-items:center;gap:7px;color:#bad6d0;font-size:12px;white-space:nowrap}.deck-search-scope select{min-width:160px;min-height:37px;padding:7px 9px;border:1px solid #689e9e;border-radius:6px;background:#092126;color:#f0f3e2;font:inherit}.hub-online{display:flex;align-items:center;gap:7px;width:max-content;margin:0 0 16px;padding:7px 11px;border:1px solid #5b9e8c;border-radius:999px;background:#173e3a;color:#d4ede0;font-size:13px}.hub-online strong{color:#ffda89}.hub-online-dot{width:8px;height:8px;border-radius:50%;background:#6fe3a7;box-shadow:0 0 8px #64e5a2}
@media(max-width:650px){.deck-search-scope{width:100%;justify-content:space-between}.deck-search-scope select{flex:1}}
.profile-account{max-width:760px;margin-top:16px}.profile-account label{display:grid;gap:6px;margin:12px 0;color:#d4e5d8;font-size:13px}.profile-account input{width:100%;max-width:420px;padding:10px 12px;border:1px solid #628e8b;border-radius:7px;background:#0d2429;color:#f4edda}.profile-account .panel-actions{flex-wrap:wrap}
.profile-account .account-recovery{margin-top:14px;padding-top:12px;border-top:1px solid #47706e}.profile-account .account-recovery summary{color:#9fe8dc;cursor:pointer}.profile-account .account-recovery label{margin-top:12px}
.deck-toolbar{grid-template-columns:minmax(0,1fr) auto auto}
.deck-extra-filters select{width:auto;max-width:190px}
@media(max-width:650px){.deck-toolbar{grid-template-columns:minmax(0,1fr) auto}}
.battle-impact-cutscene{position:fixed;z-index:1300;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:radial-gradient(circle,#2a3b46e8,#071115f5 70%);color:#ffe5a3;pointer-events:none;animation:impact-cutscene 1.9s ease-out both}
.battle-impact-cutscene img{width:min(64vw,270px);max-height:62vh;object-fit:contain;border:3px solid #f4d17c;border-radius:8px;box-shadow:0 0 45px #eda74199;transform:rotate(-4deg)}
.battle-impact-cutscene strong{font:900 clamp(30px,6vw,65px) Rajdhani,sans-serif;letter-spacing:.18em;text-shadow:0 0 22px #f5a334}
.battle-impact-cutscene span{font:700 clamp(15px,2vw,24px) Rajdhani,sans-serif;text-align:center;padding:0 16px}
@keyframes impact-cutscene{0%{opacity:0;transform:scale(1.14)}16%,70%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.96)}}
@media(prefers-reduced-motion:reduce){.battle-impact-cutscene{animation:none}}
.starter-deck-dialog{width:min(1100px,calc(100vw - 24px));max-height:90dvh;overflow:auto}
.starter-deck-dialog .dialog-head{position:sticky;top:0;z-index:2;background:#142e35;padding-bottom:10px}
.starter-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:14px;margin-top:18px}
.starter-card-tile{min-width:0;padding:8px;border:1px solid #608e8b;border-radius:8px;background:#10282e}
.starter-card-image{position:relative;height:185px;display:grid;place-items:center}
.starter-card-image img{max-width:100%;max-height:100%;object-fit:contain}
.starter-card-image b{position:absolute;right:2px;top:2px;padding:2px 7px;border:1px solid #e9c781;border-radius:14px;background:#182b2de8;color:#ffe09c}
.starter-card-tile strong,.starter-card-tile small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.starter-card-tile strong{font-size:12px}.starter-card-tile small{color:#a9c8c3;font-size:10px}
.starter-option>.action-btn{margin:7px 6px 0 0}
@media(min-width:1251px) and (min-height:790px){
  .layout{height:calc(100dvh - 83px);grid-template-rows:minmax(0,1fr) 205px;gap:8px;padding-top:8px;align-items:stretch}
  .layout>.arena-panel,.layout>.sidebar,.layout>.log-card{height:100%;min-height:0;overflow:auto}
  .layout .match-header{height:50px;padding:6px 15px}
  .layout .arena{padding:5px}
  .layout .scoreboard{margin-bottom:5px}
  .layout .playmat{width:min(100%,536px,calc(100dvh - 575px))}
  .layout>.hand-panel{height:205px;padding:7px 12px}
  .layout .hand-heading{height:38px;flex:0 0 38px;align-items:center}
  .layout .hand-heading h2{margin:1px 0 0}
  .layout .hand-help{display:none}
  .layout .hand-scroll{height:151px;min-height:0;padding:3px 2px 5px;gap:9px;overflow-y:hidden}
  .layout .hand-card{flex:0 0 130px;height:130px}
  .layout .hand-card.hand-impact{flex-basis:190px;height:130px}
  .pvp-battle{height:calc(100dvh - 169px);grid-template-rows:minmax(0,1fr) 205px;gap:8px;align-items:stretch}
  .pvp-battle>.pvp-board,.pvp-battle>.pvp-side,.pvp-battle>.pvp-log-panel{height:100%;min-height:0;overflow:auto}
  .pvp-battle>.pvp-board{padding:5px}
  .pvp-battle .pvp-phase h2{margin:2px 0 3px}
  .pvp-battle .pvp-score{margin-bottom:3px}
  .pvp-battle .playmat{width:min(100%,536px,calc(100dvh - 575px))}
  .pvp-battle>.pvp-side{display:flex;flex-direction:column;gap:8px}
  .pvp-battle>.pvp-side>.system-panel{margin-bottom:0}
  .pvp-battle .pvp-move-panel{order:-1;flex:0 0 auto}
  .pvp-battle>.pvp-hand-panel{height:205px;padding:7px 12px;overflow:hidden}
  .pvp-battle>.pvp-hand-panel .panel-head{height:38px;align-items:center}
  .pvp-battle>.pvp-hand-panel .panel-head h2{margin:0}
  .pvp-battle .hand-scroll{height:151px;min-height:0;padding:3px 2px 5px;gap:9px;overflow-y:hidden}
  .pvp-battle .hand-card{flex:0 0 130px;height:130px}
  .pvp-battle .hand-card.hand-impact{flex-basis:190px;height:130px}
}
@media(max-width:1250px), (max-height:789px){
  .layout>.hand-panel,.pvp-battle>.pvp-hand-panel{position:fixed;z-index:100;left:12px;right:12px;bottom:env(safe-area-inset-bottom,0px);height:175px;margin:0;padding:7px 12px;background:#132a30f5;box-shadow:0 -10px 35px #000a;overflow:hidden}
  .layout,.pvp-battle{padding-bottom:190px}
  .layout .hand-heading h2,.pvp-battle .panel-head h2{margin:0 0 3px}
  .layout .hand-scroll,.pvp-battle .hand-scroll{height:135px;min-height:0;padding:2px 2px 5px;gap:9px}
  .layout .hand-card,.pvp-battle .hand-card{flex:0 0 96px;height:130px}
  .layout .hand-card.hand-impact,.pvp-battle .hand-card.hand-impact{flex-basis:175px;height:130px}
}
@media(max-width:600px){
  .layout>.hand-panel,.pvp-battle>.pvp-hand-panel{left:5px;right:5px;height:175px;padding:5px 7px}
  .layout,.pvp-battle{padding-bottom:185px}
  .layout .hand-scroll,.pvp-battle .hand-scroll{height:137px}
  .layout .hand-card,.pvp-battle .hand-card{flex-basis:84px;height:114px}
  .layout .hand-card.hand-impact,.pvp-battle .hand-card.hand-impact{flex-basis:154px;height:114px}
  .starter-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
}
@media(min-width:1251px) and (max-height:789px){
  .layout>.hand-panel,.pvp-battle>.pvp-hand-panel{left:calc(max(0px,(100vw - 1560px)/2) + 250px);right:calc(max(0px,(100vw - 1560px)/2) + 390px);height:165px}
  .layout>.arena-panel,.layout>.sidebar,.layout>.log-card{max-height:calc(100dvh - 100px);overflow:auto}
  .layout .playmat,.pvp-battle .playmat{width:min(100%,536px,calc(100dvh - 320px))}
  .sidebar .action-card{order:-1}
}
@media(min-width:901px) and (max-width:1250px){
  .layout>.hand-panel,.pvp-battle>.pvp-hand-panel{right:355px}
  .sidebar .action-card{order:-1}
}
@media(min-width:901px) and (max-height:789px){
  .layout>.hand-panel,.pvp-battle>.pvp-hand-panel{left:auto;right:calc(max(0px,(100vw - 1560px)/2) + 26px);width:350px;height:222px}
}
@media(min-width:901px) and (max-width:1250px){
  .layout>.hand-panel,.pvp-battle>.pvp-hand-panel{left:auto;right:26px;width:330px;height:222px}
}
@media(min-width:901px) and (max-height:789px), (min-width:901px) and (max-width:1250px){
  .layout>.hand-panel .hand-help{display:none}
  .layout>.hand-panel .hand-heading{height:39px;align-items:center}
  .layout>.hand-panel .hand-heading h2{font-size:19px;line-height:1.1;margin:1px 0 0}
  .layout .hand-scroll,.pvp-battle .hand-scroll{height:155px}
}
.pvp-live-header{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px 14px;min-height:48px;margin:8px 0;color:#c8ded6}
.pvp-live-title,.pvp-live-tools{display:flex;align-items:center;flex-wrap:wrap;gap:7px 12px}
.pvp-live-title h1{font-size:24px;line-height:1.1;margin:0;color:#f3f1de}
.pvp-live-title>span:last-child,.pvp-live-tools>span:first-child{font-size:12px}
.pvp-live-tools .coins-pill{padding:6px 11px;font-size:13px}
.pvp-live-tools .action-btn{margin:0}
.hand-card,.hand-card.selected,.hand-card.skin-sr,.hand-card.skin-ssr{border:0!important;border-radius:0;background:transparent;box-shadow:none!important}
.hand-card .card-face,.hand-card .card-face>img{border-radius:0;box-shadow:none}
.hand-card .foil-border{display:none}
.hand-card.selected .card-badge{background:#9d7130;color:#fff}
.hand-card.selected::after{content:"✓";position:absolute;z-index:7;top:2px;left:2px;width:19px;height:19px;display:grid;place-items:center;border-radius:50%;background:#d7ae5d;color:#132226;font-size:13px;font-weight:700}
.hand-card:focus-visible{outline:2px solid #f0cb81;outline-offset:2px}

/* The set spells and each fighter's life belong to their side of the field. */
.playmat-wrap{position:relative}
.mat-spell-area{position:absolute;z-index:5;width:9%;height:15%;pointer-events:none;text-align:center}
.mat-spell-area.enemy-spells{left:65.6%;top:3%}
.mat-spell-area.own-spells{left:30%;bottom:3%}
.mat-spell-area>span{position:absolute;left:0;right:0;bottom:-12px;color:#fff3c0;background:#102a30e8;font:800 9px Rajdhani,sans-serif;line-height:1.2}
.mat-spell-cards{position:relative;width:100%;height:100%}
.mat-spell-cards .set-card{position:absolute;top:0;left:0;width:100%;height:100%;aspect-ratio:429/600;border:0;background:transparent;box-shadow:none;pointer-events:auto}
.mat-spell-cards .set-card:nth-child(2){transform:translate(18%,5%)}
.mat-spell-cards .set-card:nth-child(3){transform:translate(36%,10%)}
.mat-spell-cards .set-card:nth-child(n+4){transform:translate(54%,15%)}
.mat-spell-cards .set-card:hover{z-index:10;transform:scale(1.18)}
.mat-spell-cards .set-card img{width:100%;height:100%;object-fit:contain}
.field-hud{position:absolute;z-index:6;left:10px;width:175px;min-height:0!important;padding:6px 8px;background:#112c31e8;border:1px solid #689b99;border-radius:7px;display:flex;flex-wrap:wrap;gap:3px;align-items:center;color:#fff5db}
.field-hud.enemy-hud{top:10px}
.field-hud.own-hud{bottom:10px}
.field-hud .fighter-identity,.field-hud .pvp-fighter{min-width:0;display:flex;align-items:center;gap:5px}
.field-hud .fighter-portrait{width:28px;height:32px;flex:0 0 28px;font-size:11px}
.field-hud strong,.field-hud .pvp-fighter-info strong{display:block;max-width:112px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
.field-hud .eyebrow{font-size:8px}
.field-hud .fighter-stats,.field-hud .pvp-fighter .life-display{margin-left:auto}
.field-hud .life-display{min-width:0}
.field-hud .life-display>span{font-size:14px;line-height:1}
.field-hud .life-display b{font-size:17px}
.field-hud .life-track{width:55px;height:7px;margin:1px 0}
.field-hud .hand-count,.field-hud .pvp-fighter-info span{font-size:9px}
.field-hud .pvp-fighter{width:100%}
.field-hud .pvp-fighter-info{flex:1;min-width:0}
.field-hud .pvp-fighter .life-display{flex:0 0 auto}
.pvp-focus-main p{max-height:none;overflow:visible}
.focus-art-button{display:block;flex:0 0 auto;align-self:flex-start;padding:0;border:0;background:transparent;line-height:0;cursor:zoom-in}
.focus-art-button:focus-visible{outline:2px solid #f0cb81;outline-offset:3px}
.pvp-result-dialog{width:min(460px,calc(100vw - 32px));max-height:min(85dvh,650px);overflow:auto;padding:20px;background:#142a30;border:1px solid #e2b46d}
.pvp-result-dialog .pvp-result{border:0;background:transparent;box-shadow:none;padding:8px 4px;text-align:center}
.pvp-result-dialog .pvp-result h2{font-size:clamp(34px,7vw,48px)}
.pvp-result-dialog .result-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.pvp-result-dialog .result-stats>div{min-width:0;padding:9px;background:#1e4249;border:1px solid #6b9690;border-radius:6px}
.pvp-result-dialog .result-stats span,.pvp-result-dialog .result-stats strong{display:block}
.pvp-result-dialog .result-stats span{font:700 10px Rajdhani,sans-serif;color:#f1d397}
.pvp-result-dialog .result-stats strong{font:800 23px Rajdhani,sans-serif}
.detail-inner .focus-art-button img{display:block;width:82px;height:114px;object-fit:contain}
.pvp-focus-main .focus-art-button{width:80px}
.pvp-focus-main .focus-art-button img{display:block;width:80px;max-height:112px;object-fit:contain;border:0;border-radius:0}
.pvp-focus-main>div{min-width:0;overflow-wrap:anywhere}
.pvp-focus-main strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.pvp-focus-main small{overflow-wrap:anywhere}
.touch-card-ghost{position:fixed;z-index:10050;width:68px;height:94px;display:grid;place-items:center;transform:translate(-50%,-110%);pointer-events:none;border:1px solid #f2d58a;border-radius:4px;background:#142c30;box-shadow:0 8px 22px #000b;color:#f6da91}
.touch-card-ghost img{width:100%;height:100%;object-fit:contain}
.playmat .zone.touch-drop-target{outline:3px solid #ffe28a;outline-offset:2px;box-shadow:0 0 20px #e9bc61!important}
.hand-card{touch-action:pan-x;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
.playmat .zone[draggable="true"]{touch-action:none}
.analyzer-battle .detail-large-art .card-visual{touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.analyzer-battle .detail-large-art .card-visual:active{cursor:grabbing}
.top-room-status[hidden]{display:none!important}
.match-status-text{flex:1;min-width:0;margin:0 12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right;color:#afcfc8;font-size:11px}
.top-room-status{flex-basis:100%;display:flex;align-items:center;gap:8px 12px;min-width:0;padding:3px 0 6px;border-top:1px solid #ffffff16;color:#cbded6;font-size:12px}
.top-room-status strong{font-size:17px;color:#f4ebd0}
.top-room-status .coins-pill{padding:4px 8px;font-size:11px;margin-left:auto}
.top-room-status .action-btn{padding:4px 8px;margin:0}
@media(min-width:1251px) and (min-height:790px){
  body:has(.pvp-battle) .app-shell{height:100dvh;display:flex;flex-direction:column}
  body:has(.pvp-battle) .topbar{flex:0 0 auto}
  body:has(.pvp-battle) #systemPage{flex:1;min-height:0;display:flex;flex-direction:column;padding:8px 0 0}
  body:has(.pvp-battle) footer{display:none}
  .pvp-battle{flex:1;height:auto;min-height:0}
  .layout .playmat,.pvp-battle .playmat{width:min(100%,465px,calc(100dvh - 460px))}
  .pvp-battle .pvp-phase{height:36px;display:flex;align-items:center;gap:9px}
  .pvp-battle .pvp-phase h2{font-size:19px;line-height:1;margin:0}
  .pvp-battle>.pvp-board,.pvp-battle>.pvp-side,.pvp-battle>.pvp-log-panel{overflow-y:auto;scrollbar-gutter:stable}
  .pvp-battle>.pvp-side{align-content:start}
}
@media(max-width:800px){
  .analyzer-battle .card-detail-layout{grid-template-columns:1fr;gap:12px}
  .system-dialog.analyzer-battle{max-height:94dvh;padding:12px;overflow-x:hidden}
  .analyzer-battle .detail-large-art .card-visual{width:min(75vw,340px);margin:auto}
  .analyzer-battle .detail-large-art img{max-height:45dvh}
  .analyzer-battle .analyzer-info{max-height:none}
}
@media(max-width:1250px){.field-hud{left:4px;width:130px}}
@media(max-width:900px){.field-hud{width:110px;padding:3px;font-size:9px}.field-hud .fighter-portrait{display:none}.top-room-status{flex-wrap:wrap}}

/* iPad landscape: reserve a visible row for the hand and log. */
@media(min-width:901px) and (max-width:1250px) and (max-height:900px){
  .topbar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;min-height:62px;padding:5px 0}
  .topbar .brand strong{font-size:22px}
  .topbar .brand small{font-size:9px;margin-top:5px}
  .topbar .main-nav{min-width:0;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none}
  .topbar .top-room-status{grid-column:1/-1;min-width:0}
  .topbar .main-nav::-webkit-scrollbar{display:none}
  .topbar .nav-link{flex:0 0 auto;padding:6px;font-size:12px}
  .topbar .build-tag{display:none}
  .topbar .ghost{padding:7px 9px}
  body:has(#battlePage:not([hidden])) .app-shell,body:has(.pvp-battle) .app-shell{height:100dvh;display:flex;flex-direction:column}
  body:has(#battlePage:not([hidden])) footer,body:has(.pvp-battle) footer{display:none}
  .layout{flex:1;min-height:0;height:auto;grid-template-columns:minmax(0,1fr) 300px;grid-template-rows:minmax(0,1fr) 160px;grid-template-areas:"arena sidebar" "hand log";gap:8px;padding:8px 0 0;overflow:hidden}
  .layout>.arena-panel,.layout>.sidebar,.layout>.log-card{height:100%;min-height:0;overflow:auto}
  .layout>.sidebar{display:flex;flex-direction:column;gap:8px}
  .layout .match-header{height:42px;padding:4px 12px}
  .layout .match-header h1{font-size:20px;margin:4px 0 0}
  .layout .phase-step{padding:4px 2px}
  .layout .arena{padding:4px}
  .layout .playmat-wrap,.pvp-battle .playmat-wrap{padding:5px 24px}
  .layout .playmat,.pvp-battle .playmat{width:min(100%,340px,calc(100dvh - 425px))}
  .layout>.hand-panel,.pvp-battle>.pvp-hand-panel{position:static;grid-area:hand;width:auto;height:160px;margin:0;padding:5px 9px;overflow:hidden;box-shadow:none}
  .layout>.hand-panel .hand-heading,.pvp-battle>.pvp-hand-panel .panel-head{height:28px;align-items:center}
  .layout .hand-heading h2,.pvp-battle .panel-head h2{margin:0;font-size:17px}
  .layout .hand-scroll,.pvp-battle .hand-scroll{height:118px;min-height:0;padding:2px;gap:5px;overflow-y:hidden}
  .layout .hand-card,.pvp-battle .hand-card{flex:0 1 98px;min-width:80px;height:112px}
  .layout .hand-card.hand-impact,.pvp-battle .hand-card.hand-impact{flex-basis:150px;height:112px}
  .layout .hand-card .card-badge,.pvp-battle .hand-card .card-badge{height:43px;line-height:9px;font-size:9px;-webkit-line-clamp:4}
  .layout .hand-card .card-face,.pvp-battle .hand-card .card-face{bottom:43px}
  .layout>.log-card,.pvp-battle>.pvp-log-panel{grid-area:log;height:160px;min-height:0!important;overflow:auto}
  #systemPage:has(.pvp-battle){flex:1;min-height:0;display:flex;flex-direction:column;padding:8px 0 0}
  .pvp-battle{flex:1;min-height:0;height:auto;grid-template-columns:minmax(0,1fr) 300px;grid-template-rows:minmax(0,1fr) 160px;gap:8px;align-items:stretch;padding-bottom:0}
  .pvp-battle>.pvp-board{grid-column:1;grid-row:1;height:100%;min-height:0;overflow:auto;padding:5px}
  .pvp-battle>.pvp-side{grid-column:2;grid-row:1;display:flex;flex-direction:column;gap:8px;height:100%;min-height:0;overflow:hidden}
  .pvp-battle>.pvp-hand-panel{grid-column:1;grid-row:2}
  .pvp-battle>.pvp-log-panel{grid-column:2;grid-row:2}
  .pvp-battle .pvp-phase{height:30px;display:flex;gap:8px;align-items:center}
  .pvp-battle .pvp-phase h2{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px;line-height:1;margin:0}
  .pvp-battle .pvp-side .system-panel{min-height:0;margin:0}
  .pvp-battle .pvp-move-panel{order:-1;flex:0 1 auto;max-height:48%;overflow-y:auto;touch-action:pan-y;overscroll-behavior:contain}
  .pvp-battle .pvp-move-panel .action-btn{margin:2px 3px 2px 0;padding:5px 7px;font-size:11px}
  .pvp-battle .pvp-card-focus{flex:1 1 0;overflow-y:auto;touch-action:pan-y;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  .pvp-battle .pvp-card-focus .pvp-focus-main{gap:7px}
  .pvp-battle .pvp-card-focus .focus-art-button,.pvp-battle .pvp-card-focus .focus-art-button img{width:68px;max-height:96px}
  .pvp-battle .pvp-card-focus .pvp-focus-main strong{font-size:12px}
  .pvp-battle .pvp-card-focus .pvp-focus-main small,.pvp-battle .pvp-card-focus .pvp-focus-main p{font-size:10px;line-height:1.25}
  .pvp-battle .pvp-card-focus .pvp-focus-main p{max-height:none;overflow:visible}
  .playmat .field-combat-stats{gap:0;bottom:-12px}
  .playmat .field-combat-stats .stat-label{font-size:6px}
  .playmat .field-combat-stats .stat-value{padding:1px 2px 0;font-size:8px;border-radius:2px}
  .playmat .zone .soul-chip,.playmat .set-card small{top:0;right:0;padding:1px 2px;font-size:7px;line-height:1}
  .playmat .zone .soul-stack{top:13px;left:1px}
  .playmat .zone .soul-stack img,.playmat .zone .soul-stack>span{width:16px;height:23px;margin-right:-9px}
  .playmat .mat-card .field-combat-stats{bottom:-12px}
  .field-hud{width:110px;padding:3px}
}

/* Keep the field and commands readable on an iPad-sized landscape screen. */
@media(min-width:901px) and (max-width:1250px) and (max-height:900px){
  .layout>.arena-panel,.layout>.sidebar>.side-card,.layout>.hand-panel,.layout>.log-card,.layout .playmat-wrap{border:0;border-radius:0;box-shadow:none}
  .layout>.arena-panel{background:transparent}
  .layout .arena{background:transparent}
  .layout .arena::before{display:none}
  .layout .playmat-wrap{background:transparent}
  .layout .playmat{width:min(100%,390px,calc(100dvh - 350px))}
  .layout>.sidebar>.side-card{padding:8px 10px;min-height:0}
  .layout>.sidebar>.action-card{flex:0 1 auto;max-height:52%;overflow-y:auto;overscroll-behavior:contain}
  .layout>.sidebar>.detail-card{flex:1 1 0;overflow-y:auto;overscroll-behavior:contain}
  .layout .action-card h2{font-size:21px;margin:3px 0}
  .layout .action-card p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin-bottom:7px;font-size:11px;line-height:1.3}
  .layout .action-card .actions{gap:5px;align-content:start}
  .layout .action-card .action-btn{max-width:100%;padding:5px 7px;font-size:11px;line-height:1.2;overflow:hidden;text-overflow:ellipsis}
  .layout .detail-inner{gap:7px;margin-top:6px}
  .layout .detail-inner>div{min-width:0}
  .layout .detail-inner strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:12px}
  .layout .detail-inner .detail-meta{font-size:10px;margin:3px 0}
  .layout .detail-inner p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:6;overflow:hidden;overflow-wrap:anywhere;font-size:10px;line-height:1.3}
  .layout .detail-inner .focus-art-button,.layout .detail-inner .focus-art-button img{width:68px;max-height:96px}
}

/* Let each PvP sidebar panel scroll inside its own bounds on desktop. */
@media(min-width:1251px){
  .pvp-battle>.pvp-side{display:flex;flex-direction:column;min-height:0;overflow:hidden}
  .pvp-battle .pvp-move-panel{flex:0 1 auto;max-height:48%;min-height:0;overflow-y:auto}
  .pvp-battle .pvp-card-focus{flex:1 1 0;min-height:0;overflow-y:auto}
  .pvp-battle .pvp-focus-main p{overflow-wrap:anywhere}
}

/* Match the desktop Battle layout to the iPad layout. */
@media(min-width:1251px){
  body:has(#battlePage:not([hidden])) .app-shell{height:100dvh;display:flex;flex-direction:column}
  body:has(#battlePage:not([hidden])) footer{display:none}
  .layout{flex:1;min-height:0;height:auto;grid-template-columns:minmax(0,1fr) 350px;grid-template-rows:minmax(0,1fr) 190px;grid-template-areas:"arena sidebar" "hand log";gap:8px;padding:8px 0 0;overflow:hidden}
  .layout>.arena-panel,.layout>.sidebar,.layout>.log-card{height:100%;min-height:0;overflow:auto}
  .layout>.sidebar{display:flex;flex-direction:column;gap:8px;overflow:hidden}
  .layout>.sidebar>.action-card{order:-1;flex:0 1 auto;max-height:52%;overflow-y:auto;overscroll-behavior:contain}
  .layout>.sidebar>.detail-card{flex:1 1 0;min-height:0;overflow-y:auto;overscroll-behavior:contain}
  .layout>.sidebar>.side-card{padding:10px 12px;min-height:0}
  .layout .match-header{height:50px;padding:6px 15px}
  .layout .arena{padding:4px}
  .layout .playmat-wrap{padding:5px 24px}
  .layout .playmat{width:min(100%,600px,calc(100dvh - 410px))}
  .layout>.hand-panel{position:static;grid-area:hand;width:auto;height:190px;margin:0;padding:7px 12px;overflow:hidden}
  .layout .hand-heading{height:32px;align-items:center}
  .layout .hand-heading h2{margin:0;font-size:18px}
  .layout .hand-help{display:none}
  .layout .hand-scroll{height:140px;min-height:0;padding:2px;gap:8px;overflow-y:hidden}
  .layout .hand-card{flex:0 0 118px;height:136px}
  .layout .hand-card.hand-impact{flex-basis:175px;height:136px}
  .layout>.log-card{grid-area:log;height:190px;min-height:0!important;overflow:auto}
  .layout .action-card h2{font-size:22px;margin:4px 0}
  .layout .action-card p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin-bottom:8px;font-size:12px;line-height:1.3}
  .layout .action-card .actions{gap:5px}
  .layout .action-card .action-btn{max-width:100%;padding:6px 8px;font-size:12px;line-height:1.2;overflow:hidden;text-overflow:ellipsis}
  .layout .detail-inner{gap:8px;margin-top:7px}
  .layout .detail-inner>div{min-width:0}
  .layout .detail-inner strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:13px}
  .layout .detail-inner .detail-meta{font-size:11px;margin:4px 0}
  .layout .detail-inner p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:8;overflow:hidden;overflow-wrap:anywhere;font-size:11px;line-height:1.3}
}

/* Remove decoration around the Battle artwork while keeping the printed card art. */
.layout .detail-inner .focus-art-button img{border:0;border-radius:0;box-shadow:none;background:transparent}
.layout .detail-inner .focus-art-button.focus-art-wide,.layout .detail-inner .focus-art-button.focus-art-wide img{width:100px;max-height:96px}
.layout .detail-inner .focus-art-button.focus-art-wide img{height:auto;object-fit:contain}
@media(min-width:901px){
  .layout>.arena-panel,.layout>.sidebar>.side-card,.layout>.hand-panel,.layout>.log-card,.layout .playmat-wrap{border:0;border-radius:0;box-shadow:none}
  .layout>.arena-panel,.layout .arena,.layout .playmat-wrap{background:transparent}
  .layout .arena::before{display:none}
}

/* Match room can use the same field-first layout as the solo arena. */
@media(min-width:1251px){
  .layout>.arena-panel{overflow:hidden}
  .layout .playmat{width:min(100%,600px,calc(100dvh - 430px))}
  body:has(.pvp-layout-arena) .app-shell{height:100dvh;display:flex;flex-direction:column}
  body:has(.pvp-layout-arena) #systemPage{flex:1;min-height:0;display:flex;flex-direction:column;padding:8px 0 0}
  body:has(.pvp-layout-arena) footer{display:none}
  .pvp-battle.pvp-layout-arena{flex:1;min-height:0;height:auto;display:grid;grid-template-columns:minmax(0,1fr) 350px;grid-template-rows:minmax(0,1fr) 190px;gap:8px;align-items:stretch;padding-bottom:0}
  .pvp-battle.pvp-layout-arena>.pvp-board{grid-column:1;grid-row:1;height:100%;min-height:0;overflow:hidden;padding:5px;border:0;border-radius:0;background:transparent}
  .pvp-battle.pvp-layout-arena>.pvp-side{grid-column:2;grid-row:1;display:flex;flex-direction:column;gap:8px;height:100%;min-height:0;overflow:hidden}
  .pvp-battle.pvp-layout-arena>.pvp-hand-panel{grid-column:1;grid-row:2;position:static;width:auto;height:190px;margin:0;padding:7px 12px;overflow:hidden}
  .pvp-battle.pvp-layout-arena>.pvp-log-panel{grid-column:2;grid-row:2;height:190px;min-height:0!important;overflow:auto}
  .pvp-battle.pvp-layout-arena .playmat{width:min(100%,600px,calc(100dvh - 425px))}
  .pvp-battle.pvp-layout-arena .pvp-phase{height:36px;display:flex;align-items:center;gap:9px}
  .pvp-battle.pvp-layout-arena .pvp-phase h2{font-size:19px;line-height:1;margin:0}
  .pvp-battle.pvp-layout-arena .pvp-move-panel{order:-1;flex:0 1 auto;max-height:48%;min-height:0;overflow-y:auto}
  .pvp-battle.pvp-layout-arena .pvp-card-focus{flex:1 1 0;min-height:0;overflow-y:auto}
  .pvp-battle.pvp-layout-arena>.pvp-hand-panel .panel-head{height:32px;align-items:center}
  .pvp-battle.pvp-layout-arena .hand-scroll{height:140px;min-height:0;padding:2px;gap:8px;overflow-y:hidden}
  .pvp-battle.pvp-layout-arena .hand-card{flex:0 0 118px;height:136px}
  .pvp-battle.pvp-layout-arena .hand-card.hand-impact{flex-basis:175px;height:136px}
}
@media(min-width:901px) and (max-width:1250px){
  .pvp-battle.pvp-layout-classic{flex:none;height:auto;grid-template-columns:minmax(0,1fr) 300px;grid-template-rows:auto 160px 160px;overflow:visible}
  .pvp-battle.pvp-layout-classic>.pvp-board{grid-column:1;grid-row:1;height:auto;overflow:visible}
  .pvp-battle.pvp-layout-classic>.pvp-side{grid-column:2;grid-row:1;height:auto;min-height:400px}
  .pvp-battle.pvp-layout-classic>.pvp-hand-panel{grid-column:1/-1;grid-row:2}
  .pvp-battle.pvp-layout-classic>.pvp-log-panel{grid-column:1/-1;grid-row:3}
  body:has(.pvp-layout-classic) .app-shell{height:auto;min-height:100dvh}
}

/* FIELD1 PvP uses the same header, phase rail, and open panels as Battle Arena. */
@media(min-width:901px){
  .pvp-battle.pvp-layout-arena>.pvp-board{display:flex;flex-direction:column;padding:0!important;border:0;border-radius:0;background:transparent;overflow:hidden}
  .pvp-layout-arena .pvp-arena-header{height:50px;flex:0 0 50px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:5px 14px;background:#112b32}
  .pvp-layout-arena .pvp-arena-header h2{margin:3px 0 0;font-size:22px;line-height:1.1}
  .pvp-layout-arena .pvp-arena-header .turn-pill{flex:0 0 auto;white-space:nowrap;font-size:12px}
  .pvp-layout-arena .pvp-arena-phase-track{height:35px;flex:0 0 35px;background:#0c262c}
  .pvp-layout-arena .pvp-arena-phase-track .phase-step{padding:7px 3px;color:#86a8a7}
  .pvp-layout-arena .pvp-arena-phase-track .phase-step.active{color:#fff;background:#b48446;box-shadow:none}
  .pvp-layout-arena>.pvp-board>.playmat-wrap{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:4px 24px;border:0;border-radius:0;background:transparent;overflow:hidden}
  .pvp-battle.pvp-layout-arena .playmat{width:min(100%,600px,calc(100dvh - 450px))}
  .pvp-battle.pvp-layout-arena>.pvp-side{gap:8px}
  .pvp-layout-arena>.pvp-side>.system-panel,.pvp-layout-arena>.pvp-hand-panel,.pvp-layout-arena>.pvp-log-panel{border:0;border-radius:0;box-shadow:none;background:#132d34}
  .pvp-layout-arena>.pvp-side>.system-panel{padding:9px 12px}
  .pvp-layout-arena .pvp-move-panel{order:-1;flex:0 0 auto;max-height:55%;overflow-y:auto;scrollbar-width:none}
  .pvp-layout-arena .pvp-move-panel::-webkit-scrollbar{display:none}
  .pvp-layout-arena .pvp-move-panel h2{margin:3px 0 5px;font-size:23px;line-height:1.15}
  .pvp-layout-arena .pvp-move-panel:not(.pvp-pending) p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin:0 0 7px;font-size:11px;line-height:1.3}
  .pvp-layout-arena .pvp-move-panel .action-btn{margin:2px 3px 2px 0;padding:5px 7px;font-size:11px}
  .pvp-layout-arena .pvp-card-focus{flex:1 1 0;min-height:0;overflow-y:auto}
}
@media(min-width:901px) and (max-width:1250px){
  .pvp-battle.pvp-layout-arena .playmat{width:min(100%,390px,calc(100dvh - 395px))}
}
