:root {
    color-scheme: light;
    --navy: #102b51;
    --muted: #49617e;
    --blue: #175bbb;
    --border: #cbd9e9;
    font-family: system-ui, sans-serif;
    background: #ecf3fb;
    color: var(--navy);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 1490px; margin: auto; padding: clamp(16px, 4vw, 60px); }
.hero { padding: 8px 0 clamp(18px, 3vw, 36px); }
.foundation { color: var(--blue); font-weight: 750; text-underline-offset: 4px; }
h1 { font-size: clamp(2.35rem, 6vw, 5rem); letter-spacing: -.055em; line-height: 1.05; margin: 12px 0; }
h1 span { color: var(--blue); }
h2 { margin: 0 0 12px; font-size: 1.55rem; line-height: 1.2; letter-spacing: -.025em; }
p { line-height: 1.55; }
.hero p { color: var(--muted); margin: 0; font-size: 1.12rem; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, 345px); gap: 20px; align-items: start; }
.map-card, .form-card { background: #fff; border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 10px 24px #1334520d; }
.map-card { overflow: hidden; }
.form-card { padding: 22px; }
.form-card > p { color: var(--muted); margin: 0 0 15px; }
.map-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 16px; font-weight: 700; }
#map { height: clamp(320px, 60vh, 650px); background: #dceaf5; z-index: 0; }
.legend { font-size: .88rem; margin: 0; padding: 12px 16px; color: var(--muted); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #236cda; margin-right: 5px; }
.city-list { padding: 12px 16px; border-top: 1px solid var(--border); }
#places { margin: 10px 0 0; padding-left: 20px; max-height: 270px; overflow-y: auto; }
label { display: block; margin-bottom: 6px; font-weight: 700; }
.search-row { display: flex; align-items: stretch; gap: 8px; }
input:not([type=checkbox]), select, button { min-height: 44px; font: inherit; border-radius: 9px; }
input:not([type=checkbox]), select { color: var(--navy); border: 1px solid #829bb6; padding: 8px 10px; width: 100%; min-width: 0; background: #fff; }
button { border: 1px solid transparent; padding: 8px 12px; color: white; background: var(--blue); font-weight: 700; cursor: pointer; }
button:hover { background: #10478f; }
button:disabled { opacity: .6; cursor: progress; }
.secondary { color: var(--blue); background: #edf5ff; border-color: var(--border); }
.secondary:hover { color: var(--navy); background: #dceaff; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; margin: 15px 0; line-height: 1.45; }
.check input { width: 19px; height: 19px; flex: 0 0 19px; accent-color: var(--blue); }
#add, #remove { margin-top: 16px; }
#status { margin: 12px 0; font-weight: 650; color: var(--blue); }
#status:empty { display: none; }
.form-card .privacy { margin-top: 16px; font-size: .86rem; }
summary { cursor: pointer; color: var(--blue); font-weight: 680; }
.hint, footer { color: var(--muted); font-size: .82rem; }
footer { line-height: 1.5; margin-top: 18px; }
footer a { color: var(--blue); }
.city-link { text-align: left; color: var(--blue); background: transparent; text-decoration: underline; }
.city-link:hover { color: var(--navy); background: #edf5ff; }
.ribbon-pin { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #98b8e4; border-radius: 50% 50% 50% 7px; transform: rotate(-45deg); background: white; box-shadow: 0 2px 6px #12294f60; }
.ribbon-pin svg { display: block; width: 20px; height: 23px; transform: rotate(45deg); }
:focus-visible { outline: 3px solid #1562ce; outline-offset: 3px; }
@media (max-width: 820px) {
    .layout { grid-template-columns: 1fr; }
    #map { height: clamp(300px, 53vh, 470px); }
}
@media (max-width: 460px) {
    .map-bar { font-size: .86rem; }
    .map-bar button { white-space: nowrap; }
}
