/* Hallmark · macrostructure: Index-First · tone: playful · theme: Hum · anchor hue: pear/cyan/coral · nav: N7 · footer: Ft5 */
/* Hallmark · pre-emit critique: P4 H5 E4 S5 R4 V4 */
@import url('tokens.css');
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
body { background: var(--color-paper); color: var(--color-ink); font: var(--text-base)/1.6 var(--font-body); padding-bottom: env(safe-area-inset-bottom); }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: var(--color-transparent); }
button, .btn, .back-link, summary { min-height: 44px; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--font-display); font-style: normal; min-width: 0; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: clip; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; z-index: 20; top: -100px; padding: var(--space-md); background: var(--color-ink); color: var(--color-paper); }
.skip:focus { top: 0; }
.masthead { max-width: 1080px; margin: auto; padding: 18px max(20px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--color-ink); gap: var(--space-sm); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1.3; white-space: nowrap; }
.brand small { display: block; font: 8px/1.6 var(--font-number); letter-spacing: .12em; }
.brand-symbol { display: flex; align-items: flex-end; gap: 3px; height: 34px; transform: rotate(-9deg); }
.brand-symbol i { display: block; width: 8px; height: 23px; background: var(--color-accent); border: 1.5px solid var(--color-ink); border-radius: 3px; }
.brand-symbol i:nth-child(2) { height: 31px; background: var(--color-accent-3); }
.brand-symbol i:nth-child(3) { height: 26px; background: var(--color-accent-2); }
.header-label { font: 9px var(--font-number); letter-spacing: .08em; }
.shell { width: min(100%, 568px); margin: auto; padding: 32px max(20px, env(safe-area-inset-left)) 0; }
.intro { margin-bottom: var(--space-lg); }
.eyebrow { display: block; font: bold 10px var(--font-number); letter-spacing: .15em; margin-bottom: var(--space-sm); }
.intro h1 { font-size: clamp(20px, 4vw, 28px); font-weight: 800; line-height: 1.55; margin-bottom: 14px; }
.intro p { font-size: 15px; }
.highlight { background: var(--color-accent); padding: 1px 4px; font-weight: 700; }
.search-panel { padding: var(--space-lg); background: var(--color-surface); border: 1px solid var(--color-rule); border-radius: var(--radius-card); box-shadow: 0 8px 0 var(--color-shadow); }
.panel-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.step { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; background: var(--color-accent-2); border-radius: 50%; font: bold 19px var(--font-number); }
.panel-heading h2 { font-size: 19px; }
.panel-heading p { font-size: 10px; color: var(--color-muted); }
.team-count { margin-left: auto; font: bold 24px/1 var(--font-number); text-align: center; }
.team-count small { display: block; font: 9px/1.6 var(--font-body); }
.filter-wrap { display: flex; align-items: center; background: var(--color-paper); border: 1px solid var(--color-rule); border-radius: var(--radius-input); margin-bottom: 16px; padding: 0 12px; gap: 8px; }
.filter-wrap svg { width: 18px; flex: 0 0 18px; }
svg { stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.filter-wrap input { width: 100%; min-width: 0; height: 46px; padding: 0; font-size: 13px; background: var(--color-transparent); border: 0; }
input::placeholder { color: var(--color-muted); }
.list-label { display: flex; justify-content: space-between; font-size: 12px; font-weight: bold; margin-bottom: 7px; }
.list-label span { color: var(--color-muted); font-weight: normal; font-size: 11px; }
#team-list { display: block; width: 100%; height: 46px; padding: 0 10px; background: var(--color-paper); border: 1px solid var(--color-rule); border-radius: var(--radius-input); font-size: 15px; }
#team-list option { padding: 9px 10px; min-height: 39px; }
#team-list option:checked { background: var(--color-ink); color: var(--color-paper); }
#team-list option:disabled { color: var(--color-muted); }
#team-list option:checked:disabled { color: var(--color-paper); }
.sort-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; justify-content: space-between; margin-top: 12px; }
.sort-row > span { font-size: 11px; color: var(--color-muted); }
.sort-buttons { display: flex; gap: 5px; }
.sort-button { display: inline-flex; align-items: center; gap: 8px; background: var(--color-surface); border: 1px solid var(--color-rule); border-radius: var(--radius-pill); padding: 0 12px; font-size: 11px; font-weight: bold; white-space: nowrap; }
.sort-button[aria-pressed="true"] { background: var(--color-accent-2); border-color: var(--color-cyan-deep); }
.sort-button span { font-size: 13px; }
.selection-hint { min-height: 24px; margin: 16px 0 12px; color: var(--color-muted); font-size: 11px; overflow-wrap: anywhere; }
.selection-hint.error { color: var(--color-error); }
.btn { --btn-face: var(--color-accent); --btn-ink: var(--color-ink); --btn-edge: var(--color-accent-deep); --btn-cast: var(--color-shadow); --btn-line: var(--color-accent-deep); display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .8rem 1.4rem; font-weight: 600; border: 0; border-radius: var(--radius-pill); color: var(--btn-ink); background: var(--btn-face); cursor: pointer; position: relative; isolation: isolate; box-shadow: 0 4px 0 0 var(--btn-edge), 0 6px 12px -3px var(--btn-cast); transform: translateY(0); transition: transform 140ms cubic-bezier(.2,.7,.3,1), box-shadow 140ms cubic-bezier(.2,.7,.3,1), background-color 160ms; text-decoration: none; white-space: nowrap; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 0 var(--btn-edge), 0 2px 6px -2px var(--btn-cast); transition-duration: 70ms; }
.btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; transform: none; box-shadow: 0 4px 0 0 var(--btn-edge); }
.search-button { width: 100%; min-height: 55px; justify-content: space-between; padding-inline: 24px; font-size: 17px; }
.search-note { display: flex; align-items: center; gap: 16px; margin: 27px 0 20px; }
.note-number { font: bold 17px var(--font-number); white-space: nowrap; }
.search-note p { font-size: 11px; color: var(--color-muted); }
.data-status { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--color-muted); }
.status-dot { width: 6px; height: 6px; background: var(--color-cyan-deep); border-radius: 50%; flex: 0 0 6px; }
.footer { max-width: 760px; margin: 32px auto 0; padding: 28px 20px 32px; border-top: 1px solid var(--color-rule); }
.footer p { font-family: var(--font-display); font-size: 21px; font-weight: 700; margin-bottom: 10px; }
.footer > span { font-size: 10px; color: var(--color-muted); }
.result-page .shell { width: min(100%, 800px); padding-top: 12px; }
.back-link { display: inline-flex; align-items: center; text-decoration: none; font-size: 12px; font-weight: bold; white-space: nowrap; }
.event-title { color: var(--color-muted); font-size: 11px; margin: 9px 0 14px; overflow-wrap: anywhere; }
.team-header { display: flex; align-items: center; gap: 18px; padding: 20px 18px; background: var(--color-accent-2); color: var(--color-ink); border: 1px solid var(--color-cyan-deep); border-radius: var(--radius-card); }
.team-number { flex: 0 0 68px; }
.team-number small { font: bold 9px var(--font-number); letter-spacing: .08em; }
.team-number strong { display: block; font: 800 49px/1.1 var(--font-number); }
.team-header > div { min-width: 0; }
.team-header .eyebrow { font-size: 8px; letter-spacing: .08em; }
.team-header h1 { font-size: 20px; line-height: 1.4; }
.team-header p { font-size: 11px; margin-top: 5px; }
.update-toolbar { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: 12px; flex-wrap: wrap; }
.update-toolbar .notice { width: 100%; order: 3; }
.refresh-button { background: var(--color-transparent); border: 1px solid var(--color-rule); border-radius: var(--radius-pill); padding: 0 15px; font-size: 12px; white-space: nowrap; }
.refresh-button:active, .sort-button:active, .score-button:active { background: var(--color-paper-2); color: var(--color-ink); }
.refresh-status { font-size: 10px; color: var(--color-muted); margin: 6px 0 24px; min-height: 16px; }
.refresh-status.error { color: var(--color-error); }
.schedule-section { margin-bottom: 24px; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.section-heading h2 { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.section-marker { color: var(--color-cyan-deep); font: bold 12px var(--font-number); }
.section-tag { font-size: 9px; padding: 4px 8px; background: var(--color-mint); color: var(--color-ink); border-radius: var(--radius-pill); }
.table-wrap { border: 1px solid var(--color-rule); border-radius: 15px; overflow: clip; background: var(--color-surface); }
.matches { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11px; line-height: 1.5; }
.matches th, .matches td { padding: 10px 4px; vertical-align: middle; overflow-wrap: anywhere; }
.matches thead { background: var(--color-ink); color: var(--color-paper); }
.matches thead th { font-size: 9px; font-weight: 500; padding-block: 10px; }
.matches th:nth-child(1) { width: 14%; }
.matches th:nth-child(2) { width: 18%; }
.matches th:nth-child(3) { width: 13%; }
.matches th:nth-child(4) { width: 38%; }
.matches th:nth-child(5) { width: 17%; }
.matches tbody th { font-weight: 700; text-align: center; }
.matches tbody tr + tr { border-top: 1px solid var(--color-rule); }
.time { font: 10px/1.5 var(--font-number); text-align: center; }
.time span { display: block; }
.time-separator { font-size: 8px; }
.court { text-align: center; }
.court strong { font: 800 24px var(--font-number); }
.opponents > div { display: flex; align-items: baseline; gap: 4px; padding-block: 4px; }
.opponents > .opponent-empty { min-height: 24px; }
.opponents > div + div { border-top: 1px dashed var(--color-rule); }
.opponent-no { font: bold 10px var(--font-number); min-width: 16px; flex-shrink: 0; }
.opponents > div > span:last-child { min-width: 0; }
.score-button { display: inline-flex; min-height: 44px; width: 100%; align-items: center; justify-content: center; flex-direction: column; padding: 4px 1px; border: 1px solid var(--color-rule); border-radius: 9px; text-decoration: none; font-size: 10px; white-space: nowrap; }
.score-button svg { width: 14px; height: 14px; }
.score-unset { color: var(--color-muted); font-size: 9px; }
.advancement { display: flex; align-items: center; gap: 12px; padding: 17px 16px; background: var(--color-accent); color: var(--color-ink); border: 1px solid var(--color-accent-deep); border-radius: 15px; margin-bottom: 12px; }
.advancement h2 { font-size: clamp(15px, 3vw, 19px); }
.advancement .eyebrow { font-size: 8px; margin-bottom: 3px; }
.advancement-icon { font: bold 31px var(--font-number); }
.lower .advancement { background: var(--color-coral-tint); border-color: var(--color-accent-3); }
.table-note { font-size: 10px; color: var(--color-muted); margin: 8px 4px 0; }
.pending { display: flex; gap: 12px; padding: 20px 16px; border: 1px dashed var(--color-cyan-deep); border-radius: 15px; margin-bottom: 20px; }
.pending-mark { font-size: 26px; }
.pending h2 { font-size: 14px; margin-bottom: 6px; }
.pending p { font-size: 11px; color: var(--color-muted); }
.notice { background: var(--color-warning-bg); color: var(--color-warning); padding: 12px; border-radius: 9px; font-size: 12px; margin: 12px 0; overflow-wrap: anywhere; }
.data-details { font-size: 11px; color: var(--color-muted); margin-top: 24px; border-top: 1px solid var(--color-rule); }
.data-details summary { display: flex; align-items: center; cursor: pointer; font-weight: bold; }
.data-details summary::before { content: '+'; margin-right: 8px; }
.data-details[open] summary::before { content: '−'; }
.data-details p { margin-bottom: 12px; }
.error-panel { padding: 36px 0; }
.error-panel h1 { font-size: 24px; margin-bottom: 12px; }
.error-panel p { font-size: 14px; margin-bottom: 24px; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 0 var(--btn-edge), 0 12px 22px -4px var(--btn-cast); }
  .score-button:hover, .refresh-button:hover, .sort-button:hover { background: var(--color-accent-2); color: var(--color-ink); }
  .brand:hover .brand-symbol { transform: rotate(0deg); }
}
@media (min-width: 40rem) {
  .masthead { padding: 22px 32px; }
  .header-label { font-size: 11px; }
  .shell { padding-top: 44px; }
  .search-panel { padding: 28px; }
  .matches { font-size: 14px; }
  .matches th, .matches td { padding: 16px 12px; }
  .matches thead th { font-size: 12px; }
  .time { font-size: 13px; }
  .time-separator { font-size: 10px; }
  .court strong { font-size: 30px; }
  .score-button { flex-direction: row; gap: 4px; font-size: 12px; }
  .team-header h1 { font-size: 27px; }
  .team-header { padding: 24px; }
  .team-number { flex-basis: 86px; }
  .team-number strong { font-size: 60px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } .btn:hover, .btn:active { transform: none; } }

.court-map-section{margin-top:32px;padding:20px;border:1px solid #dad8c9;border-radius:20px;background:#fffdf5;min-width:0}
.map-description,.map-legend{font-size:12px;line-height:1.7;color:#555;margin:12px 0}
.map-targets{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}.map-targets span{font-size:12px;font-weight:700;padding:6px 10px;border-radius:99px;background:#fff0ed;color:#a32128}
.map-controls{display:flex;gap:6px;flex-wrap:wrap;margin:16px 0 8px}.map-controls button{min-height:44px;padding:8px 12px;border:1px solid #dad8c9;border-radius:10px;background:white;color:#333;font:inherit;font-size:12px;cursor:pointer}
.map-scroll{overflow:auto;max-width:100%;border:1px solid #e4e2d5;border-radius:12px;background:#f3f3e8;padding:8px}.court-map-svg{display:block;width:100%;height:auto}.map-zoom-2 .court-map-svg{width:180%;max-width:none}.map-zoom-3 .court-map-svg{width:270%;max-width:none}
.map-court rect{fill:#fffef8;stroke:#a1b5aa;stroke-width:1.5}.map-court text{font-size:20px;font-weight:800;fill:#254938;paint-order:stroke;stroke:#fffef8;stroke-width:4px}.court-line{stroke:#cad8cd;stroke-width:1}.map-court.is-target rect{fill:#ed4949;stroke:#a71922;stroke-width:2.5;animation:court-pulse 1.8s ease-in-out infinite}.map-court.is-target text{fill:white;stroke:#c92b35}.is-target .court-line{stroke:#ffabab}.facility-icon,.map-facility circle{fill:none;stroke:#4f6156;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.map-facility text{font-size:13px;font-weight:700;fill:#334b3b}.map-red-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:#ed4949;margin-right:5px}
@keyframes court-pulse{0%,100%{fill:#ed4949}50%{fill:#ffb2ac}}
@media(prefers-reduced-motion:reduce){.map-court.is-target rect{animation:none}}
@media(max-width:400px){.court-map-section{padding:12px}}
