:root {
  --accent: #E8590C;
  --accent-strong: #CC4D0A; /* 白字壓橘底用這個，#E8590C 過不了 AA */
  --bg: #fff;
  --surface: #faf7f5;
  --line: #ece6e1;
  --text: #1f1a17;
  --muted: #6b625c;
  --warn-bg: #fff4e5;
  --warn: #8a4b00;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--accent-strong); }

.top {
  position: sticky; top: 0; z-index: 2;
  display: flex; gap: 12px; align-items: center;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: var(--accent-strong); color: #fff;
}
.brand { color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
#q {
  flex: 1; min-width: 0; font: inherit; padding: 8px 12px;
  border: 0; border-radius: 10px; background: #fff; color: var(--text);
}

main { max-width: 720px; margin: 0 auto; padding: 16px; }

.crumb { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.crumb a { text-decoration: none; }
h1 { font-size: 22px; margin: 0 0 12px; }
h2 { font-size: 17px; margin: 20px 0 8px; }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile {
  display: block; padding: 16px; border-radius: 14px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.tile b { display: block; font-size: 18px; }
.tile span { font-size: 13px; color: var(--muted); }

.list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.list li + li { border-top: 1px solid var(--line); }
.list a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; text-decoration: none; color: var(--text); }
.list .sub { display: block; font-size: 13px; color: var(--muted); }
.range { font-weight: 700; white-space: nowrap; color: var(--accent-strong); }

.big {
  padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  text-align: center; margin-bottom: 16px;
}
.big .num { font-size: 40px; font-weight: 800; color: var(--accent-strong); line-height: 1.1; }
.big .lbl { font-size: 14px; color: var(--muted); }

.rows { width: 100%; border-collapse: collapse; font-size: 15px; }
.rows th, .rows td { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rows th { font-size: 12px; color: var(--muted); font-weight: 600; }
.rows td.n { text-align: right; white-space: nowrap; }
.rows td.n b { font-size: 17px; }
.rows .meta { display: block; font-size: 12px; color: var(--muted); }
.rows .meta.warn { color: var(--warn); margin-top: 2px; }

.badge { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--warn-bg); color: var(--warn); }
.note { background: var(--warn-bg); color: var(--warn); padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.empty { color: var(--muted); }

.foot { max-width: 720px; margin: 24px auto 0; padding: 16px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.foot p { margin: 4px 0; }
