body.cribbage-royal-table .card-game-battle {
  background: #073d30 url('../../assets/card-table/emerald-table-v1.webp') center / cover no-repeat;
}
body.cribbage-royal-table .card-table-center {
  background: #003a2b50;
  border: 1px solid #dab96b99;
  box-shadow: inset 0 0 24px #001c1680, 0 0 0 3px #052a2266;
}
body.cribbage-royal-table .opponent-card {
  background: linear-gradient(145deg,#143f38ee,#06271fee);
  border-color: #c8b07977;
  box-shadow: inset 0 1px #ffedc933, 0 3px 8px #00191166;
}
body.cribbage-royal-table .opponent-card strong { color: #ffe4a2; }
body.cribbage-royal-table .card-game-player { background:#05281fe6; border-color:#d8ba6d88; }
body.cribbage-royal-table .playing-card { --classic-card-width:52px; font-family:Georgia,'Times New Roman',serif; }
body.cribbage-royal-table .playing-card .rank {font-size:10px;line-height:1;}
body.cribbage-royal-table .playing-card .deck-center {inset:17% 12%;}
body.cribbage-royal-table .playing-card .deck-pip {font-size:8px;}
body.cribbage-royal-table .playing-card[data-deck-rank='A'] .deck-pip {font-size:18px;}
body.cribbage-royal-table .playing-card .deck-court {inset:16% auto auto 19%;}
body.cribbage-royal-table .playing-card.is-selected {border-color:#ffe3a0;box-shadow:0 0 0 2px #ffdd87,0 6px 10px #001a14aa;}
body.cribbage-royal-table .playing-card.is-selected {transform:none;outline:2px solid #ffe6a0;outline-offset:-3px;}
body.cribbage-royal-table .playing-card.cribbage-card-arrival {animation:cribbage-card-arrival 180ms ease-out;}
@keyframes cribbage-card-arrival {from{opacity:.55;transform:translateY(5px);}to{opacity:1;transform:translateY(0);}}
@media(prefers-reduced-motion:reduce){body.cribbage-royal-table .playing-card {animation:none!important;transition:none!important;}}

body.cribbage-royal-table .playing-card.is-face-down {background:#082d26 url('../../assets/klondike-solitaire-card-back.webp') center/100% 100%;border-color:#d4b56b;}
body.cribbage-royal-table .playing-card.is-face-down::after {content:none;}
body.cribbage-royal-table #cardGameActions button,
body.cribbage-royal-table .main-actions button,
body.cribbage-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.cribbage-royal-table button.primary-btn {background:linear-gradient(135deg,#ffe4a0,#e6bc5b);color:#123028;}
body.cribbage-royal-table button:disabled {opacity:.42;cursor:default;}
body.cribbage-royal-table .card-peg-board {box-sizing:border-box;width:min(100%,440px);padding:10px;border:2px solid #dab775;background:linear-gradient(120deg,#382014,#765136 48%,#362016);box-shadow:inset 0 0 0 3px #b28a5240,0 5px 18px #001c15aa;}
body.cribbage-royal-table .card-peg-row {grid-template-columns:repeat(31,minmax(0,1fr));gap:2px;direction:ltr;}
body.cribbage-royal-table .card-peg-row + .card-peg-row {margin-top:8px;padding-top:8px;border-top:1px solid #c7a26660;}
body.cribbage-royal-table .card-peg {background:#160e09;box-shadow:inset 0 1px 2px #000;}
body.cribbage-royal-table .card-peg.is-current {box-shadow:0 0 5px currentColor;transform:scale(1.3);}
body.cribbage-royal-table .card-peg.is-player {color:#7be9cb;}
body.cribbage-royal-table .card-peg.is-ai {color:#ff9b8f;}
body.cribbage-royal-table .card-peg-board .card-game-topbar {justify-content:space-between;min-height:20px;font-size:11px;margin-top:5px;}
body.cribbage-royal-table .card-peg-board .card-game-topbar small {font-size:12px;}
body.cribbage-royal-table .crib-coach-panel {max-height:96px;overflow:auto;overscroll-behavior:contain;}
body.cribbage-royal-table #cardGameCenter .table-row {min-height:56px;gap:4px;}
body.cribbage-royal-table #cardGameCenter .playing-card {width:36px;height:51px;min-height:51px;flex:0 0 36px;}
body.cribbage-royal-table #cardGameCenter .playing-card .rank {font-size:7px;}
body.cribbage-royal-table #cardGameCenter .playing-card .deck-pip {font-size:5px;}
body.cribbage-royal-table .card-crib-transition,body.cribbage-royal-table .card-crib-score-cue {border-color:#d8ba6d88;background:#07271fd9;color:#fff0d6;}
body.cribbage-royal-table .playing-card.is-selected {border-color:#ffe3a0;box-shadow:0 0 0 2px #ffdd87,0 6px 10px #001a14aa;}
@media(orientation:landscape) and (max-height:560px){
 body.cribbage-royal-table #cardGameCenter {display:grid;grid-template-columns:minmax(0,1fr) 180px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:3px;align-items:start;width:100%;}
 body.cribbage-royal-table #cardGameCenter > .card-table-label {grid-column:1/-1;font-size:10px;padding:0;}
 body.cribbage-royal-table #cardGameCenter > .crib-coach-panel {grid-column:1;grid-row:2;max-height:90px;overflow:auto;overscroll-behavior:contain;}
 body.cribbage-royal-table .crib-coach-panel > * {font-size:10px;line-height:1.1;margin:0;padding:3px;}
 body.cribbage-royal-table #cardGameCenter > .card-peg-board {grid-column:2;grid-row:2;width:180px;padding:4px;}
 body.cribbage-royal-table #cardGameCenter > .table-row {grid-column:3;grid-row:2;min-height:0;gap:3px;align-items:start;}
 body.cribbage-royal-table #cardGameCenter .playing-card {width:32px;height:44px;min-height:44px;flex-basis:32px;}
 body.cribbage-royal-table #cardGameCenter .playing-card .rank {font-size:7px;}
 body.cribbage-royal-table #cardGameCenter .playing-card .deck-pip {font-size:5px;}
 body.cribbage-royal-table .card-peg-row {gap:1px;}
 body.cribbage-royal-table .card-peg-row + .card-peg-row {margin-top:3px;padding-top:3px;}
 body.cribbage-royal-table .card-peg-board .card-game-topbar {font-size:9px;margin-top:2px;}
 body.cribbage-royal-table .card-peg-board .card-game-topbar small {font-size:9px;}
 body.cribbage-royal-table #cardGameActions button {padding:6px 10px;}
}
/* Main uses the shared 420px wide-layout contract at every desktop height. */
@media(min-width:700px){
 body[data-wp-card-game="cribbage"] .wp-standard-main-composition{--wp-main-landscape-poster-size:420px}
}
