/* Hand-cut paper, quilt stitching and apartment door cards. */
dialog{overflow:visible;border:4px solid #72564c;border-radius:32px 25px 30px 23px;background:#fff3d8;box-shadow:0 9px 0 #493d48,0 24px 75px #10162799;padding:30px 26px 22px;width:min(880px,94vw);max-width:880px;max-height:90dvh;background-image:radial-gradient(#cda87935 1px,transparent 1px);background-size:13px 13px}dialog:before{content:'✦';position:absolute;top:-21px;left:29px;background:#eccb82;border:3px solid #72564c;border-radius:50%;width:43px;height:43px;text-align:center;line-height:39px;color:#815a48;font-size:24px;transform:rotate(-12deg)}dialog:after{content:'';position:absolute;right:70px;top:-12px;width:72px;height:22px;background:repeating-linear-gradient(45deg,#d9b8ccbb 0 7px,#f3d6e3bb 7px 14px);transform:rotate(6deg);pointer-events:none}.dialog-tag{border:0;border-radius:6px;background:#e4eddb;color:#64806a;padding:6px 12px;letter-spacing:3px;font-size:10px;transform:rotate(-2deg)}dialog h2{font-size:29px;color:#62473e;letter-spacing:1px;text-shadow:1px 2px #e6c79a}dialog .dialog-intro{font-size:12px;margin-bottom:15px;color:#9c7962}.dialog-x{width:36px;height:36px;top:14px;right:14px;border:2px solid #74564e;background:#efb6ae;color:#704b47;border-radius:13px;box-shadow:0 3px 0 #b77c72}.dialog-x:hover{background:#f8c9bf;transform:rotate(8deg)}dialog>button:last-child{background:#e3b97d;border:2px solid #8f6850;color:#624637;border-radius:14px;box-shadow:0 4px 0 #b18b62;padding:9px 23px;margin:15px auto 0}
#levelList{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;max-height:56dvh;overflow:auto;padding:5px 6px 9px}.level-card{position:relative;display:flex;flex-direction:column;gap:8px;text-align:center;align-items:center;border:3px solid #ac8065;border-radius:42px 42px 15px 15px;padding:13px 10px 12px;background:#f6dfb3;box-shadow:0 5px 0 #c29b76;min-height:184px;isolation:isolate}.level-card:nth-child(2n){background:#e2e8cf;border-color:#8f9e7b;box-shadow:0 5px 0 #b3be99}.level-card:nth-child(3n){background:#e8dce9;border-color:#a08b9f;box-shadow:0 5px 0 #bba4bb}.level-card:before{content:'';position:absolute;inset:8px;border:1px dashed #9a75577a;border-radius:34px 34px 9px 9px;pointer-events:none;z-index:-1}.level-card:after{content:'';position:absolute;right:9px;top:87px;width:8px;height:8px;border:2px solid #9a734f;background:#f7d57b;border-radius:50%}.level-card .door-number{font-size:23px;background:#fff4d9;border:2px solid #ac8065;border-radius:14px;width:51px;padding:6px 0 3px;box-shadow:0 2px 0 #c3a57d;transform:rotate(-4deg)}.level-card .door-number small{font-size:8px;margin:2px 0;color:#92735a}.level-copy>strong{font-size:12px;line-height:1.6}.level-card .level-copy>span:not(.night-doodle){font-size:10px;line-height:1.6;margin:6px 0}.level-card .level-copy>small{font-size:9px;line-height:1.6;background:#fff6dd8a;padding:4px;border-radius:7px}.level-card .night-doodle{position:absolute;right:18px;top:18px;font-size:23px;transform:rotate(13deg);color:#b67b60}.level-card:hover:not(:disabled){transform:translateY(-4px) rotate(-1deg);background:#fff0cb}.level-card:disabled{opacity:.72;filter:saturate(.55);background:#e5ded0;box-shadow:0 3px 0 #bcb0a0}.challenge-card{background:#eed0c1;border-color:#af7769}.challenge-card .door-number{background:#f3a795;color:#734e47}.challenge-card:last-child{grid-column:span 2;display:grid;grid-template-columns:62px 1fr;text-align:left;border-radius:25px;background:#dcd9ec;border-color:#8d82a5;min-height:150px}.challenge-card:last-child:before{border-radius:17px}.challenge-card:last-child .night-doodle{right:18px;top:9px}.challenge-card:last-child .level-copy{padding-right:15px}#saveNote{font-size:10px;color:#94745e;text-align:center;margin:9px 0}
#residentList{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-height:59dvh;overflow:auto;padding:5px 4px 9px}.resident{position:relative;display:grid;grid-template-columns:78px 1fr;gap:10px;background:#fffaf0;border:2px solid #c4a486;border-radius:18px;padding:14px 10px;box-shadow:0 4px 0 #ddc5a4;align-items:start}.resident:nth-child(2n){background:#eef1e2;border-color:#adb89c}.resident:nth-child(3n){background:#f4e6ed;border-color:#c6a5b7}.resident .portrait{width:75px;height:75px;border:2px dashed #bd9e7c;background-color:#fff3dc;box-shadow:none;transform:rotate(-5deg)}.resident h3{font-size:14px;margin:6px 0}.resident h3 small{float:none;display:block;margin-top:5px;font-size:10px}.resident p{font-size:11px;line-height:1.65}.resident em{font-style:normal;font-size:10px;padding:7px;background:#fff9e8;border:1px dashed #c6a98c;border-radius:10px}.resident-number{font-size:8px;letter-spacing:1px;color:#a48c71}
#guide,#settings{width:min(590px,94vw);max-height:90dvh;overflow:auto}#guide>p{border-left:0;border:2px dashed #d6b68f;border-radius:13px;padding:9px 12px;margin:9px 0;transform:rotate(-.4deg);font-size:12px}#guide>p:nth-of-type(2n){background:#e8eddc;transform:rotate(.4deg);border-color:#b5c09c}#settings>p>button{background:#f6e0af;border:2px solid #a78361;box-shadow:0 3px 0 #d3b48c;border-radius:13px;min-width:185px}#settings>p:nth-of-type(2)>button{background:#e4e9d6}#settings>p:nth-of-type(3)>button{background:#e9dceb}
#playShell .welcome{border:4px solid #856453;border-radius:35px 27px 31px 25px;background:#fff2d6;box-shadow:0 8px 0 #5b464b,0 18px 50px #18203570;background-image:radial-gradient(#dbbb8f40 1px,transparent 1px);background-size:12px 12px}#playShell .welcome:before{height:17px;top:0;background:repeating-linear-gradient(45deg,#dfb6cb88 0 7px,#f4d9e688 7px 14px);transform:rotate(-4deg)}#playShell .overlay-seal{border:3px double #b07d69;background:#f7d4be;border-radius:47% 53% 42% 58%;font-size:12px;transform:rotate(-8deg);box-shadow:2px 2px 0 #e7bb98}#playShell .won .overlay-seal{background:#d9e8bd;color:#5c7b4a;border-color:#87a56d}#playShell .lost .overlay-seal{background:#e4d7e9;color:#826382;border-color:#ae8caf}.report{gap:7px}.report span{border:2px dashed #cfb48e;border-radius:14px;padding:9px 3px;background:#fffaf0}.report b{font-size:18px;color:#a6704a}.welcome .primary{background:#dd997a;border:2px solid #925f4b;border-radius:15px;box-shadow:0 4px 0 #bb7f64}.overlay-nav button{border-radius:12px;border:1px solid #cbb18e;background:#eee3cc}
@media(max-width:650px){dialog{padding:25px 15px 17px;border-radius:25px}dialog h2{font-size:23px}#levelList{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:53dvh}.level-card{min-height:175px}#residentList{grid-template-columns:1fr;max-height:56dvh}.resident{grid-template-columns:65px 1fr}.resident .portrait{width:62px;height:62px}.challenge-card:last-child{min-height:135px}.dialog-tag{font-size:8px}dialog .dialog-intro{font-size:11px}}
@media(max-height:600px){dialog{padding:15px 19px;max-height:94dvh}dialog h2{font-size:20px;margin:7px 0}.dialog-tag{padding:3px 10px}dialog .dialog-intro{margin-bottom:6px;font-size:10px}#levelList,#residentList{max-height:49dvh}.level-card{min-height:150px}dialog>button:last-child{margin-top:8px;padding:6px 16px}#saveNote{margin:5px 0}}
.level-card .level-copy>.night-doodle{display:block;position:absolute;right:19px;top:20px;width:62px;height:62px;font-size:0;margin:0;background-image:url('assets/sprites.png');background-size:400% 300%;background-position:0 0;transform:rotate(8deg);filter:drop-shadow(1px 2px 0 #aa856733)}.level-card .door-number{align-self:flex-start;margin-left:5px;margin-bottom:4px}.level-card[data-night="2"] .night-doodle{background-position:33.333% 0}.level-card[data-night="3"] .night-doodle{background-position:66.666% 50%}.level-card[data-night="4"] .night-doodle{background-position:33.333% 50%}.level-card[data-night="5"] .night-doodle{background-position:0 50%}.level-card[data-night="6"] .night-doodle{background-image:url('assets/monsters-boss.png');background-size:300% 200%;background-position:0 100%;width:75px;height:75px;top:8px;right:14px}.level-card[data-night="7"] .night-doodle{background-image:url('assets/monsters-boss.png');background-size:300% 200%;background-position:50% 0;top:10px;right:12px;width:70px;height:70px}.challenge-card:last-child .level-copy{padding-top:30px}.level-card[data-night="7"] .door-number{align-self:center}
