/* Claim controls are normal-flow below the hand. Their space never overlays faces. */
.immersive .scene-3d .player .move:has(.actions:not(:empty)){
 display:grid;
 grid-template-columns:minmax(0,1fr) auto;
 grid-template-areas:"actions actions" "status clock";
 max-width:800px;
 margin-inline:auto;
 gap:2px 8px;
 align-items:center;
}
.immersive .scene-3d .player .move:has(.actions:not(:empty)) #status{
 grid-area:status;
 text-align:left;
 min-width:0;
 line-height:1.15;
}
.immersive .scene-3d .player .move:has(.actions:not(:empty)) .turn-clock{grid-area:clock;justify-self:end;margin:0}
.immersive .scene-3d .player .move .actions:not(:empty){
 grid-area:actions;
 min-width:0;
 width:100%;
 display:flex;
 flex-wrap:wrap;
 justify-content:center;
 align-items:center;
 gap:5px;
 padding:3px 2px;
}
.immersive .scene-3d .player .move .actions .action{
 min-height:48px;
 min-width:min(77px, 100%);
 max-width:100%;
 white-space:normal;
 padding:5px 13px;
 font:800 clamp(.94rem,2.2vw,1.13rem)/1.08 system-ui,sans-serif;
 border:1px solid #bed5acb0;
 background:#234c3c;
 color:#fff9e8;
 box-shadow:inset 0 1px #ffffff25,0 1px 2px #05130d80;
 touch-action:manipulation;
}
.immersive .scene-3d .player .move .actions .action.win{
 background:#f6d18d;
 color:#23160a;
 border-color:#fff0ba;
}
.immersive .scene-3d .player .move .actions .action.pass{
 background:#18382b;
 color:#e4eee2;
 border-color:#80978a;
}
.immersive .scene-3d .player .move .actions .action:focus-visible{
 outline:2px solid #fff3c4;
 outline-offset:2px;
}
.immersive .scene-3d .player .move .actions .action:active{filter:brightness(.9)}
.game-landscape-compact .immersive .scene-3d .player .move .actions .action{
 min-width:64px;
 min-height:44px;
 padding-inline:8px;
 font-size:.98rem;
}
.game-landscape-compact .immersive .scene-3d .player .move .actions:not(:empty){gap:4px;padding:2px 0}
.game-landscape-compact .immersive .scene-3d .player .move .actions .action{
 flex:1 1 0;
 min-width:0;
 max-width:116px;
 padding-inline:3px;
 overflow-wrap:anywhere;
}
/* On the shortest share of phones, put the clock beside controls, not on another row. */
@media (orientation:portrait) and (max-width:350px), (orientation:landscape) and (max-height:350px){
 .game-landscape-compact .immersive .scene-3d .player .move:has(.actions:not(:empty)){
  grid-template-areas:"actions clock";
  gap:0 5px;
 }
 .game-landscape-compact .immersive .scene-3d .player .move:has(.actions:not(:empty)) #status{
  position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;
 }
}
.dora-indicators:not([hidden]){display:flex;align-items:center;justify-content:center;gap:.28rem;min-height:1.35rem;position:relative;z-index:1}
.dora-indicators small{color:#fff;font-size:.64rem;line-height:1.1;white-space:nowrap}
.dora-indicators .tile{--tileW:clamp(.7rem,2vw,1.05rem);width:var(--tileW);height:calc(var(--tileW)*1.39);padding:0;box-shadow:none}

/* Approved claim panel. Ivory/brown and no blank slots; buttons stay live
   when the projection is unavailable, including opening/variant controls. */
#actions .claim-layout,#actions .claim-stack{display:flex;align-items:stretch;justify-content:center;gap:3px}
#actions .claim-layout{flex-wrap:wrap}
#actions .claim-action .claim-mini{display:inline-flex;align-items:center;gap:1px;flex:none;pointer-events:none}
#actions .claim-action .claim-mini .tile{
 display:block;position:static;transform:none;inset:auto;flex:none;
 width:clamp(10px,1.34vw,25px);height:clamp(14px,1.86vw,34px);
 min-width:0;min-height:0;max-width:none;max-height:none;
 margin:0;padding:0;border:0;background:transparent;box-shadow:none
}
#actions .claim-action .claim-mini .tile::before,#actions .claim-action .claim-mini .tile::after{display:none}
#actions .claim-action .claim-mini img{display:block;width:100%;height:100%;object-fit:contain;opacity:1}
#actions .claim-action .claim-mini .tile-fallback{display:none}
body.immersive.royal-play-full .scene-3d .move #actions .claim-action{
 display:inline-flex;align-items:center;justify-content:center;gap:.3em;flex:none;
 width:auto;max-width:none;color:#5a3421;background:linear-gradient(#fff9ec,#f3e4cc);border:1px solid #a77a50;
 border-radius:6px;box-shadow:0 2px 4px #240c0a76,inset 0 1px #fff;min-height:38px;
 line-height:1;padding:2px 5px;font-size:clamp(.65rem,1.6vw,1.03rem);font-weight:800;text-transform:uppercase;
 white-space:nowrap
}
body.immersive.royal-play-full .scene-3d .move #actions .claim-action.win{background:linear-gradient(#fff9ec,#f7e0b9);color:#5a3421}
body.immersive.royal-play-full .scene-3d.approved-camera-active .move #actions:has(.claim-layout[data-claim-placed]){
 position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
 padding:0!important;margin:0!important;display:block!important;
 max-width:none!important;pointer-events:none;
}
body.immersive.royal-play-full .scene-3d.approved-camera-active .move #actions .claim-layout[data-claim-placed]{
 position:absolute;inset:0;display:block;pointer-events:none;container-type:size
}
body.immersive.royal-play-full .scene-3d.approved-camera-active .move #actions .claim-layout[data-claim-placed="fixed"] .claim-stack{
 display:contents;
}
body.immersive.royal-play-full .scene-3d.approved-camera-active .move #actions .claim-layout[data-claim-placed="fixed"] .claim-action{
 position:absolute;left:var(--claim-slot-x);top:var(--claim-slot-y);
 width:var(--claim-slot-width);height:var(--claim-slot-height);
 box-sizing:border-box;min-height:0;min-width:0;
 font-size:clamp(.625rem,1.85cqh,1.1rem);pointer-events:auto;
}
body.immersive.royal-play-full .scene-3d.approved-camera-active #actions .claim-layout[data-claim-placed] .claim-mini .tile{
 width:2.4cqw;height:var(--claim-mini-h,6.2cqh);
}
.approved-camera-active #actions .claim-layout:not([data-claim-placed]) .claim-stack{flex-wrap:wrap}
/* Four tiles stay the same size; reserve breathing room for the Kong label. */
body.immersive.royal-play-full .scene-3d .move #actions .claim-action.claim-kong-action{
 box-sizing:border-box;padding-inline:5px;gap:3px;
}
#actions .claim-kong-action .claim-label{
 flex:0 0 auto;font-size:clamp(8px,.88em,11px);white-space:nowrap
}


/* Preview tiles are decorative. Only the whole button accepts touch. */
#actions .claim-preview-action .claim-mini{
 display:inline-flex;align-items:center;gap:1px;flex:none;pointer-events:none
}
#actions .claim-preview-action .claim-mini .tile{
 display:inline-grid;place-items:center;position:relative;inset:auto;
 min-width:0;min-height:0;width:12px;height:17px;padding:0;margin:0;
 transform:none;filter:none;pointer-events:none
}
#actions .claim-preview-action .claim-mini .tile::before,
#actions .claim-preview-action .claim-mini .tile::after{display:none}
#actions .claim-preview-action .claim-mini img{display:block;width:100%;height:100%;object-fit:contain;opacity:1}
#actions .claim-preview-action .claim-mini .tile-fallback{display:none}
body.immersive.royal-play-full .scene-3d .move #actions .claim-preview-action {
 display:inline-flex;align-items:center;justify-content:center;gap:3px;
 border-radius:6px;background:linear-gradient(#fff9ec,#f3e4cc);color:#5a3421;border:1px solid #a77a50;
 font-weight:800;text-transform:uppercase
}
body.immersive.royal-play-full .scene-3d:not(.approved-camera-active) .move #actions:has(.added-kong-action:not(.claim-action)){
 position:relative;overflow:visible
}
body.immersive.royal-play-full .scene-3d .move #actions .added-kong-action[data-added-kong-placed] {
 position:absolute;z-index:4;inset:var(--added-kong-y) auto auto var(--added-kong-x);
 width:var(--added-kong-w);height:var(--added-kong-h);min-width:0;min-height:0;max-width:none;max-height:none;
 padding:2px 4px;line-height:1;font-size:clamp(.60rem,1.85cqh,.82rem);white-space:nowrap;
 pointer-events:auto
}

@media (orientation:portrait) and (max-width:600px), (orientation:landscape) and (max-height:530px){
 body.immersive.royal-play-full .scene-3d .move #actions .added-kong-action[data-added-kong-placed]{
  flex-direction:column;gap:1px
 }
 #actions .claim-preview-action .claim-mini .tile{width:10px;height:13px}
}

/* ORAMA's claim actions share the stable camera slots and retain the actual
   reaction indices. Color + caption distinguish Hu without adding a row. */
body.immersive.royal-play-full .scene-3d .move #actions .orama-claim-layout .claim-action{
 background:linear-gradient(#fffdf7,#f5e6ce);color:#482715;border-color:#b78c60;
}
body.immersive.royal-play-full .scene-3d .move #actions .orama-claim-layout .claim-action.pass{
 background:linear-gradient(#faf4ea,#eadbc8);border-color:#a78e77;
}
body.immersive.royal-play-full .scene-3d .move #actions .orama-claim-layout .claim-action.win{
 background:linear-gradient(#883a29,#512117);color:#fff8e6;border-color:#d8a45d;
 box-shadow:0 2px 5px #240c0a83,inset 0 1px #ffffff54;
}
#actions .orama-claim-layout .claim-label{display:block;flex:none}
#actions .orama-claim-layout .claim-action:focus-visible{
 outline:2px solid #e7bc6f;outline-offset:1px;
}

/* Compact equal-size controls for Garuda, Chicken Hand and Majiang. */
body.immersive.royal-play-full .scene-3d.approved-camera-active .move #actions .fixed-stack-claim-layout[data-claim-placed="fixed"] .claim-action{
 font-size:clamp(.71rem,2.05cqh,1.05rem);
}
#actions .fixed-stack-claim-layout .claim-kong-action .claim-label{font-size:.87em}

/* Zimo shares the dock. Independent actions such as +15 s stay in the
   original side lane and do not change the dock coordinates. */
#actions .claim-aux{display:contents}
body.immersive.royal-play-full .scene-3d.approved-camera-active .move #actions:has(.claim-layout[data-claim-placed])>.claim-aux:not(:empty){
 position:absolute;display:flex;left:79%;right:3.5%;bottom:10%;flex-wrap:wrap;
 justify-content:flex-end;align-content:flex-end;gap:4px;pointer-events:none;
}

/* Non-projected fallback: same two columns, including when Pass is absent. */
body.immersive.royal-play-full .scene-3d .move #actions .claim-layout:not([data-claim-placed]){
 display:grid;grid-template-columns:repeat(2,minmax(0,8rem));
 align-items:end;justify-content:center;gap:12px;width:min(100%,17rem);
}
body.immersive.royal-play-full .scene-3d .move #actions .claim-layout:not([data-claim-placed])>.pass{grid-column:1;grid-row:1}
body.immersive.royal-play-full .scene-3d .move #actions .claim-layout:not([data-claim-placed]) .claim-stack{
 grid-column:2;grid-row:1;flex-flow:column-reverse nowrap
}
body.immersive.royal-play-full .scene-3d .move #actions .claim-layout:not([data-claim-placed]) .claim-action{
 width:100%;height:34px;min-width:0;min-height:0
}
/* Keep equal geometry; differentiate winning actions by color across rules. */
body.immersive.royal-play-full .scene-3d .move #actions .fixed-stack-claim-layout .claim-action.win{
 background:linear-gradient(#883a29,#512117);color:#fff8e6;border-color:#d8a45d
}
/* Special profile labels can contain detailed tile choices. Only their
   text scrolls inside the button; the dock stays at the approved anchors. */
#actions .fixed-stack-claim-layout .claim-label{min-width:0;overflow:hidden;text-overflow:ellipsis}
#actions .fixed-stack-claim-layout .claim-verbose .claim-label{
 white-space:normal;overflow-wrap:anywhere;max-height:2.1em;
 display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical
}
body.immersive.royal-play-full .scene-3d .move #actions .claim-layout:not([data-claim-placed]) .claim-stack{
 max-height:46cqh;overflow:auto
}

/* Add touch room in the gap, not on top of neighboring choices. At the
   smallest legacy pitch, two .36cqh expansions use 5.33 of 7 design px. */
@media (pointer:coarse){
 body.immersive.royal-play-full .scene-3d.approved-camera-active .move #actions .claim-layout[data-claim-placed="fixed"] .claim-action:not(:disabled)::after{
  content:"";position:absolute;inset:-.36cqh 0;pointer-events:auto;
 }
}
body.immersive.royal-play-full .scene-3d .move #actions .claim-action:focus-visible{
 outline:2px solid #ffe6a6;outline-offset:2px;
}

/* A stacked claim highlights exactly the incoming copy, even for Pong. */
#actions .claim-mini .claim-mini-face{display:inline-flex;position:relative;align-items:center;flex:none;border-radius:4px}
#actions .claim-mini .claim-face-held{opacity:.64;filter:saturate(.65)}
#actions .claim-mini .claim-face-incoming{outline:1.5px solid #a26a25;outline-offset:-1px;box-shadow:inset 0 0 0 2px #ffe799,0 0 3px #f4c970}
#actions .claim-mini .claim-face-incoming::after{content:"";position:absolute;inset:0;border:1px solid #bb7b2d;border-radius:inherit;pointer-events:none}
