.history-intro{margin:8px 0 20px}.history-intro p{margin:6px 0;line-height:1.8}.history-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.history-toolbar [data-history-undo]{margin-left:auto}
.history-status{font-size:13px;color:#555;min-height:1.5em;margin:10px 0}
.history-frames{display:grid;gap:28px}.history-frame{min-width:0;border-top:3px solid #e60012;background:#faf8f6;padding:18px 16px 16px}
.history-frame-heading{display:flex;align-items:start;justify-content:space-between;gap:12px;margin-bottom:16px}.history-frame-heading h2,.history-frame-heading h3{font-size:20px;margin:0;line-height:1.5;overflow-wrap:anywhere}.history-frame-heading p{font-size:13px;color:#666;margin:6px 0 0;overflow-wrap:anywhere}
.history-frame-actions{display:flex;align-items:center;gap:3px;flex-shrink:0}.history-frame-actions .text-button{min-width:40px;min-height:44px}.history-frame-actions .button{white-space:nowrap}
.history-grid{display:grid;grid-template-columns:repeat(var(--history-columns,5),minmax(0,1fr));gap:6px}
.history-cell{border:0;border-radius:0;padding:0;background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;min-width:0;width:100%;height:clamp(140px,22vw,260px);font:inherit;color:inherit;cursor:pointer;overflow-wrap:anywhere}
.history-cell img{width:100%;height:100%;object-fit:contain;display:block;pointer-events:none}.history-work>span{font-weight:700;font-size:14px;padding:10px;max-height:100%;overflow:hidden;background:#fff;width:100%;height:100%;display:flex;align-items:center;justify-content:center}
.history-empty{background:#fff9;border:1px dashed #d9cfc9;color:#8c7770}.history-empty>span{font-size:26px}.history-empty small{font-size:11px}.history-cell[aria-pressed=true],.history-drop{outline:3px solid #e60012;outline-offset:-3px}.history-cell:focus-visible{outline:3px solid #222;outline-offset:2px}
.history-pool-add{margin:20px 0;min-height:44px}
.history-selection{position:sticky;top:8px;z-index:4;padding:14px 16px;background:#fff;border:2px solid #e60012;box-shadow:0 4px 20px #0001;margin:8px 0 20px;display:flex;flex-direction:column;gap:6px}.history-selection strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-selection>span{font-size:12px;color:#666}.history-selection>div{display:flex;gap:8px;flex-wrap:wrap}.history-selection .text-button{min-height:40px;font-size:12px}
.history-settings{max-width:520px}.history-settings label{display:block;margin:16px 0;font-weight:700}.history-settings input,.history-settings select{width:100%;margin-top:7px}.history-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.history-frame-delete{margin-top:16px;min-height:44px}
.portfolio-history .history-public{margin:28px 0 48px}.portfolio-history .collection-details{margin-top:42px}.portfolio-history .history-grid .history-empty{height:clamp(140px,22vw,260px);cursor:default}.history-work-label{font-size:13px;color:#a53034;font-weight:700}
.mini-history{grid-template-columns:repeat(3,1fr);gap:3px;border-top:4px solid #e60012}.mini-history i{background:#ddc9bf}.mini-history i:nth-child(n+7){display:none}
.share-hashtags{border:0;padding:0;margin:20px 0 12px;min-width:0}.share-hashtags legend{font-size:14px;font-weight:700;margin-bottom:10px}.hashtag-options{display:flex;flex-wrap:wrap;gap:8px}.hashtag-option{margin:0!important;line-height:1.5;display:inline-flex;align-items:center;gap:6px;font-size:13px;background:#f6f4f2;border:1px solid #dedad7;border-radius:24px;padding:8px 12px;cursor:pointer;min-height:42px}.hashtag-option:has(input:checked){background:#fff1f1;border-color:#e60012;color:#b50010}.hashtag-option input{width:16px;height:16px;margin:0;accent-color:#e60012}.share-preview-label{font-size:13px;font-weight:700}.share-text-preview{display:block;width:100%;margin:8px 0 16px;resize:vertical;font-size:13px;line-height:1.6;min-height:90px}
@media(max-width:760px){.history-frames{gap:20px}.history-frame{padding:14px 10px 10px}.history-frame-heading{flex-wrap:wrap;gap:6px;margin-bottom:10px}.history-frame-heading>div:first-child{flex:1 1 100%}.history-frame-heading h2,.history-frame-heading h3{font-size:18px}.history-frame-actions{margin-left:auto}.history-grid{grid-template-columns:repeat(var(--history-mobile-columns,3),minmax(0,1fr));gap:4px}.history-cell,.portfolio-history .history-grid .history-empty{height:clamp(112px,30vw,160px)}.history-selection{top:4px;padding:10px;gap:4px}.history-selection .button{font-size:12px;padding:8px}.history-toolbar{gap:8px}.history-work>span{font-size:12px;padding:6px}}

.history-columns-2{--history-columns:2;--history-mobile-columns:2}.history-columns-3{--history-columns:3}.history-columns-4{--history-columns:4}.history-columns-5{--history-columns:5}.history-columns-6{--history-columns:6}
.history-frame-actions .history-delete-action{display:inline-flex;align-items:center;gap:5px;margin-left:8px;padding:8px;color:#a53034;font-size:13px;white-space:nowrap}
.history-empty-state{padding:24px 18px;background:#faf8f6;line-height:1.8}
.history-presets{border:0;padding:0;margin:8px 0 20px;min-width:0}.history-presets legend{font-size:14px;font-weight:700;margin-bottom:10px}.history-presets>div{display:flex;flex-wrap:wrap;gap:8px}.history-preset{min-height:44px;border:1px solid #dedad7;border-radius:24px;padding:9px 14px;background:#f6f4f2;font:inherit;font-size:13px;cursor:pointer}.history-preset[aria-pressed=true]{background:#fff1f1;border-color:#e60012;color:#b50010}.history-preset:focus-visible{outline:2px solid #222;outline-offset:2px}
.hashtag-option[hidden]{display:none}.hashtag-toggle{min-height:44px;font-size:13px;padding:8px 0;margin-top:4px}.hashtag-option:has(input:disabled){opacity:.55}
#result-dialog.share-dialog[open]{display:flex;flex-direction:column;overflow:hidden;padding:0;width:min(620px,calc(100% - 32px));max-height:calc(100dvh - 40px)}
.share-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-shrink:0;padding:18px 24px;border-bottom:1px solid #e6e0dc}
.share-dialog-header #result-heading{font-size:24px;margin:0}
.share-dialog-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px 24px 24px}
.share-dialog-body #result-summary{margin:0;color:#666;font-size:13px;overflow-wrap:anywhere}
.share-dialog .share-hashtags{margin:16px 0 12px}.share-dialog #hashtag-status{margin:8px 0 0;font-size:12px}
.share-dialog .share-text-preview{resize:none;min-height:0}
.share-dialog .share-dialog-actions{flex-shrink:0;display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:16px 24px;border-top:1px solid #e6e0dc;background:#fff}
.share-dialog-actions .button{width:100%;min-height:46px;white-space:nowrap}
.share-image-save{min-height:44px;font-size:13px}
#result-dialog.share-dialog .result-preview{margin:18px auto 0}
@media(max-width:760px){
  .history-settings{padding:20px 16px}.history-settings .dialog-heading h2{font-size:24px;margin:0}
  .history-settings label{font-size:14px;margin:14px 0}.history-settings .optional{font-size:11px}
  .history-presets{margin:18px 0}.history-presets>div{gap:6px}.history-preset{padding:9px 12px}
  #result-dialog.share-dialog[open]{width:calc(100% - 16px);max-width:calc(100% - 16px);max-height:calc(100dvh - 16px)}
  .share-dialog-header{padding:14px 16px}.share-dialog-header #result-heading{font-size:22px}
  .share-dialog-body{padding:14px 16px 20px}
  .share-dialog .share-dialog-actions{padding:12px 12px max(12px,env(safe-area-inset-bottom))}
  .share-dialog-actions .button{font-size:13px;padding:12px 8px}
  .hashtag-options{gap:6px}.hashtag-option{padding:8px 10px;font-size:12px}
  .share-hashtags legend .optional{display:block;margin-top:4px}
}
