.ba {
    --bg: #f4f6f9; --card: #fff; --fg: #14202e; --muted: #5d6b7c; --line: #d9e0e8;
    --accent: #1a73e8; --now: #e8412a;
    display: flex; flex-direction: column; gap: 8px;
    min-height: 100dvh; background: var(--bg); color: var(--fg);
}
@media (prefers-color-scheme: dark) {
    .ba { --bg: #0e1620; --card: #17222f; --fg: #e8eef5; --muted: #93a1b2; --line: #2a3848; --accent: #6aa8ff; }
}

/* Ad slots: reserved space, collapsed when empty */
.ba-ad { display: flex; justify-content: center; }
.ba-ad-inner { width: 100%; max-width: 336px; min-height: 100px; display: flex; align-items: center; justify-content: center; }
.ba-ad-inner:empty { display: none; }
.ba-ad-inline .ba-ad-inner { min-height: 250px; }
.ba-ad-top .ba-ad-inner { min-height: 50px; max-width: 320px; }

.ba-map-wrap { position: relative; }
.ba-map { height: 48dvh; min-height: 260px; background: #cfd8e3; }
.ba-radar-note {
    position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 500;
    padding: 6px 10px; border-radius: 8px; font-size: .8rem;
    background: rgba(20, 32, 46, .85); color: #fff; pointer-events: none;
}

.ba-panel { background: var(--card); border-radius: 14px; margin: 0 8px; padding: 12px 14px; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.ba-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ba-place { margin: 0; font-size: .8rem; color: var(--muted); }
.ba-summary { margin: 2px 0 0; font-size: 1.1rem; font-weight: 600; line-height: 1.3; }

.ba-btn {
    font: inherit; font-size: .85rem; min-height: 44px; padding: 0 14px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--card); color: var(--fg); cursor: pointer;
}
.ba-btn-play { background: var(--accent); border-color: var(--accent); color: #fff; }

.ba-readout { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 2px; }
.ba-time { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ba-mm { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.ba-label { color: var(--muted); font-size: .9rem; }

.ba-chart { position: relative; height: 150px; touch-action: none; user-select: none; cursor: ew-resize; outline-offset: 2px; }
.ba-chart svg { display: block; width: 100%; height: 100%; }
.ba-chart text { fill: var(--muted); font-size: 10px; }
.ba-grid { stroke: var(--line); stroke-width: 1; }
.ba-cursor { stroke: var(--now); stroke-width: 2; }
.ba-handle { fill: var(--now); stroke: #fff; stroke-width: 2; }
.ba-nowtick { stroke: var(--muted); stroke-dasharray: 3 3; }

.ba-controls { display: flex; gap: 8px; margin-top: 10px; }
.ba-search { flex: 1; }
.ba-search input {
    width: 100%; min-height: 44px; padding: 0 12px; font: inherit; font-size: 16px;
    border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--fg);
}
.ba-credit { margin: 0; padding: 0 12px 8px; font-size: .7rem; color: var(--muted); text-align: center; }

@media (min-width: 900px) {
    .ba { display: grid; grid-template-columns: minmax(0, 1fr) 420px; grid-template-rows: auto 1fr auto auto; align-items: start; height: 100dvh; }
    .ba-ad-top { grid-column: 1 / -1; }
    .ba-map-wrap { grid-row: 2 / 5; grid-column: 1; height: 100%; }
    .ba-map { height: 100%; }
    .ba-panel, .ba-ad-inline, .ba-credit, .ba-ad-footer { grid-column: 2; }
}

.ba-city { margin: -8px 0 0 6px; font-size: 11px; font-weight: 600; white-space: nowrap; pointer-events: none; }
