/* Get Frothin’: a sand-coloured page under a full-bleed "verdict poster" whose colour,
   and animated sea, come from the day's conditions. Phone first. */

:root {
  --sand: #f5efe3;
  --sand-2: #ece3d2;
  --card: #fffdf8;
  --ink: #10222b;
  --muted: #6b726f;
  --line: #e4dac6;
  --accent: #0b6a80;
  --warn-bg: #fff1d6;
  --warn-ink: #7a4b00;
  --display: "Bricolage Grotesque", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 20px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sand: #0c171c;
    --sand-2: #13232a;
    --card: #152830;
    --ink: #eef3f1;
    --muted: #93a39f;
    --line: #22383f;
    --accent: #4cc6dd;
    --warn-bg: #3a2b10;
    --warn-ink: #f4d08a;
    color-scheme: dark;
  }
}

/* tones: the colour of the day */
.tone-0 { --tone: #1d3a66; --tone-deep: #0a1730; } /* the logo's midnight */
.tone-1 { --tone: #d9603a; --tone-deep: #93341f; }
.tone-2 { --tone: #e0a126; --tone-deep: #a8601a; }
.tone-3 { --tone: #1f9d6b; --tone-deep: #0b5b4a; }
.tone-4 { --tone: #13a3b8; --tone-deep: #0a3f5c; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { background: var(--sand); }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font: 16px/1.45 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { max-width: 560px; margin: 0 auto; padding-bottom: 32px; }
body.has-bar .seo-block { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
/* With the app running, Explore lives in its own tab. Without JavaScript (crawlers) it's always shown. */
body.app-ready:not(.in-explore) .seo-block { display: none; }
body.in-explore .seo-block { padding-top: calc(env(safe-area-inset-top) + 20px); }

/* Explore: every break's page and the guides. Plain links, so search engines and AI assistants can follow them. */
.seo-block { max-width: 560px; margin: 0 auto; padding: 4px var(--gutter) 40px; }
.seo-block h2 { font-family: var(--display); font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 12px; }
.break-cards { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.break-cards a {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; height: 100%;
  padding: 12px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
}
.break-cards strong { font-family: var(--display); font-size: 1.02rem; line-height: 1.15; }
.break-cards .tag { font-size: 0.7rem; font-weight: 800; color: #fff; padding: 2px 8px; border-radius: 999px; }
.break-cards .tag.lvl-learner { background: #1f9d6b; }
.break-cards .tag.lvl-beginner { background: #13a3b8; }
.break-cards .tag.lvl-intermediate { background: #7a5bd6; }
.break-cards .tag.lvl-advanced { background: #10222b; }
@media (prefers-color-scheme: dark) { .break-cards .tag.lvl-advanced { background: #5d7a84; } }
.seo-today { margin: 0 0 12px; padding: 12px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.seo-today summary { font-weight: 800; cursor: pointer; }
.seo-today ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 0.92rem; }
.seo-today a { color: var(--ink); font-weight: 700; }
.guide-links { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.guide-links a {
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent;
  color: var(--ink); font-weight: 700; font-size: 0.88rem; text-decoration: none;
}
.seo-about { color: var(--muted); font-size: 0.85rem; line-height: 1.5; }

h1, h2, h3, p { margin: 0; }
.icon { width: 1.15em; height: 1.15em; flex: none; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* snappy touch: no double-tap zoom delay, instant pressed feedback */
button, a, label, select { touch-action: manipulation; }
button { font: inherit; color: inherit; cursor: pointer; user-select: none; -webkit-user-select: none; }
button:active:not(:disabled) { transform: scale(0.96); }
button { transition: transform 0.08s ease-out, background-color 0.15s, color 0.15s; }
button:disabled { opacity: 0.55; cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- the verdict poster ---------- */

.hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(120% 70% at 85% 0%, rgb(255 255 255 / 0.22), transparent 60%),
    linear-gradient(170deg, var(--tone), var(--tone-deep));
  padding: calc(env(safe-area-inset-top) + 10px) var(--gutter) 108px;
  overflow: hidden;
  isolation: isolate;
}

.top { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; }
/* The wordmark: GET FROTHIN’ in chunky, stocky caps. */
.brand span {
  text-transform: uppercase; font-size: 1.22rem; line-height: 1; letter-spacing: -0.02em; white-space: nowrap;
  font-variation-settings: 'opsz' 96; text-shadow: 0 2px 0 rgb(0 0 0 / 0.12);
}
.brand-icon { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 2px 10px rgb(0 0 0 / 0.18); }

.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
  padding: 0 14px; border: 0; border-radius: 999px;
  background: rgb(255 255 255 / 0.2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-weight: 700; font-size: 0.9rem;
}
.dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px rgb(255 255 255 / 0.7); }

.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 14px 0 24px; }
.days button {
  min-width: 0; min-height: 48px; padding: 4px 0; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
  border: 1.5px solid rgb(255 255 255 / 0.4); background: transparent;
  font-weight: 800; font-size: 0.78rem;
}
.days button.active { background: #fff; border-color: #fff; color: var(--tone-deep); }

.kicker { font-weight: 700; font-size: 0.95rem; opacity: 0.9; letter-spacing: 0.01em; }
.verdict {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(4.2rem, 24vw, 7.5rem); line-height: 0.9; letter-spacing: -0.06em;
  margin: 6px 0 10px -0.04em;
  text-shadow: 0 4px 30px rgb(0 0 0 / 0.12);
}
.verdict.loading { opacity: 0.6; animation: breathe 1.4s ease-in-out infinite; }
.where { font-size: 1.15rem; opacity: 0.95; }
.where strong { font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; }
.tagline { font-size: 1.05rem; margin-top: 10px; max-width: 30ch; opacity: 0.95; }

.pill-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 18px;
  padding: 0 18px; border: 0; border-radius: 999px;
  background: #fff; color: var(--tone-deep, var(--ink)); font-weight: 800;
}
.pill-btn.ghost { background: rgb(255 255 255 / 0.2); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pill-btn.dark { background: var(--ink); color: var(--sand); margin-top: 4px; justify-self: start; }
.icon.down { transform: rotate(90deg); }
.icon.up { transform: rotate(-90deg); }

/* the animated sea, generated from the forecast */
.sea { position: absolute; left: 0; right: 0; bottom: -1px; height: 96px; z-index: -1; }
.sea path { transform-box: fill-box; animation: drift linear infinite; }
.sea .w1 { fill: rgb(255 255 255 / 0.14); }
.sea .w2 { fill: rgb(255 255 255 / 0.22); }
.sea path.rev { animation-direction: reverse; }
.sea .w3 { fill: var(--sand); }
@keyframes drift { to { transform: translateX(-50%); } }
@keyframes breathe { 50% { opacity: 0.3; } }
/* Motion follows the device's "reduce motion" setting unless the user picks On or Off in settings. */
@media (prefers-reduced-motion: reduce) {
  html:not(.motion-on) :is(.sea path, .rider-track, .rider-body, .figure .arm, .verdict.loading, .live-dot, .sky *, .sky *::after) { animation: none !important; }
}
html.motion-off :is(.sea path, .rider-track, .rider-body, .figure .arm, .verdict.loading, .live-dot, .sky *, .sky *::after) { animation: none !important; }

/* ---------- content below the poster ---------- */

.card { background: var(--card); border-radius: 24px; padding: 18px; }
.why { margin: -8px var(--gutter) 16px; box-shadow: 0 10px 30px rgb(16 34 43 / 0.08); position: relative; }
.eyebrow { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.backup { margin-top: 12px; font-size: 0.93rem; color: var(--muted); }
.backup strong { color: var(--ink); }

.reasons, .warnings { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.reasons li, .warnings li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.reasons .icon, .warnings .icon { margin-top: 0.15em; }
.reasons .icon { color: var(--accent); }
.warnings { margin-top: 10px; }
.warnings li { background: var(--warn-bg); color: var(--warn-ink); padding: 9px 11px; border-radius: 12px; }

/* conditions: a swipeable strip of stats */
.strip {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
  padding: 2px var(--gutter) 0; margin-bottom: 26px;
}
.stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
.strip::-webkit-scrollbar { display: none; }
.stat {
  min-width: 0; display: flex; flex-direction: column; gap: 1px;
  background: var(--card); border-radius: 18px; padding: 12px 14px;
}
.stat-label { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.stat-label .icon { color: var(--accent); }
.stat strong { font-family: var(--display); font-size: 1.2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; margin-top: 4px; }
.stat small { color: var(--muted); font-size: 0.8rem; line-height: 1.3; }

.banner { margin: 0 var(--gutter) 20px; background: var(--warn-bg); color: var(--warn-ink); border-radius: 14px; padding: 10px 14px; font-size: 0.9rem; }

.block { padding: 0 var(--gutter); margin-bottom: 28px; }
.block h2 {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 12px;
}
.count {
  font-family: var(--body); font-size: 0.8rem; font-weight: 800;
  min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px;
  display: inline-grid; place-items: center; background: var(--ink); color: var(--sand);
}
.empty { color: var(--muted); }

/* who's in the water */
.crew { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.crew li { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border-radius: 20px; padding: 12px 14px; }
.avatar {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px;
  color: #fff; font-family: var(--display); font-weight: 800; font-size: 1.1rem;
}
.who { min-width: 0; }
.who p { display: flex; flex-wrap: wrap; align-items: center; }
.who .note { font-size: 0.95rem; margin-top: 2px; }
.who small { color: var(--muted); font-size: 0.8rem; }
.rated { display: inline-flex; margin-left: 6px; color: var(--muted); }
.rated.r3 { color: #d9603a; }
.rated.r2 { color: #1f9d6b; }

/* level colours */
.lvl-learner { background: #1f9d6b; }
.lvl-beginner { background: #13a3b8; }
.lvl-intermediate { background: #7a5bd6; }
.lvl-advanced { background: #10222b; }
@media (prefers-color-scheme: dark) { .lvl-advanced { background: #5d7a84; } }

/* the line-up leaderboard */
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.spot { background: var(--card); border-radius: 18px; overflow: hidden; transition: box-shadow 0.15s; }
.spot.open { box-shadow: 0 8px 24px rgb(16 34 43 / 0.08); }
.spot-head {
  width: 100%; min-height: 62px; display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border: 0; background: none; text-align: left;
}
.spot-head:active:not(:disabled) { transform: none; background: var(--sand-2); }
.rank { font-family: var(--display); font-weight: 800; font-size: 1.3rem; color: var(--tone); width: 2ch; letter-spacing: -0.04em; }
.spot-name { flex: 1; min-width: 0; font-weight: 700; display: flex; flex-direction: column; }
.spot-name small { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.out-count { display: inline-flex; align-items: center; gap: 4px; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.tag {
  flex: none; min-width: 70px; text-align: center; padding: 6px 10px; border-radius: 999px;
  background: var(--tone); color: #fff; font-size: 0.82rem; font-weight: 800;
}
.spot-body { padding: 0 16px 16px 52px; display: grid; gap: 12px; animation: open 0.18s ease-out; }
.spot-body .about { color: var(--muted); font-size: 0.95rem; }
.hazard { display: flex; gap: 10px; font-size: 0.9rem; color: var(--muted); }
.hazard .icon { margin-top: 0.15em; }
@keyframes open { from { opacity: 0; transform: translateY(-4px); } }

footer { padding: 0 var(--gutter); text-align: center; color: var(--muted); font-size: 0.8rem; display: grid; gap: 4px; }
footer a { color: inherit; }
.refresh { border: 0; background: none; color: var(--muted); font-size: 0.85rem; font-weight: 700; min-height: 40px; }

/* ---------- thumb bar ---------- */

.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--sand) 60%, transparent);
}
.bar:empty { display: none; }
.bar > * { max-width: 528px; margin: 0 auto; }
.go {
  width: 100%; min-height: 60px; display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 999px; background: var(--ink); color: var(--sand);
  font-family: var(--display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em;
  box-shadow: 0 10px 30px rgb(16 34 43 / 0.25);
}
.go .icon { width: 26px; height: 26px; }
.bar-actions { display: flex; gap: 8px; }
.bar-actions .go { flex: 1.3; min-width: 0; padding: 0 12px; gap: 8px; white-space: nowrap; font-size: 1.12rem; }
.bar-actions .go.secondary {
  flex: 1; background: var(--sand); color: var(--ink); font-size: 1rem;
  box-shadow: inset 0 0 0 2px var(--ink), 0 10px 30px rgb(16 34 43 / 0.18);
}
.bar-actions .go .icon { width: 22px; height: 22px; flex: none; }
@media (max-width: 400px) {
  .bar-actions .go { font-size: 1rem; gap: 6px; padding: 0 10px; }
  .bar-actions .go.secondary { font-size: 0.9rem; }
  .bar-actions .go .icon { width: 19px; height: 19px; }
}
.session {
  display: flex; align-items: center; gap: 4px; min-height: 64px;
  background: var(--ink); color: var(--sand); border-radius: 999px; padding: 8px 6px 8px 18px;
  box-shadow: 0 10px 30px rgb(16 34 43 / 0.25);
}
.session-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.session-info small { opacity: 0.7; font-size: 0.78rem; }
.session-info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rate { display: flex; gap: 2px; }
.rate-btn, .leave {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgb(255 255 255 / 0.1); color: inherit;
}
@media (prefers-color-scheme: dark) { .rate-btn, .leave { background: rgb(0 0 0 / 0.08); } }
.rate-btn.active { background: #13a3b8; color: #fff; }
.leave { background: none; opacity: 0.75; }

/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 20;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 14px;
  background: var(--ink); color: var(--sand); font-size: 0.9rem; font-weight: 600;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- sheets (dialogs) ---------- */

dialog {
  border: 0; padding: 24px 22px calc(22px + env(safe-area-inset-bottom));
  width: 100vw; max-width: 480px; margin: auto auto 0; border-radius: 28px 28px 0 0;
  background: var(--card); color: var(--ink);
}
dialog[open] { animation: sheet 0.22s cubic-bezier(0.2, 0.9, 0.3, 1); }
dialog::backdrop { background: rgb(8 20 26 / 0.5); }
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 561px) { dialog { margin: auto; border-radius: 28px; padding-bottom: 22px; } }
dialog h2 { font-family: var(--display); font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
dialog .muted { margin-top: 4px; }

.field { display: grid; gap: 6px; margin: 14px 0; font-weight: 700; font-size: 0.85rem; }
.field input, .field select {
  font: inherit; font-size: 1rem; font-weight: 500; /* 16px stops iOS zooming in on focus */
  min-height: 52px; padding: 0 16px; border-radius: 16px;
  border: 1.5px solid var(--line); background: var(--sand); color: var(--ink);
}
.levels { display: grid; gap: 8px; margin-top: 16px; }
.level-option {
  display: flex; gap: 14px; align-items: center; min-height: 60px; padding: 10px 16px;
  border: 2px solid var(--line); border-radius: 18px; cursor: pointer; touch-action: manipulation;
}
.level-option input { position: absolute; opacity: 0; pointer-events: none; }
.level-option .dot { width: 14px; height: 14px; box-shadow: none; }
.level-option span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.level-option small { color: var(--muted); }
.level-option:has(input:checked) { border-color: var(--ink); background: var(--sand); }
.level-option:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.actions { display: flex; gap: 8px; margin-top: 10px; }
.actions .btn { flex: 1; min-height: 54px; border-radius: 999px; font-weight: 800; font-size: 1rem; border: 0; background: var(--sand-2); }
.actions .btn.primary { background: var(--ink); color: var(--sand); flex: 2; }

/* ---------- account (Sign in with Tide) ---------- */
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.account-status { font-weight: 700; }
.account-status.on::before {
  content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%;
  background: #1fb57a; vertical-align: 1px;
}
.account-row .btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 999px; border: 0; background: var(--sand-2); color: var(--ink); font-weight: 800; font-size: 0.95rem;
}
.account-row .btn.tide { background: var(--ink); color: var(--sand); }
.account-row .btn .icon { width: 18px; height: 18px; }

/* ---------- segmented choices (alerts, session rating) ---------- */

fieldset.field { border: 0; padding: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; }
.seg { display: flex; gap: 6px; }
.seg-option { flex: 1; position: relative; touch-action: manipulation; }
.seg-option input { position: absolute; opacity: 0; pointer-events: none; }
.seg-option span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 52px; padding: 8px 6px; border-radius: 16px; text-align: center;
  border: 2px solid var(--line); font-weight: 700; font-size: 0.88rem; cursor: pointer;
}
.seg-option .icon { width: 22px; height: 22px; }
.seg-option input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--sand); }
.seg-option input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.seg-option input:disabled + span { opacity: 0.45; cursor: not-allowed; }
.hint { font-weight: 400; font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
.field-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.field-row .field { margin: 0; }
dialog { max-height: 92vh; overflow-y: auto; }

/* ---------- alert nudge ---------- */

.nudge {
  display: flex; gap: 14px; margin: 0 var(--gutter) 28px; padding: 16px;
  background: var(--card); border-radius: 24px; border: 2px dashed var(--line);
}
.nudge-icon {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: var(--ink); color: var(--sand);
}
.nudge strong { font-family: var(--display); font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
.nudge p { color: var(--muted); font-size: 0.93rem; margin-top: 2px; }
.nudge-actions { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.nudge-actions .pill-btn { margin: 0; }
.link { border: 0; background: none; color: var(--muted); font-weight: 700; padding: 8px 0; text-decoration: underline; min-height: 40px; }

/* ---------- your sessions ---------- */

.learning { display: flex; gap: 8px; align-items: flex-start; font-size: 0.93rem; margin-bottom: 10px; }
.learning .icon { color: #e0a126; margin-top: 0.1em; }
.log { list-style: none; margin: 0 0 14px; padding: 4px 16px; background: var(--card); border-radius: 20px; }
.log li { display: flex; align-items: center; gap: 12px; min-height: 52px; border-top: 1px solid var(--line); }
.log li:first-child { border-top: 0; }
.log .rated { margin: 0; }
.log-spot { flex: 1; font-weight: 700; }
.log small { color: var(--muted); }
.block > .pill-btn.dark { margin-top: 14px; }

/* ---------- live buoy ---------- */

.stat.buoy { background: var(--ink); color: var(--sand); }
.stat.buoy .stat-label, .stat.buoy small { color: rgb(245 239 227 / 0.7); }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #3ddc84;
  box-shadow: 0 0 0 0 rgb(61 220 132 / 0.6); animation: pulse 2s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgb(61 220 132 / 0); } 100% { box-shadow: 0 0 0 0 rgb(61 220 132 / 0); } }
.reasons.live { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

/* ---------- quick reports ---------- */

.flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.flag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  background: var(--sand-2); color: var(--muted); font-size: 0.74rem; font-weight: 700;
}
.flag .icon { width: 0.95em; height: 0.95em; }
.flag.hazard { background: #fde3da; color: #a33a1c; }
@media (prefers-color-scheme: dark) { .flag.hazard { background: #4a2218; color: #ffb49c; } }

.report .eyebrow { margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--sand);
  font-size: 0.86rem; font-weight: 700;
}
.chip-btn .icon { width: 1em; height: 1em; }
.chip-btn.on { background: var(--ink); border-color: var(--ink); color: var(--sand); }
.chip-btn.hazard.on { background: #c4502f; border-color: #c4502f; color: #fff; }
.chip-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  background: rgb(0 0 0 / 0.08); font-size: 0.72rem;
}
.chip-btn.on .chip-count { background: rgb(255 255 255 / 0.2); }
.session .leave + .leave { margin-left: -4px; }

/* ---------- animated sky (js/sky.js) ---------- */

.sky { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }

.sun {
  position: absolute; right: 12%; width: 84px; height: 84px; border-radius: 50%;
  background: radial-gradient(circle, #fffbe6 0 38%, #ffe08a 58%, rgb(255 214 110 / 0) 72%);
}
.sun::after { /* the glow breathes: transform + opacity only, so it stays smooth */
  content: ""; position: absolute; inset: -60%; border-radius: 50%;
  background: radial-gradient(circle, rgb(255 226 140 / 0.45), rgb(255 226 140 / 0) 65%);
  animation: sun-glow 5s ease-in-out infinite;
}
.sun.low { background: radial-gradient(circle, #fff1cf 0 36%, #ffb36b 58%, rgb(255 150 90 / 0) 72%); }
@keyframes sun-glow { 50% { transform: scale(1.12); opacity: 0.7; } }

.cloud-track, .gust-track { position: absolute; left: 0; width: 100%; height: 0; transform: translateX(var(--x, 0)); animation: drift-x linear infinite; }
.cloud-track.rev, .gust-track.rev { animation-direction: reverse; }
@keyframes drift-x { from { transform: translateX(-35%); } to { transform: translateX(115%); } }
.cloud {
  position: absolute; width: 120px; height: 36px; border-radius: 36px;
  background: #fff; opacity: 0.3;
}
.cloud::before, .cloud::after { content: ""; position: absolute; border-radius: 50%; background: inherit; }
.cloud::before { width: 56px; height: 56px; left: 18px; top: -26px; }
.cloud::after { width: 44px; height: 44px; left: 60px; top: -18px; }
.cloud.wet { background: #d9e1e5; opacity: 0.5; }

.rain { position: absolute; inset: -10% -15% 0; }
.drop-track { position: absolute; top: 0; width: 0; height: 100%; transform: translateY(var(--y, 0)); animation: fall linear infinite; }
@keyframes fall { from { transform: translateY(-12%); } to { transform: translateY(105%); } }
.drop { width: 2px; height: 24px; border-radius: 1px; background: linear-gradient(rgb(255 255 255 / 0), rgb(255 255 255 / 0.8)); }
.drop.fine { width: 1.5px; height: 14px; opacity: 0.8; }
.drop.heavy { width: 2.5px; height: 32px; }

.flash { position: absolute; inset: 0; background: #fff; opacity: 0; animation: flash 7s infinite; }
@keyframes flash { 0%, 91%, 100% { opacity: 0; } 92% { opacity: 0.5; } 93% { opacity: 0.05; } 94.5% { opacity: 0.35; } 96% { opacity: 0; } }

.fog {
  position: absolute; left: -50%; width: 200%; top: 28%; height: 42%;
  background: radial-gradient(ellipse at center, rgb(255 255 255 / 0.32), rgb(255 255 255 / 0) 70%);
  animation: fog-drift 30s ease-in-out infinite alternate;
}
.fog.second { top: 8%; opacity: 0.7; animation-duration: 45s; }
@keyframes fog-drift { to { transform: translateX(22%); } }

.gust { width: 72px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgb(255 255 255 / 0), rgb(255 255 255 / 0.55), rgb(255 255 255 / 0)); }

.star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; animation: twinkle 4s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: 0.2; } }
.moon { position: absolute; right: 18%; top: 9%; width: 54px; height: 54px; border-radius: 50%; box-shadow: 14px 10px 0 0 #fdf1c8; }



.days button small { font-size: 0.72rem; font-weight: 600; opacity: 0.85; }
.animate-btn {
  margin-left: 4px; min-height: 28px; padding: 0 10px; border: 0; border-radius: 999px;
  background: rgb(255 255 255 / 0.22); color: #fff; font-size: 0.75rem; font-weight: 800;
}

/* ---------- time slider: pick an hour, the scene redraws for it ---------- */

.scrub { position: relative; margin-top: 18px; }
.scrub input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 36px; margin: 0;
  background: transparent; cursor: pointer; touch-action: pan-y;
}
.scrub input[type="range"]::-webkit-slider-runnable-track { height: 10px; border-radius: 999px; background: var(--track); }
.scrub input[type="range"]::-moz-range-track { height: 10px; border-radius: 999px; background: var(--track); }
.scrub input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; margin-top: -9px; border-radius: 50%;
  background: #fff; border: 3px solid var(--tone-deep, #10222b); box-shadow: 0 2px 10px rgb(0 0 0 / 0.25);
}
.scrub input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--tone-deep, #10222b); box-shadow: 0 2px 10px rgb(0 0 0 / 0.25);
}
.scrub input[type="range"]:focus-visible { outline: none; }
.scrub input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 3px solid #fff; outline-offset: 2px; }
.scrub-labels { display: flex; justify-content: space-between; font-size: 0.75rem; font-weight: 700; opacity: 0.85; }
.scrub-labels .best { opacity: 1; }

.hour-line { margin-top: 10px; font-size: 0.85rem; line-height: 1.35; }
.hour-line strong { font-family: var(--display); font-weight: 800; font-size: 1rem; letter-spacing: -0.01em; }
.hour-line span { opacity: 0.85; }

/* ---------- surfers on the wave (js/sea.js) ---------- */

.sea-svg { display: block; width: 100%; height: 100%; }
.riders, .rider-track { position: absolute; inset: 0; }
.rider-track { animation: ride-x linear infinite; }
.rider-track.rev { animation-direction: reverse; }
@keyframes ride-x { to { transform: translateX(-100%); } }

.rider {
  position: absolute; width: 74px; height: 74px;
  transform: translate(-50%, -87%) rotate(var(--tilt, 0deg)); transform-origin: 50% 87%;
}
.rider.longboard, .rider.softtop { width: 80px; height: 80px; }
.rider-body { width: 100%; height: 100%; animation: bob ease-in-out infinite alternate; }
.rider.shortboard .rider-body { animation-name: carve; }
@keyframes bob { to { transform: translateY(-2px); } }
@keyframes carve { from { transform: rotate(-5deg); } to { transform: rotate(5deg) translateY(-2px); } }

/* Surfer figures: wetsuit-dark bodies built from tapered limbs, coloured boards (js/sea.js POSES). */
.figure {
  display: block; width: 100%; height: 100%; overflow: visible;
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.28));
}
.figure.flip { transform: scaleX(-1); }
.figure .suit { fill: var(--suit, #14294b); }
.figure .lo { fill: var(--lo, #14294b); }
.figure .skin, .figure .face { fill: var(--skin, #c68a5c); }
.figure .hair { fill: var(--hair, #2b1d14); }
.figure .hood { fill: var(--hood, #14294b); }
.figure .far .suit { fill: var(--suit-far, #0e1d36); }
.figure .far .lo { fill: var(--lo-far, #0e1d36); }
.figure .far .skin { fill: var(--skin-far, #9e6e4a); }
.figure .board { fill: var(--board, #fff); stroke: rgb(13 27 46 / 0.3); stroke-width: 0.8; }
.figure .board.foam { fill: #ffd36e; }
.figure .fin { fill: #0d1b2e; }
.figure .spray { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; opacity: 0.85; }

.board-chip {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 5px 12px 5px 10px;
  border-radius: 999px; background: rgb(255 255 255 / 0.18); font-size: 0.85rem; font-weight: 800;
}
.board-chip .icon { width: 1.1em; height: 1.1em; }

/* out the back: sitting and paddling (their bobbing is driven from JS to match the waves) */
.rider.sit, .rider.paddle { width: 58px; height: 58px; }
.rider-body.floating { animation: none; transform-origin: 50% 80%; }
.figure .arm { transform-box: view-box; animation: paddle 1.1s ease-in-out infinite alternate; } /* pivot set inline at the shoulder */
@keyframes paddle { from { transform: rotate(-55deg); } to { transform: rotate(55deg); } }

/* surf school lessons */
.flag.school { background: #e8e2ff; color: #4b3a99; }
@media (prefers-color-scheme: dark) { .flag.school { background: #2e2650; color: #c9bcff; } }
.lesson-flag {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 8px;
  border-radius: 999px; background: rgb(255 255 255 / 0.22); font-size: 0.75rem; font-weight: 800; opacity: 1 !important;
}
.lesson-flag .icon { width: 1em; height: 1em; }

/* ---------- quiver ---------- */

.top-actions { display: flex; gap: 6px; }
.icon-chip .icon { width: 1.1em; height: 1.1em; }
.board-chip .yours { font-weight: 600; opacity: 0.9; }

.quiver { padding: calc(env(safe-area-inset-top) + 12px) var(--gutter) 40px; }
.page-top { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.page-top h1 { flex: 1; font-family: var(--display); font-size: 1.8rem; font-weight: 800; letter-spacing: -0.03em; }
.page-top .pill-btn { margin: 0; }
.back { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--card); }
.back-icon { transform: rotate(180deg); }
.quiver-empty { background: var(--card); border-radius: 24px; padding: 20px; }
.quiver-empty p { color: var(--muted); margin-bottom: 14px; }
.board-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.board-card-btn {
  width: 100%; display: grid; gap: 10px; padding: 16px; border: 0; border-radius: 22px;
  background: var(--card); text-align: left;
}
.board-card-btn:active:not(:disabled) { transform: scale(0.99); }
.board-drawing { width: 100%; height: 44px; filter: drop-shadow(0 3px 4px rgb(0 0 0 / 0.15)); }
.board-info strong { display: block; font-family: var(--display); font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }
.board-info small { color: var(--muted); }
.board-stats { font-size: 0.88rem; margin-top: 6px; }
.board-best { display: flex; gap: 6px; align-items: center; font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.board-best .icon { color: #e0a126; }

.paints { display: flex; gap: 10px; }
.paint input { position: absolute; opacity: 0; }
.paint span {
  display: block; width: 36px; height: 36px; border-radius: 50%; background: var(--paint);
  border: 2px solid var(--line); cursor: pointer;
}
.paint input:checked + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.paint input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.actions .btn.delete { flex: 1; color: #c4502f; }

.icon-chip { padding: 0 12px; }
.board-photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; background: var(--sand-2); }
.photo-pick img { width: 100%; max-height: 180px; object-fit: cover; border-radius: 14px; }
.photo-actions { display: flex; gap: 8px; }
.photo-actions .btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--sand); font-weight: 700; cursor: pointer;
}
.photo-actions .remove-photo { color: #c4502f; }

/* ---------- sponsor slot (always labelled) ---------- */
.sponsor {
  margin: 0 var(--gutter) 26px; padding: 14px 16px 16px; border-radius: 22px;
  background: var(--card); border: 1.5px solid var(--line);
}
.sponsor.house { border-style: dashed; }
.sponsor-label { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.sponsor-body { display: flex; gap: 12px; align-items: flex-start; }
.sponsor-body strong { font-family: var(--display); font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
.sponsor-body p { color: var(--muted); font-size: 0.92rem; margin-top: 2px; }
.sponsor-logo { width: 48px; height: 48px; border-radius: 12px; object-fit: contain; background: #fff; }
.sponsor-mark { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: #ffd36e; color: #14294b; }
.sponsor-cta { margin-top: 12px; text-decoration: none; }
.sponsor-contact { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }

/* Narrow phones: the level chip shrinks to its coloured dot so the wordmark keeps its room. */
@media (max-width: 360px) {
  .brand span { font-size: 1.05rem; }
}

/* Sponsor card: centred, stacked. */
.sponsor { display: flex; flex-direction: column; align-items: center; text-align: center; }
.sponsor-body { flex-direction: column; align-items: center; gap: 8px; }
.sponsor-body p { max-width: 32ch; }
.sponsor-cta { align-self: center; }

/* ---------- tabs: Forecast · Explore · + · Quiver · Me ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 12;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  padding: 4px 6px calc(6px + env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgb(16 34 43 / 0.08);
}
.tabbar:empty { display: none; }
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 54px;
  border: 0; background: none; color: var(--muted); font: 700 0.72rem/1 var(--body); cursor: pointer;
}
.tab .icon { width: 24px; height: 24px; }
.tab.on { color: var(--ink); }
.tab.on .icon { stroke-width: 2.4; }
.tab-go {
  justify-self: center; width: 60px; height: 60px; margin-top: -24px; border-radius: 50%;
  border: 4px solid var(--sand); background: var(--ink); color: var(--sand);
  display: grid; place-items: center; box-shadow: 0 8px 22px rgb(16 34 43 / 0.3); cursor: pointer;
}
.tab-go .icon { width: 28px; height: 28px; }
.me {
  display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; color: #fff;
  font: 800 0.8rem/1 var(--display);
}
.tab-me { width: 26px; height: 26px; }
.tab.on .tab-me, .tab:focus-visible .tab-me { box-shadow: 0 0 0 2px var(--ink); }
body.has-tabs main { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
body.has-tabs .seo-block { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
body.has-tabs.has-bar main { padding-bottom: calc(170px + env(safe-area-inset-bottom)); }
body.has-tabs .bar { bottom: calc(64px + env(safe-area-inset-bottom)); padding-bottom: 10px; }
body.has-tabs .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
body.has-tabs.has-bar .toast { bottom: calc(150px + env(safe-area-inset-bottom)); }
.level-chip { gap: 8px; }

/* the + sheet */
.go-options { display: grid; gap: 10px; margin: 14px 0 6px; }
.go-option {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: 20px; background: var(--card); color: var(--ink); cursor: pointer;
}
.go-option strong { display: block; font-family: var(--display); font-size: 1.15rem; }
.go-option small { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.go-icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--sand); }
.go-icon .icon { width: 24px; height: 24px; }

/* your photo in the profile sheet */
.avatar-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.avatar-preview { width: 56px; height: 56px; flex: none; }
.avatar-preview img, .avatar-preview .me { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; font-size: 1.3rem; }
.small-btn {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0;
  background: var(--sand-2); color: var(--ink); font-weight: 800; font-size: 0.9rem; cursor: pointer;
}
.ghost-btn { background: none; color: var(--muted); }

body.in-explore main { padding: 0; }
