:root {
  --ink: #0f2a3a;
  --ink-2: #1d4256;
  --sea: #3c6b80;
  --foam: #eef3f2;
  --sand: #f4efe4;
  --sand-2: #e7dcc6;
  --coral: #e07a4f;
  --coral-2: #c4613a;
  --good: #2f8f6b;
  --mid: #d8a13a;
  --bad: #c2523f;
  --text: #17252d;
  --muted: #5d6f78;
  --card: #ffffff;
  --line: #dde3e2;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 42, 58, .06), 0 6px 20px rgba(15, 42, 58, .07);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); font-size: 17px; line-height: 1.5; color: var(--text); background: var(--sand); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; outline: none; }
a { color: var(--ink-2); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; color: var(--ink); margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.section { padding-top: 32px; padding-bottom: 32px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* ---------- Topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; gap: 16px; padding: 10px 16px; background: rgba(15, 42, 58, .96); backdrop-filter: blur(6px); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--serif); font-size: 1.35rem; font-weight: 700; }
.nav { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.nav a, .nav button.linklike { color: #dfe8ea; text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 600; background: none; border: 0; font: inherit; cursor: pointer; }
.nav a:hover, .nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.nav .nav-cta { background: var(--coral); color: #fff; }
.nav .nav-cta:hover { background: var(--coral-2); }
.menu-toggle { display: none; margin-left: auto; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; }
@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--ink); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a, .nav button.linklike { padding: 12px; border-radius: 10px; text-align: left; }
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(78vh, 680px); display: flex; align-items: flex-end; color: #fff; background: #0d2233 url("/img/hero.svg") center 60% / cover no-repeat; overflow: hidden; }
.hero.photo { background-position: center; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,31,44,.55) 0%, rgba(11,31,44,0) 55%), linear-gradient(180deg, rgba(13,34,51,.15) 0%, rgba(13,34,51,0) 35%, rgba(11,31,44,.82) 100%); }
.hero-inner { position: relative; z-index: 1; padding: 48px 16px 56px; max-width: 1180px; margin: 0 auto; width: 100%; }
.hero h1 { color: #fff; max-width: 14ch; text-shadow: 0 2px 20px rgba(0,0,0,.35); }
.hero p { font-size: 1.2rem; max-width: 46ch; color: #e6eef0; margin: 0 0 24px; }
.hero .eyebrow { font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; color: #f6cf9c; margin-bottom: 10px; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 999px; border: 1.5px solid transparent; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; background: var(--ink); color: #fff; transition: transform .08s ease, background .15s; min-height: 44px; }
.btn:hover { background: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn.coral { background: var(--coral); } .btn.coral:hover { background: var(--coral-2); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: rgba(15,42,58,.06); }
.hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.7); }
.btn.small { padding: 6px 12px; min-height: 34px; font-size: .9rem; }
.btn.danger { background: var(--bad); }
.btn[disabled] { opacity: .55; cursor: wait; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; color: var(--ink); }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); min-height: 44px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sea); outline-offset: 1px; border-color: var(--sea); }
textarea { min-height: 140px; resize: vertical; }
.field { margin-bottom: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 600px) { .grid-2, .grid-3 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.check input { width: 20px; height: 20px; }
.seg { display: inline-flex; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; font: inherit; font-weight: 700; padding: 7px 14px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--ink); color: #fff; }

/* ---------- Cards ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.panel h2 { font-size: 1.3rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.entry-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .12s ease, box-shadow .12s; }
.entry-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(15,42,58,.14); }
.entry-card .thumb { aspect-ratio: 4/3; background: linear-gradient(160deg, #3c6b80, #0f2a3a); position: relative; }
.entry-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.entry-card .thumb .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.7); font-size: 3rem; }
.entry-card .thumb .badge { position: absolute; left: 10px; top: 10px; }
.entry-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.entry-card h3 { margin: 0; font-size: 1.15rem; }
.meta { font-size: .9rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--foam); color: var(--ink); border-radius: 999px; padding: 3px 10px; font-size: .85rem; font-weight: 600; }
.chip.coral { background: #fbe6dc; color: #8a3a1c; }
.chip.good { background: #dff1e9; color: #1f6a4e; }
.chip.bad { background: #f7e0dc; color: #8c3326; }
.badge { background: rgba(15,42,58,.85); color: #fff; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.wx-line { display: flex; gap: 12px; flex-wrap: wrap; font-size: .9rem; color: var(--ink-2); align-items: center; }
.wx-line span { display: inline-flex; align-items: center; gap: 4px; }
.arrow { display: inline-block; width: 18px; height: 18px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { text-decoration: none; padding: 8px 16px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 700; border: 1.5px solid var(--line); }
.tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Detail ---------- */
.detail-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 16px; }
.gallery a img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; }
.gallery a:first-child { grid-column: 1 / -1; }
.gallery a:first-child img { aspect-ratio: 16/9; }
.story { white-space: pre-wrap; font-size: 1.05rem; }
table.fish { width: 100%; border-collapse: collapse; }
table.fish th, table.fish td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
table.fish th { font-size: .85rem; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--foam); border-radius: 12px; padding: 12px; }
.stat b { display: block; font-size: 1.4rem; font-family: var(--serif); color: var(--ink); }
.layout-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .layout-2 { grid-template-columns: 1fr; } }

/* ---------- Form specifics ---------- */
.map { height: 280px; border-radius: 12px; overflow: hidden; border: 1.5px solid var(--line); z-index: 0; }
.map.tall { height: 460px; }
.catch-row { display: grid; grid-template-columns: 1.4fr .8fr .8fr 1fr .7fr auto auto; gap: 8px; align-items: end; padding: 10px; background: var(--foam); border-radius: 12px; margin-bottom: 8px; }
.catch-row .check { margin-bottom: 10px; font-size: .9rem; }
@media (max-width: 760px) { .catch-row { grid-template-columns: 1fr 1fr; } .catch-row .full { grid-column: 1 / -1; } }
.icon-btn { background: none; border: 0; font-size: 1.3rem; cursor: pointer; padding: 6px; color: var(--bad); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.thumbs .t { position: relative; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; background: var(--foam); }
.thumbs .t img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .t button { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.6); color: #fff; border: 0; border-radius: 999px; width: 26px; height: 26px; cursor: pointer; }
.dropzone { border: 2px dashed var(--sand-2); border-radius: 12px; padding: 18px; text-align: center; background: #fffdf8; cursor: pointer; }
.dropzone:hover { border-color: var(--sea); }
.wx-box { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.wx-box .stat b { font-size: 1.15rem; }
.status-line { font-size: .92rem; color: var(--muted); }

/* ---------- Guide ---------- */
.guide-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.day-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.day-chips button { border: 1.5px solid var(--line); background: #fff; font: inherit; font-weight: 700; border-radius: 999px; padding: 7px 12px; cursor: pointer; color: var(--ink); }
.day-chips button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.spot-card { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; cursor: pointer; border: 2px solid transparent; }
.spot-card.focus { border-color: var(--sea); }
.score { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 1.45rem; font-weight: 700; color: #fff; flex: none; }
.score.s-good { background: var(--good); } .score.s-mid { background: var(--mid); } .score.s-bad { background: var(--bad); }
.spot-card h3 { margin: 0 0 2px; }
.spot-list { display: flex; flex-direction: column; gap: 12px; }
.bars { display: flex; gap: 2px; align-items: flex-end; height: 38px; margin-top: 8px; }
.bars div { flex: 1; border-radius: 3px 3px 0 0; min-width: 6px; position: relative; }
.bars-labels { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); }
.reasons { list-style: none; padding: 0; margin: 8px 0 0; font-size: .92rem; }
.reasons li { padding: 2px 0; }
.reasons li::before { content: "• "; }
.reasons li.plus::before { content: "＋ "; color: var(--good); font-weight: 700; }
.reasons li.minus::before { content: "－ "; color: var(--bad); font-weight: 700; }
.moon-big { font-size: 2.6rem; line-height: 1; }
.tip { border-left: 4px solid var(--coral); background: #fff8f3; padding: 10px 12px; border-radius: 0 10px 10px 0; margin: 8px 0; font-size: .95rem; }
.legend { display: flex; gap: 12px; font-size: .85rem; color: var(--muted); align-items: center; flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.spot-marker { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.me-marker { width: 16px; height: 16px; background: #1a73e8; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 4px rgba(26,115,232,.25); }

/* ---------- Misc ---------- */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(calc(100% + 40px)); visibility: hidden; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); transition: transform .25s ease; z-index: 3000; max-width: 92vw; }
#toast.show { transform: translateX(-50%) translateY(0); visibility: visible; }
#toast.err { background: var(--bad); }
.footer { background: var(--ink); color: #b9c8cd; padding: 24px 16px; font-size: .9rem; text-align: center; }
.footer a { color: #f6cf9c; }
.footer p { margin: 4px 0; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .big { font-size: 3rem; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2.5px solid rgba(15,42,58,.2); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-box { max-width: 420px; margin: 40px auto; }
.leaflet-popup-content { font-family: var(--sans); }
@media (max-width: 720px) { .hero { background-position: 78% 60%; } .hero h1 { font-size: 2.1rem; } }
