* { box-sizing: border-box; }
html, body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    background: #171c20;
    color: #fff0cb;
    font: 16px "Songti SC", "Noto Serif CJK SC", Georgia, serif;
}
[hidden] { display: none !important; }
main, canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#frame {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    overflow: hidden;
}
canvas { display: block; cursor: grab; touch-action: none; }
canvas:active { cursor: grabbing; }
button, input, summary { font: inherit; }
button, summary { cursor: pointer; }
button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid #fff0cb; outline-offset: 5px; }
#intro {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 0 12% 10%;
    background: linear-gradient(100deg, #18242198, #18242127 44%, transparent 74%);
}
#intro h1 {
    margin: 0 0 22px;
    font-size: clamp(28px, 6.1vw, 96px);
    font-weight: 500;
    letter-spacing: .145em;
    line-height: 1.2;
    text-shadow: 0 2px 18px #1c2720bd;
}
#enter, #resume {
    padding: .68em 1.35em;
    border: 1px solid #ffe9b68c;
    border-radius: 4px;
    color: #fff0cb;
    background: #24352dc7;
    letter-spacing: .14em;
}
#enter:hover, #resume:hover { background: #364e3ee5; }
#pause {
    position: absolute;
    width: 42px;
    height: 42px;
    top: 4%;
    right: 3%;
    border-radius: 50%;
    border: 1px solid #fff5d44d;
    background: #182b2a44;
    color: #fff0cb;
    display: grid;
    place-items: center;
}
#pause::after { content: ""; width: 10px; height: 12px; border-inline: 2px solid currentColor; }
#pause:hover, #pause:focus-visible { background: #24352de3; }
#dialogue {
    position: absolute;
    bottom: 7%;
    left: 50%;
    transform: translateX(-50%);
    min-width: min(330px, 86vw);
    padding: 12px 30px 16px;
    text-align: center;
    background: radial-gradient(ellipse at center, #151e16cc, #151e1600 76%);
    text-shadow: 0 2px 8px #131a12, 0 1px 2px #131a12;
    pointer-events: none;
}
#dialogue p { margin: 5px 0 0; font-size: clamp(15px, 1.85vw, 23px); }
#dialogue small { color: #ebdca4; }
#menu {
    width: min(86vw, 310px);
    padding: 29px 30px;
    color: #fff0cb;
    background: #23322bec;
    border: 1px solid #e8d8ab66;
    border-radius: 10px;
}
#menu::backdrop { background: #111c20a0; }
#menu h2 { margin: 0 0 23px; font-size: 27px; font-weight: 500; letter-spacing: .18em; }
#resume { display: block; width: 100%; }
.sound { display: flex; justify-content: space-between; gap: 8px; margin: 23px 0; }
.sound input { width: 54%; accent-color: #d9bf79; }
details { border-top: 1px solid #e8d8ab4d; padding-top: 12px; }
dl { display: grid; grid-template-columns: auto 1fr; row-gap: 8px; font-size: 14px; }
dd { margin-left: 16px; }
#loading { position: absolute; inset: 0; display: grid; place-items: center; background: #25344c; }
