/* Explicit device mode + game mode scope: no desktop/Standard overrides. */
.shell.layout-ipad.land-board-fit{--tablet-gold:#b8a273;--tablet-line:#696653;--tablet-text:#f1e9d9;background:#131b1d}
.shell.layout-ipad.land-board-fit .tabletop.land-table{background:radial-gradient(ellipse at center,#28312f,#151e1f);padding:7px;border:1px solid #726952;border-radius:8px;gap:7px}
.shell.layout-ipad.land-board-fit .land-table-layout{grid-template-rows:36px minmax(0,1fr)}
.shell.layout-ipad.land-board-fit .land-board-tools{gap:8px}.shell.layout-ipad.land-board-fit .land-board-tools button{min-height:36px;padding:6px 13px;font-size:13px}
.ipad-land-table .ipad-command{display:grid;grid-template-columns:155px 220px minmax(0,1fr) 105px;gap:12px;align-items:center;padding:6px 8px;border:1px solid #a8935b77;border-radius:6px;background:#101b1de8;min-width:0}
.ipad-land-table .ipad-commander.mat-command{display:flex;flex-direction:column;gap:3px;min-width:0}.ipad-warden{display:flex;align-items:center;gap:7px;width:100%;padding:0;border:0;background:transparent;color:#f5e8cc;min-height:48px;text-align:left}.ipad-warden img{width:40px;height:48px;object-fit:cover;border:1px solid #ac936b;border-radius:4px}.ipad-warden strong{font:600 13px/1.2 Cinzel,serif;overflow-wrap:anywhere}.ipad-land-table .ipad-commander .warden-play{min-height:28px;padding:3px 5px;font-size:12px;line-height:1.1}.ipad-land-table .warden-play small{display:none}
.ipad-supports{min-width:0}.ipad-supports>small{display:block;font-size:11px;color:#cbbd9c;margin-bottom:3px}.ipad-supports>div{display:flex;flex-wrap:wrap;gap:5px}.ipad-support,.ipad-empty-support{flex:1 1 55px;min-width:0;max-width:95px;border:1px solid #928164;border-radius:4px;min-height:49px;background:#24302a;color:#e8e4d6;padding:3px;position:relative;display:flex;align-items:center;justify-content:center;text-align:center}.ipad-support img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.4;border-radius:3px}.ipad-support strong{position:relative;font-size:11px;line-height:1.15;text-shadow:0 1px 3px #000;padding:2px}.ipad-empty-support{border-style:dashed;background:transparent;font-size:11px;color:#a9b3a7}.ipad-support[data-card-type=relic]{border-color:#af83cd}.ipad-support[data-card-type=equipment]{border-color:#c18a60}
.ipad-resources{display:flex;justify-content:space-evenly;align-items:center;gap:7px;min-width:0}.ipad-resource{display:grid;grid-template-columns:auto auto;align-items:center;justify-content:center;gap:2px 4px;text-align:center;color:#e5e7d9}.ipad-resource .resource-icon{width:20px;height:20px}.ipad-resource b{font-size:18px;line-height:1.1}.ipad-resource small{grid-column:1/-1;font-size:11px;color:#c1cabe}.ipad-resource.health{color:#e99891}.ipad-resource.ready{color:#f4d78e}.ipad-resource.arcana{color:#bc9ce7}.ipad-resource.biomass{color:#aad59e}.ipad-resource.spent{color:#a6b4ac}
.ipad-piles{display:grid;grid-template-columns:1fr 1fr;gap:4px}.ipad-piles>span,.ipad-piles>button{min-height:46px;padding:3px;background:#101718;border:1px solid #968b71;border-radius:4px;display:grid;grid-template-columns:1fr 1fr;align-items:center;text-align:center;color:#e2e7db;font-size:13px}.ipad-piles .resource-icon{width:18px;height:18px}.ipad-piles small{font-size:11px;grid-column:1/-1;text-align:center;color:#bdc8bd}.ipad-piles>b{font-size:17px}
.shell.layout-ipad.land-board-fit .land-location-columns{gap:12px}.shell.layout-ipad.land-board-fit .land-full-location{padding:6px;background:#121c1c55;border:1px solid #93836188;gap:6px;border-radius:7px}.shell.layout-ipad.land-board-fit .land-army{grid-template-rows:16px minmax(0,1fr)}.shell.layout-ipad.land-board-fit .land-all-slots{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:7px}.shell.layout-ipad.land-board-fit .land-army>header{font-size:12px}.shell.layout-ipad.land-board-fit .land-army>header strong{font-size:12px;text-transform:uppercase;letter-spacing:.05em}
.shell.layout-ipad.land-board-fit .tabletop .land-visible-slot.card{position:relative;isolation:isolate;display:flex;flex-direction:column;justify-content:space-between;gap:1px;padding:5px 7px;min-height:0;border-radius:5px;border:1px solid #85a58b;background:#152321;box-shadow:0 2px 6px #0006;overflow:hidden}
.shell.layout-ipad.land-board-fit .land-visible-slot.card>img{display:block;position:absolute;inset:0;width:100%;height:100%;max-height:none;object-fit:cover;object-position:50% 28%;z-index:-2;border-radius:4px;opacity:.6}
.shell.layout-ipad.land-board-fit .land-visible-slot.card:before{content:'';position:absolute;inset:0;background:linear-gradient(#061213cc,transparent 50%,#061213ed 78%);z-index:-1;pointer-events:none}
.shell.layout-ipad.land-board-fit .land-visible-slot.card>strong{font-size:13px;line-height:1.1;color:#fff3dc;align-self:stretch;text-shadow:0 1px 3px #000;min-height:26px}.shell.layout-ipad.land-board-fit .land-unit-values{font-size:17px;margin-top:auto;color:#fff3db}.shell.layout-ipad.land-board-fit .land-visible-slot.card>small{font-size:11px;color:#d5dfcf;line-height:1.1}.shell.layout-ipad.land-board-fit .enemy-army .land-visible-slot.card{border-color:#ad7570}.shell.layout-ipad.land-board-fit .land-visible-slot.empty{border:1px dashed #8b92704f;background:#12201d20;color:#a5af9366}.shell.layout-ipad.land-board-fit .land-visible-slot.card.selected-card{outline:2px solid #ffe1a0;outline-offset:1px}.shell.layout-ipad.land-board-fit .land-visible-slot.card.interactive-card{box-shadow:0 0 0 1px #e0d09988}.shell.layout-ipad.land-board-fit .land-visible-slot.card.attack-selected{border:2px solid #efb278}
.shell.layout-ipad.land-board-fit .land-terrain.front-location{min-height:58px;background-size:cover;background-position:center;border:1px solid #b19b68;border-radius:6px;padding:6px 8px;gap:2px;color:#ffeac4}.shell.layout-ipad.land-board-fit .land-terrain strong{font:600 17px/1.2 Cinzel,serif;text-shadow:0 1px 4px #000}.shell.layout-ipad.land-board-fit .land-terrain small{font-size:11px;letter-spacing:.06em}.shell.layout-ipad.land-board-fit .land-terrain span{display:none}
.shell.layout-ipad.land-board-fit .land-detail-rail{top:41px;width:min(350px,44vw);border-color:#a79464}.shell.layout-ipad.land-board-fit .land-detail-rail button{min-height:40px}
.shell.layout-ipad.land-board-fit .hand-dock.land-hand>header button{min-height:36px;padding:5px 15px;font-size:14px}.shell.layout-ipad.land-board-fit .land-hand.minimized .land-hand-card{border-top:3px solid var(--type-color,#a89562);min-height:36px}.shell.layout-ipad.land-board-fit .land-hand.minimized .land-hand-card small{display:none}.shell.layout-ipad.land-board-fit .land-hand.minimized .land-hand-card strong{font-size:12px}.shell.layout-ipad.land-board-fit .land-hand.minimized>header>strong{display:none}.shell.layout-ipad.land-board-fit .phase-progress{border-color:#dfbf78;background:#2a2c20}.shell.layout-ipad.land-board-fit .phase-progress .progress-button{min-height:44px;font-size:14px}
@media(max-width:1050px){.ipad-land-table .ipad-command{grid-template-columns:135px 175px minmax(0,1fr) 86px;gap:6px;padding:5px}.ipad-resources{gap:4px}.ipad-resource{gap:2px}.ipad-resource b{font-size:16px}.ipad-resource .resource-icon{width:17px;height:17px}.ipad-resource small{font-size:10px}.ipad-warden strong{font-size:12px}.ipad-support strong{font-size:10px}.ipad-land-table .ipad-commander .warden-play{font-size:11px}.shell.layout-ipad.land-board-fit .land-visible-slot.card>strong{font-size:12px}.shell.layout-ipad.land-board-fit .land-unit-values{font-size:15px}}
@media(max-height:740px){.ipad-land-table .ipad-command{padding:3px 5px}.ipad-warden img{height:36px;width:32px}.ipad-warden{min-height:36px}.ipad-support,.ipad-empty-support{min-height:40px}.shell.layout-ipad.land-board-fit .land-terrain.front-location{min-height:45px}.shell.layout-ipad.land-board-fit .land-visible-slot.card>small{font-size:10px}.shell.layout-ipad.land-board-fit .tabletop .land-visible-slot.card{padding:3px 5px}.shell.layout-ipad.land-board-fit .land-visible-slot.card>strong{min-height:24px}}
@media(orientation:portrait){.ipad-land-table .ipad-command{grid-template-columns:125px minmax(0,1fr) 88px}.ipad-land-table .ipad-supports{grid-row:2;grid-column:1/-1}.ipad-land-table .ipad-supports>div{flex-wrap:wrap}.ipad-land-table .ipad-supports>small{display:none}.ipad-land-table .ipad-support,.ipad-land-table .ipad-empty-support{min-height:34px}.shell.layout-ipad.land-board-fit .land-location-columns{gap:6px}.shell.layout-ipad.land-board-fit .land-terrain strong{font-size:14px}.shell.layout-ipad.land-board-fit .land-board-tools{gap:3px}.shell.layout-ipad.land-board-fit .land-board-tools button{padding:4px 8px}}
.ipad-land-table .ipad-commander.mat-command{grid-area:auto;align-self:center}

/* Tabletop composition: perspective belongs to the play surface, never the HUD. */
.shell.layout-ipad.land-board-fit:has(.tabletop){padding:6px 10px;gap:4px;background:radial-gradient(ellipse at 50% 40%,#253130,#0c1417 85%)}
.shell.layout-ipad.land-board-fit .land-table-layout{grid-template-rows:minmax(0,1fr);gap:0}
.shell.layout-ipad.land-board-fit .tabletop.land-table{padding:5px 9px;gap:6px;border-color:#a58b5555;background:linear-gradient(110deg,#182222,#27322e 50%,#182222);box-shadow:inset 0 0 30px #0008,0 5px 14px #0008;perspective:1600px}
.shell.layout-ipad.land-board-fit .land-location-columns{transform:rotateX(9deg);transform-origin:50% 60%;gap:14px;margin:0 10px;min-height:0}
.shell.layout-ipad.land-board-fit .land-full-location{background:linear-gradient(#101b1dbb,#29392e55);box-shadow:inset 0 0 25px #0005;border-color:#b2975a66;padding:5px;gap:4px}
.shell.layout-ipad.land-board-fit .land-all-slots{gap:5px 8px}
.shell.layout-ipad.land-board-fit .land-army{grid-template-rows:14px minmax(0,1fr);gap:3px}
.shell.layout-ipad.land-board-fit .land-army>header{line-height:14px}
.shell.layout-ipad.land-board-fit .land-terrain.front-location{min-height:34px;padding:3px 6px;gap:0;box-shadow:0 2px 6px #0009}
.shell.layout-ipad.land-board-fit .land-terrain strong{font-size:15px;line-height:1.1}
.shell.layout-ipad.land-board-fit .land-terrain small{font-size:10px;line-height:1.2}
/* Explicit foreground layering keeps the artwork visible on Safari. */
.shell.layout-ipad.land-board-fit .tabletop .land-visible-slot.card{padding:3px 5px;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:1px;overflow:hidden;box-shadow:0 3px 6px #0009;background:#182623;isolation:isolate}
.shell.layout-ipad.land-board-fit .land-visible-slot.card>img{z-index:0;opacity:.85;object-position:center 35%;grid-area:auto;max-height:none;display:block}
.shell.layout-ipad.land-board-fit .land-visible-slot.card:before{z-index:1;background:linear-gradient(#061013b8,transparent 45%,#061013eb)}
.shell.layout-ipad.land-board-fit .land-visible-slot.card>strong{position:relative;z-index:2;grid-column:1;grid-row:1;font-size:12px;line-height:1.1;min-height:0;align-self:start;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-shadow:0 1px 3px #000}
.shell.layout-ipad.land-board-fit .land-visible-slot.card .land-unit-values{position:relative;z-index:2;grid-column:1;grid-row:2;font-size:16px;line-height:1.1;margin:0}
.shell.layout-ipad.land-board-fit .land-visible-slot.card>small{position:absolute;z-index:2;right:4px;top:48%;font-size:10px;background:#081416d9;padding:1px 3px;border-radius:3px;max-width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Warden and its resources are adjacent; support cards occupy their own group. */
.ipad-land-table .ipad-command{grid-template-columns:145px minmax(0,1fr) 195px 100px;gap:9px;padding:4px 7px;min-height:68px;border-color:#ac935c88;background:linear-gradient(100deg,#0a1319ed,#192728f2)}
.ipad-land-table .ipad-commander{grid-column:1;grid-row:1}
.ipad-land-table .ipad-resources{grid-column:2;grid-row:1;align-self:center}
.ipad-land-table .ipad-supports{grid-column:3;grid-row:1;align-self:center}
.ipad-land-table .ipad-piles{grid-column:4;grid-row:1}
.ipad-land-table .ipad-warden{min-height:35px}.ipad-land-table .ipad-warden img{width:30px;height:35px}.ipad-land-table .ipad-warden strong{font-size:12px}
.ipad-land-table .ipad-commander .warden-play{min-height:30px;font-size:12px;padding:3px}
.ipad-land-table .ipad-resource small{font-size:11px}.ipad-land-table .ipad-resource b{font-size:18px}.ipad-land-table .ipad-resource .resource-icon{width:21px;height:21px}
.ipad-land-table .ipad-supports>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.ipad-land-table .ipad-support,.ipad-land-table .ipad-empty-support{max-width:none;min-height:38px}.ipad-land-table .ipad-supports>small{font-size:10px;margin:0 0 2px}
.shell.layout-ipad.land-board-fit .turnbar{min-height:30px;padding:3px 8px;border:0;background:#101a1fcc}
.shell.layout-ipad.land-board-fit .phase-current{gap:8px;min-width:0}.shell.layout-ipad.land-board-fit .phase-current .phase-number,.shell.layout-ipad.land-board-fit .phase-current .eyebrow{display:none}
.shell.layout-ipad.land-board-fit .phase-current>div{gap:10px;min-width:0}.shell.layout-ipad.land-board-fit .phase-current h2{font-size:14px;margin:0}.shell.layout-ipad.land-board-fit .phase-current p{font-size:12px;line-height:1.2}
/* Fixed footer reserve: expanding the hand never changes a board grid track. */
.shell.layout-ipad.land-board-fit .bottom-game-bar.land-bottom{height:76px;grid-template-columns:180px minmax(0,1fr) 180px;align-items:end;overflow:visible;isolation:isolate}
.shell.layout-ipad.land-board-fit .phase-progress{grid-column:3;position:relative;z-index:35;width:180px;box-sizing:border-box;padding:5px 7px;background:#26291ff5;border:1px solid #c6ab6c;box-shadow:0 3px 12px #0009;min-height:68px}
.shell.layout-ipad.land-board-fit .phase-progress .progress-button{min-height:44px;font-size:14px;line-height:1.2}
.ipad-table-utilities{grid-column:1;align-self:end;position:relative;z-index:40;pointer-events:auto;min-width:0;padding-bottom:4px}
.ipad-latest-action{font-size:11px;line-height:1.25;color:#c7d1c4;max-height:28px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-bottom:5px}
.ipad-utility-buttons{display:flex;gap:5px;align-items:end}.ipad-utility-buttons>button,.ipad-tools-drawer>summary{font-size:12px;min-height:40px;box-sizing:border-box;padding:10px 8px;border:1px solid #a28c58;border-radius:5px;background:#111f23;color:#eee1c3;cursor:pointer;list-style:none}
.ipad-tools-drawer>summary::-webkit-details-marker{display:none}.ipad-tools-drawer[open]>summary{border-color:#efce81;background:#2d3c31}
.ipad-tools-drawer>nav{position:absolute;bottom:48px;left:0;width:190px;display:grid;gap:6px;padding:9px;border:1px solid #ac945e;border-radius:7px;background:#102023fa;box-shadow:0 -6px 25px #0009}
.ipad-tools-drawer>nav button{min-height:44px;font-size:14px;padding:6px}
.shell.layout-ipad.land-board-fit .land-detail-rail{top:0;bottom:0;z-index:46;background:#102023fc}
.shell.layout-ipad.land-board-fit .land-log-rail{left:0;right:auto;top:auto;bottom:0;max-height:100%;width:min(360px,44vw)}
.shell.layout-ipad.land-board-fit .hand-dock.land-hand,.shell.layout-ipad.land-board-fit .hand-dock.land-hand:not(.minimized){position:absolute;left:50%;right:auto;bottom:0;transform:translateX(-50%);width:calc(100% - 380px);padding:0;border:0;background:transparent;box-shadow:none;pointer-events:none;z-index:32}
.shell.layout-ipad.land-board-fit .hand-dock.land-hand>header,.shell.layout-ipad.land-board-fit .hand-dock.land-hand:not(.minimized)>header{justify-content:center;padding:0 0 5px;background:transparent;border:0;pointer-events:none;min-height:36px}
.shell.layout-ipad.land-board-fit .hand-dock.land-hand>header>strong,.shell.layout-ipad.land-board-fit .hand-dock.land-hand>header>span{display:none}
.shell.layout-ipad.land-board-fit .hand-dock.land-hand>header button{pointer-events:auto;min-height:36px;background:#112023f5;border:1px solid #ad945f;box-shadow:0 3px 8px #0008}
.shell.layout-ipad.land-board-fit .land-entire-hand,.shell.layout-ipad.land-board-fit .land-entire-hand.expanded{display:grid;grid-template-columns:repeat(var(--hand-columns),minmax(0,1fr));gap:0;padding:0 12px 0 0;background:transparent;border:0;box-shadow:none;overflow:visible;pointer-events:none}
.shell.layout-ipad.land-board-fit .land-hand-card{position:relative;pointer-events:auto;width:calc(100% + 12px);min-width:0;border-radius:6px 6px 0 0;border:1px solid #b69a65;box-shadow:-3px 0 8px #0008;overflow:hidden;background:#192a28;transition:transform .16s ease;transform:rotate(calc((var(--hand-index) - (var(--hand-columns) - 1)/2)*.6deg));transform-origin:center bottom}
.shell.layout-ipad.land-board-fit .land-hand.minimized .land-hand-card{height:40px;min-height:40px;padding:5px 4px}.shell.layout-ipad.land-board-fit .land-hand.minimized .land-hand-card strong{font-size:11px;line-height:1.15}
.shell.layout-ipad.land-board-fit .land-entire-hand.expanded .land-hand-card{height:clamp(150px,24dvh,210px);min-height:0;padding:4px;display:flex;gap:3px;border-top:3px solid var(--type-color,#a99760)}
.shell.layout-ipad.land-board-fit .land-hand-card img{width:100%;height:auto;min-height:0;flex:1;object-fit:cover;border-radius:3px}
.shell.layout-ipad.land-board-fit .land-entire-hand.expanded strong{font-size:12px;line-height:1.15}.shell.layout-ipad.land-board-fit .land-hand-card small{font-size:11px;line-height:1.1}.shell.layout-ipad.land-board-fit .land-hand-stats{font-size:12px;line-height:1.1;margin:0;text-transform:capitalize}
.shell.layout-ipad.land-board-fit .land-hand-card.usable{outline:1px solid #eed28b;outline-offset:-1px}.shell.layout-ipad.land-board-fit .land-hand-card:hover,.shell.layout-ipad.land-board-fit .land-hand-card:focus-visible,.shell.layout-ipad.land-board-fit .land-hand-card.selected{z-index:5;transform:translateY(-10px);outline:2px solid #ffe2a0}
@media(max-width:1100px){.ipad-land-table .ipad-command{grid-template-columns:120px minmax(0,1fr) 155px 86px;gap:5px}.ipad-land-table .ipad-resource{gap:2px}.ipad-land-table .ipad-resource b{font-size:16px}.ipad-land-table .ipad-resource .resource-icon{width:18px;height:18px}.ipad-land-table .ipad-support strong{font-size:10px}.shell.layout-ipad.land-board-fit .land-location-columns{margin:0 4px;gap:8px}}
@media(orientation:portrait){.ipad-land-table .ipad-command{grid-template-columns:120px minmax(0,1fr) 86px;min-height:0}.ipad-land-table .ipad-supports{grid-row:2;grid-column:1/-1}.ipad-land-table .ipad-supports>div{grid-template-columns:repeat(3,minmax(0,1fr))}.ipad-land-table .ipad-piles{grid-column:3}.ipad-land-table .ipad-supports>small{display:none}.ipad-land-table .ipad-support,.ipad-land-table .ipad-empty-support{min-height:28px}.shell.layout-ipad.land-board-fit .hand-dock.land-hand,.shell.layout-ipad.land-board-fit .hand-dock.land-hand:not(.minimized){width:calc(100% - 320px)}.shell.layout-ipad.land-board-fit .bottom-game-bar.land-bottom{grid-template-columns:150px minmax(0,1fr) 150px}.shell.layout-ipad.land-board-fit .phase-progress{width:150px}}
@media(prefers-reduced-motion:reduce){.shell.layout-ipad.land-board-fit .land-hand-card{transition:none}}
