#education-overlay { z-index: 42; }
#pause-overlay { z-index: 48; }
.edu-panel { max-width: 650px; max-height: calc(100dvh - 32px); overflow-y: auto; }
.edu-panel .btn, #education-controls .btn { min-width: 48px; min-height: 48px; }
.edu-settings { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; text-align: left; margin: 16px 0; }
.edu-settings label { display: grid; gap: 6px; color: #e2cfad; }
.edu-settings select { min-height: 48px; width: 100%; background: #4a2d14; color: #fff8dc; font: inherit; border: 2px solid #8b6b3a; border-radius: 8px; padding: 8px; }
.edu-levels { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.edu-panel button:disabled { opacity: .45; cursor: default; }
.edu-offers { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 16px 0; }
.edu-offers button { padding: 10px 4px; display: grid; justify-items: center; border-color: #c4a23c; }
.edu-offers canvas { width: 100%; max-width: 100px; height: auto; }
.edu-offers small { margin-top: 10px; font-size: 20px; }
.edu-quota { color: #b6ff87; font-size: 24px; }
.edu-equation { font-size: clamp(32px,6vw,48px); color: #fff6ca; letter-spacing: 3px; margin: 12px 0; font-weight: 800; }
.edu-prompt { min-height: 24px; color: #dac5a3; }
#edu-feedback,#edu-error { min-height: 24px; color: #ffda79; }
#education-controls { position: absolute; bottom: 12px; left: 8px; right: 8px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; z-index: 32; pointer-events: none; }
#education-controls > * { pointer-events: auto; }.edu-place-label { background: #2b1a0e; border: 2px solid #d9a520; border-radius: 8px; padding: 12px; }
#edu-import { display: none; }
@media(max-width:480px){ .edu-levels{grid-template-columns:repeat(2,minmax(0,1fr))}.edu-offers{gap:6px}.edu-offers span{font-size:12px}.edu-settings{gap:8px} }


/* 常驻卡片对齐画布顶部木槽，卡片数量多时在槽内横向滚动。 */
#education-plantbar { position:absolute; z-index:35; display:flex; align-items:center; gap:6px; pointer-events:auto; height:64px; padding:3px 4px; border:2px solid #6b4420; border-radius:10px 10px 0 0; background:linear-gradient(#a9743f,#8b5a2b 50%,#6b4420); }
.edu-opening { flex:0 0 54px; color:#fff0ba; font-size:15px; font-weight:bold; text-align:center; white-space:pre-line; }
.edu-card-strip { display:flex; flex:1 1 0%; min-width:0; align-items:center; gap:5px; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; height:100%; padding:2px; touch-action:pan-x; overscroll-behavior-x:contain; }
/* 滚动条不占卡片高度，避免手机浏览器裁掉图标或名称。 */
.edu-card-strip::-webkit-scrollbar { display:none; }
#education-plantbar { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
.edu-plant-card { position:relative; flex:0 0 65px; min-width:48px; height:69px; min-height:48px; border:2px solid #9b7d3a; border-radius:7px; color:#35240f; background:linear-gradient(#f0e3b4,#c8ac6d); font-family:inherit; overflow:hidden; cursor:pointer; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:0 2px; }
.edu-plant-card canvas { width:50px; height:40px; }
.edu-plant-card:disabled { cursor:default; filter:saturate(.55); }.edu-plant-card.selected { border-color:#faffb6; box-shadow:0 0 0 2px #83bd44; }
.edu-card-cooldown { position:absolute; inset:0 0 auto; background:rgba(24,19,12,.73); color:#fff3bb; display:grid; place-items:center; min-height:20px; font-size:24px; font-weight:bold; pointer-events:none; }
#education-overlay.edu-question { display:flex; justify-content:flex-end; align-items:flex-start; background:transparent; backdrop-filter:none; padding:96px 12px 8px; pointer-events:none; }
#education-overlay.edu-question .edu-panel { display:block; width:min(360px,46vw); max-height:calc(100dvh - 112px); padding:14px; pointer-events:auto; }
.edu-question .edu-panel h2 { font-size:18px; margin-bottom:6px; }.edu-question .edu-equation { font-size:34px; margin:8px 0; }.edu-question .edu-prompt { font-size:14px; }
.edu-question .btn-row { gap:6px; margin-top:10px; }.edu-question .btn-row .btn { padding:6px 9px; }
.edu-question #edu-feedback:empty { display:none; }
@media(max-width:600px) {
 #education-plantbar { height:58px; }.edu-plant-card { height:54px; flex-basis:55px; }.edu-plant-card canvas { height:36px; width:44px; }.edu-opening { flex-basis:40px; font-size:12px; }
 #education-overlay.edu-question { padding-top:76px; }.edu-question .edu-panel { width:min(340px,calc(100vw - 24px)) !important; max-height:calc(100dvh - 90px) !important; }
}

.edu-plant-card { height:calc(100% - 4px); }

.edu-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:14px 0; }
.edu-choices button { min-height:68px; font-size:34px; touch-action:manipulation; }

/* 帮助页使用用户背景，数学图随题目绘制；四个答案始终在同一页。 */
#education-overlay.edu-question.edu-help .edu-panel {
 width:min(900px,calc((100dvh - 270px) * 1.777),calc(100vw - 24px)) !important;
 max-width:none; padding:8px; max-height:calc(100dvh - 112px); scrollbar-width:thin; scrollbar-color:#9b7d3a #35210f;
}
.edu-guide-art { background:url('../assets/images/math-guide.webp') center / 100% 100% no-repeat; border-radius:16px; overflow:hidden; }
.edu-diagram { display:block; width:100%; height:auto; font-family:inherit; }
.edu-help .edu-choices { grid-template-columns:repeat(4,minmax(0,1fr)); margin:8px 0; gap:10px; }
.edu-help .edu-choices button { min-height:56px; padding:4px; }
.edu-help .btn-row { margin-top:6px; }
@media(max-width:600px) {
 #education-overlay.edu-question.edu-help .edu-panel { width:calc(100vw - 24px) !important; }
 .edu-help .edu-choices { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
}

.edu-bar-pause { flex:0 0 48px; width:48px; height:48px; padding:0; border:2px solid #4b2f14; border-radius:8px; background:#805020; color:#fff0be; font-size:26px; cursor:pointer; touch-action:manipulation; }
