.minigame-entry.sword{border-color:#d98b4f66;background:linear-gradient(120deg,#443329,#17272d 72%)}
.minigame-entry.sword .minigame-rune{border-color:#e3a36a66;color:#ffd09c;background:#36251999}
.sword-game{position:relative}
.sword-scene{position:relative;width:min(100%,530px);height:100%;margin:0 auto;overflow:hidden;border:1px solid #e7c38a66;border-radius:14px;background:#13231c;box-shadow:0 18px 45px #0007;isolation:isolate}
.sword-scene>.memory-toolbar{position:absolute;z-index:30;top:2.2%;left:3%;right:3%;margin:0;color:#fff;text-shadow:0 2px 8px #000}
.sword-scene>.memory-heading{display:none}
.sword-scene>.memory-stats{position:absolute;z-index:29;top:9.2%;left:3%;right:3%;max-width:none;margin:0}
.sword-scene>.memory-stats span{border:1px solid #ffffff17;background:#071319b8;color:#c1cdcf;backdrop-filter:blur(5px)}
.sword-scene>.memory-status{position:absolute;z-index:29;top:17.2%;left:3%;right:3%;width:auto;margin:0;border-color:#ffffff1c;background:#071319c4;color:#d4dddc;backdrop-filter:blur(5px)}
.sword-stage{position:absolute;inset:0;width:100%;height:100%;margin:0;aspect-ratio:auto;overflow:hidden;border:0;border-radius:0;background:linear-gradient(180deg,#07151ccc 0%,#07151c80 22%,transparent 39%,#0610163d 72%,#061016a8 100%),url('/minigames/sword/background-full-v2.webp?v=1') center/100% 100% no-repeat;box-shadow:none;touch-action:none;user-select:none;-webkit-user-select:none;isolation:isolate}
.sword-stage::after{content:"";position:absolute;inset:0;z-index:8;pointer-events:none;background:linear-gradient(180deg,#07101612 55%,#061016b8 100%)}
.sword-grid{position:absolute;z-index:2;inset:0;pointer-events:none}
.sword-cell{position:absolute;left:var(--cell-x);top:var(--cell-y);width:var(--cell-w);height:11%;display:grid;place-items:center;translate:-50% -50%;min-width:0;min-height:0}
.sword-cell:nth-child(1){--cell-x:26.5%;--cell-y:30.3%;--cell-w:22%}.sword-cell:nth-child(2){--cell-x:50.3%;--cell-y:30.3%;--cell-w:22%}.sword-cell:nth-child(3){--cell-x:75.9%;--cell-y:30.3%;--cell-w:22%}
.sword-cell:nth-child(4){--cell-x:22.4%;--cell-y:42.2%;--cell-w:27%}.sword-cell:nth-child(5){--cell-x:50.4%;--cell-y:42.2%;--cell-w:27%}.sword-cell:nth-child(6){--cell-x:78.3%;--cell-y:42.2%;--cell-w:27%}
.sword-cell:nth-child(7){--cell-x:16.8%;--cell-y:56.1%;--cell-w:31%}.sword-cell:nth-child(8){--cell-x:49.8%;--cell-y:56.1%;--cell-w:31%}.sword-cell:nth-child(9){--cell-x:83.1%;--cell-y:56.1%;--cell-w:31%}
.sword-object{position:relative;z-index:2;display:block;height:auto;object-fit:contain;filter:drop-shadow(0 7px 5px #23160977);transform-origin:center bottom;animation:sword-object-arrive .22s cubic-bezier(.2,.8,.3,1.15) both}
.sword-target{width:55%}.sword-pumpkin{top:-16%;width:60%}
.sword-cell:nth-child(n+4):nth-child(-n+6) .sword-target{width:58%}.sword-cell:nth-child(n+4):nth-child(-n+6) .sword-pumpkin{width:64%}
.sword-cell:nth-child(n+7) .sword-target{width:61%}.sword-cell:nth-child(n+7) .sword-pumpkin{width:68%}
.sword-object.hit{animation:sword-target-hit .48s ease both}.sword-object.mistake{animation:sword-pumpkin-hit .52s ease both}
.sword-character{position:absolute;z-index:6;left:50%;bottom:-2%;width:42%;height:45%;object-fit:contain;object-position:center bottom;translate:-50% 0;filter:drop-shadow(0 12px 12px #07100dbb);pointer-events:none;transition:opacity .09s ease,transform .12s ease}
.sword-character[hidden]{display:block;opacity:0}.sword-character.sword-character-slash{z-index:7;width:47%;height:48%}
.sword-stage.is-slashing .sword-character-ready{opacity:0}.sword-stage.is-slashing .sword-character-slash{opacity:1;transform:translateY(-2px) scale(1.02)}
.sword-trace{position:absolute;inset:0;z-index:10;width:100%;height:100%;pointer-events:auto;touch-action:none;cursor:crosshair}
.sword-gesture-timer{position:absolute;z-index:11;left:50%;bottom:12px;translate:-50% 0;width:84px;height:3px;overflow:hidden;border-radius:3px;background:#ffffff2b;opacity:0;pointer-events:none}
.sword-gesture-timer i{display:block;width:100%;height:100%;background:#ffe0a3;transform-origin:left}.sword-stage.is-judging .sword-gesture-timer{opacity:1}.sword-stage.is-judging .sword-gesture-timer i{animation:sword-judge-window .52s linear both}
.sword-stage-hud{position:absolute;z-index:12;top:calc(24% + 10px);left:10px;right:10px;display:flex;justify-content:space-between;align-items:flex-start;gap:8px;pointer-events:none}
.sword-stage-hud span{padding:6px 9px;border:1px solid #ffffff20;border-radius:999px;background:#071319c9;color:#f5dfb8;font-size:12px;line-height:1;letter-spacing:.03em;backdrop-filter:blur(4px)}
.sword-mistakes{display:flex!important;gap:5px}.sword-mistakes i{display:block;width:11px;height:11px;border:1px solid #ffd9ac88;border-radius:50%;background:#ffffff13}.sword-mistakes i.used{border-color:#ff9f72;background:#e85d3f;box-shadow:0 0 9px #ff6c4b99}
.sword-feedback{position:absolute;z-index:13;left:50%;top:35.5%;translate:-50% 0;color:#fff0ca;font:800 clamp(18px,5vw,30px)/1.2 serif;letter-spacing:.08em;text-align:center;text-shadow:0 2px 8px #000,0 0 18px #f2b75b;opacity:0;pointer-events:none;white-space:nowrap}
.sword-feedback.show{animation:sword-feedback .72s ease both}.sword-feedback.error{color:#ffb08f;text-shadow:0 2px 8px #000,0 0 18px #e95636}
.sword-start{position:absolute;z-index:20;inset:0;display:grid;place-content:center;justify-items:center;gap:11px;padding:26px;background:linear-gradient(180deg,#07130e80 0%,#07130eb8 42%,#06100ddd 100%);text-align:center;-webkit-backdrop-filter:blur(1.5px);backdrop-filter:blur(1.5px)}
.sword-start[hidden]{display:none}.sword-start strong{color:#ffe0ad;font:700 clamp(22px,6vw,31px)/1.25 serif}.sword-start p{max-width:310px;margin:0;color:#d4ded8;font-size:14px;line-height:1.7}.sword-start button{width:190px;height:50px;margin-top:4px;padding:0 24px;border-radius:6px;font-size:16px}
.sword-result{inset:auto 50% 32px auto!important}.sword-result .sword-result-hero::before{content:none;display:none;background:none;filter:none}.sword-result .sword-result-hero img{height:292px}
.sword-result>p,.sword-result>h3,.sword-result>#swordResultStats,.sword-result>.memory-result-actions{position:relative;z-index:3}
@keyframes sword-object-arrive{from{opacity:0;transform:translateY(-8px) scale(.7)}to{opacity:1;transform:none}}
@keyframes sword-target-hit{0%{filter:brightness(1.8) drop-shadow(0 0 12px #fff0a8);transform:none}45%{opacity:1;transform:rotate(-8deg) scale(1.08)}100%{opacity:0;transform:translateY(18px) rotate(12deg) scale(.72)}}
@keyframes sword-pumpkin-hit{0%,100%{transform:translateX(0)}25%{filter:brightness(1.3);transform:translateX(-6px) rotate(-5deg)}55%{transform:translateX(6px) rotate(5deg)}}
@keyframes sword-judge-window{from{transform:scaleX(1)}to{transform:scaleX(0)}}
@keyframes sword-feedback{0%{opacity:0;transform:translateY(12px) scale(.8)}20%,70%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(-12px) scale(1.05)}}
@media(max-width:560px){.sword-scene{border-radius:11px}.sword-scene>.memory-toolbar{left:2.5%;right:2.5%}.sword-scene>.memory-stats{left:2.5%;right:2.5%;gap:5px}.sword-scene>.memory-stats span{padding:7px 5px}.sword-scene>.memory-status{left:2.5%;right:2.5%;min-height:36px;padding:6px 8px}.sword-stage-hud{top:calc(24% + 8px);left:8px;right:8px}.sword-stage-hud span{font-size:11px;padding:5px 7px}.sword-result{inset:auto 50% 18px auto!important}.sword-character{width:44%;height:43%}.sword-character.sword-character-slash{width:49%;height:46%}}
@media(prefers-reduced-motion:reduce){.sword-object,.sword-object.hit,.sword-object.mistake,.sword-feedback.show,.sword-stage.is-judging .sword-gesture-timer i{animation:none}.sword-feedback.show{opacity:1}.sword-character{transition:none}}
