/* ─────────────────────────────────────────────────────────────────────────────
   GLASSY — Shared Design System (app.css)
   Mobile-first. Extracted from 28 prototype screens, corrected for phone UX.

   Font size scale (mobile-corrected):
     Caption/label:  12px (was 9-10.5px)
     Secondary text: 13px (was 11-11.5px)
     Body/UI text:   14px baseline
     Button text:    15-16px
     Headings:       17px+

   Touch targets: 44px minimum height per Apple HIG
   ───────────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Lora:ital,wght@0,400;0,500;1,400;1,500&display=swap');

:root {
  /* ── Brand ─────────────────────────────────────────────────────────────── */
  --lake: #0e8c68;
  --lake-light: #e6f7f2;
  --lake-pale: #f0faf6;
  --lake-d: #0a6e50;

  /* ── Score bands ───────────────────────────────────────────────────────── */
  --c-excellent: #0e8c68;
  --c-good: #1a6faa;
  --c-fair: #c97a14;
  --c-poor: #6b5ea8;
  --c-nr: #c0392b;

  /* ── Activity colors ───────────────────────────────────────────────────── */
  --act-boating: #0e8c68;
  --act-swimming: #4aa8d8;
  --act-fishing: #1a5fa0;
  --act-wind: #7a6ec0;
  --act-boat-light: #d4f0e6;
  --act-swim-light: #d6eef8;
  --act-swim-mid: #91cfe8;
  --act-fish-light: #d0dff0;
  --act-wind-light: #e0dced;
  --act-wind-mid: #a99dd6;
  --c-swim: #4aa8d8;

  /* ── Time-of-day ───────────────────────────────────────────────────────── */
  --c-night: #111111;
  --c-sunset: #d4721a;
  --gold: #c97a14;

  /* ── Text / ink ────────────────────────────────────────────────────────── */
  --ink: #1a2332;
  --ink-2: #334d63;
  --ink-3: #5a7a8f;
  --ink-4: #7d97a8;

  /* ── Surfaces ──────────────────────────────────────────────────────────── */
  --s0: #fff;
  --s1: #f4f8fa;
  --s2: #eaf1f5;
  --page: #edf3f7;
  --line: #dde8ee;

  /* ── Status ────────────────────────────────────────────────────────────── */
  --danger: #c0392b;
  --danger-light: #fde8e5;
  --warn: #c97a14;
  --warn-light: #fef3e0;
  --live: #e74c3c;
  --estimated: #7a95aa;
  --static: #b0c4d0;

  /* ── Map pin colors ────────────────────────────────────────────────────── */
  --pin-launch: #0e8c68;
  --pin-marina: #1a6faa;
  --pin-beach: #4aa8d8;
  --pin-fresh: #c97a14;
  --pin-recent: #6b5ea8;

  /* ── Typography ────────────────────────────────────────────────────────── */
  --fu: 'Outfit', system-ui, sans-serif;
  --fr: 'Lora', Georgia, serif;

  /* ── Radii ─────────────────────────────────────────────────────────────── */
  --rsm: 8px;
  --rmd: 14px;
  --rxl: 24px;

  /* ── Layout ────────────────────────────────────────────────────────────── */
  --nav-h: 64px;
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--fu);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--page);
  display: flex;
  justify-content: center;
  padding: 16px 16px calc(var(--nav-h) + 24px);
  min-height: 100vh;
  min-height: 100dvh;
}

/* ── Card container ──────────────────────────────────────────────────────── */
.card {
  width: 100%;
  max-width: 393px;
  background: var(--s0);
  border-radius: var(--rxl);
  box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 20px 60px rgba(14,140,104,.1);
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
}

/* ── Bottom navigation bar ───────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 393px;
  height: var(--nav-h);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: stretch;
  box-shadow: 0 -4px 24px rgba(14,140,104,.08);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink-4);
  text-transform: uppercase;
  border: none;
  background: none;
  font-family: var(--fu);
  transition: color .15s;
  padding: 6px 2px;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  min-width: 0;
}

.nav-tab.active { color: var(--lake); }

.nav-tab svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.nav-tab.active::after {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--lake);
  margin-top: 1px;
}

/* ── Back button ─────────────────────────────────────────────────────────── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  padding: 10px 12px;
  margin: -10px -12px;
  border-radius: var(--rsm);
  border: none;
  background: none;
  font-family: var(--fu);
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
  min-width: 44px;
}

.back-btn svg {
  width: 16px;
  height: 16px;
}

/* ── Primary button ──────────────────────────────────────────────────────── */
.btn-primary,
.submit-btn {
  display: block;
  width: 100%;
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--fu);
  color: #fff;
  background: var(--lake);
  border: none;
  border-radius: var(--rmd);
  cursor: pointer;
  text-align: center;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s;
}

.btn-primary:active,
.submit-btn:active {
  background: var(--lake-d);
}

.btn-primary:disabled,
.submit-btn:disabled {
  background: var(--ink-4);
  cursor: not-allowed;
}

/* ── Secondary / outline button ──────────────────────────────────────────── */
.btn-secondary,
.cta-secondary {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--fu);
  color: var(--lake);
  background: var(--s0);
  border: 1.5px solid var(--lake);
  border-radius: var(--rmd);
  cursor: pointer;
  text-align: center;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}

/* ── Form inputs ─────────────────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea,
select,
.field-input,
.search-input {
  font-size: 16px;
  font-family: var(--fu);
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--rmd);
  background: var(--s0);
  color: var(--ink);
  width: 100%;
  min-height: 48px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s, box-shadow .15s;
}

input:focus,
textarea:focus,
select:focus,
.field-input:focus,
.search-input:focus {
  outline: none;
  border-color: var(--lake);
  box-shadow: 0 0 0 3px rgba(14,140,104,.12);
}

::placeholder {
  color: var(--ink-4);
  font-size: 14px;
}

/* ── Form labels ─────────────────────────────────────────────────────────── */
label,
.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  display: block;
  margin-bottom: 6px;
}

/* ── Common text classes ─────────────────────────────────────────────────── */
.eyebrow,
.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.caption,
.hint-text {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.5;
}

/* ── Feedback / action buttons ───────────────────────────────────────────── */
.feedback-btn,
.checkin-btn,
.action-btn {
  font-size: 14px;
  font-weight: 600;
  font-family: var(--fu);
  padding: 12px 16px;
  border-radius: var(--rmd);
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  -webkit-tap-highlight-color: transparent;
}

/* ── Refresh / icon-only buttons ─────────────────────────────────────────── */
.refresh-btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--rsm);
  -webkit-tap-highlight-color: transparent;
}

/* ── Slot add/remove buttons ─────────────────────────────────────────────── */
.slot-remove,
.slot-add-btn {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  min-height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--fu);
  -webkit-tap-highlight-color: transparent;
}

/* ── Sheet / modal action buttons ────────────────────────────────────────── */
.sheet-action-btn {
  font-size: 14px;
  font-weight: 600;
  padding: 14px;
  min-height: 48px;
  width: 100%;
  border-radius: var(--rmd);
  cursor: pointer;
  font-family: var(--fu);
  -webkit-tap-highlight-color: transparent;
}

/* ── Skip / link buttons ─────────────────────────────────────────────────── */
.skip-btn,
.link-btn {
  font-size: 14px;
  font-weight: 600;
  color: var(--lake);
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  min-height: 44px;
  font-family: var(--fu);
  -webkit-tap-highlight-color: transparent;
}

/* ── iOS safe area ───────────────────────────────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  body {
    padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
  }
}

/* ── PWA Install Nudge ───────────────────────────────────────────────────── */
.install-nudge {
  position: fixed;
  bottom: calc(var(--nav-h) + 10px);
  left: 10px;
  right: 10px;
  z-index: 1000;
  transform: translateY(16px);
  opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
  pointer-events: none;
}
.install-nudge.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.install-nudge-inner {
  background: #fff;
  border-radius: 14px;
  padding: 11px 12px 11px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,.15);
  border-left: 4px solid var(--lake);
}
.install-nudge-icon {
  width: 22px;
  height: 22px;
  color: var(--lake);
  flex-shrink: 0;
}
.install-nudge-text { flex: 1; min-width: 0; }
.install-nudge-title { font-size: 14px; font-weight: 700; color: var(--ink-1); line-height: 1.2; }
.install-nudge-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.install-nudge-btn {
  background: var(--lake);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  font-family: var(--fu);
  min-height: 36px;
}
.install-nudge-x {
  background: none;
  border: none;
  color: var(--ink-3);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 2px;
  line-height: 1;
  flex-shrink: 0;
  min-width: 28px;
  text-align: center;
}

/* ── iOS Install Sheet ───────────────────────────────────────────────────── */
.install-sheet {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 2000;
  pointer-events: none;
}
.install-sheet.open { pointer-events: all; }
.install-sheet-backdrop {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0,0,0,0);
  transition: background .3s;
}
.install-sheet.open .install-sheet-backdrop { background: rgba(0,0,0,.45); }
.install-sheet-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 8px 24px calc(32px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.32,1.12,.48,1);
  z-index: 1;
}
.install-sheet.open .install-sheet-content { transform: translateY(0); }
.install-sheet-handle {
  width: 40px;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  margin: 0 auto 20px;
}
.install-sheet-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.install-sheet-appicon {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  flex-shrink: 0;
}
.install-sheet-title { font-size: 18px; font-weight: 700; color: var(--ink-1); line-height: 1.3; }
.install-sheet-sub { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.install-steps { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.install-step { display: flex; align-items: flex-start; gap: 14px; }
.install-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--lake);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.install-step-text { font-size: 15px; color: var(--ink-2); line-height: 1.5; padding-top: 3px; }
.install-share-svg {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  color: var(--lake);
}
.install-sheet-btn {
  width: 100%;
  background: var(--lake);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 15px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--fu);
  min-height: 52px;
  margin-bottom: 10px;
}
.install-sheet-later {
  width: 100%;
  background: none;
  border: none;
  color: var(--ink-3);
  font-size: 15px;
  cursor: pointer;
  padding: 10px;
  font-family: var(--fu);
  min-height: 44px;
}
