/* Qadha host experience V2 — Modern UI only.
   Preserves the approved two-team board while making the host flow phone-first. */

html[data-ui-mode="modern"] body[data-game-brand="qadha"]{
  --qh-bg:#080b20;
  --qh-panel:rgba(17,22,49,.96);
  --qh-panel-2:rgba(24,30,61,.97);
  --qh-line:rgba(255,255,255,.10);
  --qh-line-strong:rgba(255,255,255,.16);
  --qh-text:#faf8f0;
  --qh-muted:#aab2c7;
  --qh-red:#ef5261;
  --qh-red-2:#ff7a70;
  --qh-gold:#f2c94c;
  --qh-gold-2:#ffe18a;
}

html[data-ui-mode="modern"] body[data-game-brand="qadha"] .q-nav{
  border-color:var(--qh-line)!important;
  background:rgba(7,10,28,.86)!important;
  box-shadow:0 12px 34px rgba(0,0,0,.20)!important;
}

html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active{
  background:
    radial-gradient(700px 470px at 95% -12%,rgba(239,82,97,.15),transparent 64%),
    radial-gradient(520px 380px at -10% 42%,rgba(242,201,76,.06),transparent 66%),
    linear-gradient(180deg,#0a0e28 0%,#080b20 56%,#050717 100%)!important;
}

html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-qadha-toolbar{
  border:1px solid var(--qh-line)!important;
  background:rgba(8,11,32,.88)!important;
  box-shadow:0 10px 30px rgba(0,0,0,.22)!important;
  backdrop-filter:blur(16px) saturate(120%);
}

html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-turn-pill,
html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .modern-turn-arrow{
  border-color:rgba(242,201,76,.34)!important;
  background:linear-gradient(135deg,rgba(242,201,76,.12),rgba(239,82,97,.045))!important;
  color:var(--qh-text)!important;
}

html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-team-box{
  border-color:var(--qh-line)!important;
  background:linear-gradient(180deg,var(--qh-panel-2),var(--qh-panel))!important;
  box-shadow:0 12px 30px rgba(0,0,0,.18)!important;
}

html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-team-box.active{
  border-color:rgba(242,201,76,.52)!important;
  box-shadow:inset 0 0 0 1px rgba(242,201,76,.14),0 12px 32px rgba(0,0,0,.20)!important;
}

html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .slot.available{
  transition:transform .14s ease,border-color .14s ease,filter .14s ease!important;
}
html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .slot.available:hover{
  transform:translateY(-1px)!important;
  border-color:rgba(242,201,76,.48)!important;
  filter:brightness(1.06)!important;
}
html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .slot.used,
html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .slot.closed{
  opacity:.25!important;
  filter:saturate(.35)!important;
  text-decoration:none!important;
}

/* -------- Phone board -------- */
@media(max-width:760px){
  html[data-ui-mode="modern"] body[data-game-brand="qadha"] .q-nav{
    width:calc(100% - 12px)!important;
    min-height:58px!important;
    margin:6px auto 0!important;
    padding:6px 7px!important;
    top:6px!important;
    gap:6px!important;
    border-radius:16px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"] .q-brand{
    flex:1 1 auto!important;
    min-width:0!important;
    gap:5px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"] .q-brand img{
    width:82px!important;
    height:40px!important;
    object-fit:contain!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"] .q-brand>span{display:none!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"] .q-nav nav{flex:0 0 auto!important;gap:4px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"] .q-nav nav>a,
  html[data-ui-mode="modern"] body[data-game-brand="qadha"] .q-nav nav>button{
    width:42px!important;
    min-width:42px!important;
    height:42px!important;
    min-height:42px!important;
    padding:0!important;
    display:grid!important;
    place-items:center!important;
    overflow:hidden!important;
    font-size:0!important;
    border:1px solid var(--qh-line)!important;
    border-radius:12px!important;
    background:rgba(255,255,255,.035)!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"] .q-platform-home::before{content:"⌂";font-size:20px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"] .q-nav [data-screen="home"]{display:none!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"] .q-nav [data-screen="mygames"]::before{content:"▦";font-size:19px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"] #qAccountBtn::before{content:"♙";font-size:19px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"] .q-theme-clear{font-size:18px!important}

  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active #qApp{
    width:100%!important;
    height:auto!important;
    min-height:100dvh!important;
    padding:max(5px,env(safe-area-inset-top)) 5px calc(8px + env(safe-area-inset-bottom))!important;
    overflow-x:hidden!important;
    overflow-y:visible!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-board-screen{
    width:100%!important;
    height:auto!important;
    min-height:100dvh!important;
    display:grid!important;
    grid-template-rows:auto auto auto!important;
    align-content:start!important;
    gap:7px!important;
  }

  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-qadha-toolbar{
    width:100%!important;
    min-height:58px!important;
    padding:6px!important;
    position:sticky!important;
    top:4px!important;
    z-index:60!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:"brand turn" "actions actions"!important;
    gap:6px!important;
    border-radius:16px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-board-brand{
    grid-area:brand!important;
    min-width:0!important;
    padding-inline:5px!important;
    text-align:right!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-board-brand>strong{
    font-size:18px!important;
    line-height:1.1!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-board-slogan{display:none!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-turn-pill{
    grid-area:turn!important;
    min-width:112px!important;
    min-height:42px!important;
    padding:5px 9px!important;
    border-radius:12px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-turn-pill .turn-team-avatar{font-size:14px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-turn-pill small{font-size:8px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-turn-pill strong{
    max-width:90px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:11px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-toolbar-actions{
    grid-area:actions!important;
    width:100%!important;
    display:flex!important;
    gap:5px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    padding:1px 0 2px!important;
    scrollbar-width:none!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-toolbar-actions::-webkit-scrollbar{display:none!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-toolbar-action{
    flex:0 0 43px!important;
    width:43px!important;
    min-width:43px!important;
    height:42px!important;
    min-height:42px!important;
    padding:0!important;
    display:grid!important;
    place-items:center!important;
    border:1px solid var(--qh-line)!important;
    border-radius:12px!important;
    background:rgba(255,255,255,.035)!important;
    color:var(--qh-text)!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-toolbar-action>b{display:none!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-toolbar-action>span{font-size:18px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-toolbar-action.danger{
    flex:0 0 auto!important;
    width:auto!important;
    min-width:112px!important;
    padding:0 11px!important;
    display:flex!important;
    gap:6px!important;
    border-color:rgba(239,82,97,.26)!important;
    background:rgba(239,82,97,.075)!important;
    color:#ffb7bd!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-toolbar-action.danger>b{display:inline!important;font-size:11px!important}

  /* Keep each category as the approved category between two equal value columns. */
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-board-grid.qadha-reference-grid{
    width:100%!important;
    min-height:0!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:7px!important;
    overflow:visible!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .board-category-panel{
    width:100%!important;
    min-width:0!important;
    min-height:112px!important;
    display:grid!important;
    grid-template-columns:minmax(76px,.72fr) minmax(104px,1fr) minmax(76px,.72fr)!important;
    grid-template-areas:"right cat left"!important;
    grid-template-rows:minmax(0,1fr)!important;
    align-items:stretch!important;
    gap:6px!important;
    padding:6px!important;
    border:1px solid var(--qh-line)!important;
    border-radius:17px!important;
    background:linear-gradient(145deg,var(--qh-panel-2),var(--qh-panel))!important;
    box-shadow:0 10px 26px rgba(0,0,0,.16)!important;
    overflow:hidden!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .board-category-panel.category-complete{opacity:.38!important;filter:saturate(.45)!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .category-value-column{
    min-width:0!important;
    display:grid!important;
    grid-template-rows:repeat(3,minmax(0,1fr))!important;
    gap:5px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .board-category-panel .slot{
    width:100%!important;
    min-width:0!important;
    min-height:30px!important;
    padding:4px 2px!important;
    border-radius:9px!important;
    font-size:clamp(15px,5vw,22px)!important;
    line-height:1!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .board-category-panel .board-cat{
    min-width:0!important;
    min-height:100px!important;
    padding:5px!important;
    border-radius:12px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .board-category-panel .board-cat-art{
    min-height:68px!important;
    border-radius:10px!important;
    overflow:hidden!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .board-category-panel .board-cat strong{
    display:block!important;
    max-width:100%!important;
    margin-top:4px!important;
    color:var(--qh-text)!important;
    font-size:11px!important;
    line-height:1.3!important;
    text-align:center!important;
    overflow-wrap:break-word!important;
  }

  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-board-grid.qadha-reference-grid{
    grid-template-rows:none!important;
    grid-auto-rows:minmax(112px,auto)!important;
    padding-bottom:calc(158px + env(safe-area-inset-bottom))!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .board-category-panel{
    height:auto!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-board-footer.qadha-reference-footer{
    width:auto!important;
    left:5px!important;
    right:5px!important;
    min-height:0!important;
    max-height:148px!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:5px!important;
    position:fixed!important;
    bottom:max(5px,env(safe-area-inset-bottom))!important;
    z-index:80!important;
    padding:5px!important;
    border:1px solid var(--qh-line)!important;
    border-radius:15px!important;
    background:rgba(7,10,28,.95)!important;
    box-shadow:0 -10px 30px rgba(0,0,0,.28)!important;
    backdrop-filter:blur(16px)!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .modern-turn-arrow{
    grid-column:1/-1!important;
    min-height:27px!important;
    padding:3px 8px!important;
    border-radius:9px!important;
    line-height:1.05!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-team-box{
    min-width:0!important;
    min-height:72px!important;
    padding:5px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-areas:"name" "score" "shield"!important;
    grid-template-rows:auto auto auto!important;
    gap:3px!important;
    border-radius:12px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .team-name-button{
    width:100%!important;
    max-width:none!important;
    min-width:44px!important;
    min-height:40px!important;
    justify-self:stretch!important;
    grid-area:name!important;
    padding:3px 6px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-team-box .team-help-block{
    display:none!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-score-control{
    grid-template-columns:34px minmax(46px,1fr) 34px!important;
    gap:4px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-score-control button{
    width:34px!important;
    height:34px!important;
    min-height:34px!important;
    font-size:20px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-score-control output{
    height:34px!important;
    min-height:34px!important;
    font-size:20px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .team-name-button strong{
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:12px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .team-roster,
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .turn-now-label{font-size:8px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .team-help-block{display:none!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-score-control{
    width:100%!important;
    min-width:0!important;
    display:grid!important;
    grid-area:score!important;
    justify-self:stretch!important;
    grid-template-columns:40px minmax(0,1fr) 40px!important;
    gap:4px!important;
    align-items:center!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-score-control output{
    min-width:0!important;
    text-align:center!important;
    font-size:20px!important;
    color:var(--qh-gold)!important;
    font-weight:950!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .score-step{
    width:40px!important;
    min-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    padding:0!important;
    border-radius:10px!important;
  }

  /* -------- Phone question -------- */
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-question-screen-v129,
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .qadha-v260:has(.q-question-control-dock){
    height:auto!important;
    min-height:100dvh!important;
    overflow:visible!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-question-content-scroll{
    width:100%!important;
    min-height:0!important;
    max-height:none!important;
    padding:6px!important;
    overflow:visible!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .question-turn-banner{
    min-height:43px!important;
    margin:0 0 7px!important;
    padding:6px 10px!important;
    border:1px solid rgba(242,201,76,.20)!important;
    border-radius:12px!important;
    background:rgba(242,201,76,.055)!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .question-turn-banner strong{
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:13px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .question-text{
    max-width:100%!important;
    margin-inline:auto!important;
    padding:clamp(12px,4vw,18px)!important;
    color:var(--qh-text)!important;
    font-size:clamp(23px,7vw,34px)!important;
    line-height:1.5!important;
    text-align:center!important;
    text-wrap:balance!important;
    overflow-wrap:break-word!important;
  }

  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-question-control-dock{
    width:100%!important;
    min-height:0!important;
    margin-top:7px!important;
    padding:9px!important;
    position:sticky!important;
    bottom:max(4px,env(safe-area-inset-bottom))!important;
    z-index:55!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:7px!important;
    border:1px solid var(--qh-line)!important;
    border-radius:18px!important;
    background:rgba(7,10,28,.95)!important;
    box-shadow:0 -12px 34px rgba(0,0,0,.28)!important;
    backdrop-filter:blur(16px)!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-timer-block{
    min-height:52px!important;
    padding:6px 10px!important;
    display:grid!important;
    grid-template-columns:auto auto minmax(0,1fr)!important;
    align-items:center!important;
    gap:9px!important;
    border:1px solid rgba(242,201,76,.14)!important;
    border-radius:13px!important;
    background:rgba(242,201,76,.035)!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-timer-block>span{font-size:10px!important;color:var(--qh-muted)!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active #timerText{font-size:22px!important;color:var(--qh-gold)!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-timer-progress{min-width:0!important;height:7px!important;border-radius:999px!important;overflow:hidden!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-timer-buttons,
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-question-actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-timer-buttons .btn,
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-question-actions .btn{
    width:100%!important;
    min-width:0!important;
    min-height:48px!important;
    margin:0!important;
    padding:8px!important;
    border-radius:12px!important;
    font-size:11px!important;
    line-height:1.3!important;
    white-space:normal!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active #revealAnswer,
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .charades-ready-btn{
    grid-column:1/-1!important;
    min-height:54px!important;
    font-size:14px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active #cancelQuestion,
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active #skipOrder{color:#ffadb6!important;border-color:rgba(239,82,97,.20)!important;background:rgba(239,82,97,.055)!important}

  /* Reveal / scoring: solution first, then a clear team choice. */
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .qadha-reveal-shell{
    width:100%!important;
    gap:8px!important;
    padding:5px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .qadha-result-banner{
    padding:9px 10px!important;
    border-radius:15px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .qadha-result-banner h2{font-size:18px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .qadha-reveal-question{padding:3px 6px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .qadha-reveal-question .question-text{padding:8px!important;font-size:17px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .qadha-solution-panel{
    width:100%!important;
    padding:12px!important;
    gap:6px!important;
    border-radius:17px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .qadha-solution-panel .answer-box{
    min-height:62px!important;
    padding:10px 12px!important;
    border-radius:13px!important;
    font-size:clamp(24px,8vw,36px)!important;
    line-height:1.25!important;
    overflow-wrap:break-word!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .qadha-answer-explanation{font-size:11px!important;line-height:1.55!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .qadha-scoring-panel h2{font-size:18px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .qadha-answer-variants{font-size:11px!important;line-height:1.45!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .score-winner-buttons{
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .score-winner-buttons .btn,
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .score-winner-buttons button{
    min-width:0!important;
    min-height:54px!important;
    border-radius:13px!important;
    white-space:normal!important;
    font-size:12px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .qadha-reveal-actions{width:100%!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .qadha-reveal-actions .btn{width:100%!important;min-width:0!important;min-height:48px!important}
}

@media(max-width:390px){
  html[data-ui-mode="modern"] body[data-game-brand="qadha"] .q-nav nav>button,
  html[data-ui-mode="modern"] body[data-game-brand="qadha"] .q-nav nav>a{width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"] .q-brand img{width:72px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .board-category-panel{grid-template-columns:minmax(68px,.68fr) minmax(94px,1fr) minmax(68px,.68fr)!important;gap:4px!important;padding:4px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .board-category-panel .slot{font-size:15px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-score-control{grid-template-columns:36px minmax(0,1fr) 36px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .score-step{width:36px!important;min-width:36px!important;height:38px!important;min-height:38px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-timer-buttons,
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-question-actions{grid-template-columns:1fr!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active #revealAnswer,
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .charades-ready-btn{grid-column:auto!important}
}

@media(orientation:landscape) and (max-height:540px) and (max-width:1000px){
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active #qApp{padding:3px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-qadha-toolbar{position:relative!important;top:auto!important;grid-template-columns:auto minmax(0,1fr) auto!important;grid-template-areas:"actions brand turn"!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-toolbar-actions{max-width:360px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-board-grid.qadha-reference-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .board-category-panel{grid-template-columns:minmax(52px,.62fr) minmax(76px,1fr) minmax(52px,.62fr)!important;grid-template-areas:"right cat left"!important;grid-template-rows:minmax(0,1fr)!important;min-height:100px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .category-value-column{
    min-height:100px!important;
    grid-template-rows:repeat(3,minmax(28px,1fr))!important;
    gap:4px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .board-category-panel .slot{
    height:auto!important;
    min-height:28px!important;
    padding:2px!important;
    touch-action:manipulation!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .board-category-panel .board-cat-art{min-height:58px!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-board-footer.qadha-reference-footer{position:relative!important;bottom:auto!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-question-control-dock{position:relative!important;bottom:auto!important;grid-template-columns:minmax(150px,.7fr) minmax(0,1fr) minmax(0,1fr)!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-timer-buttons,
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .q-question-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .question-text{font-size:clamp(18px,4.7vh,27px)!important;padding:8px!important}
}

@media(prefers-reduced-motion:reduce){
  html[data-ui-mode="modern"] body[data-game-brand="qadha"] *,
  html[data-ui-mode="modern"] body[data-game-brand="qadha"] *::before,
  html[data-ui-mode="modern"] body[data-game-brand="qadha"] *::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
}


/* qadha-mobile-interaction-contract-v2
   Final protected-board geometry contract. This file owns board layout and is
   loaded after the legacy modern UI layer. */
@media(orientation:landscape) and (max-height:540px) and (max-width:1000px){
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .qadha-reference-board{
    grid-template-rows:52px minmax(210px,1fr) 128px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-qadha-toolbar{
    height:52px!important;
    min-height:52px!important;
    overflow:hidden!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .premium-board-grid.qadha-reference-grid{
    min-height:210px!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-template-rows:repeat(2,minmax(96px,1fr))!important;
    align-content:stretch!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .board-category-panel{
    min-height:96px!important;
    height:auto!important;
    grid-template-columns:minmax(52px,.62fr) minmax(76px,1fr) minmax(52px,.62fr)!important;
    grid-template-areas:"right cat left"!important;
    grid-template-rows:minmax(0,1fr)!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .category-value-column{
    min-height:90px!important;
    grid-template-rows:repeat(3,minmax(28px,1fr))!important;
    gap:3px!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .board-category-panel .slot{
    min-height:28px!important;
    height:auto!important;
  }
  html[data-ui-mode="modern"] body[data-game-brand="qadha"].q-game-active .qadha-reference-footer .team-name-button{
    min-height:34px!important;
    min-width:44px!important;
  }
}
