
:root {
  --color-bg: #F4F6F4;
  --color-surface: #FFFFFF;
  --color-surface-2: #F3F6F4;
  --color-ink: #16302B;
  --color-ink-muted: #5B6B64;
  --color-border: #DCE3DE;

  --color-primary: #1F6F78;
  --color-primary-dark: #123B3E;
  --color-primary-tint: #E4EFEE;
  --color-rain: #2F6FA8;
  --color-rain-tint: #E6EFF8;

  --color-accent: #C97F2A;
  --color-accent-dark: #9C611E;
  --color-accent-tint: #FBEEDD;

  --color-danger: #B3432B;
  --color-danger-tint: #FBEAE5;
  --color-success: #3E7C59;
  --color-success-tint: #E7F2EB;

  --font-heading: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-btn: 12px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(22, 48, 43, 0.05);
  --shadow-raised: 0 6px 18px rgba(18, 59, 62, 0.12);
  --shadow-fab: 0 8px 18px rgba(201, 127, 42, 0.35);

  --nav-height: 66px;
  --topbar-height: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  line-height: 1.2;
  margin: 0 0 8px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

h1 { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 14px; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.06rem; }

.section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-ink);
  margin: 22px 4px 10px;
  letter-spacing: -0.01em;
}

p { margin: 0 0 12px; }

a { color: var(--color-primary); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}


.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar__brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar__brand svg { flex-shrink: 0; }

.topbar__logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar__greeting {
  font-size: 0.85rem;
  color: var(--color-ink-muted);
}

.content {
  flex: 1;
  padding: 16px 16px calc(var(--nav-height) + 24px);
}

.content--centered {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 48px;
}


.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  max-width: 480px;
  margin: 0 auto;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 20;
}

.tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--color-ink-muted);
  font-size: 0.68rem;
  font-weight: 500;
  flex: 1;
  padding: 6px 0;
}

.tabbar__item svg {
  width: 22px;
  height: 22px;
  box-sizing: content-box;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  transition: background 0.15s ease;
}

.tabbar__item.is-active {
  color: var(--color-primary-dark);
  font-weight: 700;
}

.tabbar__item.is-active svg { background: var(--color-primary-tint); }

.tabbar__item:hover { text-decoration: none; color: var(--color-primary-dark); }

.tabbar__fab {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-fab);
  margin-top: -26px;
  border: 4px solid var(--color-bg);
}

.tabbar__fab svg { width: 24px; height: 24px; }

.tabbar__fab-label {
  font-size: 0.68rem;
  color: var(--color-accent-dark);
  font-weight: 600;
  margin-top: 2px;
}


.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 18px;
  margin-bottom: 12px;
}

.card--deep {
  background: var(--color-primary-dark);
  color: #FFFFFF;
  box-shadow: var(--shadow-raised);
}
.card--deep h1, .card--deep h2, .card--deep h3 { color: #FFFFFF; }
.card--deep .text-muted { color: rgba(255, 255, 255, 0.72); }

.card--tight {
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

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

.list-item {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-card);
}

.list-item__main { min-width: 0; }
.list-item__title { display: block; font-weight: 600; color: var(--color-ink); }
.list-item__meta { display: block; font-size: 0.84rem; color: var(--color-ink-muted); margin-top: 2px; }
.list-item__lure-name { display: block; font-size: 0.86rem; font-weight: 600; color: var(--color-ink); margin-top: 4px; }
.list-item__chevron {
  flex-shrink: 0;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--color-ink-muted);
  padding: 4px 2px;
}

.list--grouped {
  gap: 0;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 12px;
}

.list--grouped > .list-item {
  border-radius: 0;
  box-shadow: none;
  justify-content: flex-start;
  gap: 14px;
  position: relative;
  color: var(--color-ink);
}

.list--grouped > .list-item + .list-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 0;
  height: 1px;
  background: var(--color-border);
}

.list--grouped > .list-item:has(> .list-item__icon) + .list-item:has(> .list-item__icon)::before { left: 62px; }

.list--grouped > .list-item:hover,
.list--grouped > .list-item:focus-visible { background: var(--color-surface-2); text-decoration: none; }

.list--grouped .list-item__main { flex: 1; }

.list-item__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--color-primary-tint);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.list-item__icon svg { width: 18px; height: 18px; }
.list-item__icon--danger { background: var(--color-danger-tint); color: var(--color-danger); }

.list--grouped .list-item__chevron {
  font-size: 1.3rem;
  color: #A8B5AE;
}

.list-item--danger .list-item__title { color: var(--color-danger); }

.tile-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.tile-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.tile {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--color-ink);
  text-decoration: none;
  min-height: 104px;
  transition: background 0.15s ease;
}

.tile:hover, .tile:focus-visible { background: var(--color-surface-2); text-decoration: none; }

.tile__icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--color-primary-tint);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile__icon svg { width: 21px; height: 21px; }

.tile__label {
  font-weight: 650;
  font-size: 0.88rem;
  line-height: 1.25;
  margin-top: auto;
}

.tile__meta {
  font-size: 0.76rem;
  color: var(--color-ink-muted);
  line-height: 1.3;
  margin-top: -6px;
}

.tile__lock {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--color-ink-muted);
}

.tile__lock svg { width: 15px; height: 15px; }

.tile--locked .tile__icon { background: var(--color-border); color: var(--color-ink-muted); }

.profile-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.profile-card__head { display: flex; align-items: center; gap: 14px; }
.profile-card__avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--color-primary);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-card__name { font-size: 1.15rem; font-weight: 750; margin: 0; color: #FFFFFF; letter-spacing: -0.01em; }
.profile-card__email { font-size: 0.86rem; margin: 2px 0 0; color: rgba(255, 255, 255, 0.72); word-break: break-all; }
.profile-card__plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-btn);
  padding: 10px 12px;
}
.profile-card__plan-label { font-size: 0.84rem; color: rgba(255, 255, 255, 0.85); }
.profile-card__plan-label strong { color: #FFFFFF; display: block; font-size: 0.95rem; }
.profile-card .btn--on-deep { background: #FFFFFF; color: var(--color-primary-dark); }
.profile-card .btn--on-deep:hover { background: var(--color-primary-tint); }

.kv {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 9px 0;
}
.kv + .kv { border-top: 1px solid var(--color-border); }
.kv__label { color: var(--color-ink-muted); font-size: 0.9rem; flex-shrink: 0; }
.kv__value { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.card h3 + .kv, .card h4 + .kv { border-top: none; }


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

.empty-state h3 { color: var(--color-ink); margin-bottom: 6px; }


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
  transition: background 0.15s ease;
}

.btn:hover { text-decoration: none; }

.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-dark); }

.btn--accent { background: var(--color-accent); color: #fff; }
.btn--accent:hover { background: var(--color-accent-dark); }

.btn--ghost { background: var(--color-primary-tint); color: var(--color-primary-dark); border: none; }
.btn--ghost:hover { background: #D4E6E3; }

.btn--danger { background: var(--color-danger-tint); color: var(--color-danger); }
.btn--danger:hover { background: #F6D5D0; }

.btn--block { width: 100%; }

.back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  margin-top: 6px;
  border-radius: var(--radius-btn);
  color: var(--color-primary-dark);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}
.back-link:hover, .back-link:focus-visible { background: var(--color-primary-tint); text-decoration: none; }
.back-links { display: flex; gap: 8px; margin-top: 14px; }
.back-links .back-link { margin-top: 0; }

.btn--sm { padding: 8px 14px; font-size: 0.85rem; min-height: 38px; border-radius: var(--radius-sm); }


.field { margin-bottom: 14px; min-width: 0; }

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-ink-muted);
  margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="file"],
.field input[type="date"],
.field input[type="datetime-local"],
.field input[type="time"],
.field input[type="search"],
.field input[type="tel"],
.field input[type="url"],
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-ink);
}

.field input[type="datetime-local"], .field input[type="date"], .field input[type="time"] { min-height: 48px; -webkit-appearance: none; appearance: none; }

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--color-primary);
  background: var(--color-surface);
  outline: 3px solid var(--color-primary-tint);
}

.field textarea { min-height: 80px; resize: vertical; }

input[type="date"], input[type="datetime-local"], input[type="number"], input[type="text"], select {
  font-family: var(--font-body);
}
:not(.field) > input[type="date"]:not([class]),
:not(.field) > input[type="datetime-local"]:not([class]) {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  padding: 8px 10px;
  color: var(--color-ink);
}

input[type="checkbox"], input[type="radio"] {
  accent-color: var(--color-primary);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

input[type="file"] { font-family: var(--font-body); font-size: 0.88rem; color: var(--color-ink-muted); max-width: 100%; }
input[type="file"]::file-selector-button {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-primary-tint);
  color: var(--color-primary-dark);
  padding: 9px 14px;
  margin-right: 10px;
  cursor: pointer;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: var(--color-surface-2);
}

.radio-option input { margin-top: 3px; }
.radio-option__waterway { color: var(--color-ink-muted); font-size: 0.84rem; }
.radio-option__meta { color: var(--color-ink-muted); font-size: 0.78rem; }


.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 0.92rem;
}

.alert--error { background: var(--color-danger-tint); color: var(--color-danger); }
.alert--success { background: var(--color-success-tint); color: var(--color-success); }
.alert--info { background: var(--color-primary-tint); color: var(--color-primary-dark); }

.announcement-banner {
  margin: 0;
  padding: 10px 40px 10px 16px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--color-accent-tint);
  color: var(--color-accent-dark);
  border-bottom: 2px solid var(--color-accent);
  position: relative;
}
#announcement-banner-text::before { content: "📢 "; }
#announcement-banner-close {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-accent-dark);
  font-size: 1rem;
  line-height: 1;
  padding: 6px;
  cursor: pointer;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
}

.badge--active { background: var(--color-success-tint); color: var(--color-success); }
.badge--inactive { background: var(--color-border); color: var(--color-ink-muted); }
.badge--manual { background: var(--color-accent-tint); color: var(--color-accent-dark); }
.badge--category { background: var(--color-primary-tint); color: var(--color-primary-dark); }


.auth-shell {
  max-width: 400px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 20px;
}

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

.auth-brand__logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  background: var(--color-primary-dark);
  border-radius: 20px;
  box-shadow: var(--shadow-raised);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-brand h1 { margin-bottom: 2px; }
.auth-brand p { color: var(--color-ink-muted); font-size: 0.9rem; margin: 0; }

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

.app-footer {
  text-align: center;
  font-size: 0.72rem;
  color: var(--color-ink-muted);
  padding: 16px 0 4px;
}


.stack-sm > * + * { margin-top: 8px; }
.text-muted { color: var(--color-ink-muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

img.catch-photo, img.thumb {
  border-radius: var(--radius-sm);
  display: block;
  max-width: 100%;
}


.spot-map {
  width: 100%;
  height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 6px;
  position: relative;
  z-index: 0;
}

.spot-map .leaflet-popup-content-wrapper {
  border-radius: var(--radius-sm);
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--color-ink);
  margin-bottom: 4px;
}

.info-row__icon { flex-shrink: 0; margin-top: 1px; color: var(--color-primary); }
.info-row__label { color: var(--color-ink-muted); }

.spot-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.spot-card__actions form { margin: 0; }

.action-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.action-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-btn);
  background: var(--color-surface-2);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.action-tile svg { flex-shrink: 0; color: var(--color-primary); }
.action-tile:hover, .action-tile:focus-visible { background: var(--color-primary-tint); text-decoration: none; }
.action-tile--wide { grid-column: span 2; justify-content: center; text-align: center; }
.action-tile--locked { color: var(--color-ink-muted); }
.action-tile--locked svg { color: var(--color-ink-muted); }

.app-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  background: rgba(18, 59, 62, 0.35);
  backdrop-filter: blur(1px);
  padding: 24px;
  text-align: center;
}

.app-loader[hidden] { display: none; }

.app-loader__spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: app-loader-spin 0.7s linear infinite;
}

.app-loader__text {
  color: #fff;
  font-size: 0.92rem;
  max-width: 280px;
  margin: 0;
}

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

.spinner-inline {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 6px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  animation: app-loader-spin 0.7s linear infinite;
}

.field-section { margin: 18px 0 14px; }
.field-section__title { font-weight: 700; color: var(--color-primary-dark); margin-bottom: 2px; }
.field-section__hint { font-size: 0.82rem; margin-bottom: 4px; }


.admin-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }

.admin-tab-btn {
  background: none;
  border: none;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-ink-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  scroll-snap-align: start;
}

.admin-tab-btn.is-active {
  color: var(--color-primary-dark);
  border-bottom-color: var(--color-primary);
}

.admin-tab-panel { display: none; }
.admin-tab-panel.is-active { display: block; }

.sort-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.sort-chip {
  font-family: var(--font-body);
  text-decoration: none;
  display: inline-block;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--color-surface);
  color: var(--color-ink-muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.sort-chip:hover { background: var(--color-primary-tint); color: var(--color-primary-dark); }

.sort-chip.is-active {
  background: var(--color-primary);
  color: #fff;
}

.catalog-toggle {
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
}

.catalog-toggle--active { background: var(--color-success-tint); color: var(--color-success); }
.catalog-toggle--inactive { background: var(--color-border); color: var(--color-ink-muted); }
.catalog-toggle:disabled { opacity: 0.5; cursor: wait; }

.plan-toggle {
  background: var(--color-surface);
  color: var(--color-ink-muted);
  border: 1px solid var(--color-border);
}
.plan-toggle--selected {
  background: var(--color-primary);
  color: #FFFFFF;
  border: 1px solid var(--color-primary);
}

.catalog-add-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.catalog-add-row input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.catalog-add-row .btn { flex-shrink: 0; min-height: auto; padding: 0 18px; }

.mode-toggle {
  display: flex;
  background: var(--color-primary-tint);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 3px;
}

.mode-toggle__option {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--color-ink-muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 6px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.mode-toggle__option.is-selected {
  background: var(--color-surface);
  color: var(--color-ink);
  box-shadow: var(--shadow-card);
}

.mode-toggle__option:disabled { cursor: wait; opacity: 0.6; }

.field-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.field-row:last-child { border-bottom: none; }
.field-row__label { font-weight: 600; margin-bottom: 8px; }

.catalog-delete {
  background: none;
  border: none;
  color: var(--color-ink-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
}

.catalog-delete:hover { color: #B3261E; background: rgba(179, 38, 30, 0.08); }
.catalog-delete:disabled { opacity: 0.5; cursor: wait; }

.catalog-edit {
  background: none;
  border: none;
  color: var(--color-ink-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
}

.catalog-edit:hover { color: var(--color-primary-dark); background: var(--color-primary-tint); }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-top: 10px;
}

.compare-table th {
  text-align: right;
  font-weight: 600;
  color: var(--color-ink);
  padding: 6px 8px;
  border-bottom: 1px solid var(--color-border);
}

.compare-table th:first-child { text-align: left; }

.compare-table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--color-border);
  text-align: right;
}

.compare-table td:first-child {
  text-align: left;
  color: var(--color-ink-muted);
}

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

.sample-note {
  font-size: 0.78rem;
  color: var(--color-ink-muted);
  margin-top: 8px;
}

.accordion-card {
  padding: 0;
  overflow: hidden;
}

.accordion-card > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 40px 18px 18px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  position: relative;
}

.accordion-card > summary::-webkit-details-marker { display: none; }

.accordion-card > summary::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-ink-muted);
  border-bottom: 2px solid var(--color-ink-muted);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.15s ease;
}

.accordion-card[open] > summary::after { transform: translateY(-35%) rotate(-135deg); }

.accordion-card > summary h3 { margin: 0; }

.accordion-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.accordion-card__body {
  padding: 14px 18px 18px;
  border-top: 1px solid var(--color-border);
}

.stat-slider {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 2px 2px 12px;
  margin: 0 -2px 4px;
}

.stat-slider::-webkit-scrollbar { height: 4px; }
.stat-slider::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: var(--radius-pill); }

.stat-slider__card {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: 150px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 14px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-slider__icon { font-size: 1.3rem; }

.stat-slider__icon--svg {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--color-primary-tint);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.stat-slider__icon--svg svg { width: 20px; height: 20px; }
.stat-slider__card--locked .stat-slider__icon--svg { background: var(--color-surface); color: var(--color-ink-muted); }

.stat-slider__title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-ink);
  line-height: 1.25;
}

.stat-slider__meta {
  font-size: 0.78rem;
  color: var(--color-ink-muted);
  line-height: 1.3;
}

.stat-slider__card--locked {
  background: var(--color-surface-2);
}

.stat-number {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-primary-dark);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.tile-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 4px;
}

.tile-grid-2 .stat-slider__card {
  width: auto;
}

.tile-grid-3-square {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tile-grid-3-square__tile {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
}

.compass-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.compass-rose-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 10px auto 16px;
  filter: drop-shadow(0 6px 16px rgba(18, 59, 62, 0.22));
}

.compass-widget--small .compass-rose-wrap {
  width: 148px;
  height: 148px;
  margin: 6px auto 12px;
}

.compass-rose {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, rgba(18, 59, 62, 0.16) 0deg 0.7deg, transparent 0.7deg 30deg),
    radial-gradient(circle at 38% 32%, #ffffff 0%, var(--color-primary-tint) 78%, var(--color-primary-tint) 100%);
  border: 1px solid var(--color-border);
  box-shadow:
    inset 0 0 0 8px var(--color-surface),
    inset 0 0 0 9px var(--color-border),
    inset 0 2px 10px rgba(18, 59, 62, 0.1);
  transition: transform 0.15s linear;
}

.compass-rose::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--color-primary-dark);
  box-shadow: 0 0 0 3px var(--color-surface);
  z-index: 3;
}

.compass-widget--small .compass-rose::after {
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  box-shadow: 0 0 0 2px var(--color-surface);
}

.compass-rose__label {
  position: absolute;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-ink-muted);
  transform: translate(-50%, -50%);
}

.compass-widget--small .compass-rose__label {
  font-size: 0.8rem;
}

.compass-rose__label--n {
  top: 12%;
  left: 50%;
  color: var(--color-danger);
  font-size: 1.05rem;
}

.compass-widget--small .compass-rose__label--n {
  font-size: 0.88rem;
}

.compass-rose__label--o {
  top: 50%;
  left: 88%;
}

.compass-rose__label--z {
  top: 88%;
  left: 50%;
}

.compass-rose__label--w {
  top: 50%;
  left: 12%;
}

.compass-pointer {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  z-index: 2;
  pointer-events: none;
}

.compass-pointer::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 76px solid var(--color-danger);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.compass-pointer::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 2px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 56px solid var(--color-ink-muted);
}

.compass-widget--small .compass-pointer::before {
  border-left-width: 5px;
  border-right-width: 5px;
  border-bottom-width: 50px;
}

.compass-widget--small .compass-pointer::after {
  border-left-width: 4px;
  border-right-width: 4px;
  border-top-width: 37px;
}

.compass-readout {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--color-primary-dark);
  background: var(--color-primary-tint);
  padding: 4px 18px;
  border-radius: 999px;
  margin: 6px 0 12px;
}

.compass-widget--small .compass-readout {
  font-size: 1.05rem;
  padding: 3px 14px;
  margin: 4px 0 10px;
}

.compass-status {
  min-height: 1.1em;
}
.offline-queue { background: var(--color-surface); border-radius: var(--radius-lg, 16px); padding: 14px 16px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(18, 59, 62, 0.06); border-left: 4px solid var(--color-accent); }
.offline-queue[hidden] { display: none; }
.offline-queue__title { margin: 0 0 2px; font-weight: 700; color: var(--color-ink); }
.offline-queue__hint { margin: 0; font-size: 0.85rem; color: var(--color-ink-muted); }
.offline-queue__item { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--color-border, rgba(18, 59, 62, 0.08)); }
.offline-queue__item p { margin: 0 0 8px; font-size: 0.88rem; }
.offline-queue__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.offline-status { background: var(--color-primary-dark); color: #fff; border-radius: var(--radius-btn); padding: 10px 14px; margin-bottom: 12px; font-size: 0.85rem; line-height: 1.4; }
.offline-status[hidden] { display: none; }
.offline-queue__session + .offline-queue__title, .offline-queue__session + .offline-queue__session { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--color-border); }
.offline-queue__list { margin: 8px 0 0; padding-left: 18px; font-size: 0.88rem; color: var(--color-ink); }
.offline-queue__list li { margin: 2px 0; }
.offline-queue__title + .offline-queue__title { margin-top: 12px; }

.faq-suggest { margin: -4px 0 14px; padding: 10px 12px; border-radius: var(--radius-sm, 10px); background: var(--color-primary-tint); }
.faq-suggest__title { margin: 0 0 6px; font-weight: 700; font-size: 0.88rem; color: var(--color-primary-dark); }
.faq-suggest__item { padding: 6px 0; border-top: 1px solid var(--color-border); }
.faq-suggest__item:first-of-type { border-top: 0; }
.faq-suggest__item summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.faq-suggest__answer { margin: 6px 0 8px; font-size: 0.88rem; line-height: 1.45; white-space: pre-wrap; }
.faq-suggest__hint, .faq-suggest__thanks { margin: 8px 0 0; font-size: 0.8rem; color: var(--color-ink-muted, #5B6B64); }
.faq-suggest__thanks { color: var(--color-primary-dark); font-weight: 600; }

.admin-menu { margin-bottom: 16px; }
.admin-menu__groups { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.admin-menu__group {
  padding: 6px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  color: var(--color-ink-muted); background: var(--color-surface); border: 1px solid var(--color-border);
  text-decoration: none;
}
.admin-menu__group:hover { text-decoration: none; color: var(--color-primary-dark); }
.admin-menu__group.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.admin-menu__pages { display: flex; flex-wrap: wrap; gap: 2px 4px; border-bottom: 1px solid var(--color-border); }
.admin-menu__page {
  padding: 8px 10px; font-size: 0.9rem; font-weight: 600; color: var(--color-ink-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none;
}
.admin-menu__page:hover { text-decoration: none; color: var(--color-primary-dark); }
.admin-menu__page.is-active { color: var(--color-primary-dark); border-bottom-color: var(--color-primary); }

.tide-hours { margin-top: 16px; }
.tide-hours__title { font-weight: 600; margin: 0 0 2px; }
.tide-hours__summary { font-size: 0.85rem; color: var(--color-ink-muted); margin: 0 0 10px; }
.tide-hours__bars { display: grid; grid-template-columns: repeat(6, 1fr) 26px repeat(6, 1fr); gap: 3px; align-items: end; }
.tide-hours__col { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.tide-hours__track { width: 100%; height: 70px; display: flex; align-items: flex-end; background: var(--color-primary-tint); border-radius: 4px; overflow: hidden; }
.tide-hours__bar { width: 100%; background: var(--color-primary); border-radius: 4px 4px 0 0; min-height: 0; }
.tide-hours__bar.is-best { background: var(--color-accent); }
.tide-hours__count { font-size: 0.7rem; color: var(--color-ink-muted); height: 0.9rem; font-variant-numeric: tabular-nums; }
.tide-hours__label { font-size: 0.65rem; color: var(--color-ink-muted); white-space: nowrap; }
.tide-hours__axis { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--color-ink-muted); margin: 4px 0 0; }
.tide-hours__hw { display: flex; flex-direction: column; align-items: center; align-self: stretch; gap: 3px; }
.tide-hours__hw-tag { font-size: 0.68rem; font-weight: 700; color: #fff; background: var(--color-primary-dark); border-radius: 4px; padding: 0 4px; line-height: 0.9rem; height: 0.9rem; }
.tide-hours__hw-line { flex: 1; width: 0; border-left: 2px dashed var(--color-primary-dark); }
.tide-hours__hw-label { font-size: 0.65rem; font-weight: 700; color: var(--color-primary-dark); }


.map-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  margin: 0 !important;
  border-radius: 0 !important;
  z-index: 1500 !important;
}
body.map-fullscreen-open {
  overflow: hidden;
}
.map-fullscreen-control a {
  font-size: 18px;
  line-height: 30px;
  text-align: center;
  font-weight: 700;
  color: var(--color-ink, #12302e);
  background: #fff;
}
.map-fullscreen .map-fullscreen-control {
  margin-top: calc(10px + env(safe-area-inset-top, 0px));
}


.rank-row {
  display: grid;
  grid-template-columns: 26px 1fr 14px;
  gap: 8px;
  align-items: center;
  padding: 9px 2px;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  font-size: 0.9rem;
}
.rank-row:last-child { border-bottom: none; }
.rank-row__pos {
  font-weight: 700;
  color: var(--color-primary-dark);
  text-align: center;
}
.rank-row__main { min-width: 0; }
.rank-row__meta {
  display: block;
  font-size: 0.78rem;
  color: var(--color-ink-muted);
  overflow-wrap: anywhere;
}
.rank-row__go { color: var(--color-ink-muted); font-size: 1.1rem; }


.vd-pin-icon { background: none; border: 0; }
.vd-pin { position: relative; width: 36px; height: 46px; }
.vd-pin__badge {
  position: absolute; top: 0; left: 0; width: 36px; height: 36px; border-radius: 50%;
  background: #fff; border: 2px solid var(--color-primary, #1F6F6B); color: var(--color-primary-dark, #12302E);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); z-index: 1;
}
.vd-pin__img { width: 30px; height: 30px; border-radius: 50%; }
.vd-pin__tip {
  position: absolute; left: 50%; top: 31px; width: 12px; height: 12px; margin-left: -6px;
  background: var(--color-primary, #1F6F6B); transform: rotate(45deg); border-radius: 0 0 3px 0;
}
.leaflet-tooltip.vd-pin-label {
  background: rgba(255, 255, 255, 0.92); border: 0; border-radius: 6px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  color: #12302E; font-weight: 700; font-size: 0.78rem; padding: 2px 7px;
}
.leaflet-tooltip.vd-pin-label::before { display: none; }
.pin-choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.pin-choice { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px 8px; border: 2px solid var(--color-border); border-radius: 12px; cursor: pointer;
  font-size: 0.78rem; font-weight: 400; text-align: center; margin: 0; }
.pin-choice input { position: absolute; opacity: 0; pointer-events: none; }
.pin-choice:has(input:checked) { border-color: var(--color-primary); background: var(--color-primary-tint); font-weight: 700; }
.pin-choice__preview { height: 46px; display: flex; align-items: flex-end; justify-content: center; }
.pin-choice__drop { width: 25px; height: 41px; }
