/* ================================
   1. VARIABLES & BASE
   ================================ */
:root {
  color-scheme: light;

  --bg: #f1f5f9;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #0ea5e9;
  --accent-hover: #0284c7;

  /* Ocean palette */
  --ocean-400: #38bdf8;
  --ocean-500: #0ea5e9;
  --ocean-600: #0284c7;
  --ocean-700: #0369a1;
  --ocean-800: #075985;
  --ocean-900: #0c4a6e;

  /* Slate scale */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Shadows */
  --shadow-card: 0 1px 4px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.05);
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================================
   2. HEADER
   ================================ */
header {
  background: linear-gradient(155deg, var(--ocean-900) 0%, var(--ocean-700) 40%, var(--ocean-500) 75%, var(--ocean-400) 100%);
  color: white;
  padding: 22px 32px 0;
}

.header-wave {
  height: 48px;
  display: block;
  overflow: hidden;
}

.header-wave svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ================================
   3. TOPBAR / NAV
   ================================ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 1rem;
  font-weight: 800;
  color: white;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo-wave {
  font-size: 1.2rem;
  line-height: 1;
  display: inline-block;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.topbar nav form {
  display: contents;
}

.topbar nav a,
.topbar nav button {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.topbar nav a:hover,
.topbar nav button:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.cta {
  background: rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.15s ease;
  flex-shrink: 0;
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.15);
}

.hamburger .close-icon {
  display: none;
}

.hamburger[aria-expanded="true"] .hamburger-icon {
  display: none;
}

.hamburger[aria-expanded="true"] .close-icon {
  display: block;
}

/* ================================
   4. HEADER BRAND
   ================================ */
.header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand h1 {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.brand p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.82;
}

.chip {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  align-self: flex-start;
}

/* ================================
   5. MAIN LAYOUT
   ================================ */
main {
  margin: 0 auto;
  padding: 28px 32px 56px;
  display: grid;
  grid-template-columns: 278px 1fr;
  gap: 22px;
}

/* ================================
   6. CARDS
   ================================ */
.card {
  background: var(--surface);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(15, 23, 42, 0.05);
  min-width: 0;
}

/* ================================
   7. SIDEBAR
   ================================ */
.spot-list {
  align-self: start;
  position: sticky;
  top: 20px;
}

.spot-list h2 {
  margin: 0 0 3px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}

.spot-list > p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ================================
   8. BEACH CONTROLS
   ================================ */
.beach-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 13px;
  margin-bottom: 13px;
  border-bottom: 1px solid var(--slate-100);
}

.view-select {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-700);
}

.view-select select {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 0.8rem;
  color: var(--ink);
  background: white;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}

.view-select select:focus {
  border-color: var(--ocean-400);
}

.secondary-button {
  background: var(--slate-50);
  border: 1.5px solid var(--border);
  color: var(--slate-500);
  border-radius: 8px;
  padding: 5px 11px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
  line-height: 1.4;
}

.secondary-button:hover {
  border-color: var(--slate-300);
  color: var(--ink);
  background: white;
}

/* ================================
   9. BEACH LIST
   ================================ */
.beach-max-message {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.beach-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--slate-200) transparent;
}

.beach-filters::-webkit-scrollbar {
  width: 4px;
}

.beach-filters::-webkit-scrollbar-track {
  background: transparent;
}

.beach-filters::-webkit-scrollbar-thumb {
  background: var(--slate-200);
  border-radius: 999px;
}

.beach-option {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--slate-50);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: none;
  line-height: 1.3;
}

.beach-option:hover:not(.beach-disabled) {
  border-color: var(--ocean-400);
  background: #f0f9ff;
}

.beach-option:has(input:checked) {
  background: #e0f2fe;
  border-color: var(--ocean-400);
  color: var(--ocean-800);
  font-weight: 600;
}

.beach-option input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}

.beach-option.beach-disabled {
  background: var(--slate-50);
  color: var(--slate-400);
  border-color: var(--slate-100);
  cursor: not-allowed;
  opacity: 0.5;
}

.beach-option.beach-disabled input {
  cursor: not-allowed;
}

/* ================================
   9b. SIDEBAR EXTRAS
   ================================ */
.sidebar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.sidebar-top h2 { margin: 0 0 3px; }
.sidebar-top > p { margin: 0; }

.selection-count {
  flex-shrink: 0;
  background: var(--ocean-100, #e0f2fe);
  color: var(--ocean-700);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid rgba(3, 105, 161, 0.15);
}

/* ================================
   9c. SPOT SEARCH & CHIPS
   ================================ */

/* Search wrapper */
.spot-search-wrap {
  position: relative;
  margin-bottom: 10px;
}

/* Search icon — positioned relative to the input (not the full wrapper) */
.spot-search-wrap::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 11px;
  width: 15px;
  height: 15px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat center;
  pointer-events: none;
  z-index: 1;
  transition: background 0.2s;
}

.spot-search-wrap:focus-within::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%230ea5e9' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
}

/* Nearby beaches loading row */
.search-nearby-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  font-size: 0.875rem;
  color: var(--slate-500);
}

.nearby-spin {
  animation: nearby-spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes nearby-spin {
  to { transform: rotate(360deg); }
}

/* Search input */
#spot-search {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px 10px 32px;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--ink);
  background: white;
  outline: none;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

#spot-search:focus {
  border-color: var(--ocean-400);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12), 0 1px 3px rgba(15, 23, 42, 0.06);
}

#spot-search::placeholder {
  color: var(--slate-400);
  font-weight: 400;
}

#spot-search:disabled {
  background: var(--slate-50, #f8fafc);
  color: var(--slate-400);
  cursor: not-allowed;
  opacity: 0.7;
}

/* Results dropdown container */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: white;
  border: 1.5px solid var(--ocean-300, #7dd3fc);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06);
  z-index: 200;
  overflow: hidden;
  animation: dropdown-in 0.13s ease-out;
}

.search-results-dropdown:empty {
  display: none;
}

@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-5px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* Result list — flex column of buttons */
.search-result-list {
  display: flex;
  flex-direction: column;
  padding: 4px;
}

/* Each option is a full-width button */
.search-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  background: none;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s;
}

.search-option:hover,
.search-option:focus {
  background: #f0f9ff;
  outline: none;
}

.search-option + .search-option {
  border-top: 1px solid var(--slate-100);
  border-radius: 0;
  margin-top: 1px;
}

.search-option:last-child {
  border-radius: 0 0 8px 8px;
}

.search-option:first-child {
  border-radius: 8px 8px 0 0;
}

.search-option:only-child {
  border-radius: 8px;
}

.sr-flag {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}

.sr-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.sr-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sr-meta {
  font-size: 0.775rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sr-add {
  flex-shrink: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ocean-400);
  opacity: 0;
  transition: opacity 0.1s;
}

.search-option:hover .sr-add,
.search-option:focus .sr-add {
  opacity: 1;
}

/* No results message */
.search-no-results {
  padding: 14px 14px;
  font-size: 0.825rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.search-no-results strong {
  color: var(--ink);
}

/* ── Selected spot chips ──────────────────────────────────────────────── */
.selected-chips {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}

.selected-chips:empty {
  display: none;
}

.spot-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
  border: 1.5px solid rgba(14, 165, 233, 0.35);
  border-radius: 10px;
  padding: 7px 8px 7px 10px;
  box-shadow: 0 1px 3px rgba(14, 165, 233, 0.08);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.spot-chip:hover {
  border-color: var(--ocean-400);
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.14);
}

.chip-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ocean-800);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-remove {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: rgba(14, 165, 233, 0.12);
  border: none;
  border-radius: 50%;
  color: var(--ocean-600);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.chip-remove:hover {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

/* ================================
   10. FAVORITES
   ================================ */
.favorites-section {
  margin: 12px 0 4px;
}

.favorites-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin: 0 0 8px;
}

.favorites-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fav-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ocean-700);
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  border: 1px solid rgba(14, 165, 233, 0.25);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
  white-space: nowrap;
}

.fav-quick-chip:hover {
  background: linear-gradient(135deg, #bfdbfe, #bae6fd);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
  transform: translateY(-1px);
}

.fav-chip-select {
  cursor: pointer;
}

.fav-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  background: rgba(14, 165, 233, 0.15);
  color: var(--ocean-700);
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.fav-chip-remove:hover {
  background: #e11d48;
  color: white;
}

.favorites-empty,
.favorites-signin {
  margin: 10px 0 4px;
  font-size: 0.8rem;
  color: var(--muted);
}

.favorites-signin a {
  color: var(--ocean-600);
  font-weight: 600;
  text-decoration: none;
}

.favorites-signin a:hover {
  text-decoration: underline;
}

/* Favorite toggle button inside beach pill */
.fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  margin-left: 4px;
  padding: 0;
  vertical-align: middle;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}

.fav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.85);
  transform: scale(1.1);
}

.fav-btn--active {
  background: rgba(255, 255, 255, 0.25);
  color: #fda4af;
}

/* ================================
   11. AUTH PAGES
   ================================ */
.auth-page {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 36px 32px;
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 10px;
}

.auth-header h2 {
  margin: 0 0 6px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
}

.auth-header p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-700);
}

.auth-field input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-field input:focus {
  border-color: var(--ocean-400);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.auth-field input::placeholder {
  color: var(--slate-400);
}

.field-error {
  font-size: 0.78rem;
  color: #dc2626;
}

.auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: #dc2626;
}

.auth-submit {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--ocean-600), var(--ocean-500));
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  margin-top: 4px;
}

.auth-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.auth-footer {
  text-align: center;
  margin: 20px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-footer a {
  color: var(--ocean-600);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  color: var(--slate-400);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: white;
  color: var(--slate-700);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.btn-google:hover {
  background: var(--slate-50);
  border-color: var(--slate-300);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

/* Nav username badge */
.nav-username {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ocean-700);
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  padding: 3px 10px;
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.15s;
}

.nav-username:hover {
  background: linear-gradient(135deg, #bfdbfe, #bae6fd);
}

/* ================================
   12. PROFILE PAGE
   ================================ */
.profile-page {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 32px;
}

.profile-avatar {
  font-size: 2.8rem;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dbeafe, #bae6fd);
  border-radius: 18px;
  flex-shrink: 0;
}

.profile-username {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
}

.profile-since {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.profile-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.profile-section {
  padding: 28px 28px;
}

.profile-section-title {
  margin: 0 0 20px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-count {
  font-size: 0.72rem;
  font-weight: 700;
  background: linear-gradient(135deg, #dbeafe, #bae6fd);
  color: var(--ocean-700);
  padding: 2px 8px;
  border-radius: 20px;
}

.profile-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.profile-saved {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Favourite spots list */
.fav-profile-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fav-profile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--slate-50);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: background 0.15s;
}

.fav-profile-item:hover {
  background: #f0f9ff;
  border-color: rgba(14, 165, 233, 0.2);
}

.fav-profile-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.fav-profile-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.fav-profile-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fav-profile-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.fav-profile-actions .secondary-button {
  text-decoration: none;
}

.fav-remove-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--slate-400);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.fav-remove-btn:hover {
  border-color: #fca5a5;
  color: #dc2626;
  background: #fef2f2;
}

.fav-profile-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
}

.fav-profile-empty-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
}

.fav-profile-empty p {
  margin: 0 0 6px;
  font-size: 0.875rem;
}

.fav-profile-empty a {
  color: var(--ocean-600);
  font-weight: 600;
  text-decoration: none;
}

.fav-profile-empty a:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .profile-body {
    grid-template-columns: 1fr;
  }
  .profile-row {
    grid-template-columns: 1fr;
  }
}

/* ================================
   13. FORECAST PANEL
   ================================ */
.forecast-panel + .forecast-panel {
  margin-top: 24px;
}

/* Forecast header: title + beach pills */
.forecast-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.spot-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 3px;
}

.spot-subtitle {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Beach name pills */
.beach-pills {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
}

.beach-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: white;
  white-space: nowrap;
}

.beach-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}

.beach-pill-0 { background: #38bdf8; }
.beach-pill-1 { background: #0284c7; }
.beach-pill-2 { background: #0369a1; }

/* Metric icons */
.mi {
  display: inline-block;
  margin-right: 5px;
  font-size: 0.85rem;
  opacity: 0.75;
}

/* Section dividers — top of first row in each group */
.section-start td,
.section-start th {
  border-top: 2px solid var(--slate-200);
  padding-top: 16px;
}

/* Section label rendered above metric name */
.section-start .metric-col::before {
  content: attr(data-section);
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ocean-700);
  margin-bottom: 5px;
  opacity: 0.8;
}

/* "Wave & Swell" label on the very first data row */
.metric-section-first::before {
  content: attr(data-section);
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ocean-700);
  margin-bottom: 5px;
  opacity: 0.8;
}

/* Rating row highlight */
.rating-row td,
.rating-row th.metric-col {
  background: #f0fdf4 !important;
  border-top: 2px solid #bbf7d0;
  padding-top: 15px;
  padding-bottom: 15px;
}

.rating-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--ocean-500), var(--ocean-700));
  color: white;
  border-radius: 999px;
  padding: 4px 13px;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
  white-space: nowrap;
}

/* ================================
   11. TABLE TOOLBAR
   ================================ */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 12px;
  gap: 8px;
}

.table-scroll-buttons {
  display: flex;
  gap: 5px;
}

.scroll-button {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  transition: border-color 0.15s, background 0.15s;
}

.scroll-button:hover {
  background: var(--slate-50);
  border-color: var(--slate-300);
}

/* ================================
   12. FORECAST TABLE
   ================================ */
.table-wrap {
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1.5px solid var(--border);
}

.table-scroll {
  overflow-x: auto;
  overflow-y: visible;
  scroll-behavior: smooth;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.forecast-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  table-layout: fixed;
}

.forecast-table th,
.forecast-table td {
  text-align: left;
  padding: 11px 13px;
  border-bottom: 1px solid var(--border);
}

.forecast-table tr:last-child td,
.forecast-table tr:last-child th {
  border-bottom: none;
}

/* Sticky metric label column */
.forecast-table .metric-col {
  width: 165px;
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--slate-50);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--slate-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 2px 0 8px rgba(15, 23, 42, 0.05);
}

.forecast-table thead th.metric-col {
  z-index: 5;
}

/* Sticky header rows */
.forecast-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--slate-50);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  color: var(--slate-500);
}

/* Day / time column */
.forecast-table .day-col {
  text-align: center;
  min-width: 110px;
}

.forecast-table thead th.day-col .col-date {
  display: block;
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.25;
}

.forecast-table thead th.day-col .col-time {
  display: block;
  margin-top: 3px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.92;
}

/* Beach column tints */
.forecast-table .beach-color-0 { background: rgba(56, 189, 248, 0.10); }
.forecast-table .beach-color-1 { background: rgba(2, 132, 199, 0.10); }
.forecast-table .beach-color-2 { background: rgba(3, 105, 161, 0.10); }

/* Beach column header fills */
.forecast-table thead th.beach-header.beach-color-0,
.forecast-table thead th.day-col.beach-color-0 {
  background: #38bdf8;
  color: white;
}

.forecast-table thead th.beach-header.beach-color-1,
.forecast-table thead th.day-col.beach-color-1 {
  background: #0284c7;
  color: white;
}

.forecast-table thead th.beach-header.beach-color-2,
.forecast-table thead th.day-col.beach-color-2 {
  background: #0369a1;
  color: white;
}

/* Subtle row alternation */
.forecast-table tbody tr:nth-child(even) td { background: #fbfdff; }
.forecast-table tbody tr:nth-child(even) th.metric-col { background: #f4f7fa; }

/* ================================
   13. VALUE PILLS & BADGES
   ================================ */
.value-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
}

.value-good { background: #dcfce7; color: #166534; }
.value-ok   { background: #fef9c3; color: #854d0e; }
.value-bad  { background: #fee2e2; color: #991b1b; }
.value-cool { background: #e0f2fe; color: #075985; }

.badge {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ================================
   14. LOADING STATE
   ================================ */
#loading-indicator {
  display: none;
}

#spot-details.is-loading #loading-indicator {
  display: flex;
}

#spot-details.is-loading #spot-content {
  display: none;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  gap: 14px;
}

.loading-container p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--slate-200);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Inline warning when some spots failed but others loaded */
.forecast-warning {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.85rem;
  line-height: 1.45;
}

/* ================================
   15. EMPTY STATE
   ================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px 24px;
  text-align: center;
}

.empty-state-icon {
  font-size: 2.8rem;
  margin-bottom: 14px;
  line-height: 1;
  display: block;
}

.empty-state h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 340px;
  line-height: 1.6;
}

.page-center {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
}

.page-center > .card {
  max-width: 580px;
  width: 100%;
}

.page-center > .about-article {
  max-width: 860px;
}

.about-article h3 {
  margin-top: 2rem;
  color: var(--color-primary);
}

.about-article ul,
.about-article ol {
  padding-left: 1.5rem;
  line-height: 1.8;
}

.blog-intro {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.blog-post {
  margin-bottom: 0.5rem;
}

.blog-post h3 {
  margin-top: 0;
  color: var(--color-primary);
}

.blog-post ol,
.blog-post ul {
  padding-left: 1.5rem;
  line-height: 1.8;
}

.blog-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

.blog-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

.blog-post h3 a {
  color: var(--color-primary);
  text-decoration: none;
}

.blog-post h3 a:hover {
  text-decoration: underline;
}

.blog-read-more {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}

.blog-read-more:hover {
  text-decoration: underline;
}

.blog-breadcrumb {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.blog-breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.blog-breadcrumb a:hover {
  color: var(--color-primary);
}

.blog-post--full h2 {
  margin-top: 0.25rem;
  margin-bottom: 1.5rem;
}

.blog-body p,
.blog-body ol,
.blog-body ul {
  line-height: 1.8;
  margin-bottom: 1rem;
}

.blog-body ol,
.blog-body ul {
  padding-left: 1.5rem;
}

.blog-cta {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.blog-cta p {
  margin: 0;
  color: var(--color-text-muted);
}

/* ================================
   16. LANDING PAGE
   ================================ */
.intro {
  grid-column: 1 / -1;
  display: grid;
  gap: 20px;
}

/* ── Hero search ──────────────────────────────────────────────── */
.hero-search-wrap {
  position: relative;
  max-width: 520px;
  margin: 0 0 28px;
  z-index: 2;
}

.hero-search-wrap::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat center;
  pointer-events: none;
  z-index: 1;
}

#intro-search {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 15px 16px 15px 48px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: white;
  outline: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  transition: box-shadow 0.2s;
  box-sizing: border-box;
}

#intro-search:focus {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.28), 0 0 0 3px rgba(255, 255, 255, 0.4);
}

#intro-search::placeholder {
  color: var(--slate-400);
}

/* ── Hero ─────────────────────────────────────────────────────── */
.landing-hero {
  background: linear-gradient(145deg, var(--ocean-900) 0%, var(--ocean-700) 38%, var(--ocean-500) 72%, var(--ocean-400) 100%);
  border-radius: 24px;
  padding: 56px 52px 88px; /* extra bottom clearance for wave animation */
  color: white;
  position: relative;
  overflow: hidden;
}

/* Decorative blobs */
.landing-hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -60px;
  width: 380px; height: 380px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  pointer-events: none;
}

.landing-hero::after {
  content: '';
  position: absolute;
  bottom: -100px; right: 110px;
  width: 260px; height: 260px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  pointer-events: none;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 5px 15px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

.landing-headline {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.04;
  margin: 0 0 18px;
  position: relative;
  z-index: 1;
}

.headline-accent {
  color: #bae6fd;
  display: block;
}

.landing-sub {
  margin: 0 0 32px;
  font-size: 1.05rem;
  opacity: 0.82;
  max-width: 500px;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* ── CTA Buttons ──────────────────────────────────────────────── */
.landing-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  color: var(--ocean-800);
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px solid rgba(255, 255, 255, 0.36);
  color: white;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ── Stats strip ──────────────────────────────────────────────── */
.landing-stats {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 28px;
  position: relative;
  z-index: 1;
}

.stat-num {
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 3px;
}

.stat-label {
  display: block;
  font-size: 0.68rem;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
}

.stat-divider {
  width: 1px;
  height: 38px;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

/* ── Feature items ────────────────────────────────────────────── */
.landing-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feature-item {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.2s, transform 0.2s;
}

.feature-item:hover {
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.10);
  transform: translateY(-2px);
}

.feature-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.feat-blue   { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.feat-teal   { background: linear-gradient(135deg, #ccfbf1, #99f6e4); }
.feat-purple { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.feat-amber  { background: linear-gradient(135deg, #fef3c7, #fde68a); }

.feature-text h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.feature-text p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}


/* ── How it works ─────────────────────────────────────────────── */
.landing-steps {
  padding: 32px 36px;
}

.steps-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin: 0 0 24px;
}

.steps {
  display: flex;
  align-items: flex-start;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.3);
  flex-shrink: 0;
}

.step h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
}

.step p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 180px;
  line-height: 1.55;
}

.step-connector {
  flex-shrink: 0;
  width: 80px;
  height: 2px;
  background: var(--border);
  margin-top: 24px;
}

/* ── Animated hero waves ──────────────────────────────────────── */
.hero-waves {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 76px;
  pointer-events: none;
  z-index: 1;
}

.hero-waves svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hw-3 {
  fill: rgba(255, 255, 255, 0.07);
  animation: wave-sway 14s ease-in-out infinite;
}

.hw-2 {
  fill: rgba(255, 255, 255, 0.06);
  animation: wave-sway 10s ease-in-out infinite reverse;
}

.hw-1 {
  fill: rgba(255, 255, 255, 0.10);
  animation: wave-sway 7s ease-in-out infinite;
}

@keyframes wave-sway {
  0%, 100% { transform: translateX(0); }
  50%       { transform: translateX(-90px); }
}

/* ── Surf story illustration ──────────────────────────────────── */
.surf-story {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1.5px solid rgba(14, 165, 233, 0.15);
  border-radius: 20px;
  padding: 24px 28px 16px;
  overflow: hidden;
}

.surf-story-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin: 0 0 14px;
}

.surf-illustration {
  width: 100%;
  max-height: 310px;
  display: block;
}

/* ================================
   17. METRICS (single-beach view)
   ================================ */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.metric {
  background: var(--slate-50);
  border-radius: 12px;
  padding: 12px 14px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 3px;
}

.metric strong {
  font-size: 1.1rem;
}

/* ================================
   18. RESPONSIVE
   ================================ */
@media (max-width: 1024px) {
  main {
    grid-template-columns: 250px 1fr;
  }
}

@media (max-width: 920px) {
  .forecast-table { font-size: 0.82rem; }
  .forecast-table .metric-col { width: 140px; }
  .forecast-table .day-col { min-width: 96px; }
}

@media (max-width: 768px) {
  header {
    padding: 18px 16px 0;
  }

  .topbar {
    margin-bottom: 16px;
    position: relative;
  }

  .hamburger {
    display: flex;
  }

  #main-nav {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: -16px;
    right: -16px;
    z-index: 200;
    background: linear-gradient(160deg, var(--ocean-900) 0%, var(--ocean-700) 100%);
    flex-direction: column;
    padding: 8px 0 12px;
    border-top: 1px solid rgba(255,255,255,0.12);
  }

  #main-nav.nav-open {
    display: flex;
  }

  #main-nav a,
  #main-nav button {
    padding: 11px 20px;
    font-size: 0.95rem;
    border-radius: 0;
    text-align: left;
    width: 100%;
    justify-content: flex-start;
  }

  #main-nav a:hover,
  #main-nav button:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  #main-nav form {
    display: block;
  }

  .header-inner {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
  }

  .brand h1 {
    font-size: 1.5rem;
  }

  .brand p {
    font-size: 0.875rem;
  }

  .chip {
    align-self: flex-start;
  }

  .header-wave {
    height: 36px;
  }

  main {
    grid-template-columns: 1fr;
    padding: 18px 16px 36px;
    gap: 16px;
  }

  .spot-list {
    position: static;
  }

  .card {
    padding: 16px;
    border-radius: 14px;
  }

  .beach-actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  .beach-filters {
    max-height: min(360px, 45vh);
  }

  .spot-title {
    font-size: 1.25rem;
  }

  .table-toolbar {
    gap: 8px;
  }

  .forecast-table .metric-col {
    width: 110px;
  }

  .forecast-table .day-col {
    min-width: 80px;
  }

  .forecast-table th,
  .forecast-table td {
    padding: 9px 8px;
  }

  .landing-hero {
    padding: 36px 28px 80px;
    border-radius: 18px;
  }

  .surf-story {
    padding: 20px 16px 12px;
  }

  .landing-headline {
    font-size: 2.2rem;
  }

  .landing-sub {
    font-size: 0.95rem;
  }

  .landing-features {
    grid-template-columns: 1fr;
  }

  .landing-stats {
    gap: 18px;
  }

  .stat-divider {
    display: none;
  }

  .steps {
    flex-direction: column;
    gap: 20px;
  }

  .step {
    flex-direction: row;
    text-align: left;
    gap: 16px;
  }

  .step-connector {
    display: none;
  }

  .step p {
    max-width: none;
  }

  .landing-steps {
    padding: 24px 20px;
  }

  .empty-state {
    padding: 40px 20px;
  }
}

@media (max-width: 480px) {
  .landing-headline {
    font-size: 1.85rem;
  }

  .landing-hero {
    padding: 28px 22px;
  }

  .landing-features {
    grid-template-columns: 1fr;
  }
}
