.atlas {
    width: min(100% - clamp(2rem, 8vw, 9rem), 76rem);
    margin-inline: auto;
    overflow-wrap: anywhere;
}
.atlas .atlas-breadcrumbs { margin: 1.3rem 0; padding: 0; }
.atlas-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: clamp(1rem, 4vw, 4rem);
    min-height: 18rem;
    padding: clamp(1.5rem, 5vw, 4.6rem);
    border: 1px solid #e5ded7;
    border-radius: clamp(1.4rem, 3vw, 2.5rem);
    background: radial-gradient(ellipse at 95% 0, #eedad5 0, transparent 60%), #fcf9f4;
}
.atlas-hero-copy { flex: 1; min-width: 0; z-index: 1; }
.atlas-hero h1 { font-size: clamp(2.6rem, 7vw, 5.7rem); margin: .35em 0 .2em; }
.atlas-hero p:not(.atlas-kicker) { max-width: 35rem; font-size: clamp(1rem, 2vw, 1.3rem); margin: .65rem 0 0; }
.atlas-kicker { color: #8b2720; font-weight: 700; margin: 0; }
.atlas-mark {
    position: absolute;
    inset-inline-end: clamp(.75rem, 4vw, 4rem);
    inset-block-end: 0;
    color: #9f2b2214;
    font-size: clamp(4.5rem, 14vw, 12rem);
    line-height: 1.12;
    white-space: nowrap;
}
.atlas-entry-mark {
    max-width: 40%;
    color: #8b2720;
    font-size: clamp(2rem, 5vw, 4.25rem);
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}
.atlas-catalogue { padding-block: clamp(1.8rem, 5vw, 4rem) clamp(3rem, 7vw, 6rem); }
.atlas-search { max-width: 46rem; }
.atlas-search label { margin-top: 0; }
.atlas-search-row { display: flex; gap: .7rem; align-items: stretch; }
.atlas-search-field { flex: 1; min-width: 0; position: relative; }
.atlas-search input { height: 100%; border-radius: .8rem; }
.atlas-search .button { margin: 0; padding-inline: clamp(.9rem, 3vw, 1.5rem); }
.atlas-clear { display: inline-flex; align-items: center; min-height: 44px; }
.atlas-suggestions {
    position: absolute;
    z-index: 3;
    inset: 100% 0 auto;
    max-height: min(22rem, 55vh);
    overflow-y: auto;
    list-style: none;
    margin: .3rem 0 0;
    padding: .35rem;
    border: 1px solid #92827a;
    border-radius: .8rem;
    background: white;
    box-shadow: 0 .65rem 1.5rem #25130d22;
}
.atlas-suggestions li { display: flex; gap: .35rem .65rem; flex-wrap: wrap; align-items: center; padding: .45rem .65rem; min-height: 44px; cursor: pointer; border-radius: .5rem; }
.atlas-suggestions li:hover, .atlas-suggestions li[aria-selected="true"] { color: #72241d; background: #f9e9e6; outline: 1px solid currentColor; outline-offset: -1px; }
.atlas-suggestions small { width: 100%; font-size: .8rem; }
.atlas-categories { display: flex; flex-wrap: wrap; gap: .55rem; margin-block: 1.45rem; }
.atlas-categories a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: .45rem 1rem;
    border: 1px solid #bcb2aa;
    border-radius: 2rem;
    background: #fff;
    text-decoration: none;
    font-weight: 650;
}
.atlas-categories a:hover { text-decoration: underline; }
.atlas-categories a[aria-current] { background: #8b2720; color: #fff; border-color: #8b2720; }
#catalogo-atlante { scroll-margin-top: 1rem; }
.atlas-category-filter {
    max-width: 46rem;
    margin-block: .75rem 1.15rem;
    border: 1px solid #d6cdc6;
    border-radius: 1rem;
    background: #fff;
}
.atlas-category-filter summary {
    display: flex;
    align-items: center;
    min-height: 48px;
    gap: .45rem .65rem;
    padding: .45rem .85rem;
    border-radius: inherit;
    cursor: pointer;
    list-style: none;
}
.atlas-category-filter summary::-webkit-details-marker { display: none; }
.atlas-category-filter summary::after {
    content: '';
    flex: 0 0 .48rem;
    height: .48rem;
    margin-inline-start: auto;
    border: solid #8b2720;
    border-width: 0 2px 2px 0;
    transform: translateY(-2px) rotate(45deg);
}
.atlas-category-filter[open] summary::after { transform: translateY(2px) rotate(225deg); }
.atlas-filter-label { font-weight: 700; }
.atlas-filter-value {
    min-width: 0;
    padding: .15rem .6rem;
    border-radius: 1rem;
    background: #f7eee8;
    color: #76241d;
    font-size: .86rem;
    font-weight: 650;
}
.atlas-filter-options { padding: .7rem .85rem .85rem; border-top: 1px solid #ece3db; }
.atlas-filter-options .atlas-categories { margin: 0; }
.atlas-filter-options .atlas-categories a { padding-inline: .8rem; font-size: .92rem; }
.atlas-filter-surfaces { margin-top: .75rem; }
.atlas-filter-surfaces p { margin: 0 0 .4rem; font-weight: 650; }
.atlas-results-heading { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1.2rem; margin-block: 2rem 1rem; }
.atlas-results-heading h2, .atlas-results-heading p { margin: 0; }
.atlas-catalogue h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
.atlas-grid, .atlas-admin-list { margin: 0; padding: 0; list-style: none; }
.atlas-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.atlas-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .6rem;
    min-height: 100%;
    padding: .7rem clamp(.65rem, 2vw, 1rem);
    border: 1px solid #d6cdc6;
    border-radius: 1.1rem;
    background: #fff;
    text-decoration: none;
}
.atlas-card:hover { border-color: #8b2720; }
.atlas-card:hover .atlas-card-name { text-decoration: underline; }
.atlas-card-illustrated { grid-template-columns: clamp(4.5rem, 23vw, 8rem) minmax(0, 1fr) auto; }
.atlas-card-copy { display: grid; gap: .12rem; min-width: 0; }
.atlas-card-name { font-size: clamp(1rem, 2vw, 1.25rem); font-weight: 750; line-height: 1.22; }
.atlas-card-meaning { font-size: .9rem; line-height: 1.4; }
.atlas-card-arrow { color: #8b2720; }
.atlas-card-illustration, .atlas-entry-illustration { display: block; width: 100%; height: auto; object-fit: contain; aspect-ratio: 8 / 5; border-radius: .85rem; background: #f6f0ea; }
.atlas-card-illustration { border: 1px solid #e7dfd7; border-radius: .65rem; }
.atlas-card-illustration[src$="#anteprima"] { object-fit: fill; }
@media (max-width: 46rem) {
    .atlas-grid { grid-template-columns: minmax(0, 1fr); }
    .atlas-filter-options .atlas-categories {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .35rem;
    }
    .atlas-filter-options .atlas-categories a { padding-inline: .5rem; border-radius: .75rem; line-height: 1.25; }
}
.atlas-entry-illustration-portrait { aspect-ratio: 660 / 790; }
.atlas-entry-figure {
    min-width: 0;
    max-width: 39rem;
    margin: 0 0 1.5rem;
    padding: clamp(.55rem, 2vw, 1rem);
    border: 1px solid #e5dcd3;
    border-radius: clamp(1.25rem, 3vw, 2rem);
    background: #fff;
    box-shadow: 0 .75rem 2.25rem #36251b0e;
}
.atlas-entry-figure figcaption {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .25rem .6rem;
    padding: .15rem .25rem .6rem;
    font-weight: 700;
}
.atlas-entry-figure a, .atlas-viewer-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 44px;
    padding: .35rem .75rem;
    border: 1px solid #e2d2c9;
    border-radius: 99rem;
    background: #f7eee8;
    color: #76241d;
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
}
.atlas-entry-figure a:hover, .atlas-viewer-actions button:hover { background: #efe0d8; }
.atlas-entry-figure a span[aria-hidden] { font-size: 1.16em; line-height: 1; }
.atlas-entry-image { border-radius: 1.1rem; overflow: hidden; background: #faf8f4; }
.atlas-entry-image img { border-radius: 0; }
.atlas-entry-content-illustrated .atlas-entry-details > h2:first-child { margin-top: 0; }
@media (min-width: 50rem) {
    .atlas-entry-content-illustrated {
        display: grid;
        grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
        align-items: start;
        gap: clamp(1.75rem, 4vw, 4rem);
    }
}
html.atlas-viewer-open { overflow: hidden; }
.atlas-viewer {
    width: min(66rem, calc(100% - 2rem));
    max-width: none;
    max-height: calc(100% - 2rem);
    padding: 0;
    overflow: hidden;
    border: 1px solid #e5dcd3;
    border-radius: clamp(1.1rem, 3vw, 2rem);
    background: #fff;
    color: #27211e;
    box-shadow: 0 1.25rem 4rem #21140f55;
}
.atlas-viewer[open] { display: flex; flex-direction: column; }
.atlas-viewer::backdrop { background: #1b1411b3; backdrop-filter: blur(4px); }
.atlas-viewer-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .45rem .85rem;
    padding: .7rem clamp(.65rem, 3vw, 1.25rem);
    border-bottom: 1px solid #e5dcd3;
}
.atlas-viewer .atlas-viewer-toolbar h2 { margin: 0; font-size: clamp(1.12rem, 3vw, 1.65rem); }
.atlas-viewer-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.atlas-viewer-actions button[type="submit"] { background: #8b2720; border-color: #8b2720; color: #fff; }
.atlas-viewer-actions button[type="submit"]:hover { background: #6d1d17; }
.atlas-viewer-actions button[aria-pressed="true"] { background: #eee0d7; border-color: #76241d; }
.atlas-viewer-stage {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: .65rem;
    background: #f2ebe4;
}
.atlas-viewer-stage:focus-visible { outline-offset: -4px; }
.atlas-viewer-stage img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100dvh - 8rem);
    margin-inline: auto;
    background: #faf8f4;
}
.atlas-viewer-stage.is-zoomed img { width: max(100%, 58rem); max-width: none; max-height: none; }
@media (max-width: 35rem) {
    .atlas-viewer { width: calc(100% - 1rem); max-height: calc(100% - 1rem); }
}
.atlas-related { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; margin-block: .5rem 1rem; padding-left: 1.25rem; }
.atlas-related a { display: inline-flex; align-items: center; min-height: 44px; }
.atlas-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem 1.3rem; margin-top: 1.25rem; }
.atlas-pagination a { display: inline-flex; align-items: center; min-height: 44px; }
.atlas-language { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .8rem; margin: 0 0 2rem; }
.atlas-language div { background: #fff; padding: 1rem 1.25rem; border: 1px solid #d6cdc6; border-radius: 1rem; }
.atlas-language dt { color: #8b2720; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .045em; }
.atlas-language dd { margin: .35rem 0 0; font-size: 1.2rem; font-weight: 600; }
.atlas-language .atlas-alternate-names dd { font-size: 1rem; overflow-wrap: anywhere; }
.atlas-description { max-width: 68ch; }
.atlas-references { margin-block: 2rem; }
.atlas-references ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .65rem; padding: 0; list-style: none; }
.atlas-references a { display: grid; gap: .15rem; min-height: 44px; padding: .65rem .85rem; border: 1px solid #d6cdc6; border-radius: .85rem; background: #fff; text-decoration: none; }
.atlas-references a strong { color: #8b2720; text-decoration: underline; text-underline-offset: .2em; }
.atlas-references a span { font-size: .9rem; }
.atlas-admin { overflow-wrap: anywhere; }
.atlas-admin-editor { max-width: 56rem; }
.atlas-admin-actions, .atlas-admin-filters { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem 1rem; }
.atlas-admin-filters > div { flex: 1 1 10rem; min-width: 0; }
.atlas-admin-filters .button { margin-top: 0; }
.atlas-admin-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; padding: .3rem .65rem; border-bottom: 1px solid var(--line); }
.atlas-admin-list li span:last-child { margin-inline-start: auto; }
.atlas-admin-categories, .atlas-admin-delete { margin-top: 2rem; }
.atlas-admin summary { cursor: pointer; min-height: 44px; padding-block: .55rem; font-weight: 650; }
.atlas-admin-category { margin-top: 1rem; padding: .65rem 1rem; border: 1px solid var(--line); border-radius: .85rem; }
.atlas-admin-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 0 1rem; }
.atlas-checkboxes { display: flex; flex-wrap: wrap; gap: .5rem 1rem; min-width: 0; border-radius: .85rem; }
.atlas-checkboxes label { display: flex; align-items: center; gap: .45rem; margin: 0; min-height: 44px; }
.atlas-checkboxes input { display: inline-block; width: 1.15rem; min-height: 1.15rem; }
@media (max-width: 35rem) {
    .atlas-entry-hero { flex-direction: column; align-items: start; }
    .atlas-entry-mark { max-width: 100%; text-align: start; }
}
