/* =============================================================
   The Brazen Head - the stage and everything on it (October 6, 2026)
   Scoped to html.wk .bh-*; the room itself is wunderkammer.css.
   Sections: 0 tokens, 1 the niche and the stage, 2 the plate (poster,
   canvas, snapshot), 3 head-up: status and tools, 4 buttons, 5 the
   note, 6 the question, 7 the speech scroll, 8 captions, 9 bell,
   bellows, hammer, drawer handle, 10 labels, 11 the singing drawer,
   12 phases, 13 full screen, 14 no WebGL, 15 the page copy,
   16 responsive, 17 reduced motion
   ============================================================= */

/* ---- 0. tokens ------------------------------------------------------ */
html.wk .bh-niche {
    --bh-paper: #efe4cc;
    --bh-paper-hi: #f6eedb;
    --bh-ink: #1d1611;
    --bh-soft: #5a4632;
    --bh-red: #a62b2b;
    --bh-brass: #d4b06a;
    --bh-brass-dim: #8a6a33;
    --bh-bone: #e8dcc2;
    --bh-night: #0d0907;
    --bh-shadow: 0 10px 28px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ---- 1. the niche and the stage ------------------------------------ */
html.wk .bh-niche { max-width: 1120px; padding: 14px; }
html.wk .bh-niche .wk-label { z-index: 6; top: -30px; right: auto; left: 22px; transform: rotate(-0.8deg); }
html.wk .bh-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: calc(100svh - 110px);
    min-height: 440px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    isolation: isolate;
    background: var(--bh-night);
    border: 1px solid #000;
    box-shadow: inset 0 0 0 1px rgba(212, 176, 106, 0.18);
    color: var(--bh-bone);
    font-family: var(--wk-text);
    -webkit-tap-highlight-color: transparent;
    outline: none;
    clip-path: none;
}
html.wk .bh-stage *, html.wk .bh-stage *::before, html.wk .bh-stage *::after { box-sizing: border-box; }

/* ---- 2. the plate --------------------------------------------------- */
html.wk .bh-poster, html.wk .bh-canvas, html.wk .bh-snap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}
html.wk .bh-poster { object-fit: cover; filter: brightness(0.32) saturate(0.6); transition: opacity 1.4s ease; z-index: 0; }
html.wk .bh-canvas { z-index: 1; opacity: 0; transition: opacity 1.4s ease; touch-action: manipulation; }
html.wk .bh-stage.is-ready .bh-canvas { opacity: 1; }
html.wk .bh-stage.is-ready .bh-poster { opacity: 0; }
html.wk .bh-snap { z-index: 2; }
html.wk .bh-snap[hidden] { display: none; }

/* ---- 3. head-up: status and tools ----------------------------------- */
html.wk .bh-hud {
    position: absolute;
    z-index: 5;
    left: 0; right: 0; top: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px 0;
    pointer-events: none;
}
html.wk .bh-status {
    margin: 0;
    padding: 4px 2px;
    max-width: 60%;
    font-family: var(--wk-fell-sc);
    font-size: 0.98rem;
    letter-spacing: 0.06em;
    line-height: 1.2;
    color: #d9bd84;
    text-shadow: 0 1px 2px #000, 0 0 10px #000;
}
html.wk .bh-tools { display: flex; gap: 8px; pointer-events: auto; }
html.wk .bh-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    min-width: 38px;
    padding: 6px 10px;
    border: 1px solid rgba(212, 176, 106, 0.55);
    border-radius: 2px;
    background: rgba(13, 9, 7, 0.72);
    color: #e6cf98;
    font-family: var(--wk-fell-sc);
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
html.wk .bh-tool svg { width: 20px; height: 20px; flex: 0 0 auto; }
html.wk .bh-tool:hover { background: rgba(42, 26, 16, 0.92); color: #f3dc9c; border-color: var(--bh-brass); }
html.wk .bh-tool:focus-visible { outline: 2px solid var(--bh-brass); outline-offset: 2px; }
html.wk #bh-sound .bh-mute { display: none; }
html.wk #bh-sound[aria-pressed="false"] .bh-mute { display: inline; }
html.wk #bh-sound[aria-pressed="false"] .bh-wave { display: none; }

/* ---- 4. buttons ------------------------------------------------------ */
html.wk .bh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    min-height: 44px;
    padding: 0.5em 1.15em 0.45em;
    border: 1px solid var(--bh-brass-dim);
    border-radius: 2px;
    background: linear-gradient(#2e1d12, #1c120b);
    box-shadow: inset 0 0 0 1px rgba(212, 176, 106, 0.25), 0 3px 8px rgba(0, 0, 0, 0.5);
    color: #f1dca6;
    font-family: var(--wk-fell-sc);
    font-size: 1.08rem;
    letter-spacing: 0.05em;
    line-height: 1.1;
    cursor: pointer;
    transition: transform 0.12s, background 0.2s, color 0.2s;
}
html.wk .bh-btn:hover { background: linear-gradient(#3a2416, #22160d); color: #fff1c8; }
html.wk .bh-btn:active { transform: translateY(1px); }
html.wk .bh-btn:focus-visible { outline: 2px solid var(--bh-brass); outline-offset: 3px; }
html.wk .bh-btn[disabled] { opacity: 0.55; cursor: wait; }
html.wk .bh-textbtn {
    padding: 0.3em 0.2em;
    border: 0;
    background: none;
    color: var(--bh-soft);
    font-family: var(--wk-text);
    font-style: italic;
    font-size: 1rem;
    text-decoration: underline;
    text-decoration-color: rgba(90, 70, 50, 0.45);
    text-underline-offset: 3px;
    cursor: pointer;
}
html.wk .bh-textbtn:hover { color: var(--bh-red); }
html.wk .bh-textbtn:focus-visible { outline: 2px solid var(--bh-red); outline-offset: 2px; }

/* parchment for every card on the plate */
html.wk .bh-note, html.wk .bh-ask, html.wk .bh-scroll-body, html.wk .bh-label, html.wk .bh-fly {
    color: var(--bh-ink);
    background: url('/wunderkammer/img/paper.webp'), var(--bh-paper);
}

/* ---- 5. the note ----------------------------------------------------- */
html.wk .bh-note {
    position: absolute;
    z-index: 8;
    left: 50%;
    top: 50%;
    width: min(32rem, calc(100% - 32px));
    max-height: calc(100% - 32px);
    overflow: auto;
    transform: translate(-50%, -50%) rotate(-0.6deg);
    padding: 1.6rem 1.8rem 1.2rem;
    text-align: center;
    box-shadow: var(--bh-shadow);
    clip-path: var(--wk-torn);
}
html.wk .bh-note[hidden] { display: none; }
html.wk .bh-note h2 {
    margin: 0 0 0.7rem;
    font-family: var(--wk-fell-sc);
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--bh-red);
}
html.wk .bh-note-hand {
    margin: 0 0 1rem;
    font-family: var(--wk-fell);
    font-style: italic;
    font-size: 1.32rem;
    line-height: 1.38;
    text-align: left;
    color: var(--bh-ink);
}
html.wk .bh-sign { display: block; margin-top: 0.3rem; text-align: right; font-style: normal; font-family: var(--wk-fell-sc); letter-spacing: 0.05em; }
html.wk .bh-note-how { margin: 0 0 1.1rem; font-size: 1.02rem; line-height: 1.45; text-align: left; color: var(--bh-soft); }
html.wk .bh-note-small { margin: 0.7rem 0 0.2rem; font-size: 0.92rem; font-style: italic; color: var(--bh-soft); }
html.wk .bh-loading { margin: 0.8rem auto 0; max-width: 18rem; font-size: 0.9rem; font-style: italic; color: var(--bh-soft); }
html.wk .bh-loading i { display: block; height: 2px; margin-top: 0.35rem; background: rgba(29, 22, 17, 0.15); overflow: hidden; }
html.wk .bh-loading b { display: block; height: 100%; background: var(--bh-red); transform-origin: left center; transform: scaleX(0.02); transition: transform 0.25s linear; }
html.wk .bh-stage.is-ready .bh-loading { display: none; }
html.wk .bh-note-close { display: none; margin-top: 0.4rem; }
html.wk .bh-stage:not([data-phase="dark"]):not([data-phase="loading"]) .bh-note-close { display: inline-block; }
html.wk .bh-stage:not([data-phase="dark"]):not([data-phase="loading"]) .bh-light,
html.wk .bh-stage:not([data-phase="dark"]):not([data-phase="loading"]) .bh-note-small { display: none; }

/* ---- 6. the question ------------------------------------------------- */
html.wk .bh-ask {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 22px;
    width: min(40rem, calc(100% - 220px));
    transform: translateX(-50%) rotate(0.4deg);
    padding: 0.75rem 1.1rem 0.45rem;
    box-shadow: var(--bh-shadow);
    clip-path: var(--wk-torn);
    animation: bh-unroll 0.5s ease-out both;
}
html.wk .bh-ask[hidden] { display: none; }
html.wk .bh-ask label { display: block; margin-bottom: 0.3rem; font-family: var(--wk-fell-sc); font-size: 0.92rem; letter-spacing: 0.05em; color: var(--bh-soft); }
html.wk .bh-ask-row { display: flex; gap: 0.6rem; align-items: center; }
html.wk .bh-ask input {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    padding: 0.2rem 0.2rem 0;
    border: 0;
    border-bottom: 1px solid rgba(29, 22, 17, 0.55);
    border-radius: 0;
    background: transparent;
    color: var(--bh-ink);
    font-family: var(--wk-fell);
    font-style: italic;
    font-size: 1.35rem;
    box-shadow: none;
}
html.wk .bh-ask input::placeholder { color: rgba(90, 70, 50, 0.55); }
html.wk .bh-ask input:focus { outline: none; border-bottom-color: var(--bh-red); }
html.wk .bh-ask .bh-btn { flex: 0 0 auto; }
html.wk .bh-ask .bh-textbtn { margin-top: 0.15rem; font-size: 0.95rem; }
html.wk .bh-ask[data-mode="awake"] .bh-textbtn { display: none; }
@keyframes bh-unroll { from { opacity: 0; transform: translateX(-50%) translateY(14px) rotate(0.4deg); } to { opacity: 1; transform: translateX(-50%) rotate(0.4deg); } }
html.wk .bh-fly {
    position: absolute;
    z-index: 9;
    max-width: 22rem;
    padding: 0.25rem 0.8rem;
    font-family: var(--wk-fell);
    font-style: italic;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}
html.wk .bh-fly[hidden] { display: none; }

/* ---- 7. the speech scroll ------------------------------------------- */
html.wk .bh-scroll {
    position: absolute;
    z-index: 4;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}
html.wk .bh-scroll .bh-scroll-body { overflow-y: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: #8a6a33 transparent; }
/* a banderole that comes out of the head: a little pointer towards the mouth */
html.wk .bh-scroll.is-side .bh-scroll-body { transform-origin: left center; }
html.wk .bh-scroll.is-side::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 34px;
    width: 18px;
    height: 14px;
    background: var(--bh-paper);
    clip-path: polygon(100% 0, 0 55%, 100% 100%);
    opacity: 0.92;
}
html.wk .bh-scroll[hidden] { display: none; }
html.wk .bh-scroll-body {
    position: relative;
    padding: 0.85rem 2.6rem 0.75rem;
    text-align: center;
    box-shadow: var(--bh-shadow);
    clip-path: polygon(0 12%, 3% 0, 97% 0, 100% 12%, 98.6% 50%, 100% 88%, 97% 100%, 3% 100%, 0 88%, 1.4% 50%);
}
/* the rolled ends of a banderole */
html.wk .bh-scroll-body::before, html.wk .bh-scroll-body::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 1.5rem;
    background: linear-gradient(90deg, rgba(90, 60, 30, 0.42), rgba(255, 245, 220, 0.25) 45%, rgba(90, 60, 30, 0.38));
}
html.wk .bh-scroll-body::before { left: 0; }
html.wk .bh-scroll-body::after { right: 0; }
html.wk .bh-scroll.is-in .bh-scroll-body { animation: bh-scroll-open 0.7s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes bh-scroll-open { from { clip-path: polygon(48% 12%, 49% 0, 51% 0, 52% 12%, 51.6% 50%, 52% 88%, 51% 100%, 49% 100%, 48% 88%, 48.4% 50%); } }
html.wk .bh-said {
    margin: 0 0 0.15rem;
    font-family: var(--wk-fell);
    font-style: italic;
    font-size: 1.42rem;
    line-height: 1.3;
    white-space: pre-line;
    color: var(--bh-ink);
}
html.wk .bh-scroll-body cite {
    display: block;
    margin: 0 0 0.45rem;
    font-family: var(--wk-text);
    font-style: normal;
    font-variant: small-caps;
    font-size: 0.88rem;
    letter-spacing: 0.03em;
    color: var(--bh-soft);
}
html.wk .bh-gloss {
    margin: 0.4rem 0 0.4rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(29, 22, 17, 0.2);
    font-size: 0.98rem;
    line-height: 1.4;
    text-align: left;
    color: var(--bh-ink);
}
html.wk .bh-gloss cite { margin: 0.2rem 0 0; }
html.wk .bh-scroll-link { display: inline-block; margin: 0.15rem 0 0.35rem; color: var(--bh-red); font-style: italic; }
html.wk .bh-scroll-actions { position: sticky; bottom: -0.75rem; display: flex; justify-content: center; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0.55rem -2.6rem -0.75rem; padding: 0.45rem 2rem 0.6rem; background: linear-gradient(rgba(239, 228, 204, 0), var(--bh-paper) 30%); }
html.wk .bh-scroll-actions button {
    padding: 0.35rem 0.6rem;
    border: 0;
    border-bottom: 1px solid rgba(212, 176, 106, 0.5);
    background: rgba(13, 9, 7, 0.7);
    color: #e6cf98;
    font-family: var(--wk-fell-sc);
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    cursor: pointer;
}
html.wk .bh-scroll-actions button:hover { color: #fff1c8; border-bottom-color: var(--bh-brass); }
html.wk .bh-scroll-actions button:focus-visible { outline: 2px solid var(--bh-brass); outline-offset: 2px; }
html.wk .bh-scroll[data-kind="stage"] .bh-said { font-size: 2rem; letter-spacing: 0.02em; }
html.wk .bh-scroll[data-kind="stage"] .bh-scroll-body { padding-top: 0.6rem; padding-bottom: 0.55rem; }

/* ---- 8. captions ------------------------------------------------------ */
html.wk .bh-caption {
    position: absolute;
    z-index: 5;
    left: 18px;
    bottom: 22px;
    max-width: min(30rem, calc(50% - 30px));
    margin: 0;
    padding: 0.55rem 0.8rem 0.5rem;
    background: rgba(13, 9, 7, 0.78);
    border-left: 2px solid rgba(212, 176, 106, 0.6);
    color: var(--bh-bone);
    font-family: var(--wk-text);
    font-size: 1.02rem;
    line-height: 1.38;
    pointer-events: none;
}
html.wk .bh-caption[hidden] { display: none; }
html.wk .bh-caption.is-in { animation: bh-fade 0.5s ease-out both; }
html.wk .bh-caption b { display: block; margin-bottom: 0.1rem; font-family: var(--wk-fell-sc); font-weight: 400; font-size: 0.92rem; letter-spacing: 0.05em; color: #d9bd84; }
html.wk .bh-cap-text { font-style: italic; white-space: pre-line; }
html.wk .bh-caption cite { display: block; margin-top: 0.25rem; font-style: normal; font-variant: small-caps; font-size: 0.82rem; color: #b8a27a; }
@keyframes bh-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
html.wk .bh-stage[data-phase="ask"] .bh-caption,
html.wk .bh-stage[data-phase="awake"] .bh-caption { bottom: 150px; }

/* ---- 9. bell, bellows, hammer, drawer handle -------------------------- */
html.wk .bh-bell {
    position: absolute;
    z-index: 6;
    right: 22px;
    bottom: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 116px;
    padding: 12px 8px 9px;
    border: 1px solid var(--bh-brass-dim);
    border-radius: 58px 58px 10px 10px;
    background: radial-gradient(circle at 50% 30%, #3a2617, #170f09 72%);
    box-shadow: inset 0 0 0 1px rgba(212, 176, 106, 0.3), 0 6px 16px rgba(0, 0, 0, 0.6);
    color: #f1dca6;
    font-family: var(--wk-fell-sc);
    font-size: 1rem;
    letter-spacing: 0.04em;
    line-height: 1.05;
    text-align: center;
    cursor: pointer;
    touch-action: manipulation;
    animation: bh-fade 0.4s ease-out both;
}
html.wk .bh-bell[hidden] { display: none; }
html.wk .bh-bell svg { width: 46px; height: 46px; transform-origin: 50% 12%; }
html.wk .bh-bell:hover svg { animation: bh-swing 0.6s ease-in-out; }
html.wk .bh-bell:active { transform: scale(0.97); }
html.wk .bh-bell:focus-visible { outline: 2px solid var(--bh-brass); outline-offset: 3px; }
html.wk .bh-bell kbd { margin-top: 3px; padding: 1px 6px; border: 1px solid rgba(212, 176, 106, 0.45); border-radius: 2px; font-family: var(--wk-text); font-size: 0.72rem; color: #c9b285; background: none; box-shadow: none; }
html.wk .bh-stage[data-phase="speak"] .bh-bell { border-color: var(--bh-brass); box-shadow: inset 0 0 0 1px rgba(255, 220, 150, 0.55), 0 0 26px rgba(255, 170, 70, 0.35), 0 6px 16px rgba(0, 0, 0, 0.6); }
@keyframes bh-swing { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(14deg); } 60% { transform: rotate(-10deg); } }
html.wk .bh-bellows { position: absolute; z-index: 6; right: 22px; bottom: 22px; animation: bh-fade 0.4s ease-out both; }
html.wk .bh-bellows[hidden] { display: none; }
html.wk .bh-bellows span { font-family: var(--wk-text); font-style: italic; font-size: 0.92rem; color: #c9b285; }
html.wk .bh-hammer {
    position: absolute;
    z-index: 6;
    left: 18px;
    top: 58px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 8px;
    border: 1px solid rgba(212, 176, 106, 0.5);
    background: rgba(13, 9, 7, 0.82);
    color: #e6cf98;
    font-family: var(--wk-fell-sc);
    font-size: 0.95rem;
    cursor: pointer;
}
html.wk .bh-hammer[hidden] { display: none; }
html.wk .bh-hammer svg { width: 34px; height: 34px; }
html.wk .bh-hammer.is-in { animation: bh-fade 0.8s ease-out both; }
html.wk .bh-hammer:hover { color: #fff1c8; border-color: var(--bh-brass); }
html.wk .bh-tool-drawer[hidden] { display: none; }
html.wk .bh-tool-drawer.is-new { animation: bh-glint 1.6s ease-in-out 3; }
@keyframes bh-glint { 50% { box-shadow: 0 0 18px rgba(255, 190, 100, 0.65); border-color: #f3dc9c; color: #fff1c8; } }
html.wk .bh-stage.drawer-open .bh-tool-drawer { border-color: var(--bh-brass); background: rgba(212, 176, 106, 0.2); }

/* ---- 10. labels ------------------------------------------------------ */
html.wk .bh-label {
    position: absolute;
    z-index: 7;
    max-width: 17rem;
    padding: 0.4rem 0.7rem 0.45rem;
    font-size: 0.95rem;
    line-height: 1.3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
    pointer-events: none;
    transform: rotate(-0.5deg);
}
html.wk .bh-label[hidden] { display: none; }
html.wk .bh-label b { display: block; font-family: var(--wk-fell-sc); font-weight: 400; letter-spacing: 0.04em; color: var(--bh-red); }
html.wk .bh-label span { display: block; color: var(--bh-ink); }
html.wk .bh-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- 11. the singing drawer -------------------------------------------- */
html.wk .bh-drawer {
    position: absolute;
    z-index: 9;
    left: 50%;
    bottom: 0;
    width: min(46rem, 100%);
    max-height: 88%;
    overflow: auto;
    transform: translateX(-50%);
    padding: 0 0 0.6rem;
    border: 1px solid var(--bh-brass-dim);
    border-bottom: 0;
    background: url('/wunderkammer/img/wood.webp') center / 512px 128px repeat, #2a1a10;
    box-shadow: inset 0 0 0 3px #1a110a, 0 -10px 30px rgba(0, 0, 0, 0.7);
    color: var(--bh-bone);
    animation: bh-drawer 0.45s cubic-bezier(.2, .7, .2, 1) both;
}
html.wk .bh-drawer[hidden] { display: none; }
@keyframes bh-drawer { from { transform: translateX(-50%) translateY(100%); } to { transform: translateX(-50%) translateY(0); } }
html.wk .bh-dr-head { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 1rem 0.4rem; border-bottom: 1px solid rgba(212, 176, 106, 0.3); }
html.wk .bh-dr-title { margin: 0; font-family: var(--wk-fell-sc); font-size: 1.15rem; font-weight: 400; letter-spacing: 0.06em; color: #f1dca6; }
html.wk .bh-dr-close { padding: 4px 10px; border: 1px solid rgba(212, 176, 106, 0.5); background: rgba(0, 0, 0, 0.35); color: #e6cf98; font-family: var(--wk-fell-sc); cursor: pointer; }
html.wk .bh-dr-body { padding: 0.7rem 1rem 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.7rem; }
html.wk .bh-dr-words { display: block; }
html.wk .bh-dr-words span { display: block; margin-bottom: 0.2rem; font-family: var(--wk-fell-sc); font-size: 0.88rem; letter-spacing: 0.05em; color: #d9bd84; }
html.wk .bh-dr-words input {
    width: 100%;
    height: 42px;
    padding: 0.2rem 0.6rem 0;
    border: 1px solid rgba(29, 22, 17, 0.6);
    border-radius: 0;
    background: url('/wunderkammer/img/paper.webp'), var(--bh-paper);
    color: var(--bh-ink);
    font-family: var(--wk-fell);
    font-style: italic;
    font-size: 1.2rem;
}
html.wk .bh-dr-words input:focus { outline: 2px solid var(--bh-brass); outline-offset: 1px; }
html.wk .bh-dr-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
html.wk .bh-dr-presets button {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.5rem;
    align-items: baseline;
    padding: 0.45rem 0.6rem;
    border: 1px solid rgba(212, 176, 106, 0.4);
    background: rgba(0, 0, 0, 0.35);
    color: var(--bh-bone);
    text-align: left;
    cursor: pointer;
}
html.wk .bh-dr-presets b { grid-row: 1 / 3; font-family: var(--wk-fell); font-weight: 400; font-size: 1.4rem; color: #d9bd84; }
html.wk .bh-dr-presets span { font-family: var(--wk-fell-sc); font-size: 0.95rem; letter-spacing: 0.03em; }
html.wk .bh-dr-presets small { font-size: 0.8rem; font-style: italic; color: #b8a27a; }
html.wk .bh-dr-presets button[aria-checked="true"] { border-color: var(--bh-brass); background: rgba(212, 176, 106, 0.16); box-shadow: inset 0 0 0 1px rgba(212, 176, 106, 0.45); }
html.wk .bh-dr-opts { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
html.wk .bh-dr-toggle, html.wk .bh-dr-oct {
    min-height: 36px;
    padding: 0.3rem 0.7rem;
    border: 1px solid rgba(212, 176, 106, 0.4);
    background: rgba(0, 0, 0, 0.35);
    color: var(--bh-bone);
    font-family: var(--wk-fell-sc);
    font-size: 0.92rem;
    cursor: pointer;
}
html.wk .bh-dr-toggle[aria-pressed="true"] { border-color: var(--bh-brass); background: rgba(212, 176, 106, 0.2); color: #fff1c8; }
html.wk .bh-dr-toggle::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border: 1px solid currentColor; border-radius: 50%; vertical-align: 1px; }
html.wk .bh-dr-toggle[aria-pressed="true"]::before { background: var(--bh-brass); }
html.wk .bh-dr-octs { display: inline-flex; align-items: center; gap: 0.35rem; margin-left: auto; }
html.wk .bh-dr-oct { min-width: 36px; font-size: 1.1rem; }
html.wk .bh-dr-octlbl { min-width: 5.2em; text-align: center; font-family: var(--wk-fell-sc); font-size: 0.9rem; color: #d9bd84; }
html.wk .bh-dr-manuals { display: grid; gap: 0.35rem; justify-items: center; padding: 0.4rem 0 0.2rem; }
html.wk .bh-dr-manual { display: flex; align-items: center; gap: 0.6rem; }
html.wk .bh-dr-upper { transform: translateX(-12px); }
html.wk .bh-dr-mlabel { width: 2.2rem; text-align: right; font-family: var(--wk-fell); font-size: 1.1rem; color: #d9bd84; }
html.wk .bh-dr-keys {
    --kw: 44px;
    position: relative;
    display: flex;
    height: calc(var(--kw) * 2.6);
    padding: 6px 6px 8px;
    background: linear-gradient(#120b07, #0b0705);
    border: 1px solid rgba(212, 176, 106, 0.35);
    touch-action: none;
}
html.wk .bh-key { position: relative; margin: 0; padding: 0; border: 0; cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; }
html.wk .bh-key.is-white {
    width: var(--kw);
    height: 100%;
    margin-right: 2px;
    background:
        repeating-linear-gradient(0deg, rgba(29, 22, 17, 0.05) 0 1px, transparent 1px 3px),
        linear-gradient(#efe2c4, #dccaa0);
    box-shadow: inset 0 -6px 0 rgba(120, 90, 50, 0.35), inset 0 0 0 1px rgba(29, 22, 17, 0.55);
    border-radius: 0 0 4px 4px;
}
html.wk .bh-key.is-black {
    position: absolute;
    z-index: 2;
    top: 6px;
    left: calc(6px + var(--x) * (var(--kw) + 2px) - var(--kw) * 0.3);
    width: calc(var(--kw) * 0.6);
    height: 58%;
    background: linear-gradient(#2a1c12, #0d0805);
    box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(212, 176, 106, 0.3);
    border-radius: 0 0 3px 3px;
}
html.wk .bh-key span { position: absolute; left: 0; right: 0; bottom: 7px; text-align: center; font-family: var(--wk-text); font-size: 0.72rem; color: rgba(29, 22, 17, 0.55); pointer-events: none; }
html.wk .bh-key.is-black span { color: rgba(232, 220, 194, 0.55); bottom: 5px; }
html.wk .bh-key.is-white.is-down { background: linear-gradient(#f3d79b, #d4b06a); box-shadow: inset 0 -2px 0 rgba(120, 90, 50, 0.35), inset 0 0 0 1px rgba(29, 22, 17, 0.55), 0 0 14px rgba(255, 180, 90, 0.45); }
html.wk .bh-key.is-black.is-down { background: linear-gradient(#8a5a28, #3a2210); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.6), 0 0 12px rgba(255, 180, 90, 0.4); }
html.wk .bh-dr-foot { display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; align-items: center; justify-content: center; }
html.wk .bh-dr-rec, html.wk .bh-dr-save {
    min-height: 40px;
    padding: 0.35rem 1rem;
    border: 1px solid var(--bh-brass-dim);
    background: linear-gradient(#3a2416, #1c120b);
    color: #f1dca6;
    font-family: var(--wk-fell-sc);
    font-size: 0.98rem;
    letter-spacing: 0.04em;
    cursor: pointer;
}
html.wk .bh-dr-rec::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: #7a2420; vertical-align: 0; }
html.wk .bh-dr-rec[aria-pressed="true"] { border-color: var(--bh-red); color: #fff1c8; }
html.wk .bh-dr-rec[aria-pressed="true"]::before { background: #e0402f; box-shadow: 0 0 8px #e0402f; animation: bh-blink 1s steps(2) infinite; }
@keyframes bh-blink { 50% { opacity: 0.3; } }
html.wk .bh-dr-save[disabled] { opacity: 0.6; cursor: wait; }
html.wk .bh-dr-dry { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.95rem; color: #d9cbb0; cursor: pointer; }
html.wk .bh-dr-dry input { width: 16px; height: 16px; accent-color: var(--bh-brass); }
html.wk .bh-dr-info { margin: 0.1rem 0 0.2rem; font-size: 0.9rem; font-style: italic; line-height: 1.35; text-align: center; color: #c9b893; }
html.wk .bh-dr-body button:focus-visible { outline: 2px solid var(--bh-brass); outline-offset: 2px; }

/* ---- 12. phases ------------------------------------------------------- */
html.wk .bh-stage[data-phase="loading"] .bh-status,
html.wk .bh-stage[data-phase="dark"] .bh-status { opacity: 0.75; }
html.wk .bh-nogl, html.wk .bh-lost { display: none; }

/* ---- 13. full screen ---------------------------------------------------- */
html.wk .bh-stage:fullscreen, html.wk .bh-stage.bh-fs-fallback {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    min-height: 0;
    aspect-ratio: auto;
    border: 0;
}
html.wk .bh-stage:-webkit-full-screen { width: 100vw; height: 100vh; max-height: none; aspect-ratio: auto; border: 0; }
html.wk .bh-stage.bh-fs-fallback { position: fixed; inset: 0; z-index: 10005; }
html.wk .bh-stage::backdrop { background: #000; }

/* ---- 14. no WebGL, or the plate cracked --------------------------------- */
html.wk .bh-stage[data-phase="nogl"] .bh-poster { opacity: 1; filter: none; }
html.wk .bh-stage[data-phase="nogl"] .bh-canvas,
html.wk .bh-stage[data-phase="nogl"] .bh-note,
html.wk .bh-stage[data-phase="nogl"] .bh-tools { display: none; }
html.wk .bh-stage[data-phase="nogl"] .bh-nogl,
html.wk .bh-stage[data-phase="lost"] .bh-lost {
    display: block;
    position: absolute;
    z-index: 8;
    left: 50%;
    bottom: 22px;
    width: min(32rem, calc(100% - 32px));
    transform: translateX(-50%);
    padding: 0.8rem 1.1rem;
    background: rgba(13, 9, 7, 0.86);
    border: 1px solid rgba(212, 176, 106, 0.5);
    color: var(--bh-bone);
    font-size: 1rem;
    line-height: 1.45;
}
html.wk .bh-nogl p, html.wk .bh-lost p { margin: 0; }
html.wk .bh-lost a { color: #f1dca6; }

/* ---- 15. the page copy ---------------------------------------------------- */
html.wk .bh-lead { font-size: 1.12em; }
html.wk .bh-copy h3 { margin-top: 1.4em; }
html.wk .bh-copy h3 small, html.wk .bh-copy h2 small { color: var(--wk-ink-soft); font-weight: 400; }
html.wk .bh-sources li { margin-bottom: 0.55em; }
html.wk .bh-copy q { quotes: '\201C' '\201D' '\2018' '\2019'; font-style: italic; }

/* ---- 16. responsive --------------------------------------------------------- */
@media (max-width: 1060px) {
    html.wk .bh-ask { width: min(36rem, calc(100% - 180px)); }
}
@media (max-width: 768px) {
    html.wk .bh-niche { padding: 6px; }
    html.wk .bh-stage {
        aspect-ratio: auto;
        height: calc(100svh - 76px);
        max-height: none;
        min-height: 520px;
    }
    html.wk .bh-hud { padding: 8px 8px 0; }
    html.wk .bh-status { font-size: 0.86rem; max-width: 46%; }
    html.wk .bh-tool span { display: none; }
    html.wk .bh-tool { padding: 6px 8px; }
    html.wk .bh-note { padding: 1.2rem 1.2rem 1rem; }
    html.wk .bh-note-hand { font-size: 1.16rem; }
    html.wk .bh-note-how { font-size: 0.95rem; }
    html.wk .bh-ask { width: calc(100% - 20px); bottom: 10px; padding: 0.6rem 0.8rem 0.35rem; }
    html.wk .bh-ask-row { flex-wrap: wrap; }
    html.wk .bh-ask input { flex-basis: 100%; font-size: 1.2rem; }
    html.wk .bh-ask .bh-btn { width: 100%; }
    html.wk .bh-scroll-body { padding: 0.7rem 1.6rem 0.6rem; }
    html.wk .bh-said { font-size: 1.22rem; }
    html.wk .bh-scroll[data-kind="stage"] .bh-said { font-size: 1.7rem; }
    html.wk .bh-caption { left: 10px; right: 10px; bottom: 112px; max-width: none; font-size: 0.96rem; }
    html.wk .bh-stage[data-phase="ask"] .bh-caption,
    html.wk .bh-stage[data-phase="awake"] .bh-caption { bottom: 190px; }
    html.wk .bh-bell { left: 0; right: 0; margin: 0 auto; bottom: 14px; width: 132px; }
    html.wk .bh-bell kbd { display: none; }
    html.wk .bh-bellows { left: 0; right: 0; margin: 0 auto; width: max-content; bottom: 16px; white-space: nowrap; }
    html.wk .bh-hammer { top: 50px; left: 8px; }
    html.wk .bh-hammer span { display: none; }
    /* a compact drawer, so the head stays in sight above it */
    html.wk .bh-drawer { max-height: 66%; }
    html.wk .bh-dr-head { padding: 0.4rem 0.7rem 0.3rem; }
    html.wk .bh-dr-title { font-size: 1rem; }
    html.wk .bh-dr-body { padding: 0.5rem 0.7rem 0; gap: 0.45rem; }
    html.wk .bh-dr-words span { display: none; }
    html.wk .bh-dr-words input { height: 38px; font-size: 1.08rem; }
    html.wk .bh-dr-presets { gap: 0.3rem; }
    html.wk .bh-dr-presets button { display: flex; flex-direction: column; align-items: center; padding: 0.3rem 0.2rem; text-align: center; }
    html.wk .bh-dr-presets b { font-size: 1.05rem; line-height: 1; }
    html.wk .bh-dr-presets span { font-size: 0.74rem; line-height: 1.15; }
    html.wk .bh-dr-presets small { display: none; }
    html.wk .bh-dr-opts { flex-wrap: nowrap; gap: 0.3rem; }
    html.wk .bh-dr-toggle, html.wk .bh-dr-oct { min-height: 34px; padding: 0.2rem 0.45rem; font-size: 0.78rem; }
    html.wk .bh-dr-toggle::before { margin-right: 4px; }
    html.wk .bh-dr-octs { margin-left: auto; gap: 0.15rem; }
    html.wk .bh-dr-oct { min-width: 30px; }
    html.wk .bh-dr-octlbl { min-width: 3.6em; font-size: 0.74rem; }
    html.wk .bh-dr-manuals { gap: 0.2rem; padding: 0.15rem 0 0; }
    html.wk .bh-dr-keys { --kw: calc((100vw - 140px) / 8); height: calc(var(--kw) * 1.9); padding: 4px 4px 5px; }
    html.wk .bh-key.is-black { top: 4px; left: calc(4px + var(--x) * (var(--kw) + 2px) - var(--kw) * 0.3); }
    html.wk .bh-key span { font-size: 0.62rem; bottom: 4px; }
    html.wk .bh-dr-upper { transform: none; }
    html.wk .bh-dr-mlabel { width: 1.4rem; font-size: 0.85rem; }
    html.wk .bh-dr-foot { gap: 0.4rem 0.6rem; flex-wrap: nowrap; }
    html.wk .bh-dr-rec, html.wk .bh-dr-save { min-height: 36px; padding: 0.25rem 0.6rem; font-size: 0.82rem; }
    html.wk .bh-dr-dry { font-size: 0.8rem; }
    html.wk .bh-dr-info { font-size: 0.8rem; }
}
@media (max-width: 768px) and (orientation: landscape) {
    html.wk .bh-stage { height: calc(100svh - 64px); min-height: 300px; }
}

/* ---- 17. reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    html.wk .bh-ask, html.wk .bh-bell, html.wk .bh-bellows, html.wk .bh-hammer.is-in,
    html.wk .bh-caption.is-in, html.wk .bh-scroll.is-in .bh-scroll-body, html.wk .bh-drawer { animation: none; }
    html.wk .bh-bell:hover svg { animation: none; }
    html.wk .bh-poster, html.wk .bh-canvas { transition: none; }
}
