/* 历史页独立布局，避免继承套餐页工具栏的大面积容器。 */
body[data-page="history"] .app-content { padding-top: 24px !important; }
.history-page { width: 100%; max-width: 1100px; margin-inline: auto; padding: 0 28px 48px; }
.history-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.history-heading h1 { margin: 0; font-size: clamp(24px, 3vw, 30px); font-weight: 600; line-height: 1.25; letter-spacing: -.03em; }
.history-refresh { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer; }
.history-refresh:hover { color: var(--text); background: #ffffff08; }
#filterBar.history-filters { display: flex !important; flex-wrap: nowrap; justify-content: flex-start; gap: 6px; margin: 0 0 18px !important; padding: 0; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; }
.history-filters button { min-height: 44px; padding: 0 14px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer; transition: color .15s ease, background .15s ease; }
.history-filters button:hover { color: var(--text); background: #ffffff04; }
.history-filters button.active { color: var(--accent); border-bottom-color: var(--accent); }
.history-page :is(button, a):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.history-page .history-empty { max-width: none; padding: 42px 16px; gap: 18px; }
.history-empty h2 { font-size: 16px; font-weight: 500; line-height: 1.5; color: var(--muted); }
.history-empty .button { min-height: 44px; font-size: 13px; }
.history-page #taskList .creation-row { gap: 12px; padding: 14px 16px; box-shadow: none; }
.creation-details { flex: 1; }
.history-page .creation-meta { display: flex; flex-wrap: wrap; gap: 3px 12px; }
.creation-date { color: var(--muted); }
.history-page .creation-actions { gap: 4px; }
.creation-action { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 10px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #bdc7b4; font: inherit; font-size: 12px; white-space: nowrap; cursor: pointer; touch-action: manipulation; transition: color .15s ease, background .15s ease, border-color .15s ease; }
.creation-action svg { flex-shrink: 0; }
.creation-action-download { color: var(--accent); }
.creation-action:hover { color: var(--text); border-color: #ffffff16; background: #ffffff07; }
.creation-action:active { background: #ffffff10; }
.creation-action:disabled { opacity: .45; cursor: wait; }
.history-preview { width: min(800px, calc(100% - 24px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid #ffffff24; border-radius: 12px; background: #141614; color: var(--text); box-shadow: 0 24px 80px #0008; }
.history-preview::backdrop { background: #000b; backdrop-filter: blur(4px); }
.history-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px 8px 20px; }
.history-preview-heading h2 { margin: 0; font-size: 14px; font-weight: 500; }
.history-preview-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.history-preview-close:hover { background: #ffffff09; color: var(--text); }
.history-preview-close:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.history-preview video { display: block; width: 100%; max-height: calc(100dvh - 100px); aspect-ratio: 16 / 9; background: #080908; object-fit: contain; }
body:has(.history-preview[open]) { overflow: hidden; }
@media (max-width: 760px) {
  body[data-page="history"] .app-content { padding-top: 18px !important; }
  .history-page { padding-inline: 16px; }
  .history-heading { margin-bottom: 8px; }
  #filterBar.history-filters { gap: 0; }
  .history-filters button { flex: 1; padding-inline: 6px; font-size: 12px; }
  .history-page .history-empty { padding-block: 34px; }
  .history-page #taskList .creation-row { gap: 8px; padding: 12px; }
  .history-page .creation-details { flex-basis: 0; }
  .history-page .creation-row strong { font-size: 13px; }
  .history-page .creation-meta { gap: 2px 8px; font-size: 11px; }
  .creation-date { flex-basis: 100%; }
  .creation-action { padding: 0; }
  .creation-action-label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
