:root{--navy:#11243d;--navy2:#183553;--paper:#f4f6f3;--white:#fff;--orange:#f59e45;--green:#2b9c79;--red:#db5b59;--ink:#182534;--muted:#6f7a84;--line:#dfe4e1}*{box-sizing:border-box}body{margin:0;font-family:"Microsoft YaHei UI","Microsoft YaHei",sans-serif;background:var(--paper);color:var(--ink)}button,select{font:inherit}.app-shell{min-height:100vh;display:grid;grid-template-columns:245px 1fr}.sidebar{background:var(--navy);color:#fff;padding:30px 20px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:12px;padding:0 8px 28px}.brand-mark{display:grid;place-items:center;width:43px;height:43px;border-radius:12px;background:var(--orange);font-size:22px}.brand b,.brand small{display:block}.brand b{font-size:18px}.brand small{margin-top:4px;color:#9fb0c1;font-size:12px}.sidebar nav{display:grid;gap:7px}.nav-item{border:0;color:#b8c5d0;background:transparent;text-align:left;padding:13px 15px;border-radius:10px;cursor:pointer}.nav-item:hover,.nav-item.active{background:var(--navy2);color:white}.nav-item span{float:right;background:#294865;border-radius:12px;padding:1px 7px;font-size:11px}.side-tip{margin-top:auto;border-top:1px solid #2a4057;padding:18px 8px 0;color:#8ea1b4;font-size:12px;line-height:1.7}main{padding:34px 5vw 60px;max-width:1400px;width:100%}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:26px}h1{margin:3px 0 0;font-size:29px}.eyebrow{margin:0;color:var(--orange);font-size:11px;font-weight:bold;letter-spacing:2px}.ghost,.mode{border:1px solid var(--line);background:white;padding:10px 16px;border-radius:9px;cursor:pointer}.view{display:none}.view.active{display:block}.overview{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:18px}.overview>div,.toolbar,.question-card,.stats-panel,.section-card,.list-card{background:white;border:1px solid var(--line);border-radius:14px}.overview>div{padding:22px}.overview span{display:block;color:var(--muted);font-size:13px}.overview strong{font-size:31px;margin-right:5px}.overview small{color:var(--muted)}.toolbar{display:flex;gap:10px;padding:14px;margin-bottom:22px}.toolbar select{min-width:240px;border:1px solid var(--line);border-radius:8px;padding:9px;background:white}.mode.active{border-color:var(--navy);background:var(--navy);color:white}.primary{border:0;background:var(--orange);color:#fff;font-weight:bold;padding:11px 20px;border-radius:9px;cursor:pointer}.toolbar .primary{margin-left:auto}.section-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.section-card{padding:18px;cursor:pointer;transition:.2s}.section-card:hover{transform:translateY(-2px);box-shadow:0 8px 25px #1c334015}.section-card h3{font-size:15px;margin:0 0 14px}.section-card p{font-size:12px;color:var(--muted);margin:0 0 9px}.mini-bar,.quiz-progress div{height:6px;background:#e8ece9;border-radius:8px;overflow:hidden}.mini-bar i,.quiz-progress i{display:block;height:100%;background:var(--orange);border-radius:8px}.quiz-top{display:flex;align-items:center;gap:20px;max-width:850px;margin:auto auto 18px}.quiz-progress{flex:1;color:var(--muted);font-size:12px}.quiz-progress div{margin-top:7px}.icon-btn{border:1px solid var(--line);background:white;border-radius:9px;font-size:25px;width:44px;height:44px;cursor:pointer;color:var(--orange)}.question-card{max-width:850px;margin:auto;padding:42px}.tag{display:inline-block;color:#a55e18;background:#fff0dc;padding:7px 10px;border-radius:7px;font-size:12px}.question-card h2{font-size:23px;line-height:1.65;margin:25px 0 35px}.answer-actions{display:grid;grid-template-columns:1fr 1fr;gap:16px}.judge{padding:18px;border-radius:12px;background:white;font-size:18px;font-weight:bold;cursor:pointer}.judge.true{border:2px solid #83c9b4;color:var(--green)}.judge.false{border:2px solid #e7aaa8;color:var(--red)}.judge:disabled{opacity:.55}.judge.selected{color:white}.judge.true.selected{background:var(--green)}.judge.false.selected{background:var(--red)}.explanation{display:none;margin-top:25px;border-left:4px solid var(--orange);background:#fff8ed;padding:18px 20px;line-height:1.7}.explanation.show{display:block}.explanation b.correct{color:var(--green)}.explanation b.wrong{color:var(--red)}.explanation p{margin:7px 0 0}.next{display:none;margin:24px 0 0 auto}.next.show{display:block}.list-card{padding:20px;margin-bottom:12px}.list-card h3{font-size:16px;line-height:1.6;margin:0 0 8px}.list-card p{margin:0;color:var(--muted);font-size:13px}.list-card button{float:right}.empty{text-align:center;padding:80px;color:var(--muted)}.stats-panel{padding:28px}.stat-row{display:grid;grid-template-columns:210px 1fr 80px;gap:15px;align-items:center;margin:17px 0}.stat-row .mini-bar{height:9px}.danger{background:var(--red)!important}@media(max-width:900px){.app-shell{grid-template-columns:1fr}.sidebar{padding:14px 18px}.brand{padding-bottom:12px}.sidebar nav{display:flex;overflow:auto}.nav-item{white-space:nowrap}.side-tip{display:none}main{padding:24px}.overview,.section-grid{grid-template-columns:1fr}.toolbar{flex-wrap:wrap}.toolbar select{width:100%}.toolbar .primary{margin-left:0}.question-card{padding:25px}.answer-actions{grid-template-columns:1fr}}
:root{--navy:#11243d;--navy2:#183553;--paper:#f4f6f3;--white:#fff;--orange:#f59e45;--green:#2b9c79;--red:#db5b59;--ink:#182534;--muted:#6f7a84;--line:#dfe4e1}
.favorite-section{margin-bottom:28px}.favorite-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.favorite-head h2{margin:0;font-size:20px}.favorite-head h2 span{display:inline-block;margin-left:8px;padding:2px 9px;border-radius:14px;background:var(--navy2);color:#fff;font-size:12px;vertical-align:middle}.favorite-section .empty{background:#fff;border:1px solid var(--line);border-radius:14px;padding:42px}.primary:disabled{opacity:.45;cursor:not-allowed}
.favorite-types{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.favorite-type{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:25px 28px;background:#fff;border:1px solid var(--line);border-radius:14px}.favorite-type small{color:var(--orange);font-weight:700}.favorite-type h2{margin:6px 0 9px;font-size:21px}.favorite-type p{margin:0;color:var(--muted)}.favorite-type p strong{color:var(--ink);font-size:25px;margin-right:4px}@media(max-width:760px){.favorite-types{grid-template-columns:1fr}.favorite-type{align-items:flex-end}}
/* Source images embedded with high-voltage picture questions. */
.question-figure{margin:-14px 0 28px;text-align:center}.question-figure img{display:block;max-width:100%;max-height:440px;margin:auto;border:1px solid var(--line);border-radius:10px}.library-figure{display:block;max-width:min(100%,520px);max-height:340px;margin:12px 0;border:1px solid var(--line);border-radius:9px}
.explanation p{color:#d43f3a;font-weight:600}

/* Phone-first refinements: retain the desktop experience while making all
   primary study actions reachable with one hand. */
@media(max-width:700px){
  /* Keep the selection landing page focused on starting a practice session. */
  #choiceView .choice-overview{display:none}
  #choiceView .choice-toolbar{display:none}
  #choiceView .choice-learn{display:none!important}
  #choiceView .choice-category .card-actions{grid-template-columns:1fr 1fr}
  #choiceView .choice-category .choice-reset,#choiceView .choice-category .choice-start{grid-column:auto}
  #choiceView .choice-category .choice-start{background:#f7a042}
  #practiceView .toolbar,#practiceView:not(.practice-category-mode) .card-actions{display:none}
  #practiceView .section-card{cursor:pointer}
  #practiceView:not(.practice-category-mode) .section-grid{display:none}
  #practiceView.practice-category-mode .mobile-study-portal{display:none}
  #practiceView.practice-category-mode .section-card .card-actions{display:grid}
  #practiceView.practice-category-mode .learn-category{display:none!important}
  #practiceView.practice-category-mode .section-card .practice-category{grid-column:auto}
  body{padding-bottom:76px;font-size:16px}
  .app-shell{display:block}
  .sidebar{position:fixed;z-index:50;right:0;bottom:0;left:0;height:72px;padding:5px 4px calc(5px + env(safe-area-inset-bottom));background:#fff;box-shadow:0 -4px 16px #11243d1a}
  .sidebar .brand,.side-tip{display:none}
  .sidebar nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;height:100%;overflow:visible}
  .sidebar #choiceNav,.sidebar #knowledgeNav,.sidebar .nav-item[data-view="wrong"],.sidebar .nav-item[data-view="stats"]{display:none}
  .sidebar .operation-nav{display:none}
  .sidebar .mobile-only-nav{display:flex}
  .nav-item{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;padding:4px 2px;border-radius:0;text-align:center;white-space:normal;font-size:13px;font-weight:500;line-height:1.2;color:#9ba2a8}
  .nav-item::before{content:attr(data-mobile-icon);display:grid;place-items:center;width:30px;height:30px;color:#b9bec3;font-family:Arial,sans-serif;font-size:27px;line-height:1}
  .nav-item:hover,.nav-item.active{background:transparent;color:#3596eb}
  .nav-item.active::before{border-radius:9px;background:linear-gradient(145deg,#56c7ff,#2f93ee);color:#fff;font-size:25px;box-shadow:0 3px 7px #3596eb38}
  .nav-item.active::after{display:none}
  .nav-item span{display:none}
  main{padding:16px 14px 28px;max-width:none}
  header{margin-bottom:15px;align-items:flex-end}
  .eyebrow{font-size:9px;letter-spacing:1.4px}
  h1{font-size:22px;line-height:1.25}
  .header-actions .bank-switch{display:flex;flex-direction:column;gap:3px;font-size:11px;color:var(--muted)}
  #resetBtn{display:none!important}
  .overview,.choice-overview{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:12px}
  .overview>div,.choice-overview>div{padding:13px 8px;text-align:center;border-radius:11px}
  .overview span,.choice-overview span{font-size:11px}.overview strong,.choice-overview strong{display:block;margin:3px 0 0;font-size:24px}.overview small,.choice-overview small{font-size:10px}
  .toolbar{position:sticky;top:0;z-index:10;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:9px;margin:0 -2px 14px;background:var(--paper);border:0}
  .toolbar select,.toolbar .primary{grid-column:span 2;width:100%;min-width:0;height:44px;margin:0}.toolbar .mode,.toolbar .choice-mode{height:42px;padding:7px 6px}
  .section-grid{grid-template-columns:1fr;gap:10px}.section-card{padding:15px;border-radius:12px}.section-card h3{font-size:16px;margin-bottom:8px}.card-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.card-actions button{min-height:39px;padding:7px;font-size:12px}.card-actions .primary{grid-column:span 2}
  .quiz-top{position:sticky;top:0;z-index:20;margin:-16px -14px 14px;padding:10px 14px;background:var(--paper);gap:9px}.quiz-top .ghost{padding:9px 10px;font-size:13px}.quiz-top .icon-btn{width:40px;height:40px}.quiz-progress{min-width:0}.quiz-progress span{white-space:nowrap;font-size:11px}
  .question-card{padding:21px 16px;border-radius:13px}.question-card h2{margin:17px 0 24px;font-size:20px;line-height:1.55}.tag{font-size:11px}.question-figure{margin:0 0 18px}.question-figure img{max-height:330px}
  .answer-actions{gap:10px}.judge{min-height:58px;padding:14px;font-size:18px}.choice-option{min-height:58px;padding:13px 14px;font-size:16px}.choice-letter{min-width:32px;height:32px}
  .quiz-nav{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:20px}.quiz-nav .primary,.quiz-nav .ghost{min-height:45px;padding:9px}.quiz-nav #choiceNext{margin-left:0}.explanation{margin-top:18px;padding:14px;font-size:15px}.choice-feedback{margin-top:16px}
  .number-panel{width:min(100%,360px)}.number-grid{grid-template-columns:repeat(5,1fr)}
  .choice-library-head{top:0;margin:0 -14px;padding:9px 14px}.choice-library-item{padding:15px}.choice-library-body h3{font-size:17px}.choice-library-options p{font-size:15px}
  .favorite-type{padding:18px;gap:10px}.favorite-type h2{font-size:18px}.favorite-type .primary{padding:10px 12px}
}
.mobile-study-portal,.mobile-only-nav{display:none}
.materials-intro{margin:3px 0 12px;color:var(--muted);font-size:14px}.materials-intro p{margin:0}.material-types,.material-directory{display:grid;gap:12px}.material-type,.material-folder{display:grid;grid-template-columns:48px 1fr auto;align-items:center;gap:14px;width:100%;padding:18px;background:#fff;border:1px solid var(--line);border-radius:14px;text-align:left;cursor:pointer;color:var(--ink)}.material-type:hover,.material-folder:hover{border-color:#c9d8e5;box-shadow:0 6px 18px #17324c0d}.material-type-icon,.material-folder>span{display:grid;place-items:center;width:42px;height:42px;border-radius:11px;background:#eaf6ff;color:#278fe3;font-size:24px;font-weight:700}.material-type b,.material-folder b{display:block;font-size:18px}.material-type small,.material-folder small{display:block;margin-top:5px;color:var(--muted);font-size:13px}.material-type em,.material-folder em{font-style:normal;font-size:28px;color:#8ca0b2}.material-folder>span{background:#edf1ef;color:#617284;font-size:16px}.material-folder b{font-size:16px}.material-back{margin:0 0 12px}
@media(max-width:700px){
  .mobile-study-portal{display:grid;gap:10px;margin:2px 0 16px}
  .material-type,.material-folder{padding:16px 14px;gap:12px}.material-type b{font-size:18px}.material-folder b{font-size:16px}.material-types,.material-directory{gap:10px}.material-document-list{gap:12px}
  .study-entry-card{position:relative;display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:11px;min-height:82px;padding:18px 14px 12px;background:#fff;border-radius:11px;box-shadow:0 1px 0 #e6e8ed}
  .study-step{position:absolute;top:0;left:0;padding:3px 8px;border-radius:10px 0 8px 0;background:#f09331;color:#fff;font-size:12px;font-weight:700}
  .study-entry-icon{display:grid;place-items:center;width:40px;height:40px;margin-top:5px;border-radius:10px;background:linear-gradient(145deg,#44bfff,#d8eeff);color:#fff;font-size:31px;line-height:1;text-shadow:0 1px 2px #2387c9}
  .study-entry-copy{min-width:0;margin-top:5px}.study-entry-copy h2{margin:0 0 3px;font-size:17px;color:#172941}.study-entry-copy p{margin:0;color:#64778f;font-size:13px}
  .study-entry-go{border:0;border-radius:18px;padding:8px 18px;background:linear-gradient(135deg,#efac4a,#c8772c);color:#fff;font-size:14px;white-space:nowrap}
  .mobile-study-portal+.toolbar{margin-top:0}
}
