/* Canonical modal environment and shared content-bearing dialogs.
   All native game dialogs share one backdrop, blur, focus and scroll policy. */
html.tg-modal-open{overflow:hidden}
:root{--tg-modal-backdrop:rgba(15,25,31,.42);--tg-modal-backdrop-blur:blur(3px)}
dialog.tg-modal::backdrop{background:var(--tg-modal-backdrop);backdrop-filter:var(--tg-modal-backdrop-blur)}
.admin-confirm-overlay.tg-modal-overlay{background:var(--tg-modal-backdrop);
 backdrop-filter:var(--tg-modal-backdrop-blur)}
dialog.tg-modal[open]{animation:float-dialog-enter .28s cubic-bezier(.16,1,.3,1) both}
.tg-dialog{
 box-sizing:border-box;width:min(92vw,var(--tg-dialog-width,500px));
 max-width:calc(100vw - 22px);max-height:min(90dvh,860px);
 padding:0;border:1px solid var(--line);border-radius:24px;
 background:var(--surface);color:var(--text);
 box-shadow:0 28px 95px rgba(10,25,30,.25);overflow:hidden;
}
.tg-dialog[data-width="wide"]{--tg-dialog-width:740px}
.tg-dialog-shell{box-sizing:border-box;max-height:min(90dvh,860px);
 overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.tg-dialog-heading{padding:22px 26px 12px;display:flex;align-items:flex-start;
 justify-content:space-between;gap:16px}
.tg-dialog-heading-copy{min-width:0;display:grid;gap:6px}
.tg-dialog-eyebrow{color:var(--muted);font-size:10px;font-weight:820;letter-spacing:.15em;margin:0}
.tg-dialog-title{font-size:clamp(26px,3.3vw,35px);line-height:1.1;
 font-weight:830;letter-spacing:-.045em;margin:0}
.tg-dialog-subtitle{font-size:12px;color:var(--muted);margin:0}
.tg-dialog-subtitle:empty{display:none}
.tg-dialog-close{flex:0 0 36px;display:grid;place-items:center;width:36px;
 height:36px;border:0;border-radius:11px;background:var(--surface-soft);
 color:var(--muted);font-size:23px;cursor:pointer;
 transition:background .2s,transform .2s}
.tg-dialog-close:hover{background:var(--selected);color:var(--text);transform:scale(1.06)}
.tg-dialog-close:focus-visible{outline:2px solid var(--text);outline-offset:2px}
.tg-dialog-content{padding:0 26px 26px}
@media(max-width:700px){
 .tg-dialog{border-radius:21px}
 .tg-dialog-heading{padding:20px 18px 12px}
 .tg-dialog-content{padding:0 18px 22px}
}
@media(prefers-reduced-motion:reduce){
 dialog.tg-modal[open]{animation:none}
 .tg-dialog-close{transition:none}
}
