/* The camera keeps the guide in a dedicated ceiling lane. Never move tiles, the
   rack or round controls to make room for this on-demand reference. */
button.mg-scoring-guide[hidden],.mg-score-guide-panel[hidden]{display:none!important}
button.mg-scoring-guide{
 display:inline-flex;align-items:center;justify-content:center;gap:.3rem;
 min-width:37px;min-height:33px;max-width:100%;flex:none;box-sizing:border-box;
 padding:.26rem .45rem;border:1px solid #bda37b;border-radius:.45rem;
 color:#fff1ce;background:#30251c;font:740 .72rem/1 system-ui,sans-serif;
 white-space:nowrap;cursor:pointer;pointer-events:auto;touch-action:manipulation
}
.mg-scoring-guide svg{width:1rem;height:1rem;display:block;flex:none;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.mg-scoring-guide[aria-expanded=true]{background:#693f27}
.mg-scoring-guide:focus-visible,.mg-score-guide-panel :focus-visible{outline:2px solid #ffe699;outline-offset:2px}
.approved-camera-frame .approved-camera-round-info:has(.mg-scoring-guide:not([hidden])){
 /* From 8.5% to 37%, with the far seat starting no earlier than 38.5%. */
 max-width:28.5%
}
.approved-camera-round-head:has(.mg-scoring-guide:not([hidden])){
 max-width:100%;min-width:0
}
.approved-camera-round-head:has(.mg-scoring-guide:not([hidden]))>.approved-camera-badge{
 box-sizing:border-box;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap
}
.approved-camera-round-head:has(.mg-scoring-guide:not([hidden]))>.approved-camera-round-progress{flex:none}
.approved-camera-round-head .mg-scoring-guide{
 min-width:36px;min-height:32px;max-width:10.5cqw;overflow:hidden
}
.approved-camera-round-head .mg-scoring-guide span{overflow:hidden;text-overflow:ellipsis}
body:has(.approved-camera-active) .mg-scoring-guide-fallback{display:none}
@container (max-width:940px){
 .approved-camera-round-head .mg-scoring-guide span{display:none}
 .approved-camera-round-head .mg-scoring-guide{padding:.22rem}
}
.mg-scoring-guide-dedicated{justify-self:start}
/* The top panel grows into the felt, not into the bottom rack. The live
   rack top measured by scoring-guide.js can only tighten its lower edge. */
.mg-score-guide-panel{
 --guide-w:100vw;--guide-h:100dvh;--guide-left:env(safe-area-inset-left,0px);
 --guide-right:env(safe-area-inset-right,0px);--guide-safe-top:env(safe-area-inset-top,0px);
 --guide-start:max(calc(var(--guide-h)*.105),calc(var(--guide-safe-top) + 4px));
 --guide-bottom:min(calc(var(--guide-h)*.765),var(--guide-rack-top,9999px));
 position:fixed;z-index:85;box-sizing:border-box;container-type:inline-size;
 display:flex;flex-direction:column;
 inset:auto;top:var(--guide-start);left:max(4%,calc(var(--guide-left) + 6px));right:max(4%,calc(var(--guide-right) + 6px));
 width:auto;max-width:58rem;margin-inline:auto;min-height:0;
 max-height:max(0px,calc(var(--guide-bottom) - var(--guide-start)));overflow:hidden;
 color:#fff2d6;background:linear-gradient(155deg,#38221a,#211512);
 border:1px solid #ac8451;border-radius:.68rem;box-shadow:0 6px 13px #0007;
 font:500 clamp(.82rem,calc(var(--guide-h)*.041),1rem)/1.32 system-ui,sans-serif;color-scheme:dark
}
.game-landscape-compact .mg-score-guide-panel{
 --guide-w:var(--game-view-w);--guide-h:var(--game-view-h);
 --guide-left:var(--surface-safe-l,var(--safe-l,0px));--guide-right:var(--surface-safe-r,var(--safe-r,0px));
 --guide-safe-top:var(--surface-safe-t,var(--safe-t,0px))
}
@media (orientation:portrait) and (any-pointer:coarse){
 .american-mabar .mg-score-guide-panel{
  --guide-w:var(--os-w);--guide-h:var(--os-h);
  --guide-left:env(safe-area-inset-top,0px);--guide-right:env(safe-area-inset-bottom,0px);
  --guide-safe-top:env(safe-area-inset-right,0px)
 }
}
.mg-score-guide-panel{left:max(calc(var(--guide-w)*.04),calc(var(--guide-left) + 6px));right:max(calc(var(--guide-w)*.04),calc(var(--guide-right) + 6px))}
.mg-score-guide-panel header{
 display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin:0;
 padding:.22rem .75rem;border-bottom:1px solid #ac84516e;flex:none
}
.mg-score-guide-panel h2{padding:0;margin:0;color:#ffe8b3;font:800 1.08em/1.15 system-ui,sans-serif;min-width:0;overflow-wrap:anywhere}
.mg-score-guide-panel .mg-score-guide-close{display:grid;place-items:center;flex:none;min-width:38px;min-height:36px;padding:0;border:1px solid #ac8451;border-radius:.4rem;background:#533422;color:#fff1ce;font:700 1.2rem/1 system-ui,sans-serif;cursor:pointer}
.mg-score-guide-content{min-height:0;overflow:auto;overscroll-behavior:contain;padding:.25rem .75rem .5rem;scrollbar-color:#b18457 #2a1915}
.mg-score-guide-panel p,.mg-score-guide-panel figure{margin:.3rem 0}
.mg-score-guide-subtitle{font-weight:750;color:#ffce87}
.mg-score-guide-note{color:#e4cbad}
.mg-score-guide-row{border-top:1px solid #9871445e;margin:0}
.mg-score-guide-row>summary{display:flex;align-items:center;justify-content:space-between;gap:.35rem;min-height:38px;padding-block:.12rem;cursor:pointer;list-style:none}
.mg-score-guide-row>summary::-webkit-details-marker{display:none}
.mg-score-guide-row>summary>span{min-width:0;overflow-wrap:anywhere}
.mg-score-guide-row>summary>span::before{content:'› ';color:#ffcf85}
.mg-score-guide-row[open]>summary>span::before{content:'⌄ '}
.mg-score-guide-row summary>strong{color:#ffd599;text-align:end;flex:none;max-width:50%}
.mg-score-guide-detail{padding:0 0 .4rem}
.mg-score-guide-groups{display:flex;align-items:flex-start;flex-wrap:wrap;gap:.3rem .55rem}
.mg-score-guide-groups figure{min-width:0;max-width:100%;text-align:center}
.mg-score-guide-faces{display:flex;flex-wrap:nowrap;max-width:100%;gap:2px;overflow-x:auto;overscroll-behavior-inline:contain}
.mg-score-guide-faces img{display:block;width:clamp(18px,7.2cqw,28px);flex:none;min-width:0;height:auto;aspect-ratio:27/38;object-fit:contain}
.mg-score-guide-groups figcaption{font-size:.66rem;color:#ead5b4;line-height:1.2;margin-top:2px}
.mg-score-guide-panel a{display:inline-block;margin-top:.4rem;color:#ffe3a1;text-underline-offset:.15em}
