*{box-sizing:border-box} :root{color:#322f2d;font-family:"Microsoft YaHei UI",sans-serif}body{margin:0;min-height:100svh;overflow:hidden;background:radial-gradient(ellipse at 35% 16%,#fffefa 0%,#f7f5f1 36%,#e5e1db 100%)}header,footer{position:absolute;left:clamp(20px,5vw,80px);right:clamp(20px,5vw,80px);display:flex;justify-content:space-between;align-items:center;z-index:2}header{top:5vh}h1,h2,label{font-family:STSong,SimSun,serif}h1{margin:0;font-size:clamp(28px,4vw,44px);font-weight:500;letter-spacing:.15em}button,input{font:inherit}button{cursor:pointer}header button,.actions button{min-height:44px;border-radius:28px;border:1px solid #bfbab2;background:#faf9f5b0;padding:0 20px;color:inherit}footer{bottom:4vh;font-size:13px;color:#635d55}main{height:100svh;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:clamp(25px,7vh,75px)}.stage{--w:clamp(180px,29vw,300px);width:var(--w);height:calc(var(--w)*.91);position:relative;margin-top:4vh}#key{position:absolute;inset:0;border:0;background:transparent;padding:0;touch-action:none;-webkit-tap-highlight-color:transparent;user-select:none;border-radius:50%}#key:focus-visible{outline:3px solid #872f28;outline-offset:10px}#key span{position:absolute;pointer-events:none;border-radius:50%}.base{left:0;width:100%;height:74%;bottom:0;background:linear-gradient(100deg,#f2ede4,#d3c9bb 50%,#b1a89b 87%,#d8d1c7);box-shadow:0 3px 3px #62584e65,8px 17px 17px -8px #62584e55,22px 26px 26px -15px #65594c50}.socket{left:0;bottom:8%;width:100%;height:75%;background:radial-gradient(ellipse at center,#564037 0 61%,#948676 64%,#eee8dc 65%,#f1ede4 69%,#ccc4b8 71%);box-shadow:inset 0 1px 2px white}.cap{left:6%;width:88%;height:74%;bottom:19%;background:linear-gradient(100deg,#bc271f,#a71a10 60%,#79160f);box-shadow:0 4px 4px #56382e88;transition:transform 145ms cubic-bezier(.16,.85,.28,1)}.cap:before{content:"";position:absolute;inset:-8% 0 12%;border-radius:50%;background:radial-gradient(ellipse at 30% 18%,#fa5b47,#e43625 56%,#c12519 92%);box-shadow:inset 1px 2px 3px #ff9680,inset -1px -2px 4px #b72719}.down .cap{transform:translateY(19%) scaleY(.91);transition:transform 85ms ease-in}#waves{position:absolute;left:50%;top:60%;width:100%;height:75%;transform:translate(-50%,-50%);pointer-events:none}.ring{position:absolute;inset:0;border-radius:50%;border:2px solid #fff6df;box-shadow:0 0 6px 2px #ffe4b9,inset 0 0 5px #fff8eb;will-change:transform,opacity}.received{border-color:#fff;box-shadow:0 0 6px 2px #ffc7b9}section,.meter{display:flex;align-items:center}section{gap:clamp(16px,3vw,38px);z-index:1}.meter{gap:10px}label{font-size:clamp(16px,2vw,23px)}output{font:clamp(23px,3vw,36px)/1.25 Georgia,serif;display:flex;background:#e6e0d6;border:1px solid #b7aea2;box-shadow:inset 0 2px 4px #81736455,0 1px 0 #fff;border-radius:5px;overflow:hidden}.digit{position:relative;width:.77em;height:1.25em;text-align:center;overflow:hidden;background:linear-gradient(0deg,#a99d8b40,transparent 38%,#fff4 70%,#a99d8b44)}.digit+.digit{border-left:1px solid #aa9e8f80}.digit i{font-style:normal;display:block}.divider{height:23px;border-left:1px solid #c9c2b7}dialog{border:1px solid #c9c2ba;border-radius:14px;padding:24px;width:min(370px,90vw);background:#f8f6f1;color:inherit}dialog::backdrop{background:#32251d38}dialog h2{margin:0}dialog input{width:100%;padding:10px;border:1px solid #c5bfb5;border-radius:4px}.actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}@media(max-height:450px){.stage{--w:130px}main{gap:10px}}@media(prefers-reduced-motion:reduce){.cap{transition:none!important}}
#key .well{inset:0;border-radius:0;clip-path:url(#opening)}
.cap{transition:none}
.project{display:grid;justify-items:center;gap:.4rem;z-index:1}
.project label{font:13px "Microsoft YaHei UI",sans-serif;letter-spacing:.16em;color:#766c62}
.project input{font:clamp(21px,3vw,32px)/1.3 STSong,SimSun,serif;color:#44382f;border:0;border-bottom:1px solid #c6bdb0;background:transparent;text-align:center;max-width:80vw;width:14em;padding:4px 8px;outline-offset:4px}
.project input::placeholder{color:#786e65}
main{gap:clamp(18px,4vh,42px)}.stage{margin:0}footer{justify-content:center;pointer-events:none}
@media(max-height:500px){header{top:10px}.project{gap:0}.project input{font-size:18px}main{gap:8px}.stage{--w:125px}footer{bottom:8px}}
#reset{margin-left:10px;padding:0 12px;min-height:44px;color:#685d53;border:0;background:transparent;text-decoration:underline;text-underline-offset:4px;font-size:14px}#reset:hover{color:#922c21}
