/* Action effects stay on one small canvas; the game board never spins. */
.board-action-canvas{position:absolute;z-index:7;pointer-events:none;contain:strict;will-change:transform;transform:translateZ(0)}
#board .cell.fx-hidden>*{visibility:hidden}
#board .cell .orb-art{will-change:auto;filter:none}
#star-targets[hidden],#turn-status[hidden],#fever-meter[hidden],#stars[hidden],#result-emblem[hidden]{display:none!important}
#turn-status{align-self:center;min-height:26px;margin:3px 0 7px;padding:5px 22px;border:1px solid #b5f5dc80;border-radius:20px;background:linear-gradient(100deg,#285e58ee,#25474feb);color:#ddfff1;font-size:12px;font-weight:850;letter-spacing:.6px;box-shadow:inset 0 1px 0 #fff2}
#turn-status:before{content:'✦';margin-right:7px;color:#c1f6da}
#turn-status[data-turn=boss]{background:linear-gradient(100deg,#754a53ed,#514362ed);border-color:#ffcf8899;color:#ffe4b0}
#turn-status[data-turn=boss]:before{content:'♛';color:#ffe0a1}
.boss-stage #boss-presence{right:3px;top:-42px;width:48px;height:48px}
#fever-rainbow{inset:0;transform:none;rotate:none;mask-image:none;mix-blend-mode:normal;background:radial-gradient(ellipse at 0 50%,#ffa0cd45,transparent 38%),radial-gradient(ellipse at 100% 50%,#82eed940,transparent 38%);z-index:0}
.fever-active #fever-rainbow{animation:fever-breathe 1.4s ease-in-out infinite alternate;opacity:.65;transform:none;rotate:none}
.fever-active #world-light{animation:none;transform:none}
.fever-active .orbit{background:linear-gradient(135deg,#ffe5a7,#efb8d7 50%,#9ae9d5);filter:none}
.fever-active #board{box-shadow:inset 0 0 20px #ffa7e626,0 0 20px #ffbddd55}
@keyframes fever-breathe{from{opacity:.35}to{opacity:.65}}
#dialog.campaign-result{width:min(340px,calc(100vw - 40px));max-height:calc(100dvh - 48px);padding:22px 24px 24px;overflow:auto;box-sizing:border-box;background:radial-gradient(ellipse at 50% 0,#635778,#30324c 70%);border:1px solid #dddaeca6;backdrop-filter:none;-webkit-backdrop-filter:none}
#dialog.campaign-result #result-emblem{position:relative;display:grid;place-items:center;width:104px;height:104px;margin:0 auto 14px;line-height:1;flex:none}
#dialog.campaign-result #result-emblem>*{width:100%;height:100%;margin:0;animation:none;filter:none;object-fit:contain}
#dialog.campaign-result #dialog-title{font-size:25px;line-height:1.25;margin:0 0 12px;position:relative}
#dialog.campaign-result #stars{font-size:35px;letter-spacing:5px;line-height:1.4;margin:0 0 10px}
#dialog.campaign-result #dialog-body{margin:0 0 20px;font-size:14px;line-height:1.6;color:#e9e8ef;min-height:0}
#dialog.campaign-result #dialog-action{display:block;width:100%;min-height:48px;margin:0;line-height:1.4;font-size:16px}
#dialog.boss-victory{border-color:#ffe4a9;background:radial-gradient(ellipse at 50% 0,#695b6d,#31354b 70%)}
#dialog.boss-victory #result-emblem{width:130px;height:130px;margin-bottom:18px}
#dialog.boss-victory #result-emblem:before{content:'';position:absolute;inset:8%;border:1px solid #ffe3ac66;border-radius:50%;background:radial-gradient(circle,#ffd77833,transparent 70%);z-index:-1}
#dialog.boss-victory #dialog-title{color:#ffebba}
@media(max-height:640px){#dialog.campaign-result{padding:16px 22px}#dialog.boss-victory #result-emblem{width:100px;height:100px;margin-bottom:12px}#dialog.campaign-result #dialog-title{font-size:22px}}
@media(prefers-reduced-motion:reduce){.fever-active #fever-rainbow{animation:none;opacity:.3}}
/* Two HP ribbons and one readable intent; the target stays on the board. */
#combat-hud[hidden],#missions[hidden]{display:none!important}
#combat-hud{width:100%;margin:2px 0 5px;padding:8px 10px 0;box-sizing:border-box;border:1px solid #ecdcb66b;border-radius:20px;background:radial-gradient(ellipse at 0 0,#656873f0,#28354bd9);box-shadow:inset 0 1px 0 #fff2;flex:none}
.combat-top{display:flex;align-items:center;gap:9px}.combat-portrait{width:53px;height:60px;flex:none}.combat-portrait .guardian-art{display:block;width:100%;height:100%;animation:none;filter:none}.combat-vitals{flex:1;min-width:0}.combat-name-row,.combat-player{display:flex;align-items:center;justify-content:space-between;gap:6px}.combat-name{font-size:14px;color:#ffefc6}.boss-hp-value,.player-hp-value{font-variant-numeric:tabular-nums;font-size:11px;color:#fff2d9}.boss-hp-bar,.player-hp-bar{height:10px;overflow:hidden;border-radius:10px;background:#182334;box-shadow:inset 0 1px 3px #0007;border:1px solid #f5dfae44}.boss-hp-bar i,.player-hp-bar i{display:block;height:100%;width:var(--hp);border-radius:inherit;background:linear-gradient(#ffd4c3,#e87785);transition:width .18s ease-out}.player-hp-bar{height:6px}.player-hp-bar i{background:linear-gradient(#b8f4d7,#67bbab)}.combat-player{height:20px}.combat-seeds{display:flex;max-width:44px}.combat-seeds .orb-art{width:18px;height:18px}
.intent-badge{background:none;box-shadow:none;border:0;border-top:1px solid #ffffff24;border-radius:0;width:100%;display:flex;text-align:left;gap:8px;align-items:center;margin:7px 0 0;padding:7px 0;color:#fff1d0;min-height:48px;touch-action:none}.intent-badge:disabled{opacity:1}.intent-icon{width:27px;font-size:23px;flex:none;text-align:center}.intent-icon .orb-art{width:27px;height:27px}.intent-badge strong{display:block;font-size:12px;line-height:1.35}.intent-badge small{display:block;font-size:10px;font-weight:400;line-height:1.35;color:#dfdfeb;margin-top:2px}.hp-battle #boss-presence,.hp-battle .rule-row{display:none!important}.hp-battle #turn-status{margin:0 0 4px;min-height:20px;padding:3px 15px;font-size:10px}.hp-battle .arcade-heading{margin-bottom:3px}
#board .cell.intent-target{outline:1px solid #ffe6a6b8;outline-offset:-3px}#board .cell.intent-target:after{content:attr(data-intent);position:absolute;top:1px;right:2px;color:#fff6c8;font-size:10px;font-weight:900;line-height:1;z-index:3;text-shadow:0 1px 3px #000}.piece.intent-piece{outline:2px solid #ffd48a;outline-offset:-4px}.piece.intent-piece:after{content:attr(data-intent);position:absolute;right:5px;top:3px;color:#ffe8b1}.intent-ghost{position:absolute;inset:1px;z-index:4;opacity:.55;pointer-events:none;border:1px dashed #fff3a9;border-radius:50%;background:#fff8}.intent-ghost .orb-art{width:100%;height:100%}
#combat-hud.exposed{border-color:#f7e7ac;background:radial-gradient(ellipse at 20% 20%,#8b7774ed,#354456e8)}.combat-hit{position:fixed;z-index:80;pointer-events:none;font-size:24px;font-style:normal;font-weight:900;color:#fff0b9;text-shadow:0 2px 4px #75424e}.combat-projectile{position:fixed;width:14px;height:14px;border-radius:50%;background:#ffebae;box-shadow:0 0 14px #ffd68e;pointer-events:none;z-index:60}
.boss-rewards{margin:0 0 16px;font-size:12px;color:#ebe4d7}.boss-rewards p{margin:5px 0!important;line-height:1.5!important}.victory-gate{color:#ffedb1}.star-retry{display:inline-block!important;width:auto!important;padding:7px 10px!important;margin:5px 3px!important;font-size:12px!important;min-height:34px!important}.boss-victory #dialog-body{margin-bottom:10px!important}#boss-record{width:min(330px,calc(100vw - 40px));box-sizing:border-box;padding:25px;text-align:center}#boss-record-art{width:110px;height:115px;margin:0 auto 12px}#boss-record-art .guardian-art{width:100%;height:100%;display:block}#boss-record-detail,#boss-record-hint{font-size:13px;line-height:1.6}#boss-record-play{width:100%;margin-top:12px}
@media(max-width:350px),(max-height:700px){#combat-hud{padding:5px 9px 0}.combat-portrait{width:42px;height:49px}.intent-badge{min-height:40px;padding:5px 0;margin-top:4px}.combat-name{font-size:12px}.intent-badge small{font-size:9px}}
@media(prefers-reduced-motion:reduce){.boss-hp-bar i,.player-hp-bar i{transition:none}}

#practice-note[hidden]{display:none!important}#practice-note{font-size:11px;line-height:1.4;padding:7px 12px;margin:0;border-radius:20px;border:1px solid #eddcac55;color:#fff2c4;background:#354e60cd;box-shadow:none}

.garden-seal:before{content:'✿';position:absolute;right:-3px;top:-3px;font-size:23px;color:#ffe8ae;text-shadow:0 1px 3px #725c36}.flower-gate.seal-earned .gate-seal:first-child .seal-art{background:radial-gradient(circle,#ffe9a874,transparent 73%)}.flower-gate.seal-earned .gate-seal:first-child .seal-art:before{content:'✿';position:absolute;right:-2px;top:0;color:#ffe6a3;font-size:20px}
/* Boss above, shared board in the middle, player below. Public hands stay separate. */
#boss-hand[hidden],#duel-player-panel[hidden]{display:none!important}
.shared-board-duel #combat-hud .combat-player,.shared-board-duel #combat-hud .player-hp-bar{display:none}
.shared-board-duel .combat-top{min-height:42px}.shared-board-duel .combat-portrait{width:42px;height:44px}
.shared-board-duel .intent-badge{min-height:35px;padding:4px 0;margin-top:3px}
#boss-hand{display:flex;align-items:center;justify-content:center;gap:7px;padding:3px 0 7px;border-top:1px solid #fff2}
#boss-hand>small{font-size:10px;color:#ffdfba;margin-right:5px}.boss-piece{width:55px;height:40px;border:1px solid #f1d7b24d;border-radius:9px;background:#211d334d;display:grid;place-items:center;position:relative;color:#a699a8}.boss-piece.used{opacity:.4}.boss-piece.playing{border-color:#ffe3a6;background:#aa7a4b55}
.boss-piece-art{position:relative;display:block;--step-x:12px;--step-y:12px;--orb:12px;width:calc(var(--w)*var(--step-x));height:calc(var(--h)*var(--step-y))}.boss-piece-art>i{position:absolute;left:calc(var(--x)*var(--step-x));top:calc(var(--y)*var(--step-y));width:var(--orb);height:var(--orb)}.boss-piece-art .orb-art{width:100%;height:100%;display:block;filter:none;animation:none}
.duel-flying-piece{position:fixed;pointer-events:none;z-index:55;transform-origin:center;will-change:transform;contain:layout style}.duel-flying-piece .boss-piece-art{--step-x:inherit;--step-y:inherit;--orb:inherit}
#board .cell.boss-placement-target{background:#ffe3a636;outline:2px solid #ffe3a6;outline-offset:-2px}
#duel-player-panel{width:100%;box-sizing:border-box;display:flex;gap:10px;align-items:center;margin:4px 0 2px;padding:7px 12px;border-radius:12px;border:1px solid #a9e7d862;background:#224447d9;flex:none}
#duel-player-panel .player-hp-value{font-weight:800;color:#d5fff0;white-space:nowrap}#duel-player-panel .player-hp-bar{flex:1;height:9px}
.shared-board-duel #tray{margin-top:3px}.shared-board-duel .next-row{display:none}
@media(max-height:700px){.shared-board-duel #combat-hud{padding-top:4px}.shared-board-duel .combat-top{min-height:35px}.shared-board-duel .combat-portrait{width:34px;height:36px}#boss-hand{padding-bottom:4px}.boss-piece{height:36px}#duel-player-panel{padding:5px 10px}}
