:root {
  color-scheme: light;
  --navy-950: #030b15;
  --navy-900: #061527;
  --navy-800: #0a223b;
  --navy-700: #0d3155;
  --blue: #0077ff;
  --blue-bright: #2c92ff;
  --blue-action: #0065d9;
  --blue-text: #0069df;
  --ice: #e7f6ff;
  --silver: #a9bfd0;
  --white: #ffffff;
  --ink: #10253b;
  --muted: #5b7185;
  --line: #d8e5ee;
  --surface: #ffffff;
  --surface-soft: #f3f8fb;
  --shadow: 0 18px 55px rgba(3, 18, 35, .14);
  --page: #edf5fa;
  --page-grid: rgba(0,119,255,.045);
  --page-glow: rgba(0,119,255,.12);
  --sticky: rgba(255,255,255,.94);
  --danger-ink: #9d243b;
  --danger-bg: #fff0f2;
  --goalie-ink: #684c00;
  --goalie-bg: #fff8d8;
}

[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf7ff;
  --muted: #a9bdcd;
  --line: #29445b;
  --surface: #0b2034;
  --surface-soft: #102b45;
  --shadow: 0 18px 55px rgba(0, 0, 0, .32);
  --page: #06121f;
  --page-grid: rgba(44,146,255,.055);
  --page-glow: rgba(0,119,255,.16);
  --sticky: rgba(11,32,52,.94);
  --danger-ink: #ff9aaa;
  --danger-bg: rgba(201,45,61,.17);
  --goalie-ink: #ffdd76;
  --goalie-bg: rgba(244,197,66,.13);
  --blue-text: #68b6ff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(120deg, var(--page-grid) 1px, transparent 1px) 0 0 / 34px 34px,
    radial-gradient(circle at 20% -10%, var(--page-glow), transparent 35rem),
    var(--page);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}
button, select, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid rgba(0,119,255,.35); outline-offset: 3px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--white); color: var(--navy-900); padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

.site-header {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(0,119,255,.14), transparent 42%),
    repeating-linear-gradient(115deg, transparent 0 54px, rgba(255,255,255,.025) 55px 56px),
    var(--navy-900);
  border-bottom: 4px solid var(--blue);
}
.site-header::after {
  content: "";
  position: absolute;
  width: 480px;
  height: 480px;
  border: 60px solid rgba(0,119,255,.07);
  border-radius: 50%;
  right: -220px;
  top: -290px;
}
.header-inner { position: relative; z-index: 1; width: min(1160px, calc(100% - 32px)); margin: auto; min-height: 146px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.identity { display: flex; align-items: center; gap: 20px; }
.identity img { width: 88px; height: 88px; object-fit: contain; border-radius: 50%; background: var(--white); box-shadow: 0 0 0 5px rgba(255,255,255,.08), 0 0 28px rgba(0,119,255,.3); }
.eyebrow { margin: 0 0 4px; color: var(--silver); font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow.blue { color: var(--blue-text); }
h1, h2, h3 { margin: 0; line-height: 1.06; }
h1 { font-family: "Arial Black", "Segoe UI Black", Impact, sans-serif; font-size: clamp(2.25rem, 5.2vw, 3.75rem); letter-spacing: -.035em; text-transform: uppercase; font-weight: 900; }
h2 { font-size: clamp(1.35rem, 4vw, 2rem); letter-spacing: -.02em; }
.season { margin: 6px 0 0; color: #c8d9e7; font-size: .95rem; }
.header-status { display: grid; grid-template-columns: auto auto; column-gap: 9px; align-items: center; min-width: 190px; padding: 13px 15px; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: rgba(3,11,21,.35); }
.header-status span:nth-child(2) { font-size: .86rem; font-weight: 700; }
.header-status small { grid-column: 2; color: var(--silver); font-size: .73rem; }
.pulse { width: 9px; height: 9px; background: var(--blue-bright); border-radius: 50%; box-shadow: 0 0 0 5px rgba(44,146,255,.13); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.utility-button { min-width: 46px; min-height: 47px; padding: 0 13px; display: inline-flex; align-items: center; justify-content:center; gap: 8px; border: 1px solid rgba(255,255,255,.2); border-radius: 12px; color: var(--white); background: rgba(3,11,21,.42); cursor: pointer; font-weight: 800; font-size: .86rem; }
.utility-button:hover { background: rgba(0,119,255,.25); border-color: rgba(44,146,255,.65); }
.theme-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--navy-900); background: var(--blue-bright); font-size: .9rem; }

main { width: min(1080px, calc(100% - 32px)); margin: -1px auto 70px; }
.view-panel { padding-top: 22px; }

.control-panel, .schedule-section, .all-intro, .all-filters, .journey-wrap, .schedule-note {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  box-shadow: 0 10px 35px rgba(3,18,35,.07);
  border-radius: 18px;
}
.control-panel { padding: 22px; }
.builder-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.builder-heading h2 { font-size: 1.35rem; }
.builder-heading p, .all-intro p { color: var(--muted); margin: 5px 0 0; }
.division-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 18px; }
.division-button { min-height: 66px; padding: 8px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: var(--surface-soft); cursor: pointer; font-weight: 900; font-size: 1.05rem; }
.division-button small { display: block; margin-top: 2px; color: var(--muted); font-size: .68rem; font-weight: 600; }
.division-button.active { color: var(--white); background: linear-gradient(140deg, var(--blue-action), #0053b4); border-color: var(--blue); box-shadow: 0 8px 20px rgba(0,119,255,.25); }
.division-button.active small { color: #d6eaff; }
.selection-summary { margin: 12px 0 0; color: var(--muted); font-size: .84rem; font-weight: 750; }
.refine-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line); }
.field { display: grid; gap: 7px; }
.field > span { color: var(--ink); font-size: .85rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.field em { color:var(--muted);font-style:normal;font-weight:600;text-transform:none; }
select, input[type="search"], .field input { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--surface-soft); }
.refine-grid.three { grid-template-columns:1fr 1fr 1.15fr; }
.unified-filters { grid-template-columns: 1fr 1.1fr 1.1fr 1.1fr; align-items: end; }
.unified-filters .search-field { grid-column: 1 / -1; }
.goalie-toggle { min-height: 72px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); cursor: pointer; }
.unified-filters .goalie-toggle { min-height: 48px; padding: 8px 13px; }
.goalie-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.switch { width: 46px; height: 26px; flex: 0 0 auto; border-radius: 999px; background: #c4d3df; position: relative; transition: .2s ease; }
.switch::after { content: ""; position: absolute; width: 20px; height: 20px; top: 3px; left: 3px; border-radius: 50%; background: var(--white); box-shadow: 0 2px 7px rgba(3,18,35,.22); transition: .2s ease; }
.goalie-toggle input:checked + .switch { background: var(--blue-action); }
.goalie-toggle input:checked + .switch::after { transform: translateX(20px); }
.goalie-toggle:has(input:focus-visible) { outline:3px solid rgba(0,119,255,.42);outline-offset:3px; }
.goalie-toggle strong, .goalie-toggle small { display: block; }
.goalie-toggle strong { font-size: .9rem; }
.goalie-toggle small { color: var(--muted); font-size: .72rem; margin-top: 2px; }

.next-session { margin-top: 16px; min-height: 154px; padding: 21px 24px; position: relative; overflow: hidden; color: var(--white); border-radius: 18px; background: linear-gradient(125deg, var(--navy-900), var(--navy-700)); box-shadow: var(--shadow); }
.next-session::after { content:""; position:absolute; top:-72px; right:-35px; width:220px; height:220px; border-radius:50%; border:34px solid rgba(0,119,255,.11); }
.next-label { color: var(--blue-bright); font-size: .75rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.next-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 82px 1fr auto; gap: 18px; align-items: center; margin-top: 14px; }
.next-date { text-align: center; padding-right: 18px; border-right: 1px solid rgba(255,255,255,.17); }
.next-date strong, .next-date span { display: block; }
.next-date strong { font-family: Impact, sans-serif; font-size: 3rem; line-height: .9; font-weight: 400; }
.next-date span { margin-top: 7px; color: var(--silver); font-size: .74rem; font-weight: 800; letter-spacing: .12em; }
.next-copy h2 { font-size: clamp(1.35rem, 4vw, 2.2rem); }
.next-copy p { margin: 7px 0 0; color: #c9dae7; }
.next-venue { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.venue-pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 999px; color: var(--white); background: rgba(255,255,255,.09); font-size: .78rem; }
.map-link { color: var(--blue-text); font-size: .78rem; font-weight: 800; text-decoration: none; }

.journey-wrap { margin-top: 16px; padding: 22px 24px; }
.section-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.count-badge { display: inline-flex; padding: 7px 10px; color: var(--blue-text); background: rgba(0,119,255,.08); border-radius: 999px; font-size: .75rem; font-weight: 900; white-space: nowrap; }
.journey { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 22px; }
.journey::before { content:""; position:absolute; height:3px; left:7%; right:7%; top:15px; background: var(--line); }
.journey-step { position: relative; z-index: 1; text-align: center; color: var(--muted); font-size: .74rem; }
.journey-dot { width: 31px; height: 31px; margin: 0 auto 8px; display:grid; place-items:center; border: 4px solid var(--surface); border-radius: 50%; color: var(--white); background: var(--navy-800); box-shadow: 0 0 0 2px var(--line); font-size: .68rem; font-weight: 900; }
.journey-step.has-events .journey-dot { background: var(--blue-action); box-shadow: 0 0 0 2px rgba(0,119,255,.3); }
.journey-step strong { display: block; color: var(--ink); font-size: .78rem; }
.journey-step span { display: block; margin-top: 2px; }

.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 28px; }
.button { min-height: 48px; padding: 0 17px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--surface); cursor: pointer; font-weight: 800; }
.button.primary { color: var(--white); background: var(--blue-action); border-color: var(--blue-action); box-shadow: 0 8px 20px rgba(0,119,255,.22); }
.button.ghost { color: var(--blue-text); background: transparent; border-color: rgba(0,119,255,.35); }
.button:hover, .division-button:hover { transform: translateY(-1px); }
.export-menu { position: relative; }
.export-menu summary { display: flex; align-items: center; list-style: none; user-select: none; }
.export-menu summary::-webkit-details-marker { display: none; }
.export-menu summary::after { content: "▾"; margin-left: 9px; color: var(--blue-text); }
.export-menu[open] summary::after { transform: rotate(180deg); }
.export-menu-panel { position: absolute; z-index: 8; top: calc(100% + 7px); left: 0; width: 190px; padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.export-menu-panel a { min-height: 40px; display: grid; place-items: center; border-radius: 8px; color: var(--blue-text); background: var(--surface-soft); font-weight: 900; text-decoration: none; }
.export-menu-panel a:hover { background: var(--ice); }
[data-theme="dark"] .export-menu-panel a:hover { background: var(--navy-700); }

.schedule-section { padding: 24px; }
.text-button { border: 0; color: var(--blue-text); background: transparent; cursor: pointer; font-weight: 800; }
.schedule-list { margin-top: 19px; }
.day-group + .day-group { margin-top: 28px; }
.day-heading { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; color: var(--ink); background: var(--sticky); backdrop-filter: blur(8px); border-bottom: 2px solid var(--blue); }
.day-heading strong { font-size: 1rem; }
.day-heading span { color: var(--muted); font-size: .75rem; font-weight: 700; }
.event-card { display: grid; grid-template-columns: 92px 1fr auto; gap: 16px; align-items: center; min-height: 92px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.event-time { color: var(--ink); font-size: .9rem; font-weight: 900; line-height: 1.2; }
.event-time small { display: block; margin-top: 5px; color: var(--muted); font-size: .7rem; font-weight: 600; }
.event-copy h3 { font-size: 1rem; }
.event-copy p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.event-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--navy-700); background: var(--surface-soft); font-size: .75rem; line-height: 1.2; font-weight: 900; letter-spacing: .045em; text-transform: uppercase; }
.tag.type-Selections, .tag.type-Selection, .tag.status { color: #861d35; background: #ffe8ed; border-color: #efb2bf; }
.tag.type-Goalie { color: #614700; background: #fff3b8; border-color: #e0bd50; }
[data-theme="dark"] .tag { color: #f4f9ff; background: #1b3d59; border-color: #416783; }
[data-theme="dark"] .tag.type-Pathway,
[data-theme="dark"] .tag.type-Skills,
[data-theme="dark"] .tag.type-Evaluation { color: #eaf7ff; background: #155581; border-color: #4ba9e7; }
[data-theme="dark"] .tag.type-Practice,
[data-theme="dark"] .tag.type-Scrimmage { color: #e6fff0; background: #17523a; border-color: #4ca87c; }
[data-theme="dark"] .tag.type-Selections,
[data-theme="dark"] .tag.type-Selection,
[data-theme="dark"] .tag.status { color: #fff5f7; background: #7f263a; border-color: #e46b82; }
[data-theme="dark"] .tag.type-Goalie { color: #fff4b8; background: #56420d; border-color: #c89b26; }
.event-actions { display: flex; align-items: center; gap: 5px; }
.mini-button { min-height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--blue-text); background: var(--surface); cursor: pointer; font-size: .78rem; font-weight: 900; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; }
.empty { padding: 38px 20px; text-align: center; color: var(--muted); background: var(--surface-soft); border-radius: 14px; }
.empty strong { display:block; color: var(--ink); margin-bottom: 5px; }
.empty.dark { color:#c9dae7;background:rgba(255,255,255,.07); }
.empty.dark strong { color:#fff; }
.complete-state { display:flex;flex-direction:column;gap:5px;margin-top:22px;font-size:1.05rem; }
.complete-state span { color:#c9dae7; }

.all-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; }
.all-filters { display: grid; grid-template-columns: .7fr 1fr 1fr 1.3fr; gap: 12px; margin-top: 15px; padding: 18px; }
.filter-actions { grid-column:1/-1;display:flex;justify-content:flex-end;gap:16px;margin-top:14px;padding-top:14px;border-top:1px solid var(--line); }
.master-count { margin: 28px 0 0; }
#all-view > .schedule-list { padding: 0 24px 24px; background: var(--surface); border: 1px solid rgba(10,34,59,.08); border-radius: 18px; box-shadow: 0 10px 35px rgba(3,18,35,.07); }
.schedule-note { margin-top: 20px; padding: 18px 20px; border-left: 4px solid var(--blue); }
.schedule-note strong { color: var(--ink); }
.schedule-note p { margin: 5px 0 0; color: var(--muted); }
.schedule-note details { margin-top:13px;padding-top:12px;border-top:1px solid var(--line); }
.schedule-note summary { color:var(--blue-text);font-weight:800;cursor:pointer; }
.schedule-note li { margin:7px 0;color:var(--muted); }
.schedule-note a { color:var(--blue-text); }
.status-ok { color:#087a52;font-weight:900; }
[data-theme="dark"] .status-ok { color:#58d6a6; }

.family-players { display:grid;gap:12px;margin:18px 0; }
.family-player { display:grid;grid-template-columns:1.1fr .65fr 1fr 1fr auto auto;align-items:end;gap:10px;margin:0;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-soft); }
.family-player legend { padding:0 7px;color:var(--blue-text);font-weight:900; }
.family-player .check { display:flex;align-items:center;gap:7px;min-height:48px;font-size:.84rem;font-weight:800; }
.conflict-alert { display:flex;flex-direction:column;gap:4px;margin-top:16px;padding:16px 18px;border:1px solid #ec9f33;border-left:5px solid #ec9f33;border-radius:12px;color:var(--ink);background:#fff6dd; }
[data-theme="dark"] .conflict-alert { background:#3a2c0c; }
.tag.player { color:#fff;background:#29527a;border-color:#4c7fac; }
[data-theme="dark"] .tag.player { color:#fff;background:#236188;border-color:#63abd6; }

dialog { width:min(420px,calc(100% - 30px));padding:26px;border:1px solid var(--line);border-radius:18px;color:var(--ink);background:var(--surface);box-shadow:var(--shadow);text-align:center; }
dialog::backdrop { background:rgba(3,11,21,.7);backdrop-filter:blur(4px); }
dialog img { display:block;width:min(260px,100%);margin:18px auto;border-radius:12px;background:#fff; }
.dialog-close { position:absolute;right:12px;top:9px;border:0;background:transparent;color:var(--muted);font-size:1.8rem;cursor:pointer; }
.noscript { margin:15px;padding:18px;border:2px solid #a00;background:#fff;color:#111; }

footer { min-height: 120px; display: flex; align-items: center; gap: 13px; padding: 24px max(24px, calc((100% - 1080px)/2)); color: var(--white); background: var(--navy-950); border-top: 3px solid var(--blue); }
footer img { width: 51px; height: 51px; object-fit: contain; border-radius: 50%; background: var(--white); }
footer div { display: grid; }
footer span { color: var(--silver); font-size: .78rem; }
footer a { margin-left: auto; color: var(--blue-bright); font-weight: 800; text-decoration: none; }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 20; transform: translate(-50%, 140%); padding: 12px 16px; border-radius: 11px; color: var(--white); background: var(--navy-900); box-shadow: var(--shadow); opacity: 0; transition: .22s ease; pointer-events: none; text-align: center; font-size: .86rem; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 760px) {
  .header-inner { min-height: 128px; }
  .header-status { display: none; }
  .utility-button { padding: 0 10px; }
  #theme-label { display: none; }
  .identity { gap: 13px; }
  .identity img { width: 65px; height: 65px; }
  .season { font-size: .78rem; }
  main { width: min(100% - 20px, 1080px); }
  .division-picker { grid-template-columns: repeat(3, 1fr); }
  .refine-grid, .refine-grid.three, .unified-filters { grid-template-columns: 1fr 1fr; }
  .unified-filters .search-field { grid-column: 1 / -1; }
  .next-grid { grid-template-columns: 68px 1fr; }
  .next-venue { grid-column: 2; align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .journey { gap: 0; }
  .journey-step span { display: none; }
  .action-row .button { flex: 1 1 46%; }
  .all-intro { align-items: flex-start; flex-direction: column; }
  .all-filters { grid-template-columns: 1fr 1fr; }
  .family-player { grid-template-columns:1fr 1fr; }
  .family-player .field:first-of-type { grid-column:1/-1; }
}

@media (max-width: 520px) {
  .header-inner { width: calc(100% - 24px);min-height:150px;align-items:flex-start;padding:18px 0;gap:10px; }
  .header-actions { flex-direction:column;gap:6px; }
  .identity { align-items:flex-start; }
  .identity img { width:54px;height:54px; }
  h1 { font-size:clamp(1.85rem,10vw,2.35rem); }
  .season { max-width:190px; }
  .eyebrow { font-size: .63rem; }
  .view-panel { padding-top: 13px; }
  .control-panel, .schedule-section, .journey-wrap, .all-intro, .all-filters { padding: 17px; border-radius: 15px; }
  .builder-heading { align-items: flex-start; }
  .builder-heading p { font-size: .82rem; }
  .division-picker { gap: 7px; }
  .division-button { min-height: 58px; }
  .unified-filters { grid-template-columns: 1fr; }
  .unified-filters .search-field { grid-column: auto; }
  .next-session { min-height: 180px; padding: 18px; }
  .next-grid { gap: 12px; }
  .next-copy p { font-size: .82rem; }
  .journey-step strong { font-size: .66rem; }
  .event-card { grid-template-columns: 72px 1fr; gap: 11px; }
  .event-actions { grid-column: 2; }
  .all-filters { grid-template-columns: 1fr; }
  .family-player { grid-template-columns:1fr; }
  .family-player .field:first-of-type { grid-column:auto; }
  .master-count { align-items: center; }
  #all-view > .schedule-list { padding: 0 17px 17px; }
  footer { padding: 22px; }
  footer a { display: none; }
}

@media print {
  [data-theme="dark"] {
    --ink: #10253b;
    --muted: #5b7185;
    --line: #d8e5ee;
    --surface: #ffffff;
    --surface-soft: #f3f8fb;
    --sticky: #ffffff;
  }
  body { background: #fff; }
  .site-header { color: #000; background: #fff; border-bottom: 2px solid #000; }
  .identity img { width: 60px; height: 60px; box-shadow: none; }
  .eyebrow, .season { color: #444; }
  .control-panel, .next-session, .journey-wrap, .action-row, .all-filters, .all-intro .button, .text-button, .mini-button, .schedule-note, footer, .toast, .utility-button, .conflict-alert { display: none !important; }
  main { width: 100%; margin: 0; }
  .view-panel { padding: 18px 0 0; }
  .view-panel[hidden] { display: none !important; }
  .schedule-section, #all-view > .schedule-list { border: 0; box-shadow: none; padding: 0; }
  .day-heading { position: static; }
  .event-card { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
