.history-dialog{width:min(1100px,94vw);max-height:90dvh;border:1px solid var(--line);border-radius:22px;background:var(--surface-1);color:var(--text);padding:24px;overflow:auto}
.history-dialog::backdrop{background:rgba(10,16,25,.62);backdrop-filter:blur(5px)}
.history-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}.history-head h2{margin:0}
.history-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.history-card{display:flex;flex-direction:column;align-items:stretch;text-align:left;padding:0;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--surface-2);color:var(--text);height:auto}
.history-card img{width:100%;aspect-ratio:1;object-fit:cover}.history-card>span{padding:14px}.history-card strong,.history-card small{display:block}.history-card small{margin-top:6px;color:var(--text-2);font-weight:400}
.history-pending{display:grid;place-items:center;aspect-ratio:1}
.history-empty{max-width:470px;margin:65px auto;text-align:center}.history-empty p{line-height:1.6;color:var(--text-2)}
.history-detail{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(220px,1fr);gap:28px;margin-top:18px}.history-detail>img{width:100%;max-height:65vh;object-fit:contain;background:var(--surface-2);border-radius:12px}.history-detail h3{font-size:23px}.history-detail .primary,.history-detail .download{width:100%;margin-bottom:12px;display:flex;justify-content:center}.history-detail p{line-height:1.6}.history-restore-status{color:var(--danger,#d54848)}
#historyMore{margin:20px auto 0}
@media(max-width:700px){.history-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.history-detail{grid-template-columns:1fr}.history-dialog{padding:16px}.history-head h2{font-size:20px}}
