/* Soroban Academy R37 — mobile polish */
/* Home cards: avoid awkward word-per-line titles. */
.r37LongTitleCard .safeR25Title{font-size:clamp(12px,3.25vw,16px)!important;line-height:1.25!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;padding-inline:5px!important}
/* True destination pages */
.r37StandalonePage{position:relative!important;z-index:1!important;margin-top:0!important;padding-top:12px!important;min-height:calc(100dvh - 70px)!important;background:#fbfaf4!important}
#game.r37StandalonePage{display:block!important}
/* 7 rods: bigger touch targets while fitting small phones. */
#abacus[data-r27-rods="7"] .bead,#abacus[data-r37-rods="7"] .bead{width:34px!important;max-width:34px!important}
#abacus[data-r27-rods="7"] .rod,#abacus[data-r37-rods="7"] .rod{border-left-width:2px!important}
#abacus[data-r27-rods="7"] .place,#abacus[data-r37-rods="7"] .place{font-size:8px!important}
@media(max-width:560px){#abacus[data-r27-rods="7"] .abinner,#abacus[data-r37-rods="7"] .abinner{height:360px!important}#abacus[data-r27-rods="7"] .bead,#abacus[data-r37-rods="7"] .bead{width:31px!important}}
/* Trainer local photo button */
.r37TrainerPhotoBtn{position:absolute!important;inset-inline-end:18px!important;top:126px!important;z-index:4!important;border:1px solid #d8e6df!important;background:rgba(255,255,255,.93)!important;color:#1b6754!important;border-radius:999px!important;padding:6px 10px!important;font-size:10px!important;font-weight:900!important;box-shadow:0 6px 16px rgba(30,77,63,.10)!important}
/* Custom submit warning */
.r37SubmitModal{position:fixed;inset:0;z-index:999999;display:grid;place-items:center;padding:18px;direction:rtl}.r37SubmitShade{position:absolute;inset:0;background:rgba(15,34,29,.54);backdrop-filter:blur(5px)}.r37SubmitCard{position:relative;width:min(480px,100%);background:#fff;border:1px solid #dce8e2;border-radius:28px;padding:25px;text-align:center;box-shadow:0 28px 80px rgba(10,36,29,.28)}.r37SubmitIcon{width:58px;height:58px;margin:0 auto 8px;border-radius:19px;display:grid;place-items:center;background:#fff6df;color:#8a641c;border:1px solid #ecd69f;font-size:30px;font-weight:1000}.r37SubmitCard>small{color:#8d774c;font-weight:900}.r37SubmitCard h3{margin:5px 0 8px;color:#153f39;font-size:22px}.r37SubmitCard p{margin:0;color:#697d76;line-height:1.8;font-size:13px}.r37SubmitActions{display:grid;grid-template-columns:1.15fr 1fr;gap:8px;margin-top:18px}.r37SubmitActions button{min-height:48px!important;border-radius:14px!important;font-weight:900!important}
/* Student competition: one smooth screen with fixed keypad and stronger next action. */
body.r35CompetitionRunning{overscroll-behavior:none!important}.r35RunnerTop{border-radius:18px!important}.r35QuestionStage{background:linear-gradient(180deg,#fffef9,#f8fbf8)!important}.r35MathCard{box-shadow:none!important;border-color:#dfeae4!important;background:#fff!important}.r35AnswerDisplay{background:#f7fbf9!important;border-color:#9bcfbd!important}.r35KeypadShell{border-color:#cfdfd8!important}.r35KeyNav button:last-child:not(:disabled){background:#edf8f3!important;color:#12634f!important;border-color:#bfdfd1!important;font-weight:950!important}.r35Keypad button{transition:transform .08s ease,background .08s ease!important}
@media(max-width:680px){body.r35CompetitionRunning #championship{padding:0 6px 294px!important;min-height:100dvh!important}.r35RunnerTop{position:sticky!important;top:0!important;padding:8px 10px!important}.r35RunnerIdentity small{font-size:9px!important}.r35RunnerIdentity h3{font-size:17px!important}.r35Timer{min-width:82px!important}.r35Timer b{font-size:22px!important}.r35QuestionStage{padding:10px 8px 10px!important;border-radius:0 0 18px 18px!important}.r35MathCard{min-height:122px!important;padding:14px 38px!important;border-radius:18px!important}.r35AnswerPanel{margin:8px auto 5px!important}.r35AnswerDisplay{height:54px!important;font-size:30px!important}.r35QuestionDots{max-height:35px!important;overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important;justify-content:flex-start!important;padding:2px 4px!important}.r35QDot{flex:0 0 27px!important;width:27px!important;height:27px!important}.r35KeypadShell{left:6px!important;right:6px!important;bottom:max(5px,env(safe-area-inset-bottom))!important;padding:7px!important;border-radius:20px!important}.r35KeyNav{grid-template-columns:.9fr 1.2fr 1fr!important}.r35KeyNav button{min-height:40px!important}.r35Keypad button{min-height:44px!important}.r35RuleNote{display:none!important}}
@media(max-height:700px) and (max-width:680px){.r35MathCard{min-height:90px!important}.r35AnswerDisplay{height:46px!important}.r35QuestionDots{display:none!important}.r35Keypad button{min-height:39px!important}.r35KeyNav button{min-height:35px!important}}
/* Interactive teacher mobile: readable controls, full-width soroban, no crushed right-side column. */
@media(max-width:760px){#v183Teacher.open{height:100dvh!important;max-height:100dvh!important}#v183Teacher .v183Top{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;grid-template-rows:auto auto!important;gap:6px!important;padding:7px!important}#v183Teacher .v183Info{text-align:right!important}#v183Teacher .v183Info b{font-size:15px!important}#v183Teacher .v183Top>button.ghost:last-of-type{display:none!important}#v183Teacher .v183Nav{grid-column:1/-1!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important;padding:6px!important;max-height:128px!important;overflow:auto!important}#v183Teacher .v183Nav>.v183Current{grid-column:1!important;min-width:0!important;width:100%!important;font-size:17px!important;padding:7px!important}#v183Teacher .v183RuleControl,#v183Teacher .v183RuleWide{min-width:0!important;width:100%!important}#v183Teacher .v183RuleWide{grid-column:2/4!important}#v183Teacher .v183Nav>button{min-height:37px!important;font-size:10px!important;padding:5px!important}#v183Teacher .v183Stage{padding:5px!important;overflow:hidden!important}#v183Teacher .v183LessonStrip{margin-bottom:5px!important;min-height:38px!important;padding:7px 9px!important;font-size:10px!important}#v183Teacher #v183LabMount{flex:1!important;min-height:0!important;height:auto!important;overflow:hidden!important;align-items:flex-start!important}#v183Teacher #v183LabMount>#abacus .abstage{overflow:hidden!important;padding:3px!important;max-height:none!important}#v183Teacher #v183LabMount>#abacus .abframe{width:100%!important;min-width:0!important;max-width:100%!important;padding:7px 2px 38px!important;border-width:6px!important}#v183Teacher #v183LabMount>#abacus .abinner{height:330px!important;gap:0!important}#v183Teacher #v183LabMount>#abacus .rod{min-width:0!important;border-left-width:1px!important}#v183Teacher #v183LabMount>#abacus .bead{max-width:19px!important}#v183Teacher #v183LabMount>#abacus[data-r27-rods="19"] .bead{max-width:13px!important}}
@media(max-width:420px){#v183Teacher .v183Top{padding:5px!important}#v183Teacher .v183Nav{max-height:118px!important}#v183Teacher .v183LessonStrip{display:flex!important;overflow:hidden!important}#v183Teacher #v183LabMount>#abacus .abinner{height:305px!important}}
/* Competition released results */
.r37CompetitionResults{background:linear-gradient(180deg,#f7faf7,#fffdf7)!important;min-height:100dvh}.r37ResultsHero{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border:1px solid #dbe7e1;border-radius:26px;padding:20px;box-shadow:0 14px 38px rgba(26,70,57,.07);margin-bottom:14px}.r37ResultsHero small{color:#6c867c;font-weight:900}.r37ResultsHero h2{margin:3px 0;color:#153f39;font-size:29px}.r37ResultsHero p{margin:0;color:#71837c}.r37ResultsLoading{text-align:center;padding:40px;color:#71837c}.r37ResultCards{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px}.r37ResultCard{background:#fff;border:1px solid #dce8e2;border-radius:24px;padding:17px;box-shadow:0 12px 30px rgba(27,67,55,.06)}.r37ResultTop{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center}.r37ResultCup{width:48px;height:48px;border-radius:16px;background:linear-gradient(145deg,#fff4c9,#f2c454);display:grid;place-items:center;font-size:26px}.r37ResultTop h3{margin:2px 0;color:#153f39;font-size:17px}.r37ResultTop small{color:#7a8d86}.r37Rank{text-align:center;background:#eaf7f1;border:1px solid #cde6db;border-radius:15px;padding:7px 10px}.r37Rank small{display:block;font-size:8px}.r37Rank b{display:block;color:#176a57;font-size:23px}.r37ResultStats{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:13px 0}.r37ResultStats div{background:#f7faf8;border:1px solid #e2eae6;border-radius:13px;padding:8px;text-align:center}.r37ResultStats span{display:block;color:#80908a;font-size:8px}.r37ResultStats b{display:block;color:#193f36;font-size:14px;margin-top:2px}.r37ReviewBtn{width:100%!important}.r37ReadOnly{display:block;text-align:center;color:#8a9994;font-size:9px;margin-top:6px}.v25MenuItem .mi img{width:28px!important;height:28px!important;object-fit:cover!important;border-radius:9px!important}
@media(max-width:520px){.r37ResultsHero{padding:15px;border-radius:20px}.r37ResultsHero h2{font-size:23px}.r37ResultStats{grid-template-columns:1fr 1fr}.r37ResultCard{border-radius:20px}}
