:root {
  --bg: #f2f1ed;
  --surface: #ffffff;
  --ink: #16181d;
  --ink-2: #5b606b;
  --line: #e2e0da;
  --chip: #ecebe6;

  --dry: #17945a;
  --damp: #e0ad12;
  --puddles: #e2681a;
  --wet: #d13b3b;
  --none: #3d424c;
  --rain: #3b7fd9;
  /* The ground's colour behind white text (status card, badges, Send): a shade deeper where the dots'
     colour doesn't reach 4.5:1 with white (dry 3.9, puddles 3.4). Same values as the map (map.css). */
  --dry-solid: #15834f;
  --puddles-solid: #bf500e;
  /* The ground's colour as text on the page (badges on a light tint): >= 4.5:1, as the map's --mp-t-*. */
  --t-dry: #0f6a3f; --t-damp: #6b5200; --t-puddles: #9a3f0a; --t-wet: #a52a2a;

  --radius: 20px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
  --scheme: light; /* scroll bars (see .w-hours) */
  /* theme-dependent details, as variables so a [data-theme] subtree (the iPhone wave) gets its own */
  --logo-ring: none;
  --cloud-1: 13%; --cloud-2: 24%; --cloud-3: 40%; --cloud-filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / .14));
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111317;
    --surface: #1b1e24;
    --ink: #f1f2f4;
    --ink-2: #9aa0ab;
    --line: #2a2e36;
    --chip: #242831;
    --none: #2b2f37;
    color-scheme: dark;
    --scheme: dark;
    --t-dry: color-mix(in srgb, var(--dry) 72%, var(--ink)); --t-damp: color-mix(in srgb, var(--damp) 72%, var(--ink)); --t-puddles: color-mix(in srgb, var(--puddles) 72%, var(--ink)); --t-wet: color-mix(in srgb, var(--wet) 72%, var(--ink));
    --logo-ring: 0 0 0 1.5px rgba(255,255,255,.28); --cloud-1: 38%; --cloud-2: 24%; --cloud-3: 22%; --cloud-filter: none;
  }
}
/* Chosen theme. Not only on <html>: the iPhone theme wave (theme.js) shows a copy of the page in the
   new theme, so any element with data-theme gets that theme's colours for everything inside it. */
[data-theme="dark"] {
  --bg: #111317; --surface: #1b1e24; --ink: #f1f2f4; --ink-2: #9aa0ab;
  --line: #2a2e36; --chip: #242831; --none: #2b2f37; color-scheme: dark; --scheme: dark;
  --t-dry: color-mix(in srgb, var(--dry) 72%, var(--ink)); --t-damp: color-mix(in srgb, var(--damp) 72%, var(--ink)); --t-puddles: color-mix(in srgb, var(--puddles) 72%, var(--ink)); --t-wet: color-mix(in srgb, var(--wet) 72%, var(--ink));
  --logo-ring: 0 0 0 1.5px rgba(255,255,255,.28); --cloud-1: 38%; --cloud-2: 24%; --cloud-3: 22%; --cloud-filter: none;
}
[data-theme="light"] {
  --bg: #f2f1ed; --surface: #ffffff; --ink: #16181d; --ink-2: #5b606b;
  --line: #e2e0da; --chip: #ecebe6; --none: #3d424c; color-scheme: light; --scheme: light;
  --t-dry: #0f6a3f; --t-damp: #6b5200; --t-puddles: #9a3f0a; --t-wet: #a52a2a;
  --logo-ring: none; --cloud-1: 13%; --cloud-2: 24%; --cloud-3: 40%; --cloud-filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / .14));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); } /* the canvas (overscroll, theme transition) always matches the theme */
body {
  margin: 0;
  /* At least the screen's height, so the page background (not the bare canvas) fills a tall screen. */
  min-height: 100vh; min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
           calc(28px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  /* Phones: one column in reading order (the two column wrappers dissolve). */
  display: flex; flex-direction: column;
}
.col-main, .col-side { display: contents; }
/* Phones: the card and what it points to (a dry spot nearby, the squeegee call), then the report, so
   "Como está o chão agora?" is on the first screen; then weather, spots nearby, history. Wet here: the
   spots nearby come up to right under the report (.near-up; the dry one nearby is already under the card).
   Etiquette: a one-line teaser under the report on a first visit, at the bottom for those who've been
   here before (html[data-back], index.html). */
.top { order: 0; } .status, .sq, .near-dry { order: 1; } .report, .closed-note { order: 2; } #etiquette { order: 3; }
.nearby.near-up { order: 4; } .weather { order: 5; } .nearby { order: 6; } .history { order: 7; }
html[data-back] #etiquette { order: 8; } .etq { order: 9; } .foot { order: 10; }

/* Small tablets: a bit wider single column. */
@media (min-width: 600px) { .wrap { max-width: 560px; } }

/* Tablets landscape / desktop, and phones held sideways: status, report, etiquette and the
   home-screen guide on the left; weather and history on the right (columns of similar height). */
@media (min-width: 900px), (orientation: landscape) and (min-width: 640px) {
  .wrap {
    max-width: 1080px; display: grid; column-gap: 32px; align-items: start;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    padding-top: max(24px, env(safe-area-inset-top));
  }
  .top, .foot { grid-column: 1 / -1; }
  .col-main, .col-side { display: block; min-width: 0; }
  .col-side > :first-child { margin-top: 0; }
  .col-side .history h2 { margin-top: 24px; }
  .gallery-item { flex-basis: 62%; }
}


/* ---------- Header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
/* With the way back to the map (every spot page; in the tutorial it only says where it goes): "‹ Mapa" and the buttons on one row,
   the spot's name under them with the whole width to itself (long names don't get cut on phones). */
.top:not(.no-map) { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "back actions" "brand brand"; align-items: center; row-gap: 12px; }
.top:not(.no-map) .map-back { grid-area: back; }
.top:not(.no-map) .top-actions { grid-area: actions; }
.top:not(.no-map) .brand { grid-area: brand; font-size: 22px; letter-spacing: -.015em; line-height: 1.2; }
.top:not(.no-map) .brand span:last-child { white-space: normal; text-wrap: balance; } /* long names: two lines, not cut */
.map-back {
  justify-self: start; display: inline-flex; align-items: center; gap: 2px; min-height: 36px; padding: 0 14px 0 7px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 700; text-decoration: none; -webkit-tap-highlight-color: transparent;
  transition: transform .12s var(--ease-out), border-color .18s var(--ease-out);
}
.map-back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .map-back:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); } }
.map-back:active { transform: scale(var(--press)); }
.map-back:focus-visible { outline: 3px solid color-mix(in srgb, var(--ink) 40%, transparent); outline-offset: 2px; }
[dir="rtl"] .map-back svg { transform: scaleX(-1); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; min-width: 0; }
.brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Amigos do PdG circle badge (logo contest winner). Thin ring so the black badge reads on dark mode. */
.logo { flex: none; width: 32px; height: 32px; border-radius: 50%; display: block; box-shadow: var(--logo-ring); }
.lang {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 6px 10px; font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.lang svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lang .chev { width: 14px; height: 14px; stroke-width: 2.2; color: var(--ink-2); }
@media (hover: hover) { .lang:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); } }
.lang:focus-visible { outline: 3px solid color-mix(in srgb, var(--ink) 40%, transparent); outline-offset: 2px; }

/* ---------- Status card ---------- */
.status {
  --c: var(--none);
  background: var(--c);
  color: #fff;
  border-radius: var(--radius);
  --pad-x: 22px; /* the photo strip bleeds to the card edges by exactly this */
  padding: 22px var(--pad-x) 20px;
  transition: background-color .5s var(--ease-in-out);
}
.status[data-cond="dry"] { --c: var(--dry-solid); }
.status[data-cond="damp"] { --c: var(--damp); color: #241b00; }
.status[data-cond="puddles"] { --c: var(--puddles-solid); }
.status[data-cond="wet"] { --c: var(--wet); }
/* The call to squeegee (app.js renderSqueegee), right under the card: a plain card with the condition's
   colour on the icon and a stripe at the start edge, so it reads as "about the card above". */
.sq {
  --c: var(--puddles);
  margin-top: 12px; padding: 12px 16px 13px; display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  border-inline-start: 4px solid var(--c);
}
.sq[data-cond="wet"] { --c: var(--wet); }
.sq-icon { flex: none; width: 26px; height: 26px; margin-top: 1px; fill: none; stroke: var(--c); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sq-icon .sq-head { fill: color-mix(in srgb, var(--c) 18%, transparent); }
.sq-icon .sq-drop { fill: var(--c); stroke: none; opacity: .75; }
.sq-text { min-width: 0; }
.sq-title { margin: 0 0 2px; font-size: 16px; font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; }
.sq-text p { margin: 0; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
/* The squeegee sweeps once when the call appears (not on refreshes). */
.sq.m-in { animation: sq-in .42s var(--ease-out) both; }
.sq.m-in .sq-icon { animation: sq-sweep .9s var(--ease-in-out) .15s both; }
@keyframes sq-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes sq-sweep { 0% { transform: translateX(0); } 35% { transform: translateX(-3px) rotate(-6deg); } 70% { transform: translateX(3px) rotate(5deg); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .sq.m-in, .sq.m-in .sq-icon { animation: none; } }

/* The estimate in its own colour: a badge under a recent report it disagrees with (white ring so it
   stands apart from the card's colour). */
.est-badge {
  --bc: var(--none);
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px 6px 10px; border-radius: 999px;
  background: var(--bc); color: #fff; font-size: 15.5px; font-weight: 700; line-height: 1.3;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .75), 0 2px 10px rgba(0, 0, 0, .18);
}
.est-badge::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
/* The report, second when the estimate leads: a box of its own in the report's colour, inside the
   card, with what it said and when, its tags, note and photos. When the report leads, the box is
   just its contents (no box). */
.status-rep { display: contents; --rc: var(--none); }
.status[data-lead="estimate"] .status-rep {
  --pad-x: 14px; /* the photo strip bleeds to the box's edges */
  display: block; margin-top: 16px; padding: 12px var(--pad-x) 14px; border-radius: 16px;
  background: var(--rc); color: #fff;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .4), 0 6px 18px rgb(0 0 0 / .16);
  transition: background-color .5s var(--ease-in-out), color .5s var(--ease-in-out);
}
.status[data-lead="estimate"] .status-rep[hidden] { display: none; }
.status[data-lead="estimate"] .status-rep > .meta { margin-top: 0; }
.status-rep[data-cond="dry"] { --rc: var(--dry-solid); }
.status-rep[data-cond="damp"] { --rc: var(--damp); }
.status[data-lead="estimate"] .status-rep[data-cond="damp"] { color: #241b00; }
.status-rep[data-cond="puddles"] { --rc: var(--puddles-solid); }
.status-rep[data-cond="wet"] { --rc: var(--wet); }
.status-report { display: inline-flex; align-items: baseline; gap: 6px; margin-right: 4px; font-size: 15px; font-weight: 600; }
.status-report > b { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.status-report > span { font-weight: 500; }
.meta { align-items: center; }
.est-badge[data-cond="dry"] { --bc: var(--dry-solid); }
.est-badge[data-cond="damp"] { --bc: var(--damp); }
.est-badge[data-cond="damp"] { color: #241b00; }
.est-badge[data-cond="puddles"] { --bc: var(--puddles-solid); }
.est-badge[data-cond="wet"] { --bc: var(--wet); }

.kicker { margin: 0; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.status h1 { margin: 6px 0 12px; font-size: clamp(44px, 14vw, 60px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 800; }
.verdict { margin: 0; font-size: 18px; font-weight: 600; }
/* Dry here: how long it stays dry (app.js renderUntil), a quieter line under the verdict. */
.until { margin: 8px 0 0; font-size: 15px; line-height: 1.35; font-weight: 600; opacity: .9; text-wrap: pretty; }
.until[hidden] { display: none; }
.meta { margin: 12px 0 0; font-size: 14px; }
.meta:empty { display: none; }
.status-media:empty { display: none; }
.status-media { margin-top: 14px; }
.status-note { margin: 0 0 10px; font-size: 15px; font-style: italic; }

/* Gallery inside the status card: one = full width, several = swipe strip */
.gallery {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 calc(-1 * var(--pad-x)); padding: 0 var(--pad-x); scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery-item {
  position: relative; flex: 0 0 78%; scroll-snap-align: start; scroll-margin-left: var(--pad-x);
  padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: rgba(0,0,0,.15); aspect-ratio: 4 / 3;
}
.gallery.is-single .gallery-item { flex-basis: 100%; }
.gallery-media { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Weather ---------- */
.weather {
  margin-top: 12px; padding: 16px 18px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px;
}
.w-head { display: flex; align-items: center; gap: 12px; }
.w-icon { font-size: 34px; line-height: 1; }
.w-main p { margin: 0; }
.w-kicker { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.w-now { font-size: 17px; }
.w-now strong { font-size: 24px; letter-spacing: -0.02em; margin-inline-end: 4px; }
.w-details, .w-rain { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); }
.w-rain { color: var(--ink); }
.w-hint {
  margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 600;
  background: color-mix(in srgb, var(--rain) 14%, var(--surface)); color: var(--ink);
}
.w-next { margin-top: 12px; }
.w-label { margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.w-next-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.w-next-head .w-label { margin: 0; }
.w-unit { display: inline-flex; padding: 2px; gap: 2px; border-radius: 999px; background: var(--chip); flex: none; }
.w-unit button {
  min-width: 40px; min-height: 30px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent;
  color: var(--ink-2); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.w-unit button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .14); }
.w-unit button:focus-visible { outline: 3px solid color-mix(in srgb, var(--ink) 40%, transparent); outline-offset: 1px; }
/* 48 fixed-width hours that scroll sideways; the right edge fades to show there's more. */
.w-hours {
  list-style: none; margin: 0; padding: 0 0 6px;
  display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin;
  /* The scroll bar's colour follows color-scheme; through --scheme it switches with the text during the
     theme fade instead of at the tap (it flipped before the card behind it had changed). */
  color-scheme: var(--scheme);
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
          mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}
.w-hours > li { flex: 0 0 40px; }
/* Past hours (left of "now"): same bars, quieter, so the future stays the focus. */
.w-hours > li.w-past { opacity: .62; }
/* "Now": a thin line between the past and the next hours, with a small label on top. */
.w-hours > li.w-now { position: relative; margin-left: 9px; }
.w-hours > li.w-now::before {
  content: ""; position: absolute; left: -8px; top: 0; bottom: 0; width: 2px; border-radius: 1px;
  background: color-mix(in srgb, var(--ink) 30%, transparent);
}
.w-hours > li.w-day { flex-basis: auto; min-width: 40px; } /* weekday names ("terça", "Tue") may be wider than an hour column */
.w-day time { font-weight: 800; color: var(--ink); text-transform: capitalize; }
.w-hour { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; font-variant-numeric: tabular-nums; }
.w-bar { position: relative; width: 100%; height: 34px; border-radius: 6px; background: var(--chip); overflow: hidden; }
.w-bar span { position: absolute; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--rain) 35%, var(--chip)); }
.w-hour[data-level="mid"] .w-bar span { background: color-mix(in srgb, var(--rain) 65%, var(--chip)); }
.w-hour[data-level="high"] .w-bar span { background: var(--rain); }
.w-pct { font-weight: 600; }
.w-hour time { color: var(--ink-2); }
.w-src { margin: 10px 0 0; font-size: 11px; text-align: right; }
.w-src a { color: var(--ink-2); }

/* ---------- Skatepark etiquette ---------- */
.etq { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.etq summary {
  list-style: none; cursor: pointer; padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
}
.etq summary::-webkit-details-marker { display: none; }
/* + that morphs into - (the vertical bar retracts while it turns); see "Etiquette card" in Motion */
.etq summary::after {
  content: ''; flex: none; width: 16px; height: 16px; margin-inline-start: auto;
  background: linear-gradient(var(--ink-2), var(--ink-2)) center / 14px 2px no-repeat,
              linear-gradient(var(--ink-2), var(--ink-2)) center / 2px 14px no-repeat;
  transition: transform .32s var(--ease-out), background-size .32s var(--ease-out);
}
.etq[open] summary::after { transform: rotate(180deg); background-size: 14px 2px, 2px 0; }
.etq.m-closing summary::after { transform: none; background-size: 14px 2px, 2px 14px; }
.etq summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--ink) 40%, transparent); outline-offset: 2px; border-radius: 18px; }
.etq-icon { font-size: 26px; line-height: 1; }
.etq-sum { display: flex; flex-direction: column; min-width: 0; }
.etq-sum strong { font-size: 17px; }
.etq-sum small { font-size: 13px; color: var(--ink-2); }
.etq-list { list-style: none; margin: 0; padding: 0 18px 10px; }

/* "How it works" card: the tutorial and the guide, at the bottom, after the home-screen guide. */
.help { order: 9; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 12px; row-gap: 12px; padding: 16px 18px; }
.help-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.help-go, .help-guide, .invite-go, .invite-later {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px;
  border: 0; border-radius: 12px; font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.help-go, .invite-go { flex: 1; background: var(--ink); color: var(--bg); }
.help-go::before { content: '▶'; margin-inline-end: 8px; font-size: 11px; }
.help-guide, .invite-later { background: var(--chip); color: var(--ink); }
.help-go:active, .help-guide:active, .invite-go:active, .invite-later:active { transform: scale(var(--press)); }

/* First-visit invite to the tutorial (app.js), docked at the bottom. */
.invite {
  position: fixed; z-index: 15; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 456px; margin: 0 auto; padding: 14px 16px; border-radius: 18px;
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 12px; align-items: center;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 16px 44px rgb(0 0 0 / .22), 0 2px 8px rgb(0 0 0 / .1);
  animation: invite-in .5s var(--ease-out, ease) both;
}
.invite.m-leave { animation: invite-out .22s ease-in both; }
.invite-icon { font-size: 26px; line-height: 1; }
.invite-text { margin: 0; font-size: 15px; line-height: 1.4; }
.invite-text strong { display: block; font-size: 16px; }
.invite-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
@keyframes invite-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes invite-out { to { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) { .invite, .invite.m-leave { animation: none; } }
.etq-list li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }

/* ---------- Report ---------- */
h2 { font-size: 17px; letter-spacing: -0.01em; margin: 28px 0 12px; }

.conds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cond {
  --c: var(--ink);
  display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
  padding: 16px; min-height: 108px;
  background: var(--surface); border: 2px solid var(--line); border-radius: 18px;
  font-size: 18px; font-weight: 700; text-align: left;
  transition: border-color .18s var(--ease-out), background-color .18s var(--ease-out), transform .12s var(--ease-out);
}
.cond:active { transform: scale(var(--press)); }
.cond svg { width: 30px; height: 30px; fill: none; stroke: var(--c); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cond[data-cond="dry"] { --c: var(--dry); }
.cond[data-cond="damp"] { --c: var(--damp); }
.cond[data-cond="puddles"] { --c: var(--puddles); }
.cond[data-cond="wet"] { --c: var(--wet); }
.cond[aria-checked="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); }
.cond:focus-visible, .chip:focus-visible, .send:focus-visible, .media-btn:focus-within { outline: 3px solid color-mix(in srgb, var(--ink) 40%, transparent); outline-offset: 2px; }

.extras {
  margin-top: 14px; padding: 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px;
  animation: rise .22s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.tags { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags legend { padding: 0; margin-bottom: 8px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.chip {
  border: 1px solid transparent; background: var(--chip);
  border-radius: 999px; padding: 8px 14px; font-size: 15px; font-weight: 500;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.note-label { display: block; margin: 0 0 8px; font-size: 13px; color: var(--ink-2); font-weight: 600; } /* as .tags legend */
.note {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); font-size: 16px;
}
.note:focus { outline: 2px solid color-mix(in srgb, var(--ink) 35%, transparent); outline-offset: 0; }

.media-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.media-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 10px 14px; border-radius: 12px; border: 1.5px dashed var(--line);
  font-weight: 600; font-size: 15px;
}
.media-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.media-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.clear {
  position: absolute; top: -8px; inset-inline-end: -8px; width: 24px; height: 24px; border-radius: 50%;
  border: 0; background: var(--ink); color: var(--bg); font-size: 15px; line-height: 1;
}
.media-count { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px; margin-top: 12px; }
.pick { position: relative; aspect-ratio: 1; }
.pick-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; border-radius: 10px; cursor: zoom-in; }
.pick-open:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pick img, .pick video { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; background: var(--chip); }
.pick .play { border-radius: 10px; pointer-events: none; }
.pick-busy {
  /* photo stays fully visible; a small spinner in the corner while people are being blurred */
  position: absolute; inset-inline-start: 5px; bottom: 5px; width: 22px; height: 22px;
  border-radius: 50%; background: rgb(0 0 0 / .55);
  pointer-events: none;
}
.pick-busy::after {
  content: ''; position: absolute; inset: 4px; border-radius: 50%;
  border: 2px solid rgb(255 255 255 / .35); border-top-color: #fff;
  animation: pick-spin .8s linear infinite;
}
@keyframes pick-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pick-busy::after { animation-duration: 2.4s; } }
.hint { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); }

.send {
  --c: var(--ink);
  width: 100%; margin-top: 16px; padding: 16px; border: 0; border-radius: 14px;
  background: var(--c); color: #fff; font-size: 18px; font-weight: 700;
}
.extras[data-cond="dry"] .send { --c: var(--dry-solid); }
.extras[data-cond="damp"] .send { --c: var(--damp); color: #241b00; }
.extras[data-cond="puddles"] .send { --c: var(--puddles-solid); }
.extras[data-cond="wet"] .send { --c: var(--wet); }
.send:disabled { opacity: .7; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item {
  --c: var(--none);
  display: grid; grid-template-columns: 12px 1fr auto; gap: 12px; align-items: start;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.tl-item[data-cond="dry"] { --c: var(--dry); }
.tl-item[data-cond="damp"] { --c: var(--damp); }
.tl-item[data-cond="puddles"] { --c: var(--puddles); }
.tl-item[data-cond="wet"] { --c: var(--wet); }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); margin-top: 5px; }
.tl-head { display: flex; justify-content: space-between; gap: 8px; }
.tl-head time { color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.tl-tags { font-size: 14px; color: var(--ink-2); }
.note-tr { display: inline; padding: 0; border: 0; background: none; color: inherit; opacity: .7; font-size: 12px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; white-space: nowrap; }
.tl-note { margin: 4px 0 0; font-size: 15px; overflow-wrap: anywhere; }
/* Reporter's own report: delete control (only on the phone that made it, for 24 h). */
.tl-own { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.tl-del, .own-del {
  border: 1px solid currentColor; background: transparent; border-radius: 999px;
  padding: 6px 12px; min-height: 32px; font-size: 13px; font-weight: 600; line-height: 1;
}
.tl-del { color: var(--wet); }
.own-del { display: block; color: inherit; opacity: .9; }
.own-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tl-add { color: var(--ink); }
.tl-del:disabled, .own-del:disabled { opacity: .45; }
/* Someone else's report follows the finger either way (app.js swipeable) and uncovers "Flag" on the side
   it leaves. While the finger is down everything follows it exactly; let go and the slide settles with a
   small spring, the button grows in with it (--p: 0..1, how far it's out), and darkens once "armed".
   The slide is the `translate` property, so it adds to the card's own transform animations. */
.swipe { touch-action: pan-y; }
.swipe-act {
  --p: 0;
  position: absolute; top: 0; bottom: 0; left: 0; width: 88px;
  display: flex; align-items: center; justify-content: center;
  opacity: var(--p); pointer-events: none;
  transition: opacity .3s var(--ease-out);
}
.swipe-act[data-side="right"] { left: auto; right: 0; }
.swipe-act:is(.is-open, :focus-within) { pointer-events: auto; }
.swipe-act:focus-within { --p: 1; }
.swipe-act.is-moving { transition: none; }
.tl-item.swipe { position: relative; overflow-x: clip; } /* the sliding row never widens the page */
.tl-item.swipe > :not(.swipe-act) { translate: var(--sx, 0px) 0; transition: translate .5s cubic-bezier(.2, 1.3, .3, 1); }
.tl-item.swipe.is-moving > :not(.swipe-act) { transition: none; }
.status-frame { position: relative; overflow-x: clip; overflow-clip-margin: 14px; }
.status-frame > .status {
  z-index: 1; translate: var(--sx, 0px) 0;
  transition: translate .55s cubic-bezier(.2, 1.25, .3, 1), box-shadow .3s var(--ease-out), scale .3s var(--ease-out), background-color .5s var(--ease-in-out);
}
.status-frame > .status.is-moving { transition: box-shadow .3s var(--ease-out), scale .3s var(--ease-out), background-color .5s var(--ease-in-out); }
.status-frame > .status:is(.is-moving, .is-open) { box-shadow: 0 14px 34px rgb(0 0 0 / .2); scale: .985; }
.status-frame > .status-act { z-index: 0; }
.swipe-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  width: 68px; min-height: 64px; padding: 8px 4px; border: 0; border-radius: 18px;
  background: var(--wet); color: #fff; font: inherit; font-size: 12px; font-weight: 700; line-height: 1.15; text-align: center; cursor: pointer;
  scale: calc(.5 + .5 * var(--p)); rotate: calc((1 - var(--p)) * -12deg);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--wet) 35%, transparent);
  transition: scale .45s cubic-bezier(.34, 1.56, .64, 1), rotate .45s cubic-bezier(.34, 1.56, .64, 1), background-color .2s var(--ease-out);
}
.swipe-act[data-side="right"] .swipe-btn { rotate: calc((1 - var(--p)) * 12deg); }
.swipe-act.is-moving .swipe-btn { transition: background-color .2s var(--ease-out); }
.swipe-act.is-armed .swipe-btn { background: color-mix(in srgb, var(--wet) 82%, #000); }
.swipe-act.is-armed .swipe-btn::before { animation: flag-wave .5s var(--ease-out); }
@keyframes flag-wave { 30% { rotate: -14deg; } 65% { rotate: 8deg; } }
.swipe-btn::before {
  content: ''; width: 20px; height: 20px; background: currentColor; transform-origin: 25% 90%;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4M5 4h11l-2 4 2 4H5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4M5 4h11l-2 4 2 4H5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.swipe-btn:disabled { opacity: .5; }
@media (prefers-reduced-motion: reduce) {
  .tl-item.swipe > :not(.swipe-act), .status-frame > .status, .swipe-btn { transition: none; }
  .swipe-act.is-armed .swipe-btn::before { animation: none; }
}
.tl-thumb { position: relative; padding: 0; border: 0; background: none; border-radius: 10px; overflow: hidden; }
.tl-media { display: block; width: 56px; height: 56px; object-fit: cover; background: var(--chip); }
.play {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 16px; background: rgba(0,0,0,.25);
}
.more {
  position: absolute; inset-inline-end: 4px; bottom: 4px; padding: 1px 6px; border-radius: 99px;
  background: rgba(0,0,0,.65); color: #fff; font-size: 12px; font-weight: 700;
}
.empty { color: var(--ink-2); margin: 0; }

/* The "buy me a coffee" line (support.js): one quiet sentence, the whole of it the link */

/* ---------- Toast + viewer ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px;
  background: var(--ink); color: var(--bg); font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,.2);
  animation: rise .2s ease-out; z-index: 10;
}
.toast[data-kind="error"] { background: var(--wet); color: #fff; }


.viewer {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0;
  border: 0; padding: 0; background: rgb(0 0 0 / calc(.92 * var(--fade, 1))); color: #fff;
}
.viewer::backdrop { background: rgb(0 0 0 / calc(.92 * var(--fade, 1))); }
/* While swiping a photo away (swipe down to close), hide the buttons and counter. */
.viewer.swiping .viewer-close, .viewer.swiping .viewer-nav, .viewer.swiping .viewer-count { opacity: 0; transition: opacity .12s; }
.viewer-track {
  display: flex; width: 100%; height: 100%; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain;
}
.viewer-track::-webkit-scrollbar { display: none; }
/* Media fills the slide box and is letterboxed with object-fit, so it always fits the
   screen in portrait and landscape (max-height % inside a grid cell was ignored → huge zoom). */
/* Equal top/bottom padding so the media is centred on the screen, level with the prev/next arrows. */
.viewer-slide {
  --pad-y: calc(60px + max(env(safe-area-inset-top), env(safe-area-inset-bottom)));
  flex: 0 0 100%; height: 100%; min-width: 0; scroll-snap-align: center; scroll-snap-stop: always;
  display: flex; align-items: center; justify-content: center;
  padding: var(--pad-y) calc(8px + env(safe-area-inset-right)) var(--pad-y) calc(8px + env(safe-area-inset-left));
}
.viewer-slide img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Hidden until fully loaded + decoded (see viewerImg in app.js), with a spinner meanwhile. */
.viewer-slide img { transition: opacity .18s ease-out; }
.viewer-slide img.loading { opacity: 0; }
.viewer-slide:has(img.loading) { background: center / 28px 28px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23fff' stroke-opacity='.35' stroke-width='2.5'/%3E%3Cpath d='M12 3a9 9 0 0 1 9 9' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='.8s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E"); }
@media (prefers-reduced-motion: reduce) { .viewer-slide img { transition: none; } }
/* Video box hugs the video, so its controls sit right under the picture (not at the screen bottom). */
.viewer-slide video { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; min-width: 0; min-height: 0; }
/* Phone sideways: little height, so move the chrome to the sides instead of top/bottom. */
@media (orientation: landscape) and (max-height: 500px) {
  .viewer-slide {
    --pad-y: calc(8px + max(env(safe-area-inset-top), env(safe-area-inset-bottom)));
    padding: var(--pad-y) calc(60px + env(safe-area-inset-right)) var(--pad-y) calc(60px + env(safe-area-inset-left));
  }
  .viewer .viewer-count { top: auto; left: calc(14px + env(safe-area-inset-left)); bottom: calc(12px + env(safe-area-inset-bottom)); transform: none; }
}
.viewer-close, .viewer-nav {
  position: fixed; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.15); color: #fff; font-size: 26px; line-height: 1;
}
.viewer-close { top: calc(10px + env(safe-area-inset-top)); right: 10px; }
.viewer-nav { top: 50%; transform: translateY(-50%); }
.viewer-nav.prev { left: 10px; }
.viewer-nav.next { right: 10px; }
.viewer-count {
  position: fixed; top: calc(20px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; opacity: .85;
}
/* Prev/next stay visible on phones too (swipe works as well). */
@media (hover: none) { .viewer-nav { width: 48px; height: 48px; background: rgba(255,255,255,.18); } }
/* While the viewer is open the page behind it is frozen (iOS needs position: fixed). */
html.viewer-open, html.viewer-open body { overflow: hidden; overscroll-behavior: none; }
html.viewer-open body { position: fixed; left: 0; right: 0; width: 100%; }
.viewer { overscroll-behavior: contain; }
.viewer-track { overflow-y: hidden; touch-action: pan-x pinch-zoom; }
.viewer-box { width: 100%; height: 100%; }
/* In real fullscreen the box inside the dialog is the fullscreen element: black, edge to edge. */
.viewer-box:fullscreen { width: 100vw; height: 100vh; background: #000; }
.viewer-box:-webkit-full-screen { width: 100vw; height: 100vh; background: #000; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Phones sideways (short screens): tighter vertical rhythm so a useful amount fits on screen. */
@media (orientation: landscape) and (max-height: 500px) {
  .wrap { column-gap: 20px; padding-top: max(10px, env(safe-area-inset-top)); }
  .top { margin-bottom: 10px; }
  .status { --pad-x: 18px; padding: 16px var(--pad-x); }
  .status h1 { font-size: 44px; }
  .verdict { font-size: 16px; }
  .gallery-item { aspect-ratio: 16 / 9; }
  .cond { min-height: 0; flex-direction: row; align-items: center; gap: 10px; padding: 12px 14px; }
  .cond svg { width: 24px; height: 24px; flex: none; }
  h2 { margin: 18px 0 10px; }
  .col-side .history h2 { margin-top: 18px; }
}

/* Right-to-left languages (Arabic): text flows RTL, but swipe strips and the viewer stay LTR
   (their scroll math assumes it, and photo order is not language-dependent). */
[dir="rtl"] .gallery, [dir="rtl"] .viewer, [dir="rtl"] .picks { direction: ltr; }

/* Mouse drag-to-slide (app.js): grab cursor, and no snapping/selection while dragging. */
@media (pointer: fine) { .gallery, .viewer-track { cursor: grab; } }
.gallery.dragging, .viewer-track.dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; user-select: none; }
.gallery.dragging *, .viewer-track.dragging * { cursor: grabbing; }
.gallery img, .viewer-track img { -webkit-user-drag: none; user-select: none; }

/* "Add to home screen" guide (bottom of the page). 2 steps per row on phones, 4 from 560px
   (big phones in landscape, tablets, desktop). Images keep their phone shape and never exceed 180px. */
.howto { order: 9; }
.hs-body { padding: 4px 18px 20px; }
.hs-installed { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--chip); font-size: 14px; }
/* Install button: second row of the guide card's header, full width (visible even when closed) */
.howto summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; row-gap: 12px; }
.hs-install {
  order: 3; grid-column: 1 / -1; min-height: 48px; margin: 0 0 2px; border: 0; border-radius: 14px;
  background: var(--ink); color: var(--surface); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.hs-install[hidden] { display: none; }
.hs-tabs { display: flex; gap: 4px; margin: 0 0 16px; padding: 4px; border-radius: 999px; background: var(--chip); }
.hs-tabs button {
  flex: 1; min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2);
  font: inherit; font-size: 15px; font-weight: 600; transition: background-color .15s, color .15s;
}
.hs-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .14); }
.hs-tabs button:focus-visible, .hs-install:focus-visible { outline: 3px solid color-mix(in srgb, var(--ink) 45%, transparent); outline-offset: 2px; }
.hs-steps {
  list-style: none; counter-reset: hs; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px;
}
.hs-steps[hidden] { display: none; }
.hs-steps li { counter-increment: hs; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.hs-steps img { display: block; width: 100%; max-width: 180px; height: auto; aspect-ratio: 9 / 16; filter: drop-shadow(0 4px 10px rgb(0 0 0 / .12)); }
.hs-steps span { max-width: 200px; font-size: 14px; line-height: 1.4; text-align: center; overflow-wrap: anywhere; }
.hs-steps span::before {
  content: counter(hs); display: inline-grid; place-items: center; width: 22px; height: 22px; margin-inline-end: 6px;
  border-radius: 50%; background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 700; vertical-align: 1px;
}
.hs-steps li:last-child span::before { content: '✓'; background: var(--dry-solid); color: #fff; }
/* 4 steps per row only when the guide card itself is wide enough (container query), else 2 */
.hs-body { container-type: inline-size; }
@container (min-width: 620px) { .hs-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 340px) { .hs-body { padding-inline: 14px; } .hs-steps { gap: 18px 10px; } .hs-steps span { font-size: 13px; } }

/* The apps card (inside the "Get the app" guide): App Store button on iPhone; Android's closed test. */
.hs-panel[hidden] { display: none; }
.store-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 20px;
  border-radius: 14px; background: var(--ink); color: var(--bg); text-decoration: none;
}
.store-btn svg { width: 26px; height: 26px; fill: currentColor; flex: none; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.1; text-align: start; }
.store-btn small { font-size: 11px; font-weight: 500; opacity: .85; }
.store-btn strong { font-size: 20px; letter-spacing: -0.01em; }
.store-btn:active, .app-bar-go:active { transform: scale(var(--press)); }
.hs-note { margin: 14px 0 0; font-size: 15px; line-height: 1.45; }
.hs-note strong { display: block; margin-bottom: 2px; }
.hs-more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; color: var(--ink); font-size: 15px; font-weight: 700; text-underline-offset: 3px; }
.hs-more::after { content: '→'; margin-inline-start: 6px; }
[dir="rtl"] .hs-more::after { content: '←'; }
.hs-join { list-style: none; counter-reset: join; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.hs-join li { counter-increment: join; }
.hs-join a {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; border-radius: 12px;
  background: var(--chip); color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none;
}
.hs-join a::before {
  content: counter(join); flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 700;
}
.hs-join a::after { content: '↗'; margin-inline-start: auto; color: var(--ink-2); }
.hs-or { margin: 22px 0 14px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; }

/* App bar: top of the page, for people without the app (index.html decides before paint whether it shows) */
.app-bar { display: none; }
html[data-appbar] .app-bar {
  order: -1; grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; min-height: 64px;
  margin: 0 0 14px; padding-block: 10px; padding-inline: 12px 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface);
}
.app-bar-icon { flex: none; width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent); }
.app-bar-text { flex: 1; min-width: 0; margin: 0; display: flex; flex-direction: column; line-height: 1.25; }
.app-bar-text strong { font-size: 15px; }
.app-bar-text span { font-size: 13px; color: var(--ink-2); }
.app-bar-go {
  flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.app-bar-x {
  flex: none; width: 40px; height: 40px; margin-inline-start: -4px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-2); font-size: 22px; line-height: 1;
}
.app-bar-x:active { background: var(--chip); }
.app-bar-go:focus-visible, .app-bar-x:focus-visible, .store-btn:focus-visible, .hs-join a:focus-visible { outline: 3px solid color-mix(in srgb, var(--ink) 45%, transparent); outline-offset: 2px; }
/* Its words arrive with the language file: until then the box holds its place, empty. */
.app-bar:not(.ready) > :not(.app-bar-icon) { visibility: hidden; }
.app-bar.m-leave { animation: app-bar-out .22s ease-in forwards; }
@keyframes app-bar-out { to { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .app-bar.m-leave { animation: none; } }

/* Language picker dialog: bottom sheet on phones, panel top-right on wider screens */
.lang-dlg {
  width: 100%; max-width: 100%; max-height: min(78vh, 640px); margin: auto 0 0; padding: 0;
  border: 0; border-radius: 22px 22px 0 0; background: var(--surface); color: var(--ink);
  box-shadow: 0 -8px 40px rgb(0 0 0 / .25); overflow: hidden;
}
.lang-dlg[open] { display: flex; flex-direction: column; animation: lang-up .38s var(--ease-sheet); }
.lang-dlg[open]::backdrop { animation: m-fade-in .3s var(--ease-out); }
.lang-dlg::backdrop { background: rgb(0 0 0 / calc(.35 * var(--fade, 1))); } /* --fade: swipe-down (sheet.js) */
/* Grab bar: shows the sheet can be swiped down (phones only) */
.lang-dlg[open]::before { content: ''; flex: none; align-self: center; width: 40px; height: 5px; margin-top: 8px; border-radius: 3px; background: var(--line); }
@keyframes lang-up { from { transform: translateY(100%); } to { transform: none; } } /* iOS-like sheet */
@keyframes lang-drop { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lang-dlg[open] { animation: none; } }
.lang-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px 8px; }
.lang-head h2 { margin: 0; font-size: 18px; }
.lang-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--chip); color: var(--ink); font-size: 22px; line-height: 1; }
.lang-list {
  list-style: none; margin: 0; padding: 6px 14px calc(18px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; overflow-y: auto;
  overscroll-behavior: contain; /* scrolling the list never moves the page behind */
}
.lang-opt {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px;
  padding: 10px 12px; border: 1px solid transparent; border-radius: 14px; background: var(--chip); color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 600; text-align: start;
}
@media (hover: hover) { .lang-opt:hover { border-color: var(--line); } }
.lang-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-tag { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--ink-2); }
.lang-opt[aria-current="true"] { background: var(--ink); color: var(--surface); }
.lang-opt[aria-current="true"] .lang-tag { color: inherit; opacity: .8; }
.lang-opt[aria-current="true"] .lang-tag::before { content: '✓ '; }
@media (min-width: 640px) {
  .lang-dlg { width: 440px; margin: 64px max(16px, calc((100vw - 1080px) / 2)) auto auto; border-radius: 18px; box-shadow: 0 16px 48px rgb(0 0 0 / .22); }
  .lang-dlg[open] { animation-name: lang-drop; }
  .lang-dlg[open]::before { display: none; }
  .lang-head { padding-top: 16px; }
  .lang-list { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 16px; }
}

/* History: "show more" under the first few items */
.hist-more {
  display: block; width: 100%; margin-top: 10px; min-height: 42px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600;
}
@media (hover: hover) { .hist-more:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); } }
/* Short landscape (phones on their side): keep each step picture within ~60% of the screen height */
@media (orientation: landscape) and (max-height: 500px) { .hs-steps img { max-width: min(180px, 33.75vh); } }

/* History rows with photos: the whole row opens them. The press/hover tint reaches 6px past the
   row (box-shadow) so it doesn't hug the text, without changing the layout. */
.tl-item.has-media { --tint: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; border-radius: 6px;
  background: var(--tint); box-shadow: 0 0 0 6px var(--tint); transition: background-color .15s, box-shadow .15s; }
@media (hover: hover) { .tl-item.has-media:hover { --tint: color-mix(in srgb, var(--ink) 4%, transparent); } }
.tl-item.has-media:active { --tint: color-mix(in srgb, var(--ink) 8%, transparent); }

/* Legal links: under the Send button and in the footer */
.form-legal { margin: 10px 0 0; font-size: 12px; line-height: 1.45; color: var(--ink-2); text-align: center; }
.form-legal a, .legal-links a { color: inherit; text-underline-offset: 2px; }
.legal-links { margin-bottom: 6px; }
/* Footer: one action (suggest a spot), the site links, then who made it and the data credits, then the
   optional "buy me a coffee". Quiet text links without underlines (underlined on hover/focus), 44 px targets
   for the button, 32 px for the links. */
.foot { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 14px; font-size: 13px; color: var(--ink-2); text-align: center; }
.foot a { color: inherit; text-decoration: none; }
.foot a:focus-visible { outline: 3px solid color-mix(in srgb, var(--rain) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
.foot-suggest { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px 0 14px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 600; }
.foot .foot-suggest { color: var(--ink); }
.foot-suggest svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--rain); stroke-width: 2.2; stroke-linecap: round; }
.foot-suggest:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 30%, var(--line)); }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 2px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 8px; }
.foot-links a:hover, .foot-osm:hover, .foot .support:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot-meta { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; font-size: 12px; opacity: .85; }
.foot-meta > :not(:first-child)::before { content: "·"; margin: 0 8px; }
.foot .support { max-width: 38ch; padding: 10px 16px; border-radius: 14px; background: var(--chip); color: var(--ink); font-size: 13px; text-wrap: balance; }

/* ---------- Legal pages (/privacy, /terms) ---------- */
.legal {
  max-width: 720px; margin: 0 auto; line-height: 1.6;
  padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
           calc(32px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.legal-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.legal-top .brand { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.legal h1 { margin: 0 0 4px; font-size: clamp(28px, 7vw, 36px); line-height: 1.15; letter-spacing: -0.02em; }
.legal h2 { margin: 28px 0 8px; font-size: 19px; line-height: 1.3; }
.legal h3 { margin: 18px 0 4px; font-size: 16px; }
.legal p, .legal li { margin: 0 0 10px; font-size: 16px; }
.legal ul { padding-inline-start: 22px; margin: 0 0 10px; }
.legal a { color: inherit; text-underline-offset: 2px; overflow-wrap: anywhere; }
.legal-date { color: var(--ink-2); font-size: 14px !important; }
.legal-box { margin: 16px 0 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.legal-box p { margin: 0; }
.legal-foot { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
/* The guide (/docs) */
.doc-cta p + p { margin-top: 12px; }
.doc-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 12px;
  background: var(--ink); color: var(--bg) !important; font-weight: 700; text-decoration: none;
}
.doc-toc { margin: 18px 0 8px; padding: 14px 16px; border-radius: 14px; background: var(--chip); }
.doc-toc > p { margin: 0 0 6px; font-weight: 700; }
.doc-toc ol { margin: 0; padding-inline-start: 22px; columns: 2 220px; column-gap: 24px; }
.doc-toc li { margin: 0 0 4px; font-size: 15px; break-inside: avoid; }
.doc-toc a { text-decoration: none; }
.doc-toc a:hover { text-decoration: underline; }
.legal h2[id] { scroll-margin-top: 16px; }
/* The app page (/app): store buttons, the widgets with their pictures, the three styles */
.app-get { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 18px 0 6px; }
html[data-plat="app"] .app-get { display: none; }
.legal .store-btn { color: var(--bg); text-decoration: none; }
.legal .store-alt { background: var(--chip); color: var(--ink); }
.app-lead { font-size: 18px !important; line-height: 1.5; margin-top: 16px !important; }
.wg { margin: 18px 0 26px; }
.wg-pics {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-bottom: 12px; padding: 18px;
  border-radius: 22px; background: linear-gradient(160deg, color-mix(in srgb, var(--rain) 22%, var(--chip)), var(--chip) 70%);
}
.wg-pics img { display: block; height: auto; min-width: 0; filter: drop-shadow(0 6px 14px rgb(0 0 0 / .18)); }
/* Shown at their size on a phone (dp ≈ CSS px, a little smaller), shrinking with the box on narrow screens */
/* Small next to medium when there's room; on a phone the medium one gets its own row, at full size. */
.wg-s, .wg-mini-s { flex: 0 0 auto; width: min(150px, 46%); }
.wg-m, .wg-mini-m { flex: 1 1 260px; width: 0; max-width: 328px; }
.wg-l { width: 100%; max-width: 328px; }
.legal .wg h3 { margin: 0 0 2px; font-size: 18px; }
.legal .wg h3 span { margin-inline-start: 6px; font-weight: 500; color: var(--ink-2); font-size: 15px; }
.legal .wg p { margin: 0; }
.wg-styles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0 12px; padding: 16px; border-radius: 22px; background: var(--chip); }
.wg-styles figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.wg-styles img { display: block; width: 100%; max-width: 150px; height: auto; filter: drop-shadow(0 4px 10px rgb(0 0 0 / .16)); }
.wg-styles figcaption { font-size: 13px; font-weight: 600; text-align: center; color: var(--ink-2); }
@media (max-width: 420px) { .wg-styles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wg-pics { padding: 14px; gap: 10px; } }
.legal .hs-join { padding-inline-start: 0; margin-bottom: 12px; }
.legal .hs-join li { margin: 0; }
.legal .hs-join a { text-decoration: none; }
.doc-conds { list-style: none; padding-inline-start: 0 !important; }
.doc-dot { display: inline-block; width: 12px; height: 12px; margin-inline-end: 8px; border-radius: 50%; vertical-align: -1px; background: var(--none); }
.doc-dot[data-cond="dry"] { background: var(--dry); }
.doc-dot[data-cond="damp"] { background: var(--damp); }
.doc-dot[data-cond="puddles"] { background: var(--puddles); }
.doc-dot[data-cond="wet"] { background: var(--wet); }

/* Estimate between reports, inside the status card (white text on the condition colour) */
.est {
  margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: rgb(0 0 0 / .14); /* darker, not lighter: white text stays >= 4.5:1 */
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color .4s var(--ease-out), transform .2s var(--ease-out);
}
.est[hidden] { display: none; }
.est p { margin: 0; }
/* Touch feedback: the box gives a little under the finger, and is a touch brighter while open. */
.est:active:not(:has(.est-chart:active)) { transform: scale(var(--press-lg)); transition-duration: .4s, .08s; } /* not while using the chart */
.est[data-open="true"] { background: rgb(0 0 0 / .19); }
@media (hover: hover) { .est:hover { background: rgb(0 0 0 / .19); } }
/* The line is the button: tapping anywhere on the box opens/closes how it was worked out. */
.est-head {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 0; border: 0; background: none; /* chevron centred on 1 or 2 lines */
  color: inherit; font: inherit; text-align: start; cursor: pointer;
}
.est-head:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 6px; }
.est-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.est-line { font-size: 15px; font-weight: 600; line-height: 1.4; }
/* A roof or trees: why it gets wet or dries as it does, under the line (lined up with its text). */
.est-why { margin-top: 2px; padding-inline-start: 24px; font-size: 13px; line-height: 1.35; opacity: .92; text-wrap: pretty; }
.est-why:empty { display: none; }
/* When the model last updated it: last line of the opened explanation. */
.est-foot.est-upd { margin-top: 4px !important; padding-top: 0; border-top: 0; }
.est-chev {
  flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round; opacity: .8;
  transition: transform .34s var(--ease-in-out);
}
.est[data-open="true"] .est-chev { transform: rotate(-180deg); transition: transform .55s var(--ease-sheet); }

/* Explanation. Opening (~1 s, it's read once): the box grows with a soft settle (grid rows 0fr -> 1fr),
   the steps rise in one by one while the timeline draws down through them, then the chart draws, its
   area fills and the "dry" point pops. Closing (~0.35 s, the visitor is done): everything fades at once
   while the box folds back. Each piece's delay comes from its --i (its place in the order). */
.est { --stag: 38ms; --lead: 70ms; }
/* Height: app.js animates it between measured pixel heights (smooth, and a tap mid-way reverses from
   where it is); at rest it's 0 or auto. */
.est-more { height: 0; overflow: hidden; margin-inline: -12px; } /* to the box's edges, so the chart can bleed to them */
.est-in { padding-inline: 12px; }
.est[data-open="true"] .est-more { height: auto; }
.est-in { display: flow-root; } /* contains its children's margins, so its offsetHeight is the exact open height */
.est-in > :not(.est-steps), .est-steps > li { opacity: 0; transform: translateY(4px); transition: opacity .12s ease-out, transform 0s .12s; }
.est[data-open="true"] .est-in > :not(.est-steps),
.est[data-open="true"] .est-steps > li {
  opacity: 1; transform: none;
  transition: opacity .42s cubic-bezier(.33, 1, .68, 1), transform .52s cubic-bezier(.22, 1, .36, 1);
  transition-delay: calc(var(--lead) + var(--i, 0) * var(--stag));
}
.est-instant, .est-instant * { transition: none !important; animation: none !important; }

/* Steps as a small timeline: a dot per step on a thin line that draws down from one dot to the next. */
.est-steps { list-style: none; margin: 12px 0 0; padding: 0; }
.est-step { position: relative; padding: 0 0 9px 20px; font-size: 14px; line-height: 1.4; }
.est-step::before {
  content: ''; position: absolute; left: 3px; top: .45em; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; opacity: .9;
}
.est-step:not(:last-child)::after {
  content: ''; position: absolute; left: 6px; top: calc(.45em + 10px); bottom: 1px; width: 1px;
  background: currentColor; opacity: .35; transform: scaleY(0); transform-origin: top; transition: transform 0s .14s;
}
.est[data-open="true"] .est-step:not(:last-child)::after {
  transform: none; transition: transform .32s var(--ease-out) calc(var(--lead) + (var(--i) + .6) * var(--stag) + 60ms);
}
.est-step.est-now { font-weight: 700; }
.est-step.est-now::before { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 30%, transparent); }
/* "Now" is the point of it all: its dot sends out one soft ring as it arrives. */
.est[data-open="true"] .est-now::before { animation: est-ping .9s var(--ease-out) calc(var(--lead) + var(--i) * var(--stag) + 180ms) backwards; }
@keyframes est-ping {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); }
  60% { box-shadow: 0 0 0 7px color-mix(in srgb, currentColor 0%, transparent); }
  61% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 0%, transparent); }
  100% { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 30%, transparent); }
}

.est-foot { margin: 10px 0 0 !important; padding-top: 8px; border-top: 1px solid color-mix(in srgb, currentColor 25%, transparent); font-size: 12.5px; }
/* small sun: this line is about when it'll be dry */
.est-line::before { content: ''; display: inline-block; vertical-align: -3px; margin-inline-end: 8px; width: 16px; height: 16px; background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E"); }

/* =================== Motion =================== */
/* Subtle production polish: things enter by rising a few px out of a slight blur; exits are quicker
   and smaller; nothing re-animates on the silent minute-by-minute refreshes (JS only adds the classes
   on real changes). Everything is switched off by the prefers-reduced-motion rule above. */
:root {
  --ease-out: cubic-bezier(.22, 1, .36, 1);     /* arriving */
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);  /* changing while visible */
  --ease-sheet: cubic-bezier(.32, .72, 0, 1);   /* bottom sheets (iOS feel) */
  /* gentle overshoot for one small "pop" */
  --pop: linear(0, .32 9%, .74 20%, 1.03 33%, 1.07 41%, 1.03 55%, .995 72%, 1);
  /* Pressed: two depths only. Buttons, chips and icons give .97; big cards and list rows .985 (the same
     few px of give on a wide box). map.css and suggest.css use these too. */
  --press: .97;
  --press-lg: .985;
}
@keyframes m-enter { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }
@keyframes m-fade-in { from { opacity: 0; } }
@keyframes m-swap { from { opacity: 0; transform: translateY(6px) scale(.985); filter: blur(6px); } }
@keyframes m-pop { from { transform: scale(.82); } }

/* Page opening: the cards arrive in reading order, once. */
.top, .status, .etq, .report, .weather, .history {
  animation: m-enter .55s var(--ease-out) backwards;
  animation-delay: calc(var(--m-i, 0) * 55ms);
}
/* Until the status card is drawn (app.js booted(); 3 s at most, index.html) the sections under it wait
   unseen and still, then arrive as above: drawing the card can't push visible content down. */
html.booting :is(.etq, .report, .weather, .history) { visibility: hidden; animation-play-state: paused; }
.status { --m-i: 1; } #etiquette { --m-i: 2; } .report { --m-i: 3; } .weather { --m-i: 4; } .history { --m-i: 5; } #howto { --m-i: 6; }

/* Status card: the big word and verdict cross-fade when the condition changes. */
.m-swap { animation: m-swap .42s var(--ease-out) backwards; } /* backwards: hidden during a stagger delay */
/* One light sheen across the card after you report. */
.status { position: relative; isolation: isolate; }
.status.m-celebrate::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .28) 50%, transparent 65%) no-repeat;
  background-size: 250% 100%;
  animation: m-sheen .65s var(--ease-in-out) both;
}
@keyframes m-sheen { from { background-position: 120% 0; } to { background-position: -40% 0; } }
.status.m-celebrate { animation: m-celebrate .6s var(--ease-out); }
@keyframes m-celebrate { 40% { transform: scale(1.012); } }

/* Report: picking a condition pops its icon; the details form fades in. */
/* (condition icons: see "Animated icons" below) */
#extras:not([hidden]) { animation: m-enter .4s var(--ease-out); }

/* Estimate line, new history rows (staggered), toast. */
.m-fade { animation: m-enter .45s var(--ease-out); }
.tl-item.m-enter { animation: m-enter .45s var(--ease-out) backwards; animation-delay: calc(var(--m-i, 0) * 45ms); }
/* "Ver menos": rows leave quicker and smaller than they came in (bottom row first). */
.tl-item.m-leave { animation: m-leave .18s cubic-bezier(.4, 0, 1, 1) forwards; animation-delay: calc(var(--m-i, 0) * 30ms); }
@keyframes m-leave { to { opacity: 0; transform: translateY(-6px); filter: blur(3px); } }
.hist-more.m-swap { animation-duration: .3s; }
.toast.m-toast { animation: m-enter .35s var(--ease-out); }
.toast.m-out { opacity: 0; transform: translateY(4px); filter: blur(2px); transition: opacity .18s ease-in, transform .18s ease-in, filter .18s ease-in; }

/* Rain bars: grow from the bottom, then morph between % and mm. */
.w-bar span { top: 0; transform-origin: bottom; transition: transform .5s var(--ease-out), background-color .3s var(--ease-out); }

/* Segmented switches (% | mm, iPhone | Android): a pill slides to the active option. */
.w-unit, .hs-tabs { position: relative; isolation: isolate; }
.w-unit button, .hs-tabs button { position: relative; z-index: 1; }
.w-unit button[aria-pressed="true"], .hs-tabs button[aria-selected="true"] { background: transparent; box-shadow: none; }
.w-unit::before, .hs-tabs::before {
  content: ''; position: absolute; z-index: 0; top: 2px; bottom: 2px; left: 2px; width: calc(50% - 3px);
  border-radius: 999px; background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / .14);
  transition: transform .32s var(--ease-out);
}
.hs-tabs::before { top: 4px; bottom: 4px; left: 4px; width: calc(50% - 6px); }
.w-unit[data-active="mm"]::before { transform: translateX(calc(100% + 2px)); }
.hs-tabs[data-active="and"]::before { transform: translateX(calc(100% + 4px)); }
[dir="rtl"] .w-unit[data-active="mm"]::before { transform: translateX(calc(-100% - 2px)); }
[dir="rtl"] .hs-tabs[data-active="and"]::before { transform: translateX(calc(-100% - 4px)); }
[dir="rtl"] .w-unit::before, [dir="rtl"] .hs-tabs::before { left: auto; right: 2px; }
[dir="rtl"] .hs-tabs::before { right: 4px; }

/* Cards that open (etiquette, home-screen guide): content fades in. */
.etq[open] > :not(summary) { animation: m-enter .4s var(--ease-out); }

/* Photo viewer: opens with a short fade + slight scale. */
.viewer[open] { animation: m-fade-in .25s var(--ease-out); }
.viewer[open] .viewer-box { animation: m-viewer .35s var(--ease-out); }
@keyframes m-viewer { from { transform: scale(.96); filter: blur(4px); opacity: 0; } }

/* Hover/press polish on secondary buttons. */
.hist-more, .lang-opt, .hs-install, .send { transition: background-color .18s var(--ease-out), border-color .18s var(--ease-out), transform .12s var(--ease-out); }
.hist-more:active, .send:active { transform: scale(var(--press)); }
.lang-opt:active { transform: scale(var(--press-lg)); } /* a row of the list */

/* =================== Animated icons =================== */
/* Each condition icon acts out its meaning once: on page load (in sequence, after the report card
   arrives), and again when picked or hovered (desktop). Two copies of each keyframe set (-a load,
   -b replay) because an animation only restarts when its name changes. No loops. */
.ic * { transform-box: fill-box; transform-origin: center; }
.ic-d { transform-origin: 50% 100%; }
.ic-r1, .ic-r2, .ic-r3 { transform-origin: 50% 0; }
.conds .cond:nth-child(1) { --ic-d: .42s; } .conds .cond:nth-child(2) { --ic-d: .52s; }
.conds .cond:nth-child(3) { --ic-d: .62s; } .conds .cond:nth-child(4) { --ic-d: .72s; }
@keyframes ic-core-a { from { transform: scale(.7); } 55% { transform: scale(1.12); } to { transform: none; } }
@keyframes ic-core-b { from { transform: scale(.7); } 55% { transform: scale(1.12); } to { transform: none; } }
.ic-core { animation: ic-core-a .6s var(--ease-out) backwards; animation-delay: calc(var(--ic-d, 0s) + 0s); }
.conds.ic-loaded .ic-core { animation: none; }
.cond[aria-checked="true"] .ic-core { animation-name: ic-core-b; animation-delay: 0s; }
@media (hover: hover) and (pointer: fine) { .cond:hover .ic-core { animation-name: ic-core-b; animation-delay: 0s; } }
@keyframes ic-rays-a { from { transform: rotate(-70deg) scale(.55); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ic-rays-b { from { transform: rotate(-70deg) scale(.55); opacity: 0; } to { transform: none; opacity: 1; } }
.ic-rays { animation: ic-rays-a .75s var(--ease-out) backwards; animation-delay: calc(var(--ic-d, 0s) + 0s); }
.conds.ic-loaded .ic-rays { animation: none; }
.cond[aria-checked="true"] .ic-rays { animation-name: ic-rays-b; animation-delay: 0s; }
@media (hover: hover) and (pointer: fine) { .cond:hover .ic-rays { animation-name: ic-rays-b; animation-delay: 0s; } }
@keyframes ic-d-a { 0% { transform: translateY(-8px) scaleY(1.06); opacity: 0; } 45% { transform: translateY(0) scale(1.14, .84); opacity: 1; } 72% { transform: scale(.95, 1.06); } 100% { transform: none; } }
@keyframes ic-d-b { 0% { transform: translateY(-8px) scaleY(1.06); opacity: 0; } 45% { transform: translateY(0) scale(1.14, .84); opacity: 1; } 72% { transform: scale(.95, 1.06); } 100% { transform: none; } }
.ic-d { animation: ic-d-a .7s var(--ease-out) backwards; animation-delay: calc(var(--ic-d, 0s) + 0s); }
.conds.ic-loaded .ic-d { animation: none; }
.cond[aria-checked="true"] .ic-d { animation-name: ic-d-b; animation-delay: 0s; }
@media (hover: hover) and (pointer: fine) { .cond:hover .ic-d { animation-name: ic-d-b; animation-delay: 0s; } }
@keyframes ic-p1-a { from { transform: scale(.35, .6); opacity: 0; } 60% { transform: scale(1.08, 1); opacity: 1; } to { transform: none; } }
@keyframes ic-p1-b { from { transform: scale(.35, .6); opacity: 0; } 60% { transform: scale(1.08, 1); opacity: 1; } to { transform: none; } }
.ic-p1 { animation: ic-p1-a .6s var(--ease-out) backwards; animation-delay: calc(var(--ic-d, 0s) + 0s); }
.conds.ic-loaded .ic-p1 { animation: none; }
.cond[aria-checked="true"] .ic-p1 { animation-name: ic-p1-b; animation-delay: 0s; }
@media (hover: hover) and (pointer: fine) { .cond:hover .ic-p1 { animation-name: ic-p1-b; animation-delay: 0s; } }
@keyframes ic-p2-a { from { transform: scale(.35, .6); opacity: 0; } 60% { transform: scale(1.08, 1); opacity: 1; } to { transform: none; } }
@keyframes ic-p2-b { from { transform: scale(.35, .6); opacity: 0; } 60% { transform: scale(1.08, 1); opacity: 1; } to { transform: none; } }
.ic-p2 { animation: ic-p2-a .6s var(--ease-out) backwards; animation-delay: calc(var(--ic-d, 0s) + .14s); }
.conds.ic-loaded .ic-p2 { animation: none; }
.cond[aria-checked="true"] .ic-p2 { animation-name: ic-p2-b; animation-delay: .14s; }
@media (hover: hover) and (pointer: fine) { .cond:hover .ic-p2 { animation-name: ic-p2-b; animation-delay: .14s; } }
@keyframes ic-cloud-a { 0% { transform: translateX(-3px); opacity: 0; } 55% { transform: translateX(1px); opacity: 1; } 100% { transform: none; } }
@keyframes ic-cloud-b { 0% { transform: translateX(-3px); opacity: 0; } 55% { transform: translateX(1px); opacity: 1; } 100% { transform: none; } }
.ic-cloud { animation: ic-cloud-a .55s var(--ease-out) backwards; animation-delay: calc(var(--ic-d, 0s) + 0s); }
.conds.ic-loaded .ic-cloud { animation: none; }
.cond[aria-checked="true"] .ic-cloud { animation-name: ic-cloud-b; animation-delay: 0s; }
@media (hover: hover) and (pointer: fine) { .cond:hover .ic-cloud { animation-name: ic-cloud-b; animation-delay: 0s; } }
@keyframes ic-r1-a { 0% { transform: translateY(-5px); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
@keyframes ic-r1-b { 0% { transform: translateY(-5px); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
.ic-r1 { animation: ic-r1-a .45s cubic-bezier(.4, 0, .6, 1) backwards; animation-delay: calc(var(--ic-d, 0s) + .18s); }
.conds.ic-loaded .ic-r1 { animation: none; }
.cond[aria-checked="true"] .ic-r1 { animation-name: ic-r1-b; animation-delay: .18s; }
@media (hover: hover) and (pointer: fine) { .cond:hover .ic-r1 { animation-name: ic-r1-b; animation-delay: .18s; } }
@keyframes ic-r2-a { 0% { transform: translateY(-5px); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
@keyframes ic-r2-b { 0% { transform: translateY(-5px); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
.ic-r2 { animation: ic-r2-a .45s cubic-bezier(.4, 0, .6, 1) backwards; animation-delay: calc(var(--ic-d, 0s) + .3s); }
.conds.ic-loaded .ic-r2 { animation: none; }
.cond[aria-checked="true"] .ic-r2 { animation-name: ic-r2-b; animation-delay: .3s; }
@media (hover: hover) and (pointer: fine) { .cond:hover .ic-r2 { animation-name: ic-r2-b; animation-delay: .3s; } }
@keyframes ic-r3-a { 0% { transform: translateY(-5px); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
@keyframes ic-r3-b { 0% { transform: translateY(-5px); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
.ic-r3 { animation: ic-r3-a .45s cubic-bezier(.4, 0, .6, 1) backwards; animation-delay: calc(var(--ic-d, 0s) + .42s); }
.conds.ic-loaded .ic-r3 { animation: none; }
.cond[aria-checked="true"] .ic-r3 { animation-name: ic-r3-b; animation-delay: .42s; }
@media (hover: hover) and (pointer: fine) { .cond:hover .ic-r3 { animation-name: ic-r3-b; animation-delay: .42s; } }

/* Weather icon floats in (and again when the weather changes); card emojis wiggle when opened;
   the estimate's sun turns in; the language arrow flips while the sheet is open. */
.w-icon { display: inline-block; }
.w-icon.m-icon { animation: m-icon .6s var(--ease-out); }
@keyframes m-icon { from { transform: translateY(6px) rotate(-12deg) scale(.85); opacity: 0; filter: blur(2px); } }
.etq-icon { display: inline-block; }
.etq[open] .etq-icon { animation: m-wiggle .6s var(--ease-out); }
@keyframes m-wiggle { 25% { transform: rotate(-14deg); } 55% { transform: rotate(10deg); } 80% { transform: rotate(-4deg); } }
.est-line.m-fade::before { animation: m-spin-in .7s var(--ease-out); }
@keyframes m-spin-in { from { transform: rotate(-120deg) scale(.6); opacity: 0; } }
.lang .chev { transition: transform .3s var(--ease-out); }
body:has(#langDlg[open]) .lang .chev { transform: rotate(180deg); }
.lang svg:first-child { transition: transform .5s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .lang:hover svg:first-child { transform: rotate(-25deg); } }


/* =================== Weather icons (public/weather-icons.js) =================== */
/* Living scenes: rain falls, the sun's rays turn, clouds drift, lightning flashes. Slow and calm,
   paused off screen (.is-off), and static (still readable) with prefers-reduced-motion. */
.wx { display: block; width: 54px; height: 54px; overflow: visible; }
.wx * { transform-box: fill-box; transform-origin: center; }
.wx-rays { transform-box: view-box; } /* origin set inline: the sun's centre */
.wx-sun-core { fill: #f6b40e; }
.wx-rays path { fill: none; stroke: #f6b40e; stroke-width: 3; stroke-linecap: round; }
.wx-moon path, .wx-star { fill: #f2c94c; }
.wx-cloud { fill: color-mix(in srgb, var(--ink) var(--cloud-1), var(--surface)); filter: var(--cloud-filter); }
/* on a dark card, clouds need to be lighter than the background, not darker (variables per theme) */
.wx-cloud.back { fill: color-mix(in srgb, var(--ink) var(--cloud-2), var(--surface)); }
.wx-cloud.dark { fill: color-mix(in srgb, var(--ink) var(--cloud-3), var(--surface)); }
.wx-drop { fill: none; stroke: var(--rain); stroke-width: 2.6; stroke-linecap: round; }
.wx-flake { fill: color-mix(in srgb, var(--rain) 50%, var(--surface)); }
.wx-fog { fill: none; stroke: color-mix(in srgb, var(--ink) 28%, var(--surface)); stroke-width: 3; stroke-linecap: round; }
.wx-bolt { fill: #f6b40e; }

.wx-rays { animation: wx-spin 26s linear infinite; }
.wx-sun-core { animation: wx-glow 3.5s var(--ease-in-out) infinite alternate; }
.wx-cloud.front { animation: wx-drift 7s var(--ease-in-out) infinite alternate; }
.wx-cloud.back { animation: wx-drift 10s var(--ease-in-out) infinite alternate-reverse; }
.wx-drop { animation: wx-fall .95s linear infinite; animation-delay: calc(var(--i) * -.31s); }
.wx-drop.light { animation-duration: 1.5s; animation-delay: calc(var(--i) * -.5s); }
.wx-drop.heavy { animation-duration: .6s; animation-delay: calc(var(--i) * -.13s); }
.wx-flake { animation: wx-snow 3.2s linear infinite; animation-delay: calc(var(--i) * -.8s); }
.wx-fog { animation: wx-fog 6s var(--ease-in-out) infinite alternate; }
.wx-fog.f2 { animation-direction: alternate-reverse; }
.wx-bolt { animation: wx-flash 5s linear infinite; }
.wx-star { animation: wx-twinkle 2.8s var(--ease-in-out) infinite alternate; }
.wx-star.s2 { animation-delay: -1.4s; }
.w-icon.is-off .wx * { animation-play-state: paused; }

@keyframes wx-spin { to { transform: rotate(360deg); } }
@keyframes wx-glow { to { transform: scale(1.07); } }
@keyframes wx-drift { from { transform: translateX(-1.6px); } to { transform: translateX(1.6px); } }
@keyframes wx-fall {
  0% { transform: translate(1.6px, -8px); opacity: 0; }
  20%, 75% { opacity: 1; }
  100% { transform: translate(-1.6px, 7px); opacity: 0; }
}
@keyframes wx-snow {
  0% { transform: translate(0, -9px); opacity: 0; }
  15%, 80% { opacity: 1; }
  50% { transform: translate(2px, 0); }
  100% { transform: translate(-1px, 8px); opacity: 0; }
}
@keyframes wx-fog { from { transform: translateX(-3px); } to { transform: translateX(3px); } }
@keyframes wx-flash { 0%, 86% { opacity: 0; } 88% { opacity: 1; } 90% { opacity: .2; } 92% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes wx-twinkle { from { opacity: .35; } to { opacity: 1; } }


/* =================== Etiquette card =================== */
/* Opening: rules arrive one by one, and each emoji acts out its rule once. Closing: content fades
   out quickly first (keyboard and reduced motion close instantly). */
.etq summary { transition: background-color .18s var(--ease-out); border-radius: 18px; }
.etq summary:active { background: color-mix(in srgb, var(--ink) 5%, transparent); }
#etiquette[open] > .etq-list { animation: none; }
#etiquette[open] .etq-list li { animation: m-enter .45s var(--ease-out) backwards; animation-delay: calc(var(--n) * 45ms); }
#etiquette .etq-list li > span:first-child { display: inline-block; transform-origin: 50% 80%; }
#etiquette[open] .etq-list li > span:first-child { animation: var(--e) .65s var(--ease-out) backwards; animation-delay: calc(var(--n) * 45ms + 140ms); }
#etiquette .etq-list li:nth-child(1) { --n: 0; --e: e-helmet; }
#etiquette .etq-list li:nth-child(2) { --n: 1; --e: e-target; }
#etiquette .etq-list li:nth-child(3) { --n: 2; --e: e-eyes; }
#etiquette .etq-list li:nth-child(4) { --n: 3; --e: e-drop; }
#etiquette .etq-list li:nth-child(5) { --n: 4; --e: e-roll; }
#etiquette .etq-list li:nth-child(6) { --n: 5; --e: e-pop; }
#etiquette .etq-list li:nth-child(7) { --n: 6; --e: e-bounce; }
#etiquette .etq-list li:nth-child(8) { --n: 7; --e: e-shake; }
#etiquette .etq-list li:nth-child(9) { --n: 8; --e: e-wave; }
@keyframes e-helmet { from { transform: translateY(-12px); opacity: 0; } 60% { transform: translateY(1.5px); opacity: 1; } to { transform: none; } }
@keyframes e-target { from { transform: scale(.4); opacity: 0; } 65% { transform: scale(1.18); opacity: 1; } to { transform: none; } }
@keyframes e-eyes { from { opacity: 0; } 30% { transform: translateX(-3px); opacity: 1; } 65% { transform: translateX(3px); } to { transform: none; } }
@keyframes e-drop { from { transform: translateY(-9px) scaleY(1.1); opacity: 0; } 55% { transform: translateY(0) scale(1.18, .82); opacity: 1; } 80% { transform: scale(.95, 1.05); } to { transform: none; } }
@keyframes e-roll { from { transform: translateX(-16px) rotate(-25deg); opacity: 0; } 70% { transform: translateX(1px) rotate(3deg); opacity: 1; } to { transform: none; } }
@keyframes e-pop { from { transform: scale(.5); opacity: 0; } 65% { transform: scale(1.12); opacity: 1; } to { transform: none; } }
@keyframes e-bounce { from { transform: translateY(6px); opacity: 0; } 35% { transform: translateY(-6px); opacity: 1; } 65% { transform: translateY(1px); } 82% { transform: translateY(-2px); } to { transform: none; } }
@keyframes e-shake { from { opacity: 0; } 20% { transform: rotate(-14deg); opacity: 1; } 40% { transform: rotate(11deg); } 60% { transform: rotate(-7deg); } 80% { transform: rotate(3deg); } to { transform: none; } }
@keyframes e-wave { from { opacity: 0; } 20% { transform: rotate(-20deg); opacity: 1; } 45% { transform: rotate(16deg); } 70% { transform: rotate(-9deg); } to { transform: none; } }
.etq.m-closing > :not(summary) { animation: m-close .2s cubic-bezier(.4, 0, 1, 1) forwards !important; }
.etq.m-closing .etq-list li, .etq.m-closing .etq-list li > span:first-child { animation: none !important; }
@keyframes m-close { to { opacity: 0; transform: translateY(-6px); filter: blur(3px); } }


/* =================== Home-screen guide card ("Adiciona ao telemóvel") =================== */
#howto[open] .hs-steps li { animation: m-enter .5s var(--ease-out) backwards; animation-delay: calc(var(--n, 0) * 70ms + 60ms); }
#howto[open] .hs-steps img { animation: m-phone .6s var(--ease-out) backwards; animation-delay: calc(var(--n, 0) * 70ms + 60ms); }
#howto[open] .hs-steps span::before { animation: m-pop .45s var(--pop) backwards; animation-delay: calc(var(--n, 0) * 70ms + 320ms); display: inline-grid; }
.hs-steps li:nth-child(1) { --n: 0; } .hs-steps li:nth-child(2) { --n: 1; } .hs-steps li:nth-child(3) { --n: 2; } .hs-steps li:nth-child(4) { --n: 3; }
@keyframes m-phone { from { transform: translateY(14px) scale(.96); opacity: 0; } }
/* switching iPhone / Android: steps slide in from the side of the chosen tab */
.hs-steps.m-from-left li { animation: m-from-left .42s var(--ease-out) backwards !important; animation-delay: calc(var(--n, 0) * 50ms) !important; }
.hs-steps.m-from-right li { animation: m-from-right .42s var(--ease-out) backwards !important; animation-delay: calc(var(--n, 0) * 50ms) !important; }
.hs-steps.m-from-left img, .hs-steps.m-from-right img, .hs-steps.m-from-left span::before, .hs-steps.m-from-right span::before { animation: none !important; }
@keyframes m-from-left { from { opacity: 0; transform: translateX(-18px); filter: blur(3px); } }
@keyframes m-from-right { from { opacity: 0; transform: translateX(18px); filter: blur(3px); } }
[dir="rtl"] .hs-steps.m-from-left li { animation-name: m-from-right !important; }
[dir="rtl"] .hs-steps.m-from-right li { animation-name: m-from-left !important; }
/* the 📲 gives a little phone buzz when the card opens (instead of the generic wiggle) */
#howto[open] .etq-icon { animation: m-buzz .5s linear; }
@keyframes m-buzz { 10%, 50%, 90% { transform: translateX(-1.5px) rotate(-4deg); } 30%, 70% { transform: translateX(1.5px) rotate(4deg); } }
.hs-install.m-fade { animation: m-enter .45s var(--ease-out); }

/* =================== Everything else =================== */
/* Report form */
.chip { transition: background-color .16s var(--ease-out), color .16s var(--ease-out), transform .12s var(--ease-out); }
.chip:active { transform: scale(var(--press)); }
#extras.m-closing { animation: m-close .18s cubic-bezier(.4, 0, 1, 1) forwards; }
.pick.m-pop-in { animation: m-pick .4s var(--pop); }
@keyframes m-pick { from { transform: scale(.7); opacity: 0; } }
.pick.m-out { transform: scale(.8); opacity: 0; transition: transform .17s cubic-bezier(.4, 0, 1, 1), opacity .17s cubic-bezier(.4, 0, 1, 1); }
/* your own report being deleted (status card rows use the same leave animation as "Ver menos") */
li.m-leave { animation: m-leave .2s cubic-bezier(.4, 0, 1, 1) forwards; }
/* weather texts, empty history, legal pages */
#wTemp.m-swap, #wDesc.m-swap { display: inline-block; }
.w-hint.m-fade, .empty.m-fade { animation: m-enter .45s var(--ease-out); }
.legal #legalDoc.m-swap { animation: m-enter .45s var(--ease-out); }
/* language button press */
.lang { transition: transform .12s var(--ease-out), border-color .18s var(--ease-out); }
.lang:active { transform: scale(var(--press)); }


/* =================== Theme switch (public/theme.js) =================== */
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.theme-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; flex: none;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer;
  transition: transform .12s var(--ease-out), border-color .18s var(--ease-out);
}
.theme-btn:active { transform: scale(var(--press)); }
/* Fingers need 44 px: the round header buttons, "‹ Mapa", the language button, the chips and the dialogs'
   × stay their size to the eye, each with a wider invisible hit area. */
.theme-btn, .map-back, .lang-x, .app-bar-x { position: relative; }
.chip { position: relative; }
.theme-btn::after, .lang::after, .map-back::after, .lang-x::after { content: ''; position: absolute; inset: -4px; border-radius: 999px; }
.app-bar-x::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; }
.chip::after { content: ''; position: absolute; inset: -4px -3px; border-radius: 999px; }
.theme-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--ink) 40%, transparent); outline-offset: 2px; }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .ti-fill, .theme-btn .ti-moon path { fill: currentColor; }
.theme-btn .ti-moon path { stroke: none; }
/* Icon: one sun that becomes a moon. To dark: rays retract and spin away, the sun swells, a shadow
   slides across it (mask) leaving a crescent, two stars pop out. To light: the reverse. */
.theme-btn .ti { transform-box: view-box; transform-origin: 12px 12px; transition: opacity .3s var(--ease-out), transform .55s var(--ease-out); }
.theme-btn .ti-core { fill: currentColor; stroke: none; transform-box: view-box; transform-origin: 12px 12px; transition: transform .6s var(--pop); }
.theme-btn .ti-rays { transform-box: view-box; transform-origin: 12px 12px; transition: transform .55s var(--ease-out), opacity .35s var(--ease-out); }
.theme-btn .ti-bite { transform-box: view-box; transform: translate(9px, -9px); transition: transform .6s var(--ease-in-out); }
.theme-btn .ti-star { fill: currentColor; stroke: none; transform-box: fill-box; transform-origin: center; opacity: 0; transform: scale(0); transition: transform .35s var(--pop), opacity .2s; }
.theme-btn[data-mode="dark"] .ti-core { transform: scale(1.5); }
.theme-btn[data-mode="dark"] .ti-rays { opacity: 0; transform: rotate(-90deg) scale(.3); }
.theme-btn[data-mode="dark"] .ti-bite { transform: none; }
.theme-btn[data-mode="dark"] .ti-star { opacity: 1; transform: none; transition-delay: .35s; }
.theme-btn[data-mode="dark"] .ti-star.s2 { transition-delay: .48s; }

/* =================== Pull to refresh (public/pull-refresh.js) =================== */
html.has-ptr, html.has-ptr body { overscroll-behavior-y: contain; } /* no browser pull-to-reload */
.ptr {
  position: fixed; z-index: 20; top: env(safe-area-inset-top); left: 50%; width: 44px; height: 44px;
  border-radius: 50%; background: var(--surface); box-shadow: 0 4px 14px rgb(0 0 0 / .16), 0 0 0 1px rgb(0 0 0 / .04);
  opacity: 0; transform: translate(-50%, -52px); pointer-events: none;
}
.ptr svg { display: block; width: 100%; height: 100%; }
.ptr * { transform-box: fill-box; transform-origin: center; }
.ptr-track { fill: none; stroke: var(--line); stroke-width: 2.5; }
.ptr-ring { fill: none; stroke: var(--rain); stroke-width: 2.5; stroke-linecap: round; transform: rotate(-90deg); transition: stroke .2s; }
/* pulling: the drop grows with the pull */
.ptr-drop { fill: var(--rain); transform: scale(calc(.55 + .45 * var(--p, 0))); transition: opacity .15s, transform .15s; }
/* armed (release to refresh): the drop turns into an arrow that flips up */
.ptr-arrow { fill: none; stroke: var(--rain); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.7); transition: opacity .15s, transform .28s var(--ease-out); }
.ptr.is-armed .ptr-arrow { opacity: 1; transform: rotate(180deg); }
.ptr.is-armed .ptr-drop, .ptr.is-busy .ptr-drop, .ptr.is-done .ptr-drop { opacity: 0; transform: scale(.5); }
/* refreshing: a short arc spins */
.ptr.is-busy svg { animation: ptr-spin .75s linear infinite; }
.ptr.is-busy .ptr-ring { stroke-dashoffset: 66 !important; transition: none; }
.ptr.is-busy .ptr-arrow { opacity: 0; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }
/* done: full green ring, the check draws itself, a small pop */
.ptr-check { fill: none; stroke: var(--dry); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 20; opacity: 0; }
.ptr.is-done .ptr-ring { stroke: var(--dry); stroke-dashoffset: 0 !important; }
.ptr.is-done .ptr-check { opacity: 1; animation: ptr-check .35s var(--ease-out) .05s forwards; }
.ptr.is-done svg { animation: m-pop .4s var(--pop); }
@keyframes ptr-check { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .ptr.is-done .ptr-check { stroke-dashoffset: 0; } }


/* Theme switch (theme.js): every background, border, shadow and icon colour glides from the old theme
   to the new together — the whole page changes as one, like the phone's bars do. Text colour doesn't
   glide (it's inherited, so nested glides lag); theme.js switches it at the equal-readability moment.
   The theme button keeps its own sun <-> moon morph. */
html.theme-switch, html.theme-switch body,
html.theme-switch :where(*, *::before, *::after):not(.theme-btn, .theme-btn *) {
  transition: background-color .6s cubic-bezier(.45, 0, .25, 1), border-color .6s cubic-bezier(.45, 0, .25, 1),
              box-shadow .6s cubic-bezier(.45, 0, .25, 1), fill .6s cubic-bezier(.45, 0, .25, 1),
              stroke .6s cubic-bezier(.45, 0, .25, 1) !important;
}

/* Report tags: the same icon on the form's chips and on the reports (status card, history), so
   "Parque vazio" or "Vento" read at a glance. Icons are masks painted in the text colour. */
.chip[data-tag]::before, .tag::before {
  content: ''; flex: none; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: var(--tag-icon) center / contain no-repeat; mask: var(--tag-icon) center / contain no-repeat;
}
.chip[data-tag] { display: inline-flex; align-items: center; gap: 6px; }
[data-tag="dirt"] { --tag-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 18h18M5 18c1.6-4.2 4.2-7 7-7s5.4 2.8 7 7'/%3E%3Cpath d='M9 14.5h.01M13 13h.01M15 16h.01'/%3E%3C/svg%3E"); }
[data-tag="leaves"] { --tag-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19c0-8 5-14 14-14 0 9-6 14-14 14z'/%3E%3Cpath d='M5 19l8.5-8.5'/%3E%3C/svg%3E"); }
[data-tag="debris"] { --tag-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4.5h6V7M6 7l1 13h10l1-13'/%3E%3C/svg%3E"); }
[data-tag="wind"] { --tag-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9h11a3 3 0 1 0-3-3M3 15h14a3 3 0 1 1-3 3'/%3E%3C/svg%3E"); }
[data-tag="crowded"] { --tag-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M3 20c0-3.3 2.7-6 6-6s6 2.7 6 6'/%3E%3Cpath d='M16 5.2a3 3 0 0 1 0 5.6M18 14.5c1.8.8 3 2.9 3 5.5'/%3E%3C/svg%3E"); }
[data-tag="empty"] { --tag-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3'/%3E%3Cpath d='M6 20c0-3.3 2.7-6 6-6s6 2.7 6 6'/%3E%3C/svg%3E"); }
.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 8px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; line-height: 1.3;
  background: color-mix(in srgb, currentColor 14%, transparent);
}
.tag::before { width: 15px; height: 15px; }
/* The estimate's own tags, right under its verdict (the report's tags stay on the report's row). */
.est-tags { margin-top: 10px; }
.tl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.tl-tags .tag { font-size: 12.5px; padding: 3px 9px 3px 7px; font-weight: 500; }

/* ---------- Dry-time timeline (in the card's explanation) ----------
   Scrolls sideways: the last 24 h left of now, the next 48 h right of it; it opens with now at the left
   edge and "dry" at the right. On the card's colour, in the text colour; the line takes each hour's
   state colour on a casing in the text colour. When the explanation opens the line draws from now
   across the part in view (app.js), the cursor's dot pops in on the dry hour. A tap glides the cursor. */
.est-chart { margin: 6px 0 0; --at: calc(var(--lead) + var(--i, 0) * var(--stag) + 140ms); }
.ch-read { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 48px; align-content: flex-start; font-variant-numeric: tabular-nums; }
.ch-time { font-size: 14px; font-weight: 700; }
.ch-read .ch-pill { padding: 3px 10px 3px 8px; font-size: 13px; transition: background-color .25s var(--ease-out), color .25s var(--ease-out); }
.ch-p, .ch-mm { font-size: 13px; opacity: .85; }
.ch-p { flex-basis: 100%; }
.ch-mm:empty { display: none; }
.ch-read.ch-tick .ch-time, .ch-read.ch-tick .ch-p, .ch-read.ch-tick .ch-mm { animation: ch-tick .22s var(--ease-out); }
@keyframes ch-tick { from { opacity: .35; transform: translateY(2px); } to { opacity: 1; transform: none; } }

/* The scrolling timeline, and a fixed gutter on the right for the % labels */
.ch-frame { position: relative; margin: 10px -12px 0; padding-inline-end: 34px; } /* -12px = CH_BLEED in app.js */
.est-chart { cursor: default; }
@property --fl { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --fr { syntax: '<length>'; inherits: false; initial-value: 0px; }
.ch-scroll {
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; outline: none;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; cursor: grab;
  --fl: 0px; --fr: 0px; transition: --fl .25s var(--ease-out), --fr .25s var(--ease-out);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fl), #000 calc(100% - var(--fr)), transparent);
  mask-image: linear-gradient(to right, transparent, #000 var(--fl), #000 calc(100% - var(--fr)), transparent);
}
.ch-scroll::-webkit-scrollbar { display: none; }
.ch-scroll.more-l { --fl: 20px; }
.ch-scroll.more-r { --fr: 20px; }
.ch-scroll.dragging { cursor: grabbing; }
.ch-scroll.ch-can-grab, .ch-scroll.ch-scrubbing { cursor: ew-resize; }
/* Holding the line: the dot grows a little and the line firms up (the chart stays still) */
.est[data-open="true"] .ch-cursor.ch-grab .ch-dot { scale: 1.3; transition: scale .25s var(--pop), top .12s var(--ease-out), background-color .2s var(--ease-out); }
.ch-cursor.ch-grab::before { opacity: .95; }
.ch-scroll:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 6px; }
.ch-track { position: relative; padding-top: 20px; } /* room for the "Now" tag */
.ch-plot { position: relative; height: 170px; }
.ch-plot svg, .ch-rain svg { display: block; overflow: visible; }
.ch-hr, .ch-6h, .ch-day, .ch-h, .ch-th, .ch-now { stroke: currentColor; stroke-width: 1; }
.ch-hr { opacity: .08; }
.ch-6h { opacity: .16; }
.ch-day { opacity: .38; }
.ch-h { opacity: .09; }
.ch-h-edge { opacity: .2; }
.ch-th { opacity: .45; stroke-dasharray: 3 3; }
.ch-before { fill: currentColor; opacity: .06; }
.ch-now { opacity: .7; stroke-width: 1.5; }
.ch-now-tag {
  position: absolute; top: -20px; transform: translateX(-50%); padding: 1px 7px; border-radius: 999px;
  background: currentColor; font-size: 11px; font-weight: 700; line-height: 1.5; white-space: nowrap;
}
.ch-now-tag > span { color: var(--c); } /* the card's colour, on a chip of the text colour */
.ch-area { fill: url(#chFill); }
.ch-line { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.ch-case { stroke: currentColor; stroke-width: 5; }
.ch-stage { stroke: currentColor; stroke-width: 2.4; }
.ch-dash { stroke-dasharray: .5 5.5; stroke-width: 2.8; } /* before now: dotted, it's what the model worked out */
.ch-past .ch-case { stroke-dasharray: .5 5.5; stroke-width: 5.2; }
/* Reports: a ringed dot in the reported state's colour */
.ch-rep { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 0 2.5px currentColor; }
.ch-rep[data-cond="dry"] { --rc: var(--dry); }
.ch-rep[data-cond="damp"] { --rc: var(--damp); }
.ch-rep[data-cond="puddles"] { --rc: var(--puddles); }
.ch-rep[data-cond="wet"] { --rc: var(--wet); }
/* Cursor: a hairline down the plot and the rain, and a dot on the line in that hour's state colour */
.ch-cursor { position: absolute; top: 0; left: 0; bottom: 0; width: 0; pointer-events: none; --cc: currentColor; will-change: transform; }
.ch-cursor::before { content: ''; position: absolute; top: 0; bottom: -40px; left: -.75px; width: 1.5px; background: currentColor; opacity: .6; border-radius: 1px; }
.ch-cursor.ch-glide { transition: transform .32s var(--ease-out); }
.ch-cursor[data-cond="dry"] { --cc: var(--dry); }
.ch-cursor[data-cond="damp"] { --cc: var(--damp); }
.ch-cursor[data-cond="puddles"] { --cc: var(--puddles); }
.ch-cursor[data-cond="wet"] { --cc: var(--wet); }
.ch-dot {
  position: absolute; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: var(--cc); box-shadow: 0 0 0 3px currentColor, 0 2px 8px rgb(0 0 0 / .25);
  scale: 0; transition: scale .12s ease-in, top .32s var(--ease-out), background-color .2s var(--ease-out);
}
.est[data-open="true"] .ch-dot { scale: 1; transition: scale .45s var(--pop) calc(var(--at) + .12s), top .32s var(--ease-out), background-color .2s var(--ease-out); }
.est[data-open="true"] .ch-enter .ch-dot { transition: scale .45s var(--pop) calc(var(--at) + .12s), background-color .15s linear; } /* riding: top follows the line every frame */
/* Rain per hour, under the plot, on the same hours */
.ch-rain { height: 30px; margin-top: 10px; }
.ch-bar {
  fill: url(#chBarFill); opacity: .62; transform-box: fill-box; transform-origin: 50% 100%;
  transition: transform .6s var(--pop), opacity .25s var(--ease-out);
}
.ch-bar.is-past { opacity: .34; }
.ch-bar.is-sel { opacity: 1; }
.ch-bar.is-past.is-sel { opacity: .75; }
.ch-rain-base { stroke: currentColor; stroke-width: 1; opacity: .18; }
/* Entrance (app.js chEntrance): bars wait at zero until the line reaches them, then spring up. */
.ch-enter .ch-bar:not(.is-up) { transform: scaleY(0); }
.ch-enter .ch-hr, .ch-enter .ch-6h, .ch-enter .ch-day, .ch-enter .ch-h, .ch-enter .ch-th { animation: ch-fade .5s var(--ease-out) var(--d) backwards; }
.ch-enter .ch-past, .ch-enter .ch-area-past, .ch-enter .ch-before { animation: ch-fade .6s var(--ease-out) calc(var(--d) + 80ms) backwards; }
.ch-enter .ch-now { transform-box: fill-box; transform-origin: 50% 0; animation: ch-grow .5s var(--ease-out) var(--d) backwards; }
.ch-enter .ch-now-tag { animation: ch-tag .5s var(--pop) calc(var(--d) + 140ms) backwards; }
.ch-enter .ch-rep { animation: ch-pop-in .45s var(--pop) calc(var(--d) + 300ms) backwards; }
.ch-enter .ch-y > span, .ch-enter .ch-axis > span, .ch-enter .ch-ticks { animation: ch-fade .5s var(--ease-out) calc(var(--d) + 60ms) backwards; }
@keyframes ch-fade { from { opacity: 0; } }
@keyframes ch-grow { from { transform: scaleY(0); } }
@keyframes ch-tag { from { opacity: 0; transform: translate(-50%, 6px) scale(.6); } }
@keyframes ch-pop-in { from { scale: 0; } }
/* The dot lands (end of the entrance, or a tap): one ring in its colour */
.ch-dot::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--cc); opacity: 0; pointer-events: none; }
.ch-dot.ch-land::after { animation: ch-ring .75s var(--ease-out); }
@keyframes ch-ring { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(2.6); } }
.ch-ticks { position: relative; height: 5px; margin-top: 2px; }
.ch-ticks > i { position: absolute; top: 0; width: 1px; height: 3px; margin-left: -.5px; background: currentColor; opacity: .35; }
.ch-ticks > i.is-major { height: 5px; opacity: .7; }
.ch-axis { position: relative; height: 16px; margin-top: 2px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.ch-axis > span { position: absolute; top: 0; transform: translateX(-50%); opacity: .85; white-space: nowrap; }
.ch-axis > .ch-d { font-weight: 700; opacity: .95; }
/* Fixed labels in the gutter (same top offset as the track: 20px) */
.ch-y { position: absolute; top: 20px; right: 0; width: 34px; pointer-events: none; }
.ch-y > span { position: absolute; left: 6px; transform: translateY(-50%); font-size: 10.5px; font-weight: 600; opacity: .85; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ch-y > .ch-y-th { opacity: 1; }
.ch-y > .ch-y-rain { transform: translateY(-100%); }
.est-c-key { margin: 6px 0 0 !important; font-size: 12px; opacity: .85; }
@media (hover: hover) and (pointer: fine) { .ch-scroll { scrollbar-width: thin; } }
@media (prefers-reduced-motion: reduce) {
  .ch-read.ch-tick *, .ch-dot.ch-land::after { animation: none !important; }
  .ch-bar { transition: opacity .2s; }
  .ch-cursor.ch-glide, .ch-dot, .est[data-open="true"] .ch-dot, .ch-scroll { transition: none; }
}

/* ---------- Opening the app ----------
   While the card waits for its first real content it says "Loading…" softly breathing; then it glides
   from grey to its colour and its lines rise in, one after another (app.js renderLead). */
.status:not([data-lead]) #statusTitle, .status[data-lead="loading"] #statusTitle { animation: ld-breathe 1.6s ease-in-out infinite; }
@keyframes ld-breathe { 50% { opacity: .55; } }
.m-reveal { animation: m-reveal .6s var(--ease-out) backwards; }
@keyframes m-reveal { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } }
@media (prefers-reduced-motion: reduce) {
  .status:not([data-lead]) #statusTitle, .status[data-lead="loading"] #statusTitle, .m-reveal { animation: none; }
}


/* =================== Every spot (2026-11-23) =================== */
/* The Rain Check mark (brand/raincheck-mark.svg) in place of the PdG badge: a drop, no round crop or ring. */
.logo-rc { border-radius: 0; box-shadow: none; }

/* Two calm rows: the name on its own, then one line of facts as plain text with dots between (only the kind
   has its icon, in the ink colour), ending with the way there as a blue link. On narrow phones the line wraps
   (app.js factDots hides a dot left at a line's end). Nothing here competes with the condition card below. */
.spot-info { grid-area: info; margin-top: -6px; min-width: 0; }
.top:not(.no-map) { grid-template-areas: "back actions" "brand brand" "info info"; }
.spot-facts { display: flex; flex-wrap: wrap; align-items: center; row-gap: 2px; min-width: 0; margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.spot-facts .fact::after { content: "·"; margin: 0 7px; opacity: .6; color: var(--ink-2); }
.spot-facts .fact-end::after { visibility: hidden; }
.spot-facts .spot-kind::after, .spot-facts .spot-tag::after { margin-inline-start: 2px; } /* (their flex gap already adds 5 / 4 px) */
.spot-kind { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-weight: 600; white-space: nowrap; }
.spot-kind svg, .spot-tag svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spot-tag-list { display: contents; }
.spot-tag { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.spot-tag svg { width: 14px; height: 14px; }
.spot-where, .spot-note { white-space: nowrap; }
.spot-note { font-style: italic; }
/* Directions: the page's one way out to another app, a link in the brand's blue (>= 4.5:1), with a 44 px
   tall tap area. */
.spot-go { --go: color-mix(in srgb, var(--rain) 72%, #0b1a33); position: relative; display: inline-flex; align-items: center; gap: 5px; color: var(--go); font-weight: 600; text-decoration: none; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.spot-go::after { content: ''; position: absolute; inset: -12px -6px; } /* tap area */
.spot-go svg { width: 15px; height: 15px; fill: color-mix(in srgb, currentColor 18%, transparent); stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .spot-go svg { transform: scaleX(-1); }
@media (hover: hover) { .spot-go:hover span { text-decoration: underline; text-underline-offset: 3px; } }
.spot-go:focus-visible { outline: 3px solid color-mix(in srgb, var(--rain) 55%, transparent); outline-offset: 3px; border-radius: 6px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .spot-go { --go: color-mix(in srgb, var(--rain) 62%, #fff); } }
[data-theme="dark"] .spot-go { --go: color-mix(in srgb, var(--rain) 62%, #fff); }

.share-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .share-btn:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); } }

/* A dry spot nearby, right under a wet card: one tappable row in the dry colour. */
.near-dry {
  order: 1; margin-top: 12px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 12px 14px 12px 16px; border-radius: 18px; text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, var(--dry) 11%, var(--surface)); border: 1px solid color-mix(in srgb, var(--dry) 35%, var(--line));
  -webkit-tap-highlight-color: transparent; transition: transform .12s var(--ease-out), background-color .18s var(--ease-out);
}
@media (hover: hover) { .near-dry:hover { background: color-mix(in srgb, var(--dry) 16%, var(--surface)); } }
.near-dry:active { transform: scale(var(--press-lg)); }
.near-dry:focus-visible { outline: 3px solid color-mix(in srgb, var(--dry) 60%, transparent); outline-offset: 2px; }
.near-dry-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--dry); box-shadow: 0 0 0 4px color-mix(in srgb, var(--dry) 22%, transparent); }
.near-dry-txt { display: flex; flex-direction: column; min-width: 0; }
.near-dry-txt small { font-size: 13px; font-weight: 700; color: var(--t-dry); }
.near-dry-txt strong { font-size: 16px; line-height: 1.25; letter-spacing: -.01em; text-wrap: balance; }
.near-dry-txt span { font-size: 13.5px; color: var(--ink-2); }
.near-dry-go { width: 20px; height: 20px; fill: none; stroke: var(--ink-2); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .near-dry-go { transform: scaleX(-1); }
.near-dry.m-in { animation: sq-in .42s var(--ease-out) both; }

/* First visit: the etiquette as a one-line teaser under the report (closed, no subtitle). */
html:not([data-back]) #etiquette:not([open]) summary { padding-block: 10px; }
html:not([data-back]) #etiquette:not([open]) .etq-sum small { display: none; }
html:not([data-back]) #etiquette:not([open]) .etq-icon { font-size: 20px; }
html:not([data-back]) #etiquette:not([open]) .etq-sum strong { font-size: 15.5px; }

/* A closed spot: a plain line where the report form was. */
.closed-note { margin: 16px 0 0; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 18px; font-size: 15px; color: var(--ink-2); }

/* Spots nearby: the map's rows (dot in the condition colour with the kind's icon, name, distance and state). */
.near-list { list-style: none; margin: 0; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.near-row {
  --c: var(--none);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 10px; border-radius: 14px; color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent;
  transition: background-color .15s var(--ease-out), transform .12s var(--ease-out);
}
.near-list li + li .near-row { margin-top: 2px; }
@media (hover: hover) { .near-row:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); } }
.near-row:active { background: color-mix(in srgb, var(--ink) 7%, transparent); transform: scale(var(--press-lg)); }
.near-row:focus-visible { outline: 3px solid color-mix(in srgb, var(--ink) 40%, transparent); outline-offset: -3px; }
.near-row[data-cond="dry"] { --c: var(--dry); --ct: var(--t-dry); }
.near-row[data-cond="damp"] { --c: var(--damp); --ct: var(--t-damp); }
.near-row[data-cond="puddles"] { --c: var(--puddles); --ct: var(--t-puddles); }
.near-row[data-cond="wet"] { --c: var(--wet); --ct: var(--t-wet); }
.near-dot { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--c); color: #fff; }
.near-row[data-cond="damp"] .near-dot { color: #241b00; }
.near-row[data-cond="none"] .near-dot { background: var(--chip); color: var(--ink-2); }
/* Not verified yet (imported): a quieter dot, as on the map. */
.near-row[data-unv] .near-dot { scale: .84; outline: 1.5px dashed color-mix(in srgb, var(--ink) 45%, transparent); outline-offset: 2px; }
.near-dot svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.near-txt { display: flex; flex-direction: column; min-width: 0; }
.near-name { font-weight: 700; font-size: 15px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-wrap: balance; }
[dir="rtl"] .near-name { text-align: right; } /* a Latin name (dir=auto) at the reading start */
.near-sub { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.near-badge { padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--ct, var(--ink-2)); }
.near-row[data-cond="none"] .near-badge { display: none; }
/* Last row: the map, for everything further away. */
.near-map .near-dot { background: color-mix(in srgb, var(--rain) 14%, var(--surface)); color: color-mix(in srgb, var(--rain) 70%, var(--ink)); }
.near-map .near-name { font-weight: 600; }
.near-go { width: 18px; height: 18px; fill: none; stroke: var(--ink-2); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .near-go { transform: scaleX(-1); }
/* Opening a spot from here: this row becomes its status card (view transitions, index.html). */
.near-row.vt { view-transition-name: spot-card; }
.near-row.vt .near-name, .near-dry.vt strong { view-transition-name: spot-name; }
.near-dry.vt { view-transition-name: spot-card; }
@media (prefers-reduced-motion: reduce) { .near-dry.m-in { animation: none; } }
/* A closed spot's card: the sentence is the title, a size down so it doesn't take the whole screen. */
.status[data-lead="closed"] h1 { font-size: clamp(30px, 9vw, 40px); line-height: 1.08; text-wrap: balance; }

/* ---------- After your own report: one short touch tied to what you said (app.js celebrate) ----------
   Under 700 ms, once, on the card (with the sheen and its small lift above). Dry: a glint and three
   sparkles; damp: a few drops settle; puddles: rings spread; soaked: a quick shower. Nothing with reduced
   motion (the global rule above, and app.js doesn't add it). */
.cel { position: absolute; inset: 0; z-index: 1; overflow: hidden; border-radius: inherit; pointer-events: none; }
.cel i { position: absolute; display: block; }
.cel-dry i {
  width: 16px; height: 16px; background: #fff;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: cel-glint .5s var(--ease-out) calc(var(--i) * 70ms + 60ms) both;
}
.cel-dry i:nth-child(1) { right: 22%; top: 18%; }
.cel-dry i:nth-child(2) { right: 12%; top: 38%; width: 10px; height: 10px; }
.cel-dry i:nth-child(3) { right: 30%; top: 46%; width: 8px; height: 8px; }
@keyframes cel-glint { from { transform: scale(0) rotate(-45deg); opacity: 0; } 45% { transform: scale(1.1) rotate(0deg); opacity: 1; } to { transform: scale(.4) rotate(20deg); opacity: 0; } }
.cel-damp i, .cel-wet i {
  width: 7px; height: 10px; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: rgb(255 255 255 / .85);
  animation: cel-drop .55s cubic-bezier(.4, 0, .9, .6) calc(var(--i) * 50ms) both;
}
.cel-damp i:nth-child(1) { right: 18%; top: 12%; } .cel-damp i:nth-child(2) { right: 30%; top: 8%; }
.cel-damp i:nth-child(3) { right: 9%; top: 20%; } .cel-damp i:nth-child(4) { right: 24%; top: 26%; }
@keyframes cel-drop { from { transform: translateY(-10px) scale(.6); opacity: 0; } 35% { opacity: 1; } to { transform: translateY(26px) scale(1); opacity: 0; } }
.cel-wet i { width: 2px; height: 16px; border-radius: 1px; background: rgb(255 255 255 / .7); animation-name: cel-rain; animation-duration: .42s; }
.cel-wet i:nth-child(1) { right: 8%; top: 4%; } .cel-wet i:nth-child(2) { right: 17%; top: 0; } .cel-wet i:nth-child(3) { right: 26%; top: 8%; }
.cel-wet i:nth-child(4) { right: 35%; top: 2%; } .cel-wet i:nth-child(5) { right: 13%; top: 22%; } .cel-wet i:nth-child(6) { right: 30%; top: 26%; }
@keyframes cel-rain { from { transform: translate(6px, -14px) rotate(14deg); opacity: 0; } 30% { opacity: 1; } to { transform: translate(-6px, 34px) rotate(14deg); opacity: 0; } }
.cel-puddles i {
  right: 14%; bottom: 16%; width: 54px; height: 18px; margin: -9px -27px 0 0; border: 2px solid rgb(255 255 255 / .75); border-radius: 50%;
  animation: cel-ripple .62s var(--ease-out) calc(var(--i) * 110ms) both;
}
@keyframes cel-ripple { from { transform: scale(.2); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }
.status[data-cond="damp"] .cel i { background: rgb(36 27 0 / .45); }
.status[data-cond="damp"] .cel-puddles i { background: none; border-color: rgb(36 27 0 / .4); }

/* ---------- Numbers that change in place don't shift their neighbours (temperature, %, times) ---------- */
#wTemp, .w-pct, .kicker, .status-report > span, .est-line, .near-sub, .w-details, .w-rain { font-variant-numeric: tabular-nums; }


/* =================== Map <-> spot: one card (view transitions, 2026-11-24) ===================
   Opening a spot from the map's card (or a nearby row) morphs that card into this page's status card, and
   back. Shared by both pages (map.html loads this file too); what the rest of each page does is in the page
   arriving: index.html (the map recedes, the page rises in) and map.css (the map comes forward).
   The box glides on the iOS sheet curve (.42 s, same both ways). Its two pictures swap early, while it moves
   fastest, added together (plus-lighter) on one curve so the colour never thins; the name rides on top of
   it, from the card's title up to the header, turning from white to ink as it leaves the card (early: it
   leaves the card within the first ~80 ms).
   Only opacity and transform here. The two pages opt in themselves (index.html, map.css: other pages that
   load this file don't), and only without reduced motion. */
.status { view-transition-name: spot-card; }
#parkName { view-transition-name: spot-name; }
::view-transition-group(spot-card), ::view-transition-group(spot-name) { animation-duration: .42s; animation-timing-function: cubic-bezier(.32, .72, 0, 1); }
::view-transition-group(spot-name) { z-index: 1; }
::view-transition-image-pair(spot-card) { isolation: isolate; }
/* The two cards differ in height: their pictures fill the box, top-aligned (no squash, no gap). */
::view-transition-old(spot-card), ::view-transition-new(spot-card) {
  height: 100%; object-fit: cover; object-position: top; mix-blend-mode: plus-lighter;
  animation: .22s cubic-bezier(.65, 0, .35, 1) .04s both vt-fade-out;
}
::view-transition-new(spot-card) { animation-name: vt-fade-in; }
::view-transition-old(spot-name), ::view-transition-new(spot-name) { mix-blend-mode: normal; animation: .2s cubic-bezier(.65, 0, .35, 1) .04s both vt-fade-out; }
::view-transition-new(spot-name) { animation-name: vt-fade-in; }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }
@keyframes vt-recede { to { opacity: 0; transform: scale(.96); } }
@keyframes vt-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes vt-come { from { opacity: 0; transform: scale(.96); } }
/* Arrived by the morph (html.vt-morph, index.html): it was the card's and header's opening; they don't rise
   again when it ends. Arrived from a card without one (html.vt-in only: no cross-document transitions, e.g.
   Firefox, older Safari): the card, already in its colour, just fades in quickly. (:where keeps these below
   the card's own one-off animations, like the sheen after a report.) */
:where(.vt-morph) :is(.top, .status) { animation: none; }
:where(.vt-in:not(.vt-morph)) :is(.top, .status) { animation: m-fade-in .24s var(--ease-out) backwards; }
/* The card shows the colour it arrived with: it doesn't breathe "loading" over it, nor glide while morphing. */
html.vt-in .status:not([data-cond="none"]) #statusTitle { animation: none; }
html.vt-run .status-frame > .status { transition: none; }
