*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:-apple-system,BlinkMacSystemFont,"Microsoft YaHei",sans-serif;color:#222;background:#f7f7f7}body{background-image:linear-gradient(#ececec 1px,transparent 1px),linear-gradient(90deg,#ececec 1px,transparent 1px);background-size:19px 19px}button{font:inherit;cursor:pointer;border:0;touch-action:manipulation}button:focus{outline:3px solid #e45248;outline-offset:2px}button:focus-visible{outline:3px solid #e45248;outline-offset:2px}#app{width:100%;max-width:520px;min-height:100vh;margin:auto;background:rgba(248,248,248,.6);padding-bottom:env(safe-area-inset-bottom)}header{height:58px;background:#fff;display:flex;align-items:center;justify-content:center;position:relative}header h1{font-size:18px;margin:0;font-weight:500}header .back,header .right{position:absolute;top:0;height:58px;background:none;color:#db554c;font-size:15px}.back{left:12px}.right{right:12px}.month{height:56px;display:flex;align-items:center;justify-content:space-around}.month strong{font-size:23px}.month button{background:#fff;color:#d9584e;border-radius:50%;width:42px;height:42px;font-size:24px}.year{color:#888;font-size:14px}.calendar{padding:0 10px}.week,.dates{display:grid;grid-template-columns:repeat(7,1fr);text-align:center}.week span{font-size:13px;color:#555}.week span:first-child,.sun{color:#d8554d}.week span:last-child,.sat{color:#527bc3}.date{height:38px;display:flex;align-items:center;justify-content:center;font-size:20px;position:relative}.date.today{background:#a9d58a}.date.done:after{content:'完';position:absolute;border:2px solid #d8554d;color:#d8554d;border-radius:50%;width:28px;height:28px;line-height:25px;font-size:19px;font-weight:bold}.cards{padding:22px 15px}.hero,.train-card{display:block;width:100%;position:relative;background-size:cover;background-position:center;border-radius:12px;overflow:hidden;color:#fff;text-align:left}.hero:before,.train-card:before{content:'';position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(90deg,rgba(0,0,0,.65),rgba(0,0,0,.18))}.hero{height:120px;margin-bottom:12px;padding:24px 34px}.hero strong,.hero small,.train-card strong,.train-card small,.train-card em{position:relative;display:block}.hero strong{font-size:23px}.hero small{margin-top:12px;font-size:12px}.note{text-align:center;color:#888;font-size:11px;padding:25px 5px}.intro{text-align:center;font-size:14px;margin:28px 10px}.train-list{overflow:auto;max-height:calc(100vh - 130px);padding:0 13px 20px;-webkit-overflow-scrolling:touch}.train-card{height:170px;margin-bottom:6px;padding:22px}.train-card strong{font-size:25px}.train-card small{font-size:13px;margin-top:8px}.train-card em{font-style:normal;font-size:12px;margin-top:48px}.detail{background:#7d8185;color:white;min-height:calc(100vh - 58px);padding:28px 24px;text-align:center}.detail h2{font-size:29px;margin:0 0 15px}.detail p{font-size:14px}.chart{height:145px;margin:35px 0 5px;background:repeating-linear-gradient(to bottom,transparent,transparent 35px,#a6a8a9 36px);position:relative}.chart svg{width:100%;height:100%}.circle{width:120px;height:120px;border-radius:50%;background:white;color:#222;font-size:20px;margin:26px auto;display:block}.small-btn{background:rgba(255,255,255,.25);color:white;border-radius:50%;width:38px;height:38px}.row{display:flex;align-items:center;justify-content:space-between}.red{color:#d9574d}.plain{background:#fff;color:#d9574d;border-radius:8px;padding:14px 24px}.primary{display:block;background:#d9574d;color:#fff;border-radius:9px;padding:15px 20px;width:85%;margin:14px auto}.content{text-align:center;padding:25px 20px}.sub{font-size:13px;color:#777}.game-top{display:flex;justify-content:space-between;color:#888;font-size:13px;margin:28px 20px 0}.progress{height:4px;background:#e2e5e4;margin:16px 20px}.progress span{height:100%;background:#d9574d;display:block}.prompt{text-align:center;margin:28px 0;font-size:16px}.choices{display:grid;grid-template-columns:repeat(3,1fr);max-width:360px;margin:20px auto;grid-column-gap:12px;grid-row-gap:12px;padding:0 15px}.choices.two{grid-template-columns:repeat(2,1fr)}.choice{height:78px;border-radius:10px;background:white;color:#222;font-size:30px}.choice.small{font-size:18px}.display{height:145px;display:flex;align-items:center;justify-content:center;font-size:70px}.hint{text-align:center;color:#888}.feedback{text-align:center;font-size:18px;color:#d9574d}.result{background:#303234;color:#fff;min-height:100vh;padding:28px 24px;text-align:center}.result h2{font-size:25px;margin:35px 0}.score{font-size:54px;color:#8ed6b2;margin:25px}.result-table{background:#202224;border-radius:12px;padding:18px;margin:30px 0}.result-table .row{padding:7px}.result button{display:block;width:80%;margin:12px auto;padding:13px;background:white;border-radius:9px}.result button.secondary{background:#555;color:white}.tabs{display:flex;padding:15px 8px}.tabs button{flex:1;font-size:11px;padding:10px 2px;background:white;border-radius:8px;margin:0 2px}.tabs .selected{background:#7b898c;color:white}.record{background:white;border-radius:8px;margin:8px 20px;padding:12px;display:flex;justify-content:space-between;font-size:13px}.stamp-button{width:100px;height:100px;border-radius:50%;font-size:35px;background:#ddd}.stamp-button.done{background:#d9574d;color:white}#notice{position:fixed;bottom:12px;left:50%;transform:translateX(-50%);background:#a02922;color:white;padding:12px;border-radius:8px;display:none;z-index:9;max-width:95%;font-size:14px}@media(min-width:700px){#app{box-shadow:0 0 20px rgba(0,0,0,.06)}}
/* Neutral press feedback: never encodes correctness. */
button{transition:transform .08s ease,box-shadow .08s ease,background-color .08s ease;-webkit-tap-highlight-color:rgba(217,87,77,.25)}button:active:not(.is-cancelled),button.is-pressed{transform:scale(.97);box-shadow:inset 0 0 0 3px #d9574d;background-color:#f4d9d6}.hero:active:not(.is-cancelled):before,.hero.is-pressed:before,.train-card:active:not(.is-cancelled):before,.train-card.is-pressed:before{background:rgba(94,25,22,.58)}button:disabled{opacity:.55;cursor:default}.choice.chosen,.choice.chosen:disabled{opacity:1;background:#d8dde1;box-shadow:inset 0 0 0 3px #7e8b95;color:#222}.timer-line{display:flex;justify-content:space-between;margin:10px 20px 4px;font-size:12px;color:#666}.timer-track{height:5px;background:#dedede;margin:0 20px}.timer-track span{display:block;width:100%;height:100%;background:#8d9ca3}.game-top{margin-top:20px}.prompt{margin:22px 0}

.timing-note{margin:5px 20px 0;color:#777;font-size:11px;text-align:left}
/* Whimsical ink: original line drawings on quiet paper. */
html,body{color:#242421;background:#ecebe5}body{background-image:repeating-linear-gradient(115deg,transparent 0,transparent 28px,rgba(35,35,32,.015) 29px,transparent 30px)}#app{background:#faf9f4;border-left:1px solid #c3c2b8;border-right:1px solid #c3c2b8;box-shadow:0 4px 18px rgba(0,0,0,.1)}header{background:#faf9f4;border-bottom:2px solid #292925}header h1{font-weight:700;letter-spacing:.1em}header .back,header .right,.red{color:#292925;font-weight:700}button:focus,button:focus-visible{outline:3px dashed #282825;outline-offset:2px}.month strong{font-size:25px}.month button,.small-btn{background:#fff;color:#242421;border:2px solid #292925;border-radius:45% 55% 50% 45%}.week span,.week span:first-child,.week span:last-child,.sun,.sat{color:#555}.date.today{background:#deded5;border:2px solid #282825;border-radius:47% 53% 45% 55%}.date.done:after{border:2px solid #282825;color:#282825;transform:rotate(-10deg)}.hero,.train-card{color:#252522;background-position:center;background-size:cover;border:2px solid #282825;border-radius:15px 12px 17px 11px;box-shadow:3px 4px 0 #b8b7ac}.hero:before,.train-card:before{background:none}.hero strong,.train-card strong{text-shadow:1px 1px #fff}.hero small,.train-card small,.train-card em{color:#42423d}.hero{padding-left:24px}.hero strong{font-size:24px}.train-card{margin-bottom:12px}.train-card strong{font-size:24px}.detail,.result{background:#faf9f4;color:#292925}.detail h2,.result h2{font-weight:800}.chart{background:repeating-linear-gradient(to bottom,transparent,transparent 35px,#dbdad2 36px)}.circle,.plain,.primary,.result button,.stamp-button{border:2px solid #292925;background:#fff;color:#292925;box-shadow:3px 4px 0 #b8b7ac}.circle,.stamp-button{border-radius:47% 53% 49% 51%}.primary,.result button.secondary{background:#292925;color:#fff}.record,.result-table,.tabs button{border:1.5px solid #292925;background:#fff;color:#292925;border-radius:9px 7px 10px 8px}.tabs .selected{background:#292925;color:white}.score{color:#292925;font-weight:800}.choice{border:2px solid #292925;border-radius:12px 9px 13px 10px;box-shadow:3px 4px 0 #c5c4ba;background:#fff;color:#20201e;font-weight:700}.progress,.timer-track{background:#deded7}.progress span,.timer-track span{background:#343431}.game-top,.timer-line,.timing-note,.hint,.note,.sub{color:#66665e}.result-table{box-shadow:3px 4px 0 #b8b7ac}.stamp-button.done{background:#292925;color:white}#notice{background:#292925;color:#fff}button{-webkit-tap-highlight-color:rgba(20,20,20,.2)}button:active:not(.is-cancelled),button.is-pressed{transform:translate(2px,2px) scale(.98);box-shadow:inset 0 0 0 3px #242421;background-color:#d4d4ca}.hero:active:not(.is-cancelled):before,.hero.is-pressed:before,.train-card:active:not(.is-cancelled):before,.train-card.is-pressed:before{background:rgba(30,30,25,.16)}.choice.chosen,.choice.chosen:disabled{background:#dddcd2;color:#242421;box-shadow:inset 0 0 0 3px #55554c}

.answer-feedback{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%) rotate(-1deg);z-index:5;background:#faf9f4;color:#242421;border:3px solid #242421;border-radius:14px 11px 15px 10px;padding:18px 30px;box-shadow:5px 6px 0 #aaa99f;font-size:24px;font-weight:800;white-space:nowrap;pointer-events:none}.answer-feedback[hidden]{display:none}
.daily-progress{text-align:center;margin:12px 0 0;font-size:13px;font-weight:700;color:#4b4b46}
.photo-icon{display:block;width:65px;height:65px;object-fit:contain;margin:auto}.display .photo-icon{width:120px;height:120px}
.house-start{font-size:30px;text-align:center}.house-roof{font-size:78px;display:block;line-height:.8}.mini-person{display:inline-block;margin:3px;font-size:28px}.house-stage{position:relative;width:250px;height:140px;overflow:hidden}.house-drawing{position:absolute;left:92px;top:0;width:95px;height:140px;z-index:2;font-size:125px;line-height:130px;background:#faf9f4}.house-drawing .door{position:absolute;bottom:0;left:37px;width:25px;height:45px;background:#242421;border-radius:12px 12px 0 0}.person{position:absolute;z-index:3;bottom:0;font-size:36px;line-height:38px;animation-duration:1.3s;animation-timing-function:linear;animation-fill-mode:forwards}.person.enter{animation-name:walk-in}.person.leave{animation-name:walk-out}@keyframes walk-in{0%{left:10px;opacity:1}70%{left:130px;opacity:1}100%{left:130px;opacity:0}}@keyframes walk-out{0%{left:130px;opacity:0}25%{left:130px;opacity:1}100%{left:10px;opacity:1}}
.history-item{width:calc(100% - 40px);text-align:left}.train-list{max-height:none;overflow:visible}.mini-person,.person{font-size:0;display:inline-block;width:15px;height:36px;position:relative}.mini-person:before,.person:before{content:'';position:absolute;top:0;left:4px;border:2px solid #242421;border-radius:50%;width:8px;height:8px;background:#faf9f4}.mini-person:after,.person:after{content:'';position:absolute;left:6px;top:12px;width:3px;height:18px;background:#242421;box-shadow:-4px 6px 0 -1px #242421,4px 6px 0 -1px #242421}.house-stage .person{position:absolute;bottom:0}
.memory-grid{display:grid;grid-template-columns:repeat(5,1fr);width:225px;height:190px;margin:0 auto;background:#242421;grid-gap:2px;font-size:20px}.memory-grid span{background:#fff;display:flex;align-items:center;justify-content:center}.display.grid-display{height:200px}.memory-query{width:175px;height:150px;font-size:22px}.memory-query span{background:#eee}.memory-query span:not(:empty){background:#242421;color:#fff}
.memory-grid{grid-template-rows:repeat(5,1fr)}.house-stage .person{width:30px;height:55px}.house-stage .person:before,.house-stage .person:after{display:none}.house-stage .person svg{display:block;width:30px;height:55px}
.keypad{display:grid;grid-template-columns:repeat(3,1fr);grid-gap:7px;gap:7px;max-width:250px;margin:14px auto}.keypad button,.sequence-grid button,.special-grid button{background:#fff;border:2px solid #292925;border-radius:7px;color:#242421;font-size:20px;min-height:42px}.number-answer{text-align:center;font-size:36px;font-weight:bold;margin:15px}.sequence-grid{display:grid;grid-template-columns:repeat(5,1fr);grid-gap:7px;gap:7px;margin:20px auto;padding:0 12px;max-width:390px}.sequence-grid button:disabled{background:#d1d1ca;color:#555}.special-grid{width:235px;height:210px;margin:10px auto}.special-grid button{border:0;border-radius:0;min-height:0;font-size:19px}.special-grid button.selected-cell{background:#292925;color:white}.special-submit{display:block;margin:12px auto}.special-grid+ .hint{margin:6px auto;font-size:12px}
.share-overlay{position:fixed;z-index:30;inset:0;background:rgba(20,20,18,.7);display:flex;justify-content:center;align-items:center;padding:12px}.share-dialog{width:100%;max-width:480px;max-height:calc(100vh - 24px);overflow:auto;background:#faf9f4;border:2px solid #242421;border-radius:14px;padding:14px;box-shadow:5px 6px 0 rgba(0,0,0,.25);text-align:center}.share-head{display:flex;align-items:center;justify-content:space-between}.share-close,.share-native,.share-retry,.share-download{border:2px solid #242421;border-radius:8px;background:white;color:#242421;padding:10px 16px;font:inherit;text-decoration:none;display:inline-block;min-height:44px}.share-native{background:#292925;color:white}.share-image-wrap{max-height:55vh;overflow:auto}.share-image{display:block;width:100%;max-width:300px;height:auto;margin:auto;border:1px solid #b5b4aa}.share-image[hidden],.share-native[hidden],.share-download[hidden],.share-retry[hidden]{display:none}.share-status,.share-help{font-size:13px;color:#555}.share-controls{display:flex;justify-content:center;flex-wrap:wrap;margin-top:12px}.share-controls>*{margin:4px}.share-head strong{font-size:18px}

.chart-empty{position:absolute;top:35%;left:0;right:0;text-align:center}
#app.is-paused *{animation-play-state:paused!important}.quit-overlay{position:fixed;z-index:50;inset:0;background:#f1f0e9;display:flex;align-items:center;justify-content:center;padding:20px}.quit-dialog{width:100%;max-width:360px;background:#faf9f4;border:2px solid #292925;border-radius:15px 12px 17px 11px;box-shadow:5px 6px 0 #b8b7ac;padding:28px 22px;text-align:center}.quit-dialog h2{font-size:23px;margin:5px 0 20px}.quit-dialog p{font-size:15px;line-height:1.5;margin:9px 0}.quit-dialog button{display:block;width:100%;min-height:50px;border:2px solid #292925;border-radius:9px;margin:14px auto 0;font-weight:700}.quit-continue{background:#292925;color:white}.quit-confirm{background:white;color:#292925}
.selection{text-align:center;padding:24px 18px 35px}.selection h2{font-size:23px;margin:6px 0 9px}.selection p{font-size:14px;color:#55554e}.selection-grid{display:grid;grid-template-columns:repeat(2,1fr);grid-gap:10px;max-width:430px;margin:25px auto}.selection-card{min-height:93px;border:2px solid #292925;border-radius:12px 9px 13px 10px;box-shadow:3px 4px 0 #c5c4ba;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;font-weight:700;font-size:17px;transition:background-color .06s,color .06s}.selection-card small{display:block;font-size:12px;min-height:17px;margin-top:5px}.selection-card.active{background:#d7d7cd;box-shadow:inset 0 0 0 3px #292925}.selection-card.locked{background:#292925;color:white}.selection-order{min-height:42px;max-width:430px;margin:0 auto;font-size:14px;font-weight:700;line-height:1.5}.selection-skip{margin-top:12px}@media(prefers-reduced-motion:reduce){.selection-card{transition:none}}
.sequence-grid button{min-height:46px}.sequence-grid button.sequence-tap{background:#d7d7cd;box-shadow:inset 0 0 0 3px #292925}.sequence-instruction{font-size:12px;margin:4px 0}.sequence-grid button:focus:not(:focus-visible){outline:none}
.sequence-grid button{transition:none}
.share-status.share-ready{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.train-list{padding-top:20px}
/* People move behind the solid building; chimney has its own clipping window. */
.house-initial{height:200px;position:relative;display:flex;align-items:center;justify-content:center}.house-initial .initial{position:static;display:flex;gap:7px}.house-initial .house-figure{width:28px;height:58px}.house-initial strong{position:absolute;top:5px;font-size:42px;left:50%;transform:translateX(-50%)}
.house-scene{position:relative;width:330px;max-width:100%;height:210px;overflow:hidden}.house-building{position:absolute;left:100px;top:35px;width:130px;height:140px;z-index:3}.house-crowd{position:absolute;display:flex;gap:0;top:116px;z-index:1}.house-figure{display:block;flex:none;width:24px;height:50px;fill:#242421}.house-crowd.enter{left:calc(-24px * var(--n));animation:house-enter 1.25s linear forwards}.house-crowd.exit{left:112px;animation:house-exit 1.25s linear forwards}@keyframes house-enter{to{transform:translateX(calc(112px + 24px * var(--n)))}}@keyframes house-exit{to{transform:translateX(250px)}}
.chimney-mask{position:absolute;z-index:2;left:191px;top:0;width:24px;height:48px;overflow:hidden}.chimney-mask .house-figure{position:absolute;top:48px;animation:chimney-rise 1.25s linear forwards}@keyframes chimney-rise{to{transform:translateY(-105px)}}
.house-answers{grid-template-columns:repeat(4,1fr)}.house-answers .choice{min-height:52px}

/* The full house viewport occupies layout space instead of overflowing toward the prompt. */
.display.house-display{height:210px;overflow:hidden}

.answer-feedback.incorrect{transform:translate(-50%,-50%)}
