.history-page{display:grid;gap:20px}.history-summary{display:flex;align-items:center;justify-content:space-between;gap:20px}.history-summary h2{margin:8px 0 6px;font-size:24px}.history-summary p{margin:0;color:var(--muted)}.history-layout{display:grid;grid-template-columns:minmax(420px,.94fr) minmax(440px,1.06fr);gap:20px;align-items:start}.history-list-panel{padding:0;overflow:hidden}.history-table-wrap{max-height:calc(100vh - 290px);overflow:auto}.history-table{width:100%;border-collapse:collapse}.history-table th{position:sticky;top:0;z-index:1;padding:13px 12px;background:#fafafb;color:#747884;text-align:left;font-size:12px;white-space:nowrap}.history-table td{padding:13px 12px;border-top:1px solid var(--line);vertical-align:middle;font-size:13px}.history-table tr{cursor:pointer}.history-table tr:hover,.history-table tr.active{background:#fff7f8}.history-table td b,.history-table td small{display:block}.history-table td small{max-width:190px;margin-top:4px;overflow:hidden;color:var(--muted);text-overflow:ellipsis;white-space:nowrap}.history-row-actions{display:flex;gap:6px}.history-detail-panel{position:sticky;top:20px;min-width:0}.history-detail-panel .section-title{align-items:flex-start}.history-detail-panel h2{max-width:460px;margin:6px 0;font-size:21px}.history-detail-tools{display:flex;flex-wrap:wrap;gap:7px}.history-copy{display:grid;gap:12px}.history-copy h2{margin:0}.history-copy .article-copy{margin:0}.history-edit-form{display:grid;gap:13px;margin-top:18px}.history-edit-form textarea{min-height:220px;resize:vertical}.history-detail-actions{display:flex;justify-content:flex-end;gap:10px}.history-delete-confirm{display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin-top:18px;padding:14px;border:1px solid #ffd2d9;border-radius:13px;background:#fff6f7}.history-delete-confirm p{flex-basis:100%;margin:0;color:#7e5960;font-size:12px;line-height:1.6}.creation-unified-result{display:grid;gap:20px}.creation-image-section,.creation-copy-section{display:grid;gap:12px}.creation-copy-section h2{margin:0}.creation-copy-section .article-copy{margin:0}.creation-gallery{display:grid;gap:10px}.gallery-main{position:relative;display:grid;min-height:300px;overflow:hidden;border:1px solid var(--line);border-radius:16px;background:#f6f7f8}.gallery-image-button{display:block;width:100%;height:100%;padding:0;border:0;background:#f6f7f8;cursor:zoom-in}.gallery-image-button img{display:block;width:100%;height:100%;min-height:300px;object-fit:contain;background:#f6f7f8}.gallery-arrow{position:absolute;top:50%;z-index:1;width:38px;height:38px;transform:translateY(-50%);border:1px solid rgba(255,255,255,.8);border-radius:50%;color:#252631;background:rgba(255,255,255,.88);box-shadow:0 6px 18px rgba(0,0,0,.15);font-size:28px;line-height:1;cursor:pointer}.gallery-arrow.prev{left:12px}.gallery-arrow.next{right:12px}.gallery-count{position:absolute;right:12px;bottom:12px;padding:5px 9px;border-radius:999px;color:#fff;background:rgba(20,20,25,.62);font-size:12px}.gallery-thumbnails{display:flex;gap:8px;overflow-x:auto;padding:2px}.gallery-thumbnail{display:grid;grid-template-columns:44px auto;align-items:center;gap:7px;flex:0 0 auto;padding:4px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#6b6f79;font-size:11px;cursor:pointer}.gallery-thumbnail img{width:44px;height:34px;border-radius:5px;object-fit:cover}.gallery-thumbnail.active{border-color:var(--red);background:#fff7f8;color:var(--red)}.gallery-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--muted);font-size:12px}.creation-gallery-empty{display:grid;justify-items:center;gap:9px;min-height:240px;padding:30px;border:1px dashed #dfe2e8;border-radius:16px;color:#777c87;text-align:center}.creation-gallery-empty .ui-icon{width:32px;height:32px;color:var(--red)}.creation-gallery-empty b{color:var(--ink)}.image-preview-overlay{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:28px;background:rgba(18,20,28,.78);backdrop-filter:blur(7px)}.image-preview-dialog{position:relative;display:grid;max-width:min(1200px,100%);max-height:calc(100vh - 56px);overflow:hidden;border-radius:18px;background:#17191f;box-shadow:0 28px 80px rgba(0,0,0,.4)}.image-preview-dialog>img{display:block;max-width:100%;max-height:calc(100vh - 116px);object-fit:contain}.image-preview-close,.image-preview-arrow{position:absolute;z-index:2;display:grid;place-items:center;border:1px solid rgba(255,255,255,.42);border-radius:50%;color:#fff;background:rgba(20,22,28,.64);cursor:pointer}.image-preview-close{top:13px;right:13px;width:38px;height:38px;font-size:26px}.image-preview-arrow{top:50%;width:46px;height:46px;transform:translateY(-50%);font-size:32px}.image-preview-arrow.prev{left:16px}.image-preview-arrow.next{right:16px}.image-preview-foot{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 16px;color:#e8e8ec;font-size:12px}.image-preview-foot .button{color:#fff;border-color:rgba(255,255,255,.42);background:transparent}.creation-unified-result .article-actions{margin-top:0}@media(max-width:1120px){.history-layout{grid-template-columns:1fr}.history-detail-panel{position:static}.history-table-wrap{max-height:none}.history-table{min-width:760px}.history-list-panel{overflow:auto}}@media(max-width:780px){.history-summary{align-items:flex-start;flex-direction:column}.history-summary .button{width:100%}.gallery-main,.gallery-image-button img{min-height:220px}.history-detail-tools,.history-detail-actions{width:100%;justify-content:stretch}.history-detail-tools .button,.history-detail-actions .button{flex:1}.gallery-meta{align-items:flex-start;flex-direction:column}.image-preview-overlay{padding:12px}.image-preview-dialog{max-height:calc(100vh - 24px)}.image-preview-dialog>img{max-height:calc(100vh - 100px)}.image-preview-foot{align-items:flex-start;flex-direction:column}.image-preview-foot .button{width:100%}}
/* Creation result tabs v2: picture and copy remain independently focused. */
.creation-result-tabs{margin:2px 0 18px}.creation-result-tabs .result-tab{cursor:pointer}.creation-tab-result{min-height:500px}.creation-copy-result .creation-copy-section{min-height:0}.creation-image-result{gap:16px}.creation-image-workflow{margin-top:16px}.creation-image-actions{align-items:center;flex-wrap:wrap}.creation-image-actions .quality-box{flex:1 1 100%;margin:0}
@media(max-width:780px){.creation-tab-result{min-height:0}.creation-result-tabs .result-tab{flex:1;text-align:center}.creation-image-actions .button{flex:1}}
/* Creation editing and history modal v3. */
.creation-copy-meta{display:flex;justify-content:flex-end;margin:-4px 0 2px;color:var(--muted);font-size:12px}.creation-copy-actions{justify-content:flex-end}.creation-autosave-form{display:grid;gap:13px}.creation-autosave-form textarea{min-height:220px;resize:vertical}.creation-autosave-status{color:var(--muted);font-size:12px}.image-prompt-editor{display:grid;gap:10px;padding:14px;border:1px solid var(--line);border-radius:13px;background:#fafafb}.image-prompt-editor summary{cursor:pointer;color:var(--ink);font-weight:700}.image-prompt-editor p{margin:0;color:var(--muted);font-size:12px;line-height:1.6}.image-prompt-editor textarea{width:100%;min-height:128px;padding:11px;border:1px solid var(--line);border-radius:10px;resize:vertical;font:inherit;line-height:1.6}.image-prompt-editor .button{justify-self:start}.history-layout{grid-template-columns:1fr}.history-record-overlay{position:fixed;inset:0;z-index:75;display:grid;place-items:center;padding:28px;background:rgba(18,20,28,.55);backdrop-filter:blur(5px)}.history-record-dialog{position:relative;width:min(1120px,100%);max-height:calc(100vh - 56px);overflow:auto;border-radius:20px;background:#fff;box-shadow:0 28px 80px rgba(0,0,0,.28)}.history-record-dialog .history-detail-panel{position:static;margin:0;border:0;border-radius:0;box-shadow:none}.history-record-close{position:sticky;z-index:4;float:right;top:14px;right:14px;width:38px;height:38px;margin:14px 14px -52px 0;border:1px solid var(--line);border-radius:50%;background:#fff;color:#333;font-size:25px;line-height:1;cursor:pointer;box-shadow:0 5px 16px rgba(0,0,0,.12)}
@media(max-width:780px){.creation-copy-actions{justify-content:stretch}.creation-copy-actions .button{flex:1}.image-prompt-editor .button{width:100%}.history-record-overlay{padding:12px}.history-record-dialog{max-height:calc(100vh - 24px)}.history-record-dialog .history-detail-panel{padding:20px}.history-record-close{top:8px;right:8px}}
.history-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid #f0e9eb;
  color: #7b8290;
  font-size: 13px;
}
.history-pagination.single { justify-content: flex-start; }
.history-pagination .button[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.system-personal-defaults { margin: 18px 0; padding: 16px; border: 1px dashed #ffb3bf; border-radius: 14px; background: #fff9fa; }
.system-personal-defaults .limit-heading { margin: 0 0 14px; }
@media (max-width: 680px) { .history-pagination { justify-content: space-between; gap: 8px; } }
/* History list footer: retain a calm white breathing area below paging controls. */
.history-list-panel {
  padding: 0 0 38px;
  min-height: 164px;
  background: #fff;
}
.history-list-panel .history-pagination {
  margin: 24px 24px 0;
  padding: 19px 0 0;
}
@media (max-width: 680px) {
  .history-list-panel { padding-bottom: 28px; }
  .history-list-panel .history-pagination { margin: 20px 16px 0; }
}
.history-table th:first-child,.history-table td:first-child{width:72px;padding-left:18px;padding-right:18px;text-align:center}.history-table th:nth-child(2),.history-table td:nth-child(2){text-align:center}.history-table th:nth-child(3),.history-table td:nth-child(3),.history-table th:nth-child(4),.history-table td:nth-child(4),.history-table th:nth-child(6),.history-table td:nth-child(6),.history-table th:nth-child(7),.history-table td:nth-child(7){text-align:center}.history-table td{font-size:14px}.history-table th{font-size:13px}.history-task-id{display:inline-block;padding:5px 8px;border-radius:7px;background:#f6f7f9;color:#59606d;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;white-space:nowrap}.history-copy .task-id-badge{justify-self:start}
