/* Actual component boxes: override generic decision-button padding, never stretch artwork. */
#decision-shelf #e23-actions .b2-tile{box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);justify-items:center;align-content:center;gap:5px;width:68px;min-height:84px;padding:6px}
#decision-shelf #e23-actions .b2-tile svg{display:block;max-width:100%;width:52px;height:52px;margin:0;overflow:hidden;flex:none}
#decision-shelf #e23-actions .b2-pieces button{box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);justify-items:center;align-items:center;padding:5px;flex:0 0 64px;min-height:67px}
#decision-shelf #e23-actions .b2-pieces svg{display:block;width:52px;height:46px;max-width:100%;margin:0;overflow:visible}
#decision-shelf #e23-actions .b3-market button{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;padding:6px}
#decision-shelf #e23-actions .b3-market svg{display:block;max-width:100%;margin:auto}
#decision-shelf #e23-actions .b3-next-tile svg{display:block;width:100%;height:100%}
.game-card.e23-card .card-art{isolation:isolate;display:grid;grid-template-columns:minmax(0,1fr);justify-content:stretch;grid-template-rows:18px minmax(0,1fr) minmax(2.8em,auto);gap:8px;padding:16px 20px 12px;box-sizing:border-box}
.game-card.e23-card .card-art>img{position:static;inset:auto;display:block;object-fit:contain;object-position:center;width:100%;height:100%;min-width:0;min-height:0;align-self:stretch}
.game-card.e23-card .art-number,.game-card.e23-card .art-caption{z-index:1;pointer-events:none}
.game-card.e23-card .art-number{position:static;justify-self:start;align-self:center}
.game-card.e23-card .art-caption{position:static;inset:auto;align-self:center;justify-self:stretch;background:none;border:0;padding:0;border-radius:0;box-shadow:none;text-align:center;max-width:none;min-width:0;line-height:1.4;text-wrap:balance;overflow-wrap:break-word}
.e23-game [data-motion-key]{transform-box:fill-box}
.e23-game .b4-role-card,.e23-game .b4-fire-card{box-sizing:border-box;flex-shrink:0}
.e23-game .b3-hand button{display:grid;place-items:center;padding:3px}
.e23-game .e23-feedback{color:#a65e4c}
.e23-game .b2-point:disabled,.e23-game .b2-slot:disabled{opacity:1;cursor:default}
.e23-game .b2-backgammon{grid-template-columns:repeat(6,minmax(0,1fr)) clamp(22px,4%,32px) repeat(6,minmax(0,1fr))}
.b2-bar{grid-column:7;grid-row:1 / span 2;display:grid;grid-template-rows:1fr 1fr;background:#ad9270;border-inline:2px solid #ead9ba;min-width:0}
.b2-bar-seat{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#fff7e4}
.b2-bar-seat i{width:16px;height:16px;border:2px solid #f4e7cb;background:var(--seat-color);border-radius:50%;box-sizing:border-box}
.b2-bar-seat small{font-size:11px}
.e23-game .b2-men{width:100%;min-width:0}
.e23-game .b2-men i,.e23-game .b2-point.preview .b2-men:after{width:min(22px,90%);height:auto;aspect-ratio:1;flex-shrink:0}
.mah-rules{display:flex;flex-wrap:wrap;gap:4px 14px;align-items:center;font-size:12px;line-height:1.6;margin:0 0 7px;color:#56634f}
.mah-rules strong{color:#344b40}
.mah-feedback{display:flex;align-items:center;gap:10px;min-height:48px;padding:8px 10px;margin-bottom:8px;background:#e5e9d9;border-left:4px solid #c57a48;border-radius:5px;font-size:12px;line-height:1.5}
.mah-selected-faces{display:flex;gap:5px;flex:none}.mah-selected-faces:empty{display:none}.mah-selected-faces img{display:block;border:1px solid #c57a48;border-radius:3px;width:32px;height:40px;object-fit:contain}
.mah-error{border-left-color:#b64c46;background:#efded5}
.mah-stuck{display:grid;gap:4px;padding:10px 12px;background:#eee0bd;border:1px solid #b89a55;border-radius:7px;margin:8px 0;font-size:12px;line-height:1.5}.mah-stuck strong{font-size:14px;color:#785a27}
.e23-game .e23-access .mah-selected{outline:3px solid #cb7137;outline-offset:-3px;background:#f4e5cc}.e23-game .e23-access .mah-match{outline:2px solid #258d70;outline-offset:-2px}.e23-game .e23-access .mah-blocked{background:#e2e1d6;color:#6a6e60}
.e23-mahjong .e23-action.chosen{outline:3px solid #c57a48}
.e23-mahjong .mah-recover{background:#e8d5a4;border:2px solid #aa8541;color:#654a22;font-weight:700}
.e23-mahjong.solo-mode #e23-scores{display:none}
.e23-mahjong #decision-shelf .e23-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.e23-mahjong #mahjong-guidance{grid-column:1/-1;min-width:0}
.e23-mahjong #decision-shelf .e23-confirm-row{display:flex;align-items:center;gap:6px;border:0;padding:0;margin:0}
.e23-mahjong #decision-shelf .e23-confirm-row p{display:none}
.e23-mahjong #decision-shelf button{padding:8px 9px;font-size:12px}
.e23-mahjong #decision-shelf #e23-actions{gap:5px}
.e23-mahjong #decision-shelf{position:static}
@media(max-width:600px){.e23-mahjong .e23-mahjong-canvas{height:330px}.mah-rules{gap:3px 10px;font-size:11px}.mah-rules strong{width:100%}.mah-feedback{font-size:12px}}
.e23-game .e23-stack .e23-disc.small{width:42px;height:42px;font-size:28px}
.e23-game .e23-discpile{align-items:center;min-height:48px}
@media(min-width:1000px){
 #decision-shelf #e23-actions .b3-hand{gap:5px;overflow:visible}
 #decision-shelf #e23-actions .b3-hand button{padding:0;flex:1 1 0;min-width:0;max-width:64px}
 #decision-shelf #e23-actions .b3-hand .b3-card{width:100%;max-width:64px}
}
@media(max-width:600px){
 #decision-shelf #e23-actions .b2-pieces button{flex-basis:49px;padding:3px;min-height:56px}
 #decision-shelf #e23-actions .b2-pieces svg{width:41px;height:36px}
 #decision-shelf #e23-actions .b2-tile{width:58px;min-height:72px;padding:5px}
 #decision-shelf #e23-actions .b2-tile svg{width:44px;height:44px}
}

/* External classes also work with the site’s strict style policy. */
.b4-color-0{--fire-color:#c77760;--role-color:#c77760}
.b4-color-1{--fire-color:#668c79;--role-color:#668c79}
.b4-color-2{--fire-color:#b8963e;--role-color:#b8963e}
.b4-color-3{--fire-color:#8d79a5;--role-color:#8d79a5}
.b4-color-4{--fire-color:#548caa;--role-color:#548caa}
.b4-color-5{--fire-color:#b46b90;--role-color:#b46b90}
.b4-color-hidden{--fire-color:#9b9c84;--role-color:#9b9c84}
.b4-color-dot{background:var(--fire-color)}
.b4-grid-x-0{grid-column:1}.b4-grid-y-0{grid-row:1}
.b4-grid-x-1{grid-column:2}.b4-grid-y-1{grid-row:2}
.b4-grid-x-2{grid-column:3}.b4-grid-y-2{grid-row:3}
.b4-grid-x-3{grid-column:4}.b4-grid-y-3{grid-row:4}
.b4-grid-x-4{grid-column:5}.b4-grid-y-4{grid-row:5}
.b4-grid-x-5{grid-column:6}.b4-grid-y-5{grid-row:6}
.b4-grid-x-6{grid-column:7}.b4-grid-y-6{grid-row:7}

/* Classic flight colours are consistent across hangars, pieces and seat markers. */
.e23-aeroplane{--table-seat-1:#c94b46;--table-seat-2:#d4a928;--table-seat-3:#397faa;--table-seat-4:#429465}
.e23-aeroplane :is(.seat-1,.seat-tint-0){--seat-color:#c94b46!important}
.e23-aeroplane :is(.seat-2,.seat-tint-1){--seat-color:#d4a928!important}
.e23-aeroplane :is(.seat-3,.seat-tint-2){--seat-color:#397faa!important}
.e23-aeroplane :is(.seat-4,.seat-tint-3){--seat-color:#429465!important}
