/* ===================== 钢琴音效板 ===================== */

.pn-body {
    background: linear-gradient(160deg, #1e1b4b 0%, #312e81 60%, #4c1d95 100%);
    border-radius: 20px;
    padding: 22px 22px 26px;
    box-shadow: 0 18px 40px rgba(76, 29, 149, .25);
}

.pn-top { display: flex; align-items: baseline; justify-content: space-between; padding: 0 6px 14px; }
.pn-note { font-size: 15px; font-weight: 700; color: #e0e7ff; letter-spacing: .5px; }
.pn-brand { font-size: 11px; font-weight: 700; letter-spacing: 2px; color: rgba(224, 231, 255, .55); }

.pn-controls { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; padding: 0 6px; }
.pn-control { display: flex; align-items: center; gap: 8px; }
.pn-control label { font-size: 12px; font-weight: 700; color: rgba(224, 231, 255, .8); }
.pn-select {
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 9px;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 13px;
    outline: none;
    cursor: pointer;
}
.pn-select option { color: #0f172a; }
.pn-toggle {
    padding: 7px 14px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 9px;
    background: rgba(255,255,255,.1);
    color: #e0e7ff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s ease;
}
.pn-toggle:hover { background: rgba(255,255,255,.18); }
.pn-toggle.is-on { background: linear-gradient(135deg, #8b5cf6, #ec4899); border-color: transparent; color: #fff; }

/* ---- 键盘 ---- */
.pn-keyboard {
    position: relative;
    height: 210px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: inset 0 2px 10px rgba(0,0,0,.35);
    background: #0f172a;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}
.pn-white {
    position: absolute;
    top: 0; bottom: 0;
    width: 12.5%;
    background: linear-gradient(180deg, #f8fafc, #e2e8f0);
    border-right: 1px solid #cbd5e1;
    border-radius: 0 0 6px 6px;
    cursor: pointer;
    display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
    padding-bottom: 12px;
    font-size: 13px; font-weight: 800; color: #64748b;
    transition: background .08s ease, transform .05s ease;
}
.pn-white:last-child { border-right: none; }
.pn-white.is-pressed { background: linear-gradient(180deg, #c7d2fe, #a5b4fc); transform: translateY(2px); color: #4338ca; }
.pn-white.is-lit { background: linear-gradient(180deg, #fde68a, #fbbf24); color: #78350f; }

.pn-black {
    position: absolute;
    top: 0;
    height: 58%;
    width: 7.5%;
    background: linear-gradient(180deg, #1e293b, #0f172a);
    border-radius: 0 0 5px 5px;
    box-shadow: 0 3px 6px rgba(0,0,0,.4), inset 0 -2px 3px rgba(0,0,0,.5);
    cursor: pointer;
    z-index: 2;
    transition: background .08s ease, transform .05s ease;
}
.pn-black.is-pressed { background: linear-gradient(180deg, #4c1d95, #6d28d9); transform: translateY(1px); }
.pn-black.is-lit { background: linear-gradient(180deg, #b45309, #f59e0b); }

.pn-hint { text-align: center; font-size: 12px; color: rgba(224, 231, 255, .7); margin-top: 14px; }
.pn-hint b { color: #fff; }

@media (max-width: 520px) {
    .pn-keyboard { height: 160px; }
    .pn-white { font-size: 0; }
}
