/* 外壳用深靛蓝衬托晚霞色游戏画面，所有控件保持足够的触控面积。 */
:root{color-scheme:dark;--bg:#191e32;--ink:#f8f1db;--dim:#b5bac9;--edge:#454c62;--yellow:#ffd16d;--mono:Consolas,"Courier New",monospace}
*{box-sizing:border-box}body{margin:0;min-height:100svh;background:var(--bg);color:var(--ink);font:16px/1.5 system-ui,"Microsoft YaHei",sans-serif}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible{outline:3px solid #fff3b1;outline-offset:3px;z-index:2}header,main{width:min(850px,calc(100% - 48px));margin:auto}header,.brand,.head,dl,.strip,.strip>span,.deck,footer,.action{display:flex;align-items:center}header,.head,.strip,.deck,footer{justify-content:space-between}header{height:68px;border-bottom:1px solid var(--edge)}.brand{gap:11px}.brand strong{font-size:17px;letter-spacing:.08em}.brand small,.issue,.strip b,.kicker,footer,kbd,#result small{font-family:var(--mono)}.brand small,.issue{font-size:11px;letter-spacing:.12em;color:var(--dim)}.brand small{margin-left:3px}.head{padding:24px 0 17px;gap:12px}.kicker{color:var(--yellow);font-size:11px;letter-spacing:.12em;margin:0 0 5px;display:flex;align-items:center;gap:8px}.kicker i{width:17px;height:1px;background:var(--yellow)}h1{font-size:clamp(32px,5vw,50px);line-height:1.12;margin:0;letter-spacing:.04em;font-weight:900}dl{margin:0;gap:23px;text-align:right}dl div+div{border-left:1px solid var(--edge);padding-left:23px}dt{font-size:12px;color:var(--dim)}dd{font:700 clamp(24px,3vw,34px)/1.1 var(--mono);margin:4px 0 0;font-variant-numeric:tabular-nums}#best{color:var(--yellow)}
/* 画布随可视区域重排像素高度，手机上仍保留完整的左右运动轨道。 */
.machine{border:2px solid #555d72;border-radius:5px;background:#292f47;box-shadow:0 5px 0 #0f1323;overflow:hidden}.strip{height:30px;padding:0 15px;font-size:11px;color:#e0e4ef;letter-spacing:.1em}.strip>span{gap:8px}.strip i{height:7px;width:7px;background:#9cdebf}.strip b{font-size:10px;letter-spacing:.2em;color:#bec4d2}.screen{position:relative;display:block;padding:0;width:100%;height:clamp(260px,50svh,445px);border:0;border-block:2px solid #161c31;background:#efb194;overflow:hidden;-webkit-tap-highlight-color:transparent;user-select:none}.screen:focus-visible{outline-offset:-4px}.screen canvas{display:block;width:100%;height:100%;image-rendering:pixelated}.deck{gap:14px;padding:15px 19px}.hint{display:grid;gap:3px}.hint strong{font-size:16px}.hint span,footer{font-size:12px;color:#c6ccda}.action{justify-content:center;gap:12px;background:var(--yellow);color:#242539;border:2px solid #181b2c;border-radius:4px;box-shadow:0 3px 0 #161b2c;padding:9px 21px;min-height:46px;font-weight:800;white-space:nowrap}.action:hover{background:#ffda88}.action:active{transform:translateY(2px);box-shadow:none}.action i{border:6px solid transparent;border-right:0;border-left:9px solid currentColor}footer{padding:14px 1px 22px;gap:12px;font-size:11px;color:var(--dim)}kbd{font-size:10px;border:1px solid #61697e;border-radius:3px;padding:2px 4px}footer em{font-style:normal;margin:0 4px}#result{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);display:grid;gap:4px;width:max-content;max-width:90%;padding:15px 28px;background:#22273e;color:var(--ink);border:2px solid var(--yellow);box-shadow:4px 4px 0 #302a3c;text-align:center}#result[hidden]{display:none}#result small{color:var(--yellow);letter-spacing:.17em;font-weight:700}#result strong{font-size:27px}#result span{font-size:13px;color:#d6d9e2}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
/* 短屏适当缩短留白，窄屏把主操作放到拇指容易点到的位置。 */
@media(max-width:620px){header,main{width:calc(100% - 24px)}header{height:51px}.brand img{width:27px;height:27px}.brand{gap:7px}.brand small,.issue{font-size:9px}.head{padding:16px 0 12px}dl{gap:10px}dl div+div{padding-left:10px}dt{font-size:11px}.screen{height:clamp(238px,48svh,385px)}.deck{flex-direction:column;align-items:stretch;padding:10px 12px 13px;gap:9px}.hint{gap:1px}.hint strong{font-size:14px}.hint span{font-size:12px}.action{width:100%}footer{font-size:10px;gap:3px}}
@media(min-width:621px) and (max-height:560px){header{height:42px}.head{padding:8px 0}.screen{height:45svh;min-height:170px}.deck{padding-block:6px}h1{font-size:30px}}

/* 中文：保留现有标题栏标签，把活动数字放在同一右侧区域。 */
.site-header-status {
  display: grid;
  justify-items: end;
  flex: 0 0 auto;
  gap: 2px;
}

#site-activity {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
