/* skolichka.bg — mobile-first, accessible styles. No frameworks. */
:root {
  --c-primary: #0b5cad;
  --c-primary-dark: #084682;
  --c-primary-soft: #e6f0fa;
  --c-text: #1a2433;
  --c-muted: #556273;
  --c-bg: #f4f6f9;
  --c-surface: #fff;
  --c-border: #d5dbe3;
  --c-ok: #1d7a3a;
  --c-ok-soft: #e3f4e8;
  --c-bad: #b3261e;
  --c-bad-soft: #fdeceb;
  --c-warn: #7a5000;
  --c-warn-soft: #fff3d1;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 2px 8px rgba(16, 24, 40, .08);
  --shadow-lg: 0 8px 28px rgba(16, 24, 40, .18);
  --header-h: 56px;
  --focus: 0 0 0 3px #fff, 0 0 0 5px #0b5cad;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--c-text); background: var(--c-bg); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; outline: none; }
img { max-width: 100%; height: auto; }
a { color: var(--c-primary); text-underline-offset: 2px; }
a:hover { color: var(--c-primary-dark); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 1000; background: var(--c-primary); color: #fff; padding: 10px 16px; border-radius: 6px; }
.skip-link:focus { top: 8px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.muted { color: var(--c-muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.lead { font-size: 1.1rem; color: var(--c-muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }

/* ---------- layout */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 1.25rem 1rem 2.5rem; }
.container.narrow { max-width: 760px; }
.container.narrow-wide { max-width: 1000px; }
.stack > * + * { margin-top: .9rem; }
.stack-lg > * + * { margin-top: 1.4rem; }
.grid-2 { display: grid; gap: 1rem; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.page-head h1, .page-head h2 { margin: 0; }

/* ---------- header */
.site-header { background: var(--c-surface); border-bottom: 1px solid var(--c-border); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); padding: 0 1rem; max-width: 1400px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.1rem; color: var(--c-text); text-decoration: none; }
.brand-icon { width: 30px; height: 30px; color: var(--c-primary); flex: none; }
.nav-toggle { margin-left: auto; background: none; border: 0; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; border-radius: 8px; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 22px; height: 2px; background: var(--c-text); position: relative; transition: transform .2s; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }
.site-nav { display: none; }
.site-nav.open { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--c-surface); border-bottom: 1px solid var(--c-border); box-shadow: var(--shadow-lg); padding: .5rem 1rem 1rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a, .site-nav .link-btn { display: block; padding: .7rem .25rem; color: var(--c-text); text-decoration: none; font-weight: 500; }
.site-nav a[aria-current="page"] { color: var(--c-primary); font-weight: 700; }
.nav-user { border-top: 1px solid var(--c-border); margin-top: .5rem !important; padding-top: .5rem !important; }
.nav-user .btn { display: inline-flex; color: #fff; margin-top: .25rem; }
.link-btn { background: none; border: 0; font: inherit; cursor: pointer; padding: 0; color: var(--c-primary); }
@media (min-width: 980px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.open { display: flex; position: static; flex: 1; align-items: center; justify-content: space-between; box-shadow: none; border: 0; padding: 0; background: none; }
  .site-nav ul { display: flex; align-items: center; gap: .25rem; }
  .site-nav a, .site-nav .link-btn { padding: .45rem .7rem; border-radius: 8px; }
  .site-nav a:hover, .site-nav .link-btn:hover { background: var(--c-bg); }
  .site-nav a[aria-current="page"] { background: var(--c-primary-soft); }
  .nav-main { margin-left: 1rem !important; }
  .nav-user { border: 0; margin: 0 !important; padding: 0 !important; }
  .nav-user .btn { margin: 0 0 0 .25rem; padding: .45rem .9rem; }
  .nav-user .btn:hover { background: var(--c-primary-dark); }
}

/* ---------- footer */
.site-footer { background: var(--c-surface); border-top: 1px solid var(--c-border); font-size: .9rem; color: var(--c-muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; padding-top: 1.25rem; padding-bottom: 1.25rem; }
.footer-inner p { margin: 0; }
.footer-inner ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1rem; margin: 0; padding: 0; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .55rem 1.1rem; border-radius: 8px; border: 2px solid var(--c-primary); background: var(--c-primary); color: #fff; font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--c-primary); }
.btn-ghost:hover { background: var(--c-primary-soft); color: var(--c-primary-dark); }
.btn-danger { background: var(--c-bad); border-color: var(--c-bad); }
.btn-danger:hover { background: #8c1d17; border-color: #8c1d17; }
.btn-small { min-height: 36px; padding: .35rem .75rem; font-size: .9rem; }
.btn-block { width: 100%; }
.row-btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.icon-btn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--c-border); background: var(--c-surface); border-radius: 8px; color: var(--c-primary); cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: var(--c-primary-soft); }
.inline { display: inline; }
.inline-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }

/* ---------- forms */
.field { display: flex; flex-direction: column; gap: .3rem; }
label { font-weight: 600; }
.field-hint { margin: 0; font-size: .875rem; color: var(--c-muted); }
.field-error { margin: 0; font-size: .9rem; color: var(--c-bad); font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=number], input:not([type]), select, textarea {
  width: 100%; min-height: 44px; padding: .55rem .75rem; border: 1px solid #a9b3c1; border-radius: 8px; background: #fff; color: var(--c-text); font: 1rem/1.4 var(--font);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(11, 92, 173, .25); }
[aria-invalid="true"] { border-color: var(--c-bad) !important; }
input:disabled { background: var(--c-bg); color: var(--c-muted); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: .6rem; font-size: 1.05rem; }
.card > legend { float: left; width: 100%; }
.card > legend + * { clear: both; }
.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: .15rem 0 0; flex: none; accent-color: var(--c-primary); }
input[type=file] { font: inherit; max-width: 100%; }
.input-with-btn { display: flex; gap: .4rem; }
.hint { color: var(--c-muted); font-size: .95rem; }
.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; margin-bottom: 1rem; }
.filters label { display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; }
.filters .grow { flex: 1 1 240px; }

/* ---------- cards, alerts */
.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); }
@media (min-width: 760px) { .card { padding: 1.4rem; } }
.card h2 { margin-bottom: .8rem; }
.alert { padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; }
.alert ul { margin: 0; padding-left: 1.2rem; }
.alert-error { background: var(--c-bad-soft); border-color: #f3b8b4; color: #7d1a14; }
.notice { background: var(--c-warn-soft); color: var(--c-warn); padding: .7rem 1rem; border-radius: 8px; }
.flashes { max-width: 1120px; margin: .75rem auto 0; padding: 0 1rem; width: 100%; }
.flash { display: flex; align-items: flex-start; gap: .75rem; justify-content: space-between; padding: .75rem 1rem; border-radius: 8px; margin-bottom: .5rem; border: 1px solid; font-weight: 500; }
.flash-success { background: var(--c-ok-soft); border-color: #a8d8b6; color: #145a2a; }
.flash-error { background: var(--c-bad-soft); border-color: #f3b8b4; color: #7d1a14; }
.flash-info { background: var(--c-primary-soft); border-color: #b5cfee; color: #073a6c; }
.flash-close { background: none; border: 0; font-size: 1.4rem; line-height: 1; cursor: pointer; color: inherit; padding: 0 .25rem; }
.page-map .flashes { position: absolute; z-index: 60; left: 50%; transform: translateX(-50%); top: calc(var(--header-h) + 8px); max-width: 560px; }
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: #e8ebf0; color: #3d4756; white-space: nowrap; }
.badge.ok { background: var(--c-ok-soft); color: #145a2a; }
.badge.bad { background: var(--c-bad-soft); color: #8c1d17; }
.badge.warn { background: var(--c-warn-soft); color: var(--c-warn); }
.count { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; border-radius: 999px; background: var(--c-bad); color: #fff; font-size: .75rem; font-weight: 700; margin-left: .25rem; }
.breadcrumbs { margin-bottom: .8rem; font-size: .95rem; }
.breadcrumbs a { text-decoration: none; font-weight: 600; }
.empty-state { text-align: center; padding: 1.5rem .5rem; color: var(--c-muted); }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--c-muted); font-size: .9rem; margin: 1rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--c-border); }

/* ---------- lists & tables */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .75rem; padding: .7rem 0; border-bottom: 1px solid var(--c-border); }
.list > li:last-child { border-bottom: 0; }
.list-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.list .note { flex-basis: 100%; margin: 0; background: var(--c-bg); padding: .5rem .75rem; border-radius: 6px; }
.table-wrap { overflow-x: auto; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); }
.card .table-wrap { border: 0; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--c-border); vertical-align: top; }
.table th { font-size: .85rem; color: var(--c-muted); background: #f9fafb; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; padding: 0; margin: 1.25rem 0 0; }
.pagination a { display: grid; place-items: center; min-width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--c-border); background: var(--c-surface); text-decoration: none; }
.pagination a[aria-current] { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.pagination .gap { padding: .5rem; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: 1rem; border-bottom: 1px solid var(--c-border); }
.filter-tabs a { padding: .55rem .9rem; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; color: var(--c-muted); font-weight: 600; }
.filter-tabs a[aria-current] { color: var(--c-primary); border-color: var(--c-primary); }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding: .3rem 0; }
.checks .ok span { color: var(--c-ok); font-weight: 700; }
.checks .bad span { color: var(--c-bad); font-weight: 700; }

/* ---------- auth */
.auth { max-width: 460px; }
.auth h1 { text-align: center; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin: 1rem 0 0; font-size: .95rem; }
.social-login { display: flex; flex-direction: column; gap: .5rem; }
.social-login p { margin: 0; text-align: center; }
.btn-social { background: #fff; color: var(--c-text); border: 1px solid #a9b3c1; }
.btn-social:hover { background: var(--c-bg); color: var(--c-text); border-color: #8592a3; }
.btn-facebook { background: #1877f2; border-color: #1877f2; color: #fff; }
.btn-facebook:hover { background: #0f5fc7; border-color: #0f5fc7; color: #fff; }

/* ---------- map page */
body.page-map { height: 100vh; height: 100dvh; overflow: hidden; }
.page-map main { display: flex; flex-direction: column; min-height: 0; position: relative; }
.map-app { flex: 1; display: flex; min-height: 0; position: relative; }
.map-wrap { flex: 1; position: relative; min-width: 0; }
#map { position: absolute; inset: 0; background: #e5e9ee; }
.map-missing { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 2rem; color: var(--c-muted); }
.map-panel { background: var(--c-surface); display: flex; flex-direction: column; z-index: 20; }
.sheet-handle { display: none; }
.tabs { display: flex; border-bottom: 1px solid var(--c-border); flex: none; }
.tabs [role=tab] { flex: 1; min-height: 48px; background: none; border: 0; border-bottom: 3px solid transparent; font: 600 .95rem var(--font); color: var(--c-muted); cursor: pointer; padding: .5rem; }
.tabs [role=tab][aria-selected=true] { color: var(--c-primary); border-bottom-color: var(--c-primary); }
.tabs [role=tab]:hover { background: var(--c-bg); }
.tab-panel { padding: 1rem; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.tab-panel[hidden] { display: none; }
.panel-status { margin-top: .75rem; color: var(--c-muted); font-size: .95rem; }
.panel-status:empty { display: none; }
.panel-status.error { color: var(--c-bad); font-weight: 600; }
.panel-status.ok { color: var(--c-ok); font-weight: 600; }

@media (min-width: 860px) {
  .map-panel { width: 390px; flex: none; border-right: 1px solid var(--c-border); order: -1; }
}
@media (max-width: 859.98px) {
  .map-panel { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -6px 24px rgba(16, 24, 40, .2); transition: height .25s ease; height: 46%; max-height: calc(100% - 12px); }
  .map-panel[data-sheet=peek] { height: 108px; }
  .map-panel[data-sheet=peek] .tab-panel { overflow: hidden; }
  .map-panel[data-sheet=full] { height: calc(100% - 12px); }
  .sheet-handle { display: grid; place-items: center; height: 22px; width: 100%; background: none; border: 0; cursor: pointer; flex: none; padding: 0; }
  .sheet-handle span { width: 44px; height: 5px; border-radius: 3px; background: #b9c2ce; }
  .map-fab { bottom: calc(46% + 12px) !important; }
  .map-panel[data-sheet=peek] ~ .map-wrap .map-fab, .map-app:has(.map-panel[data-sheet=peek]) .map-fab { bottom: 120px !important; }
}

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .65rem .35rem .45rem; border: 1px solid var(--c-border); border-radius: 999px; font-weight: 500; font-size: .875rem; cursor: pointer; background: #fff; user-select: none; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip:has(input:checked) { background: var(--c-primary-soft); border-color: var(--c-primary); color: var(--c-primary-dark); font-weight: 700; }
.chip:has(input:focus-visible) { box-shadow: var(--focus); }
.chip img { width: 22px; height: 22px; }

.results { list-style: none; padding: 0; margin: .75rem 0 0; }
.results > li { border: 1px solid var(--c-border); border-radius: 8px; margin-bottom: .5rem; background: #fff; }
.result { display: block; width: 100%; text-align: left; background: none; border: 0; padding: .7rem .8rem; cursor: pointer; font: inherit; color: inherit; border-radius: 8px; }
.result:hover, .results > li.active .result { background: var(--c-primary-soft); }
.result-name { font-weight: 700; display: block; }
.result-addr { font-size: .875rem; color: var(--c-muted); display: block; }
.result-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .35rem; font-size: .8rem; color: var(--c-muted); }
.acc-icons { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.acc-icon { width: 26px; height: 26px; border-radius: 6px; padding: 2px; border: 2px solid; position: relative; background: #fff; }
.acc-icon.yes { border-color: var(--c-ok); }
.acc-icon.no { border-color: var(--c-bad); opacity: .75; }
.acc-icon.no::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--c-bad); transform: rotate(45deg); }

.route-card { padding: .8rem; }
.route-card .route-head { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.route-card .route-barriers { margin-top: .25rem; font-size: .9rem; font-weight: 600; }
.route-card .route-barriers.none { color: var(--c-ok); }
.route-card .route-barriers.some { color: var(--c-bad); }

.ac-wrap { position: relative; }
.ac-list { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--c-border); border-radius: 8px; box-shadow: var(--shadow-lg); max-height: 260px; overflow-y: auto; }
.ac-list li { padding: .55rem .6rem; border-radius: 6px; cursor: pointer; }
.ac-list li[aria-selected=true], .ac-list li:hover { background: var(--c-primary-soft); }
.ac-list small { display: block; color: var(--c-muted); }

.poi-types { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.poi-type { display: flex; align-items: center; gap: .5rem; padding: .5rem; border: 1px solid var(--c-border); border-radius: 8px; font-weight: 500; font-size: .875rem; cursor: pointer; line-height: 1.25; }
.poi-type input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.poi-type:has(input:checked) { border-color: var(--c-primary); background: var(--c-primary-soft); box-shadow: inset 0 0 0 1px var(--c-primary); }
.poi-type:has(input:focus-visible) { box-shadow: var(--focus); }
.poi-type img { flex: none; }

.map-fab { position: absolute; right: 12px; bottom: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 15; transition: bottom .25s; }
.fab { width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; color: var(--c-text); box-shadow: var(--shadow-lg); display: grid; place-items: center; cursor: pointer; }
.fab svg { width: 24px; height: 24px; }
.fab:hover, .fab[aria-expanded=true] { color: var(--c-primary); }
.layers-menu { position: absolute; right: 70px; bottom: 24px; z-index: 16; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .75rem 1rem; max-width: calc(100% - 90px); }
@media (max-width: 859.98px) { .layers-menu { bottom: auto; top: 12px; right: 12px; } }
.layers-title { font-weight: 700; margin-bottom: .4rem; }
.layer-row { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; font-weight: 500; font-size: .9rem; cursor: pointer; }
.layer-row input { width: 18px; height: 18px; accent-color: var(--c-primary); }
.map-notice { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: rgba(26, 36, 51, .92); color: #fff; padding: .5rem 1rem; border-radius: 999px; font-size: .9rem; z-index: 14; max-width: calc(100% - 24px); text-align: center; }

/* google info window content */
.iw { max-width: 270px; font: 14px/1.45 var(--font); color: var(--c-text); }
.iw h3 { font-size: 1rem; margin: 0 0 .2rem; }
.iw p { margin: 0 0 .5rem; }
.iw .acc-icons { margin-bottom: .5rem; }
.iw .btn { min-height: 36px; padding: .3rem .8rem; font-size: .9rem; }
.iw .iw-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.pin-marker { width: 30px; height: 40px; display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.pin-marker.pending { opacity: .55; }
.result-marker { width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--c-primary); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); display: grid; place-items: center; }
.result-marker span { transform: rotate(45deg); color: #fff; font: 700 12px/1 var(--font); }
.result-marker.known { background: var(--c-ok); }
.result-marker.active { background: #e8590c; }

/* ---------- place page */
.place-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.place-header h1 { margin-bottom: .2rem; }
.place-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.place-grid { display: grid; gap: 1.25rem; }
@media (min-width: 880px) { .place-grid { grid-template-columns: 1.6fr 1fr; align-items: start; } }
.flag-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem; }
.flag-list { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.flag { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border-radius: 8px; border: 1px solid var(--c-border); }
.flag-name { flex: 1; font-weight: 500; }
.flag-val { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; font-size: .9rem; }
.flag-val .dot { width: 10px; height: 10px; border-radius: 50%; background: #aab3bf; }
.flag-yes { background: var(--c-ok-soft); border-color: #a8d8b6; }
.flag-yes .flag-val { color: #145a2a; } .flag-yes .dot { background: var(--c-ok); }
.flag-no { background: var(--c-bad-soft); border-color: #f3b8b4; }
.flag-no .flag-val { color: #8c1d17; } .flag-no .dot { background: var(--c-bad); }
.flag-unknown { color: var(--c-muted); }
.flag-unknown img { opacity: .5; }
.place-text { border-top: 1px solid var(--c-border); padding-top: .8rem; margin-top: .8rem; }
.place-text p { margin-bottom: .3rem; }
.details { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; }
.details dt { font-weight: 600; color: var(--c-muted); }
.details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.hours { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; }
.gallery-item img, .gallery-pick img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.gallery-admin { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gallery-pick { display: flex; flex-direction: column; gap: .35rem; font-weight: 500; }
.gallery-pick input { width: 20px; height: 20px; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 1rem; }
.lightbox img { max-height: 90vh; max-width: 100%; border-radius: 6px; }
.lightbox button { position: absolute; top: 12px; right: 12px; width: 48px; height: 48px; border-radius: 50%; border: 0; font-size: 1.8rem; cursor: pointer; }

/* tri-state (yes/no/don't know) */
.tri-list { display: grid; gap: .6rem; }
.tri { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem 0; border-bottom: 1px solid var(--c-border); }
.tri:last-child { border-bottom: 0; }
.tri-label { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; }
.tri-opts { display: inline-flex; border: 1px solid #a9b3c1; border-radius: 8px; overflow: hidden; }
.tri-opts label { position: relative; font-weight: 500; cursor: pointer; }
.tri-opts input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tri-opts span { display: block; padding: .45rem .8rem; min-width: 3.5rem; text-align: center; border-left: 1px solid #a9b3c1; }
.tri-opts label:first-child span { border-left: 0; }
.tri-opts input:checked + span { background: var(--c-primary); color: #fff; font-weight: 700; }
.tri-opts label:nth-child(1) input:checked + span { background: var(--c-ok); }
.tri-opts label:nth-child(2) input:checked + span { background: var(--c-bad); }
.tri-opts label:nth-child(3) input:checked + span { background: #5d6878; }
.tri-opts input:focus-visible + span { box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px var(--c-primary); }
.preview { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.preview img { width: 90px; height: 90px; object-fit: cover; border-radius: 6px; }

/* ---------- profile */
.profile-grid { display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .profile-grid { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.danger-zone { border-color: #f3b8b4; }

/* ---------- content */
.cards { display: grid; gap: 1rem; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.article-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.article-card > img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.article-card-body { padding: 1rem 1.2rem; }
.article-card h2 { font-size: 1.1rem; margin-bottom: .2rem; }
.article-card h2 a { text-decoration: none; color: var(--c-text); }
.article-card h2 a:hover { color: var(--c-primary); }
.article-image { border-radius: var(--radius); margin: .5rem 0 1.25rem; width: 100%; }
.prose { font-size: 1.05rem; line-height: 1.7; }
.prose h2 { margin-top: 1.6em; }
.prose blockquote { margin: 1em 0; padding: .5em 1em; border-left: 4px solid var(--c-primary); background: var(--c-primary-soft); }
.prose-page h2 { margin-top: 1.6em; }
.prose-page li { margin-bottom: .35em; }
.info-section { margin-bottom: 2rem; }
.info-section h2 a { text-decoration: none; color: var(--c-text); }
.link-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
@media (min-width: 760px) { .link-cards { grid-template-columns: 1fr 1fr; } }
.link-cards a { display: flex; flex-direction: column; gap: .25rem; padding: 1rem 1.1rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); text-decoration: none; color: var(--c-text); box-shadow: var(--shadow); height: 100%; }
.link-cards a:hover { border-color: var(--c-primary); }
.link-cards strong { color: var(--c-primary); }
.link-cards span { font-size: .925rem; color: var(--c-muted); }
.error-page { text-align: center; padding-top: 3rem; }
.error-code { font-size: 4rem; font-weight: 800; color: var(--c-primary); margin: 0; line-height: 1; }

/* ---------- admin */
body.admin { background: #eef1f5; }
.admin-top { display: flex; align-items: center; gap: .75rem; min-height: var(--header-h); padding: 0 1rem; background: #13233a; color: #fff; position: sticky; top: 0; z-index: 50; }
.admin-top .brand { color: #fff; font-size: 1rem; }
.admin-top .nav-toggle .bars, .admin-top .nav-toggle .bars::before, .admin-top .nav-toggle .bars::after { background: #fff; }
.admin-top .nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.admin-top .nav-toggle { margin-left: 0; order: -1; }
.admin-top-links { margin-left: auto; display: flex; align-items: center; gap: 1rem; font-size: .9rem; }
.admin-top-links a, .admin-top-links .link-btn { color: #cfe1f7; text-decoration: none; white-space: nowrap; }
@media (max-width: 599.98px) { .admin-top .brand { font-size: .9rem; line-height: 1.2; } .admin-top-links { gap: .7rem; font-size: .85rem; } .admin-top-links .to-site { display: none; } }
.admin-wrap { display: flex; flex: 1; }
.admin-nav { background: #fff; }
.admin-nav ul { padding: .5rem; }
.admin-nav a { display: flex !important; align-items: center; justify-content: space-between; border-radius: 8px; padding: .6rem .8rem !important; }
.admin-nav a[aria-current=page] { background: var(--c-primary-soft); color: var(--c-primary); }
.admin-main { flex: 1; min-width: 0; padding: 1.25rem 1rem 3rem; max-width: 1200px; }
@media (min-width: 980px) {
  .admin-top .nav-toggle { display: none; }
  .admin-nav, .admin-nav.open { display: block; position: sticky; top: var(--header-h); align-self: flex-start; width: 230px; flex: none; height: calc(100vh - var(--header-h)); border-right: 1px solid var(--c-border); box-shadow: none; padding: 0; overflow-y: auto; }
  .admin-nav ul { display: block; }
  .admin-main { padding: 1.75rem 2rem 3rem; }
}
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.stat { display: flex; flex-direction: column; gap: .2rem; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1rem; text-decoration: none; color: var(--c-muted); font-size: .9rem; }
a.stat:hover { border-color: var(--c-primary); }
.stat-n { font-size: 1.8rem; font-weight: 800; color: var(--c-text); line-height: 1.1; }
.stat-warn { border-color: #e5c269; background: var(--c-warn-soft); }
.stat-bad { border-color: #f3b8b4; background: var(--c-bad-soft); }
.stat-grid-quiet .stat-n { font-size: 1.35rem; }
.diff { padding: .75rem 0; border-bottom: 1px solid var(--c-border); }
.diff:last-child { border-bottom: 0; }
.diff-cols { display: grid; gap: .75rem; margin-top: .5rem; }
@media (min-width: 760px) { .diff-cols { grid-template-columns: 1fr 1fr; } }
.diff-cols p { margin: 0 0 .2rem; }
.diff-old, .diff-new { padding: .6rem .8rem; border-radius: 6px; font-size: .95rem; }
.diff-old { background: #f3f4f6; }
.diff-new { background: var(--c-ok-soft); }
.text-pair { border-top: 1px solid var(--c-border); padding-top: .8rem; margin-top: .8rem; }
.bulk-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.messages { display: grid; gap: .75rem; }
.message header { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: .5rem; }
.message-body { background: var(--c-bg); padding: .75rem 1rem; border-radius: 8px; overflow-wrap: anywhere; }
.trace { background: #13233a; color: #e2e8f0; padding: 1rem; border-radius: 8px; overflow-x: auto; font-size: .8rem; white-space: pre-wrap; }
.md-help pre { background: var(--c-bg); padding: .6rem; border-radius: 6px; font-size: .85rem; margin: .4rem 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .place-actions, .breadcrumbs { display: none; } }
