:root { color-scheme: light; font-family: 'Songti SC', 'Noto Serif CJK SC', 'SimSun', serif; color: #55594f; background: #f6f5ef; }
* { box-sizing: border-box; }
body { margin: 0; }
main { position: relative; height: 100dvh; min-height: 400px; overflow: hidden; isolation: isolate; }
main::after { content: ''; position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: .18; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.83' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23808080' filter='url(%23n)' opacity='.3' d='M0 0h180v180H0z'/%3E%3C/svg%3E"); }
header { position: absolute; top: 42px; left: 48px; right: 48px; display: flex; align-items: flex-start; justify-content: space-between; z-index: 2; pointer-events: none; }
h1 { font-size: 29px; font-weight: 400; margin: 0; line-height: 1; }
h1 span { display: block; font: 10px/1.6 Georgia, serif; letter-spacing: .23em; margin-top: 17px; }
.aside { font-size: 12px; letter-spacing: .24em; writing-mode: vertical-rl; line-height: 2; color: #777a6f; }
canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#door { position: absolute; left: 50%; transform: translate(-50%, -50%); border: 0; padding: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; border-radius: 46%; }
#door:focus-visible { outline: 1px dashed #8b9883; outline-offset: 12px; }
.invitation { position: absolute; top: calc(49% + 154px); left: 0; width: 100%; text-align: center; pointer-events: none; }
.invitation p { font-size: 15px; letter-spacing: .25em; margin: 0 0 16px; font-weight: 400; }
.instruction { font: 11px/1.5 'Microsoft YaHei', sans-serif; letter-spacing: .12em; color: #818578; transition: opacity 1.1s; }
.is-open .instruction { opacity: .25; }
.touch-copy { display: none; }
footer { position: absolute; bottom: 33px; left: 48px; right: 48px; display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .2em; color: #777b70; pointer-events: none; }
#asset-error { position: absolute; bottom: 65px; left: 20px; right: 20px; text-align: center; font-size: 14px; }
@media (pointer: coarse) { .touch-copy { display: inline; } }
@media (max-width: 600px) { header { top: 29px; left: 26px; right: 25px; } h1 { font-size: 25px; } h1 span { font-size: 10px; letter-spacing: .15em; } .aside { font-size: 11px; } footer { left: 26px; right: 26px; bottom: 26px; font-size: 11px; } .invitation { top: calc(49% + 115px); } .invitation p { font-size: 14px; letter-spacing: .16em; } }
@media (max-height: 500px) { .invitation { top: calc(49% + 90px); } header { top: 20px; } footer { bottom: 15px; } }
@media (prefers-reduced-motion: reduce) { .instruction { transition: none; } }

/* A compact instrument panel, separate from the artwork. */
main::after { opacity: var(--paper-opacity, .18); }
#settings-toggle, #settings button { font: 14px/1.4 'Microsoft YaHei', sans-serif; color: #4c554b; background: #f7f7f1; border: 1px solid #c8cec1; border-radius: 6px; padding: 9px 13px; cursor: pointer; }
#settings-toggle { position: fixed; right: 30px; bottom: 65px; z-index: 10; }
#settings { position: fixed; z-index: 12; right: 22px; top: 22px; bottom: 22px; width: min(330px, calc(100vw - 32px)); padding: 22px; overflow-y: auto; overscroll-behavior: contain; background: #f8f8f2; border: 1px solid #d4d9cd; border-radius: 10px; box-shadow: 0 12px 50px #303b3014; font: 14px/1.6 'Microsoft YaHei', sans-serif; }
#settings[hidden] { display: none; }
.settings-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.settings-heading h2 { margin: 0; font-size: 18px; font-weight: 500; }
.settings-note { font-size: 12px; color: #70796b; }
.settings-playback { display: flex; flex-wrap: wrap; gap: 8px 15px; margin: 20px 0; }
#settings input { accent-color: #758b70; }
#settings details { border-top: 1px solid #dce0d5; padding: 13px 0; }
#settings summary { cursor: pointer; font-weight: 500; padding: 4px 0; }
.setting-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 18px; }
.setting-row output { font-variant-numeric: tabular-nums; color: #6a7762; }
.setting-row input { grid-column: 1 / -1; width: 100%; height: 25px; margin: 0; cursor: pointer; }
#settings #reset { width: 100%; margin-top: 12px; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid #778d72; outline-offset: 3px; }
@media (max-width: 600px) { #settings { top: 12px; right: 12px; bottom: 12px; padding: 18px; } #settings-toggle { right: 24px; bottom: 56px; } }
