@charset "UTF-8";
/* =========================================================
   中湖國小 115 學年度運動會 官方網站
   style.css — 共用設計系統
   ========================================================= */

:root {
  --ink: #0c1524;
  --ink-2: #152238;
  --ink-3: #223350;
  --paper: #f6f4ef;
  --paper-2: #ffffff;
  --line: #e3ded3;
  --line-dark: rgba(255, 255, 255, 0.14);

  --coral: #ff5a3c;
  --coral-dark: #e3442a;
  --gold: #ffb703;
  --green: #12a46b;
  --blue: #2f6bff;
  --violet: #7a5cff;

  --text: #14202f;
  --muted: #5d6b7e;
  --muted-2: #8b97a8;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow: 0 10px 30px -12px rgba(16, 24, 40, .22), 0 2px 8px rgba(16, 24, 40, .06);
  --shadow-lg: 0 30px 60px -24px rgba(12, 21, 36, .45);

  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Hiragino Sans TC",
    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --wrap: 1160px;
  --header-h: 66px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
table { border-collapse: collapse; width: 100%; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--gold); color: var(--ink); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; }

/* ───────────────────────── Header ───────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(12, 21, 36, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-dark);
  color: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -.5px;
  color: #fff;
  background: linear-gradient(145deg, var(--coral), #ff8a3d 55%, var(--gold));
  box-shadow: 0 6px 16px -6px rgba(255, 90, 60, .85);
}
.brand-text { display: grid; line-height: 1.25; }
.brand-text b {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .3px;
}
.brand-text span {
  font-size: 11.5px;
  color: rgba(255, 255, 255, .62);
  letter-spacing: .6px;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  position: relative;
  padding: 8px 13px;
  font-size: 14.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, .74);
  border-radius: 9px;
  transition: color .16s ease, background .16s ease;
  white-space: nowrap;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .09); }
.nav a[aria-current="page"] { color: #fff; }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}

.header-cta {
  margin-left: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
  background: var(--gold);
  white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease;
}
.header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px rgba(255, 183, 3, .9);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 38px;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  box-shadow: 0 -6px 0 #fff, 0 6px 0 #fff;
  border-radius: 2px;
}

@media (max-width: 860px) {
  .nav-toggle { display: grid; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px clamp(16px, 4vw, 32px) 18px;
    background: rgba(12, 21, 36, .98);
    border-bottom: 1px solid var(--line-dark);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 13px 12px; font-size: 16px; border-radius: 10px; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav a[aria-current="page"] { background: rgba(255, 183, 3, .16); color: var(--gold); }
  .header-cta { margin: 8px 0 0; text-align: center; }
}

/* ───────────────────────── Hero ───────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(900px 480px at 82% -8%, rgba(255, 90, 60, .34), transparent 62%),
    radial-gradient(760px 420px at 6% 108%, rgba(18, 164, 107, .26), transparent 60%),
    linear-gradient(168deg, #0c1524 0%, #101d32 48%, #0a1220 100%);
  padding: clamp(44px, 7vw, 86px) 0 clamp(40px, 6vw, 74px);
  isolation: isolate;
}

/* 跑道線條裝飾 */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -18%;
  top: 8%;
  width: min(760px, 78vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%,
      transparent 0 26px,
      rgba(255, 255, 255, .055) 26px 27px);
  -webkit-mask-image: radial-gradient(circle, #000 40%, transparent 72%);
  mask-image: radial-gradient(circle, #000 40%, transparent 72%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 183, 3, .5), transparent);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--gold);
  background: rgba(255, 183, 3, .1);
  border: 1px solid rgba(255, 183, 3, .3);
}
.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(255, 183, 3, .18);
}

.hero h1 {
  margin-top: 20px;
  font-size: clamp(30px, 5.1vw, 54px);
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: -.02em;
}
.hero h1 .accent {
  background: linear-gradient(100deg, var(--gold), #ffe08a 40%, var(--coral));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lede {
  margin-top: 18px;
  max-width: 40em;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.9;
  color: rgba(255, 255, 255, .76);
}

.hero-meta {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--line-dark);
}
.chip-meta b { font-weight: 800; color: var(--gold); }
.chip-meta svg { flex: 0 0 auto; opacity: .8; }

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--coral), #ff7a45);
  box-shadow: 0 14px 28px -14px rgba(255, 90, 60, .95);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -14px rgba(255, 90, 60, 1); }
.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .22);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .13); transform: translateY(-2px); }

/* 倒數 */
.countdown-card {
  position: relative;
  padding: clamp(22px, 3vw, 30px);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .035));
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(6px);
}
.countdown-card .cc-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .1em;
  color: rgba(255, 255, 255, .6);
  text-transform: uppercase;
}
.cc-badge {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 3px 10px;
  border-radius: 999px;
  color: #06231a;
  background: var(--green);
  text-transform: none;
}
.cc-badge.is-live { background: var(--gold); color: #2a1c00; }
.cc-badge.is-done { background: rgba(255, 255, 255, .2); color: #fff; }

.cc-digits {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.cc-unit {
  text-align: center;
  padding: 12px 4px 10px;
  border-radius: 14px;
  background: rgba(8, 14, 24, .45);
  border: 1px solid rgba(255, 255, 255, .09);
}
.cc-unit b {
  display: block;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(24px, 4.2vw, 34px);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  letter-spacing: -.02em;
}
.cc-unit span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: .14em;
  color: rgba(255, 255, 255, .5);
}
.cc-date {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px dashed rgba(255, 255, 255, .16);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, .62);
}
.cc-date b {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .02em;
}

/* ───────────────────────── Sections ───────────────────────── */
.section { padding: clamp(46px, 7vw, 82px) 0; }
.section.tight { padding-top: 0; }
.section--paper { background: var(--paper); }
.section--white { background: var(--paper-2); }
.section--ink {
  color: #fff;
  background:
    radial-gradient(700px 340px at 90% 0%, rgba(47, 107, 255, .22), transparent 60%),
    linear-gradient(180deg, #0c1524, #101b2e);
}

.section-head {
  max-width: 46em;
  margin-bottom: clamp(26px, 3.4vw, 40px);
}
.section-head.center { margin-inline: auto; text-align: center; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .16em;
  color: var(--coral-dark);
}
.kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--coral);
}
.section--ink .kicker { color: var(--gold); }
.section--ink .kicker::before { background: var(--gold); }

.section-head h2 {
  margin-top: 10px;
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.28;
  font-weight: 900;
  letter-spacing: -.015em;
}
.section-head p {
  margin-top: 12px;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--muted);
}
.section--ink .section-head p { color: rgba(255, 255, 255, .68); }

/* 卡片網格 */
.grid {
  display: grid;
  gap: clamp(14px, 2vw, 20px);
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  position: relative;
  padding: clamp(20px, 2.4vw, 26px);
  border-radius: var(--radius);
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
a.card:hover, .card.is-hover:hover {
  transform: translateY(-3px);
  border-color: #d3cbba;
  box-shadow: var(--shadow);
}
.card h3 {
  font-size: 17.5px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.card p {
  margin-top: 8px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
}

/* 入口卡 */
.entry {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.entry .icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, var(--ink-3), var(--ink));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}
.entry[data-tone="coral"] .icon { background: linear-gradient(140deg, var(--coral), #ff8a3d); }
.entry[data-tone="green"] .icon { background: linear-gradient(140deg, var(--green), #35d39a); }
.entry[data-tone="blue"] .icon { background: linear-gradient(140deg, var(--blue), #6d9bff); }
.entry[data-tone="violet"] .icon { background: linear-gradient(140deg, var(--violet), #a48bff); }
.entry h3 { margin-top: 2px; }
.entry .go {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--coral-dark);
}
.entry .go svg { transition: transform .18s ease; }
a.entry:hover .go svg { transform: translateX(4px); }

/* 統計 */
.stat {
  padding: clamp(18px, 2.2vw, 24px);
  border-radius: var(--radius);
  border: 1px solid var(--line-dark);
  background: rgba(255, 255, 255, .045);
  text-align: center;
}
.stat b {
  display: block;
  font-family: var(--mono);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--gold);
  letter-spacing: -.02em;
}
.stat span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, .66);
}
.stat .unit {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, .55);
  margin-left: 3px;
  letter-spacing: 0;
}
.stat .stat-meta {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, .16);
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .55);
  font-variant-numeric: tabular-nums;
}

/* ───────────────────────── 時間軸（當天流程） ───────────────────────── */
.timeline {
  position: relative;
  display: grid;
  gap: 2px;
}
.tl-row {
  position: relative;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: clamp(14px, 2.4vw, 26px);
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.tl-row:last-child { border-bottom: 0; }
.tl-time {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
  padding-top: 1px;
}
.tl-time small {
  display: block;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-2);
  letter-spacing: .04em;
}
.tl-body { position: relative; padding-left: 22px; }
.tl-body::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 90, 60, .14);
}
.tl-body::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 22px;
  bottom: -20px;
  width: 1px;
  background: linear-gradient(var(--line), var(--line));
}
.tl-row:last-child .tl-body::after { display: none; }
.tl-body h3 {
  font-size: 16.5px;
  font-weight: 800;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.tl-body p {
  margin-top: 6px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
}
.tl-body p .sep { color: var(--muted-2); padding-inline: 6px; }

/* 狀態標籤 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.tag-live { color: #7a2b00; background: #ffe8a3; border-color: #ffd166; }
.tag-soon { color: #0b4f8a; background: #e2f0ff; border-color: #b9dcff; }
.tag-past { color: #5d6b7e; background: #eef1f5; border-color: #dfe5ec; }
.tag-key { color: #7a1f0d; background: #ffe4dc; border-color: #ffc3b3; }
.tag-senior { color: #1c3d7a; background: #e6edff; border-color: #c3d4ff; }
.tag-junior { color: #0f5d40; background: #e2f6ec; border-color: #b6e6cf; }
.tag-lower { color: #6b3a00; background: #fff0d6; border-color: #ffdca8; }
.tag-all { color: #3d2a6b; background: #efe9ff; border-color: #d9ccff; }
.tag-kinder { color: #7a1f52; background: #ffe6f2; border-color: #ffc3dd; }

/* ───────────────────────── 表格 ───────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}

table.data {
  min-width: 640px;
  font-size: 14.5px;
}
table.data caption {
  caption-side: top;
  text-align: left;
  padding: 16px 20px 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .02em;
}
table.data th,
table.data td {
  padding: 13px 16px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
table.data thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--muted);
  background: #fbfaf7;
  border-bottom: 1px solid #ddd7c9;
  white-space: nowrap;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fcfbf8; }
table.data td.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}
table.data td.time {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
table.data .sub {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted-2);
  line-height: 1.5;
  margin-top: 3px;
}
table.data tr.is-past td { color: var(--muted-2); }
table.data tr.is-highlight { background: #fff9ec; }
table.data tr.is-highlight:hover { background: #fff5df; }
table.data td:first-child,
table.data th:first-child {
  position: sticky;
  left: 0;
  background: inherit;
  z-index: 1;
}
table.data thead th:first-child { z-index: 3; background: #fbfaf7; }
table.data tbody tr td:first-child { background: var(--paper-2); }
table.data tbody tr:hover td:first-child { background: #fcfbf8; }
table.data tbody tr.is-past td:first-child { background: var(--paper-2); }

/* 競賽流程表：時間／檢錄／場地不換行 */
table.data.tracksched { min-width: 1040px; }
table.data.tracksched td:nth-child(3),
table.data.tracksched td:nth-child(4) { white-space: nowrap; }
table.data.tracksched td:nth-child(2) { min-width: 220px; }

.medal {
  display: inline-grid;  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 11.5px;
  font-weight: 900;
  color: #4a3300;
  background: linear-gradient(145deg, #ffe08a, #f0b429);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
.medal.silver { background: linear-gradient(145deg, #eef2f7, #c3ccd8); color: #2f3b4b; }
.medal.bronze { background: linear-gradient(145deg, #f2cfae, #c98d5a); color: #47280e; }

/* ───────────────────────── 篩選列 ───────────────────────── */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.chip {
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  background: var(--paper-2);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all .16s ease;
  white-space: nowrap;
}
.chip:hover { border-color: #c9c0ac; color: var(--text); }
.chip[aria-pressed="true"] {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

/* 行內動作按鈕（例如列印賽程） */
.btn-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  background: var(--paper-2);
  border: 1px solid var(--line);
  cursor: pointer;
  white-space: nowrap;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.btn-inline:hover { color: var(--text); border-color: #c9c0ac; background: #fff; }
.btn-inline svg { flex: 0 0 auto; }
.search {
  position: relative;
  margin-left: auto;
  min-width: min(260px, 100%);
}.search svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
}
.search input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.search input::placeholder { color: var(--muted-2); }
.search input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .16);
}
@media (max-width: 640px) {
  .search { margin-left: 0; width: 100%; }
}

.result-note {
  font-size: 13px;
  color: var(--muted-2);
  margin-bottom: 12px;
}
.empty {
  padding: 44px 20px;
  text-align: center;
  font-size: 14.5px;
  color: var(--muted-2);
  background: var(--paper-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ───────────────────────── 分頁 ───────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 14px;
  background: #ece9e1;
  border: 1px solid #e0dacd;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 1 0 auto;
  padding: 11px 18px;
  border: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] {
  color: var(--ink);
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
}
.tabpanel[hidden] { display: none; }

@media (max-width: 620px) {
  /* 手機版：分頁改為直向堆疊，避免標籤被裁切 */
  .tabs { flex-direction: column; }
  .tab { width: 100%; text-align: left; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .search { margin-left: 0; width: 100%; }
  .toolbar .btn-inline { align-self: flex-start; }
}

/* ───────────────────────── 會前賽時間表 ───────────────────────── */
.daylist { display: grid; gap: 12px; }
.day {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.day.is-past { opacity: .62; }
.day.is-today { border-color: #ffd166; box-shadow: 0 0 0 3px rgba(255, 183, 3, .16), var(--shadow-sm); }
.day-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #fdfcf9, #f8f6f1);
  border-bottom: 1px solid var(--line);
}
.day-date {
  display: grid;
  place-items: center;
  min-width: 62px;
  padding: 5px 8px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  line-height: 1.15;
}
.day-date b { font-family: var(--mono); font-size: 16px; font-weight: 800; }
.day-date span { font-size: 10.5px; letter-spacing: .1em; opacity: .72; }
.day.is-today .day-date { background: linear-gradient(140deg, var(--coral), #ff8a3d); }
.day-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.day-title strong { font-size: 15.5px; font-weight: 800; }
.day-items { padding: 4px 0; }
.day-item {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid #f1eee7;
  align-items: start;
}
.day-item:last-child { border-bottom: 0; }
.day-item .t {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  padding-top: 2px;
}
.day-item .t.none { color: var(--muted-2); font-family: var(--font); font-weight: 600; }
.day-item .n {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.day-item .note {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.7;
}
@media (max-width: 560px) {
  .day-item { grid-template-columns: 1fr; gap: 4px; }
  .day-item .t { color: var(--coral-dark); }
}

/* ───────────────────────── 紀錄頁 ───────────────────────── */
.record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 20px);
}
@media (max-width: 900px) { .record-grid { grid-template-columns: 1fr; } }

/* 分組標題（田徑賽分頁：男生組／女生組） */
.record-group {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin: 0 0 14px;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--ink);
  padding-left: 12px;
  border-left: 3px solid var(--coral);
}
.record-group span {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted-2);
}
.record-grid + .record-group { margin-top: 32px; }

.record-card {
  position: relative;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.record-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--coral), var(--gold));
}
.record-card .rc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.record-card .rc-event {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--muted-2);
}
.record-card .rc-time {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-top: 6px;
}
.record-card .rc-time small {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted-2);
  margin-left: 4px;
}
.record-card .rc-holder {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
}
.record-card .rc-meta {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--muted-2);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

/* ───────────────────────── 資訊頁 ───────────────────────── */
.prose h3 {
  font-size: 17px;
  font-weight: 800;
  margin-top: 26px;
}
.prose h3:first-child { margin-top: 0; }
.prose p, .prose li {
  font-size: 14.8px;
  line-height: 1.9;
  color: #2b3a4d;
}
.prose p { margin-top: 10px; }
.prose ul, .prose ol { margin-top: 8px; display: grid; gap: 6px; }
.prose ul { list-style: none; }
.prose ul li { position: relative; padding-left: 18px; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
}
.prose ol { list-style: none; counter-reset: n; }
.prose ol li { position: relative; padding-left: 30px; counter-increment: n; }
.prose ol li::before {
  content: counter(n);
  position: absolute;
  left: 0;
  top: .28em;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
  background: var(--ink-3);
}

.notice {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: #fff9ec;
  border: 1px solid #ffe0a3;
  font-size: 14px;
  line-height: 1.8;
  color: #6b4a00;
}
.notice svg { flex: 0 0 auto; margin-top: 3px; color: #c98a00; }
.notice strong { color: #593c00; }

.kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.kv div {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px solid var(--line);
}
.kv dt {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--muted-2);
}
.kv dd {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
}

/* ───────────────────────── Footer ───────────────────────── */
.site-footer {
  padding: clamp(36px, 5vw, 58px) 0 30px;
  color: rgba(255, 255, 255, .66);
  background: var(--ink);
  font-size: 13.5px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line-dark);
}
.footer-brand { max-width: 30em; }
.footer-brand .brand { color: #fff; margin-bottom: 12px; }
.footer-brand p { line-height: 1.85; font-size: 13.5px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  align-content: flex-start;
}
.footer-links a {
  color: rgba(255, 255, 255, .78);
  font-weight: 600;
  transition: color .16s ease;
}
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .46);
}

/* 頁首小橫幅（內頁） */
.page-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: clamp(34px, 5vw, 58px) 0 clamp(30px, 4vw, 48px);
  background:
    radial-gradient(640px 300px at 88% -20%, rgba(255, 90, 60, .3), transparent 62%),
    radial-gradient(520px 260px at 0% 120%, rgba(18, 164, 107, .22), transparent 60%),
    linear-gradient(165deg, #0c1524, #131f34);
}
.page-hero h1 {
  margin-top: 12px;
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.page-hero p {
  margin-top: 12px;
  max-width: 52em;
  font-size: 15px;
  line-height: 1.85;
  color: rgba(255, 255, 255, .72);
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .52);
}
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { opacity: .5; }

.anchor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.anchor-nav a {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line-dark);
  transition: background .16s ease, color .16s ease;
}
.anchor-nav a:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }

/* 註腳 / 小字 */
.footnote {
  margin-top: 16px;
  font-size: 12.8px;
  line-height: 1.8;
  color: var(--muted-2);
}
.footnote b { color: var(--muted); }
.hr {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: clamp(28px, 4vw, 44px) 0;
}

/* 回到頂端 */
.to-top {
  position: fixed;
  right: clamp(14px, 2vw, 26px);
  bottom: clamp(14px, 2vw, 26px);
  z-index: 90;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, background .16s ease;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--coral); }

/* 動畫：只做進場時的淡入，內容區塊一律保持可見（不依賴 JS） */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
  }
  .hero-grid > * { animation: rise .62s cubic-bezier(.2, .7, .3, 1) both; }
  .hero-grid > *:nth-child(2) { animation-delay: .1s; }
  .page-hero .wrap > * { animation: rise .5s cubic-bezier(.2, .7, .3, 1) both; }
  .page-hero .wrap > *:nth-child(2) { animation-delay: .06s; }
  .page-hero .wrap > *:nth-child(3) { animation-delay: .12s; }
}

/* 列印 */
@media print {
  :root { --paper: #fff; }
  .site-header, .to-top, .hero-actions, .tabs, .toolbar, .site-footer, .anchor-nav { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .hero, .page-hero {
    color: #000;
    background: #fff !important;
    border-bottom: 2px solid #000;
    padding: 0 0 12pt;
  }
  .hero h1, .page-hero h1 { color: #000; }
  .hero .lede, .hero-meta, .page-hero p { color: #333; }
  .section, .section--ink { background: #fff !important; color: #000; padding: 14pt 0; }
  .section-head p { color: #333; }
  .countdown-card { border: 1px solid #999; color: #000; background: #fff !important; box-shadow: none; }
  .cc-unit { background: #f4f4f4 !important; border-color: #ccc; }
  .cc-unit b, .cc-date b { color: #000; }
  .card, .day, .record-card, .table-wrap { box-shadow: none; border-color: #bbb; break-inside: avoid; }
  .tabpanel[hidden] { display: block !important; }
  table.data { font-size: 9.5pt; }
  table.data thead th { position: static; }
  .tag { border-color: #999; }
  a[href]::after { content: ""; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* 手機版表格滑動提示 */
.scroll-hint {
  display: none;
  margin: -6px 0 10px;
  font-size: 12.5px;
  color: var(--muted-2);
}
@media (max-width: 640px) {
  .scroll-hint { display: block; }
}
