* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #2a1c12; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
#game { position: fixed; inset: 0; overflow: hidden; background: #2a1c12; }
.stage { position: absolute; inset: 0; }
.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; pointer-events: none; }
.hud { position: absolute; inset-inline: max(4%, 12px); top: max(2.6%, env(safe-area-inset-top)); margin-inline: auto; max-width: 560px; display: flex; align-items: center; gap: 8px; z-index: 3; pointer-events: none; }
.score { min-width: 64px; padding: 2px 8px; border-radius: 8px; background: rgba(42, 28, 18, .72); color: #fff7e3; font-weight: 900; font-size: 18px; text-align: center; }
.goal { color: #fff; font-weight: 800; font-size: 14px; text-shadow: 0 1px 2px #000; white-space: nowrap; }
.alert { flex: 1; height: 12px; border-radius: 99px; background: rgba(42, 28, 18, .55); overflow: hidden; }
.alert-fill { height: 100%; width: 0; background: linear-gradient(90deg, #ffb13d, #ff3b2f); }
.gaze { position: absolute; left: 58%; top: 18%; width: 38%; height: 28%; background: rgba(255, 48, 48, .32); clip-path: polygon(62% 0, 100% 0, 100% 100%, 8% 100%); opacity: 0; pointer-events: none; z-index: 2; }
.gaze.on { opacity: 1; }
.tip { position: absolute; left: 8%; right: 8%; top: 34%; text-align: center; color: #fff; font-weight: 900; font-size: 22px; text-shadow: 0 2px 4px #000; pointer-events: none; z-index: 4; min-height: 28px; }
.tray { position: absolute; left: max(8px, env(safe-area-inset-left)); right: max(8px, env(safe-area-inset-right)); bottom: max(8px, env(safe-area-inset-bottom)); margin-inline: auto; max-width: 560px; z-index: 4; display: flex; flex-direction: column; gap: 6px; }
.snacks { display: flex; gap: 6px; }
.snack { flex: 1 1 0; min-width: 0; min-height: 44px; border-radius: 12px; border: 3px solid #b9783a; background: rgba(255, 247, 227, .92); color: #5a3517; font-weight: 800; font-size: 14px; text-align: center; padding: 4px 2px; }
.snack.sel { border-color: #ff8a3d; background: #ffe2b8; }
.snack.lock { opacity: .5; }
.snack .n { display: block; font-size: 11px; font-weight: 600; }
.row { display: flex; gap: 6px; }
.act { flex: 1 1 0; min-width: 0; min-height: 48px; padding: 4px 2px; border-radius: 14px; border: 3px solid #5a3517; background: #fff7e3; color: #5a3517; font-size: 16px; font-weight: 900; touch-action: none; }
.act.main { flex: 1.6; background: linear-gradient(#ffd25a, #ff8a3d); }
.act.on { filter: brightness(.92); }
#hideBtn.active { background: #c2f3cd; border-color: #248845; }
.eatbar { height: 8px; border-radius: 99px; background: rgba(90, 53, 23, .55); overflow: hidden; }
#eatFill { height: 100%; width: 0; background: #5be37a; }
.overlay { position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; background: rgba(42, 28, 18, .55); pointer-events: auto; }
.overlay[hidden] { display: none !important; pointer-events: none; }
.card { width: min(420px, 70vw); padding: 18px 16px 16px; border-radius: 16px; background: #fff7e3; border: 4px solid #ff8a3d; text-align: center; color: #5a3517; }
.card h2 { margin: 0 0 6px; font-size: 22px; }
.card p { margin: 0 0 12px; font-size: 16px; }
.card b { color: #e05a12; }
.go { position: relative; z-index: 9; width: min(70%, 240px); min-height: 56px; border-radius: 99px; border: 3px solid #5a3517; background: linear-gradient(#ffd25a, #ff8a3d); color: #5a3517; font-size: 18px; font-weight: 900; cursor: pointer; touch-action: manipulation; }
