*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden;overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}body{color:#514638;background:#ece8f1;font-family:"PingFang SC","Hiragino Sans GB",sans-serif}button{font:inherit;color:inherit;border:0;cursor:pointer;padding:0;touch-action:none;-webkit-tap-highlight-color:transparent}button:focus-visible{outline:3px solid #527f91;outline-offset:3px}button:disabled{cursor:default;opacity:.3}button,svg,img{-webkit-user-drag:none}button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}[hidden]{display:none!important}.game{display:grid;grid-template-columns:minmax(0,1fr) 272px;grid-template-rows:64px minmax(0,1fr);padding:0 max(0px,env(safe-area-inset-right)) max(0px,env(safe-area-inset-bottom)) max(0px,env(safe-area-inset-left));height:100%;min-height:0}.topbar{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;padding:10px 20px;border-bottom:1px solid #61514216;gap:10px}.brand{display:flex;align-items:center;gap:10px}.brand img{width:38px;height:38px}.brand h1{font:600 21px/1.2 "Songti SC","STSong",serif;letter-spacing:2px;margin:0}.top-actions{display:flex;gap:6px;padding-right:14px}.icon-button{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:transparent;color:#6c635a}.icon-button:hover{background:#ffffff75}.icon-button[aria-pressed="false"]{opacity:.45}.scene{position:relative;min-width:0;min-height:0;overflow:hidden}.scene-caption{position:absolute;top:26px;left:32px;pointer-events:none;z-index:2}.scene-caption>span{color:#8d8294;font-size:11px;letter-spacing:2px}.scene-caption h2{font:600 26px/1.4 "Songti SC","STSong",serif;margin:6px 0}.scene-caption p{color:#827888;font-size:12px;margin:0;line-height:1.6}.scene-caption::before{content:"";position:absolute;left:-12px;top:23px;height:31px;width:3px;border-radius:2px;background:#a995ac}#world{position:absolute;inset:0}canvas{display:block;width:100%;height:100%;touch-action:none;outline:none}canvas:focus-visible{box-shadow:inset 0 0 0 3px #658d9b}#loading,#fatal{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#ece8f1;font-size:15px;z-index:4}#fatal{flex-direction:column;text-align:center;padding:20px}#fatal button{background:#739380;color:white;padding:12px 24px;border-radius:12px}.woodbox{background:#f8f5ef;border-left:1px solid #ddcdbc;display:flex;flex-direction:column;min-height:0;padding:28px 18px 14px;position:relative;gap:0}.woodbox:before{content:"";position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(2deg,transparent 0,transparent 16px,#9a79530a 17px,transparent 18px)}.woodbox>*{position:relative}.box-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.box-heading h2{font:600 19px/1.3 "Songti SC","STSong",serif;margin:0 0 6px}.hint-button{background:#e9dcc8;border:1px solid #ceb89b;color:#8b6c43;border-radius:50%;width:36px;aspect-ratio:1;font:600 20px "Songti SC",serif;flex-shrink:0}.hint-button:hover{background:#dfc8a6}.progress-row{display:flex;justify-content:space-between;font-size:11px;color:#a08970;margin:22px 0 8px}.progress-track{height:5px;background:#e8e0d3;border-radius:5px;overflow:hidden}.progress-track i{display:block;height:100%;width:0;background:#7b9d85;border-radius:inherit;transition:width .35s}.pieces{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:repeat(3,minmax(0,1fr));flex:1;min-height:0;gap:12px 10px;margin:23px 0 10px;max-height:510px}.piece{background:#ede4d647;border:1px solid #e0d4c3;border-radius:12px;display:flex;flex-direction:column;align-items:center;min-width:0;min-height:0;position:relative;transition:background .18s,border-color .18s;touch-action:none}.piece img{width:100%;height:calc(100% - 30px);min-height:0;object-fit:contain;pointer-events:none}.piece span{height:25px;line-height:22px;font-size:12px;color:#857159;pointer-events:none}.piece:hover{background:#eae1d1}.piece[aria-pressed="true"]{background:#e1e9e0;border:2px solid #799a86}.piece[aria-pressed="true"]::after{content:"";position:absolute;right:5px;top:5px;width:6px;aspect-ratio:1;background:#73957f;border-radius:50%}.box-footer{display:flex;align-items:center;justify-content:center;gap:26px;color:#9b8a75;font-size:11px;margin-top:auto}.box-footer button{width:32px;height:32px;border-radius:50%;background:transparent;font-size:24px;line-height:1}.box-footer button:hover{background:#e7decf}.chapters{display:flex;gap:5px;margin-top:23px;padding-top:14px;border-top:1px solid #ddd1bd}.chapters button{flex:1;position:relative;height:37px;border-radius:7px;background:transparent;color:#a28b75;font-size:12px}.chapters button[aria-pressed="true"]{background:#e8ddcc;color:#776144}.chapters button span{display:none;position:absolute;top:2px;right:3px;font-size:9px;color:#63927b}.chapters button.done span{display:block}.view-controls{position:absolute;bottom:58px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:3px;background:#faf8f0c2;border:1px solid #ffffffd9;border-radius:24px;padding:3px 9px;z-index:2;backdrop-filter:blur(10px)}.view-controls button{width:36px;height:36px;background:transparent;font-size:22px;border-radius:50%;display:grid;place-items:center;color:#8a7f87}.view-controls button:hover{background:#dfd8e5}.view-controls button svg{width:17px;height:17px}.view-divider{height:17px;width:1px;background:#cec6d2;margin:0 5px}.toast{position:absolute;top:120px;left:50%;transform:translateX(-50%) translateY(-6px);padding:10px 18px;background:#fffff3ec;color:#83705a;border-radius:20px;box-shadow:0 3px 16px #5e46500c;font-size:12px;z-index:6;pointer-events:none;opacity:0;transition:opacity .2s,transform .2s;max-width:calc(100% - 32px);white-space:nowrap}.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}.hint-marker{position:absolute;pointer-events:none;width:54px;aspect-ratio:1;border:2px solid #faf1bd;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 0 6px #d0ac6570;z-index:3}.hint-marker span{display:block;position:absolute;inset:-8px;border:1px solid #fff8d7;border-radius:50%;animation:breathe 1.6s infinite}.drag-ghost{position:fixed;width:112px;height:94px;pointer-events:none;z-index:120;transform:translate(-50%,-50%);display:grid;place-items:center}.drag-ghost img{height:100%;width:100%;object-fit:contain;filter:drop-shadow(0 5px 5px #634c4828)}dialog{color:#665442;border:0;background:#fbf8f1;border-radius:18px;box-shadow:0 20px 80px #46374335;max-width:calc(100% - 32px)}dialog::backdrop{background:#51405960;backdrop-filter:blur(4px)}.album-dialog{width:860px;padding:28px;max-height:calc(100% - 36px);overflow:auto}.dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:22px}.dialog-heading h2{font:600 25px "Songti SC",serif;margin:0 0 10px}.dialog-heading p{font-size:12px;color:#a18d75;margin:0}.dialog-heading button{font-size:28px;background:transparent;width:36px;height:36px}.album-pages{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.album-page{border:1px solid #e1d5c2;background:#f0e8db;border-radius:10px;overflow:hidden;text-align:left}.album-page img{width:100%;height:145px;object-fit:cover;display:block;background:#e9e3ed}.album-page .album-placeholder{height:145px;display:grid;place-items:center;font:600 44px "Songti SC",serif;color:#c3b8a3;background:#ede7df}.album-page div:last-child{padding:14px}.album-page strong{display:block;font:600 17px "Songti SC",serif;margin-bottom:6px}.album-page small{color:#a18c74;font-size:11px}.restart-dialog{width:360px;padding:26px}.restart-dialog h2{font:600 22px "Songti SC",serif;margin:0 0 12px}.restart-dialog p{font-size:13px;color:#a08b73;line-height:1.8}.restart-dialog>div{display:flex;gap:10px;margin-top:24px}.restart-dialog button{flex:1;background:#e9dfce;padding:11px;border-radius:10px;font-size:13px}.restart-dialog button:last-child{background:#799981;color:white}@keyframes breathe{50%{transform:scale(1.18);opacity:.5}}@media(orientation:portrait){.game{grid-template-columns:1fr;grid-template-rows:62px minmax(0,1fr) 292px}.topbar{padding-left:16px}.brand h1{font-size:20px}.scene-caption{top:20px;left:25px}.scene-caption h2{font-size:22px}.scene-caption p{font-size:11px}.woodbox{border-left:0;border-top:1px solid #d8c6ad;padding:12px 16px 8px;display:grid;grid-template-columns:minmax(0,1fr) 80px;grid-template-rows:38px 4px minmax(0,1fr) 32px;gap:7px 10px}.box-heading{grid-column:1/-1}.box-heading h2{font-size:16px;margin:0}.hint-button{width:32px;font-size:19px}.progress-row{position:absolute;right:60px;top:14px;margin:0;gap:7px;font-size:10px}.progress-row #progress-percent{display:none}.progress-track{grid-column:1/-1;height:3px}.pieces{grid-column:1/-1;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:1fr;max-height:none;margin:2px 0;gap:6px;height:100%}.piece{border-radius:9px}.piece img{height:calc(100% - 23px)}.piece span{font-size:10px;height:21px;line-height:20px}.box-footer{grid-column:2;grid-row:4;gap:3px;margin:0;justify-content:flex-end;font-size:10px}.box-footer button{width:24px;height:26px;font-size:21px}.chapters{grid-row:4;grid-column:1;margin:0;padding:0;border:0;gap:4px;align-self:center;max-width:230px}.chapters button{height:30px;font-size:11px}.view-controls{bottom:40px}.toast{top:108px}.album-pages{grid-template-columns:1fr}.album-page{display:grid;grid-template-columns:100px 1fr}.album-page img,.album-page .album-placeholder{height:110px;width:100px}.album-dialog{width:460px;padding:22px}}@media(orientation:portrait) and (max-width:600px){.game{grid-template-rows:58px minmax(0,1fr) 260px}.woodbox{grid-template-rows:35px 3px minmax(0,1fr) 28px}.pieces{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:6px}.piece{display:grid;grid-template-columns:1fr 35px;align-items:center}.piece img{width:100%;height:100%;min-height:0}.piece span{height:auto;line-height:1.3;font-size:10px;text-align:left;padding-right:4px}.scene-caption p{max-width:260px}.brand img{width:32px;height:32px}.top-actions{gap:1px;padding-right:4px}.icon-button{width:33px;height:33px}}@media(orientation:landscape) and (max-height:600px){.game{grid-template-columns:minmax(0,1fr) 218px;grid-template-rows:48px minmax(0,1fr)}.topbar{padding:5px 12px}.brand img{width:31px;height:31px}.brand h1{font-size:18px}.icon-button{height:33px;width:33px}.woodbox{padding:11px 12px 6px}.box-heading h2{font-size:16px;margin-bottom:3px}.hint-button{width:30px;font-size:18px}.progress-row{font-size:10px;margin:10px 0 5px}.pieces{margin:10px 0 4px;gap:6px;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}.piece img{height:calc(100% - 22px)}.piece span{font-size:10px;height:21px;line-height:18px}.box-footer{gap:16px;font-size:10px}.box-footer button{height:24px;width:24px}.chapters{margin-top:7px;padding-top:6px}.chapters button{height:28px;font-size:11px}.scene-caption{top:14px;left:25px}.scene-caption h2{font-size:21px;margin:3px 0}.scene-caption p{font-size:10px}.scene-caption>span{font-size:9px}.view-controls{bottom:28px;padding:1px 6px}.view-controls button{width:29px;height:29px;font-size:19px}.toast{top:95px}.album-page img,.album-page .album-placeholder{height:105px}.album-dialog{padding:18px}.dialog-heading{margin-bottom:14px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* The book displays one chapter at a time, including on narrow screens. */
.level-nav{display:flex;align-items:center;gap:6px;margin-top:22px;padding-top:13px;border-top:1px solid #ddd1bd}
.level-nav>button{height:42px;border-radius:9px;background:transparent;color:#9a8064}
.level-nav>button:first-child,.level-nav>button:last-child{width:34px;flex-shrink:0;font:25px Georgia,serif}
.level-nav>button:hover{background:#e9dfce}
.level-nav #open-levels{flex:1;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;background:#ece2d2}
#level-number{font:500 13px Georgia,serif;letter-spacing:1px;color:#796244}
#level-status{font-size:10px;color:#a28b70}
.album-dialog{width:920px;padding:26px;overscroll-behavior:contain}
.dialog-heading{margin-bottom:18px}
.chapter-picker{display:flex;align-items:center;gap:12px}
.chapter-picker label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.chapter-picker button{width:34px;height:34px;background:#eee4d5;border-radius:50%;font:24px Georgia,serif;flex-shrink:0}
.chapter-picker select{flex:1;min-width:0;appearance:auto;background:#f4ece0;border:1px solid #deccb3;border-radius:9px;padding:10px 14px;font:14px "PingFang SC",sans-serif;color:#7b664b}
.chapter-picker select:focus-visible{outline:2px solid #799a86;outline-offset:2px}
.chapter-progress{font-size:11px;color:#a18b6e;letter-spacing:.6px;margin:14px 0}
.album-pages{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.album-page{display:block;position:relative;touch-action:manipulation}
.album-page[aria-current="true"]{outline:2px solid #799a86;outline-offset:2px}
.album-page:hover{border-color:#bca17c}
.album-page .album-preview{height:103px;padding:0;position:relative;display:grid;place-items:center;background:#ede7df;overflow:hidden}
.album-symbol{font:500 35px Georgia,serif;color:#b5a58b}
.album-preview[data-theme="coast"]{background:#e2e9e8}.album-preview[data-theme="garden"]{background:#e6e9dd}
.album-preview[data-theme="winter"]{background:#e6e6ed}.album-preview[data-theme="market"]{background:#efe2ce}
.album-preview[data-theme="study"]{background:#e9e0dc}.album-preview[data-theme="camp"]{background:#dfe6df}
.album-preview img{width:100%;height:100%;object-fit:cover}
.album-badge{position:absolute;top:7px;left:7px;min-width:22px;height:22px;padding:0 5px;border-radius:50%;background:#faf7eddf;color:#8b7758;font:11px/22px Georgia,serif;text-align:center}
.album-page .album-copy{padding:10px 9px 12px}
.album-copy strong{font-size:13px;line-height:1.45;min-height:19px;margin-bottom:5px}
.album-copy small{font-size:10px;white-space:nowrap}
.album-note{margin:20px 0 0;font-size:11px;line-height:1.7;text-align:center;color:#a28e74}
@media(orientation:portrait){
 .level-nav{grid-row:4;grid-column:1;align-self:center;margin:0;padding:0;border:0;max-width:230px;gap:4px}
 .level-nav>button{height:30px}.level-nav>button:first-child,.level-nav>button:last-child{width:26px;font-size:22px}
 .level-nav #open-levels{flex-direction:row;gap:9px}#level-number{font-size:12px}#level-status{font-size:9px}
 .album-dialog{width:860px;padding:22px}.album-pages{grid-template-columns:repeat(5,minmax(0,1fr));gap:11px}
 .album-page{display:block}.album-preview img{width:100%}.album-copy strong{font-size:12px}
}
@media(orientation:portrait) and (max-width:600px){
 .level-nav{max-width:230px}.level-nav>button{height:28px}#level-status{font-size:8px}
 .album-dialog{padding:19px;max-height:calc(100% - 28px)}.dialog-heading h2{font-size:23px}
 .album-pages{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.album-page .album-preview{height:88px}
 .album-copy strong{font-size:13px}.album-note{font-size:10px}.chapter-picker{gap:9px}.chapter-picker select{font-size:12px;padding:9px}
}
@media(orientation:landscape) and (max-height:600px){
 .level-nav{margin-top:7px;padding-top:6px;gap:4px}.level-nav>button{height:29px}
 .level-nav #open-levels{flex-direction:row;gap:8px}#level-number{font-size:12px}#level-status{font-size:8px}
 .album-dialog{padding:18px}.dialog-heading h2{font-size:21px;margin-bottom:5px}.dialog-heading{margin-bottom:12px}
 .chapter-picker select{padding:8px 12px;font-size:12px}.chapter-progress{margin:10px 0}
 .album-page .album-preview{height:80px}.album-copy strong{font-size:12px}.album-note{margin-top:12px;font-size:10px}
}



@media(pointer:coarse),(max-width:600px),(max-height:600px){.view-controls{display:none}}

#level-number,#level-status{white-space:nowrap}
@media(orientation:landscape) and (max-height:600px){.level-nav #open-levels{gap:4px}#level-number{font-size:11px;letter-spacing:.4px}}

/* The scene grows into the space released by the box. The box remains reachable. */
.game{position:relative;overflow:hidden;--tray-size:272px;--header-size:64px}
.game.tray-hidden{grid-template-columns:minmax(0,1fr);grid-template-rows:64px minmax(0,1fr)}
.game.tray-hidden .woodbox{display:none}
.tray-grip{position:absolute;right:calc(var(--tray-size) - 22px + env(safe-area-inset-right));top:calc(var(--header-size) + (100% - var(--header-size) - env(safe-area-inset-bottom))/2 - 44px);z-index:8;width:44px;height:88px;background:transparent;border:0;box-shadow:none;cursor:ew-resize;touch-action:none}
.tray-grip::before{content:"";position:absolute;left:21px;top:30px;width:3px;height:28px;border-radius:3px;background:#998c7e66;pointer-events:none}
.game.tray-hidden .tray-grip{right:env(safe-area-inset-right)}
@media(hover:hover){.tray-grip:hover::before{background:#8c7d6b8c}}
#music[aria-pressed="true"]{color:#64886f}
@media(orientation:portrait){
 .game{--tray-size:292px;--header-size:62px}.game.tray-hidden{grid-template-rows:62px minmax(0,1fr)}
 .woodbox{padding-top:24px}.progress-row{top:26px}
 .tray-grip,.game.tray-hidden .tray-grip{top:auto;right:auto;left:50%;bottom:calc(var(--tray-size) - 32px + env(safe-area-inset-bottom));transform:translateX(-50%);width:112px;height:44px;cursor:ns-resize}
 .tray-grip::before{left:40px;top:22px;width:32px;height:3px}
 .game.tray-hidden .tray-grip{bottom:env(safe-area-inset-bottom)}
 .game.tray-hidden::after{content:"";position:absolute;left:env(safe-area-inset-left);right:env(safe-area-inset-right);bottom:env(safe-area-inset-bottom);height:32px;background:#f8f5ef;border-top:1px solid #51463810;z-index:4;pointer-events:none}
 .game.tray-gripping .woodbox{display:grid;position:absolute;left:env(safe-area-inset-left);right:env(safe-area-inset-right);bottom:env(safe-area-inset-bottom);height:var(--tray-size);z-index:5;transform:translateY(var(--tray-drag));pointer-events:none}
 .game.tray-gripping .tray-grip{bottom:calc(var(--tray-size) - 32px - var(--tray-drag) + env(safe-area-inset-bottom))}
 .game.tray-gripping::after{display:none}
}
@media(orientation:portrait) and (max-width:600px){.game{--tray-size:260px;--header-size:58px}.game.tray-hidden{grid-template-rows:58px minmax(0,1fr)}.top-actions{gap:0;padding-right:6px}.icon-button{width:31px}.brand{gap:7px}.brand h1{font-size:19px}}
@media(orientation:landscape) and (max-height:600px){.game{--tray-size:218px;--header-size:48px}.game.tray-hidden{grid-template-rows:48px minmax(0,1fr)}}

/* A completed scene leaves its carved keepsake inside the empty wooden box. */
.woodbox>.toast{top:18px;padding:6px 12px;font-size:11px;border:1px solid #c7aa7c;border-radius:6px;background:#fff9ec;color:#735b39;box-shadow:0 2px 0 #ae8c5733;z-index:9}
.level-complete .box-heading,.level-complete .progress-row,.level-complete .progress-track{display:none}
.level-complete .woodbox{gap:10px}
.level-complete .level-nav{margin-top:0;flex-shrink:0}
.finished-box{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;width:100%;padding:0}
.finish{position:relative;isolation:isolate;overflow:hidden;display:grid;align-content:center;gap:10px;width:100%;max-width:540px;max-height:350px;padding:16px 12px;border:5px solid #d5b889;border-radius:12px;background:#fffaf0;box-shadow:0 3px 0 #ad8353,inset 0 0 0 1px #e7d5b7;color:#5d4932}
.finish::before,.finish::after{content:"";position:absolute;top:5px;width:3px;height:3px;border-radius:50%;background:#aa8253;box-shadow:0 1px 0 #f8e9cd}
.finish::before{left:5px}.finish::after{right:5px}
.finish-copy{display:flex;align-items:center;gap:12px;min-width:0;text-align:left;z-index:1}
.finish-copy>div{min-width:0}
.finish-seal{width:58px;flex:0 0 58px;filter:drop-shadow(0 2px 0 #b9976450)}
.finish .finish-scene{margin:0 0 4px;font:500 11px "Songti SC",serif;color:#8b785b;line-height:1.4}
.finish h3{margin:0;font:600 24px "Songti SC","STSong",serif;letter-spacing:1px;color:#5b4931;white-space:nowrap}
.finish .finish-story{margin:0;font-size:12px;line-height:1.7;color:#897252;text-align:left;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.finish-actions{display:flex;align-items:center;gap:7px;z-index:1}
.finish-actions button{min-width:44px;height:44px;padding:0 12px;border-radius:7px;font-size:12px;white-space:nowrap;color:#655034;background:transparent}
.finish-actions #finished-photo{width:44px;flex:0 0 44px;padding:11px;border:1px solid #d7c4a3;background:#fbf3e4}
#finished-photo svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.finish-actions #next-scene{flex:1;background:repeating-linear-gradient(2deg,#ffffff00 0 7px,#a47b3d12 8px 9px),#e6c99c;border:1px solid #b28a53;box-shadow:0 3px 0 #a47b48,inset 0 1px 0 #fff0d3;color:#634b2c;font-weight:600}
.finish-actions button:active{transform:translateY(2px)}
.finish-actions #next-scene:active{box-shadow:0 1px 0 #a47b48}
.finish-flecks{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:0}
.finish-flecks i{position:absolute;left:var(--x);top:20%;width:6px;height:10px;border-radius:2px;background:#d2ac6a;opacity:0}
.finish-flecks i:nth-child(1){--x:8%;--r:-32deg}.finish-flecks i:nth-child(2){--x:25%;--r:44deg;background:#8d9e70}.finish-flecks i:nth-child(3){--x:42%;--r:-60deg}.finish-flecks i:nth-child(4){--x:64%;--r:32deg;background:#8d9e70}.finish-flecks i:nth-child(5){--x:81%;--r:60deg}.finish-flecks i:nth-child(6){--x:92%;--r:-24deg;background:#d6bd8c}
.celebrating .finish-seal{animation:seal-press .5s cubic-bezier(.2,.8,.3,1) both}
.celebrating .finish-flecks i{animation:wood-fleck 1s ease-out both}
.celebrating .finish-flecks i:nth-child(even){animation-delay:.12s}
@keyframes seal-press{0%{transform:scale(1.18) rotate(-10deg);opacity:0}65%{transform:scale(.96) rotate(2deg);opacity:1}100%{transform:scale(1) rotate(0)}}
@keyframes wood-fleck{0%{opacity:0;transform:translateY(-25px) rotate(0)}20%{opacity:.7}100%{opacity:0;transform:translateY(130px) rotate(var(--r))}}
@media(orientation:portrait){
 .level-complete .woodbox{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) 32px;gap:8px;padding-top:24px}
 .level-complete .finished-box{grid-column:1;grid-row:1}.level-complete .level-nav{grid-column:1;grid-row:2;width:100%;align-self:center}
 .finish{height:100%;gap:8px;padding:10px 14px;align-content:center}.finish-seal{width:52px;flex-basis:52px}.finish .finish-story{-webkit-line-clamp:2}.finish h3{font-size:23px}
 .finish-actions #next-scene{flex:0 0 116px;margin-left:auto}
}
@media(orientation:portrait) and (max-width:600px){.level-complete .woodbox{grid-template-rows:minmax(0,1fr) 28px}.finish{padding:9px 12px;gap:7px}.finish h3{font-size:22px}.finish .finish-story{font-size:11px}.finish-copy{gap:11px}.finish-seal{width:48px;flex-basis:48px}}
@media(orientation:landscape){.finish-copy{flex-direction:column;gap:9px;text-align:center}.finish .finish-scene{text-align:center}.finish .finish-story{text-align:center}.finish h3{font-size:23px}.finish-actions{flex-wrap:wrap;justify-content:center}.finish-actions #next-scene{flex-basis:100%;margin-top:2px}}
@media(orientation:landscape) and (max-height:600px){.level-complete .woodbox{padding-top:23px;gap:8px}.finish{padding:10px 9px;gap:8px}.finish-seal{width:44px;flex-basis:44px}.finish-copy{gap:4px}.finish h3{font-size:21px}.finish .finish-story{font-size:11px;line-height:1.6;-webkit-line-clamp:2}.finish-actions{gap:4px}.finish-actions button{padding:0 10px}}
@media(prefers-reduced-motion:reduce){.celebrating .finish-seal,.celebrating .finish-flecks i{animation:none}}
