#myData {
    visibility: hidden;
    display: none;
}

h1, h2, h3, h4, p, dd, li, a, br {
    line-height: 1.4rem;
}

h1, h2, h3, h4, a {
    font-size: 1rem;
    color: var(--navy);
    font-weight: normal;
}

a {
    text-decoration: none;
}

ul {
    padding-left: 0;
}

li {
    margin-bottom: 0.2rem;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin-bottom: var(--spacing-md);
}

/* ============================================================================
   MAP CONTAINER
   ============================================================================ */

div#map {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    top: 56px;          /* clears the fixed header */
    height: calc(100% - 56px);
}

/* ============================================================================
   DATA PANEL — reveal / retreat animations
   ============================================================================ */

@keyframes panel-reveal {
    from { opacity: 0; transform: translateY(-18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes panel-retreat {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-18px); }
}

div#myData.panel-entering {
    animation: panel-reveal 0.7s cubic-bezier(0.2, 0, 0.2, 1) forwards;
}

div#myData.panel-leaving {
    animation: panel-retreat 0.45s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* ============================================================================
   DATA PANEL
   ============================================================================ */

/* Mobile-first: Full screen panel */
div#myData {
    position: fixed;
    left: var(--spacing-md);
    top: calc(56px + var(--spacing-md));   /* clears fixed header */
    right: var(--spacing-md);
    bottom: var(--spacing-md);
    max-height: calc(94vh - 56px);
    z-index: 100;
    padding: 0;                         /* sections handle their own padding */
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-panel);
    overflow: auto;
}

/* Desktop: Sidebar panel */
@media (min-width: 1024px) {
    div#myData {
        right: auto;
        bottom: auto;
        height: max-content;
        min-width: 420px;
        width: 22%;
    }
}

/* ============================================================================
   PANEL INNER LAYOUT
   ============================================================================ */

/* thin red top border — matches ocr-list accent */
div#myData::before {
    content: '';
    display: block;
    height: 3px;
    background: var(--accent);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* Each logical section gets a divider */
/*.panel-section {*/
/*    padding: var(--spacing-md) calc(var(--spacing-lg) + 0.5rem) var(--spacing-md);*/
/*    border-bottom: 1px solid var(--border);*/
/*}*/
/*.panel-section:last-child {*/
/*    border-bottom: none;*/
/*}*/

/* ============================================================================
   HEADINGS
   ============================================================================ */

h1::first-letter {
    text-transform: uppercase;
}

h1 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 1.1rem;
    line-height: 1.55rem;
    padding: var(--spacing-md) var(--spacing-md) 0.25rem calc(var(--spacing-lg) + 0.25rem);
    color: var(--navy);
    column-span: all;
    border-bottom: none;
}

small.inventory-num {
    font-family: var(--font-serif);
    color: var(--navy);
    font-size: 0.75rem;
}

h4 {
    font-family: var(--font-ui);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 0.9rem;
    margin-bottom: 0.25rem;
}

.subhead {
    padding-left: 0;
    font-size: 0.82rem;
    font-weight: 500;
    font-family: var(--font-ui);
    color: var(--text-muted);
    display: block;
    margin-top: 0.5rem;
    margin-bottom: 0.35rem;
}

/* <p> wrapper injected by createSection() — strip default browser margins */
.panel-body > p {
    margin: 0;
}

/* ============================================================================
   THUMBNAIL IMAGE
   ============================================================================ */

#dThumb {
    float: right;
    padding: 0.75rem calc(var(--spacing-lg) + 0.5rem) 0 var(--spacing-md);
}

#dThumb img {
    width: 80px;
    height: 80px;
    margin-top: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 50%;
    filter: grayscale(80%);
    -webkit-filter: grayscale(80%);
    object-fit: cover;
}

/* ============================================================================
   BUTTONS — matching ocr-list .btn-view style
   ============================================================================ */

#myData button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-family: var(--font-ui);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.4;
    width: auto;
    min-width: 0;
    padding: 0.2rem 0.5rem 0rem;
    margin-bottom: var(--spacing-sm);
    margin-right: var(--spacing-sm);
    background-color: transparent;
    color: var(--navy-light);
    border: 1.5px solid var(--navy-light);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background 0.13s, color 0.13s, border-color 0.13s;
}

#myData button:hover,
#myData button:active {
    background-color: var(--navy);
    border-color: var(--navy);
    color: #ffffff;
}

#myData button a {
    color: inherit;
    text-decoration: none;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

#myData button a span {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    display: inline;
    width: auto;
}

a.qid-link {
    font-size: 0.7rem;
    font-family: var(--font-ui);
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.03em;
    font-weight: 500;
}

a.qid-link:hover {
    text-decoration: underline;
    color: var(--navy-light);
}

/* Building button in artwork headers */

button.location-btn {
    margin-top: 1rem;
}

a.location-btn,
button.location-btn {
    display: inline-flex;
    align-items: center;
    font-size: 0.65rem;
    font-family: var(--font-ui);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.4;
    padding: 0.2rem 0.5rem;
    margin-bottom: 0.5rem;
    background-color: transparent;
    color: var(--navy-light);
    border: 1.5px solid var(--navy-light);
    border-radius: var(--border-radius);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.13s, color 0.13s, border-color 0.13s;
}

a.location-btn:hover,
button.location-btn:hover {
    background-color: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

ol.disambig-list {
    margin-left: -1.25em !Important;
}

ol.disambig-list > li::marker {
    font-size: 0.8em;
}

/* ============================================================================
   WIKIPEDIA EXTRACT
   ============================================================================ */

.wikipedia-extract {
    margin: 0;
    padding: 0;
    background-color: transparent;
    font-family: var(--font-serif);
    line-height: 1.6;
}

.wikipedia-extract p {
    margin: 0 0 0 0;
    color: var(--text);
    text-align: left;
    font-size: 0.875rem;
}

/* Full Wikipedia Article */
#dWPedia h4 {
    display: none;
}

#dWPedia h2,
#dWPedia h3 {
    font-size: 0.78rem;
    font-family: var(--font-ui);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 1rem 0 0.4rem;
}

#dWPedia b {
    font-weight: 500;
}

#dWPedia p {
    margin: 0 0 0.75rem 0;
    line-height: 1.65;
    text-align: left;
    font-family: var(--font-serif);
    font-size: 0.875rem;
    color: var(--text);
}

#dWPedia a {
    color: var(--navy-light);
    text-decoration: none;
    font-size: inherit;
}

#dWPedia a:hover {
    text-decoration: underline;
    color: var(--navy);
}

#dWPedia {
    margin-bottom: 1.5rem;
}

#dWPedia ul,
#dWPedia ol {
    margin: 0.6rem 0;
    padding-left: 1.25rem;
}

#dWPedia li {
    margin: 4px 0;
    font-size: 0.875rem;
}

#dWPedia small {
    font-size: 0.82rem;
    color: var(--text-muted);
}

#dWPedia abbr {
    text-decoration: none;
}

/* Wiki More/Less button — inherits the standard button style above */
#myData .wiki-more-button {
    margin-bottom: var(--spacing-md);
    color: var(--navy-light);
}

.wiki-more-button:hover:not(:disabled) {
    background-color: var(--navy);
    color: #fff;
}

.wiki-more-button:disabled {
    opacity: 0.5;
    cursor: wait;
}

.wiki-more-button span {
    font-family: var(--font-ui);
    color: inherit;
}

hr.panel-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: var(--spacing-md) 0 var(--spacing-sm);
}

/* ============================================================================
   FOOTER NOTE
   ============================================================================ */

span.notabene {
    font-size: 0.75rem;
    display: block;
    font-family: var(--font-ui);
    color: var(--text-muted);
    margin: var(--spacing-sm) var(--spacing-lg) var(--spacing-md);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border);
}

/* ============================================================================
   MAPBOX CONTROLS
   ============================================================================ */

.mapboxgl-ctrl-top-right {
    /* top: var(--spacing-md); */
}

.mapboxgl-ctrl-top-right .mapboxgl-ctrl {
    float: right;
    margin: var(--spacing-md) var(--spacing-md) 0 0;
}

/* Style Switcher */
.style-switcher {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    padding: 0;
}

.style-switcher-select {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: none;
    background-color: transparent;
    color: var(--text);
    cursor: pointer;
    border-radius: var(--border-radius);
    outline: none;
    transition: background-color 0.15s;
}

.style-switcher-select:hover {
    background-color: var(--row-hover);
}

.style-switcher-select:focus {
    background-color: var(--row-hover);
}

/* Custom dropdown arrow */
.style-switcher-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6278' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1em;
}

/* ============================================================================
   HISTORIC MAP STYLE SWITCHER (Modern / Nolli 1754 / Virano 1888)
   ============================================================================ */

.historic-map-ctrl,
.naples-map-ctrl {
    margin-top: var(--spacing-md) !important;
    width: fit-content !important;
}

/* Each button sits in the same ctrl-group, separated by the group's border */
.hmap-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100px !important;
    padding-left: var(--spacing-sm) !important;
    padding-right: var(--spacing-sm) !important;
    padding: 0 0.75rem;
    height: 29px;
    background: var(--surface);
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
    transition: background 0.13s, color 0.13s;
}

/* Divider between buttons, matching mapboxgl-ctrl-group style */
.hmap-btn + .hmap-btn {
    border-top: 1px solid var(--border);
}

.hmap-btn:hover {
    background: var(--row-hover);
    color: var(--navy);
}

.hmap-btn.active {
    background: var(--navy);
    color: #fff;
}

.hmap-label {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    text-transform: none;
}

/* "Modern" label is upright, not italic */
.hmap-btn[data-style="modern"] .hmap-label {
    font-style: normal;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
}

/* Backdrop — controlled via body.panel-open class */
#panel-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(0, 0, 0, 0.25);
}

@keyframes panel-reveal-mobile {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes panel-retreat-mobile {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(100%); }
}

@media (max-width: 768px) {
    header { display: none !important; }
    div#map { top: 0; height: 100dvh; }

    /* Bottom sheet positioning */
    div#myData {
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        max-height: 85dvh !important;
        border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
        border-bottom: none !important;
    }

    /* Override ::before to be the drag handle pill instead of red bar */
    div#myData::before {
        height: 4px;
        width: 40px;
        background: var(--border);
        border-radius: 2px;
        margin: 10px auto 6px;
    }

    /* Mobile-specific animations */
    div#myData.panel-entering {
        animation: panel-reveal-mobile 0.45s cubic-bezier(0.2, 0, 0.2, 1) forwards;
    }

    div#myData.panel-leaving {
        animation: panel-retreat-mobile 0.35s cubic-bezier(0.4, 0, 1, 1) forwards;
    }

    /* Backdrop shown when panel is open */
    body.panel-open #panel-backdrop {
        display: block;
    }

    .wikipedia-extract { font-size: 0.875rem; }
    .wiki-more-button  { font-size: 0.72rem; margin-bottom: var(--spacing-sm); }
    #dWPedia           { font-size: 0.875rem; }

    #myData button {
        font-size: 0.63rem;
        padding: 0.22rem 0.55rem;
        min-width: 0;
    }

    /* Compact geocoder search bar on mobile */
    .mapboxgl-ctrl-geocoder {
        min-width: 0 !important;
        max-width: 260px !important;
        font-size: 0.82rem !important;
    }

    .mapboxgl-ctrl-geocoder .mapboxgl-ctrl-geocoder--input {
        height: 32px !important;
        padding: 4px 35px !important;
        font-size: 0.82rem !important;
    }

    .mapboxgl-ctrl-geocoder .mapboxgl-ctrl-geocoder--icon-search {
        top: 7px !important;
        width: 18px !important;
        height: 18px !important;
    }

    .mapboxgl-ctrl-geocoder .mapboxgl-ctrl-geocoder--button {
        top: 4px !important;
    }
}

/* ============================================================================
   PANEL BODY — padded wrapper for extract + section buttons
   ============================================================================ */

.panel-body {
    padding: var(--spacing-md) calc(var(--spacing-lg) + 0.25rem) 0.25rem;
}
/* ============================================================================
   BUILDING SEARCH (in header)
   ============================================================================ */

#building-bar {
    display: flex;
    align-items: center;
    padding-right: 1rem;
    border-right: 1px solid rgba(255,255,255,.12);
    margin-right: 0.5rem;
}

#building-input {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--border-radius);
    padding: 0.4rem 0.6rem;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    outline: none;
    width: 200px;
    transition: background .15s, border-color .15s;
}

#building-input:focus {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.65);
}

#building-input::placeholder { color: rgba(255,255,255,0.65); }

#building-autocomplete {
    display: none;
    position: fixed;
    z-index: 300;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    max-height: 280px;
    overflow-y: auto;
}

/* ============================================================================
   ARTIST AUTOCOMPLETE DROPDOWN
   ============================================================================ */

#artist-autocomplete {
    display: none;
    position: fixed;
    z-index: 300;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    max-height: 280px;
    overflow-y: auto;
}

.ac-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ac-item:last-child { border-bottom: none; }

.ac-item:hover { background: var(--row-hover); }

.ac-label {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--navy);
}

.ac-desc {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================================
   SPARQL OVERLAY BAR
   ============================================================================ */

#overlay-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    padding-right: 0.5rem;
}

#overlay-select {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--border-radius);
    padding: 0.3rem 0.6rem;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    cursor: pointer;
    outline: none;
    min-width: 180px;
}

#overlay-select option {
    background: var(--navy);
    color: #fff;
}
#overlay-param-select {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--border-radius);
    padding: 0.3rem 0.6rem;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    cursor: pointer;
    outline: none;
    min-width: 140px;
}

#overlay-param-select option {
    background: var(--navy);
    color: #fff;
}

#overlay-param {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--border-radius);
    padding: 0.3rem 0.6rem;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    outline: none;
    width: 130px;
}

#overlay-param::placeholder { color: rgba(255,255,255,0.4); }

#overlay-run {
    background: #e09b00;
    color: #fff;
    border: 1.5px solid #e09b00;
    border-radius: var(--border-radius);
    padding: 0.3rem 0.85rem;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.13s, border-color 0.13s;
    white-space: nowrap;
}

#overlay-run:hover { background: #c48600; border-color: #c48600; }

#overlay-count {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
    min-width: 60px;
}

#overlay-clear {
    background: transparent;
    color: #e09b00;
    border: 1.5px solid #e09b00;
    border-radius: var(--border-radius);
    padding: 0.3rem 0.65rem;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.13s, color 0.13s, border-color 0.13s;
    white-space: nowrap;
}


/* ============================================================================
   HEADER FIT — keep the overlay bar (incl. RUN) on screen at mid widths.
   Mobile browsers in "desktop site" mode lay out at ~980px, and iPads in
   landscape at ~1024–1180px; the full header needs ~1250px. Instead of
   letting the right end fall off, the overlay bar never shrinks, the
   building search gives way first, and below 1280px the header compacts.
   ============================================================================ */

#overlay-bar        { flex-shrink: 0; }
#overlay-count:empty { display: none; }      /* don't reserve 60px for nothing */

#building-bar       { flex: 0 1 auto; min-width: 0; }
#building-input     { min-width: 90px; flex: 0 1 auto; }

@media (min-width: 769px) and (max-width: 1279px) {
    header                 { padding: 0 1rem; }

    /* logo icon only — nav is short now (Volumes / Map / About) */
    .header-logo           { min-width: 0; margin-right: .5rem; padding-right: .75rem; }
    .header-logo div       { display: none; }
    .header-logo img       { margin-right: 0 !important; }   /* beats inline style */

    nav a                  { padding: 0 .7rem; }

    #building-bar          { padding-right: .6rem; margin-right: .25rem; }
    #building-input        { width: 160px; }

    #overlay-bar           { gap: .4rem; padding-right: 0; }
    #overlay-select        { min-width: 0; max-width: 190px; }
    #overlay-param         { width: 110px; }
    #overlay-param-select  { min-width: 0; max-width: 150px; }
    #overlay-count         { min-width: 0; }
}

/* ============================================================================
   LOCATED HERE PANEL — sibling extension to #myData (desktop only)
   ============================================================================ */

/* Single merged "What's here" panel — sits to the right of #myData on desktop */
#located-here-panel {
    display: none;
    visibility: hidden;
    position: fixed;
    top: calc(56px + var(--spacing-md));
    /* 4px gap after #myData (left:1rem, width:max(22%,421px)) */
    left: max(calc(22% + 1rem + 4px), calc(421px + 1rem + 4px));
    width: 280px;
    max-height: calc(94vh - 56px);
    overflow-y: auto;
    z-index: 100;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-panel);
    padding: 0 var(--spacing-md) var(--spacing-md);
}

#located-here-panel::before {
    content: '';
    display: block;
    height: 3px;
    background: var(--accent);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    margin: 0 calc(-1 * var(--spacing-md)) var(--spacing-sm);
}

/* Hidden on mobile — main panel is a bottom sheet, no room to the right */
@media (max-width: 1023px) {
    #located-here-panel { display: none !important; }
}

.lh-table {
    width: 100%;
    border-collapse: collapse;
}

.lh-table tr {
    border-bottom: 1px solid var(--border);
}

.lh-table tr:last-child {
    border-bottom: none;
}

.lh-img-cell {
    width: 44px;
    padding: 0.4rem 0.5rem 0.4rem 0;
    vertical-align: middle;
}

.lh-img-cell img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid var(--border);
    filter: grayscale(60%);
    display: block;
}

.lh-label-cell {
    padding: 0.4rem 0;
    vertical-align: middle;
}

.lh-link {
    font-family: var(--font-serif);
    font-size: 0.82rem;
    color: var(--navy);
    text-decoration: none;
    line-height: 1.3;
}

.lh-link:hover {
    color: var(--navy-light);
    text-decoration: underline;
}

.lh-qid {
    font-family: var(--font-ui);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
    font-weight: 500;
}

.lh-loading, .lh-empty, .lh-error {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: var(--text-muted);
    padding: var(--spacing-sm) 0;
    margin: 0;
}

/* Section banners within the "What's here" panel — separates the P276 /
   P195 / P361 relation groups so collection objects, structural parts,
   and co-located items never read as one undifferentiated list. */
.lh-section-banner {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: var(--spacing-sm) 0.25rem 0.25rem;
    margin: 0;
    border-top: 1px solid var(--border);
}

.lh-section:first-child .lh-section-banner {
    border-top: none;
    padding-top: 0;
}

/* "What's here" with results: the panel becomes a transparent row and each
   relation group (Located here / In this collection / Single parts) is its
   own card with independent scrolling. Loading/empty/error messages and
   "Depicted by" keep the single-card look (class not set). */
#located-here-panel.lh-columns {
    width: auto;
    max-width: calc(100vw - max(calc(22% + 1rem + 4px), calc(421px + 1rem + 4px)) - 1rem);
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    gap: 4px;
    align-items: flex-start;
}

#located-here-panel.lh-columns::before {
    display: none;
}

#located-here-panel.lh-columns .lh-section {
    flex: 0 1 280px;
    min-width: 180px;
    max-height: calc(94vh - 56px);
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-panel);
    padding: 0 var(--spacing-md) var(--spacing-md);
}

#located-here-panel.lh-columns .lh-section::before {
    content: '';
    display: block;
    height: 3px;
    background: var(--accent);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    margin: 0 calc(-1 * var(--spacing-md)) var(--spacing-sm);
}

#located-here-panel.lh-columns .lh-section-banner {
    border-top: none;
    padding-top: 0;
}

.lh-truncated-note {
    font-family: var(--font-ui);
    font-size: 0.76rem;
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.5;
    border-top: 1px solid var(--border);
    padding: 0.5rem 0.25rem 0.5rem;
    margin: 0;
}

.lh-truncated-link {
    display: inline-block;
    margin-top: 0.15rem;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--navy);
    text-decoration: none;
}

.lh-truncated-link:hover {
    color: var(--navy-light);
    text-decoration: underline;
}
/* ============================================================================
   MOBILE "WHAT'S HERE" — back-button header inside #myData
   ============================================================================ */

.lh-mobile-header {
    padding: var(--spacing-sm) calc(var(--spacing-lg) + 0.5rem) var(--spacing-sm);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--spacing-sm);
}

/* Inherits #myData button base styles; this just fine-tunes size and feel */
#myData .lh-back-btn {
    font-size: 0.72rem;
    padding: 0.3rem 0.75rem;
    letter-spacing: 0.05em;
}
/* ============================================================================
   BHR-OWN RESOURCE BUTTONS — left accent bar + light navy tint
   Identifies Bibliotheca Hertziana resources (Kubikat, Digital Library, etc.)
   ============================================================================ */

#myData button.btn-own {
    border-left: 3px solid var(--accent);
    background: rgba(13, 32, 70, 0.05);
    padding-left: calc(0.5rem - 1.5px); /* compensate for extra border width */
}

#myData button.btn-own:hover,
#myData button.btn-own:active {
    background-color: var(--navy);
    border-color: var(--navy);
    color: #ffffff;
}

/* ============================================================================
   LIGHTBOX — full-image popup on thumbnail click (main entity thumbnail,
   Located Here / Depicted By tables). Markup created once by showLightbox()
   in map.js: #gh-lightbox > #gh-lb-backdrop, #gh-lb-box > #gh-lb-close,
   #gh-lb-img, #gh-lb-caption.
   ============================================================================ */

#gh-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

#gh-lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 32, 70, 0.82);
    cursor: zoom-out;
}

#gh-lb-box {
    position: relative;
    z-index: 1;
    max-width: min(90vw, 1000px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#gh-lb-img {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-panel);
    background: #000;
}

#gh-lb-caption {
    margin: var(--spacing-sm) 0 0;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: #fff;
    text-align: center;
    max-width: 100%;
}

#gh-lb-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

#gh-lb-close:hover {
    color: var(--accent, #e09b00);
}

@media (max-width: 768px) {
    #gh-lb-close { top: 0.5rem; right: 0.5rem; }
    #gh-lb-img   { max-height: 70vh; }
}