/* Scoped integration: legacy layout is untouched without .adopted-board. */
.adopted-board .board-stack-depth{position:absolute;top:var(--place-stack-face-top,6px);pointer-events:none;z-index:0}
.adopted-board .board-stack-depth i{position:absolute;inset:0;box-sizing:border-box;border:1px solid #a9b7b5;border-radius:5px;background:linear-gradient(145deg,#607575,#263d40);box-shadow:1px 1px 2px #07191d88}
#game-screen.adopted-board :is([data-board-region=deckRemaining],[data-board-region=auraStatus]){background:#253345ed!important;color:#edf3fa!important;border:1px solid #647990!important;border-radius:9px!important;display:flex;align-items:center;justify-content:center;gap:8px;font:600 15px/1.2 "Segoe UI","Yu Gothic UI",sans-serif}
#game-screen.adopted-board .board-layout-turn .turn-info{color:#edf3fa!important}
#game-screen.adopted-board .board-layout-turn > :is(.turn-number,.turn-info){background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important}
#game-screen.adopted-board{position:fixed!important;inset:auto!important;left:var(--board-left)!important;top:var(--board-top)!important;width:var(--board-width)!important;height:var(--board-height)!important;padding:0!important;transform:scale(var(--board-scale))!important;transform-origin:top left!important;overflow:visible!important}
#game-screen.adopted-board:not(.hidden){display:block!important}
.adopted-board .board-layout-contents{display:contents!important}
.adopted-board [data-board-region]{position:absolute!important;box-sizing:border-box!important;margin:0!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;transform:none!important;right:auto!important;bottom:auto!important}
.adopted-board .board-region-hidden{display:none!important}
.adopted-board .place-count-display{display:none!important}
.adopted-board .player-area,.adopted-board .opponent-area{padding:10px!important;background:transparent!important;box-shadow:none!important;border:0!important}
.adopted-board .hand{width:100%!important;min-height:0!important;justify-content:flex-start!important;flex-wrap:nowrap!important;overflow:visible!important}
.adopted-board .board-layout-scores,.adopted-board .board-layout-turn,.adopted-board .board-layout-resource,.adopted-board [data-board-region=deckRemaining],.adopted-board [data-board-region=aura]{background:#253345ed!important;color:#edf3fa!important;border:1px solid #647990!important;border-radius:9px;display:flex;align-items:center;justify-content:center;gap:8px;font:600 13px/1.2 "Segoe UI","Yu Gothic UI",Meiryo,sans-serif}
.adopted-board .board-layout-scores .place-score-panel{position:static!important;transform:none!important;flex:1;background:transparent!important;border:0!important;box-shadow:none!important;min-width:0!important;color:inherit!important}
.adopted-board .board-layout-scores #player-live-score{color:#8de2cf!important}
.adopted-board .board-layout-scores #opponent-live-score{color:#c6bbff!important}
.adopted-board .board-layout-scores .place-score-value{font:700 30px/1.1 "Segoe UI",sans-serif!important}
.adopted-board .board-layout-turn>*{position:static!important;transform:none!important;background:transparent!important;border:0!important;color:inherit!important;min-width:0!important;padding:0!important}
.adopted-board .board-layout-resource{display:flex!important;flex-direction:row!important;grid-template-columns:none!important;gap:5px!important;padding:5px!important}
.adopted-board .board-layout-resource::before{content:attr(data-label);font-size:11px;white-space:nowrap;margin-right:3px}
.adopted-board .board-layout-resource .place-rule-dot{flex:0 0 13px!important;width:13px!important;height:13px!important;border-radius:3px!important}
.adopted-board .board-compact-field{flex-wrap:nowrap!important;align-items:center!important;justify-content:center!important;overflow:visible!important}
.adopted-board .board-compact-field .place-stack{flex-shrink:0;cursor:pointer;position:relative;margin:0!important}
/* Sync redraws are layout corrections, not card-move animations. Keep the final
   compact offset even before BoardPlaceLayout reapplies sizing to rebuilt cards.
   Flight/placement animation cards live in the separate effects layer. */
.adopted-board .board-compact-field .place-stack > .card{
    --place-card-offset-y:0px!important;
    transition:box-shadow .2s ease!important;
}
.adopted-board .board-compact-field::before{display:none!important}
.adopted-board .board-compact-field .place-stack:focus-visible{outline:3px solid #ffe26c;outline-offset:4px}
.adopted-board [data-board-region=boardInspect]{background:#263749;color:#eef6ff;border:1px solid #8ba5ba;font:600 15px sans-serif;cursor:pointer}
.adopted-board [data-board-region=log]{background:#263749;color:#eef6ff;border:1px solid #8ba5ba;font:600 15px sans-serif;cursor:pointer}
.board-live-log{display:none!important}
.board-log-drawer{position:fixed;inset:0 auto 0 0;margin:0;width:min(470px,94vw);height:100dvh;max-height:100dvh;max-width:94vw;padding:20px;box-sizing:border-box;border:0;border-right:1px solid #6e89a0;background:#152331;color:#edf4fb;overflow:hidden;font:16px/1.5 "Segoe UI","Yu Gothic UI",sans-serif}
.board-log-drawer[open]{display:flex;flex-direction:column;gap:12px;animation:board-log-slide 180ms ease-out}
.board-log-drawer::backdrop{background:#0007}.board-log-drawer header{display:flex;align-items:center;justify-content:space-between;gap:10px}.board-log-drawer h2{margin:0;font-size:23px}.board-log-drawer button{padding:6px 12px;border:1px solid #738a9e;border-radius:6px;background:#2d4357;color:white;font:600 14px sans-serif;cursor:pointer}.board-log-drawer nav{display:flex;gap:8px}.board-log-drawer nav button[aria-pressed=true]{background:#466580;border-color:#bad8f0}
.board-log-drawer .board-live-log{display:flex!important;position:static!important;width:auto!important;height:auto!important;min-width:0!important;max-width:none!important;max-height:none!important;flex:1;min-height:0;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.board-log-drawer .game-log-header{display:none}.board-log-drawer #game-log-content{padding:3px;overflow:auto;font-size:16px;line-height:1.6;scrollbar-color:#748eaa #243748}.board-log-drawer .log-entry{padding:12px;margin:0 0 12px;background:#253849;border:1px solid #ffffff1f;border-left:3px solid #8ec6c0;border-radius:8px;color:#e8f0f9}.board-log-drawer .log-entry[hidden]{display:none!important}.board-log-drawer .log-entry.warning,.board-log-drawer .log-entry.error{border-left-color:#e4b17e}.board-log-drawer .log-card-name{font-size:16px;color:#f3f7fc;font-weight:650}.board-log-drawer .log-effect-name{font-size:15px;color:#bdcddd}.board-log-drawer .log-audience{font-size:11px;color:#9fb7cb}.board-log-empty{color:#b7cadd}
@keyframes board-log-slide{from{transform:translateX(-100%)}to{transform:translateX(0)}}
@media(prefers-reduced-motion:reduce){.board-log-drawer[open]{animation:none}}
.adopted-board #player-hand>.card.place-selected{outline:3px solid #fff;outline-offset:2px;transform:translateY(-9px);z-index:50}
.board-selection-mark{position:absolute;right:2px;top:2px;z-index:200;padding:1px 5px;background:#263c50;border:1px solid white;border-radius:5px;color:white;font:700 19px/1.15 sans-serif;pointer-events:none}
.board-selection-mark[hidden]{display:none!important}
.adopted-board #player-hand>.card.board-fusion-ready{outline-color:#ffe279;background-color:#f2cb5b!important;box-shadow:0 0 14px #f2cb5b!important;animation:board-fusion-pulse 950ms ease-in-out 3}
@keyframes board-fusion-pulse{50%{outline-color:#fff3b0;filter:brightness(1.22)}}
body[data-current-screen=game] #card-description.board-fixed-detail{position:fixed!important;left:var(--board-detail-left)!important;top:var(--board-detail-top)!important;right:auto!important;bottom:auto!important;width:var(--board-detail-width)!important;height:var(--board-detail-height)!important;max-width:none!important;min-width:0!important;max-height:none!important;box-sizing:border-box!important;transform:scale(var(--board-detail-scale))!important;transform-origin:top left!important;background:#152331fa!important;color:#eef5fc!important;padding:18px!important;border:1px solid #70889f!important;border-radius:13px!important;overflow:auto!important;font:18px/1.6 "Segoe UI","Yu Gothic UI",sans-serif!important}
body[data-current-screen=game] .board-fixed-detail .card-description-section{border-top:1px solid #ffffff26;padding-top:10px}
body[data-current-screen=game] .board-fixed-detail :is(p,h3,h4,.card-description-effect,.card-description-condition){color:inherit;font-family:inherit}
body[data-current-screen=game] .board-fixed-detail h3{font-size:23px}body[data-current-screen=game] .board-fixed-detail h4{font-size:15px;color:#aacec2}
@media(prefers-reduced-motion:reduce){.adopted-board #player-hand>.card.board-fusion-ready{animation:none}}
.adopted-board .board-dial-native-actions{display:none!important}
.board-turn-confirm{padding:25px;border:1px solid #718da5;border-radius:12px;background:#1b2b3b;color:white;font:18px sans-serif}
.board-turn-confirm::backdrop{background:#0008}.board-turn-confirm button{margin:12px 8px 0;padding:9px 18px;border:1px solid #91a6ba;border-radius:6px;background:#344c63;color:white;font:16px sans-serif;cursor:pointer}
