/* XD_HORF_RULES_V241 */
.v241-server-notice{max-width:760px;margin:0 auto 18px;padding:12px 16px;border:1px solid rgba(248,113,113,.35);border-radius:14px;background:rgba(127,29,29,.18);color:#fecaca;text-align:center;font-weight:800}
.v241-server-row{width:100%;font:inherit;color:inherit;text-align:inherit;border:0;cursor:pointer}
.v241-player-card .host-mark{opacity:.72}
.v241-avatar-wrap{position:relative;display:inline-grid;place-items:center;flex:0 0 auto}
.v241-avatar-wrap>img{display:block}
.v241-wrong{position:absolute;left:-5px;bottom:-5px;min-width:20px;height:20px;padding:0 5px;border-radius:999px;display:grid;place-items:center;background:#ef4444;color:#fff;border:2px solid #111827;font-size:.68rem;font-style:normal;font-weight:900;line-height:1}
.v241-mini-player{position:relative;gap:8px!important}
.v241-mini-player.is-picker{outline:2px solid rgba(250,204,21,.7);outline-offset:2px;border-radius:999px;background:rgba(250,204,21,.08)}
.v241-mini-player.is-picker::after{content:'★';font-size:.72rem;color:#fde047;margin-inline-start:2px}
.v241-round-score .score span{display:block;font-size:.7rem;opacity:.65;margin-top:-4px}
.v241-picker{display:flex;align-items:center;justify-content:center;gap:12px;max-width:660px;margin:12px auto 16px;padding:12px 16px;border:1px solid rgba(250,204,21,.3);background:linear-gradient(135deg,rgba(250,204,21,.1),rgba(255,255,255,.025));border-radius:18px;box-shadow:0 14px 36px rgba(0,0,0,.16)}
.v241-picker>img{width:50px;height:50px;border-radius:50%;object-fit:cover;border:2px solid rgba(250,204,21,.65)}
.v241-picker>div{display:flex;flex-direction:column;min-width:0}
.v241-picker small{font-size:.72rem;color:#fde68a;font-weight:800}
.v241-picker strong{font-size:1rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.v241-picker span{font-size:.76rem;opacity:.72}
.v241-question{position:relative!important;transform:none!important;inset:auto!important;max-width:920px!important;margin:14px auto!important}
.v241-answer-meta{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:10px}
.v241-answer-meta span{padding:7px 10px;border-radius:999px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);font-size:.75rem;font-weight:800}
.v241-hex .hex-face{position:relative!important;display:grid!important;place-items:center!important;overflow:visible!important}
.v241-letter{font-size:var(--hex-font)!important;line-height:1!important;font-weight:900!important;text-shadow:0 2px 9px rgba(0,0,0,.24);transform:translateY(-1px)}
.v241-cell-avatar{position:absolute;width:27%;aspect-ratio:1;border-radius:50%;object-fit:cover;left:8%;bottom:10%;border:2px solid rgba(255,255,255,.88);box-shadow:0 2px 9px rgba(0,0,0,.45);background:#111827;z-index:5}
.v241-pickable .hex-face::after{content:'اختيارك';position:absolute;top:-16px;left:50%;translate:-50% 0;padding:2px 6px;border-radius:999px;background:#fde047;color:#422006;font-size:.5rem;font-weight:900;white-space:nowrap;opacity:0;transition:.16s ease}
.v241-pickable:hover .hex-face::after{opacity:1;top:-20px}
.v241-series{display:flex;align-items:center;justify-content:center;gap:18px;margin-top:18px;font-family:'JetBrains Mono',monospace}
.v241-series span{min-width:54px;padding:8px 14px;border-radius:14px;background:rgba(255,255,255,.07);font-size:1.7rem;font-weight:900}
.v241-round-screen{min-height:62vh;display:grid;place-items:center}
.v241-round-screen.hidden{display:none!important}
.v241-round-screen .winner{width:min(620px,100%);padding:36px 24px}

/* Player mode intentionally has no visible host controls. */
body:not(.v241-chat-mode) #hostQuestionActions{display:none!important}

@media (max-width:900px){
  .page{width:100%!important;max-width:100%!important;padding-inline:14px!important}
  .players-game-meta{gap:8px!important}
  .players-game-meta>div{min-width:0!important}
  .mini-team{gap:6px!important}
  .v241-mini-player{max-width:150px!important}
  .board-area{width:100%!important;max-width:100%!important;overflow:hidden!important;padding-inline:0!important}
}
@media (max-width:720px){
  html,body{max-width:100%;overflow-x:hidden}
  .topbar{padding:10px 12px!important;gap:8px!important;align-items:flex-start!important}
  .brand span small{display:none}
  .top-actions{gap:6px!important;flex-wrap:wrap!important;justify-content:flex-end!important}
  .top-actions .ghost-btn,.top-actions .link-btn{min-height:36px!important;padding:7px 9px!important;font-size:.72rem!important}
  .account-pill{max-width:145px!important;padding:5px 8px!important}
  .account-pill img{width:30px!important;height:30px!important}
  .account-pill span small{display:none!important}
  .page{padding:10px!important}
  .hero{padding:26px 10px 18px!important}
  .hero h1{font-size:clamp(2rem,11vw,3.1rem)!important}
  .entry-grid{grid-template-columns:1fr!important;gap:10px!important}
  .room-head{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:10px!important}
  .room-code-wrap{justify-content:center!important}
  .room-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important}
  .room-actions>*{width:100%!important;min-width:0!important}
  .teams-flat{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  .team-divider{display:none!important}
  .team-column{min-height:auto!important;padding:12px!important}
  .player-list{max-height:220px!important}
  .lobby-meta{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important}
  .lobby-meta span{justify-content:center!important;text-align:center!important;font-size:.72rem!important}
  .lobby-bottom{display:flex!important;flex-direction:column!important;gap:10px!important}
  .lobby-bottom .big{width:100%!important}
  .scorebar{position:sticky!important;top:0!important;z-index:20!important;grid-template-columns:1fr auto 1fr!important;gap:6px!important;padding:8px!important;border-radius:14px!important}
  .scorebar .score{padding:7px 5px!important;min-width:0!important}
  .scorebar .score small{font-size:.65rem!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:100px!important}
  .scorebar .score b{font-size:1.35rem!important}
  .round-center{min-width:72px!important;padding-inline:4px!important}
  .round-center small{font-size:.58rem!important}
  .round-center strong{font-size:1.35rem!important}
  .v241-picker{margin:8px 0 10px;padding:9px 11px;border-radius:14px;justify-content:flex-start}
  .v241-picker>img{width:42px;height:42px}
  .v241-picker strong{font-size:.9rem}
  .v241-picker span{font-size:.68rem}
  .v241-question{width:100%!important;margin:8px 0 10px!important;padding:14px 10px!important;border-radius:16px!important;display:grid!important;grid-template-columns:54px 1fr!important;gap:8px!important}
  .v241-question .question-letter{width:54px!important;height:54px!important;font-size:1.8rem!important}
  .v241-question .question-copy{min-width:0!important}
  .v241-question .question-copy h2{font-size:1rem!important;line-height:1.65!important;margin:2px 0!important;overflow-wrap:anywhere!important}
  .v241-question .answer-form,.v241-question .v241-answer-meta,.v241-question .stream-answer-hint,.v241-question .host-controls{grid-column:1/-1!important;width:100%!important}
  .answer-form{display:grid!important;grid-template-columns:1fr auto!important;gap:6px!important}
  .answer-form input{min-width:0!important;width:100%!important;font-size:16px!important}
  .answer-form button{padding-inline:13px!important}
  .v241-answer-meta{justify-content:flex-start!important;gap:5px!important}
  .v241-answer-meta span{font-size:.66rem!important;padding:5px 7px!important}
  .players-game-meta{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;margin:8px 0!important}
  .players-game-meta>div{padding:7px!important;border-radius:12px!important;overflow:hidden!important}
  .players-game-meta>div>small{font-size:.61rem!important;display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .mini-team{display:flex!important;overflow-x:auto!important;flex-wrap:nowrap!important;padding:5px 1px!important;scrollbar-width:none}
  .mini-team::-webkit-scrollbar{display:none}
  .v241-mini-player{flex:0 0 auto!important;padding:4px 6px!important;max-width:116px!important}
  .v241-mini-player img{width:29px!important;height:29px!important}
  .v241-mini-player b{font-size:.62rem!important;max-width:62px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  .v241-wrong{min-width:17px;height:17px;font-size:.58rem;left:-4px;bottom:-4px;border-width:1.5px}
  .board-area{margin:4px 0 0!important;min-height:0!important}
  .hex-board{margin-inline:auto!important}
  .v241-cell-avatar{border-width:1.5px}
  .game-hint{font-size:.72rem!important;margin:8px 0!important;padding:7px 9px!important}
  .game-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important}
  .game-actions>*{width:100%!important}
  .stream-scorebar{padding:9px!important}
  .stream-leader img{width:45px!important;height:45px!important}
  .settings-grid{grid-template-columns:1fr!important}
  .modal{padding:10px!important;align-items:flex-end!important}
  .modal-card{width:100%!important;max-height:88vh!important;overflow:auto!important;border-radius:20px 20px 12px 12px!important;padding:16px!important}
  .v241-round-screen{min-height:58vh!important;padding:14px!important}
  .v241-round-screen .winner{padding:28px 14px!important}
}
@media (max-width:430px){
  .page{padding:7px!important}
  .lobby-meta{grid-template-columns:1fr!important}
  .scorebar .score small{max-width:78px!important}
  .v241-question{grid-template-columns:46px 1fr!important;padding:11px 8px!important}
  .v241-question .question-letter{width:46px!important;height:46px!important;font-size:1.55rem!important}
  .v241-question .question-copy h2{font-size:.92rem!important}
  .players-game-meta{grid-template-columns:1fr!important}
  .players-game-meta>div{padding:5px 7px!important}
  .mini-team{padding-block:3px!important}
  .answer-form{grid-template-columns:1fr!important}
  .answer-form button{width:100%!important}
}
/* /XD_HORF_RULES_V241 */

/* XD_HORF_CODENAMES_SHELL_V243 */
#homeScreen .hero h1 b{color:#f59e0b!important}
#homeScreen .home-grid{max-width:850px!important}
#homeScreen .home-card{min-height:0!important}
#lobbyScreen.cn-room-lobby .players-shell{max-width:940px!important;margin-inline:auto!important}
#lobbyScreen.cn-room-lobby #serverPlayersGrid:empty:after{content:'بانتظار اللاعبين';display:block;grid-column:1/-1;color:#666;font-size:.52rem;text-align:center;padding:24px}
#positionScreen{min-height:calc(100vh - 120px)!important;padding-top:4px!important}
#positionScreen .team-panel .role-actions{grid-template-columns:1fr!important}
#positionScreen .team-panel .role-btn{width:100%!important}
#positionScreen .player-card .v241-wrong{display:grid!important}
#settingsModal .setting input:not([type=checkbox]),#settingsModal .setting select{width:100%;background:#111;color:#fff;border:1px solid rgba(255,255,255,.08);border-radius:10px;padding:10px;outline:none}
#settingsModal .setting input:not([type=checkbox]):focus,#settingsModal .setting select:focus{border-color:rgba(245,158,11,.35)}
#settingsModal .chat-settings{display:grid;gap:0}
#settingsModal .chat-settings.hidden{display:none!important}
#gameScreen .hex-board,#finishedScreen .hex-board{direction:ltr!important}
@media(max-width:800px){
 #lobbyScreen.cn-room-lobby .room-head{align-items:flex-start!important}
 #lobbyScreen.cn-room-lobby .room-actions{justify-content:flex-end!important}
 #positionScreen .cn-choose-actions{width:100%!important}
 #positionScreen #beginMatch,#positionScreen #leaveChoose{min-width:0!important;flex:1 1 160px!important}
}
/* /XD_HORF_CODENAMES_SHELL_V243 */

/* XD_HORF_CODENAMES_MOBILE_V244 */
#lobbyScreen.cn-room-lobby .room-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:7px!important;flex-wrap:wrap!important;grid-template-columns:none!important}
#lobbyScreen.cn-room-lobby .room-actions>*{width:auto!important;min-width:0!important}
@media(max-width:680px){
 #lobbyScreen.cn-room-lobby .room-head{display:flex!important;flex-direction:row!important;align-items:flex-start!important;justify-content:space-between!important;gap:12px!important;padding:10px 0!important}
 #lobbyScreen.cn-room-lobby .room-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:7px!important;flex-wrap:wrap!important;width:auto!important}
 #lobbyScreen.cn-room-lobby .room-actions>*{width:auto!important}
 #positionScreen .cn-choose-actions{display:grid!important;grid-template-columns:1fr!important;width:100%!important;gap:8px!important}
 #positionScreen #beginMatch,#positionScreen #leaveChoose{width:100%!important;min-width:0!important;max-width:none!important;flex:none!important}
}
/* /XD_HORF_CODENAMES_MOBILE_V244 */

/* XD_HORF_CODENAMES_ROOM_PARITY_V246 */
body{background-image:none!important;background-color:#0f0f0f!important}
body:before{content:'';position:fixed;inset:0;pointer-events:none;background:radial-gradient(circle at 50% -15%,rgba(245,158,11,.12),transparent 34%),radial-gradient(circle at 110% 80%,rgba(234,88,12,.055),transparent 32%)!important}
#lobbyScreen.cn-room-lobby{width:100%!important;max-width:1160px!important;margin-inline:auto!important}
#lobbyScreen.cn-room-lobby .room-head{display:flex!important;flex-direction:row!important;justify-content:space-between!important;align-items:center!important;padding:10px 0!important;gap:12px!important}
#lobbyScreen.cn-room-lobby .room-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:7px!important;flex-wrap:wrap!important}
#lobbyScreen.cn-room-lobby .room-actions>*{width:auto!important;min-width:0!important}
#lobbyScreen.cn-room-lobby .lobby-title{text-align:center!important;margin:25px 0 18px!important}
#lobbyScreen.cn-room-lobby .players-shell{position:relative!important;width:min(940px,100%)!important;max-width:940px!important;min-height:108px!important;margin:auto!important;padding:14px 16px 15px!important;border-radius:19px!important;background:rgba(21,21,21,.85)!important;border:0!important;box-shadow:none!important}
#lobbyScreen.cn-room-lobby .players-head{position:relative!important;display:flex!important;align-items:center!important;justify-content:space-between!important;min-height:24px!important;margin:0 0 10px!important;padding:0 4px 0 72px!important}
#lobbyScreen.cn-room-lobby #serverPlayerCount{position:absolute!important;left:0!important;right:auto!important;top:50%!important;transform:translateY(-50%)!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:58px!important;height:24px!important;padding:0 8px!important;border-radius:999px!important;background:#0d0d0d!important;border:1px solid rgba(255,255,255,.07)!important;color:#8b8b92!important;font:800 .52rem JetBrains Mono,monospace!important;direction:ltr!important;white-space:nowrap!important}
#lobbyScreen.cn-room-lobby #serverPlayersGrid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(58px,74px))!important;justify-content:start!important;direction:rtl!important;gap:8px 5px!important;min-height:58px!important}
#lobbyScreen.cn-room-lobby #serverPlayersGrid .cn-server-player{position:relative!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;gap:3px!important;min-width:0!important;padding:1px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;text-align:center!important}
#lobbyScreen.cn-room-lobby #serverPlayersGrid .cn-server-player img{width:43px!important;height:43px!important;flex:0 0 43px!important;border-radius:50%!important;object-fit:cover!important;border:0!important;box-shadow:none!important;background:#111!important}
#lobbyScreen.cn-room-lobby #serverPlayersGrid .cn-server-player>span{display:block!important;width:100%!important;min-width:0!important}
#lobbyScreen.cn-room-lobby #serverPlayersGrid .cn-server-player b{display:block!important;width:100%!important;color:#ececf0!important;font-size:.43rem!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#lobbyScreen.cn-room-lobby #serverPlayersGrid .cn-server-player small,#lobbyScreen.cn-room-lobby #serverPlayersGrid .cn-server-player>em{display:none!important}
#lobbyScreen.cn-room-lobby .lobby-bottom{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;width:100%!important;text-align:center!important;margin-top:14px!important}
#lobbyScreen.cn-room-lobby #lobbyHint{width:100%!important;text-align:center!important}
#lobbyScreen.cn-room-lobby #startGame{align-self:center!important;margin:0 auto!important;min-width:210px!important;text-align:center!important;justify-content:center!important}
#lobbyScreen.cn-room-lobby #xdServerState{margin-top:5px!important;display:inline-flex!important}
#positionScreen{width:100%!important;max-width:1040px!important;margin-inline:auto!important}
#positionScreen .teams-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;max-width:900px!important;margin-inline:auto!important;align-items:start!important}
#positionScreen .team-panel{min-width:0!important;min-height:0!important;padding:8px 6px 9px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
#positionScreen .player-list{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(58px,76px))!important;justify-content:center!important;align-items:start!important;gap:8px 6px!important;min-height:52px!important;padding:3px 0 6px!important}
#positionScreen .player-card{position:relative!important;display:flex!important;flex-direction:column!important;align-items:center!important;gap:4px!important;min-width:0!important;padding:2px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;text-align:center!important}
#positionScreen .player-card img{width:46px!important;height:46px!important;flex:0 0 46px!important;border-radius:50%!important;object-fit:cover!important;border:0!important;box-shadow:none!important;background:#111!important}
#positionScreen .player-card>div{display:block!important;width:100%!important;min-width:0!important}
#positionScreen .player-card b{display:block!important;width:100%!important;color:#ececf0!important;font-size:.46rem!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#positionScreen .player-card small,#positionScreen .player-card .host-mark{display:none!important}
#positionScreen .role-actions{display:grid!important;grid-template-columns:1fr!important;gap:6px!important;width:min(360px,100%)!important;margin:6px auto 0!important}
#positionScreen .role-btn{width:100%!important;min-height:34px!important;padding:7px 8px!important;border:0!important;border-radius:10px!important;background:rgba(255,255,255,.055)!important;box-shadow:none!important;font-size:.49rem!important}
@media(max-width:680px){
 #lobbyScreen.cn-room-lobby{max-width:100%!important}
 #lobbyScreen.cn-room-lobby .room-head{align-items:flex-start!important}
 #lobbyScreen.cn-room-lobby .players-shell{padding:12px 10px 13px!important;border-radius:16px!important}
 #lobbyScreen.cn-room-lobby #serverPlayersGrid{grid-template-columns:repeat(4,minmax(48px,1fr))!important;justify-content:stretch!important;gap:7px 3px!important}
 #lobbyScreen.cn-room-lobby #serverPlayersGrid .cn-server-player img{width:38px!important;height:38px!important;flex-basis:38px!important}
 #positionScreen .teams-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important}
 #positionScreen .player-list{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px 2px!important}
 #positionScreen .player-card img{width:38px!important;height:38px!important;flex-basis:38px!important}
 #positionScreen .cn-choose-actions{display:grid!important;grid-template-columns:1fr!important;width:100%!important}
 #positionScreen #beginMatch,#positionScreen #leaveChoose{width:100%!important}
}
/* /XD_HORF_CODENAMES_ROOM_PARITY_V246 */

/* XD_HORF_READY_V251 */
.v241-server-notice,#serverNotice{display:none!important}
#positionScreen .cn-choose-bottom{width:min(900px,100%)!important;margin:10px auto 0!important;display:grid!important;grid-template-columns:1fr!important;place-items:center!important;gap:7px!important;text-align:center!important}
#positionScreen .cn-choose-bottom .lobby-hint{order:1!important;width:100%!important;margin:0!important;text-align:center!important;color:#8b8b92!important;font-size:.72rem!important}
#positionScreen .cn-choose-actions{order:2!important;width:100%!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;flex-wrap:wrap!important}
#positionScreen #beginMatch{order:1!important;min-width:260px!important;min-height:46px!important;margin:0!important;padding:10px 28px!important;border-radius:12px!important;font-weight:900!important;box-shadow:0 8px 24px rgba(245,158,11,.12)!important}
#positionScreen #leaveChoose{order:2!important;min-height:40px!important}
#positionScreen .unassigned{width:min(900px,100%)!important;margin:10px auto 0!important;opacity:.78!important}
@media(max-width:680px){
 #positionScreen .cn-choose-bottom{margin-top:8px!important;padding:0 2px!important}
 #positionScreen .cn-choose-actions{display:grid!important;grid-template-columns:1fr!important;gap:7px!important}
 #positionScreen #beginMatch,#positionScreen #leaveChoose{width:100%!important;min-width:0!important}
 #positionScreen #beginMatch{min-height:48px!important}
}
/* /XD_HORF_READY_V251 */
