/* 東港垃圾車 — the sibling of 東港鎮停水查詢 (same quiet paper/night surfaces, Noto Sans TC, sea-blue links), with the
   garbage-truck yellow as its one loud colour: the today card's band, the route line, the chips that name buttons in the app.
   Large type for older readers; every time is tabular. */
:root {
  --bg: #f3f5f6; --surface: #ffffff; --ink: #14202a; --ink-2: #34434e; --muted: #5b6973; --line: #dde3e7; --sea: #0d6e8f;
  --yellow: #f2b705; --yellow-tint: #fff4cf; --yellow-ink: #5c4300; --stop: #b3261e; --stop-tint: #fde9e7;
  --radius: 1.1rem; --shadow: 0 1px 2px rgba(20, 32, 42, 0.04), 0 8px 24px -12px rgba(20, 32, 42, 0.14);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1418; --surface: #141e24; --ink: #e9eef1; --ink-2: #c7d1d8; --muted: #95a3ac; --line: #24323b; --sea: #6fc3df;
    --yellow: #f5c84c; --yellow-tint: #2a2410; --yellow-ink: #f5d77e; --stop: #ff8b7a; --stop-tint: #2c1a18;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px -16px rgba(0, 0, 0, 0.6);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; scrollbar-color: var(--line) var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.75 "Noto Sans TC", "PingFang TC", system-ui, -apple-system, "Microsoft JhengHei", sans-serif;
  letter-spacing: 0.02em; -webkit-font-smoothing: antialiased; }
::selection { background: color-mix(in srgb, var(--yellow) 45%, transparent); color: var(--ink); }
main { max-width: 40rem; margin: 0 auto; padding: 1.2rem 1.1rem 3.5rem; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--sea); outline-offset: 3px; border-radius: 0.4rem; }
h2 { margin: 0 0 0.6rem; font-size: 1.55rem; font-weight: 900; letter-spacing: 0.06em; line-height: 1.4; text-wrap: balance; }
h3 { margin: 1.8rem 0 0.6rem; font-size: 1.08rem; font-weight: 700; letter-spacing: 0.04em; }
.hint, .small { margin: 0 0 0.8rem; color: var(--muted); font-size: 0.9rem; }
.small { margin-top: 0.8rem; }
.lead { margin: 0; color: var(--ink-2); }

/* header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; margin-bottom: 1.2rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink-2); font-size: 1rem; font-weight: 700; letter-spacing: 0.1em; text-decoration: none; }
.brand img { border-radius: 0.45rem; }

/* today: the card is truck-yellow paper on a collection day, a pale red on a rest day */
.today { margin-top: 1.6rem; padding: 1.3rem 1.3rem 1.2rem; border-radius: var(--radius); background: var(--yellow-tint);
  border: 1px solid color-mix(in srgb, var(--yellow) 55%, transparent); box-shadow: var(--shadow); }
.today.off { background: var(--stop-tint); border-color: color-mix(in srgb, var(--stop) 30%, transparent); }
.today-date { margin: 0; color: var(--muted); font-size: 0.95rem; font-weight: 500; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.today h1 { margin: 0.15rem 0 0.6rem; font-size: clamp(1.75rem, 7vw, 2.25rem); font-weight: 900; line-height: 1.3; letter-spacing: 0.04em; text-wrap: balance; }
.today.off h1 { color: var(--stop); }
.today p { margin: 0.35rem 0 0; color: var(--ink-2); }
.today .mine { padding: 0.6rem 0.8rem; border-radius: 0.7rem; background: var(--surface); color: var(--ink); }
.today .next { margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); color: var(--muted); font-size: 0.9rem; }
.fx { margin: 0.4rem 0 0; padding: 0; list-style: none; }
.fx li { padding: 0.35rem 0; font-variant-numeric: tabular-nums; }

.block { margin-top: 2.8rem; }

/* search */
.search { display: grid; gap: 0.35rem; }
.search span { color: var(--muted); font-size: 0.88rem; letter-spacing: 0.08em; }
input[type=search] { width: 100%; font: inherit; font-size: 1.2rem; color: var(--ink); padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 0.9rem;
  background: var(--surface); box-shadow: var(--shadow); -webkit-appearance: none; appearance: none; }
input[type=search]::placeholder { color: var(--muted); }
input[type=search]:focus { outline: 3px solid var(--sea); outline-offset: 2px; }
#hint { margin-top: 0.6rem; }
.hits { list-style: none; margin: 0; padding: 0; }
.hits li { display: grid; grid-template-columns: 4.6rem 1fr auto; gap: 0 0.8rem; align-items: start; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.hit-time { margin: 0; display: grid; }
.hit-time b { font-size: 1.45rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.hit-time span { color: var(--muted); font-size: 0.72rem; }
.hit-body p { margin: 0; }
.hit-name { font-weight: 700; line-height: 1.5; }
.hit-meta { color: var(--muted); font-size: 0.85rem; }
.hit-meta a { color: var(--sea); }
.nw { white-space: nowrap; }
.save { font: inherit; font-size: 0.82rem; padding: 0.35rem 0.75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.save[aria-pressed=true] { background: var(--yellow); border-color: var(--yellow); color: #2b2100; font-weight: 700; }

/* the app: QR cards, steps */
.qr { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.qr-card { display: grid; justify-items: center; gap: 0.1rem; padding: 1rem 0.8rem 0.9rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); text-decoration: none; text-align: center; }
.qr-card img { width: 100%; max-width: 160px; height: auto; margin-bottom: 0.5rem; border-radius: 0.4rem; background: #fff; padding: 4px; }
.qr-card b { font-size: 1rem; }
.qr-card span { color: var(--muted); font-size: 0.82rem; }
.qr-card:hover { border-color: var(--sea); }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.1rem 3rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0.1rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--yellow); color: #2b2100;
  display: grid; place-items: center; font-weight: 900; font-variant-numeric: tabular-nums; }
.steps b { font-size: 1.05rem; }
.steps p { margin: 0.15rem 0 0; color: var(--ink-2); }
.chip { display: inline-block; padding: 0 0.55rem; border: 1px solid color-mix(in srgb, var(--yellow) 70%, var(--ink) 10%); border-radius: 0.45rem; background: var(--yellow-tint);
  color: var(--yellow-ink); font-size: 0.92em; font-weight: 700; line-height: 1.6; white-space: nowrap; }
.plates { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.plates th { padding: 0.4rem 0; color: var(--muted); font-size: 0.82rem; font-weight: 500; text-align: left; border-bottom: 1px solid var(--ink); }
.plates td { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.plates a { text-decoration: none; }
.plate { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }

/* routes: a yellow line through the stops */
.route { margin-bottom: 0.7rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.route summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.2rem 1rem; padding: 0.95rem 1.2rem; cursor: pointer; list-style: none; }
.route summary::-webkit-details-marker { display: none; }
.r-name { font-size: 1.12rem; font-weight: 700; }
.r-name::after { content: ''; display: inline-block; width: 0.45rem; height: 0.45rem; margin-left: 0.6rem; border: solid var(--muted); border-width: 0 2px 2px 0;
  transform: translateY(-0.2rem) rotate(45deg); transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
.route[open] .r-name::after { transform: translateY(0.05rem) rotate(-135deg); }
.r-meta { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.r-facts { display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 1rem; margin: 0; padding: 0 1.2rem 0.9rem; font-size: 0.92rem; }
.r-facts dt { color: var(--muted); }
.r-facts dd { margin: 0; }
.line { list-style: none; margin: 0; padding: 0.4rem 1.2rem 1.2rem; }
.line li { position: relative; display: grid; grid-template-columns: 3.2rem 1fr; gap: 0 2.6rem; padding: 0.45rem 0; font-size: 0.98rem; line-height: 1.5; }
.line li::before { content: ''; position: absolute; left: 4.35rem; top: 0; bottom: 0; width: 4px; background: var(--yellow); }
.line li:first-child::before { top: 0.95rem; }
.line li:last-child::before { bottom: calc(100% - 0.95rem); }
.line li::after { content: ''; position: absolute; left: calc(4.35rem - 7px); top: 0.7rem; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--yellow); }
.line li.end::after { background: var(--yellow); }
.line time { color: var(--ink-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.line em { grid-column: 2; color: var(--yellow-ink); font-size: 0.78rem; font-style: normal; font-weight: 700; letter-spacing: 0.1em; }
.line li.here { background: var(--yellow-tint); border-radius: 0.5rem; }
@media (prefers-reduced-motion: no-preference) { .line li.here { animation: here 1.6s cubic-bezier(0.16, 1, 0.3, 1); } }
@keyframes here { from { background: color-mix(in srgb, var(--yellow) 60%, transparent); } }

/* fixed points */
.fixed-group h3 { margin-top: 1.2rem; }
.fixed { list-style: none; margin: 0; padding: 0; }
.fixed li { padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.fixed p { margin: 0; }
.f-place { font-weight: 700; }
.f-place span { color: var(--muted); font-size: 0.85rem; font-weight: 400; }
.f-when { color: var(--ink-2); font-size: 0.95rem; font-variant-numeric: tabular-nums; }

footer { margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; line-height: 1.8; }
footer p { margin: 0; }

@media (max-width: 380px) {
  .hits li { grid-template-columns: 3.9rem 1fr; }
  .save { grid-column: 2; justify-self: start; margin-top: 0.4rem; }
  .qr { gap: 0.6rem; }
}

/* privacy page */
.doc article h1 { margin: 0.6rem 0 0; font-size: 1.7rem; font-weight: 900; letter-spacing: 0.06em; }
.doc-date { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.doc article h2 { margin: 2rem 0 0.4rem; font-size: 1.08rem; font-weight: 700; }
.doc article p { margin: 0; color: var(--ink-2); line-height: 1.9; }

/* tabs: one panel at a time (app.js); the bar stays at the top while reading */
.tabs { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.3rem; margin: 0 -0.2rem 1.2rem; padding: 0.4rem 0.2rem;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.tabs a { padding: 0.5rem 0.2rem; border-radius: 0.8rem; color: var(--ink-2); font-size: 0.98rem; font-weight: 500; text-align: center; text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s, color 0.2s; }
.tabs a:hover { background: var(--surface); }
.tabs a[aria-current] { background: var(--yellow); color: #2b2100; font-weight: 700; }
.tabbed .panel.block { margin-top: 0; }
.top { margin-bottom: 0.6rem; }
