/* Golden Game Hall v0.59 — visual system from the original R5P29 art, on the Social Edition server runtime */
#gameModal{background:rgba(4,3,14,.84);backdrop-filter:blur(7px);z-index:9999}
/* Detached media stay interactive while the Arcade overlay is open. */
body:has(#gameModal:not([hidden])) #app :is(.desk-window.noe-studio-free.stream-card,.twitch-feed-panel.twitch-popout){z-index:calc(10000 + var(--desk-z,150))!important}
#gameModal .noe59-dialog{box-sizing:border-box;display:flex;flex-direction:column;width:min(96vw,1240px)!important;max-width:1240px!important;max-height:min(94dvh,940px)!important;height:min(92dvh,870px)!important;overflow:hidden!important;padding:21px 22px 18px!important;position:relative;border:1px solid #85649c;border-radius:19px;background:radial-gradient(ellipse at 70% 0%,#332044 0%,transparent 49%),linear-gradient(130deg,#141023,#100f20 62%,#141323);box-shadow:0 30px 90px #000c,0 0 0 1px #c9996233,inset 0 1px #eecf8f4d;color:#f9ecff}
.noe59-dialog>.close{top:18px;right:18px;z-index:10;background:#312444;border:1px solid #9f83a4;border-radius:9px;width:34px;height:34px}
.noe59-dialog .noe59-eyebrow{color:#ffd18b;font-weight:800;letter-spacing:.13em;font-size:10px;margin:0 0 6px}
.noe59-dialog>#gameHubTitle{font-size:clamp(21px,2vw,31px)!important;line-height:1.1;margin:0 38px 16px 0;color:#fff1d4;text-shadow:0 0 16px #ca73e850}
.noe59-shell{display:grid;grid-template-columns:minmax(305px,37%) minmax(0,1fr);gap:18px;min-height:0;flex:1}
.noe59-library,.noe59-stage{border:1px solid #59496c;background:linear-gradient(160deg,#141324,#101321 80%);border-radius:12px;min-height:0;overflow:auto;scrollbar-color:#705189 #1b1627;scrollbar-width:thin}
.noe59-library{display:flex;flex-direction:column;padding:0 12px 12px;box-shadow:inset 0 0 20px #44265720}
.noe59-library-banner{flex-shrink:0;display:flex;align-items:center;gap:8px;min-height:43px;border-bottom:1px solid #5b4366;margin:0 0 9px;color:#f3c57a;font-size:11px;letter-spacing:.13em;font-weight:850}
.noe59-library-banner .noe59-spark{font-size:19px;color:#e9aafc}
.noe59-dialog .gamehub56-catalog{display:flex;flex-direction:column;min-height:0;flex:1;margin:0;padding:0;border:0;background:transparent}
.noe59-dialog .gamehub56-heading strong{font-size:14px;color:#f5e0ff}.noe59-dialog .gamehub56-heading small{font-size:10px;white-space:nowrap}
.noe59-dialog .gamehub56-tools{display:grid;grid-template-columns:minmax(0,1fr) 110px;gap:7px;margin:0 0 13px}
.noe59-dialog .gamehub56-tools #gameHubSearch{grid-column:1/-1}
.noe59-dialog .gamehub56-tools :is(input,select,button){font-size:12px;min-height:36px;max-width:100%;color:#f1e7fa;background:#201a30;border:1px solid #604d7c;border-radius:8px}
.noe59-dialog .gamehub56-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:none;overflow:visible;padding:2px 2px 14px}
.noe59-dialog .gamehub56-tile{display:flex;flex-direction:column;align-items:stretch!important;gap:0;overflow:hidden;min-width:0;min-height:168px;padding:0!important;border:1px solid #594467!important;border-radius:12px!important;background:linear-gradient(145deg,#2b203c,#191526)!important;color:#eee6f3!important;text-align:left;box-shadow:0 5px 10px #0005;transition:transform .18s,border-color .18s,box-shadow .18s}
.noe59-dialog .gamehub56-tile:not(:disabled):hover{transform:translateY(-2px);border-color:#f7bf86!important;box-shadow:0 8px 24px #0009,0 0 10px #b678ee33}
.noe59-dialog .gamehub56-tile.selected{background:#413052!important;border:1px solid #f9c37f!important;box-shadow:0 0 0 2px #f9c37f66,0 8px 20px #0008}
.noe59-dialog .gamehub56-tile .noe59-card-art{position:relative;display:block;width:100%;height:100px;overflow:hidden;background:#231e33}
.noe59-dialog .gamehub56-tile .noe59-card-art:after{content:"";position:absolute;inset:40% 0 0;background:linear-gradient(0deg,#100b20c9,transparent)}
.noe59-dialog .noe59-card-art img{width:100%;height:100%;object-fit:cover;image-rendering:auto}
.noe59-dialog .gamehub56-tile .noe59-card-text{display:flex;flex-direction:column;flex:1;gap:5px;padding:10px 9px}
.noe59-dialog .gamehub56-tile .gamehub56-name{font-size:13px;font-weight:800;line-height:1.22;color:#ffe2a8;overflow:visible}
.noe59-dialog .gamehub56-tile .noe59-card-sub{font-size:10px;line-height:1.35;color:#d9c9ed;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.noe59-dialog .gamehub56-tile .gamehub56-symbol{display:none}
.noe59-dialog .gamehub56-description{margin:0 0 8px;border-left:2px solid #b57add;padding:8px;background:#201830}.noe59-dialog .gamehub56-description strong{font-size:12px}
.noe59-dialog .gamehub56-help{font-size:10px;color:#aaa1b9;margin-top:auto}
.noe59-dialog .noe59-stage{display:flex;flex-direction:column;overflow:auto;background:linear-gradient(160deg,#191626,#13101e);position:relative}
.noe59-hero{position:relative;min-height:160px;height:172px;flex-shrink:0;border-radius:11px 11px 0 0;overflow:hidden;background:#271c30}
.noe59-hero-image{width:100%;height:100%;object-fit:cover;object-position:center 55%;filter:saturate(.93) contrast(1.06)}
.noe59-hero-shade{position:absolute;inset:0;padding:15px 21px;display:flex;flex-direction:column;justify-content:end;background:linear-gradient(0deg,#120e20 0%,#120e20e8 16%,#120e2069 70%,#1a103355 100%)}
.noe59-hero-line{display:flex;justify-content:space-between;align-items:center;gap:10px;color:#e0bef4;font-size:10px;font-weight:800;letter-spacing:.11em}
.noe59-hero-state{color:#abf3d9;border:1px solid #69c6a766;border-radius:20px;padding:4px 9px;background:#00291e88;letter-spacing:.04em;white-space:nowrap}
.noe59-game-name{margin:7px 0 2px;font-size:clamp(20px,2.6vw,29px);font-weight:900;color:#ffdb94;letter-spacing:.012em;text-shadow:0 2px 16px #000}
.noe59-game-tip{margin:0;color:#eae0f4;font-size:12px;line-height:1.5;max-width:90%}
.noe59-match-controls{padding:12px 14px 6px;border-bottom:1px solid #59446666}
.noe59-dialog .game-selectors{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:end;margin:0!important}
.noe59-dialog .game-selectors label{margin:0!important;font-size:11px;color:#e1cdbf}
.noe59-dialog .game-selectors select{width:100%;min-width:0;max-width:none!important;background:#21182e;border-color:#745d8b;color:#fff}
.noe59-dialog .arcade-tables{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:6px;align-items:end;margin:9px 0 0;padding:8px;background:#181423;border:1px solid #5b496d;border-radius:9px}
.noe59-dialog .arcade-tables label{min-width:0;font-size:11px}
.noe59-dialog .arcade-tables :is(button,select){min-width:0;min-height:32px;font-size:11px;white-space:normal}
.noe59-stage-meta{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;margin:10px 14px 0;color:#f6dfac}
.noe59-stage-meta #gameState{font-weight:750;font-size:13px;margin:0!important;color:#ffda9b}
.noe59-stage-meta #gameProgress{font-size:11px;color:#c8c0e4;background:#282038;padding:6px 10px;border-radius:16px}
.noe59-boardwrap{margin:10px 14px 8px;padding:16px;min-height:208px;border-radius:12px;border:1px solid #5b4667;background:radial-gradient(circle at 45% 25%,#382947 0,#21192f 65%,#151425 100%);box-shadow:inset 0 2px 20px #0007;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px}
.noe59-empty-message{display:none;color:#e6d4fa;text-align:center;max-width:330px;line-height:1.7;font-size:14px}
.noe59-stage:not(.is-playing) .noe59-empty-message{display:block}
.noe59-stage:not(.is-playing) #board{display:none!important}
.noe59-dialog #board{margin:0 auto!important;max-width:100%;align-self:center}
.noe59-dialog .ticboard.arcade-grid8{width:min(100%,465px)!important;max-width:465px!important;gap:2px!important;border:7px solid #3d2a3e;border-radius:7px;box-shadow:0 9px 0 #100d16,0 12px 28px #000b}
.noe59-dialog #board.arcade-grid8 .arcade-square{border:0;border-radius:0;font-size:clamp(18px,2.5vw,34px);min-width:0;min-height:0;padding:0!important;aspect-ratio:1;box-shadow:inset 0 0 0 1px #150b1933}
.noe59-stage[data-game="seeker-chess"] #board .arcade-square.light{background:#e1bb86;color:#26172b}
.noe59-stage[data-game="seeker-chess"] #board .arcade-square.dark{background:#794d6e;color:#ffe2a9}
.noe59-stage[data-game="seeker-chess"] #board .arcade-square:not(:disabled):hover{filter:brightness(1.2);box-shadow:inset 0 0 0 3px #fbd484}
.noe59-stage[data-game="anomaly-sweeper"] #board .arcade-square{font-size:clamp(13px,2vw,24px);font-weight:900;background:linear-gradient(140deg,#5b456d,#382d52);color:#d8d0e5;border:1px solid #847098;border-radius:5px;box-shadow:inset 0 2px #ffffff27,0 2px #140c1f}
.noe59-stage[data-game="anomaly-sweeper"] #board .arcade-square:disabled{background:#292238;box-shadow:inset 0 0 5px #000;opacity:1}
.noe59-stage[data-game="anomaly-sweeper"] #board .arcade-square:not(:disabled):hover{background:#8d6098;color:#fff}
.noe59-dialog #board.memory-grid{width:min(100%,410px);max-width:410px!important;grid-template-columns:repeat(4,1fr)!important;gap:8px}
.noe59-stage[data-game="emote-memory"] #board button{height:auto!important;aspect-ratio:1;font-size:30px;min-width:0;background:linear-gradient(145deg,#654073,#35254f);border:2px solid #aa88b5;border-radius:11px;box-shadow:inset 0 2px #ffffff22,0 4px 6px #0009;color:#fff}
.noe59-stage[data-game="emote-memory"] #board button:hover:not(:disabled){border-color:#ffda8f;background:#725080}
.noe59-dialog #board.arcade-grid5{width:min(100%,350px)!important;max-width:350px!important;gap:5px!important}
.noe59-stage[data-game="four-crystals"] #board button{aspect-ratio:1;background:linear-gradient(150deg,#51406e,#302c4a);border:1px solid #9982bb;border-radius:8px;box-shadow:inset 0 0 9px #0a0813}
.noe59-stage[data-game="four-crystals"] #board button.crystal{background:radial-gradient(circle,#7854aa,#35265a);color:#fff0ad}
.noe59-stage[data-game="goblin-cups"] #board.arcade-cups{justify-content:center;gap:14px}
.noe59-stage[data-game="goblin-cups"] #board .phase4-game-action{min-width:125px;min-height:138px;background:linear-gradient(155deg,#5d3450,#2d233d);border:2px solid #cc9a69;border-radius:17px;box-shadow:0 6px 16px #0008;font-size:17px}
.noe59-stage[data-game="tictactoe"] #board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:min(100%,310px);gap:7px}
.noe59-stage[data-game="tictactoe"] #board button{min-width:0;min-height:0;aspect-ratio:1;font-size:45px;background:linear-gradient(145deg,#61436e,#3d294d);border:1px solid #bb91c7;color:#ffe4a6;border-radius:10px}
.noe59-stage[data-game="streamer-quiz"] #board{width:100%;max-width:510px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.noe59-stage[data-game="streamer-quiz"] #board .phase4-quiz-question{color:#ffe3af;font-size:17px;background:#241b30;border-radius:8px;padding:14px}
.noe59-stage[data-game="streamer-quiz"] #board .phase4-quiz-answer{background:#3e2a52;border-radius:10px;min-height:60px;border:1px solid #886d99;color:#fff;padding:10px}
.noe59-stage[data-game="reaction-duel"] #board .phase4-reaction{min-height:120px;font-size:26px;background:radial-gradient(circle,#a2487f,#56275a);border:2px solid #ffc87a;border-radius:100px;padding:15px 36px;box-shadow:0 0 34px #a94c9678}
.noe59-stage[data-game="dice"] #board button{font-size:22px;min-height:80px;border-radius:15px;background:#4c2f65;border:2px solid #d0a16c}
.noe59-stage[data-game="runes"] #board button,.noe59-stage[data-game="rock-paper-scissors"] #board button{font-size:21px;min-height:90px;background:linear-gradient(140deg,#5c3a67,#38284a);border:1px solid #d3a3a2;border-radius:12px}
.noe59-dialog #board .arcade-heading{width:100%;color:#fbd89d;text-align:center;margin:5px auto 9px}
.noe59-dialog #board button:focus-visible{outline:3px solid #ffdb86!important;outline-offset:1px}
.noe59-game-footer{padding:0 15px 17px;display:flex;flex-direction:column;gap:8px}
.noe59-game-footer .twobuttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.noe59-game-footer .twobuttons button{min-width:0!important;min-height:40px;border-radius:8px;border:1px solid #765d8e;background:#352744;color:#f5eafd}
.noe59-game-footer .twobuttons button.primary{background:linear-gradient(110deg,#9853bd,#623ca5);border-color:#cc92e8;font-weight:800}
.noe59-game-footer .twobuttons button:disabled{opacity:.45}
.noe59-game-footer #gameHistory{max-height:85px;overflow:auto;font-size:11px;color:#cdbada}
.noe59-dialog #gameHubPrivacy{font-size:11px;color:#a4e2cb;padding:4px 0;margin:0}
.noe59-dialog .noe59-game-footer small{font-size:10px;line-height:1.45;color:#b8abc6}
@media(max-width:980px){#gameModal .noe59-dialog{width:98vw!important;padding:12px!important}.noe59-shell{grid-template-columns:minmax(238px,36%) minmax(0,1fr);gap:10px}.noe59-dialog .gamehub56-tile{min-height:144px}.noe59-dialog .gamehub56-tile .noe59-card-art{height:82px}.noe59-dialog .gamehub56-grid{gap:6px}.noe59-hero{min-height:125px;height:130px}}
@media(max-width:700px){#gameModal .noe59-dialog{height:min(95dvh,960px)!important;max-height:95dvh!important}.noe59-shell{display:flex;flex-direction:column;gap:8px;overflow:auto}.noe59-library{flex:0 0 auto;min-height:195px;max-height:240px}.noe59-dialog .gamehub56-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.noe59-dialog .gamehub56-tile{min-height:120px}.noe59-dialog .gamehub56-tile .noe59-card-art{height:64px}.noe59-stage{min-height:450px;overflow:visible}.noe59-dialog .game-selectors{grid-template-columns:1fr 1fr}.noe59-dialog .arcade-tables{grid-template-columns:1fr auto auto}.noe59-dialog .gamehub56-help,.noe59-dialog .gamehub56-description{display:none}}
@media(max-width:430px){.noe59-dialog .gamehub56-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.noe59-dialog .arcade-tables{grid-template-columns:1fr 1fr}.noe59-dialog .arcade-tables label{grid-column:span 2}.noe59-hero{height:120px}.noe59-dialog .noe59-boardwrap{margin:8px;padding:8px}}
@media(prefers-reduced-motion:reduce){#gameModal .noe59-dialog *{animation:none!important;transition:none!important}}
/* Never center a taller board inside a shrinkable flex item: it would float over controls. */
.noe59-dialog .noe59-boardwrap{flex:0 0 auto;justify-content:flex-start;min-height:0;height:auto;overflow:visible}
.noe59-dialog .noe59-boardwrap #board.arcade-grid8{width:min(100%,370px)!important;max-width:370px!important;flex:0 0 auto}
.noe59-dialog .noe59-stage{overflow-x:hidden;overflow-y:auto;flex-shrink:1}
/* Show the entire active board with minimal scrolling on desktop. */
.noe59-stage.is-playing .noe59-hero{height:111px;min-height:111px}
.noe59-stage.is-playing .noe59-hero-shade{padding:8px 14px}
.noe59-stage.is-playing .noe59-game-tip{display:none}
.noe59-stage.is-playing .noe59-game-name{font-size:21px;margin:2px 0}
.noe59-stage.is-playing .noe59-match-controls{padding:7px 11px 4px}
.noe59-stage.is-playing .arcade-tables{margin-top:5px;padding:5px}
.noe59-stage.is-playing .noe59-stage-meta{margin-top:4px}
.noe59-stage.is-playing .noe59-boardwrap{margin-top:6px;padding:10px}
.noe59-stage .noe59-jump{flex:0 0 auto;align-self:flex-end;margin:6px 12px -3px;padding:4px 10px;min-height:26px;border-radius:6px;font-size:11px;color:#f9d89b;background:#2b2138;border:1px solid #856481}
.noe59-stage .noe59-jump[hidden]{display:none}

/* RUN49: visible, accessible mobile game actions — no gameplay/asset changes. */
@media (max-width:700px){
 .noe59-dialog .gamehub56-help,.noe59-dialog .gamehub56-description{display:block!important}
 .noe59-dialog .gamehub56-help{font-size:12px;line-height:1.5;color:#e6d9ee}
 .noe59-dialog .gamehub56-description p{font-size:12px;line-height:1.5}
 .noe59-dialog .gamehub56-tile .gamehub56-name{font-size:13px;overflow-wrap:anywhere}
 .noe59-dialog .noe59-library{max-height:270px}
 .noe59-dialog .noe59-game-footer .twobuttons button{min-height:44px;white-space:normal;overflow-wrap:anywhere;font-size:13px}
}
@media (max-width:430px){
 .noe59-dialog .game-selectors{grid-template-columns:minmax(0,1fr)}
 .noe59-dialog .noe59-game-footer .twobuttons{grid-template-columns:repeat(2,minmax(0,1fr))}
 .noe59-dialog .gamehub56-grid{gap:8px}
 .noe59-dialog .gamehub56-tile .noe59-card-sub{font-size:11px}
 .noe59-dialog .noe59-hero{min-height:125px;height:125px}
}
.noe59-dialog :is(button,select,input):focus-visible{outline:3px solid #ffe597!important;outline-offset:2px!important}

/* Games Hub: keep actual stage actions reachable at narrow and short sizes. */
#gameModal .noe59-stage,
#gameModal .noe59-library { scroll-padding-block: 16px; }
#gameModal :is(button, input, select):focus-visible { scroll-margin-block: 12px; }
#gameModal :is(.gamehub56-name, #gameState, #arcadeSoloHint, .gamehub56-privacy) {
 overflow-wrap: anywhere;
}
@media (max-width: 620px) {
 #gameModal .noe59-dialog .gamehub56-tools :is(button, input, select),
 #gameModal .noe59-stage :is(.twobuttons button, #gameInvite, #arcadeTableSelect) {
  box-sizing: border-box;
  min-block-size: 44px;
  max-inline-size: 100%;
 }
 #gameModal .noe59-stage .twobuttons button {
  min-inline-size: 0;
  white-space: normal;
  overflow-wrap: anywhere;
 }
}
@media (max-width: 360px) {
 #gameModal .noe59-dialog .gamehub56-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-height: 440px) and (orientation: landscape) {
 #gameModal .noe59-dialog {
  height: calc(100dvh - 16px) !important;
  max-height: calc(100dvh - 16px) !important;
 }
}
@media (forced-colors: active) {
 #gameModal :is(button, input, select, a):focus-visible {
  outline-color: Highlight !important;
  box-shadow: none;
 }
}
