@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--bg:#f4f6f8;--ink:#18302e;--muted:#72817d;--green:#147d65;--mint:#e7f2ec;--line:#e2e8e5;--orange:#e59a35}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px 'DM Sans',Arial,sans-serif}h1,h2,h3,.brand{font-family:Manrope,Arial,sans-serif}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:4px}a{color:inherit;text-decoration:none}button{cursor:pointer;border:0}button:disabled,input:disabled,select:disabled{opacity:.5;cursor:not-allowed}.shell{display:grid;grid-template-columns:244px 1fr;min-height:100vh}.sidebar{background:#fff;border-inline-end:1px solid var(--line);padding:32px 20px;display:flex;flex-direction:column;position:fixed;width:244px;inset-block:0}.brand{font-size:22px;font-weight:800;display:flex;gap:10px;align-items:center}.brand-icon{background:var(--green);color:#fff;border-radius:12px;padding:9px 12px;font-size:22px}.brand small{display:block;font:10px 'DM Sans';letter-spacing:2px;color:var(--muted);margin-top:3px}.nav-label{text-transform:uppercase;font-size:10px;letter-spacing:1.8px;color:#94a19b;margin:38px 16px 12px}.nav a{display:flex;align-items:center;gap:12px;margin:5px 0;padding:13px 16px;border-radius:9px;color:#6e7c76;font-weight:500}.nav a.active{background:var(--mint);color:var(--green);font-weight:700}.nav-icon{width:21px;font-size:19px}.sidebar-bottom{margin-top:auto;padding:20px 12px 0;border-top:1px solid var(--line);color:var(--muted);font-size:12px}.main{grid-column:2}.topbar{height:88px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 42px}.crumb{color:#8a9690;font-size:13px}.account{display:flex;gap:14px;align-items:center}.avatar{background:#eaf1ed;color:var(--green);border-radius:50%;width:38px;height:38px;display:grid;place-items:center;font-weight:700}.lang{border:1px solid var(--line);padding:8px;border-radius:7px;background:white;color:var(--ink)}.content{padding:34px 42px 50px;max-width:1560px;margin:auto}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:26px}h1{font-size:29px;letter-spacing:-1px;margin:0 0 8px}h2{font-size:18px;margin:0 0 8px}h3{font-size:15px;margin:0 0 8px}p{line-height:1.65;margin:8px 0;color:var(--muted)}.eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:700;color:var(--green);text-transform:uppercase}.btn{display:inline-flex;justify-content:center;align-items:center;gap:8px;padding:12px 18px;border-radius:8px;background:var(--green);color:white;font-weight:600;line-height:1.3}.btn.secondary{background:white;border:1px solid var(--line);color:var(--ink)}.btn.danger{background:#fff0ee;color:#b54b44}.btn.small{font-size:12px;padding:8px 11px}.actions{display:flex;gap:9px;flex-wrap:wrap;align-items:center}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:26px}.card,.panel{background:#fff;border:1px solid var(--line);border-radius:13px}.card{padding:21px}.stat-label{color:var(--muted);font-size:12px}.stat-value{font:800 30px Manrope;margin:11px 0 8px}.stat-foot{color:var(--muted);font-size:11px}.stat-icon{float:inline-end;background:var(--mint);color:var(--green);padding:9px;border-radius:9px}.panel{padding:24px;margin-bottom:22px}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:21px;gap:12px}.grid2{display:grid;grid-template-columns:1.55fr 1fr;gap:22px}.hero{background:#173f35;border-radius:13px;padding:30px;color:white;position:relative;overflow:hidden;margin-bottom:24px}.hero:after{content:'?';position:absolute;inset-inline-end:35px;top:-32px;font:bold 220px Manrope;opacity:.08;transform:rotate(13deg)}.hero p{color:#b6d1c4;max-width:430px}.hero h2{font-size:25px;margin:13px 0}.hero .eyebrow{color:#9ad4b8}.hero .btn{margin-top:17px;background:#ecf4dc;color:#1b4f3f}.badge{display:inline-flex;align-items:center;gap:6px;border-radius:20px;padding:6px 10px;font-size:11px;background:var(--mint);color:var(--green);white-space:nowrap}.badge.waiting{background:#fff4df;color:#aa7d26}.badge.revealed{background:#edf0ff;color:#6664ac}.dot{width:6px;height:6px;background:currentColor;border-radius:50%}table{width:100%;border-collapse:collapse;text-align:start}th{text-align:start;font-size:10px;letter-spacing:.7px;color:#86938c;text-transform:uppercase;padding:13px 10px;background:#f8faf9;font-weight:500}td{padding:16px 10px;border-bottom:1px solid #edf0ee;font-size:13px}tr:last-child td{border:0}.table-wrap{overflow:auto}.name{font-weight:600}.subtext{font-size:11px;color:var(--muted);margin-top:5px}.quiz-icon{display:inline-grid;place-items:center;width:34px;height:34px;background:#f1f3ea;border-radius:8px;margin-inline-end:9px;color:#749261}.step{display:flex;gap:14px;margin:21px 0}.step b{background:#eff5ef;color:var(--green);border-radius:50%;width:29px;height:29px;display:grid;place-items:center;flex-shrink:0;font-size:11px}.step p{font-size:12px;margin:4px 0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.field{display:flex;flex-direction:column;gap:8px;margin-bottom:17px}.field label{font-size:12px;font-weight:600}.field input,.field select,.field textarea{border:1px solid #dce4de;border-radius:8px;padding:12px;background:#fff;color:var(--ink);width:100%}.field textarea{min-height:95px;resize:vertical}.field small{color:var(--muted);line-height:1.6}.check{display:flex;gap:10px;align-items:center;margin:15px 0}.empty{padding:35px 15px;text-align:center;color:var(--muted)}.player-header{padding:25px 6vw;display:flex;justify-content:space-between;align-items:center;background:#fff;border-bottom:1px solid var(--line)}.logo{max-width:100px;max-height:60px;object-fit:contain}.logo-placeholder{font-size:11px;letter-spacing:1px;color:#6a8175;text-align:center;line-height:1.7}.player-main{max-width:1060px;margin:55px auto;padding:0 24px}.welcome{display:grid;grid-template-columns:1.2fr 1fr;gap:65px;align-items:center}.welcome h1{font-size:53px;line-height:1.15;margin:18px 0 20px}.welcome p{font-size:16px}.welcome .panel{box-shadow:0 15px 50px #173f3509;padding:32px}.illustration{margin-top:28px;display:flex;gap:10px;align-items:center}.illustration span{display:grid;place-items:center;width:49px;height:49px;border-radius:14px;background:#e5eee4;font-size:22px}.notice{padding:13px 16px;border-radius:8px;background:#fff5e3;color:#997022;font-size:12px;line-height:1.7;margin:15px 0}.question-layout{display:grid;grid-template-columns:1fr 270px;gap:28px}.question-image{width:100%;max-height:350px;object-fit:contain;border-radius:12px}.option{display:flex;gap:15px;align-items:center;width:100%;text-align:start;padding:18px;border:1px solid var(--line);background:#fff;border-radius:10px;margin:12px 0;color:var(--ink);cursor:pointer}.option:hover{border-color:var(--green);background:#f1f8f3}.option .letter{border:1px solid var(--line);border-radius:6px;width:30px;height:30px;display:grid;place-items:center;font-size:12px}.option:has(input:checked){background:var(--mint);border-color:var(--green)}.timer{font:800 36px Manrope;color:var(--green)}.timer.urgent{color:#c65542}.progress{background:#edf1ed;height:5px;border-radius:4px;margin:22px 0;overflow:hidden}.progress i{height:100%;display:block;background:var(--green)}.cells{display:flex;flex-wrap:wrap;gap:5px}.cell{display:grid;place-items:center;background:#edf0ee;color:#96a09a;border-radius:6px;width:29px;height:29px;font-size:11px}.cell.answered{background:#fff0da;color:#c38b32}.cell.correct{background:#dff3e7;color:#187e4c}.cell.wrong{background:#fbe2df;color:#ba544c}.winner{background:#fffbee;box-shadow:inset 3px 0 #d8af45}.result{display:flex;gap:16px;padding:17px 0;border-bottom:1px solid var(--line)}.blur{filter:blur(8px);user-select:none;pointer-events:none}.result-lock{text-align:center;padding:25px}.toolbar{display:flex;gap:15px;align-items:center;margin-bottom:20px}.toolbar select{border:1px solid var(--line);padding:11px;border-radius:7px;background:white;min-width:200px}#toast{position:fixed;bottom:25px;inset-inline-end:25px;max-width:430px;padding:16px 22px;background:#173f35;color:white;border-radius:10px;z-index:50;display:none;box-shadow:0 5px 20px #0002}#toast.error{background:#a54439}.login{max-width:430px;margin:70px auto}.footer{margin-top:45px;text-align:center;color:#95a198;font-size:11px}.code{background:#e7f2ec;border:1px dashed #8bb5a0;border-radius:9px;padding:18px;font:bold 22px monospace;letter-spacing:3px;overflow-wrap:anywhere}.link{color:var(--green);background:none;padding:4px;font-size:12px}.mobile-brand{display:none}.question-number{color:var(--muted);font-size:12px;letter-spacing:1px}.live{display:inline-flex;gap:7px;align-items:center;font-size:11px;color:var(--green)}.live:before{content:'';width:6px;height:6px;border-radius:50%;background:#2baf77}.legend{display:flex;gap:14px;font-size:11px;color:var(--muted);flex-wrap:wrap}.legend span{display:flex;align-items:center;gap:6px}.legend i{width:8px;height:8px;border-radius:3px;background:#edf0ee}.legend .orange{background:#f1b65f}.legend .green{background:#4eab78}.legend .red{background:#d36e65}dialog{border:1px solid var(--line);border-radius:14px;padding:28px;max-width:650px;width:95%;max-height:90vh;overflow:auto;color:var(--ink)}dialog::backdrop{background:#14392c66}.full{width:100%}.muted{color:var(--muted)}.info-row{display:flex;justify-content:space-between;padding:14px 0;border-bottom:1px solid var(--line);font-size:12px}
@media(min-width:1550px){.content{padding-top:45px}}@media(max-width:1050px){.cards{grid-template-columns:repeat(2,1fr)}.grid2{grid-template-columns:1fr}.content{padding:28px}.topbar{padding:0 28px}.welcome{gap:25px}.welcome h1{font-size:38px}}@media(max-width:750px){.shell{display:block}.sidebar{position:static;width:auto;padding:15px}.sidebar .brand,.nav-label,.sidebar-bottom{display:none}.nav{display:flex;overflow:auto;gap:4px}.nav a{padding:10px;font-size:11px;white-space:nowrap;margin:0}.nav-icon{display:none}.topbar{height:66px;padding:0 18px}.account .user-name{display:none}.content{padding:24px 16px}.page-heading{align-items:flex-start}h1{font-size:25px}.cards{gap:10px}.card{padding:16px}.form-grid,.welcome,.question-layout{grid-template-columns:1fr}.welcome h1{font-size:38px}.player-main{margin:30px auto}.player-header{padding:18px}.question-image{max-height:200px}.panel{padding:18px}.brand{font-size:18px}.grid2{gap:0}.page-heading .btn{padding:10px;font-size:12px}.hero{padding:24px}}

.first-place{outline:2px solid #d8af45;outline-offset:-2px}.first-place td:first-child{font-weight:800;color:#9d7422}html[lang=ar] body,html[lang=ar] h1,html[lang=ar] h2,html[lang=ar] h3{font-family:Tahoma,Arial,sans-serif}html[lang=ar] body{line-height:1.7}


.tie-group{display:flex;justify-content:space-between;align-items:center;gap:18px;background:#fff7e5;border:1px solid #f0dfb6;border-radius:10px;padding:15px;margin:16px 0}input[type=checkbox]{accent-color:var(--green);width:16px;height:16px;cursor:pointer}.toolbar{flex-wrap:wrap}.shell:has(a[href='#tiebreak-admin'].active) .panel{overflow:hidden}@media(max-width:750px){.tie-group{align-items:flex-start;flex-direction:column}}

.sidebar>.school-brand{box-sizing:border-box;display:flex;align-items:center;justify-content:center;max-width:100%;max-height:95px;flex-shrink:0;overflow:hidden}.sidebar>.school-brand img{display:block;width:190px;max-width:100%;height:85px;max-height:85px;object-fit:contain;position:static}
@media(min-width:751px){
 .sidebar{height:100vh;height:100dvh;max-height:100vh;max-height:100dvh;min-height:0;padding:16px 14px;overflow:hidden}
 .sidebar>.brand,.sidebar>.nav-label,.sidebar>.sidebar-bottom{flex-shrink:0}
 .sidebar>.nav-label{margin:12px 10px 8px;line-height:1.3}
 .sidebar>.nav{display:flex;flex-direction:column;justify-content:flex-start;gap:2px;flex:1 1 0;min-height:0;overflow:visible;scrollbar-width:none;scrollbar-gutter:auto}
 .sidebar>.nav a{flex:0 1 40px;min-height:28px;margin:0;padding:5px 10px;gap:9px;font-size:13px;line-height:1.3;scroll-margin-block:0}
 .sidebar .nav-icon{font-size:18px;width:20px;flex-shrink:0}
 .sidebar>.sidebar-bottom{margin-top:10px;padding:8px 10px 0;font-size:11px;line-height:1.3}
 .sidebar>.sidebar-bottom p{margin:4px 0;line-height:1.4}
}
@media(min-width:751px) and (max-height:650px){.sidebar>.sidebar-bottom{display:none}}
@media(min-width:751px) and (max-height:500px){.sidebar{padding-block:12px}.sidebar>.nav-label{display:none}.sidebar>.school-brand{height:64px!important;max-height:64px!important}.sidebar>.school-brand img{height:64px!important;max-height:64px!important}.sidebar>.nav a{flex-basis:34px;min-height:26px;padding-block:4px;font-size:12px}}
@media(min-width:751px) and (max-height:380px){.sidebar{position:absolute;height:auto;min-height:100vh;max-height:none;overflow:visible}.sidebar>.nav{flex:0 0 auto}.sidebar>.nav a{flex:0 0 auto}}
