*{box-sizing:border-box}
:root{color-scheme:light;font-family:system-ui,"PingFang SC","Microsoft YaHei",sans-serif;--accent:#ff8a3d}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#254d46}
body{display:grid;place-items:start center}
#game{position:relative;width:100vw;height:100vh;height:100dvh;overflow:hidden;container-type:size;background:#86d3eb url('images/gen/gptimg_1796132635_look.jpg') center/100% 100% no-repeat;user-select:none}
@media (min-aspect-ratio:3/4){#game{width:min(100vw,72vh);width:min(100vw,72dvh)}}
#field{display:block;width:100%;height:100%;touch-action:none}
button{font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
button:focus-visible{outline:3px solid white;outline-offset:2px}
button:disabled{cursor:default}
[hidden]{display:none!important}
#score,#size{position:absolute;top:3.4%;height:4%;display:grid;place-items:center;background:#406e87;color:white;font-size:clamp(13px,4.5cqi,30px);font-weight:850;text-shadow:0 .06em .08em #273743;line-height:1;pointer-events:none}
#score{left:11.8%;width:12.4%}
#size{left:67.4%;width:8.6%}
#meter{position:absolute;left:41.6%;top:3.86%;height:2.95%;width:24.9%;overflow:hidden;background:#394f63;border-radius:0 999px 999px 0;pointer-events:none}
#meter i{display:block;width:20%;height:100%;background:linear-gradient(#b6ed58,#72c634);border-radius:inherit;transition:width .28s ease-out}
#size.pop{animation:size-pop .32s ease-out}
@keyframes size-pop{40%{transform:scale(1.15);color:#fff1a5}}
#pause{position:absolute;right:2%;top:.9%;width:13%;min-width:44px;height:9%;min-height:44px;background:transparent;border:0;border-radius:50%}
#panel{position:absolute;inset:0;pointer-events:none;text-align:center;color:#75432c}
#title,#hint{position:absolute;margin:0;display:grid;place-items:center;line-height:1.1}
#title{top:75%;left:34%;width:32%;height:5.9%;background:linear-gradient(transparent 15%,#fff9ec 15% 26%,#f8e8d5 26%);border-radius:0 0 12px 12px;color:#914e2b;text-shadow:0 .06em #fff;font-size:clamp(18px,min(5.5cqi,4.8cqh),38px);font-weight:900}
#hint{top:80.5%;left:21%;width:58%;height:4.8%;background:#f8e8d5;font-size:clamp(12px,min(3.4cqi,2.9cqh),23px);font-weight:750}
#action,#retry{position:absolute;pointer-events:auto;white-space:nowrap}
#action{left:27.55%;top:85.55%;width:44.9%;height:7.6%;min-height:32px;border:1px solid #d68b21;border-radius:999px;color:#fff;background:linear-gradient(#ffdc42,#ffad19 72%,var(--accent));box-shadow:inset 0 2px #ffe67a,0 2px #b87024;text-shadow:0 .09em .1em #99531e;font-weight:900;font-size:clamp(13px,min(4cqi,3.6cqh),27px)}
#action:disabled{opacity:.8}
#retry{left:24%;width:52%;top:93.4%;height:4.4%;min-height:32px;border:0;border-radius:999px;background:#f8e8d5;color:#75432c;font-size:clamp(12px,min(3cqi,2.85cqh),19px);font-weight:750}
#panel[data-view="lost"] #title,#panel[data-view="lost"] #action:not(:disabled){color:transparent;background:none;border-color:transparent;box-shadow:none;text-shadow:none}
#panel[data-view="lost"] #action:focus-visible{outline-color:#75432c}

/* Reuse the illustrated leaf frame without baking its title or buttons into the active panel. */
#panel:not([data-view="menu"])::before{content:"";position:absolute;left:16%;right:16%;top:75.7%;bottom:4.5%;border:.65cqi solid #c59967;border-radius:5cqi;background:linear-gradient(#fffcf0,#f8e8d5);box-shadow:inset 0 0 0 .65cqi #fff9e7,0 .65cqi 0 #866b42}
#panel:not([data-view="menu"]) #title,#panel:not([data-view="menu"]) #hint{background:transparent}
#panel:not([data-view="menu"]) #title{top:76.2%}
#panel:not([data-view="menu"]) #hint{top:81%}
#panel:not([data-view="menu"]) #retry{top:92.7%;height:3.8%}
#panel:not([data-view="menu"]) #action{top:85.1%}
/* [STATE] 关卡内面板沿用参考图的配色与布局。 */
