/* Delta Striper Tracker — design system */
:root {
  --ink: #0a1f28;
  --ink-2: #1c3742;
  --paper: #f6f1e6;
  --paper-2: #efe7d4;
  --rule: #d8cdb4;
  --deep: #0a3a4a;
  --deep-2: #082f3c;
  --water: #1a6e85;
  --water-2: #2a90a8;
  --foam: #70d6e8;
  --sand: #e9dcb6;
  --gold: #f4b942;
  --rust: #c25a3b;
  --moss: #5a7a3a;
  --good: #2f8f4a;
  --warn: #c98a1a;
  --bad: #b94a2a;
  --shadow: 0 1px 0 rgba(10,31,40,.06), 0 8px 24px rgba(10,31,40,.06);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img, svg, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }

.wrap { width: min(1200px, 92%); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,241,230,.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.header-row { display: flex; align-items: center; gap: 1.25rem; padding: .85rem 0; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--deep); }
.logo { width: 38px; height: 38px; color: var(--deep); border-radius: 9px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-line1 { font-family: 'Fraunces', serif; font-weight: 900; font-size: 1.1rem; letter-spacing: -.01em; }
.brand-line2 { font-family: 'Fraunces', serif; font-weight: 500; font-style: italic; font-size: .95rem; color: var(--water); }
.header-nav { margin-left: auto; display: flex; gap: 1.1rem; }
.header-nav a { text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--ink-2); }
.header-nav a:hover { color: var(--deep); }
.share-btn {
  border: 1px solid var(--deep); background: var(--deep); color: var(--paper);
  padding: .5rem 1rem; border-radius: 999px; font-weight: 600; cursor: pointer;
  font-family: inherit; font-size: .9rem;
}
.share-btn:hover { background: var(--deep-2); }
@media (max-width: 760px) { .header-nav { display: none; } }

/* Hero */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 300px at 80% -50%, rgba(112,214,232,.25), transparent 60%),
    linear-gradient(180deg, var(--deep) 0%, var(--deep-2) 100%);
  color: var(--paper);
  padding: 3.2rem 0 3.6rem;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 80px;
  background:
    radial-gradient(60% 100% at 20% 100%, rgba(112,214,232,.15), transparent 70%),
    linear-gradient(180deg, transparent, rgba(0,0,0,.25));
}
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2.4rem; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; color: var(--foam); margin: 0 0 .8rem; font-weight: 600; }
.hero h1 {
  font-family: 'Fraunces', serif; font-weight: 900; font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  line-height: 1.02; margin: 0 0 1rem; letter-spacing: -.02em;
}
.lede { font-size: 1.08rem; max-width: 52ch; color: #e6f1f5; margin: 0 0 1rem; }
.species-pill { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.3rem; padding: 0; }
.sp { display: inline-flex; align-items: center; padding: .35rem .8rem; border-radius: 999px; font-size: .82rem; font-weight: 600; letter-spacing: .01em; }
.sp.active { background: var(--gold); color: var(--ink); }
.sp.soon { background: rgba(255,255,255,.08); color: #c8dde2; border: 1px dashed rgba(255,255,255,.25); }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; font-size: .9rem; color: #b8d8e0; }
.hero-meta .sep { opacity: .5; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); display: inline-block; box-shadow: 0 0 0 4px rgba(244,185,66,.18); }
.dot.live { background: #4dd07a; box-shadow: 0 0 0 4px rgba(77,208,122,.2); }
.dot.err { background: var(--rust); box-shadow: 0 0 0 4px rgba(194,90,59,.2); }

/* Bite ring */
.bite-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius); padding: 1.4rem 1.4rem 1.2rem;
  backdrop-filter: blur(6px);
}
.bite-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .75rem; }
.bite-label { font-size: .85rem; color: var(--foam); text-transform: uppercase; letter-spacing: .14em; font-weight: 600; }
.bite-when { font-size: .85rem; color: #c8dde2; }
.bite-ring { position: relative; width: 180px; height: 180px; margin: .25rem auto .5rem; }
.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--gold); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s ease, stroke .4s; }
.ring-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.ring-num { font-family: 'Fraunces', serif; font-weight: 900; font-size: 3rem; line-height: 1; }
.ring-out { color: #b8d8e0; font-size: .85rem; }
.bite-grade { text-align: center; font-weight: 700; font-size: 1.1rem; margin-bottom: .8rem; font-family: 'Fraunces', serif; }
.bite-factors { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .9rem; font-size: .85rem; }
.bite-factors li { display: flex; align-items: center; gap: .4rem; color: #d6e7eb; }
.bite-factors b { color: var(--paper); font-weight: 600; }
.bite-factors .pip { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.bite-factors .pip.up { background: #4dd07a; }
.bite-factors .pip.dn { background: var(--rust); }

/* Metrics strip */
.metrics { background: var(--paper-2); border-bottom: 1px solid var(--rule); padding: 1.2rem 0; }
.metrics-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 1rem; }
@media (max-width: 900px) { .metrics-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px) { .metrics-grid { grid-template-columns: repeat(2, 1fr); } }
.metric { display: flex; flex-direction: column; padding: .35rem .25rem; text-decoration: none; }
.metric .m-val.status-open { color: var(--good); }
.metric .m-val.status-closed { color: var(--bad); }
.metric .m-val.tier-active { color: var(--good); }
.metric .m-val.tier-building { color: var(--warn); }
.metric .m-val.tier-holding { color: var(--bad); }
.metric.off-season { opacity: .42; filter: grayscale(65%); }
.metric.off-season .m-val { color: var(--ink-2); }
.m-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); font-weight: 600; }
.m-val { font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.6rem; line-height: 1.1; margin-top: .15rem; color: var(--deep); }
.m-sub { font-size: .8rem; color: var(--ink-2); margin-top: .1rem; }

/* Section */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--paper-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-head { max-width: 62ch; margin-bottom: 1.6rem; }
.section-head h2 { font-family: 'Fraunces', serif; font-weight: 800; font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 0 0 .5rem; letter-spacing: -.01em; color: var(--deep); }
.section-head p { margin: 0; color: var(--ink-2); }

/* Tides */
.tide-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 1.6rem; align-items: start; }
@media (max-width: 900px) { .tide-grid { grid-template-columns: 1fr; } }
.tide-chart-wrap { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.tide-chart-wrap canvas { width: 100%; height: auto; }
.tide-legend { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .82rem; color: var(--ink-2); margin-top: .75rem; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin-right: .35rem; }
.legend-dot.tide { background: var(--water); }
.legend-dot.now { background: var(--rust); }
.legend-dot.major { background: var(--gold); }
.legend-dot.minor { background: var(--moss); }
.legend-dot.stage { background: var(--water); }
.legend-dot.flow { background: var(--gold); }
.legend-dot.temp { background: var(--rust); }

.tide-list { list-style: none; padding: 0; margin: 0; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tide-list li { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--rule); gap: .5rem; }
.tide-list li:last-child { border-bottom: 0; }
.tide-list li.next { background: #fff8e2; }
.tl-time { font-weight: 600; }
.tl-type { font-family: 'Fraunces', serif; font-weight: 700; font-size: 1rem; }
.tl-type.H { color: var(--water); }
.tl-type.L { color: var(--rust); }
.tl-h { color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* Two col */
.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.4rem; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* Forecast */
.forecast { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.forecast li {
  display: grid; grid-template-columns: 70px 1fr auto auto; gap: .8rem; align-items: center;
  background: #fff; border: 1px solid var(--rule); border-radius: 12px;
  padding: .7rem .9rem; box-shadow: var(--shadow);
}
.fc-day { font-weight: 600; }
.fc-date { font-size: .78rem; color: var(--ink-2); }
.fc-icon { font-size: 1.3rem; }
.fc-temp { font-variant-numeric: tabular-nums; font-weight: 600; }
.fc-wind { font-size: .85rem; color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 90px; text-align: right; }
.fc-wind .gust { color: var(--rust); }

/* Hotspots */
.hotspot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.hotspot {
  background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.hotspot::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--water), var(--foam));
}
.hotspot h3 { font-family: 'Fraunces', serif; font-weight: 700; margin: 0 0 .4rem; color: var(--deep); font-size: 1.15rem; }
.hotspot p { margin: 0 0 .55rem; color: var(--ink-2); font-size: .95rem; }
.hotspot .hs-when { color: var(--ink); font-size: .85rem; }
.hotspot .hs-when b { color: var(--deep); }

/* Links */
.link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; }
.link-card {
  background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: .9rem 1.05rem;
  text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: .25rem;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.link-card:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(10,31,40,.06), 0 12px 28px rgba(10,31,40,.08); }
.lc-tag { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--water); font-weight: 700; }
.lc-title { font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.05rem; color: var(--deep); }
.lc-sub { color: var(--ink-2); font-size: .88rem; }

/* Share */
.share-section { background: var(--deep); color: var(--paper); }
.share-section .section-head h2 { color: var(--paper); }
.share-wrap { text-align: center; max-width: 720px; margin: 0 auto; padding: 1rem 0; }
.share-wrap h2 { font-family: 'Fraunces', serif; font-weight: 800; font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 0 0 .4rem; letter-spacing: -.01em; }
.share-wrap p { color: #cfe1e6; }
.share-btns { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin: 1.2rem 0 .8rem; }
.sb {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .7rem 1.1rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .92rem;
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); color: var(--paper); cursor: pointer; font-family: inherit;
}
.sb:hover { background: rgba(255,255,255,.12); }
.sb.fb { background: #1877f2; border-color: #1877f2; }
.sb.fb:hover { background: #1465d0; }
.sb.x { background: #000; border-color: #000; }
.sb.copy { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.sb.copy:hover { background: #e6a82d; }
.share-url { font-family: ui-monospace, Menlo, monospace; color: #b8d8e0; font-size: .85rem; word-break: break-all; }

/* Footer */
.site-footer { background: var(--deep-2); color: #c8dde2; padding: 2rem 0 2.4rem; border-top: 1px solid rgba(255,255,255,.08); }
.foot p { margin: 0 0 .35rem; }
.foot .fine { font-size: .82rem; opacity: .75; }

/* ----- Bite-explain button ----- */
.bite-explain-btn {
  margin-top: .9rem;
  background: rgba(255,255,255,.08);
  color: var(--paper);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: .45rem 1rem;
  font: 600 .82rem 'DM Sans', system-ui;
  cursor: pointer;
  letter-spacing: .02em;
  transition: background .15s, border-color .15s;
}
.bite-explain-btn:hover, .bite-explain-btn:focus { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.35); outline: none; }
.bite-card { cursor: pointer; }

/* ----- Best bite windows ----- */
.best-windows .section-head { margin-bottom: 1.2rem; }
.window-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 900px) { .window-list { grid-template-columns: 1fr; } }
.window-list li {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem 1.3rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: .45rem;
  position: relative;
  min-height: 230px;
}
.window-list li.rank-1 { border-color: #f4b942; box-shadow: 0 6px 24px rgba(244,185,66,.25); }
.window-list li.rank-1::before { content: 'TOP PICK'; position: absolute; top: .65rem; right: .8rem; font: 700 .65rem 'DM Sans'; letter-spacing: .12em; color: #946600; background: #fff3d0; padding: .2rem .55rem; border-radius: 999px; }
.win-rank { font: 800 .72rem 'DM Sans', system-ui; letter-spacing: .14em; color: var(--ink-2); text-transform: uppercase; }
.win-time { font: 800 1.35rem 'Fraunces', serif; color: var(--deep); letter-spacing: -.01em; line-height: 1.15; }
.win-day { font: 600 .82rem 'DM Sans'; color: var(--ink-2); margin-top: -.15rem; }
.win-score-row { display: flex; align-items: baseline; gap: .55rem; margin-top: .25rem; }
.win-score { font: 800 1.6rem 'Fraunces', serif; color: var(--deep); }
.win-score-label { font: 600 .8rem 'DM Sans'; color: var(--ink-2); }
.win-score.good { color: #2f8a4a; }
.win-score.fair { color: #c79100; }
.win-reasons { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.win-tag { font: 600 .72rem 'DM Sans'; padding: .25rem .55rem; border-radius: 999px; background: #f1ead0; color: #5a4500; border: 1px solid #e9dcb6; }
.win-tag.tide { background: #d8edf2; color: #0a3a4a; border-color: #b8d8df; }
.win-tag.sol  { background: #fdf0d2; color: #946600; border-color: #f1d68a; }
.win-tag.light{ background: #f3e0d4; color: #7a3a25; border-color: #e7c7b3; }
.win-tag.wind { background: #e3eed5; color: #3a5a1f; border-color: #cadeb0; }
.window-loading { text-align: center; color: var(--ink-2); grid-column: 1 / -1; padding: 1.5rem; }
.window-note { margin: 1.1rem 0 0; color: var(--ink-2); font-size: .88rem; }

/* ----- Bite explainer modal ----- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,58,74,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  z-index: 1000;
  backdrop-filter: blur(3px);
  animation: fadein .15s ease-out;
}
.modal-backdrop[hidden] { display: none; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--paper);
  border-radius: var(--radius);
  max-width: 520px; width: 100%;
  padding: 1.6rem 1.5rem 1.4rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  position: relative;
  max-height: 90vh; overflow-y: auto;
}
.modal h3 { font: 800 1.3rem 'Fraunces', serif; margin: 0 0 .4rem; color: var(--deep); letter-spacing: -.01em; }
.modal-sub { margin: 0 0 1rem; color: var(--ink-2); font-size: .92rem; }
.modal-close {
  position: absolute; top: .55rem; right: .75rem;
  background: none; border: 0; font-size: 1.7rem; line-height: 1;
  cursor: pointer; color: var(--ink-2);
  width: 2rem; height: 2rem; border-radius: 50%;
}
.modal-close:hover { background: rgba(0,0,0,.06); color: var(--deep); }
.modal-factors { list-style: none; padding: 0; margin: 0 0 1.1rem; display: flex; flex-direction: column; gap: .55rem; }
.modal-factors li { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .65rem .85rem; background: #fff; border: 1px solid var(--rule); border-radius: 10px; }
.modal-factors .mf-key { font: 600 .9rem 'DM Sans'; color: var(--deep); }
.modal-factors .mf-val { font: 500 .85rem 'DM Sans'; color: var(--ink-2); }
.modal-factors .mf-pts { font: 700 .85rem 'DM Sans'; padding: .15rem .5rem; border-radius: 999px; min-width: 2.2rem; text-align: center; }
.modal-factors .mf-pts.up { background: #dff5e3; color: #2f8a4a; }
.modal-factors .mf-pts.flat { background: #f1ead0; color: #7a5a00; }
.modal-factors .mf-pts.dn { background: #f5dcd1; color: #a04020; }
.modal-foot { margin: 0; font-size: .82rem; color: var(--ink-2); line-height: 1.45; }

/* ----- 3-day planner ----- */
.three-day .section-head { margin-bottom: 1.4rem; }
.outlook-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
@media (max-width: 900px) { .outlook-list { grid-template-columns: 1fr; } }
.outlook-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.2rem 1.2rem 1.3rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: .7rem;
  position: relative;
  border-top: 5px solid var(--rule);
}
.outlook-card.day-good { border-top-color: #4dd07a; }
.outlook-card.day-fair { border-top-color: #f4b942; }
.outlook-card.day-tough { border-top-color: #c25a3b; }
.outlook-head { display: flex; justify-content: space-between; align-items: baseline; }
.outlook-day { font: 800 1.35rem 'Fraunces', serif; color: var(--deep); letter-spacing: -.01em; }
.outlook-date { font: 600 .82rem 'DM Sans'; color: var(--ink-2); }
.outlook-peak-row { display: flex; align-items: baseline; gap: .55rem; }
.outlook-peak { font: 800 2.4rem 'Fraunces', serif; color: var(--deep); line-height: 1; }
.outlook-peak.good { color: #2f8a4a; }
.outlook-peak.fair { color: #c79100; }
.outlook-peak-label { font: 600 .82rem 'DM Sans'; color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; }
.outlook-summary { margin: 0; font: 500 .92rem 'DM Sans'; color: var(--ink); }
.day-windows { display: flex; flex-direction: column; gap: .65rem; margin-top: .15rem; }
.day-window {
  background: #fdfaf0;
  border: 1px solid #ece4c8;
  border-radius: 10px;
  padding: .7rem .8rem .75rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.day-window.day-empty { color: var(--ink-2); font-style: italic; background: #fff; border-style: dashed; }
.dw-time { font: 700 1rem 'Fraunces', serif; color: var(--deep); letter-spacing: -.01em; }
.dw-score-row { display: flex; align-items: baseline; gap: .45rem; }
.dw-score { font: 800 1.15rem 'Fraunces', serif; color: var(--deep); }
.dw-score.good { color: #2f8a4a; }
.dw-score.fair { color: #c79100; }
.dw-score-label { font: 500 .78rem 'DM Sans'; color: var(--ink-2); }
.dw-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .15rem; }
.conf-badge {
  font: 600 .72rem 'DM Sans';
  color: #946600;
  background: #fff3d0;
  border: 1px solid #f1d68a;
  padding: .25rem .55rem;
  border-radius: 999px;
  align-self: flex-start;
  margin-top: auto;
}

.sb-page-link {
  display: inline-block;
  margin-top: 1rem;
  font: 700 .95rem 'DM Sans', system-ui;
  color: var(--paper);
  background: #f4b942;
  color: #5a4500;
  padding: .75rem 1.3rem;
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: .01em;
  transition: background .15s, transform .12s;
}
.sb-page-link:hover { background: #f0ac28; }
.sb-page-link:active { transform: scale(.97); }

/* ===================== LOG THIS OUTING ===================== */
.section-log {
  background: linear-gradient(180deg, #0d2030 0%, #0a1622 100%);
  border-top: 1px solid rgba(244, 185, 66, 0.25);
  border-bottom: 1px solid rgba(244, 185, 66, 0.25);
}
.log-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 640px;
  margin: 0 auto;
}
.log-row { display: flex; flex-direction: column; gap: .4rem; }
.log-row > label {
  font-size: .85rem;
  font-weight: 600;
  color: #f4b942;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.log-row select,
.log-row textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(244, 185, 66, 0.3);
  color: #f4f4f4;
  padding: .7rem .9rem;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}
.log-row select:focus,
.log-row textarea:focus {
  outline: none;
  border-color: #f4b942;
  background: rgba(255,255,255,0.1);
}
.log-options {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.log-option {
  flex: 1 1 calc(50% - .25rem);
  min-width: 130px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: .65rem .8rem;
  cursor: pointer;
  transition: all .15s ease;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.log-option input { margin: 0; accent-color: #f4b942; }
.log-option:hover { background: rgba(255,255,255,0.1); border-color: rgba(244,185,66,0.4); }
.log-option:has(input:checked) {
  background: rgba(244,185,66,0.18);
  border-color: #f4b942;
  box-shadow: 0 0 0 1px #f4b942 inset;
}
.log-option span { color: #f4f4f4; font-weight: 500; font-size: .95rem; }

.log-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: .3rem;
}
.btn-log-save,
.btn-log-view,
.btn-log-map,
.btn-log-export,
.btn-log-clear {
  font: inherit;
  border: none;
  padding: .75rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: .95rem;
  transition: transform .12s, background .15s;
  text-decoration: none;
  display: inline-block;
}
.btn-log-save {
  background: #f4b942;
  color: #1a1a1a;
  flex: 1 1 auto;
}
.btn-log-save:hover { background: #f0ac28; }
.btn-log-view,
.btn-log-map {
  background: rgba(255,255,255,0.08);
  color: #f4f4f4;
  border: 1px solid rgba(244,185,66,0.3);
}
.btn-log-view:hover,
.btn-log-map:hover { background: rgba(244,185,66,0.15); }
.btn-log-export {
  background: #2c7a5c;
  color: #fff;
}
.btn-log-export:hover { background: #2d8a68; }
.btn-log-clear {
  background: rgba(194, 90, 59, 0.15);
  color: #ff8c6b;
  border: 1px solid rgba(194, 90, 59, 0.4);
}
.btn-log-clear:hover { background: rgba(194, 90, 59, 0.3); }
.btn-log-save:active,
.btn-log-view:active,
.btn-log-map:active,
.btn-log-export:active,
.btn-log-clear:active { transform: scale(.97); }

.log-feedback {
  margin: 0;
  font-size: .9rem;
  color: #d0d0d0;
  min-height: 1.2em;
}
.log-feedback-ok { color: #4dd07a; }
.log-export-fallback {
  width: 100%;
  margin-top: .5rem;
  padding: .5rem;
  background: rgba(0,0,0,0.4);
  color: #f4f4f4;
  border: 1px solid rgba(244,185,66,0.3);
  border-radius: 6px;
  font-family: ui-monospace, monospace;
  font-size: .8rem;
  resize: vertical;
}

.log-history {
  max-width: 640px;
  margin: 1.5rem auto 0;
  padding: 1.2rem;
  background: rgba(0,0,0,0.25);
  border-radius: 12px;
  border: 1px solid rgba(244,185,66,0.2);
}
.log-history h3 {
  margin: 0 0 .3rem 0;
  color: #f4b942;
  font-size: 1.1rem;
}
.log-history-meta {
  margin: 0 0 1rem 0;
  color: #b0b0b0;
  font-size: .85rem;
}
.log-history-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.log-history-list li {
  background: rgba(255,255,255,0.04);
  padding: .75rem .9rem;
  border-radius: 8px;
  border-left: 3px solid #f4b942;
}
.log-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .35rem;
}
.log-entry-head strong { color: #f4f4f4; font-size: 1rem; }
.log-entry-time { font-size: .8rem; color: #999; }
.log-entry-body { font-size: .88rem; color: #d0d0d0; line-height: 1.5; }
.log-history-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .log-option { flex-basis: 100%; }
  .btn-log-save,
  .btn-log-view,
  .btn-log-map { flex: 1 1 100%; text-align: center; }
}

/* ===================== MAP PAGE ===================== */
body.map-page {
  margin: 0;
  background: #0a1622;
  color: #f4f4f4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.map-header {
  padding: 1rem 1.2rem;
  background: linear-gradient(180deg, #0d2030 0%, #0a1622 100%);
  border-bottom: 1px solid rgba(244, 185, 66, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.map-header h1 { margin: 0; font-size: 1.2rem; color: #f4b942; }
.map-back {
  color: #f4b942;
  text-decoration: none;
  font-weight: 600;
  padding: .5rem .9rem;
  border-radius: 6px;
  background: rgba(244,185,66,0.12);
  border: 1px solid rgba(244,185,66,0.3);
}
.map-back:hover { background: rgba(244,185,66,0.2); }
#map { width: 100%; height: 60vh; min-height: 380px; }
.map-empty {
  padding: 3rem 1.2rem;
  text-align: center;
  color: #b0b0b0;
}
.map-empty h2 { color: #f4b942; }
.map-stats {
  padding: 1rem 1.2rem;
  background: rgba(0,0,0,0.25);
  border-top: 1px solid rgba(244,185,66,0.15);
  font-size: .9rem;
  color: #d0d0d0;
}
.map-stats .stat-pill {
  display: inline-block;
  margin: .25rem .35rem .25rem 0;
  padding: .25rem .65rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(244,185,66,0.2);
  font-size: .82rem;
}
.leaflet-popup-content {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.leaflet-popup-content strong { color: #1a3556; }

.log-storage-warn {
  background: rgba(255, 165, 0, 0.12);
  border: 2px solid #ff9500;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin: 0 auto 1.5rem;
  max-width: 640px;
  color: #ffd699;
}
.log-storage-warn strong { color: #ff9500; font-size: 1.05rem; display: block; margin-bottom: .5rem; }
.log-storage-warn p { margin: .3rem 0; line-height: 1.5; font-size: .92rem; }
.log-storage-warn ol { margin: .5rem 0 .5rem 1.2rem; padding: 0; }
.log-storage-warn li { margin: .35rem 0; line-height: 1.5; font-size: .92rem; }

/* ===== Vieira's Cleaning Station Report ===== */
.cs-card {
  background: linear-gradient(135deg, #0a3a4a 0%, #134a5e 100%);
  color: #fff;
  border-radius: 18px;
  padding: 28px;
  border-left: 6px solid #f4b942;
  box-shadow: 0 4px 18px rgba(10,58,74,0.15);
}
.cs-card .cs-loading { color: #aebec6; text-align: center; margin: 12px 0; }
.cs-card .cs-empty {
  color: #aebec6; text-align: center; padding: 24px 0;
  font-style: italic;
}
.cs-today {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.12);
  flex-wrap: wrap; gap: 8px;
}
.cs-today-label { font-size: 0.75rem; letter-spacing: 0.18em; color: #f4b942; text-transform: uppercase; font-weight: 700; }
.cs-today-date { font-size: 0.85rem; color: #aebec6; }
.cs-counts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  margin-bottom: 14px;
}
.cs-count {
  background: rgba(255,255,255,0.04); border-radius: 10px;
  padding: 14px;
}
.cs-count .cs-num {
  font-size: 1.8rem; font-weight: 800; color: #fff;
  font-family: 'Fraunces', Georgia, serif; line-height: 1;
}
.cs-count .cs-name { font-size: 0.85rem; color: #aebec6; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.08em; }
.cs-count .cs-size { font-size: 0.78rem; color: #70d6e8; margin-top: 6px; }
.cs-note {
  font-style: italic; color: #d8e2e8;
  padding: 10px 14px; background: rgba(244,185,66,0.08);
  border-left: 3px solid #f4b942; border-radius: 4px;
  margin-bottom: 14px; font-size: 0.95rem;
}
.cs-history {
  font-size: 0.85rem; color: #aebec6;
  border-top: 1px solid rgba(255,255,255,0.12); padding-top: 12px;
}
.cs-history-row {
  display: flex; justify-content: space-between; padding: 4px 0;
  gap: 12px;
}
.cs-history-row .h-date { color: #70d6e8; flex-shrink: 0; }
.cs-history-row .h-summary { color: #d8e2e8; text-align: right; }
.cs-footer {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.78rem; color: #8aa0a8; text-align: center;
}

/* ===== Featured Partner footer ===== */
.featured-partner {
  background: #f4b942;
  color: #0a3a4a;
  padding: 28px 0;
}
.fp-wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.fp-tag {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.18em;
  background: #0a3a4a; color: #f4b942; padding: 8px 12px;
  border-radius: 6px; text-transform: uppercase; flex-shrink: 0;
  display: inline-block; margin-bottom: 16px;
}
.fp-body { flex: 1; min-width: 260px; }
.fp-body h3, .partner-card h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.6rem; margin: 0 0 4px; font-weight: 700;
}
.fp-sub { margin: 0 0 6px; font-size: 0.95rem; }
.fp-meta { margin: 0; font-size: 0.88rem; }
.fp-meta a { color: #0a3a4a; text-decoration: underline; font-weight: 600; }

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.partner-card {
  background: rgba(10, 58, 74, 0.07);
  border-radius: 10px;
  padding: 18px 20px;
}
.partner-badge {
  display: inline-block;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #0a3a4a; color: #f4b942;
  padding: 4px 9px; border-radius: 4px;
  margin-bottom: 8px;
}

/* ===== Salmon mode additions ===== */
.salmon-banner {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #c63838 0%, #e26a2c 100%);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  margin: 14px 0 16px;
  box-shadow: 0 2px 12px rgba(198,56,56,.25);
  font-size: 0.95rem;
}
.salmon-banner .sb-flag {
  background: #fff; color: #c63838;
  font-weight: 800; letter-spacing: 0.08em;
  font-size: 0.72rem;
  padding: 4px 8px; border-radius: 4px;
  white-space: nowrap;
}
.salmon-banner .sb-msg { line-height: 1.35; }
.salmon-banner .sb-msg b { font-weight: 700; }

.hotspot-salmon {
  border-top: 3px solid #e26a2c;
  position: relative;
}
.hotspot .hs-tag {
  display: inline-block;
  background: #e26a2c; color: #fff;
  font-weight: 800; letter-spacing: 0.08em;
  font-size: 0.65rem;
  padding: 3px 7px; border-radius: 3px;
  margin-bottom: 6px;
}

/* ===================== CONTEST PAGE ===================== */
.contest-prize-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius); padding: 1.1rem 1.2rem; backdrop-filter: blur(6px);
  display: flex; flex-direction: column; gap: .8rem;
}
.cpc-row { display: flex; flex-direction: column; gap: .3rem; font-size: .92rem; color: #e6f1f5; }
.cpc-head { font-weight: 700; color: var(--paper); }
.cpc-tag {
  align-self: flex-start; font: 700 .68rem 'DM Sans'; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(255,255,255,.12); color: var(--foam); padding: .25rem .55rem; border-radius: 999px;
}
.cpc-tag.gold { background: var(--gold); color: var(--ink); }
.cpc-champion { border-top: 1px solid rgba(255,255,255,.15); padding-top: .8rem; }

.rules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.6rem; }
@media (max-width: 900px) { .rules-grid { grid-template-columns: 1fr; } }
.rules-card {
  background: #fff; border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; box-shadow: var(--shadow);
}
.rules-card h3 { font-family: 'Fraunces', serif; font-weight: 700; margin: .5rem 0 .4rem; color: var(--deep); font-size: 1.1rem; }
.rules-card p { margin: 0; color: var(--ink-2); font-size: .92rem; }
.rules-card-gold { border-color: #f1d68a; box-shadow: 0 6px 24px rgba(244,185,66,.18); }
.rules-fine { color: var(--ink-2); font-size: .88rem; padding-left: 1.2rem; margin: 0; }
.rules-fine li { margin-bottom: .35rem; }

.field-hint { margin: .2rem 0 0; font-size: .82rem; color: #f4b942; min-height: 1.1em; }
.photo-preview {
  margin-top: .6rem; max-width: 260px; border-radius: 10px; border: 1px solid rgba(244,185,66,.3);
}
#contest-form input[type="text"],
#contest-form input[type="tel"],
#contest-form input[type="number"],
#contest-form input[type="date"],
#contest-form input[type="file"] {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(244, 185, 66, 0.3);
  color: #f4f4f4;
  padding: .7rem .9rem;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}
#contest-form input:focus { outline: none; border-color: #f4b942; background: rgba(255,255,255,0.1); }
#contest-form input[type="file"] { padding: .5rem; }

/* Champion cards */
.champions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.8rem; }
@media (max-width: 700px) { .champions-row { grid-template-columns: 1fr; } }
.champion-card {
  background: linear-gradient(135deg, #0a3a4a 0%, #134a5e 100%); color: #fff;
  border-radius: var(--radius); padding: 1rem 1.1rem; border-left: 6px solid var(--gold);
  display: flex; flex-direction: column; gap: .6rem; box-shadow: var(--shadow);
}
.cc-tag { font: 700 .72rem 'DM Sans'; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.champion-card { flex-direction: row; align-items: center; }
.cc-photo { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.cc-body { display: flex; flex-direction: column; gap: .1rem; }
.cc-weight { font: 800 1.5rem 'Fraunces', serif; }
.cc-name { font-size: .92rem; color: #d8e2e8; }
.cc-date { font-size: .78rem; color: #aebec6; }
.cc-empty { color: #aebec6; font-style: italic; font-size: .9rem; }
.champion-card { flex-wrap: wrap; }

/* Board rows */
.board-block { margin-bottom: 1.6rem; }
.board-block h3 { font-family: 'Fraunces', serif; font-weight: 700; color: var(--deep); font-size: 1.1rem; margin: 0 0 .7rem; }
.board-row {
  display: grid; grid-template-columns: 2rem 52px 1fr auto auto; align-items: center; gap: .8rem;
  background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: .6rem .8rem; margin-bottom: .5rem;
  box-shadow: var(--shadow);
}
.board-row-lead { border-color: #f1d68a; background: #fffaf0; }
.board-rank { font-size: 1.3rem; text-align: center; }
.board-photo { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; }
.board-name { font-weight: 600; color: var(--deep); }
.board-weight { font-family: 'Fraunces', serif; font-weight: 800; color: var(--deep); }
.board-date { color: var(--ink-2); font-size: .82rem; }
.board-empty { color: var(--ink-2); font-style: italic; padding: .8rem 0; }
@media (max-width: 600px) {
  .board-row { grid-template-columns: 1.6rem 44px 1fr; }
  .board-weight, .board-date { grid-column: 3; font-size: .82rem; }
}

/* ===================== ADMIN PAGE ===================== */
.admin-pin-gate {
  max-width: 360px; margin: 3rem auto; text-align: center; display: flex; flex-direction: column; gap: .8rem;
}
.admin-pin-gate input {
  padding: .8rem 1rem; border-radius: 8px; border: 1px solid rgba(244,185,66,0.3);
  background: rgba(255,255,255,0.06); color: #f4f4f4; font-size: 1.3rem; text-align: center; letter-spacing: .3em;
}
.admin-error { color: #ff8c6b; min-height: 1.2em; font-size: .9rem; }
.admin-tabs { display: flex; align-items: center; gap: .4rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.pad-tab {
  flex: 0 0 auto;
  appearance: none; border: 0; cursor: pointer;
  background: rgba(255,255,255,0.06); color: #d0d0d0;
  font: 700 .85rem 'DM Sans', system-ui;
  padding: .55rem .9rem;
  border-radius: 999px;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.pad-tab:hover { background: rgba(244,185,66,0.15); color: #f4f4f4; }
.pad-tab.active { background: #f4b942; color: #1a1a1a; }
.admin-count { font-size: .78rem; opacity: .8; }
.admin-panel { display: flex; flex-direction: column; gap: .8rem; }
.admin-card {
  display: flex; gap: 1rem; background: rgba(255,255,255,0.04); border: 1px solid rgba(244,185,66,0.2);
  border-radius: 12px; padding: .9rem; align-items: flex-start;
}
.admin-photo { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.admin-card-body { display: flex; flex-direction: column; gap: .25rem; color: #d0d0d0; font-size: .92rem; flex: 1; }
.admin-card-head { display: flex; justify-content: space-between; gap: .6rem; }
.admin-card-head strong { color: #f4f4f4; font-size: 1.05rem; }
.admin-species { text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; color: #f4b942; font-weight: 700; align-self: center; }
.admin-phone, .admin-submitted { font-size: .82rem; color: #999; }
.admin-actions { display: flex; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
@media (max-width: 520px) {
  .admin-card { flex-direction: column; }
  .admin-photo { width: 100%; height: 180px; }
}

/* ===================== HOMEPAGE CONTEST PROMO ===================== */
.header-nav a.nav-contest {
  color: var(--gold); font-weight: 700;
}
.contest-banner {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #0a5a4a 0%, #0a3a4a 100%);
  color: #fff; text-decoration: none;
  padding: 10px 14px; border-radius: 10px; margin: 0 0 16px;
  box-shadow: 0 2px 12px rgba(10,90,74,.3);
  font-size: 0.95rem; border: 1px solid rgba(244,185,66,.35);
  transition: transform .12s;
}
.contest-banner:hover { transform: translateY(-1px); }
.contest-banner .cb-flag {
  background: var(--gold); color: var(--ink);
  font-weight: 800; letter-spacing: 0.06em; font-size: 0.72rem;
  padding: 4px 8px; border-radius: 4px; white-space: nowrap;
}
.contest-banner .cb-msg { line-height: 1.35; }

/* ===================== ENTRY MODE CHOOSER (quick log vs contest) ===================== */
.entry-choice {
  display: grid; grid-template-columns: 1fr 1fr; gap: .7rem;
  max-width: 640px; margin: 0 auto 1.4rem;
}
.entry-tab {
  display: flex; flex-direction: column; align-items: center; gap: .25rem;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(244,185,66,0.25);
  border-radius: 12px; padding: .9rem .8rem; cursor: pointer; font-family: inherit;
  transition: background .15s, border-color .15s, transform .12s;
}
.entry-tab:hover { background: rgba(255,255,255,0.09); transform: translateY(-1px); }
.entry-tab.active { background: rgba(244,185,66,0.16); border-color: #f4b942; }
.entry-tab-title { font-weight: 700; font-size: 1.02rem; color: #f4f4f4; }
.entry-tab-sub { font-size: .78rem; color: #b0b0b0; }
.entry-panel[hidden] { display: none; }
.quick-log-form { max-width: 480px; }
@media (max-width: 480px) {
  .entry-choice { grid-template-columns: 1fr; }
}
