/* InletShots CSS — consistent with existing ecosystem (GOTW, BuoyPal) */

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

:root {
  --bg: #0B1D2B;
  --card-bg: #112033;
  --card-hover: #152640;
  --border: #1E3A54;
  --text: #E8F0F8;
  --text-muted: #7A9BB5;
  --accent: #00C2B8;
  --accent-dark: #009E96;
  --danger: #E05C5C;
  --warning: #F5A623;
  --surface: #0F2236;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.3);
  --font: 'Inter', system-ui, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */

.is-header {
  background: rgba(11, 29, 43, .95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1050; /* Above Leaflet controls (~1000) */
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 24px;
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.5px;
}

.logo-text span {
  color: var(--accent);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}

.nav-link:hover { color: var(--text); background: rgba(255,255,255,.05); }

/* Marketplace link — always visible, accent-colored */
.nav-marketplace {
  color: var(--accent) !important;
  font-weight: 600;
  flex-shrink: 0;
}
.nav-marketplace:hover { background: rgba(14,165,233,.12); color: var(--accent-dark) !important; }

.login-btn {
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .15s;
}

.login-btn:hover { background: var(--accent-dark); }

/* ─── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 60px 20px 32px;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero-title em { font-style: normal; color: var(--accent); }

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 32px;
}

/* ─── Map ────────────────────────────────────────────────────────────────── */

.map-wrap {
  position: relative;
  margin: 0 20px 32px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

#inlet-map { height: 420px; }

#map-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(11,29,43,.85);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  z-index: 1000;
}

.ml-item {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ─── Inlet List ─────────────────────────────────────────────────────────── */

.inlet-list-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.inlet-count { font-size: 16px; color: var(--text-muted); }

.sort-bar {
  margin-bottom: 12px;
}

.location-sort-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.location-sort-bar .sort-select {
  flex: 1 1 360px;
  min-width: 0;
}

.sort-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237A9BB5' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.sort-select:focus {
  outline: none;
  border-color: var(--accent);
}

.location-status {
  flex: 1 1 auto;
  min-height: 1.4em;
  padding: 0 2px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.location-status[data-state="pending"],
.location-status[data-state="success"] { color: var(--accent); }

.location-status[data-state="fallback"] { color: var(--text); }

.inlet-search-wrap {
  margin-bottom: 16px;
}

.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 14px;
}

.search-input {
  width: 100%;
  padding: 10px 40px 10px 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-input::placeholder { color: var(--text-muted); }

.search-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color .2s;
}

.search-clear:hover { color: var(--text); }
.search-clear.hidden { display: none; }

.no-results {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.inlet-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.inlet-table {
  width: 100%;
  border-collapse: collapse;
}

.inlet-table th {
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.inlet-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(30,58,84,.5);
  font-size: 14px;
  color: var(--text);
}

.inlet-table tr:last-child td { border-bottom: none; }
.inlet-table tr:hover td { background: var(--card-hover); }

.inlet-table td a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.inlet-table td a:hover { text-decoration: underline; }

/* ─── Inlet Detail ────────────────────────────────────────────────────────── */

.breadcrumb {
  max-width: 1100px;
  margin: 16px auto 0;
  padding: 0 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.inlet-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.inlet-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.inlet-region-badge {
  display: inline-block;
  background: rgba(0,194,184,.15);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.inlet-desc {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 12px;
}

.inlet-coords {
  font-size: 13px;
  color: var(--text-muted);
  font-family: monospace;
}

.content-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.count-badge {
  background: rgba(255,255,255,.1);
  color: var(--text-muted);
  font-size: 14px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* ─── Conditions ─────────────────────────────────────────────────────────── */

.conditions-list { display: flex; flex-direction: column; gap: 12px; }

.condition-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  user-select: none;
}
.condition-card:hover {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 1px rgba(14,165,233,0.2);
}
.condition-card.expanded {
  border-color: #0ea5e9;
}
.condition-card .cond-detail { display: none; }
.condition-card.expanded .cond-detail { display: block; }
.condition-card.expanded .cond-summary { display: none; }

.cond-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cond-user { font-weight: 600; font-size: 14px; color: var(--accent); }
.cond-date { font-size: 12px; color: var(--text-muted); }

.cond-summary { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cond-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--card-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s;
}
.cond-chip:hover { background: rgba(14,165,233,0.1); }
.cond-tap-hint { font-size: 11px; color: var(--text-muted); margin-left: auto; }

.cond-detail { padding-top: 8px; border-top: 1px solid var(--border); margin-top: 8px; }
.cond-row { font-size: 14px; line-height: 1.7; }
.cond-row.hazard { color: var(--warning); }
.cond-label { color: var(--text-muted); margin-right: 6px; }
.cond-notes { font-size: 14px; color: var(--text-muted); margin-top: 8px; font-style: italic; }
.cond-photo {
  width: 100%;
  max-width: 400px;
  border-radius: 8px;
  margin-top: 10px;
  cursor: zoom-in;
  display: block;
}

/* ─── Photo Grid ───────────────────────────────────────────────────────────── */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.photo-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}

.photo-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.photo-img-wrap { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.photo-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.watermark-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  color: rgba(255,255,255,.7);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  letter-spacing: .5px;
  text-align: right;
}

.watermark-overlay-lg {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,.5);
  color: rgba(255,255,255,.8);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
}

.sale-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--accent);
  color: #000;
  font-weight: 800;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 20px;
}

.photo-meta { padding: 12px; }
.photo-owner { font-size: 12px; color: var(--accent); font-weight: 600; }
.photo-caption { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.photo-date { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.photo-buy-btn {
  display: inline-block;
  margin-top: 8px;
  background: var(--accent);
  color: #000;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  text-decoration: none;
}

/* ─── Lightbox ─────────────────────────────────────────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.95);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.lightbox.hidden { display: none; }

.lb-close {
  position: absolute;
  top: 20px; right: 20px;
  background: rgba(255,255,255,.1);
  color: #fff;
  border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: background .15s;
}

.lb-close:hover { background: rgba(255,255,255,.2); }

.lb-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lb-caption {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

/* ─── Forms ────────────────────────────────────────────────────────────────── */

.submit-form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.submit-form.hidden { display: none; }

.cond-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.cond-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.cond-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  font-family: var(--font);
  transition: border-color .15s;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

.file-input {
  background: var(--surface);
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 14px;
  padding: 12px;
  border-radius: 8px;
  width: 100%;
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover { background: var(--accent-dark); }

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: color .15s, border-color .15s;
}

.btn-secondary:hover { color: var(--text); border-color: var(--text-muted); }

#price-row.hidden { display: none; }

/* ─── Marketplace ────────────────────────────────────────────────────────── */

.mp-hero {
  padding: 40px 20px 24px;
  text-align: center;
}

.mp-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.mp-sub { color: var(--text-muted); font-size: 16px; }

.mp-filters {
  display: flex;
  gap: 12px;
  padding: 0 20px 24px;
  max-width: 1100px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.filter-select {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font);
}

.filter-select:focus { outline: none; border-color: var(--accent); }

.mp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.mp-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: border-color .2s, transform .2s;
}

.mp-card:hover { border-color: var(--accent); transform: translateY(-3px); }

.mp-img-wrap { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.mp-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-price {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--accent);
  color: #000;
  font-weight: 800;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 20px;
}

.mp-meta { padding: 14px; }
.mp-inlet { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 2px; }
.mp-photographer { font-size: 13px; color: var(--text-muted); }
.mp-caption { font-size: 13px; color: var(--text); margin-top: 4px; }
.mp-date { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ─── Photo Detail ─────────────────────────────────────────────────────────── */

.photo-detail-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.purchase-success {
  background: rgba(0,194,184,.15);
  border: 1px solid rgba(0,194,184,.3);
  color: var(--accent);
  padding: 16px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  margin-bottom: 20px;
}

.photo-detail-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

.photo-detail-img-wrap { position: relative; border-radius: var(--radius); overflow: hidden; }
.photo-detail-img { width: 100%; display: block; }

.photo-detail-info { padding-top: 4px; }
.pd-inlet {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}

.pd-inlet a { color: var(--accent); text-decoration: none; }
.pd-inlet a:hover { text-decoration: underline; }

.pd-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pd-photographer { font-size: 14px; color: var(--text-muted); margin-bottom: 4px; }
.pd-date { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.pd-price { font-size: 32px; font-weight: 800; color: var(--accent); margin-bottom: 4px; }
.pd-license { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

.buy-form { margin-bottom: 12px; }

.btn-buy {
  display: block;
  width: 100%;
  background: var(--accent);
  color: #000;
  font-weight: 800;
  font-size: 16px;
  padding: 14px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background .15s;
}

.btn-buy:hover { background: var(--accent-dark); }
.btn-buy:disabled { opacity: .6; cursor: not-allowed; }

.error-msg { color: var(--danger); font-size: 14px; margin-top: 8px; }
.pd-not-for-sale { font-size: 14px; color: var(--text-muted); font-style: italic; }

/* ─── Admin ────────────────────────────────────────────────────────────────── */

.admin-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-title {
  font-size: 28px;
  font-weight: 800;
}

.inlet-table .actions { white-space: nowrap; }

.btn-edit {
  background: rgba(0,194,184,.15);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  margin-right: 6px;
  border: 1px solid rgba(0,194,184,.2);
  transition: background .15s;
}

.btn-edit:hover { background: rgba(0,194,184,.25); }

.btn-content {
  background: rgba(14,165,233,.15);
  color: #0ea5e9;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  margin-right: 6px;
  border: 1px solid rgba(14,165,233,.2);
  transition: background .15s;
}

.btn-content:hover { background: rgba(14,165,233,.25); }

.btn-delete {
  background: rgba(224,92,92,.15);
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid rgba(224,92,92,.2);
  transition: background .15s;
}

.btn-delete:hover { background: rgba(224,92,92,.25); }

/* Icon-only action buttons on mobile */
.btn-edit.icon-only, .btn-delete.icon-only {
  padding: 6px 8px;
  font-size: 16px;
  margin-right: 4px;
}

/* ─── Admin Inlet List — Mobile Responsive ───────────────────────────────── */

@media (max-width: 480px) {
  .admin-section { padding: 16px 12px 40px; }
  .admin-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .admin-title { font-size: 20px; }
  #add-inlet-btn { font-size: 13px; padding: 8px 16px; }
  .inlet-table-wrap { overflow-x: visible; }

  /* Stack table rows as cards */
  .inlet-table {
    display: block;
    border: none;
  }

  .inlet-table thead {
    display: none; /* hide column headers on mobile */
  }

  .inlet-table tbody {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .inlet-table tr {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
  }

  .inlet-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border: none;
    font-size: 13px;
    border-bottom: 1px solid rgba(30,58,84,.4);
  }

  .inlet-table td:last-child {
    border-bottom: none;
    padding-top: 10px;
    margin-top: 4px;
    justify-content: flex-end;
    gap: 6px;
  }

  .inlet-table td[data-label]::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-right: 8px;
    min-width: 80px;
  }

  .inlet-table td.actions {
    flex-direction: row;
  }

  /* Inline coordinates on one line for mobile */
  .inlet-table tr:has(td[data-label="Lat"]) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 0;
  }

  .inlet-table td[data-label="Lat"],
  .inlet-table td[data-label="Lng"] {
    padding: 2px 0;
    border: none;
  }

  .inlet-table td[data-label="Name"] {
    font-size: 15px;
    font-weight: 600;
    padding-bottom: 8px;
  }

  .inlet-table td[data-label="Name"] a {
    font-size: 15px;
  }

  /* Touch targets ≥44px */
  .btn-edit, .btn-delete {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    padding: 0;
  }

  /* Shorten coordinate precision for mobile */
  .inlet-table td[data-label="Coords"] {
    font-size: 12px;
    font-family: monospace;
    color: var(--text-muted);
  }

  .inlet-table td[data-label="Coords"]::before {
    display: none; /* coords are self-explanatory, no label needed */
  }
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden { display: none; }

.modal-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 400px;
  width: 90%;
}

.modal-box h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.modal-box p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.modal-warn { color: var(--warning); font-weight: 600; margin-top: 8px; }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-delete-confirm {
  background: var(--danger);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

/* ─── Empty State ──────────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 16px;
  background: var(--card-bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ─── Footer ────────────────────────────────────────────────────────────────── */

.is-footer {
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.is-footer a { color: var(--accent); text-decoration: none; }
.is-footer a:hover { text-decoration: underline; }

/* ─── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .photo-detail-grid { grid-template-columns: 1fr; }

  .cond-form .form-row { grid-template-columns: 1fr; }

  .mp-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

  #inlet-map { height: 300px; }

  .section-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .hero { padding: 40px 16px 24px; }
  .hero-title { font-size: 32px; }

  .mp-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }

  .logo-text { font-size: 16px; }
  .logo-icon { font-size: 20px; }

  .header-inner { flex-wrap: wrap; gap: 8px; }

  .header-nav { gap: 6px; flex-shrink: 0; }
  .nav-link { font-size: 12px; padding: 5px 7px; }

  .location-sort-bar { display: block; }
  .location-status { margin-top: 8px; }
  .login-btn { font-size: 12px; padding: 5px 10px; }
}

/* ─── Hamburger Button ────────────────────────────────────────────────────── */

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
  border-radius: 6px;
  transition: background .15s;
}

.hamburger-btn:hover { background: rgba(255,255,255,.1); }

.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  margin: 5px 0;
  transition: transform .25s, opacity .25s;
}

.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Mobile Nav Dropdown ────────────────────────────────────────────────── */
/* Hamburger opens a dropdown below the header — never covers main content. */

@media (max-width: 640px) {
  .hamburger-btn { display: flex; align-items: center; }
  .nav-marketplace { font-size: 12px; padding: 6px 8px; }

  /* Dropdown positioned relative to header, not fixed/fullscreen */
  .header-inner { position: relative; }

  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    max-width: 90vw;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    gap: 2px;
    z-index: 1200;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    margin-left: 0;
  }

  .header-nav.open { display: flex; }

  .header-nav .nav-link {
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text);
  }

  .header-nav .nav-link:hover { background: rgba(255,255,255,.08); }

  .header-nav .login-btn {
    display: block;
    font-size: 14px;
    padding: 10px 12px;
    text-align: center;
    margin-top: 4px;
    box-sizing: border-box;
  }

  /* Logout button: reset browser <button> defaults so text is visible on dark bg */
  .header-nav .nav-logout {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    padding: 10px 12px;
    cursor: pointer;
    text-align: center;
    margin-top: 4px;
  }

  /* Backdrop: transparent click-away layer, does NOT obscure content */
  .nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 1100;
  }

  .nav-backdrop.open { display: block; }
}

/* ─── Tide Forecast ────────────────────────────────────────────────────── */

.tide-section {
  margin-top: 0;
}

.noaa-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 6px;
  transition: color .15s, border-color .15s;
}

.noaa-link:hover { color: var(--accent); border-color: var(--accent); }

.tide-summary-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tide-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  min-width: 160px;
  flex: 1;
}

.tide-card.high-card { border-color: rgba(0,194,184,.4); }

.tide-card.low-card { border-color: rgba(122,155,181,.4); }

.tide-card-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 4px;
}

.tide-card-time {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.tide-card-height {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
}

.low-card .tide-card-height { color: #7A9BB5; }

/* Weekly tide graph */
.tide-graph-figure {
  margin-top: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.tide-graph-caption {
  padding: 14px 20px 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
}

.tide-graph-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 20px 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: var(--border) transparent;
  scrollbar-width: thin;
}

.tide-graph-scroll:focus-visible,
.tide-table-wrap:focus-visible,
.noaa-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.tide-graph-svg {
  display: block;
  max-width: none;
  color: var(--text-muted);
}

.tide-grid-line {
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.tide-grid-label {
  fill: var(--text-muted);
  font-size: 11px;
}

.tide-baseline {
  stroke: rgba(232,240,248,.45);
  stroke-width: 1.5;
}

.tide-curve {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.tide-event {
  outline: none;
}

.tide-event-point {
  stroke: var(--card-bg);
  stroke-width: 3;
}

.tide-event.high .tide-event-point { fill: var(--accent); }
.tide-event.low .tide-event-point { fill: #7A9BB5; }

.tide-event:focus .tide-event-point,
.tide-event:hover .tide-event-point {
  stroke: var(--text);
  stroke-width: 4;
}

.tide-event-value {
  fill: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.tide-event-time,
.tide-event-day {
  fill: var(--text-muted);
  font-size: 11px;
}

.tide-event-day { font-weight: 700; }

/* Weekly tide table */
.tide-table-wrap {
  margin-top: 16px;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
  scrollbar-color: var(--border) transparent;
  scrollbar-width: thin;
}

.tide-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  text-align: left;
}

.tide-table caption {
  padding: 14px 16px 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .7px;
  text-align: left;
  text-transform: uppercase;
}

.tide-table th,
.tide-table td {
  border-top: 1px solid var(--border);
  padding: 11px 16px;
  white-space: nowrap;
}

.tide-table thead th {
  background: var(--surface);
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.tide-table tbody th,
.tide-table tbody td {
  color: var(--text);
  font-size: 13px;
}

.tide-table-day { min-width: 130px; font-weight: 700; }
.tide-table-time { min-width: 110px; }
.tide-table-event { min-width: 130px; font-weight: 700; }
.tide-table-event.high,
.tide-table-height { color: var(--accent); }
.tide-table-event.low,
.tide-table-direction { color: #A9C0D2; }
.tide-table-height { min-width: 90px; font-weight: 700; }
.tide-table-direction { min-width: 110px; }

/* Mobile: keep labels readable and let dense data scroll horizontally. */
@media (max-width: 480px) {
  .tide-summary-row { flex-direction: column; }
  .tide-card { min-width: unset; }
  .tide-graph-caption { padding-left: 16px; }
  .tide-graph-scroll { padding-left: 16px; padding-right: 16px; }
  .tide-table th,
  .tide-table td { padding-left: 13px; padding-right: 13px; }
}

/* Tide forecast unavailable */
.tide-unavailable {
  padding: 20px;
  text-align: center;
  color: #64748b;
  font-size: 0.95rem;
}
.tide-unavailable a { color: #0ea5e9; }

/* Admin: review badge */
.badge-warn { background: #f59e0b; color: white; font-size: 12px; padding: 2px 8px; border-radius: 10px; display: inline-block; }
