/* Dedicated games share the Garuda materials and relative seats without
   replacing their Charleston, private-card, or adjudication controllers. */
.premium-board {
 --premium-grain:#eec99813;
 --premium-metal:#e9be77;
 --premium-highlight:#ffe7ac;
 --premium-edge:#b87b4d;
 --premium-depth:#190a0d;
}
#board.premium-board, #practice-table.premium-board { margin-top:.7rem; }
.ic-variant main:has(.premium-board:not([hidden])) { width:min(100%,76rem); }
#practice-demo:has(#practice-table:not([hidden])) { padding-inline:clamp(.35rem,2vw,1rem); }
.premium-board .premium-court {
 display:grid;
 grid-template-columns:minmax(0,1fr) minmax(0,2.4fr) minmax(0,1fr);
 grid-template-areas:"left opposite right" "left centre right" ". you ." "rack rack rack";
 grid-template-rows:auto minmax(clamp(74px,11vh,145px),auto) auto auto;
 gap:clamp(4px,1vw,14px);
 align-items:start;
 position:relative;
 isolation:isolate;
 min-width:0;
 margin:.45rem 0;
 padding:clamp(8px,1.4vw,20px) clamp(8px,1.5vw,22px) clamp(23px,4.5vw,50px);
 border-color:var(--premium-edge);
 border-radius:clamp(12px,2vw,28px);
 box-shadow:inset 0 0 0 2px var(--design-wood-dark),inset 0 0 0 4px var(--design-rim),
   inset 0 0 0 5px var(--design-fine),inset 0 0 3rem #13050a76,
   0 .45rem 0 var(--premium-depth),0 .55rem 1.4rem #040204aa;
}
.premium-court::before {
 content:""; position:absolute; inset:9px 8px clamp(18px,3.25vw,35px); z-index:-1; pointer-events:none;
 border:1px solid var(--design-fine);
 border-radius:inherit;
 background:radial-gradient(ellipse at center,transparent 49%,#13040b36 100%),
   repeating-linear-gradient(35deg,var(--premium-grain) 0 1px,transparent 1px 5px);
}
.premium-board .premium-seats {display:contents}
.premium-board .premium-seat {
 min-width:0; margin:0; padding:.35rem .4rem;align-self:start;
 max-width:100%; border:1px solid #c9955f; border-radius:.5rem;
 background:linear-gradient(165deg,#3a211b,#1f1017e8);
 color:#fff1d6; box-shadow:inset 0 1px #c99b5a66,0 2px 5px #120609a0;
 text-align:center; overflow-wrap:anywhere;
}
.premium-board .premium-seat[data-position=left] {grid-area:left;align-self:center}
.premium-board .premium-seat[data-position=right] {grid-area:right;align-self:center}
.premium-board .premium-seat[data-position=opposite] {grid-area:opposite;justify-self:center}
.premium-board .premium-seat[data-position=you] {grid-area:you; justify-self:center}
.premium-board .premium-seat :is(header,strong) {display:block;font-size:clamp(.7rem,1.65vw,1.02rem);line-height:1.2}
.premium-board .premium-seat .score {color:#ffdea1;font-size:clamp(.68rem,1.5vw,.87rem);font-variant-numeric:tabular-nums}
.premium-board .premium-seat :is(.score,.premium-count){display:block}
.premium-board .premium-count {font-size:.69rem;color:#ffefd7}
.premium-board .premium-seat:is(.active,[aria-current=true]) {
 background:linear-gradient(155deg,#634124,#2f151a);
 border-color:var(--premium-highlight);
 box-shadow:0 0 0 1px #efbc70,0 0 .85rem #f3af5166;
}
.premium-backs {
 display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:1px;
 margin-top:.24rem;
}
.premium-backs i {
 flex:none; width:clamp(4px,.83vw,9px);aspect-ratio:2/3;
 border:1px solid #9ab39a;border-radius:20%;
 background:linear-gradient(155deg,#5d8a75,var(--design-backs,#34564c) 52%,#17372d);
 box-shadow:inset 0 -2px #dabd87;
}
.premium-board .premium-centre {
 grid-area:centre;align-self:stretch;min-width:0;
 border:1px solid #e4b6797c;border-radius:clamp(4px,1.4vw,16px);
 padding:clamp(4px,1vw,11px);margin:0;
 background:radial-gradient(ellipse,#7a284c18,#1f061b59);
 color:#fff3d9; box-shadow:inset 0 1px 9px #1e07185e;
 text-align:center; overflow-wrap:anywhere;
}
.premium-board .premium-centre .turn-strip {justify-content:center}
.premium-board .premium-centre .discard-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
.premium-board .premium-centre .river {justify-content:center}
.premium-board .premium-rack {grid-area:rack; min-width:0; width:100%; justify-self:center; text-align:center; padding:.35rem .28rem; margin:0}
.premium-board .premium-rack-label,.premium-board #my-panel h3 {font-weight:700;color:#ffe8bc;margin:.18rem 0}
.ic-variant .premium-board #my-panel {
 background:linear-gradient(180deg,#2e131b34,#190c123e);border:1px solid #c7895b6b;
}
.premium-board :is(.rack,#practice-rack,.young-hand) {
 display:flex;justify-content:center;flex-wrap:wrap;align-content:center;gap:clamp(2px,.35vw,5px);
 max-width:100%;margin:.4rem auto;
}
.premium-board :is(.rack,#practice-rack,.young-hand)>button {
 width:clamp(29px,5.2vw,56px);height:auto;aspect-ratio:88/122;
 min-height:44px;min-width:0;padding:0;
 border-radius:.25rem;overflow:hidden;
}
.premium-board :is(.rack,#practice-rack,.young-hand)>button:is(:focus-visible,[aria-pressed=true]) {
 outline:2px solid #ffda85;outline-offset:1px;transform:translateY(-2px);
}
.premium-board :is(.premium-face,.practice-theme-tile):not(.back) {
 border-color:var(--design-face-shadow);
 color:var(--design-face-ink);
 background:var(--design-face);
 box-shadow:inset 0 1px 2px #fff8,0 2px 3px #1a090bc4;
}
.premium-board .practice-theme-tile {
 width:clamp(19px,4.2vw,30px);aspect-ratio:88/122;min-height:0;
 display:inline-grid;place-items:center;border-radius:.22rem;padding:0;
}
.premium-board :is(.practice-theme-tile img,.young-hand img) {width:100%;height:100%;display:block;}
.premium-board :is(#practice-river,.premium-melds) {
 display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:2px;margin:.3rem 0;
}
.premium-board :is(#practice-moves,#moves,.young-actions) {justify-content:center;gap:4px;margin:.35rem 0;}
.premium-board :is(#practice-moves,#moves,.young-actions) button {
 min-height:44px;border:1px solid #d1a76e;border-radius:.4rem;
 background:linear-gradient(165deg,#6b3e2c,#321722);color:#fff0cb;
}
.premium-board :is(#practice-moves,#moves,.young-actions) button:disabled {opacity:.58}
.premium-board #recent-discard {justify-content:center;}
.premium-board .open-groups {justify-content:center;}
.premium-board .open-group {background:#230a1466;}
.premium-board .open-group .tile {width:clamp(14px,2.65vw,23px);height:auto;aspect-ratio:88/122}
.premium-court .young-rivers {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.23rem .45rem}
.premium-court .young-rivers .tileline,.premium-court .premium-seat .tileline {justify-content:center}
.premium-board #young-choice-tile {margin:.3rem auto}
.premium-board #young-status {font-weight:700;line-height:1.25}
body.immersive #young-board.premium-board {background:#210d15;box-shadow:none;max-height:min(100dvh,100%);border-color:var(--design-fine)}
@media (max-width:34rem) {
 .premium-board .premium-court {grid-template-columns:minmax(0,1fr) minmax(0,2.25fr) minmax(0,1fr);}
 .premium-board .premium-seat {padding-inline:.2rem;}
 .premium-board .premium-rack {padding-inline:0;}
 .premium-board :is(.rack,#practice-rack,.young-hand)>button {width:clamp(27px,8vw,37px);}
 .premium-board .premium-centre .river .tile {width:clamp(14px,3.5vw,19px);height:auto;aspect-ratio:88/122}
}
@media (max-height:520px) and (orientation:landscape){
 .premium-board .premium-court {gap:5px;padding-top:7px;grid-template-rows:auto minmax(52px,auto) auto auto;}
 .premium-board :is(.rack,#practice-rack,.young-hand)>button {width:clamp(26px,4.5vw,42px);}
}

/* Match the exact selected camera-table art used by Garuda. The near rack
   remains HTML/focusable; the asset contains only table material and trim. */
:root {
 --premium-camera-art:url("./table-design/crimson.webp?v=imperial-dragon-relief");
}
:root[data-table-design=jade] {--premium-camera-art:url("./table-design/jade.webp?v=imperial-dragon-relief")}
:root[data-table-design=midnight] {--premium-camera-art:url("./table-design/midnight.webp?v=imperial-dragon-relief")}
:root[data-table-design=sapphire] {--premium-camera-art:url("./table-design/sapphire.webp?v=imperial-dragon-relief")}
:root[data-table-design=onyx] {--premium-camera-art:url("./table-design/onyx.webp?v=imperial-dragon-relief")}
.premium-board :is(#practice-seats,#table-seats,#young-seatboard).premium-seats {display:contents}
.premium-board .premium-court.game-design-felt {
 background:var(--premium-camera-art) center/100% 100% no-repeat;
 border:0;box-shadow:none;aspect-ratio:1600/740;
 padding:clamp(21px,6%,86px) clamp(15px,10.5%,138px) clamp(24px,5%,60px);
}
.premium-board .premium-court::before {display:none}
@media (max-width:34rem) and (orientation:portrait){
 .premium-board .premium-court.game-design-felt {
  padding:clamp(25px,8%,58px) 7% clamp(22px,6%,40px);
  grid-template-columns:minmax(0,1.13fr) minmax(0,1.9fr) minmax(0,1.13fr);
 }
}
@media (max-height:520px) and (orientation:landscape){
 .premium-board .premium-court.game-design-felt {padding:clamp(18px,5%,40px) 10% clamp(16px,4%,34px);}
}

/* Fit a full rack as one centered row before any hand action is enabled.
   Inactive tiles in Mabar are spans, not buttons: size both identically. */
.premium-board :is(.rack,#practice-rack,.young-hand) {
 --premium-rack-gap:clamp(1px,.18vw,3px);
 --premium-rack-slots:14;
 flex-wrap:nowrap;
 gap:var(--premium-rack-gap);
}
.premium-board :is(.rack,#practice-rack,.young-hand):has(>:nth-child(15)){--premium-rack-slots:15}
.premium-board :is(.rack,#practice-rack,.young-hand):has(>:nth-child(16)){--premium-rack-slots:16}
.premium-board :is(.rack,#practice-rack,.young-hand):has(>:nth-child(17)){--premium-rack-slots:17}
.premium-board :is(.rack,#practice-rack,.young-hand):has(>:nth-child(18)){--premium-rack-slots:18}
.premium-board :is(.rack,#practice-rack,.young-hand)>:is(button,.tile) {
 --premium-rack-width:min(clamp(29px,5.65vw,61px),calc((100% - (var(--premium-rack-slots) - 1) * var(--premium-rack-gap)) / var(--premium-rack-slots)));
 flex:0 0 var(--premium-rack-width);
 width:var(--premium-rack-width);
 min-width:0;
 height:auto;
 min-height:0;
 aspect-ratio:88/122;
}
