
  :root {
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    color: #172d29; background: #f3f6f3;
    --green: #18453b; --muted: #52655f; --line: #dce7e0; --paper: #fff;
  }
  *, *::before, *::after { box-sizing: border-box; }
  body { margin: 0; line-height: 1.55; }
  button, input { font: inherit; }
  button { cursor: pointer; }
  button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #1e7861; outline-offset: 3px; }
  [hidden] { display: none !important; }
  .wrap { width: min(100% - 2.5rem, 69rem); margin-inline: auto; }
  .hero { padding: 2.7rem 0 2.4rem; background: #153b33; color: #fff; }
  .hero p, h1 { margin: 0; }
  .hero .school { color: #c3ded3; font-size: .9rem; }
  h1 { margin-top: .38rem; font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.18; letter-spacing: -.035em; }
  .hero .place { margin-top: .65rem; color: #dcebe4; }
  .check-note {
    margin: 1.25rem 0; padding: .85rem 1rem; display: flex; align-items: baseline; gap: .65rem 1.15rem;
    flex-wrap: wrap; border-radius: .7rem; border: 1px solid #cae0d4; background: #e6f3eb;
  }
  .check-note strong { color: var(--green); white-space: nowrap; }
  .check-note span { color: #36554b; }
  .filters {
    display: grid; grid-template-columns: 1.15fr 1fr; align-items: end; gap: .9rem 1.1rem;
    background: var(--paper); border: 1px solid var(--line); border-radius: .85rem; padding: 1rem;
  }
  .filter { min-width: 0; }
  .label { display: block; margin-bottom: .35rem; color: var(--muted); font-size: .875rem; font-weight: 650; }
  .choices { display: flex; flex-wrap: wrap; gap: .35rem; }
  .choices button, .clear {
    min-height: 2.75rem; border: 1px solid var(--line); border-radius: .5rem;
    background: #fff; color: var(--green); padding: .38rem .72rem; font-size: .9rem; font-weight: 650;
  }
  .choices button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
  .choices button[aria-pressed="false"]:hover, .clear:hover { background: #ebf4ee; }
  .search { display: flex; gap: .4rem; }
  .search input {
    min-width: 0; width: 100%; min-height: 2.75rem; padding: .4rem .7rem;
    border: 1px solid #b9cec2; border-radius: .5rem; color: #183730; background: #fff;
  }
  .clear { flex: none; }
  .count { align-self: end; margin: 0; padding: .44rem 0; color: var(--muted); font-size: .9rem; }
  .schedule { margin-top: 1.5rem; }
  .day + .day { margin-top: 1.45rem; }
  .day h2 { margin: 0 0 .55rem; font-size: 1.25rem; }
  .weekday { margin-left: .6rem; color: var(--muted); font-weight: 450; font-size: .9rem; }
  .table-box { background: #fff; border: 1px solid var(--line); border-radius: .75rem; }
  table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; font-size: .94rem; }
  th { background: #e8f0eb; color: #35554b; font-size: .875rem; white-space: nowrap; }
  th:first-child { border-start-start-radius: .7rem; }
  th:last-child { border-start-end-radius: .7rem; }
  :is(th, td) { padding: .68rem .8rem; }
  tbody tr:not(:last-child) td { border-bottom: 1px solid #e8eeea; }
  .time { font-variant-numeric: tabular-nums; white-space: nowrap; }
  .check-in { color: #134f3d; font-weight: 750; }
  .event { font-weight: 650; }
  .person { white-space: nowrap; }
  .bib { margin-left: .42rem; color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
  .class-cell, .group { color: var(--muted); }
  .conditional { color: #785216; }
  .cell-label { display: none; }
  .empty { padding: 1.4rem; border-radius: .75rem; border: 1px solid var(--line); background: #fff; color: var(--muted); }
  details { margin-top: 1.5rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: .75rem; background: #fff; }
  summary { cursor: pointer; font-weight: 700; }
  details p, details ul { margin: .5rem 0 0; }
  details ul { padding-left: 1.4rem; }
  .pending-line { font-size: .92rem; color: #405c52; }
  .foot { margin: 1.1rem 0 2rem; font-size: .82rem; color: var(--muted); }
  @media (max-width: 640px) {
    .wrap { width: calc(100% - 1.5rem); }
    .hero { padding: 1.65rem 0; }
    .filters { grid-template-columns: 1fr; gap: .7rem; padding: .72rem; }
    .count { padding: 0; }
    .check-note { gap: .2rem; margin: .85rem 0; }
    .schedule { margin-top: 1.05rem; }
    .table-box { background: transparent; border: 0; }
    table, tbody { display: block; }
    thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
    tbody { display: grid; gap: .5rem; }
    tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .2rem .5rem; border: 1px solid var(--line); border-radius: .7rem; background: #fff; padding: .7rem .75rem; }
    tbody tr td, tbody tr:not(:last-child) td { padding: 0; border: 0; }
    .event { grid-column: 1 / -1; grid-row: 1; font-size: 1.05rem; }
    .check-in { grid-row: 2; }
    .start { grid-row: 2; }
    .person { grid-row: 3; white-space: normal; }
    .class-cell { grid-row: 3; }
    .group { grid-column: 1 / -1; font-size: .9rem; }
    .group:empty { display: none; }
    .cell-label { display: inline; margin-right: .32rem; color: var(--muted); font-size: .875rem; font-weight: 450; }
  }
  @media print {
    .filters { display: none; }
    body { background: #fff; }
    .wrap { width: 100%; }
    .hero { padding: 0; background: #fff; color: #172d29; }
    .hero .school, .hero .place { color: #314941; }
    .check-note { margin: .6rem 0; }
    .schedule { margin-top: .6rem; }
    .day h2 { break-after: avoid; }
    tbody tr { break-inside: avoid; }
  }

.filters { display: flex; flex-direction: column; align-items: stretch; gap: 1rem; }
.hero .place { display: flex; flex-wrap: wrap; gap: .1rem .85rem; }
.hero .place span:last-child { white-space: nowrap; }
.search-panel { flex: 1; min-width: 0; }
.search-panel .label { margin-top: .6rem; }
.search input { font-size: 1rem; }
.filter-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .65rem; }
.filter-grid label { display: block; color: var(--muted); font-size: .86rem; font-weight: 650; }
.filter-grid select {
  display: block; width: 100%; min-height: 2.75rem; margin-top: .3rem; padding: .4rem .5rem;
  font: inherit; font-weight: 500; color: #234139; background: #fff;
  border: 1px solid #b9cec2; border-radius: .5rem;
}
select:focus-visible, a:focus-visible { outline: 3px solid #1e7861; outline-offset: 2px; }
.filter-footer { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.filter-footer .count { padding: 0; align-self: auto; }
a { color: #174c3d; font-weight: 650; }
.pager { align-items: center; justify-content: center; gap: .75rem; margin-top: 1rem; }
.pager button:disabled { opacity: .55; cursor: default; }
.directory section + section { margin-top: .7rem; }
.directory h3 { margin: .6rem 0 .35rem; font-size: .95rem; }
.class-links { display: flex; flex-wrap: wrap; gap: .4rem; }
.class-links a {
  text-decoration: none; border-radius: .5rem; border: 1px solid var(--line); padding: .32rem .53rem; font-size: .9rem;
}
#pending-count { color: var(--muted); margin-left: .35rem; font-size: .875rem; }
#source-notes li + li { margin-top: .4rem; }
@media (max-width: 640px) {
  .filters { gap: .7rem; }
  .filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .scope { margin-bottom: .7rem; }
}
@media print { .filters, .pager { display: none !important; } }
