@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Noto+Sans+Arabic:wght@400;500;600;700;800&display=swap');
:root{--ink:#382c4b;--muted:#82788b;--paper:#f8f5f0;--line:#e8e0d8;--copper:#aa7256;--violet:#8d70a9;--green:#4c8166;--cream:#fffcf7;--font:'Noto Sans Arabic',Tahoma,Arial,sans-serif;--header:82px;--rail:300px;--control:100px}*{box-sizing:border-box}body{margin:0;font-family:var(--font);background:var(--paper);color:var(--ink);line-height:1.8;font-size:clamp(13px,.95vw,17px)}button,input,select{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #be8c63;outline-offset:3px}button:disabled{opacity:.45;cursor:not-allowed}header{height:var(--header);display:flex;align-items:center;justify-content:space-between;padding:0 clamp(20px,4vw,65px);border-bottom:1px solid var(--line);background:var(--cream);position:sticky;top:0;z-index:20}.brand{display:flex;gap:13px;align-items:center;font-weight:700;font-size:20px}.brand>span{font-family:Amiri,serif;font-size:37px;border:1px solid #d4b9a2;border-radius:50%;width:46px;height:46px;text-align:center;line-height:1.2;color:var(--copper)}.brand small{display:block;font-size:9px;color:var(--muted);font-weight:500;letter-spacing:.5px}.connection{font-size:11px;color:var(--muted);display:flex;gap:8px;align-items:center}.connection:before{content:'';width:6px;height:6px;background:var(--green);border-radius:50%}.connection.offline:before{background:#bf7960}main{max-width:1280px;margin:auto;padding:clamp(25px,4vw,65px);min-height:calc(100dvh - var(--header))}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(29px,3.1vw,49px);line-height:1.6;margin-bottom:20px;font-weight:800}h2{font-size:clamp(22px,2vw,31px);line-height:1.6}h3{font-size:clamp(15px,1.1vw,19px);margin-bottom:10px}.muted{color:var(--muted)}.eyebrow{font-size:11px;letter-spacing:.5px;color:var(--copper);font-weight:700}.lead{font-size:clamp(15px,1.25vw,20px);color:#6d6377;max-width:760px}.btn,.outline{display:inline-flex;align-items:center;justify-content:center;gap:10px;border-radius:8px;padding:12px 24px;border:1px solid transparent;font-weight:600;font-size:13px}.btn{background:var(--ink);color:var(--cream)}.btn:hover:not(:disabled){background:#58446d}.btn.gold{background:var(--copper)}.outline{background:transparent;border-color:#d9cdc0;color:var(--ink)}.outline:hover:not(:disabled){background:#eee7de}.small{padding:7px 13px;font-size:11px}.actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.plain{border:0;background:transparent;color:var(--muted);padding:5px;font-size:11px}.landing{display:grid;grid-template-columns:1.2fr .8fr;align-items:center;gap:60px;min-height:550px}.landing h1{font-size:clamp(36px,4.5vw,64px)}.landing em{font-family:Amiri,serif;color:var(--copper);font-style:normal;font-weight:400;font-size:1.2em}.landing .actions{margin-top:30px}.landing-art{position:relative;text-align:center;background:radial-gradient(ellipse,#ebe2db,transparent 68%);padding:35px 0}.avatars-art{display:flex;justify-content:center;align-items:flex-end;gap:0}.avatars-art svg:nth-child(1){transform:rotate(-10deg) translateX(-18px)}.avatars-art svg:nth-child(2){transform:translateY(-20px);z-index:1}.avatars-art svg:nth-child(3){transform:rotate(10deg) translateX(18px)}.art-letter{font-family:Amiri,serif;font-size:70px;color:var(--copper);margin-bottom:18px}.note{font-size:11px;color:var(--muted);margin-top:18px}.landing-bottom{border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(3,1fr);gap:25px;padding-top:30px}.landing-bottom p{font-size:12px;color:var(--muted)}.badge{display:inline-block;background:#eee5f4;border-radius:5px;padding:4px 10px;font-size:10px;color:#73548c}.badge.group{background:#f1e2ca;color:#8a6b34}.panel{background:var(--cream);border:1px solid var(--line);border-radius:13px;padding:clamp(20px,2.5vw,38px)}.page-top{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:26px}.page-top h1{margin:6px 0 0;font-size:clamp(23px,2vw,32px)}.progress{height:4px;background:#e9e0d7;border-radius:4px;margin-bottom:32px;overflow:hidden}.progress div{height:100%;background:var(--copper);transition:width .3s}.session-title{font-size:10px;color:var(--muted)}.teacher main{margin-left:var(--rail);max-width:none;padding-bottom:calc(var(--control) + 35px)}.teacher header{padding-left:calc(var(--rail) + 30px)}#scorebar{position:fixed;left:0;top:var(--header);bottom:0;width:var(--rail);z-index:15;background:var(--ink);color:white;padding:25px 18px;display:flex;flex-direction:column;gap:14px}#scorebar[hidden],#controls[hidden]{display:none}.score-heading{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #68556f;padding-bottom:17px;font-size:12px}.score-heading small{font-size:10px;color:#d1c0db}.score-list{overflow:auto;flex:1;scrollbar-width:thin;scrollbar-color:#9881a9 transparent}.score-student{display:flex;align-items:center;gap:11px;padding:9px 6px;border-radius:7px;transition:background .3s}.score-student:hover{background:#51425f}.score-student svg{width:47px;height:52px;flex-shrink:0}.score-student .info{flex:1;min-width:0}.score-student .name{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.score-student small{font-size:9px;color:#bbaaC7;display:block}.score-student b{font-family:Amiri,serif;font-size:26px;font-weight:400}.score-student .rank{font-size:9px;color:#dbbc8d}.score-empty{font-size:12px;color:#c6b7d3;line-height:2.2}#controls{position:fixed;bottom:0;right:0;left:var(--rail);min-height:var(--control);padding:18px clamp(20px,4vw,55px);border-top:1px solid var(--line);background:#fffaf3f2;backdrop-filter:blur(10px);display:flex;align-items:center;justify-content:space-between;gap:20px;z-index:16}.controls-caption{font-size:11px;color:var(--muted)}.duration{display:flex;align-items:center;gap:10px;font-size:11px;color:var(--muted)}select,input{border:1px solid var(--line);border-radius:6px;padding:10px;background:var(--cream);color:var(--ink)}.duration select{padding:5px 8px;max-width:110px}.welcome-grid{display:grid;grid-template-columns:1fr 260px;gap:32px;align-items:center}.qr-box{text-align:center;background:white;border:1px solid var(--line);border-radius:12px;padding:20px}.qr-box svg{width:100%;height:auto;max-width:220px}.qr-box .code{font-size:24px;font-weight:700;letter-spacing:4px;direction:ltr;margin:10px 0}.qr-box p{font-size:10px;color:var(--muted);margin-bottom:0}.room-link{direction:ltr;font-size:10px;color:var(--muted);overflow-wrap:anywhere}.lesson-card h2{font-size:clamp(28px,3vw,43px)}.concepts{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:15px;margin:28px 0}.concept{background:#f2ecf5;border-top:3px solid #b69dc8;border-radius:8px;padding:22px}.concept:nth-child(2){background:#f6eddf;border-color:#ccb08b}.concept:nth-child(3){background:#edf3ec;border-color:#98b395}.concept p{font-size:clamp(13px,1.1vw,18px);color:#716478}.letters{font-family:Amiri,serif;font-size:clamp(22px,2vw,33px);color:var(--copper)}.example{font-family:Amiri,serif;text-align:center;font-size:clamp(32px,3vw,52px);padding:15px;background:#f3ede6;border-radius:9px;margin:22px 0}.hint{background:#f7eddd;border-right:3px solid #c5a168;padding:15px 20px;border-radius:5px;font-size:clamp(12px,1vw,16px);margin-top:22px}.explain-list article{padding:13px 0;border-bottom:1px solid var(--line)}.explain-list p{color:var(--muted);font-size:clamp(12px,1vw,17px);margin-bottom:0}.question-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;gap:20px}.clock{display:flex;align-items:center;gap:12px}.clock b{font-family:Amiri,serif;font-size:clamp(32px,3vw,46px);font-weight:400;line-height:1;direction:ltr;font-variant-numeric:tabular-nums}.clock span{font-size:10px;color:var(--muted)}.clock.urgent{color:#b76451}.timer-track{height:4px;background:var(--line);border-radius:3px;margin:20px 0;overflow:hidden}.timer-track div{background:var(--violet);height:100%;transition:width .25s linear}.question-text{font-size:clamp(24px,2.7vw,42px);margin:18px 0 30px}.options{display:grid;gap:12px}.option{position:relative;overflow:hidden;display:flex;align-items:center;gap:16px;padding:17px 20px;min-height:70px;border:1px solid var(--line);border-radius:9px;background:#fffdf9;text-align:right;color:var(--ink);width:100%;font-size:clamp(14px,1.2vw,20px)}button.option:hover:not(:disabled){border-color:#a488b9;background:#f2eaf7}.option>.letter{z-index:1;flex-shrink:0;width:32px;height:32px;background:#efe6f6;border-radius:8px;display:grid;place-items:center;font-size:12px}.option>.text{z-index:1;flex:1}.option>.answer-rate{z-index:1;text-align:left;min-width:58px;font-size:15px;font-weight:700}.answer-rate small{display:block;font-size:9px;color:var(--muted);font-weight:400}.option .fill{position:absolute;right:0;top:0;bottom:0;background:#dfd3eb99;transition:width .6s ease}.option.selected{border:2px solid #9272ab;background:#f1e8f7}.option.correct{border:2px solid #7f9e75;background:#eef5e9}.option.correct .fill{background:#c9dfb8aa}.option.correct>.letter{background:#d2e4c4}.option.wrong{border-color:#ce9c88;background:#f9eee9}.submitted{font-size:12px;color:var(--muted);display:flex;justify-content:space-between;margin-bottom:15px}.feedback{background:#ecf3e7;border-radius:9px;padding:20px;margin-top:20px;font-size:clamp(13px,1.1vw,18px)}.feedback strong{display:block;color:#3d6e4b;margin-bottom:5px}.feedback.neutral{background:#f2ece4}.live-table{margin-top:22px;overflow:auto}.live-table table{width:100%;border-collapse:collapse;font-size:11px}.live-table td,.live-table th{padding:10px;text-align:right;border-bottom:1px solid var(--line);white-space:nowrap}.live-table th{font-weight:500;color:var(--muted)}.team-marker{display:inline-block;width:7px;height:7px;border-radius:50%;margin-left:6px;background:var(--violet)}.team-marker[data-team="1"]{background:#ab8166}.team-marker[data-team="2"]{background:#638772}.team-marker[data-team="3"]{background:#7693af}.player main{max-width:760px;padding-top:25px}.player-strip{display:flex;align-items:center;justify-content:space-between;gap:16px;background:var(--ink);color:white;border-radius:12px;padding:13px 20px;margin-bottom:25px;position:sticky;top:calc(var(--header) + 10px);z-index:10;box-shadow:0 8px 24px #382c4b15}.player-identity{display:flex;align-items:center;gap:12px;min-width:0}.player-identity svg{width:53px;height:58px;flex-shrink:0}.player-identity b{font-size:14px;display:block}.player-identity small{display:block;font-size:10px;color:#cdbddd}.my-score{display:flex;gap:22px;text-align:center;flex-shrink:0}.my-score b{display:block;font-family:Amiri,serif;font-size:27px;font-weight:400;line-height:1.3}.my-score span{font-size:9px;color:#d3c1df}.wait-card{text-align:center;padding:40px 20px}.wait-card .icon{font-family:Amiri,serif;font-size:75px;color:var(--copper);margin-bottom:10px}.wait-card h2{font-size:25px}.wait-card p{font-size:13px;color:var(--muted)}.waiting-dots{display:flex;gap:5px;justify-content:center;margin:25px}.waiting-dots i{width:6px;height:6px;background:#b59eca;border-radius:50%;animation:pulse 1.5s infinite}.waiting-dots i:nth-child(2){animation-delay:.2s}.waiting-dots i:nth-child(3){animation-delay:.4s}@keyframes pulse{50%{opacity:.3;transform:translateY(-3px)}}.join-card{max-width:530px;margin:20px auto;text-align:center}.field{text-align:right;margin:20px 0}.field label{display:block;font-size:12px;margin-bottom:8px}.field input,.field select{width:100%;padding:12px}.field small{font-size:10px;color:var(--muted)}.join-avatar{display:flex;justify-content:center;margin-bottom:20px}.team-votes{margin-top:25px;padding-top:20px;border-top:1px solid var(--line)}.team-votes p{font-size:11px;color:var(--muted)}.vote-line{display:flex;align-items:center;justify-content:space-between;font-size:11px;gap:10px;margin:8px 0}.vote-line .badge{font-size:9px}.finish{max-width:800px;margin:auto}.podium{text-align:center;padding:35px;background:var(--ink);border-radius:12px;color:white;margin-bottom:25px}.podium h2{color:#ead3b7;font-size:32px}.podium p{color:#d5c6df;font-size:12px}.podium-avatars{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin:20px 0}.podium-avatars svg{width:80px;height:88px}.result-row{display:flex;align-items:center;gap:15px;padding:12px 0;border-bottom:1px solid var(--line)}.result-row svg{width:55px;height:60px;flex-shrink:0}.result-row .person{flex:1;min-width:0}.result-row b{font-size:13px}.result-row small{display:block;color:var(--muted);font-size:10px}.result-row .rank{font-family:Amiri,serif;font-size:27px;color:var(--copper);width:30px}.result-row .points{font-family:Amiri,serif;font-size:29px}.result-row.me{background:#eee5f5;border-radius:8px;padding-left:12px;padding-right:12px}dialog{border:1px solid var(--line);border-radius:14px;background:var(--paper);color:var(--ink);padding:28px;width:min(640px,94vw);max-height:88dvh}dialog::backdrop{background:#2b203973;backdrop-filter:blur(4px)}.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.modal-head h2{font-size:22px;margin:0}.close{border:0;background:none;color:var(--muted);font-size:24px;cursor:pointer}.teacher-management{overflow:auto;max-height:55dvh}.manage-row{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid var(--line);flex-wrap:wrap}.manage-row svg{width:45px;height:50px}.manage-row .name{flex:1;font-size:12px;min-width:100px}.manage-row select{font-size:10px;max-width:100px}.qr-modal{text-align:center}.qr-modal svg{width:min(75%,300px);height:auto}.rules{padding-right:22px;font-size:12px;color:var(--muted)}.rules li{margin-bottom:12px}#toast{position:fixed;bottom:130px;left:50%;transform:translate(-50%,12px);z-index:70;background:#382c4bea;backdrop-filter:blur(6px);color:white;padding:13px 22px;border-radius:9px;font-size:12px;max-width:90vw;opacity:0;pointer-events:none;transition:.2s}#toast.show{opacity:1;transform:translate(-50%,0)}.player #toast{bottom:30px}.question-confirm{margin-top:22px;width:100%}.offline-banner{background:#f7e6dc;color:#986750;padding:10px;border-radius:5px;font-size:12px;margin-bottom:15px}.sponsor{font-size:10px;color:var(--muted);text-align:center;margin-top:30px}.network-retry{text-align:center;padding:30px}.button-block{width:100%}.teacher-hint{font-size:11px;color:var(--muted);margin-top:20px}.waiting-start{padding:20px;background:#f3eafa;border-radius:8px;color:#735c8c;font-size:13px;margin-bottom:20px}
@media(min-width:1700px){:root{--rail:350px;--header:95px;--control:110px}.score-student .name{font-size:14px}.score-student svg{width:58px;height:64px}.teacher main{max-width:1700px;margin-right:auto}.lesson-card .lead{max-width:1100px}}@media(max-width:1100px){:root{--rail:250px}.teacher main{padding:28px 24px 140px}.teacher header{padding:0 25px;padding-left:calc(var(--rail) + 20px)}.welcome-grid{grid-template-columns:1fr 180px;gap:20px}.score-student svg{width:38px;height:42px}.score-student .name{font-size:10px}.score-student b{font-size:22px}.landing{gap:20px}.avatars-art svg{width:95px;height:104px}}@media(max-width:750px){:root{--header:72px;--rail:0px;--control:90px}header,.teacher header{padding:0 17px}.brand{font-size:17px;gap:10px}.brand>span{width:36px;height:36px;font-size:29px}.brand small{font-size:8px}.connection{font-size:9px}main{padding:25px 20px}.landing{grid-template-columns:1fr;gap:15px;min-height:0}.landing-art{padding:15px 0 25px}.landing h1{font-size:39px;margin-bottom:15px}.landing .lead{font-size:14px}.landing-bottom{grid-template-columns:1fr;gap:5px}.landing-bottom h3{font-size:14px;margin-bottom:5px}.landing-bottom p{font-size:11px}.landing .actions{margin-top:20px}.teacher main{margin-left:0;padding:24px 17px 235px}.teacher #scorebar{top:auto;bottom:0;right:0;left:0;width:100%;height:110px;padding:10px 12px;display:block}.score-heading{border:0;font-size:9px;padding:0 3px 5px}.score-heading small{font-size:8px}.score-list{display:flex;gap:8px;overflow-x:auto;overflow-y:hidden;padding:0 2px;height:68px;scrollbar-width:thin}.score-student{min-width:132px;padding:3px;gap:6px}.score-student svg{width:37px;height:41px}.score-student .name{max-width:78px;font-size:9px}.score-student small{font-size:8px}.score-student b{font-size:21px}.score-student .rank{font-size:8px}.teacher #controls{bottom:110px;left:0;padding:12px 17px;min-height:88px;gap:10px}.controls-caption{font-size:9px;max-width:160px}.duration{font-size:9px;gap:4px}.duration select{font-size:10px;padding:4px}.controls-caption .plain{display:none}.teacher #controls .btn{padding:9px 17px;font-size:12px}.welcome-grid{grid-template-columns:1fr;gap:25px}.qr-box{max-width:240px;margin:auto}.panel{padding:20px}.lesson-card h2{font-size:27px}.concepts{margin:22px 0}.page-top{margin-bottom:18px;align-items:flex-start}.page-top h1{font-size:22px}.page-top .actions{gap:6px}.page-top .small{font-size:9px;padding:6px 9px}.progress{margin-bottom:23px}.question-text{font-size:23px;margin-bottom:20px}.option{font-size:13px;padding:14px 12px;gap:10px;min-height:65px}.option>.letter{width:28px;height:28px;font-size:11px}.answer-rate{font-size:13px!important}.answer-rate small{font-size:8px}.player main{padding:17px 15px 40px}.player-strip{padding:10px 13px;gap:10px;top:calc(var(--header) + 5px)}.player-identity{gap:9px}.player-identity svg{width:44px;height:49px}.player-identity b{font-size:12px;max-width:130px;overflow-wrap:anywhere}.player-identity small{font-size:9px}.my-score{gap:15px}.my-score b{font-size:24px}.my-score span{font-size:8px}.wait-card{padding:30px 10px}.wait-card h2{font-size:22px}.live-table th,.live-table td{font-size:10px;padding:9px 7px}.finish .panel{padding:15px}.result-row{gap:9px}.result-row svg{width:46px;height:51px}.result-row .rank{width:23px;font-size:23px}.result-row .points{font-size:24px}#toast{bottom:215px;min-width:220px;text-align:center}.teacher .hint{font-size:11px}.join-card{margin-top:0}.modal-head h2{font-size:19px}.manage-row .name{min-width:70px}.avatars-art svg{width:95px;height:104px}.teacher-hint{font-size:10px}}@media(max-width:370px){.player-identity svg{width:35px;height:39px}.player-identity b{max-width:100px}.my-score{gap:10px}.page-top{flex-direction:column}.landing h1{font-size:33px}.connection{font-size:8px}.brand{font-size:15px}.score-student{min-width:120px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}@media print{#header,#scorebar,#controls,.actions{display:none}.teacher main{margin:0;padding:0}.panel{break-inside:avoid}body{background:white}}

.chibi{display:inline-flex;align-items:center;justify-content:center;background:var(--avatar-bg,#eee6f3);border-radius:18%;overflow:hidden;flex-shrink:0;vertical-align:middle}.chibi img{display:block;width:100%;height:100%;object-fit:contain;max-width:100%;padding:3%;}.avatars-art>.chibi:nth-child(1){transform:rotate(-10deg) translateX(-18px)}.avatars-art>.chibi:nth-child(2){transform:translateY(-20px);z-index:1}.avatars-art>.chibi:nth-child(3){transform:rotate(10deg) translateX(18px)}.score-student .chibi{width:47px!important;height:52px!important}.player-identity .chibi{width:53px!important;height:58px!important}.result-row .chibi{width:55px!important;height:60px!important}.manage-row .chibi{width:45px!important;height:50px!important}.podium-avatars .chibi{width:80px!important;height:88px!important}.avatar-change{background:none;border:0;padding:0;display:flex;cursor:pointer;flex-shrink:0;border-radius:10px}.choose-character{text-align:right;margin:20px 0}.choose-character summary{cursor:pointer;color:var(--copper);font-size:12px}.character-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(92px,1fr));gap:10px;margin-top:18px}.character-choice{border:1px solid var(--line);border-radius:10px;padding:10px 6px;background:var(--cream);display:flex;align-items:center;flex-direction:column;gap:7px;color:var(--ink)}.character-choice:hover,.character-choice.selected{border-color:var(--violet);background:#f1e9f7}.character-choice>span:last-child{font-size:11px}.player-identity small{max-width:230px;overflow-wrap:anywhere}.score-student small{white-space:normal;line-height:1.6}.manage-row select{max-width:160px}.live-table td{white-space:normal;min-width:75px}@media(max-width:1100px){.score-student .chibi{width:38px!important;height:42px!important}.avatars-art .chibi{width:95px!important;height:104px!important}}@media(max-width:750px){.score-student .chibi{width:37px!important;height:41px!important}.player-identity .chibi{width:44px!important;height:49px!important}.result-row .chibi{width:46px!important;height:51px!important}.character-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.player-identity small{max-width:150px;font-size:8px}.score-student small{max-width:78px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.score-student .name{max-width:78px}.manage-row select{max-width:125px}}@media(max-width:370px){.player-identity .chibi{width:35px!important;height:39px!important}.player-identity small{max-width:110px}.character-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.score-team{padding-bottom:14px;margin-bottom:14px;border-bottom:1px solid #68556f}.score-team-title{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#51415f;border-radius:7px;padding:9px 10px;margin-bottom:7px}.score-team-title b{font-size:11px;font-weight:600;line-height:1.7}.score-team-title small{font-size:8px;color:#d1bfdc;white-space:nowrap}.score-team-empty{font-size:10px;color:#bdacc9;margin:10px}.score-team-members{display:flex;flex-direction:column}.score-team:last-child{border-bottom:0;margin-bottom:0}@media(max-width:750px){.teacher #scorebar{height:136px}.teacher #controls{bottom:136px}.teacher main{padding-bottom:265px}.score-list{height:100px;align-items:stretch}.score-team{flex-shrink:0;min-width:135px;display:flex;flex-direction:column;border:0;border-left:1px solid #68556f;padding:0 9px 0 5px;margin:0}.score-team-title{padding:4px 7px;margin:0 0 4px;gap:8px;min-height:25px}.score-team-title b{font-size:9px}.score-team-title small{font-size:7px}.score-team-members{flex-direction:row;align-items:center}.score-team-empty{font-size:9px;margin:8px}.score-heading{font-size:8px}.score-heading small{font-size:7px}#toast{bottom:240px}}
/* Pose-by-pose anime motion, transparent within the teacher roster. */
.chibi{background:transparent;border-radius:0;overflow:visible;position:relative}
.chibi img{padding:0}
.chibi.has-anime-motion>img{visibility:hidden}
.anime-motion{display:block;position:absolute;inset:0;overflow:hidden;width:100%;height:100%;aspect-ratio:1}
.chibi .anime-motion{height:auto;top:auto;bottom:0;aspect-ratio:1}
.anime-points{position:absolute;top:-6px;right:-6px;border-radius:12px;padding:1px 5px;color:#275b38;background:#fff7dd;font-weight:800;font-size:12px;z-index:2}
.anime-result-screen{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:24px;border:0;border-radius:0;background:radial-gradient(ellipse at 50% 35%,#fffaf0,#efe4ef);color:#382c4b;overflow:auto;box-sizing:border-box}
.anime-result-screen::backdrop{background:#382c4b}
.anime-result-screen.lose{background:radial-gradient(ellipse at 50% 35%,#f5f2fa,#ddd9e9)}
.anime-result-content{min-height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;gap:12px}
.anime-result-content>.anime-motion{position:relative;inset:auto;width:min(76vw,58dvh,560px);height:auto;flex-shrink:0;aspect-ratio:1}
.anime-result-content h2{font-size:clamp(25px,5vw,42px);margin:0}
.anime-earned{font-size:clamp(20px,4vw,30px);font-weight:800;color:#2c6543;margin:0}
.anime-result-answer{font-size:clamp(16px,3vw,22px);max-width:650px;margin:0 0 8px}
@media(max-height:500px){.anime-result-content{gap:6px}.anime-result-content>.anime-motion{width:min(40vw,44dvh)}.anime-result-screen{padding:12px}.anime-result-content h2{font-size:23px}}
html.anime-screen-open,html.anime-screen-open body{overflow:hidden}
.anime-motion.motion-loading{background-image:none!important}
.anime-motion>img{width:100%;height:100%;object-fit:contain;display:none}
.anime-motion.motion-loading>img{display:block}

.anime-motion>canvas{display:block;width:100%;height:100%;object-fit:contain}
.anime-motion.motion-loading>canvas{display:none}
.anime-motion>canvas{position:absolute;inset:0}
/* Animated selection and the shared end-of-class awards ceremony. */
.join-avatar{display:flex;justify-content:center;margin:12px 0}
.join-card .character-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-height:340px;overflow:auto;padding:5px}
.join-card .character-choice{padding:6px 3px}
.ambient-avatar{position:relative;flex-shrink:0}
.ceremony-heading{text-align:center;max-width:720px;margin:15px auto 35px}
.ceremony-heading h2{font-size:clamp(25px,3vw,40px);margin:8px 0}
.ceremony-heading p{font-size:13px;color:var(--muted);margin:0 0 10px}
.ceremony-heading small{font-size:11px;color:var(--copper)}
.ceremony-stage{background:radial-gradient(ellipse at 50% 0%,#f3e9fa,transparent 65%);padding:20px 10px 30px;border-bottom:1px solid var(--line)}
.podium-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:end;direction:ltr}
.podium-column{display:flex;flex-direction:column;gap:18px;direction:rtl;min-width:0}
.rank-step{min-width:0;display:flex;flex-direction:column;justify-content:end;text-align:center}
.podium-people{display:flex;align-items:flex-end;justify-content:center;flex-wrap:wrap;gap:1px 3px;padding:0 4px}
.podium-person{margin:0;display:flex;align-items:center;flex-direction:column;justify-content:end;position:relative;max-width:100%}
.podium-person figcaption{font-size:9px;max-width:90px;overflow-wrap:anywhere;line-height:1.5;color:var(--ink);padding:3px 5px;border-radius:5px;margin-bottom:3px}
.podium-person.is-me figcaption{background:#eee2f7;outline:1px solid #b293c9;font-weight:800}
.podium-person .chibi{width:clamp(48px,6.5vw,90px)!important;height:clamp(53px,7.1vw,99px)!important}
.rank-plinth{min-height:var(--step-height);padding:14px 8px;display:flex;align-items:center;justify-content:center;flex-direction:column;border-radius:9px 9px 3px 3px;background:linear-gradient(135deg,#e4dae8,#c9b7d6);border:1px solid #bba4cb;box-shadow:0 8px 0 #b9a4c4,0 13px 20px #382c4b15;gap:4px}
.rank-1 .rank-plinth{background:linear-gradient(135deg,#e6faff,#b9deed,#d9d5f7);border-color:#8fbccf;box-shadow:0 9px 0 #93b3c7,0 15px 24px #382c4b15}
.rank-2 .rank-plinth{background:linear-gradient(135deg,#fff0bd,#e8c16b);border-color:#c9a250;box-shadow:0 8px 0 #be9345,0 15px 20px #382c4b15}
.rank-3 .rank-plinth{background:linear-gradient(135deg,#f3f5fc,#c8cedb);border-color:#aeb5c4;box-shadow:0 7px 0 #9ea7b6,0 15px 20px #382c4b15}
.rank-plinth>b{font-size:clamp(12px,1.3vw,18px);overflow-wrap:anywhere;line-height:1.7}
.ceremony-place{font-size:12px}.ceremony-score{font-size:12px}.rank-plinth small{font-size:9px}
.ceremony-medal{display:flex;align-items:center;gap:5px;font-weight:700;font-size:10px;position:relative;--medal:#af95c9}
.ceremony-medal.diamond{--medal:#87cadc}.ceremony-medal.gold{--medal:#d3a33b}.ceremony-medal.silver{--medal:#9da8bb}.ceremony-medal.bronze{--medal:#b77e58}.ceremony-medal.emerald{--medal:#5a9c7d}.ceremony-medal.ruby{--medal:#b35f76}
.medal-face{display:flex;align-items:center;justify-content:center;width:33px;height:33px;border:2px solid #ffffffbc;background:var(--medal);color:#fff;border-radius:50%;box-shadow:0 2px 5px #382c4b30;font-size:21px;position:relative}
.medal-ribbons{position:absolute;top:20px;right:7px;width:21px;height:24px;background:linear-gradient(90deg,#7c486c 45%,#dcc4e3 45%,#dcc4e3 55%,#7c486c 55%);clip-path:polygon(0 0,100% 0,100% 100%,50% 78%,0 100%)}
.medal-name{padding-right:3px}.podium-staircase{display:flex;flex-direction:column;gap:22px;margin-top:38px;padding:0 5%}
.podium-lower-rank{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr));gap:15px}
.podium-lower-rank .rank-plinth{min-height:var(--step-height);padding:11px}.podium-lower-rank .rank-step{max-width:100%}
.ceremony-list{margin-top:28px}.ceremony-list-row{display:grid;grid-template-columns:35px minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:13px 0;border-bottom:1px solid var(--line);font-size:12px}.ceremony-list-row:last-child{border:0}.ceremony-list-row small{color:var(--muted)}.medal-tag{border-radius:20px;padding:3px 9px;background:#eee4f4;font-size:10px}.medal-tag.diamond{background:#dcedf5}.medal-tag.gold{background:#f7e7b5}.medal-tag.silver{background:#e6e9f1}.medal-tag.bronze{background:#f1ddcb}
@media(max-width:750px){.ceremony-stage{padding:12px 0 25px}.podium-columns{gap:5px}.rank-plinth{padding:12px 4px}.rank-plinth>b{font-size:11px}.ceremony-place,.ceremony-score{font-size:10px}.ceremony-heading{margin-bottom:20px}.podium-person figcaption{font-size:8px;max-width:65px;padding:2px}.podium-person .chibi{width:clamp(42px,13vw,65px)!important;height:clamp(46px,14.3vw,71px)!important}.ceremony-medal{flex-direction:column;gap:4px;font-size:8px}.medal-ribbons{right:calc(50% - 10px)}.medal-face{width:27px;height:27px;font-size:16px}.medal-name{padding:0;margin-top:7px}.podium-staircase{padding:0;gap:24px}.ceremony-list-row{grid-template-columns:22px minmax(0,1fr) auto;gap:7px;font-size:10px}.ceremony-list-row .medal-tag{grid-column:2/-1;justify-self:start}.ceremony-list{padding:18px 14px}.join-card .character-grid{max-height:310px}.join-card .character-choice .chibi{width:70px!important;height:77px!important}}
.choose-character summary{padding:10px 12px;border:1px solid #cdb9dc;background:#f2eaf7;border-radius:8px;color:var(--ink);font-weight:700}
.podium-columns.single-rank{grid-template-columns:1fr;max-width:780px;margin:auto}
.podium-columns.single-rank .podium-column:empty{display:none}
.podium-entry-group{display:flex;flex-direction:column;align-items:center;min-width:0;max-width:100%;justify-content:end}
.podium-entry-members{display:flex;align-items:flex-end;justify-content:center;flex-wrap:wrap;gap:1px 3px}
.podium-team-name{font-size:10px;background:#ffffffa6;border-radius:5px;padding:2px 6px;margin-bottom:5px;max-width:100%;overflow-wrap:anywhere}
.rank-plinth{min-height:calc(120px + var(--step-height))}
.podium-lower-rank .rank-plinth{min-height:calc(105px + var(--step-height))}
@media(max-width:750px){.rank-plinth{min-height:calc(135px + var(--step-height))}.podium-lower-rank .rank-plinth{min-height:calc(115px + var(--step-height))}}
/* Keep every member on the same horizontal podium floor. Larger groups can scroll within their step. */
.podium-entry-group{width:100%}
.podium-entry-members{width:100%;flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;padding:0 1px;scrollbar-width:thin}
.podium-entry-members[data-members="1"],.podium-entry-members[data-members="2"]{justify-content:center}
.podium-person{flex:0 0 clamp(34px,calc(var(--member-width) - 3px),90px);min-width:0}
.podium-person figcaption{max-width:100%;font-size:clamp(7px,.8vw,9px)}
.podium-person .chibi{width:100%!important;max-width:90px;height:auto!important;aspect-ratio:10/11}
.podium-people.tied-groups{flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;align-items:flex-end}
.podium-people.tied-groups .podium-entry-group{flex:1 0 150px;min-width:150px}
.fun-badge{background:#f5e6ef;color:#874969}.fun-ballot{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}.fun-nominee{display:flex;align-items:center;gap:10px;background:var(--cream);border:1px solid var(--line);padding:10px;border-radius:10px;color:var(--ink);font-size:12px}.fun-nominee.selected{border-color:var(--violet);background:#efe4f7}.fun-nominee:disabled{opacity:.8}.field textarea{width:100%;border:1px solid #d9cec1;border-radius:8px;padding:12px;background:var(--cream);color:var(--ink);font:inherit;resize:vertical;min-height:150px}.open-response{padding:18px;border:1px solid var(--line);border-radius:10px;background:var(--cream);margin:12px 0}.open-response p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;margin:10px 0 0}.open-response>b{color:var(--copper);font-size:13px}.vote-winners{text-align:center;margin:25px 0;background:#f3edf8;padding:24px;border-radius:18px;width:100%}.vote-winner-people{display:flex;justify-content:center;align-items:flex-end;flex-wrap:wrap;gap:18px}.vote-winner-people figure{margin:0;display:flex;align-items:center;flex-direction:column}.vote-winner-people figcaption small{display:block;color:var(--muted)}.vote-laugh-screen .vote-winners{background:none;margin:0}.vote-laugh-screen .ambient-avatar{width:min(65vw,40dvh,330px)!important;height:min(71vw,44dvh,363px)!important}.vote-winners>p{font-size:12px;color:var(--muted);margin:16px 0 0}
.persistent-roses{position:absolute;left:65%;top:65%;width:29%;height:45%;display:block;transform:translate(-50%,-88%) rotate(-14deg);transform-origin:50% 88%;pointer-events:none;z-index:4}.persistent-roses svg{display:block;width:100%;height:100%;overflow:visible}.rose-counter{position:absolute;bottom:-3px;right:-4px;background:#fff5f8;border:1px solid #ead0dc;color:#a24467;border-radius:9px;padding:0 3px;font-size:9px;line-height:1.7;z-index:5;white-space:nowrap}.chibi.has-anime-motion>.persistent-roses{display:none}.anime-motion{overflow:visible}.anime-earned{direction:rtl}.fun-break .feedback{margin-top:20px}
@media(max-width:750px){.fun-ballot{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.fun-nominee{padding:7px;gap:5px;font-size:10px}.fun-nominee .chibi{width:35px!important;height:39px!important}.vote-winners{padding:16px 10px}.vote-winner-people{gap:10px}.vote-winners .ambient-avatar{width:130px!important;height:143px!important}.vote-laugh-screen .ambient-avatar{width:min(65vw,38dvh,280px)!important;height:min(71vw,42dvh,308px)!important}.rose-counter{font-size:8px}}
.motion-fallback-bouquet{position:absolute;inset:0;display:none;pointer-events:none}
.anime-motion.motion-loading>.motion-fallback-bouquet{display:block}
.anime-motion.motion-loading>.persistent-roses{display:none}
.persistent-roses{width:28%;height:32%}
.persistent-roses{height:28%}

/* Complete sprites with responsive room for feet, text and controls. */
.anime-result-content>.anime-motion{width:min(72vw,48dvh,440px);min-height:0}
.anime-result-content{min-height:0;gap:clamp(8px,2dvh,16px);padding:12px 0}
.anime-result-screen{overflow-y:auto;overscroll-behavior:contain}
.anime-motion>canvas{position:relative;inset:auto;width:100%;height:auto;aspect-ratio:1}
.chibi,.ambient-avatar,.podium-person{overflow:visible}
.anime-motion>.persistent-roses{transition:left 110ms linear,top 110ms linear}
.teacher #controls .actions{flex-wrap:wrap;justify-content:flex-end}
@media(max-width:750px){.teacher #controls{min-height:115px}.teacher main{padding-bottom:310px}.teacher #controls .actions{gap:5px}.teacher #controls .outline{font-size:10px;padding:7px 9px}.controls-caption{max-width:100px}}

/* Illustrated roses attached to an actual tracked hand, with fingers in front. */
.persistent-roses{width:16%;height:24%;transform:translate(-52%,-73%);transform-origin:52% 73%;transition:none!important;overflow:visible}
.persistent-roses>.held-rose{display:block;position:absolute;inset:0;width:100%;height:100%;padding:0;object-fit:contain;transform-origin:52% 73%}
.roses-2>.held-rose:first-child{transform:rotate(-13deg)}
.roses-2>.second-rose{transform:rotate(17deg)}
.rose-hand-layer,.anime-motion>.rose-hand-layer{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;pointer-events:none;z-index:6}
.chibi.has-anime-motion>.rose-hand-layer{display:none}
