/* v1.9.0 — compact, readable Qadha host controls. */
.qadha-v190 .q-meta{white-space:nowrap}
.qadha-v190 .letter-question-layout{grid-template-columns:minmax(0,1fr) clamp(120px,17vw,210px)!important;grid-template-areas:"prompt letter" "media media" "grid grid"!important}
.qadha-v190 .letter-grid-wrap{grid-area:grid;width:min(760px,100%);margin:auto}
.qadha-v190 .letter-grid{display:grid;grid-template-columns:repeat(14,minmax(0,1fr));gap:7px;padding:10px;border-radius:18px;background:rgba(8,15,29,.42);border:1px solid rgba(255,255,255,.18)}
.qadha-v190 .letter-grid-cell{min-height:38px;display:grid;place-items:center;border-radius:10px;background:rgba(255,255,255,.11);font-size:clamp(18px,2vw,28px);font-weight:1000;color:#fff}
.qadha-v190 .letter-grid-cell.selected{background:linear-gradient(145deg,#ffd35a,#f37c32);color:#21102e;box-shadow:0 0 0 4px rgba(255,211,90,.32);transform:scale(1.12)}
.qadha-v190.qadha-question-order .q-question-content-scroll{overflow:hidden!important}.qadha-v190 .order-question-shell{height:100%;min-height:0}.qadha-v190 .order-area{overflow:hidden!important;padding-bottom:4px!important}.qadha-v190 .order-list{max-height:none!important;overflow:visible!important}.qadha-v190 .order-item{min-height:48px!important}
.qadha-v190 .drawing-host-special .host-draw-observer{margin:8px auto;padding:9px 12px;border-radius:12px;background:rgba(12,83,73,.24);border:1px solid rgba(105,236,168,.45);font-weight:850;text-align:center}.qadha-v190 .host-draw-canvas{touch-action:auto!important;cursor:default!important;pointer-events:none}
.qadha-v190 .compact-special .q-compact-qr,.qadha-v190 .host-qr-only-frame .q-compact-qr{max-width:300px!important}
.q-account-avatar{width:34px!important;height:34px!important;flex:0 0 34px!important;border-radius:12px!important;object-fit:cover}.q-account-profile-head .q-account-avatar{width:58px!important;height:58px!important;flex-basis:58px!important;border-radius:18px!important}
.fbrkh-tool-row.volume-row{display:grid;grid-template-columns:1fr auto;align-items:center}.fbrkh-tool-row.volume-row input[type="range"]{width:142px;height:28px;accent-color:#ffcc4d}
.qadha-team-split{display:grid;gap:12px;margin-top:12px;padding:15px;border:1px solid rgba(255,255,255,.16);border-radius:18px;background:linear-gradient(145deg,rgba(79,41,125,.22),rgba(15,90,104,.16))}.qadha-team-split>header{display:flex;align-items:center;justify-content:space-between;gap:12px}.qadha-team-split>header>div{display:grid;gap:3px}.qadha-team-split>header b{font-size:1rem}.qadha-team-split>header small{color:var(--muted,#c9bfd8);line-height:1.45}.qadha-team-preview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.qadha-team-preview>p{grid-column:1/-1;margin:0;padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.07);color:var(--muted,#c9bfd8);font-size:.88rem}.qadha-team-preview-card{display:grid;gap:5px;min-height:94px;padding:13px 14px;border-radius:15px;border:1px solid rgba(255,255,255,.16);background:rgba(17,11,35,.48)}.qadha-team-preview-card.team-1{border-color:rgba(91,216,255,.48);box-shadow:inset 3px 0 0 #5bd8ff}.qadha-team-preview-card.team-2{border-color:rgba(255,199,93,.52);box-shadow:inset 3px 0 0 #ffc75d}.qadha-team-preview-card span{font-size:.8rem;font-weight:900;color:var(--muted,#c9bfd8)}.qadha-team-preview-card b{line-height:1.55;overflow-wrap:anywhere}.qadha-team-preview-card small{color:var(--muted,#c9bfd8);font-size:.77rem}
@media(max-width:560px){.qadha-team-split>header{align-items:stretch;flex-direction:column}.qadha-team-split>header .btn{width:100%}.qadha-team-preview{grid-template-columns:1fr}.qadha-team-preview-card{min-height:auto}}
:root[data-theme="light"] .qadha-team-split{background:linear-gradient(145deg,#f7f2ff,#edf7fb);border-color:rgba(55,48,83,.17)}:root[data-theme="light"] .qadha-team-preview-card{background:#fff;border-color:rgba(55,48,83,.16);color:#263444}:root[data-theme="light"] .qadha-team-split>header small,:root[data-theme="light"] .qadha-team-preview-card span,:root[data-theme="light"] .qadha-team-preview-card small,:root[data-theme="light"] .qadha-team-preview>p{color:#59687a}:root[data-theme="light"] .qadha-team-preview>p{background:#fff}
@media(max-width:900px){.qadha-v190 .letter-grid{grid-template-columns:repeat(10,minmax(0,1fr));gap:5px}.qadha-v190 .letter-grid-cell{min-height:32px}.qadha-v190 .letter-question-layout{grid-template-columns:1fr!important;grid-template-areas:"letter" "prompt" "media" "grid"!important}.qadha-v190 .letter-focus{width:min(150px,48vw);justify-self:center}.qadha-v190 .order-question-shell{overflow:visible!important}.qadha-v190 .order-list{grid-template-columns:1fr!important}.qadha-v190 .compact-special .q-compact-qr,.qadha-v190 .host-qr-only-frame .q-compact-qr{max-width:270px!important}}

/* v2.1.18: two or three teams, mobile-first setup, and persistent actions */
.qadha-setup-v217 .qadha-team-count-field{max-width:420px}
.qadha-setup-v217 .qadha-team-count-field select{min-height:52px;font-weight:900}
.qadha-setup-v217 .team-third-field[hidden]{display:none!important}
.qadha-setup-v217 .qadha-team-name-field{min-width:0}
.qadha-setup-v217 .qadha-team-preview{grid-template-columns:repeat(2,minmax(0,1fr))}
.qadha-setup-v217 .qadha-team-preview-card.team-0{border-color:rgba(255,107,113,.55);box-shadow:inset 3px 0 0 #ff6b71}
.qadha-setup-v217 .qadha-team-preview-card.team-1{border-color:rgba(91,216,255,.48);box-shadow:inset 3px 0 0 #5bd8ff}
.qadha-setup-v217 .qadha-team-preview-card.team-2{border-color:rgba(255,199,93,.58);box-shadow:inset 3px 0 0 #ffc75d}
.qadha-team-count-3 .qadha-reference-footer{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:clamp(8px,1.5vw,20px)!important;padding-inline:clamp(8px,1.5vw,20px)!important}
.qadha-team-count-3 .qadha-reference-footer .premium-team-box{grid-template-columns:minmax(105px,.75fr) minmax(118px,1fr)!important;column-gap:8px!important}
.qadha-team-count-3 .qadha-reference-footer .team-name-button{padding-inline:8px!important}
.qadha-team-count-3 .qadha-reference-footer .team-name-button strong{font-size:clamp(13px,1.45vw,21px)!important}
.qadha-team-count-3 .qadha-reference-footer .team-help-block>strong{font-size:clamp(12px,1.3vw,18px)!important}
.qadha-reference-footer .team-2 .team-name-button{background:#9a6500!important}
.qadha-reference-footer .team-2 .premium-score-control button{background:#9a6500!important}
.qadha-reference-footer .team-2 .premium-score-control output{color:#7b5200!important}
.qadha-team-count-3 .q-question-sidebar-v129{grid-template-rows:repeat(3,minmax(0,1fr))!important;gap:clamp(5px,.8vw,10px)!important}
.qadha-team-count-3 .q-question-sidebar-v129 .side-team{padding:clamp(5px,.7vw,10px)!important;gap:4px!important}
.qadha-team-count-3 .q-question-sidebar-v129 .side-team-name{min-height:36px!important}
.qadha-team-count-3 .q-question-sidebar-v129 .side-team-name strong{font-size:clamp(13px,1.25vw,18px)!important}
.qadha-team-count-3 .q-question-sidebar-v129 .big-score{font-size:clamp(22px,2.3vw,36px)!important}
.qadha-team-count-3 .q-question-sidebar-v129 .side-help-shell h3{font-size:12px!important}
.qadha-team-count-3 .q-question-sidebar-v129 .help-btn{min-height:34px!important}
.team-winner-2{background:#9a6500!important;border-color:#c89524!important;color:#fff!important}
.qadha-final-teams-3 .final-score{font-size:clamp(28px,6vw,64px)}
.qadha-final-stats article>strong+strong{margin-top:5px}

@media (min-width:760px){
 .qadha-setup-v217 .setup-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .qadha-setup-v217 .field.full{grid-column:1/-1}
 .qadha-setup-v217 .qadha-team-count-field{grid-column:1/-1}
 .qadha-setup-v217 .qadha-team-preview:has(.team-2){grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:900px){
 .qadha-setup-v217{padding-bottom:88px!important}
 .qadha-setup-v217 .qadha-setup-actions{position:sticky;bottom:max(0px,env(safe-area-inset-bottom));z-index:25;margin-inline:-12px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:color-mix(in srgb,var(--paper,#15111e) 94%,transparent);border-top:1px solid var(--line);backdrop-filter:blur(16px)}
 .qadha-setup-v217 .qadha-setup-actions .btn{min-height:50px;flex:1}
 .qadha-team-count-3 .qadha-reference-footer{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important;padding:5px!important;overflow:hidden!important}
 .qadha-team-count-3 .qadha-reference-footer .premium-team-box{grid-template-columns:1fr!important;grid-template-areas:"name" "score"!important;grid-template-rows:30px 30px!important;gap:3px!important;height:100%!important;min-height:0!important;padding:4px!important;align-content:center!important}
 .qadha-team-count-3 .qadha-reference-footer .team-help-block{display:none!important}
 .qadha-team-count-3 .qadha-reference-footer .team-name-button{min-width:0!important;min-height:30px!important;height:30px!important;padding:1px 4px!important}
 .qadha-team-count-3 .qadha-reference-footer .team-name-button strong{font-size:12px!important}
 .qadha-team-count-3 .qadha-reference-footer .premium-score-control{grid-template-columns:28px minmax(42px,1fr) 28px!important;grid-template-rows:28px!important;gap:2px!important;height:28px!important;min-height:0!important;align-self:center!important}
 .qadha-team-count-3 .qadha-reference-footer .premium-score-control button{width:28px!important;min-width:28px!important;height:28px!important;min-height:28px!important;padding:0!important;font-size:17px!important}
 .qadha-team-count-3 .qadha-reference-footer .premium-score-control output{height:28px!important;min-height:28px!important;padding:0 4px!important;border-width:2px!important;font-size:17px!important}
}
@media (max-width:760px) and (orientation:portrait){
 .qadha-setup-v217 .qadha-team-preview{grid-template-columns:1fr}
 .qadha-team-count-3 .q-question-sidebar-v129{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:1fr!important;gap:4px!important}
 .qadha-team-count-3 .q-question-sidebar-v129 .side-team{min-width:0!important;padding:5px!important}
 .qadha-team-count-3 .q-question-sidebar-v129 .side-team-name strong{font-size:12px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .qadha-team-count-3 .q-question-sidebar-v129 .side-help-shell{display:none!important}
 .qadha-team-count-3 .q-question-sidebar-v129 .big-score{font-size:20px!important}
}
