/* Scene, action and state belong to one playable frame. */
.action-game-stage{position:relative;overflow:hidden;border-radius:12px;background:#101927;color:#f4f7fb;isolation:isolate}
.action-game-stage .raster-scene{margin:0;border-radius:0;overflow:hidden}
.action-game-stage .raster-scene canvas{border-radius:0}
.sword-action{position:relative;z-index:4;padding:16px;background:#101927;color:#f4f7fb}
.sword-meter{position:relative;height:26px;overflow:hidden;border-radius:5px;background:#30445a;cursor:crosshair;touch-action:manipulation}
.sword-zone{position:absolute;inset-block:0;background:#f4d35e;box-shadow:inset 0 2px 3px #0003}
.sword-marker{position:absolute;left:0;top:2px;bottom:2px;width:12px;border-radius:3px;background:#fff;box-shadow:0 2px 5px #0008;will-change:transform;animation:none!important;transition:none!important}
.sword-action-row{display:flex;gap:16px;align-items:center;justify-content:space-between;padding-top:12px;min-height:48px}
.sword-action-row>span{font-size:13px;line-height:1.5;color:#d0dceb}
.action-game-stage .button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:12px 18px;width:auto;flex:none;font-size:14px;background:#f4d35e;color:#142237;border:0;border-radius:7px;cursor:pointer}
.action-game-stage .button:disabled{opacity:.6;cursor:default}
.action-game-stage .button:focus-visible,.action-game-help summary:focus-visible{outline:3px solid #85c5ff;outline-offset:3px}
.sword-action[data-result=hit] .sword-meter{background:#59613a}
.sword-action[data-result=miss] .sword-meter{background:#633942}
.fishing-action{position:relative;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px;background:#101927;color:#f4f7fb;min-height:80px}
.fishing-action p{margin:0!important;color:#d0dceb!important;font-size:14px!important;line-height:1.5;max-width:48ch}
.action-fishing[data-phase=bite] .fishing-action{background:#263b50}
.action-fishing[data-phase=bite] .fishing-action p{font-weight:700;color:#ffe799!important}
.action-game-help{margin-top:16px;color:inherit;font-size:14px}
.action-game-help summary{padding:12px 4px;cursor:pointer;min-height:44px}
.action-game-help>p{max-width:65ch;line-height:1.6}
.fish-book .fish-collection{margin:8px 0 0}
.action-game-ending{position:absolute;inset:0;z-index:6;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:14px;padding:24px;background:#101927eb;text-align:center}
.action-game-ending h2,.action-game-ending p{margin:0;color:#f4f7fb}
.sword-learning-hint{padding:16px;background:#101927;font-size:14px;text-align:center;color:#d0dceb}
@media(max-width:650px){.sword-action,.fishing-action{padding:12px}.sword-action-row{gap:12px}.sword-action-row>span{font-size:12px;max-width:25ch}.fishing-action{align-items:stretch;flex-direction:column;gap:10px}.fishing-action .button{width:100%}.fishing-action p{font-size:13px!important}.action-game-stage .button{font-size:13px;padding:10px 14px}.action-game-ending h2{font-size:22px}}
@media(prefers-reduced-motion:no-preference){.action-game-stage .button{transition:transform 160ms var(--ease),opacity 160ms var(--ease)}.action-game-stage .button:active:not(:disabled){transform:scale(.97)}}
@media(prefers-reduced-motion:reduce){.action-game-stage .button{transition:opacity 160ms var(--ease)}}

/* Generated stone bezel and separate sword sprite replace the text panel. */
.sword-action{position:relative;width:min(280px,calc(100% - 24px));max-width:280px;height:58px;min-height:0;margin:8px auto 20px;padding:0;border:0;border-radius:0;background:transparent url("/assets/knight-ui/timing-frame-v1.png") center/100% 100% no-repeat;box-shadow:none;flex:none}
.sword-action .sword-meter{position:relative;top:18px;width:84%;height:24px;margin:0 auto;background:transparent;border-radius:0;overflow:visible}
.sword-action .sword-zone{top:2px;bottom:2px;background:#efd16a;opacity:.9;border-radius:0;box-shadow:inset 0 1px 0 #fff1b7,inset 0 -1px 0 #b48d35}
.sword-action .sword-marker{top:-26px;bottom:auto;left:0;width:12px;height:41px;border-radius:0;background:none;box-shadow:none;pointer-events:none}
.sword-action .sword-marker:before{content:"";position:absolute;inset:0 -4px;background:url("/assets/knight-ui/sword-pointer-v1.png") center/100% 100% no-repeat}
.sword-action .sword-action-row{position:absolute;inset:0;display:block;min-height:0;padding:0;pointer-events:none}
.sword-action .sword-action-row>span{position:absolute;top:calc(100% + 2px);left:0;right:0;max-width:none;font-size:11px;line-height:14px;text-align:center;color:#e4e9f2;text-shadow:0 1px 2px #101927}
.sword-action .sword-strike{position:absolute;inset:0;width:100%;height:100%;min-height:44px;padding:0;border:0;background:transparent;box-shadow:none;cursor:crosshair;pointer-events:auto;touch-action:manipulation}
.sword-action .sword-strike:focus-visible{outline:2px solid #ffe493;outline-offset:3px}
.sword-action .sword-strike:disabled{cursor:default}
.sword-action[data-result=hit] .sword-zone{background:#fff1b7}
.sword-action[data-result=miss] .sword-zone{background:#e9a77f}
body.arcade-playing .mini-game>.action-knight>.sword-action{padding:0}
