/* 底部主题面板共享弹层焦点与动画，只改变内容呈现。 */
.theme-sheet-backdrop .modal {
  width: min(100%, 430px); padding: 14px 18px max(24px, env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0; background: var(--surface); border: 1px solid var(--border);
  max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain;
}
.redesign-page .theme-sheet-backdrop .modal { padding: 14px 18px max(24px, env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; max-height: calc(100dvh - 24px); }
.redesign-page .theme-sheet-backdrop .modal::before { display: none; }
.theme-sheet-backdrop .modal-header { position: relative; padding-top: 20px; margin-bottom: 22px; touch-action: none; }
.theme-sheet-backdrop .modal-header::before {
  content: ''; position: absolute; top: 0; left: calc(50% - 16px);
  width: 32px; height: 4px; border-radius: 4px; background: var(--muted); opacity: .6;
}
.theme-sheet-backdrop .modal-header h2 { font-size: 23px; margin: 0; }
.theme-sheet-backdrop .modal-header button { min-width: 44px; min-height: 44px; }
.theme-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.theme-option {
  --preview-bg: #090a0b; --preview-surface: #121416; --preview-text: #f5f5f5;
  --preview-muted: #a6acb7; --preview-accent: #e9bf72; --preview-border: #2b2e32;
  min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 16px;
  background: var(--bg); color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.theme-option[data-theme-option="intelligence-grid"] {
  --preview-bg: #020F1C; --preview-surface: #071D30; --preview-text: #EDF6FF;
  --preview-muted: #9AB7CE; --preview-accent: #39D5F3; --preview-border: #28516B;
}
.theme-option[data-theme-option="opal-futures"] {
  --preview-bg: #EFEFF5; --preview-surface: #F8F5FF; --preview-text: #382C51;
  --preview-muted: #6E627E; --preview-accent: #765CA5; --preview-border: #C9C1D8;
}
.theme-option[data-theme-option="living-network"] {
  --preview-bg: #E1EEE6; --preview-surface: #F2F7F2; --preview-text: #154F4A;
  --preview-muted: #526B60; --preview-accent: #154F4A; --preview-border: #ABC4B4;
}
.theme-option[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.theme-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.theme-preview { display: grid; gap: 12px; padding: 13px 12px; background: var(--preview-bg); color: var(--preview-text); }
.theme-preview-nav { display: flex; align-items: center; gap: 8px; font-size: 10px; }
.theme-preview-nav b { font-size: 9px; letter-spacing: 1px; }
.theme-preview-nav i { font-style: normal; }
.theme-preview-nav i:last-child { margin-left: auto; }
.theme-preview-assets { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.theme-preview-assets > i { height: 48px; border-radius: 8px; background: var(--preview-surface); border: 1px solid var(--preview-border); position: relative; }
.theme-preview-assets > i::before { content: ''; position: absolute; top: 10px; left: 9px; width: 13px; height: 13px; border-radius: 50%; background: var(--preview-muted); opacity: .6; }
.theme-preview-assets > i::after { content: ''; position: absolute; bottom: 10px; left: 9px; right: 9px; height: 4px; border-radius: 3px; background: var(--preview-muted); opacity: .5; }
.theme-preview-lines { display: grid; gap: 7px; }
.theme-preview-lines i { height: 4px; width: 65%; border-radius: 3px; background: var(--preview-muted); opacity: .6; }
.theme-preview-lines i:nth-child(2) { width: 90%; }
.theme-preview-lines i:nth-child(3) { width: 45%; }
.theme-preview-action { height: 15px; border-radius: 10px; background: var(--preview-accent); }
.theme-option-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 12px 10px; font-size: 12px; min-height: 48px; }
.theme-option-footer > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.theme-option-check { display: grid; place-items: center; flex: 0 0 18px; height: 18px; border: 1px solid var(--muted); border-radius: 50%; font-size: 12px; }
.theme-option[aria-pressed="true"] .theme-option-check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.theme-option[aria-pressed="true"] .theme-option-footer { color: var(--accent); }
.theme-option[aria-busy="true"] .theme-option-check { border: 2px dotted var(--accent); }
@media (max-width: 359px) {
  .theme-options { gap: 10px; }
  .theme-preview { padding: 11px 9px; gap: 10px; }
  .theme-option-footer { padding-inline: 8px; font-size: 11px; }
}
