:root {
  --brand:        #0A6B6F;
  --brand-deep:   #064A4D;
  --brand-tint:   #E1EFEF;
  --brand-line:   #B9D8D8;
  --map-fill:     #EFF6F6;

  --ok:           #16794A;
  --ok-tint:      #DFF1E7;
  --warn:         #8F5300;
  --warn-tint:    #FAEBD5;
  --rx:           #4A5A66;
  --rx-tint:      #E6EBEF;

  --ground:       #F4F8F8;
  --surface:      #FFFFFF;
  --sunken:       #EDF3F3;

  --ink:          #0D1B1E;
  --ink-2:        #3C5155;
  --ink-3:        #6A8085;
  --rule:         #D6E3E3;
  --rule-soft:    #E7EFEF;

  --shadow:       0 1px 2px rgba(13,27,30,.05), 0 8px 24px -12px rgba(13,27,30,.14);

  --sans: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --disp: "Bricolage Grotesque", var(--sans);
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --r: 10px;

  /* Jedna šířka pro hlavičku, obsah i patičku. */
  --sirka: 64rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand:      #55C6CA;
    --brand-deep: #8FE0E3;
    --brand-tint: #10292B;
    --brand-line: #1E4448;
  --map-fill:   #12262A;

    --ok:         #4FCB89;
    --ok-tint:    #0F2A1E;
    --warn:       #EDAA4C;
    --warn-tint:  #2A1F0C;
    --rx:         #9FB2BE;
    --rx-tint:    #1A242B;

    --ground:     #0A1214;
    --surface:    #111C1F;
    --sunken:     #162427;

    --ink:        #E8F1F1;
    --ink-2:      #A8BCBE;
    --ink-3:      #7A9296;
    --rule:       #223437;
    --rule-soft:  #1A2A2D;

    --shadow:     0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}

:root[data-theme="dark"] {
  --brand:      #55C6CA;
  --brand-deep: #8FE0E3;
  --brand-tint: #10292B;
  --brand-line: #1E4448;
  --map-fill:   #12262A;

  --ok:         #4FCB89;
  --ok-tint:    #0F2A1E;
  --warn:       #EDAA4C;
  --warn-tint:  #2A1F0C;
  --rx:         #9FB2BE;
  --rx-tint:    #1A242B;

  --ground:     #0A1214;
  --surface:    #111C1F;
  --sunken:     #162427;

  --ink:        #E8F1F1;
  --ink-2:      #A8BCBE;
  --ink-3:      #7A9296;
  --rule:       #223437;
  --rule-soft:  #1A2A2D;

  --shadow:     0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- obsah stránky ---------- */

.page { padding: 1.4rem 1.1rem 1.8rem; }
@media (min-width: 46rem) { .page { padding: 1.8rem 1.9rem 2.2rem; } }

.crumbs {
  font-size: .78rem; color: var(--ink-3); margin-bottom: .9rem;
  display: flex; gap: .4rem; flex-wrap: wrap;
}
.crumbs a { color: var(--ink-3); }

h2.title {
  font-family: var(--disp); font-weight: 700;
  font-size: clamp(1.5rem, 4.2vw, 2.05rem); line-height: 1.15;
  letter-spacing: -.028em; margin: 0 0 .3rem; text-wrap: balance;
}
.subtitle { margin: 0 0 1.1rem; color: var(--ink-2); font-size: .97rem; }

/* ---------- stavová pilulka ---------- */

.pill {
  display: inline-flex; align-items: center; gap: .42rem;
  padding: .3rem .68rem .3rem .55rem;
  border-radius: 999px; font-size: .84rem; font-weight: 600;
  border: 1px solid transparent;
}
.pill .dot { width: .48rem; height: .48rem; border-radius: 50%; flex: none; }
.pill.is-open   { background: var(--ok-tint);   color: var(--ok);   border-color: color-mix(in oklab, var(--ok) 25%, transparent); }
.pill.is-open .dot   { background: var(--ok); }
.pill.is-closed { background: var(--sunken);    color: var(--ink-2); border-color: var(--rule); }
.pill.is-closed .dot { background: var(--ink-3); }
.pill.is-warn   { background: var(--warn-tint); color: var(--warn); border-color: color-mix(in oklab, var(--warn) 25%, transparent); }
.pill.is-warn .dot   { background: var(--warn); }
.pill.is-rx     { background: var(--rx-tint);   color: var(--rx);   border-color: color-mix(in oklab, var(--rx) 22%, transparent); }
.pill.is-rx .dot     { background: var(--rx); }

.pill-row { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: 1.15rem; }

/* ---------- panel = sekce s hairline pravítkem ---------- */

.panel {
  border: 1px solid var(--rule);
  border-top: 2px solid var(--brand);
  border-radius: var(--r);
  background: var(--surface);
  padding: 1rem 1.05rem 0.85rem;
  margin-bottom: 1rem;
}
.panel > .label {
  font-family: var(--mono); font-size: .7rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--brand); margin-bottom: .7rem;
  display: flex; align-items: center; gap: .5rem;
}
.panel > .label .sec {
  font-variant-numeric: tabular-nums;
  padding: .06rem .34rem; border-radius: 3px;
  background: var(--brand-tint); color: var(--brand);
  letter-spacing: .02em;
}

/* ---------- razítko zdroje ---------- */

.stamp {
  margin-top: .85rem; padding-top: .6rem;
  border-top: 1px dashed var(--rule);
  font-family: var(--mono); font-size: .705rem; line-height: 1.5;
  color: var(--ink-3);
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
}
.stamp a { color: var(--ink-3); }
.stamp .sep { opacity: .45; }

/* ---------- datové tabulky ---------- */

.datatable { width: 100%; }
.datatable table {
  width: 100%; border-collapse: collapse;
  font-size: .9rem; font-variant-numeric: tabular-nums;
}
.datatable th, .datatable td {
  text-align: left; padding: .42rem 0;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: baseline;
}
.datatable tr:last-child th, .datatable tr:last-child td { border-bottom: 0; }
.datatable th { font-weight: 500; color: var(--ink-3); width: 40%; }
.datatable td { color: var(--ink); }
.datatable td.num { font-family: var(--mono); font-size: .85rem; }
.datatable tr.today th, .datatable tr.today td { color: var(--ink); font-weight: 700; }
.datatable tr.today th::after { content: " · dnes"; font-weight: 400; color: var(--brand); }
.datatable td.shut { color: var(--ink-3); }

.kv { display: grid; grid-template-columns: minmax(7rem, auto) 1fr; gap: .38rem .9rem; font-size: .9rem; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.kv dd.mono { font-family: var(--mono); font-size: .84rem; }

/* ---------- odpověď nahoře ---------- */

.answer {
  border-radius: var(--r);
  background: var(--brand-tint);
  border: 1px solid var(--brand-line);
  padding: 1.05rem 1.1rem;
  margin-bottom: 1.1rem;
}
.answer .lead {
  font-family: var(--disp); font-weight: 600;
  font-size: clamp(1.05rem, 2.8vw, 1.22rem); line-height: 1.35;
  letter-spacing: -.015em; margin: 0 0 .5rem; color: var(--ink);
  text-wrap: balance;
}
.answer p { margin: 0; font-size: .93rem; color: var(--ink-2); }

blockquote.cite {
  margin: 0; padding: .1rem 0 .1rem .95rem;
  border-left: 3px solid var(--brand-line);
  font-size: .93rem; color: var(--ink);
}
blockquote.cite p { margin: 0 0 .55rem; }
blockquote.cite p:last-child { margin-bottom: 0; }

/* ---------- seznam lékáren ---------- */

.plist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.plist li {
  display: flex; gap: .9rem; align-items: flex-start;
  padding: .78rem 0; border-bottom: 1px solid var(--rule-soft);
}
.plist li:last-child { border-bottom: 0; }
.plist .dist {
  font-family: var(--mono); font-size: .78rem; color: var(--ink-3);
  flex: none; width: 3.4rem; padding-top: .12rem; text-align: right;
  font-variant-numeric: tabular-nums;
}
.plist .body { min-width: 0; flex: 1; }
.plist .nm { font-weight: 600; font-size: .96rem; display: block; color: var(--ink); text-decoration: none; }
.plist .nm:hover { color: var(--brand); }
.plist .meta { font-size: .82rem; color: var(--ink-3); margin-top: .1rem; }
.plist .state { flex: none; padding-top: .1rem; }

/* ---------- filtry ---------- */

.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chip {
  font: inherit; font-size: .84rem; font-weight: 500;
  padding: .34rem .78rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink-2);
}
.chip[aria-pressed="true"] {
  background: var(--brand); border-color: var(--brand);
  color: var(--surface);
}

/* ---------- affiliate blok ---------- */

.offer {
  border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--sunken); padding: .95rem 1rem; margin-bottom: 1rem;
}
.offer .head {
  font-family: var(--mono); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .09em; color: var(--ink-3); margin-bottom: .7rem;
}
.offer ul { list-style: none; margin: 0 0 .8rem; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.offer li { display: flex; align-items: center; gap: .7rem; font-size: .9rem; }
.offer .shop { flex: 1; font-weight: 600; }
.offer .price { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.offer .go {
  font-size: .82rem; font-weight: 600; text-decoration: none;
  padding: .3rem .7rem; border-radius: 999px;
  background: var(--brand); color: #fff;
}
.legal {
  font-size: .74rem; line-height: 1.5; color: var(--ink-3);
  border-top: 1px solid var(--rule); padding-top: .6rem;
}

/* ---------- blokovaná monetizace u Rx ---------- */

.blocked {
  border: 1px dashed var(--rule); border-radius: var(--r);
  background: transparent; padding: .9rem 1rem; margin-bottom: 1rem;
  font-size: .86rem; color: var(--ink-2);
  display: flex; gap: .7rem; align-items: flex-start;
}
.blocked b { color: var(--ink); font-weight: 600; }

/* ---------- výpadek ---------- */

.watch {
  display: flex; gap: .55rem; flex-wrap: wrap; align-items: center;
  margin-top: .3rem;
}
.watch input {
  font: inherit; font-size: .9rem; flex: 1 1 12rem; min-width: 0;
  padding: .5rem .75rem; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink);
}
.watch button {
  font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
  padding: .5rem 1rem; border-radius: 999px; border: 0;
  background: var(--brand); color: #fff;
}

.alt { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.alt li {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 0; border-bottom: 1px solid var(--rule-soft); font-size: .9rem;
}
.alt li:last-child { border-bottom: 0; }
.alt .n { flex: 1; font-weight: 600; }
.alt .s { font-family: var(--mono); font-size: .8rem; color: var(--ink-3); }

/* ---------- rozvržení ostrého webu ---------- */

.wrap { max-width: var(--sirka); margin: 0 auto; }



.tiles { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin-bottom: 1.5rem; }
.tile {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--surface); padding: .9rem 1rem;
}
.tile:hover { border-color: var(--brand); }
.tile b { display: block; font-family: var(--disp); font-weight: 700; font-size: 1.02rem; letter-spacing: -.015em; }
.tile span { display: block; font-size: .85rem; color: var(--ink-3); margin-top: .15rem; }
.tile .big { font-family: var(--mono); font-size: 1.5rem; color: var(--brand); font-variant-numeric: tabular-nums; }

.cols { columns: 2; column-gap: 1.5rem; font-size: .92rem; }
@media (min-width: 46rem) { .cols { columns: 3; } }
.cols a { display: block; break-inside: avoid; padding: .15rem 0; }

.beta-bar {
  background: var(--warn-tint); color: var(--warn); text-align: center;
  font-family: var(--mono); font-size: .74rem; padding: .4rem 1rem;
  border-bottom: 1px solid color-mix(in oklab, var(--warn) 25%, transparent);
}
.empty { color: var(--ink-3); font-size: .92rem; padding: 1.5rem 0; }

/* ================= hlavička ================= */

.site-bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding: .65rem 1.1rem;
}
.bar-inner {
  max-width: var(--sirka); margin: 0 auto;
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
}

.logo {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--disp); font-weight: 800; font-size: 1.22rem;
  letter-spacing: -.035em; color: var(--ink); text-decoration: none;
  flex: none;
}
.logo .mark { width: 1.7rem; height: 1.7rem; flex: none; }
.logo:hover .mark { filter: brightness(1.08); }

.search {
  flex: 1 1 22rem; min-width: 0;
  display: flex; align-items: center; gap: .5rem;
  background: var(--surface);
  border: 2px solid var(--brand);
  border-radius: 999px;
  padding: .28rem .32rem .28rem .8rem;
  box-shadow: 0 1px 0 color-mix(in oklab, var(--brand) 12%, transparent);
}
.search:focus-within { box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 22%, transparent); }
.search .ico { width: 1.05rem; height: 1.05rem; flex: none; stroke: var(--brand); stroke-width: 2.3; fill: none; stroke-linecap: round; }
.search input {
  font: inherit; font-size: .92rem; border: 0; background: transparent;
  color: var(--ink); flex: 1; min-width: 0; outline: none; padding: .25rem 0;
}
.search input::placeholder { color: var(--ink-3); }
.search button {
  font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer;
  border: 0; border-radius: 999px; padding: .42rem 1rem;
  background: var(--brand); color: #fff; flex: none;
}
.search button:hover { background: var(--brand-deep); }

.near-link {
  display: inline-flex; align-items: center; gap: .35rem; flex: none;
  font-size: .88rem; font-weight: 600; text-decoration: none;
  color: var(--brand); padding: .45rem .8rem;
  border: 1px solid var(--brand-line); border-radius: 999px;
  background: var(--brand-tint);
}
.near-link:hover { border-color: var(--brand); }
.near-link .ico { width: 1rem; height: 1rem; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 34rem) { .near-link span { display: none; } }

/* ================= patička ================= */


.site-foot {
  border-top: 1px solid var(--rule); margin-top: 3rem;
  padding: 1.4rem 1.1rem 2.5rem;
}
.site-foot nav { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-bottom: .7rem; font-size: .88rem; }
.site-foot nav a { color: var(--ink-2); text-decoration: none; }
.site-foot nav a:hover { color: var(--brand); }
.site-foot .fine { margin: 0; font-size: .72rem; line-height: 1.6; color: var(--ink-3); }
.site-foot .fine a { color: var(--ink-3); }

/* ================= ikony ================= */

.ico { width: 1.15rem; height: 1.15rem; flex: none;
       fill: none; stroke: currentColor; stroke-width: 1.9;
       stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: .95rem; height: .95rem; stroke-width: 2.1; }
.panel > .label .ico { stroke: var(--brand); }

/* ================= hero ================= */

.hero { margin-bottom: 1.6rem; }
.hero-home .title { font-size: clamp(1.8rem, 5.5vw, 2.6rem); }
.hero-home .subtitle { max-width: 34rem; font-size: 1.02rem; }

.hero-emerg {
  display: flex; gap: 1rem; align-items: flex-start;
  border: 1px solid color-mix(in oklab, var(--warn) 30%, transparent);
  background: var(--warn-tint);
  border-radius: var(--r); padding: 1.1rem 1.2rem;
}
.hero-emerg .hero-ico {
  width: 2.6rem; height: 2.6rem; flex: none; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--warn); color: var(--warn-tint);
}
.hero-emerg .hero-ico .ico { width: 1.5rem; height: 1.5rem; fill: currentColor; stroke: none; }
.hero-emerg .title { margin: 0 0 .25rem; font-size: clamp(1.3rem, 4vw, 1.7rem); }
.hero-emerg .subtitle { margin: 0; }

/* ================= dlaždice ================= */

.tiles { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-bottom: 1.6rem; }
.tile {
  position: relative; display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--surface); padding: 1.05rem 1.1rem 1rem;
  transition: border-color .12s, transform .12s;
}
.tile:hover { border-color: var(--brand); transform: translateY(-1px); }
.tile .t-ico {
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem;
  border-radius: 7px; margin-bottom: .7rem;
  background: var(--brand-tint); color: var(--brand);
}
.tile b { display: block; font-family: var(--disp); font-weight: 700; font-size: 1.05rem; letter-spacing: -.018em; }
.tile .sub { display: block; font-size: .84rem; color: var(--ink-3); margin-top: .2rem; }
.tile .big {
  display: block; font-family: var(--mono); font-weight: 500;
  font-size: 2rem; line-height: 1.05; color: var(--brand);
  font-variant-numeric: tabular-nums; margin-bottom: .1rem;
}
.tile.t-emerg .t-ico { background: var(--warn-tint); color: var(--warn); }
.tile.t-emerg .t-ico .ico { fill: currentColor; stroke: none; }
.tile.t-emerg:hover { border-color: var(--warn); }

/* ================= odznaky ================= */

.badges { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem; font-weight: 600;
  padding: .3rem .7rem; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--sunken); color: var(--ink-2);
}
.badge .ico { width: .95rem; height: .95rem; }
.badge.b-emerg {
  background: var(--warn-tint); color: var(--warn);
  border-color: color-mix(in oklab, var(--warn) 28%, transparent);
}
.badge.b-emerg .ico { fill: currentColor; stroke: none; }

/* ================= detail ================= */

.detail-head { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.detail-head .title, .detail-head .subtitle { margin-bottom: .2rem; }
.pill.big { font-size: .9rem; padding: .42rem .9rem .42rem .75rem; margin-top: .4rem; }

.split { display: grid; gap: 1rem; }
@media (min-width: 52rem) { .split { grid-template-columns: 1fr 1fr; align-items: start; } }

.mapbox { border-radius: 8px; overflow: hidden; border: 1px solid var(--rule); background: var(--sunken); }
.mapbox iframe { display: block; width: 100%; height: 15rem; border: 0; }

.maplinks { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.maplinks a {
  display: inline-flex; align-items: center; gap: .38rem;
  font-size: .84rem; font-weight: 600; text-decoration: none;
  padding: .38rem .8rem; border-radius: 999px;
  border: 1px solid var(--rule); color: var(--ink-2); background: var(--surface);
}
.maplinks a:hover { border-color: var(--brand); color: var(--brand); }
.maplinks .ico { width: .95rem; height: .95rem; }

.kv dt { display: inline-flex; align-items: center; gap: .35rem; }

/* ================= seznamy ================= */

.plist .rank {
  flex: none; width: 1.9rem; height: 1.9rem; border-radius: 6px;
  display: grid; place-items: center; margin-top: .1rem;
  background: var(--warn-tint); color: var(--warn);
}
.plist .rank .ico { width: 1rem; height: 1rem; fill: currentColor; stroke: none; }
.plist.tight li { padding: .55rem 0; }
.plist .tel {
  display: grid; place-items: center; width: 2rem; height: 2rem;
  border-radius: 999px; border: 1px solid var(--rule); color: var(--brand);
}
.plist .tel:hover { border-color: var(--brand); background: var(--brand-tint); }

.cols a { text-decoration: none; color: var(--ink); }
.cols a:hover { color: var(--brand); }
.cols em { font-style: normal; color: var(--ink-3); font-size: .85em; font-variant-numeric: tabular-nums; }

.crumbs span { opacity: .5; }

/* ================= hledání v okolí ================= */

.geo-card {
  display: flex; gap: 1rem; align-items: flex-start;
  border: 1px solid var(--brand-line); background: var(--brand-tint);
  border-radius: var(--r); padding: 1.1rem 1.2rem; margin-bottom: 1.4rem;
}
.geo-ico { width: 2.2rem; height: 2.2rem; flex: none; color: var(--brand); stroke-width: 1.7; }
.geo-body { flex: 1; min-width: 0; }
.btn-primary {
  font: inherit; font-size: .95rem; font-weight: 700; cursor: pointer;
  border: 0; border-radius: 999px; padding: .6rem 1.3rem;
  background: var(--brand); color: #fff;
}
.btn-primary:hover { background: var(--brand-deep); }
.onlyopen { display: inline-flex; align-items: center; gap: .4rem; margin-left: .9rem; font-size: .88rem; color: var(--ink-2); cursor: pointer; }
.geo-status { margin: .7rem 0 0; font-size: .88rem; color: var(--ink-2); min-height: 1.2em; }

/* ================= bodová mapa Česka ================= */

.mapwrap { padding-bottom: 1rem; }
.map-lede { margin: 0 0 .9rem; font-size: .88rem; color: var(--ink-3); }

.cr-map { display: block; width: 100%; height: auto; overflow: visible; }
.cr-map use { fill: var(--brand); opacity: .5; transition: opacity .12s, fill .12s; }
.cr-map .reg { cursor: pointer; }
.cr-map .reg:hover use,
.cr-map .reg:focus-visible use { opacity: 1; fill: var(--brand-deep); }

/* Zvýraznění kraje při najetí na jeho položku v seznamu pod mapou */
.map-legend { margin-top: 1rem; }
.map-legend .leg { padding: .12rem 0; }
.map-legend .leg:hover { color: var(--brand); }

.mapwrap:has(.leg:hover) .cr-map use { opacity: .16; }
.mapwrap:has(.leg-CZ-10:hover) .reg-CZ-10 use,
.mapwrap:has(.leg-CZ-20:hover) .reg-CZ-20 use,
.mapwrap:has(.leg-CZ-31:hover) .reg-CZ-31 use,
.mapwrap:has(.leg-CZ-32:hover) .reg-CZ-32 use,
.mapwrap:has(.leg-CZ-41:hover) .reg-CZ-41 use,
.mapwrap:has(.leg-CZ-42:hover) .reg-CZ-42 use,
.mapwrap:has(.leg-CZ-51:hover) .reg-CZ-51 use,
.mapwrap:has(.leg-CZ-52:hover) .reg-CZ-52 use,
.mapwrap:has(.leg-CZ-53:hover) .reg-CZ-53 use,
.mapwrap:has(.leg-CZ-63:hover) .reg-CZ-63 use,
.mapwrap:has(.leg-CZ-64:hover) .reg-CZ-64 use,
.mapwrap:has(.leg-CZ-71:hover) .reg-CZ-71 use,
.mapwrap:has(.leg-CZ-72:hover) .reg-CZ-72 use,
.mapwrap:has(.leg-CZ-80:hover) .reg-CZ-80 use { opacity: 1; fill: var(--brand-deep); }

@media (prefers-reduced-motion: reduce) { .cr-map use { transition: none; } }

/* ================= souhlas s měřením ================= */

/* Karta uprostřed obrazovky. Granulární volba je na /soukromi - u jediné
   volitelné kategorie by rozklikávací nastavení bylo jen na obtíž.
   Barevně vystupuje jen souhlas; odmítnutí ale musí zůstat stejně velké,
   stejně tučné a na stejném místě, jinak jde o zakázaný dark pattern. */
.cc {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 1.25rem;
  background: rgba(13, 27, 30, .32);
  backdrop-filter: blur(2px);
  animation: cc-in .16s ease-out;
}
@keyframes cc-in { from { opacity: 0 } to { opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .cc { animation: none } }

.cc-in {
  width: 100%; max-width: 27rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45);
  padding: 1.15rem 1.25rem 1.15rem;
  display: grid; gap: .85rem;
}
.cc-text { margin: 0; font-size: .88rem; line-height: 1.55; color: var(--ink-2); }
.cc-text a { color: var(--brand); }

.cc-btns { display: flex; gap: .4rem; align-items: center; justify-content: flex-end; }
.cc-b {
  font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer;
  padding: .55rem 1.25rem; border-radius: 999px; border: 0;
  background: transparent; color: var(--ink-2);
}
.cc-no:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.cc-yes { background: var(--brand); color: #fff; }
.cc-yes:hover { background: var(--brand-deep); }

@media (max-width: 30rem) { .cc-btns { justify-content: stretch; } .cc-b { flex: 1; } }

/* ---------- obrys státu a štítky měst ---------- */
/* Pozor: SVG bez platného fill spadne na výchozí černou, proto plná hodnota
   z tokenu, ne color-mix s transparent. */
.cr-border {
  fill: var(--map-fill);
  stroke: var(--brand-line);
  stroke-width: 2.4;
  stroke-linejoin: round;
}
.cr-cities { pointer-events: none; }
.cr-cities .cr-dot { fill: var(--surface); stroke: var(--ink); stroke-width: 2.6; }
.cr-cities text {
  font-family: var(--sans); font-size: 21px; font-weight: 700;
  fill: var(--ink); paint-order: stroke;
  stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round;
}

/* ================= mapa lékáren (Leaflet) ================= */

.mapa {
  height: 26rem; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--rule); background: var(--sunken);
  margin-bottom: 1.1rem;
}
.mapa.vysoka { height: 32rem; }
@media (max-width: 40rem) { .mapa, .mapa.vysoka { height: 20rem; } }

.leaflet-container { font: inherit; background: var(--sunken); }
.leaflet-popup-content-wrapper { border-radius: 10px; }
.leaflet-popup-content { margin: .7rem .85rem; font-size: .86rem; line-height: 1.55; }
.leaflet-popup-content b { font-family: var(--disp); font-size: .95rem; }
.pop-adr, .pop-km { color: #667; }
.pop-open { color: #16794A; font-weight: 700; }
.pop-shut { color: #667; }
.pop-go { display: inline-block; margin-top: .3rem; font-weight: 700; }

/* Značky kreslíme sami, ať sedí do palety a nemusíme tahat obrázky. */
.pin {
  display: block; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand); border: 3px solid #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,.35);
}
.pin-shut { background: #94A7A9; }
.pin-emerg { background: #C4700A; }
.pin-me {
  width: 22px; height: 22px; background: #1D6FE0;
  box-shadow: 0 0 0 6px rgba(29,111,224,.22), 0 1px 5px rgba(0,0,0,.35);
}

.maplegend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: var(--ink-3); margin: -.5rem 0 1.2rem; }
.maplegend span { display: inline-flex; align-items: center; gap: .38rem; }
.maplegend i { width: .7rem; height: .7rem; border-radius: 50%; display: inline-block; }

/* filtr obcí nad výpisem */
.cityfilter { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cityfilter button {
  font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer;
  padding: .32rem .75rem; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink-2);
}
.cityfilter button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.plist li[hidden] { display: none; }

.tile.t-cal .t-ico { background: color-mix(in oklab, var(--ok) 14%, var(--surface)); color: var(--ok); }
.tile.t-cal .big { color: var(--ok); }
.tile.t-cal:hover { border-color: var(--ok); }

/* Dlaždice mají stejnou výšku i s různě dlouhým textem. */
.tile { display: flex; flex-direction: column; min-height: 10.5rem; }
.tile .sub { margin-top: auto; padding-top: .25rem; }
.tile .big { font-size: 1.9rem; }
.tile.t-near .big { font-family: var(--disp); font-size: 1.35rem; letter-spacing: -.02em; }
