:root {
  color-scheme: light;
  --sheet-blue: #0082cc;
  --sheet-line: #8fd4f4;
  --sheet-copy: #fff;
  --sheet-muted: #d5e9f5;
  --mid: #fff35c;
  --high: #ffc165;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; background: #ddd; color: var(--sheet-copy); }
#wrap { width: 100%; max-width: 720px; min-height: 100vh; margin: 0 auto; padding: 24px 12px 40px; background: #ddd; }
#logo { display: block; width: 60px; height: auto; margin: 0 auto 14px; }
.sheet { overflow: hidden; padding: 18px 12px 28px; border: 1px solid var(--sheet-line); border-radius: 20px; background: var(--sheet-blue); }
/* BSL1 footer の実表示20pxに合わせる（BQC1の基準16pxでの2em=32pxを避ける）。 */
footer { margin: 10px 0 0; color: #fff; font-size: 20px; text-align: center; }

.site-header { padding: 0 12px 12px; border-bottom: 1px solid var(--sheet-line); text-align: center; }
.site-header h1, .site-header h2, .site-header p { margin: 0; color: var(--sheet-copy); }
.site-header h1 { font-size: clamp(31px, 8vw, 44px); line-height: 1.18; }
.site-header h2 { margin-top: 10px; font-size: clamp(22px, 5.8vw, 31px); line-height: 1.28; }
/* BSL1 `.present_time` と同じ日時表記・ブレークポイント。 */
.present-time { margin-top: 0 !important; font-size: 20px; font-weight: 400; line-height: normal; }
.error { margin: 24px 12px 0; padding: 16px; border: 1px solid #fff; color: #fff; background: rgb(148 16 37 / 55%); }

.current, .graph-section { width: 95%; margin: 0 auto; }
.current { margin-top: 8px; }
.current > .zone:first-child { padding-top: 12px; }
.graph-section { border-top: 1px solid var(--sheet-line); }
.zones { display: flex; flex-direction: column; }
.zone { padding: 22px 0 24px; border-top: 1px solid var(--sheet-line); text-align: center; }
.zone:first-child { border-top: 0; }
.zone h3 { margin: 0 0 14px; color: #fff; font-size: clamp(23px, 5.8vw, 30px); line-height: 1.25; }
.zone-camera { margin: 0; }
.zone-camera > img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #fff; }
.zone-camera figcaption { margin-top: 5px; color: var(--sheet-muted); text-align: left; font-size: clamp(12px, 3.2vw, 16px); }
.density-summary { display: grid; justify-items: center; gap: 5px; padding: 16px 8px 0; }
.density-icon { width: clamp(64px, 18vw, 92px); height: clamp(64px, 18vw, 92px); object-fit: contain; }
.level-copy, .level-detail { margin: 0; }
.level-copy { color: #fff; font-size: clamp(22px, 6vw, 30px); font-weight: 700; }
.level-detail { min-height: 1.2em; color: var(--sheet-muted); font-size: clamp(15px, 4vw, 19px); }
.zone.level-1 .level-copy { color: var(--mid); }
.zone.level-2 .level-copy, .zone.locked .level-copy { color: var(--high); }

.graph-section { margin-top: 6px; padding-top: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
/* BSL1 新プロトタイプと同じ、青いシート上の曜日ラジオと白棒グラフ。 */
.bsl-graph { color: #fff; text-align: center; }
.weekday-buttons { margin: 0 0 10px; text-align: center; }
/* BSL1 `bsl_grf.css` と同じ実ラジオ構造・寸法。 */
.custom-radio { display: inline-block; position: relative; padding-left: 35px; padding-right: 15px; color: #fff; cursor: pointer; font-size: 16px; user-select: none; }
.custom-radio span { display: inline-block; vertical-align: middle; line-height: 20px; }
.custom-radio-input { position: absolute; opacity: 0; cursor: pointer; }
.custom-radio-mark { position: absolute; top: 0; left: 0; width: 20px; height: 20px; border: 1px solid #dcdcdc; border-radius: 50%; background-color: #fff; }
.custom-radio-input:checked ~ .custom-radio-mark { border-width: 5px; border-color: #fff; background-color: #0066b3; }
.custom-radio-input:focus-visible ~ .custom-radio-mark { outline: 2px solid #fff; outline-offset: 2px; }
.chart-wrap { position: relative; width: 100%; height: 216px; margin: 0 auto; }
.chart-wrap canvas { display: block !important; width: 100% !important; height: 100% !important; }

@media (min-width: 721px) {
  #wrap { padding-top: 28px; }
  .sheet { padding: 26px 24px 34px; }
  .zone { padding-right: 20px; padding-left: 20px; }
  .chart-wrap { height: 246px; }
}

@media (max-width: 420px) {
  #wrap { padding: 18px 8px 30px; }
  .sheet { padding: 14px 10px 22px; border-radius: 16px; }
  .site-header h2 { font-size: 22px; }
  .zone { padding-top: 18px; padding-bottom: 20px; }
  .zone h3 { font-size: 23px; }
  .chart-wrap { height: 180px; }
}

@media only screen and (max-width: 600px) {
  .custom-radio { padding-left: 30px; padding-right: 10px; font-size: 14px; }
}

@media only screen and (min-width: 1025px) and (max-width: 1599px) {
  .custom-radio { padding-left: 42px; padding-right: 22px; font-size: 22px; }
  .custom-radio-mark { width: 24px; height: 24px; }
  .present-time { font-size: 35px; }
}

@media only screen and (min-width: 1600px) {
  .custom-radio { padding-left: 52px; padding-right: 28px; font-size: 32px; line-height: 1.3; }
  .custom-radio span { line-height: 1.3; }
  .custom-radio-mark { top: 4px; width: 28px; height: 28px; }
  .custom-radio-input:checked ~ .custom-radio-mark { border-width: 7px; }
  .present-time { font-size: 65px; }
}

@media only screen and (min-width: 641px) and (max-width: 1024px) {
  .present-time { font-size: 30px; }
}
