:root {
  --bg: #f3f5f2;
  --surface: #ffffff;
  --text: #17231b;
  --muted: #5b6b60;
  --line: #dfe6e0;
  --brand: #14532d;
  --brand-2: #1f7a45;
  --accent: #e8a317;
  --g4: #15803d;
  --g3: #65a30d;
  --g2: #c2860c;
  --g1: #c0392b;
  --notice: #fdf6e3;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 4px 14px rgba(0, 0, 0, .05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1511;
    --surface: #16201a;
    --text: #e5ede7;
    --muted: #95a89b;
    --line: #26332b;
    --brand: #4ade80;
    --brand-2: #22c55e;
    --notice: #2d2a1c;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  line-height: 1.5;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
a { color: var(--brand-2); }
h1 { font-size: 1.5rem; margin: 4px 0; }
h2 { font-size: 1.1rem; margin: 0; }
h3 { font-size: 1rem; margin: 16px 0 6px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tiny { font-size: .75rem; }

.topbar {
  position: sticky; top: 0; z-index: 1000;
  background: #14532d; color: #fff;
  padding: 12px 16px; display: flex; align-items: baseline; gap: 10px;
}
.topbar .site-name { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.topbar .tagline { font-size: .8rem; opacity: .8; }
main { max-width: 760px; margin: 0 auto; padding: 16px; }

.hero {
  display: block; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, #14532d, #1f7a45 60%, #3f8f3a);
  border-radius: 16px; padding: 18px; box-shadow: var(--shadow);
}
.hero-label { font-size: .8rem; opacity: .85; font-weight: 600; }
.hero-title { font-size: 1.6rem; font-weight: 800; margin: 2px 0 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hero-sub { font-size: .9rem; opacity: .95; }
.hero .muted { color: #e0efe4; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 24px 0 10px; gap: 8px; }
.card, .catch, .field-list {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.card { padding: 14px; display: block; color: inherit; text-decoration: none; }
.card + .card { margin-top: 10px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.empty { text-align: center; }

.field-list { overflow: hidden; }
.field-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 14px; color: inherit; text-decoration: none; border-top: 1px solid var(--line);
}
.field-row:first-child { border-top: 0; }
.field-row .right { text-align: right; }

.badge { font-size: .8rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; color: #fff; white-space: nowrap; }
.g4 { background: var(--g4); } .g3 { background: var(--g3); } .g2 { background: var(--g2); } .g1 { background: var(--g1); }

#map { height: 240px; border-radius: 14px; margin: 12px 0 0; border: 1px solid var(--line); }

.tabs { display: flex; gap: 6px; margin: 10px 0; }
.tabs button {
  flex: 1; font: inherit; padding: 8px 4px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.tabs button.active { background: var(--brand); color: #fff; border-color: var(--brand); }
@media (prefers-color-scheme: dark) { .tabs button.active { color: #0e1511; } }

.factors { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.factors li { display: grid; grid-template-columns: 64px 64px 1fr; gap: 8px; align-items: center; }
.f-label { font-size: .85rem; font-weight: 600; }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--brand-2); }
.lures { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.buy { margin-left: 6px; white-space: nowrap; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.stat b { font-size: 1.1rem; }
.stat.wide { grid-column: 1 / -1; }
.stat.wide b { font-size: .95rem; }

.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.catch { overflow: hidden; display: flex; flex-direction: column; }
.catch img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--line); }
.catch-body { padding: 10px 12px; display: grid; gap: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chips span { font-size: .75rem; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.memo { margin: 2px 0; white-space: pre-wrap; word-break: break-word; font-size: .9rem; }

.btn {
  display: inline-block; background: var(--brand-2); color: #fff; border: 0; border-radius: 10px;
  padding: 12px 18px; font-size: 1rem; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:disabled { opacity: .6; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand-2); font: inherit; font-size: .85rem; cursor: pointer; }
.back { display: inline-block; margin-bottom: 6px; }
.notice { background: var(--notice); padding: 8px 12px; border-radius: 10px; }

.stack { display: grid; gap: 12px; }
.stack label { display: grid; gap: 4px; font-size: .9rem; font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
input, select, textarea {
  width: 100%; font: inherit; font-weight: 400; padding: 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.photo-pick { display: block !important; }
.photo-pick input { display: none; }
.photo-pick span {
  display: block; text-align: center; padding: 22px; border: 2px dashed var(--line); border-radius: 14px;
  background: var(--surface); cursor: pointer; font-weight: 700;
}
.preview { width: 100%; max-height: 320px; object-fit: contain; border-radius: 12px; background: var(--line); }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .8rem;
}
.tabbar a span { font-size: 1.2rem; line-height: 1.2; }
.tabbar a.active { color: var(--brand-2); }
.tabbar a.record span {
  background: var(--brand-2); color: #fff; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.3rem;
}

@media (max-width: 480px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .factors li { grid-template-columns: 66px 40px 1fr; }
  .hero-title { font-size: 1.4rem; }
}
