:root{font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei,sans-serif;color:#365b4d;background:#dce8de;font-synthesis:none;--ink:#365b4d;--jade:#346958;--soft:#eef0e5;--gold:#ac905c}*{box-sizing:border-box}body{margin:0;min-height:100svh;background:linear-gradient(90deg,#d2e0d6aa,transparent 40%,#d2e0d6aa),url(/games/jade/landscape.svg) center/cover fixed;display:flex;justify-content:center}button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:focus-visible{outline:3px solid #397f68;outline-offset:3px}button:disabled{cursor:default;opacity:.42}#app{width:464px;max-width:100%;padding:20px 20px 16px;min-height:100svh;background:#eef2e53b;border-inline:1px solid #537b651a;position:relative}header{height:70px;display:flex;justify-content:space-between;align-items:center}.wordmark{display:flex;align-items:center;gap:12px}.seal{font-family:Songti SC,STSong,serif;background:#356b59;color:#f1ecd5;font-size:29px;display:grid;place-items:center;width:43px;height:46px;border-radius:11px 9px 13px 8px;box-shadow:inset 0 0 0 3px #588873,inset 0 0 0 4px #e2d9b85e;transform:rotate(-3deg)}h1{font-family:Songti SC,STSong,serif;font-size:30px;letter-spacing:.2em;margin:0;line-height:1.1;font-weight:600}.wordmark p{font-size:11px;letter-spacing:.14em;margin:6px 0 0;color:#5d7967}nav{display:flex;gap:7px}nav button{border:1px solid #607e6133;border-radius:50%;background:#edf0e5ba;width:35px;height:35px;font-size:17px;display:grid;place-items:center}nav svg{width:18px;height:18px}button:hover:not(:disabled){filter:brightness(1.04)}.levelbar{display:flex;align-items:center;justify-content:space-between;height:51px;margin-top:8px}.levelbar button{border:0;background:transparent;padding:8px 0}#level-num{font-size:12px;color:#edf0df;background:#527965;padding:5px 8px;border-radius:5px}#level-name{font-family:Songti SC,STSong,serif;font-size:19px;font-weight:600}#restart{font-size:17px}#restart span{font-size:12px}.progressline{display:flex;align-items:center;gap:12px;font-size:11px;height:26px;color:#536f5c}.progress{flex:1;height:3px;background:#6d916630;border-radius:3px;overflow:hidden}.progress i{display:block;height:100%;background:#678e6f;width:0;transition:width .3s}#layer-info{white-space:nowrap}.rule{font-size:12px;text-align:center;margin:9px 0 0;color:#4d705c;letter-spacing:.05em}#stage{width:100%;aspect-ratio:440/550;position:relative}#game,#tile-controls{position:absolute;inset:0}#game canvas{display:block}#tile-controls{z-index:2;pointer-events:none}.tile-control{position:absolute;pointer-events:auto;border:0;background:transparent;color:transparent;padding:0;border-radius:12%;transform:translate(-50%,-50%);opacity:1!important}.tile-control:disabled{pointer-events:auto}.tile-control:focus-visible{outline:3px solid #235f4d;outline-offset:-2px}#loading{position:absolute;inset:0;display:grid;place-items:center;font-size:14px}#feedback{text-align:center;margin:0;min-height:32px;font-size:12px;color:#4e6c57;line-height:1.8}.tools{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.tools button{background:#edf0e7cc;border:1px solid #7b926243;border-radius:14px;padding:10px 4px 9px;box-shadow:0 4px #64806614;display:flex;align-items:center;flex-direction:column;gap:6px}.tool-icon{font-size:27px;line-height:1;color:#628265}.tools strong{font-size:13px;font-weight:500;display:flex;align-items:center;gap:8px}.tools em{font-style:normal;background:#52765f;color:#f3f0df;border-radius:50%;width:17px;height:17px;line-height:17px;text-align:center;font-size:10px}.tools small{font-size:10px;color:#58705d}footer{display:flex;justify-content:space-between;font-size:9px;color:#5e7562;margin-top:20px;gap:5px}dialog{border:1px solid #b4bf9d;border-radius:22px;background:#edf0e3;color:#365b4d;box-shadow:0 18px 70px #264c4233;width:calc(100% - 40px);max-width:360px;padding:0;max-height:85svh}dialog::backdrop{background:#254d4166;backdrop-filter:blur(3px)}.modal-content{position:relative;padding:35px 26px 27px;text-align:center}.close{position:absolute;right:14px;top:10px;background:transparent;border:0;font-size:25px}.close[hidden]{display:none}#modal-mark{margin:auto auto 18px;width:50px;height:50px;border:1px solid #afbd9b;border-radius:50%;display:grid;place-items:center;font-family:Songti SC,STSong,serif;font-size:27px;color:#7f9069}h2{font-family:Songti SC,STSong,serif;font-size:25px;font-weight:600;margin:0 0 15px}#modal-body{font-size:13px;line-height:1.9;color:#52705b}#modal-body p{margin:9px 0}#modal-body .instructions{text-align:left}#modal-actions{display:flex;flex-direction:column;gap:10px;margin-top:23px}#modal-actions button{border:1px solid #8b9d734d;background:#e6eadb;padding:12px 15px;border-radius:10px;min-height:44px;font-size:14px}#modal-actions button.primary{background:#386c58;color:#f0eddc;border-color:#386c58}.warn{color:#945d48!important}@media(min-width:850px){body{background-size:cover}#app{box-shadow:0 0 100px #e7eee099;min-height:100svh}body:before{content:"云山有意\a玉叠成趣";white-space:pre;font-family:Songti SC,STSong,serif;font-size:28px;letter-spacing:.24em;line-height:2.5;color:#527d645c;position:fixed;right:calc(50% + 290px);top:31%;writing-mode:vertical-rl}}@media(max-height:760px),(min-width:600px)and (max-height:850px){#app{padding:10px 16px}header{height:54px}.wordmark p{margin-top:4px}.seal{width:38px;height:40px;font-size:26px}h1{font-size:26px}.levelbar{height:38px;margin-top:3px}.progressline{height:19px}.rule{margin-top:4px;font-size:11px}#feedback{min-height:26px;font-size:11px}.tools button{padding:7px 3px;gap:4px}.tool-icon{font-size:21px}.tools small{font-size:9px}footer{margin-top:11px;font-size:8px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}@media(min-width:600px)and (max-height:850px){#stage{width:min(100%,max(316px,calc((100svh - 290px)*.8)));margin-inline:auto}}@media(max-height:700px)and (max-width:599px){#stage{width:min(100%,max(316px,calc((100svh - 253px)*.8)));margin-inline:auto}footer{display:none}}nav button{position:relative}nav button:after{content:"";position:absolute;inset:-5px}nav button:focus-visible{outline-offset:2px}.level-heading{display:flex;gap:10px;align-items:center}.levelbar button:disabled{opacity:1}footer{justify-content:flex-end}.tools button.tool-active{opacity:.9;border-color:#527965;box-shadow:0 0 0 2px #52796520}.tools button.tool-active .tool-icon{color:#346958}#records{border:0;background:transparent;display:flex;align-items:center;gap:5px;white-space:nowrap;font-size:11px;padding:5px 0;position:relative}#records:after{content:"";position:absolute;inset:-4px 0}#timer,.rankings,.result-time{font-variant-numeric:tabular-nums}#timer{min-width:49px;text-align:right}#penalty{font-size:9px;color:#945d48}#penalty:empty{display:none}.result-time{margin:15px 0 12px;padding:13px 0;border-block:1px solid #8b9d732e;display:flex;align-items:center;flex-direction:column;gap:3px}.result-time>span{font-size:11px;letter-spacing:.12em}.result-time strong{font-size:32px;font-weight:500;color:#365b4d;line-height:1.3}.result-time small{font-size:11px}.rankings{width:100%;border-collapse:collapse;margin:13px 0;text-align:center;font-size:12px}.rankings th,.rankings td{padding:7px 3px;border-bottom:1px solid #8b9d7326;font-weight:400}.rankings thead th{font-size:10px;color:#71836a}.rankings .current-record{background:#52796515;color:#365b4d}.rank-tabs{display:flex;gap:7px}.rank-tabs button{flex:1;border:1px solid #8b9d734d;border-radius:8px;background:transparent;padding:10px 4px;font-size:12px;min-height:40px}.rank-tabs button[aria-pressed=true]{background:#527965;color:#edf0df}.record-note{font-size:10px}.empty-records{padding:20px 0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}#seal{border:0;padding:0;flex-shrink:0}.levelbar #debug-levels{font-size:10px;padding:5px 6px;border:1px solid #8b9d734d;border-radius:5px;background:#edf0e7cc;white-space:nowrap}#debug-levels[hidden]{display:none}@media(max-height:620px)and (max-width:599px){#app{padding:6px 16px}header{height:44px}.levelbar{height:32px;margin-top:0}.progressline{height:17px}.rule{margin:1px 0 0;font-size:10px;line-height:14px}#feedback{min-height:20px;font-size:10px;line-height:1.6}.tools button{padding:5px 3px;gap:3px}.tool-icon{font-size:18px}.tools strong{font-size:12px}.wordmark p{margin-top:2px}}.result-name{text-align:left;margin-top:16px;padding-top:14px;border-top:1px solid #8b9d732e;display:grid;grid-template-columns:1fr auto;gap:8px}.result-name label{grid-column:1/-1;font-size:12px}.result-name input{min-width:0;width:100%;border:1px solid #8b9d7366;border-radius:8px;padding:10px;background:#f7f7ed;color:#365b4d;font:inherit;font-size:14px}.result-name button{border:0;border-radius:8px;padding:9px 10px;background:#386c58;color:#f0eddc;font-size:12px}.result-name .name-status{grid-column:1/-1;font-size:11px;margin:0!important}.rankings .record-name{max-width:90px;overflow-wrap:anywhere}.rankings{font-size:11px}details{margin-top:12px}summary{cursor:pointer;font-size:11px}:lang(en) .seal{font-size:14px;letter-spacing:0}:lang(en) .wordmark h1{font-size:22px;letter-spacing:-.03em}:lang(en) .wordmark p{font-size:9px;letter-spacing:0}:lang(en) #level-name{font-size:17px}:lang(en) .tools small{font-size:9px;letter-spacing:0}:lang(en) #modal-mark{font-size:17px}:lang(en) .rule{font-size:11px;letter-spacing:0}@media(min-width:850px){html:lang(en) body:before{content:"A little calm.\a A little play.";font-size:23px;letter-spacing:.08em}}@media(max-width:360px){:lang(en) .wordmark h1{font-size:20px}:lang(en) .wordmark p{max-width:118px;font-size:8px}}
