:root {
  --navy: #16324f;
  --blue: #2e75b6;
  --paper: #f5f7fa;
  --line: #dce3ea;
  --text: #1d2935;
  --muted: #657383;
  --surface: #ffffff;
  --amber: #c77a24;
  --amber-soft: #fff5df;
  --free: #e1f3e4;
  --probable: #fff2c7;
  --possible: #ffe3bd;
  --busy: #f5dddd;
  --unknown: #eef1f4;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; color: var(--text); background: var(--paper); font-family: Arial, Helvetica, sans-serif; line-height: 1.5; }
body.dialog-open { overflow: hidden; }
a { color: #175f9e; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 9px 13px; color: #fff; background: var(--blue); border-radius: 7px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header { background: linear-gradient(110deg, #102b45, var(--navy)); color: #fff; border-bottom: 3px solid var(--amber); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.header-tools { position: relative; display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.7); font-size: .82rem; }
.header-prompt { white-space: nowrap; }
.header-separator { opacity: .5; }
.header-action { appearance: none; margin: 0; padding: 3px 0; color: rgba(255,255,255,.88); background: none; border: 0; cursor: pointer; font: inherit; text-decoration: underline; text-decoration-color: rgba(255,255,255,.4); text-underline-offset: 3px; }
.header-action:hover { color: #fff; text-decoration-color: currentColor; }
.share-control { position: relative; }
.share-menu { position: absolute; z-index: 50; top: calc(100% + 10px); left: -8px; display: grid; min-width: 190px; padding: 6px; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 10px 30px rgba(7,25,42,.24); }
.share-menu[hidden], .share-menu [hidden], .header-feedback[hidden] { display: none; }
.share-menu a, .share-menu button { width: 100%; margin: 0; padding: 8px 10px; color: var(--navy); background: transparent; border: 0; border-radius: 6px; cursor: pointer; font: inherit; text-align: left; text-decoration: none; }
.share-menu a:hover, .share-menu button:hover { background: #edf2f6; }
.header-feedback { position: absolute; z-index: 49; top: calc(100% + 10px); left: 0; width: max-content; max-width: min(390px, calc(100vw - 24px)); margin: 0; padding: 9px 11px; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(7,25,42,.2); font-size: .82rem; }
.back-link { color: #fff; text-decoration: none; }
.back-link { flex: 0 0 auto; font-size: .92rem; opacity: .9; }
.back-link:hover { opacity: 1; }
.radar-main { padding: 46px 0 68px; }
.intro { max-width: 960px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
h1 { margin: 0; color: var(--navy); font-size: clamp(2.25rem, 5vw, 3.55rem); line-height: 1.05; letter-spacing: -.025em; }
h1 span { display: block; margin-top: 7px; color: #46647f; font-size: .56em; font-weight: 600; letter-spacing: -.01em; }
.lead { max-width: 820px; margin: 20px 0 0; color: var(--muted); font-size: 1.08rem; }
.lead a { font-weight: 700; }
.meta { display: grid; grid-template-columns: minmax(180px, .5fr) minmax(300px, 1.5fr); gap: 12px; margin-top: 24px; }
.meta > div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 15px; display: flex; flex-direction: column; box-shadow: 0 4px 14px rgba(22,50,79,.035); }
.meta strong { color: var(--navy); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.state-box { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.state-error { border-color: #d88989; color: #8a1e1e; background: #fff2f2; }

.toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(230px, .45fr); gap: 14px; margin-bottom: 18px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group label { color: var(--navy); font-size: .84rem; font-weight: 700; }
.field-group input, .field-group select { width: 100%; min-height: 44px; padding: 10px 12px; color: var(--text); background: #fff; border: 1px solid #aebdcb; border-radius: 8px; font: inherit; }
.field-group input:focus, .field-group select:focus { outline: 3px solid rgba(46,117,182,.22); border-color: var(--blue); }

.search-results { margin-bottom: 20px; padding: clamp(18px, 3vw, 28px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 26px rgba(22,50,79,.06); }
.search-results > h2 { margin: 0 0 14px; color: var(--navy); }
.band-search-card { margin-top: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.band-search-card h2, .band-search-card h3 { margin: 0; color: var(--navy); }
.band-search-meta, .band-search-reason { color: var(--muted); }
.band-day-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin-top: 12px; }
.band-day-results > div { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 10px; background: #f8fafb; border: 1px solid var(--line); border-radius: 8px; }
.status-badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: .82rem; font-weight: 700; }
.status-badge-free { background: var(--free); color: #246234; }
.status-badge-probable { background: var(--probable); color: #725b0b; }
.status-badge-possible { background: var(--possible); color: #7b4610; }
.status-badge-busy { background: var(--busy); color: #7b2929; }
.status-badge-unknown { background: var(--unknown); color: #536271; }

.date-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 14px; }
.date-tab { min-width: 128px; border: 1px solid #b9c7d5; background: #fff; color: var(--navy); border-radius: 9px; padding: 11px 15px; cursor: pointer; font-weight: 700; }
.date-tab.active { color: #fff; background: var(--blue); border-color: var(--blue); }
.date-panel, .summary-section { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: clamp(18px, 3vw, 30px); box-shadow: 0 8px 26px rgba(22,50,79,.06); }
.date-panel h2, .summary-section h2 { margin-top: 0; color: var(--navy); }
.status-section { margin-top: 22px; border-left: 6px solid var(--line); padding: 2px 0 2px 16px; }
.status-section h3 { margin: 0 0 10px; font-size: 1.06rem; }
.status-free { border-color: #4f9c61; }
.status-probable { border-color: #d0a52c; }
.status-possible { border-color: #d88727; }
.status-busy { border-color: #b75b5b; }
.status-unknown { border-color: #8794a2; }
details.status-section > summary { cursor: pointer; font-weight: 700; margin-bottom: 10px; }
.unknown-explanation { max-width: 920px; color: var(--muted); }
.unknown-list { columns: 3 230px; column-gap: 28px; margin: 12px 0 4px; padding-left: 20px; }
.unknown-list li { break-inside: avoid; margin-bottom: 5px; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { padding: 10px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--navy); background: #edf2f6; white-space: nowrap; }
.band-table th:nth-child(1) { width: 22%; }
.band-table th:nth-child(2) { width: 10%; }
.band-table th:nth-child(4) { width: 18%; }
.band-table td:nth-child(2) { white-space: nowrap; }
.band-detail-trigger { appearance: none; margin: 0; padding: 0; color: #175f9e; background: none; border: 0; cursor: pointer; font: inherit; font-weight: 700; line-height: inherit; text-align: left; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.band-detail-trigger:hover { text-decoration-thickness: 2px; }
.empty { color: var(--muted); }
.summary-section { margin-top: 24px; }
.summary-table td:not(:first-child), .summary-table th:not(:first-child) { text-align: center; }

.band-detail-dialog { width: min(900px, calc(100% - 24px)); max-height: min(88vh, 760px); margin: auto; padding: 0; color: var(--text); background: #fff; border: 0; border-radius: 16px; box-shadow: 0 24px 70px rgba(7,25,42,.38); overflow: hidden; }
.band-detail-dialog::backdrop { background: rgba(9,29,47,.68); backdrop-filter: blur(2px); }
.band-detail-shell { position: relative; max-height: min(88vh, 760px); padding: clamp(24px, 4vw, 38px); overflow-y: auto; }
.band-detail-close { position: absolute; z-index: 1; top: 12px; right: 12px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--navy); background: #edf2f6; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; font-size: 1.65rem; line-height: 1; }
.band-detail-close:hover { color: #fff; background: var(--navy); border-color: var(--navy); }
.band-detail-dialog .band-search-card { margin: 0; padding: 0; border: 0; }
.band-detail-dialog .band-search-card h2 { padding-right: 54px; font-size: clamp(1.5rem, 4vw, 2rem); }
.band-detail-actions { display: flex; align-items: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.band-website-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; color: #fff; background: var(--blue); border-radius: 8px; font-weight: 700; text-decoration: none; }
.band-website-link:hover { background: var(--navy); }
.band-website-link::after { content: '↗'; margin-left: 8px; font-size: .9em; }
.band-website-unavailable { margin: 0; color: var(--muted); }

.verification-note { display: flex; gap: 14px; margin-top: 20px; padding: 18px 20px; color: #4c3c11; background: var(--amber-soft); border: 1px solid #efd69e; border-radius: 12px; }
.verification-note h2 { margin: 0 0 3px; color: #5e450c; font-size: 1rem; }
.verification-note p { margin: 0; }
.verification-icon { flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; color: #fff; background: var(--amber); border-radius: 50%; font-weight: 800; font-family: Georgia, serif; }
.method-details { margin-top: 12px; padding: 15px 18px; color: #435362; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.method-details summary { color: var(--navy); cursor: pointer; font-weight: 700; }
.method-details summary::marker { color: var(--blue); }
.method-content { padding-top: 8px; }
.method-content ul { margin: 8px 0 14px; padding-left: 22px; }
.method-content li + li { margin-top: 5px; }
.method-content p:last-child { margin-bottom: 2px; }

.support-section { display: grid; grid-template-columns: minmax(0, 1fr) 220px; align-items: center; gap: clamp(28px, 5vw, 64px); margin-top: 28px; padding: clamp(24px, 4vw, 42px); color: #fff; background: linear-gradient(125deg, #102b45 0%, #1a4266 100%); border-radius: 16px; box-shadow: 0 12px 34px rgba(22,50,79,.18); }
.support-kicker { margin: 0 0 7px; color: #ffd898; font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.support-section h2 { margin: 0 0 12px; color: #fff; font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.2; }
.support-copy > p:not(.support-kicker) { max-width: 650px; margin: 0; font-size: 1.03rem; }
.support-note { margin-top: 14px !important; color: #cddbe7; font-size: .92rem !important; }
.qr-card { width: 100%; margin: 0; padding: 11px; color: var(--navy); background: #fff; border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.qr-card img { display: block; width: 100%; height: auto; border-radius: 6px; }
.qr-card figcaption { padding: 8px 4px 2px; text-align: center; font-size: .8rem; font-weight: 700; }

.site-footer { color: #d9e4ed; background: #0d263e; border-top: 1px solid rgba(255,255,255,.08); }
.footer-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-inner p { margin: 0; font-size: .9rem; }
.footer-inner a { color: #fff; font-weight: 700; }

button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid rgba(46,117,182,.38); outline-offset: 3px; }

@media (max-width: 680px) {
  .container { width: min(100% - 20px, 1180px); }
  .header-inner { min-height: 58px; padding: 9px 0; flex-wrap: wrap; gap: 5px 14px; }
  .header-tools { order: 2; width: 100%; justify-content: center; font-size: .78rem; }
  .header-prompt { display: none; }
  .share-menu { right: auto; left: 50%; transform: translateX(-50%); }
  .header-feedback { left: 50%; transform: translateX(-50%); }
  .back-link { margin-left: auto; }
  .back-link { font-size: .84rem; }
  .radar-main { padding: 30px 0 46px; }
  .eyebrow { margin-bottom: 7px; font-size: .74rem; }
  h1 { font-size: clamp(2rem, 10vw, 2.65rem); }
  h1 span { max-width: 330px; font-size: .58em; line-height: 1.15; }
  .lead { margin-top: 16px; font-size: 1rem; }
  .meta, .toolbar { grid-template-columns: 1fr; }
  .date-panel, .summary-section { padding: 16px 12px; border-radius: 10px; }
  .status-section { padding-left: 10px; }
  .unknown-list { columns: 1; }
  table { min-width: 720px; font-size: .88rem; }
  .band-detail-dialog { width: calc(100% - 16px); max-height: calc(100vh - 16px); }
  .band-detail-shell { max-height: calc(100vh - 16px); padding: 24px 18px; }
  .verification-note { padding: 16px; }
  .support-section { grid-template-columns: 1fr; text-align: center; }
  .support-copy > p:not(.support-kicker) { margin-right: auto; margin-left: auto; }
  .qr-card { width: min(240px, 100%); margin: 0 auto; }
  .footer-inner { min-height: 98px; flex-direction: column; justify-content: center; gap: 4px; text-align: center; }
}
