/* =========================================================
   SHOCKER v64 — IMPERIAL TRUMP BATTLE TABLE
   トランプ、宝石能力、小説キャラクターの世界観を盤面へ統合。
   既存の対戦DOM・当たり判定・操作位置は変更しない。
   ========================================================= */

body.v45-battle-active.v64-shocker-battle {
    --v64-gold:#d9b766;
    --v64-gold-bright:#ffe7a0;
    --v64-ivory:#f3e7c5;
    --v64-ink:#040608;
    --v64-enemy:#6b1621;
    --v64-enemy-bright:#b7434c;
    --v64-player:#0b4650;
    --v64-player-bright:#2b8d93;
    --v64-line:rgba(217,183,102,.58);
    color:var(--v64-ivory) !important;
    font-family:Georgia,"Yu Mincho","Hiragino Mincho ProN",serif !important;
    background:#030507 !important;
    isolation:isolate;
}

#v64-battle-backdrop {
    display:none;
    position:fixed;
    inset:0;
    z-index:0;
    overflow:hidden;
    pointer-events:none;
    background:
        radial-gradient(ellipse at 18% 18%,rgba(121,25,36,.34),transparent 31%),
        radial-gradient(ellipse at 82% 82%,rgba(14,91,99,.31),transparent 34%),
        linear-gradient(118deg,#020305 0 45%,#16070b 45.2% 49.7%,#d4b45f 49.85% 50.15%,#061419 50.3% 100%);
}
body.v45-battle-active.v64-shocker-battle #v64-battle-backdrop { display:block; }
#v64-battle-backdrop::before {
    content:"";
    position:absolute;
    inset:-20%;
    opacity:.3;
    background:
        repeating-conic-gradient(from 45deg at 50% 50%,transparent 0 12deg,rgba(255,255,255,.035) 12.2deg 12.7deg,transparent 12.9deg 24deg),
        repeating-linear-gradient(0deg,transparent 0 4px,rgba(255,255,255,.018) 5px);
    transform:rotate(-2deg);
    animation:v64-table-drift 22s linear infinite;
}
#v64-battle-backdrop::after {
    content:"♠       ♥       ♦       ♣";
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%) rotate(-7deg);
    color:#fff;
    opacity:.035;
    white-space:nowrap;
    font:900 clamp(92px,19vw,270px)/1 Georgia,serif;
    letter-spacing:.16em;
    text-shadow:0 0 80px rgba(255,255,255,.25);
}

/* ---------- 上部：紋章、ラウンド、戦術指令 ---------- */
body.v45-battle-active.v64-shocker-battle > h2 {
    position:relative !important;
    z-index:70 !important;
    width:100% !important;
    min-height:24px !important;
    margin:0 !important;
    padding:3px 118px 2px !important;
    overflow:hidden !important;
    border:0 !important;
    border-top:1px solid rgba(255,231,160,.28) !important;
    border-bottom:1px solid var(--v64-line) !important;
    color:var(--v64-gold-bright) !important;
    background:
        linear-gradient(90deg,rgba(0,0,0,.2),rgba(21,15,11,.9) 30% 70%,rgba(0,0,0,.2)) !important;
    font:900 clamp(14px,2.2vh,20px)/1 Georgia,serif !important;
    letter-spacing:.32em !important;
    text-indent:.32em !important;
    text-shadow:0 2px 0 #000,0 0 14px rgba(217,183,102,.52) !important;
}
body.v45-battle-active.v64-shocker-battle > h2::before {
    content:"♠  IMPERIAL";
    position:absolute;
    left:92px;
    top:50%;
    transform:translateY(-50%);
    color:rgba(243,231,197,.58);
    font:700 8px/1 "Courier New",monospace;
    letter-spacing:.18em;
    text-indent:0;
}
body.v45-battle-active.v64-shocker-battle > h2::after {
    content:"TRUMP DUEL  ♦";
    position:absolute;
    right:12px;
    top:50%;
    transform:translateY(-50%);
    color:rgba(243,231,197,.58);
    font:700 8px/1 "Courier New",monospace;
    letter-spacing:.18em;
    text-indent:0;
}

body.v45-battle-active.v64-shocker-battle #turn-info {
    position:relative !important;
    z-index:70 !important;
    justify-self:center !important;
    width:auto !important;
    min-width:min(52vw,280px) !important;
    margin:0 !important;
    padding:2px 24px 3px !important;
    border-inline:1px solid rgba(217,183,102,.45) !important;
    color:#d8c99e !important;
    background:linear-gradient(90deg,transparent,rgba(0,0,0,.72) 15% 85%,transparent) !important;
    font:700 clamp(9px,1.55vh,12px)/1.1 "Courier New",monospace !important;
    letter-spacing:.18em !important;
    text-shadow:0 2px 4px #000 !important;
    clip-path:polygon(8px 0,calc(100% - 8px) 0,100% 50%,calc(100% - 8px) 100%,8px 100%,0 50%);
}
body.v45-battle-active.v64-shocker-battle #turn-count {
    color:var(--v64-gold-bright) !important;
    font-size:1.15em;
}

body.v45-battle-active.v64-shocker-battle #phase-bar {
    position:relative !important;
    z-index:72 !important;
    width:100% !important;
    min-height:29px !important;
    max-height:38px !important;
    margin:0 !important;
    padding:6px 12px 5px 150px !important;
    overflow:hidden !important;
    border:1px solid rgba(217,183,102,.7) !important;
    border-left:4px solid var(--v64-gold-bright) !important;
    border-right:4px solid var(--v64-gold) !important;
    border-radius:0 !important;
    color:#fff0c2 !important;
    background:linear-gradient(90deg,rgba(26,20,15,.98),rgba(7,11,12,.96),rgba(26,20,15,.98));
    box-shadow:0 4px 16px rgba(0,0,0,.64),inset 0 1px rgba(255,255,255,.07) !important;
    font:800 clamp(10px,1.65vh,13px)/1.2 "Yu Gothic","Hiragino Kaku Gothic ProN",sans-serif !important;
    letter-spacing:.045em !important;
    text-align:left !important;
    text-shadow:0 1px 3px #000 !important;
    clip-path:polygon(0 0,calc(100% - 9px) 0,100% 50%,calc(100% - 9px) 100%,0 100%);
}
body.v45-battle-active.v64-shocker-battle #phase-bar::before {
    content:"TACTICAL ORDER";
    position:absolute;
    left:12px;
    top:50%;
    transform:translateY(-50%);
    width:122px;
    padding-right:10px;
    border-right:1px solid rgba(217,183,102,.5);
    color:var(--v64-gold);
    font:700 9px/1 "Courier New",monospace;
    letter-spacing:.16em;
}
body.v45-battle-active.v64-shocker-battle #revolution-status {
    border:1px solid #e7bd62 !important;
    border-radius:0 !important;
    color:#ffe29a !important;
    background:linear-gradient(90deg,#260408,#841722 28% 72%,#260408) !important;
    box-shadow:0 0 20px rgba(201,38,50,.55),inset 0 1px rgba(255,255,255,.1) !important;
    font-family:"Yu Gothic","Hiragino Kaku Gothic ProN",sans-serif !important;
}

/* ---------- 上下の領域：敵はガーネット、自分は青緑の宝石陣営 ---------- */
body.v45-battle-active.v64-shocker-battle .field-area {
    position:relative !important;
    z-index:40 !important;
    isolation:isolate;
    border-radius:0 !important;
    background-color:rgba(3,5,7,.76) !important;
    background-image:
        linear-gradient(100deg,rgba(255,255,255,.025),transparent 31%),
        repeating-linear-gradient(135deg,transparent 0 22px,rgba(255,255,255,.012) 23px 24px) !important;
    box-shadow:
        0 10px 26px rgba(0,0,0,.46),
        inset 0 1px rgba(255,255,255,.06),
        inset 0 0 34px rgba(0,0,0,.46) !important;
}
body.v45-battle-active.v64-shocker-battle .opponent-area {
    border:1px solid rgba(183,67,76,.76) !important;
    border-left:4px solid var(--v64-enemy-bright) !important;
    background-image:
        radial-gradient(ellipse at 84% 28%,rgba(141,32,45,.22),transparent 31%),
        linear-gradient(100deg,rgba(63,8,16,.7),rgba(3,5,7,.66) 46%),
        repeating-linear-gradient(135deg,transparent 0 22px,rgba(255,255,255,.012) 23px 24px) !important;
}
body.v45-battle-active.v64-shocker-battle .player-area {
    border:1px solid rgba(43,141,147,.76) !important;
    border-right:4px solid var(--v64-player-bright) !important;
    background-image:
        radial-gradient(ellipse at 16% 72%,rgba(24,119,128,.22),transparent 34%),
        linear-gradient(280deg,rgba(4,56,63,.7),rgba(3,5,7,.66) 48%),
        repeating-linear-gradient(135deg,transparent 0 22px,rgba(255,255,255,.012) 23px 24px) !important;
}
body.v45-battle-active.v64-shocker-battle .field-area::before {
    content:"";
    position:absolute;
    z-index:1;
    left:0;
    right:0;
    top:0;
    height:2px;
    opacity:.9;
    background:linear-gradient(90deg,currentColor,transparent 42%,rgba(217,183,102,.8),transparent 75%);
    pointer-events:none;
}
body.v45-battle-active.v64-shocker-battle .field-area::after {
    position:absolute;
    z-index:0;
    top:50%;
    transform:translateY(-50%);
    opacity:.035;
    pointer-events:none;
    color:#fff;
    font:900 clamp(70px,15vh,150px)/1 Georgia,serif;
}
body.v45-battle-active.v64-shocker-battle .opponent-area::after { content:"♦"; right:8%; }
body.v45-battle-active.v64-shocker-battle .player-area::after { content:"♠"; left:8%; }

body.v45-battle-active.v64-shocker-battle .field-area > h3 {
    position:relative !important;
    z-index:65 !important;
    width:max-content;
    max-width:58%;
    margin:0 auto 2px !important;
    padding:2px 16px 3px !important;
    border:0 !important;
    border-bottom:1px solid rgba(217,183,102,.42) !important;
    color:#ead8ab !important;
    background:linear-gradient(90deg,transparent,rgba(0,0,0,.6),transparent) !important;
    font:800 clamp(9px,1.45vh,12px)/1 "Courier New",monospace !important;
    letter-spacing:.12em !important;
    text-shadow:0 2px 4px #000 !important;
}
body.v45-battle-active.v64-shocker-battle .opponent-area > h3 { color:#efb0b3 !important; }
body.v45-battle-active.v64-shocker-battle .player-area > h3:first-of-type { color:#a9e1df !important; }
body.v45-battle-active.v64-shocker-battle .player-area > h3:nth-of-type(2) { color:#edd49a !important; }

body.v45-battle-active.v64-shocker-battle #opponent-field,
body.v45-battle-active.v64-shocker-battle #player-field,
body.v45-battle-active.v64-shocker-battle #hand-zone {
    position:relative !important;
    border-top:1px solid rgba(255,255,255,.025);
    border-bottom:1px solid rgba(217,183,102,.1);
    border-radius:0 !important;
    background:
        radial-gradient(ellipse at center,rgba(217,183,102,.065),transparent 62%),
        linear-gradient(90deg,transparent,rgba(0,0,0,.18),transparent) !important;
}
body.v45-battle-active.v64-shocker-battle #opponent-field::before,
body.v45-battle-active.v64-shocker-battle #player-field::before,
body.v45-battle-active.v64-shocker-battle #hand-zone::before {
    inset:4px 12% !important;
    z-index:0 !important;
    border:1px dashed rgba(217,183,102,.13) !important;
    border-radius:50% !important;
    background:transparent !important;
    pointer-events:none !important;
}

/* ---------- トランプ：象牙紙とSHOCKER専用カードバック ---------- */
body.v45-battle-active.v64-shocker-battle .card {
    border:1px solid rgba(229,209,158,.82) !important;
    border-radius:5px !important;
    box-shadow:
        0 6px 12px rgba(0,0,0,.6),
        inset 0 0 0 2px rgba(255,255,255,.33),
        inset 0 0 0 3px rgba(96,68,25,.18) !important;
    font-family:Georgia,"Times New Roman",serif !important;
}
body.v45-battle-active.v64-shocker-battle .card:not(.card-back) {
    background-color:#eee5d1;
    background-image:
        repeating-linear-gradient(0deg,rgba(86,63,31,.025) 0 1px,transparent 1px 3px),
        linear-gradient(135deg,#fffdf4,#ded1b6) !important;
}
body.v45-battle-active.v64-shocker-battle .card-back,
body.v45-battle-active.v64-shocker-battle .deck-pile,
body.v45-battle-active.v64-shocker-battle .opponent-mini-card {
    border-color:#d8b85f !important;
    background-color:#23090e !important;
    background-image:
        radial-gradient(circle at 50% 50%,rgba(217,183,102,.19) 0 7%,transparent 8% 21%,rgba(217,183,102,.14) 22% 24%,transparent 25%),
        repeating-conic-gradient(from 45deg at 50% 50%,#14070a 0 9deg,#52131c 9deg 18deg,#221016 18deg 27deg) !important;
    box-shadow:
        0 6px 12px rgba(0,0,0,.65),
        inset 0 0 0 3px #17070a,
        inset 0 0 0 4px rgba(217,183,102,.72),
        inset 0 0 15px rgba(0,0,0,.72) !important;
}
body.v45-battle-active.v64-shocker-battle .deck-container {
    filter:drop-shadow(0 8px 10px rgba(0,0,0,.48));
}
body.v45-battle-active.v64-shocker-battle .deck-label {
    color:#d9c38c !important;
    font:700 7px/1 "Courier New",monospace !important;
    letter-spacing:.08em;
    text-shadow:0 2px 4px #000 !important;
}
body.v45-battle-active.v64-shocker-battle .deck-pile {
    border-radius:4px !important;
    color:#f4d987 !important;
    font-family:Georgia,serif !important;
}
body.v45-battle-active.v64-shocker-battle .deck-bottom-card {
    border-color:#ae9454 !important;
    border-radius:4px !important;
    color:#21180d !important;
    background:linear-gradient(135deg,#fff9e9,#d9c9a8) !important;
    box-shadow:0 5px 9px rgba(0,0,0,.5),inset 0 0 0 2px rgba(118,83,28,.18) !important;
}

/* ---------- 相手手札と防衛履歴 ---------- */
body.v45-battle-active.v64-shocker-battle .opponent-hand-display {
    border:1px solid rgba(202,101,105,.6) !important;
    border-left:3px solid var(--v64-enemy-bright) !important;
    border-radius:0 !important;
    color:#e9c4bd !important;
    background:
        linear-gradient(135deg,rgba(75,12,22,.94),rgba(7,7,9,.94)) !important;
    box-shadow:0 8px 18px rgba(0,0,0,.62),inset 0 1px rgba(255,255,255,.06) !important;
    backdrop-filter:blur(8px) !important;
    clip-path:polygon(0 0,calc(100% - 8px) 0,100% 8px,100% 100%,0 100%);
}
body.v45-battle-active.v64-shocker-battle .opponent-hand-label {
    color:#f1b7b5 !important;
    font:700 8px/1 "Courier New",monospace !important;
    letter-spacing:.08em !important;
}
body.v45-battle-active.v64-shocker-battle .opponent-chain-log-title {
    border-top:1px solid rgba(217,183,102,.27) !important;
    color:#caaa73 !important;
    font-family:"Courier New",monospace !important;
}
body.v45-battle-active.v64-shocker-battle .opponent-chain-log {
    border-left:1px solid rgba(183,67,76,.24);
    background:linear-gradient(90deg,rgba(0,0,0,.3),transparent) !important;
    scrollbar-color:rgba(203,132,113,.62) rgba(24,4,8,.55) !important;
}
body.v45-battle-active.v64-shocker-battle .opponent-chain-log-entry {
    border-left-color:#b7434c !important;
    border-radius:0 !important;
    background:rgba(82,16,25,.36) !important;
}

/* ---------- 墓地 / スラッシュ：軍事記録のような帯 ---------- */
body.v45-battle-active.v64-shocker-battle .disposal-container {
    position:relative;
    z-index:62 !important;
}
body.v45-battle-active.v64-shocker-battle .disposal-box {
    border:1px solid rgba(217,183,102,.2) !important;
    border-radius:0 !important;
    background:linear-gradient(110deg,rgba(0,0,0,.55),rgba(255,255,255,.025)) !important;
    box-shadow:inset 0 1px rgba(255,255,255,.035) !important;
}
body.v45-battle-active.v64-shocker-battle .opponent-area .disposal-box:first-child { border-left:3px solid var(--v64-enemy-bright) !important; }
body.v45-battle-active.v64-shocker-battle .player-area .disposal-box:first-child { border-left:3px solid var(--v64-player-bright) !important; }
body.v45-battle-active.v64-shocker-battle .disposal-box:last-child { border-right:3px solid var(--v64-gold) !important; }
body.v45-battle-active.v64-shocker-battle .disposal-title {
    border-bottom:1px solid rgba(217,183,102,.22) !important;
    color:#bfb18f !important;
    font:700 clamp(7px,1.15vh,9px)/1 "Courier New",monospace !important;
    letter-spacing:.06em !important;
    text-align:left !important;
}
body.v45-battle-active.v64-shocker-battle .grave-card.stacked-zone-card {
    border-color:#5e5c57 !important;
    border-radius:2px !important;
    background:linear-gradient(180deg,#262522,#0e0f10) !important;
}
body.v45-battle-active.v64-shocker-battle .slash-card.stacked-zone-card {
    border-color:#c89c44 !important;
    border-radius:2px !important;
    background:linear-gradient(180deg,#61251c,#260a0d) !important;
}

/* ---------- 使用キャラクター名札（立ち絵は既存の大型表示を活かす） ---------- */
.v64-duelist-plate {
    --v64-duelist-gem:#d9b766;
    --v64-duelist-glow:rgba(217,183,102,.45);
    position:absolute;
    z-index:118;
    top:5px;
    width:clamp(112px,18vw,190px);
    min-height:29px;
    padding:4px 9px 4px 11px;
    overflow:hidden;
    border:1px solid color-mix(in srgb,var(--v64-duelist-gem) 62%,transparent);
    color:#f3e7c5;
    background:linear-gradient(110deg,rgba(0,0,0,.92),rgba(8,9,10,.62));
    box-shadow:0 5px 14px rgba(0,0,0,.55),0 0 12px var(--v64-duelist-glow);
    text-align:left;
    pointer-events:none;
    clip-path:polygon(0 0,calc(100% - 8px) 0,100% 8px,100% 100%,0 100%);
}
.opponent-area .v64-duelist-plate { right:5px; border-left:3px solid var(--v64-duelist-gem); }
.player-area .v64-duelist-plate { left:5px; border-left:3px solid var(--v64-duelist-gem); }
.v64-duelist-kicker {
    color:var(--v64-duelist-gem);
    font:700 6px/1 "Courier New",monospace;
    letter-spacing:.18em;
    white-space:nowrap;
}
.v64-duelist-name {
    margin-top:2px;
    overflow:hidden;
    color:#fff2ca;
    font:800 clamp(9px,1.45vh,12px)/1 Georgia,"Yu Mincho",serif;
    letter-spacing:.06em;
    text-overflow:ellipsis;
    text-shadow:0 2px 4px #000,0 0 9px var(--v64-duelist-glow);
    white-space:nowrap;
}
.v64-duelist-role {
    margin-top:2px;
    overflow:hidden;
    color:#ad9f80;
    font:700 6px/1 sans-serif;
    letter-spacing:.05em;
    text-overflow:ellipsis;
    white-space:nowrap;
}
body.v45-battle-active.v64-shocker-battle .battle-character.has-large-battle-art {
    opacity:.88 !important;
    filter:
        drop-shadow(0 14px 17px rgba(0,0,0,.78))
        drop-shadow(0 0 10px var(--char-glow))
        saturate(.93) contrast(1.04) !important;
}
body.v45-battle-active.v64-shocker-battle .battle-character.has-large-battle-art.v49-card-battle-art,
body.v45-battle-active.v64-shocker-battle .battle-character.has-large-battle-art.v47-card-battle-art {
    border:1px solid rgba(217,183,102,.45) !important;
    border-radius:6px !important;
    box-shadow:0 14px 28px rgba(0,0,0,.65),0 0 14px var(--char-glow) !important;
}

/* ---------- 行動ボタン：丸い汎用UIを廃し、カード卓の指令札へ ---------- */
body.v45-battle-active.v64-shocker-battle .action-btn,
body.v45-battle-active.v64-shocker-battle .confirm-btn,
body.v45-battle-active.v64-shocker-battle .cancel-btn,
body.v45-battle-active.v64-shocker-battle .ability-btn,
body.v45-battle-active.v64-shocker-battle #ability-field-swap-confirm {
    border:1px solid rgba(217,183,102,.58) !important;
    border-radius:3px !important;
    color:#f4e6bd !important;
    background:linear-gradient(180deg,#31291d,#0c0d0e) !important;
    box-shadow:0 5px 12px rgba(0,0,0,.52),inset 0 1px rgba(255,255,255,.08) !important;
    font-family:"Yu Gothic","Hiragino Kaku Gothic ProN",sans-serif !important;
    font-weight:800 !important;
    letter-spacing:.035em;
    text-shadow:0 1px 3px #000 !important;
}
body.v45-battle-active.v64-shocker-battle .action-btn:active:not(:disabled),
body.v45-battle-active.v64-shocker-battle .confirm-btn:active:not(:disabled),
body.v45-battle-active.v64-shocker-battle .cancel-btn:active:not(:disabled),
body.v45-battle-active.v64-shocker-battle .ability-btn:active:not(:disabled) {
    transform:translateY(1px) scale(.97);
    filter:brightness(1.18);
}
body.v45-battle-active.v64-shocker-battle .confirm-btn,
body.v45-battle-active.v64-shocker-battle .ability-btn.primary,
body.v45-battle-active.v64-shocker-battle #ability-field-swap-confirm {
    border-color:#e8cc7f !important;
    color:#120f09 !important;
    background:linear-gradient(180deg,#f0d789,#9a742b) !important;
    text-shadow:0 1px rgba(255,255,255,.28) !important;
}
body.v45-battle-active.v64-shocker-battle .cancel-btn {
    border-color:#6f7472 !important;
    color:#cbc9bf !important;
    background:linear-gradient(180deg,#383b3a,#111313) !important;
}
body.v45-battle-active.v64-shocker-battle #v38-refresh-action {
    border-color:#54b5b5 !important;
    background:linear-gradient(180deg,#1d6f72,#092a2e) !important;
}
body.v45-battle-active.v64-shocker-battle #v38-all-slash-action {
    border-color:#c86462 !important;
    background:linear-gradient(180deg,#7e2630,#270a10) !important;
}
body.v45-battle-active.v64-shocker-battle #v38-hand-action-controls,
body.v45-battle-active.v64-shocker-battle #v42-field-card-side-actions {
    padding:5px !important;
    border:1px solid rgba(217,183,102,.3);
    background:linear-gradient(145deg,rgba(15,16,16,.88),rgba(0,0,0,.58));
    box-shadow:0 8px 18px rgba(0,0,0,.55);
    clip-path:polygon(0 0,calc(100% - 7px) 0,100% 7px,100% 100%,0 100%);
}

body.v45-battle-active.v64-shocker-battle .counter-area {
    border:1px solid var(--v64-gold) !important;
    border-left:4px solid var(--v64-enemy-bright) !important;
    border-radius:0 !important;
    color:#e8d7b0 !important;
    background:linear-gradient(115deg,rgba(80,13,21,.97),rgba(5,7,8,.97)) !important;
    box-shadow:0 12px 35px rgba(0,0,0,.78),inset 0 1px rgba(255,255,255,.07) !important;
    clip-path:polygon(0 0,calc(100% - 12px) 0,100% 12px,100% 100%,12px 100%,0 calc(100% - 12px));
}
body.v45-battle-active.v64-shocker-battle #player-chain-menu {
    border-left-color:var(--v64-player-bright) !important;
    background:linear-gradient(115deg,rgba(5,64,70,.97),rgba(5,7,8,.97)) !important;
}
body.v45-battle-active.v64-shocker-battle .counter-area h3 { color:#f0d58c !important; }

/* ---------- キャラクター能力 / 試合メニュー / ログ / 勝敗 ---------- */
body.v45-battle-active.v64-shocker-battle #character-ability-overlay,
body.v45-battle-active.v64-shocker-battle #v37-ability-choice {
    background:
        radial-gradient(ellipse at 50% 35%,var(--ability-glow,rgba(217,183,102,.16)),transparent 34%),
        linear-gradient(118deg,rgba(67,11,20,.78),rgba(1,3,4,.96) 49%,rgba(5,56,62,.7)) !important;
    backdrop-filter:blur(10px) saturate(.8) !important;
}
body.v45-battle-active.v64-shocker-battle .ability-panel,
body.v45-battle-active.v64-shocker-battle .v37-choice-panel {
    position:relative;
    overflow:hidden;
    border:1px solid var(--ability-gem,#d9b766) !important;
    border-left:5px solid var(--ability-gem,#d9b766) !important;
    border-radius:0 !important;
    color:#eee0b9 !important;
    background:
        linear-gradient(145deg,rgba(42,32,22,.98),rgba(4,6,7,.99) 62%) !important;
    box-shadow:0 0 34px var(--ability-glow,rgba(217,183,102,.32)),0 24px 70px rgba(0,0,0,.82) !important;
    clip-path:polygon(0 0,calc(100% - 15px) 0,100% 15px,100% 100%,15px 100%,0 calc(100% - 15px));
}
body.v45-battle-active.v64-shocker-battle .ability-panel::after,
body.v45-battle-active.v64-shocker-battle .v37-choice-panel::after {
    content:"♠  SHOCKER  ♦";
    position:absolute;
    right:12px;
    top:9px;
    color:rgba(217,183,102,.38);
    font:700 7px/1 "Courier New",monospace;
    letter-spacing:.15em;
}
body.v45-battle-active.v64-shocker-battle .ability-panel-head {
    border-bottom:1px solid rgba(217,183,102,.32) !important;
}
body.v45-battle-active.v64-shocker-battle .ability-mini-portrait {
    border-radius:3px !important;
    box-shadow:0 0 12px var(--ability-glow) !important;
}
body.v45-battle-active.v64-shocker-battle #ability-stage-description {
    border:1px solid rgba(217,183,102,.18) !important;
    border-radius:0 !important;
    background:rgba(0,0,0,.34) !important;
}

body.v45-battle-active.v64-shocker-battle #v45-battle-menu-button,
body.v45-battle-active.v64-shocker-battle #v56-chain-log-open.v58-floating-log-button {
    border:1px solid rgba(217,183,102,.78) !important;
    border-radius:2px !important;
    color:#f0deb0 !important;
    background:linear-gradient(180deg,rgba(48,39,24,.98),rgba(7,8,9,.98)) !important;
    box-shadow:0 6px 17px rgba(0,0,0,.66),inset 0 1px rgba(255,255,255,.08) !important;
    font-family:"Courier New",monospace !important;
    letter-spacing:.08em !important;
    clip-path:polygon(0 0,calc(100% - 7px) 0,100% 7px,100% 100%,0 100%);
}
body.v45-battle-active.v64-shocker-battle #v56-chain-log-open.v58-floating-log-button {
    min-width:96px !important;
    min-height:34px !important;
    padding:6px 10px !important;
    border-left:3px solid var(--v64-enemy-bright) !important;
    color:#f2c5bd !important;
    background:linear-gradient(180deg,rgba(98,22,31,.98),rgba(20,5,8,.98)) !important;
    font-size:10px !important;
}
body.v45-battle-active.v64-shocker-battle .v45-menu-icon { color:var(--v64-gold) !important; }

body.v45-battle-active.v64-shocker-battle #v56-chain-log-overlay {
    background:linear-gradient(118deg,rgba(74,12,21,.86),rgba(0,0,0,.96) 56%,rgba(4,43,48,.74)) !important;
}
body.v45-battle-active.v64-shocker-battle .v56-chain-log-dialog {
    border-radius:0 !important;
    border-color:var(--v64-gold) !important;
    background:linear-gradient(145deg,#291217,#050708 68%) !important;
    clip-path:polygon(0 0,calc(100% - 14px) 0,100% 14px,100% 100%,14px 100%,0 calc(100% - 14px));
}

body.v45-battle-active.v64-shocker-battle #v43-match-result-menu {
    background:
        radial-gradient(circle at 50% 34%,rgba(217,183,102,.18),transparent 34%),
        linear-gradient(118deg,rgba(67,11,20,.84),rgba(0,0,0,.96) 51%,rgba(5,55,60,.78)) !important;
}
body.v45-battle-active.v64-shocker-battle .v43-result-card {
    border-radius:0 !important;
    border-left:5px solid var(--v43-result-color,#d9b766) !important;
    background:linear-gradient(145deg,rgba(40,30,19,.98),rgba(4,6,7,.99)) !important;
    clip-path:polygon(0 0,calc(100% - 16px) 0,100% 16px,100% 100%,16px 100%,0 calc(100% - 16px));
}
body.v45-battle-active.v64-shocker-battle #v43-return-menu-btn {
    border-radius:2px !important;
    background:linear-gradient(#ead387,#926e28) !important;
    font-family:Georgia,"Yu Mincho",serif !important;
}

/* ---------- 選択・照準状態 ---------- */
body.v45-battle-active.v64-shocker-battle .selected-card,
body.v45-battle-active.v64-shocker-battle .v38-origin-selected {
    border-color:#ffe18a !important;
    outline:2px solid rgba(255,225,138,.78) !important;
    box-shadow:0 0 0 2px rgba(42,26,4,.76),0 0 22px rgba(255,190,62,.88),0 10px 18px rgba(0,0,0,.65) !important;
}
body.v45-battle-active.v64-shocker-battle .v38-target-available,
body.v45-battle-active.v64-shocker-battle .v38-pending-target {
    border-color:#eb726b !important;
    box-shadow:0 0 0 2px rgba(67,8,13,.72),0 0 22px rgba(235,75,69,.78) !important;
}

/* ---------- スマホ・短い画面 ---------- */
@media (max-width:700px) {
    body.v45-battle-active.v64-shocker-battle > h2 {
        padding-left:78px !important;
        padding-right:80px !important;
        font-size:14px !important;
        letter-spacing:.22em !important;
        text-indent:.22em !important;
    }
    body.v45-battle-active.v64-shocker-battle > h2::before {
        left:75px;
        content:"♠";
        font-size:9px;
    }
    body.v45-battle-active.v64-shocker-battle > h2::after {
        right:7px;
        content:"TRUMP DUEL";
        font-size:6px;
        letter-spacing:.08em;
    }
    body.v45-battle-active.v64-shocker-battle #phase-bar {
        padding-left:106px !important;
        padding-right:7px !important;
    }
    body.v45-battle-active.v64-shocker-battle #phase-bar::before {
        left:8px;
        width:88px;
        font-size:7px;
        letter-spacing:.08em;
    }
    .v64-duelist-plate {
        width:96px;
        min-height:24px;
        padding:3px 5px 3px 7px;
    }
    .v64-duelist-kicker { font-size:5px; letter-spacing:.08em; }
    .v64-duelist-name { font-size:8px; }
    .v64-duelist-role { display:none; }
    body.v45-battle-active.v64-shocker-battle .field-area > h3 {
        max-width:50%;
        padding-inline:8px !important;
        font-size:8px !important;
        letter-spacing:.06em !important;
    }
    body.v45-battle-active.v64-shocker-battle .battle-character.has-large-battle-art { opacity:.72 !important; }
}

@media (max-width:390px) {
    body.v45-battle-active.v64-shocker-battle > h2 { padding-left:70px !important; }
    body.v45-battle-active.v64-shocker-battle > h2::before { left:66px; }
    body.v45-battle-active.v64-shocker-battle #turn-info {
        min-width:64vw !important;
        padding-inline:12px !important;
        letter-spacing:.08em !important;
    }
    body.v45-battle-active.v64-shocker-battle #phase-bar {
        padding-left:84px !important;
        font-size:9px !important;
    }
    body.v45-battle-active.v64-shocker-battle #phase-bar::before {
        width:69px;
        content:"ORDER";
    }
    .v64-duelist-plate { width:84px; }
    .v64-duelist-name { font-size:7px; }
}

@media (orientation:landscape) and (max-height:500px) {
    body.v45-battle-active.v64-shocker-battle .v64-duelist-plate { width:105px; }
    body.v45-battle-active.v64-shocker-battle .v64-duelist-role { display:none; }
}

@media (prefers-reduced-motion:reduce) {
    #v64-battle-backdrop::before { animation:none !important; }
}

@supports not (color:color-mix(in srgb,#fff 50%,transparent)) {
    .v64-duelist-plate { border-color:rgba(217,183,102,.62); }
}

@keyframes v64-table-drift {
    from { transform:translate3d(-1.2%,0,0) rotate(-2deg); }
    to { transform:translate3d(1.2%,0,0) rotate(-2deg); }
}
