/* PowPowPilot on tablet and desktop. Loaded only from 700 px (media attribute on the link); phones never apply it.
   Two steps: from 700 px the compact rail (icons over labels), from 1180 px the wide rail with the lockup.
   Same markup as the phone layout; colours, radii and type roles come from tokens.css. */
:root {
  --rail: 88px;
  --rail-top: 132px;            /* where the destinations start below logo and refresh */
  --margin-mobile: 28px;        /* the page gutter: every phone rule that uses it widens with it */
  --col-max: 1480px;
  --measure: 720px;             /* longest comfortable line for running text and single lists */
  --display-size: clamp(44px, 3.4vw + 18px, 68px);
  --title-size: 26px;
}

/* ---------- shell: rail on the left, content beside it ---------- */
body { padding: 0 0 0 calc(var(--rail) + env(safe-area-inset-left, 0px)); }
.bar {
  position: fixed; z-index: 21; top: 0; bottom: 0; left: 0; width: calc(var(--rail) + env(safe-area-inset-left, 0px));
  padding-left: env(safe-area-inset-left, 0px);
}
.bar-in { flex-direction: column; justify-content: flex-start; align-items: center; gap: var(--s-2); min-height: 0; max-width: none; padding: var(--s-4) 0 0; }
.bar-logo img { width: 44px; height: auto; }
.bar-btn { flex-direction: column; gap: 2px; width: 100%; min-height: 52px; padding: var(--s-1) 2px; }
.bar-l { align-items: center; text-align: center; }
.bar-l [data-refresh-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bar-l small { font-size: 10.5px; line-height: 1.2; }
html[data-fresh] .bar-btn { width: auto; padding: var(--s-1) var(--s-2); border-radius: var(--r-md); }

nav.tb {   /* "nav": the tape instrument has a rect of the same class */
  z-index: 22; top: var(--rail-top); right: auto; bottom: 0; left: env(safe-area-inset-left, 0px); width: var(--rail);
  overflow-y: auto; background: none; border-top: 0; padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tb ul { display: flex; flex-direction: column; gap: 2px; max-width: none; min-height: 100%; margin: 0; padding: 0 6px var(--s-3); }
.tb a, .tb a.is-up { min-height: 60px; border-radius: var(--r-md); color: var(--track-pale); text-align: center; line-height: 1.15; }
.tb a.is-up svg { stroke: currentColor; stroke-width: 1.6; }
.tb a[aria-current] { background: var(--primary); color: var(--on-deep); }
.tb a[aria-current] svg { stroke: var(--on-deep); }
.tb a[aria-current]::before, .tb a.is-up::before { content: none; }
.tb :focus-visible { outline-color: var(--highlight); outline-offset: -3px; border-radius: var(--r-md); }
.tb-x { display: block; }
.tb-2 { margin-top: auto; padding-top: var(--s-2); border-top: 1px solid var(--primary); }
.tb-s { display: none; }
.tb-n {
  position: absolute; top: 5px; left: 50%; margin-left: 8px; display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: var(--r-full); background: var(--on-deep); color: var(--deep);
  font: 700 11px/1 var(--font-sans); font-variant-numeric: tabular-nums;
}
@media (hover: hover) and (pointer: fine) {
  .tb a:hover { color: var(--on-deep); background: color-mix(in srgb, var(--primary) 45%, transparent); }
  .tb a[aria-current]:hover { background: var(--primary); }
}

.foot { padding-top: var(--s-6); }
.foot .divider { max-width: 360px; }
.ruler { max-width: 328px; }
.hd { padding-top: var(--s-6); }
.lead { font-size: 19px; }
.tabs { max-width: 440px; }
.empty, .fine, .sheet, .form, .lede { max-width: var(--measure); }

/* ---------- Start ---------- */
.hero-b { position: relative; margin: var(--s-5) var(--margin-mobile) 0; border-radius: var(--r-lg); overflow: hidden; }
.hero { aspect-ratio: 1920 / 900; object-fit: cover; object-position: right center; }
.hero-t { padding: var(--s-5) 0 0; background: var(--surface-base); }
.hero-b:has(.hero-t) { border-radius: 0; }
.hero-b picture { border-radius: var(--r-lg); overflow: hidden; }
.hd-s { padding-top: 0; }
.tabs { scroll-margin-top: var(--s-5); }
.ol .sec { margin-top: var(--s-5); }
.ol .sec h2 { font-size: var(--title-size); }
.ol-d > b { font-size: 19px; }
.ol-d > small { font-size: 12px; }
.ol-b { width: 28px; height: 68px; }
.ol-n b { font-size: 30px; }
.ol-n .unit, .ol-g .kind { font-size: 11px; }
.ol-k { font-size: 13px; }
.ol-t { font-size: 14px; }
.sub { margin-top: var(--s-5); }

.more { max-width: none; }
.duo .jump { max-width: var(--measure); }
.lg { max-width: none; }

/* ---------- Alle Gebiete: map on top, taller ---------- */
.hd:not(.hd-s) + .body { margin-top: var(--s-5); }
.row { grid-template-columns: minmax(0, 1fr) auto 150px auto; padding: var(--s-2) var(--s-2) var(--s-2) var(--s-3); border-radius: 0; }
.row-a { grid-column: auto; margin-top: 0; gap: var(--s-1); }
.row-a .dest { margin-right: var(--s-2); }
.row-t { font-size: 18px; }

.sc .lb { font-size: 6px; }   /* the scale is drawn in tape units and grows with the tape: keep its figures label-sized */

/* ---------- Favoriten, Videos, Logbuch, Vergleich, Daten ---------- */
.wall { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: var(--s-3); }
#log-data > p { max-width: var(--measure); }

/* ---------- Bucket List and account ---------- */
.bar .bar-acct { display: none; }
.tb-p { display: none; }
.tb-w { display: inline; }
.tb-a { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg-m { display: none; }
.seg-m + .body { margin-top: var(--s-5); padding-top: 0; }
.seg-v { max-width: 440px; }
.sheet-ok-a { max-width: var(--measure); }
.kom { grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: var(--s-4) var(--s-6); padding: var(--s-5); }
.kom-a { align-self: start; }
.kom-i, .kom-x { grid-column: 1 / -1; }
.kom-w { grid-column: 1 / -1; }
.kom-ws { max-width: 620px; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-4); }
.kom-ws .crest { max-width: 76px; }
.kom-big, .kom-big .crest { width: 128px; height: 128px; }
.kom-t { font-size: 36px; }
.kom-wt { font-size: 26px; }
/* Desktop: the card uses the full width and the awards stand to the right of the lift line. */
.kom-b { max-width: 420px; }
@media (min-width: 1360px) {
  .kom { grid-template-columns: minmax(340px, 1fr) minmax(280px, 360px) minmax(310px, 0.9fr); align-items: start; }
  .kom-w { grid-column: 3; grid-row: 1; align-self: stretch; border-top: 0; border-left: 1px solid var(--hairline); padding: 0 0 0 var(--s-6); }
  .kom-ws { max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5) var(--s-3); margin-top: var(--s-4); }
  .kom-ws .crest { max-width: 84px; }
  .kom-ws span { font-size: 11px; }
}
/* ==== component: text pages, level line, logbook lists (round 4) ==== */
.prose > p, .prose > dl, .prose-s > p, .prose-s > dl, .prose-s > h2 { max-width: var(--measure); }
.prose p { font-size: 16px; line-height: 1.55; }
.prose-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-6); max-width: 1100px; }
.lv-c, .pg-logbuch .rows-c { max-width: var(--measure); }
@media (min-width: 1180px) {
  .tb .tb-lv { display: block; flex-basis: 100%; margin: -6px 0 6px 36px; }
  .tb .tb-lv[hidden] { display: none; }
  .tb a:has(.tb-lv:not([hidden])) { flex-wrap: wrap; align-content: center; min-height: 60px; padding-top: 6px; }
  .tb a[aria-current] .tb-lv { color: var(--on-deep); }   /* the highlight blue on primary is too faint (2.9 : 1) */
}
/* ==== end ==== */

/* ==== component: page layouts, map panel, ski-day button (round 4) ==== */
/* The columns of the page layouts (site.css has the one-column form and the other parts). The hero's rules stay
   under "Start" above and in the desktop section below. */

/* layout "side" from 700 px: the first block of the side column (the ticket) and its extra block (the locator
   map) stand side by side, everything else of the side column below them */
.side-a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 var(--s-5); align-items: start; padding: var(--s-5) var(--margin-mobile) 0; }
.side-a > * { grid-column: 1 / -1; }
.side-a > :first-child { grid-column: 1; }
.side-a > .tkt { margin: 0; }
.side-a > .side-x { grid-column: 2; grid-row: 1; padding: 0; }
.side-a > .side-x .sec { margin-top: 0; }
.side-a > .warn.s4, .side-a > .warn-x { margin: var(--s-4) 0 0; }
.side-a > .body-sheet { padding: 0; }
.side-a > .body-sheet .sheet { margin: var(--s-4) 0 0; }
.side-b > section, .more-rule { max-width: var(--measure); }

/* the list row inside the map's read-out (Alle Gebiete): three columns, the actions below */
.card-map-rows .row { grid-template-columns: minmax(0, 1fr) auto 112px; padding-inline: var(--s-2); }
.card-map-rows .row-a { grid-column: 1 / -1; }

@media (min-width: 1180px) {
  .hero-t .hero-h { color: var(--on-deep); }

  /* layout "duo": two columns, 5 : 7 or 6 : 5; one column without a second part or while the first shows nothing */
  .duo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0 var(--s-6); align-items: start; }
  .duo-6-5 { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .duo:not(:has(> .duo-a > :not([hidden]))), .duo:not(:has(> .duo-b)) { grid-template-columns: minmax(0, 1fr); }
  .duo > .duo-b { grid-column: 2; grid-row: 1; }
  .duo:not(:has(> .duo-a > :not([hidden]))) > .duo-b { grid-column: 1; max-width: 900px; }
  .duo-stick { position: sticky; top: var(--s-4); }

  /* layout "side": the side column is 420 px wide; the main column scrolls */
  .side { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); column-gap: var(--s-6); align-items: start; padding: var(--s-5) var(--margin-mobile) 0; }
  .side-a { display: block; padding: 0; }
  .side-a > .side-x .sec { margin-top: var(--s-5); }
  .side-b { padding: 0; }
  .side-a:has(.side-x) + .side-b > section:first-child > .sec, .side-b > section:first-child > .sec { margin-top: var(--s-2); }

  /* map panel as a column of its own: tight padding at every width */
  .card.card-map-fill { padding: var(--s-2) var(--s-2) var(--s-3); }
}
/* the side column stays in view only where it fits the window */
@media (min-width: 1180px) and (min-height: 860px) {
  .side-a { position: sticky; top: var(--s-5); }
}
/* ==== end ==== */

/* ================= desktop and tablet landscape: wide rail, split views ================= */
@media (min-width: 1180px) {
  :root {
    --rail: 232px; --rail-top: 148px; --margin-mobile: 40px;
    --body-size: 16px; --title-size: 28px; --reading-size: 64px;
  }
  .bar-in { align-items: stretch; padding: var(--s-5) 20px 0; gap: var(--s-3); }
  .bar-logo img { width: 158px; }
  .bar-btn { flex-direction: row; justify-content: flex-start; gap: var(--s-3); width: auto; min-height: var(--tap); padding: 0 var(--s-2); }
  .bar-l { align-items: flex-start; text-align: left; }
  .bar-l [data-refresh-label] { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .bar-l small { font-size: 11px; }
  html[data-fresh] .bar-btn { padding: var(--s-1) var(--s-3) var(--s-1) var(--s-2); border-radius: var(--r-full); }
  .tb ul { padding: 0 var(--s-3) var(--s-4); gap: var(--s-1); }
  .tb a, .tb a.is-up { flex-direction: row; justify-content: flex-start; gap: 0; min-height: 48px; padding: 0 var(--s-3); font-size: 15px; letter-spacing: 0; text-align: left; }
  .tb-s { display: inline; white-space: pre; }
  .tb a svg { margin-right: var(--s-3); flex: 0 0 auto; }
  .tb-n { position: static; margin-left: auto; }

  /* Start: the cockpit */
  .hero-b, .hero-b:has(.hero-t) { border-radius: var(--r-lg); background: var(--deep); }
  .hero { aspect-ratio: 3 / 1; }
  .hero-t { position: absolute; left: 0; top: 0; width: 66%; padding: clamp(20px, 2.4vw, 40px) 0 0 clamp(24px, 3vw, 48px); background: none; }
  .hero-t h1, .hero-t .lead { color: var(--on-deep); }
  .hero-t > * { --claim: clamp(68px, 5.2vw + 12px, 116px); }
  .hero-t h1 { white-space: nowrap; }  /* one line, so the sub-line stays on the dark sky */
  .hero-t .lead { font-size: clamp(20px, 0.8vw + 13px, 28px); max-width: 22em; color: var(--highlight); }
  .ol-b { width: 34px; height: 84px; }
  .ol-n b { font-size: 38px; font-weight: var(--reading-weight); }
  .ol-d > b { font-size: 22px; }

  .card { padding: var(--s-5); }
  .ol-w { height: 28px; }
  .ol-w .wxi svg { width: 26px; height: 26px; }

  /* Page layout "list with map" (Alle Gebiete), the fourth sanctioned page layout beside hero, duo and side
     (styleguide "Seitenlayout · Liste mit Karte"): the map panel sticky on the left, filters, controls and list
     on the right, 11 : 10 and 13 : 10 from 1560 px. Deliberately not a duo: the filter panel, the controls and the
     list are separate children of .body that sort.js and filters.js address, and the map stays before the list in
     reading order. Used once; it keeps the page's selector. */
  .pg-gebiete > .body { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 10fr); column-gap: var(--s-6); align-items: start; margin-top: var(--s-4); }
  .pg-gebiete > .body > * { grid-column: 2; }
  .pg-gebiete > .body > .card-map {
    grid-column: 1; grid-row: 1 / span 12; position: sticky; top: var(--s-4); margin-top: 0;
    max-height: calc(100vh - 2 * var(--s-4)); max-height: calc(100dvh - 2 * var(--s-4)); overflow-y: auto;
  }
  .pg-gebiete > .body > .card-map[hidden] { display: block !important; }   /* side by side the map always shows */
  #map-toggle { display: none; }
  .pg-gebiete .totop { right: auto; left: calc(var(--rail) + env(safe-area-inset-left, 0px) + var(--margin-mobile)); }
  html.has-tray .pg-gebiete > .body > .card-map { max-height: calc(100vh - 2 * var(--s-4) - 64px); }
  .pg-gebiete .ctl { margin-top: var(--s-3); }
  .pg-gebiete .row { grid-template-columns: minmax(0, 1fr) auto 124px; }
  .pg-gebiete .row-a { grid-column: 1 / -1; margin-top: calc(-1 * var(--s-2)); }
  .rows .row { scroll-margin-block: 96px; }


  .tb-a { flex: 1; min-width: 0; }
}

@media (min-width: 1560px) {
  .pg-gebiete > .body { grid-template-columns: minmax(0, 13fr) minmax(0, 10fr); }
}

/* mouse: denser controls than on touch layouts, which keep 44 px */
@media (hover: hover) and (pointer: fine) {
  :root { --tap: 38px; }
  .tb a { min-height: 56px; }
  .jump input { min-height: 44px; }
}
@media (min-width: 1180px) and (hover: hover) and (pointer: fine) {
  .tb a, .tb a.is-up { min-height: 44px; }
}

/* ==== components: list page (filter panel, filter chips, comparison table) ==== */
/* filter bar: search field and its buttons in one row; the thresholds are always there, the pill groups open
   with "Mehr Filter" */
.find { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-2); }
.find > * { flex: 0 0 100%; }
.find > .jump { flex: 1 1 220px; max-width: var(--measure); }
.find > .ctl { flex: 0 0 auto; margin: 0; }
.find-p { display: none; }
.find-w { display: inline; }
.pill-n.find-w { display: inline-flex; }
.fp, .fp.is-js:not(.is-open) { display: block; margin-top: var(--s-3); }
.fp.is-js:not(.is-open) .fp-more { display: none; }
.fp-bar { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.fp-more { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); }
.fp-more .pills-g + .pills-g { margin-top: 0; }
.totop { right: var(--margin-mobile); bottom: var(--s-5); }
html.has-tray .totop { bottom: 84px; }
/* comparison table: wider cells, larger figures, the head stays in view */
.tbl-c.tbl-c-x { max-width: 1040px; padding: 4px var(--s-5) var(--s-2); }
.tbl.tbl-x th, .tbl.tbl-x td { padding: var(--s-3) var(--s-3) var(--s-3) 0; }
.tbl.tbl-x thead td, .tbl.tbl-x tbody th { width: 168px; }
.tbl.tbl-x thead th, .tbl.tbl-x thead td { position: sticky; top: 0; z-index: 2; background: var(--surface-panel); }
.tbl.tbl-x thead th { font-size: 20px; letter-spacing: -0.02em; }
.tbl.tbl-x thead small { font-size: 13px; }
.tbl.tbl-x tbody th { font-size: 12px; letter-spacing: 0.06em; padding-top: 18px; }
.tbl.tbl-x td { font-size: 15px; }
.tbl.tbl-x .nb { font-size: 15px; letter-spacing: -0.02em; }
.tbl.tbl-x td b { font-size: 30px; font-weight: var(--reading-weight); }
.tbl.tbl-x td .kind { font-size: 11px; margin-top: 2px; }
.tbl.tbl-x .chip { font-size: 15px; }
.tbl.tbl-x .dg { min-width: 26px; height: 26px; font-size: 15px; }
@media (min-width: 1180px) {
  .fp-bar { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
  .sel select { padding: 0 var(--s-2); }
}

/* ==== components: forms and Bucket List (form field, card head, progress, friends list) ==== */
.callout, .pg-konto section > p, .pg-konto .rows-c, .pg-konto .switch { max-width: var(--measure); }
@media (hover: hover) and (pointer: fine) {
  .field input { min-height: 44px; }
}

/* ==== components: app bars and tile variants (bars, compact large tile, figure cell) ==== */
/* Leiste: beside the rail the dock of the fixed bars starts at the rail and stands on the window's lower edge */
.barx-dock { left: calc(var(--rail) + env(safe-area-inset-left, 0px)); bottom: 0; }
.barx-dock:has(> .barx:not([hidden])) { background: var(--deep); padding-bottom: env(safe-area-inset-bottom, 0px); }
html.has-tray body { padding-bottom: 66px; }

/* ==== components: resort page (window day row, bulletin block, link tile, station row, table) ==== */
.bul { padding: var(--s-5); }
@media (min-width: 1180px) {
  .day { grid-template-columns: 84px minmax(0, 1fr); gap: var(--s-4); padding: var(--s-3) 0 var(--s-4); }
  .fen { padding: var(--s-2) var(--s-5) var(--s-2); }
  .st-rows { padding: 2px var(--s-5); }
}

/* ==== components: media and dashboard (video card, dashboard panels) ==== */
/* video cards: the Start teaser shows one row (three on a tablet, five on desktop) */
@media (max-width: 1179.98px) { .vids-1 > :nth-child(n+4) { display: none; } }
/* tablet: the quick add in one row, calendar months side by side, the smaller sections in two columns */
.add { max-width: 860px; }
.add-f { grid-template-columns: minmax(0, 1fr) 190px auto; }
.add-q { grid-column: auto; }
.ds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-6); align-items: start; }
.ds-full { grid-column: 1 / -1; }
.ds-top > .tl-f.figs-2 > div { flex-basis: 0; }
.cal { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-5); }
/* desktop: gauge on the left, the four readings in a square beside it */
@media (min-width: 1180px) {
  .ds-top { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: var(--s-6); align-items: center; }
  .ds-top > .tl-f { gap: var(--s-5); margin-top: 0; max-width: 640px; }
  .ds-top > .tl-f.figs-2 > div { flex-basis: 40%; }
  .cal { grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); }
}

/* ==== component: tiles (large, medium) and their grids ==== */
/* Tablet: two large or three medium tiles per row. Desktop (from 1180 px): three large, five medium.
   The medium grid takes its minimum tile width from the content width of the page, so that exactly --grid-m-n
   tiles stand in a row at full width; where the list sits in a narrower column (beside a map) the same tile at
   the same minimum width simply fits fewer per row. 20 px stay free for a classic scrollbar. */
:root { --page-w: calc(min(100vw - var(--rail), var(--col-max)) - 2 * var(--margin-mobile)); }
.grid-l { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-m {
  --grid-m-n: 3;
  --tile-m-min: calc((var(--page-w) - (var(--grid-m-n) - 1) * var(--s-4) - 20px) / var(--grid-m-n));
  grid-template-columns: repeat(auto-fill, minmax(min(var(--tile-m-min), 100%), 1fr)); gap: var(--s-4);
}
.grid-m.grid-m-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-3); }

/* large tile: the tiles of a row are equally high, the danger row stands at the foot */
.slot { display: flex; flex-direction: column; }
.top > .slot:first-child { grid-row: span 2; }   /* Start on tablets: rank 1 beside ranks 2 and 3, which are medium tiles there */
.slot > .tile-l { flex: 1; display: flex; flex-direction: column; }
.slot > .tile-l > .dr { margin-top: auto; }
.slot > .tile-l > .ro { margin-bottom: var(--s-3); }
.slot > .tile-l > .ro-now { margin-bottom: 0; }
.tile-l .gz { max-width: 340px; margin-top: var(--s-4); }

/* medium tile: a little more air between the parts */
.tile-m { gap: var(--s-4); }
.gz-t { width: 160px; }
.tile-m.ol-c { padding: var(--s-3) var(--s-2); }

@media (min-width: 1180px) {
  .grid-l { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
  .grid-m { --grid-m-n: 5; }
  .grid-m.grid-m-5 { gap: var(--s-4); }
  .top > .slot:first-child { grid-row: auto; }
  .tile-l { padding: var(--s-5); }
  /* Start: ranks 2 and 3 are large tiles here, their medium form is not displayed */
  .slot > .tile-l.slot-l { display: flex; }
  .slot > .tile-m.slot-m { display: none; }
  /* the readings of the tiles of a row stand on the same lines: names take two lines, longer ones are cut */
  .tile-l .nm { min-height: calc(2 * 1.15em); }
  .tile-l .nm .stretch { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
  .tile-l .src { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tile-l .ro-now > div { min-height: 96px; }
  .tile-l .ro-s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tile-l .gz { max-width: 320px; margin-top: var(--s-4); }
  .tile-m.ol-c { padding: var(--s-4) var(--s-3); }
}
/* narrowest rail layout (small installed windows): large tiles stay in one column */
@media (max-width: 779.98px) {
  .grid-l { grid-template-columns: minmax(0, 1fr); }
  .top > .slot:first-child { grid-row: auto; }
}

/* ---- dashboard (Skitage) ---- */
/* day medals; the other parts of the dashboard: see "components: media and dashboard" */
.md { gap: var(--s-3); }
.md-svg { max-width: 72px; }

/* language switch at the foot of the rail (macro lang_switch): four codes in a row, under the account */
.tb-lang { margin-top: var(--s-2); padding-top: var(--s-2); border-top: 1px solid var(--primary); }
.tb .tb-lng ul { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 0; margin: 0; padding: 0 var(--s-1); list-style: none; }
.tb .tb-lng a, .tb .tb-lng span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 36px; padding: 0; border-radius: var(--r-md); font: 600 13px/1 var(--font-sans); letter-spacing: 0.06em; color: var(--track-pale); background: none; }
.tb .tb-lng span { color: var(--on-deep); background: var(--primary); }
.tb .tb-lng a:hover { color: var(--on-deep); }
@media (max-width: 1179.98px) { .tb .tb-lng ul { padding: 0; } .tb .tb-lng a, .tb .tb-lng span { min-width: 34px; min-height: 34px; font-size: 12px; } }
@media (min-width: 1180px) { .tb .tb-lng ul { justify-content: flex-start; } }

/* one language switch per device: the rail from 700 px; the footer only on phones, where there is no rail */
.foot-lang { display: none; }
