/* Phase 5 — Arabic RTL responsive trivia game */
.game-intro{text-align:center;margin:1rem auto 2rem;max-width:720px}.game-intro h1{font-size:clamp(2rem,5vw,3.4rem);font-weight:950}.game-intro h1 span{color:#6d51e8}.game-intro p,.game-note{color:#6e6380;line-height:1.85}.game-eyebrow{color:#7658df;font-weight:850;font-size:.93rem}.game-panel{background:white;border:1px solid #ebe5f7;border-radius:24px;padding:clamp(1.1rem,3vw,2.2rem);box-shadow:0 12px 30px #3222670c}.game-setup-panel{max-width:800px;margin:auto}.game-setup-grid{display:grid;grid-template-columns:1fr 1fr;gap:1.2rem}.game-btn{border:0;border-radius:14px;padding:.9rem 1.4rem;font-weight:850;min-height:50px;cursor:pointer}.game-btn-primary{background:#6d51e8;color:white}.game-btn-primary:hover{background:#5437d4}.game-btn-outline{background:white;border:1px solid #d7ccef;color:#6146c9}.game-top,.game-question-header{display:flex;align-items:center;justify-content:space-between;gap:1.25rem;margin-bottom:1.4rem;flex-wrap:wrap}.game-top h1,.game-question-header h1{font-weight:950;font-size:clamp(1.7rem,3vw,2.5rem)}.game-score-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-bottom:2rem}.game-score{background:white;border:2px solid #eae5f7;border-radius:22px;padding:1.1rem 1.4rem;display:flex;flex-direction:column;gap:.2rem}.game-score.is-turn{border-color:#7154eb;background:#f3efff;box-shadow:0 8px 25px #674ae524}.game-score h2{font-size:clamp(1rem,2.3vw,1.4rem);font-weight:900;margin:.1rem 0;overflow-wrap:anywhere}.game-score strong{font-size:clamp(1.7rem,4vw,2.6rem);color:#6449d4;font-variant-numeric:tabular-nums}.game-score small{font-size:.9rem;font-weight:700}.game-turn-indicator{font-size:.78rem;font-weight:850;color:#756591}.game-section-title{font-size:clamp(1.2rem,2.5vw,1.6rem);font-weight:900;margin-bottom:1.2rem}.game-category-board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.game-category{background:#fff;border:1px solid #eee8f6;border-radius:23px;overflow:hidden;box-shadow:0 10px 24px #35236610}.game-category-banner{height:165px;position:relative;background:linear-gradient(130deg,#f5d8ed,#ddd9ff);display:grid;place-items:end center;overflow:hidden}.game-category-banner img{position:absolute;width:100%;height:100%;inset:0;object-fit:contain}.game-category-banner h3{position:relative;z-index:1;font-weight:900;font-size:1.08rem;text-align:center;margin:0;padding:.55rem .8rem;width:100%;background:#ffffffd9;backdrop-filter:blur(3px)}.game-point-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:.55rem;padding:.8rem}.game-point-grid form{min-width:0}.game-point{width:100%;min-height:75px;background:#eee8ff;border:1px solid #d9ccff;border-radius:13px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:.25rem;color:#5d40c3}.game-point strong{font-size:1.3rem;font-weight:950}.game-point span{font-size:.68rem;font-weight:750}.game-point:hover:not(:disabled){background:#7253e8;color:white}.game-point:disabled{background:#f4f2f5;border-color:#eee;color:#a9a1b3;cursor:not-allowed}.game-question-panel{text-align:center;min-height:180px;display:grid;place-items:center;gap:1rem;margin-bottom:1rem}.game-step-label{display:inline-block;font-size:.85rem;background:#f1eaff;color:#6041bd;padding:.4rem .9rem;border-radius:100px;font-weight:850}.game-question-text,.game-answer-text{font-size:clamp(1.4rem,3vw,2.3rem);font-weight:900;line-height:1.7;overflow-wrap:anywhere;white-space:pre-wrap}.game-question-image{display:block;max-width:100%;max-height:430px;object-fit:contain;margin:0 auto}.game-points-badge{font-size:1.2rem;font-weight:950;background:#ffe9a8;color:#70470b;padding:.75rem 1rem;border-radius:18px}.game-action-panel{text-align:center;padding:1.2rem 0}.game-action-panel p{color:#6e6380;line-height:1.7}.game-answer-panel{text-align:center;display:grid;place-items:center;gap:1rem;background:#f1fff6;border-color:#b8e8c9}.game-answer-text{color:#12713c}.game-judge-grid{display:flex;justify-content:center;flex-wrap:wrap;gap:1rem}.game-btn-correct{background:#148c51;color:#fff}.game-btn-wrong{background:#c93850;color:#fff}.game-judge-grid form{flex:1;max-width:330px}.game-judge-grid .game-btn{width:100%}.game-finish{text-align:center}.game-trophy{font-size:4rem}.game-finish h2{font-weight:950}@media(max-width:950px){.game-category-board{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.game-setup-grid,.game-score-grid,.game-category-board{grid-template-columns:1fr}.game-score-grid{grid-template-columns:1fr 1fr}.game-score{padding:.8rem}.game-score strong{font-size:1.5rem}.game-point-grid{gap:.45rem}.game-category-banner{height:180px}.game-judge-grid{flex-direction:column}.game-judge-grid form{max-width:none}.game-btn{width:100%}}

/* Phase 5.1: Select categories and mark completed point slots without changing the board layout */
.game-category-choice-heading{margin-top:1.8rem}.game-category-choice-heading h2{font-weight:900;font-size:1.3rem}.game-choice-tools{display:flex;flex-wrap:wrap;gap:.6rem;margin-bottom:1rem}.game-choice-tools .game-btn{min-height:40px;padding:.5rem .9rem}
.game-category-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem;margin-bottom:1.2rem}.game-category-choice{position:relative;cursor:pointer;display:flex;flex-direction:column;border:2px solid #eee8f7;background:#fff;border-radius:18px;overflow:hidden;transition:border-color .15s,background .15s}.game-category-choice:has(input:checked){border-color:#7351e9;background:#f7f3ff;box-shadow:0 4px 14px #6d51e81a}.game-category-choice input{position:absolute;inset-inline-start:12px;top:12px;accent-color:#7351e9;width:19px;height:19px;z-index:2}.game-choice-image{height:130px;display:grid;place-items:center;background:linear-gradient(130deg,#f5d8ed,#ddd9ff);font-size:2rem}.game-choice-image img{width:100%;height:100%;object-fit:contain}.game-choice-info{padding:.75rem;display:flex;gap:.35rem;flex-direction:column}.game-choice-info strong{font-weight:900}.game-choice-info small{color:#73688a}.game-choice-indicator{position:absolute;top:9px;inset-inline-end:9px;background:#7050e4;color:#fff;width:25px;height:25px;display:none;place-items:center;border-radius:50%}.game-category-choice:has(input:checked) .game-choice-indicator{display:grid}.game-point.game-point-used,.game-point.game-point-used:disabled{opacity:.42;background:#e6e2e9;color:#746d7c;border:1px dashed #c1b9c9;filter:grayscale(1)}
@media(max-width:950px){.game-category-choices{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.game-category-choices{grid-template-columns:1fr 1fr}.game-choice-image{height:105px}.game-choice-info{font-size:.87rem;padding:.55rem}}

/* Phase 5.2: Manual scores and skip question; leave category grid intact */
.game-score-edit{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;margin-top:.65rem}
.game-score-edit form{margin:0}
.game-score-step,.game-score-save{min-height:40px;border-radius:10px;border:1px solid #d9ccff;background:#eee8ff;color:#5539bc;font-weight:850;padding:.4rem .65rem;cursor:pointer}
.game-score-step:hover,.game-score-save:hover{background:#7253e8;color:#fff}
.game-score-set{display:flex;align-items:center;gap:.3rem;flex:1 1 150px}
.game-score-set input{width:100%;min-width:65px;max-width:125px;border:1px solid #d9ccff;border-radius:10px;padding:.42rem .5rem;min-height:40px;text-align:center;direction:ltr;font-variant-numeric:tabular-nums;background:white}
.game-skip-panel{margin:1.2rem auto 1.5rem;max-width:780px;text-align:center;padding:1rem;background:#fffaf0;border:1px solid #f2dfb7;border-radius:18px}
.game-skip-panel h2{font-size:1.15rem;font-weight:900;margin:.2rem 0 .4rem}
.game-skip-panel p{color:#776b53;font-size:.95rem;line-height:1.65}
.game-skip-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:.8rem}
.game-skip-actions form{flex:1 1 240px;max-width:350px}
.game-skip-actions button{width:100%}
.game-btn-skip{background:#a06b25;color:#fff}
.game-btn-skip:hover{background:#855419}
@media(max-width:620px){.game-score-edit{gap:.25rem}.game-score-step,.game-score-save{padding:.35rem .4rem}.game-score-set input{max-width:100px}.game-skip-actions{flex-direction:column}.game-skip-actions form{max-width:none;flex:auto}}

/* Phase 5.3: equal independent question slots for both teams, retained category cards */
.game-team-points{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem;padding:.8rem;direction:rtl}
.game-team-column{min-width:0;background:#f8f7fb;border-radius:15px;padding:.65rem;display:flex;flex-direction:column;align-items:stretch;gap:.5rem}
.game-team-column h4{font-size:.85rem;font-weight:900;text-align:center;overflow-wrap:anywhere;margin:0;min-height:2rem;display:grid;place-items:center}
.game-team-column.team-one h4{color:#683ad4}.game-team-column.team-two h4{color:#bf6711}
.game-team-column form{margin:0;min-width:0}
.game-team-point{min-height:60px;width:100%;border-radius:13px}
.game-team-column.team-two .game-team-point:not(:disabled){background:#fff0d9;border-color:#ffd39b;color:#995000}
.game-team-column.team-two .game-team-point:hover:not(:disabled){background:#ef910d;color:white}
.game-team-column .game-point-used,.game-team-column .game-point-used:disabled{opacity:.38;filter:grayscale(1);background:#ddd9e1;color:#746d7c;border:1px dashed #b8b2be}
@media(max-width:620px){.game-team-points{gap:.5rem;padding:.6rem}.game-team-column{padding:.4rem}.game-team-column h4{font-size:.76rem}.game-team-point{min-height:56px}}

/* Phase 5.4: clear category selection, separate photo/caption, and match results */
.game-category-choice{min-width:0}
.game-category-choice input[type="checkbox"]{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.game-category-choice:focus-within{outline:3px solid #a38df4;outline-offset:2px}
.game-choice-indicator{inset-inline-end:10px;inset-inline-start:auto;z-index:2;pointer-events:none}
.game-choice-image{height:145px;overflow:hidden;flex-shrink:0}
.game-choice-image img{display:block;max-width:100%;max-height:100%;object-fit:contain}
.game-choice-info{background:#fff;min-height:62px;position:relative;z-index:1;display:flex;flex-direction:column;justify-content:center;padding:.65rem .8rem;gap:.2rem}
.game-choice-info strong,.game-choice-info small{display:block;overflow-wrap:anywhere;line-height:1.45}
.game-end-question{text-align:center;margin:1.5rem auto 0;padding:1rem 0;border-top:1px solid #e8e0f0}
.game-final-result{text-align:center;max-width:840px;margin:2rem auto;padding:clamp(1.4rem,4vw,3rem)}
.game-final-result h1{font-size:clamp(1.65rem,4vw,2.6rem);font-weight:950;margin:.5rem 0}
.game-winner-name{font-size:clamp(1.3rem,3vw,2rem);font-weight:900;color:#6744d7}
.game-final-scores{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin:1.5rem auto}
.game-final-score{border:2px solid #ebe5f7;background:#faf9ff;border-radius:18px;padding:1.3rem .7rem;display:flex;flex-direction:column;gap:.2rem;align-items:center}
.game-final-score.is-winner{border-color:#7857e7;background:#f2edff}
.game-final-score h2{font-size:clamp(1rem,2.4vw,1.35rem);font-weight:900;overflow-wrap:anywhere}
.game-final-score strong{font-size:clamp(2rem,5vw,3rem);font-weight:950;color:#6647d6;font-variant-numeric:tabular-nums}
.game-final-score span{color:#6e6380}
@media(max-width:620px){.game-choice-image{height:125px}.game-choice-info{min-height:70px}.game-final-scores{gap:.55rem}}

/* Phase 5.5: compact question action toolbar; no change to the game controller */
.ss-question-toolbar{display:flex;align-items:center;justify-content:center;gap:.65rem;flex-wrap:wrap;background:#ffffffd9;border:1px solid #e8e1f5;border-radius:22px;padding:.7rem .85rem;margin:0 0 1.15rem;box-shadow:0 8px 24px #34216a0b}
.ss-question-toolbar form{margin:0}
.ss-question-toolbar .ss-tool-end-form{margin-inline-start:auto}
.ss-tool{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-height:44px;padding:.45rem .9rem;border:1px solid transparent;border-radius:999px;font-size:.88rem;font-weight:850;line-height:1.3;white-space:nowrap;cursor:pointer;transition:transform .15s,box-shadow .15s,filter .15s}
.ss-tool:hover{transform:translateY(-2px);box-shadow:0 6px 14px #37247218;filter:saturate(1.1)}
.ss-tool:focus-visible{outline:3px solid #5b3bc2;outline-offset:3px}
.ss-tool-icon{font-size:1.1rem;line-height:1}
.ss-tool-reveal{background:#6c4de5;color:white;box-shadow:0 4px 12px #6c4de52b}
.ss-tool-stay{background:#fff1d2;border-color:#f8d995;color:#8b5812}
.ss-tool-switch{background:#ddf8f5;border-color:#ade9e0;color:#096e6c}
.ss-tool-end{background:#fff0f2;border-color:#f6c9d1;color:#af344e}
@media(max-width:640px){.ss-question-toolbar{gap:.35rem;padding:.55rem;justify-content:space-between}.ss-question-toolbar form{flex:1 1 calc(50% - .35rem)}.ss-question-toolbar .ss-tool-end-form{margin-inline-start:0}.ss-question-toolbar .ss-tool{width:100%;padding:.5rem .4rem;font-size:.77rem;min-height:46px}.ss-tool-icon{font-size:1.05rem}}

/* Phase 5.9: three question-change helps per team */
.game-helps{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;margin:.5rem 0;font-size:.85rem;font-weight:800;color:#66577e}
.game-help-dot{display:inline-grid;place-items:center;width:29px;height:29px;border-radius:50%;background:#ece5ff;color:#6b48e1;border:1px solid #d6c7ff}
.game-help-dot.is-used{filter:grayscale(1);opacity:.33;background:#eee}
.game-helps-number{font-weight:900;color:#6645cb;font-variant-numeric:tabular-nums}
.ss-tool:disabled{opacity:.4;filter:grayscale(1);cursor:not-allowed;transform:none;box-shadow:none}
@media(max-width:620px){.game-helps-title{flex-basis:100%}.game-help-dot{width:26px;height:26px}.ss-tool-label{white-space:normal}}

/* Eligibility: fewer than two unused questions per level cannot support both teams. */
.game-category-choice.game-category-ineligible{opacity:.56;cursor:not-allowed;filter:grayscale(.35);border-style:dashed}
.game-category-ineligible .game-choice-shortage{color:#a22b44;font-weight:800}
.game-category-ineligible .game-choice-indicator{display:none}
