.exhibit-actions {display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}
.template-tools {display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;min-width:0}
.template-search {display:flex;flex:1 0 168px;align-items:center;min-width:0;min-height:52px;max-width:244px;padding:var(--select-inset);border:1px solid var(--ui-border);border-radius:999px;background:var(--surface);backdrop-filter:var(--glass-blur);-webkit-backdrop-filter:var(--glass-blur)}
.template-search:focus-within {border-color:var(--selection-edge)}
.template-search input {flex:1;min-width:0;width:100%;min-height:44px;padding:0 12px;border:0;border-radius:999px;appearance:none;background:transparent;color:var(--text);font:500 15px/1.4 var(--body)}
.template-search input::placeholder {color:var(--muted)}
.template-search input::-webkit-search-cancel-button {appearance:none}
.template-search input:focus-visible {outline-offset:-3px}
.template-search button {display:grid;place-items:center;flex:0 0 44px;min-height:44px;padding:0;border-radius:50%;color:var(--muted)}
.template-search button:hover {background:var(--selection-fill);color:var(--selection-text)}
.template-search button .icon {width:16px;height:16px}
.exhibit-status {margin:-4px 0 14px;color:var(--muted);font-size:14px;line-height:1.5}
.exhibit-tabs [data-history-count] {font:500 14px/1 var(--body);margin-left:5px;color:inherit;opacity:.8}
.history-select-toggle,.history-selection-bar button {display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 14px;border:1px solid var(--ui-border);border-radius:999px;background:var(--surface);color:var(--text);font:500 15px/1.4 var(--body);cursor:pointer}
.history-select-toggle .icon {width:18px;height:18px;flex:none}
.history-select-toggle[aria-pressed=true] {background:var(--selection-fill);color:var(--selection-text);border-color:var(--selection-edge)}
.history-selection-bar {display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:0 0 18px;padding:12px 16px;border:1px solid var(--ui-border);border-radius:16px;background:var(--surface);color:var(--muted);font:500 16px/1.5 var(--body)}
.history-selection-bar label {display:flex;align-items:center;gap:9px;min-height:44px;cursor:pointer}
.history-selection-bar input {width:20px;height:20px;accent-color:var(--ui-mint)}
.history-selection-bar [data-history-selected-count] {margin-right:auto}
.history-selection-bar button {color:#ffc4c8;border-color:#ffc4c845;background:#ffc4c807}
.history-selection-bar button:disabled {cursor:default;opacity:.45}
.history-card {position:relative;min-width:0}
.saved-model-card .history-open {padding:0;text-align:left;cursor:pointer;font:inherit}
.saved-model-card .history-open[aria-busy=true] {opacity:.65;cursor:wait}
.saved-model-card .history-open>img {object-fit:contain;background:#101719}
.saved-model-card .exhibit-meta strong {overflow-wrap:anywhere;font-size:calc(clamp(17px,1.6vw,23px) + 2px)}
.history-card.is-selected {box-shadow:0 0 0 3px var(--selection-edge)}
.history-placeholder {position:absolute;inset:0;display:grid;place-items:center;background:radial-gradient(ellipse at 50% 35%,#aaf9ea14,transparent 70%),#161e21;color:#b8cfcb}
.history-placeholder>.icon {width:64px;height:64px;opacity:.7}
.history-delete {position:absolute;top:10px;right:10px;z-index:2;display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid #f1ffff2a;border-radius:50%;color:var(--text);background:#171d20d9;backdrop-filter:blur(12px);cursor:pointer}
.history-delete .icon {width:20px;height:20px}
.history-delete:hover {background:#4a2c31;color:#ffd1d3;border-color:#d0949b}
.history-choice {position:absolute;z-index:2;top:8px;right:8px;display:grid;place-items:center;min-width:44px;min-height:44px;padding:8px;border-radius:50%;background:#171d20d9;cursor:pointer}
.history-choice input {width:22px;height:22px;accent-color:var(--ui-mint);cursor:pointer}
.history-add-template {display:flex;align-items:center;justify-content:center;gap:7px;width:100%;min-height:44px;margin-top:4px;padding:8px 10px;border:1px solid var(--ui-border);border-radius:12px;background:var(--surface);color:var(--selection-text);font:600 14px/1.4 var(--body)}
.history-add-template .icon {width:16px;height:16px}
.history-add-template:hover:not(:disabled) {background:var(--selection-fill);border-color:var(--selection-edge)}
.history-add-template:disabled {opacity:1;color:var(--muted);cursor:default}
.history-storage-note {font:400 15px/1.65 var(--body);color:var(--muted);margin:18px 0 0}
.history-storage-note[data-tone=error] {color:var(--error)}
.history-dialog {width:min(460px,calc(100% - 32px));max-height:calc(100dvh - 32px);overflow:auto;padding:28px;border:1px solid var(--ui-border);border-radius:24px;background:#1b2426;color:var(--text);box-shadow:0 24px 90px #0009;font:400 17px/1.65 var(--body)}
.history-dialog::backdrop {background:#02070bb3;backdrop-filter:blur(8px)}
.history-dialog h3 {margin:0 0 12px;font:700 32px/1.15 var(--display);letter-spacing:0;text-wrap:balance}
.history-dialog p {margin:0 0 20px;color:var(--muted)}
.history-dialog p strong {color:var(--text);overflow-wrap:anywhere}
.history-dialog .history-dialog-error {color:var(--error)}
.history-category-field {display:grid;gap:7px;font-size:15px;font-weight:600}
.history-category-field small {color:var(--muted);font:inherit;font-weight:400}
.history-category-field select {width:100%;min-height:48px;padding:10px 12px;border:1px solid var(--ui-border);background-color:var(--surface);color:var(--text)}
.history-category-field+.history-dialog-error {margin:12px 0 0}
.history-dialog-actions {display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:10px;margin-top:24px}
.history-dialog-actions button {min-height:44px;padding:10px 16px;border:1px solid var(--ui-border);border-radius:12px;background:var(--surface-raised);color:var(--text);font:600 16px/1.4 var(--body);cursor:pointer}
.history-dialog-actions .history-confirm-delete {background:#66393f;border-color:#b87d86;color:#fff1f3}
.history-dialog-actions .history-confirm-template {background:var(--ui-action);border-color:var(--selection-edge);color:#15372a}
.history-dialog-actions button:disabled {opacity:.5;cursor:not-allowed}
.history-dialog-actions button:hover:not(:disabled) {filter:brightness(1.12)}
.exhibits :is(.history-select-toggle,.history-delete,.history-choice input,.history-selection-bar input,.history-selection-bar button,.history-open,.history-add-template):focus-visible,.history-dialog button:focus-visible {outline:2px solid var(--ui-mint);outline-offset:4px}
.exhibits [hidden] {display:none!important}
@media(max-width:600px) {.exhibit-actions{margin-left:auto}.history-select-toggle{padding-inline:12px}.history-selection-bar{gap:8px 12px;padding:8px 12px}.history-dialog{padding:22px}.history-dialog-actions button{flex:1}.history-dialog h3{font-size:26px}.saved-model-card .exhibit-meta{right:12px}.saved-model-card .exhibit-meta strong{font-size:18px}}
@media(max-width:600px) {
 .exhibit-actions:has(.template-tools:not([hidden])) {width:100%;margin-inline-start:0}
 .template-tools {width:100%;justify-content:flex-start}
 .template-search {max-width:none}
}
@media(prefers-reduced-motion:no-preference) {.history-delete,.history-select-toggle,.history-dialog-actions button{transition:background-color 160ms ease,color 160ms ease,border-color 160ms ease}}

.history-dialog-header {display:flex;align-items:center;justify-content:flex-start;gap:12px;margin:0 0 12px}
.history-dialog-header .icon-button {flex-shrink:0}
.history-dialog-header h3 {margin:0;flex:1;min-width:0}
