:root {
  color-scheme: light;
  --ink: #211b2e;
  --muted: #60576e;
  --purple: #523894;
  --dark: #23173c;
  --line: #e4ddec;
  --paper: #faf8fc;
  --orange: #ffc16b;
  --radius: 18px;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-size: 1rem; line-height: 1.55; }
main { flex: 1; }
a { color: var(--purple); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #8463c8; outline-offset: 3px; }
.shell { max-width: 1240px; margin-inline: auto; width: min(100% - 80px, 1240px); }
.site-header { background: white; }
.header-inner, .footer-inner { min-height: 73px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; gap: 10px; align-items: center; color: var(--ink); font-size: 1.05rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.brand-divider { display: inline-block; width: 3px; margin-inline: 5px; height: 3px; vertical-align: middle; border-radius: 100%; background: #9c84cc; }
nav, .footer-links { display: flex; gap: clamp(14px, 3vw, 36px); align-items: center; }
nav a { font-size: .94rem; font-weight: 650; color: var(--muted); text-decoration: none; }
nav a:hover, nav a[aria-current] { color: var(--purple); }
.account-link { padding: .5rem .85rem; border: 1px solid var(--line); border-radius: 9px; }
.header-controls { display: flex; gap: 7px; align-items: center; }
.header-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; min-width: 42px; padding: 0 .6rem; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--purple); font-size: .875rem; font-weight: 700; }
.header-toggle:hover { background: #eee7f8; }
.header-toggle svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero { position: relative; background: radial-gradient(ellipse at 75% 42%, #4b3573, #2c1e49 42%, #24183e 75%); color: #fffaf8; }
.hero-inner { position: relative; min-height: 475px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding-block: 35px 105px; }
.hero-copy { z-index: 1; padding-block: 20px; }
.hero h1, .section-head h1 { margin: 0; font-size: clamp(3.35rem, 7.3vw, 6.35rem); letter-spacing: -.075em; line-height: .96; font-weight: 780; }
.hero h1 span { color: var(--orange); }
.hero h1 .heading-text, .section-head h1 .heading-text { color: inherit; }
.hero p { color: #eee3fb; font-size: clamp(1.05rem, 2vw, 1.24rem); max-width: 35ch; margin-block: 23px 0; }
.globe { margin: 0; display: grid; justify-items: center; min-width: 0; }
.globe canvas { width: min(100%, 395px); height: auto; display: block; border-radius: 50%; filter: drop-shadow(0 10px 24px #170f2b77); touch-action: none; user-select: none; cursor: grab; }
.globe canvas[data-dragging] { cursor: grabbing; }
.globe figcaption { margin-top: -6px; color: #eadff9; font-size: .9rem; text-align: center; }
.globe figcaption #globe-location::before { content: " · "; white-space: pre; }
#globe-instructions { display: block; font-size: .825rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.search-panel, .panel, .info-card, .result-card, .empty { background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.search-panel .message { font-size: .9rem; color: var(--ink); }
.search-panel { position: absolute; inset: auto 0 0; color: var(--ink); transform: translateY(45%); z-index: 2; padding: 21px; box-shadow: 0 14px 34px #2c1e4915; }
.search-fields { display: grid; grid-template-columns: 1.12fr 1fr .75fr 1.15fr auto; align-items: end; gap: 14px; }
label { display: grid; gap: 5px; min-width: 0; font-weight: 650; font-size: .9rem; }
input, select, textarea { width: 100%; min-height: 45px; color: var(--ink); border: 1px solid #d5ccdf; border-radius: 8px; padding: .55rem .65rem; background: #fff; font-weight: 450; font-size: 1rem; }
input::placeholder { color: #756d80; }
select { appearance: none; padding-right: 1.9em; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='9' viewBox='0 0 11 9'%3E%3Cpath d='M1 2l4.5 4.5L10 2' fill='none' stroke='%23523894' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7em center; }
textarea { resize: vertical; }
.primary, .secondary, .danger { min-height: 45px; padding: .55rem 1rem; border: 1px solid transparent; border-radius: 9px; font-weight: 700; }
.primary { color: white; background: var(--purple); }
.primary:hover { background: #422779; }
.primary:disabled, .secondary:disabled { opacity: .65; cursor: wait; }
.secondary { color: var(--purple); background: #f3edfa; border-color: #e5daef; }
.secondary:hover { background: #ebe0f6; }
.danger { color: #972b4b; background: white; border-color: #e8c1cc; }
.text-btn { display: inline-block; font: inherit; font-weight: 700; color: var(--purple); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: .22em; }
.search-panel .primary { display: inline-flex; gap: .6em; align-items: center; justify-content: center; padding-inline: 1.45em; }
.search-icon { position: relative; display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; width: 6px; height: 2px; background: currentColor; transform: rotate(45deg); right: -5px; bottom: -3px; }
.introduction { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-block: 101px 54px; }
.results:not([hidden]) + .introduction { padding-top: 40px; }
.info-card { padding: 23px; }
.info-card h2 { font-size: 1.2rem; margin-block: 13px 5px; }
.info-card p, .section-head p, .fine { color: var(--muted); }
.info-card p { margin-block: 0 13px; }
.role-symbol { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 11px; background: #eee7f8; color: var(--purple); font-size: 1.28rem; }
.role-symbol.alt { color: #783e29; background: #ffebd4; }
.results { padding-top: 100px; }
.section-head { margin-bottom: 24px; }
.section-head p { margin-bottom: 0; }
.section-head h2, .section-head h1 { margin-block: 6px 0; }
.section-head h2 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; letter-spacing: -.045em; }
.section-head h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
.section-head h1 span { color: var(--purple); }
.kicker { font-weight: 750; letter-spacing: .13em; color: var(--purple); font-size: .85rem; }
#map { width: 100%; height: clamp(285px, 44vw, 460px); border: 1px solid var(--line); border-radius: var(--radius); background: #ebe5f2; isolation: isolate; }
.map-credit { margin: 9px 0 19px; }
.map-flag { position: relative; background: transparent; border: 0; }
.map-flag i { display: block; width: 4px; height: 27px; background: #33234c; border-radius: 4px; }
.map-flag i::before { content: ""; position: absolute; inset: 0 -12px auto 2px; width: 19px; height: 15px; background: #523894; border: 1px solid #fff; border-radius: 2px 6px 6px 2px; }
.map-flag.trainer i::before { background: #9a462c; }
.map-flag.group { color: white; display: grid; place-items: center; font-weight: bold; background: #523894; border: 2px solid white; border-radius: 50%; }
.result-list { display: grid; gap: 11px; }
.result-card, .empty { padding: 17px 20px; }
.result-card h3, .empty h3 { margin: 0 0 4px; font-size: 1.17rem; }
.result-card p, .empty p { margin-block: 6px; }
.result-top, .actions, .account-top, .contact-links, .checks { display: flex; gap: 10px 15px; align-items: center; flex-wrap: wrap; }
.result-top, .account-top { justify-content: space-between; }
.result-top .fine { white-space: nowrap; }
.tag { display: inline-block; background: #f2ecf8; color: #492c80; font-size: .85rem; font-weight: 700; padding: .16em .5em; border-radius: 5px; }
.tag.trainer { background: #ffebd4; color: #793b27; }
.long-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.subpage { padding-block: 59px 70px; }
.panel { padding: 20px 24px; }
.panel h2 { margin: 0 0 8px; font-size: 1.35rem; }
.panel p { margin: 5px 0 14px; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 18px; }
.form-grid { display: grid; gap: 14px; }
.account-top { margin-bottom: 14px; }
.full { grid-column: 1 / -1; }
.checks label, label.check { display: flex; align-items: flex-start; gap: .5em; font-weight: 500; }
input[type=checkbox] { width: 17px; min-height: 0; height: 17px; margin: .2em 0; accent-color: var(--purple); }
fieldset { margin: 0; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
legend { padding-inline: 5px; font-size: .9rem; font-weight: 700; }
.account-events { margin-top: 18px; }
.billing-actions { margin-top: 14px; }
.account-events .result-list { margin-top: 16px; }
.message { margin-block: 12px; border-radius: 8px; padding: .7rem .85rem; color: #3b2465; background: #f0e8fa; }
.message.error { color: #84213f; background: #faeaf0; }
.calendar-controls { display: flex; align-items: end; gap: 12px; margin-bottom: 15px; }
.calendar-controls .secondary { font-size: 1.3rem; padding-block: .2em; }
.event-filter { margin-left: auto; }
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; padding: 12px; }
.month-day, .weekday { text-align: center; min-width: 0; }
.weekday { font-size: .85rem; font-weight: 750; color: var(--muted); }
.month-day { border: 0; background: #f7f3fa; border-radius: 6px; min-height: 42px; padding: 2px; color: var(--ink); }
.month-day.has-events { background: #ede3f8; color: #3b2465; font-weight: 750; }
.month-day[aria-pressed=true] { color: white; background: var(--purple); }
.month-day small { font-size: .68rem; display: block; }
.site-footer { border-top: 1px solid var(--line); background: white; color: var(--muted); }
.footer-inner { flex-wrap: wrap; padding-block: 15px; }
.footer-inner small { white-space: nowrap; }
.footer-links { flex-wrap: wrap; }
.legal-page { max-width: 850px; }
.legal-page .section-head h1 { font-size: clamp(2.1rem, 7vw, 4.5rem); overflow-wrap: anywhere; }
.legal-copy section + section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.legal-copy address { font-style: normal; }
.legal-copy p { margin-block: .65em; color: var(--ink); }

:root[data-theme=dark] {
  color-scheme: dark;
  --ink: #f5edf9;
  --muted: #cabed5;
  --purple: #cfbaf7;
  --line: #493b57;
  --paper: #191320;
  --surface: #251c30;
  --surface-raised: #322542;
}
[data-theme=dark] :is(.site-header, .site-footer, .search-panel, .panel, .info-card, .result-card, .empty) { background: var(--surface); }
[data-theme=dark] .hero { background: radial-gradient(ellipse at 75% 42%, #42305f, #261b40 53%, #201634 85%); }
[data-theme=dark] :is(input, select, textarea) { background-color: #1c1526; border-color: #655574; }
[data-theme=dark] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='9' viewBox='0 0 11 9'%3E%3Cpath d='M1 2l4.5 4.5L10 2' fill='none' stroke='%23cfbaf7' stroke-width='1.5'/%3E%3C/svg%3E"); }
[data-theme=dark] input::placeholder { color: #ada0b7; }
[data-theme=dark] :is(.role-symbol, .tag, .message, .month-day.has-events) { color: #e4d7fa; background: #423155; }
[data-theme=dark] :is(.role-symbol.alt, .tag.trainer) { color: #ffd8b1; background: #573827; }
[data-theme=dark] :is(.header-toggle:hover, .secondary:hover) { background: var(--surface-raised); }
[data-theme=dark] .secondary { background: #39294c; border-color: #574465; }
[data-theme=dark] .danger { color: #ffc3d1; background: var(--surface); border-color: #92566a; }
[data-theme=dark] .message.error { color: #ffd0dc; background: #512d3c; }
[data-theme=dark] :is(.primary, .month-day[aria-pressed=true]) { color: #211b2e; background: #cfbaf7; }
[data-theme=dark] .primary:hover { background: #e0d0fb; }
[data-theme=dark] .month-day:not(.has-events, [aria-pressed=true]) { background: #2d223b; }
[data-theme=dark] #map { background: var(--surface); }
[data-theme=dark] .leaflet-tile-pane { filter: brightness(.72) saturate(.78); }
[data-theme=dark] .leaflet-container :is(.leaflet-control-attribution, .leaflet-popup-content-wrapper, .leaflet-popup-tip, .leaflet-bar a) { color: var(--ink); background: var(--surface); }
[data-theme=dark] .leaflet-container :is(.leaflet-control-attribution a, .leaflet-popup-content a, .leaflet-popup-close-button) { color: var(--purple); }
@media (max-width: 900px) {
  .shell { width: min(100% - 42px, 1240px); }
  .hero-inner { min-height: 405px; padding-bottom: 128px; }
  .search-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
  .search-fields button { grid-column: 1 / -1; }
  .introduction, .results { padding-top: 110px; }
}
@media (max-width: 640px) {
  .shell { width: calc(100% - 28px); }
  .header-inner { flex-wrap: wrap; gap: 6px; padding-block: 10px; }
  nav { width: 100%; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
  nav a { font-size: .86rem; white-space: nowrap; }
  .account-link { padding-inline: .5rem; }
  .header-controls { gap: 4px; }
  .header-toggle { min-width: 38px; height: 40px; padding-inline: .4rem; }
  .hero-inner { display: flex; flex-direction: column; padding: 24px 0 0; align-items: stretch; }
  .hero-copy { padding: 8px 0 0; }
  .hero h1 { font-size: clamp(2.95rem, 12vw, 4.7rem); }
  .hero p { margin-top: 13px; }
  .globe { margin-top: 12px; }
  .globe canvas { width: min(65%, 246px); }
  .globe figcaption { margin-top: -3px; margin-bottom: 12px; }
  .search-panel { position: relative; transform: translateY(14px); padding: 14px; }
  .search-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .introduction, .results { padding-top: 47px; }
  .introduction, .two-col, .calendar-layout { grid-template-columns: 1fr; }
  .subpage { padding-top: 35px; }
  .calendar-controls { flex-wrap: wrap; }
  .event-filter { flex: 1 1 100%; }
}
@media (max-width: 400px) {
  nav { gap: 3px; }
  nav a { font-size: .79rem; }
  .account-link { padding-inline: .25rem; }
  .header-controls { gap: 3px; }
  .header-toggle svg { width: 16px; height: 16px; }
  .header-toggle { min-width: 32px; gap: 3px; padding-inline: .225rem; }
}
