*{box-sizing:border-box} [hidden]{display:none!important} :root{--paper:#f5eee1;--ink:#354b3c;--red:#843f3e;--line:#c8b99f} body{margin:0;background:var(--paper);color:var(--ink);font-family:Georgia,serif;touch-action:manipulation;overflow-wrap:break-word} main{max-width:480px;margin:auto;padding:max(20px,env(safe-area-inset-top)) 16px max(24px,env(safe-area-inset-bottom))} header{text-align:center;padding:12px 0 17px}small{letter-spacing:2px;font-size:11px}h1{font-size:clamp(25px,7vw,39px);font-weight:normal;line-height:1.04;margin:17px 0 9px}h1 span{font-size:1.55em;font-style:italic;color:var(--red)}p{line-height:1.5}header p{font-size:14px;margin:9px 0}#calendar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}button{font:inherit;cursor:pointer;touch-action:manipulation;color:inherit}button:focus-visible{outline:2px solid #843f3e;outline-offset:2px}.tile{aspect-ratio:1;border:1px solid var(--line);border-radius:5px;background:#eadcc5;color:var(--ink);display:grid;place-items:center;position:relative;font-size:30px;box-shadow:1px 2px 0 #ded3c0;overflow:hidden;padding:0}.tile:nth-child(4n+2){background:#dce2d2}.tile:nth-child(4n+3){background:#efdbd1}.tile:nth-child(4n+4){background:#eee5ce}.tile.locked{opacity:.72}.tile.ready{outline:2px solid var(--red);outline-offset:-2px}.tile.opened,.tile.done{background:#d5dfcc}.tile:last-child{border:2px solid #b39355}.num{font-style:italic}.tile-state{position:absolute;bottom:2px;right:5px;font:12px system-ui}.door-art{width:100%;height:100%;object-fit:contain;position:absolute;inset:0}.cover-art{max-height:120px;max-width:100%;object-fit:contain}.title-art{width:95%;max-height:140px;object-fit:contain}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}footer,#status{text-align:center;font-size:13px}footer{margin-top:22px;font-style:italic}dialog{border:0;background:var(--paper);color:var(--ink);width:100%;max-width:480px;height:100%;max-height:100%;margin:auto;padding:max(12px,env(safe-area-inset-top)) 14px max(24px,env(safe-area-inset-bottom));overflow:auto}dialog::backdrop{background:#304c40aa}#back,.subtle{border:0;background:none;color:inherit;padding:12px 0;min-height:44px}#content{text-align:center;padding-top:6px}h2{font-weight:normal;margin:12px 0 4px}h3{margin:12px 0 8px}.door-heading{font-style:italic;color:#766a55;margin:5px 0 18px}.envelope{width:190px;height:130px;margin:27px auto 12px;background:#a65550;border:0;border-radius:5px;position:relative;color:white;font-size:32px;box-shadow:3px 5px 0 #dfcbb5}.envelope:before{content:'';position:absolute;inset:0;background:#bd7063;clip-path:polygon(0 0,100% 0,50% 65%)}.envelope span{position:relative}.envelope.custom-envelope{background:none;box-shadow:none}.custom-envelope:before,.custom-envelope span{display:none}.envelope-art{width:100%;height:100%;object-fit:contain}.letter{text-align:left;background:#fffaf0;padding:22px 18px;border:1px solid #d5c6ae;white-space:pre-wrap;line-height:1.65;animation:appear .35s ease}.primary{display:block;width:100%;border:0;border-radius:7px;background:var(--ink);color:#fffaf0;padding:13px;margin:16px 0;min-height:44px;text-decoration:none}.hint{font:13px/1.5 system-ui;color:#5d6457;margin:8px 0 14px}.sudoku-grid{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));border:2px solid #50624f;border-radius:3px;overflow:hidden;background:#fffaf0}.cell{aspect-ratio:1;min-width:0;padding:0;border:0;border-right:1px solid #c9c4b8;border-bottom:1px solid #c9c4b8;background:#fffaf0;font:clamp(16px,5vw,25px)/1 system-ui;color:#46745e;position:relative}.cell:nth-child(9n){border-right:0}.cell:nth-last-child(-n+9){border-bottom:0}.cell.block-right{border-right:2px solid #50624f}.cell.block-bottom{border-bottom:2px solid #50624f}.cell.given{font-weight:650;color:#354b3c}.cell.related{background:#e8e9dc}.cell.same{background:#d5e0d1}.cell.selected{background:#f1d0ad;box-shadow:inset 0 0 0 2px #ad7546}.cell.conflict{color:#ae3535;background:#f4d0cb}.notes{position:absolute;inset:2px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);font:clamp(7px,2.4vw,11px)/1 system-ui;align-items:center;color:#647368}.keypad{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:3px;margin:12px 0}.number-key{min-height:44px;padding:0;border:1px solid #c8b99f;border-radius:4px;background:#fffaf0;font:20px system-ui}.sudoku-tools{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}.tool{border:1px solid var(--line);background:#eee5d3;border-radius:5px;padding:8px;min-height:44px;font:12px system-ui}.tool[aria-pressed=true]{background:var(--ink);color:white}.tool:disabled{opacity:.45}.sudoku-msg{min-height:24px;font:13px system-ui}.subtle{font-size:14px}@keyframes appear{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){*{animation:none!important}}

/* Hand-drawn edition */
header{padding-top:4px;padding-bottom:12px} .title-art{display:block;width:94%;max-height:150px;margin:12px auto 4px;object-fit:contain} .cover-art{display:block;width:92%;max-height:110px;margin:4px auto 0} .tile.locked{opacity:.94} .tile-state{color:#665747;background:#f5eee1b0;border-radius:4px;padding:1px 3px} .tile{background:#f7f1e7;border-color:#d6c9b3;box-shadow:1px 2px 0 #e4dac9} .tile:nth-child(4n+2){background:#e8ebdf}.tile:nth-child(4n+3){background:#f2e1da}.tile:nth-child(4n+4){background:#f0e8d5}.tile.opened,.tile.done{background:#dce7d7}.envelope.custom-envelope{width:min(90%,310px);height:190px}.door-art{padding:3px} header p{margin:5px 0} @media(max-width:360px){#calendar{gap:5px}main{padding-left:12px;padding-right:12px}}
