html, body { height:100%; margin:0; }
    #map { height:100%; width:100%; }

    :root {
      --office:#d81b60;
      --office-fill:#f06292;
      --reg:#1976d2;
      --reg-fill:#64b5f6;
      --social:#7b1fa2;
      --social-fill:#ba68c8;
      --phone:#ef6c00;
      --phone-fill:#ffb74d;
      --search:#2e7d32;
      --search-fill:#81c784;
      --today:#188038;
      --tomorrow:#ef6c00;
      --aftertomorrow:#d81b60;
      --text:#111827;
      --muted:#6b7280;
      --border:rgba(0,0,0,.12);
    }

    .bottom-menu {
      background: rgba(255,255,255,0.92);
      backdrop-filter: blur(6px);
      border-radius: 12px;
      box-shadow: 0 4px 16px rgba(0,0,0,.18);
      padding: 8px;
      margin: 10px;
      min-width: 280px;
      max-width: 92vw;
      transition: max-width .2s ease;
      font: 13px/1.15 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    }
    .bottom-menu.has-status { max-width: 92vw; }

    .btn-row {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      align-items: stretch;
    }

    .layer-btn {
      flex: 1 1 auto;
      min-width: 0;
      min-height: 34px;
      padding: 6px 8px;
      border-radius: 10px;
      border: 2px solid rgba(0,0,0,.12);
      background: #fff;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      user-select: none;
      -webkit-tap-highlight-color: transparent;
      transition: transform .05s ease, border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
      font-size: 12.5px;
      white-space: nowrap;
    }
    .layer-btn:active { transform: scale(.98); }
    .layer-btn .dot { width:8px; height:8px; border-radius:999px; flex:0 0 auto; }
    .dot.office { background:var(--office); }
    .dot.reg { background:var(--reg); }
    .dot.social { background:var(--social); }
    .dot.phone { background:var(--phone); }
    .layer-btn.active { font-weight:800; }
    .layer-btn.active.office { border-color:var(--office); box-shadow:0 0 0 2px rgba(216,27,96,.15); }
    .layer-btn.active.reg { border-color:var(--reg); box-shadow:0 0 0 2px rgba(25,118,210,.15); }
    .layer-btn.active.social { border-color:var(--social); box-shadow:0 0 0 2px rgba(123,31,162,.15); }
    .layer-btn.active.phone { border-color:var(--phone); box-shadow:0 0 0 2px rgba(239,108,0,.15); }

    .status {
      display:none;
      margin-bottom:8px;
      padding:10px;
      border-radius:10px;
      background:rgba(0,0,0,.06);
      font-size:12px;
      line-height:1.25;
      white-space:pre-wrap;
      word-break:break-word;
    }
    .bottom-menu.has-status .status { display:block; }
    .status.error { background:rgba(211,47,47,.10); border:1px solid rgba(211,47,47,.25); color:#b71c1c; }
    .status.ok { background:rgba(46,125,50,.10); border:1px solid rgba(46,125,50,.25); color:#1b5e20; }
    .status.warn { background:rgba(251,192,45,.18); border:1px solid rgba(251,192,45,.55); color:#7a5a00; }
    .search-status { display:grid; gap:8px; color:#174d25; }
    .search-status-title { font-weight:900; font-size:13px; color:#0f3f1d; }
    .search-status-grid { display:grid; grid-template-columns:auto 1fr; gap:4px 10px; }
    .search-status-label { font-weight:900; color:#1b5e20; }
    .search-status-value { font-weight:700; color:#174d25; }
    .search-status-distance { display:inline-flex; align-items:center; gap:6px; width:max-content; padding:3px 8px; border-radius:999px; background:rgba(46,125,50,.12); border:1px solid rgba(46,125,50,.28); font-weight:900; color:#0b4c20; }

    .leaflet-top.leaflet-right { top:10px !important; right:10px !important; bottom:20px !important; }
    .leaflet-top.leaflet-right .leaflet-control { height:100% !important; margin:0 !important; }

    .list-panel {
      background:rgba(255,255,255,.95);
      backdrop-filter:blur(6px);
      border-radius:12px;
      box-shadow:0 6px 18px rgba(0,0,0,.18);
      overflow:hidden;
      font:14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
      width:380px;
      max-width:88vw;
      height:100% !important;
      display:flex;
      flex-direction:column;
    }
    .list-panel-header { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px; border-bottom:1px solid rgba(0,0,0,.08); }
    .list-panel-header .title { font-weight:800; font-size:14px; }
    .list-panel-header .actions { display:flex; gap:8px; align-items:center; }
    .list-panel-header button, .searchbar button, .sort-btn {
      border:1px solid var(--border);
      background:#fff;
      border-radius:10px;
      cursor:pointer;
      font-weight:800;
      color:var(--text);
    }
    .list-panel-header button { min-height:36px; min-width:36px; padding:6px 8px; }

    .searchbar { display:grid; grid-template-columns:1fr auto; gap:8px; padding:10px; border-bottom:1px solid rgba(0,0,0,.08); }
    .searchbar input { width:91%; border-radius:10px; border:1px solid rgba(0,0,0,.14); padding:8px 10px; font:14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
    .searchbar button { min-height:38px; min-width:38px; padding:8px 10px; }
    .searchbar button:disabled { opacity:.6; cursor:not-allowed; }

    .district-filter {
      display:grid;
      grid-template-columns:auto 1fr;
      gap:8px;
      align-items:center;
      padding:8px 10px;
      border-bottom:1px solid rgba(0,0,0,.08);
      background:rgba(0,0,0,.015);
    }
    .district-filter-logo { width:24px; height:24px; object-fit:contain; }
    .district-filter-generic { width:24px; height:24px; border-radius:999px; display:flex; align-items:center; justify-content:center; background:rgba(216,27,96,.09); border:1px solid rgba(216,27,96,.25); font-size:15px; }
    .district-filter select { width:100%; border-radius:10px; border:1px solid rgba(0,0,0,.14); padding:8px 10px; background:#fff; font-weight:700; color:var(--text); }

    .sortbar { display:grid; grid-template-columns:1fr 1fr 1fr; gap:6px; padding:8px 10px; border-bottom:1px solid rgba(0,0,0,.08); }
    .sort-btn { padding:8px 6px; font-size:12px; min-height:36px; }
    .sort-btn.active { border-color:var(--office); box-shadow:0 0 0 2px rgba(216,27,96,.12); }

    .list-panel-body { flex:1 1 auto; padding:8px; overflow:auto; }
    .section { margin-bottom:10px; border:1px solid rgba(0,0,0,.08); border-radius:10px; overflow:hidden; }
    .section > .section-head { padding:10px; background:rgba(0,0,0,.03); display:flex; align-items:center; justify-content:space-between; font-weight:800; gap:8px; }
    .section .count { font-weight:700; opacity:.75; font-size:12px; }
    .items details { border-top:1px solid rgba(0,0,0,.06); padding:0; }
    .items summary { list-style:none; cursor:pointer; padding:10px; display:flex; align-items:flex-start; gap:8px; user-select:none; }
    .items summary::-webkit-details-marker { display:none; }
    .items summary .dot { width:10px; height:10px; border-radius:999px; flex:0 0 auto; margin-top:4px; }
    .summary-main { min-width:0; flex:1 1 auto; }
    .summary-name { font-weight:800; overflow-wrap:anywhere; }
    .district-badge { display:inline-flex; align-items:center; gap:5px; margin-top:5px; padding:2px 7px; border-radius:999px; background:rgba(0,0,0,.055); font-size:11px; font-weight:800; color:#374151; }
    .district-icon { width:16px; height:16px; object-fit:contain; vertical-align:-3px; }
    .next-line { margin-top:5px; font-size:11px; color:var(--muted); font-weight:700; }
    .items .content { padding:0 10px 10px; font-size:12px; line-height:1.35; opacity:.96; }
    .items .content .line { margin-top:6px; }

 .language-badge { display:inline-flex; align-items:center; gap:5px; margin-top:5px; padding:2px 7px; border-radius:999px; background:rgba(0,107,107,.08); border:1px solid rgba(0,107,107,.22); font-size:11px; font-weight:900; color:#006b6b; }
 .items .content .line.info-address,
 .popup-grid.info-grid .info-address { color:#0b3f75; }
 .items .content .line.info-barriers,
 .popup-grid.info-grid .info-barriers { color:#8a005a; }
 .items .content .line.info-contact,
 .popup-grid.info-grid .info-contact { color:#006b6b; }
 .items .content .line.info-language,
 .popup-grid.info-grid .info-language { color:#005f73; }
 .items .content .line.info-note,
 .popup-grid.info-grid .info-note { color:#5b4b00; }
 .items .content .line.info-address strong,
 .items .content .line.info-barriers strong,
 .items .content .line.info-contact strong,
 .items .content .line.info-language strong,
 .items .content .line.info-note strong { color:inherit; }
 .items .content .line.no-map-point { color:#6b7280; font-style:italic; }
    .items .content .go { margin-top:10px; width:100%; border:1px solid rgba(0,0,0,.12); background:#fff; border-radius:10px; padding:10px; cursor:pointer; min-height:44px; font-weight:800; }

    .time-lines { margin-top:6px; display:grid; gap:3px; }
    .time-line { display:block; padding:3px 0; }
    .time-day { display:block; font-weight:800; white-space:nowrap; }
    .time-hours { display:block; margin-top:2px; overflow-wrap:anywhere; }
    .time-rel { font-weight:900; }
    .time-rel-today { color:var(--today); }
    .time-rel-tomorrow { color:var(--tomorrow); }
    .time-rel-aftertomorrow { color:var(--aftertomorrow); }

    .list-toggle { background:rgba(255,255,255,.92); backdrop-filter:blur(6px); border-radius:12px; box-shadow:0 4px 16px rgba(0,0,0,.18); padding:8px 10px; cursor:pointer; font:14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; min-height:40px; min-width:40px; font-weight:800; line-height:1; }

    .map-pin {
      width:30px;
      height:30px;
      border-radius:50% 50% 50% 0;
      transform:rotate(-45deg);
      border:2px solid #fff;
      box-shadow:0 2px 8px rgba(0,0,0,.35);
      display:flex;
      align-items:center;
      justify-content:center;
    }
    .map-pin span { transform:rotate(45deg); font-size:15px; line-height:1; }
    .pin-office { background:var(--office); }
    .pin-reg { background:var(--reg); }
    .pin-social { background:var(--social); }
    .pin-phone { background:var(--phone); }
    .pin-search { background:var(--search); }

    .popup-card { min-width:240px; max-width:320px; font:13px/1.35 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color:var(--text); }
    .popup-title { font-weight:900; font-size:15px; margin-bottom:7px; }
    .popup-type { display:inline-flex; align-items:center; gap:5px; padding:2px 7px; border-radius:999px; background:rgba(0,0,0,.055); font-size:11px; font-weight:900; margin-bottom:6px; }
 .popup-district-badge { margin:0 0 7px 0; }
 .popup-language-badge { margin:0 0 7px 0; }
    .popup-grid { display:grid; grid-template-columns:auto 1fr; gap:4px 10px; align-items:start; }
    .popup-label { font-weight:800; white-space:nowrap; color:#374151; }
    .popup-value { word-break:break-word; }
    .popup-times-title { font-weight:900; margin-top:8px; }
    .line-label { background:rgba(255,255,255,.92); border:1px solid rgba(0,0,0,.18); border-radius:10px; box-shadow:0 2px 10px rgba(0,0,0,.12); padding:4px 8px; font:12px/1.2 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color:#111; }

    @media (max-width:520px) {
      .list-panel { width:92vw; }
      .sortbar { grid-template-columns:1fr; }
      .time-line { display:block; }
    }
