:root { color-scheme: light; }
body { margin: 0; font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif; font-size: 14px; color: #111827; background: #fafafa; }
header, footer { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
main { padding: 0 16px; }
.wrap { width: 100%; }
.panels-box { background: #fff; border: 1px solid #d1d5db; border-top: 0; border-radius: 0 0 6px 6px; padding: 12px 16px; }
@media (max-width: 767px) { .panels-box { border-left: 0; border-right: 0; border-radius: 0; padding: 8px 0; } }
.panels-box.all { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(560px, 100%), 1fr)); gap: 8px 32px; align-items: start; }
.panels-box.all > .panel, .panels-box.all > #panel-bus, .panels-box.all .weather { display: contents; }
.panels-box.all section { min-width: 0; }
.panels-box.all #now > section { order: 0; }
.panels-box.all #weather > section { order: 1; }
.panels-box.all #hazard > section { order: 2; }
.panels-box.all #news > section { order: 3; }
.panels-box.all #panel-bus > section { order: 4; }
#panel-bus:not([hidden]), .weather { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(560px, 100%), 1fr)); gap: 8px 32px; align-items: start; }
#panel-bus > .panel-heading { grid-column: 1 / -1; }
.panels-box > *, #panel-bus > *, .weather > * { min-width: 0; }
.wx-status { font-size: 12px; color: #4b5563; margin: 4px 0; }
header { padding-top: 8px; }
h1 { font-size: 1.4rem; margin: 0 0 4px; }
h2 { font-size: 1.1rem; margin: 20px 0 4px; }
section { margin-bottom: 8px; }
.small { font-size: 12px; }
.muted { color: #6b7280; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
select { font-size: 14px; padding: 4px 6px; max-width: 100%; }
select.place { min-width: 16rem; margin-bottom: 6px; }
button { font-size: 13px; padding: 4px 10px; }
#map { box-sizing: border-box; width: 100%; height: calc(100vh - 170px); height: calc(100dvh - 170px); min-height: 360px; border: 1px solid #e5e7eb; border-radius: 4px; }
@media (max-width: 767px) { #map { height: calc(100vh - 200px); height: calc(100dvh - 200px); } }
.legend { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0; }
.legend span.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.board .summary { font-size: 12px; color: #4b5563; margin: 4px 0; }
.board .tomorrow { font-size: 12px; color: #1d4ed8; }
.board .cols { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.board .col { flex: 1 1 260px; min-width: 0; }
.board .col h3 { font-size: 14px; margin: 4px 0; }
.board .last { font-size: 12px; color: #4b5563; margin: 4px 0; }
.bus-board { box-sizing: border-box; position: relative; max-height: calc(1.9em * 6 + 8px); overflow: auto; border: 1px solid #e5e7eb; border-radius: 4px; background: #fff; }
.bus-board table { border-collapse: collapse; width: 100%; font-size: 12px; line-height: 1.5; }
.bus-board th { position: sticky; top: 0; background: #f9fafb; text-align: left; padding: 4px 8px; border-bottom: 1px solid #e5e7eb; font-weight: 600; height: 1.9em; box-sizing: border-box; }
.bus-board td { padding: 3px 8px; border-bottom: 1px solid #f3f4f6; white-space: nowrap; height: 1.9em; box-sizing: border-box; }
.bus-board tr.bus-row-past td { color: #9ca3af; }
.bus-board tr.bus-row-soon td { background-color: #dbeafe; font-weight: 600; }
.notice { font-size: 13px; color: #374151; }
.error { color: #b91c1c; }
details { margin: 12px 0; }
summary { cursor: pointer; font-weight: 600; }
table.plain { border-collapse: collapse; font-size: 12px; }
table.plain th, table.plain td { text-align: left; padding: 3px 8px; border-bottom: 1px solid #f3f4f6; }
footer { padding: 16px 16px 24px; }
.wx-chip { display: inline-block; padding: 1px 7px; border-radius: 3px; color: #fff; font-size: 12px; margin: 0 3px 2px 0; white-space: nowrap; }
table.wx { border-collapse: collapse; font-size: 12px; width: 100%; background: #fff; }
table.wx th, table.wx td { text-align: left; padding: 3px 8px; border-bottom: 1px solid #f3f4f6; vertical-align: top; }
table.wx th { background: #f9fafb; font-weight: 600; white-space: nowrap; }
table.wx td.nowrap { white-space: nowrap; }
table.wx a { color: #1d4ed8; }
.wx-muted { color: #4b5563; font-size: 12px; }
.weather p { margin: 4px 0; }
.wx-block { margin: 0; overflow-x: auto; }
.wx-overview { font-size: 14px; line-height: 1.6; }
.now-text { font-size: 14px; line-height: 1.6; }
.now-p + .now-p { margin-top: 10px; }
.now-text.now-ng { color: #9ca3af; font-size: 12px; }
.now-warn { background: none; color: inherit; border-bottom: 2px dotted #dc2626; cursor: help; }
.now-q { font-weight: 700; margin-top: 6px; }
.now-q::before { content: 'Q '; color: #1d4ed8; }
.now-a { margin-left: 1.4em; }
.now-a::before { content: 'A '; color: #6b7280; margin-left: -1.4em; }
.amedas-icon { background: none; border: none; }
.amedas-label { display: inline-block; background: rgba(255,255,255,.92); border: 1px solid #9ca3af; border-radius: 3px; padding: 0 3px; font-size: 11px; line-height: 15px; white-space: nowrap; color: #111827; transform: translate(-50%, -50%); }
.amedas-label.none { color: #9ca3af; }
.amedas-label.zero { color: #6b7280; }
.amedas-label.raining, .amedas-label.rain1 { background: #dbeafe; border-color: #60a5fa; }
.amedas-label.rain2 { background: #93c5fd; border-color: #2563eb; }
.amedas-label.rain3 { background: #3b82f6; border-color: #1d4ed8; color: #fff; }
.amedas-label.rain4 { background: #7e22ce; border-color: #581c87; color: #fff; }
.amedas-label.snow { background: #e0f2fe; border-color: #38bdf8; }
.amedas-label.strong { background: #bfdbfe; border-color: #1e40af; }
.bus-icon { background: none; border: none; }
.news-icon { background: none; border: none; }
.news-badge { position: relative; display: inline-block; min-width: 20px; height: 20px; line-height: 16px; padding: 1px 6px; box-sizing: border-box; border-radius: 6px; background: rgba(255,255,255,.85); border: 2px solid rgba(4,120,87,.9); color: #047857; font-size: 11px; font-weight: 700; text-align: center; white-space: nowrap; transform: translate(-50%, calc(-100% - 6px)); }
.news-badge::after { content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -4px; border: 4px solid transparent; border-top-color: rgba(4,120,87,.9); border-bottom: 0; }
.map-popup { font-size: 12px; }
.map-popup .popup-list { margin: 4px 0; padding-left: 16px; }
.map-popup .popup-list li { margin: 2px 0; }
.map-popup .linklike { padding: 0; margin-top: 2px; }
.bus-mark { display: block; width: 24px; height: 16px; transform: translate(-50%, -50%); }
.bus-mark svg { display: block; width: 24px; height: 16px; overflow: visible; }
.nc-chip { display: inline-block; width: 14px; height: 10px; border: 1px solid #d1d5db; vertical-align: middle; margin: 0 2px 0 6px; }
.tabs { display: flex; gap: 4px; align-items: flex-end; justify-content: center; background: #e5e7eb; border: 1px solid #d1d5db; border-bottom: 1px solid #d1d5db; border-radius: 6px 6px 0 0; padding: 4px 6px 0; margin-top: 14px; }
@media (max-width: 767px) { .tabs { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border-left: 0; border-right: 0; border-radius: 0; } .tabs::-webkit-scrollbar { display: none; } .tabs .tab { padding: 8px 10px; font-size: 13px; white-space: nowrap; flex: 0 0 auto; } }
.tabs .tab { background: #f3f4f6; border: 1px solid #d1d5db; border-bottom: none; border-radius: 6px 6px 0 0; padding: 8px 20px; font-size: 14px; cursor: pointer; color: #374151; }
.tabs .tab.active { background: #fff; color: #1d4ed8; font-weight: 600; position: relative; top: 1px; }
.tabs label { padding-bottom: 6px; }
.tabs .grow { flex: 1; }
.panel[hidden], .tabs .tab[hidden] { display: none; }
.linklike { background: none; border: none; color: #2563eb; font-size: 13px; font-weight: 400; cursor: pointer; text-decoration: underline; padding: 0 4px; vertical-align: middle; }
dialog.guide { width: min(720px, 92vw); max-height: 85vh; border: 1px solid #d1d5db; border-radius: 8px; padding: 0; }
dialog.guide::backdrop { background: rgba(0, 0, 0, .35); }
.guide-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid #e5e7eb; }
.guide-body { padding: 8px 14px 14px; overflow-y: auto; max-height: calc(85vh - 48px); }
.guide-body h3 { font-size: 14px; margin: 12px 0 4px; }
.guide-body ul { margin: 0; padding-left: 18px; }
.guide-body li { margin: 4px 0; }
.wx-h { font-size: 14px; font-weight: 700; margin: 4px 0; }
.wx-scroll { overflow-x: auto; }
.bus-board.wx-box { display: block; width: 100%; }
.bus-board.news-box { max-height: calc(1.9em * 16 + 8px); }
table.wx td.wx-today, table.wx th.wx-today { background-color: #dbeafe; font-weight: 600; }
table.wx tr.news-today td { background-color: #dbeafe; }
.news-upd { display: inline-block; font-size: 10px; line-height: 14px; padding: 0 4px; border: 1px solid #9ca3af; border-radius: 3px; color: #4b5563; vertical-align: middle; }
table.wx tr.road-closed td { background-color: #fee2e2; }
table.wx tr.road-planned td { color: #6b7280; }
table.wx td.air-alert { background-color: #fee2e2; font-weight: 600; }
.hz-road { background: none; border: none; }
.hz-road span { display: inline-block; font-size: 16px; line-height: 16px; transform: translate(-50%, -50%); opacity: .9; }
.hz-road.faint span { font-size: 13px; line-height: 13px; opacity: .6; }
.topbar { margin: 8px 0 6px; }
.topbar .grow { flex: 1; }
.btn { background: #fff; color: #1976d2; border: 1px solid #1976d2; border-radius: 4px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.btn:hover { background: #eff6ff; }
select#amedas-mode { font-size: 13px; }
select#focus { min-width: 0; width: 10rem; }
.clear { background: none; border: none; color: #6b7280; font-size: 14px; cursor: pointer; padding: 2px 4px; margin-left: -6px; }
.clear:hover { color: #111827; }
.nowcast-tiles .leaflet-tile { opacity: 0.55 !important; }
.map-zoom-hint { position: absolute; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 16px; background: rgba(17, 24, 39, .45); color: #fff; font-size: 15px; opacity: 0; transition: opacity .3s; pointer-events: none; }
.map-zoom-hint.show { opacity: 1; }
.map-caption { position: absolute; left: 10px; bottom: 10px; z-index: 1000; max-width: min(420px, 60%); display: flex; align-items: flex-start; gap: 4px; background: rgba(255,255,255,.85); border: 1px solid #d1d5db; border-radius: 6px; padding: 6px 8px; box-shadow: 0 1px 3px rgba(0,0,0,.15); font-size: 13px; line-height: 1.45; color: #111827; }
.map-caption[hidden] { display: none; }
.map-caption-body { cursor: pointer; min-width: 0; }
.map-caption-text { display: block; }
.map-caption-meta { display: block; font-size: 11px; color: #6b7280; margin-top: 2px; }
.map-caption-close { background: none; border: none; color: #6b7280; font-size: 14px; line-height: 1; padding: 0 2px; cursor: pointer; }
@media (max-width: 767px) { .map-caption { max-width: calc(100% - 20px); font-size: 12px; } .map-caption-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } }
