:root {
  --ink: #17251b;
  --green: #114d31;
  --green-dark: #0a3823;
  --cream: #f5f0e5;
  --paper: #fffdf7;
  --gold: #f4b800;
  --category-all: #5b6560;
  --category-tank: #f4b800;
  --category-gambrinus: #b82434;
  --category-radegast: #a94700;
  --category-kozel: #315f9f;
  --category-approved: #167249;
  --line: rgba(23, 37, 27, 0.16);
  --muted: #667168;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: Manrope, system-ui, sans-serif; }
a { color: inherit; }
button, input, select { font: inherit; }
.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; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 clamp(18px, 4vw, 64px);
  background: rgba(255, 253, 247, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand { display: flex; align-items: center; gap: 9px; margin-right: auto; text-decoration: none; font-size: 19px; font-weight: 800; letter-spacing: -1px; }
.brand em { color: #a97800; font-style: normal; }
.brand-mark { width: 24px; height: 30px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 5px 5px 8px 8px; transform: rotate(-3deg); }
.brand-mark span { width: 12px; height: 16px; background: var(--gold); border-radius: 3px 3px 5px 5px; box-shadow: inset 0 4px white; }
.topbar nav { display: flex; gap: 24px; }
.topbar nav a { text-decoration: none; font-size: 12px; font-weight: 700; }
.topbar nav a:hover { color: #8d6800; }
.language-switch { display: flex; align-items: center; padding: 2px; background: var(--cream); border: 1px solid var(--line); border-radius: 999px; }
.language-switch a { min-width: 31px; padding: 5px 7px; border-radius: 999px; color: var(--muted); text-align: center; text-decoration: none; font-size: 10px; font-weight: 800; }
.language-switch a.active { background: var(--green); color: white; }
.language-switch a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.age-pill { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 10px; font-weight: 800; }

.finder, .list-section { max-width: 1500px; margin: auto; padding: 36px clamp(18px, 4vw, 64px); }
.eyebrow { margin: 0 0 8px; color: #49775e; font-size: 10px; font-weight: 800; letter-spacing: 0.18em; }
.finder-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.finder-heading h1, .section-heading h2 { font-family: "Source Serif 4", Georgia, serif; }
.finder-heading h1 { margin: 0; font-size: clamp(38px, 4vw, 58px); line-height: 0.95; letter-spacing: -0.045em; }
.finder-summary { max-width: 650px; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.result-count { min-width: 132px; display: flex; align-items: center; gap: 10px; padding: 12px 15px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; }
.result-count:hover { border-color: var(--green); }
.result-count strong { font-family: "Source Serif 4", Georgia, serif; font-size: 28px; line-height: 1; }
.result-count span { color: var(--muted); font-size: 10px; line-height: 1.25; }
.category-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.category-tabs a { min-height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 2px solid transparent; color: white; text-decoration: none; font-size: 11px; font-weight: 800; transition: filter 120ms ease, box-shadow 120ms ease; }
.category-tabs a:hover { filter: brightness(0.9); }
.category-tabs a:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.category-tabs a.active { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--paper); }
.category-tabs strong { min-width: 24px; padding: 3px 6px; background: rgba(255, 255, 255, 0.2); border-radius: 999px; text-align: center; font-size: 9px; }
.category-tabs .category-all { background: var(--category-all); }
.category-tabs .category-tank { background: var(--category-tank); color: var(--ink); }
.category-tabs .category-tank strong { background: rgba(23, 37, 27, 0.12); }
.category-tabs .category-gambrinus { background: var(--category-gambrinus); }
.category-tabs .category-radegast { background: var(--category-radegast); }
.category-tabs .category-kozel { background: var(--category-kozel); }
.category-tabs .category-approved { background: var(--category-approved); }

.map-shell { position: relative; }
.map-search-toggle { position: absolute; z-index: 900; top: 12px; right: 12px; min-height: 38px; padding: 0 16px; border: 1px solid var(--line); background: var(--paper); color: var(--green); box-shadow: 3px 3px 0 rgba(23, 37, 27, 0.2); cursor: pointer; font-size: 10px; font-weight: 800; }
.map-search-toggle:hover, .map-search-toggle[aria-expanded="true"] { background: var(--green); color: white; }
.map-search-panel { position: absolute; z-index: 890; top: 58px; right: 12px; width: min(860px, calc(100% - 24px)); padding: 12px; background: rgba(255, 253, 247, 0.98); border: 1px solid var(--line); box-shadow: 7px 7px 0 rgba(23, 37, 27, 0.24); }
.map-search-panel[hidden], .route-hud[hidden] { display: none; }
.route-hud.concealed-by-search { display: none; }

.filters { display: grid; grid-template-columns: minmax(250px, 1.6fr) minmax(165px, 0.75fr) minmax(165px, 0.75fr) auto auto; gap: 8px; margin-bottom: 12px; }
.map-search-panel .filters { margin-bottom: 0; }
.filters input:not([type="hidden"]), .filters select { width: 100%; height: 44px; padding: 0 13px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); outline: none; }
.filters input:focus, .filters select:focus { border-color: var(--green); box-shadow: 0 0 0 2px rgba(17, 77, 49, 0.12); }
.search-field { position: relative; }
.search-field > span:not(.sr-only) { position: absolute; top: 6px; left: 14px; color: var(--muted); font-size: 24px; }
.search-field input { padding-left: 43px !important; }
.filters button { height: 44px; padding: 0 22px; border: 0; background: var(--green); color: white; cursor: pointer; font-size: 11px; font-weight: 800; }
.filters button:hover { background: var(--green-dark); }
.clear { min-height: 44px; display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line); background: var(--paper); color: var(--green); font-size: 11px; font-weight: 700; }

.route-hud { position: absolute; z-index: 880; top: 12px; left: 60px; width: min(520px, calc(100% - 150px)); max-height: calc(100% - 24px); overflow: auto; padding: 13px; background: rgba(255, 253, 247, 0.98); border: 1px solid var(--line); box-shadow: 7px 7px 0 rgba(23, 37, 27, 0.24); }
.route-hud-heading { display: flex; align-items: center; gap: 14px; }
.route-hud-title { min-width: 0; flex: 1; }
.route-hud-heading span, .route-options legend { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.route-hud-heading strong { display: block; overflow: hidden; color: var(--green); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.route-hud-actions { display: flex; align-items: center; gap: 6px; }
#toggle-route, #reset-route { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); background: var(--cream); color: var(--green); cursor: pointer; font-size: 9px; font-weight: 800; }
#toggle-route { min-width: 34px; padding: 0; font-size: 17px; line-height: 1; }
#toggle-route:hover, #reset-route:hover:not(:disabled) { border-color: var(--green); }
#reset-route:disabled { cursor: default; opacity: 0.45; }
.route-hud.minimized { width: min(430px, calc(100% - 150px)); overflow: visible; }
.route-hud.minimized > :not(.route-hud-heading) { display: none; }
.route-options { min-width: 0; margin: 12px 0 0; padding: 0; border: 0; }
.route-options > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.route-options button { min-height: 38px; padding: 6px 8px; border: 1px solid var(--line); background: var(--cream); color: var(--green); cursor: pointer; font-size: 9px; font-weight: 800; line-height: 1.2; }
.route-options button:hover:not(:disabled), .route-options button[aria-pressed="true"] { border-color: var(--green); background: var(--green); color: white; }
.route-options button:disabled { cursor: wait; opacity: 0.55; }
.route-attribution { display: block; margin-top: 7px; color: #7b857e; font-size: 8px; }
.route-attribution a { color: inherit; }
.route-status { margin-top: 10px; padding: 9px 11px; border-left: 3px solid var(--green); background: rgba(22, 114, 73, 0.09); color: var(--ink); font-size: 11px; line-height: 1.5; }
.route-hud.awaiting-finish { width: auto; max-width: calc(100% - 80px); overflow: visible; padding: 0; border: 0; background: transparent; box-shadow: none; }
.route-hud.awaiting-finish > :not(.route-status) { display: none; }
.route-hud.awaiting-finish .route-status { margin: 0; padding: 11px 15px; border: 0; background: var(--green); color: white; box-shadow: 5px 5px 0 rgba(23, 37, 27, 0.24); font-weight: 800; }
.route-status[data-kind="warning"] { border-color: #a97800; background: rgba(244, 184, 0, 0.12); }
.route-status[data-kind="error"] { border-color: var(--category-gambrinus); background: rgba(184, 36, 52, 0.08); }
.route-length { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 10px; padding: 9px 11px; border: 1px solid var(--line); background: var(--cream); }
.route-length[hidden] { display: none; }
.route-length span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.route-length strong { color: var(--green); font-family: "Source Serif 4", Georgia, serif; font-size: 19px; }
.route-results { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.route-results > strong { color: var(--green); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; }
.route-results ol { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 7px 0 0; padding-left: 20px; }
.route-results li { padding-left: 2px; font-size: 10px; }
.route-results li::marker { color: #a97800; font-weight: 800; }
.route-endpoint-icon { display: grid; place-items: center; width: 28px; height: 28px; border: 3px solid var(--paper); border-radius: 50%; background: var(--green); color: white; box-shadow: 0 2px 8px rgba(23, 37, 27, 0.35); font-size: 11px; font-weight: 800; }
.route-endpoint-finish { background: var(--category-gambrinus); }
.route-stop-icon { display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid var(--ink); border-radius: 50%; background: var(--gold); color: var(--ink); box-shadow: 0 2px 7px rgba(23, 37, 27, 0.3); font-size: 10px; font-weight: 800; }

#venue-map { height: min(82vh, 900px); min-height: 600px; border: 1px solid var(--line); box-shadow: 0 12px 36px rgba(23, 37, 27, 0.08); }
.beer-pin-wrap { background: transparent; border: 0; }
.beer-pin { display: block; width: 32px; height: 42px; overflow: visible; }
.beer-pin-body { fill: var(--gold); }
.beer-pin-dot { fill: var(--ink); }
.gambrinus-pin .beer-pin-body { fill: var(--category-gambrinus); }
.radegast-pin .beer-pin-body { fill: var(--category-radegast); }
.kozel-pin .beer-pin-body { fill: var(--category-kozel); }
.gambrinus-pin .beer-pin-dot, .radegast-pin .beer-pin-dot, .kozel-pin .beer-pin-dot { fill: white; }
.approved-pin .beer-pin-body { fill: var(--category-approved); }
.approved-pin .beer-pin-dot { fill: var(--gold); }
.mixed-pin .beer-pin-outline { fill: none; stroke: var(--ink); stroke-width: 1; }
.mixed-pin .beer-pin-dot { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: rgba(255, 253, 247, 0.84); }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background: #59615c; color: white; font-family: Manrope, sans-serif; font-size: 11px; font-weight: 800; }
.leaflet-control-scale-line { padding: 2px 7px; border-color: var(--ink); background: rgba(255, 253, 247, 0.9); color: var(--ink); font-family: Manrope, sans-serif; font-size: 10px; font-weight: 700; }
.leaflet-popup-content-wrapper { border-radius: 4px; background: var(--paper); color: var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.leaflet-popup-content { min-width: 200px; display: flex; flex-direction: column; gap: 7px; }
.leaflet-popup-content strong { font-family: "Source Serif 4", serif; font-size: 18px; }
.leaflet-popup-content span { color: var(--muted); font-size: 12px; }
.leaflet-popup-content small { color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.leaflet-popup-content a { color: var(--green); font-size: 11px; font-weight: 800; }
.popup-links { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.route-pin-action { width: 100%; margin-top: 4px; padding: 9px 11px; border: 0; background: var(--green); color: white; cursor: pointer; font-family: Manrope, sans-serif; font-size: 10px; font-weight: 800; }
.route-pin-action[hidden] { display: none; }
.route-pin-action:hover { background: var(--green-dark); }
.route-pin-action:disabled { cursor: default; opacity: 0.55; }
.leaflet-popup-tip { background: var(--paper); }

.list-section { padding-top: 24px; }
.directory-page { min-height: calc(100vh - 122px); }
.directory-page .list-section { padding-top: 40px; padding-bottom: 56px; }
.back-to-map { display: inline-block; margin-bottom: 22px; color: var(--green); font-size: 11px; font-weight: 800; text-decoration: none; }
.back-to-map:hover { text-decoration: underline; }
.directory-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.directory-heading h1 { margin: 0; font-family: "Source Serif 4", Georgia, serif; font-size: clamp(38px, 4vw, 58px); line-height: 0.95; letter-spacing: -0.045em; }
.directory-heading p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.directory-count { min-width: 132px; display: flex; align-items: center; gap: 10px; padding: 12px 15px; background: var(--paper); border: 1px solid var(--line); }
.directory-count strong { font-family: "Source Serif 4", Georgia, serif; font-size: 28px; line-height: 1; }
.directory-count span { color: var(--muted); font-size: 10px; line-height: 1.25; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: clamp(30px, 3vw, 44px); line-height: 1; letter-spacing: -0.035em; }
.section-heading > p { margin: 0; color: var(--muted); font-size: 11px; }
.venue-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.venue-card { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-content: start; gap: 10px; padding: 0 17px 17px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); transition: border-color 0.15s ease, transform 0.15s ease; }
.venue-card:hover { border-color: var(--green); transform: translateY(-1px); }
.card-photo { grid-column: 1 / -1; height: 184px; margin: 0 -17px 7px; overflow: hidden; background: #d8ddd8; }
.card-photo img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 220ms ease; }
.venue-card:hover .card-photo img { transform: scale(1.015); }
.card-photo-placeholder { display: grid; place-content: center; gap: 7px; background: linear-gradient(135deg, #d7ded8, #eef0ea); color: #617068; text-align: center; }
.card-photo-placeholder span { font-family: "Source Serif 4", Georgia, serif; font-size: 34px; font-weight: 800; letter-spacing: -0.05em; }
.card-photo-placeholder small { font-size: 8px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.card-number { padding-top: 4px; color: #9ba29d; font-size: 10px; font-weight: 700; }
.card-city { margin: 0 0 6px; color: #747e77; font-size: 8px; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.venue-card h2, .venue-card h3 { margin: 0 0 6px; font-family: "Source Serif 4", serif; font-size: 20px; line-height: 1.08; letter-spacing: -0.02em; }
.address { margin: 0 0 11px; color: var(--muted); font-size: 11px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px; color: #7d867f; font-size: 8px; letter-spacing: 0.06em; text-transform: uppercase; }
.verified { color: #765900; font-weight: 800; }
.verified b { width: 14px; height: 14px; display: inline-grid; place-items: center; margin-right: 2px; border-radius: 50%; background: var(--category-tank); color: var(--ink); }
.tank-brand-badge { font-weight: 800; }
.tank-brand-badge b { margin-right: 2px; }
.gambrinus-badge { color: #9e1f2d; }
.radegast-badge { color: #963f00; }
.kozel-badge { color: #294f85; }
.approved-badge { color: var(--category-approved); font-weight: 800; }
.approved-badge b { margin-right: 2px; color: var(--category-approved); }
.card-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 3px; }
.card-actions a { border-bottom: 1px solid var(--ink); font-size: 10px; font-weight: 800; text-decoration: none; }
.card-actions .source-link { color: var(--muted); border-color: var(--muted); font-weight: 600; }
.empty { display: flex; flex-direction: column; gap: 7px; padding: 34px; background: var(--paper); border: 1px solid var(--line); }
.empty span { color: var(--muted); font-size: 13px; }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.pagination a { justify-self: start; padding: 10px 14px; border: 1px solid var(--line); background: var(--paper); color: var(--green); font-size: 10px; font-weight: 800; text-decoration: none; }
.pagination a:last-child { justify-self: end; }
.pagination a:hover { border-color: var(--green); }
.pagination strong { font-size: 10px; }

@media (max-width: 1120px) {
  .venue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 850px) {
  .topbar { gap: 16px; }
  .topbar nav { display: none; }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  html { scroll-padding-top: 64px; }
  .topbar { height: 58px; gap: 8px; padding: 0 12px; }
  .brand { gap: 6px; font-size: 16px; }
  .brand-mark { width: 21px; height: 26px; }
  .brand-mark span { width: 10px; height: 14px; }
  .language-switch a { min-width: 27px; padding: 4px 5px; }
  .age-pill { padding: 4px 6px; font-size: 9px; }
  .finder { padding: 12px 12px 24px; }
  .list-section { padding: 24px 12px; }
  .finder-heading { align-items: center; margin-bottom: 10px; }
  .finder-heading .eyebrow, .finder-summary { display: none; }
  .finder-heading h1 { font-size: 30px; line-height: 1; }
  .result-count { min-width: auto; padding: 9px 10px; }
  .result-count strong { font-size: 23px; }
  .result-count span { display: none; }
  .filters { grid-template-columns: 1fr; }
  .category-tabs { margin-right: -12px; margin-left: -12px; padding: 0 12px 7px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .category-tabs::-webkit-scrollbar { display: none; }
  .category-tabs a { flex: 0 0 auto; justify-content: flex-start; min-height: 38px; padding: 0 11px; }
  .category-tabs strong { margin-left: auto; }
  .search-field { grid-column: auto; }
  .map-shell { margin-right: -12px; margin-left: -12px; }
  .map-search-panel { top: 56px; right: 10px; width: calc(100% - 20px); padding: 10px; }
  .route-hud { top: 58px; left: 10px; width: calc(100% - 20px); max-height: calc(100% - 70px); }
  .route-results ol { flex-direction: column; }
  .filters button, .clear { height: 43px; }
  #venue-map { height: 86vh; height: 86svh; min-height: 560px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .directory-page .list-section { padding-top: 26px; }
  .directory-heading { align-items: flex-start; }
  .directory-heading h1 { font-size: 38px; }
  .directory-count { min-width: auto; padding: 9px 10px; }
  .directory-count strong { font-size: 23px; }
  .directory-count span { display: none; }
  .venue-grid { grid-template-columns: 1fr; }
  .venue-card { padding: 15px; }
  .pagination { grid-template-columns: 1fr 1fr; }
  .pagination strong { grid-column: 1 / -1; grid-row: 1; text-align: center; }
}
