#cidades-map {
    height: calc(100vh - 240px);
    min-height: 480px;
    border-radius: .5rem;
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .06);
}

/* Marcador de cidade — pin moderno em formato de gota com gradiente,
   pequeno ponto branco no centro e sombra suave. Hover amplia. */
.cidade-pin {
    width: 18px;
    height: 18px;
    position: relative;
    background: linear-gradient(135deg, #6366f1 0%, #2563eb 100%);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    transform-origin: center;
    border: 2px solid rgba(255, 255, 255, .95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .35),
                0 0 0 1px rgba(0, 0, 0, .08);
    transition: transform .12s ease-out, box-shadow .12s ease-out;
}

/* Pontinho branco no centro */
.cidade-pin::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 2px rgba(0, 0, 0, .25);
}

/* Hover (Leaflet aplica em .leaflet-marker-icon) */
.leaflet-marker-icon:hover .cidade-pin {
    transform: rotate(-45deg) scale(1.25);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .4),
                0 0 0 1px rgba(0, 0, 0, .1);
    z-index: 1000;
}

/* Quando o popup está aberto, mantém destacado */
.leaflet-marker-icon.cidade-pin-active .cidade-pin {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    transform: rotate(-45deg) scale(1.2);
}

/* Painel lateral: cabeçalhos das categorias */
#cidades-painel .categoria-titulo {
    font-size: .9rem;
    font-weight: 600;
    color: #495057;
    margin: .85rem 0 .35rem;
    padding-bottom: .25rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#cidades-painel .categoria-titulo:first-child { margin-top: 0; }
#cidades-painel .categoria-titulo .badge {
    font-weight: 500;
    font-size: .75rem;
}

#cidades-painel ul.categoria-itens {
    list-style: none;
    padding: 0;
    margin: 0;
}
#cidades-painel ul.categoria-itens li {
    padding: .15rem 0;
    line-height: 1.35;
}
#cidades-painel ul.categoria-itens a {
    color: #212529;
    text-decoration: none;
}
#cidades-painel ul.categoria-itens a:hover {
    text-decoration: underline;
}

#cidades-painel .categoria-vazia {
    color: #adb5bd;
    font-style: italic;
    font-size: .85rem;
}

/* Itens de autor (avatar + nome) ────────────────────────────── */
#cidades-painel .autor-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .25rem 0;
    line-height: 1.3;
}
#cidades-painel .autor-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

/* Editoras (com obras e capas) ────────────────────────────── */
#cidades-painel .editora-item {
    padding: .35rem 0;
    border-bottom: 1px dashed #e9ecef;
}
#cidades-painel .editora-item:last-child {
    border-bottom: none;
}
#cidades-painel .editora-item .editora-nome {
    font-weight: 500;
    color: #212529;
    text-decoration: none;
}
#cidades-painel .editora-item .editora-nome:hover {
    text-decoration: underline;
}

/* Grid de capas ───────────────────────────────────────────── */
#cidades-painel .obras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: .35rem;
    margin-top: .35rem;
}
#cidades-painel .obras-grid a {
    display: block;
    aspect-ratio: 2/3;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: .25rem;
    overflow: hidden;
    transition: transform .12s ease, box-shadow .12s ease;
}
#cidades-painel .obras-grid a:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}
#cidades-painel .obras-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Capa "gerada" para obras sem depiction — mesmo estilo do show.blade.php
   (fundo escuro, ícone no topo, título no centro, autor no rodapé), porém
   compactado para caber no thumbnail do grid (~60-80px). */
#cidades-painel .obras-grid .sem-capa {
    width: 100%;
    height: 100%;
    background: #212529;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: .25rem .2rem;
    text-align: center;
    line-height: 1.1;
}
#cidades-painel .obras-grid .sem-capa .sc-icon {
    font-size: 1.4rem;
    opacity: .8;
    line-height: 1;
}
#cidades-painel .obras-grid .sem-capa .sc-titulo {
    font-size: .55rem;
    font-weight: 600;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    word-break: break-word;
}
#cidades-painel .obras-grid .sem-capa .sc-autor {
    font-size: .5rem;
    color: rgba(255, 255, 255, .65);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}
