/* The portraits sit outside the carved rim; the cards and wagers sit on the cloth. */
.fv[data-room-theme="29"] {--frame:#876341;--table:#332320;--table-deep:#191719}
.game-viewport .fv[data-room-theme="29"] .fv-board[data-game="29"],
.game-viewport #roomPage .rb-page > .rt-watch.fv-board[data-game="29"] {
  display:block;position:relative;container-type:size;min-width:0;min-height:0;
  box-sizing:border-box;width:100%;height:100%;max-width:none;margin:0;padding:0;
  overflow:hidden;border:0;border-radius:0;background:#281b15;box-shadow:none;
}
.fv-board[data-game="29"] > .zj-table.zj-stage,
.game-viewport #roomPage .rt-watch.fv-board[data-game="29"] > .zj-table.zj-stage {
  position:relative;isolation:isolate;container-type:size;box-sizing:border-box;width:100%;height:100%;
  margin:0;overflow:hidden;color:#fff1d9;text-shadow:0 1px 2px #25100c;
  /* Keep the photographed rim aligned with seats anchored to percentages of the stage. */
  background:#57201b url("/scenes/festival-zhajinhua-table.webp") center / 100% 100% no-repeat;
}
.zj-seat {display:contents;--portrait:clamp(36px,min(7.3cqw,14cqh),110px);--card:clamp(19px,min(4.4cqw,8.1cqh),59px)}
.zj-seat[data-position="top"] {--px:50%;--py:9%;--hx:50%;--hy:27%}
.zj-seat[data-position="top-left"] {--px:30%;--py:12%;--hx:33%;--hy:32%}
.zj-seat[data-position="top-right"] {--px:70%;--py:12%;--hx:67%;--hy:32%}
.zj-seat[data-position="right"] {--px:95.1%;--py:49%;--hx:80%;--hy:50%}
.zj-seat[data-position="left"] {--px:4.9%;--py:49%;--hx:20%;--hy:50%}
.zj-seat[data-position="bottom"] {--px:50%;--py:90.5%;--hx:50%;--hy:70.5%}
.zj-table[data-seat-count="5"] :is(.zj-seat[data-position="top-left"],.zj-seat[data-position="top-right"]) {--hy:31%;--py:10%}
.zj-person,.zj-cards-zone {
  position:absolute;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;
  min-width:0;pointer-events:none;font:650 clamp(10px,min(2.05cqw,3.7cqh),23px)/1.08 "DM Sans",system-ui,sans-serif;
}
.zj-person {left:var(--px);top:var(--py);z-index:2;width:max-content;gap:clamp(3px,.6cqw,11px)}
.zj-seat[data-position="left"] .zj-person {left:max(var(--px),calc(var(--table-left,0px) + var(--portrait)/2 + 2px))}
.zj-seat[data-position="right"] .zj-person {left:min(var(--px),calc(100% - var(--table-right,0px) - var(--portrait)/2 - 2px))}
.zj-avatar,.fv .zj-seat button.zj-avatar {
  position:relative;display:grid;place-items:center;box-sizing:border-box;flex:none;
  width:var(--portrait);height:var(--portrait);min-width:0;min-height:0;padding:clamp(2px,.4cqh,4px);
  border:1px solid #f5d996;border-radius:50%;background:linear-gradient(135deg,#e3bb76,#745037 50%,#c79d64);
  box-shadow:0 0 0 2px #3c2a1d,0 3px 6px #130b09c9;
}
.zj-avatar img {display:block;width:100%;height:100%;object-fit:cover;border-radius:50%;background:#442820;box-shadow:0 0 0 1px #462e1e}
.zj-seat[data-current="true"] .zj-avatar {outline:2px solid #ffe390;outline-offset:2px;box-shadow:0 0 1.8cqh #ffd46f94}
.zj-seat[data-target="true"] button.zj-avatar {pointer-events:auto;cursor:pointer;outline:2px solid #ffe9a5;outline-offset:3px;box-shadow:0 0 0 7px #b8823e95}
.zj-seat button.zj-avatar:focus-visible {outline:3px solid #b5f4ff;outline-offset:3px}
.zj-nameplate {
  display:grid;grid-template-columns:minmax(0,auto) auto;align-items:baseline;gap:1px .4em;
  min-width:0;max-width:16cqw;padding:clamp(3px,.75cqh,8px) clamp(5px,.85cqw,13px);border:1px solid #bc945356;
  border-radius:4px;background:linear-gradient(145deg,#3a2821f2,#1d1514f0);box-shadow:0 2px 3px #100a0860;
}
.zj-name {grid-column:1;grid-row:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#fff4dd}
.zj-contribution {grid-column:1/-1;grid-row:2;color:#e2c9a2;font-size:.86em;font-variant-numeric:tabular-nums}
.zj-net {grid-column:2;grid-row:1;color:#ffbaaa;font-size:.98em;white-space:nowrap}
.zj-net[data-positive="true"] {color:#ffd781}
.zj-seat[data-position="right"] .zj-person,.zj-seat[data-position="left"] .zj-person {flex-direction:column;gap:clamp(2px,.6cqh,7px)}
.zj-seat:is([data-position="right"],[data-position="left"]) .zj-nameplate {text-align:center;padding-inline:.55cqw;max-width:9.6cqw}
.zj-cards-zone {left:var(--hx);top:var(--hy);flex-direction:column;gap:.75cqh;max-width:19cqw}
.zj-hand {display:flex;direction:ltr;align-items:center;justify-content:center;padding:0;margin:0}
.zj-hand .fv-card,.zj-hand.jh-hidden i {
  display:flex;align-items:center;justify-content:center;flex-direction:column;flex:none;box-sizing:border-box;
  width:var(--card);height:calc(var(--card)*1.38);margin:0 0 0 -.48cqw;padding:0;
  border:1px solid #ebd8af;border-radius:clamp(2px,.55cqh,5px);box-shadow:0 .5cqh .6cqh #2b080daa;
  background:linear-gradient(145deg,#fffff6 25%,#eddebd);color:#28241f;text-shadow:none;
}
.zj-hand > :first-child {margin-left:0;transform:translateY(.5cqh) rotate(-7deg);transform-origin:bottom right}
.zj-hand > :last-child {transform:translateY(.5cqh) rotate(7deg);transform-origin:bottom left}
.zj-hand .fv-card b,.zj-hand .fv-card i {font:700 clamp(11px,min(2.7cqw,4.7cqh),30px)/.98 Georgia,serif}
.zj-hand .fv-card.is-red {color:#ae2735}
.zj-hand.jh-hidden i {
  border:1px solid #f3d6a1;outline:1px solid #ba895a;outline-offset:-3px;
  background:radial-gradient(ellipse at 50% 50%,#d6aa6d 0 7%,transparent 8%),
             repeating-linear-gradient(46deg,transparent 0 3px,#c69c673b 3px 4px),
             repeating-linear-gradient(-46deg,#563033 0 3px,#bb8d5f56 3px 4px),#622d31;
}
.zj-seat[data-self="true"] {--card:clamp(21px,min(5cqw,9cqh),67px)}
.zj-state {max-width:100%;font-size:.86em;color:#ffdfae;text-align:center;line-height:1.1}
.zj-seat[data-out="true"] :is(.zj-avatar,.zj-hand) {filter:saturate(.28);opacity:.75}
.zj-pot {
  position:absolute;left:50%;top:48%;transform:translate(-50%,-50%);display:grid;justify-items:center;
  gap:.7cqh;max-width:32%;text-align:center;pointer-events:none;
  font:650 clamp(10px,min(1.9cqw,3.3cqh),19px)/1.04 "DM Sans",system-ui,sans-serif;
}
.zj-pot .fv-table-clock {
  position:relative;display:flex;justify-content:center;align-items:center;gap:.35em;min-width:3.15em;min-height:1.45em;box-sizing:border-box;padding:.05em .45em;
  font:700 clamp(16px,min(3.05cqw,5.55cqh),36px)/1 Georgia,serif;font-variant-numeric:tabular-nums;
  color:#fff1c7;border:1px solid #c8a16a;border-radius:2em;
  background:linear-gradient(165deg,#4c2821,#211712);box-shadow:0 2px 3px #361313aa;
}
.zj-pot .fv-table-clock::before {
  content:"";width:.66em;height:.66em;box-sizing:border-box;border:1px solid currentColor;border-radius:50%;
  background:linear-gradient(currentColor 0 0) 48% 30% / 1px 34% no-repeat,linear-gradient(currentColor 0 0) 67% 58% / 28% 1px no-repeat;
}
.zj-pot .fv-table-clock::after {
  content:"";position:absolute;bottom:-1px;left:22%;width:56%;height:2px;
  transform:scaleX(var(--table-time-left,1));transform-origin:left;background:#ffdaa1;
}
.zj-pot .fv-table-clock:empty,.zj-pot .fv-table-clock[hidden] {display:none}
.zj-pot .fv-table-clock[data-urgent] {color:#ffdb9e;border-color:#ffb279;background:#58261f}
.zj-pot-value {
  display:flex;align-items:center;justify-content:center;gap:.8cqw;
  padding:.45cqh 1.2cqw .7cqh;border:1px solid #d3a85f96;border-radius:40px;
  background:linear-gradient(160deg,#552b20f5,#301a16f2);box-shadow:0 .65cqh 1.15cqh #3e11158a;
}
.zj-pot-value > div {display:grid;align-self:center;gap:1px}
.zj-pot-value small {font-size:.88em;color:#f3d6a3}
.zj-pot-value strong {font:700 clamp(21px,min(4.2cqw,7.7cqh),51px)/.96 Georgia,serif;color:#ffe3a0;font-variant-numeric:tabular-nums}
.zj-chips {direction:ltr;display:flex;align-items:end;min-height:4.8cqh;padding-top:.5cqh}
.zj-stack {--face:#bb4738;--side:#7d312e;position:relative;width:clamp(12px,2.65cqw,36px);height:2.45cqh}
.zj-stack + .zj-stack {margin-left:-.55cqw}
.zj-stack:nth-child(2) {--face:#547d68;--side:#335448;transform:translateY(-.7cqh)}
.zj-stack:nth-child(3) {--face:#c28a49;--side:#89643b}
.zj-stack i {
  position:absolute;inset-inline:0;bottom:calc(var(--tier)*.45cqh);height:2.15cqh;
  border-radius:50%;border:1px solid #ebce98;box-shadow:0 .3cqh 0 var(--side),0 .55cqh .2cqh #1d111090;
  background:radial-gradient(ellipse closest-side,var(--face) 0 47%,#f2ddb6 50% 57%,transparent 63%),
             repeating-conic-gradient(var(--face) 0deg 38deg,#f3dfbd 39deg 57deg,var(--face) 58deg 72deg);
}
.zj-round {display:flex;justify-content:center;align-items:center;gap:.65em;color:#ffe0a5;white-space:nowrap;font-size:.88em}
.zj-round span+span {padding-inline-start:.65em;border-inline-start:1px solid #d0a66e88}
.zj-actions,.zj-panel {
  position:absolute;z-index:4;inset-inline-end:max(2.1%,var(--table-right,0px));inset-block-end:max(2.4%,var(--table-bottom,0px));
  box-sizing:border-box;width:34%;max-width:465px;
}
.zj-panel {
  padding:clamp(4px,.95cqh,10px);
  border:1px solid #bd985da3;border-radius:clamp(7px,1.6cqh,16px);
  background:linear-gradient(145deg,#362923f5,#221b18fa);box-shadow:inset 0 1px #e5c98e30,0 .8cqh 2.2cqh #120b0bb8;
}
.zj-actions {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:clamp(3px,.8cqh,8px)}
.zj-actions > button {grid-column:span 2}
.zj-actions:has(>button:nth-of-type(5):last-child) > button:nth-of-type(n+4),
.zj-actions:has(>button:nth-of-type(4):last-child) > button,
.zj-actions:has(>button:nth-of-type(2):last-child) > button {grid-column:span 3}
.zj-actions > span {
  grid-column:1/-1;justify-self:center;padding:.2em .7em;border-radius:12px;background:#351e19df;
  font-size:clamp(10px,min(1.95cqw,3.5cqh),17px);text-align:center;color:#ffe4a6;
}
.zj-actions[data-choosing="true"] {display:flex;align-items:center;justify-content:flex-end}
.zj-actions[data-choosing="true"] > span {min-width:0;text-wrap:balance}
.zj-actions[data-choosing="true"] > button {flex:none;min-width:4.5em}
.zj-actions .fv-button,.zj-panel .fv-button {
  min-width:0;min-height:clamp(31px,8.5cqh,52px);margin:0;padding:.3em .25em;
  font:650 clamp(10px,min(2cqw,3.7cqh),18px)/1.14 "DM Sans",system-ui,sans-serif;
  overflow-wrap:anywhere;border:1px solid #a68052;border-radius:6px;
  color:#fff1d2;background:linear-gradient(#6b4935,#473127);text-shadow:0 1px 1px #442a1d;
}
.zj-actions .fv-button {
  border-color:#ceaa76;border-radius:2em;background:linear-gradient(175deg,#6f4536,#482b24 76%);
  box-shadow:inset 0 1px #ffe3b34a,0 2px #2b1917,0 3px 5px #1b0c0bb3;
}
.zj-actions .fv-button.primary,.zj-panel .fv-button.primary {color:#382519;background:linear-gradient(#ffe3ad,#d9ad6e);text-shadow:none}
.zj-actions .fv-button.quiet {color:#ffdfcc;background:linear-gradient(#593126,#382421);border-color:#ac7f60}
.zj-actions .fv-button:active {transform:translateY(1px)}
.zj-actions .fv-button:focus-visible,.zj-panel .fv-button:focus-visible {outline:2px solid #c9f4ff;outline-offset:1px}
.zj-panel .fv-result {display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:4px;width:100%;margin:0;padding:0;border:0;background:none}
.zj-panel .fv-result > strong,.zj-result b {color:#ffdea2;font:700 clamp(14px,min(2.8cqw,5.3cqh),33px)/1.05 Georgia,"Songti SC",serif}
.zj-panel .fv-result > span {font-size:clamp(10px,min(1.9cqw,3.4cqh),17px)}
.zj-result {display:grid;gap:.45em;text-align:center;font-size:clamp(12px,min(2.15cqw,4cqh),21px)}
.zj-ranks {color:#eedfc8}.zj-ranks summary {cursor:pointer}.zj-ranks p {margin:.5em 0}
@container (min-width:640px) and (min-height:330px) {
  .zj-actions {inset-inline-end:max(8.5%,var(--table-right,0px));inset-block-end:max(17.2%,var(--table-bottom,0px));width:31%}
}
@container (min-aspect-ratio:5/2) {
  .zj-seat {--portrait:clamp(35px,16cqh,86px);--card:clamp(19px,8.2cqh,52px)}
  .zj-seat[data-position="bottom"] {--py:90%}
  .zj-pot {gap:.3cqh}
}
