body.war-royal-table .card-game-battle {
  background: #073d30 url('../../assets/card-table/emerald-table-v1.webp') center / cover no-repeat;
}
body.war-royal-table .card-table-center {
  background: #003a2b50;
  border: 1px solid #dab96b99;
  box-shadow: inset 0 0 24px #001c1680, 0 0 0 3px #052a2266;
}
body.war-royal-table .opponent-card {
  background: linear-gradient(145deg,#143f38ee,#06271fee);
  border-color: #c8b07977;
  box-shadow: inset 0 1px #ffedc933, 0 3px 8px #00191166;
}
body.war-royal-table .opponent-card strong { color: #ffe4a2; }
body.war-royal-table .card-game-player { background:#05281fe6; border-color:#d8ba6d88; }
body.war-royal-table .playing-card { --classic-card-width:52px; font-family:Georgia,'Times New Roman',serif; }
body.war-royal-table .playing-card .rank {font-size:10px;line-height:1;}
body.war-royal-table .playing-card .deck-center {inset:17% 12%;}
body.war-royal-table .playing-card .deck-pip {font-size:8px;}
body.war-royal-table .playing-card[data-deck-rank='A'] .deck-pip {font-size:18px;}
body.war-royal-table .playing-card .deck-court {inset:16% auto auto 19%;}
body.war-royal-table .playing-card.is-selected {border-color:#ffe3a0;box-shadow:0 0 0 2px #ffdd87,0 6px 10px #001a14aa;}
body.war-royal-table .playing-card.is-selected {transform:none;outline:2px solid #ffe6a0;outline-offset:-3px;}
body.war-royal-table .playing-card.war-card-arrival {animation:war-card-arrival 180ms ease-out;}
/* Persistent ring identifies the winning face without moving cards or buttons.
   A tie marks both cards; this is driven by the engine's settlement, not text. */
body.war-royal-table #cardGameCenter .war-showdown-winner {
 outline:3px solid #ffe58a;outline-offset:3px;
 box-shadow:0 0 0 7px #ad88344d,0 0 24px #ffcf6355,0 8px 18px #001a17aa;
}
body.war-royal-table #cardGameCenter .war-showdown-tie {
 outline:2px dashed #ffe58a;outline-offset:3px;
}
@keyframes war-card-arrival {from{opacity:.55;transform:translateY(5px);}to{opacity:1;transform:translateY(0);}}
@media(prefers-reduced-motion:reduce){body.war-royal-table .playing-card {animation:none!important;transition:none!important;}}

body.war-royal-table .playing-card.is-face-down {background:#082d26 url('../../assets/klondike-solitaire-card-back.webp') center/100% 100%;border-color:#d4b56b;}
body.war-royal-table .playing-card.is-face-down::after {content:none;}
body.war-royal-table #cardGameActions button,
body.war-royal-table .main-actions button,
body.war-royal-table .result-actions button {
 border:1px solid #cbb376;border-radius:12px;padding:10px 12px;min-height:44px;
 background:linear-gradient(140deg,#20423b,#092727);color:#fff1cf;font:700 14px/1.3 system-ui,sans-serif;
 box-shadow:inset 0 1px #fff3,0 3px 8px #0004;
}
body.war-royal-table button.primary-btn {background:linear-gradient(135deg,#ffe4a0,#e6bc5b);color:#123028;}
body.war-royal-table button:disabled {opacity:.42;cursor:default;}

body.war-royal-table #cardGameCenter .playing-card {width:110px;min-width:110px;height:154px;min-height:154px;border-radius:13px;box-shadow:0 8px 18px #001a17aa;}
body.war-royal-table #cardGameCenter .playing-card .rank {font-size:19px;}
body.war-royal-table #cardGameCenter .playing-card .deck-pip {font-size:17px;}
body.war-royal-table #cardGameCenter .playing-card[data-deck-rank='A'] .deck-pip {font-size:42px;}
body.war-royal-table #cardGameCenter .table-row {gap:22px;padding:10px;}
body.war-royal-table #cardGameCenter .card-choice-summary {color:#fff0bf;background:#173f31;border-color:#d4b778;max-width:90%;margin:8px auto;box-sizing:border-box;}
body.war-royal-table #cardGameActions button {width:min(320px,80vw);min-height:52px;background:linear-gradient(135deg,#ffe4a0,#e6bc5b);color:#153229;font:700 18px/1.2 system-ui,sans-serif;cursor:pointer;}
body.war-royal-table #cardGameActions button:focus-visible {outline:3px solid #fff0bc;outline-offset:3px;}
body.war-royal-table #cardGameHand {display:flex;align-items:center;justify-content:center;gap:15px;}
body.war-royal-table #cardGameHand::before {content:'';display:block;width:39px;height:55px;border-radius:6px;border:1px solid #e3c777;background:url('../../assets/klondike-solitaire-card-back.webp') center/100% 100%;box-shadow:3px 2px #ae955c,6px 4px #15382e;}
body.war-royal-table .opponent-card {color:#fff0d2;}
body.war-royal-table #resultOverlay .result-card {background:radial-gradient(ellipse at top,#254d42,#071e22);border-color:#d7b96f;}
@keyframes war-card-arrival {from{opacity:.4;transform:perspective(500px) rotateY(75deg) translateY(-6px);}to{opacity:1;transform:perspective(500px) rotateY(0) translateY(0);}}
@media(orientation:landscape) and (max-height:560px){
 body.war-royal-table #cardGameCenter .playing-card {width:56px;min-width:56px;height:78px;min-height:78px;border-radius:7px;}
 body.war-royal-table #cardGameCenter .playing-card .rank {font-size:11px;}
 body.war-royal-table #cardGameCenter .playing-card .deck-pip {font-size:8px;}
 body.war-royal-table #cardGameCenter .playing-card[data-deck-rank='A'] .deck-pip {font-size:21px;}
 body.war-royal-table #cardGameCenter .table-row {padding:3px;gap:16px;}
 body.war-royal-table #cardGameCenter .card-choice-summary {margin:3px auto;}
 body.war-royal-table #cardGameHand::before {width:28px;height:40px;}
}
