/* Shared JX window treatment, adapted from the user's localhost:1430 clone.
   Scoped to Game TV extensions; authentication and gameplay remain untouched. */
:is(#gameHallDialog,#gameCommunityDialog,#gameAccountDialog,#gameActivityDialog){position:fixed;inset:0;margin:auto;box-sizing:border-box;max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain;border:1px solid #949077;border-radius:3px;background:linear-gradient(#20271eef,#121a13f5);color:#e2dec2;box-shadow:inset 0 0 0 1px #333b2c,0 0 0 1px #050805,0 5px 22px #000c;font:12px/1.45 var(--font,'IBM Plex Mono',monospace);color-scheme:dark;scrollbar-width:thin;scrollbar-color:#666b51 #161e14}
:is(#gameHallDialog,#gameCommunityDialog,#gameAccountDialog,#gameActivityDialog)::backdrop{background:#0006;backdrop-filter:none}
:is(#gameHallDialog,#gameCommunityDialog,#gameAccountDialog,#gameActivityDialog) *{box-sizing:border-box;font-family:inherit}
:is(#gameHallDialog,#gameCommunityDialog,#gameAccountDialog,#gameActivityDialog) [hidden]{display:none!important}
:is(#gameHallDialog,#gameCommunityDialog)>header,#gameActivityDialog .activity-heading,#gameAccountDialog .account-heading{position:relative;display:flex;align-items:center;justify-content:center;gap:5px;min-height:35px;margin:-12px -12px 10px;padding:6px 36px 6px 12px;text-align:center;background:linear-gradient(#55594a,#32372c 50%,#242a20);border-bottom:1px solid #85836a;box-shadow:inset 0 1px #cecaaa33,0 1px #060b05;color:#ece2b8}
:is(#gameHallDialog,#gameCommunityDialog)>header:before,#gameActivityDialog .activity-heading:before,#gameAccountDialog .account-heading:before{content:'';position:absolute;inset:0;background:url('../ui/classic/flor.png') center/auto 100% repeat-x;opacity:.065;pointer-events:none}
:is(#gameHallDialog,#gameCommunityDialog,#gameAccountDialog,#gameActivityDialog) h2{font-family:inherit;font-size:15px;line-height:1.35;font-weight:600;margin:0;color:#eee2b4;letter-spacing:.2px;text-shadow:0 1px 2px #000;overflow-wrap:anywhere}
:is(#gameHallClose,#gameCommunityClose,#gameActivityClose),#gameAccountDialog .account-close{position:absolute;right:5px;top:5px;display:grid;place-items:center;flex:none;width:25px;height:25px;min-height:25px;margin:0;padding:0!important;border:1px solid #b4b19b;border-radius:50%;background:radial-gradient(circle at 38% 30%,#686b5e,#20281e);color:#eeead5;box-shadow:0 1px 3px #000;font:16px/1 var(--font);z-index:2;cursor:pointer}
:is(#gameHallDialog,#gameCommunityDialog,#gameAccountDialog,#gameActivityDialog) :is(button,select,input,textarea){font-family:inherit}
:is(#gameHallDialog,#gameCommunityDialog,#gameAccountDialog,#gameActivityDialog) button{cursor:pointer}
:is(#gameHallDialog,#gameCommunityDialog,#gameActivityDialog) button,#gameAccountDialog .btn{border-radius:2px;border:1px solid #8f9570;background:linear-gradient(#525d40,#29341f);color:#eee7c2;box-shadow:inset 0 1px #d7e3ab22,0 1px 2px #0008;text-shadow:0 1px #000}
:is(#gameHallDialog,#gameCommunityDialog,#gameActivityDialog) button:disabled,#gameAccountDialog button:disabled{opacity:.45;cursor:default}
:is(#gameHallDialog,#gameCommunityDialog,#gameAccountDialog,#gameActivityDialog) :focus-visible{outline:2px solid #dcc470;outline-offset:2px}
#gameHallDialog>button,#gameHallDialog .hall-pagination button,#gameHallSearch button{padding:5px 9px;min-height:30px;font-size:11px}
#gameHallDialog :is(select,input){border:1px solid #686f53;border-radius:2px;color:#e2dfc2;font:inherit;font-size:12px;background:#060e09}
#gameAccountDialog{width:min(400px,calc(100vw - 20px));padding:12px;--account-gold:#e7d28c;--account-muted:#a5ad97}
#gameAccountDialog .account-heading{display:block;padding-right:34px;margin-bottom:10px}
#gameAccountDialog .account-mark,#gameAccountDialog .account-eyebrow,#gameAccountDialog .account-character-art{display:none}
#gameAccountDialog #gameAccountSubtitle{font-size:10px;margin:3px 0 0;color:#b0b89e;line-height:1.4}
#gameAccountDialog .btn{min-height:34px;font-size:12px;font-weight:500;padding:6px 9px;border-radius:2px}
#gameAccountDialog .account-primary{background:linear-gradient(#756439,#3a3116);border-color:#b3a46a;color:#ffdf8c}
#gameAccountDialog .account-telegram{background:linear-gradient(#3a5558,#1b3336);border-color:#789794;color:#d3e2d7;box-shadow:inset 0 1px #ffffff18}
#gameAccountDialog #gameTelegramStart::before{font-size:15px;margin-right:6px}
#gameAccountDialog .account-divider{margin:10px 0 7px;gap:8px;font-size:10px}
#gameAccountDialog .account-methods{gap:5px}#gameAccountDialog .account-field{margin:7px 0 3px;font-size:11px;font-weight:400;color:#cdcdb2}
#gameAccountDialog input:not([type=checkbox]){height:34px;padding:0 8px;border:1px solid #7d8067;border-radius:1px;background:#030906;color:#e4e4cb;font-size:13px;box-shadow:inset 0 0 0 1px #000}
#gameAccountDialog .account-password{gap:5px}#gameAccountDialog #gameAccountPasswordToggle{border-radius:1px;font-size:11px}
#gameAccountDialog p{margin-bottom:8px}#gameAccountDialog .account-hint,#gameAccountDialog .telegram-intro{font-size:10px;line-height:1.4;margin-top:5px}
#gameAccountDialog .account-text-button{font-size:11px;min-height:30px;margin:4px 0;padding:4px 0;color:#c9c3a2}
#gameAccountDialog .account-notice{font-size:11px;margin:4px 0 8px}
#gameAccountDialog .account-character-summary{font-size:13px;padding:9px;background:#0b130c;border:1px solid #525c43;border-radius:0;color:#e2d8a4}
#gameAccountDialog .account-details{margin-top:9px;padding-top:7px;border-color:#4d573e}#gameAccountDialog summary{font-size:11px;min-height:28px}
#gameAccountDialog .account-footer{margin-top:10px;padding-top:6px;border-color:#48543b;font-size:9px;gap:5px}#gameAccountDialog .account-footer span{font-size:9px}
#gameAccountDialog .account-check{font-size:11px;gap:6px;margin:6px 0}#gameAccountDialog .account-check small{font-size:10px}
#gameAccountDialog :is(.telegram-challenge,.telegram-verified,.account-local-slot){border-radius:2px;padding:9px;background:#101d13;border-color:#556746}
#gameAccountDialog .account-community{font-size:10px;margin:6px 0}#gameAccountDialog .account-community a{color:#aeb99a}
#gameAccountButton{border-radius:2px;background:linear-gradient(#3c4731,#1c281a);border-color:#8a8964;font-family:var(--font);box-shadow:inset 0 1px #d7dca722;color:#e2d194}
#gameActivityDialog{width:min(560px,calc(100vw - 20px));padding:12px}
#gameActivityDialog .activity-intro{font-size:11px;color:#a7b19b;margin:7px 0 9px}
#gameActivityChoices{display:flex;flex-direction:column;gap:4px}
#gameActivityChoices button{display:grid;grid-template-columns:108px 1fr;gap:8px;align-items:center;min-height:44px;text-align:left;padding:7px 9px;background:linear-gradient(90deg,#222f1e,#101c12);border:1px solid #515c41;border-radius:1px;font:inherit}
#gameActivityChoices strong{font-size:12px;margin:0;color:#e5d391}#gameActivityChoices span{font-size:11px;color:#a8b59b}
#gameActivityChoices button:last-child{min-height:44px}#gameActivityChoices button[aria-pressed=true]{padding:7px 9px;border:1px solid #c1ae65;background:linear-gradient(90deg,#484129,#20271a);box-shadow:inset 3px 0 #c1ae65}
#gameActivityDialog .activity-current{padding:8px;margin-top:9px;border:1px solid #45523a;border-radius:0;background:#0a140c;font-size:12px}#gameActivityDialog .activity-current p{margin:4px 0;color:#b9c5aa}
#gameActivityRuns{font-size:10px}#gameActivityFeedback{font-size:11px;min-height:16px;margin:6px 0}#gameActivityDialog .activity-actions{gap:5px}#gameActivityDialog .activity-actions button{min-height:34px;padding:6px 9px;font:inherit;font-size:12px;border-radius:2px;background:linear-gradient(#756439,#3a3116);color:#ffe6a0}
.game-activity-card{display:flex;flex-direction:row;align-items:center;gap:8px;padding:7px 8px;margin:0 0 6px;border:1px solid #636646;border-radius:1px;background:linear-gradient(#243320,#142213);font-family:var(--font)}
.game-activity-card small{font-size:9px;letter-spacing:0;color:#a3ae8f}.game-activity-card strong{font-size:14px;margin:2px 0;color:#e0cf90}.game-activity-card p{font-size:10px;line-height:1.4;color:#a1b18f}.game-activity-card .btn{min-height:32px;padding:5px 7px;font-size:11px;border-radius:2px;white-space:normal;width:auto}
@media(max-width:480px){:is(#gameHallDialog,#gameCommunityDialog,#gameAccountDialog,#gameActivityDialog){max-height:calc(100dvh - 20px);padding:10px;font-size:12px}
 :is(#gameHallDialog,#gameCommunityDialog)>header,#gameActivityDialog .activity-heading,#gameAccountDialog .account-heading{margin:-10px -10px 9px;min-height:42px;padding:9px 42px 9px 10px}
 :is(#gameHallClose,#gameCommunityClose,#gameActivityClose),#gameAccountDialog .account-close{width:32px;height:32px;min-height:32px;top:4px;right:4px}
 #gameAccountDialog .btn,#gameAccountDialog input:not([type=checkbox]),#gameActivityDialog .activity-actions button{min-height:40px;height:auto}
 #gameAccountDialog input:not([type=checkbox]){height:40px}#gameAccountDialog .account-text-button{min-height:36px}
 #gameActivityChoices button,#gameActivityChoices button:last-child{min-height:56px;grid-template-columns:85px 1fr}#gameActivityChoices strong{font-size:11px}#gameActivityChoices span{font-size:10px}
 .game-activity-card{gap:6px}.game-activity-card .btn{max-width:110px;min-height:38px}.game-activity-card strong{font-size:13px}
}
#gameAccountDialog .account-details{border-radius:1px;padding:0 8px;background:#0d170d}#gameAccountDialog .account-details summary{padding:7px 0}#gameAccountDialog #gameAccountSubmit{margin-top:10px}#gameAccountDialog[data-view=owned] .account-heading{margin-bottom:10px}#gameAccountDialog[data-view=owned] #gameTelegram{margin-bottom:9px}
#gameAccountDialog .account-password input{padding-right:62px}#gameAccountDialog #gameAccountLocalSlots .account-primary{color:#ffdf8c}
