/* GANIXO uses the Grammix component system and changes only math-specific details. */
:root{--wheel-label-radius:175px}
html{background:#170a27}body{background:radial-gradient(circle at 82% 34%,#a943c64d,transparent 30%),linear-gradient(118deg,#170a27,#351047 55%,#641879)}
.math-orbit span:nth-child(1){background:#3988e8}.math-orbit span:nth-child(2){background:#7148d7}.math-orbit span:nth-child(3){background:#29a876}
.formula-prompt{width:min(720px,100%);margin:-12px auto 18px;padding:12px 16px;border-radius:16px;color:#574579;background:#eee8fb;font-size:clamp(16px,2.5vw,21px);font-weight:900}
.formula-prompt:empty{display:none}.wheel-label{z-index:5;width:132px;margin-left:-66px;padding:5px 7px;border:1px solid #ffffffd9;border-radius:10px;color:#17121a!important;background:#fffffff0;font-size:11px!important;font-weight:900;line-height:1.08;text-shadow:none;transform-origin:66px 0!important;overflow-wrap:anywhere}.wheel-label b{margin-bottom:2px;font-size:17px!important}.wheel-label.chosen{color:#17121a!important;background:#fff5ff;box-shadow:0 0 0 4px #f3a2fb,0 5px 15px #27123466;filter:none;text-decoration:none}
.answer-button:nth-child(1){background:#fff2f7}.answer-button:nth-child(2){background:#fff8dc}.answer-button:nth-child(3){background:#eafaf3}.answer-button:nth-child(4){background:#eef5ff}.answer-button.correct{background:#e6faef}.answer-button.wrong{background:#fff0f2}
.home-actions{max-width:680px}.book-picker{display:grid;gap:6px;margin:16px 0;color:#53657a;font-size:12px;font-weight:900;text-transform:uppercase}.book-picker select{min-height:48px;padding:10px 38px 10px 13px;border:2px solid #d9cff1;border-radius:14px;color:#2d4058;background:#fff;font-weight:800}.formula-list{max-height:55dvh;display:grid;grid-template-columns:1fr 1fr;gap:10px;overflow:auto}.formula-card{padding:14px;border:1px solid #e3dcf2;border-radius:16px;background:#faf8ff}.formula-card span{color:#754ed3;font-size:10px;font-weight:900;text-transform:uppercase}.formula-card h3{margin:5px 0;color:#253951}.formula-card .math{margin:8px 0;padding:10px;border-radius:10px;color:#fff;background:#7148d7;font-size:18px;font-weight:900}.formula-card p{margin:0;color:#5e6e82;font-size:13px;line-height:1.45}
#formulaDialog{width:min(800px,calc(100% - 28px))}
.ganixo-page .question-screen h2{color:#253951;text-shadow:none}
.ganixo-page .question-screen h2:focus{outline:none}
.ganixo-page .question-screen .question-count{color:#66758a}
.play-screen{overflow-x:hidden;overflow-y:auto}.play-screen .wheel-stage{flex:0 0 auto;margin:8px auto 26px}.play-screen .spin-button{position:relative;z-index:8;flex:0 0 auto;margin-top:0}
@media(min-width:641px) and (max-height:900px){:root{--ganixo-desktop-wheel-size:min(420px,max(250px,calc(100svh - 350px)));--wheel-label-radius:calc(var(--ganixo-desktop-wheel-size) * .36);--ganixo-label-width:clamp(92px,calc(var(--ganixo-desktop-wheel-size) * .3),126px)}.play-screen .wheel-stage{width:var(--ganixo-desktop-wheel-size);height:var(--ganixo-desktop-wheel-size);min-height:var(--ganixo-desktop-wheel-size);margin:4px auto 24px}.wheel-label{width:var(--ganixo-label-width);margin-left:calc(var(--ganixo-label-width) / -2);transform-origin:50% 0!important}.play-screen .spin-button{min-height:52px;margin:0 auto 8px}}
/* When many topics share the wheel, labels must stay clear of the rim. Six or
   more segments place labels near the horizontal axis, where a label wider than
   its orbit radius (the default clamp minimum is 92px, the collapsed radius can
   be ~90px) pushes them outside the stage and they get clipped. Shrink the label
   and pull it in so every segment stays visible at any wheel size. */
@media(min-width:641px) and (max-height:900px){
  .wheel-labels[data-count="6"],.wheel-labels[data-count="7"],.wheel-labels[data-count="8"],.wheel-labels[data-count="9"]{--wheel-label-radius:calc(var(--ganixo-desktop-wheel-size) * .32)}
  .wheel-labels[data-count="6"] .wheel-label,.wheel-labels[data-count="7"] .wheel-label,.wheel-labels[data-count="8"] .wheel-label,.wheel-labels[data-count="9"] .wheel-label{width:min(78px,calc(var(--ganixo-desktop-wheel-size) * .28));margin-left:calc(min(78px,calc(var(--ganixo-desktop-wheel-size) * .28)) / -2);font-size:9px!important;padding:4px 5px}
  .wheel-labels[data-count="6"] .wheel-label b,.wheel-labels[data-count="7"] .wheel-label b,.wheel-labels[data-count="8"] .wheel-label b,.wheel-labels[data-count="9"] .wheel-label b{font-size:14px!important}
}
@media(max-width:640px){:root{--wheel-label-radius:calc(var(--mobile-wheel-size) * .38)}.wheel-label{width:88px;margin-left:-44px;padding:3px 4px;font-size:8px!important;transform-origin:44px 0!important}.wheel-label b{font-size:13px!important}.sound-toggle{width:44px;padding:0;font-size:0}.sound-toggle::after{content:"🔊";font-size:16px}.sound-toggle[aria-pressed="true"]::after{content:"🔇"}.home-actions button{flex:1 1 42%;padding-inline:12px;font-size:13px}.formula-list{grid-template-columns:1fr}.formula-prompt{margin-bottom:12px;font-size:15px}}
@media(max-width:640px){:root{--mobile-wheel-size:clamp(220px,min(calc(100vw - 60px),46svh),330px);--wheel-label-radius:calc(var(--mobile-wheel-size) * .34)}.play-screen{height:auto;min-height:calc(100svh - 74px);overflow-x:hidden;overflow-y:auto;padding-bottom:28px}.wheel-stage{width:var(--mobile-wheel-size);height:var(--mobile-wheel-size);min-height:var(--mobile-wheel-size);flex:0 0 var(--mobile-wheel-size);margin:4px auto 18px}.wheel{width:92%;height:92%}.spin-button{position:relative;z-index:8;width:min(220px,78%);min-height:52px;flex:0 0 auto;margin:8px auto 0}.status-banner{flex:0 0 auto}.wheel-label{width:84px;margin-left:-42px;transform-origin:42px 0!important}}
/* Same many-segment guard on small screens: keep labels inside the stage so all
   topics stay legible instead of being clipped at the rim. */
@media(max-width:640px){
  .wheel-labels[data-count="6"],.wheel-labels[data-count="7"],.wheel-labels[data-count="8"],.wheel-labels[data-count="9"]{--wheel-label-radius:calc(var(--mobile-wheel-size) * .3)}
  .wheel-labels[data-count="6"] .wheel-label,.wheel-labels[data-count="7"] .wheel-label,.wheel-labels[data-count="8"] .wheel-label,.wheel-labels[data-count="9"] .wheel-label{width:68px;margin-left:-34px;transform-origin:34px 0!important;font-size:7px!important;padding:3px 4px}
  .wheel-labels[data-count="6"] .wheel-label b,.wheel-labels[data-count="7"] .wheel-label b,.wheel-labels[data-count="8"] .wheel-label b,.wheel-labels[data-count="9"] .wheel-label b{font-size:11px!important}
}
@media(max-width:380px){:root{--mobile-wheel-size:clamp(205px,min(calc(100vw - 48px),42svh),285px)}.play-screen{padding:8px 10px 24px}.wheel-stage{margin-bottom:16px}.wheel-label{width:76px;margin-left:-38px;font-size:7px!important;transform-origin:38px 0!important}.wheel-label b{font-size:11px!important}.spin-button{margin-top:6px}}
