#alternate-background{position:fixed;inset:0;width:100%;height:100%;pointer-events:none}
.background-options{position:fixed;right:4.3%;bottom:max(18px,env(safe-area-inset-bottom));z-index:4;display:flex;align-items:center;gap:4px;padding:5px 7px;border:1px solid #d9b77a2b;border-radius:28px;background:#080e18bb;backdrop-filter:blur(20px);box-shadow:inset 0 1px #fff1}
.background-options button{border:0;background:none;border-radius:22px;padding:10px 15px;color:#aaa69b;font-size:10px;letter-spacing:.12em;transition:color .25s,background .25s}
.background-options button[aria-pressed=true]{color:#f3d49d;background:#d9b77a16}.background-options button:hover{color:#f3d49d}.background-options button:focus-visible{outline:1px solid #d9b77a;outline-offset:2px}.background-label{font-size:8px;color:#8f8e87;padding:0 7px}.background-options [role=status]{position:absolute;bottom:calc(100% + 10px);left:50%;transform:translateX(-50%);white-space:nowrap;font-size:9px;color:#c7b490;text-shadow:0 1px 8px #000}
@media(max-width:650px){.background-options{right:7%;bottom:max(14px,env(safe-area-inset-bottom));gap:2px;padding:4px 6px}.background-options button{font-size:9px;padding:10px 13px}.background-label{display:none}}
@media(prefers-reduced-transparency:reduce){.background-options{background:#080e18;backdrop-filter:none}}

.footer-thought{position:absolute;left:50%;transform:translateX(-50%)}
@media(max-width:380px){footer .dots{display:none}.background-options button{padding:9px 10px}.chapter{gap:6px}.chapter-name{font-size:8px}}
@media(min-width:651px) and (max-width:1000px){.footer-thought{display:none}}
#presentation-stage{position:fixed;inset:0}
body[data-background="meteor"] .trace-guide,body[data-background="festival"] .trace-guide,body[data-background="ripple"] .trace-guide{display:none}
body[data-background="meteor"] .invitation:before,body[data-background="festival"] .invitation:before,body[data-background="ripple"] .invitation:before{content:'';flex:0 0 30px;height:30px;border:1px solid #d9b77a55;border-radius:50%;background:radial-gradient(circle,#f8ddb7 0 2px,#d9b77a22 3px,transparent 11px);box-shadow:0 0 16px #d9b77a15}
:root{--bottom-rail-offset:max(18px,env(safe-area-inset-bottom));--bottom-rail-height:44px}
footer{bottom:var(--bottom-rail-offset);height:var(--bottom-rail-height)}
.background-options{bottom:var(--bottom-rail-offset);height:var(--bottom-rail-height);padding:4px 6px}
@media(max-width:650px){:root{--bottom-rail-offset:max(14px,env(safe-area-inset-bottom));--bottom-rail-height:40px}footer,.background-options{bottom:var(--bottom-rail-offset);height:var(--bottom-rail-height)}}
/* Treat the animation stage as an interactive surface on iOS, not selectable text. */
html,body,#presentation-stage,#presentation-stage *,.background-options,.background-options *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#presentation-stage dialog .sheet-content,#presentation-stage dialog .sheet-content *{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
#presentation-stage dialog button,#presentation-stage dialog button *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}

@media(max-width:650px){.background-options button{padding:10px 9px;font-size:8.5px;letter-spacing:.06em}}
@media(max-width:380px){.chapter-name{max-width:58px;font-size:7px}.chapter{gap:4px}.background-options button{padding:10px 8px}}

.scene-programs{position:fixed;right:4.3%;bottom:calc(var(--bottom-rail-offset) + var(--bottom-rail-height) + 9px);z-index:5;font:12px Georgia,"Yu Mincho",serif;color:#f1e1c2}
.scene-programs button,.scene-program-list{background:#101d33;border:1px solid #ae915a;box-shadow:0 4px 18px #02071480;box-sizing:border-box}
.scene-programs button{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:36px;padding:7px 14px;border-radius:24px;font:inherit;letter-spacing:.07em;color:inherit;cursor:pointer}
.scene-programs button::after{content:"";width:6px;height:6px;margin-top:-3px;border-right:1px solid #dfc895;border-bottom:1px solid #dfc895;transform:rotate(45deg)}
.scene-programs button[aria-expanded=true]::after{transform:rotate(225deg);margin-top:3px}
.scene-programs button:focus-visible{outline:2px solid #e4cc99;outline-offset:3px}
.scene-program-list{position:absolute;right:0;bottom:calc(100% + 7px);min-width:max(148px,100%);width:max-content;max-width:80vw;max-height:min(55vh,400px);max-height:min(55dvh,400px);overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:5px;border-radius:14px;scrollbar-color:#8b7352 #101d33}
.scene-program-list[hidden]{display:none}
.scene-program-list [role=option]{position:relative;display:flex;align-items:center;min-height:37px;padding:5px 32px 5px 13px;box-sizing:border-box;border-radius:8px;line-height:1.4;letter-spacing:.07em;cursor:pointer}
.scene-program-list [role=option][aria-selected=true]{color:#f2d295}
.scene-program-list [role=option][aria-selected=true]::after{content:"";position:absolute;right:13px;width:4px;height:8px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-1px)}
.scene-program-list .active-option{background:#25354e}
@media(hover:hover){.scene-program-list [role=option]:hover{background:#2d3b50}}
@media(max-width:650px){.scene-programs{right:7%}.scene-program-list [role=option]{min-height:42px}}
