/* ===== 在线钢琴 全屏覆盖 ===== */
body.page-piano-full .app { max-width: 100% !important; }
body.page-piano-full .main-content { max-width: 100%; width: 100%; border-right: 0; box-sizing: border-box; }

.pno-wrap {
  max-width: none;
  margin: 0;
  padding: 18px 22px 40px;
  box-sizing: border-box;
  color: #e9edf5;
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --pno-accent: #5b8cff;
  --pno-radius: 12px;
  transition: background .4s ease;
}

/* 壁纸主题（作用于 .pno-wrap） */
.pno-wrap.pno-wp-aurora   { background: linear-gradient(135deg, #0f2027 0%, #203a43 45%, #2c5364 100%); }
.pno-wrap.pno-wp-midnight{ background: #0b0f1a; }
.pno-wrap.pno-wp-sunset  { background: linear-gradient(135deg, #2b1055 0%, #7597de 100%); }
.pno-wrap.pno-wp-forest  { background: linear-gradient(135deg, #134e2e 0%, #1f6f43 100%); }
.pno-wrap.pno-wp-plain   { background: #11151c; }

/* ===== 英雄区 ===== */
.pno-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 26px; border-radius: 16px; margin-bottom: 16px;
  background: linear-gradient(120deg, rgba(91,140,255,.22), rgba(180,120,255,.16));
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(4px);
}
.pno-title { font-size: 30px; margin: 0 0 8px; font-weight: 800; letter-spacing: .5px; }
.pno-emoji { filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.pno-sub { margin: 0 0 12px; color: #c3cbe0; font-size: 14.5px; line-height: 1.6; max-width: 760px; }
.pno-hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pno-tag {
  font-size: 12px; padding: 4px 11px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #d6ddf0;
}
.pno-hero-aside { text-align: right; min-width: 180px; }
.pno-now-playing {
  font-size: 13px; color: #aeb8d4; padding: 8px 14px; border-radius: 10px;
  background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.08); min-height: 36px; line-height: 20px;
}
.pno-load {
  font-size: 12px; color: #9aa3bd; margin: 10px 0 0 auto; padding: 4px 10px;
  border-radius: 999px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.08);
}
.pno-load[hidden] { display: none !important; }
.pno-record-dot {
  width: 12px; height: 12px; border-radius: 50%; background: #444c63; margin: 12px 0 0 auto;
  box-shadow: 0 0 0 0 rgba(244,33,46,0); transition: background .2s;
}
.pno-record-dot.pno-rec-on { background: #f4212e; animation: pno-pulse 1s infinite; }
@keyframes pno-pulse { 0%{box-shadow:0 0 0 0 rgba(244,33,46,.6)} 70%{box-shadow:0 0 0 10px rgba(244,33,46,0)} 100%{box-shadow:0 0 0 0 rgba(244,33,46,0)} }

/* ===== 工具栏 ===== */
.pno-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px;
  padding: 12px 16px; border-radius: 14px; margin-bottom: 16px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
}
.pno-tool-group { display: flex; align-items: center; gap: 10px; }
.pno-tool-right { margin-left: auto; }
.pno-btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: 13.5px; color: #e9edf5; padding: 8px 14px; border-radius: 10px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  transition: background .15s, transform .05s;
}
.pno-btn:hover { background: rgba(255,255,255,.14); }
.pno-btn:active { transform: translateY(1px); }
.pno-btn[disabled] { opacity: .4; cursor: default; }
.pno-btn.pno-active { background: var(--pno-accent); border-color: var(--pno-accent); color: #fff; }
.pno-btn-ico { font-size: 15px; line-height: 1; }
.pno-btn-ghost { background: transparent; }
.pno-vol { display: flex; align-items: center; gap: 8px; }
.pno-vol input[type=range] { width: 130px; accent-color: var(--pno-accent); }
.pno-sel { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #c3cbe0; }
.pno-sel select {
  background: rgba(255,255,255,.08); color: #e9edf5; border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px; padding: 6px 8px; font-size: 13px;
}
/* 键数切换 + 键盘范围 */
.pno-range-ctl { display: flex; align-items: center; gap: 6px; }
.pno-btn-mini { padding: 6px 9px; font-size: 12px; border-radius: 8px; line-height: 1; }
.pno-range-label {
  min-width: 96px; text-align: center; font-size: 12.5px; color: #c3cbe0;
  padding: 5px 8px; border-radius: 8px; background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.1); font-variant-numeric: tabular-nums;
  letter-spacing: .3px; white-space: nowrap;
}
.pno-metro-ctl { display: flex; align-items: center; gap: 8px; }
/* 必须显式兜底：.pno-metro-ctl 的 display:flex 会覆盖 UA 的 [hidden]{display:none}，
   不写这条节拍器的 BPM / 拍数控件会一直显示（与 hidden 属性矛盾） */
.pno-metro-ctl[hidden] { display: none !important; }
.pno-bpm { width: 64px; background: rgba(255,255,255,.08); color: #e9edf5; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 6px 8px; }
.pno-beats { background: rgba(255,255,255,.08); color: #e9edf5; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 6px 8px; }

/* ===== 键盘舞台 ===== */
.pno-stage { position: relative; padding: 10px 0 0; }
.pno-keyboard {
  position: relative; display: flex; height: 230px; user-select: none;
  margin: 0 auto; max-width: 1280px; border-radius: 0 0 8px 8px;
  /* 用 box-shadow 代替旧版的 filter: drop-shadow —— 后者要对 61 个子元素做逐像素
     合成，在低端手机上滚动/按键时明显掉帧 */
  box-shadow: 0 18px 30px rgba(0,0,0,.45);
}
.pno-wkey {
  position: relative; flex: 1 1 0; margin: 0 1px; border-radius: 0 0 7px 7px;
  background: linear-gradient(#fdfdfd, #ececec); border: 1px solid #c9c9c9; border-top: none;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding-bottom: 9px; cursor: pointer; transition: background .06s;
}
.pno-wkey.pno-down { background: linear-gradient(#d7e0ff, #b9c8ff); }
.pno-bkey {
  position: absolute; top: 0; width: 4.2%; height: 62%; z-index: 3; cursor: pointer;
  background: linear-gradient(#3a3f4b, #15181f); border: 1px solid #000; border-radius: 0 0 6px 6px;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding-bottom: 7px;
  box-shadow: 0 4px 6px rgba(0,0,0,.5);
}
.pno-bkey.pno-down { background: linear-gradient(#5566aa, #2d3a73); }
.pno-key-label { font-size: 10.5px; color: #6b7280; font-weight: 600; pointer-events: none; text-align: center; line-height: 1.25; }
.pno-bkey .pno-key-label { color: #c8cfe0; font-size: 9px; }
.pno-key-label b { color: #f4212e; }
.pno-hint { text-align: center; font-size: 12.5px; color: #9aa3bd; margin-top: 14px; line-height: 1.7; }
.pno-hint b { color: #d6ddf0; }

/* ===== 面板 ===== */
.pno-panels { display: flex; gap: 16px; margin-top: 22px; flex-wrap: wrap; }
.pno-panel { flex: 1 1 320px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 16px 18px; }
.pno-panel-title { font-size: 16px; margin: 0 0 12px; font-weight: 700; }
.pno-songs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pno-song-btn {
  text-align: left; cursor: pointer; padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: #e9edf5;
  font-size: 13.5px; transition: background .15s;
}
.pno-song-btn:hover { background: rgba(255,255,255,.13); }
.pno-song-btn.pno-playing { background: var(--pno-accent); border-color: var(--pno-accent); color: #fff; }
.pno-song-btn small { display: block; color: #aeb8d4; font-size: 11px; margin-top: 3px; }
.pno-song-btn.pno-playing small { color: #e6ecff; }

.pno-score-name { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.pno-score {
  font-size: 19px; line-height: 2.1; letter-spacing: 2px; min-height: 60px;
  color: #e9edf5; word-break: break-all; font-variant-numeric: tabular-nums;
}
.pno-score .pno-note-hit { color: var(--pno-accent); font-weight: 800; text-shadow: 0 0 10px rgba(91,140,255,.7); }
.pno-score .pno-note-active { background: rgba(91,140,255,.25); border-radius: 4px; }
.pno-score-lrc { margin-top: 12px; font-size: 14px; color: #c3cbe0; min-height: 22px; line-height: 1.6; }

/* ===== 手机端横屏全屏演奏 ===== */
/* 入口按钮只在窄屏 / 触屏设备显示（桌面端无需） */
.pno-fs-btn { display: none; }
@media (max-width: 880px), (pointer: coarse) {
  .pno-fs-btn { display: inline-flex; }
}
body.pno-fs-open { overflow: hidden; }
/* 全屏：内容层固定铺满视口，盖住站点导航等所有页面框架 */
body.pno-fs-open .pno-wrap {
  position: fixed; inset: 0; z-index: 2147483000;
  max-width: none; margin: 0; padding: 8px 10px 12px;
  box-sizing: border-box; overflow: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; gap: 8px;
}
/* 伪横屏：设备仍是竖屏（iOS Safari 无法锁横屏 / 无法原生全屏）时，
   把整块内容旋转 90° 铺满屏幕，尺寸由 JS 按 innerWidth/innerHeight 互换设置 */
body.pno-fs-rotate .pno-wrap {
  position: fixed;
  left: 50%; top: 50%; right: auto; bottom: auto;
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center center;
}
body.pno-fs-open .pno-hero { display: none; }
body.pno-fs-open .pno-toolbar { flex: 0 0 auto; margin-bottom: 0; padding: 8px 10px; gap: 8px 12px; }
body.pno-fs-open .pno-toolbar .pno-btn { padding: 7px 11px; }
body.pno-fs-open .pno-stage { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 0; }
body.pno-fs-open .pno-keyboard {
  flex: 1 1 auto; height: auto; min-height: 120px;
  width: 100%; max-width: 100% !important; margin: 0 auto;
}
body.pno-fs-open .pno-hint { display: none; }
body.pno-fs-open .pno-panels { flex: 0 1 auto; margin-top: 2px; overflow: auto; }
body.pno-fs-open .pno-songs { grid-template-columns: 1fr 1fr; }
.pno-fs-exit {
  position: fixed; top: 10px; right: 10px; z-index: 2147483001;
  padding: 8px 14px; border-radius: 999px; font-size: 13px; cursor: pointer;
  color: #fff; background: rgba(20,24,34,.85); border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(6px);
}
.pno-fs-exit[hidden] { display: none !important; }

/* ===== 响应式 ===== */
@media (max-width: 880px) {
  .pno-hero { flex-direction: column; align-items: flex-start; }
  .pno-hero-aside { text-align: left; width: 100%; }
  .pno-record-dot { margin: 10px 0 0 0; }
  .pno-keyboard { height: 170px; }
  .pno-songs { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .pno-wrap { padding: 12px 10px 30px; }
  .pno-title { font-size: 24px; }
  .pno-keyboard { height: 140px; }
  .pno-toolbar { gap: 10px; }
  .pno-btn-txt { display: none; }
  .pno-btn { padding: 8px 10px; }
}
/* 触屏设备：去掉 hover 相关的点击延迟提示 */
.pno-wkey, .pno-bkey { -webkit-tap-highlight-color: transparent; touch-action: none; }
