.link-arrow { display: inline-block; width: 1em; height: 1em; vertical-align: -.12em; flex: 0 0 auto; }
.cookie-settings > svg { display: none; width: 18px; height: 18px; }

.artwork-viewer > .viewer-toolbar { order: 0; flex-shrink: 0; }
.artwork-viewer > .viewer-capture { order: 1; padding: 0; }
.artwork-viewer > .artwork-stage, .artwork-viewer > .bayeux-stage { order: 2; flex-shrink: 0; }
.artwork-viewer > .viewer-caption, .artwork-viewer > .bayeux-article-navigation { order: 3; flex-shrink: 0; }
.artwork-viewer > .bayeux-status { order: 5; flex-shrink: 0; }
.viewer-editor-toggle { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 18px; list-style: none; }
.viewer-editor-toggle::-webkit-details-marker { display: none; }
.viewer-editor-toggle > svg:last-child { width: 16px; height: 16px; margin-left: auto; transition: transform .15s ease; }
.viewer-editor-panel[open] > .viewer-editor-toggle > svg:last-child { transform: rotate(180deg); }
.viewer-editor-content { padding: 4px 18px 16px; }
.viewer-editor-panel:not([open]) > .viewer-editor-content, .viewer-loading[hidden] { display: none; }
.viewer-editor-toggle:focus-visible { outline: 2px solid #dfc393; outline-offset: -4px; }

@media (max-width: 760px) {
    body .frame-promo-dock:not([hidden]) { display: none; }
    .cookie-settings { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); display: grid; place-items: center; width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; border-color: #c8cbbc; color: #59624d; background: #f3f0e8ed; z-index: 30; }
    .cookie-settings > svg { display: block; }
    .cookie-settings > span { display: none; }

    .artwork-detail-page .detail-breadcrumb { padding: 16px 16px 0; gap: 8px; font-size: 8px; }
    .detail-breadcrumb > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .artwork-detail-page .artwork-detail-hero { padding: 20px 16px 40px; }
    .artwork-detail-heading { margin-bottom: 20px; }
    .artwork-detail-heading .eyebrow { margin-bottom: 12px; font-size: 8px; letter-spacing: .1em; }
    .artwork-detail-page .artwork-detail-heading h1 { font-size: clamp(30px, 7.5vw, 44px); line-height: 1.08; }
    .artwork-detail-page .detail-artist { margin-top: 10px; font-size: 14px; line-height: 1.5; }
    .artwork-detail-heading .detail-quick-facts { display: none; }
    .artwork-detail-heading .article-tags { margin-top: 12px; }
    .article-tags .tag-row { flex-wrap: nowrap; overflow-x: auto; margin-top: 0; padding-bottom: 4px; scrollbar-width: none; }
    .article-tags .tag-row::-webkit-scrollbar { display: none; }
    .article-tags .tag-row a { display: flex; align-items: center; flex-shrink: 0; min-height: 32px; font-size: 10px; }
    .article-actions { margin-top: 12px; gap: 20px; }
    .article-actions .text-link { display: inline-flex; align-items: center; min-height: 36px; font-size: 9px; }
    .artwork-detail-page .artwork-viewer { width: calc(100% + 32px); margin-inline: -16px; border-left: 0; border-right: 0; box-shadow: none; }

    .artwork-viewer > .viewer-capture { order: 4; }
    .artwork-viewer .viewer-toolbar { min-height: 52px; padding: 4px 8px; gap: 4px; flex-wrap: nowrap; }
    .artwork-viewer .viewer-toolbar-label { display: none; }
    .artwork-viewer .viewer-controls { width: 100%; justify-content: center; gap: 4px; }
    .artwork-viewer .viewer-controls button { width: 44px; min-width: 44px; height: 44px; padding: 10px; border-color: transparent; border-radius: 4px; }
    .artwork-viewer .viewer-controls span { min-width: 44px; height: 44px; border: 0; padding: 0; font-size: 10px; }
    .artwork-viewer .viewer-controls button[data-viewer-fullscreen], .artwork-viewer .viewer-controls button[data-bayeux-action="fullscreen"] { margin-left: auto; border-color: #736249; }
    .artwork-viewer .viewer-controls button[data-viewer-zoom-out] { margin-left: auto; }
    .artwork-viewer .viewer-controls button:disabled { opacity: .35; }
    .artwork-viewer .artwork-stage { min-height: 0; touch-action: pan-y; }
    .artwork-viewer.is-zoomed .artwork-stage, .artwork-viewer.is-annotating .artwork-stage { touch-action: none; }
    .artwork-viewer .viewer-caption { min-height: 28px; padding: 6px 12px; justify-content: center; font-size: 8px; line-height: 1.5; letter-spacing: 0; text-transform: none; }
    .artwork-viewer .viewer-caption > span:last-child { display: none; }
    .viewer-desktop-help { display: none; }
    .viewer-mobile-help { display: inline; }
    .viewer-stage-hint { bottom: 12px; max-width: calc(100% - 24px); padding: 7px 10px; font-size: 8px; letter-spacing: .04em; text-transform: none; white-space: nowrap; }
    .viewer-loading { inset: auto 12px 12px; z-index: 3; width: fit-content; max-width: calc(100% - 24px); margin: 0 auto; flex-wrap: wrap; gap: 8px; padding: 9px 12px; border-radius: 4px; font-size: 10px; background: #0c0b0ae6; }
    .viewer-spinner { width: 16px; height: 16px; }
    .artwork-stage.is-loading .viewer-stage-hint { display: none; }

    .viewer-editor-toggle { padding: 10px 12px; font-size: 11px; }
    .viewer-editor-content { max-height: min(52svh, 440px); padding: 4px 12px 14px; overflow-y: auto; overscroll-behavior: contain; }
    .viewer-editor-ribbon { flex-direction: column; align-items: stretch; gap: 12px; }
    .viewer-tool-group { max-width: 100%; padding-right: 0; border-right: 0; gap: 4px; }
    .viewer-tool-group:first-child { overflow-x: auto; padding-bottom: 4px; overscroll-behavior-x: contain; }
    .viewer-capture .viewer-tool-group button, .viewer-capture .viewer-tool-group a { width: 44px; height: 44px; padding: 12px; flex-shrink: 0; }
    .viewer-capture .viewer-tool-group select { height: 44px; }
    .viewer-capture input, .viewer-capture select, .viewer-capture .viewer-pixel-code input { font-size: 16px; }
    .viewer-export-group { margin-left: 0; }
    .viewer-capture-help { display: none; }
    .viewer-pixel-options summary span { display: block; margin-left: 0; }
    .viewer-capture .viewer-text-controls textarea { font-size: 16px; }

    .bayeux-article-viewer .bayeux-stage { height: min(52svh, 440px); touch-action: pan-y; }
    .bayeux-article-viewer.is-zoomed .bayeux-stage, .bayeux-article-viewer.is-annotating .bayeux-stage { touch-action: none; }
    .bayeux-article-viewer .viewer-controls { flex-wrap: nowrap; }
    .bayeux-article-viewer .viewer-controls button[data-bayeux-action="left"], .bayeux-article-viewer .viewer-controls button[data-bayeux-action="right"] { display: none; }
    .bayeux-article-navigation { padding: 10px 12px; font-size: 10px; }
    .bayeux-article-navigation p { margin-bottom: 8px; }
    .bayeux-article-navigation label { flex-direction: row; align-items: center; gap: 10px; }
    .bayeux-article-navigation input { min-height: 36px; }
    .bayeux-article-navigation a { margin-top: 6px; font-size: 9px; }

    .gallery-card .discovery-card-image { aspect-ratio: auto; padding: 16px; }
    .gallery-card .discovery-card-image img { width: auto; height: auto; max-width: 100%; max-height: calc(72svh - 64px); margin-inline: auto; }
    .gallery-card:hover, .gallery-card:focus-within, .gallery-card .discovery-card-image:hover img { transform: none; }
    .gallery-card .discovery-card-image > .card-open-icon { right: 10px; bottom: 10px; width: 32px; height: 32px; font-size: 16px; }
    .browse-tags a, .search-prompts a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }
}

.artwork-viewer:is(:fullscreen, .is-expanded) {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    border: 0;
    border-radius: 0;
    background: #000;
    box-shadow: none;
}
.artwork-viewer.is-expanded {
    position: fixed;
    inset: auto;
    top: var(--viewer-viewport-top, 0px);
    left: var(--viewer-viewport-left, 0px);
    width: var(--viewer-viewport-width, 100vw);
    height: var(--viewer-viewport-height, 100dvh);
    z-index: 1000;
    overscroll-behavior: contain;
}
.artwork-viewer:is(:fullscreen, .is-expanded) > .artwork-stage,
.artwork-viewer:is(:fullscreen, .is-expanded) > .bayeux-stage { flex: 1 1 0; height: 0; min-height: 0; width: 100%; touch-action: none; }
.artwork-viewer:is(:fullscreen, .is-expanded) .artwork-zoom-image { width: auto; height: auto; max-width: 100%; max-height: 100%; }
.artwork-viewer:is(:fullscreen, .is-expanded) > .viewer-capture { order: 4; max-height: 42dvh; overflow-y: auto; }
.artwork-viewer:is(:fullscreen, .is-expanded) .viewer-editor-toggle { position: sticky; top: 0; z-index: 2; background: #171512; }
.artwork-viewer:is(:fullscreen, .is-expanded) .viewer-editor-content { max-height: none; }
.artwork-viewer:is(:fullscreen, .is-expanded) .bayeux-article-navigation { padding: 6px 12px; }
.artwork-viewer:is(:fullscreen, .is-expanded) .bayeux-article-navigation p,
.artwork-viewer:is(:fullscreen, .is-expanded) .bayeux-article-navigation a { display: none; }
body:has(.artwork-viewer:is(:fullscreen, .is-expanded)) .cookie-settings,
body:has(.artwork-viewer:is(:fullscreen, .is-expanded)) .frame-promo-dock { display: none; }

@media (prefers-reduced-motion: reduce) {
    .viewer-editor-toggle > svg:last-child { transition: none; }
}
