/* Card Arena 0.1.5: the same focus portal, with a viewport-sized game shell. */
.mdv-ca-root .mdv-ca-game-announcement{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.mdv-ca-root .mdv-ca-game-hint{color:var(--mdv-ca-muted)!important;text-align:center;font-size:12px;margin-top:10px}
.mdv-ca-root .mdv-ca-header [data-command=focus][aria-pressed=true]::before{content:'↙'}
.mdv-ca-root.mdv-ca-focus{
  --mdv-ca-safe-top:env(safe-area-inset-top,0px);--mdv-ca-safe-right:env(safe-area-inset-right,0px);--mdv-ca-safe-bottom:env(safe-area-inset-bottom,0px);--mdv-ca-safe-left:env(safe-area-inset-left,0px);
  --mdv-ca-game-active-height:170px;--mdv-ca-game-active-width:112px;--mdv-ca-game-bank-height:70px;--mdv-ca-game-hand-height:128px;
  position:fixed!important;inset:auto!important;top:var(--mdv-ca-viewport-top,0px)!important;left:var(--mdv-ca-viewport-left,0px)!important;
  height:100vh!important;height:100svh!important;height:100dvh!important;height:var(--mdv-ca-viewport-height,100dvh)!important;
  width:var(--mdv-ca-viewport-width,100%)!important;min-height:0!important;min-width:0!important;max-width:none!important;max-height:none!important;
  margin:0!important;padding:var(--mdv-ca-safe-top) var(--mdv-ca-safe-right) var(--mdv-ca-safe-bottom) var(--mdv-ca-safe-left)!important;
  z-index:2147483000;overflow:hidden!important;overscroll-behavior:none;background:var(--mdv-ca-surface)!important;box-sizing:border-box;isolation:isolate;
}
.mdv-ca-root.mdv-ca-focus>.mdv-ca-shell{height:100%;min-height:0;max-height:100%;width:100%;max-width:none;margin:0;border:0;border-radius:0;box-shadow:none;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto minmax(0,1fr) auto auto;grid-template-areas:'header' 'status' 'tutorial' 'table' 'hand' 'actions'}
.mdv-ca-root.mdv-ca-focus .mdv-ca-header{grid-area:header;min-height:52px;padding:4px 12px;gap:8px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-brand{min-width:0;overflow:hidden;flex:1}
.mdv-ca-root.mdv-ca-focus .mdv-ca-title{font-size:18px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mdv-ca-root.mdv-ca-focus :is(.mdv-ca-brand-icon,.mdv-ca-brand>img,.mdv-ca-brand .mdv-ca-eyebrow,.mdv-ca-subtitle){display:none}
.mdv-ca-root.mdv-ca-focus .mdv-ca-header nav{gap:4px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-header nav .mdv-ca-btn{width:44px;min-width:44px;padding:0;font-size:0}
.mdv-ca-root.mdv-ca-focus .mdv-ca-header [data-command=new]::before{content:'↻';font-size:24px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-header [data-command=rules]::before{content:'?';font-size:22px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-header [data-command=settings]::before{content:'⚙';font-size:20px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-header [data-command=focus]::before{content:'↙';font-size:22px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-status{grid-area:status;height:26px;min-height:26px;padding:4px 12px;line-height:17px;font-size:11px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.mdv-ca-root.mdv-ca-focus .mdv-ca-tutorial{grid-area:tutorial;min-height:0;padding:0 12px;align-items:center;gap:8px;position:relative}
.mdv-ca-root.mdv-ca-focus .mdv-ca-step{padding:0;white-space:nowrap}
.mdv-ca-root.mdv-ca-focus .mdv-ca-tutorial summary{height:44px;min-height:44px;gap:8px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-tutorial summary>span{font-size:11px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-tutorial details[open]>p{position:absolute;left:8px;right:8px;top:100%;margin:0;padding:12px;border:1px solid var(--mdv-ca-control-border);border-radius:8px;background:var(--mdv-ca-surface)!important;max-height:min(180px,30dvh);overflow:auto;overscroll-behavior:contain;z-index:30}
.mdv-ca-root.mdv-ca-focus .mdv-ca-table{grid-area:table;min-height:0;height:100%;display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,46%) minmax(0,1fr);grid-template-rows:24px minmax(0,1fr) 24px;gap:4px 12px;padding:4px 12px;overflow:hidden}
.mdv-ca-root.mdv-ca-focus .mdv-ca-player{min-height:0;gap:6px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-player[data-player=bot]{grid-area:1/1/2/4}
.mdv-ca-root.mdv-ca-focus .mdv-ca-player[data-player=human]{grid-area:3/1/4/4}
.mdv-ca-root.mdv-ca-focus .mdv-ca-base strong{font-size:12px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-base small{font-size:10px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-base small span,.mdv-ca-root.mdv-ca-focus .mdv-ca-avatar,.mdv-ca-root.mdv-ca-focus .mdv-ca-opponent-hand{display:none}
.mdv-ca-root.mdv-ca-focus .mdv-ca-player-stats{gap:12px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-player-stats>span{gap:4px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-player-stats strong{font-size:13px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-player-stats small{font-size:9px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-stack{width:17px;height:22px;box-shadow:2px 2px 0 var(--mdv-ca-table),3px 3px 0 var(--mdv-ca-line)}
.mdv-ca-root.mdv-ca-focus .mdv-ca-stack svg{width:12px;height:12px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-mini-prizes{width:30px;min-height:22px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-mini-prizes b{width:9px;height:19px;margin-left:-4px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-bank{max-width:none;min-height:0;grid-template-columns:repeat(5,minmax(44px,1fr));gap:4px;align-content:center}
.mdv-ca-root.mdv-ca-focus .mdv-ca-bank[data-bank=bot]{grid-area:2/1/3/2}
.mdv-ca-root.mdv-ca-focus .mdv-ca-bank[data-bank=human]{grid-area:2/3/3/4}
.mdv-ca-root.mdv-ca-focus .mdv-ca-bank-label{height:14px;min-height:0;line-height:14px;font-size:9px;letter-spacing:1px;margin:0}
.mdv-ca-root.mdv-ca-focus :is(.mdv-ca-bank-slot,.mdv-ca-bench-card,.mdv-ca-hidden-bench){height:var(--mdv-ca-game-bank-height);min-height:44px;padding:3px;border-radius:6px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-bank-slot>span{font-size:17px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-bank-slot small{font-size:10px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-bench-card .mdv-ca-card-image{inset:3px 3px 31px;width:calc(100% - 6px);height:calc(100% - 34px)}
.mdv-ca-root.mdv-ca-focus .mdv-ca-bench-card .mdv-ca-unit-hud{margin-top:auto}
.mdv-ca-root.mdv-ca-focus .mdv-ca-bench-card .mdv-ca-card-face{min-height:0}
.mdv-ca-root.mdv-ca-focus .mdv-ca-bench-card .mdv-ca-unit-stats{margin-top:3px;gap:2px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-bench-card .mdv-ca-damage{bottom:27px;font-size:9px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-battle{grid-area:2/2/3/3;height:100%;min-height:0;width:100%;position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:20px minmax(0,1fr);gap:4px 12px;align-content:center;align-items:center;justify-content:center;perspective:none}
.mdv-ca-root.mdv-ca-focus .mdv-ca-centerline{grid-area:1/1/2/3;position:static;min-height:20px;max-width:none;flex-direction:row;gap:6px;white-space:nowrap;align-self:center}
.mdv-ca-root.mdv-ca-focus .mdv-ca-centerline span{display:none}
.mdv-ca-root.mdv-ca-focus .mdv-ca-centerline strong{font-size:11px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-active-zone{position:static!important;width:100%!important;max-width:none!important;margin:0!important;display:flex!important;flex-direction:column!important;gap:3px;min-height:0;align-self:center}
.mdv-ca-root.mdv-ca-focus .mdv-ca-active-zone[data-side=bot]{grid-area:2/1}
.mdv-ca-root.mdv-ca-focus .mdv-ca-active-zone[data-side=human]{grid-area:2/2}
.mdv-ca-root.mdv-ca-focus .mdv-ca-zone-side{position:static!important;width:auto!important;text-align:center!important}
.mdv-ca-root.mdv-ca-focus .mdv-ca-zone-side strong{font-size:10px;line-height:12px;letter-spacing:1px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-zone-side small{display:none}
.mdv-ca-root.mdv-ca-focus :is(.mdv-ca-active-zone .mdv-ca-card,.mdv-ca-active-empty,.mdv-ca-hidden-card:not(.mdv-ca-hidden-bench)){width:var(--mdv-ca-game-active-width)!important;height:var(--mdv-ca-game-active-height)!important;min-height:44px;padding:4px;transform:none!important;border-radius:8px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-active-zone .mdv-ca-card-image{inset:4px 4px 28px;width:calc(100% - 8px);height:calc(100% - 32px)}
.mdv-ca-root.mdv-ca-focus .mdv-ca-active-zone .mdv-ca-unit-hud{margin-top:auto}
.mdv-ca-root.mdv-ca-focus .mdv-ca-active-empty{gap:6px;font-size:10px;text-align:center}
.mdv-ca-root.mdv-ca-focus .mdv-ca-active-empty svg{width:28px;height:28px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-hand-zone{grid-area:hand;position:relative;bottom:auto;min-height:0;padding:0 10px;overflow:hidden}
.mdv-ca-root.mdv-ca-focus .mdv-ca-hand-heading{min-height:44px;height:44px;font-size:12px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-hand{height:calc(var(--mdv-ca-game-hand-height) + 10px);min-height:0;padding:5px 2px;gap:8px;justify-content:safe center;align-items:center;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;touch-action:pan-x;overscroll-behavior:contain;scrollbar-width:thin}
.mdv-ca-root.mdv-ca-focus .mdv-ca-hand>.mdv-ca-card{width:calc((var(--mdv-ca-game-hand-height) - 22px)*245/337 + 8px);min-width:calc((var(--mdv-ca-game-hand-height) - 22px)*245/337 + 8px);height:var(--mdv-ca-game-hand-height);transform:none!important;margin:0!important;scroll-snap-align:center;padding:4px;border-radius:7px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-hand .mdv-ca-card-image{inset:4px 4px 22px;width:calc(100% - 8px);height:calc(100% - 26px)}
.mdv-ca-root.mdv-ca-focus .mdv-ca-hand .mdv-ca-image-caption{font-size:10px;line-height:11px;padding:0 4px 3px;min-height:20px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-hand .mdv-ca-empty-hand{min-height:0;height:100%}
.mdv-ca-root.mdv-ca-focus .mdv-ca-actionbar{grid-area:actions;position:relative;bottom:auto;min-height:53px;padding:4px 10px;flex-wrap:nowrap;gap:6px;overflow:hidden;box-shadow:none}
.mdv-ca-root.mdv-ca-focus .mdv-ca-actionbar .mdv-ca-btn{min-height:44px;padding:7px 10px;flex-shrink:0;font-size:12px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-actionbar :is([data-command=log],[data-command=skip-effects]){width:44px;min-width:44px;padding:0;font-size:0}
.mdv-ca-root.mdv-ca-focus .mdv-ca-turn-note{min-width:0;max-width:none;flex:1;flex-basis:auto;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-footer{display:none}
.mdv-ca-root.mdv-ca-focus[data-game-layout=portrait] .mdv-ca-table{grid-template-columns:minmax(0,1fr);grid-template-rows:24px auto minmax(0,1fr) auto 24px;gap:3px;padding:3px 10px}
.mdv-ca-root.mdv-ca-focus[data-game-layout=portrait] .mdv-ca-player[data-player=bot]{grid-area:1/1}
.mdv-ca-root.mdv-ca-focus[data-game-layout=portrait] .mdv-ca-bank[data-bank=bot]{grid-area:2/1}
.mdv-ca-root.mdv-ca-focus[data-game-layout=portrait] .mdv-ca-battle{grid-area:3/1}
.mdv-ca-root.mdv-ca-focus[data-game-layout=portrait] .mdv-ca-bank[data-bank=human]{grid-area:4/1}
.mdv-ca-root.mdv-ca-focus[data-game-layout=portrait] .mdv-ca-player[data-player=human]{grid-area:5/1}
.mdv-ca-root.mdv-ca-focus[data-game-layout=portrait] .mdv-ca-bank{gap:3px;align-content:start}
.mdv-ca-root.mdv-ca-focus[data-game-layout=portrait] .mdv-ca-player-stats{gap:9px}
.mdv-ca-root.mdv-ca-focus[data-game-layout=portrait] .mdv-ca-hand-count{display:none!important}
.mdv-ca-root.mdv-ca-focus[data-game-layout=portrait] .mdv-ca-base small{display:none}
.mdv-ca-root.mdv-ca-focus[data-game-layout=portrait] .mdv-ca-hand{justify-content:flex-start}
.mdv-ca-root.mdv-ca-focus[data-game-layout=portrait] .mdv-ca-actionbar:has([data-command=order-first]) .mdv-ca-turn-note{display:none}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape]>.mdv-ca-shell{grid-template-columns:minmax(0,1fr) clamp(176px,24%,240px);grid-template-rows:auto auto auto minmax(0,1fr) auto;grid-template-areas:'header header' 'status status' 'tutorial tutorial' 'table hand' 'actions actions'}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape] .mdv-ca-table{grid-template-columns:minmax(0,1fr) minmax(160px,35%) minmax(0,1fr);gap:3px 8px;padding:3px 8px}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape] .mdv-ca-hand-zone{border-left:1px solid var(--mdv-ca-line);padding:0 6px;display:flex;flex-direction:column}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape] .mdv-ca-hand-heading strong>span{display:none}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape] .mdv-ca-hand-heading .mdv-ca-btn{padding:0 4px}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape] .mdv-ca-hand{flex:1;min-height:0;height:auto;justify-content:flex-start;align-items:flex-end}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape] .mdv-ca-base small,.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape] .mdv-ca-hand-count{display:none!important}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape] .mdv-ca-player-stats{gap:6px}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape] .mdv-ca-player-stats small{display:none}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape] .mdv-ca-active-zone .mdv-ca-hp-value{font-size:9px}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape]:has(.mdv-ca-hand-folded)>.mdv-ca-shell{grid-template-columns:minmax(0,1fr) 60px}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape] .mdv-ca-hand-folded .mdv-ca-hand-heading{height:100%;justify-content:center}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape] .mdv-ca-hand-folded .mdv-ca-hand-heading strong{display:none}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape] .mdv-ca-hand-folded .mdv-ca-hand-heading button{width:44px;min-width:44px;font-size:0}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape] .mdv-ca-hand-folded .mdv-ca-hand-heading button::before{content:'▤';font-size:22px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-dialog{max-width:calc(var(--mdv-ca-viewport-width,100vw) - var(--mdv-ca-safe-left) - var(--mdv-ca-safe-right) - 16px);max-height:calc(var(--mdv-ca-viewport-height,100dvh) - var(--mdv-ca-safe-top) - var(--mdv-ca-safe-bottom) - 16px);overflow:hidden}
.mdv-ca-root.mdv-ca-focus .mdv-ca-dialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr)}
.mdv-ca-root.mdv-ca-focus .mdv-ca-dialog-heading{position:relative;padding:8px 12px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-dialog-content{overflow:auto;overscroll-behavior:contain;min-height:0;touch-action:pan-y;padding:16px}
.mdv-ca-root.mdv-ca-focus .mdv-ca-original{max-height:calc(var(--mdv-ca-viewport-height,100dvh) - var(--mdv-ca-safe-top) - var(--mdv-ca-safe-bottom) - 100px);object-fit:contain}
.mdv-ca-root.mdv-ca-focus .mdv-ca-result{top:50%;left:50%;right:auto;bottom:auto;transform:translate(-50%,-50%);margin:0;max-height:calc(100% - 100px);overflow:auto;overscroll-behavior:contain;padding:22px;z-index:16}
.mdv-ca-root.mdv-ca-focus .mdv-ca-header{position:relative;z-index:18}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape] .mdv-ca-result{max-height:calc(100% - 65px);padding:12px 18px}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape] .mdv-ca-result-icon{display:none}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape] .mdv-ca-result h3{font-size:24px;margin:5px 0}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape] .mdv-ca-result p{margin:5px 0}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape] .mdv-ca-match-summary{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:8px 0;margin:8px 0}
.mdv-ca-root.mdv-ca-focus[data-game-layout=landscape] .mdv-ca-result>div{margin:10px 0 6px}
.mdv-ca-root.mdv-ca-focus[data-phase=choice]>.mdv-ca-shell{grid-template-rows:auto auto minmax(0,1fr);grid-template-areas:'header' 'status' 'choice';grid-template-columns:minmax(0,1fr)}
.mdv-ca-root.mdv-ca-focus .mdv-ca-choice{grid-area:choice;min-height:0;overflow:auto;overscroll-behavior:contain}
@media(max-width:1100px){.mdv-ca-root.mdv-ca-focus:not([data-game-layout=portrait]) .mdv-ca-bank{grid-template-columns:repeat(3,minmax(44px,1fr))}}
