@layer tokens, base, layout, components, pages, utilities;

@layer tokens {
  :root {
    color-scheme: light;
    --color-bg: #f5f8ff;
    --color-bg-soft: #edf3ff;
    --color-surface: #ffffff;
    --color-surface-2: #e8f0ff;
    --color-text: #14213f;
    --color-text-soft: #53617a;
    --color-line: #d7e2f5;
    --color-line-strong: #a9bddc;
    --color-brand: #0f47af;
    --color-brand-strong: #073276;
    --color-link: #0f47af;
    --color-brand-soft: #e8f0ff;
    --color-brand-button: #0f47af;
    --color-brand-button-hover: #073276;
    --color-brand-button-text: #ffffff;
    --color-ink: #041f52;
    --color-shadow: rgb(15 71 175 / 12%);
    --color-focus: #fcdd09;
    --font-ui: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --radius-panel: 6px;
    --header-h: 4.25rem;
  }
}

@layer base {
  * { box-sizing: border-box; }
  html, body { height: 100%; }
  html:has(.map-body) {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }
  body.map-body {
    margin: 0;
    overflow: hidden;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-ui);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
  }
  .map-body img {
    width: auto;
    max-width: 100%;
    height: auto;
  }
  img { display: block; max-width: 100%; }
  a { color: var(--color-link); text-decoration-thickness: 1px; }
  a:hover { color: var(--color-brand); }
  :focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
  h1, h2, p { margin: 0; }
  button, input { font: inherit; }
}

@layer layout {
  .skip-link {
    position: absolute;
    left: 0.75rem;
    top: -3rem;
    z-index: 20;
    background: var(--color-surface);
    padding: 0.4rem 0.7rem;
  }
  .skip-link:focus { top: 0.75rem; }
  .locais-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-line);
    overflow-x: auto;
  }
  .locais-header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: var(--header-h);
    padding: 0.5rem 1rem;
    white-space: nowrap;
  }
  .locais-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: inherit;
    text-decoration: none;
    flex: 0 0 auto;
  }
  .locais-brand img { width: 40px; height: 40px; }
  .locais-brand span { display: flex; flex-direction: column; line-height: 1.15; }
  .locais-brand small { color: var(--color-text-soft); font-size: 0.75rem; }
  .locais-nav {
    display: flex;
    gap: 1rem;
    flex: 0 0 auto;
  }
  .locais-nav a { color: inherit; text-decoration: none; }
  .locais-nav a[aria-current="page"] { font-weight: 700; color: var(--color-brand-strong); }
  .locais-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    flex: 0 0 auto;
  }
  .map-body .site-header {
    position: relative;
    flex: 0 0 auto;
    z-index: 40;
  }
  .map-body .site-footer {
    display: none;
  }
  .map-body #conteudo {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
}

@layer components {
  .language-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--color-line);
    background: var(--color-bg-soft);
    color: inherit;
  }
  .language-popover {
    inset: unset;
    margin: 0;
    padding: 0.45rem;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    box-shadow: 0 10px 32px var(--color-shadow);
    max-height: min(70vh, 28rem);
    overflow: auto;
    z-index: 80;
  }
  .language-popover:not(:popover-open) {
    display: none;
  }
  .language-popover-title {
    margin: 0 0.35rem 0.35rem;
    font-size: 0.75rem;
    color: var(--color-text-soft);
  }
  .language-menu-list {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .language-menu-list a {
    display: flex;
    gap: 0.4rem;
    padding: 0.4rem 0.55rem;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
  }
  .language-menu-list a[aria-current="true"] {
    background: var(--color-brand-soft);
    font-weight: 700;
  }
  .theme-toggle {
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid var(--color-line);
    background: var(--color-bg-soft);
    color: var(--color-ink);
    cursor: pointer;
    padding: 0.35rem;
  }
  .theme-toggle svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; }
  .theme-icon { display: block; }
  .theme-icon-moon { display: none; }
  :root[data-theme="dark"] .theme-icon-sun { display: none; }
  :root[data-theme="dark"] .theme-icon-moon { display: block; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-icon-sun { display: none; }
    :root:not([data-theme="light"]) .theme-icon-moon { display: block; }
  }

  .map-app {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }
  .map-dossier {
    display: grid;
    grid-template-columns: minmax(8.5rem, 12rem) minmax(0, 1fr);
    gap: 0.55rem 0.85rem;
    align-items: center;
    flex: 0 0 auto;
    padding: 0.5rem 1rem 0.45rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-line);
  }
  .map-dossier-art {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    background: var(--color-surface-2);
  }
  .map-dossier-copy {
    min-width: 0;
  }
  .map-dossier-copy h1 {
    font-size: 1.35rem;
    line-height: 1.12;
    color: var(--color-ink);
  }
  .map-dossier-copy .map-lead {
    margin-top: 0.2rem;
    color: var(--color-text-soft);
    font-size: 0.92rem;
    line-height: 1.35;
  }
  .map-dossier-meta {
    margin-top: 0.2rem;
    color: var(--color-text-soft);
    font-size: 0.82rem;
  }
  .map-dossier--plain {
    grid-template-columns: minmax(0, 1fr);
  }
  @media (min-width: 60rem) {
    .map-dossier:not(.map-dossier--plain) {
      grid-template-columns: 12rem minmax(0, 1fr);
      padding: 0.55rem 1.1rem 0.5rem;
    }
    .map-dossier-art {
      height: 100%;
      min-height: 5.4rem;
    }
    .map-dossier-copy h1 {
      font-size: 1.55rem;
    }
  }
  .map-toolbar, .map-tabs {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-line);
  }
  .map-tabs {
    gap: 0;
    padding: 0 1rem;
    overflow-x: auto;
    white-space: nowrap;
  }
  .map-board { position: relative; z-index: 0; overflow: hidden; }
  .map-crumb {
    position: absolute;
    top: 0.7rem;
    left: 4.5rem;
    z-index: 500;
    padding: 0.28rem 0.55rem;
    border: 1px solid var(--color-line);
    background: color-mix(in oklch, var(--color-surface) 92%, transparent);
    box-shadow: 0 6px 18px var(--color-shadow);
  }
  .map-crumb a { color: inherit; text-decoration: none; }
  .map-crumb a:hover { color: var(--color-brand-strong); }
  .map-type-nav, .map-tools { display: flex; gap: 0.5rem; align-items: center; }
  .map-tools button { cursor: pointer; }
  .map-type-nav a, .map-tools button, .hub-card-types a {
    border: 1px solid var(--color-line);
    background: var(--color-bg-soft);
    color: inherit;
    text-decoration: none;
    padding: 0.3rem 0.65rem;
  }
  .map-type-nav a[aria-current="page"] {
    background: var(--color-brand-button);
    color: var(--color-brand-button-text);
    border-color: var(--color-brand-button);
  }
  .map-shell {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
  }
  .map-panel {
    flex: 0 0 18.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    min-height: 0;
    padding: 0.8rem 1rem 1rem;
    border-right: 1px solid var(--color-line);
    background: var(--color-surface);
    overflow: auto;
  }
  .map-panel-top {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
  }
  .map-search {
    flex: 1 1 auto;
    min-width: 0;
  }
  .map-search input {
    width: 100%;
    border: 1px solid var(--color-line);
    background: var(--color-bg);
    color: inherit;
    padding: 0.4rem 0.6rem;
  }
  .map-panel-close,
  .map-panel-scrim {
    display: none;
  }
  .map-progress {
    margin: 0;
    font-size: 0.82rem;
    color: var(--color-text-soft);
  }
  .map-layer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .map-layer-actions button,
  .map-filters-toggle {
    border: 1px solid var(--color-line);
    background: var(--color-bg-soft);
    color: inherit;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    min-height: 2.3rem;
  }
  .map-filters {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-bottom: 0.5rem;
  }
  .map-cat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2rem;
    font-size: 0.9rem;
    cursor: pointer;
  }
  .map-cat input {
    width: 1rem;
    height: 1rem;
  }
  .map-cat .map-swatch {
    width: 1.75rem;
    height: 1.75rem;
    flex: 0 0 auto;
    border-radius: 50%;
    overflow: hidden;
    line-height: 0;
  }
  .map-cat .map-swatch svg {
    display: block;
    width: 100%;
    height: 100%;
  }
  .map-cat > span:not(.map-swatch):not(.map-count) {
    flex: 1 1 auto;
    min-width: 0;
  }
  .map-count {
    margin-left: auto;
    color: var(--color-text-soft);
    font-size: 0.78rem;
  }
  .map-filters-toggle {
    display: none;
    position: absolute;
    top: 0.7rem;
    left: 3.75rem;
    z-index: 1100;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--color-line);
    background: var(--color-surface);
    color: var(--color-ink);
    font-weight: 700;
    padding: 0.38rem 0.75rem;
    min-height: 2.4rem;
    box-shadow: 0 8px 22px var(--color-shadow);
  }
  .map-filters-toggle svg {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .map-tools input {
    border: 1px solid var(--color-line);
    background: var(--color-bg);
    color: inherit;
    padding: 0.35rem 0.55rem;
    min-width: 12rem;
  }
  .map-tabs button {
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: inherit;
    min-height: 2.4rem;
    padding: 0 0.9rem;
    cursor: pointer;
    margin-bottom: -1px;
  }
  .map-tabs button[aria-selected="true"] {
    font-weight: 700;
    border-bottom-color: var(--color-brand);
    color: var(--color-brand-strong);
  }
  .map-stage {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    position: relative;
  }
  .map-board:not([hidden]),
  .map-index:not([hidden]),
  .map-others:not([hidden]) {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }
  .map-canvas {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    background: #f4efe4;
  }
  .map-index,
  .map-others {
    overflow: auto;
    padding: 1rem;
    background: var(--color-bg-soft);
  }
  .map-index-list { list-style: none; margin: 0.75rem 0 0; padding: 0; }
  .map-index-row {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--color-line);
  }
  .map-index-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
  }
  .map-index-go {
    border: 0;
    background: none;
    color: var(--color-brand-strong);
    cursor: pointer;
    padding: 0;
    font-weight: 700;
    text-align: left;
    min-width: 0;
  }
  .map-others header {
    display: grid;
    gap: 0.35rem;
  }
  .map-others h2 {
    font-size: 1.35rem;
    color: var(--color-ink);
  }
  .map-others h3 {
    margin: 1.15rem 0 0.35rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-soft);
  }
  .map-others-hub {
    margin: 0.85rem 0 0;
  }
  .map-others-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .map-others-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--color-line);
    color: inherit;
    text-decoration: none;
  }
  .map-others-link:hover,
  .map-others-link:focus-visible {
    color: var(--color-brand-strong);
  }
  .map-others-link[aria-current="page"] {
    font-weight: 700;
  }
  .map-others-thumb {
    display: block;
    width: 5.6rem;
    height: 2.85rem;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid var(--color-line);
    background: var(--color-surface-2);
  }
  .map-others-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .map-others-copy {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
  }
  .map-others-copy span {
    color: var(--color-text-soft);
    font-size: 0.82rem;
  }
  .map-app[data-view="maps"] .map-panel,
  .map-app[data-view="maps"] .map-panel-scrim,
  .map-app[data-view="maps"] .map-filters-toggle {
    display: none;
  }
  .place-facts {
    display: grid;
    gap: 0;
    margin: 0.15rem 0 0;
  }
  .place-facts div {
    display: grid;
    grid-template-columns: 7.2rem minmax(0, 1fr);
    gap: 0.65rem;
    padding: 0.28rem 0;
    border-bottom: 1px solid var(--color-line);
    min-width: 0;
  }
  .place-facts dt {
    color: var(--color-text-soft);
    font-size: 0.78rem;
  }
  .place-facts dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: break-word;
  }
  .place-facts a { color: var(--color-link); }
  .map-status {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    margin: 0;
    padding: 0.4rem 0.65rem;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    z-index: 500;
  }
  .locais-pin-wrap, .locais-you-wrap {
    background: none;
    border: 0;
    overflow: visible;
  }
  .locais-pin {
    display: block;
    width: 44px;
    height: 58px;
    filter: drop-shadow(0 3px 5px var(--color-shadow));
  }
  .locais-pin-svg { width: 44px; height: 58px; display: block; }
  .locais-pin-door { fill: #fff6f0; stroke: #5a1f24; stroke-width: 1.2; }
  .locais-pin-split { stroke: #b42318; stroke-width: 1.2; }
  .locais-pin-slot { fill: #5a1f24; }
  .locais-pin-key { fill: #b42318; }
  .locais-pin-yu {
    fill: #1f1714;
    font-weight: 700;
    text-anchor: middle;
    font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  }
  .locais-pin--region {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    border: 3px solid var(--color-surface);
    background: var(--color-brand);
    box-shadow: 0 2px 8px var(--color-shadow);
  }
  .locais-you {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
  }
  .locais-you span {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #2a6fdb;
    border: 3px solid #fff;
    box-shadow: 0 0 0 6px rgb(42 111 219 / 28%);
  }
  .map-locate-wrap { border: 0; background: none; }
  .map-locate {
    width: 2.15rem;
    height: 2.15rem;
    border: 2px solid var(--color-line-strong);
    background: var(--color-surface);
    color: var(--color-ink);
    cursor: pointer;
    padding: 0.28rem;
  }
  .map-locate svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; }
  .map-popup .leaflet-popup-content { margin: 0.55rem 0.7rem 0.7rem; }
  .map-popup-body { display: grid; gap: 0.35rem; min-width: 0; }
  .map-popup-photo {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border: 1px solid var(--color-line);
    background: var(--color-surface-2);
  }
  .map-popup-credit {
    margin: 0;
    font-size: 0.72rem;
    color: var(--color-text-soft);
  }
  .map-popup-look { color: var(--color-text-soft); font-size: 0.82rem; }
  .map-popup-meta {
    margin: 0;
    font-size: 0.82rem;
  }
  .map-popup-phone a { color: inherit; }
  .map-popup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.15rem 0 0;
  }
  .map-popup-route {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--color-line);
    background: var(--color-brand-button);
    color: var(--color-brand-button-text);
    text-decoration: none;
    padding: 0.35rem 0.7rem;
    min-height: 2.2rem;
  }
  .map-popup-route svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
  }
  .map-popup-maps {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--color-line-strong);
    background: var(--color-bg-soft);
    color: var(--color-ink);
    text-decoration: none;
    padding: 0.35rem 0.7rem;
    min-height: 2.2rem;
  }
}

@layer pages {
  .hub-page { display: grid; gap: 1.35rem; }
  .hub-hero {
    display: grid;
    gap: 0.65rem;
    padding: 1.25rem 1rem 0;
  }
  .hub-kicker {
    color: var(--color-brand-strong);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.8rem;
  }
  .hub-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.15; color: var(--color-ink); }
  .hub-hero-media { overflow: hidden; }
  .hub-hero-media img {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--color-surface-2);
  }
  .hub-shelf-title {
    font-size: 1.35rem;
    color: var(--color-ink);
    padding: 0 1rem;
  }
  .hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: 1.25rem;
    padding: 0 1rem;
  }
  .hub-map-card {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    transition: border-color 0.16s ease, transform 0.16s ease;
  }
  .hub-map-card:hover,
  .hub-map-card:focus-visible {
    border-color: var(--color-brand);
    transform: translateY(-2px);
  }
  .hub-map-card:hover h2,
  .hub-map-card:focus-visible h2 {
    color: var(--color-brand-strong);
  }
  .hub-map-card-media { display: block; overflow: hidden; }
  .hub-map-card-media img {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }
  .hub-map-card-body {
    display: grid;
    gap: 0.35rem;
    padding: 1rem 1.15rem 1.25rem;
  }
  .hub-map-card-body .kicker {
    color: var(--color-text-soft);
    font-size: 0.78rem;
  }
  .hub-map-card-body h2 {
    font-size: 1.25rem;
    line-height: 1.2;
    color: var(--color-ink);
  }
  .hub-map-card-body p { color: var(--color-text); }
}

@layer utilities {
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  @media (max-width: 840px) {
    .map-tools input { min-width: 8rem; }
    .map-crumb { display: none; }
    .map-filters-toggle { left: 3.75rem; }
    .map-panel {
      position: absolute;
      z-index: 1050;
      inset: 0 auto 0 0;
      width: min(22rem, 92vw);
      transform: translateX(-105%);
      box-shadow: 8px 0 24px var(--color-shadow);
    }
    .map-app.is-panel .map-panel { transform: none; }
    .map-panel-close {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 2.3rem;
      height: 2.3rem;
      border: 1px solid var(--color-line);
      background: var(--color-bg-soft);
      color: inherit;
      cursor: pointer;
      flex: 0 0 auto;
    }
    .map-panel-scrim {
      position: absolute;
      inset: 0;
      z-index: 1040;
      margin: 0;
      padding: 0;
      border: 0;
      background: oklch(0% 0 0 / 55%);
      cursor: pointer;
    }
    .map-app.is-panel .map-panel-scrim { display: block; }
    .map-filters-toggle { display: inline-flex; align-items: center; }
    .map-app.is-panel .map-filters-toggle { display: none; }
  }
  @media (pointer: coarse) {
    .map-cat { min-height: 2.4rem; }
    .map-cat input { width: 1.1rem; height: 1.1rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; }
    .hub-map-card,
    .hub-map-card:hover,
    .hub-map-card:focus-visible { transform: none; }
  }
}

/* Fora de @layer: o style.css do Club não usa camadas e venceria o chrome do mapa. */
html:has(.map-body) {
  color-scheme: light;
}
.map-body {
  color-scheme: light;
  --color-bg: #f5f8ff;
  --color-bg-soft: #edf3ff;
  --color-surface: #ffffff;
  --color-surface-2: #e8f0ff;
  --color-text: #14213f;
  --color-text-soft: #53617a;
  --color-line: #d7e2f5;
  --color-line-strong: #a9bddc;
  --color-brand: #0f47af;
  --color-brand-strong: #073276;
  --color-link: #0f47af;
  --color-brand-soft: #e8f0ff;
  --color-brand-button: #0f47af;
  --color-brand-button-hover: #073276;
  --color-brand-button-text: #ffffff;
  --color-ink: #041f52;
  --color-shadow: rgb(15 71 175 / 12%);
  --color-focus: #fcdd09;
  background: #f5f8ff;
  color: #14213f;
}
.map-body .map-toolbar,
.map-body .map-tabs,
.map-body .map-panel,
.map-body .map-dossier {
  background: #ffffff;
  color: #14213f;
}
.map-body .map-dossier-copy h1 {
  color: #041f52;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
@media (min-width: 60rem) {
  .map-body .map-dossier-copy h1 {
    font-size: 1.55rem;
  }
}
@media (max-width: 40rem) {
  .map-body .map-dossier:not(.map-dossier--plain) {
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: 0.4rem 0.75rem;
  }
  .map-body .map-dossier-copy h1 {
    font-size: 1.15rem;
  }
  .map-body .map-dossier-copy .map-lead {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}
.map-body .map-others h2 {
  font-size: 1.35rem;
  line-height: 1.2;
}
.map-body .map-others h3 {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.map-body .map-lead,
.map-body .map-dossier-meta {
  color: #53617a;
}
.map-body .map-index,
.map-body .map-others {
  background: #edf3ff;
  color: #14213f;
}
.map-body .map-cat,
.map-body .map-progress,
.map-body .map-count {
  color: #14213f;
}
.map-body .map-count,
.map-body .map-progress {
  color: #53617a;
}
.map-body .map-type-nav a[aria-current="page"] {
  background: #0f47af;
  color: #ffffff;
  border-color: #0f47af;
}
.map-body .map-tabs button[aria-selected="true"] {
  color: #073276;
}
.map-body .map-filter-heading {
  margin: 0.75rem 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #53617a;
}
.map-body .map-filter-heading:first-child {
  margin-top: 0.15rem;
}

/* Fora de @layer: o CSS do Leaflet não usa camadas, então só assim o fundo e a costura vencem. */
.map-canvas,
.leaflet-container {
  background: #e8e4d8;
  font-family: var(--font-ui);
}
.map-board .leaflet-container {
  width: 100%;
  height: 100%;
}
.leaflet-container .leaflet-tile-pane img.leaflet-tile {
  mix-blend-mode: normal;
  width: 257px !important;
  height: 257px !important;
}
.leaflet-control-attribution {
  display: none !important;
}
.leaflet-container a {
  color: var(--color-link);
}
.leaflet-container a:hover {
  color: var(--color-brand);
}
.leaflet-container a.leaflet-popup-close-button,
.leaflet-container a.leaflet-popup-close-button:hover {
  color: var(--color-ink);
}
.leaflet-container a.map-popup-route,
.leaflet-container a.map-popup-route:hover {
  color: var(--color-brand-button-text);
}
.leaflet-container a.map-popup-maps,
.leaflet-container a.map-popup-maps:hover {
  color: var(--color-ink);
}
.leaflet-container .place-facts a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}
.map-body .leaflet-container img.leaflet-tile {
  max-width: none;
}
.map-body .map-dossier-art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}
.map-body .map-index-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}
.map-body .map-index-thumb {
  display: block;
  width: 5.6rem;
  height: 2.85rem;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--color-line);
  background: var(--color-surface-2);
}
.map-body .map-index-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.map-body .map-chrome-legal {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.22rem 0.85rem calc(0.22rem + env(safe-area-inset-bottom, 0px));
  font-size: 0.68rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-align: center;
  color: #c8c4bc;
  background: #12110f;
  border-top: 1px solid #2a2724;
  white-space: nowrap;
  overflow-x: auto;
}
.map-popup-rating,
.map-index-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 800;
  color: var(--color-brand-strong);
  font-size: 0.88rem;
}
.map-popup-ficha {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--color-line-strong);
  background: var(--color-surface);
  color: var(--color-ink);
  text-decoration: none;
  font-weight: 700;
}
.leaflet-container a.map-popup-ficha,
.leaflet-container a.map-popup-ficha:hover {
  color: var(--color-ink);
}
.map-type-nav {
  overflow-x: auto;
  max-width: 100%;
}
.map-popup .leaflet-popup-content-wrapper {
  box-sizing: border-box;
  overflow: hidden;
  width: min(24rem, calc(100vw - 1.5rem)) !important;
  min-width: min(20rem, calc(100vw - 1.5rem)) !important;
}
.map-popup .leaflet-popup-content {
  box-sizing: border-box;
  width: 100% !important;
  margin: 0 !important;
  overflow: hidden;
}
.map-popup-body {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  padding: 0 0 0.8rem;
}
.map-popup-body > strong,
.map-popup-body .place-facts,
.map-popup-body .map-popup-actions {
  min-width: 0;
  margin-inline: 0.85rem;
  overflow-wrap: break-word;
  word-break: normal;
}
.map-popup .map-popup-photo,
.map-body .map-popup img.map-popup-photo {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto;
  aspect-ratio: 2 / 1;
  max-height: 8.5rem;
  object-fit: cover;
  margin: 0;
  border: 0;
}
.map-popup .place-facts div {
  grid-template-columns: 5.4rem minmax(0, 1fr);
  gap: 0.55rem;
}
@media (max-width: 360px) {
  .map-popup .place-facts div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.08rem;
  }
}

.hub-page {
  width: min(100% - 2 * var(--gutter, 24px), var(--container, 1160px));
  margin-inline: auto;
  padding: 36px 0 72px;
  display: grid;
  gap: 1.35rem;
}
.hub-page h1 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
}
.hub-page .hub-hero {
  display: grid;
  gap: 0.65rem;
  padding: 0;
}
.hub-page .hub-kicker {
  color: #073276;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
}
.hub-page .hub-shelf-title {
  margin-top: 0.75rem;
  font-size: 1.35rem;
  color: #041f52;
  padding: 0;
}
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.25rem;
  padding: 0;
}
.hub-map-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #14213f;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid #d7e2f5;
  border-radius: var(--radius-card, 14px);
  box-shadow: var(--shadow-card, none);
}
.hub-map-card:hover,
.hub-map-card:focus-visible {
  border-color: #bccde9;
  box-shadow: var(--shadow-lift, none);
}
.hub-map-card-media img {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.hub-map-card-body {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.15rem 1.25rem;
}
.hub-map-card-body .kicker {
  color: #53617a;
  font-size: 0.78rem;
}
.hub-map-card-body h2 {
  font-size: 1.25rem;
  line-height: 1.2;
  color: #041f52;
}
