/* Compact tabletop boards. The shell still owns the viewport, controls and
   feedback; only the contents of the two game workspaces change here. */
@media (max-width:699px) and (max-height:740px), (min-width:700px) and (max-height:520px){
 #game-host [data-arena-game="tricks"] .arena-workspace,
 #game-host [data-arena-game="pipeline"] .arena-workspace{gap:0;padding:4px 8px 5px;scroll-padding:5px}
 #game-host [data-arena-game="tricks"] .tabletop-stage-title,
 #game-host [data-arena-game="tricks"] .tabletop-inline-rule,
 #game-host [data-arena-game="tricks"] .tabletop-ai-policy,
 #game-host [data-arena-game="pipeline"] .tabletop-stage-title{display:none}
 #game-host [data-arena-game="tricks"] .tabletop-tricks-board,
 #game-host [data-arena-game="pipeline"] .tabletop-pipeline-board{box-sizing:border-box;width:min(100%,1000px)!important;min-width:0;border-radius:12px;box-shadow:inset 0 0 0 2px #ffcf3f20,0 2px 0 #14203c;overflow:visible}
 #game-host [data-arena-game="tricks"] .tabletop-heading,
 #game-host [data-arena-game="pipeline"] .tabletop-heading{min-width:0;margin:0;gap:3px 6px;align-content:center}
 #game-host [data-arena-game="tricks"] .tabletop-goal,
 #game-host [data-arena-game="pipeline"] .tabletop-goal{font-size:15px;line-height:20px;letter-spacing:0;white-space:nowrap}
 #game-host [data-arena-game="tricks"] .tabletop-trump,
 #game-host [data-arena-game="pipeline"] .tabletop-prediction{font-size:10px;line-height:15px;padding:1px 5px;white-space:nowrap}
 #game-host [data-arena-game="tricks"] .tabletop-hand-heading{min-width:0;min-height:18px;margin:0;gap:3px;font-size:10px;line-height:14px}
 #game-host [data-arena-game="tricks"] .tabletop-player-art{width:18px;height:18px;flex:0 0 18px}
 #game-host [data-arena-game="tricks"] .tabletop-hand{width:100%;max-width:none;margin:0;min-width:0;gap:3px}
 #game-host [data-arena-game="tricks"] .tabletop-card{box-sizing:border-box;min-width:44px;border-radius:7px;gap:0;justify-content:center;box-shadow:0 2px 0 #14203c}
 #game-host [data-arena-game="tricks"] .tabletop-card.is-hint{outline-offset:-2px}
 #game-host [data-arena-game="tricks"] .tabletop-card-art{flex-shrink:0;min-height:0;max-width:none;object-fit:contain}
 #game-host [data-arena-game="tricks"] .tabletop-card-caption{flex-shrink:0;gap:2px;line-height:1}
 #game-host [data-arena-game="tricks"] .tabletop-card-mark{font-size:11px;line-height:14px}
 #game-host [data-arena-game="tricks"] .tabletop-card-number{font-size:20px;line-height:20px;letter-spacing:0}
 #game-host [data-arena-game="tricks"] .tabletop-card-key{font-size:9px;line-height:10px;top:2px;left:3px}
 #game-host [data-arena-game="tricks"] .tabletop-duel{width:100%;max-width:none;min-width:0;min-height:0;margin:0;gap:3px;grid-template-columns:minmax(50px,1fr) minmax(100px,1.35fr) minmax(50px,1fr)}
 #game-host [data-arena-game="tricks"] .tabletop-played-card{box-sizing:border-box;min-width:0;min-height:0;padding:1px 2px;justify-content:center;gap:0;border-radius:8px}
 #game-host [data-arena-game="tricks"] .tabletop-played-art{min-height:0;flex-shrink:0;object-fit:contain}
 #game-host [data-arena-game="tricks"] .tabletop-played-label{font-size:10px;line-height:13px;text-align:center}
 #game-host [data-arena-game="tricks"] .tabletop-trick-center{min-width:0;gap:2px}
 #game-host [data-arena-game="tricks"] .tabletop-round-title{font-size:10px;line-height:13px;letter-spacing:0;white-space:nowrap}
 #game-host [data-arena-game="tricks"] .tabletop-round-result{font-size:14px;line-height:17px;white-space:nowrap}
 #game-host [data-arena-game="tricks"] .tabletop-lead-text{font-size:10px;line-height:12px;max-width:100%}
 #game-host [data-arena-game="tricks"] .tabletop-trick-record{min-width:0;min-height:20px;margin:0;gap:2px;align-items:center}
 #game-host [data-arena-game="tricks"] .tabletop-trick-badge{box-sizing:border-box;flex:1 1 0;min-width:0;min-height:18px;height:18px;padding:0 2px;font-size:9px;line-height:14px;white-space:nowrap;letter-spacing:-.1px}

 /* Orders retain all three durations; station state and the timeline retain
    their numbers, even where the lower timeline needs workspace scrolling. */
 #game-host [data-arena-game="pipeline"] .tabletop-pipeline-board{display:grid;grid-template-columns:minmax(0,1fr);gap:2px;padding:4px}
 #game-host [data-arena-game="pipeline"] .tabletop-queue-instruction{font-size:10px;line-height:14px;min-height:14px;margin:0;text-align:center}
 #game-host [data-arena-game="pipeline"] .tabletop-job-queue{min-width:0;gap:3px;grid-template-columns:repeat(var(--job-count),minmax(44px,1fr))}
 #game-host [data-arena-game="pipeline"] .tabletop-job{box-sizing:border-box;display:grid;grid-template-rows:12px 24px 22px 14px;align-content:center;justify-items:center;gap:1px;min-width:44px;min-height:82px;height:82px;padding:2px 1px;border-radius:7px;box-shadow:0 2px 0 #14203c}
 #game-host [data-arena-game="pipeline"] .tabletop-job.is-selected,
 #game-host [data-arena-game="pipeline"] .tabletop-job.is-hint{outline-offset:-2px}
 #game-host [data-arena-game="pipeline"] .tabletop-job-position{justify-self:start;align-self:center;padding-left:2px;font-size:10px;line-height:12px}
 #game-host [data-arena-game="pipeline"] .tabletop-food-art{width:100%;height:24px;min-height:0;max-width:none;object-fit:contain}
 #game-host [data-arena-game="pipeline"] .tabletop-job-name{display:flex;align-items:center;justify-content:center;width:100%;height:22px;min-height:0;font-size:10px;line-height:11px;margin:0}
 #game-host [data-arena-game="pipeline"] .tabletop-job-times{font-size:11px;line-height:14px;letter-spacing:-.4px;white-space:nowrap}
 #game-host [data-arena-game="pipeline"] .tabletop-duration-legend{font-size:10px;line-height:12px;min-height:12px;margin:0;text-align:center}
 #game-host [data-arena-game="pipeline"] .tabletop-stations{min-width:0;gap:4px}
 #game-host [data-arena-game="pipeline"] .tabletop-station{box-sizing:border-box;min-width:0;padding:3px 2px;border-radius:8px;justify-content:center}
 #game-host [data-arena-game="pipeline"] .tabletop-station-title{font-size:10px;line-height:12px;margin:0;letter-spacing:-.2px}
 #game-host [data-arena-game="pipeline"] .tabletop-station-art{width:100%;height:27px;min-height:0;max-height:none;object-fit:contain}
 #game-host [data-arena-game="pipeline"] .tabletop-station-state{display:flex;align-items:center;justify-content:center;min-height:12px;font-size:10px;line-height:12px;text-align:center}
 #game-host [data-arena-game="pipeline"] .tabletop-station-meter{height:3px;flex:0 0 3px;margin:2px 0}
 #game-host [data-arena-game="pipeline"] .tabletop-station-wait{display:flex;align-items:center;justify-content:center;min-height:22px;font-size:9px;line-height:11px;text-align:center}
 #game-host [data-arena-game="pipeline"] .tabletop-schedule{min-width:0;margin:0;padding:4px;border-radius:8px}
 #game-host [data-arena-game="pipeline"] .tabletop-schedule-heading{font-size:10px;line-height:13px;margin:0 0 3px;gap:4px}
 #game-host [data-arena-game="pipeline"] .tabletop-schedule-row{grid-template-columns:58px minmax(0,1fr);gap:3px;margin:2px 0}
 #game-host [data-arena-game="pipeline"] .tabletop-track-name{font-size:9px;line-height:12px}
 #game-host [data-arena-game="pipeline"] .tabletop-track{height:14px}
 #game-host [data-arena-game="pipeline"] .tabletop-task{top:1px;height:12px;font-size:9px;line-height:10px}
 #game-host [data-arena-game="pipeline"] .tabletop-schedule-key{font-size:9px;line-height:11px;margin:3px 0 0}
 #game-host [data-arena-game="pipeline"] .tabletop-delivery{min-width:0;min-height:20px;margin:0;gap:3px}
 #game-host [data-arena-game="pipeline"] .tabletop-delivery-label{font-size:10px;line-height:13px}
 #game-host [data-arena-game="pipeline"] .tabletop-finished-art{width:20px;height:20px}
 #game-host [data-arena-game="pipeline"] .tabletop-finished-item{font-size:9px;line-height:11px;gap:0}
}

/* At 320 × 568 this board is 274 px tall plus 9 px of workspace padding.
   The six-column hand needs 279 px, leaving room inside a 304 px board. */
@media (max-width:699px) and (max-height:740px){
 #game-host [data-arena-game="tricks"] .tabletop-tricks-board{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:24px 18px 56px 60px 20px 18px 56px;gap:2px;padding:4px}
 #game-host [data-arena-game="tricks"] .tabletop-heading{height:24px;flex-wrap:nowrap}
 #game-host [data-arena-game="tricks"] .tabletop-hand-heading{height:18px;white-space:nowrap}
 #game-host [data-arena-game="tricks"] .tabletop-hand{grid-template-columns:repeat(var(--hand-size),minmax(44px,1fr));grid-template-rows:56px}
 #game-host [data-arena-game="tricks"] .tabletop-card{min-height:56px;height:56px;padding:2px 1px}
 #game-host [data-arena-game="tricks"] .tabletop-card-art{width:100%;height:28px;flex-basis:28px}
 #game-host [data-arena-game="tricks"] .tabletop-duel{height:60px}
 #game-host [data-arena-game="tricks"] .tabletop-played-card{height:60px}
 #game-host [data-arena-game="tricks"] .tabletop-played-art{height:38px;width:100%;max-width:74px}
 #game-host [data-arena-game="pipeline"] .tabletop-heading{min-height:22px;flex-wrap:nowrap}
}

/* Short landscape uses the actual existing nodes in three columns: fox hand,
   current trick and objective, human hand. Each six-card hand is 3 × 2. */
@media (min-width:700px) and (max-height:520px){
 #game-host [data-arena-game="tricks"] .arena-workspace{padding:6px 8px}
 #game-host [data-arena-game="tricks"] .tabletop-tricks-board{display:grid;grid-template-columns:minmax(148px,1fr) minmax(210px,1.2fr) minmax(148px,1fr);grid-template-rows:28px 124px 24px;column-gap:8px;row-gap:6px;padding:7px}
 #game-host [data-arena-game="tricks"] .tabletop-heading{grid-column:2;grid-row:1;flex-wrap:nowrap;height:28px}
 #game-host [data-arena-game="tricks"] .tabletop-hand-heading{grid-column:1;grid-row:1;height:28px;line-height:12px}
 #game-host [data-arena-game="tricks"] .tabletop-trick-record~.tabletop-hand-heading{grid-column:3}
 #game-host [data-arena-game="tricks"] .tabletop-opponent-hand{grid-column:1;grid-row:2/4}
 #game-host [data-arena-game="tricks"] .tabletop-human-hand{grid-column:3;grid-row:2/4}
 #game-host [data-arena-game="tricks"] .tabletop-hand{align-self:center;grid-template-columns:repeat(3,minmax(44px,1fr));grid-template-rows:repeat(2,74px);gap:6px 5px}
 #game-host [data-arena-game="tricks"] .tabletop-card{height:74px;min-height:74px;padding:3px 2px}
 #game-host [data-arena-game="tricks"] .tabletop-card-art{height:43px;width:100%;flex-basis:43px}
 #game-host [data-arena-game="tricks"] .tabletop-card-number{font-size:22px;line-height:22px}
 #game-host [data-arena-game="tricks"] .tabletop-duel{grid-column:2;grid-row:2;height:124px;grid-template-columns:minmax(50px,1fr) minmax(78px,1.2fr) minmax(50px,1fr);gap:4px}
 #game-host [data-arena-game="tricks"] .tabletop-played-card{height:94px}
 #game-host [data-arena-game="tricks"] .tabletop-played-art{width:100%;height:62px;max-width:88px}
 #game-host [data-arena-game="tricks"] .tabletop-trick-record{grid-column:2;grid-row:3;flex-wrap:wrap;align-content:center;gap:2px;height:24px}
 #game-host [data-arena-game="tricks"] .tabletop-trick-badge{min-height:20px;height:20px;font-size:8px;line-height:12px;padding:0 1px}

 /* The planning queue remains beside the three working stations and schedule. */
 #game-host [data-arena-game="pipeline"] .arena-workspace{padding:3px 8px}
 #game-host [data-arena-game="pipeline"] .tabletop-pipeline-board{grid-template-columns:minmax(190px,.95fr) minmax(300px,1.05fr);grid-template-rows:22px 14px 70px 70px 13px 20px;column-gap:8px;row-gap:3px;padding:5px}
 #game-host [data-arena-game="pipeline"] .tabletop-heading{grid-column:1/-1;grid-row:1;flex-wrap:nowrap;height:22px}
 #game-host [data-arena-game="pipeline"] .tabletop-queue-instruction{grid-column:1;grid-row:2;white-space:nowrap}
 #game-host [data-arena-game="pipeline"] .tabletop-job-queue{grid-column:1;grid-row:3/5;grid-template-columns:repeat(3,minmax(44px,1fr));grid-template-rows:repeat(2,70px);gap:3px 5px}
 #game-host [data-arena-game="pipeline"] .tabletop-job{grid-template-rows:12px 26px 12px 14px;gap:0;min-height:70px;height:70px;padding:2px 1px}
 #game-host [data-arena-game="pipeline"] .tabletop-food-art{height:26px}
 #game-host [data-arena-game="pipeline"] .tabletop-job-name{font-size:11px;line-height:12px;height:12px;white-space:nowrap}
 #game-host [data-arena-game="pipeline"] .tabletop-duration-legend{grid-column:1;grid-row:5;font-size:9px;line-height:13px;white-space:nowrap}
 #game-host [data-arena-game="pipeline"] .tabletop-delivery{grid-column:1;grid-row:6;height:20px}
 #game-host [data-arena-game="pipeline"] .tabletop-stations{grid-column:2;grid-row:2/4;align-items:stretch}
 #game-host [data-arena-game="pipeline"] .tabletop-station{padding:2px;min-height:0}
 #game-host [data-arena-game="pipeline"] .tabletop-schedule{grid-column:2;grid-row:4/7;align-content:center;display:grid;grid-template-rows:13px repeat(3,18px) 14px;padding:5px}
 #game-host [data-arena-game="pipeline"] .tabletop-schedule-heading{margin:0}
 #game-host [data-arena-game="pipeline"] .tabletop-schedule-row{margin:0}
 #game-host [data-arena-game="pipeline"] .tabletop-schedule-key{margin:0;line-height:14px;white-space:nowrap}
}
