/* Wide-field battle layout (2026-10-30), the default with a mouse and on touch tablets / sideways phones (app.js applyBattleLayout).
   The top bars hide and slide down on hover; their height goes to a larger hand area at the bottom,
   and fitBoard() (app.js) grows every slot into the rest. Nothing here applies without html.layout-wide. */
html.layout-wide .duel-shell{grid-template-rows:minmax(0,1fr);min-height:0;padding-top:6px;overflow:hidden}
/* Some window sizes let the arena overflow (style.css); here the lower half of the hand must be cut off, not scrolled to. */
html.layout-wide body:has(.duel-shell){overflow:hidden}
html.layout-wide .duel-shell .arena{overflow:hidden}

/* Top bar (room, settings, lobby) and turn plate: fully above the screen, shown while the top edge is hovered. */
html.layout-wide .duel-shell>.duel-header{position:fixed;top:0;left:0;right:0;z-index:60;margin:0;padding:8px 14px 10px;background:linear-gradient(#141a22f2,#10151cd9);border-bottom:1px solid #8a9bad55;box-shadow:0 10px 28px #00000080;transform:translateY(-100%);transition:transform .2s ease-out}
/* Nothing of the bar shows while hidden; an invisible strip just below it catches the mouse at the top edge. */
html.layout-wide .duel-shell>.duel-header::after{content:'';position:absolute;left:0;right:0;top:100%;height:8px}
/* A half-round tab hanging from the bar's lower edge at the top right, like a handle to pull it down.
   It is part of the bar, so pointing at it opens the bar, and it stays attached below the bar while it is down. */
html.layout-wide .duel-shell>.duel-header::before{content:'≡';position:absolute;top:100%;right:34px;width:58px;height:26px;display:grid;place-items:center;padding-bottom:2px;border:1px solid #8a9bad66;border-top:0;border-radius:0 0 29px 29px;background:linear-gradient(#1c2430f2,#141a22f2);box-shadow:0 6px 16px #00000080;color:#c9d7e5;font:700 16px/1 'Paperlogy',sans-serif}
html.layout-wide:not(.layout-touch) .duel-shell>.duel-header:hover,
html.layout-wide:not(.layout-touch) .duel-shell>.duel-header:focus-within,
html.layout-wide.touch-bar-open .duel-shell>.duel-header{transform:translateY(0)}
html.layout-wide .duel-shell .arena>.preview-turn-terminal{position:fixed;top:58px;left:50%;z-index:59;margin:0;transform:translate(-50%,calc(-100% - 70px));transition:transform .2s ease-out;pointer-events:none}
html.layout-wide:not(.layout-touch) .duel-shell:has(>.duel-header:hover) .arena>.preview-turn-terminal,
html.layout-wide:not(.layout-touch) .duel-shell:has(>.duel-header:focus-within) .arena>.preview-turn-terminal,
html.layout-wide.touch-bar-open .duel-shell .arena>.preview-turn-terminal{transform:translate(-50%,0)}

/* Arena: the field fills the height above the hand. The field has no panel of its own, so nothing
   draws a line between the field and either hand. Keep the wrap's padding small: fitBoard() (app.js)
   sizes slots from its clientHeight, padding included, and extra padding makes the two halves overlap.
   The 18px at the bottom keeps the glow around my field (my turn) inside the arena. */
html.layout-wide .duel-shell .arena,
html.layout-wide .duel-shell .arena.has-challenge{position:relative;grid-template-rows:minmax(0,1fr) auto}
html.layout-wide .duel-shell .arena>.board-wrap{grid-row:1;height:100%;padding-top:4px;padding-bottom:18px;grid-template-rows:minmax(0,1fr) 8px minmax(0,1fr);background:none;border:0;border-radius:0;box-shadow:none}

/* Table perspective: the field (with its piles) leans back from the bottom edge, so the opponent's side
   reads as farther away. Pointer hit-testing follows the transform, so clicks and drops still land on the right slot.
   The perspective lives in the transform itself: a perspective property on the arena would make it the
   containing block of the fixed pass button and turn plate inside it. */
html.layout-wide .duel-shell .arena>.board-wrap{transform:perspective(1500px) rotateX(14deg) scale(1.03);transform-origin:50% 100%}

/* When the slot size is limited by width, the halves keep the spare height at the outer edges,
   so the two halves of the field always meet in the middle. */
html.layout-wide .duel-shell .opponent-half .board{margin:auto auto 0}
html.layout-wide .duel-shell .own-half .board{margin:0 auto auto}

/* Opponent hand: card backs half visible at the top edge, like the own hand at the bottom. */
html.layout-wide .duel-shell .arena>.opponent-hand{position:absolute;top:0;left:50%;z-index:24;min-height:0;height:auto;padding:0;background:transparent;border:0;box-shadow:none;transform:translate(-50%,-22%);pointer-events:none}
html.layout-wide .duel-shell .arena>.opponent-hand .zone-title{display:none}
html.layout-wide .duel-shell .arena>.opponent-hand .hidden-stack{display:flex;gap:0;height:auto;margin:0;overflow:visible;flex:0 0 auto}
html.layout-wide .duel-shell .arena>.opponent-hand .mini-card{flex:0 0 auto;rotate:0deg;width:clamp(40px,calc(6.4 * var(--ui-vh, 1vh)),62px);height:clamp(54px,calc(8.6 * var(--ui-vh, 1vh)),83px);margin-left:-10px;border-radius:5px;box-shadow:0 4px 10px #00000080}
html.layout-wide .duel-shell .arena>.opponent-hand .mini-card:first-child{margin-left:0}

/* Puzzle / challenge notice: a top-left card that always shows the title, goal line and buttons
   (2026-10-30: when collapsed to one cut-off line, players missed it and could not find 다시 시작).
   Only the detailed rule and revealed hints open on hover / focus. */
html.layout-wide .duel-shell .arena>.challenge-status{position:absolute;top:6px;left:236px;z-index:26;max-width:340px;display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:9px 13px 10px 15px;border:1px solid #6fb9c4;border-left:4px solid #6fe3d6;border-radius:6px;background:linear-gradient(135deg,#1a2430f2,#10151df2);box-shadow:0 0 0 1px #00000055,0 8px 26px #000000aa,0 0 18px #6fe3d633;font-size:12.5px;line-height:1.45;text-align:left}
html.layout-wide .duel-shell .arena>.challenge-status>strong{color:#9ff0e6;font-size:13.5px;text-align:left}
html.layout-wide .duel-shell .arena>.challenge-status>span:not(.puzzle-buttons){color:var(--frost)}
html.layout-wide .duel-shell .arena>.challenge-status.solved{border-color:#96ccab;border-left-color:#96ccab;box-shadow:0 8px 26px #000000aa,0 0 18px #96ccab44}
html.layout-wide .duel-shell .arena>.challenge-status.failed{border-color:#e09095;border-left-color:#e09095;box-shadow:0 8px 26px #000000aa,0 0 18px #e0909544}
html.layout-wide .duel-shell .arena>.challenge-status>.puzzle-rule,
html.layout-wide .duel-shell .arena>.challenge-status>.puzzle-hint{display:none}
html.layout-wide .duel-shell .arena>.challenge-status:hover>.puzzle-rule,
html.layout-wide .duel-shell .arena>.challenge-status:hover>.puzzle-hint,
html.layout-wide .duel-shell .arena>.challenge-status:focus-within>.puzzle-rule,
html.layout-wide .duel-shell .arena>.challenge-status:focus-within>.puzzle-hint{display:block}
html.layout-wide .duel-shell .arena>.challenge-status:has(>.puzzle-rule,>.puzzle-hint)>strong::after{content:"  ⓘ 마우스를 대면 규칙";font-size:10.5px;font-weight:600;color:#9fb3c2;opacity:.85}
html.layout-touch.layout-wide .duel-shell .arena>.challenge-status:has(>.puzzle-rule,>.puzzle-hint)>strong::after{content:"  ⓘ 눌러서 규칙"}
html.layout-wide .duel-shell .arena>.challenge-status:is(:hover,:focus-within)>strong::after{display:none}
/* Buttons stay right under the goal line; the details open below them, so hovering never moves a button. */
html.layout-wide .duel-shell .arena>.challenge-status .puzzle-buttons{order:1;gap:7px;margin-top:3px}
html.layout-wide .duel-shell .arena>.challenge-status>:is(.puzzle-rule,.puzzle-hint){order:2}
html.layout-wide .duel-shell .arena>.challenge-status .puzzle-buttons button{padding:5px 12px;border:1px solid #6fe3d6;border-radius:4px;background:#6fe3d6;color:#0a1a1c;font-weight:800;font-size:12px;cursor:pointer}
html.layout-wide .duel-shell .arena>.challenge-status .puzzle-buttons button[data-action="puzzle-hint"]{background:#16202bcc;color:#9ff0e6}
html.layout-wide .duel-shell .arena>.challenge-status .puzzle-buttons button:hover{filter:brightness(1.12)}

/* Own hand: at rest the upper half of each card shows and fades out toward the bottom edge (no scrolling).
   Moving the mouse down onto it lifts the same cards while they grow, as if picked up, until the whole card shows.
   The row keeps its height, so the field never moves. The hover selectors repeat the base hover rules'
   prefix (style.css, library.css) so they win over the old hand shelf. */
/* Card height: by window height, and on the row (which knows --hand-count) also no wider than the window allows. */
html.layout-wide{--wide-hand-card-h:clamp(112px,calc(17.4 * var(--ui-vh, 1vh)),178px)}
html.layout-wide .duel-shell .arena>.own-hand{grid-row:2;position:relative;z-index:25;height:calc(var(--wide-hand-card-h) / 2 + 27px);min-height:0;max-height:none;margin:0;border:0;background:none;box-shadow:none}
html.layout-wide .duel-shell .arena>.own-hand>.hand-row{gap:12px;--wide-hand-card-h:min(clamp(112px,calc(17.4 * var(--ui-vh, 1vh)),178px),calc(((100vw - 140px) / var(--hand-count, 6) - 9px) * 4 / 3));height:calc(var(--wide-hand-card-h) * 2 + 4px);align-items:flex-start;padding-top:2px;overflow:visible;transition:transform .28s cubic-bezier(.2,.8,.25,1),-webkit-mask-size .28s cubic-bezier(.2,.8,.25,1),mask-size .28s cubic-bezier(.2,.8,.25,1);-webkit-mask-image:linear-gradient(180deg,#000 0,#000 15%,transparent 24%);mask-image:linear-gradient(180deg,#000 0,#000 15%,transparent 24%);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%}
html.layout-wide .duel-shell .arena>.own-hand .hand-card{flex:0 0 auto;width:calc(var(--wide-hand-card-h) * .75);height:var(--wide-hand-card-h);border-radius:7px;transition:width .28s cubic-bezier(.2,.8,.25,1),height .28s cubic-bezier(.2,.8,.25,1),transform .16s ease-out,rotate .28s cubic-bezier(.2,.8,.25,1),translate .28s cubic-bezier(.2,.8,.25,1)}
/* Held fan (2026-10-31): --fan is the card's offset from the middle (app.js). Outer cards tilt out and sit
   a little lower, at rest and while lifted; the total spread stays about 26deg however many cards. */
html.layout-wide .duel-shell .arena>.own-hand .hand-card{--fan-step:min(4deg,calc(26deg / var(--hand-count, 6)));transform-origin:50% 100%;rotate:calc(var(--fan, 0) * var(--fan-step));translate:0 calc(var(--fan, 0) * var(--fan, 0) * var(--wide-hand-card-h) * .024)}
html.layout-wide .duel-shell .arena>.own-hand .hand-card:hover{z-index:2}
html.layout-wide:not(.layout-touch) body:not(:has(#field-entry-effect > .field-entry-burst)) .duel-shell:not(.hand-dragging):not(:has(.deployment-tray)) .arena>.own-hand:not(.empty-hand):hover>.hand-row,
html.layout-wide:not(.layout-touch) body:not(:has(#field-entry-effect > .field-entry-burst)) .duel-shell:not(.hand-dragging):not(:has(.deployment-tray)) .arena>.own-hand:not(.empty-hand):has(>.hand-row:hover)>.hand-row,
html.layout-wide.touch-hand-open body:not(:has(#field-entry-effect > .field-entry-burst)) .duel-shell:not(.hand-dragging):not(:has(.deployment-tray)) .arena>.own-hand:not(.empty-hand)>.hand-row{position:static;inset:auto;height:calc(var(--wide-hand-card-h) * 2 + 4px);gap:12px;padding:calc(var(--wide-hand-card-h) * .15 + 2px) 0 0;border:0;border-radius:0;background:none;box-shadow:none;overflow:visible;-webkit-mask-image:none;mask-image:none;align-items:flex-start;--wide-lift-w:max(calc(var(--wide-hand-card-h) * .75),min(calc(var(--wide-hand-card-h) * 1.09),calc((100vw - 120px) / var(--hand-count, 6) - 14px)));transform:translateY(calc(var(--wide-hand-card-h) * 1.35 + 14px - var(--wide-lift-w) * 8 / 3))}
html.layout-wide:not(.layout-touch) body:not(:has(#field-entry-effect > .field-entry-burst)) .duel-shell:not(.hand-dragging):not(:has(.deployment-tray)) .arena>.own-hand:not(.empty-hand):hover .hand-card,
html.layout-wide:not(.layout-touch) body:not(:has(#field-entry-effect > .field-entry-burst)) .duel-shell:not(.hand-dragging):not(:has(.deployment-tray)) .arena>.own-hand:not(.empty-hand):has(>.hand-row:hover) .hand-card,
html.layout-wide:not(.layout-touch) body:not(:has(#field-entry-effect > .field-entry-burst)) .duel-shell:not(.hand-dragging):not(:has(.deployment-tray)) .arena>.own-hand:not(.empty-hand):hover:not(:has(>.hand-row:hover)) .hand-card,
html.layout-wide.touch-hand-open body:not(:has(#field-entry-effect > .field-entry-burst)) .duel-shell:not(.hand-dragging):not(:has(.deployment-tray)) .arena>.own-hand:not(.empty-hand) .hand-card{flex:0 0 auto;width:var(--wide-lift-w);height:calc(var(--wide-lift-w) * 4 / 3);aspect-ratio:auto;transform:none;rotate:calc(var(--fan, 0) * var(--fan-step));translate:0 calc(var(--fan, 0) * var(--fan, 0) * var(--wide-lift-w) * .03);box-shadow:0 12px 26px #000000aa}
html.layout-wide:not(.layout-touch) body:not(:has(#field-entry-effect > .field-entry-burst)) .duel-shell:not(.hand-dragging):not(:has(.deployment-tray)) .arena>.own-hand:not(.empty-hand):hover .hand-card:hover,
html.layout-wide:not(.layout-touch) body:not(:has(#field-entry-effect > .field-entry-burst)) .duel-shell:not(.hand-dragging):not(:has(.deployment-tray)) .arena>.own-hand:not(.empty-hand):has(>.hand-row:hover) .hand-card:hover{transform:translateY(-12px) scale(1.04)}

/* Touch screens (html.layout-touch, app.js): the hover rules above are mouse-only, because a tap leaves a sticky
   :hover behind. A tap on the hand raises it (html.touch-hand-open), a tap on a card then picks it and lowers the
   hand so the field is free, and a tap elsewhere lowers it; the top bar opens from its tab the same way. */

/* Pass: no separate key beside the hand (it sat inside the hand area, so pointing at it raised the hand).
   Pass and turn end are taken from the action wheel, each in its own colour: amber pass, rose turn end. */
html.layout-wide .duel-shell .own-hand .preview-pass{display:none}
html.layout-wide .duel-shell .own-hand:has(.preview-pass){grid-template-columns:minmax(0,1fr)}
html.layout-wide .duel-shell .own-hand:has(.preview-pass)>.hand-caption,
html.layout-wide .duel-shell .own-hand:has(.preview-pass)>.hand-row{grid-column:1}
html.layout-wide .duel-shell .own-hand:has(.preview-pass)>.hand-caption{justify-self:center}
html.layout-wide .action-wheel .wheel-option[data-action="pass"]{border-color:#6fe3d6;background:linear-gradient(145deg,#25646a,#123238);color:#e6fffb;box-shadow:0 0 12px #6fe3d655}
html.layout-wide .action-wheel .wheel-option[data-action="pass"].emphasis{border-color:#ffb3be;background:linear-gradient(145deg,#b34a5e,#5e2232);color:#fff0f2;box-shadow:0 0 16px #ff8fa070}

/* The opponent's field label moves to the right, away from the opponent profile in the top-left corner. */
html.layout-wide .duel-shell .opponent-half .field-label-board{text-align:right}

/* Break zone cards at the deck pile's card size (scaled with the field slot), stacked with overlap. The overlap tightens with the card count
   (container height / count) so the whole zone always fits its column without scrolling: the break-out
   cascade (app.js) only shatters cards it can see, so a scrolled zone used to stop breaking halfway.
   nth-of-type counts the zone title button too, hence n + 1. */
html.layout-wide .duel-shell .field-break .zone-row{--break-count:1;--bz-w:calc(var(--slot-size, 108px) * .62);--bz-h:calc(var(--bz-w) * 4 / 3);container-type:size;gap:0;overflow:hidden;scrollbar-width:none}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(3)){--break-count:2}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(4)){--break-count:3}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(5)){--break-count:4}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(6)){--break-count:5}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(7)){--break-count:6}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(8)){--break-count:7}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(9)){--break-count:8}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(10)){--break-count:9}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(11)){--break-count:10}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(12)){--break-count:11}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(13)){--break-count:12}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(14)){--break-count:13}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(15)){--break-count:14}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(16)){--break-count:15}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(17)){--break-count:16}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(18)){--break-count:17}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(19)){--break-count:18}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(20)){--break-count:19}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(21)){--break-count:20}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(22)){--break-count:21}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(23)){--break-count:22}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(24)){--break-count:23}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(25)){--break-count:24}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(26)){--break-count:25}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(27)){--break-count:26}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(28)){--break-count:27}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(29)){--break-count:28}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(30)){--break-count:29}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(31)){--break-count:30}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(32)){--break-count:31}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(33)){--break-count:32}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(34)){--break-count:33}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(35)){--break-count:34}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(36)){--break-count:35}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(37)){--break-count:36}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(38)){--break-count:37}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(39)){--break-count:38}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(40)){--break-count:39}
html.layout-wide .duel-shell .field-break .zone-row:has(>.mini-card:nth-of-type(41)){--break-count:40}
html.layout-wide .duel-shell .field-break .mini-card{--break-step:clamp(6px,calc((100cqh - var(--bz-h) - 62px) / max(1, var(--break-count) - 1)),calc(var(--bz-h) * .39));position:relative;width:var(--bz-w);height:var(--bz-h);flex:0 0 var(--bz-h);margin-top:calc(var(--break-step) - var(--bz-h))}
html.layout-wide .duel-shell .field-break .mini-card.rest{width:var(--bz-h);height:var(--bz-w);flex:0 0 var(--bz-w);margin-top:calc(var(--break-step) - var(--bz-w))}
html.layout-wide .duel-shell .field-break .mini-card.rest img{width:var(--bz-w);height:var(--bz-h);left:calc((var(--bz-h) - var(--bz-w)) / 2);top:calc((var(--bz-w) - var(--bz-h)) / 2)}
html.layout-wide .duel-shell .field-break .zone-title+.mini-card,
html.layout-wide .duel-shell .field-break .mini-card:first-of-type{margin-top:4px}
html.layout-wide:not(.layout-touch) .duel-shell .field-break .mini-card:hover{z-index:4}
html.layout-wide .duel-shell .field-break .mini-card .zone-num{zoom:max(.6,var(--slot-scale,1))}

/* Break-out backup (2026-10-30): with the cards overlapped, Chrome sometimes leaves cards visible after their
   victory-card-hide animation (style.css) has finished, so the cascade stopped halfway and the rest vanished at the end.
   A delayed opacity transition on the same --break-delay hides each card on time even then. */
html.layout-wide .duel-shell .field-break .break-out-sequence .mini-card{opacity:0;transition:opacity 0s linear var(--break-delay,0ms)}

/* Profiles on a diagonal: the opponent top-left, me bottom-right, so neither covers a break zone. */
html.layout-wide .duel-shell .duel-profiles .opponent-life{align-self:flex-start}
/* The opponent's deck column mirrors mine (full half height, from the top edge). Only on narrower windows,
   where the round profile would sit on the deck, does it start under the profile instead (2026-10-31). */
@media(max-width:1499px){html.layout-wide .duel-shell .opponent-half .field-piles{padding-top:min(64px,calc(var(--slot-size, 108px) * .9));justify-content:flex-start}}

/* Field cards: the whole card, as in the default layout (style.css turns rested and opponent cards).
   app.js loads the full card image here (fieldImageInstance) because the slots are larger than the thumbnail. */
/* Badges keep their proportion to the slot, so a small field still shows the card under them. */
html.layout-wide .duel-shell .cell :is(.field-zone-badge,.field-arrow,.bp-label,.owner-dot,.cell-tag){zoom:max(.5,var(--slot-scale,1))}
html.layout-wide .duel-shell .cell .cell-tag{font-size:12px;top:4px;left:4px;z-index:2}
html.layout-wide .duel-shell .cell .bp-label{font-size:12px;bottom:4px;left:4px;right:auto;transform:none;z-index:2;white-space:nowrap}
html.layout-wide .duel-shell .cell .owner-dot{width:9px;height:9px;bottom:5px;right:5px;z-index:2}

/* Narrow windows (phones held sideways, small tablets). */
@media(max-width:1099px){
  html.layout-wide .duel-shell .arena>.challenge-status{left:max(190px,22vw);max-width:max(240px,24vw)}
}
/* Short windows (phones held sideways): the field gets the height. The hand folds to a thin strip of card tops
   (no caption) and opens over the field as usual, the field's margins shrink and it stays flat (no tilt), so the
   far rows are not drawn smaller. The card inspector shows a smaller card and drops the fact panels. */
@media(max-height:560px){
  html.layout-wide .duel-shell .arena>.own-hand{height:30px}
  html.layout-wide .duel-shell .arena>.own-hand .hand-caption{display:none}
  html.layout-wide .duel-shell .arena>.own-hand>.hand-row{-webkit-mask-image:linear-gradient(180deg,#000 0,#000 6%,transparent 13%);mask-image:linear-gradient(180deg,#000 0,#000 6%,transparent 13%)}
  html.layout-wide:not(.layout-touch) body:not(:has(#field-entry-effect > .field-entry-burst)) .duel-shell:not(.hand-dragging):not(:has(.deployment-tray)) .arena>.own-hand:not(.empty-hand):hover>.hand-row,
  html.layout-wide:not(.layout-touch) body:not(:has(#field-entry-effect > .field-entry-burst)) .duel-shell:not(.hand-dragging):not(:has(.deployment-tray)) .arena>.own-hand:not(.empty-hand):has(>.hand-row:hover)>.hand-row,
  html.layout-wide.touch-hand-open body:not(:has(#field-entry-effect > .field-entry-burst)) .duel-shell:not(.hand-dragging):not(:has(.deployment-tray)) .arena>.own-hand:not(.empty-hand)>.hand-row{transform:translateY(calc(var(--wide-hand-card-h) * .85 + 38px - var(--wide-lift-w) * 8 / 3))}
  html.layout-wide .duel-shell .arena>.board-wrap{padding-top:2px;padding-bottom:10px;grid-template-rows:minmax(0,1fr) 4px minmax(0,1fr);transform:none}
  html.layout-wide .duel-shell .field-label-board{display:none}
  html.layout-wide .duel-shell .duel-rail.card-orbit-mode .card-orbit{--orbit-radius:calc(31 * var(--ui-dvh, 1dvh));height:calc(100 * var(--ui-dvh, 1dvh) - 24px)}
  html.layout-wide .duel-shell .duel-rail.card-orbit-mode .card-orbit .preview-card{height:calc(58 * var(--ui-dvh, 1dvh));width:calc(58 * var(--ui-dvh, 1dvh) * 195 / 281)}
  html.layout-wide .duel-shell .duel-rail.card-orbit-mode :is(.card-facts,.card-effect-copy){display:none}
}

/* Entry effects land in the tilted board's plane (measureOnFlatBoard in app.js): upright while flying in,
   then they take on the board's own 3D transform (--land) as the card touches down. */
@keyframes board-land{0%,22%{transform:none}62%,100%{transform:var(--land)}}
@keyframes board-land-late{0%,68%{transform:none}100%{transform:var(--land)}}
#field-entry-effect .zone-set-burst.tilted{animation:board-land .7s cubic-bezier(.3,.55,.3,1) both}
#field-entry-effect .field-entry-burst.tilted.deploy{animation:board-land .7s cubic-bezier(.3,.55,.3,1) both}
#field-entry-effect .field-entry-burst.tilted.summon{animation:board-land .85s cubic-bezier(.3,.55,.3,1) both}
#field-entry-effect .field-entry-burst.tilted.superrare-entry{animation:board-land-late var(--sr-duration) ease-in-out both}
#field-entry-effect .cmd-entry.tilted{animation:board-land-late var(--dur) ease-in-out both}
@media(prefers-reduced-motion:reduce){#field-entry-effect .tilted{animation:none;transform:var(--land)}}
