/* 道路問題通報：深淺兩色，一個黃色重點，跟 iguana.donggang.ai 同一種做法（顏色用變數，深色模式整組換）。 */
:root {
  --bg: #eef5f6; --surface: #fff; --ink: #11242a; --ink-2: #2f4a52; --muted: #5a7279;
  --soft: #dfeaec; --line: #d6e3e6; --teal: #0f5f6b; --teal-ink: #fff; --accent: #f2b705; --accent-ink: #5c4300; --bad: #b42318;
  --radius: 1.1rem; --shadow: 0 1px 2px rgba(17, 36, 42, .04), 0 8px 24px -12px rgba(17, 36, 42, .16);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1719; --surface: #12222a; --ink: #e8f1f3; --ink-2: #c3d4d8; --muted: #8fa8ae;
    --soft: #1a2f35; --line: #213a42; --teal: #5cc7d6; --teal-ink: #05252b; --accent: #f5c84c; --accent-ink: #412f00; --bad: #ff9c91;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px -16px rgba(0, 0, 0, .6);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; padding: clamp(1.25rem, 5vw, 3rem) 1rem calc(3rem + env(safe-area-inset-bottom, 0px)); background: var(--bg); color: var(--ink);
  font: 400 1.05rem/1.7 system-ui, -apple-system, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  display: flex; justify-content: center;
}
main { width: 100%; max-width: 34rem; }
h1 { margin: 0 0 .35rem; font-size: clamp(1.6rem, 6vw, 2.1rem); letter-spacing: .02em; }
h2 { margin: 0 0 .75rem; font-size: 1rem; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.lede { margin: 0 0 1.5rem; color: var(--ink-2); }
section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.15rem 1.25rem; margin-bottom: 1.1rem; }
.hint { margin: .5rem 0 0; color: var(--muted); font-size: .9rem; }
.bad { margin: .5rem 0 0; color: var(--bad); font-weight: 700; font-size: .95rem; }
.ok { color: var(--teal); font-weight: 700; }

button, .pick {
  font: inherit; min-height: 2.9rem; padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); cursor: pointer;
}
button:focus-visible, .pick:focus-within, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button.go { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 700; width: 100%; }
button.go[disabled] { opacity: .45; cursor: not-allowed; }
button.minor { font-size: .95rem; }
.steps { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.steps .go { width: auto; flex: 1; }

.choices-row { display: grid; gap: .6rem; }
.pick { display: flex; align-items: center; justify-content: center; text-align: center; }
.pick.main { background: var(--teal); color: var(--teal-ink); font-weight: 700; border-color: transparent; }
.pick input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.thumbs { list-style: none; margin: .75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.thumbs li { position: relative; width: 5.2rem; height: 5.2rem; border-radius: .7rem; overflow: hidden; background: var(--soft); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs button { position: absolute; top: .2rem; right: .2rem; min-height: 1.7rem; width: 1.7rem; padding: 0; border-radius: 50%; line-height: 1; font-size: 1.1rem; background: rgba(0, 0, 0, .6); color: #fff; border: 0; }
.thumbs .tag { position: absolute; left: .2rem; bottom: .2rem; padding: 0 .4rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .72rem; font-weight: 700; }

.frame video { width: 100%; max-height: 50vh; border-radius: .7rem; background: #000; margin-top: .5rem; display: block; }
.frame input[type=range] { width: 100%; margin: .75rem 0 0; accent-color: var(--teal); }
.time { margin: .2rem 0 0; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }

#map { width: 100%; height: 18rem; border-radius: .8rem; margin-bottom: .6rem; background: var(--soft); }
.coords { display: grid; gap: .5rem; grid-template-columns: 1fr 1fr; }
.coords .hint { grid-column: 1 / -1; margin: 0; }
.coords label { display: grid; gap: .2rem; font-size: .9rem; color: var(--muted); }
input[type=text], input:not([type]), textarea { font: inherit; width: 100%; padding: .55rem .7rem; border-radius: .7rem; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }

.cats { display: grid; gap: .5rem; }
.cats label { display: block; }
.cats input { position: absolute; opacity: 0; pointer-events: none; }
.cats .c { display: block; padding: .65rem .95rem; border-radius: .9rem; border: 1px solid var(--line); background: var(--bg); }
.cats .c b { display: block; font-weight: 700; }
.cats .c em { display: block; font-style: normal; font-size: .85rem; color: var(--muted); }
.cats input:checked + .c { border-color: var(--teal); background: var(--soft); box-shadow: inset 0 0 0 1px var(--teal); }
.cats input:focus-visible + .c { outline: 3px solid var(--accent); outline-offset: 2px; }
textarea { resize: vertical; }
#human { margin: 1rem 0 .25rem; }

/* ── 第三步：公開地圖 ── */
:root { --s-forwarded: #c98a00; --s-in_progress: #1f78c8; --s-fixed: #2e8b57; --hot: #8e3fb0; }
@media (prefers-color-scheme: dark) { :root { --s-forwarded: #f0b429; --s-in_progress: #5aa9f0; --s-fixed: #4fc98a; --hot: #c58be0; } }
main.wide { max-width: 64rem; }
.back { margin: 0 0 .5rem; font-size: .95rem; }
a { color: var(--teal); }
.top { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.top .lede { margin-bottom: 1rem; }
.cta { display: inline-flex; align-items: center; min-height: 2.9rem; padding: .55rem 1.4rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.cta:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.bigmap { width: 100%; height: min(60vh, 34rem); min-height: 18rem; border-radius: .8rem; background: var(--soft); margin-bottom: .6rem; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; align-items: center; font-size: .95rem; }
.key { display: inline-flex; align-items: center; gap: .35rem; }
.toggle { cursor: pointer; }
.toggle input { width: 1.1rem; height: 1.1rem; accent-color: var(--hot); }
.dot { display: inline-block; width: .9rem; height: .9rem; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.dot.s-forwarded { background: var(--s-forwarded); } .dot.s-in_progress { background: var(--s-in_progress); } .dot.s-fixed { background: var(--s-fixed); }
.dot.hot { background: var(--hot); border-radius: .15rem; transform: rotate(45deg) scale(.85); }

.pin { min-width: 1.9rem; height: 1.9rem; padding: 0 .35rem; border-radius: 999px; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); color: #fff; font: 700 .85rem/1.5rem system-ui, sans-serif; text-align: center; cursor: pointer; }
.pin.s-forwarded { background: var(--s-forwarded); color: #1d1400; } .pin.s-in_progress { background: var(--s-in_progress); } .pin.s-fixed { background: var(--s-fixed); }
.pin-hot { width: 1.5rem; height: 1.5rem; background: var(--hot); border: 3px solid #fff; border-radius: .2rem; transform: rotate(45deg); box-shadow: 0 1px 4px rgba(0, 0, 0, .5); cursor: pointer; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.cards li { border: 1px solid var(--line); border-radius: .9rem; padding: .7rem .9rem; background: var(--bg); }
.cards b { display: block; }
.cards .when { margin: .3rem 0 0; padding: 0; list-style: none; display: block; font-size: .9rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cards .when li { border: 0; padding: 0; background: none; }
.chip { display: inline-block; margin-left: .4rem; padding: 0 .55rem; border-radius: 999px; font-size: .8rem; font-weight: 700; vertical-align: middle; color: #fff; }
.chip.s-forwarded { background: var(--s-forwarded); color: #1d1400; } .chip.s-in_progress { background: var(--s-in_progress); } .chip.s-fixed { background: var(--s-fixed); }
.cards .row { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin-top: .5rem; font-size: .9rem; }
.cards .row button { min-height: 2.2rem; padding: .2rem .8rem; font-size: .9rem; }
.pop { max-width: 16rem; color: #11242a; font: 400 .95rem/1.55 system-ui, -apple-system, "Noto Sans TC", "PingFang TC", sans-serif; }
.pop b { display: block; font-size: 1rem; }
.pop p { margin: .25rem 0 0; }
.pop .small { font-size: .82rem; color: #4a5f66; }
.foot { margin-top: 1.5rem; }
