/* 本机学习模块 UI：固定层，不参与道路/车辆布局计算。 */
#learningFuelRoot { position: fixed; inset: 0; z-index: 10050; pointer-events: none; font-family: system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif; color: #17231c; }
#learningFuelRoot [hidden] { display: none !important; }
.lf-hud { position: absolute; top: max(10px,calc(env(safe-area-inset-top,0px) + 8px)); right: max(10px,calc(env(safe-area-inset-right,0px) + 10px)); width: min(184px,46vw); display: grid; grid-template-columns: 1fr 1fr; gap: 6px; pointer-events: auto; }
.lf-meter { grid-column: 1 / -1; box-sizing: border-box; padding: 7px 9px 8px; border: 1px solid transparent; border-radius: 12px; background: rgba(12,22,27,.78); color: #fff; box-shadow: 0 2px 8px #0005; backdrop-filter: blur(7px); }
.lf-meter.low { animation: lf-meter-warning 1.2s ease-in-out infinite; }
@keyframes lf-meter-warning {
  0%,100% { background-color: rgba(12,22,27,.78); border-color: rgba(255,75,67,.2); box-shadow: 0 2px 8px #0005, 0 0 4px rgba(255,59,48,.16); }
  50% { background-color: rgba(42,20,23,.86); border-color: rgba(255,75,67,.62); box-shadow: 0 2px 8px #0005, 0 0 13px rgba(255,59,48,.38); }
}
.lf-meter-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; line-height: 1.2; }
.lf-meter-line strong { color: #e7ffe7; font-variant-numeric: tabular-nums; }
.lf-track { height: 7px; margin-top: 6px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.23); }
.lf-track i { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#36d77b,#c9f85e); transition: width .25s ease,background .2s ease; }
.lf-track i.low { background: #ff3b30; }
.lf-low-warning { margin: 5px 0 0; color: #ff6258; font-size: 11px; line-height: 1.1; font-weight: 800; letter-spacing: .04em; }
.lf-phone-learning { position: absolute; z-index: 12; left: 2%; right: 2%; top: 2%; bottom: 16%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2%; overflow: hidden; border: 2px solid rgba(255,255,255,.92); border-radius: 17px; color: #173c2a; background: rgba(244,255,246,.97); box-shadow: 0 3px 14px rgba(0,0,0,.3); font-family: system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif; pointer-events: auto; }
.lf-phone-learning[hidden] { display: none !important; }
.lf-phone-caption { color: #648071; font-size: clamp(11px,3.5vw,17px); line-height: 1; font-weight: 700; letter-spacing: .08em; }
.lf-phone-learning strong { margin-top: 1%; font-size: clamp(64px,24vw,132px); line-height: .95; font-weight: 850; }
.lf-phone-learning small { min-height: 16px; margin-top: 1%; color: #557263; font-size: clamp(15px,4.5vw,22px); line-height: 1; font-weight: 700; }
.lf-hud-btn { min-height: 42px; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; padding: 5px 7px; color: #fff; font-size: 12px; font-weight: 700; background: rgba(21,35,38,.82); box-shadow: 0 2px 8px #0004; touch-action: manipulation; }
.lf-refuel { background: rgba(20,126,79,.92); }
.lf-ticket { background: rgba(155,53,42,.92); }
.lf-settings { background: rgba(44,61,73,.9); }
.lf-hud-btn:active,.lf-choice:active,.lf-repeat:active { transform: translateY(1px) scale(.98); }
.lf-shade { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: max(12px,env(safe-area-inset-top,0px)) 12px max(12px,env(safe-area-inset-bottom,0px)); background: rgba(5,12,16,.64); pointer-events: auto; overscroll-behavior: contain; }
.lf-dialog { width: min(440px,100%); max-height: min(92dvh,760px); overflow: auto; border: 1px solid rgba(255,255,255,.7); border-radius: 22px; padding: clamp(16px,4vw,24px); background: linear-gradient(155deg,#fffefa,#f1f7f2); box-shadow: 0 16px 56px #0008; -webkit-overflow-scrolling: touch; }
.lf-dialog header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.lf-dialog h2 { margin: 0; color: #173d2d; font-size: clamp(20px,5vw,25px); line-height: 1.2; }
.lf-dialog header p { margin: 6px 0 0; color: #60746a; font-size: 13px; line-height: 1.4; }
.lf-close { flex: 0 0 42px; width: 42px; height: 42px; border: 0; border-radius: 50%; color: #496054; background: #e6eee8; font-size: 28px; line-height: 1; touch-action: manipulation; }
.lf-question { position: relative; display: flex; min-height: 82px; align-items: center; justify-content: center; gap: 13px; margin: 14px 0 8px; border-radius: 16px; background: linear-gradient(120deg,#e5f8e9,#f2f9e6); }
.lf-pinyin { color: #17553a; font-size: clamp(26px,7vw,34px); font-weight: 750; letter-spacing: .035em; }
.lf-whisper { position: absolute; right: 9px; bottom: 5px; font-size: 5px; line-height: 1; color: #274b35; opacity: .13; user-select: none; pointer-events: none; }
.lf-repeat { min-height: 42px; border: 1px solid #b6dac0; border-radius: 12px; padding: 0 11px; color: #23583c; background: #fff; font-size: 13px; font-weight: 700; touch-action: manipulation; }
.lf-prompt { min-height: 22px; padding: 4px 2px 9px; color: #46574c; text-align: center; font-size: 14px; }
.lf-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.lf-choice { min-height: 68px; border: 2px solid #d6e7d9; border-radius: 15px; color: #173c2a; background: #fff; font-size: 30px; font-family: inherit; font-weight: 700; box-shadow: 0 3px 0 #dce9dd; touch-action: manipulation; }
.lf-choice.correct { border-color: #47b878; background: #e6faec; }
.lf-choice.incorrect { border-color: #e78c83; background: #fff0ed; }
.lf-feedback { min-height: 28px; padding: 8px 2px 0; color: #5b675f; text-align: center; font-size: 14px; font-weight: 650; }
.lf-feedback.good { color: #16834e; }
.lf-feedback.bad { color: #c6453a; }
.lf-stop { width: 100%; min-height: 44px; margin-top: 8px; border: 1px solid #d2ded5; border-radius: 13px; color: #536359; background: #edf2ee; font-size: 14px; font-weight: 700; touch-action: manipulation; }
.lf-settings-dialog { width: min(560px,100%); }
.lf-field { display: block; margin-top: 14px; color: #345242; font-size: 13px; font-weight: 700; }
.lf-field textarea { display: block; box-sizing: border-box; width: 100%; margin-top: 7px; resize: vertical; border: 1px solid #c9d9cd; border-radius: 12px; padding: 10px; color: #24372b; background: #fff; font: 14px/1.55 system-ui,-apple-system,"PingFang SC",sans-serif; }
.lf-setting-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 14px; }
.lf-field span { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin-top: 7px; }
.lf-field input[type=range] { width: 100%; accent-color: #29965b; }
.lf-field b { min-width: 52px; color: #237444; text-align: right; font-size: 12px; }
.lf-settings-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.lf-settings-actions button { min-height: 44px; border-radius: 12px; padding: 0 16px; font-size: 14px; font-weight: 750; touch-action: manipulation; }
.lf-secondary { border: 1px solid #ccd8ce; color: #526257; background: #f5f7f5; }
.lf-primary { border: 1px solid #187745; color: #fff; background: #21834d; }
@media (max-width: 420px) {
  .lf-hud { width: min(158px,43vw); gap: 5px; }
  .lf-hud-btn { min-height: 40px; padding-inline: 5px; font-size: 11px; }
  .lf-meter { padding: 6px 8px 7px; }
  .lf-meter-line { font-size: 11px; }
  .lf-setting-grid { grid-template-columns: 1fr; }
  .lf-dialog { border-radius: 19px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .lf-shade { align-items: flex-start; }
  .lf-dialog { max-height: calc(100dvh - 18px); padding: 14px 18px; }
  .lf-dialog h2 { font-size: 19px; }
  .lf-question { min-height: 58px; margin: 9px 0 5px; }
  .lf-choice { min-height: 50px; }
  .lf-stop { min-height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .lf-meter.low { animation: none; border-color: rgba(255,75,67,.55); box-shadow: 0 2px 8px #0005, 0 0 9px rgba(255,59,48,.3); }
}
