/* Shared visual direction. The preview uses no external fonts or assets. */
:root {
  color-scheme: light;
  --bg: #f3f6f5;
  --surface: #fff;
  --text: #152d38;
  --muted: #64747c;
  --line: #dce5e3;
  --accent: #07796f;
  --accent-soft: #e4f4ee;
  --selected: #fff;
  --control: #e7ecea;
  --shadow: 0 8px 32px #173d3210;
  --hero: #103a40;
  --hero-end: #0c2935;
  --hero-text: #f4faf7;
  --hero-muted: #aac6c6;
  --hero-accent: #8fe3c1;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1821;
  --surface: #11232d;
  --text: #e9f1ee;
  --muted: #9aaeb6;
  --line: #263b44;
  --accent: #91dfc3;
  --accent-soft: #203e3e;
  --selected: #304751;
  --control: #172c36;
  --shadow: 0 8px 32px #00000010;
  --hero: #17434a;
  --hero-end: #11313f;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --bg: #0b1821; --surface: #11232d; --text: #e9f1ee;
    --muted: #9aaeb6; --line: #263b44; --accent: #91dfc3;
    --accent-soft: #203e3e; --selected: #304751; --control: #172c36;
    --shadow: 0 8px 32px #00000010; --hero: #17434a; --hero-end: #11313f;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 4px; }
button, input { font: inherit; }
svg { display: block; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 10; padding: 12px 20px; background: var(--surface); }
.skip-link:focus { top: 12px; }
.page { max-width: 1184px; margin: auto; padding: 0 48px max(24px, env(safe-area-inset-bottom)); }
.header { min-height: 112px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.brand { display: flex; gap: 13px; align-items: center; text-decoration: none; font-size: 23px; font-weight: 750; letter-spacing: -.8px; }
.brand-light { font-weight: 450; }
.brand small { display: block; font-size: 8px; letter-spacing: 2px; font-weight: 650; color: var(--muted); margin-top: 1px; }
.brand-icon { width: 34px; height: 40px; color: var(--accent); }
.theme-control { display: flex; border: 1px solid var(--line); border-radius: 12px; background: var(--control); margin: 0; padding: 3px; flex-shrink: 0; }
.theme-control label { position: relative; cursor: pointer; }
.theme-control input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.theme-control label > span { display: grid; place-items: center; width: 44px; height: 44px; color: var(--muted); border-radius: 8px; }
.theme-control svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-control input:checked + span { background: var(--selected); color: var(--text); box-shadow: 0 1px 4px #0000000d; }
.theme-control input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.intro { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 39px 0 36px; }
.eyebrow { text-transform: uppercase; letter-spacing: 1.8px; font-size: 10px; font-weight: 650; color: var(--muted); }
h1 { margin-top: 7px; font-size: 33px; font-weight: 580; line-height: 1.2; letter-spacing: -1.1px; }
.timezone { display: flex; gap: 11px; align-items: center; font-size: 11px; color: var(--muted); }
.timezone svg { width: 27px; height: 27px; stroke: var(--accent); stroke-width: 1.2; }
.timezone strong { display: block; color: var(--text); font-weight: 550; font-size: 12px; margin-top: 1px; overflow-wrap: anywhere; }
.schedule-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 40px; align-items: start; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; margin-bottom: 15px; }
h2 { font-size: 14px; font-weight: 650; letter-spacing: -.2px; }
.section-note { font-size: 10px; color: var(--muted); }
.current-card { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(135deg, var(--hero), var(--hero-end)); color: var(--hero-text); border-radius: 20px; padding: 30px; box-shadow: var(--shadow); }
.compass-art { position: absolute; z-index: -1; width: 370px; height: 370px; right: -151px; top: -51px; stroke: #abdace; stroke-width: .7; opacity: .16; transform: rotate(15deg); }
.live-label { display: flex; align-items: center; gap: 8px; color: var(--hero-accent); font-size: 10px; letter-spacing: 1.7px; font-weight: 650; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--hero-accent); box-shadow: 0 0 0 4px #8fe3c114; }
.window-number { margin-left: auto; color: var(--hero-muted); font-size: 9px; letter-spacing: 1.7px; }
.skipper-block { padding: 40px 0 31px; }
.skipper-block .eyebrow { color: var(--hero-accent); font-size: 10px; }
h3 { font-size: 66px; line-height: 1.15; letter-spacing: -2.5px; font-weight: 500; margin-top: 5px; }
#current-skipper { overflow-wrap: anywhere; }
.hero-times { border-top: 1px solid #acd7d02b; padding-top: 24px; font-variant-numeric: tabular-nums; }
.hero-local, .hero-utc { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.hero-local > span:first-child { font-size: 29px; letter-spacing: -1px; font-weight: 500; }
.hero-local > span.long-range { font-size: 19px; letter-spacing: -.3px; }
.hero-local > span:first-child, .hero-utc > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.time-label { font-size: 9px; letter-spacing: 1.7px; flex-shrink: 0; }
.hero-local .time-label { color: var(--hero-accent); }
.hero-utc { margin-top: 4px; font-size: 16px; color: var(--hero-muted); }
.progress-area { margin-top: 31px; }
.progress-track { height: 3px; background: #b9dbd929; border-radius: 3px; overflow: hidden; }
.progress-track > div { height: 100%; background: var(--hero-accent); border-radius: inherit; }
.progress-caption { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; color: var(--hero-muted); margin-top: 12px; }
.progress-caption strong { color: var(--hero-text); font-weight: 500; }
.time-explainer { display: flex; gap: 10px; padding: 20px 3px 24px; font-size: 11px; line-height: 1.7; color: var(--muted); }
.tiny-clock { font-size: 22px; line-height: 1.5; color: var(--accent); }
.schedule-details { padding: 23px 3px; border-top: 1px solid var(--line); }
.schedule-details p { font-size: 12px; margin-top: 8px; }
.schedule-details p strong { font-weight: 550; }
.schedule-details p > span { color: var(--muted); font-size: 10px; }
.schedule-details a { display: inline-flex; align-items: center; min-height: 44px; gap: 20px; font-size: 11px; color: var(--accent); text-decoration: none; }
.schedule-details a:hover { text-decoration: underline; }
.count-badge { border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font-size: 9px; color: var(--muted); }
.upcoming-card { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.day-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 22px; background: color-mix(in srgb, var(--bg) 55%, var(--surface)); border-bottom: 1px solid var(--line); }
.day-heading h3 { margin: 0; font-size: 9px; letter-spacing: 1.5px; font-weight: 650; line-height: 1.5; text-transform: uppercase; color: var(--muted); }
.day-heading span { color: var(--muted); font-size: 9px; }
.slot-list { list-style: none; padding: 0; margin: 0; }
.slot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 12px; padding: 18px 22px; position: relative; }
.slot + .slot::before { content: ""; position: absolute; left: 22px; right: 22px; top: 0; border-top: 1px solid var(--line); }
.slot.next { background: color-mix(in srgb, var(--accent-soft) 48%, var(--surface)); }
.slot-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; }
.next-tag { color: var(--accent); background: var(--accent-soft); font-size: 8px; font-weight: 650; letter-spacing: .6px; padding: 2px 5px; border-radius: 4px; }
.slot-boat { font-size: 11px; margin-top: 2px; color: var(--muted); }
.slot-times { text-align: right; font-variant-numeric: tabular-nums; }
.slot-times, .slot-identity { overflow-wrap: anywhere; }
.slot-local { font-size: 13px; font-weight: 550; letter-spacing: -.25px; }
.slot-utc { font-size: 10px; margin-top: 3px; color: var(--muted); }
.slot-until { font-size: 9px; margin-top: 5px; color: var(--accent); }
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 21px 0; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; }
.footer > span:first-child { font-weight: 550; color: var(--text); }
.footer-dot { margin: 0 5px; }
.data-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.schedule-details .storage-status { font-size: 11px; margin: 0; color: var(--muted); }
.storage-status.is-ready { color: var(--accent); }
.storage-status.is-ready::before { content: '•'; padding-right: 5px; }
.schedule-details .saved-date { color: var(--muted); font-size: 10px; margin: 0; }
.text-button { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 0; font: inherit; font-size: 11px; color: var(--accent); border: 0; background: transparent; cursor: pointer; text-align: left; }
.text-button:disabled { opacity: .65; cursor: wait; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.install-help { margin-top: 12px; color: var(--muted); font-size: 11px; }
.install-help summary { min-height: 44px; padding: 12px 0; color: var(--accent); cursor: pointer; }
.install-help p { margin: 0 0 10px; font-size: 11px; }
.empty-description { color: var(--hero-muted); font-size: 13px; line-height: 1.7; margin-top: 16px; }
.is-empty h3 { font-size: 36px; letter-spacing: -1px; }
.is-empty .status-dot { background: var(--hero-muted); box-shadow: none; }
.coverage-note { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 16px 4px 0; }
#local-clock { margin-left: 4px; font-variant-numeric: tabular-nums; color: var(--text); }
.loading-message, .error-message { padding: 24px; }
.error-message { color: var(--text); background: var(--accent-soft); border-radius: 12px; margin-top: 20px; }
@media (max-width: 899px) {
  .page { max-width: 610px; padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
  .header { min-height: 82px; }
  .brand { font-size: 21px; gap: 10px; }
  .brand-icon { width: 29px; }
  .brand small { font-size: 7px; letter-spacing: 1.45px; }
  .intro { display: block; padding: 23px 0 25px; }
  h1 { font-size: 29px; }
  .timezone { margin-top: 13px; gap: 8px; font-size: 10px; }
  .timezone svg { width: 17px; height: 17px; }
  .timezone > div { display: flex; flex-wrap: wrap; gap: 7px; align-items: baseline; }
  .timezone strong { font-size: 10px; margin-top: 0; }
  .schedule-layout { display: flex; flex-direction: column; gap: 0; }
  .current-section, .upcoming-section { width: 100%; }
  .current-section { display: contents; }
  .current-section > .section-heading { width: 100%; order: 0; }
  .current-card { width: 100%; order: 1; padding: 24px; }
  .time-explainer { order: 2; align-items: center; padding: 15px 2px 22px; }
  .upcoming-section { order: 3; }
  .schedule-details { order: 4; width: 100%; margin-top: 24px; padding-bottom: 0; }
  .skipper-block { padding: 24px 0 23px; }
  h3 { font-size: 56px; }
  .hero-times { padding-top: 19px; }
  .hero-local > span:first-child { font-size: 29px; }
  .hero-local > span.long-range { font-size: 19px; }
  .progress-area { margin-top: 24px; }
  .current-card { border-radius: 17px; }
  .compass-art { right: -174px; top: -49px; }
  .theme-control { padding: 2px; border-radius: 10px; }
  .theme-control label > span { width: 44px; height: 44px; border-radius: 7px; }
  .theme-control svg { width: 16px; height: 16px; }
  .footer { margin-top: 19px; flex-direction: column; gap: 6px; padding: 18px 0; }
}
@media (max-width: 389px) {
  .page { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
  .brand { font-size: 19px; gap: 7px; }
  .brand-icon { width: 23px; }
  .brand small { font-size: 6px; letter-spacing: 1px; }
  .header { gap: 8px; }
  .current-card { padding: 22px; }
  .slot { padding-left: 17px; padding-right: 17px; }
  .day-heading { padding-left: 17px; padding-right: 17px; }
}
@media (prefers-reduced-motion: no-preference) {
  .theme-control label > span { transition: background .15s, color .15s; }
}
