.archive-main { container: archive-files / inline-size; }
.archive-shell:has(.archive-files-page) .archive-main { padding: 24px; }
.archive-file-navigation { display: flex; flex: none; flex-direction: column; gap: 12px; margin-bottom: 16px; min-width: 0; }
.archive-file-navigation .archive-toolbar.archive-files-toolbar { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; width: 100%; margin: 0; }
.archive-toolbar-main { display: flex; flex: 1 1 0; flex-wrap: wrap; align-items: center; gap: 8px; min-width: min(100%, 160px); }
.archive-toolbar-create { display: flex; flex: none; align-items: center; gap: 8px; margin-left: auto; }
.archive-file-navigation .archive-toolbar .archive-toolbar-left { display: flex; align-items: center; gap: 8px; flex: 1 1 160px; min-width: 160px; width: auto; }
.archive-file-navigation .archive-toolbar .app-search-field { display: flex; flex: 1 1 0; min-width: 0; width: 100%; max-width: none; }
.archive-file-navigation .archive-toolbar .archive-toolbar-right { display: contents; }
.archive-toolbar-main > .archive-toolbar-right > * { flex: none; }
.archive-file-navigation .archive-toolbar .app-search-field { height: 44px; min-height: 44px; }
.archive-file-navigation .archive-toolbar .archive-layout-button { height: 44px; min-height: 44px; }
.archive-file-navigation .archive-toolbar :is(.module-filter-button, .app-sort-trigger, .archive-file-create-actions .button) { height: 44px; min-height: 44px; }
.archive-file-navigation .archive-toolbar .module-filter-button { width: auto; min-width: 44px; padding-inline: 14px; }
.archive-file-navigation .archive-toolbar .app-sort-field { width: auto; min-width: 0; padding: 0; }
.archive-file-navigation .archive-toolbar .app-sort-trigger { width: auto; min-width: 44px; padding-inline: 12px; justify-content: center; }
.archive-file-navigation .archive-toolbar :is(.app-sort-current, .app-sort-chevron) { display: inline; }
.archive-file-navigation .archive-toolbar .archive-file-create-actions .button > span { display: inline; }
.archive-file-navigation .archive-toolbar #archiveFilterButton > span:not(.module-filter-icon):not(.module-filter-count) { display: inline; }
.archive-file-navigation .archive-toolbar .archive-layout-button { width: 44px; min-width: 44px; padding: 0; justify-content: center; }
.archive-file-navigation .archive-toolbar .archive-layout-switch { display: flex; gap: 4px; }
.archive-file-navigation .archive-toolbar .archive-file-create-actions { display: flex; gap: 8px; }
.archive-file-navigation .archive-toolbar .archive-file-create-actions .button { white-space: nowrap; }
.archive-file-navigation .archive-toolbar :is(.archive-mobile-search-trigger, .archive-mobile-search-close, .archive-mobile-add-files) { display: none; }
.archive-file-navigation .archive-toolbar .archive-mobile-search-trigger { place-items: center; padding: 0; border: 1px solid var(--border-default); border-radius: 6px; background: var(--surface-card); color: var(--text-secondary); cursor: pointer; }
.archive-file-navigation .archive-toolbar .archive-mobile-search-trigger svg { width: 20px; height: 20px; }
.archive-file-navigation .archive-toolbar .archive-mobile-search-trigger.has-query { border-color: var(--brand-green-400); color: var(--brand-green-300); background: var(--surface-selected); }
.archive-file-navigation .archive-toolbar .archive-mobile-search-close { place-items: center; flex: 0 0 44px; width: 44px; min-width: 44px; height: 44px; padding: 0; border: 1px solid var(--border-default); border-radius: 6px; background: var(--surface-card); color: var(--text-secondary); cursor: pointer; }
.archive-file-navigation .archive-toolbar .archive-mobile-search-close svg { display: block; width: 20px; height: 20px; }
.archive-file-navigation .archive-toolbar .archive-view-picker { display: none; }
.archive-files-page .archive-file-navigation .archive-location-row { display: flex; flex: none; width: 100%; margin: 0; min-width: 0; }
.archive-file-navigation .archive-location-controls { display: flex; flex: none; gap: 4px; }
.archive-file-navigation .archive-breadcrumbs { flex: 1; min-width: 0; }
.archive-compact-path { display: none; position: relative; flex: none; }
.archive-compact-path summary { display: grid; place-items: center; width: 28px; height: 36px; cursor: pointer; list-style: none; }
.archive-compact-path summary::-webkit-details-marker { display: none; }
.archive-compact-path summary svg { width: 18px; height: 18px; }
.archive-compact-path-menu { position: absolute; top: 40px; left: 0; z-index: 70; width: min(260px, calc(100vw - 44px)); max-height: 50vh; overflow: auto; padding: 6px; border: 1px solid var(--border-default); border-radius: 6px; background: var(--surface-card); box-shadow: 0 12px 32px color-mix(in srgb, var(--gg-scrim) 3.1%, transparent); }
.archive-compact-path-menu button { display: block; width: 100%; max-width: none; min-height: 44px; padding: 8px; border: 0; background: transparent; color: var(--text-primary); text-align: left; font: inherit; font-size: 12px; white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
.archive-compact-path-menu button:hover { background: var(--surface-card-hover); }
.archive-view-picker { position: relative; align-items: center; justify-content: center; gap: 2px; width: 52px; height: 44px; flex: none; border: 1px solid var(--border-default); border-radius: 6px; background: var(--surface-card); color: var(--text-secondary); }
.archive-view-picker > svg { width: 20px; height: 20px; }
.archive-view-picker > svg:last-child { width: 12px; }
.archive-view-picker select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.archive-view-picker:focus-within { outline: 2px solid var(--brand-green-300); outline-offset: 2px; }
.archive-image-shell .archive-main { display: flex; flex-direction: column; overflow: hidden; }
.archive-image-shell .archive-files-page { height: 100%; min-height: 0; }
.archive-file-identity { container: archive-file-identity / inline-size; }
.archive-file-identity .inspector-name-heading { align-items: center; }
.archive-file-identity .inspector-name-heading h2 { display: block; margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; overflow-wrap: normal; -webkit-line-clamp: unset; line-clamp: unset; }
.archive-file-identity > .archive-file-summary { margin-top: 8px; }
.archive-file-summary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.archive-image-workspace { display: flex; flex: 1 1 0; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.archive-image-workspace .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.archive-image-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; flex: none; gap: 8px; min-height: 48px; }
.archive-image-position, .archive-image-actions, .archive-image-zoom-tools { display: flex; align-items: center; gap: 4px; }
.archive-image-position { justify-content: center; color: var(--text-secondary); font-size: 12px; white-space: nowrap; }
.archive-image-position label { display: flex; align-items: center; gap: 4px; }
.archive-image-position input { width: 48px; min-width: 0; min-height: 28px; padding: 2px 4px; border: 1px solid var(--border-default); border-radius: 4px; background: transparent; color: var(--text-primary); font: inherit; text-align: center; font-variant-numeric: tabular-nums; appearance: textfield; }
.archive-image-position input::-webkit-inner-spin-button { appearance: none; }
.archive-image-position input:is(:hover, :focus) { border-color: var(--border-strong); background: var(--surface-input); }
.archive-image-actions { justify-self: end; }
.archive-image-workspace button:not(.button) { display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--text-secondary); cursor: pointer; }
.archive-image-workspace button:not(.button):hover:not(:disabled) { background: var(--surface-card-hover); color: var(--text-primary); }
.archive-image-workspace button:disabled { opacity: .35; cursor: not-allowed; }
.archive-image-workspace button[aria-pressed="true"] { background: var(--surface-selected); color: var(--brand-green-300); }
.archive-image-workspace button svg { width: 18px; height: 18px; }
.archive-image-workspace [data-av-action="next"] svg { transform: rotate(180deg); }
.archive-image-workspace button[data-av-action="details"] { display: none; }
.archive-image-workspace :is(button, input, [tabindex]):focus-visible { outline: 2px solid var(--brand-green-300); outline-offset: -2px; }
.archive-image-stage { position: relative; min-height: 100px; min-width: 0; flex: 1 1 0; overflow: hidden; background: transparent; touch-action: none; cursor: grab; }
.archive-image-stage:active { cursor: grabbing; }
.archive-image-stage > img { position: absolute; top: 0; left: 0; max-width: none; max-height: none; user-select: none; pointer-events: none; }
.archive-image-workspace .archive-image-stage > button:not(.button) { position: absolute; top: 50%; z-index: 4; transform: translateY(-50%); width: 44px; height: 44px; border-color: var(--border-default); border-radius: 6px; background: var(--surface-card); color: var(--text-primary); }
.archive-image-stage > [data-av-action="previous"] { left: 8px; }
.archive-image-stage > [data-av-action="next"] { right: 8px; }
.archive-image-stage > [data-av-person-region] { z-index: 2; }
.archive-image-status { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px 60px; color: var(--text-secondary); font-size: 13px; text-align: center; pointer-events: none; }
.archive-image-status button { pointer-events: auto; }
.archive-image-status[hidden], .archive-image-stage > img[hidden] { display: none; }
.archive-image-tools output { min-width: 46px; text-align: center; color: var(--text-secondary); font-size: 12px; font-variant-numeric: tabular-nums; }
.archive-image-tool-divider { height: 20px; width: 1px; background: var(--border-default); margin: 0 4px; }
.archive-image-filmstrip { flex: none; height: 94px; overflow-x: auto; overflow-y: hidden; border-top: 1px solid var(--border-default); }
.archive-image-filmstrip[hidden] { display: none; }
.archive-image-filmstrip > div { position: relative; height: 82px; }
.archive-image-filmstrip button[data-av-index] { position: absolute; top: 4px; width: 82px; height: 78px; display: flex; flex-direction: column; gap: 3px; padding: 4px; border: 2px solid transparent; border-radius: 4px; background: var(--surface-card); }
.archive-image-filmstrip button[data-av-index][aria-current="true"] { border-color: var(--brand-green-300); color: var(--text-primary); background: var(--surface-selected); }
.archive-image-filmstrip button img { width: 70px; height: 50px; object-fit: contain; }
.archive-image-filmstrip button svg { width: 28px; height: 50px; }
.archive-image-filmstrip button span { font-size: 11px; line-height: 14px; }
.archive-image-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; color: var(--text-secondary); }
.archive-image-empty h2 { margin: 0; font-size: 18px; color: var(--text-primary); }
.archive-image-empty p { margin: 0; font-size: 13px; }
.archive-image-expanded .workspace { grid-template-columns: minmax(0, 1fr); }
.archive-image-expanded #sidebar { display: none; }
.archive-image-expanded .archive-image-shell { grid-template-columns: minmax(0, 1fr); }
.archive-image-expanded .archive-image-shell > :is(.archive-inspector, .archive-inspector-collapsed) { display: none; }
.archive-image-expanded .archive-image-shell .archive-file-navigation,
.archive-image-expanded .archive-image-shell .archive-filter-results { display: none; }
.archive-file-navigation .archive-toolbar[data-density="4"] .archive-file-create-actions .button { min-width: 44px; width: 44px; padding: 0; justify-content: center; }
.archive-file-navigation .archive-toolbar[data-density="4"] .archive-file-create-actions .button > span { display: none; }
.archive-file-navigation .archive-toolbar:is([data-density="2"], [data-density="3"], [data-density="4"]) #archiveFilterButton { min-width: 44px; width: 44px; padding: 0; justify-content: center; }
.archive-file-navigation .archive-toolbar:is([data-density="2"], [data-density="3"], [data-density="4"]) #archiveFilterButton > span:not(.module-filter-icon):not(.module-filter-count) { display: none; }
.archive-file-navigation .archive-toolbar:is([data-density="3"], [data-density="4"]) .app-sort-trigger { min-width: 44px; width: 44px; padding: 0; justify-content: center; }
.archive-file-navigation .archive-toolbar:is([data-density="3"], [data-density="4"]) :is(.app-sort-current, .app-sort-chevron) { display: none; }
.archive-file-navigation .archive-toolbar:is([data-density="3"], [data-density="4"]) .app-sort-field { min-width: 0; width: 44px; }
.archive-file-navigation .archive-toolbar:is([data-density="1"], [data-density="2"], [data-density="3"], [data-density="4"]):not(.mobile-search-open) .app-search-field { display: none; }
.archive-file-navigation .archive-toolbar:is([data-density="1"], [data-density="2"], [data-density="3"], [data-density="4"]):not(.mobile-search-open) .archive-mobile-search-trigger { display: grid; width: 44px; height: 44px; }
.archive-file-navigation .archive-toolbar:is([data-density="1"], [data-density="2"], [data-density="3"], [data-density="4"]) .archive-toolbar-left { flex: 0 0 44px; min-width: 44px; width: 44px; }
    .archive-file-navigation .archive-toolbar.mobile-search-open .archive-toolbar-right { display: none; }
    .archive-file-navigation .archive-toolbar.mobile-search-open .archive-toolbar-create { display: none; }
    .archive-file-navigation .archive-toolbar.mobile-search-open .archive-toolbar-left { display: flex; flex: 1 1 100%; min-width: 0; width: 100%; max-width: none; }
    .archive-file-navigation .archive-toolbar.mobile-search-open .archive-mobile-search-close { display: grid; }
@container archive-files (max-width: 440px) {
    .archive-file-navigation .archive-toolbar.archive-files-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
    .archive-toolbar-main { display: grid; grid-template-columns: repeat(3, 44px); gap: 8px; min-width: 0; }
    .archive-file-navigation .archive-toolbar .archive-layout-switch { grid-column: 1 / -1; grid-row: 2; }
    .archive-toolbar-create { grid-column: 2; grid-row: 1; }
    .archive-file-navigation .archive-toolbar.mobile-search-open { grid-template-columns: minmax(0, 1fr); }
    .archive-toolbar.mobile-search-open .archive-toolbar-main { display: flex; }
}
@container archive-files (max-width: 420px) {
    .archive-file-navigation .archive-toolbar.archive-files-toolbar,
    .archive-toolbar-main,
    .archive-toolbar-create,
    .archive-file-navigation .archive-toolbar .archive-file-create-actions { gap: 4px; }
    .archive-file-navigation .archive-toolbar .archive-view-picker { width: 44px; }
    .archive-file-navigation .archive-toolbar:not(.mobile-search-open) .app-search-field { display: none; }
    .archive-file-navigation .archive-toolbar:not(.mobile-search-open) .archive-mobile-search-trigger { display: grid; width: 44px; height: 44px; }
    .archive-file-navigation .archive-breadcrumbs { overflow: visible; padding-inline: 4px; gap: 2px; }
    .archive-file-navigation .archive-breadcrumb-leading-icon,
    .archive-file-navigation .archive-breadcrumbs ol > li:not(:last-child) { display: none; }
    .archive-file-navigation .archive-breadcrumbs .archive-breadcrumb-item--current { min-width: 0; }
    .archive-file-navigation .archive-breadcrumbs .archive-breadcrumb-item--current > .archive-breadcrumb-separator { display: none; }
    .archive-file-navigation .archive-compact-path { display: block; }
    .archive-file-navigation .archive-compact-path-menu { position: fixed; top: 164px; left: auto; right: 12px; }
}
@container archive-files (max-width: 640px) {
    .archive-image-tools { grid-template-columns: minmax(0, 1fr) auto; gap: 0 4px; padding: 4px 0; }
    .archive-image-position { grid-column: 1 / -1; grid-row: 1; min-height: 36px; }
    .archive-image-zoom-tools { grid-column: 1; grid-row: 2; gap: 0; }
    .archive-image-actions { grid-column: 2; grid-row: 2; gap: 0; }
    .archive-image-tool-divider { margin: 0 2px; }
    .archive-image-tools output { min-width: 40px; }
    .archive-image-workspace .archive-image-zoom-tools button { width: 32px; height: 44px; }
}
@media (max-width: 1100px) {
    .archive-image-workspace button[data-av-action="details"] { display: grid; }
}
@media (max-width: 900px) {
    .archive-shell:has(.archive-files-page) .archive-main { padding: 12px; }
    .archive-file-navigation { gap: 8px; margin-bottom: 12px; }
    .archive-file-navigation .archive-location-button { min-width: 44px; width: 44px; height: 44px; }
    .archive-image-workspace .archive-image-actions button { height: 44px; }
}
