html[data-layout="portrait"]{--mobile-tray:228px;--mobile-actions:72px}html[data-layout="portrait"] body{font-size:16px;overflow-x:hidden}html[data-layout="portrait"] button,html[data-layout="portrait"] select{font-size:14px;min-height:44px;touch-action:manipulation}html[data-layout="portrait"] button:disabled{opacity:.5}html[data-layout="portrait"] .mobile-only{display:block}html[data-layout="portrait"] header{height:64px;padding:8px 12px;gap:8px}html[data-layout="portrait"] header>div{min-width:0}html[data-layout="portrait"] header small{font-size:9px;letter-spacing:.4px}html[data-layout="portrait"] header h1{font-size:17px;white-space:nowrap}html[data-layout="portrait"] header h1 span{display:none}html[data-layout="portrait"] nav{gap:6px;flex-shrink:0}html[data-layout="portrait"] nav button{font-size:12px;padding:8px;min-width:44px;min-height:44px}html[data-layout="portrait"] nav #help{font-size:0}html[data-layout="portrait"] nav #help::after{content:'도움말';font-size:12px}html[data-layout="portrait"] main{padding:0 8px calc(var(--mobile-tray) + var(--mobile-actions) + 30px + env(safe-area-inset-bottom));max-width:700px}html[data-layout="portrait"] .top{display:none}html[data-layout="portrait"] .arena{border-radius:12px;overflow:clip}html[data-layout="portrait"] .status{padding:12px 10px;grid-template-columns:minmax(0,1fr) 78px minmax(0,1fr);gap:5px;min-height:85px}html[data-layout="portrait"] .status>div>small:first-child{display:none}html[data-layout="portrait"] .status h3{font-size:14px;line-height:1.3;margin:0 0 7px}html[data-layout="portrait"] .status h3 span{font-size:12px}html[data-layout="portrait"] .status>div>small:last-child{font-size:11px;line-height:1.3;letter-spacing:0;display:block}html[data-layout="portrait"] .turn b{font-size:14px;line-height:1.4}html[data-layout="portrait"] .turn small{font-size:11px}html[data-layout="portrait"] .health{gap:3px}html[data-layout="portrait"] .health i{width:12px;height:6px}html[data-layout="portrait"] .sides{display:none}html[data-layout="portrait"] .battle-theater{margin:0;padding:10px 12px;border-radius:0;border-width:1px 0;position:sticky;top:0;background:#223831;z-index:5;min-height:0}html[data-layout="portrait"] .battle-heading{gap:5px}html[data-layout="portrait"] .battle-heading>span{font-size:14px}html[data-layout="portrait"] .battle-heading label{font-size:0}html[data-layout="portrait"] .battle-heading select{font-size:13px;min-height:36px;padding:5px 8px}html[data-layout="portrait"] .battle-theater p{font-size:14px;line-height:1.55;min-height:43px;margin:6px 0;overflow-wrap:anywhere}html[data-layout="portrait"] .playback{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}html[data-layout="portrait"] .playback button{font-size:12px;padding:6px 3px;min-height:44px;line-height:1.2}html[data-layout="portrait"] .playback span{font-size:11px;grid-column:1/-1;justify-self:end;margin:0}html[data-layout="portrait"] .playback:not(:has(button:enabled)){display:none}html[data-layout="portrait"] .lane-tabs{display:flex;gap:6px;padding:9px 8px;background:#14262d}html[data-layout="portrait"] .lane-tabs button{flex:1;padding:7px 5px;display:grid;gap:2px;min-height:50px;font-size:15px}html[data-layout="portrait"] .lane-tabs small{font-size:12px;letter-spacing:0}html[data-layout="portrait"] .lane-tabs button[aria-pressed=true]{border-color:var(--gold);background:#3c4738;color:#ffe0a3}html[data-layout="portrait"] #board[data-view="0"] .lane[data-lane-index="1"],html[data-layout="portrait"] #board[data-view="1"] .lane[data-lane-index="0"]{display:none}html[data-layout="portrait"] .lane{min-height:185px;margin:0 5px 8px;grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr)}html[data-layout="portrait"] .army{padding:8px 5px;gap:8px;min-width:0;scroll-snap-type:x mandatory;overflow-x:auto;overflow-y:hidden;align-items:center}html[data-layout="portrait"] .army.player{justify-content:flex-start;flex-direction:row-reverse}html[data-layout="portrait"] .unit{width:104px;min-width:104px;min-height:163px;padding:5px;scroll-snap-align:center;scroll-margin-top:195px;scroll-margin-bottom:320px;border-radius:8px}html[data-layout="portrait"] .unit img{width:92px;height:94px;object-fit:cover;object-position:top}html[data-layout="portrait"] .unit b{font-size:14px;line-height:1.4}html[data-layout="portrait"] .unit small{font-size:14px;line-height:1.5;letter-spacing:0;white-space:nowrap}html[data-layout="portrait"] .unit em{font-size:11px;line-height:1.4;max-width:92px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}html[data-layout="portrait"] .unit.acting{animation:none;outline:3px solid #ffdc88}html[data-layout="portrait"] .unit.receiving{outline-width:3px}html[data-layout="portrait"] .bridge{padding:2px;min-width:0}html[data-layout="portrait"] .bridge small{font-size:11px;letter-spacing:0;white-space:normal;line-height:1.5}html[data-layout="portrait"] .bridge span{font-size:26px}html[data-layout="portrait"] .empty{font-size:13px;line-height:1.6;padding:7px}html[data-layout="portrait"] .controls{position:fixed;bottom:0;left:0;right:0;z-index:12;min-height:calc(var(--mobile-actions) + env(safe-area-inset-bottom));padding:9px 12px calc(9px + env(safe-area-inset-bottom));gap:8px;display:flex;background:#11252dfc;border-top:1px solid #789181}html[data-layout="portrait"] .controls p{font-size:12px;line-height:1.45;max-width:none;flex:1;margin:0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}html[data-layout="portrait"] .controls .primary{min-height:50px;font-size:14px;padding:10px 13px;flex-shrink:0}html[data-layout="portrait"] .controls #cancelSelection{font-size:12px;min-height:48px;padding:8px}html[data-layout="portrait"] .controls:has(#cancelSelection:not([hidden])) p{display:none}html[data-layout="portrait"] .hand-section{position:fixed;left:0;right:0;bottom:calc(var(--mobile-actions) + env(safe-area-inset-bottom));z-index:11;background:#172d33fc;border-top:1px solid #65857c;box-shadow:0 -8px 28px #0006;height:var(--mobile-tray);padding:9px 10px 0}html[data-layout="portrait"] .section-title{margin:0}html[data-layout="portrait"] .section-title h3{font-size:16px}html[data-layout="portrait"] .section-title span{font-size:16px}html[data-layout="portrait"] .hand-section>.muted{font-size:12px;line-height:1.4;margin:3px 0;color:#b0c7c8}html[data-layout="portrait"] .hand{height:173px;min-height:0;padding:7px 2px 9px;gap:9px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;align-items:stretch}html[data-layout="portrait"] .card{flex:0 0 112px;width:112px;max-height:157px;min-height:0;padding:4px;border-radius:8px;overflow:hidden;scroll-snap-align:start;text-align:center}html[data-layout="portrait"] .original-art{height:78px;object-fit:cover;object-position:top;width:100%;border-radius:4px}html[data-layout="portrait"] .card h3{font-size:14px;line-height:20px;margin:2px 0;white-space:nowrap}html[data-layout="portrait"] .card small{display:block;font-size:12px;line-height:17px;letter-spacing:0}html[data-layout="portrait"] .mini-stats{font-size:14px;line-height:19px;font-weight:700}html[data-layout="portrait"] .card p{display:none}html[data-layout="portrait"] .card.locked{opacity:.7;background:#192b32}html[data-layout="portrait"] .card.locked::after{content:'대기';position:absolute;top:6px;right:6px;font-size:11px;background:#0a172ddd;padding:2px 5px;border-radius:3px}html[data-layout="portrait"] .card.selected{transform:translateY(-3px)}html[data-layout="portrait"] .fort .original-art{height:108px}html[data-layout="portrait"] .fort p{display:block;font-size:11px;line-height:15px;padding:0}html[data-layout="portrait"] .bottom{display:block;padding:10px;margin:0}html[data-layout="portrait"] .bottom h3{font-size:16px}html[data-layout="portrait"] #log{font-size:14px;line-height:1.6;height:220px}html[data-layout="portrait"] .bottom aside{display:none}html[data-layout="portrait"] .card-detail{display:none}html[data-layout="portrait"] dialog{width:calc(100% - 20px);padding:20px;max-height:90dvh;font-size:15px}html[data-layout="portrait"] dialog p,html[data-layout="portrait"] dialog li{font-size:15px;line-height:1.65}html[data-layout="portrait"] dialog h2{font-size:23px}html[data-layout="portrait"] dialog button{font-size:15px;min-height:48px}html[data-layout="portrait"] .card-sheet{position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:none;border-radius:20px 20px 0 0;border-bottom:0;max-height:88dvh;padding:12px 20px calc(20px + env(safe-area-inset-bottom));box-shadow:0 -12px 50px #0009;animation:sheetIn .2s ease-out}html[data-layout="portrait"] .sheet-grip{display:block;width:42px;height:4px;background:#a6bab3;margin:0 auto 12px;border-radius:4px}html[data-layout="portrait"] .sheet-top h2{font-size:25px;margin-bottom:10px}html[data-layout="portrait"] .sheet-top small{font-size:11px}html[data-layout="portrait"] .sheet-top button{width:auto}html[data-layout="portrait"] .sheet-overview{grid-template-columns:minmax(105px,40%) 1fr;gap:16px}html[data-layout="portrait"] .sheet-overview img{max-height:215px}html[data-layout="portrait"] .sheet-stat{font-size:17px;margin:8px 0}html[data-layout="portrait"] .sheet-overview p{font-size:13px;line-height:1.5}html[data-layout="portrait"] .sheet-abilities p{font-size:15px;line-height:1.6;margin:12px 0}html[data-layout="portrait"] .sheet-actions{bottom:-20px;padding:12px 0;background:#1a3037}html[data-layout="portrait"] .sheet-actions button{font-size:14px;min-height:54px;padding:10px 6px}html[data-layout="portrait"] .sheet-cast{min-height:54px;font-size:15px}html[data-layout="portrait"] #settingsModal .game-settings{display:grid!important;grid-template-columns:1fr 1.8fr;gap:13px;max-width:none}html[data-layout="portrait"] #settingsModal .pack-badge{grid-column:1/-1;padding:12px;font-size:14px;line-height:1.6}html[data-layout="portrait"] #settingsModal .pack-badge span{display:block;font-size:12px;margin:2px 0}html[data-layout="portrait"] #settingsModal label{font-size:15px}html[data-layout="portrait"] #settingsModal select{font-size:16px;padding:10px;min-height:48px}html[data-layout="portrait"] #settingsModal .game-settings small{display:none}html[data-layout="portrait"] #settingsClose{margin-top:14px}html[data-layout="portrait"] #draftModal{position:fixed;inset:0;margin:0;width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0;padding:20px 14px calc(16px + env(safe-area-inset-bottom));max-width:none}html[data-layout="portrait"] #draftModal h2{font-size:23px;margin-top:0}html[data-layout="portrait"] #draftModal>p{font-size:14px}html[data-layout="portrait"] #draftStatus{position:sticky;top:-20px;background:#1a3037;z-index:3;padding:12px 0;line-height:1.5}html[data-layout="portrait"] #draftOffers{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}html[data-layout="portrait"] .draft-card{padding:6px;min-height:0}html[data-layout="portrait"] .draft-offers img{height:165px;object-fit:contain}html[data-layout="portrait"] .draft-card b{font-size:15px;line-height:1.5}html[data-layout="portrait"] .draft-card small{font-size:13px;line-height:1.5}html[data-layout="portrait"] .draft-card p{font-size:13px;line-height:1.5;margin:5px 0}html[data-layout="portrait"] .draft-picked .draft-card{flex:0 0 103px}html[data-layout="portrait"] .draft-picked .draft-card img{height:105px}html[data-layout="portrait"] .draft-picked .draft-card b{font-size:13px}html[data-layout="portrait"] .draft-picked .draft-card small{font-size:12px}html[data-layout="portrait"] #draftPicks h3{font-size:17px}html[data-layout="portrait"] .draft-footer{position:sticky;bottom:-16px;padding:12px 0;background:#1a3037;z-index:4;box-shadow:0 -8px 18px #1a3037}html[data-layout="portrait"] .draft-footer #draftStart{flex:1;background:var(--gold);color:#17272a;font-weight:bold}html[data-layout="portrait"] .draft-footer button{font-size:14px;padding:10px;min-height:52px}html[data-layout="portrait"] .draft-choice>button:last-child{font-size:13px;min-height:44px}

html[data-layout="landscape"] .hand-section{position:static;height:auto;margin-top:12px}html[data-layout="landscape"] .controls{position:sticky;bottom:0}html[data-layout="landscape"] .hand{height:174px}html[data-layout="landscape"] .card{max-height:157px}html[data-layout="landscape"] .original-art{height:78px}html[data-layout="landscape"] main{padding-bottom:12px}html[data-layout="landscape"] .unit{scroll-margin-bottom:70px}html[data-layout="landscape"] .status{min-height:65px}html[data-layout="landscape"] .card-sheet{max-width:650px;margin:auto;inset:auto 0 0}html[data-layout="landscape"] .sheet-overview{grid-template-columns:100px 1fr}html[data-layout="landscape"] .sheet-overview img{max-height:140px}
html[data-layout="portrait"] .army.player{flex-direction:row;justify-content:flex-start;justify-content:safe flex-end}
html[data-layout="landscape"] .controls{position:fixed;bottom:0}html[data-layout="landscape"] main{padding-bottom:90px}
html[data-layout="landscape"]{--rail:clamp(208px,27vw,276px);--rail-theater:102px;--land-header:44px;--land-footer:60px}html[data-layout="landscape"] body{height:100dvh;overflow:hidden;font-size:15px}html[data-layout="landscape"] body.resolving{--rail-theater:180px}html[data-layout="landscape"] body:not(.resolving):has(#replay:not(:disabled)){--rail-theater:146px}html[data-layout="landscape"] .mobile-only{display:block}html[data-layout="landscape"] .orientation-hint,html[data-layout="landscape"] .top,html[data-layout="landscape"] .lane-tabs,html[data-layout="landscape"] .sides,html[data-layout="landscape"] .bottom{display:none!important}html[data-layout="landscape"] header{position:fixed;top:0;left:0;right:0;height:var(--land-header);z-index:14;padding:3px max(10px,env(safe-area-inset-right)) 3px max(10px,env(safe-area-inset-left));background:#12272e;border-bottom:1px solid #516e68}html[data-layout="landscape"] header>div{min-width:0}html[data-layout="landscape"] header small{display:none}html[data-layout="landscape"] header h1{font-size:17px;margin:0;white-space:nowrap}html[data-layout="landscape"] header h1 span{display:inline;font-size:12px}html[data-layout="landscape"] nav{gap:6px}html[data-layout="landscape"] nav button{min-height:36px;font-size:12px;padding:5px 12px}html[data-layout="landscape"] nav #help{font-size:0}html[data-layout="landscape"] nav #help::after{content:'도움말';font-size:12px}html[data-layout="landscape"] main{position:fixed;top:var(--land-header);bottom:0;left:env(safe-area-inset-left);right:calc(var(--rail) + env(safe-area-inset-right));max-width:none;width:auto;padding:0;margin:0;overflow:hidden}html[data-layout="landscape"] .arena{height:100%;display:grid;grid-template-rows:50px minmax(0,1fr);border:0;border-radius:0;overflow:hidden}html[data-layout="landscape"] .status{grid-row:1;min-height:0;padding:4px 12px;grid-template-columns:1fr 92px 1fr;gap:7px}html[data-layout="landscape"] .status>div>small:first-child{display:none}html[data-layout="landscape"] .status h3{font-size:13px;line-height:17px;margin:0 0 3px}html[data-layout="landscape"] .status h3 span{font-size:12px}html[data-layout="landscape"] .status>div>small:last-child{font-size:11px;line-height:14px;display:block;letter-spacing:0}html[data-layout="landscape"] .health{display:none}html[data-layout="landscape"] .turn b{font-size:14px}html[data-layout="landscape"] .turn small{display:block;font-size:10px}html[data-layout="landscape"] .status .turn small{display:block}html[data-layout="landscape"] .battle-theater{position:fixed;top:var(--land-header);right:env(safe-area-inset-right);width:var(--rail);height:var(--rail-theater);max-height:none;margin:0;border:0;border-left:1px solid #506b64;border-bottom:1px solid #506b64;border-radius:0;padding:8px 10px;z-index:10;background:#233a32;overflow-y:auto}html[data-layout="landscape"] .battle-heading>span{font-size:13px}html[data-layout="landscape"] .battle-heading label{font-size:0}html[data-layout="landscape"] .battle-heading select{min-height:30px;font-size:12px;padding:3px 6px;max-width:83px}html[data-layout="landscape"] .battle-theater p{font-size:14px;line-height:1.45;margin:5px 0;min-height:38px}html[data-layout="landscape"] .playback{display:grid;grid-template-columns:1fr 1fr;gap:5px}html[data-layout="landscape"] .playback button{min-height:36px;font-size:12px;padding:5px 3px;line-height:1.2}html[data-layout="landscape"] .playback button:disabled{display:none}html[data-layout="landscape"] .playback #replay{grid-column:1/-1}html[data-layout="landscape"] .playback span{font-size:11px;grid-column:1/-1;line-height:14px}html[data-layout="landscape"] .playback:not(:has(button:enabled)){display:none}html[data-layout="landscape"] #board{grid-row:2;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) minmax(0,1fr);gap:6px;padding:4px 7px 7px;overflow:hidden}html[data-layout="landscape"] #board .lane[data-lane-index]{display:grid!important;grid-template-columns:minmax(0,1fr) 42px minmax(0,1fr);min-height:0;height:100%;margin:0;border-radius:8px;overflow:hidden}html[data-layout="landscape"] .army{min-width:0;min-height:0;padding:5px;gap:7px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;align-items:center;scroll-snap-type:x proximity}html[data-layout="landscape"] .army.player{flex-direction:row;justify-content:flex-start;justify-content:safe flex-end}html[data-layout="landscape"] .unit{width:92px;min-width:92px;min-height:0;height:auto;max-height:100%;padding:4px;scroll-margin:0;border-radius:7px;scroll-snap-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px}html[data-layout="landscape"] .unit img{width:80px;height:clamp(35px,calc((100dvh - 250px)/2),70px);object-fit:cover;object-position:top}html[data-layout="landscape"] .unit b{font-size:13px;line-height:17px;white-space:nowrap}html[data-layout="landscape"] .unit small{font-size:14px;line-height:19px;letter-spacing:0;white-space:nowrap}html[data-layout="landscape"] .unit em{font-size:11px;line-height:13px;max-width:82px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}html[data-layout="landscape"] .bridge{min-width:0;min-height:0;padding:2px}html[data-layout="landscape"] .bridge span{font-size:23px;line-height:1}html[data-layout="landscape"] .bridge small{font-size:12px;letter-spacing:0;line-height:1.4}html[data-layout="landscape"] .empty{font-size:13px;line-height:1.5;padding:7px}html[data-layout="landscape"] .hand-section{position:fixed;top:calc(var(--land-header) + var(--rail-theater));right:env(safe-area-inset-right);left:auto;bottom:calc(var(--land-footer) + env(safe-area-inset-bottom));width:var(--rail);height:auto;margin:0;padding:7px 7px 0;border:0;border-left:1px solid #506b64;box-shadow:none;display:flex;flex-direction:column;overflow:hidden;background:#172d33;z-index:10}html[data-layout="landscape"] .section-title{margin:0;min-height:25px}html[data-layout="landscape"] .section-title h3{font-size:14px}html[data-layout="landscape"] .section-title span{font-size:14px}html[data-layout="landscape"] .hand-section>.muted{display:none}html[data-layout="landscape"] .hand{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:126px;align-content:start;gap:7px;height:auto;min-height:0;flex:1;padding:4px 1px 8px;overflow-x:hidden;overflow-y:auto;scroll-snap-type:y proximity}html[data-layout="landscape"] .card{width:auto;min-width:0;min-height:0;max-height:none;height:126px;padding:4px;overflow:hidden;flex:none;border-radius:6px;scroll-snap-align:start}html[data-layout="landscape"] .original-art{height:53px;object-fit:cover;object-position:top;width:100%}html[data-layout="landscape"] .card h3{font-size:13px;line-height:18px;margin:2px 0;white-space:nowrap}html[data-layout="landscape"] .card small{font-size:12px;line-height:16px;letter-spacing:0;display:block}html[data-layout="landscape"] .mini-stats{font-size:14px;line-height:19px;font-weight:bold}html[data-layout="landscape"] .card p{display:none}html[data-layout="landscape"] .card.locked{opacity:.7}html[data-layout="landscape"] .card.locked::after{font-size:10px;top:5px;right:5px}html[data-layout="landscape"] .card.selected{transform:none}html[data-layout="landscape"] .fort .original-art{height:83px}html[data-layout="landscape"] .fort p{display:none}html[data-layout="landscape"] .controls{position:fixed;right:env(safe-area-inset-right);left:auto;bottom:0;width:var(--rail);height:calc(var(--land-footer) + env(safe-area-inset-bottom));min-height:0;padding:7px 8px calc(7px + env(safe-area-inset-bottom));border:0;border-top:1px solid #65857c;border-left:1px solid #65857c;display:flex;gap:5px;z-index:12;background:#11252d}html[data-layout="landscape"] .controls p{display:none!important}html[data-layout="landscape"] .controls .primary{width:100%;min-height:44px;font-size:14px;padding:8px 5px;flex:1}html[data-layout="landscape"] .controls #cancelSelection{font-size:12px;min-height:44px;padding:6px}html[data-layout="landscape"] .card-detail{display:none}html[data-layout="landscape"] .card-sheet{position:fixed;inset:8px 12px;margin:auto;width:min(720px,calc(100% - 24px));max-width:720px;max-height:calc(100dvh - 16px);height:auto;padding:12px 20px;border-radius:15px;overflow-y:auto}html[data-layout="landscape"] .sheet-grip{display:none}html[data-layout="landscape"] .sheet-top{padding-right:0}html[data-layout="landscape"] .sheet-top h2{font-size:22px;margin:0}html[data-layout="landscape"] .sheet-top small{font-size:10px}html[data-layout="landscape"] .sheet-top button{min-height:40px;font-size:13px}html[data-layout="landscape"] .sheet-overview{grid-template-columns:120px 1fr;gap:16px;align-items:center;margin-top:5px}html[data-layout="landscape"] .sheet-overview img{max-height:155px;width:100%;object-fit:contain}html[data-layout="landscape"] .sheet-stat{font-size:16px;margin:4px 0}html[data-layout="landscape"] .sheet-overview p{font-size:13px;line-height:1.4;margin:4px 0}html[data-layout="landscape"] .sheet-abilities{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}html[data-layout="landscape"] .sheet-abilities p{font-size:14px;line-height:1.45;margin:8px 0;padding-top:6px}html[data-layout="landscape"] .sheet-actions{padding:8px 0;bottom:-12px;gap:10px}html[data-layout="landscape"] .sheet-actions button,html[data-layout="landscape"] .sheet-cast{min-height:44px;font-size:14px}html[data-layout="landscape"] .sheet-cast{margin-top:7px}html[data-layout="landscape"] dialog{max-height:calc(100dvh - 16px)}html[data-layout="landscape"] #settingsModal{width:540px;max-width:calc(100% - 24px);padding:18px}html[data-layout="landscape"] #settingsModal .game-settings{display:grid!important;grid-template-columns:1fr 2fr;gap:8px;max-width:none}html[data-layout="landscape"] #settingsModal .pack-badge{grid-column:1/-1;font-size:13px}html[data-layout="landscape"] #settingsModal label{font-size:14px}html[data-layout="landscape"] #settingsModal select{font-size:14px;min-height:40px}html[data-layout="landscape"] #settingsModal .game-settings small{display:none}html[data-layout="landscape"] #settingsClose{margin-top:10px}html[data-layout="landscape"] #draftModal{position:fixed;inset:0;margin:0;width:100%;height:100dvh;max-height:100dvh;max-width:none;padding:12px 16px;border-radius:0}html[data-layout="landscape"] #draftModal h2{font-size:20px;margin:0}html[data-layout="landscape"] #draftModal>p{font-size:13px;margin:4px 0}html[data-layout="landscape"] #draftStatus{position:sticky;top:-12px;background:#1a3037;z-index:3;padding:6px 0}html[data-layout="landscape"] #draftOffers{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}html[data-layout="landscape"] .draft-offers img{height:115px;object-fit:contain}html[data-layout="landscape"] .draft-card b{font-size:14px}html[data-layout="landscape"] .draft-card small,html[data-layout="landscape"] .draft-card p{font-size:12px;line-height:1.4}html[data-layout="landscape"] .draft-choice>button:last-child{min-height:36px;font-size:12px}html[data-layout="landscape"] .draft-footer{position:sticky;bottom:-12px;background:#1a3037;padding:8px 0;z-index:4}html[data-layout="landscape"] .draft-footer button{min-height:42px;font-size:14px}html[data-layout="landscape"] .draft-footer #draftStart{flex:1}html[data-layout="landscape"] .draft-picked .draft-card{flex-basis:100px}html[data-layout="landscape"] .draft-picked .draft-card img{height:85px}

html[data-layout="landscape"] .status #playerStatus{grid-column:1;grid-row:1;text-align:left}html[data-layout="landscape"] .status #enemyStatus{grid-column:3;grid-row:1;text-align:right}html[data-layout="landscape"] .status #turn{grid-column:2;grid-row:1;text-align:center}html[data-layout="landscape"] #board{padding-bottom:max(7px,env(safe-area-inset-bottom))}
html[data-layout="portrait"] .hand{height:173px}html[data-layout="portrait"] .hand .card{height:157px;max-height:157px;padding:4px}html[data-layout="portrait"] .hand .card h3{font-size:14px;line-height:20px;margin-top:3px}
html[data-layout="landscape"] .hand{height:auto;grid-auto-rows:170px}html[data-layout="landscape"] .hand .card{height:170px;max-height:170px;padding:4px}html[data-layout="landscape"] .hand .card h3{font-size:13px;line-height:19px;margin-top:3px}
html[data-layout="landscape"] .hand{--full-card-height:clamp(112px,calc(100dvh - var(--land-header) - var(--rail-theater) - var(--land-footer) - 40px - env(safe-area-inset-bottom)),170px);grid-auto-rows:var(--full-card-height)}html[data-layout="landscape"] .hand .card{height:var(--full-card-height);max-height:var(--full-card-height)}
html[data-layout="portrait"] .unit{height:175px;min-height:0}html[data-layout="portrait"] .unit img{height:auto;width:100%;object-fit:contain}html[data-layout="portrait"] .unit b{font-size:14px;line-height:20px}html[data-layout="portrait"] .draft-picked .draft-card img{height:130px}
html[data-layout="landscape"] .army{height:100%;align-items:stretch}html[data-layout="landscape"] .unit{height:100%;max-height:100%;min-height:0;padding:4px;gap:2px;justify-content:flex-start}html[data-layout="landscape"] .unit img{height:auto;width:100%;flex:1 1 0;min-height:0;object-fit:contain}html[data-layout="landscape"] .unit b{font-size:13px;line-height:18px}html[data-layout="landscape"] .draft-picked .draft-card img{height:120px}
html[data-layout="portrait"] .hand{height:calc(100% - 30px)}html[data-layout="portrait"] .hand .card{height:100%;max-height:100%}html[data-layout="portrait"] .battle-theater{position:sticky;padding:8px 12px}html[data-layout="portrait"] .battle-theater p{min-height:0;margin:3px 0 8px;font-size:14px}html[data-layout="portrait"] .playback{grid-template-columns:repeat(3,minmax(0,1fr))}html[data-layout="portrait"] .playback button{min-height:42px;font-size:13px}
html[data-layout="landscape"] body:not(.resolving),html[data-layout="landscape"] body:not(.resolving):has(#replay:not(:disabled)){--rail-theater:0px}html[data-layout="landscape"] body.resolving{--rail-theater:142px}html[data-layout="landscape"] .battle-theater{position:fixed;padding:10px}html[data-layout="landscape"] .battle-theater p{font-size:14px;line-height:1.5;margin:0 0 9px;min-height:0}html[data-layout="landscape"] .playback{grid-template-columns:1fr 1fr;gap:6px}html[data-layout="landscape"] .playback button{min-height:38px;font-size:13px}html[data-layout="landscape"] .playback #skip{grid-column:1/-1}html[data-layout="landscape"] .hand{height:auto;grid-auto-rows:clamp(112px,calc((100dvh - var(--land-header) - var(--land-footer) - 48px - var(--rail-theater) - env(safe-area-inset-bottom))/2),170px)}html[data-layout="landscape"] .hand .card{height:100%;max-height:100%}
html[data-layout="landscape"] body.resolving,html[data-layout="landscape"] body.resolving:has(#replay:not(:disabled)){--rail-theater:0px}
html[data-layout="landscape"] #attackFx.attack-flight{padding:4px;gap:1px}html[data-layout="landscape"] #attackFx .live-card-art{min-height:0}html[data-layout="landscape"] #attackFx b{font-size:13px;line-height:17px}
html[data-layout="landscape"] #battleResult{top:50px;padding:9px 12px;width:min(390px,calc(100vw - 24px))}html[data-layout="landscape"] #battleResult h2{font-size:24px}html[data-layout="landscape"] .result-emblem{font-size:36px}
html[data-layout="portrait"] main{position:static;inset:auto;width:auto;max-width:none;height:auto;overflow:visible;padding:0 0 calc(var(--mobile-tray,228px) + var(--mobile-actions,72px))}
html[data-layout="portrait"] body{height:auto;overflow-y:auto}
html[data-layout="portrait"] header{position:sticky;top:0;left:0;right:0;width:auto;min-height:44px;height:auto}
html[data-layout="portrait"] .arena{height:auto;display:block;overflow:clip}
html[data-layout="portrait"] #board{display:block;padding:0;overflow:visible}
html[data-layout="portrait"] #board .lane[data-lane-index]{height:190px;min-height:190px;grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr);margin:0 5px 8px}
html[data-layout="portrait"] #board[data-view="0"] .lane[data-lane-index="1"],html[data-layout="portrait"] #board[data-view="1"] .lane[data-lane-index="0"]{display:none!important}
html[data-layout="portrait"] .army{height:auto;align-items:center}
html[data-layout="portrait"] .unit{height:175px;max-height:none;width:104px;min-width:104px}
html[data-layout="portrait"] .hand-section{top:auto;right:0;left:0;width:auto;height:var(--mobile-tray,228px);bottom:var(--mobile-actions,72px)}
html[data-layout="portrait"] .hand{display:flex;height:calc(100% - 30px);overflow-x:auto;overflow-y:hidden}
html[data-layout="portrait"] .hand .card{flex:0 0 112px;width:112px;height:100%;max-height:100%}
html[data-layout="portrait"] .controls{left:0;right:0;bottom:0;width:auto;height:var(--mobile-actions,72px)}
html[data-layout="portrait"] .controls .primary{width:auto;flex:none;margin-left:auto}
html[data-layout="portrait"] .lane-tabs{display:flex}
html[data-layout="portrait"] .status{display:grid;grid-template-columns:1fr 90px 1fr;min-height:75px}
html[data-layout="portrait"] .status #playerStatus{grid-column:3;grid-row:1;text-align:right}
html[data-layout="portrait"] .status #enemyStatus{grid-column:1;grid-row:1;text-align:left}
html[data-layout="landscape"] #laneTabs{display:none!important}
html[data-layout="landscape"] #board .lane[data-lane-index]{display:grid!important}
html[data-layout="landscape"] header{padding:4px 8px}
html[data-layout="landscape"] header h1{font-size:14px}
@media(max-height:600px){html[data-layout="portrait"] .hand-section{position:static;height:228px;width:auto;margin:10px 0 0}html[data-layout="portrait"] .controls{position:sticky;bottom:0;height:auto;min-height:60px}html[data-layout="portrait"] main{padding-bottom:0}html[data-layout="portrait"] .unit{scroll-margin:70px}html[data-layout="portrait"] .card-sheet{max-height:95dvh}}
