/* Home dashboard (A9): the resort you're at, and widgets that link to each part of the app (dashboard.js).
   Colours, type and motion come from design/tokens.css; the app bar and picker from resort.css. */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body.dash-page {
  margin: 0;
  font-family: var(--font); font-size: var(--text-base); line-height: 1.5;
  color: var(--text); background: var(--page);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.dash { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter) 56px; }
.dash a { color: var(--accent); }
.data-error { margin: 0; padding: 12px 20px; background: #fde8e8; color: var(--destructive); font-weight: 600; text-align: center; }

/* ---------- Buttons ---------- */
.dbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border: 0; border-radius: 12px;
  background: var(--fill-2); color: var(--text);
  font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease-out);
}
.dbtn:hover { background: var(--fill-hover); }
.dbtn:active { transform: scale(.97); }
.dbtn.primary { background: var(--accent); color: var(--on-accent); }
.dbtn.primary:hover { background: var(--accent-hover); }
.dbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dash button:focus-visible, .dash a:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

/* ---------- Hero: the resort you're at, with the My skiing card beside it ---------- */
/* The warnings sit under both on a wide screen, and straight under the resort (before My skiing) on a narrow one */
.dash-top {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); grid-template-areas: "hero ski" "alerts alerts";
  gap: 24px 32px; align-items: center; padding: 36px 0 28px;
}
.dash-top:has(> .dash-alerts[hidden]) { grid-template-areas: "hero ski"; }
.dash-hero { grid-area: hero; min-width: 0; }
.dash-top > .ski-card { grid-area: ski; }
.dash-top > .dash-alerts { grid-area: alerts; align-self: stretch; }
.eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hero-title-row { display: flex; align-items: center; gap: 10px; }   /* the star stays beside a long name */
.hero-title-row h1 { min-width: 0; overflow-wrap: break-word; }
.dash-hero h1 {
  margin: 0; font-family: var(--font-display); font-size: clamp(32px, 5vw, 48px); line-height: 1.1;
  font-weight: 700; letter-spacing: var(--tracking-title); color: var(--navy);
}
.hero-star { flex: none; width: 44px; height: 44px; }
.hero-star svg { width: 24px; height: 24px; }
.hero-place { margin: 6px 0 0; font-size: 17px; color: var(--muted); }
/* The weather at the top now, a link to the full forecast (dashboard.js, heroNowHTML) */
.hero-now {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin-top: 12px; padding: 6px 12px 6px 8px;
  border-radius: 999px; background: rgb(var(--accent-rgb) / .08); color: var(--text) !important; text-decoration: none;
  font-size: 15px; font-variant-numeric: tabular-nums;
}
.hero-now:hover { background: rgb(var(--accent-rgb) / .14); }
/* Its room while the forecast loads, so the widgets under the hero don't move when it lands (review 2026-10-28) */
.hero-now-wait { width: 220px; max-width: 100%; height: 36px; box-sizing: border-box; background: rgb(var(--navy-rgb) / .06); }
.hero-now-icon { font-size: 22px; line-height: 1; }
.hero-now strong { font-size: 17px; }
.hero-now span:not(.hero-now-icon) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.hero-now svg { width: 14px; height: 14px; flex: none; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* The weather and, for a resort with a live feed, whether it's open now (heroOpenHTML), side by side under the name */
.hero-live { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 10px; margin-top: 12px; }
.hero-live .hero-now { margin-top: 0; }
.hero-open {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 12px 6px 10px; box-sizing: border-box;
  border-radius: 999px; background: var(--fill); color: var(--text) !important; text-decoration: none; font-size: 15px; line-height: 1.3;
}
a.hero-open:hover { background: rgb(var(--navy-rgb) / .1); }
.hero-open[data-state="open"] { background: rgb(31 157 85 / .12); }   /* --live */
.hero-open-text { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; min-width: 0; }
.hero-open-text strong { font-size: 15px; }
.hero-open-text > span { color: var(--muted); font-variant-numeric: tabular-nums; }
.hero-open-text small { flex-basis: 100%; font-size: 12.5px; color: var(--caution-ink); }
.hero-open[data-state="stale"] .hero-open-text strong { color: var(--caution-ink); }
.hero-open:is([data-state="unavailable"], [data-state="error"], [data-state="loading"]) .hero-open-text strong { color: var(--muted); font-weight: 600; }
.hero-open svg { width: 14px; height: 14px; flex: none; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* The dot: the state's colour, never alone (the word is beside it); hollow for a status that isn't current */
.hero-open-dot { flex: none; width: 11px; height: 11px; border-radius: 50%; box-sizing: border-box; background: var(--muted); }
.hero-open[data-state="open"] .hero-open-dot { background: var(--live); }
.hero-open[data-state="stale"] .hero-open-dot { background: none; border: 2.5px solid var(--caution-strong); }
.hero-open:is([data-state="unavailable"], [data-state="error"]) .hero-open-dot { background: none; border: 2px solid var(--muted); }
.hero-open[data-state="loading"] .hero-open-dot { background: none; border: 2px solid var(--accent); border-right-color: transparent; animation: hero-open-spin 1s linear infinite; }
@keyframes hero-open-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero-open[data-state="loading"] .hero-open-dot { animation: none; border-right-color: var(--accent); } }
.dash-still .hero-open[data-state="loading"] .hero-open-dot { animation: none; border-right-color: var(--accent); }   /* Settings › Animations on Home off */

/* ---------- Warnings: never moved or removed (dashboard.js, renderAlerts) ---------- */
.dash-alerts-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dash-alert {
  --c: var(--caution-strong);
  display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 12px;
  border-radius: var(--radius-md, 14px); background: #fff; border-left: 4px solid var(--c);
  box-shadow: 0 1px 3px rgb(var(--navy-rgb) / .08), 0 6px 20px rgb(var(--navy-rgb) / .05);
}
.dash-alert.wind { --c: var(--wx-wind); }
.dash-alert.snow { --c: var(--wx-snow); }
.dash-alert.cold { --c: var(--wx-cold); }
.dash-alert.storm { --c: var(--wx-storm); }
.dash-alert.severe { --c: var(--severe); }
.dash-alert.notice { --c: var(--wx-fog); }
.dash-alert-icon { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); }
.dash-alert-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.dash-alert-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.dash-alert-text strong { font-size: 15px; color: var(--text); }
.dash-alert.severe .dash-alert-text strong { color: var(--severe-ink); }
.dash-alert-text span { font-size: 14px; color: var(--muted); }
.dash-alert-act { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.dash-alert-act svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.dash-alert .dbtn.dash-alert-act { height: 36px; padding: 0 14px; border-radius: 999px; }

/* ---------- Closures, above the other widgets while something is closed (dashboard.js) ---------- */
.dash-pinned { margin-bottom: 16px; }
.dash-pinned-list { display: grid; gap: 16px; }
.dash-pinned-list .widget.wide { grid-column: auto; }
.dash-pinned-note { display: none; margin: 0 0 8px; font-size: 14px; color: var(--muted); }
body.dash-editing .dash-pinned-note { display: block; }
.hero-lead { margin: 10px 0 0; max-width: 560px; font-size: 17px; color: var(--muted); }
.hero-facts { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-facts li { padding: 6px 12px; border-radius: 999px; background: var(--fill); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero-quick { margin-top: 20px; }
.hero-quick p { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border: 0; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px var(--stroke);
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer;
}
.chip-btn:hover { background: var(--snow-light); }
.chip-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* The piste mix bar (.mix) is styled in resort.css */

/* ---------- Widgets ---------- */
.dash-grid { --widget-max: 380px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.widget {
  --tint: var(--navy-rgb);
  position: relative;
  display: flex; flex-direction: column;
  min-height: 168px; max-height: var(--widget-max);   /* a long list scrolls inside the widget instead of stretching it */
  min-width: 0;   /* long favourite names ellipsise instead of widening the grid on phones */
  scroll-margin: 84px 0 104px;   /* scrolled to clear of the sticky app bar and the editing bar */
  /* A wash of the widget's own colour at the top, so a short widget isn't a bare white box (owner's request, 2026-10-20) */
  background: linear-gradient(to bottom, rgb(var(--tint) / .07), #fff 110px); border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgb(var(--navy-rgb) / .08), 0 6px 20px rgb(var(--navy-rgb) / .06);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease);
}
/* Only where there's a real pointer: a tap on a phone leaves :hover stuck, and the widget raised, until the next tap */
@media (hover: hover) { .widget:has(.widget-link[href]:hover) { transform: translateY(-2px); box-shadow: var(--shadow); } }
.widget.wide { grid-column: span 2; }
/* A widget beside a taller one fills the row's height (owner's request 2026-10-27, no white gap under the two beside
   Conditions): the cap above still limits how tall a widget makes its row, and min-height, which wins over it, then
   stretches the widget to the row. Not on phones, where the widgets are a wrapping flex row (below) */
@media (min-width: 641px) {
  .dash-grid { grid-auto-rows: minmax(168px, auto); }
  .dash-grid > :is(.widget, .widget-placeholder) { min-height: 100%; }
}
.widget-link { position: relative; overflow: hidden; display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 18px 20px 16px; color: inherit; text-decoration: none; border-radius: inherit; }
/* The widget's icon again, large and faint in its colour, in the bottom right corner behind the text (dashboard.js) */
.widget-mark { position: absolute; right: -18px; bottom: -22px; width: 132px; height: 132px; pointer-events: none; opacity: .07; }
.widget-mark svg { width: 100%; height: 100%; fill: none; stroke: rgb(var(--tint)); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.widget header, .widget-body { position: relative; }   /* over the mark */
.widget header { display: flex; align-items: center; gap: 10px; }
.widget-icon {
  width: 38px; height: 38px; flex: none; border-radius: 12px;
  display: grid; place-items: center;
  background: rgb(var(--tint) / .1); color: rgb(var(--tint));
}
.widget-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* The title with its link under it, so a long title has the whole width ("Emergency SOS" on one line) */
.widget-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.widget h2 { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: var(--tracking-title); color: var(--text); }
.widget-cta { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.widget-cta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* The body scrolls when it's longer than the widget (and hands the scroll on to the page at its ends), with a soft shadow at the edge that has more to show */
.widget-body {
  flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin;   /* no overscroll-behavior: contain, or the page won't scroll with the pointer over a list that's at its end */
  margin: 10px -20px 0; padding: 2px 20px;   /* the scroll bar at the widget's edge; room for focus rings */
  font-size: 15px; color: var(--muted);
  background:
    linear-gradient(#fff 40%, rgb(255 255 255 / 0)) top / 100% 24px,
    linear-gradient(rgb(255 255 255 / 0), #fff 60%) bottom / 100% 24px,
    radial-gradient(farthest-side at 50% 0, rgb(var(--navy-rgb) / .14), transparent) top / 100% 10px,
    radial-gradient(farthest-side at 50% 100%, rgb(var(--navy-rgb) / .14), transparent) bottom / 100% 10px;
  background-repeat: no-repeat;
  background-attachment: local, local, scroll, scroll;
  overflow-x: hidden;   /* sideways only inside its own strips (the seven days), never the whole body */
}
/* While there's more below, a chevron at the foot of the body says so, as the shadow alone is easy to miss on a phone
   (dashboard.js sets .has-more as the body is scrolled or redrawn). Sticky: it stays at the foot while the list moves */
.widget-body.has-more::after {
  content: ""; position: sticky; bottom: 2px; display: block; width: 28px; height: 28px; margin: -28px auto 0;
  border-radius: 50%; pointer-events: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230066cc' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E") center / 18px no-repeat;
  box-shadow: 0 1px 2px rgb(var(--navy-rgb) / .14), 0 3px 10px rgb(var(--navy-rgb) / .14);
}
.widget-body.has-more { padding-bottom: 30px; }   /* the rows scroll clear of the chevron, so the last one can be read */
.widget-body p { margin: 0; }
.widget-body p + p { margin-top: 6px; }
.widget-body strong { color: var(--text); }
.widget-foot { display: flex; align-items: center; gap: 12px; padding: 10px 20px 12px; border-top: 1px solid var(--separator-soft); font-size: 13px; color: var(--muted); }
.widget-foot a { color: var(--accent); text-decoration: none; font-weight: 600; }
.widget-foot a:hover { text-decoration: underline; }
.widget-foot .grow { flex: 1; }
.widget-foot .grow.stale { color: var(--caution-strong); font-weight: 600; }

/* Widget tints */
.widget.conditions { --tint: 10 132 255; }
.widget.directions { --tint: 21 101 192; }
.widget.sos { --tint: var(--sos-rgb); }
.widget.reviews { --tint: 245 163 0; }
.widget.offline { --tint: 90 110 140; }
.widget.friends { --tint: 31 157 85; }
.widget.favourites { --tint: 245 163 0; }
.widget.tickets { --tint: 164 80 42; }
.widget.closures { --tint: 217 115 13; }

/* Conditions widget */
.w-now { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--text); }
.w-temp { font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.w-temp small { font-size: 20px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.w-icon { font-size: 40px; line-height: 1; }
.w-desc { display: flex; flex-direction: column; line-height: 1.3; }
.w-desc strong { font-size: 17px; }
.w-desc span { font-size: 13px; color: var(--muted); }
.w-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 14px; }
.w-stats div { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--fill); }
.w-stats dt { font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.w-stats dd { margin: 1px 0 0; font-size: 15px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.w-stats dd small { font-size: 12px; font-weight: 400; color: var(--muted); }
/* The seven days at the top and the base (forecast-view.js, styled in forecast.css): the widget is a little taller to fit them */
.widget.conditions { --widget-max: 500px; }
.widget.conditions .fc-legend { margin-top: 14px; }
/* The days scroll sideways on their own when they don't fit (a phone), with the next day fading in at the edge */
.widget.conditions .fc-days.compact {
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
  margin-top: 8px; padding-right: 24px;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
}
.widget.conditions .fc-days.compact::-webkit-scrollbar { display: none; }
.w-last { margin-top: 12px !important; font-size: 13px; }
.w-loading { color: var(--muted); }
/* Room kept while the live weather loads (dashboard.js, conditionsWidget): grey shapes where the temperature, the four
   figures and the seven days will be, about their height, so the widgets under Conditions don't move when it lands */
.w-skeleton { margin-top: 12px; }
.widget.conditions .sk { display: block; height: 12px; border-radius: 6px; background: rgb(var(--navy-rgb) / .08); }
.w-skeleton .sk-temp { width: 96px; height: 50px; border-radius: 10px; }
.w-skeleton .sk-icon { width: 64px; height: 64px; border-radius: 50%; }
.w-skeleton .sk-desc { display: flex; flex-direction: column; gap: 8px; flex: 1; max-width: 180px; }
.w-skeleton .sk-desc .sk:last-child { width: 70%; }
.w-skeleton .w-stats div { min-height: 56px; box-sizing: border-box; }
.w-skeleton .w-stats dt .sk { width: 60%; height: 10px; }
.w-skeleton .w-stats dd .sk { width: 40%; margin-top: 6px; height: 14px; }
.w-skeleton .sk-legend { width: 180px; height: 14px; margin: 16px 0 10px; }
.w-skeleton .fc-day.sk-day { height: 176px; background: var(--fill); }
.widget-foot .sk-foot { width: 220px; max-width: 100%; margin: 6px 0; }
@media (max-width: 640px) {
  .w-skeleton .sk-desc { flex-basis: 100%; max-width: 60%; margin-top: 4px; }   /* the description wraps under the temperature, as the real one does */
  .widget-foot .sk-foot { margin: 14px 0; }   /* the foot is two lines on a phone */
}
/* The hero's piste mix while the details load: the bar and its legend as grey shapes of the same size (resort.css, .mix) */
.mix-wait .mix-bar { background: rgb(var(--navy-rgb) / .08); }
.mix-wait .mix-legend i { width: 72px; height: 10px; border-radius: 5px; background: rgb(var(--navy-rgb) / .08); margin: 2px 0; }
/* The weather now as a moving picture in place of the emoji, and the same weather behind the title (weather-art.js,
   weather-art.css). The band shows through the top of the body, so the body has no white cover there (and no shadow
   above the list when it's scrolled; the one at the bottom stays) */
.w-icon.art { flex: none; width: 124px; margin: -8px -8px -16px; }
.widget.conditions:has(> .widget-link > .wx-sky) .widget-body {
  background:
    linear-gradient(rgb(255 255 255 / 0), #fff 60%) bottom / 100% 24px,
    radial-gradient(farthest-side at 50% 100%, rgb(var(--navy-rgb) / .14), transparent) bottom / 100% 10px;
  background-repeat: no-repeat;
  background-attachment: local, scroll;
}

/* Ski bus and train widget (transport.js) */
.tr-na { color: var(--text); }
.tr-na + p { margin-top: 4px; }
.tr-lines { list-style: none; margin: 0; padding: 0; }
.tr-line + .tr-line { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--separator-soft); }
.tr-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; color: var(--text); font-size: 15px; }
.tr-badge { min-width: 30px; padding: 2px 7px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.tr-line.train .tr-badge, .tr-line.skitrain .tr-badge { background: var(--navy); }
.tr-line.coach .tr-badge { background: #4a5a6a; }
.tr-agency { font-size: 13px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.tr-route { margin-top: 2px !important; font-size: 13px; overflow-wrap: anywhere; }
.tr-dirs { margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 16px; }
.tr-dirs dt { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tr-dirs dd { margin: 3px 0 0; }
.tr-times { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.tr-times li { display: flex; align-items: baseline; gap: 8px; font-size: 14px; }
.tr-clock { flex: none; white-space: nowrap; }
.tr-clock strong { font-variant-numeric: tabular-nums; }
.tr-clock small { font-size: 12px; color: var(--muted); }
.tr-detail { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.tr-times li.cancelled .tr-clock strong { text-decoration: line-through; color: var(--muted); }
.tr-times li.cancelled em { font-style: normal; font-weight: 700; color: var(--severe-ink); }
.tr-none { font-size: 14px; color: var(--text); }
.widget.transport .widget-foot .grow { min-width: 0; }
/* The strip under the timetables (dashboard.js, laneHTML): a track with a station board, or a road with a bus stop, and
   the train or bus that drives in from the left, waits there and drives off to the right, every 16 seconds */
.tr-lane { --vw: 112px; position: relative; flex: none; height: 44px; margin: 6px -20px -16px; overflow: hidden; }
.tr-lane.bus { --vw: 58px; }
.tr-lane::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; border-radius: 1px; background: #a3afbf; }   /* the rail */
.tr-lane.train::before { content: ""; position: absolute; left: 0; right: 0; bottom: 1px; height: 4px; background: repeating-linear-gradient(90deg, #cdd5df 0 3px, transparent 3px 11px); }   /* sleepers */
.tr-lane.bus::after { bottom: 3px; height: 3px; background: #b9c3cf; }   /* the road */
.tr-stop { position: absolute; left: 50%; bottom: 6px; width: 28px; transform: translateX(-50%); }
.tr-lane.bus .tr-stop { width: 15px; margin-left: calc(var(--vw) / 2 + 10px); }   /* the stop beside the bus's front door */
.tr-stop svg, .tr-vehicle { display: block; height: auto; }
.tr-stop svg { width: 100%; }
.tr-post { fill: none; stroke: #8492a6; stroke-width: 2; stroke-linecap: round; }
.tr-sign { fill: var(--navy); }
.tr-lane.bus .tr-sign { fill: #f2b200; }
.tr-sign-text { fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; }
.tr-ride { position: absolute; inset: 0 0 6px; transform: translateX(calc(-50% + var(--vw) / 2)); animation: tr-ride 16s infinite; }
.tr-vehicle { position: absolute; right: 0; bottom: 0; width: var(--vw); }
.tr-body { fill: var(--navy); }
.tr-lane.bus .tr-body { fill: var(--accent); }
.tr-stripe { fill: none; stroke: #e3242b; stroke-width: 1.6; }
.tr-lane.bus .tr-stripe { stroke: rgb(255 255 255 / .6); }
.tr-joint { fill: none; stroke: #6b7a90; stroke-width: 2; }
.tr-glass { fill: #d6e8ff; }
.tr-wheel { fill: #2d3846; }
/* The ride's own box is the strip's width, with the vehicle at its right end: -100% is just off the left edge, the
   middle is -50% plus half the vehicle, and the vehicle's width plus a little is just off the right edge */
@keyframes tr-ride {
  0% { transform: translateX(-100%); animation-timing-function: cubic-bezier(.2, .6, .35, 1); }   /* slowing down */
  32% { transform: translateX(calc(-50% + var(--vw) / 2)); }
  56% { transform: translateX(calc(-50% + var(--vw) / 2)); animation-timing-function: cubic-bezier(.6, 0, .85, .45); }   /* pulling away */
  86%, 100% { transform: translateX(calc(var(--vw) + 8px)); }
}

/* SOS widget */
.w-112 { display: flex; align-items: baseline; gap: 10px; color: var(--text); }
.w-112 strong { font-size: 34px; font-weight: 800; letter-spacing: -.02em; color: var(--sos); line-height: 1; }
.w-numbers { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.w-numbers li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.w-numbers li span { color: var(--muted); }
.w-numbers li strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.w-numbers li span small { display: block; font-size: 12px; }
.w-numbers-note { margin: 6px 0 0; font-size: 12px; color: var(--muted); }   /* which resort, whose numbers, the countries' notes */
.w-numbers-head { margin: 10px 0 0; font-size: 12px; font-weight: 600; line-height: inherit; color: var(--text); }   /* the national numbers under the resort's own */

/* Reviews: the resort's Google rating and its 3 most recent reviews (dashboard.js reviewsWidget, google-reviews.js) */
/* With reviews shown the widget grows to fit all three, as Conditions does for its days */
.widget.reviews.w-has-revs { --widget-max: 720px; }
.w-rev-sum { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.w-rev-score { font-size: 26px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.w-rev-count { font-size: 13px; font-variant-numeric: tabular-nums; }
/* Google's text attribution: Roboto (or another sans-serif), weight 400, 12–16 px, #5E5E5E, never wrapped or translated */
.w-rev-attrib { margin-left: auto; font: 400 12px/1.4 Roboto, "Helvetica Neue", Arial, sans-serif; letter-spacing: normal; color: #5e5e5e; white-space: nowrap; }
.w-rev-order { margin-top: 8px !important; font-size: 12px; }
/* Stars: a grey row of five with a gold row on top, cut to the rating */
.w-stars { position: relative; display: inline-block; flex: none; font-size: 14px; line-height: 1; letter-spacing: 1px; color: rgb(var(--navy-rgb) / .18); white-space: nowrap; }
.w-stars::before { content: "★★★★★"; }
.w-stars > span { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--caution); }
.w-stars > span::before { content: "★★★★★"; }
.w-revs { list-style: none; margin: 4px 0 0; padding: 0; }
.w-rev { padding: 10px 0; }
.w-rev + .w-rev { border-top: 1px solid var(--separator-soft); }
.w-rev-author { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none; }
a.w-rev-author:hover span { text-decoration: underline; }
.w-rev-author > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-rev-avatar {
  flex: none; width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  display: grid; place-items: center; background: var(--muted); color: #fff; font-size: 13px; font-weight: 600;
}
.w-rev-rating { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; }
.w-rev-rating .w-stars { font-size: 12px; letter-spacing: .5px; }
/* Long reviews are cut to three lines here; the whole review is a tap away on Google Maps */
.widget-body .w-rev-text {
  margin-top: 6px; font-size: 14px; line-height: 1.45; color: var(--text); white-space: pre-line; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.widget-body .w-rev-meta { margin-top: 4px; font-size: 12px; }
.w-rev-meta a { color: var(--muted); }

/* Favourites widget */
.w-favs { list-style: none; margin: 0; padding: 0; }
.w-favs li { display: flex; align-items: center; gap: 4px; }
.w-favs li + li { border-top: 1px solid var(--separator-soft); }
.w-fav-pick {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  padding: 8px 6px 8px 0; border: 0; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer;
}
.w-fav-pick:hover strong { color: var(--accent); }
/* A resort's name on up to two lines (resort.css cuts it to one with "…", which in a 260 px column cut "Dolomiti Supe…") */
.w-fav-pick .rp-text strong { font-size: 15px; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; line-height: 1.2; }
.w-fav-pick .rp-text small { font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-fav-pick .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--separator); flex: none; }
/* A favourite's live status on its own line under the facts (favOpenHTML): the word carries it, in the text's colour */
.w-fav-pick .rp-text small.w-fav-open { font-weight: 600; color: var(--text); }
.w-fav-pick .rp-text small.w-fav-open[data-state="stale"] { color: var(--caution-ink); }
.w-fav-pick.mine .dot { background: var(--accent); }
.w-favs .rp-star { width: 36px; height: 36px; }
.w-favs .rp-star svg { width: 18px; height: 18px; }
.w-favs .w-fav-map { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--muted); }
.w-favs .w-fav-map:hover { background: var(--fill); color: var(--text); }
.w-favs .w-fav-map svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
/* 44 px targets for a finger round the 36 px buttons, the row no taller (iOS Safari check 2026-11-05; issue #81's list) */
.w-favs :is(.rp-star, .w-fav-map) { position: relative; }
.w-favs :is(.rp-star, .w-fav-map)::after { content: ""; position: absolute; inset: -4px; }
.w-favs .w-fav-map + .rp-star { margin-left: 4px; }   /* 8 px apart, so neither's target covers the other's */

/* Ticket and status lists */
.w-saved { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgb(31 157 85 / .12); color: #14683a; font-size: 13px; font-weight: 600; }
.w-saved svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Closures widget (alerts.js): closed pistes, off-piste and parks at the favourite resorts */
.al-badge {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 4px; vertical-align: 2px;
  border-radius: 999px; background: var(--severe); color: #fff; font-family: var(--font-text, inherit); font-size: 12px; font-weight: 700; letter-spacing: 0;
}
.al-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.al-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 12px 0 10px; border: 0; border-radius: 999px;
  background: var(--fill-2); color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.al-chip svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity var(--dur-fast) var(--ease); }
.al-chip[aria-pressed="true"] { background: rgb(var(--accent-rgb) / .12); color: var(--accent); }
.al-chip[aria-pressed="true"] svg { opacity: 1; }
.al-chip[aria-pressed="false"] { padding-left: 12px; }
.al-chip[aria-pressed="false"] svg { display: none; }
.al-chip:hover { background: var(--fill-hover); }
.al-chip:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.al-resorts { list-style: none; margin: 0; padding: 0; }
.al-resort + .al-resort { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--separator-soft); }
/* Each resort: its name and its closure count on one line, the count a button that opens the list under it (2026-11-05) */
.al-resort-head { display: flex; align-items: center; justify-content: space-between; gap: 4px 10px; min-height: 32px; }
.al-resort-head a { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-weight: 700; color: var(--text); text-decoration: none; }   /* "Verbier/La Tzoumaz/Nendaz/…" breaks at the slashes */
.al-resort-head a:hover { color: var(--accent); }
.al-count { flex: none; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.al-toggle {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px 0 12px; border: 0; border-radius: 999px;
  background: rgb(215 0 21 / .08); color: var(--severe-ink); font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.al-toggle:hover { background: rgb(215 0 21 / .14); }
.al-toggle:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.al-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--dur-fast) var(--ease); }
.al-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.al-toggle .al-new { vertical-align: 0; }
.al-meta { margin: 2px 0 0 !important; font-size: 12px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.al-meta a { color: inherit; text-decoration: underline; text-decoration-color: var(--stroke); text-underline-offset: 2px; }
.al-meta a:hover { color: var(--accent); }
.al-summary { font-weight: 600; }
.al-resort.closed .al-summary { color: var(--text); }   /* the whole resort closed: a status, not an alarm */
.al-detail { margin-top: 6px; padding-left: 10px; border-left: 2px solid rgb(215 0 21 / .18); }
.al-more { margin: 2px 0 2px 38px; font-size: 13px; font-weight: 600; }
.al-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.al-item { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; }
.al-icon { flex: none; width: 28px; height: 28px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--text); }
.al-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.al-icon.piste { background: var(--c); color: #fff; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--stroke); }
.al-icon.offpiste { background: rgb(238 125 26 / .14); color: var(--piste-offpiste); }
.al-icon.park { background: rgb(var(--navy-rgb) / .08); color: var(--navy); }
.al-icon.lift { background: rgb(var(--accent-rgb) / .12); color: var(--accent); }
.al-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.al-text strong { font-size: 15px; color: var(--text); }
.al-text small { font-size: 13px; color: var(--muted); }
.al-text .al-src { font-size: 12px; }   /* no opacity: muted 12 px text needs its full 4.5:1 */
.al-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.al-new { display: inline-block; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; vertical-align: 1px; }
.al-pill { flex: none; margin-top: 3px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.al-pill.closed { background: rgb(215 0 21 / .1); color: var(--severe-ink); }
.al-pill.advised { background: rgb(238 125 26 / .14); color: var(--caution-strong); }
.al-cover { margin: 12px 0 0 !important; padding-top: 10px; border-top: 1px solid var(--separator-soft); font-size: 12px; color: var(--muted); }
.widget.closures .widget-foot .grow { white-space: nowrap; }
.widget.closures .widget-foot .link-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.widget.closures .widget-foot svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Motion (dashboard.js, "Motion") ---------- */
/* Now and then each widget's icon makes a small movement of its own, at its own pace, and again when the widget is
   pointed at or focused (on the wrapper .wi, so the two don't fight). The movement is at the end of each loop, so a loop
   that starts again begins still. The loops are named wi-* so the page keeps them on its clock (dashboard.js). */
.widget { --gesture: none; --every: 14s; }
.widget.directions { --gesture: wi-sway; --every: 13s; }
.widget.sos { --gesture: wi-spin; --every: 17s; }
.widget.favourites { --gesture: wi-pop; --every: 11s; }
.widget.reviews { --gesture: wi-pop; --every: 15s; }
.widget.friends { --gesture: wi-hop; --every: 12s; }
.widget.offline { --gesture: wi-dip; --every: 14s; }
.widget.tickets { --gesture: wi-wiggle; --every: 16s; }
.widget.closures { --gesture: wi-shake; --every: 19s; }
.widget-icon .wi { display: grid; place-items: center; }
.widget-icon svg { animation: var(--gesture) var(--every) var(--ease) infinite; }
.widget:is(:hover, :focus-within) .widget-icon .wi { animation: var(--gesture) 10s var(--ease) -9.2s 1; }
.widget.directions .widget-icon :is(.wi, svg) { transform-origin: 50% 85%; }   /* the signpost sways from its foot */
@keyframes wi-sway { 0%, 92%, 100% { transform: none; } 94.5% { transform: rotate(-12deg); } 97% { transform: rotate(8deg); } 98.8% { transform: rotate(-3deg); } }
@keyframes wi-spin { 0%, 92% { transform: none; } 100% { transform: rotate(180deg); } }   /* the lifebuoy looks the same half way round */
@keyframes wi-pop { 0%, 92%, 100% { transform: none; } 95% { transform: scale(1.25) rotate(-14deg); } 97.5% { transform: scale(.94) rotate(4deg); } }
@keyframes wi-hop { 0%, 92%, 100% { transform: none; } 94.5% { transform: translateY(-4px); } 96.5% { transform: none; } 98.2% { transform: translateY(-2px); } }
@keyframes wi-dip { 0%, 92%, 100% { transform: none; } 95.5% { transform: translateY(3px); } 98% { transform: translateY(-1px); } }
@keyframes wi-wiggle { 0%, 92%, 100% { transform: none; } 94% { transform: rotate(-10deg); } 96% { transform: rotate(9deg); } 98% { transform: rotate(-4deg); } }
@keyframes wi-shake { 0%, 92%, 100% { transform: none; } 93.5% { transform: translateX(-2.5px); } 95% { transform: translateX(2.5px); } 96.5% { transform: translateX(-1.5px); } 98% { transform: translateX(1px); } }
/* Out of sight: paused (dashboard.js watches which widgets, and the My skiing card, are on screen) */
:is(.widget, .ski-card).off-screen *, :is(.widget, .ski-card).off-screen *::before, :is(.widget, .ski-card).off-screen *::after { animation-play-state: paused !important; }
/* Still: the device asks for less motion, or Settings › Animations on Home is off (the weather's own rules are in
   weather-art.css); the train waits at the station */
.dash-still .widget-icon :is(.wi, svg), .dash-still .tr-ride { animation: none !important; }

/* ---------- Editing the widgets (dashboard-edit.js) ---------- */
/* No text selection or link preview on a long press, which starts editing */
@media (pointer: coarse) { .widget { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; } }
.dash-edit-row { display: flex; justify-content: center; margin-top: 20px; }
.dash-edit-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; }
.dash-edit-btn:hover { background: var(--fill); text-decoration: none; }
.dash-edit-btn svg, .dash-editbar svg, .widget-remove svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.dash-grid.editing .widget { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: grab; touch-action: manipulation; }
.dash-grid.editing .widget { animation: widget-jiggle .3s ease-in-out infinite alternate; }
.dash-grid.editing .widget:nth-child(2n) { animation-duration: .34s; animation-direction: alternate-reverse; }
.dash-grid.editing .widget.wide { animation-name: widget-jiggle-wide; }
@keyframes widget-jiggle { from { transform: rotate(-.5deg); } to { transform: rotate(.5deg); } }
@keyframes widget-jiggle-wide { from { transform: rotate(-.2deg); } to { transform: rotate(.2deg); } }
.dash-grid.editing .widget:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
/* Held: sinks a little while the long press counts down (not on a quick tap) */
.widget.pressing, .widget.pressing:has(.widget-link[href]:hover) { transform: scale(.975); transition: transform .35s var(--ease) .1s; }
/* The minus button on each widget, at its top-left corner */
.widget-remove {
  position: absolute; top: -9px; left: -9px; z-index: 2;
  width: 30px; height: 30px; padding: 0; border: 2px solid #fff; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--muted); color: #fff; cursor: pointer;
  box-shadow: 0 2px 6px rgb(var(--navy-rgb) / .25);
  animation: widget-remove-in var(--dur-fast) var(--ease-out);
}
/* A 44 px target from inside its 2 px border (inset -8 made 42), 46 wide: 9 px to the left, so on a phone's 16 px
   gutter it ends at the screen's edge and not 1 px past it, and 11 to the right, reaching 30 px in from the corner where
   the handle's area starts. The jiggle swings the corner about 1.5 px, so at the edge it keeps 44 in view (iOS Safari
   2026-11-08: 43) */
.widget-remove::before { content: ""; position: absolute; inset: -10px -11px -8px -9px; }
.widget-remove:hover { background: var(--destructive); }
.widget-remove:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
@keyframes widget-remove-in { from { transform: scale(.4); opacity: 0; } }
/* While arranging, each widget's toolbar: the handle (drag it, or Space to pick up with the keyboard), its place, Move up, Move down */
.widget-tools {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 4px;
  padding: 6px 8px 0 34px; animation: widget-remove-in var(--dur-fast) var(--ease-out);
}
.widget-tools button {
  position: relative; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px;
  display: grid; place-items: center; background: rgb(var(--navy-rgb) / .06); color: var(--text); cursor: pointer;
}
.widget-tools button::before { content: ""; position: absolute; inset: -4px; }   /* a 44 px target */
/* ...whole: the two move buttons 8 px apart, and the row starting past the − button's own target (30 px in from the
   widget's corner), which covered the handle's corner (iOS Safari check 2026-11-05) */
.widget-tools .widget-move + .widget-move { margin-left: 4px; }
.widget-tools button:hover:not(:disabled) { background: rgb(var(--accent-rgb) / .14); color: var(--accent); }
.widget-tools button:disabled { opacity: .35; cursor: default; }
.widget-tools button:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.widget-tools svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.widget-handle { cursor: grab !important; touch-action: none; }   /* a finger on the handle drags at once, and doesn't scroll */
.widget-handle svg { fill: currentColor; stroke: none; }
.widget-pos { flex: 1; font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Picked up with the keyboard: still and outlined, the handle pressed */
.dash-grid.editing .widget.picked { animation: none; box-shadow: 0 0 0 3px var(--accent), 0 12px 32px rgb(var(--navy-rgb) / .18); }
.widget.picked .widget-handle { background: var(--accent); color: var(--on-accent); }
/* How to arrange, and where the layout is kept */
.dash-arrange-help { margin: 0 0 14px; padding: 12px 16px; border-radius: var(--radius-sm); background: rgb(var(--accent-rgb) / .07); font-size: 14px; color: var(--text); }
.dash-arrange-help p { margin: 0; }
.dash-arrange-help .dash-arrange-where { margin-top: 4px; color: var(--muted); }
/* While dragged: lifted above the page; the gap it leaves shows where it will land */
.widget.dragging { animation: none !important; cursor: grabbing; box-shadow: 0 18px 44px rgb(var(--navy-rgb) / .24), 0 2px 8px rgb(var(--navy-rgb) / .12); opacity: .96; transition: box-shadow var(--dur-fast) var(--ease); }
.widget-placeholder { min-height: 120px; border-radius: var(--radius-lg); border: 2px dashed rgb(var(--accent-rgb) / .45); background: rgb(var(--accent-rgb) / .05); }
.widget-placeholder.wide { grid-column: span 2; }
body.dash-dragging { cursor: grabbing; -webkit-user-select: none; user-select: none; }
.widget.just-added { animation: widget-added .9s var(--ease-out) !important; }
@keyframes widget-added { 0% { box-shadow: 0 0 0 0 rgb(var(--accent-rgb) / .5); } 100% { box-shadow: 0 0 0 14px rgb(var(--accent-rgb) / 0); } }

/* The bar at the bottom while editing: what to do, Add widget and Done */
.dash-editbar {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  width: max-content; max-width: calc(100vw - 2 * var(--gutter));
  padding: 8px 8px 8px 18px; border-radius: 999px;
  background: var(--glass-solid); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow), 0 0 0 1px var(--separator);
  animation: editbar-in var(--dur) var(--ease-out);
}
.dash-editbar p { margin: 0 6px 0 0; font-size: 14px; color: var(--muted); }
.dash-editbar .dbtn { position: relative; height: 40px; padding: 0 16px; border-radius: 999px; }
.dash-editbar .dbtn::after { content: ""; position: absolute; inset: -2px 0; }   /* 44 px tall for a finger, the bar no bigger */
.dash-editbar .dbtn:disabled { opacity: .45; cursor: default; }
@keyframes editbar-in { from { opacity: 0; transform: translate(-50%, 16px); } }
body.dash-editing .dash { padding-bottom: 120px; }
.dash-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Add widget: the widgets not on the page (a dialog styled like the resort picker, resort.css) */
.dash-add .rp-body { padding-bottom: 4px; }
.dash-add .rp-row { cursor: default; }
.dash-add .rp-row:hover { background: none; }
.dash-add .rp-icon-circle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dash-add .rp-text { flex: 1; }
.dash-add .rp-text small { white-space: normal !important; }
.dash-add .add-btn { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 14px; flex: none; }
.dash-add .add-empty { margin: 8px 12px 12px; color: var(--muted); }
.dash-add-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 20px 16px; border-top: 1px solid var(--separator-soft); font-size: 14px; }
.dash-add-foot .link-btn { font-size: 14px; }

/* ---------- My skiing: record, pause and end a ski day (dashboard-skiing.js) ---------- */
.ski-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px 18px 16px;
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgb(var(--navy-rgb) / .08), 0 6px 20px rgb(var(--navy-rgb) / .06);
  font-variant-numeric: tabular-nums;
}
.ski-card-head { display: flex; align-items: center; gap: 10px; }
.ski-card-icon { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgb(var(--sos-rgb) / .1); color: var(--sos); }
.ski-card-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ski-card h2 { flex: 1; margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: var(--tracking-title); color: var(--text); }
.ski-card-more { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
/* Small text links get a tap area of about 44 px on phones and touch screens without moving anything (D-8) */
@media (max-width: 600px), (pointer: coarse) {
  .ski-card-more, .widget-foot a, .widget-foot .link-btn, .dash-add-foot .link-btn, .al-toggle, .al-more { position: relative; }
  .ski-card-more::after, .widget-foot a::after, .widget-foot .link-btn::after, .dash-add-foot .link-btn::after, .al-toggle::after, .al-more::after {
    content: ""; position: absolute; inset: -12px -6px;
  }
  .ski-card-more::after, .widget-foot a::after, .widget-foot .link-btn::after, .dash-add-foot .link-btn::after { inset: -14px -6px; }   /* 44 px over a 16 px line of small text */
  /* and the weather and open-now chips under the resort's name and "Edit widgets", which were under 44 px, grow to it */
  .hero-now, .hero-open { min-height: 44px; }
  .dash-edit-btn { height: 44px; }
  /* Edit mode's handle 2 px clear of the − button's area, which it only met at 34 px: under a finger the jiggle's tilt
     took it to 43.9 (iOS Safari 2026-11-08); a tile's own padding is below */
  .widget-tools { padding-left: 36px; }
  /* Closures (2026-11-05, after the phone audit; measured in iOS Safari 2026-11-08): the filter chips stay 30 px and
     reach 44 through rows 14 px apart, the areas meeting and not overlapping; each resort's line is 44 px tall, its name
     filling it, and the count's area keeps inside the line, clear of the source line under it */
  .al-filters { row-gap: 14px; padding-top: 5px; }   /* 5 px down from the body's 2 px top, which scrolls and clipped the first row's areas */
  .al-chip { position: relative; }
  .al-chip::after { content: ""; position: absolute; inset: -7px -3px; }
  .al-resort-head { min-height: 44px; }
  .al-resort-head a { align-self: stretch; display: flex; align-items: center; }
  .al-toggle::after { inset: -7px -6px; }
}
.ski-card-more svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ski-card-body p { margin: 0; }
.ski-card-lead { font-size: 14px; line-height: 1.45; color: var(--muted); }
.ski-card-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0; }
.ski-card-stats.live { grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.ski-card-stats div { min-width: 0; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--fill); }
.ski-card-stats.live div { padding: 6px 8px; }
.ski-card-stats dt { font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ski-card-stats.live dt { font-size: 10px; }
.ski-card-stats dd { margin: 1px 0 0; font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ski-card-stats.live dd { font-size: 14px; }
.ski-card-last, .ski-card-saved { margin-top: 10px !important; font-size: 13px; color: var(--muted); }
.ski-card-vnote { margin-top: 6px !important; font-size: 12px; color: var(--muted); }   /* what "–" or "*" under Vertical means (tracking.js fmt.verticalNote) */
.ski-card-saved { margin: 0 0 10px !important; padding: 8px 10px; border-radius: var(--radius-sm); background: rgb(var(--navy-rgb) / .04); }
.ski-card-last strong, .ski-card-saved strong { color: var(--text); }
.ski-card-status { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ski-card-status[data-gps="poor"] { color: var(--caution-strong); }
.ski-card-status span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ski-card-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--sos); animation: ski-pulse 1.6s var(--ease) infinite; }
.ski-card[data-state="paused"] .ski-card-dot { background: var(--paused); animation: none; }
.ski-card-speed { display: flex; align-items: baseline; gap: 5px; margin-top: 2px !important; font-family: var(--font-display); }
.ski-card-speed strong { font-size: 44px; font-weight: 700; line-height: 1.05; letter-spacing: -.02em; color: var(--text); }
.ski-card-speed small { font-size: 15px; font-weight: 500; color: var(--muted); }
.ski-card-on { display: flex; align-items: center; gap: 7px; margin-top: 8px !important; font-size: 13px; color: var(--muted); }
.ski-card-on strong { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The piste's colour in the European shapes too, so it isn't told by colour alone: green circle, blue square,
   red diamond, black hexagon (as the trail map's badges) */
.ski-card-piste { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--piste-unknown); }
.ski-card-piste.green { background: var(--piste-green); }
.ski-card-piste.blue { background: var(--piste-blue); border-radius: 1px; }
.ski-card-piste.red { width: 9px; height: 9px; margin: 0 1px; background: var(--piste-red); border-radius: 1px; transform: rotate(45deg); }
.ski-card-piste.black { width: 11px; height: 11px; background: var(--piste-black); border-radius: 0; clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); }
.ski-card-piste.offpiste { background: var(--piste-offpiste); }
.ski-card-piste.lift { background: var(--lift); border-radius: 2px; }

.ski-card-actions { display: flex; gap: 8px; }
.ski-rec, .ski-end-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 16px;
  border: 0; border-radius: 14px;
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease-out);
}
.ski-rec:active, .ski-end-btn:active { transform: scale(.97); }
.ski-rec { flex: 1; min-width: 0; background: var(--sos); color: #fff; }
.ski-rec:hover { background: var(--sos-dark); }
.ski-rec span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ski-rec svg, .ski-end-btn svg { width: 18px; height: 18px; flex: none; fill: currentColor; }
.ski-rec[data-state="recording"] svg { animation: ski-pulse 1.6s var(--ease) infinite; transform-origin: center; }
.ski-rec[data-state="paused"] { background: var(--paused); }
.ski-rec[data-state="paused"]:hover { background: var(--caution-strong); }
.ski-end-btn { flex: none; background: var(--fill-2); color: var(--text); }
.ski-end-btn:hover { background: var(--fill-hover); }
.ski-end-btn svg { width: 15px; height: 15px; }
.ski-card-note { margin: -4px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
/* Empty, it takes no room but stays in the page: a live region that's display: none is often not read out once filled */
.ski-card-note:empty { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); }
@keyframes ski-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.72); opacity: .55; } }

/* Ending a recording asks first */
.ski-end {
  width: min(400px, calc(100% - 32px));
  padding: 0; border: 0;
  background: var(--glass-solid); color: var(--text);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sheet);
  font-family: var(--font);
}
.ski-end::backdrop { background: rgb(var(--navy-rgb) / .35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.ski-end form { padding: var(--space-5); }
.ski-end h2 { margin: 0; font-family: var(--font-display); font-size: var(--text-title); letter-spacing: var(--tracking-title); }
.ski-end p { margin: 8px 0 0; font-size: 15px; line-height: 1.45; color: var(--muted); }
.ski-end p strong { color: var(--text); }
.ski-end-actions { display: flex; gap: 8px; margin-top: var(--space-5); }
.ski-end-actions .dbtn { flex: 1; }
.dbtn.danger { background: var(--sos); color: #fff; }
.dbtn.danger:hover { background: var(--sos-dark); }

@media (max-width: 900px) {
  .dash-top { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "alerts" "ski"; gap: 20px; }
  .dash-top:has(> .dash-alerts[hidden]) { grid-template-areas: "hero" "ski"; }
  .ski-card { max-width: 560px; }
}

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  .dash-top { padding: 24px 0 20px; }
  .ski-card { padding: 16px 14px 14px; }
  .ski-rec { padding: 0 12px; gap: 6px; font-size: 14px; }
  .ski-end-btn { padding: 0 14px; gap: 6px; }
  .widget { min-height: 0; }
  .widget.conditions { --widget-max: 760px; }   /* the weather now, the stats two by two and the seven days, without scrolling inside */
  .dash-editbar { width: calc(100vw - 2 * var(--gutter)); }
  .dash-editbar { justify-content: space-between; padding-left: 8px; }
  .dash-editbar p { display: none; }   /* the help above the widgets says it */
  .dash-editbar .dbtn { padding: 0 12px; gap: 6px; }
  .dash-alert { flex-wrap: wrap; padding: 10px 12px 10px 10px; }
  .dash-alert-text { flex-basis: calc(100% - 48px); }
  .dash-alert-act { margin-left: 48px; }
  .w-temp { font-size: 38px; }
}

/* ---------- Phones: tiles two by two, lists at one height (owner's request 2026-10-27) ----------
   The short widgets that open a part of the app are tiles, two to a row and the same height as each other; a tile
   with no tile beside it (the one before or after is a wide card) takes the whole row and its usual look, since the
   tile look comes from its width (@container). Lists (favourites, closures, reviews, timetables) are wide cards of one
   height that scroll inside, kept to just over half the screen so there's always page to grab around them. */
@media (max-width: 640px) {
  .dash-grid { display: flex; flex-wrap: wrap; gap: 12px; --widget-max: min(400px, 56svh); }
  .dash-grid > :is(.widget, .widget-placeholder) { flex: 1 1 100%; }
  .dash-grid > .widget:is(.directions, .sos, .friends, .offline, .tickets, .reviews:not(.w-has-revs), .transport:not(.wide)),
  .dash-grid > .widget-placeholder.tile { flex: 1 1 calc(50% - 6px); }
  .dash-grid > .widget { container: widget / inline-size; }
  .widget.reviews.w-has-revs { --widget-max: min(400px, 56svh); }
}
@container widget (max-width: 280px) {
  .widget-link { padding: 14px 14px 12px; }
  .widget header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .widget-icon { width: 34px; height: 34px; border-radius: 11px; }
  .widget h2 { font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; hyphens: auto; }
  .widget-cta { white-space: normal; }
  .widget-body { margin: 8px -14px 0; padding: 2px 14px; font-size: 14px; line-height: 1.4; }
  /* A tile's description is cut to four lines (the part it opens says the rest); read out whole */
  .widget-body > p:first-child:not(.tr-na) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
  .widget-mark { display: none; }
  .ha-lane { height: auto; aspect-ratio: 13 / 3; margin: 6px -14px -12px; }   /* the scene's middle, whole, at the tile's width */
  .ha-lane.ha-chairlift { aspect-ratio: 65 / 16; }
  .widget-foot { flex-wrap: wrap; gap: 2px 10px; padding: 8px 14px 10px; font-size: 12px; line-height: 1.35; }
  /* A note beside a link takes a line of its own, not one word a line beside it (Reviews' "Written by Google users…") */
  .widget-foot .grow { flex-basis: 100%; }
  .w-112 { flex-direction: column; gap: 2px; }
  .w-112 span { font-size: 13px; line-height: 1.3; }
  .w-numbers li { flex-direction: column; gap: 0; font-size: 13px; }
  /* Three 44 px targets, the − button's (30 px in from the corner) and, on a tile at the right, its − button's reaching 4 px
     over the gap: no room left for "2 / 9" in a tile's 179 px, so it goes (it's aria-hidden; where a widget is shows).
     13 px at the right keeps a left tile's Move down 3 px clear of the right tile's − area while the two jiggle in
     opposite phases (iOS Safari 2026-11-08: at 11 px they met for a moment) */
  .widget-tools { padding: 6px 13px 0 36px; }
  .widget-tools button { width: 32px; height: 32px; }
  .widget-tools button::before { inset: -6px; }
  .widget-tools .widget-move + .widget-move { margin-left: 8px; }
  .widget-pos { min-width: 0; overflow: hidden; visibility: hidden; }
}
/* ...and a tile under 169 px (phones about 375 px wide, as the iPhone SE and mini): the three 44 px targets don't fit
   beside the − button's (30 px in, 27 down), so the row goes under it, the handle at the left edge and the arrows at the
   right (Chrome at 375×667, 2026-11-08: Move up's area cut the handle's to 40 px) */
@container widget (width < 169px) {
  .widget-tools { padding: 33px 6px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .widget, .dbtn, .ski-rec, .ski-end-btn { transition: none; }
  .ski-card-dot, .ski-rec[data-state="recording"] svg { animation: none; }
  .dash-grid.editing .widget { animation: none; outline: 2px dashed rgb(var(--accent-rgb) / .35); outline-offset: 3px; }
  .widget-remove, .widget-tools, .dash-editbar, .widget.just-added { animation: none !important; }
  .widget:has(.widget-link[href]:hover) { transform: none; }
}
