:root {
  color-scheme: light;
  --ground: #eef1f7;
  --surface: #fff;
  --ink: #1e2330;
  --muted: #586174;
  --accent: #4263eb;
  --soft: #eaeeff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--ground);
  font-synthesis: none;
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
body { margin: 0; text-align: center; }
::selection { background: #cbd5ff; color: #182c80; }
a { color: inherit; text-underline-offset: 4px; }
button, select { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button { border: 0; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 20px; top: -100px; background: white; padding: 12px; z-index: 5; }
.skip:focus { top: 12px; }
.layout { width: min(100% - 40px, 800px); margin: 0 auto; padding: 68px 0 0; }
h1 { max-width: 760px; font-size: clamp(34px, 5.6vw, 52px); font-weight: 650; letter-spacing: -.04em; line-height: 1.1; margin: 0 auto 22px; text-wrap: balance; }
.intro-copy { max-width: 540px; font-size: 17px; line-height: 1.6; margin: 0 auto 36px; color: var(--muted); }
form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: end; }
.filter-field { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
form label { font-size: 14px; font-weight: 600; }
select { min-width: 0; max-width: 100%; width: 100%; min-height: 54px; background: var(--surface); border: 1px solid #d0d6e3; border-radius: 10px; padding: 12px 30px 12px 14px; color: var(--ink); text-align: center; text-align-last: center; }
select:hover { border-color: #96a6db; }
@supports (appearance: base-select) {
  select, select::picker(select) { appearance: base-select; box-sizing: border-box; }
  select { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
  select > button { display: flex; align-items: center; justify-content: center; flex: 1; min-width: 0; padding: 0; background: transparent; color: inherit; text-align: center; }
  selectedcontent { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  select::picker-icon { content: ""; width: 8px; height: 8px; flex-shrink: 0; margin: 0 2px 4px 0; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); }
  select:open { border-color: var(--accent); }
  select:open::picker-icon { transform: rotate(225deg); margin-bottom: 0; }
  select::picker(select) {
    inline-size: anchor-size(width);
    min-inline-size: 0;
    max-inline-size: calc(100vw - 40px);
    max-block-size: min(340px, 50dvh);
    margin-block: 8px;
    padding: 6px;
    border: 1px solid #d0d6e3;
    border-radius: 14px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 12px 32px rgb(30 35 48 / 12%);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  select option { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 11px 14px; border-radius: 8px; font-size: 15px; line-height: 1.4; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  select option:checked { background: var(--soft); color: #304ac0; font-weight: 600; }
  select option:hover, select option:focus-visible { background: var(--soft); color: #304ac0; outline: none; }
  select option::checkmark { order: 1; margin-inline-start: auto; color: var(--accent); }
}

.reset { grid-column: 1 / -1; justify-self: center; padding: 8px 12px; background: transparent; color: var(--accent); font-size: 14px; }
.reset:hover { text-decoration: underline; }
.results { min-width: 0; scroll-margin-top: 20px; margin-top: 22px; }
.results-toolbar { margin-bottom: 18px; }
.results-toolbar p { margin: 0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.businesses { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.business { background: var(--surface); border-radius: 14px; }
.business article { padding: 30px 36px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.business-main { width: 100%; min-width: 0; }
.category { color: var(--accent); font-size: 13px; line-height: 1.5; margin: 0 0 10px; }
.business h2 { font-size: 24px; line-height: 1.25; letter-spacing: -.02em; margin: 0 0 12px; font-weight: 650; overflow-wrap: anywhere; }
.description, details { max-width: 65ch; font-size: 16px; line-height: 1.55; margin: 0 auto 18px; overflow-wrap: anywhere; white-space: pre-line; }
.description:empty { display: none; }
summary { cursor: pointer; }
summary span { display: block; color: var(--accent); font-size: 13px; margin-top: 5px; }
details[open] summary { font-size: 0; }
details[open] summary span { font-size: 13px; }
details p { margin: 10px 0; }
.location { display: flex; align-items: flex-start; justify-content: center; gap: 7px; margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.location svg { width: 15px; height: 18px; margin-top: 1px; }
.contacts { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.contact { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: #f2f4f9; color: #44516a; text-decoration: none; }
.contact:hover { background: var(--soft); color: var(--accent); }
.contact-primary { background: var(--accent); color: white; }
.contact-primary:hover { background: #334fc6; color: white; }
.no-contacts { font-size: 13px; line-height: 1.5; color: var(--muted); }
.notice { background: #fff4d4; color: #614600; padding: 16px; margin-bottom: 16px; border-radius: 10px; line-height: 1.5; font-size: 14px; }
.notice button { background: transparent; color: inherit; text-decoration: underline; padding: 8px; }
.empty { background: white; padding: 50px 30px; border-radius: 14px; line-height: 1.6; }
.empty h2 { font-size: 24px; margin: 0; }
.empty p { color: var(--muted); }
.empty button { background: var(--accent); color: white; padding: 14px 18px; border-radius: 10px; }
footer { width: min(100% - 40px, 800px); margin: 0 auto; padding: 38px 0 42px; font-size: 13px; color: var(--muted); line-height: 1.6; }
footer p { margin: 0 0 8px; }
.updated { font-variant-numeric: tabular-nums; }
footer a { text-decoration: none; }
footer a:hover { color: var(--accent); }
.source-link { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 16px 0; }
.source-link svg { width: 16px; height: 16px; }
.back-to-top { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 10; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: white; border: 2px solid white; text-decoration: none; }
.back-to-top:hover { background: #334fc6; }
.back-to-top svg { transform: rotate(-90deg); }
[hidden] { display: none !important; }
@media (max-width: 600px) {
  .layout { padding-top: 40px; }
  .intro-copy { font-size: 16px; margin-bottom: 28px; }
  form { grid-template-columns: 1fr; gap: 14px; max-width: 400px; margin: 0 auto; }
  .filter-field { gap: 7px; }
  .business article { padding: 26px 22px; }
  .business h2 { font-size: 22px; }
  .empty { padding: 36px 22px; }
}
@media (prefers-reduced-motion: reduce) { :root { scroll-behavior: auto; } }
