:root {
  --primary: #fe2c55;
  --primary-glow: rgba(254, 44, 85, 0.35);
  --success: #00d26a;
  --bg: #09090c;
  --card: #13131a;
  --card2: #1b1b24;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f5f5f7;
  --sub: #868696;
  --surface-blur: blur(14px);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--bg);
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(254, 44, 85, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(30, 80, 220, 0.04) 0%, transparent 50%);
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
}

[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.workspace {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 16px;
}

.player-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.banner, .controls, .playlist {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  backdrop-filter: var(--surface-blur);
}

.avatar-wrapper {
  position: relative;
  width: 46px;
  height: 46px;
  flex: none;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--primary);
  object-fit: cover;
  background: #1c1c24;
  box-shadow: 0 0 10px var(--primary-glow);
}

.meta {
  flex: 1;
  min-width: 0;
}

.meta h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta p {
  font-size: 12px;
  color: var(--sub);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
}

.stage:fullscreen {
  border: 0;
  border-radius: 0;
}

video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

/* 秒开：切台连接期间以主播头像做模糊底图，消除“全黑断档”；出画面（遮罩隐藏）即撤下 */
.stage::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: 0;
  background: var(--poster, none) center / cover no-repeat;
  filter: blur(26px) saturate(1.25);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.stage.has-poster::before {
  opacity: 0.85;
}

.stage.has-poster .mask:not(.buffering) {
  background: rgba(9, 9, 12, 0.55);
}

/* ===== 优化缓冲UI：全黑假死消除与轻态微透 ===== */
.mask {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(9, 9, 12, 0.9);
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
  align-items: center;
  color: #c0c0d0;
  font-size: 13px;
  text-align: center;
  padding: 16px;
  backdrop-filter: blur(8px);
  transition: opacity 0.25s ease, background 0.25s ease;
}

/* 播放过程中的卡顿/微缓冲：半透微磨砂，不遮盖底层正在播的画面 */
.mask.buffering {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(254, 44, 85, 0.15);
  border-top-color: var(--primary);
  border-right-color: rgba(254, 44, 85, 0.8);
  border-radius: 50%;
  animation: spin 0.75s cubic-bezier(0.4, 0.1, 0.3, 0.9) infinite;
  box-shadow: 0 0 16px var(--primary-glow);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#maskText {
  font-size: 13px;
  color: #e0e0ea;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.unmute {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 20;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.unmute:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
}

.controls label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--sub);
  font-size: 13px;
  white-space: nowrap;
}

.grow { flex: 1; }

/* 播放控制条：协议 / 清晰度 / 画中画 / 全屏 */
.controls { flex-wrap: wrap; }
.controls .fld { min-width: 0; }
.controls .fld .lbl { flex: none; }
.controls .ctl-btn .ico { flex: none; }
.controls .fld.is-loading select { animation: fieldPulse 1.2s infinite ease-in-out; }

@keyframes fieldPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.8; }
}

select, .btn, input[type=search] {
  font: inherit;
  font-size: 13px;
  color: #fff;
  background: var(--card2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 7px 12px;
  outline-offset: 2px;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn, select {
  cursor: pointer;
  min-height: 36px;
}

/* 下拉框统一样式：自绘箭头，长文本省略，避免被裁切 */
select {
  -webkit-appearance: none;
  appearance: none;
  max-width: 100%;
  padding-right: 30px;
  text-overflow: ellipsis;
  white-space: nowrap;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23868696' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 14px 14px;
}

select:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.25);
}

select:disabled {
  cursor: default;
  opacity: 0.55;
}

select option {
  background: #16161f;
  color: #fff;
}

.btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: #242430;
}

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

.btn.primary {
  background: linear-gradient(135deg, #ff3b5f, var(--primary));
  border-color: transparent;
  font-weight: 500;
  box-shadow: 0 2px 10px var(--primary-glow);
}

.btn.primary:hover {
  filter: brightness(1.1);
}

.btn.danger {
  color: #fff;
  background: linear-gradient(135deg, #e33150, #a91635);
  border-color: rgba(255, 80, 110, 0.5);
}

.btn.danger:hover {
  filter: brightness(1.12);
}

.btn.sm {
  padding: 4px 10px;
  min-height: 30px;
  font-size: 12px;
  color: var(--sub);
}

.btn.sm:hover {
  color: #fff;
}

.playlist {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 32px);
  min-height: 480px;
  overflow: hidden;
}

.pl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.pl-head h3 {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
}

/* ===== 数量徽章与动态跳动动画 ===== */
.pl-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 7px;
  margin-left: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(254, 44, 85, 0.18);
  border: 1px solid rgba(254, 44, 85, 0.38);
  border-radius: 12px;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.22s;
}

.pl-badge.bump {
  transform: scale(1.3);
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.io {
  display: flex;
  gap: 6px;
}

.add {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}

.add input {
  flex: 1;
  min-width: 0;
  background: #171720;
  border-color: var(--border);
}

.add input:focus {
  border-color: var(--primary);
}

.list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ch:hover {
  background: var(--card2);
  border-color: rgba(255, 255, 255, 0.06);
}

.ch.on {
  background: linear-gradient(90deg, rgba(254, 44, 85, 0.14) 0%, rgba(254, 44, 85, 0.04) 100%);
  border-color: rgba(254, 44, 85, 0.45);
}

.ch-avatar-box {
  position: relative;
  width: 38px;
  height: 38px;
  flex: none;
}

.ch img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #202028;
}

.status-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--card);
  background: #555562;
}

.status-dot.live {
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  animation: livePulse 1.6s infinite ease-in-out;
}

.status-dot.checking {
  background: #d6a84f;
  box-shadow: 0 0 7px rgba(214, 168, 79, 0.45);
  animation: checkingPulse 1.4s infinite ease-in-out;
}

@keyframes checkingPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes livePulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(254, 44, 85, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(254, 44, 85, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(254, 44, 85, 0); }
}

.ch .names {
  flex: 1;
  min-width: 0;
}

.ch .n {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 离线：仅弱化文字，头像保持原彩色与不透明 */
.ch.off .names {
  opacity: 0.62;
}

.ch.off:hover .names, .ch.off.on .names {
  opacity: 1;
}

.ch .n span:empty {
  display: none;
}

.ch .once-tag {
  flex: none;
  font-size: 10px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 6px;
  color: #9ec5ff;
  background: rgba(70, 130, 255, 0.16);
  border: 1px solid rgba(70, 130, 255, 0.35);
  white-space: nowrap;
}

.ch .n .nm {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ch .live-tag, .ch .checking-tag {
  flex: none;
}

.ch .live-tag {
  font-size: 10px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(254, 44, 85, 0.2);
  color: var(--primary);
  font-weight: 600;
}

.ch .checking-tag {
  font-size: 10px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(214, 168, 79, 0.13);
  color: #d6a84f;
  font-weight: 600;
}

.ch .i {
  font-size: 11px;
  color: var(--sub);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.del {
  background: none;
  border: 0;
  color: #555566;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  font-size: 14px;
  opacity: 0.6;
  transition: all 0.2s;
}

.del:hover {
  color: #ff4466;
  opacity: 1;
  background: rgba(255, 68, 102, 0.1);
}

.empty {
  color: var(--sub);
  text-align: center;
  padding: 40px 14px;
  font-size: 13px;
  line-height: 1.8;
}

.toasts {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  padding: 10px 16px;
  border-radius: 8px;
  background: #181822;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transform: translateX(120%);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-size: 13px;
}

.toast.show {
  transform: none;
}

.toast button {
  margin-left: auto;
  background: none;
  border: 0;
  color: var(--primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
}

/* 军工级防御：严禁未 open 的 dialog 产生任何渲染与占位 */
dialog:not([open]) {
  display: none !important;
}

dialog {
  margin: auto;
  max-width: min(92vw, 420px);
  background: #16161f;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.action-dialog h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.action-dialog .dlg-desc {
  color: var(--sub);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.export-format-label {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  color: var(--sub);
  font-size: 12px;
}

.export-format {
  width: 100%;
  min-height: 42px;
  margin-top: 2px;
}

.dlg-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 18px;
}

@media (max-width: 1024px) {
  body {
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
  .workspace { display: block; }
  .player-col {
    position: sticky;
    top: 0;
    z-index: 30;
    gap: 8px;
    background: var(--bg);
    padding: max(8px, env(safe-area-inset-top)) 10px 8px;
  }
  .banner { padding: 8px 12px; }
  .avatar-wrapper, .avatar { width: 38px; height: 38px; }
  .meta p { display: none; }
  .controls { padding: 8px 12px; }
  .playlist { height: auto; min-height: 0; margin: 4px 10px 12px; overflow: visible; }
  .list { overflow: visible; }
  .toasts { top: auto; bottom: max(16px, env(safe-area-inset-bottom)); left: 12px; right: 12px; }
  .toast { transform: translateY(150%); }
}

/* 手机竖屏：两个下拉框等分一行，画中画/全屏收为图标按钮，彻底避免右侧被裁切 */
@media (max-width: 560px) {
  .controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto auto;
    align-items: end;
    gap: 8px;
  }
  .controls .grow { display: none; }
  .controls .fld {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .controls .fld .lbl {
    font-size: 11px;
    line-height: 1;
    padding-left: 2px;
  }
  .controls select {
    width: 100%;
    font-size: 12.5px;
    padding-left: 10px;
  }
  .controls .ctl-btn {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }
  .controls .ctl-btn .txt { display: none; }
}

@media (max-width: 359px) {
  .controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .controls .ctl-btn { width: 100%; min-width: 0; padding: 0 12px; }
  .controls .ctl-btn .txt { display: inline; }
}

@media (pointer: coarse) {
  .btn, select, .add input { min-height: 44px; }
  .btn.sm { min-height: 36px; }
  .del { padding: 10px 12px; }
  .ch { padding: 12px; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .workspace { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 10px; }
  .player-col { position: static; padding: 8px 0; }
  .banner, .controls { display: none; }
  .stage { aspect-ratio: auto; height: calc(100dvh - 16px); }
  .playlist { height: calc(100dvh - 16px); margin: 8px 0; overflow: hidden; }
  .list { overflow-y: auto; }
}
/* 远程导入专属安全对话框 */
.dlg-desc {
  font-size: 12px;
  color: var(--sub);
  margin: 8px 0 14px;
  line-height: 1.6;
}

.remote-box {
  margin-bottom: 14px;
}

.remote-box input {
  width: 100%;
  background: #171720;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.remote-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}
/* ========================================================
   功能说明及使用方法抽屉专属样式 (修复常显 Bug)
   ======================================================== */
.help-dialog:not([open]) {
  display: none !important;
}

.help-dialog[open] {
  display: flex !important;
  flex-direction: column;
}

.help-dialog {
  max-width: min(94vw, 680px);
  width: 100%;
  max-height: 85vh;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  position: fixed;
  inset: 0;
  z-index: 1000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
}

.help-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
}

.help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.help-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.help-title h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.help-ver {
  font-size: 11px;
  color: var(--primary);
  background: rgba(254, 44, 85, 0.15);
  border: 1px solid rgba(254, 44, 85, 0.3);
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 500;
}

.help-close {
  font-size: 16px;
  line-height: 1;
}

.help-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.help-body::-webkit-scrollbar {
  width: 6px;
}
.help-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.help-sec {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-sec h4 {
  font-size: 14px;
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.help-sec p {
  font-size: 12px;
  color: var(--sub);
  line-height: 1.6;
}

.help-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #b8b8cc;
  line-height: 1.65;
}

.help-list code {
  font-family: Consolas, Monaco, monospace;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
  color: #f0f0f8;
}

.kbd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.kbd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 12px;
  color: #cecedc;
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #22222e;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.help-dialog .dlg-btns {
  padding: 14px 22px;
  margin-top: 0;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

/* ========================================================
   v1.0.3：非电脑端自动隐藏键盘快捷键；导出结果对话框
   ======================================================== */
html[data-input="touch"] .kbd-only {
  display: none !important;
}

.export-info {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 14px;
  margin: 12px 0 10px;
  font-size: 13px;
  line-height: 1.6;
}

.export-info dt {
  color: var(--sub);
  white-space: nowrap;
}

.export-info dd {
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-all;
}

#exportDonePath {
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 12px;
  color: #f0f0f8;
}

@media (prefers-reduced-motion: reduce) {
  .controls .fld.is-loading select { animation: none; }
}

/* v1.0.4：提示弹窗中的重点文字提亮 */
.dlg-desc strong {
  color: var(--text);
}

/* v1.0.5：导出面板按钮行允许换行（含“重新下载”链接） */
#exportDoneDlg .dlg-btns {
  flex-wrap: wrap;
  gap: 8px;
}

#exportDoneRetry {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .stage::before { transition: none; }
}

/* ========================================================
   v1.0.6：首屏骨架屏（JS 就绪前即可见，渲染列表时自动移除）
   ======================================================== */
.list .sk {
  flex: none;
  height: 58px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--card) 0%, var(--card2) 50%, var(--card) 100%);
  background-size: 200% 100%;
  animation: skShimmer 1.3s infinite linear;
}

@keyframes skShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .list .sk { animation: none; }
}
