.sd{max-width:760px;margin:0 auto;padding:8px 0 40px;color:#f3efe6}
.sd *{box-sizing:border-box}
.sd p{line-height:1.6}
.sd .scene{font-size:1.15rem;line-height:1.7;margin:0 0 16px}
.sd .past{color:#a39daf;font-style:italic;border-left:2px solid #3a3544;padding-left:14px;margin:0 0 20px}
.sd dl.file{margin:0 0 8px;padding:6px 16px;background:#17151d;border:1px solid #3a3544;border-radius:12px}
.sd .file__row{display:grid;grid-template-columns:7.5rem 1fr;gap:12px;padding:10px 0;border-bottom:1px solid #2a2632}
.sd .file__row:last-child{border-bottom:0}
.sd .file__row dt{color:#c9a84c;letter-spacing:.1em;text-transform:uppercase;font-size:.72rem;padding-top:.2rem}
.sd .file__row dd{margin:0;line-height:1.5}
.sd .k{letter-spacing:.14em;text-transform:uppercase;font-size:.75rem;color:#c9a84c;margin:0 0 8px}
.sd button,.sd input{font:inherit}
.sd label{display:block;margin-top:20px}
.sd .b{display:block;width:100%;text-align:left;margin:10px 0;padding:14px 16px;background:#17151d;color:#f3efe6;border:1px solid #3a3544;border-radius:10px;cursor:pointer}
.sd .b:hover,.sd .b:focus-visible{border-color:#c9a84c;outline:none}
.sd .go{background:#c9a84c;color:#0B0A0F;border-color:#c9a84c;text-align:center;font-weight:700;width:auto;display:inline-block;padding:12px 22px}
.sd .go:focus-visible{outline:2px solid #f3efe6}
.sd input{width:100%;padding:14px;background:#17151d;color:#f3efe6;border:1px solid #3a3544;border-radius:10px;margin:8px 0 12px}
.sd input:focus-visible{outline:2px solid #c9a84c}
.sd canvas{width:100%;height:auto;border-radius:12px;border:1px solid #3a3544;margin:16px 0}
.sd .row{display:flex;flex-wrap:wrap;gap:10px}
.sd .row .b{width:auto;margin:0}
.sd small{color:#a39daf;display:block;margin-top:28px;line-height:1.5}
@media (prefers-reduced-motion:no-preference){.sd .b{transition:border-color .2s}}

/* Reserve the first chapter's height only until door.js replaces the
   <noscript> placeholder, so the footer does not jump when the game renders
   (Lighthouse mobile CLS 0.149 on live, 2026-10-05). */
.sd #sd-stage:has(> noscript:only-child){min-height:30rem}
@media (min-width:768px){.sd #sd-stage:has(> noscript:only-child){min-height:23rem}}
