.math-game{font-family:"Hannotate SC","Kaiti SC",system-ui,sans-serif;color:#18344b;max-width:1100px;margin:auto}.math-game header{display:flex;align-items:center;gap:14px;margin-bottom:18px}.math-game header h2{position:static;flex:1;margin:0!important;font-size:27px}.math-game header button,.math-game-bottom button{background:#fff;border:2px solid #c8e7f4;border-radius:19px;padding:11px 18px;font-size:18px}.math-game header #mgHome{font-size:17px}.math-game-menu{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.math-game-menu button{display:flex;flex-direction:column;gap:12px;align-items:center;padding:20px;background:white;border:4px solid #c4e7f8;border-radius:28px;font-size:25px}.math-game-menu svg{width:100%;height:120px}.math-game svg{display:block;overflow:hidden;pointer-events:none}.math-game-bottom{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:14px;margin-top:20px}.math-game .yellow{background:#ffdf4b;border-color:#ebcd52}.math-task{text-align:center;font-size:24px;font-weight:bold;margin:12px 0 20px}.math-task.small{font-size:21px;margin:15px 0}.math-count-tray,.math-search-grid{display:flex;justify-content:center;flex-wrap:wrap;gap:18px;background:white;border:3px solid #cee9f5;border-radius:28px;padding:22px}.math-object{position:relative;display:flex;align-items:center;justify-content:center;background:#fff;border:3px solid #d5ebf5;border-radius:22px;width:125px;height:135px;padding:15px;touch-action:none;user-select:none;-webkit-user-select:none}.math-object svg{width:100%;height:100%}.math-object.counted{border-color:#ebc83b;background:#fff9df}.math-object>span{position:absolute;right:4px;top:2px;font-size:24px;font-weight:bold;color:#0a5f9c}.math-number-options{display:flex;justify-content:center;gap:25px;margin:22px 0}.math-number-options button{background:#fff;border:4px solid #bfe4f7;border-radius:24px;width:110px;height:95px;font-size:54px;font-weight:bold}.math-game-feedback{min-height:35px;text-align:center;font-size:22px;margin-top:16px}.math-game-progress{font-size:18px;color:#59778b}.math-game [hidden]{display:none!important}.math-operation{display:grid;grid-template-columns:1.7fr 50px 1fr;gap:15px;align-items:center}.math-arithmetic-tray,.math-outside{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:12px;min-height:190px;padding:18px;background:#fff;border:4px solid #bfe4f7;border-radius:28px}.math-arithmetic-tray{background:#fff8d7;border-color:#e8cd6a}.math-operation .math-object{width:90px;height:110px;padding:10px}.math-operation-arrow{text-align:center;font-size:38px}.math-placed-object{display:inline-flex;width:85px;height:95px;padding:7px}.math-placed-object svg{width:100%;height:100%}#mgAdded{display:contents}.math-outside>span{color:#58788b}.math-pattern-strip{display:flex;align-items:center;justify-content:center;gap:10px;background:white;border-radius:25px;padding:20px}.math-pattern-piece{width:100px;height:120px}.math-pattern-piece svg{width:100%;height:100%}.math-slot{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;min-width:105px;min-height:120px;border:3px dashed #8fc8e3;background:#f4fbff;border-radius:22px;font-size:46px;padding:10px}.math-slot>svg{width:90px;height:100px}.math-piece-options{display:flex;justify-content:center;gap:22px;margin-top:25px}.math-search-target{display:flex;justify-content:center;align-items:center;gap:15px}.math-search-target svg{width:70px;height:75px}.math-search-target span{font-size:22px}.math-quantity-slots,.math-quantity-pieces{display:flex;justify-content:center;gap:18px;flex-wrap:wrap;margin:20px 0}.math-quantity-slots .math-slot{width:185px;min-height:160px;font-size:36px}.math-quantity-slots .math-slot>div{display:flex;justify-content:center;flex-wrap:wrap;gap:3px}.math-quantity-slots svg{width:50px;height:55px}.math-quantity-pieces>button{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:5px;width:180px;min-height:130px;padding:12px;background:white;border:3px solid #c7e6f3;border-radius:23px;touch-action:none}.math-quantity-pieces svg{width:60px;height:65px}.math-game .chosen{border-color:#e9c43d;background:#fff8d7}.math-sudoku-wrap{display:flex;align-items:center;justify-content:center;gap:25px}.math-sudoku-grid{display:grid;grid-template-columns:repeat(4,95px);grid-template-rows:repeat(4,95px);border:4px solid #4e8f78;background:white}.math-sudoku-grid>div,.math-sudoku-grid>button{display:grid;place-items:center;border:1px solid #85bca6;padding:11px;min-width:0;min-height:0;background:#fff;border-radius:0;font-size:30px}.math-sudoku-grid>:nth-child(4n+2){border-right:3px solid #4e8f78}.math-sudoku-grid>:nth-child(n+5):nth-child(-n+8){border-bottom:3px solid #4e8f78}.math-sudoku-grid svg{width:100%;height:100%;max-height:70px}.math-sudoku-grid .math-sudoku-empty{background:#fff9d6}.math-sudoku-grid .filled{background:#f0faf4}.math-sudoku-bank{display:grid;grid-template-columns:repeat(2,95px);gap:12px}.math-sudoku-bank .math-object{width:95px;height:105px;padding:12px}.math-drag-ghost{position:fixed;pointer-events:none;width:90px;height:100px;padding:10px;background:#fffdf2;border:3px solid #edcc45;border-radius:20px;z-index:2147483647;box-shadow:0 5px 18px #18344b33}.math-drag-ghost svg{width:100%;height:100%;pointer-events:none}.math-game-finish{text-align:center;margin:70px 0}.math-game-finish>span{font-size:55px;color:#e9bd22}.math-game-finish h3{font-size:30px}.math-game-finish button{padding:15px 25px;border-radius:20px;margin:10px;background:white;font-size:22px}@media(max-width:750px){.math-game-menu{gap:12px}.math-game-menu button{font-size:20px;padding:14px}.math-game-menu svg{height:90px}.math-game header h2{font-size:22px}.math-task{font-size:20px}.math-object{width:95px;height:105px;padding:11px}.math-pattern-piece{width:70px;height:90px}.math-slot{min-width:80px;min-height:95px}.math-sudoku-grid{grid-template-columns:repeat(4,72px);grid-template-rows:repeat(4,72px)}.math-sudoku-bank{grid-template-columns:repeat(2,75px)}.math-sudoku-bank .math-object{width:75px;height:80px}.math-operation{grid-template-columns:1.6fr 30px 1fr;gap:10px}.math-arithmetic-tray,.math-outside{padding:12px}.math-game-feedback{font-size:19px}}@media(max-width:500px){.math-game-menu{grid-template-columns:repeat(2,1fr)}.math-task{font-size:18px}.math-game header button{font-size:14px;padding:8px 11px}.math-number-options{gap:15px}.math-number-options button{width:85px;height:75px;font-size:40px}.math-pattern-strip{gap:5px;padding:10px}.math-pattern-piece{width:42px;height:68px}.math-slot{min-width:55px;min-height:75px}.math-sudoku-wrap{gap:12px;align-items:start}.math-sudoku-grid{grid-template-columns:repeat(4,51px);grid-template-rows:repeat(4,51px)}.math-sudoku-grid>div,.math-sudoku-grid>button{padding:6px}.math-sudoku-bank{grid-template-columns:58px;gap:6px}.math-sudoku-bank .math-object{width:58px;height:60px;padding:7px}.math-operation .math-object{width:65px;height:75px}.math-placed-object{width:60px;height:70px}.math-quantity-slots .math-slot{width:90px;min-height:115px}.math-quantity-pieces>button{width:95px;min-height:100px}.math-quantity-pieces svg{width:35px;height:40px}.math-search-target{gap:8px}.math-count-tray,.math-search-grid{padding:14px;gap:11px}}

/* 普通图片允许滚屏，只有可拖物品独占拖动手势。 */
.math-game .math-object{touch-action:pan-y}.math-game [data-mg-piece]{touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}.math-game header{position:sticky;top:-18px;background:#e2f4fc;z-index:3;padding:10px 0}.math-game{padding-bottom:35px}

.math-pair-slots{display:flex;justify-content:center;flex-wrap:wrap;gap:22px;margin:25px 0}.math-pair-slots .math-slot{width:180px;height:175px;position:relative}.math-pair-target{display:block;width:120px;height:125px;pointer-events:none}.math-pair-target svg{width:100%;height:100%}.math-pair-target.is-shadow svg{filter:url(#math-shadow-filter)}.math-pair-check{position:absolute;right:8px;bottom:2px;color:#43856a;font-size:35px}.math-slot.paired{border-style:solid;border-color:#73b494;background:#f0faf4}.math-slot.paired .is-shadow svg{filter:none}@media(max-width:600px){.math-pair-slots{gap:12px}.math-pair-slots .math-slot{width:100px;height:125px;min-width:90px}.math-pair-target{width:75px;height:85px}.math-piece-options{gap:10px;flex-wrap:wrap}}

.math-word-label{text-align:center;font-size:22px;color:#125b91;margin:4px 0 14px;min-height:30px}.math-word-label:empty{display:none}
