/* Home's map picker (VG-772): the map line in the mode group and under each More modes card, and the map row sheet.
   The line is the fourth button of the mode group, so Home keeps six controls (the group counted once, G1). Its place in
   each Home layout is the `map` area of home-layout.css: under Gem Hunt beside Play (iPad and desktop landscape, phone
   landscape), a row above Play (iPad portrait), beside the slim More modes tile (phone portrait). Loaded after
   home-layout.css; the pictures are drawn from the maps' own tiles (src/render/map-picture.js). */
.ga-map-line{grid-area:map;justify-self:start;align-self:end;display:flex;align-items:center;gap:12px;min-width:0;
  width:min(320px,100%);height:80px;padding:6px 10px 6px 6px;box-sizing:border-box;border:2px solid #9fd3e840;
  border-radius:20px;background:#12303a;text-align:left}
.ga-map-pic{flex:none;display:block;height:100%;aspect-ratio:2/3;border-radius:10px;overflow:hidden;background:#0c2530;
  box-shadow:inset 0 0 0 2px #fff5da40}
.ga-map-pic img{display:block;width:100%;height:100%;object-fit:contain;-webkit-user-drag:none;pointer-events:none}
.ga-map-pic img[hidden]{display:none}
.ga-map-text{flex:1 1 auto;display:flex;flex-direction:column;justify-content:center;gap:2px;min-width:0}
.ga-map-text>*{display:block;overflow:hidden}
.ga-map-text small{font-size:15px;line-height:1.2;color:#d8efe9}
.ga-map-text strong{font-weight:400;font-size:22px;line-height:1.05;color:var(--home-gold);overflow-wrap:anywhere} /* two lines at most */
.ga-map-go{flex:none;display:grid;place-items:center;color:var(--home-cream)}
.ga-home .ga-map-go .ga-icon{width:26px;height:26px}

/* iPad portrait: a row of its own above Play, centred like Play. */
@media(min-width:601px) and (orientation:portrait){.ga-map-line{justify-self:center;width:min(420px,100%);height:64px}}
/* Phone portrait: beside the slim More modes tile (which keeps its badge and words, not its small pictures). The name
   may take two lines (Vuurtorenheuvel is one long word). */
@media(max-width:600px) and (orientation:portrait){
  .ga-map-line{width:100%;height:100%;gap:8px;padding:4px 8px 4px 4px;border-radius:16px}
  .ga-more-modes .ga-mode-pic{display:none}
  /* Half width: the picked extra mode shows its name clear of the tick; its goal line is on its More modes card. */
  .ga-more-modes .ga-mode-text{padding-right:48px}.ga-more-modes [data-more-goal]{display:none}
  .ga-map-text small{font-size:12px}
  .ga-map-text strong{font-size:15px}
  .ga-map-go{display:none}
}
/* Phone landscape: under the first card, beside Play, as tall as Play. The narrow More modes tile names the picked
   extra mode without its goal line (Dutch "Als eerste 2 goals" does not fit 104 px). */
@media(max-height:500px) and (orientation:landscape){
  .ga-more-modes [data-more-goal]{display:none}
  .ga-map-line{width:100%;height:64px;gap:8px;padding:4px 8px 4px 4px;border-radius:16px}
  .ga-map-text small{font-size:13px}.ga-map-text strong{font-size:17px}
  .ga-home .ga-map-go .ga-icon{width:22px;height:22px}
}

/* The More modes sheet: each card with its map line under it, two across even on a 360 px phone. */
.ga-home .ga-mode-sheet{grid-template-columns:repeat(auto-fit,minmax(136px,1fr))}
.ga-mode-slot{display:flex;flex-direction:column;gap:12px;min-width:0}
.ga-mode-slot .ga-map-line{width:100%;height:68px}
.ga-mode-slot .ga-map-text strong{font-size:17px}
.ga-mode-sheet .ga-mode-slot .ga-mode-card{height:min(240px,calc(100vh - 230px))}

/* The map row: picture cards with names, the current one ringed in gold with a tick; one tap picks and returns. Three
   across on phones and the iPad side sheet. b21: with VG-773's list (10 or 11 maps) a landscape phone wraps into rows of
   small cards (one row had 64 px cards whose names overflowed); the sheet scrolls where it must.
   Gaps stay 12 px or more with the picked card at the shared 1.04 scale. */
.ga-map-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:20px 16px;padding:8px 6px}
.ga-map-tile{position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;padding:10px 8px;
  border:0;border-radius:18px;background:#12303a;color:var(--home-cream);text-align:center}
.ga-map-tile::after{content:"";position:absolute;inset:0;border-radius:inherit;border:2px solid #fff5da59;pointer-events:none}
.ga-map-tile[aria-pressed=true]::after{border:5px solid var(--home-gold);box-shadow:0 0 0 2px #fff5da}
.ga-map-tile .ga-map-pic{height:120px}
.ga-map-tile strong{display:block;max-width:100%;font-weight:400;font-size:16px;line-height:1.1;overflow-wrap:anywhere}
.ga-map-tick{position:absolute;top:8px;right:8px;display:none;place-items:center;width:32px;height:32px;box-sizing:border-box;
  border-radius:50%;background:var(--home-gold);color:var(--home-dark);border:2px solid #fff5da}
.ga-home .ga-map-tick .ga-icon{width:20px;height:20px}
.ga-map-tile[aria-pressed=true] .ga-map-tick{display:grid}
@media(max-width:600px) and (orientation:portrait){.ga-map-tile .ga-map-pic{height:84px}.ga-map-tile{padding:8px 6px}}
@media(max-height:500px) and (orientation:landscape){
  .ga-map-row{grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:12px 14px;padding-top:6px}
  .ga-map-tile{padding:6px 4px;gap:6px}.ga-map-tile .ga-map-pic{height:64px}.ga-map-tile strong{font-size:13px}
  .ga-sheet[data-sheet-name=map]{gap:12px}
  .ga-map-text strong{font-size:16px}
}
