/* Keep the site theme; only the piano stage is full-width. */

body.piano-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.piano-page .mk-header,
body.piano-page .mk-banner,
body.piano-page .mk-footer {
    flex-shrink: 0;
    width: 100%;
}

.piano-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0 12px;
}

.piano-wrap h1 {
    flex-shrink: 0;
    font-style: italic;
    margin: 4px 0 8px;
    color: var(--mk-purple-dark, #5f5490);
}

/* Instrument Selector */

#instrumentSelector {
    flex-shrink: 0;
    font-size: 1.05rem;
    text-align: center;
    min-width: 8rem;
    margin-bottom: 8px;
    background-color: #7c71ad;
    border: 1.5px solid #fff;
    border-radius: 8px;
    color: #fff;
    padding: 6px 10px;
}

#instrumentSelector:hover {
    background-color: #5f5490;
}

/* Canvas  */

#canvasDiv {
    width: 100%;
    min-height: 360px;
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
}

#pageCanvas {
    position: relative;
    z-index: 0;
    display: block;
    background-color: #fff;
    border: 3px ridge #79bfa1;
}

/* Spans/"Keys" */

#spanDiv {
    padding-left: 3px;
    height: 1vmax;
    display: flex;
    flex-flow: row nowrap;
    align-items: flex-end;
}

#spanDiv span {
    display: inline-block;
    position: relative;
    z-index: 1;
}

.hoveredKey {
    background-color: rgba(135, 125, 115, 0.12);
}

.normalKey {
    background-color: transparent;
}

.pressedKey {
    background-color: rgba(148, 148, 148, 0.24);
    box-shadow: 0px 0px 1px 1px black;
}

/* NumKeys Text & Buttons — always on screen, above the canvas overlays */

#numKeysVisible {
    flex-shrink: 0;
    position: relative;
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 12px 0 0;
    padding: 10px 12px;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}

#numKeysVisible p {
    display: inline;
    margin: 0;
    font-size: 1.15rem;
    font-style: italic;
    font-weight: 700;
    color: #5f5490;
}

#numKeysVisible button {
    width: auto;
    min-width: 64px;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 700;
    background-color: #7c71ad;
    border: 0;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
}

#numKeysVisible button:hover {
    background-color: #5f5490;
}

#numKeysVisible button:active {
    background-color: #79bfa1;
}
