@charset "UTF-8";
body {
  padding: 0;
  margin: 0;
}

.play-window {
  width: 100%;
  margin: 0 auto;
  overflow: auto;
  background: #fff;
  display: flex;
  flex-wrap: nowrap; /* 换行 */
  align-content: flex-start; /* ★ 多行时，行与行靠顶部排列 */
  align-items: flex-start; /* ★ 单行内，每个子元素靠顶部对齐 */
  box-sizing: border-box;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}

.play-window .boxL {
  width: 50%;
  overflow: hidden;
  height: 100%;
  position: relative;
}

.play-window .boxL .mask {
  position: absolute;
  right: 0;
  height: 100%;
  z-index: 999999;
  pointer-events: none; /* 遮罩仅作进度指示，不拦截点击（否则谱面点击设 A/B 点失效） */
}

.play-window .boxL .mask .hand {
  width: 2px;
  height: 100%;
  background-color: rgba(200, 33, 55, 0.9);
}

.play-window .boxL .lf {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

/* dp.php 右窗容器也用了 class="lf"（id="winRight"），但原 CSS 只定义了 .boxR .rt，
   导致右窗无 flex、item 垂直堆叠成多行；补上同左窗一致的 flex 布局（右窗 mask 在左，靠左排）。 */
.play-window .boxR .lf {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}

.play-window .boxR {
  width: 50%;
  overflow: hidden;
  height: 100%;
  position: relative;
}

.play-window .boxR .mask {
  position: absolute;
  left: 0;
  height: 100%;
  z-index: 999999;
  pointer-events: none; /* 遮罩仅作进度指示，不拦截点击（否则谱面点击设 A/B 点失效） */
}

.play-window .boxR .mask .hand {
  width: 2px;
  height: 100%;
  background-color: rgba(200, 33, 55, 0.9);
}

.play-window .boxR .rt {
  display: flex;
  justify-content: fflex-start;
  align-items: flex-start;
}

/* ===== 滚动容器（支持水平和垂直滚动） ===== */
.mybox {
  width: 100%;
  height: auto; /* 固定高度，触发滚动 */
  margin: 0 auto;
  overflow: auto;
  display: flex;
  flex-wrap: nowrap; /* 换行 */
  align-content: flex-start; /* ★ 多行时，行与行靠顶部排列 */
  align-items: flex-start; /* ★ 单行内，每个子元素靠顶部对齐 */
  background: #fafafa;
  box-sizing: border-box;
  overflow: hidden;
}

/* ==================== 和弦伴奏 附加样式 ==================== */
/* 可拖动控制面板（悬浮于页面之上；默认折叠，只显示播放/停止/设置） */
#dp-panel {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 99999999999;
  width: auto;
  min-width: 210px;
  max-width: calc(100vw - 24px);
  background: rgba(43, 43, 51, 0.97);
  color: #eee;
  font-size: 13px;
  border: 1px solid #555;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

#dp-panel.dp-expanded {
  width: min(560px, 96vw);
}

#dp-panel .dp-head {
  cursor: move;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  background: #36363f;
  border-radius: 5px;
  touch-action: none;
}

#dp-panel .dp-head-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

#dp-panel.dragging {
  opacity: 0.9;
}

#dp-panel.dp-expanded .dp-head {
  border-radius: 5px 5px 0 0;
}

#dp-panel .dp-head-fill {
  flex: 1 1 auto;
  min-width: 8px;
}

#dp-panel .dp-head-sep {
  width: 1px;
  height: 18px;
  background: #555;
  margin: 0 2px;
}

/* A-B 练习循环按钮与状态 */
#dp-panel .dp-loop-btn {
  padding: 3px 8px;
  font-size: 12px;
}

#dp-panel .dp-loop-status {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
}

#dp-panel .dp-loop-status.on {
  color: #ffd76e;
}

/* A-B 循环角标（谱面上显示在对应小节上） */
.dp-loop-marker {
  position: absolute;
  top: 2px;
  left: 2px;
  z-index: 5;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  background: rgba(200, 33, 55, 0.9);
  border-radius: 3px;
  padding: 0 4px;
  pointer-events: none;
  box-sizing: border-box;
}

#dp-panel .dp-settings-btn {
  padding: 4px 10px;
  font-size: 15px;
  line-height: 1;
}

#dp-panel .dp-body {
  padding: 8px 12px 10px;
}

#dp-panel .dp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#dp-panel .dp-row + .dp-row {
  margin-top: 8px;
}

#dp-panel .dp-sep {
  width: 1px;
  height: 18px;
  background: #555;
  margin: 0 2px;
}

#dp-panel label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

#dp-panel select, #dp-panel input {
  background: #fff;
  color: #222;
  border: 1px solid #999;
  border-radius: 3px;
  padding: 2px 4px;
}

.dp-btn {
  border: 1px solid #888;
  background: #4a90d9;
  color: #fff;
  border-radius: 4px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 13px;
  flex-shrink: 0;
  min-height: 28px;
  line-height: 1.2;
  white-space: nowrap;
}

.dp-btn:hover {
  background: #3a7fc9;
}

.dp-btn:disabled {
  opacity: 0.5;
  cursor: default;
  background: #7b8ba0;
}

.dp-mode-btn {
  border: 1px solid #666;
  background: transparent;
  color: #ccc;
  border-radius: 4px;
  padding: 3px 8px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}
}

.dp-mode-btn.on {
  background: #ffd76e;
  color: #222;
  border-color: #ffd76e;
}

#dp-status {
  color: #9fd6ff;
  font-size: 12px;
  display: none;
}

#dp-curchord {
  margin-left: auto;
  background: #ffd76e;
  color: #222;
  border-radius: 4px;
  padding: 3px 12px;
  font-weight: bold;
  font-size: 15px;
  min-width: 56px;
  text-align: center;
}

/* 和弦走向输入行（支持段落标记 [前奏][主歌][副歌][间奏][尾奏][过门]） */
#dp-panel .dp-chords-row {
  align-items: flex-start;
}

#dp-panel .dp-chords-row label {
  line-height: 34px;
  color: #ffd76e;
}

#dp-panel .dp-chords-row textarea {
  width: 330px;
  max-width: 100%;
  flex: none;
  background: #fff;
  color: #222;
  border: 1px solid #999;
  border-radius: 4px;
  padding: 5px 8px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  resize: vertical;
  min-height: 48px;
  line-height: 1.4;
}

/* 当前小节高亮遮罩 .item.active::after 是 absolute 定位，.item 必须是定位祖先，
   否则遮罩会定位到 gallery 甚至整个页面（整页变黄）。 */
#gallery .item,
#winLeft .item,
#winRight .item {
  position: relative;
}

/* gallery 当前小节高亮：透明遮罩 + 四边完整边框（内嵌绘制，避免被滚动容器裁切） */
#gallery .item.active {
  z-index: 1;
}

#gallery .item.active::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 215, 110, 0.35); /* 半透明遮罩 */
  border: 3px solid #ffd76e; /* 四边完整边框 */
  box-sizing: border-box;
  pointer-events: none;
  z-index: 1;
}

/* gallery 小节和弦角标：默认隐藏，由开关 #dp-badges 控制；位置通过 CSS 变量配置 */
#gallery .item .dp-chord-badge {
  position: absolute;
  display: none;
  left: var(--dp-badge-left, 2px);
  right: var(--dp-badge-right, auto);
  bottom: var(--dp-badge-bottom, 2px);
  background: rgba(0, 0, 0, 0.72);
  color: #ffd76e;
  font-size: 12px;
  padding: 0 5px;
  border-radius: 3px;
  line-height: 18px;
  pointer-events: none;
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: var(--dp-badge-align, left);
  z-index: 2;
}

#gallery.dp-badges-on .item .dp-chord-badge {
  display: block;
}

/* ---------- 乐器设置（每风格：开关/音量/音色） ---------- */
#dp-panel .dp-inst-toggle-row {
  align-items: center;
  gap: 8px;
}

#dp-panel .dp-inst-hint {
  color: #888;
  font-size: 11px;
}

#dp-instrument {
  margin-top: 8px;
  border: 1px solid #555;
  border-radius: 5px;
  background: rgba(20, 20, 26, 0.6);
  padding: 8px 10px;
}

#dp-instrument .inst-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

#dp-instrument .inst-row:last-child {
  border-bottom: none;
}

#dp-instrument .inst-name {
  width: 38px;
  color: #ffd76e;
  font-weight: bold;
  white-space: nowrap;
}

#dp-instrument .inst-group-title {
  color: #9fd6ff;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1px;
  margin: 8px 0 2px;
  padding-bottom: 2px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.14);
}

#dp-instrument .inst-group-title:first-child {
  margin-top: 0;
}

#dp-instrument .inst-on {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

#dp-instrument .inst-vol {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  color: #bbb;
}

#dp-instrument .inst-vol input[type=range] {
  width: 78px;
}

#dp-instrument .inst-vol b {
  width: 34px;
  text-align: right;
  font-weight: normal;
  color: #9fd6ff;
}

#dp-instrument .inst-prog {
  margin-left: auto;
}

/* 横屏按钮：仅移动端（小屏触屏）显示 */
#dp-landscape {
  display: none;
}

@media (hover: none) and (max-width: 900px) {
  #dp-landscape {
    display: inline-block;
  }
}
/* 移动端横屏优化：面板收窄/贴边，不遮挡谱面过多 */
@media (orientation: landscape) and (max-width: 900px) and (hover: none) {
  #dp-panel.dp-expanded {
    width: min(520px, 94vw);
    font-size: 12px;
  }
  #dp-panel.dp-expanded .dp-body {
    padding: 6px 10px 8px;
  }
  #dp-panel.dp-expanded .dp-chords-row textarea {
    min-height: 26px;
    font-size: 12px;
  }
  #dp-instrument .inst-vol input[type=range] {
    width: 70px;
  }
}
/* 前置拍倒计时覆盖层：大数字居中显示 4-3-2-开始 */
#dp-countdown-overlay {
  position: fixed;
  left: 50%;
  top: 15%;
  transform: translateX(-50%);
  font-size: 140px;
  font-weight: bold;
  color: #ffd76e;
  text-shadow: 0 0 24px rgba(0, 0, 0, 0.85), 0 3px 10px rgba(0, 0, 0, 0.95);
  z-index: 100000;
  pointer-events: none;
  display: none;
}

#dp-countdown-overlay.show {
  display: block;
}

/* 全局常闭（鼓/吉他）：乐器设置行置灰不可操作 */
#dp-instrument .inst-row.muted {
  opacity: 0.45;
}

#dp-instrument .inst-row.muted input, #dp-instrument .inst-row.muted select {
  cursor: not-allowed;
}

.player {
  margin: 12px auto;
  overflow: hidden;
  border: 1px solid #ddd;
  max-width: 1200px;
  box-sizing: border-box;
}

/* .player 内部：去掉 A 项目原本用于滚动留白的 margin-bottom:30px（被 overflow:hidden 包裹后露出为底部空白） */
.player .mybox {
  padding-bottom: -10px;
}

.player .play-window {
  margin-bottom: 0;
  padding-bottom: -5px;
}/*# sourceMappingURL=editor.css.map */
/* ===== 会员分级：锁定小节 ===== */
#gallery .item.dp-locked::after,
#winLeft .item.dp-locked::after,
#winRight .item.dp-locked::after{
  content:''; position:absolute; inset:0; background:rgba(255,255,255,.62); z-index:4; cursor:not-allowed;
}
#gallery .item.dp-locked,
#winLeft .item.dp-locked,
#winRight .item.dp-locked{ cursor:not-allowed; }
.dp-lock-mark{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  font-size:22px; z-index:5; pointer-events:none; line-height:1;
}

/* ===== 动态谱页顶部导航 ===== */
.dp-site-nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:8px 14px; background:#fff; border-bottom:1px solid #eee;
  font-size:14px; position:relative; z-index:20;
}
.dp-nav-logo{ font-weight:700; color:#d97706; font-size:16px; }
.dp-nav-right{ display:flex; align-items:center; gap:14px; }
.dp-nav-right a{ color:#6b7280; }
.dp-nav-right a:hover{ color:#d97706; }
.dp-fav-btn{ min-width:64px; }
/* ===== 图片谱模式（内容页新增） ===== */
.dp-pics{height:calc(100vh - 120px);overflow:auto;padding:16px;background:#f7f7f5}
.dp-pics-track{display:flex;flex-direction:column;gap:18px;align-items:center}
.dp-pic-img{max-width:100%;max-height:calc(100vh - 220px);object-fit:contain;background:#fff;border-radius:8px;box-shadow:0 2px 10px rgba(0,0,0,.12);cursor:zoom-in}
.dp-pics-tip{color:#9ca3af;font-size:12px;text-align:center;padding:6px 0 10px}
.dp-pic-lightbox{position:fixed;inset:0;z-index:9999;background:rgba(0,0,0,.88);display:flex;align-items:center;justify-content:center;cursor:zoom-out}
.dp-pic-lightbox img{max-width:94vw;max-height:94vh;object-fit:contain;border-radius:4px}
@media (max-width:768px){
  .dp-pics{height:calc(100vh - 140px);padding:10px}
  .dp-pic-img{max-height:calc(100vh - 220px)}
}
/* ===== 内容页 SEO：面包屑/歌曲信息卡/相关推荐 ===== */
.dp-crumb{padding:10px 16px 0;font-size:13px;color:#9ca3af;max-width:1200px;margin:0 auto}
.dp-crumb a{color:#9ca3af;text-decoration:none}
.dp-crumb a:hover{color:#d97706}
.dp-crumb .sep{margin:0 6px;color:#d1d5db}
.dp-crumb b{color:#6b7280;font-weight:600}
.dp-song-card{max-width:1200px;margin:12px auto 0;padding:16px 16px;display:flex;gap:18px;background:#fff;border-radius:10px;border:1px solid #f0e9dd;box-shadow:0 1px 4px rgba(0,0,0,.04)}
.dp-song-pic{flex:0 0 120px}
.dp-song-pic img{width:120px;height:120px;object-fit:cover;border-radius:8px;background:#f3f4f6}
.dp-song-meta{flex:1;min-width:0}
.dp-song-meta h1{font-size:20px;color:#1f2937;margin:0 0 8px;font-weight:700}
.dp-song-sub{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:13px;color:#6b7280;margin-bottom:8px}
.dp-song-sub span{background:#faf6ee;padding:2px 9px;border-radius:12px;color:#7c5a1e}
.dp-song-ms{font-size:13px;color:#9ca3af;line-height:1.6;margin:0 0 10px}
.dp-song-links{display:flex;gap:10px;flex-wrap:wrap}
.dp-song-link{display:inline-block;padding:6px 14px;background:#d97706;color:#fff;border-radius:6px;font-size:13px;text-decoration:none}
.dp-song-link:hover{background:#b45309}
.dp-song-link.ghost{background:#fff;color:#d97706;border:1px solid #d97706}
.dp-related{max-width:1200px;margin:16px auto 40px;padding:0 16px}
.dp-related h3{font-size:16px;color:#1f2937;margin:0 0 12px}
.dp-related-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.dp-related-item{position:relative;display:block;background:#fff;border:1px solid #f0e9dd;border-radius:10px;overflow:hidden;text-decoration:none;transition:box-shadow .2s}
.dp-related-item:hover{box-shadow:0 4px 14px rgba(0,0,0,.08)}
.dp-related-item img{width:100%;height:100px;object-fit:cover;background:#f3f4f6}
.dp-rel-name{font-size:14px;font-weight:600;color:#1f2937;padding:8px 10px 2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dp-rel-singer{font-size:12px;color:#9ca3af;padding:0 10px 10px}
.dp-rel-dp{position:absolute;top:6px;right:6px;background:#d97706;color:#fff;font-size:11px;padding:2px 7px;border-radius:9px}
@media (max-width:768px){
  .dp-song-card{flex-direction:column;gap:10px;margin:10px 10px 0;padding:12px}
  .dp-song-pic{flex:0 0 auto;display:flex;justify-content:center}
  .dp-song-pic img{width:90px;height:90px}
  .dp-related-list{grid-template-columns:repeat(2,1fr)}
  .dp-crumb{padding:10px 12px 0}
  .dp-video{margin:10px 10px 0}
  .player{margin:10px}
  .dp-related{margin:14px 10px 40px;padding:0}
}
.dp-singer-link{color:#d97706;text-decoration:none;font-weight:600}
.dp-singer-link:hover{text-decoration:underline}

/* ===== 教学视频（16:9 响应式） ===== */
.dp-video{margin:16px auto 0;max-width:1200px;background:#fff;border:1px solid #f0e9dd;border-radius:10px;padding:14px}
.dp-video h3{font-size:15px;color:#1f2937;margin:0 0 10px;padding-left:8px;border-left:3px solid #d97706}
.dp-video-box{position:relative;width:100%;padding-top:56.25%;background:#000;border-radius:8px;overflow:hidden}
.dp-video-box iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
@media (max-width:768px){.dp-video{padding:10px}}

/* ===== 歌词区 ===== */
.dp-lyric{margin:16px auto 0;max-width:1200px;background:#fff;border:1px solid #f0e9dd;border-radius:10px;padding:14px}
.dp-lyric h3{font-size:15px;color:#1f2937;margin:0 0 10px;padding-left:8px;border-left:3px solid #d97706}
.dp-lyric-box{font-size:14px;color:#4b5563;line-height:2;white-space:pre-wrap;max-height:320px;overflow-y:auto;padding-right:8px}
.dp-lyric-box::-webkit-scrollbar{width:4px}
.dp-lyric-box::-webkit-scrollbar-thumb{background:#e5e7eb;border-radius:2px}
@media (max-width:768px){.dp-lyric{margin:10px 10px 0;padding:10px}.dp-lyric-box{font-size:13px;max-height:240px}}

/* ===== 小面板 PC/移动端防变形 ===== */
@media (max-width: 768px) {
  #dp-panel { left: 8px; top: 8px; width: auto; min-width: 0; max-width: calc(100vw - 16px); }
  #dp-panel.dp-expanded { width: auto; }
  #dp-panel .dp-head {
    gap: 5px;
    padding: 6px 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  #dp-panel .dp-btn {
    padding: 4px 8px;
    font-size: 12px;
    min-height: 26px;
    line-height: 1.1;
  }
  #dp-panel .dp-mode-btn {
    padding: 3px 7px;
    font-size: 12px;
  }
  #dp-panel .dp-loop-status { display: none; }
  #dp-panel .dp-head-sep { display: none; }
  #dp-panel .dp-fav-btn { display: none; } /* 移动端隐藏收藏按钮，节省空间 */
  #dp-panel .dp-row { gap: 6px; }
  #dp-panel label { font-size: 12px; }
  #dp-panel .dp-settings-btn { padding: 4px 8px; font-size: 14px; }
}
/* 移动端 .dp-video 左右留边（置于末尾确保覆盖 PC 主规则） */
@media (max-width:768px){
  .dp-video{margin:10px 10px 0;padding:10px}
}
