.presentation-page {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: auto;
    background: #0a0a0b;
    color: #f4f4f5;
    line-height: 1.6;
}
.presentation-page { scrollbar-width: none; -ms-overflow-style: none; }
.presentation-page::-webkit-scrollbar { display: none; }
.presentation-page a { color: #5eead4; text-decoration: none; cursor: pointer; }
.presentation-button * { cursor: pointer; }
.presentation-button:disabled * { cursor: default; }
.presentation-page a:hover { text-decoration: underline; }
.presentation-page :focus-visible { outline: 2px solid #5eead4; outline-offset: 4px; }
.presentation-page .catalog-header { line-height: normal; color: #e4e4e7; }
.presentation-page .catalog-header a { color: inherit; text-decoration: none; }
.presentation-page .catalog-header .brand { color: #fafafa; }
.presentation-main { max-width: 1080px; padding: 2rem; margin: auto; }
.presentation-main h1 { font-size: 1.65rem; line-height: 1.4; overflow-wrap: break-word; }
.presentation-title-row, .presentation-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.presentation-title-row { justify-content: space-between; margin-bottom: 1rem; }
.presentation-title-row h1 { min-width: 0; max-width: 100%; }
.presentation-description { color: #a1a1aa; font-size: 0.8rem; margin: 1rem 0; }
.presentation-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2dd4bf;
    color: #042f2e;
    border: 1px solid #2dd4bf;
    border-radius: 5px;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.7rem 1rem;
    cursor: pointer;
    min-height: 44px;
}
.presentation-page a.presentation-button { color: #042f2e; }
.presentation-page a.presentation-button:hover { text-decoration: none; }
.presentation-button:hover { background: #5eead4; }
.presentation-secondary, .presentation-page a.presentation-secondary { background: #18181b; border-color: #52525b; color: #f4f4f5; }
.presentation-secondary:hover { background: #27272a; }
.presentation-button:disabled { opacity: 0.45; cursor: default; }
.presentation-page .catalog-header button:disabled { opacity: 0.45; cursor: default; }
.presentation-notice { padding: 2rem 1rem; text-align: center; }
.presentation-notice p { margin-bottom: 1rem; }
.presentation-notice .presentation-actions { justify-content: center; }
.presentation-session-list { list-style: none; display: grid; gap: 1rem; }
.presentation-create-action { display: flex; justify-content: center; margin-top: 1.5rem; }
.presentation-session-card { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding: 1.5rem; border: 1px solid #3f3f46; border-radius: 6px; background: #141416; }
.presentation-session-card > div { min-width: 0; max-width: 100%; }
.presentation-session-card h2 { font-size: 1.1rem; overflow-wrap: break-word; }
.presentation-session-card p { color: #a1a1aa; font-size: 0.8rem; }
.presentation-song-selection { line-height: normal; }
.presentation-song-card { width: 100%; text-align: left; font: inherit; }
.presentation-option-group { min-width: 0; width: 100%; max-width: 30rem; margin: 0 auto 1.25rem; padding: 0; border: 0; }
.presentation-segments { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border: 1px solid #3f3f46; border-radius: 8px; background: #141416; }
.presentation-segment { min-width: 0; min-height: 44px; padding: 0.65rem 0.5rem; border: 0; border-radius: 7px; background: transparent; color: #d4d4d8; font: inherit; font-size: 0.8rem; line-height: 1.4; font-weight: 400; text-align: center; overflow-wrap: break-word; cursor: pointer; }
.presentation-segment:not(:disabled):hover { background: #242428; color: #fafafa; }
.presentation-segment:disabled { opacity: 0.45; cursor: default; }
.presentation-segment.is-active { opacity: 1; background: #2dd4bf; color: #042f2e; font-weight: 600; }
.presentation-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 1rem; }
.presentation-navigation > .presentation-button:first-child { justify-self: start; }
.presentation-navigation > .presentation-button:last-child { justify-self: end; }
.presentation-settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); border: 1px solid #3f3f46; border-radius: 8px; background: #141416; font-size: 0.9rem; }
.presentation-settings .presentation-button { min-width: 0; border: 0; padding: 0; border-radius: 7px 0 0 7px; font-size: 1.1rem; -webkit-tap-highlight-color: transparent; }
.presentation-settings .presentation-button:last-child { border-radius: 0 7px 7px 0; }
.presentation-settings .presentation-button:hover, .presentation-settings .presentation-button:active { background: #18181b; }
.presentation-settings .presentation-button:focus:not(:focus-visible) { outline: none; }
.presentation-settings output { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 44px; padding: 0.5rem; border-left: 1px solid #3f3f46; border-right: 1px solid #3f3f46; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: break-word; word-wrap: break-word; }
.presentation-stage { height: 100%; min-height: 0; position: relative; display: flex; flex-direction: column; padding: 2rem; text-align: center; }
.presentation-window {
    position: relative;
    flex: 1;
    height: 100%;
    min-height: 0;
    /* Hidden prevents manual scrolling but preserves command-driven scrollTo. */
    overflow: hidden;
    /* Position is anchored explicitly before command-driven scrolling. */
    overflow-anchor: none;
    opacity: 0;
    --presentation-line-height: var(--presentation-row-height, 4.5rem);
    /* Keep both context verses fully visible; clip only beyond their rows. */
    --presentation-context-mask: linear-gradient(
        to bottom,
        transparent calc(50% - var(--presentation-focus-height) / 2 - var(--presentation-previous-height, 0px)),
        black calc(50% - var(--presentation-focus-height) / 2 - var(--presentation-previous-height, 0px)),
        black calc(50% + var(--presentation-focus-height) / 2 + var(--presentation-next-height, 0px)),
        transparent calc(50% + var(--presentation-focus-height) / 2 + var(--presentation-next-height, 0px))
    );
    mask-image: var(--presentation-context-mask);
    -webkit-mask-image: var(--presentation-context-mask);
}
@supports (height: min(1px, 2px)) {
    .presentation-window { --presentation-line-height: min(var(--presentation-row-height, 4.5rem), calc((var(--presentation-window-height, 100vh) - 4px) / (var(--presentation-visible-count, 1) + var(--presentation-context-rows, 2)))); }
}
.presentation-window[data-ready="true"] { opacity: 1; }
.presentation-scroll-spacer { height: 50%; pointer-events: none; }
.presentation-verses { width: 100%; max-width: 1400px; margin: 0 auto; }
.presentation-verse {
    min-height: var(--presentation-line-height, 4.5rem);
    min-height: calc(var(--presentation-line-height, 4.5rem) * var(--presentation-font-scale, 1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-size: calc(1.5rem * var(--presentation-font-scale, 1));
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: -0.035em;
    color: #fafafa;
    opacity: 0.2;
    transition: opacity 200ms ease;
    margin: 0;
    padding: 0.35rem 0;
    padding: calc(0.35rem * var(--presentation-font-scale, 1)) 0;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.presentation-verse > span { min-width: 0; max-width: 100%; }
.presentation-stage.is-left-aligned { text-align: left; }
.presentation-stage.is-left-aligned .presentation-verses { max-width: none; margin-left: 0; margin-right: 0; }
.presentation-stage.is-left-aligned .presentation-verse { justify-content: flex-start; text-align: left; }
.presentation-verse.is-highlighted { opacity: 1; }
/* Preserve row geometry and hide excluded context even without mask support. */
.presentation-verse.is-context-hidden { visibility: hidden; }
.presentation-announcement { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.presentation-preview { --presentation-row-height: 4.5rem; height: 20rem; overflow: hidden; margin-bottom: 1rem; border: 1px solid #3f3f46; border-radius: 6px; background: #111113; touch-action: pan-x; cursor: grab; }
.presentation-preview * { cursor: grab; }
.presentation-preview:active, .presentation-preview:active * { cursor: grabbing; }
/* Match the timed reader's typography without coupling the two readers. */
.presentation-display {
    overflow: hidden;
    --presentation-row-height: 6rem;
    --presentation-row-height: min(6rem, calc((100vh - 10rem) / 6));
}
@supports (height: 100dvh) {
    .presentation-display { --presentation-row-height: min(6rem, calc((100dvh - 10rem) / 6)); }
}
.presentation-display .presentation-stage {
    padding: 5rem 1.5rem 1rem;
    padding: calc(max(1rem, env(safe-area-inset-top)) + 4rem) 1.5rem max(1rem, env(safe-area-inset-bottom));
}
.presentation-display .presentation-verses { max-width: none; }
.presentation-display .presentation-verse {
    font-size: 1.25rem;
    font-size: min(clamp(1.25rem, 3.5vw, 2.5rem), calc(var(--presentation-line-height) / 2.4));
    font-size: calc(min(clamp(1.25rem, 3.5vw, 2.5rem), calc(var(--presentation-line-height) / 2.4)) * var(--presentation-font-scale, 1));
}
@media (prefers-reduced-motion: reduce) {
    .presentation-verse { transition: none; }
}
@media (max-width: 600px) {
    .presentation-main { padding: 1.5rem 1rem; }
    .presentation-stage { padding: 1.5rem 1rem; }
    .presentation-session-card { padding: 1rem; }
    .presentation-navigation { gap: 0.25rem; }
    .presentation-navigation > .presentation-button { padding-right: 0.375rem; padding-left: 0.375rem; font-size: 0.75rem; }
    .presentation-preview .presentation-verse { font-size: 1.15rem; font-size: calc(1.15rem * var(--presentation-font-scale, 1)); }
    .presentation-display .presentation-stage { padding-right: 1rem; padding-left: 1rem; }
}
