:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --ink: #1f2a24;
  --muted: #66706a;
  --line: #e2ded4;
  --brand: #2f6f4f;
  --brand-ink: #ffffff;
  --accent: #c8792b;
  --danger: #b3412f;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151a17; --card: #1e2520; --ink: #e8ece9; --muted: #9aa59e;
    --line: #2e3831; --brand: #5fae85; --brand-ink: #0f1411; --accent: #e09a52;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--brand); }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 1000; flex-wrap: wrap;
}
.brand { font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--ink); }
#nav { display: flex; gap: 6px; flex-wrap: wrap; }
#nav a, #nav button {
  font: inherit; font-size: .9rem; padding: 6px 10px; border-radius: 8px;
  text-decoration: none; color: var(--ink); background: none; border: 1px solid transparent; cursor: pointer;
}
#nav a.active { border-color: var(--line); background: var(--bg); }
.banner { text-align: center; font-size: .78rem; color: var(--muted); padding: 4px; }
main { max-width: 720px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.4rem; margin: 8px 0 16px; }
h2 { font-size: 1.1rem; margin: 24px 0 8px; }
.muted { color: var(--muted); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px;
}
a.card { display: block; color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--brand); }
.card h3 { margin: 4px 0; font-size: 1.05rem; }
.meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.tag {
  display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line);
}
.reward { font-weight: 700; color: var(--accent); }
.status { font-weight: 600; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.filters button {
  font: inherit; font-size: .88rem; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer;
}
.filters button.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.stat {
  display: flex; align-items: baseline; gap: 8px; padding: 10px 14px; margin-bottom: 14px;
  border-radius: var(--radius); background: var(--card); border: 1px dashed var(--line); font-size: .9rem;
}
.stat b { font-size: 1.3rem; color: var(--brand); }
form { display: grid; gap: 12px; }
label { display: grid; gap: 4px; font-size: .9rem; font-weight: 600; }
input, textarea, select {
  font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); width: 100%;
}
textarea { min-height: 110px; resize: vertical; }
.btn {
  font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink);
}
.btn.ghost { background: transparent; color: var(--brand); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn:disabled { opacity: .6; cursor: default; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.error { color: var(--danger); font-size: .9rem; min-height: 1.2em; margin: 0; }
.notice {
  padding: 10px 14px; border-radius: var(--radius); background: var(--bg);
  border: 1px solid var(--line); margin: 12px 0;
}
.desc { white-space: pre-wrap; }
.empty { text-align: center; padding: 32px 0; }
.between { justify-content: space-between; }
.map { height: 260px; border-radius: var(--radius); border: 1px solid var(--line); margin: 6px 0; z-index: 0; }
.label { font-size: .9rem; font-weight: 600; }
.small { font-size: .82rem; }
.btn.small { padding: 6px 10px; font-size: .85rem; }
.map-tools { margin-top: 4px; }
.thumbs, .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin: 8px 0; }
.thumb { position: relative; }
.thumb img, .gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; border: 1px solid var(--line); }
.thumb button {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.6); color: #fff; font-size: 16px; line-height: 1; cursor: pointer;
}
.file-btn { display: inline-flex; width: auto; font-weight: 600; }
.file-btn[hidden] { display: none; }
a.card.has-cover { display: grid; grid-template-columns: 76px 1fr; gap: 0 12px; }
a.card.has-cover > :not(.cover) { grid-column: 2; }
.cover { grid-row: 1 / span 3; width: 76px; height: 76px; object-fit: cover; border-radius: 8px; }
