:root {
  --paper: #fcfcfb;
  --ink: #1f2430;
  --ink-2: #4f4c46;
  --muted: #8a867d;
  --rule: #e3e0d9;
  --dark: #2b3850;
  --accent: #c8372f;
  --gutter: 16px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", sans-serif;
  line-height: 1.6;
}
.top { padding: 18px var(--gutter) 0; max-width: 1200px; margin: 0 auto; }
h1 { margin: 0; font-size: 20px; font-weight: 900; letter-spacing: 0.02em; }
.tabs {
  display: flex;
  gap: 4px;
  margin-top: 12px;
  border-bottom: 1px solid var(--rule);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs[hidden] { display: none; }
.tabs a {
  flex: 1 1 0;
  padding: 8px 2px;
  text-align: center;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.tabs a[aria-selected="true"] { color: var(--ink); font-weight: 800; border-bottom-color: var(--dark); }
.status { margin: 8px 0 0; min-height: 22px; font-size: 13px; color: var(--muted); }
.status.is-offline { color: var(--accent); font-weight: 700; }
main { padding: 8px var(--gutter) 48px; max-width: 1200px; margin: 0 auto; }
.notice { max-width: 420px; margin: 40px auto 0; text-align: center; }
.notice p { margin: 0 0 16px; }
.notice .hint { font-size: 14px; color: var(--ink-2); }
.notice .error { color: var(--accent); font-weight: 700; }
.notice a { color: var(--dark); font-weight: 700; }
.gis-slot { display: flex; justify-content: center; min-height: 44px; }
.link-button {
  font: inherit;
  font-weight: 700;
  color: var(--dark);
  background: none;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 8px 18px;
  cursor: pointer;
}
@media (min-width: 760px) {
  h1 { font-size: 26px; }
  .tabs a { flex: 0 0 auto; padding: 10px 22px; font-size: 16px; }
}

.week { padding-top: 6px; }
.week .k { font-size: 13px; font-weight: 700; color: var(--ink-2); letter-spacing: 0.06em; }
.hero { display: flex; align-items: flex-end; gap: 20px; padding: 10px 0 16px; border-bottom: 2px solid var(--ink); }
.hero .n { font-size: 64px; font-weight: 900; line-height: 1; color: var(--accent); letter-spacing: -0.02em; }
.hero .n span { font-size: 20px; font-weight: 800; color: var(--ink); margin-left: 4px; letter-spacing: 0; }
.range { flex: 1; min-width: 0; }
.range .r { font-size: 18px; font-weight: 800; margin-top: 2px; }
.nowrap { white-space: nowrap; }
.phase { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; padding: 2px 10px 2px 7px; border-radius: 6px; margin-bottom: 8px; }
.phase i { width: 5px; height: 15px; border-radius: 3px; }
.boxes { display: flex; gap: 10px; margin-top: 14px; }
.box { flex: 1; min-width: 0; background: #f1efea; border-radius: 12px; padding: 10px 14px 12px; }
.box .v { font-size: 16px; font-weight: 800; margin-top: 2px; }
.box .s { font-size: 12px; color: var(--muted); font-weight: 500; overflow-wrap: anywhere; }
.filters { display: flex; gap: 6px; margin: 16px 0 4px; overflow-x: auto; scrollbar-width: none; }
.chip { font: inherit; font-size: 14px; font-weight: 600; padding: 5px 14px; border-radius: 999px; border: 1px solid var(--rule); background: transparent; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: #fff; }
.groups { display: block; }
.week section { margin-top: 18px; min-width: 0; }
.week h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 17px; font-weight: 800; }
.week h3 i { width: 8px; height: 18px; border-radius: 3px; flex: none; }
.week h3 b { font-size: 13px; font-weight: 600; color: var(--muted); }
.week h3 b.none { font-weight: 500; }
.week h3 .late { font-style: normal; font-size: 12px; font-weight: 800; color: #fff; background: var(--accent); padding: 1px 9px; border-radius: 999px; }
.it { display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; grid-template-areas: "dt tx st" "dt ow st"; column-gap: 10px; align-items: center; padding: 7px 0 7px 4px; border-bottom: 1px solid var(--rule); }
.dt { grid-area: dt; display: flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.is-late .dt { color: var(--accent); }
.ico { flex: none; }
.tx { grid-area: tx; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ow { grid-area: ow; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ow.tbd { color: #8a5a00; font-weight: 700; }
.st { grid-area: st; font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 6px; border: 1px solid; white-space: nowrap; }
@media (min-width: 760px) {
  .hero .n { font-size: 84px; }
  .range .r { font-size: 24px; }
  .box .v { font-size: 20px; }
  .groups { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; align-items: start; }
  .it { grid-template-columns: 92px minmax(0, 1fr) 150px auto; grid-template-areas: "dt tx ow st"; }
  .tx { font-size: 16px; }
  .ow { font-size: 13px; }
}
.card-download { margin: 24px 0 8px; text-align: center; }
.card-download button:disabled { opacity: 0.6; cursor: default; }
.card-error { margin: 8px 0 0; font-size: 14px; font-weight: 700; color: var(--accent); }
.card-overlay { width: min(92vw, 520px); max-height: 92vh; padding: 14px; border: 0; border-radius: 14px; background: var(--paper); color: var(--ink); text-align: center; overflow: auto; }
.card-overlay::backdrop { background: rgba(31, 36, 48, 0.6); }
.card-overlay img { display: block; width: 100%; height: auto; border-radius: 8px; }
.card-overlay p { margin: 10px 0; font-size: 14px; color: var(--ink-2); }
.card-overlay div { display: flex; justify-content: center; gap: 12px; }
.card-overlay .chip { text-decoration: none; display: inline-block; }

.site-foot { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter) 32px; font-size: 13px; }
.site-foot a, .prose a { color: var(--muted); }
.home-link { color: inherit; text-decoration: none; }
.prose { max-width: 680px; }
.prose h2 { margin: 16px 0 8px; font-size: 18px; font-weight: 800; }
.prose h3 { margin: 24px 0 4px; font-size: 15px; font-weight: 800; }
.prose p, .prose ul { margin: 0 0 12px; }
.prose ul { padding-left: 1.4em; }

.cal-switch { display: flex; gap: 8px; margin: 8px 0 12px; }
.cal-body svg { display: block; width: 100%; height: auto; }
.cal-body.is-weeks { overflow-x: auto; }
.cal-body.is-weeks svg { min-width: 960px; }

.chart-wide { overflow-x: auto; }
.chart-wide svg { display: block; width: 100%; min-width: 1000px; height: auto; }
@media (min-width: 760px) {
  .chart-wide { position: relative; left: 50%; width: min(calc(100vw - 2 * var(--gutter)), 1920px); transform: translateX(-50%); overflow-x: visible; }
  .chart-wide svg { min-width: 0; }
}
.gs-group { margin: 0 0 20px; padding-left: 12px; border-left: 5px solid var(--group); }
.gs-group h2 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.gs-group ol { list-style: none; margin: 0; padding: 0; }
.gs-item { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--rule); font-size: 15px; }
.gs-when { font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 2px; }
.gs-name { font-weight: 600; }
.gs-needs { grid-column: 2; font-size: 13px; color: var(--muted); }
.gs-item.done .gs-name { color: var(--muted); }
.gs-item.cancelled .gs-name { text-decoration: line-through; color: var(--muted); }
.gs-item.past:not(.done):not(.cancelled) .gs-when { color: var(--accent); }
.gs-item .ico { vertical-align: -2px; margin-right: 4px; }
.gs-problems { margin-top: 24px; font-size: 12px; color: var(--muted); }
.gs-problems h3 { margin: 0 0 4px; font-size: 12px; }
.gs-problems ul { margin: 0; padding-left: 1.2em; }

.ts-narrow svg { display: block; width: 100%; height: auto; }
