:root {
  color-scheme: light;
  font: 16px/1.5 "PingFang HK", "Microsoft JhengHei", system-ui, sans-serif;
  color: #242941;
  background: #f6f7f9;
  --navy: #30355b;
  --ink: #242941;
  --muted: #576277;
  --line: #dce1e8;
  --teal: #245e57;
}
* { box-sizing: border-box }
[hidden] { display: none !important }
body { margin: 0 }
header { background: #fff; border-top: 4px solid var(--navy); border-bottom: 1px solid var(--line) }
.bar, main { width: min(100%, 780px); margin: auto; padding: 0 22px }
.bar, .topline, .date, .profile-header, .actions { display: flex; align-items: center; gap: 10px }
.bar { min-height: 60px }
.bar img { object-fit: contain }
.bar b { font-size: 1.08rem }
#sync { margin-left: auto; font-size: .82rem; color: var(--muted) }
main { padding-bottom: 50px }
.topline { margin: 16px 0; justify-content: space-between; min-height: 42px }
.date { margin-left: auto; font-size: .88rem; color: var(--muted); white-space: nowrap }
h1, h2, p { margin: 0 }
h1 { font-size: clamp(1.6rem, 4vw, 2rem); margin: 0 0 16px; line-height: 1.3 }
h2 { font-size: 1.32rem; line-height: 1.4 }
input, button { font: inherit; color: inherit; background: white; border: 1px solid #b9c1ce; border-radius: 7px; min-height: 44px; padding: 7px 12px }
button, summary { cursor: pointer }
button:disabled { opacity: .55; cursor: default }
:focus-visible { outline: 3px solid #4b70b6; outline-offset: 2px }
input[type="search"] { width: 100% }
.date input { width: 142px; min-height: 36px; padding: 4px 8px; font-variant-numeric: tabular-nums }
#back { padding: 0 8px 0 0; background: transparent; border: 0; color: var(--navy) }
#back::before { content: "‹"; font-size: 1.2rem; margin-right: 5px }
.entries { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 22px }
.entries button { display: flex; align-items: center; gap: 12px; min-height: 78px; text-align: left; padding: 12px 18px; font-size: 1.18rem; font-weight: 650; background: var(--navy); color: white; border: 0 }
.entries .symbol { font-size: 26px }
.entries button:last-child { background: var(--teal) }
.switches { display: flex; flex-wrap: wrap; gap: 4px; margin: 12px 0 16px }
.switches button { min-width: 38px; padding: 4px 10px; background: transparent; border-color: transparent; color: var(--muted) }
.switches button[aria-pressed="true"] { color: #fff; border-color: var(--navy); background: var(--navy) }
.sheet { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: white }
.sheet:empty, .muted:empty { display: none }
.section-title, .muted, small { color: var(--muted); font-size: .86rem }
.section-title { margin: 15px 0 6px; font-weight: 600 }
.muted { margin: 10px 0 }
.filter-strip { display: grid; grid-auto-columns: minmax(0,1fr); grid-auto-flow: column; gap: 7px; margin-top: 12px }
.filter-strip label { display: grid; grid-template-columns: 1fr auto; align-items: center; align-content: start; gap: 3px 6px; border: 1px solid #bdc6d1; border-radius: 8px; padding: 9px 12px; background: #fff; color: #455367; cursor:pointer; position: relative }
.filter-strip label:has(:checked) { background: #e5f1ee; color: #184f49; border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal) }
.filter-strip label:has(:focus-visible) { outline: 3px solid #4b70b6; outline-offset: 2px }
.filter-strip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor:pointer }
.filter-strip label > span:not(.symbol) { grid-column: 1 / -1; grid-row: 2; font-size: .91rem; font-weight: 600 }
.filter-strip strong { grid-column: 2; grid-row: 1; font-size: 1.35rem; line-height: 1.2; font-variant-numeric: tabular-nums }
.filter-strip .symbol { font-size: 19px }
.countline { display:flex; align-items:center; gap:12px }
.countline progress { flex: 1; max-width: 160px; height: 7px; border:0; border-radius:5px; appearance:none; background:var(--line); accent-color:var(--teal) }
.countline progress::-webkit-progress-bar { background:var(--line); border-radius:5px }
.countline progress::-webkit-progress-value { background:var(--teal); border-radius:5px }
.countline progress::-moz-progress-bar { background:var(--teal); border-radius:5px }
.activity, .row, .slot { display: flex; gap: 10px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line) }
.activity:last-child, .row:last-child, .slot:last-child { border-bottom: 0 }
.activity { width: 100%; padding: 10px 14px; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0 }
.activity:hover, .person:hover { background: #f2f5f9 }
.activity small { white-space: nowrap }
.row { padding: 4px 12px 4px 6px; min-height: 55px }
.person { text-align: left; border: 0; padding: 6px 8px; border-radius: 4px; flex: 1; min-width: 0 }
.person strong { font-size: 1.09rem; font-weight: 650 }
.person small { margin-left: 12px; white-space: nowrap }
.symbol { display:inline-block; position:relative; width:1em; height:1em; flex:none; pointer-events:none }
.symbol::before,.symbol::after { position:absolute; content:""; box-sizing:border-box }
.symbol.clock { border: .10em solid currentColor; border-radius: 50% }
.symbol.clock::before { left:42%; top:16%; width:31%; height:42%; border:solid currentColor; border-width:0 0 .11em .11em }
.symbol.flag::before { left:15%; top:7%; width:10%; height:86%; border-radius:.07em; background:currentColor }
.symbol.flag::after { left:24%; top:9%; width:64%; height:48%; background:currentColor; clip-path:polygon(0 0,100% 0,77% 52%,100% 100%,0 100%) }
.symbol.door::before { left:7%; top:5%; width:56%; height:90%; border:.11em solid currentColor; border-right:0 }
.symbol.door::after { left:30%; top:22%; width:68%; height:56%; background:currentColor; clip-path:polygon(0 39%,60% 39%,60% 0,100% 50%,60% 100%,60% 61%,0 61%) }
.symbol.list-icon::before { width:92%; height:72%; top:14%; left:4%; background:repeating-linear-gradient(to bottom,currentColor 0 16%,transparent 16% 41%) }
.symbol.minus { border:.1em solid currentColor; border-radius:50% }
.symbol.minus::before { top:43%; left:19%; width:62%; height:14%; background:currentColor }
.symbol.check::before { width:82%; height:45%; left:7%; top:13%; border:solid currentColor; border-width:0 0 .14em .14em; transform:rotate(-45deg) }
.symbol.cross::before, .symbol.cross::after {
  top:50%; left:50%; width:96%; border-top:.14em solid currentColor;
  transform:translate(-50%,-50%) rotate(45deg);
}
.symbol.cross::after { transform:translate(-50%,-50%) rotate(-45deg) }
.pending { --tone:#505d6f; --wash:#eef1f5 }
.attended { --tone:#19594d; --wash:#e4f3ec }
.departed { --tone:#235177; --wash:#e5f3ff }
.exception { --tone:#77451f; --wash:#fbefdf }
.status-chip { display:inline-flex; align-items:center; gap:6px; max-width:100%; border-radius:5px; padding:2px 7px; background:var(--wash); color:var(--tone); font-size:.8rem; line-height:1.5; overflow-wrap:anywhere }
.person .elsewhere { display:block; margin-top:3px; font-size:.85rem; color:var(--muted); overflow-wrap:anywhere }
.primary { background: var(--navy); border-color: var(--navy); color: white; font-weight: 600 }
.mark { min-width: 5em; text-align: center; color: var(--navy); border-color: #bec7d5 }
.mark.recorded { color: #19594d; border-color: #a5c8ba; background: #e4f3ec }
.empty { padding: 12px; color: var(--muted); font-size: .91rem }
#history { margin: 14px 0 0; font-size: .88rem; color: var(--muted) }
summary { width: fit-content; padding: 5px 0 }
dialog { color: var(--ink); width: min(92vw, 440px); border: 1px solid var(--line); border-radius: 12px; padding: 20px; max-height: 85dvh; overflow: auto }
dialog::backdrop { background: #20253e63 }
.profile-header, .actions { justify-content: space-between }
.where-now { display:flex; align-items:center; gap:10px; background:var(--wash); color:var(--tone); padding:10px 12px; margin-top:12px; border-radius:6px; font-weight:600; overflow-wrap:anywhere }
.where-now .symbol { font-size:19px }
.day-route { list-style:none; margin:2px 0 10px; padding:0 }
.route-stop { position:relative; display:grid; grid-template-columns:32px minmax(0,1fr); gap:12px; padding:6px 0 }
.route-stop:not(:last-child)::before { content:""; position:absolute; left:15px; top:35px; bottom:-9px; border-left:2px dotted #b6c0cb }
.route-marker { position:relative; display:grid; place-items:center; width:32px; height:32px; border-radius:50%; background:var(--wash); color:var(--tone); border:1px solid #c5cdd7 }
.latest .route-marker { background:var(--tone); color:white; border-color:var(--tone) }
.route-body { padding:5px 0 8px; min-width:0 }
.route-body h4 { margin:0; font-size:1rem; line-height:1.4 }
.route-body .slot { gap:8px; overflow-wrap:anywhere }
#schedule .route-body .slot { padding:4px 0 }
#schedule .slot { padding: 8px 0; font-size: .93rem }
.icon-only { display:inline-grid; place-items:center; min-width:32px; height:30px; padding:4px; flex:none }
.icon-only .symbol { font-size:18px }
.where-now:has(> .icon-only) { padding:0; background:transparent }
#profile-action { width: 100%; margin-top: 16px }
#history ol { margin: 4px 0; padding-left: 22px }
#detail { margin: 10px 0 18px }
.actions { justify-content: flex-end }
#round-picker { width: fit-content; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: white; margin-top: -6px }
#round-picker [aria-pressed="true"] { background: var(--teal); border-color: var(--teal) }
#day-status { margin-top: 12px; font-size: .88rem; color: var(--muted) }
.status-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px }
#message, #profile-error { background: #fce9df; color: #763c20; padding: 9px 12px; margin-top: 12px }
@media(max-width: 520px) {
  .bar, main { padding-left: 14px; padding-right: 14px }
  .switches { gap: 2px }
  .switches button { min-width: 35px; padding-inline: 8px }
  .person small { margin-left: 7px }
  .entries button { padding: 12px }
  .entries button { gap:8px; font-size:1.05rem }
  .entries .symbol { font-size:21px }
  .filter-strip label { padding:8px }
}

/* Sky and sunshine school-mascot theme. */
:root {
  --navy: #204d78;
  --ink: #153450;
  --muted: #4d6270;
  --line: #d8e7ef;
  --teal: #245f4e;
  --paper: #f5fbff;
  --sky-edge: #acd6ed;
  --sun-edge: #e1c56c;
  color: var(--ink);
  background: var(--paper);
}

body { min-block-size: 100dvh }
.site-header {
  border-top: 4px solid #327eb8;
  border-bottom-color: var(--line);
}
.bar, main { width: min(100%, 884px); padding-inline: clamp(16px, 4vw, 32px) }
.bar { min-height: 68px }
.brand { display: inline-flex; align-items: center; gap: 11px }
.brand b { letter-spacing: .07em }
#sync { font-weight: 600; white-space: nowrap }
#sync::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-inline-end: 6px;
  border-radius: 50%;
  background: var(--teal);
  content: "";
}
#sync[data-offline="true"]::before { background: #af5725 }

.topline { margin-block: 14px 18px }
.date { gap: 8px }
.date input { width: 138px; min-height: 44px; border-color: var(--sky-edge); border-radius: 10px }
#back { padding: 7px 13px; background: #e5f3ff; border: 1px solid transparent; border-radius: 10px }
#back:hover { background: #d4ecff }
h1 {
  color: var(--ink);
  margin-bottom: 14px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 750;
  letter-spacing: .015em;
}

.home-banner {
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: end;
  justify-items: center;
  min-height: clamp(175px, 30vw, 282px);
  padding: 12px clamp(8px, 3vw, 32px) 10px;
  border: 1px solid var(--sky-edge);
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 5% 105%, #ffecab 0%, transparent 53%),
    radial-gradient(ellipse at 98% 12%, #fff0ba 0%, transparent 43%),
    linear-gradient(118deg, #b5e7ff, #d9f3ff 53%, #a7ddf8);
  box-shadow: 0 12px 28px -19px #286d9290;
}
.home-banner h1 {
  align-self: center;
  margin: 0;
  color: #173f68;
  font-size: clamp(1.85rem, 6vw, 3.65rem);
  font-weight: 850;
  letter-spacing: .035em;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 2px 0 #ffffffb0;
}
.mascot {
  display: block;
  width: 100%;
  max-width: 158px;
  height: clamp(116px, 28vw, 248px);
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 6px 5px #27617f38);
}
.entries { gap: 12px; margin: 15px 0 23px }
.entries button {
  min-width: 0;
  min-height: 112px;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--sky-edge);
  border-radius: 18px;
  padding: 14px 17px;
  color: var(--ink);
  background: #e9f6ff;
  box-shadow: 0 3px 0 #d8edf9;
}
.entries button:last-child { background: #fff5cd; border-color: var(--sun-edge); box-shadow: 0 3px 0 #f0e3b2 }
.entries button:hover:not(:disabled) { border-color: #5a9bc3; background: #def2ff }
.entries button:last-child:hover:not(:disabled) { border-color: #b69131; background: #fff0b2 }
.entry-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 14px;
  background: #cfeaff;
  color: var(--navy);
}
.entries button:last-child .entry-icon { background: #ffe596; color: #674d15 }
.entries strong { display: block; font-size: 1.14rem; line-height: 1.4; font-weight: 720 }
.entries small { display: block; margin-top: 2px; line-height: 1.4; font-size: .8rem; font-weight: 500 }

.search-field { position: relative; display: block }
.search-field input {
  min-height: 50px;
  padding-inline-start: 43px;
  border-color: var(--sky-edge);
  border-radius: 14px;
}
.search-field input::placeholder { color: var(--muted) }
.search-field > .symbol {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: #467397;
  font-size: 17px;
}
.symbol.search-icon::before {
  inset: 5% auto auto 4%;
  width: 66%;
  height: 66%;
  border: .11em solid currentColor;
  border-radius: 50%;
}
.symbol.search-icon::after {
  width: .44em;
  height: .11em;
  top: 76%;
  left: 57%;
  border-radius: 1em;
  transform: rotate(44deg);
  background: currentColor;
}

#session h1, #catalog h1 { margin-bottom: 12px }
.session-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 13px;
}
.session-options:not(:has(.switches:not([hidden]))) { display: none }
.switches { gap: 3px; margin-block: 12px 15px }
#team-picker, #round-picker, #profile-range {
  width: fit-content;
  gap: 2px;
  padding: 3px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #e6f2fb;
}
.switches button {
  border-radius: 8px;
  color: #365b75;
  font-size: .91rem;
  font-weight: 650;
}
.switches button:hover:not([aria-pressed="true"]) { background: #d6ecfc }
.switches button[aria-pressed="true"], #round-picker [aria-pressed="true"] {
  color: white;
  border-color: var(--navy);
  background: var(--navy);
}
#round-picker { padding: 3px }
#round-picker span { font-size: .84em; white-space: nowrap }
#venue:not(:empty) { margin: 0 0 12px }

.filter-strip { margin-top: 13px; gap: 10px }
.filter-strip label {
  grid-template-columns: auto minmax(0,1fr) auto;
  align-content: center;
  gap: 8px;
  min-height: 62px;
  padding: 8px 13px;
  background: #fff;
  border-color: var(--line);
  border-radius: 15px;
  color: #395970;
}
.filter-strip label:has(:checked) {
  background: #e2f3ff;
  color: var(--ink);
  border-color: #6ea7cb;
  box-shadow: inset 0 0 0 1px #6ea7cb;
}
.filter-strip label > span:not(.symbol) {
  grid-column: 2;
  grid-row: 1;
  font-size: .87rem;
  line-height: 1.3;
}
.filter-strip strong { grid-column: 3; min-width: 1.25ch; font-size: 1.28rem }
.filter-strip .symbol { font-size: 16px }
.countline { justify-content: space-between; min-height: 0 }
.countline .muted { font-weight: 600; margin-block: 11px }
.countline progress {
  max-width: 175px;
  height: 6px;
  accent-color: var(--navy);
}
.countline progress::-webkit-progress-value { background: var(--navy) }
.countline progress::-moz-progress-bar { background: var(--navy) }

.sheet { border-radius: 18px; box-shadow: 0 4px 0 #e3f0f8 }
.row { min-height: 60px; padding: 5px 13px 5px 7px }
.row:focus-within { background: #f1f9ff }
.person { min-height: 46px; border-radius: 8px }
.person strong { font-size: 1.07rem; font-weight: 720 }
.person .elsewhere { color: #315c80 }
.person:hover, .activity:hover { background: #ebf6ff }
.activity { min-height: 49px; padding-inline: 15px }
.activity > span { font-weight: 620 }
.activity > small { color: var(--muted); font-variant-numeric: tabular-nums }
.activity:focus-visible, .person:focus-visible { outline-offset: -3px }
#activity-list .section-title { margin-block: 20px 6px; color: #3c6382 }
.mark, .primary { border-radius: 12px; font-weight: 650 }
.mark { white-space: nowrap; background: #e7f4ff; border-color: #b7d8ee }
.mark:not(:disabled):hover { background: #d4edff }
.mark.recorded { color: #255b49; background: #eaf4ee; border-color: #c5decf }
.mark.recorded:hover { background: #dfeedf }

dialog {
  width: min(calc(100vw - 28px), 486px);
  max-height: 86dvh;
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 20px 70px #152d444d;
}
dialog::backdrop { background: #11273e70 }
.profile-header { gap: 14px; padding: 11px 12px; border: 1px solid #e6d295; border-radius: 14px; background: #fff6d7 }
.profile-header h2 { font-weight: 750; font-size: 1.55rem }
#close-profile { color: var(--navy); background: #fffdf4; border-color: #ddc77e; border-radius: 10px }
#profile-range { margin: 14px 0 }
.route-stop:not(:last-child)::before { border-left: 2px dashed #aacbdc }
.route-marker { border-color: #bdd6e4 }
.route-body h4 { color: var(--ink) }
.where-now { border-radius: 11px }
.status-chip { border-radius: 8px }
summary { color: var(--navy); font-weight: 600 }
#message, #profile-error { border-radius: 10px }

@media (max-width: 520px) {
  .bar { min-height: 59px }
  .home-banner { min-height: 164px; padding-inline: 7px; border-radius: 20px }
  .home-banner h1 { font-size: clamp(1.65rem, 6.8vw, 2.12rem) }
  .mascot { height: clamp(112px, 31vw, 163px) }
  .entries { gap: 9px }
  .entries button { align-items: flex-start; flex-direction: column; gap: 7px; padding: 12px }
  .entry-icon { width: 36px; height: 36px; border-radius: 9px }
  .entries strong { font-size: 1rem }
  .entries small { font-size: .75rem }
  .filter-strip { gap: 7px }
  .filter-strip label { min-height: 60px; gap: 5px; padding-inline: 8px }
  .filter-strip .symbol { font-size: 13px }
  .filter-strip strong { font-size: 1.12rem }
  .filter-strip label > span:not(.symbol) { font-size: .8rem }
  dialog { padding: 17px }
}
