/* Reuse the established trick-taking furniture, then supply Wizard's own identity and special cards. */
:root { --felt: #39245b; --felt-dark: #160f28; --felt-glow: #654387; --panel: rgba(14,8,28,.88); --gold: #f4cf73; --gold-deep: #a87428; --muted: #cfbfdd; }
body { background: radial-gradient(ellipse at 50% 25%, #654387, #281a40 65%, #160f28); }
.felt { background: radial-gradient(ellipse, #553573, #281a40); }
.wizard-brand { display:flex; justify-content:center; gap:8px; padding:10px; }
.wizard-brand img { height:105px; border-radius:6px; box-shadow:0 3px 12px #0008; transform:rotate(-9deg); }
.wizard-brand img + img { transform:rotate(9deg); }
.mode-picker { flex-direction: column; align-items: stretch; }
.mode-picker button { padding: 10px 14px; text-align: left; }
.card.special { background: #fff; border: none; }
.card-print { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; pointer-events: none; user-select: none; object-fit: fill; }
.card.back { background: #064789 url("art/back.svg") center / 100% 100%; border: none; }
#bidPanel .bids { flex-wrap: wrap; }
#bidPanel .bids button { min-width: 38px; }
#bidPanel .opening-order { color:var(--gold); font-size:14px; font-weight:800; text-align:center; line-height:1.2; }
.ud-table #board { background: radial-gradient(ellipse,#60417c,#21132f); }
.ud-table .table-player { background: #23172f; }
.ud-table #playModeBtn.active { background:var(--gold); color:#23172f; }
.ud-table .table-face { background: #23172ffa; }
.ud-table .final-player { background: #23172f; }
.ud-table .final-player.winner { background: linear-gradient(135deg,#655018,#392451); }
@media (orientation:landscape) and (max-height:600px) {
  body.card-game #table.phone-play #center { left:calc(122px + var(--safe-l)); right:calc(122px + var(--safe-r)); width:auto; top:44px; bottom:calc(var(--ch) + 22px + var(--safe-b)); transform:none; justify-content:center; }
  #table.phone-play #center > .turnup { display:none; }
  #table.phone-play .trick-wrap { gap:4px; }
  #table.phone-play #trickArea { min-height:calc(var(--play-tw) / .7 + 20px); padding:4px; gap:0; }
  #table.phone-play #trickArea .tslot + .tslot { margin-left:-8px; }
  #table.phone-play .tslot .card { --w:var(--play-tw); width:var(--w); height:calc(var(--w) / .7); }
  #table.phone-play .tslot .who { max-width:var(--play-tw); }
  #table.phone-play .seat.side { width:110px; }
  #table.phone-play .seat.side .avatar { width:28px; height:28px; font-size:16px; }
  #table.phone-play .seat.side .me-name { min-width:0; max-width:78px; font-size:12px; }
  #table.phone-play .seat.side .me-name small, #table.phone-play .seat.side .bidline { display:block; margin-left:0; font-size:12px; }
  #table.phone-play #me { bottom:calc(8px + var(--safe-b)); }
  #table.phone-play #me #status { position:absolute; bottom:calc(100% + 8px); left:0; max-width:110px; white-space:normal; font-size:12px; padding:5px 8px; }
  #table.phone-play .hand-tools { bottom:calc(8px + var(--safe-b)); }
  #table.phone-play .hand-tools .sort-label { display:none; }
  #table.phone-play #hand { left:calc(122px + var(--safe-l)); right:calc(122px + var(--safe-r)); }
  #table.stacked-players #center { left:calc(138px + var(--safe-l)); right:calc(138px + var(--safe-r)); }
  #table.stacked-players .seat.side { transform:none; width:134px; gap:4px; }
  #table.stacked-players .seat.side .me-name { max-width:102px; white-space:normal; font-size:14px; }
  #table.stacked-players .seat.side .me-name small, #table.stacked-players #me .me-name small { display:inline; margin-left:4px; font-size:13px; }
  #table.stacked-players .seat.side .bidline, #table.stacked-players #me .bidline { font-size:13px; line-height:1.2; }
  #table.stacked-players #me { left:auto; right:calc(8px + var(--safe-r)); bottom:auto; width:134px; flex-direction:row-reverse; gap:4px; text-align:right; }
  #table.stacked-players #me .avatar { width:28px; height:28px; font-size:16px; }
  #table.stacked-players #me .me-name { font-size:14px; line-height:1.1; }
  #table.stacked-players #me .dealer-chip { left:auto; right:-6px; }
  #table.stacked-players #status { display:none; }
  #table.stacked-players .hand-tools { top:44px; bottom:auto; }
  #table.stacked-players #hand { left:var(--safe-l); right:var(--safe-r); }
}
/* Landscape phone hand results: use the width for six players and keep actions visible. */
@media (orientation:landscape) {
  #roundEnd.hand-results { padding:8px max(12px,var(--safe-r,env(safe-area-inset-right))) 8px max(12px,var(--safe-l,env(safe-area-inset-left))); }
  #roundEnd.hand-results .sheet { width:100%; max-width:100%; max-height:calc(100dvh - 16px - var(--safe-b,0px)); padding:12px 16px; background:#23172f; }
  #roundEnd.hand-results #roundEndTitle { font-size:clamp(18px,5.5vh,25px); margin-bottom:8px; }
  #roundEnd.hand-results #roundEndBody { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 10px; }
  #roundEnd.hand-results .ud-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:2px 10px; margin:0; padding:6px 8px; }
  #roundEnd.hand-results .ud-row .who { grid-column:1; width:auto; min-width:0; font-size:16px; }
  #roundEnd.hand-results .ud-row .who .avatar { width:28px; height:28px; flex:none; font-size:16px; }
  #roundEnd.hand-results .ud-row .bw { grid-column:1; grid-row:2; width:auto; font-size:12px; text-align:left; padding-left:34px; }
  #roundEnd.hand-results .ud-row .pts { grid-column:2; grid-row:1 / 3; align-self:center; width:auto; font-size:25px; }
  #roundEnd.hand-results .ud-row .tot { grid-column:3; grid-row:1 / 3; align-self:center; width:auto; min-width:38px; font-size:19px; }
  #roundEnd.hand-results #roundEndActions { display:flex; flex-wrap:nowrap; gap:8px; margin-top:8px; }
  #roundEnd.hand-results #roundEndActions .btn { width:auto; margin:0; padding:9px 12px; font-size:14px; }
  #roundEnd.hand-results #roundEndActions .gold { flex:1; }
}
