*{box-sizing:border-box}
:root{color-scheme:light;--accent:#ff8a3d;--ink:#583922}
html,body{margin:0;width:100%;min-height:100%;background:#f4e6ce;color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}
body{overscroll-behavior:none}
.game{position:relative;width:100%;height:100vh;height:100svh;min-height:500px;overflow:hidden;background:#f2d8b8;isolation:isolate}
.scene{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;user-select:none;-webkit-user-drag:none;pointer-events:none}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.hoof-zone{position:absolute;left:10%;right:10%;top:33%;bottom:28%;touch-action:none;cursor:ew-resize;border-radius:45%;overflow:hidden;-webkit-tap-highlight-color:transparent}
.hoof-zone:active{cursor:grabbing}
#shavings{display:block;width:100%;height:100%;pointer-events:none}
.play-status{position:absolute;bottom:calc(env(safe-area-inset-bottom,0px) + 58px);left:5%;right:5%;padding:14px 16px;border:1px solid #edd4ad;border-radius:22px;background:#fff9ecf5;box-shadow:0 5px 20px #59381e1a}
.status-line{display:flex;align-items:center;gap:12px;justify-content:space-between;font-size:15px;font-weight:650;line-height:1.6;min-height:44px}
#pause{display:grid;place-items:center;flex-shrink:0;width:44px;height:44px;border:0;border-radius:14px;background:var(--accent);color:white;font-size:24px;cursor:pointer;touch-action:manipulation}
.progress-row{display:flex;align-items:center;gap:12px;margin-top:8px}
progress{display:block;flex:1;min-width:0;height:12px;accent-color:var(--accent);border:0;border-radius:8px;overflow:hidden;background:#eddfc8}
progress::-webkit-progress-bar{background:#eddfc8}
progress::-webkit-progress-value{background:var(--accent);border-radius:8px;transition:width .18s linear}
progress::-moz-progress-bar{background:var(--accent);border-radius:8px}
#percent{min-width:38px;text-align:right;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums}
#result{margin:8px 0 0;font-size:12px;line-height:1.6;color:#845a38}
.start{width:100%;min-height:48px;margin-top:12px;padding:10px 20px;border:1px solid #ffd9a0;border-radius:16px;background:var(--accent);box-shadow:0 3px 0 #c46830;color:#fffaf0;font:700 17px/1.4 inherit;cursor:pointer;touch-action:manipulation}
button{font-family:inherit;-webkit-tap-highlight-color:transparent}
button:active{transform:translateY(2px)}
button:focus-visible{outline:3px solid #633d24;outline-offset:4px}
.footer{position:absolute;bottom:calc(env(safe-area-inset-bottom,0px) + 18px);left:16px;right:16px;display:flex;justify-content:center;gap:14px;color:#785b41;font-size:11px;line-height:1.6;letter-spacing:1px;text-align:center}
.version{font-variant-numeric:tabular-nums}.footer-note{padding-left:14px;border-left:1px solid #b29a7c66}
[hidden]{display:none!important}
@media(min-width:600px){.game{max-width:480px;margin:auto;box-shadow:0 0 60px #5c452c22}}
@media(prefers-reduced-motion:reduce){progress::-webkit-progress-value{transition:none}}

.level-line{font-size:13px;font-weight:700;color:#a45522;line-height:1.6;margin-bottom:2px}
.level-actions{display:flex;gap:10px}
.level-actions button{flex:1;min-height:44px;margin-top:10px;padding:8px 12px;border:1px solid #edd4ad;border-radius:14px;background:#fff1dc;color:var(--ink);font-size:14px;cursor:pointer;touch-action:manipulation}
@media(max-height:650px){.play-status{padding:10px 12px}.status-line{font-size:14px}.level-actions button{margin-top:6px}.start{margin-top:8px}}

/* Keep the full original image and controls in separate flow rows.
   Only the interactive hoof surface is allowed to overlay the scene. */
.game{height:auto;min-height:100vh;min-height:100svh;overflow:visible;display:flex;flex-direction:column;padding-bottom:env(safe-area-inset-bottom,0px)}
.scene-stage{position:relative;flex:none;width:100%;overflow:hidden;isolation:isolate;line-height:0}
.scene{position:relative;inset:auto;display:block;width:100%;height:auto;object-fit:contain;z-index:0}
.hoof-zone{z-index:1;contain:paint}
.play-status{position:relative;inset:auto;flex:none;width:90%;margin:16px auto 0;z-index:0}
.status-line{align-items:flex-start}
#instruction{min-width:0;overflow-wrap:anywhere}
#result{overflow-wrap:anywhere}
.start{display:block;line-height:1.4}
.level-actions{flex-wrap:wrap}
.footer{position:relative;inset:auto;flex:none;flex-wrap:wrap;margin:16px 16px 18px;letter-spacing:.5px}
@media(min-width:600px){.game{width:100%;max-width:480px}}

.mood{position:absolute;left:12px;top:12px;z-index:2;display:flex;align-items:center;gap:8px;min-height:40px;padding:6px 12px 6px 8px;border-radius:18px;background:#fff9ece6;color:#5c3a22;font-size:13px;font-weight:700;line-height:1.4}
.mood-face{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#ffe3c4;color:#e07028;font-size:20px}
.mood-face .mp-icon{width:20px;height:20px}
.mood-uneasy{background:#fff1d4;color:#8a4b12}
.mood-uneasy .mood-face{background:#ffe0a8;color:#c45a12}
.mood-hurt{background:#ffe4d8;color:#8d3418}
.mood-hurt .mood-face{background:#ffc7b0;color:#c2410c}
.tool-row{display:flex;gap:8px;margin-top:10px;overflow-x:auto}
.tool{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;flex:1 0 64px;min-width:64px;min-height:58px;padding:6px 4px;border:1px solid #edd4ad;border-radius:14px;background:#fff6e8;color:#6a4528;font-size:12px;font-weight:700;line-height:1.2;cursor:pointer;touch-action:manipulation}
.tool .mp-icon{width:22px;height:22px;font-size:22px;color:#c46830}
.tool.is-next{border-color:#ffb067}
.tool.is-on{background:var(--accent);border-color:#e07028;color:#fffaf0}
.tool.is-on .mp-icon{color:#fffaf0}
.tool span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-height:650px){.tool{min-height:50px}.mood{top:8px;padding:4px 10px 4px 6px}}
