/* Bounded integrated UX changes. Existing touch-ux rules are not overridden. */
.arithmetic-battle .arith-equation{font-size:40px!important;line-height:1.15;min-height:46px;margin:2px 0}.arithmetic-battle .arith-controls{display:flex;flex-direction:column;gap:7px;margin-top:auto}.arith-controls>.arith-help{order:4;width:100%;min-height:44px;font-size:18px}.arith-controls .arith-choices{min-height:64px}.arith-hint-groups{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}.arith-hint-group{text-align:center;min-width:0}.arith-hint-group>strong{font-size:24px}.arith-dot-box{border:2px solid #af8a45;border-radius:12px;display:grid;grid-template-columns:repeat(5,16px);justify-content:center;gap:4px;padding:7px;min-height:40px;max-height:125px;overflow:auto}.arith-hint-dot{width:16px;height:16px;border-radius:50%;background:#db9c33;display:block}.arithmetic-battle[data-phase=question]{height:calc(100svh - 102px);min-height:0;max-height:940px}.arithmetic-battle .arith-hint{flex-shrink:1;max-height:210px;overflow:auto}.arithmetic-battle .arith-arena{flex-shrink:1}.arithmetic-battle:has(.arith-hint:not([hidden])) .arith-help{display:block!important}.arithmetic-battle .arith-message{min-height:24px;font-size:16px}.arith-hint-group strong{display:block}.arith-hint-groups .arith-objects{display:none}
.column-learning[data-mode=independent] .col-world{grid-template-columns:1fr;justify-items:center}.column-learning[data-mode=independent] .col-concrete{display:none}
.sl-division-actions{display:flex;flex-direction:column;gap:7px;margin-top:auto;min-height:110px}.sl-division-actions>button{min-height:50px;font-size:19px;line-height:1.35;white-space:normal;width:100%}.sl-division-actions>.sl-reset{background:#fff;min-height:44px;font-size:18px}.sl-bowls.sl-groups-bowls,.sl-bowls.sl-share-bowls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;align-items:stretch}.sl-groups-bowls .sl-group-unit{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;min-width:0;height:auto;min-height:108px;box-sizing:border-box;padding:8px;gap:7px}.sl-groups-bowls .sl-group-label{position:static!important;display:block;min-height:24px;line-height:24px;font-size:18px;margin:0;transform:none!important}.sl-bowls .sl-bowl-items{position:static;display:grid;grid-template-columns:repeat(3,minmax(0,30px));justify-content:center;gap:4px;max-width:100%;min-height:36px}.sl-bowls .sl-cookie,.sl-bowls .sl-cookie img{width:30px;height:30px;max-width:100%;object-fit:contain}.sl-direct-bowl{display:flex;flex-direction:column;align-items:center;gap:6px;min-height:100px;min-width:0;box-sizing:border-box;padding:8px}.lp-share .sl-tray,.lp-divide-groups .sl-tray{display:flex;flex-wrap:wrap;gap:5px;min-height:36px;max-width:100%;justify-content:center}.lp-share .sl-tray .sl-cookie,.lp-divide-groups .sl-tray .sl-cookie{width:28px;height:28px}.lp-share .sl-tray img,.lp-divide-groups .sl-tray img{width:100%;height:100%;object-fit:contain}.lp-share,.lp-divide-groups{gap:9px;min-height:0!important;transform:none!important}.lp-share .sl-division-equation,.lp-divide-groups .sl-division-equation{margin:8px 0;font-size:28px}
.division-battle,.column-place-preview{box-sizing:border-box;max-width:620px;width:100%;margin:auto;padding:10px 14px;display:flex;flex-direction:column;gap:8px;min-height:calc(100svh - 108px)}.division-battle[hidden],.column-place-preview[hidden]{display:none}.division-battle h2,.column-place-preview h2{font-size:24px;margin:0}.divbattle-note,.cpp-note{font-size:13px;margin:0}.divbattle-arena{height:220px;position:relative;display:flex;align-items:center;justify-content:space-around;background:#e9f7ef;border-radius:22px}.divbattle-arena img{width:110px;height:130px;object-fit:contain}.divbattle-arena progress{position:absolute;top:12px;right:8%;width:42%;accent-color:#e9ad45}.divbattle-equation{text-align:center;font-size:40px;margin:8px 0}.divbattle-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:auto}.divbattle-button,.cpp-button{font-size:28px;min-height:58px;border:2px solid #618c7c;border-radius:14px;background:#e6fff0;padding:7px}.divbattle-message{min-height:28px;margin:0}.division-battle[data-phase=hit] .divbattle-hero{animation:divAttack .24s}.division-battle[data-phase=hit] .divbattle-enemy{animation:divHit .24s}@keyframes divAttack{50%{transform:translateX(18px)}}@keyframes divHit{50%{transform:translateX(8px) rotate(7deg)}}
.cpp-world{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:8px;align-items:center}.cpp-table{display:grid;grid-template-columns:26px repeat(2,minmax(0,1fr));row-gap:7px;text-align:center;font-size:34px}.cpp-table>span:nth-child(-n+3){font-size:13px;min-height:22px}.cpp-carry{min-height:30px;font-size:24px}.cpp-tens{background:#d9e9ff;color:#24568c;border-radius:6px}.cpp-ones{background:#ffe2da;color:#a34e35;border-radius:6px}.cpp-line{grid-column:1/-1;border-top:3px solid #426256;min-height:0}.cpp-table>.cpp-line+span,.cpp-table>.cpp-line+span+span{display:none}.cpp-side{background:#fff5d9;padding:8px;border-radius:14px;text-align:center}.cpp-equation{font-size:22px;line-height:1.4}.cpp-result{display:flex;justify-content:center;font-size:40px}.cpp-flying{position:fixed;z-index:1000;pointer-events:none;text-align:center;font-size:38px;color:#624993;background:#fff7d0;border-radius:10px}.cpp-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:auto}.cpp-message{font-size:18px;min-height:54px}.column-place-preview[data-step=ones] .cpp-ones,.column-place-preview[data-step=tens] .cpp-tens{outline:2px solid #8068b3}.trial-flag-progress{font-size:26px;text-align:center;min-height:36px}.trial-flag-friend{width:68px;height:76px;object-fit:contain}.trial-flag{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0}.trial-flags-clear{font-size:32px;text-align:center}.question-speaking .lp-choice,.question-speaking .kns-card,.question-speaking .meaning-choice{opacity:.6}
@media(min-width:650px){.arithmetic-battle .arith-equation{font-size:48px!important}.divbattle-arena{height:340px}.divbattle-arena img{width:170px;height:210px}.cpp-table{font-size:46px;row-gap:12px}.cpp-equation{font-size:28px}.cpp-world{gap:20px}}

.division-battle{min-height:calc(100svh - 145px)}.arithmetic-battle[data-phase=question]{height:calc(100svh - 116px)}.lp-share .sl-share-bowls{min-height:210px;align-content:start}.lp-share .sl-direct-bowl{min-height:92px}.lp-share .sl-bowl-items{min-height:34px}.lp-share .sl-division-actions{margin-bottom:6px}


.column-learning[data-mode=independent] .col-pad button:last-child{grid-column:span 2;white-space:nowrap}


#arithmeticBattleScreen:not([hidden]){display:flex}#arithmeticBattleScreen[data-phase=question] .arith-controls{margin-top:auto!important;flex-shrink:0}.sl-bowls.sl-groups-bowls{grid-auto-rows:minmax(112px,auto);gap:12px}.sl-groups-bowls .sl-group-unit{height:auto!important;min-height:112px!important;flex:none}.cpp-table{column-gap:4px;grid-template-columns:22px repeat(2,minmax(0,1fr))}.cpp-table>span:nth-child(-n+3){font-size:12px;white-space:nowrap;letter-spacing:0}.cpp-actions:has(button:only-child){grid-template-columns:1fr}.cpp-actions:has(button:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}


.cpp-tens{background:#e0f1dd;color:#2d5f38}.cpp-ones{background:#ffead1;color:#995e21}.column-place-preview[data-step=ones] .cpp-side{background:#ffead1}.column-place-preview[data-step=tens] .cpp-side{background:#e0f1dd}.column-place-preview[data-step=transfer] .cpp-carry,.column-place-preview[data-step=transfer] .cpp-answer-ones{outline:2px solid #8068b3}


.sl-groups-bowls .sl-group-unit{border:0;background:transparent;padding:0;gap:6px;min-height:116px!important}.sl-groups-bowls .sl-bowl-items{width:100%;min-height:80px;box-sizing:border-box;border:3px solid #226359;background:#f6ffec;border-radius:18px;padding:8px;align-content:center}.sl-groups-bowls .sl-group-label{width:100%;text-align:center;min-height:24px}


.trial-collection{display:flex;justify-content:center;gap:10px;min-height:34px;font-size:26px;pointer-events:none}.trial-collection span{display:block}.trial-flag-get{animation:flagGet .25s ease-out}@keyframes flagGet{50%{transform:translateY(-7px) scale(1.2)}}.trials[data-kind=number] .trial-flags{margin-top:4px}.trials[data-kind=number] .trial-flag-progress{margin:0}

.cpp-actions .cpp-button{font-size:24px;white-space:nowrap}
.lp-stage.lp-share,.lp-stage.lp-divide-groups{min-height:calc(100svh - 290px)!important}.lp-divide-groups .spec-operation-band{margin-top:auto}

.learn:has(.lp-next:not([hidden])) .lp-stage.lp-share,.learn:has(.lp-next:not([hidden])) .lp-stage.lp-divide-groups{min-height:calc(100svh - 350px)!important}
