/* Filosofia no tempo e no espaço
   Scoped under .filosofia-page. Reuses the site theme variables
   (--bg-*, --text-*, --border-color) and adds a small local palette. */

.filosofia-page {
    --filo-accent: #f59e0b;          /* pins (amber, pops over the blue map) */
    --filo-accent-ink: #7c4a03;
    --filo-choro-min: 224, 242, 254; /* light blue, 1 active */
    --filo-choro-max: 2, 132, 199;   /* deep blue, many active */
    --filo-land: #e6e6e6;
    --filo-panel: var(--bg-secondary);
}

[data-theme="dark"] .filosofia-page {
    --filo-choro-min: 30, 58, 95;
    --filo-choro-max: 56, 189, 248;
    --filo-land: #2f2f2f;
}

/* ---- Time controls ---------------------------------------------------- */

.filo-controls {
    margin-top: 0.5rem;
}

.filo-yearbar {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.filo-year {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}

.filo-year__num {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.filo-year__era {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--filo-accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filo-count {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.filo-count strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Toolbar: search + graph toggle */
.filo-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.filo-search {
    position: relative;
    flex: 1 1 240px;
    max-width: 360px;
    display: flex;
    align-items: center;
}

.filo-search__icon {
    position: absolute;
    left: 0.65rem;
    color: var(--text-tertiary);
    pointer-events: none;
}

.filo-search__input {
    width: 100%;
    padding: 0.5rem 0.7rem 0.5rem 2.1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.9rem;
}

.filo-search__input:focus-visible {
    outline: 2px solid var(--filo-accent);
    outline-offset: 0;
    border-color: var(--filo-accent);
}

.filo-search__results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1000;
    list-style: none;
    margin: 0;
    padding: 0.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    max-height: 280px;
    overflow-y: auto;
}

.filo-search__opt {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-radius: 6px;
    padding: 0.4rem 0.5rem;
    cursor: pointer;
    color: var(--text-primary);
    font: inherit;
}

.filo-search__opt:hover,
.filo-search__opt.is-active {
    background: var(--bg-tertiary);
}

/* Circle wrapper: fixed shape + clips the zoomed portrait inside. */
.filo-search__av {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 auto;
    background: var(--bg-tertiary);
}

.filo-search__av-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* Zoom into the face; scoped to <img> so the bust fallback isn't scaled. */
img.filo-search__av-img {
    transform: scale(1.28);
    transform-origin: center top;
}

.filo-search__optname {
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.15;
}

.filo-search__optmeta {
    font-size: 0.74rem;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
}

/* Area filter dropdown */
.filo-area {
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    max-width: 200px;
}

.filo-area:focus-visible {
    outline: 2px solid var(--filo-accent);
    outline-offset: 2px;
    border-color: var(--filo-accent);
}

.filo-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.filo-toggle:hover {
    color: var(--text-primary);
    border-color: var(--filo-accent);
}

.filo-toggle.is-active {
    background: var(--filo-accent);
    border-color: var(--filo-accent);
    color: #1a1a1a;
}

.filo-toggle:focus-visible {
    outline: 2px solid var(--filo-accent);
    outline-offset: 2px;
}

/* Slider */
.filo-slider-wrap {
    position: relative;
}

/* Density strip: philosopher activity across the whole timeline, aligned to
   the slider track (inset by the 11px thumb radius). */
.filo-density {
    padding: 0 11px;
    margin-bottom: 2px;
}

.filo-density__inner {
    position: relative;
    height: 40px;
    cursor: pointer;
}

.filo-density__svg {
    display: block;
    width: 100%;
    height: 100%;
}

.filo-density__svg path {
    fill: rgba(245, 158, 11, 0.28);
    stroke: var(--filo-accent);
    stroke-width: 0.6;
    vector-effect: non-scaling-stroke;
}

[data-theme="dark"] .filo-density__svg path {
    fill: rgba(245, 158, 11, 0.22);
}

/* Selected interval band on the density strip */
.filo-density__band {
    position: absolute;
    top: 0;
    bottom: 0;
    background: rgba(245, 158, 11, 0.18);
    border-left: 2px solid var(--filo-accent);
    border-right: 2px solid var(--filo-accent);
    pointer-events: none;
    z-index: 1;
}

/* Key-event ticks on the density strip */
.filo-event {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    margin-left: -0.5px;
    padding: 0;
    border: none;
    background: var(--text-tertiary);
    opacity: 0.45;
    cursor: pointer;
    z-index: 2;
}

.filo-event::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-secondary);
}

.filo-event:hover,
.filo-event.is-near {
    background: var(--filo-accent);
    opacity: 1;
}

.filo-event:hover::before,
.filo-event.is-near::before {
    background: var(--filo-accent);
}

/* Historical context bar (period / empire / nearest event) */
.filo-context {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.filo-ctx {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-secondary);
    font-size: 0.8rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.filo-ctx__k {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.filo-ctx--period .filo-ctx__v {
    color: var(--filo-accent);
    font-weight: 600;
}

button.filo-ctx--event {
    cursor: pointer;
    font-family: inherit;
}

button.filo-ctx--event:hover {
    border-color: var(--filo-accent);
}

button.filo-ctx--event:focus-visible {
    outline: 2px solid var(--filo-accent);
    outline-offset: 2px;
}

.filo-ctx__v {
    font-variant-numeric: tabular-nums;
}

/* Dual-handle range (two overlapping inputs; only the thumbs are interactive) */
.filo-range {
    position: relative;
    height: 22px;
    margin: 0.25rem 0 0.5rem;
}

.filo-range__rail,
.filo-range__fill {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    border-radius: 999px;
    pointer-events: none;
}

.filo-range__rail {
    left: 0;
    right: 0;
    background: var(--border-color);
}

.filo-range__fill {
    background: var(--filo-accent);
    opacity: 0.55;
}

.filo-range__input {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 22px;
    margin: 0;
    background: none;
    pointer-events: none; /* only thumbs catch events */
}

.filo-range__input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    pointer-events: auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--filo-accent);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    cursor: grab;
}

.filo-range__input::-webkit-slider-thumb:active {
    cursor: grabbing;
}

.filo-range__input::-moz-range-thumb {
    pointer-events: auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--filo-accent);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    cursor: grab;
}

.filo-range__input::-moz-range-track {
    background: none;
}

.filo-range__input:focus-visible::-webkit-slider-thumb {
    outline: 2px solid var(--filo-accent);
    outline-offset: 2px;
}

/* Era buttons sit under the track, widths proportional to span (set inline) */
.filo-eras {
    display: flex;
    gap: 3px;
    width: 100%;
}

.filo-era {
    flex-grow: 1;
    flex-basis: 0;
    min-width: 0;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.3rem 0.2rem;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.filo-era:hover {
    color: var(--text-primary);
    border-color: var(--filo-accent);
}

.filo-era.is-active {
    background: var(--filo-accent);
    border-color: var(--filo-accent);
    color: #1a1a1a;
    font-weight: 600;
}

/* ---- Stage: map + side list ------------------------------------------ */

.filo-stage {
    display: grid;
    grid-template-columns: 1fr 290px;
    gap: 1rem;
    margin-top: 1.25rem;
    align-items: stretch;
}

.filo-map {
    width: 100%;
    height: 540px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: var(--filo-land);
    z-index: 0;
}

.filo-side {
    height: 540px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--filo-panel);
    padding: 0.9rem 0.4rem 0.9rem 0.9rem;
}

.filo-side__title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin: 0 0 0.6rem;
    font-weight: 600;
}

.filo-side__count {
    color: var(--filo-accent);
    font-weight: 700;
}

.filo-list {
    list-style: none;
    margin: 0;
    padding: 0 0.5rem 0 0;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
}

.filo-row {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-radius: 8px;
    padding: 0.45rem 0.55rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
    transition: background 0.12s ease;
}

.filo-row:hover,
.filo-row:focus-visible {
    background: var(--bg-tertiary);
    outline: none;
}

/* Circle wrapper: owns the fixed 38px shape and clips the zoomed portrait so
   scaling the image never grows the circle into neighbouring rows. */
.filo-row__avatar {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.filo-row__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* Zoom into the face (see .filo-pin img); the wrapper clips the overflow.
   Scoped to <img> so the no-photo bust silhouette isn't scaled. */
img.filo-row__avatar-img {
    transform: scale(1.28);
    transform-origin: center top;
}

/* Reusable default avatar (no portrait): a neutral bust silhouette that
   inherits its size/shape from the context class it is given. */
.filo-avatar--default {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
}

.filo-avatar--default svg {
    width: 64%;
    height: 64%;
}

.filo-row__text {
    min-width: 0;
    flex: 1;
}

.filo-row__name {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
}

.filo-row__meta {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-top: 0.1rem;
    font-variant-numeric: tabular-nums;
}

.filo-row__school {
    color: var(--text-secondary);
}

.filo-empty {
    color: var(--text-tertiary);
    font-size: 0.88rem;
    padding: 0.5rem 0.55rem;
}

/* ---- Sources note ----------------------------------------------------- */

.filo-fontes {
    margin-top: 1.25rem;
}

.filo-fontes__text {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    line-height: 1.55;
    max-width: 70ch;
}

/* ---- Article (SEO content) ------------------------------------------- */

.filo-article {
    max-width: 72ch;
    margin-top: 2.5rem;
}

.filo-article h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2rem 0 0.6rem;
}

.filo-article h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.4rem 0 0.4rem;
}

.filo-article p {
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0 0 0.85rem;
}

.filo-related {
    text-align: center;
    margin-top: 2rem;
}

/* ---- Leaflet overrides ------------------------------------------------ */

.filosofia-page .leaflet-container {
    background: var(--filo-land);
    font: inherit;
}

/* Map controls follow the theme */
.filosofia-page .leaflet-bar a,
.filosofia-page .leaflet-bar a:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-bottom-color: var(--border-color);
}

.filosofia-page .leaflet-bar a:hover {
    background: var(--bg-tertiary);
}

.filosofia-page .leaflet-bar {
    border-color: var(--border-color);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* Fullscreen toggle button (top-right) */
.filosofia-page .filo-fs__btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.filosofia-page .filo-fs__btn svg {
    width: 16px;
    height: 16px;
}

/* Expanded map: native fullscreen and the CSS-overlay fallback. Kept as
   separate rules so an unrecognized pseudo-class can't drop the whole block. */
.filosofia-page .filo-map:fullscreen {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: 0;
}

.filosofia-page .filo-map:-webkit-full-screen {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: 0;
}

/* Fallback overlay. !important overrides Leaflet's inline position:relative on
   the map container (the native :fullscreen path is handled by the UA above). */
.filosofia-page .filo-map.is-fullscreen {
    position: fixed !important;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0;
    border: 0;
    z-index: 9999;
}

.filosofia-page .leaflet-control-attribution {
    background: var(--bg-primary);
    color: var(--text-tertiary);
}

.filosofia-page .leaflet-control-attribution a {
    color: var(--text-secondary);
}

/* Subtle period indicator (bottom-left of the map) */
.filo-mapnote {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
    opacity: 0.92;
}

.filo-mapnote__year {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.filo-mapnote__era {
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--filo-accent);
    margin-top: 0.05rem;
}

/* ---- Pins and clusters ----------------------------------------------- */

/* Pin = the philosopher's portrait (circular), shown when not grouped. */
.filo-pin {
    box-sizing: border-box;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-tertiary);
    border: 2px solid var(--filo-accent);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.filo-pin img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    /* Zoom into the face: Wikidata portraits carry a lot of headroom, so the
       face reads tiny at 30px. Scale up and anchor to the top; the circle's
       overflow:hidden clips the rest. */
    transform: scale(1.32);
    transform-origin: center top;
    display: block;
}

/* No-photo fallback: a neutral silhouette inside the same circle. */
.filo-pin--default {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
}

.filo-pin--default svg {
    width: 62%;
    height: 62%;
}

/* No-photo monogram: the philosopher's initials. */
.filo-pin--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--filo-accent);
    color: #1a1a1a;
    font-weight: 700;
    font-size: 0.66rem;
    letter-spacing: 0.02em;
}

/* Cluster = a single circle with the count of philosophers it holds. */
.filo-cluster {
    cursor: pointer;
}

.filo-cluster span {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--filo-accent);
    border: 2px solid #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
    color: #1a1a1a;
    font-weight: 700;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}

.filo-cluster--lg span {
    font-size: 0.92rem;
}

[data-theme="dark"] .filo-cluster span {
    border-color: rgba(255, 255, 255, 0.9);
}

.filosofia-page .leaflet-popup-content-wrapper {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 10px;
    /* Border + strong shadow so the card stands out from the dark map. */
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
}

.filosofia-page .leaflet-popup-tip {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

/* Bigger, easier-to-tap close button. */
.filosofia-page .leaflet-popup-close-button {
    width: 26px;
    height: 26px;
    font-size: 22px;
    color: var(--text-secondary);
}

/* Popup is a horizontal card: portrait on the left, text on the right. */
.filo-pop {
    display: flex;
    gap: 11px;
    width: 300px;
}

.filo-pop__img {
    flex: 0 0 92px;
    width: 92px;
    height: 122px;
    object-fit: cover;
    object-position: center top;
    border-radius: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.filo-pop__body {
    flex: 1;
    min-width: 0;
}

.filo-pop__name {
    font-weight: 700;
    font-size: 1rem;
    display: block;
    line-height: 1.2;
}

.filo-pop__dates {
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    display: block;
    margin-top: 0.05rem;
}

.filo-pop__school {
    color: var(--filo-accent);
    font-size: 0.82rem;
    font-weight: 600;
    display: block;
    margin-top: 0.1rem;
}

.filo-pop__work {
    display: block;
    font-size: 0.8rem;
    color: var(--text-primary);
    font-style: italic;
    margin-top: 0.15rem;
}

.filo-pop__work-k {
    font-style: normal;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-right: 0.25rem;
}

.filo-pop__areas {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.filo-pop__places {
    color: var(--text-secondary);
    font-size: 0.78rem;
    display: block;
    margin-top: 0.15rem;
}

.filo-pop__summary {
    margin: 0.4rem 0 0;
    font-size: 0.83rem;
    line-height: 1.4;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.filo-pop__summary.is-loading {
    color: var(--text-tertiary);
    font-style: italic;
    -webkit-line-clamp: 2;
}

/* Influence lists (clickable names) */
.filo-pop__infl {
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.45rem;
}

.filo-pop__infl-row {
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.filo-pop__infl-row + .filo-pop__infl-row {
    margin-top: 0.2rem;
}

.filo-pop__infl-label {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-right: 0.3rem;
}

.filo-pop__infl-label--in {
    color: #38bdf8;
}

.filo-pop__infl-label--out {
    color: var(--filo-accent);
}

.filo-chip {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: var(--link-color);
    font: inherit;
    font-size: 0.78rem;
}

.filo-chip:hover,
.filo-chip:focus-visible {
    text-decoration: underline;
    outline: none;
}

.filo-chip--more {
    color: var(--text-tertiary);
    cursor: default;
}

.filo-chip--more:hover {
    text-decoration: none;
}

/* Off-map influence: not a pin, so shown as plain (non-clickable) text. */
.filo-chip--ext {
    color: var(--text-secondary);
    font-size: 0.78rem;
    border-bottom: 1px dotted var(--border-color);
}

.filo-pop__link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.82rem;
}

/* ---- Responsive ------------------------------------------------------- */

@media (max-width: 760px) {
    .filo-stage {
        grid-template-columns: 1fr;
    }

    /* Taller map so popups have room to open and read on phones. */
    .filo-map {
        height: 70vh;
        min-height: 460px;
    }

    .filo-side {
        height: auto;
        max-height: 320px;
    }

    .filo-year__num {
        font-size: 1.6rem;
    }

    .filo-era {
        font-size: 0.62rem;
        padding: 0.3rem 0.1rem;
    }

    /* Compact, capped popup that never overflows the map on small screens. */
    .filosofia-page .leaflet-popup-content {
        margin: 12px 14px;
    }

    .filo-pop {
        width: min(78vw, 290px);
        max-height: 52vh;
        overflow-y: auto;
    }

    .filo-pop__img {
        flex-basis: 78px;
        width: 78px;
        height: 104px;
    }

    .filo-pop__summary {
        -webkit-line-clamp: 4;
    }
}

@media (prefers-reduced-motion: reduce) {
    .filo-era,
    .filo-row {
        transition: none;
    }
}
