/* ---- Timeline help modal ---- */
    .help-modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 8000;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px 16px;
      background: rgba(8, 8, 18, 0.72);
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    .help-modal-backdrop.visible {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    .help-modal {
      width: min(400px, 100%);
      max-height: min(72vh, 520px);
      display: flex;
      flex-direction: column;
      border-radius: 14px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
      overflow: hidden;
    }

    .help-modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 16px 18px;
      background: linear-gradient(180deg, rgba(0, 184, 148, 0.08), transparent);
      border-bottom: 1px solid var(--border);
    }

    .help-modal-header h2 {
      font-size: 15px;
      font-weight: 600;
      color: var(--text);
      letter-spacing: 0.02em;
    }

    .help-modal-close {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--bg-toolbar);
      color: var(--text-dim);
      font-size: 20px;
      line-height: 1;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: color 0.15s, border-color 0.15s, background 0.15s;
    }

    .help-modal-close:hover {
      color: var(--text);
      border-color: var(--text-dim);
    }

    .help-modal-body {
      padding: 16px 18px 20px;
      overflow-y: auto;
      font-size: 12px;
      line-height: 1.55;
      color: var(--text-dim);
    }

    .help-modal-body p {
      margin-bottom: 12px;
    }

    .help-modal-list {
      margin: 0 0 0 2px;
      padding-left: 1.15em;
      color: var(--text-dim);
    }

    .help-modal-list li {
      margin-bottom: 0.7em;
      padding-left: 2px;
    }

    .help-modal-list li:last-child {
      margin-bottom: 0;
    }

    .help-modal-list li::marker {
      color: var(--accent);
    }

    .help-modal-foot {
      margin-top: 16px;
      padding-top: 14px;
      border-top: 1px solid var(--border);
      font-size: 11px;
      color: var(--text-dim);
    }

    .help-modal-foot code {
      font-size: 10px;
      padding: 1px 5px;
      border-radius: 4px;
      background: var(--bg-toolbar);
      color: var(--text);
    }

    .timeline-no-data-banner {
      position: absolute;
      left: 0;
      right: 0;
      top: 50%;
      transform: translateY(-50%);
      text-align: center;
      font-size: 10px;
      color: var(--text-dim);
      pointer-events: none;
      z-index: 1;
    }

    /* ---- Warning Toast ---- */
    .warning-toast {
      display: none;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: #2a1a1a;
      border: 1px solid var(--danger);
      border-radius: 8px;
      padding: 20px 24px;
      z-index: 100;
      max-width: 420px;
      width: 90%;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    }

    .warning-toast.visible {
      display: block;
    }

    .warning-toast.toast-info {
      background: #16221f;
      border-color: var(--accent);
    }

    .warning-toast.toast-info .warning-toast-title {
      color: var(--accent);
    }

    .warning-toast.toast-info .warning-toast-close {
      border-color: rgba(0, 184, 148, 0.45);
      color: var(--accent);
    }

    .warning-toast.toast-info .warning-toast-close:hover {
      background: var(--accent);
      color: #0a0a12;
    }

    .warning-toast-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
    }

    .warning-toast-title {
      font-size: 14px;
      font-weight: 600;
      color: var(--danger);
    }

    .warning-toast-close {
      width: 24px;
      height: 24px;
      background: transparent;
      border: 1px solid rgba(231, 76, 60, 0.4);
      border-radius: 4px;
      color: var(--danger);
      font-size: 16px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.15s;
    }

    .warning-toast-close:hover {
      background: var(--danger);
      color: #fff;
    }

    .warning-toast-body {
      font-size: 13px;
      color: var(--text);
      line-height: 1.5;
    }

    .warning-toast.toast-download {
      background: linear-gradient(165deg, #152a26 0%, #131820 55%, #0f141c 100%);
      border: 1px solid rgba(30, 220, 180, 0.4);
      box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.25) inset,
        0 16px 48px rgba(0, 0, 0, 0.5),
        0 0 32px rgba(20, 200, 160, 0.08);
      z-index: 200;
    }

    .warning-toast.toast-download .warning-toast-header {
      justify-content: center;
      margin-bottom: 6px;
    }

    .warning-toast.toast-download .warning-toast-title {
      color: #b8f5e8;
      font-size: 15px;
      font-weight: 600;
      letter-spacing: 0.02em;
    }

    .warning-toast.toast-download .warning-toast-close {
      display: none;
    }

    .warning-toast.toast-download .warning-toast-body {
      text-align: center;
      color: #c8c8d8;
      font-size: 14px;
      line-height: 1.55;
    }

    .download-dialog {
      display: none;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: min(420px, 92%);
      background: var(--bg-toolbar);
      border: 1px solid var(--border);
      border-radius: 10px;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
      z-index: 140;
      padding: 16px;
    }

    .download-dialog.visible {
      display: block;
    }

    #goto-time-dialog {
      z-index: 150;
    }

    .goto-time-panel.download-dialog {
      width: min(380px, 94vw);
      padding: 0;
      overflow: hidden;
      border-radius: 14px;
      border: 1px solid rgba(0, 184, 148, 0.18);
      background: linear-gradient(165deg, rgba(34, 34, 56, 0.98) 0%, var(--bg-toolbar) 42%, #1a1a2e 100%);
      box-shadow:
        0 24px 56px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    }

    .goto-time-panel-header {
      padding: 16px 18px 14px;
      border-bottom: 1px solid var(--border);
      background: linear-gradient(180deg, rgba(0, 184, 148, 0.1), transparent);
    }

    .goto-time-panel-title-row {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .goto-time-panel-title-icon {
      width: 38px;
      height: 38px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--accent-dim);
      color: var(--accent);
      flex-shrink: 0;
    }

    .goto-time-panel-title-icon svg {
      width: 20px;
      height: 20px;
    }

    .goto-time-panel-title {
      margin: 0;
      font-size: 16px;
      font-weight: 600;
      color: var(--text);
      letter-spacing: 0.02em;
    }

    .goto-time-panel-sub {
      margin: 0;
      padding: 12px 18px 4px;
      font-size: 12px;
      line-height: 1.5;
      color: var(--text-dim);
    }

    .goto-time-panel-sub strong {
      color: var(--accent);
      font-weight: 500;
    }

    .goto-time-panel-fields {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px 16px;
      padding: 12px 18px 8px;
    }

    @media (max-width: 420px) {
      .goto-time-panel-fields {
        grid-template-columns: 1fr;
      }
    }

    .goto-time-field label {
      display: block;
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--text-dim);
      margin-bottom: 6px;
    }

    .goto-time-field input {
      width: 100%;
      min-width: 0;
      height: 40px;
      padding: 0 12px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: rgba(0, 0, 0, 0.25);
      color: var(--text);
      font-family: inherit;
      font-size: 14px;
      font-variant-numeric: tabular-nums;
      transition: border-color 0.15s, box-shadow 0.15s;
    }

    .goto-time-field input:hover {
      border-color: rgba(255, 255, 255, 0.12);
    }

    .goto-time-field input:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-dim);
    }

    .goto-time-panel-actions {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      gap: 10px;
      padding: 16px 18px 18px;
      margin-top: 4px;
      border-top: 1px solid var(--border);
      background: rgba(0, 0, 0, 0.15);
    }

    .goto-time-btn {
      font: inherit;
      font-size: 13px;
      font-weight: 600;
      padding: 9px 18px;
      border-radius: 10px;
      cursor: pointer;
      transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
    }

    .goto-time-btn:active {
      transform: scale(0.98);
    }

    .goto-time-btn--ghost {
      border: 1px solid var(--border);
      background: transparent;
      color: var(--text-dim);
    }

    .goto-time-btn--ghost:hover {
      color: var(--text);
      border-color: rgba(255, 255, 255, 0.2);
      background: rgba(255, 255, 255, 0.05);
    }

    .goto-time-btn--primary {
      border: none;
      background: linear-gradient(180deg, #0d9488 0%, #0f766e 100%);
      color: #f0fffc;
      box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
    }

    .goto-time-btn--primary:hover {
      filter: brightness(1.06);
    }

    .pb-icon-btn {
      width: 36px;
      height: 36px;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 9px;
      border: 1px solid var(--border);
      background: #1e1e2a;
      color: #a8a8c0;
      cursor: pointer;
      flex-shrink: 0;
      transition: color 0.16s, border-color 0.16s, background 0.16s, box-shadow 0.16s, transform 0.1s;
    }

    .pb-icon-btn svg {
      width: 18px;
      height: 18px;
      display: block;
    }

    .pb-icon-btn:hover {
      color: var(--accent-hover);
      border-color: rgba(20, 210, 170, 0.5);
      background: rgba(16, 200, 160, 0.1);
      box-shadow: 0 0 0 1px rgba(20, 210, 170, 0.12);
    }

    .pb-icon-btn:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }

    .download-dialog-title {
      font-size: 15px;
      font-weight: 600;
      margin-bottom: 6px;
    }

    .download-dialog-sub {
      font-size: 12px;
      color: var(--text-dim);
      margin-bottom: 10px;
    }

    .download-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      margin-bottom: 12px;
    }

    .download-field {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .download-field label {
      font-size: 11px;
      color: var(--text-dim);
    }

    .download-grid input {
      width: 100%;
      min-width: 0;
      background: var(--bg-card);
      border: 1px solid var(--border);
      color: var(--text);
      border-radius: 6px;
      height: 32px;
      padding: 0 8px;
      font-family: inherit;
      font-size: 12px;
    }

    .download-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
    }

    /* ---- Storage info ---- */
    .storage-info {
      font-size: 11px;
      color: var(--text-dim);
      display: flex;
      align-items: center;
      gap: 12px;
      margin-right: 8px;
    }

    .storage-badge {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 4px;
      padding: 3px 8px;
      font-size: 11px;
    }
