* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; overflow: hidden; background: #2e211c; color: #fffaf1; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif; }
body { min-height: 100dvh; }
button { font: inherit; -webkit-tap-highlight-color: transparent; }
.game-shell { position: relative; width: 100%; height: 100dvh; min-height: 560px; max-width: 560px; margin: 0 auto; overflow: hidden; background: #d9b384; isolation: isolate; }
.scene-art { position: absolute; z-index: -3; width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(.92) brightness(.92); }
.scene-tint { position: absolute; z-index: -2; inset: 0; background: linear-gradient(180deg, rgba(51, 35, 27, .34), rgba(73, 44, 28, .18) 46%, rgba(36, 26, 22, .48)); }
.hud { position: absolute; z-index: 3; top: max(18px, env(safe-area-inset-top)); left: 18px; right: 18px; display: flex; align-items: center; justify-content: space-between; }
.score-box { min-width: 88px; padding: 8px 14px; border: 1px solid rgba(255,255,255,.35); border-radius: 14px; background: rgba(45, 30, 22, .58); box-shadow: 0 5px 16px rgba(28, 17, 12, .18); }
.hud-label { display: block; color: rgba(255,250,241,.72); font-size: 12px; }
.score-box strong { display: block; margin-top: 2px; font-size: 24px; line-height: 1; }
.icon-button, .touch-controls button { border: 0; color: #fffaf1; background: rgba(45, 30, 22, .62); cursor: pointer; }
.icon-button { width: 46px; height: 46px; border-radius: 50%; font-size: 18px; }
#gameCanvas { position: absolute; z-index: 1; top: 50%; left: 50%; width: min(88vw, 460px); height: min(88vw, 460px); transform: translate(-50%, -52%); border: 5px solid rgba(255, 250, 241, .82); border-radius: 22px; box-shadow: 0 14px 30px rgba(31, 18, 12, .25); touch-action: none; }
.panel { position: absolute; z-index: 4; left: 24px; right: 24px; top: 50%; transform: translateY(-50%); padding: 26px 22px; border: 1px solid rgba(255,255,255,.4); border-radius: 22px; background: rgba(44, 30, 23, .9); box-shadow: 0 16px 35px rgba(27, 15, 10, .3); text-align: center; }
.panel h1, .panel h2 { margin: 0; font-size: 28px; }
.panel p { margin: 12px 0 20px; color: rgba(255,250,241,.76); font-size: 14px; line-height: 1.6; }
.eyebrow { margin-bottom: 4px !important; color: #ffc28d !important; font-size: 12px !important; }
.primary-button, .secondary-button { display: block; width: 100%; min-height: 50px; border-radius: 14px; cursor: pointer; font-weight: 700; }
.primary-button { border: 0; background: #ff8a3d; color: #3d2112; }
.primary-button:disabled { opacity: .52; cursor: default; }
.secondary-button { margin-top: 10px; border: 1px solid rgba(255,255,255,.34); background: transparent; color: #fffaf1; }
.touch-controls { position: absolute; z-index: 3; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; display: flex; flex-direction: column; align-items: center; gap: 8px; transform: translateX(-50%); }
.touch-controls > div { display: flex; gap: 8px; }
.touch-controls button { width: 52px; height: 44px; border-radius: 13px; font-size: 22px; }
.touch-controls button:active, .icon-button:active, .primary-button:active, .secondary-button:active { transform: scale(.96); }
.hidden { display: none !important; }
@media (min-height: 760px) { #gameCanvas { transform: translate(-50%, -58%); } }
@media (max-height: 650px) { .touch-controls { bottom: 8px; } #gameCanvas { width: min(72vh, 390px); height: min(72vh, 390px); } .panel { padding: 18px; } }
/* [STATE] 已完成 app.css 编写，匹配移动端游戏布局与面板状态 */
