/* Retain the accepted playmat coordinates; move only the outside panels. */
@media(min-aspect-ratio:1001/1000){
.v6-live{--edge-out:0px;overflow:visible!important}
.v6-live .inspector,.v6-live .battle-log{top:9%;height:81%;width:21.5%;background:#071a28cf}
.v6-live .inspector{left:calc(-1 * var(--edge-out));display:flex}
.v6-live .battle-log{right:calc(-1 * var(--edge-out));left:auto;display:block}
.v6-live .battle-log[hidden]{display:none}
.v6-live .topbar{left:calc(-1 * var(--edge-out));right:calc(-1 * var(--edge-out));width:auto}
.v6-live .brand{width:24%;}
.v6-live .phase-track{left:50%;transform:translateX(-50%);width:58%;height:76%}
.v6-live .scene-background,.v6-live #background-video,.v6-live .scene-scrim{left:calc(-1 * var(--edge-out));right:calc(-1 * var(--edge-out));width:calc(100% + 2 * var(--edge-out))}
.v6-live .phase-track[data-phase="main"]{overflow:hidden;background:none}
.v6-live .phase-track[data-phase="main"]:after{content:'';position:absolute;inset:0;background:url('assets/interface-v6/leo-phase-bar.jpg') 50% 97%/107.7% 243% no-repeat;pointer-events:none}
}
.short-landscape .v6-live{--edge-out:calc((var(--landscape-width) / var(--landscape-scale) - 1100px) / 2)}
.negate-card-fx{position:fixed;z-index:65;pointer-events:none;border:2px solid #e1fbff;background:radial-gradient(ellipse,#fff 3%,#d0f9ffb8 34%,#2bbfff55 60%,transparent 80%);box-shadow:0 0 18px 8px #a4e9ff}
.negate-card-fx:before{content:'';position:absolute;inset:-25%;background:repeating-conic-gradient(transparent 0deg 18deg,#a7e9ffbb 20deg 22deg,transparent 24deg 38deg);mask-image:radial-gradient(ellipse,transparent 15%,#000 35%,transparent 72%)}
.negate-card-fx strong{position:absolute;bottom:0;left:0;right:0;text-align:center;background:#072c47;color:white;font-size:14px}
.negate-card-fx.reduced{background:#73cfff33;box-shadow:none}.negate-card-fx.reduced:before{display:none}
@media(min-aspect-ratio:1001/1000){.v6-live .battle-log{max-height:none;min-height:0;height:81%;top:9%;bottom:auto}.v6-live .inspector{max-height:none;min-height:0;height:81%;top:9%;bottom:auto}}
@media(min-aspect-ratio:1001/1000){.v6-live .phase-track[data-phase="main"]:after{z-index:5}.v6-live .phase-track[data-phase="main"]>.phase{opacity:0}}

/* v2.3: full-height inspector; separate right history and control regions. */
.v6-control-rail{display:contents}
@media(min-aspect-ratio:1001/1000){
 .v6-live .inspector{height:81%!important;overflow:auto}
 .v6-live .inspector-art{min-height:90px}
 .v6-live .v6-control-rail{position:absolute;left:auto;right:calc(-1 * var(--edge-out) + var(--edge-safe-right));top:54%;width:21.5%;height:36%;display:flex;flex-direction:column;gap:6px;overflow:auto;overscroll-behavior:contain;z-index:12;background:#061521ed}
 .v6-live .v6-control-rail>.v6-actions,.v6-live .v6-control-rail>.v6-evolution-progress,.v6-live .v6-control-rail>.v6-response{position:static!important;inset:auto!important;width:100%!important;height:auto!important;max-height:none!important;min-height:0;flex:none;overflow:visible;margin:0;box-sizing:border-box}
 .v6-live .v6-control-rail>.v6-actions{order:0;padding:8px}
 .v6-live .v6-control-rail>.v6-evolution-progress{order:1}
 .v6-live .v6-control-rail>.v6-response{order:2}
 .v6-live .v6-control-rail>[hidden]{display:none!important}
 .v6-live .v6-control-rail>.v6-response:empty{display:none}
 .v6-live .v6-actions button{min-height:40px;font-size:16px;flex:1 1 40%}
 .v6-live .v6-evolution-progress .evolution-counter{font-size:14px}
 .v6-live .battle-log{overflow:hidden}
 .v6-live .battle-log .log-entries{max-height:calc(100% - 48px);overflow:auto}
}
@media(max-aspect-ratio:1/1){
 .v6-live .battle-log{display:none!important}
 body:has(#modal[open][data-history="yes"]) .v6-actions,
 body:has(#modal[open][data-history="yes"]) .v6-evolution-progress,
 body:has(#modal[open][data-history="yes"]) .v6-response,
 body:has(#modal[open][data-history="yes"]) .desktop-action,
 body:has(#modal[open][data-history="yes"]) .mobile-dock{visibility:hidden!important;pointer-events:none!important}
}
#modal[data-history="yes"]{z-index:100;max-height:85dvh;overflow:auto}
#modal[data-history="yes"]::backdrop{background:rgba(0,8,16,.88)}

@media(min-aspect-ratio:1001/1000){
 .v6-live{--edge-safe-left:max(12px,env(safe-area-inset-left,0px));--edge-safe-right:max(12px,env(safe-area-inset-right,0px));--edge-safe-top:max(4px,env(safe-area-inset-top,0px))}
 .v6-live .inspector{left:calc(-1 * var(--edge-out) + var(--edge-safe-left))}
 .v6-live .battle-log{right:calc(-1 * var(--edge-out) + var(--edge-safe-right));height:42%;top:9%}
 .v6-live .topbar{left:calc(-1 * var(--edge-out) + var(--edge-safe-left));right:calc(-1 * var(--edge-out) + var(--edge-safe-right));top:var(--edge-safe-top)}
 .v6-live .phase-track{width:min(58%,610px);height:auto;aspect-ratio:1122/74;background-size:contain}
 .v6-live .phase-track[data-phase="main"]:after{background-size:107.7% auto;background-position:50% 98.1%}
 .short-landscape .v6-live{--edge-safe-left:calc(max(24px,env(safe-area-inset-left,0px)) / var(--landscape-scale,1));--edge-safe-right:calc(max(24px,env(safe-area-inset-right,0px)) / var(--landscape-scale,1));--edge-safe-top:calc(max(4px,env(safe-area-inset-top,0px)) / var(--landscape-scale,1))}
}

@media(min-aspect-ratio:1001/1000){
 .v6-live{--edge-safe-bottom:max(12px,env(safe-area-inset-bottom,0px))}
 .short-landscape .v6-live{--edge-safe-bottom:calc(max(12px,env(safe-area-inset-bottom,0px)) / var(--landscape-scale,1))}
 .v6-live .desktop-action{bottom:max(2%,var(--edge-safe-bottom))}
}

/* v2.4: three disjoint right-hand regions, including the phase buttons. */
@media(min-aspect-ratio:1001/1000){
 .v6-live .battle-log{top:9%;height:34%;margin:0!important}
 .v6-live .v6-control-rail{top:45%;bottom:24%;height:auto}
 .v6-live .desktop-action,.v6-live .desktop-action:has(.phase-choice-buttons){top:78%;bottom:var(--edge-safe-bottom);height:auto;right:calc(-1 * var(--edge-out) + var(--edge-safe-right));width:21.5%;overflow:auto;min-height:0;z-index:16}
 .v6-live .desktop-action .pass-button{min-height:34px;font-size:16px}
 .v6-live .phase-track{width:58%;padding:3px 10px}
 .v6-live .phase-track>.phase{font-size:clamp(12px,1vw,16px);padding:2px;letter-spacing:0;min-width:0}
 .v6-live .phase-track>.phase+.phase::before{display:none}
 .short-landscape .v6-live .phase-track>.phase{font-size:13px}
}
.v6-live button.slot:is(.deity,.temple,.equipment)::after{content:'查看卡牌';display:flex;position:absolute;inset:auto 5% 18%;align-items:center;justify-content:center;min-height:30px;padding:7px 3px;background:#302114 url('assets/interface-v6/ornate-button-amber.svg') center/100% 100% no-repeat;color:#fff5c5;font:700 14px/1.2 'Songti TC',serif;border:1px solid #e6bd60;box-shadow:0 0 14px #f8c65388;opacity:0;transform:translateY(4px);transition:opacity .14s,transform .14s;pointer-events:none;z-index:10}
.v6-live button.slot.can-activate:is(.deity,.temple,.equipment)::after{content:'發動效果'}
.v6-live button.slot:is(.deity,.temple,.equipment):is(:hover,:focus-visible)::after{opacity:1;transform:none}

/* D3: immediate fine-pointer cue, at the middle-lower part of the card. */
.v6-live button.slot:is(.deity,.temple,.equipment)::after{bottom:45%;transition:none}
.v6-live .hand-card-shell>.card-quick-actions{bottom:45%}
@media(hover:hover) and (pointer:fine){
 .v6-live .hand-card.can-activate::after{content:attr(data-hint);display:flex;position:absolute;left:4%;right:4%;bottom:45%;min-height:30px;padding:6px 2px;align-items:center;justify-content:center;background:#302114 url('assets/interface-v6/ornate-button-amber.svg') center/100% 100% no-repeat;color:#fff5c5;font:700 14px/1.2 'Songti TC',serif;border:1px solid #e6bd60;box-shadow:0 0 14px #f8c65388;opacity:0;pointer-events:none;z-index:10;transition:none}
 .v6-live .hand-card.can-activate:is(:hover,:focus-visible)::after{opacity:1}
 .v6-live .hand-card-shell.is-selected>.hand-card::after{display:none}
}
/* The real character action buttons already provide the hover cue. */
.v6-live .field-character:has(.character-quick-actions) .player-god::after{display:none}

/* Read-only attack counters in the open space beside each grave pile. */
.v6-live .field-attack-count{position:absolute;z-index:8;display:flex;align-items:baseline;gap:5px;padding:3px 7px;border:1px solid #ae8a49;background:#071b28df;color:#ead09b;font-size:12px;white-space:nowrap;pointer-events:none}
.v6-live .field-attack-count strong{font-size:19px;color:#fff0c7}.v6-live .field-attack-count small{font-size:10px}
.v6-live .cpu-attack-count{left:27.5%;top:41.3%}.v6-live .player-attack-count{right:27.5%;top:calc(59.1% - 48px)}
@media(max-aspect-ratio:1/1){.v6-live .field-attack-count{gap:3px;padding:2px 4px;font-size:9px}.v6-live .field-attack-count strong{font-size:14px}.v6-live .field-attack-count small{font-size:8px}.v6-live .cpu-attack-count{left:50%;top:42%;transform:translateX(-50%)}.v6-live .player-attack-count{left:50%;right:auto;top:49%;transform:translateX(-50%)}}
