/* Geometry is authored in the same 1600 × 740 camera plane as the approved
   preview. Existing game inputs are kept in native buttons over that plane. */
.approved-camera-frame[hidden]{display:none}
body.immersive:has(.approved-camera-active){background:#10080c}
body.immersive.royal-play-full:has(.approved-camera-active) main{max-width:none;background:#10080c}
body.immersive.royal-play-full .scene-3d.approved-camera-active{
 position:relative; isolation:isolate; padding:0; margin:0; border:0;
 background:#10080c; border-radius:0; box-shadow:none; overflow:hidden;
}
body.immersive.royal-play-full .scene-3d.approved-camera-active::before,
body.immersive.royal-play-full .scene-3d.approved-camera-active::after{display:none}
body.immersive.royal-play-full .scene-3d.approved-camera-active .approved-camera-frame,
body.immersive.royal-play-full .scene-3d.approved-camera-active .player{
 position:absolute;inset:auto;
 left:var(--approved-left,0px);top:var(--approved-top,0px);
 width:var(--approved-width,100%);height:var(--approved-height,100%);
 margin:0;padding:0;border:0;min-height:0;max-height:none;transform:none;
 overflow:visible;pointer-events:none;
}
.approved-camera-frame{z-index:3;overflow:hidden}
/* The room sits below the approved camera, never over the table, tiles, or
   controls. All five table assets have the same authored 1600×740 profile.
   Keep the outer rail stroke inside the mask with a one-unit safety margin. */
.approved-camera-active .approved-camera-frame{
 background-color:var(--table-void,#10080c);
 background-image:linear-gradient(180deg,#0f07119c,#0c050825 42%,#10060992),
  url("./game-backdrop/mahjong-room-4k.webp?v=1");
 background-size:cover;
 background-position:center 24%;
}
.approved-camera-active .approved-camera-surface{
 clip-path:polygon(18.06% 13.85%,81.94% 13.85%,99.06% 89.15%,
  99.06% 95.23%,.94% 95.23%,.94% 89.15%);
}
@media (max-width:1100px),(pointer:coarse){
 .approved-camera-active .approved-camera-frame{
  background-image:linear-gradient(180deg,#0f07119c,#0c050825 42%,#10060992),
   url("./game-backdrop/mahjong-room-mobile.webp?v=1");
 }
}
.approved-camera-surface,.approved-camera-frame>svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.approved-camera-flight-layer{
 position:absolute;display:block;pointer-events:none;contain:strict;
 transform-origin:50% 50%;will-change:transform;
}
.approved-camera-flight-layer>svg{display:block;width:100%;height:100%;pointer-events:none}
.approved-camera-title,.approved-camera-badge{position:absolute;color:#f2dfae;font-family:system-ui,sans-serif;white-space:nowrap}
.approved-camera-title{left:50%;top:2%;transform:translateX(-50%);font-weight:800;letter-spacing:.12em;font-size:clamp(.68rem,2.6cqh,1.55rem)}
.approved-camera-badge{
 font-size:clamp(.55rem,1.75cqh,1rem);font-weight:760;letter-spacing:.02em;
 background:#18382f;border:1px solid #75927b9c;border-radius:clamp(5px,1.5cqh,12px);padding:.25em .65em;top:13.15%;
}
.approved-camera-round-info{
 position:absolute;z-index:1;left:8.5%;top:4.25%;max-width:48%;
 display:flex;flex-direction:column;align-items:flex-start;gap:clamp(4px,1.2cqh,9px);
 pointer-events:none;
}
.approved-camera-active .approved-camera-round-info .approved-camera-round{position:static}

/* Some legacy containers are display:contents, so opacity on the parent
   does not hide paintable wall sections or racks. Suppress the actual boxes
   without marking the DOM slots hidden: the camera still reads those slots. */
body.immersive.royal-play-full .scene-3d.approved-camera-active :is(.table-model,.opponents,.center,.player-head,.discard-flight){opacity:0;pointer-events:none}
body.immersive.royal-play-full .scene-3d.approved-camera-active :is(.table-model .wall-stack,.opponents .bot,.center,.player-head,.discard-flight){
 visibility:hidden!important;pointer-events:none
}
body.immersive.royal-play-full .scene-3d.approved-camera-active .player{z-index:8}
.game-landscape-compact body.immersive.royal-play-full .scene-3d.approved-camera-active .player .hand,
body.immersive.royal-play-full .scene-3d.approved-camera-active .player .hand{
 position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
 padding:0;margin:0;display:block!important;overflow:visible;transform:none;pointer-events:none;
}
body.immersive.royal-play-full .scene-3d.approved-camera-active .player .hand[data-approved-count]>.tile{
 position:absolute!important;
 inset:var(--approved-hit-top) auto auto var(--approved-hit-left)!important;
 width:var(--approved-hit-width)!important;height:var(--approved-hit-height)!important;
 min-width:0!important;min-height:0!important;
 max-width:none!important;max-height:none!important;
 padding:0;margin:0;transform:none!important;border-radius:3px;
 background:transparent;border:0;box-shadow:none;pointer-events:auto;
}
body.immersive.royal-play-full .scene-3d.approved-camera-active .player .hand[data-approved-count]>.tile:is(span,:disabled){pointer-events:none}
body.immersive.royal-play-full .scene-3d.approved-camera-active .player .hand[data-approved-count]>.tile :is(img,.tile-fallback),
body.immersive.royal-play-full .scene-3d.approved-camera-active .player .hand[data-approved-count]>.tile::before,
body.immersive.royal-play-full .scene-3d.approved-camera-active .player .hand[data-approved-count]>.tile::after{opacity:0;pointer-events:none}
body.immersive.royal-play-full .scene-3d.approved-camera-active .player .hand .tile:focus-visible{outline:2px solid #ffdd82;outline-offset:0}
body.immersive.royal-play-full .scene-3d.approved-camera-active .player .move{
 display:block!important;position:absolute!important;inset:0!important;width:100%!important;
 max-width:none;max-height:none;min-height:0;margin:0;pointer-events:none;
}
body.immersive.royal-play-full .scene-3d.approved-camera-active .player .move #status{
 position:absolute;left:5.5%;right:6%;top:90.5%;width:auto;height:auto;clip-path:none;max-width:none;margin:0;padding:0;
 text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
 color:#ecdfba;font-size:clamp(.58rem,1.8cqh,1rem);
}
body.immersive.royal-play-full .scene-3d.approved-camera-active .move #turn-clock:not([hidden]){
 /* Right rail: clear the entire 29px controls row even on short camera
    planes; percentages and the camera height track both landscape modes. */
 position:absolute;top:max(13%,calc(3.1% + 37px));right:3.5%;
 box-sizing:border-box;min-inline-size:2.65em;max-inline-size:100%;margin:0;
 font-size:clamp(16px,calc(var(--approved-height,100dvh)*.058),25px);
 line-height:1;padding:.25em .38em;
 color:#fff4cd;background:#21170f;border-color:#e0ba69;
 box-shadow:0 2px 5px #0009;pointer-events:none;
}
body.immersive.royal-play-full .scene-3d.approved-camera-active .move .actions:not(:empty){
 /* The standard action row carries width:100%. In this absolute lane it
    must size between the two insets or all buttons are pushed off the table. */
 position:absolute;z-index:2;left:79%;right:3.5%;top:auto;bottom:10%;
 width:auto;max-width:none;min-width:0;margin:0;padding:0;
 display:flex;flex-wrap:wrap;justify-content:flex-end;align-content:flex-end;
 gap:4px;
}
body.immersive.royal-play-full .scene-3d.approved-camera-active .move .actions button.action{
 color:#fff1ce;background:#18382f;border:1px solid #819b83;
 border-radius:clamp(5px,1.65cqh,12px);line-height:1.1;
 flex:0 1 calc((100% - 4px)/2);min-height:44px;min-width:0;max-width:100%;
 padding:.35em .35em;font-size:clamp(.76rem,2.4cqh,1.04rem);font-weight:780;
 white-space:normal;overflow-wrap:anywhere;pointer-events:auto;
}
body.immersive.royal-play-full .scene-3d.approved-camera-active .move .actions button.action.win{background:#f6d18d;color:#24180c;border-color:#ffe4a4}
body.immersive.royal-play-full .scene-3d.approved-camera-active>.top{
 inset:auto!important;
 left:calc(var(--approved-left) + var(--approved-width) * .825)!important;
 top:calc(var(--approved-top) + var(--approved-height) * .031)!important;
 width:calc(var(--approved-width) * .143)!important;
 min-height:0!important;
 display:block!important;z-index:25;
}
body.immersive.royal-play-full .scene-3d.approved-camera-active>.top .brand{display:none}
body.immersive.royal-play-full .scene-3d.approved-camera-active>.top .nav{display:flex;justify-content:space-between;gap:3px}
body.immersive.royal-play-full .scene-3d.approved-camera-active>.top .nav > #sound-toggle,
body.immersive.royal-play-full .scene-3d.approved-camera-active>.top .nav .royal-hud-more>summary{
 width:auto;min-width:0;min-height:28px;padding:.25em .6em;
 border:1px solid #819b83;border-radius:clamp(5px,1.65cqh,12px);
 background:#18382f;color:#fff1ce;font-size:clamp(.55rem,1.78cqh,1rem);text-transform:uppercase;
}
body.immersive.royal-play-full .scene-3d.approved-camera-active>.top #sound-toggle::after{display:none}

/* Approved seat/name margins and options-only sound. */
.approved-camera-frame{container-type:size}
.approved-camera-seat{
 position:absolute;display:inline-flex;align-items:center;justify-content:center;
 --approved-avatar-gap:.28em;
 --approved-avatar-room:8cqh;
 --approved-avatar-size:min(clamp(15px,1.68em,41px),max(0px,calc(var(--approved-avatar-room) - .20em - 2px)));
 gap:var(--approved-avatar-gap);
 max-width:13%;color:#ffda84;white-space:nowrap;font:650 clamp(.57rem,1.7cqw,1.5rem)/1.15 system-ui,sans-serif;
 text-shadow:0 1px 2px #000;pointer-events:none;
 transform:translate(-50%,-50%) rotate(var(--approved-seat-tilt,0deg));
}
.approved-camera-seat[hidden],.approved-camera-seat-wind[hidden]{display:none}
.approved-camera-seat-name{display:block;min-width:0}
.seat-name-full{display:block;width:max-content;white-space:nowrap;transform-origin:left center}
.approved-camera-seat-avatar{
 flex:none;display:block;box-sizing:border-box;overflow:hidden;
 inline-size:var(--approved-avatar-size);
 aspect-ratio:1;border:1px solid currentColor;border-radius:50%;
 background:radial-gradient(circle at 50% 34%,#d7a65c 0 18%,transparent 19%),
  radial-gradient(ellipse at 50% 100%,#a88255 0 43%,#2e211a 44%);
 pointer-events:none;
}
.approved-camera-seat-avatar img{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none}
.approved-camera-seat-avatar img[hidden]{display:none}

.approved-camera-seat-wind{
 display:grid;place-items:center;flex:none;padding:0 .12em;
 min-width:.9em;height:1.14em;border:1px solid #bd8c48;border-radius:.16em;
 background:linear-gradient(#fff4d0,#eacb8d);color:#291e14;box-shadow:0 1px 2px #000;
 font-family:"Songti SC","Noto Serif CJK TC",serif;font-size:.9em;line-height:1;text-shadow:none;
}
.approved-camera-seat--left{left:7.225%;top:47.15%;--approved-seat-tilt:-60deg}
.approved-camera-seat--far{left:50%;top:7.3%}
.approved-camera-seat--right{left:92.775%;top:47.15%;--approved-seat-tilt:60deg}
.approved-camera-seat--self{
 --approved-avatar-room:5.9cqh;
 left:50%;top:min(97.25%,calc(100% - (var(--approved-avatar-size) + .20em + 4px)/2 - 2px));
}
body.immersive.royal-play-full .scene-3d.approved-camera-active>.top .nav{justify-content:flex-end}
body.immersive.royal-play-full .scene-3d.approved-camera-active>.top .nav > #sound-toggle{display:none}
.approved-camera-active .approved-camera-badge{top:4.25%;font-size:clamp(.55rem,1.26cqw,1.05rem)}
/* Reserve the right-hand lane for Options, Chat and their safe-area space. */
.approved-camera-active .approved-camera-wall{
 left:auto;right:max(18.5%,112px);
}
@media (max-width:440px) and (orientation:portrait){
 .approved-camera-active .approved-camera-wall{right:max(18.5%,104px)}
}
body.immersive.royal-play-full .scene-3d.approved-camera-active>.top .royal-hud-links>#sound-toggle{
 font-size:.84rem;text-align:center;min-width:100%;width:auto;
}

/* The match wrapper is the flex item; without a definite available height
   its absolutely positioned camera contributes no height and clips on reopen. */
body.immersive.royal-play-full main>.game-main:not([hidden]){
 display:flex;flex-direction:column;flex:1 1 0%;width:100%;min-width:0;min-height:0;
}

/* The decorative turn marker travels with the projected, rotated seat. */
.approved-camera-seat{padding:.10em .26em;border-radius:.40em;max-width:16%}
.approved-camera-seat[aria-current="true"]{
 background:#2a1c08c7;outline:1.5px solid #f2c467;outline-offset:0;
 box-shadow:0 0 .30em #e39338a0;
}
.approved-camera-seat-score{
 flex:none;color:#f5e6c1;font-size:.71em;font-variant-numeric:tabular-nums;
}
body.immersive.royal-play-full .scene-3d.approved-camera-active .player .move #status[data-approved-routine]{
 /* Visually hide routine turn commentary only; the original live region is
    still accessible, and claim / special decisions / results stay visible. */
 left:0;right:auto;top:0;width:1px;height:1px;clip-path:inset(50%);
 overflow:hidden;white-space:nowrap;
}

/* A larger countdown sits under the top-right HUD without moving the tiles. */
.turn-clock{font-size:1rem;min-width:62px;padding:.3em .55em}
.game-landscape-compact .turn-clock{font-size:.87rem;min-width:55px;padding:.3em .5em}
body.immersive.royal-play-full .scene-3d.approved-camera-active .move #turn-clock.urgent:not([hidden]){
 background:#811f18;color:#fff4dd;border-color:#ffc477;
}

/* Pulse the outline, never the name or the tile layer. */
.scene-3d:not(.approved-camera-active) :is(.bot.turn,.player-head.own-turn) .royal-seat-badge,
.young-seat-name[aria-current="true"]{
 outline:1.5px solid #f2c467;outline-offset:1px;border-radius:.40em;
}
.scene-3d:not(.approved-camera-active) :is(.bot.turn,.player-head.own-turn) .royal-seat-badge,
.young-seat-name[aria-current="true"]{
 animation:mahjong-seat-turn 900ms ease-in-out infinite;
}
@keyframes mahjong-seat-turn{
 0%,100%{outline-color:#ffdc86;box-shadow:0 0 .62em #f0a337b0}
 50%{outline-color:#b1884e;box-shadow:0 0 .08em #e393384d}
}
@media(prefers-reduced-motion:reduce){
 .scene-3d:not(.approved-camera-active) :is(.bot.turn,.player-head.own-turn) .royal-seat-badge,
 .young-seat-name[aria-current="true"]{animation:none}
}

/* Side labels can borrow a little space along the slanted rail. Reserve
   enough room for short stock names even when their points have a sign. */
.approved-camera-seat{max-width:24%}
.approved-camera-seat--left,.approved-camera-seat--right{max-width:17%}
.approved-camera-seat-name{min-width:0;flex:0 1 auto}

/* Crimson Imperial material family, preserving the original camera and taps. */
:root{
 --table-void:#100608;
 --tile-jade-glint:#a6c1a7;--tile-jade-light:#5b8a78;--tile-jade-mid:#345f50;
 --tile-jade-dark:#174138;--tile-jade-deep:#0d2d25;--tile-jade-belly:#081e19;
 --tile-ivory-high:#fff9e5;--tile-ivory-top:#fff2d0;--tile-ivory-mid:#ecd3a8;
 --tile-ivory-side:#c8a377;--tile-ivory-base:#8a593c;--tile-ivory-shadow:#542d20;
 --hud-gold:#f4d78a;--hud-fill:#142e26;--hud-low:#081c16;--hud-border:#8d986d;
}
:root[data-table-design="jade"]{
 --table-void:#06120f;
 --tile-jade-glint:#b4cfb1;--tile-jade-light:#79a482;--tile-jade-mid:#426f59;
 --tile-jade-dark:#234f3e;--tile-jade-deep:#113326;--tile-jade-belly:#091f17;
 --tile-ivory-high:#fffcef;--tile-ivory-top:#fcf4dc;--tile-ivory-mid:#e9dcb9;
 --tile-ivory-side:#bcb08b;--tile-ivory-base:#887450;--tile-ivory-shadow:#51402a;
 --hud-gold:#f6e4aa;--hud-fill:#1a4132;--hud-low:#0a241c;--hud-border:#b8a579;
}
:root[data-table-design="midnight"]{
 --table-void:#10090c;
 --tile-jade-glint:#9eb6c0;--tile-jade-light:#648b98;--tile-jade-mid:#3e6473;
 --tile-jade-dark:#254450;--tile-jade-deep:#142c37;--tile-jade-belly:#0b1a22;
 --tile-ivory-high:#fffaf1;--tile-ivory-top:#fff0d6;--tile-ivory-mid:#e5c7a9;
 --tile-ivory-side:#bd957e;--tile-ivory-base:#875f55;--tile-ivory-shadow:#503137;
 --hud-gold:#f5d5a3;--hud-fill:#282b41;--hud-low:#15172a;--hud-border:#ad9274;
}
body.immersive:has(.approved-camera-active),
body.immersive.royal-play-full:has(.approved-camera-active) main,
body.immersive.royal-play-full .scene-3d.approved-camera-active{background:var(--table-void)}
.approved-camera-badge,
body.immersive.royal-play-full .scene-3d.approved-camera-active>.top .nav .royal-hud-more>summary{
 color:var(--hud-gold);background:linear-gradient(180deg,var(--hud-fill),var(--hud-low));
 border:1px solid var(--hud-border);box-shadow:inset 0 1px 0 #f5d88c42,0 1px 4px #090300c2;
 text-shadow:0 1px 1px #1a1008;
}
.approved-camera-seat{color:var(--hud-gold);text-shadow:0 1px 2px #140700}
/* A player label always has a frame, even while another seat is active. */
.approved-camera-seat{
 border:1px solid #bd995e;background:linear-gradient(180deg,#2a1b13ba,#100c0bdd);
 box-shadow:inset 0 0 0 1px #f0ad542c,0 1px 4px #110500a8;
}
.approved-camera-seat-wind{
 color:#24140b;background:linear-gradient(145deg,#fff5d0,#d9ae68);border-color:#ca9e56;
}

:root[data-table-design="sapphire"]{
 --table-void:#07121f;
 --tile-jade-glint:#bacfe0;--tile-jade-light:#7598b2;--tile-jade-mid:#4b7699;
 --tile-jade-dark:#2a5079;--tile-jade-deep:#183554;--tile-jade-belly:#111f38;
 --tile-ivory-high:#fffdf5;--tile-ivory-top:#f2edf0;--tile-ivory-mid:#d9d9e0;
 --tile-ivory-side:#adb2c1;--tile-ivory-base:#717b90;--tile-ivory-shadow:#41475a;
 --hud-gold:#ebeffa;--hud-fill:#203650;--hud-low:#0f1d32;--hud-border:#a9bcd7;
}
:root[data-table-design="onyx"]{
 --table-void:#0c0908;
 --tile-jade-glint:#b4ad8e;--tile-jade-light:#7f7b62;--tile-jade-mid:#59594f;
 --tile-jade-dark:#343830;--tile-jade-deep:#1c201a;--tile-jade-belly:#12140f;
 --tile-ivory-high:#fff8e8;--tile-ivory-top:#f5e7ca;--tile-ivory-mid:#e0c79f;
 --tile-ivory-side:#bc9e72;--tile-ivory-base:#8c6548;--tile-ivory-shadow:#4f3626;
 --hud-gold:#eacb82;--hud-fill:#292419;--hud-low:#12110d;--hud-border:#927140;
}
:root[data-table-design="sapphire"] .approved-camera-seat{
 border-color:#c1cee5;background:linear-gradient(180deg,#243a51cc,#0f1926ee)
}
:root[data-table-design="sapphire"] .approved-camera-seat-wind{
 background:linear-gradient(145deg,#fff,#abbcd3);border-color:#bacbe2;color:#161c35
}
:root[data-table-design="onyx"] .approved-camera-seat{
 border-color:#a18650;background:linear-gradient(180deg,#352c1dcc,#17130eee)
}
/* Hồng Than separates the animated halo from the markup and hit targets.
   A static rim remains legible in fallback or without a canvas context. */
:root .approved-camera-seat[aria-current="true"]{
 background:#2b140f;outline-color:#ff9345;outline-offset:1px;
 border-color:#ffd499;box-shadow:0 0 .20em #ffaf70,0 0 .62em #e743188c;
}
.approved-camera-seat[aria-current="true"] .approved-camera-seat-avatar{
 border-color:#ffe7ba;
 outline:1px solid #f4843f;outline-offset:.05em;
 box-shadow:0 0 .16em #ffd294,0 0 .38em #ed5f1acc;
}
.turn-flame-layer{position:absolute;display:block;pointer-events:none;user-select:none}
.approved-camera-frame>.turn-flame-layer{z-index:1}
.turn-flame-layer[hidden]{display:none!important}

/* Theme the non-camera game board without overriding its aspect ratio,
   positioning, seat count, grid tracks, action lane or timer. */
:root{
 --variant-felt-hi:#791123;--variant-felt-lo:#340711;--variant-rail-hi:#97502e;--variant-rail-lo:#260b0a;
 --variant-panel:#2e1017cc;--variant-face-hi:#fff9e8;--variant-face-lo:#efd8b4;--variant-face-rim:#b38d5d;
 --variant-glyph-scale:1;--variant-face-shadow:#10090346;--variant-face-bevel:#fffdf3
}
:root[data-table-design="jade"]{
 --variant-felt-hi:#16684b;--variant-felt-lo:#052c23;--variant-rail-hi:#6c5934;--variant-rail-lo:#1d170f;
 --variant-panel:#0b3022df
}
:root[data-table-design="midnight"]{
 --variant-felt-hi:#36385e;--variant-felt-lo:#151629;--variant-rail-hi:#614452;--variant-rail-lo:#1c1425;
 --variant-panel:#1b1f36df
}
:root[data-table-design="sapphire"]{
 --variant-felt-hi:#215d91;--variant-felt-lo:#0a2646;--variant-rail-hi:#55647a;--variant-rail-lo:#111b2a;
 --variant-panel:#102a4bdd
}
:root[data-table-design="onyx"]{
 --variant-felt-hi:#3b3032;--variant-felt-lo:#151417;--variant-rail-hi:#62513e;--variant-rail-lo:#1c1814;
 --variant-panel:#211a0eea
}
:root[data-tile-design="white"]{
 --variant-face-hi:#fff;--variant-face-lo:#e9eded;--variant-face-rim:#aeb6b8;--variant-face-shadow:#0d0c0930
}
:root[data-tile-design="contrast"]{
 --variant-face-hi:#fff;--variant-face-lo:#fff;--variant-face-rim:#c1c0bd;--variant-glyph-scale:1.035;
 --variant-face-shadow:#0d0c0924;--variant-face-bevel:transparent
}
:root[data-tile-design="jade-ivory"]{
 --variant-face-hi:#f3fdf6;--variant-face-lo:#d9efe4;--variant-face-rim:#95b9aa;--variant-face-shadow:#0a211438
}
:root[data-tile-design="rose-porcelain"]{
 --variant-face-hi:#fff5f3;--variant-face-lo:#f4dedb;--variant-face-rim:#c09c98;--variant-face-shadow:#2d161a33
}
body.immersive.royal-play-full .scene-3d:not(.approved-camera-active),
body.immersive #young-board{
 --carved-band:clamp(11px,calc(var(--game-view-h,100dvh)*.045),26px);
 background-color:var(--variant-felt-lo);
 /* Painted as the bottom wood rail only, not an overlay above the tiles. */
 background-image:url("./table-design/wood-apron.svg?v=imperial-dragon-relief"),
  repeating-linear-gradient(177deg,#f7a25413 0 1px,#1c0a092d 1px 2px,transparent 2px 4px),
  linear-gradient(176deg,var(--variant-rail-hi),var(--variant-rail-lo) 84%),
  repeating-linear-gradient(36deg,#ffffff04 0 1px,#00000004 1px 2px,transparent 2px 4px),
  radial-gradient(ellipse at 50% 42%,var(--variant-felt-hi),var(--variant-felt-lo) 82%);
 background-repeat:no-repeat;
 background-position:center bottom;
 background-size:100% var(--carved-band),100% var(--carved-band),100% var(--carved-band),100% 100%,100% 100%;
 border-color:var(--hud-border);
 box-shadow:inset 0 0 0 2px var(--variant-rail-hi),inset 0 0 0 4px var(--variant-rail-lo),inset 0 0 2.35rem #0006
}
body.immersive.royal-play-full .scene-3d:not(.approved-camera-active) :is(.plaque,.royal-seat-badge),
body.immersive #young-board .young-seats .seat{
 background-color:var(--variant-panel);color:var(--hud-gold);border-color:var(--hud-border)
}
body.immersive.royal-play-full .scene-3d:not(.approved-camera-active) :is(.wall-stack i,.bot .backs i,.tile-back){
 background:linear-gradient(160deg,var(--tile-jade-light),var(--tile-jade-mid) 22%,var(--tile-jade-belly));
 border-color:var(--tile-jade-glint)
}
body.immersive.royal-play-full .scene-3d:not(.approved-camera-active) :is(.wall-stack i,.bot .backs i,.tile-back)::after{
 background:linear-gradient(150deg,var(--tile-jade-dark),var(--tile-jade-belly))
}
body.immersive.royal-play-full .scene-3d:not(.approved-camera-active) .center .plaque{
 background:linear-gradient(var(--hud-fill),var(--hud-low))
}
.variant-tile-sprite{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}
.variant-tile-glyph{width:100%;height:100%;display:none;flex:none;pointer-events:none}
.variant-face-high{stop-color:var(--variant-face-hi)}
.variant-face-low{stop-color:var(--variant-face-lo)}
.variant-face-border{fill:url(#variant-face-gradient);stroke:var(--variant-face-rim);stroke-width:1.25}
.variant-face-bevel{fill:none;stroke:var(--variant-face-bevel);stroke-width:1.25;stroke-linecap:round;opacity:.8}
.variant-face-art{transform-origin:center;transform:scale(var(--variant-glyph-scale))}
:is(.scene-3d:not(.approved-camera-active), #young-board, #result, #river-dialog) .variant-tile-glyph{
 display:block;background:linear-gradient(var(--variant-face-hi),var(--variant-face-lo));border-radius:inherit;
 box-shadow:inset 0 1px .06rem #fff9,0 .09rem .10rem var(--variant-face-shadow)
}
:is(.scene-3d:not(.approved-camera-active), #young-board, #result, #river-dialog) img[data-variant-covered]{
 display:none!important
}
:is(.scene-3d:not(.approved-camera-active),#result,#river-dialog) :is(.tile,.flower-tile):has(.variant-tile-glyph){
 background:var(--variant-face-lo);border-color:var(--variant-face-rim)
}
#young-board .tileline .variant-tile-glyph{width:clamp(.85rem,2.5vw,1.35rem);height:auto;aspect-ratio:88/122;border-radius:.12rem}
#young-board :is(.young-hand,#young-choice-tile) .variant-tile-glyph{width:100%;height:auto;aspect-ratio:88/122;border-radius:.15rem}

/* These rule hints are visible on the same camera; no engine state or action
   is reconstructed. The room/rule chooses which native controls exist. */
.approved-variant-info[hidden],.approved-camera-seat-rule-cue[hidden]{display:none}
.approved-variant-info{
 position:relative;display:flex;align-items:center;gap:.30em;
 max-width:100%;border:1px solid var(--hud-border);border-radius:.4em;padding:.18em .4em;
 color:var(--hud-gold);background:var(--hud-low);font:700 clamp(.54rem,1.24cqw,.88rem)/1.15 system-ui,sans-serif;
 pointer-events:none;
}
.approved-variant-info small{font:inherit}
.approved-variant-info img{width:clamp(10px,1.35cqw,19px);aspect-ratio:88/122;object-fit:contain;align-self:center}
.approved-camera-seat-rule-cue{
 position:absolute;left:50%;top:100%;transform:translateX(-50%);
 max-width:220%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
 padding:.1em .34em;color:var(--hud-gold);background:var(--hud-low);border:1px solid var(--hud-border);
 border-radius:.25em;font-size:.60em;
}
.approved-camera-seat--self .approved-camera-seat-rule-cue{top:auto;bottom:100%}
body.immersive.royal-play-full .scene-3d.approved-camera-active[data-approved-variant] .move .actions:has(.sichuan-choice,.british-exchange,> :nth-child(5)){
 left:50%;right:auto;transform:translateX(-50%);bottom:22%;width:min(82%,620px);max-height:52%;
 overflow:auto;overscroll-behavior:contain;justify-content:center;align-content:start;
 background:var(--hud-low);border:1px solid var(--hud-border);border-radius:.45rem;
 box-shadow:0 3px 16px #0009;padding:.4rem;pointer-events:auto;
}
body.immersive.royal-play-full .scene-3d.approved-camera-active[data-approved-variant] .move .actions:has(.sichuan-choice,.british-exchange,> :nth-child(5)) > button.action{
 flex:0 1 auto;min-width:58px;padding-inline:.55em;
}
body.immersive.royal-play-full .scene-3d.approved-camera-active .move .actions :is(.sichuan-choice,.british-exchange){
 flex:1 0 100%;width:100%;max-width:100%;background:none;pointer-events:auto;justify-content:center;
}

/* Readable table wind mark in the lightweight round badge, never on a rack. */
[data-table-wind-tile="27"]{--table-wind-art:url("./tiles-hd/27.svg")}
[data-table-wind-tile="28"]{--table-wind-art:url("./tiles-hd/28.svg")}
[data-table-wind-tile="29"]{--table-wind-art:url("./tiles-hd/29.svg")}
[data-table-wind-tile="30"]{--table-wind-art:url("./tiles-hd/30.svg")}
[data-table-wind-tile]::before{
 content:"";display:inline-block;vertical-align:middle;
 inline-size:.85em;block-size:1.12em;margin-inline-end:.4em;
 background:var(--table-wind-art) center/contain no-repeat;
}

/* Never leave a focus rectangle over a tile hidden by the opening deal. */
body.immersive.royal-play-full .scene-3d.approved-camera-active[data-approved-dealing] .player .hand .tile:focus-visible{outline:none}

/* A fixed dealer token, deliberately distinct from the active-turn flame. */
.approved-camera-seat-dealer{
 position:absolute;z-index:4;right:-.39em;top:-.41em;display:grid;place-items:center;
 box-sizing:border-box;width:1.48em;height:1.48em;border-radius:50%;background:#f3ce80;
 color:#291b0c;border:1px solid #fff0bf;box-shadow:0 2px 4px #1a130c;
 font:900 clamp(8px,1.2cqw,12px)/1 system-ui,sans-serif;text-shadow:none;pointer-events:none
}
.approved-camera-seat-dealer[hidden]{display:none}

/* Keep the public ORAMA marker usable on short landscape screens. */
.scene-3d[data-orama-joker-hud] .approved-variant-info {
  gap: clamp(3px,.65cqw,9px);
  padding:clamp(3px,.47cqw,7px) clamp(6px,.85cqw,12px);
  font-size:clamp(10px,1.45cqw,16px);
  color:#fff0c1;
}
.scene-3d[data-orama-joker-hud] .approved-variant-info img {
  width:clamp(17px,2.6cqw,35px);
}
.scene-3d[data-orama-joker-hud] .approved-variant-info img:last-child {
  border-radius:3px;
  outline:1px solid #e6c573;
  box-shadow:0 0 7px #e1b35c96;
}

/* Gameplay notices must remain readable over both light and dark premium
   table art. Keep the local backing off for empty or screen-reader-only text. */
body.immersive.royal-play-full .scene-3d.approved-camera-active .player .move #status:not(:empty):not([data-approved-routine]){
 width:max-content;max-width:88.5%;margin-inline:auto;box-sizing:border-box;
 padding:.2em .6em;border-radius:.45em;background:#17130f;color:#fff6dc;
 box-shadow:0 1px 3px #0006;
}

/* Readable with no canvas or motion: frame + shape + short local-player label. */
html body .approved-camera-frame .approved-camera-seat[aria-current="true"]:not([hidden]){
 outline:2px solid #ffd264;outline-offset:1px;border-color:#fff0b3!important;
 color:#fff5cf;box-shadow:0 0 .22em #ffc475,0 0 .68em #ef5e2aa6!important
}
.mg-turn-beacon{
 position:absolute;pointer-events:none;user-select:none;display:flex;align-items:center;justify-content:center;
 gap:.3em;z-index:5;box-sizing:border-box;height:1.44em;min-width:1.44em;padding:0 .29em;
 border:1px solid #ffe8a2;border-radius:100px;background:#ffdc77;color:#2a140f;
 text-shadow:none;font-weight:850;white-space:nowrap;
 left:50%;bottom:calc(100% + 3px);transform:translateX(-50%);
}
.mg-turn-beacon[hidden]{display:none!important}
.mg-turn-beacon::before{
 content:"";display:block;flex:none;width:.82em;height:.9em;
 background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 18'%3E%3Cpath fill='%23742715' d='M8 0c.8 3.8 5.2 5.8 5.2 8.2 1-1 1.1-2.2 1.1-2.2S16 8.4 16 11.1a8 7 0 0 1-16 0c0-3.5 2-5.2 2-5.2-.1 1.7.8 2.6.8 2.6C3 5.5 7.4 4.1 8 0ZM8 9c-.7 1.9-3.1 3.1-3.1 4.8a3.1 2.9 0 0 0 6.2 0C11.1 12 9 11.2 8 9Z'/%3E%3C/svg%3E");
}
.approved-camera-seat--self .mg-turn-beacon{
 padding:0 .44em;max-width:16cqw;
}
.mg-turn-beacon-label{font-size:clamp(10px,.79em,15px);overflow:hidden;text-overflow:ellipsis;line-height:1.1}
.approved-camera-seat--far .mg-turn-beacon{left:auto;right:calc(100% + 3px);bottom:50%;transform:translateY(50%)}
.scene-3d:not(.approved-camera-active) :is(.bot.turn,#seat.own-turn) .royal-seat-badge,
.young-seat-name[aria-current="true"]{outline:2px solid #ffd264!important;outline-offset:1px}

/* The wall and audience count share the real controls row, not a second
   fixed anchor behind Options. Grow leftward from one table-relative edge. */
body.immersive.royal-play-full .scene-3d.approved-camera-active>.top{
 left:auto!important;right:calc(100% - var(--approved-left) - var(--approved-width)*.968)!important;
 width:max-content!important;max-width:calc(var(--approved-width)*.35)!important;
}
body.immersive.royal-play-full .scene-3d.approved-camera-active>.top .nav{
 display:flex;align-items:center;justify-content:flex-start;gap:clamp(2px,.43vw,5px);flex-wrap:nowrap;min-inline-size:0;max-inline-size:100%;
}
body.immersive.royal-play-full .scene-3d.approved-camera-active>.top .nav> :not(.mg-live-camera-wall){flex:none}
body.immersive.royal-play-full .scene-3d.approved-camera-active>.top .nav>.mg-live-camera-wall{
 display:inline-flex;align-items:center;gap:3px;flex:1 1 auto;min-inline-size:0;max-inline-size:none;position:relative
}
body.immersive.royal-play-full .scene-3d.approved-camera-active>.top .nav>.mg-live-camera-wall .approved-camera-wall{
 position:static;flex:0 1 auto;min-inline-size:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.game-landscape-compact body.immersive.royal-play-full .scene-3d.approved-camera-active>.top .nav .royal-hud-more>summary{
 width:29px;min-width:29px;height:29px;display:grid;place-items:center;padding:0;font-size:0;
}
.game-landscape-compact body.immersive.royal-play-full .scene-3d.approved-camera-active>.top .nav .royal-hud-more>summary::before{
 content:"⚙";font-size:16px;line-height:1;
}
.approved-camera-seat-score-line{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;gap:.35em;min-width:0;flex:none}
.approved-camera-seat-score-line>.approved-camera-seat-dealer{
 position:static;flex:none;width:1.35em;height:1.35em;
}

/* Device-local A/B of the projected camera, next to the wall count. */
.mg-board-layout-toggle[hidden]{display:none!important}
.approved-camera-active .mg-live-camera-wall .mg-board-layout-toggle{
 display:inline-grid;place-items:center;flex:0 0 auto;inline-size:clamp(28px,4vw,36px);
 block-size:clamp(28px,4vw,36px);min-inline-size:0;padding:0;
 border:1px solid #9f784a;border-radius:8px;background:#32261f;color:#e4c69d;
 touch-action:manipulation;pointer-events:auto;cursor:pointer;
}
.approved-camera-active .mg-board-layout-toggle svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.approved-camera-active .mg-board-layout-toggle[aria-pressed=true]{background:#1d513a;border-color:#9ddaad;color:#e3ffe9}
.approved-camera-active .mg-board-layout-toggle:focus-visible{outline:2px solid #f4cf81;outline-offset:2px}
.approved-camera-active .mg-board-layout-toggle:disabled{opacity:.65;cursor:default}
