:root {
  --bg: #f6f2ea; --card: #fffdf9; --ink: #1d2422; --muted: #5f6b67; --line: #e3dccf;
  --brand: #1f4d45; --brand-ink: #f4efe6; --accent: #c8643b; --good: #2f7d4f; --bad: #b3372b; --warn: #f3c969;
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #141917; --card: #1c2321; --ink: #ecebe6; --muted: #a2aca8; --line: #2e3734; --brand: #7cc0ad; --brand-ink: #0f1513; --accent: #e88a5f; --good: #6cc48e; --bad: #f08074; }
}
* { box-sizing: border-box; }
html, 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); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: .2em 0 .4em; }
h2 { font-size: 1.2rem; margin: 1.2em 0 .5em; }
h3 { font-size: 1rem; margin: .8em 0 .3em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.pad { padding: 16px; }
.top { position: sticky; top: 0; z-index: 1000; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 10px 16px; background: var(--brand); color: var(--brand-ink); }
.top a { color: var(--brand-ink); text-decoration: none; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.05rem; }
.top nav { display: flex; gap: 4px; }
.top nav a { padding: 6px 10px; border-radius: 999px; font-size: .92rem; }
.top nav a.on { background: rgba(255,255,255,.18); }
main { max-width: 980px; margin: 0 auto; padding: 16px; min-height: 70vh; }
.foot { max-width: 980px; margin: 24px auto; padding: 0 16px 32px; font-size: .8rem; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin: 0 0 14px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.btn { appearance: none; border: 0; border-radius: 999px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--brand); color: var(--brand-ink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn.alt { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn.warn { background: var(--accent); color: #fff; }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: default; }
.linkish { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .875rem; padding: 0; }
input, textarea, select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%; }
label { display: block; font-size: .875rem; color: var(--muted); margin: 10px 0 4px; }
.map { height: 340px; border-radius: var(--radius); border: 1px solid var(--line); margin: 0 0 14px; z-index: 0; }
.map.tall { height: 440px; }
.place { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: start; text-decoration: none; color: inherit; }
.place img, .place .ph { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; background: var(--line); }
.place h3 { margin: 0 0 2px; }
.place p { margin: 0; font-size: .9rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dist { font-size: .8rem; color: var(--accent); font-weight: 600; }
.hero { width: 100%; max-height: 380px; object-fit: cover; border-radius: var(--radius); margin: 4px 0 12px; }
.article p { margin: 0 0 .9em; }
.pill { display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--ink); }
.pill.good { background: var(--good); color: #fff; } .pill.bad { background: var(--bad); color: #fff; } .pill.acc { background: var(--accent); color: #fff; }
.banner { padding: 12px 14px; border-radius: 12px; background: var(--warn); color: #3a2c00; margin: 0 0 14px; }
.leader { font-size: 1.05rem; }
.leader b { color: var(--accent); }
.task { border-top: 1px solid var(--line); padding: 12px 0; }
.task:first-child { border-top: 0; }
.task.done { opacity: .75; }
.big { font-size: 2.2rem; font-weight: 800; letter-spacing: .08em; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.sos { position: fixed; right: 16px; bottom: 16px; z-index: 1100; background: var(--bad); color: #fff; border-radius: 999px; padding: 12px 18px; font-weight: 800; border: 0; box-shadow: var(--shadow); cursor: pointer; }
.stopEd { border: 1px dashed var(--line); border-radius: 12px; padding: 12px; margin: 0 0 12px; }
.taskEd { display: grid; grid-template-columns: 110px 1fr 70px; gap: 6px; margin: 6px 0; }
.taskEd .wide { grid-column: 1 / -1; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 1200; max-width: calc(100% - 32px); text-align: center; }
#toast.on { opacity: 1; }
.qr img, .qr canvas { width: 160px; height: 160px; background: #fff; padding: 8px; border-radius: 8px; }
@media (max-width: 560px) {
  .top nav a { padding: 6px 8px; font-size: .85rem; }
  .taskEd { grid-template-columns: 1fr 70px; }
  .taskEd select { grid-column: 1 / -1; }
  .map { height: 280px; }
}
