/* =============================================================
   The Alicorn Wireless - the stage and everything on it (October 7, 2026)
   Scoped to html.wk .al-*; the room itself is wunderkammer.css.
   Sections: 0 tokens, 1 the niche and the stage, 2 the plates,
   3 controls laid over the drawing (knobs, counter, hot spots),
   4 head-up: status and tools, 5 buttons and paper, 6 the note,
   7 the slip, 8 captions and hints, 9 the logbook, 10 the cylinders,
   11 phases, 12 full screen, 13 no script, 14 the page copy,
   15 responsive, 16 reduced motion
   ============================================================= */

/* ---- 0. tokens ------------------------------------------------------ */
html.wk .al-niche {
    --al-paper: #efe4cc;
    --al-paper-hi: #f6eedb;
    --al-ink: #1d1611;
    --al-soft: #5a4632;
    --al-red: #a62b2b;
    --al-brass: #d4b06a;
    --al-brass-dim: #8a6a33;
    --al-bone: #e8dcc2;
    --al-night: #0b0806;
    --al-amber: #ffb35c;
    --al-eye: #6dffb0;
    --al-violet: #b9a6ff;
    --al-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 .al-niche { max-width: 1120px; padding: 14px; }
html.wk .al-niche .wk-label { z-index: 6; top: -44px; right: auto; left: 22px; max-width: 38em; transform: rotate(-0.8deg); }
html.wk .al-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: calc(100svh - 110px);
    min-height: 460px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    isolation: isolate;
    background: var(--al-night);
    border: 1px solid #000;
    box-shadow: inset 0 0 0 1px rgba(212, 176, 106, 0.18);
    color: var(--al-bone);
    font-family: var(--wk-text);
    -webkit-tap-highlight-color: transparent;
    outline: none;
    clip-path: none;
    user-select: none;
    -webkit-user-select: none;
}
html.wk .al-stage *, html.wk .al-stage *::before, html.wk .al-stage *::after { box-sizing: border-box; }

/* ---- 2. the plates --------------------------------------------------- */
html.wk .al-poster, html.wk .al-plate, html.wk .al-fx {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}
html.wk .al-poster { object-fit: cover; filter: brightness(0.35) saturate(0.7); transition: opacity 1.2s ease; z-index: 0; }
html.wk .al-plate { z-index: 1; opacity: 0; transition: opacity 1.2s ease; }
html.wk .al-stage.is-ready .al-plate { opacity: 1; }
html.wk .al-stage.is-ready .al-poster { opacity: 0; }
/* the dial lamp warms up with the valves */
html.wk .al-stage.is-ready .al-plate-on { z-index: 2; opacity: 0; transition: opacity 2.6s cubic-bezier(.5, 0, .3, 1); }
html.wk .al-stage.is-ready[data-power="on"] .al-plate-on { opacity: 1; }
html.wk .al-stage.is-ready[data-power="on"][data-band="gram"] .al-plate-on { opacity: 0.25; transition-duration: 1.2s; }
html.wk .al-fx { z-index: 3; pointer-events: none; }

/* ---- 3. controls laid over the drawing -------------------------------- */
html.wk .al-ctl { position: absolute; z-index: 4; margin: 0; padding: 0; }
html.wk .al-ctl[hidden] { display: none; }
html.wk .al-knob {
    border: 0;
    border-radius: 50%;
    background: none;
    cursor: grab;
    touch-action: none;
    outline: none;
}
html.wk .al-knob:active { cursor: grabbing; }
html.wk .al-knob canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: rotate(var(--rot, 0deg));
    pointer-events: none;
}
/* a fixed light over the turning Bakelite: the sheen stays where the candle is */
html.wk .al-knob-light {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    background:
        radial-gradient(circle at 34% 28%, rgba(255, 236, 200, 0.34), rgba(255, 236, 200, 0) 38%),
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0.42) 72%, rgba(0, 0, 0, 0) 73%);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.65), 0 1px 0 rgba(255, 220, 160, 0.12) inset;
}
html.wk .al-knob:focus-visible .al-knob-light { box-shadow: 0 0 0 2px var(--al-night), 0 0 0 4px var(--al-brass), 0 6px 14px rgba(0, 0, 0, 0.65); }
html.wk .al-power { cursor: pointer; }
html.wk .al-power::after {
    /* the pilot lamp beside the switch */
    content: '';
    position: absolute;
    left: 50%;
    top: -22%;
    width: 18%;
    height: 18%;
    margin-left: -9%;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #5a2a14, #1e0d06 70%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7);
    transition: background 0.6s, box-shadow 0.6s;
}
html.wk .al-stage[data-power="on"] .al-power::after { background: radial-gradient(circle at 40% 35%, #ffe2a4, #ff8a2a 55%, #8a2a08 90%); box-shadow: 0 0 10px rgba(255, 150, 60, 0.85), 0 0 0 1px rgba(0, 0, 0, 0.7); }

/* the drum counter: brass wheels with figures, rolling */
html.wk .al-counter {
    display: flex;
    align-items: stretch;
    gap: 2px;
    padding: 3px 5px;
    border-radius: 3px;
    background: linear-gradient(#0d0906, #1a120b 45%, #0d0906);
    box-shadow: inset 0 0 0 1px rgba(212, 176, 106, 0.55), inset 0 2px 5px rgba(0, 0, 0, 0.9), 0 2px 6px rgba(0, 0, 0, 0.6);
    font-family: var(--wk-fell);
    color: #2a1a0e;
    pointer-events: none;
}
html.wk .al-drum {
    position: relative;
    width: var(--dw, 0.62em);
    height: var(--dh, 1.25em);
    overflow: hidden;
    border-radius: 2px;
    background: linear-gradient(#8a7046, #e8d6a8 30%, #f6ead0 50%, #e8d6a8 70%, #7d6340);
    box-shadow: inset 0 0 0 1px rgba(40, 25, 10, 0.5);
}
html.wk .al-drum i {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    display: block;
    font-style: normal;
    text-align: center;
    line-height: var(--dh, 1.25em);
    transform: translateY(calc(var(--d, 0) * -1 * var(--dh, 1.25em)));
    transition: transform 0.12s linear;
    will-change: transform;
}
html.wk .al-drum i span { display: block; height: var(--dh, 1.25em); }
html.wk .al-drum.is-dot { width: 0.3em; background: none; box-shadow: none; color: #e8d6a8; text-align: center; line-height: var(--dh, 1.25em); }
html.wk .al-counter.is-gram { justify-content: center; align-items: center; font-family: var(--wk-fell-sc); letter-spacing: 0.2em; color: #e2c98f; }
html.wk .al-unit {
    align-self: center;
    margin-left: 0.25em;
    font-family: var(--wk-fell-sc);
    font-size: 0.78em;
    letter-spacing: 0.04em;
    color: #e2c98f;
    white-space: nowrap;
}

/* hot spots on objects: the logbook, the key, the phonograph, the cabinet */
html.wk .al-hot {
    border: 0;
    background: none;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: box-shadow 0.25s;
}
html.wk .al-hot:hover, html.wk .al-hot:focus-visible { box-shadow: 0 0 0 1px rgba(212, 176, 106, 0.55), 0 0 18px rgba(255, 190, 110, 0.18); }
html.wk .al-hot:focus-visible { box-shadow: 0 0 0 2px var(--al-brass); }
html.wk .al-hot-key { touch-action: none; }
html.wk .al-hot-key.is-down { box-shadow: 0 0 0 1px rgba(212, 176, 106, 0.6), 0 0 22px rgba(255, 170, 80, 0.35); }
html.wk .al-hot-cab { cursor: default; }
html.wk .al-hot-cab:hover { box-shadow: none; }

/* ---- 4. head-up: status and tools ----------------------------------- */
html.wk .al-hud {
    position: absolute;
    z-index: 6;
    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 .al-status {
    margin: 0;
    padding: 4px 2px;
    max-width: 55%;
    font-family: var(--wk-fell-sc);
    font-size: 0.98rem;
    letter-spacing: 0.06em;
    line-height: 1.25;
    color: #d9bd84;
    text-shadow: 0 1px 2px #000, 0 0 10px #000;
}
html.wk .al-status small { display: block; font-family: var(--wk-text); font-style: italic; letter-spacing: 0.01em; font-size: 0.88rem; color: #bfa77a; }
html.wk .al-tools { display: flex; gap: 8px; pointer-events: auto; }
html.wk .al-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 .al-tool svg { width: 20px; height: 20px; flex: 0 0 auto; }
html.wk .al-tool b { font-weight: 400; color: #f3dc9c; }
html.wk .al-tool:hover { background: rgba(42, 26, 16, 0.92); color: #f3dc9c; border-color: var(--al-brass); }
html.wk .al-tool:focus-visible { outline: 2px solid var(--al-brass); outline-offset: 2px; }
html.wk .al-tool.is-new { animation: al-glint 1.6s ease-in-out 2; }
@keyframes al-glint { 50% { box-shadow: 0 0 18px rgba(255, 190, 100, 0.65); border-color: #f3dc9c; color: #fff1c8; } }
html.wk #al-sound .al-mute { display: none; }
html.wk #al-sound[aria-pressed="false"] .al-mute { display: inline; }
html.wk #al-sound[aria-pressed="false"] .al-wave { display: none; }

/* ---- 5. buttons and paper -------------------------------------------- */
html.wk .al-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(--al-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 .al-btn:hover { background: linear-gradient(#3a2416, #22160d); color: #fff1c8; }
html.wk .al-btn:active { transform: translateY(1px); }
html.wk .al-btn:focus-visible { outline: 2px solid var(--al-brass); outline-offset: 3px; }
html.wk .al-btn[disabled] { opacity: 0.55; cursor: wait; }
html.wk .al-btn.is-small { min-height: 36px; padding: 0.3em 0.75em 0.25em; font-size: 0.92rem; }
html.wk .al-textbtn {
    padding: 0.3em 0.2em;
    border: 0;
    background: none;
    color: var(--al-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 .al-textbtn:hover { color: var(--al-red); }
html.wk .al-textbtn:focus-visible { outline: 2px solid var(--al-red); outline-offset: 2px; }
html.wk .al-note, html.wk .al-slip-body, html.wk .al-book-page {
    color: var(--al-ink);
    background: url('/wunderkammer/img/paper.webp'), var(--al-paper);
}

/* ---- 6. the note ----------------------------------------------------- */
html.wk .al-note {
    position: absolute;
    z-index: 9;
    left: 50%;
    top: 50%;
    width: min(31rem, calc(100% - 32px));
    max-height: calc(100% - 32px);
    overflow: auto;
    transform: translate(-50%, -50%) rotate(-0.6deg);
    padding: 1.5rem 1.8rem 1.1rem;
    text-align: center;
    box-shadow: var(--al-shadow);
    clip-path: var(--wk-torn);
}
html.wk .al-note[hidden] { display: none; }
html.wk .al-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(--al-red); }
html.wk .al-note-hand { margin: 0 0 0.9rem; font-family: var(--wk-fell); font-style: italic; font-size: 1.3rem; line-height: 1.38; text-align: left; color: var(--al-ink); }
html.wk .al-note-how { margin: 0 0 1.1rem; font-size: 1.02rem; line-height: 1.45; text-align: left; color: var(--al-soft); }
html.wk .al-note-small { margin: 0.7rem 0 0.2rem; font-size: 0.92rem; font-style: italic; color: var(--al-soft); }
html.wk .al-loading { margin: 0.8rem auto 0; max-width: 18rem; font-size: 0.9rem; font-style: italic; color: var(--al-soft); }
html.wk .al-loading i { display: block; height: 2px; margin-top: 0.35rem; background: rgba(29, 22, 17, 0.15); overflow: hidden; }
html.wk .al-loading b { display: block; height: 100%; background: var(--al-red); transform-origin: left center; transform: scaleX(0.02); transition: transform 0.25s linear; }
html.wk .al-stage.is-ready .al-loading { display: none; }
html.wk .al-note-close { display: none; margin-top: 0.4rem; }
html.wk .al-stage[data-power="on"] .al-note-close { display: inline-block; }
html.wk .al-stage[data-power="on"] .al-on, html.wk .al-stage[data-power="on"] .al-note-small { display: none; }

/* ---- 7. the slip ----------------------------------------------------- */
html.wk .al-slip {
    position: absolute;
    z-index: 7;
    right: 16px;
    top: 58px;
    width: min(22.5rem, 40%);
    max-height: calc(78% - 70px);
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}
html.wk .al-slip[hidden] { display: none; }
html.wk .al-slip-body {
    position: relative;
    overflow-y: auto;
    min-height: 0;
    padding: 1rem 1.15rem 0.7rem;
    box-shadow: var(--al-shadow);
    clip-path: var(--wk-torn);
    scrollbar-width: thin;
    scrollbar-color: #8d7247 #e2cf9f;
}
html.wk .al-slip.is-in .al-slip-body { animation: al-slide 0.55s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes al-slide { from { opacity: 0; transform: translateY(-14px) rotate(-1.2deg); } to { opacity: 1; transform: none; } }
html.wk .al-slip-freq { margin: 0; font-family: var(--wk-fell-sc); font-size: 0.86rem; letter-spacing: 0.06em; color: var(--al-soft); }
html.wk .al-slip h2 { margin: 0.1rem 0 0.15rem; font-family: var(--wk-fell); font-weight: 400; font-size: 1.45rem; line-height: 1.15; color: var(--al-red); }
html.wk .al-slip-when { margin: 0 0 0.55rem; font-style: italic; font-size: 0.95rem; color: var(--al-soft); }
html.wk .al-slip p.al-slip-text { margin: 0 0 0.55rem; font-size: 1rem; line-height: 1.45; color: var(--al-ink); }
html.wk .al-slip blockquote { margin: 0.2rem 0 0.6rem; padding: 0 0 0 0.75rem; border-left: 2px solid rgba(166, 43, 43, 0.55); font-family: var(--wk-fell); font-style: italic; font-size: 1.08rem; line-height: 1.38; color: var(--al-ink); }
html.wk .al-slip cite { display: block; margin: 0.15rem 0 0.4rem; font-style: normal; font-variant: small-caps; font-size: 0.88rem; letter-spacing: 0.02em; color: var(--al-soft); }
html.wk .al-slip cite a, html.wk .al-slip p a { color: var(--al-red); text-decoration: underline; text-underline-offset: 3px; }
html.wk .al-slip p a:hover { color: var(--al-ink); }
html.wk .al-slip-ours { margin: 0 0 0.5rem; font-size: 0.9rem; font-style: italic; color: var(--al-soft); }
html.wk .al-slip-choices { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.3rem 0 0.6rem; }
html.wk .al-slip-actions {
    position: sticky;
    bottom: -0.7rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.6rem;
    margin: 0.55rem -1.15rem -0.7rem;
    padding: 0.5rem 1.15rem 0.65rem;
    background: linear-gradient(rgba(239, 228, 204, 0), var(--al-paper) 28%);
}
html.wk .al-slip-actions button, html.wk .al-slip-choices button, html.wk .al-book button.al-chip {
    min-height: 34px;
    padding: 0.32rem 0.65rem;
    border: 0;
    border-bottom: 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.9rem;
    letter-spacing: 0.04em;
    cursor: pointer;
}
html.wk .al-slip-actions button:hover, html.wk .al-slip-choices button:hover, html.wk .al-book button.al-chip:hover { color: #fff1c8; border-bottom-color: var(--al-brass); }
html.wk .al-slip-actions button:focus-visible, html.wk .al-slip-choices button:focus-visible, html.wk .al-book button.al-chip:focus-visible { outline: 2px solid var(--al-red); outline-offset: 2px; }
html.wk .al-slip-actions button[aria-pressed="true"] { color: #fff1c8; box-shadow: inset 0 -2px 0 #e0402f; }
html.wk .al-slip-actions .al-x { margin-left: auto; background: none; color: var(--al-soft); border-bottom: 1px solid rgba(90, 70, 50, 0.35); font-family: var(--wk-text); font-style: italic; font-size: 0.95rem; letter-spacing: 0; }
html.wk .al-slip-actions .al-x:hover { color: var(--al-red); }
html.wk .al-slip-more { display: none; }
html.wk .al-slip.is-compact .al-slip-more { display: inline-block; }
html.wk .al-slip input[type="text"] {
    width: 100%;
    height: 40px;
    margin: 0.2rem 0 0.4rem;
    padding: 0.2rem 0.1rem 0;
    border: 0;
    border-bottom: 1px solid rgba(29, 22, 17, 0.55);
    border-radius: 0;
    background: transparent;
    color: var(--al-ink);
    font-family: var(--wk-fell);
    font-style: italic;
    font-size: 1.15rem;
    user-select: text;
    -webkit-user-select: text;
}
html.wk .al-slip input[type="text"]:focus { outline: none; border-bottom-color: var(--al-red); }
html.wk .al-slip .al-player { margin: 0.4rem 0 0.6rem; }
html.wk .al-slip .al-player iframe { display: block; width: 100%; height: 120px; border: 0; background: #01030c; }
html.wk .al-slip .al-ticker { margin: 0.2rem 0 0.6rem; padding: 0.4rem 0.5rem; max-height: 9rem; overflow: auto; background: rgba(29, 22, 17, 0.07); font-size: 0.9rem; line-height: 1.35; color: var(--al-ink); }
html.wk .al-slip .al-ticker span { display: inline-block; margin: 0 0.35rem 0.15rem 0; padding: 0 0.2rem; border-bottom: 1px dotted rgba(90, 70, 50, 0.5); }

/* ---- 8. captions and hints ---------------------------------------------- */
html.wk .al-caption {
    position: absolute;
    z-index: 6;
    left: 18px;
    bottom: 18px;
    max-width: min(30rem, calc(50% - 30px));
    margin: 0;
    padding: 0.55rem 0.8rem 0.5rem;
    background: rgba(13, 9, 7, 0.8);
    border-left: 2px solid rgba(212, 176, 106, 0.6);
    color: var(--al-bone);
    font-family: var(--wk-text);
    font-size: 1.02rem;
    line-height: 1.38;
    pointer-events: none;
}
html.wk .al-caption[hidden] { display: none; }
html.wk .al-caption.is-in { animation: al-fade 0.45s ease-out both; }
html.wk .al-caption b { display: block; margin-bottom: 0.1rem; font-family: var(--wk-fell-sc); font-weight: 400; font-size: 0.9rem; letter-spacing: 0.05em; color: #d9bd84; }
html.wk .al-caption span { font-style: italic; white-space: pre-line; }
@keyframes al-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
html.wk .al-hint {
    position: absolute;
    z-index: 6;
    left: 0;
    right: 0;
    top: 58px;
    width: max-content;
    max-width: min(28rem, calc(100% - 24px));
    margin: 0 auto;
    padding: 0.35rem 0.85rem 0.4rem;
    background: rgba(13, 9, 7, 0.82);
    border: 1px solid rgba(212, 176, 106, 0.45);
    color: #e6d3a6;
    font-family: var(--wk-text);
    font-style: italic;
    font-size: 0.98rem;
    line-height: 1.35;
    text-align: center;
    pointer-events: none;
    animation: al-fadein 0.5s ease-out both;
}
@keyframes al-fadein { from { opacity: 0; } to { opacity: 1; } }
html.wk .al-hint[hidden] { display: none; }
html.wk .al-stage.has-slip .al-hint { right: calc(min(22.5rem, 40%) + 32px); max-width: min(24rem, calc(100% - min(22.5rem, 40%) - 56px)); }
html.wk .al-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- 9. the logbook ------------------------------------------------------ */
html.wk .al-book {
    position: absolute;
    z-index: 10;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 16px 16px;
    background: rgba(6, 4, 3, 0.62);
}
html.wk .al-book[hidden] { display: none; }
html.wk .al-book-page {
    position: relative;
    width: min(46rem, 100%);
    max-height: 100%;
    overflow-y: auto;
    padding: 1.1rem 1.4rem 1rem;
    box-shadow: var(--al-shadow);
    clip-path: var(--wk-torn);
    scrollbar-width: thin;
    scrollbar-color: #8d7247 #e2cf9f;
    animation: al-fade 0.35s ease-out both;
}
html.wk .al-book-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.4rem; }
html.wk .al-book h2 { margin: 0; font-family: var(--wk-fell-sc); font-weight: 400; font-size: 1.25rem; letter-spacing: 0.06em; color: var(--al-red); }
html.wk .al-book-sum { margin: 0 0 0.7rem; font-style: italic; color: var(--al-soft); }
html.wk .al-book ol { list-style: none; margin: 0; padding: 0; columns: 2 18rem; column-gap: 1.6rem; }
html.wk .al-book li { break-inside: avoid; margin: 0 0 0.55rem; padding: 0 0 0.45rem; border-bottom: 1px solid rgba(29, 22, 17, 0.14); font-size: 0.98rem; line-height: 1.35; }
html.wk .al-book li b { display: block; font-family: var(--wk-fell); font-weight: 400; font-size: 1.08rem; color: var(--al-ink); }
html.wk .al-book li.is-new b { color: var(--al-soft); font-style: italic; }
html.wk .al-book li small { display: block; color: var(--al-soft); font-style: italic; }
html.wk .al-book li .al-heard { color: #4f6a3c; font-style: normal; font-variant: small-caps; letter-spacing: 0.02em; }
html.wk .al-book li button.al-chip { margin-top: 0.25rem; min-height: 30px; padding: 0.2rem 0.55rem; font-size: 0.82rem; }
html.wk .al-book-close { position: sticky; top: 0; float: right; }
html.wk .al-pad { margin: 0.8rem 0 0.4rem; padding: 0.6rem 0.8rem; background: rgba(29, 22, 17, 0.06); font-family: var(--wk-fell); }
html.wk .al-pad h3 { margin: 0 0 0.3rem; font-family: var(--wk-fell-sc); font-weight: 400; font-size: 1rem; letter-spacing: 0.05em; color: var(--al-red); }
html.wk .al-pad p { margin: 0 0 0.4rem; font-family: var(--wk-text); font-size: 0.95rem; line-height: 1.4; }
html.wk .al-pad code { font-family: var(--wk-fell); font-size: 1.05rem; letter-spacing: 0.08em; word-spacing: 0.35em; white-space: normal; background: none; color: var(--al-ink); }
html.wk .al-wowkeep { margin: 0.6rem 0; padding: 0.5rem 0.7rem; background: #f9f6ee; border: 1px solid rgba(29, 22, 17, 0.2); font-family: 'Courier New', monospace; font-size: 0.9rem; color: #222; }
html.wk .al-wowkeep b { color: #b0261d; font-family: var(--wk-fell); font-size: 1.2rem; }

/* ---- 10. the cylinders ------------------------------------------------------ */
html.wk .al-gram {
    position: absolute;
    z-index: 7;
    left: 12px;
    right: 12px;
    bottom: 14px;
    margin: 0 auto;
    max-width: 44rem;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0.55rem;
    background: rgba(13, 9, 7, 0.86);
    border: 1px solid rgba(212, 176, 106, 0.45);
    box-shadow: var(--al-shadow);
    animation: al-fadein 0.4s ease-out both;
}
html.wk .al-gram[hidden] { display: none; }
html.wk .al-gram button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-height: 92px;
    padding: 0.45rem 0.3rem 0.4rem;
    border: 1px solid rgba(212, 176, 106, 0.35);
    background: linear-gradient(#2b1c12, #160e09);
    color: var(--al-bone);
    font-family: var(--wk-text);
    font-size: 0.85rem;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
}
html.wk .al-gram button::before {
    /* the cylinder box: a drum of brown wax */
    content: '';
    width: 30px;
    height: 34px;
    border-radius: 3px;
    background: linear-gradient(90deg, #3b2412, #8d5a2a 30%, #c08848 45%, #8d5a2a 62%, #3b2412);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.6);
}
html.wk .al-gram button b { font-family: var(--wk-fell-sc); font-weight: 400; font-size: 0.92rem; letter-spacing: 0.03em; color: #f1dca6; }
html.wk .al-gram button[aria-pressed="true"] { border-color: var(--al-brass); background: linear-gradient(#3a2416, #22160d); box-shadow: inset 0 0 0 1px rgba(212, 176, 106, 0.45), 0 0 16px rgba(255, 180, 90, 0.2); }
html.wk .al-gram button:focus-visible { outline: 2px solid var(--al-brass); outline-offset: 2px; }

/* ---- 11. phases ---------------------------------------------------------------- */
html.wk .al-stage[data-phase="loading"] .al-status { opacity: 0.75; }
html.wk .al-nojs { display: none; }

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

/* ---- 13. no script ------------------------------------------------------------ */
html.wk .al-stage[data-phase="noaudio"] .al-nojs,
html.wk .al-stage[data-phase="loading"].no-module .al-nojs {
    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(--al-bone);
    font-size: 1rem;
    line-height: 1.45;
}
html.wk .al-nojs p { margin: 0; }

/* ---- 14. the page copy ------------------------------------------------------------ */
html.wk .al-lead { font-size: 1.12em; }
html.wk .al-copy h3 { margin-top: 1.4em; }
html.wk .al-copy q { quotes: '\201C' '\201D' '\2018' '\2019'; font-style: italic; }
html.wk .al-sources li { margin-bottom: 0.5em; }

/* ---- 15. responsive ---------------------------------------------------------------- */
@media (max-width: 900px) {
    html.wk .al-slip { width: min(21rem, 46%); }
}
@media (max-width: 768px) {
    html.wk .al-niche { padding: 6px; }
    html.wk .al-stage {
        aspect-ratio: auto;
        height: calc(100svh - 76px);
        max-height: none;
        min-height: 560px;
    }
    html.wk .al-hud { padding: 8px 8px 0; }
    html.wk .al-status { font-size: 0.86rem; max-width: 50%; }
    html.wk .al-status small { font-size: 0.8rem; }
    html.wk .al-tool span { display: none; }
    html.wk .al-tool { padding: 6px 8px; }
    html.wk #al-book-btn span { display: inline; }
    html.wk #al-book-btn span { font-size: 0; }
    html.wk #al-book-btn span b { font-size: 0.9rem; }
    html.wk .al-note { padding: 1.15rem 1.15rem 0.95rem; }
    html.wk .al-note-hand { font-size: 1.14rem; }
    html.wk .al-note-how { font-size: 0.95rem; }
    /* the slip becomes a sheet over the upper half, the dial stays in sight */
    html.wk .al-slip { left: 8px; right: 8px; top: 50px; width: auto; max-height: calc(100% - 60px); }
    html.wk .al-slip-body { padding: 0.8rem 0.9rem 0.55rem; }
    html.wk .al-slip h2 { font-size: 1.25rem; }
    html.wk .al-slip p.al-slip-text { font-size: 0.95rem; }
    html.wk .al-slip-actions { margin: 0.45rem -0.9rem -0.55rem; padding: 0.45rem 0.9rem 0.55rem; }
    html.wk .al-caption { left: 8px; right: 8px; bottom: auto; top: 50px; max-width: none; font-size: 0.94rem; }
    /* on a phone the slip first comes as a strip at the bottom, so the apparition stays in sight */
    html.wk .al-slip.is-compact { top: auto; bottom: 6px; max-height: none; }
    html.wk .al-slip.is-compact .al-slip-body { padding: 0.5rem 0.75rem 0.45rem; overflow: hidden; }
    html.wk .al-slip.is-compact .al-slip-body > *:not(.al-slip-freq):not(h2):not(.al-slip-actions) { display: none; }
    html.wk .al-slip.is-compact h2 { font-size: 1.12rem; margin: 0 0 0.1rem; }
    html.wk .al-slip.is-compact .al-slip-freq { font-size: 0.74rem; }
    html.wk .al-slip.is-compact .al-slip-actions { position: static; margin: 0.25rem 0 0; padding: 0; background: none; flex-wrap: nowrap; }
    html.wk .al-slip.is-compact .al-slip-actions > button:not(.al-slip-more):not(.al-x) { display: none; }
    html.wk .al-stage.has-slip .al-hint { right: 0; top: 50px; bottom: auto; max-width: calc(100% - 24px); }
    html.wk .al-book { padding: 50px 6px 6px; }
    html.wk .al-book-page { padding: 0.9rem 0.95rem 0.8rem; }
    html.wk .al-gram { grid-template-columns: repeat(3, minmax(0, 1fr)); bottom: 8px; left: 8px; right: 8px; }
    html.wk .al-gram button { min-height: 76px; font-size: 0.78rem; }
    html.wk .al-gram button::before { width: 24px; height: 26px; }
    html.wk .al-hint { top: 50px; font-size: 0.9rem; }
}
@media (max-width: 768px) and (orientation: landscape) {
    html.wk .al-stage { height: calc(100svh - 64px); min-height: 320px; }
    html.wk .al-slip, html.wk .al-slip.is-compact { left: auto; right: 8px; top: 50px; bottom: auto; width: min(20rem, 48%); max-height: calc(100% - 58px); }
    html.wk .al-caption { top: auto; bottom: 8px; left: 8px; right: auto; max-width: 48%; }
}

/* ---- 16. reduced motion -------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html.wk .al-slip.is-in .al-slip-body, html.wk .al-caption.is-in, html.wk .al-hint, html.wk .al-gram, html.wk .al-book-page { animation: none; }
    html.wk .al-poster, html.wk .al-plate, html.wk .al-stage.is-ready .al-plate-on { transition: none; }
    html.wk .al-drum i { transition: none; }
    html.wk .al-tool.is-new { animation: none; }
}

/* ---- 17. the jog surface over the dial and the sweep switch ---------------- */
html.wk .al-jog { z-index: 4; cursor: grab; touch-action: none; border-radius: 50%; }
html.wk .al-jog:active { cursor: grabbing; }
html.wk .al-sweep[hidden] { display: none; }
html.wk .al-stage.is-baking .al-ctl { pointer-events: none; }
