/* 练习厅 · 本地曲库（方块网格 · 仅本机） */
.space-practice .practice-quick-btn[data-mine="localVideos"] small {
  color: #6a7d62;
}
.local-video-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.local-video-head h2 {
  margin: 0;
  font-family: var(--serif, "Songti SC", serif);
  font-size: 24px;
  font-weight: 500;
}
.local-video-head .overline {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: .14em;
  color: #6f7f68;
}
.local-video-hint {
  font-size: 13px;
  line-height: 1.6;
  color: #6a7a63;
  margin: 0 0 12px;
}

.local-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 16px 14px;
  align-items: start;
}

.local-video-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.local-video-add-tile {
  aspect-ratio: 4 / 3;
  min-height: 132px;
  border: 2px dashed #b7c4a8;
  border-radius: 14px;
  background: linear-gradient(160deg, #f7f9f2, #eef3e8);
  color: #3f6a4e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background .18s, border-color .18s, transform .18s;
}
.local-video-add-tile:hover,
.local-video-add-tile:focus-visible {
  background: #e8f0e4;
  border-color: #7fa88a;
  transform: translateY(-1px);
}
.local-video-add-tile .plus {
  font-size: 52px;
  line-height: 1;
  font-weight: 300;
  color: #3f6a4e;
}
.local-video-add-tile .plus-label {
  font-size: 14px;
  color: #5a7358;
}

.local-video-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 1px solid #d5dec8;
  border-radius: 14px;
  overflow: hidden;
  background: #24352a;
  cursor: pointer;
  box-shadow: 0 4px 14px #3d5a4014;
}
.local-video-cover.is-loading::before {
  content: "出预览中";
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #d7e2cf;
  font-size: 13px;
  background: #1a241ccc;
  pointer-events: none;
}
.local-video-cover img,
.local-video-cover .local-video-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  background: #1a241c;
}
.local-video-cover .ph {
  color: #c9d4bb;
  font-size: 15px;
  letter-spacing: .08em;
}
.local-video-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 55%, #0000 28%, #0005 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s;
}
.local-video-cover:hover::after,
.local-video-cover:focus-visible::after {
  opacity: 1;
}

.local-video-name {
  width: 100%;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  padding: 2px 2px 4px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  color: #24372d;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}
.local-video-name:focus {
  outline: none;
  border-bottom-color: #9fbfa6;
  background: #fffef8;
  border-radius: 4px;
}

.local-video-tile-meta {
  font-size: 11px;
  color: #7a8872;
  text-align: center;
  margin-top: -4px;
}

.local-video-del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: #1a241ccc;
  color: #fffef2;
  font-size: 16px;
  line-height: 1;
  z-index: 2;
  opacity: .85;
}
.local-video-del:hover {
  background: #8a4a3a;
  opacity: 1;
}

.local-video-empty-inline {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  font-size: 14px;
  color: #70806a;
  line-height: 1.7;
}

.local-video-player {
  border: 0;
  padding: 0;
  max-width: min(960px, 96vw);
  width: 96vw;
  max-height: min(92vh, 920px);
  background: #121814;
  color: #f4efdf;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px #0a120e44;
}
.local-video-player::backdrop {
  background: #0c141066;
  backdrop-filter: blur(2px);
}
.local-video-player[open] {
  display: flex;
  flex-direction: column;
}
/* 视频铺满；功能条浮在画面下方，不占版面高度 */
.local-video-player .pv-stage {
  position: relative;
  background: #000;
  width: 100%;
  flex: 1 1 auto;
  min-height: min(62vh, 560px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.local-video-player video {
  width: 100%;
  height: 100%;
  max-height: min(78vh, 720px);
  background: #000;
  display: block;
  object-fit: contain;
}
.local-video-player .pv-hud {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  opacity: 1;
  transition: opacity .28s ease;
}
.local-video-player.hud-hidden .pv-hud {
  opacity: 0;
}
.local-video-player.hud-hidden .pv-hud .pv-head,
.local-video-player.hud-hidden .pv-hud .pv-dock {
  pointer-events: none;
}
.local-video-player .pv-head,
.local-video-player .pv-dock {
  pointer-events: auto;
}
.local-video-player .pv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  flex-shrink: 0;
  /* 几乎不压暗画面 */
  background: linear-gradient(180deg, #1a201866, transparent 90%);
}
.local-video-player .pv-head strong {
  font-size: 17px;
  font-weight: 600;
  color: #efe6d2;
  text-shadow: 0 1px 3px #0005;
}
.local-video-player .pv-head-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.local-video-player .pv-close,
.local-video-player .pv-fs {
  min-width: 44px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #b8955ecc;
  background: #3d3424ee;
  color: #f3e2b8;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 1px 4px #0005;
}
.local-video-player .pv-close:hover,
.local-video-player .pv-fs:hover,
.local-video-player .pv-close:active,
.local-video-player .pv-fs:active {
  background: #52462fee;
  border-color: #dcc28a;
  color: #fff6dc;
}
.local-video-player button:focus,
.local-video-player button:focus-visible,
.local-video-player input:focus,
.local-video-player input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
.local-video-player .pv-dock {
  padding: 0 0 max(8px, env(safe-area-inset-bottom));
  /* 底部只留很淡的遮罩，不雾蒙蒙 */
  background: linear-gradient(0deg, #1a201888 15%, transparent 80%);
}
.local-video-player .pv-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  padding: 8px 14px 12px;
  position: relative;
  z-index: 5;
  background: transparent;
  border: 0;
  flex-shrink: 0;
}
.local-video-player .pv-controls button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #ffffff28;
  background: #2a322aee;
  color: #efe6d2;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 1px 4px #0004;
}
.local-video-player .pv-controls button[aria-pressed="true"] {
  background: #c9a86a;
  border-color: #c9a86a;
  color: #2a2418;
  font-weight: 700;
}
/* AB 一组：深暖金底，字更清楚 */
.local-video-player #lvSetA,
.local-video-player #lvSetB,
.local-video-player #lvToggleAB,
.local-video-player #lvClearAB {
  border-color: #b8955ecc;
  background: #3d3424ee;
  color: #f3e2b8;
  font-weight: 600;
}
.local-video-player #lvToggleAB[aria-pressed="true"] {
  background: #c9a86a;
  border-color: #c9a86a;
  color: #2a2418;
}
.local-video-player label.vol {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #f3e2b8;
  background: #2a322aee;
  border: 1px solid #ffffff22;
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: 0 1px 4px #0004;
}
.local-video-player label.vol input {
  width: min(120px, 28vw);
  accent-color: #c9a86a;
}
.local-video-player .ab-status {
  margin-left: auto;
  font-size: 13px;
  color: #f3e2b8;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #3d3424ee;
  border: 1px solid #b8955ea0;
  border-radius: 10px;
  padding: 8px 12px;
  box-shadow: 0 1px 4px #0004;
}
.local-video-player .pv-timeline {
  padding: 10px 14px 4px;
  background: transparent;
  flex-shrink: 0;
  position: relative;
  z-index: 6;
  border: 0;
}
.local-video-player .pv-time-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #d5c9ae;
  margin-bottom: 6px;
}
.local-video-player .pv-ab-legend {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #c9a86a;
}
.local-video-player .pv-ab-legend.on {
  color: #e8d090;
}
.local-video-player .pv-bar {
  position: relative;
  height: 26px;
  touch-action: none;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.local-video-player .pv-bar-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 12px;
  border-radius: 999px;
  background: #2a3830cc;
  box-shadow: inset 0 1px 2px #0006;
}
.local-video-player .pv-bar-ab {
  position: absolute;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e8a23a, #f0c45a);
  box-shadow: 0 0 0 1px #ffd98a88, 0 0 10px #e8a23a55;
  z-index: 1;
  pointer-events: none;
}
.local-video-player .pv-bar-ab.looping {
  background: linear-gradient(90deg, #e07040, #f0b24a);
  box-shadow: 0 0 0 1px #ffb080aa, 0 0 14px #e0704088;
  animation: lv-ab-pulse 1.4s ease-in-out infinite;
}
@keyframes lv-ab-pulse {
  50% { filter: brightness(1.15); }
}
.local-video-player .pv-bar-played {
  position: absolute;
  left: 0;
  height: 12px;
  border-radius: 999px;
  background: #6f9f7a88;
  z-index: 2;
  pointer-events: none;
  max-width: 100%;
}
.local-video-player .pv-bar-knob {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  margin-top: -9px;
  border-radius: 50%;
  background: #fff8e8;
  border: 2px solid #3f6a4e;
  box-shadow: 0 1px 4px #0008;
  z-index: 4;
  pointer-events: none;
}
.local-video-player .pv-mark {
  position: absolute;
  top: -2px;
  transform: translateX(-50%);
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  z-index: 5;
  pointer-events: none;
  color: #1a1810;
}
.local-video-player .pv-mark.a {
  background: #7ec8ff;
  box-shadow: 0 1px 4px #0006;
}
.local-video-player .pv-mark.b {
  background: #ffb24a;
  box-shadow: 0 1px 4px #0006;
}
/* 全屏 */
.local-video-player.is-fs,
.local-video-player:fullscreen,
.local-video-player:-webkit-full-screen {
  max-width: none !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
}
.local-video-player.is-fs {
  position: fixed;
  inset: 0;
  z-index: 10000;
}
html.local-video-fs-lock,
html.local-video-fs-lock body {
  overflow: hidden !important;
}
.local-video-player.is-fs .pv-stage,
.local-video-player:fullscreen .pv-stage,
.local-video-player:-webkit-full-screen .pv-stage {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
.local-video-player.is-fs video,
.local-video-player:fullscreen video,
.local-video-player:-webkit-full-screen video {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

@media (max-width: 600px) {
  .local-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 10px;
  }
  .local-video-add-tile .plus {
    font-size: 44px;
  }
  .local-video-player .ab-status {
    margin-left: 0;
    width: 100%;
    white-space: normal;
  }
  .local-video-player .pv-stage {
    min-height: min(58vh, 480px);
  }
  .local-video-player video {
    max-height: min(70vh, 640px);
  }
}
