/* ============================================================
   登录页 + 设置面板样式（暖色纸感，延续工作台视觉）
   ============================================================ */
#login-gate{
  position:fixed; inset:0; z-index:9000;
  display:none; align-items:center; justify-content:center;
  background:linear-gradient(160deg,#fff7e8 0%,#ffeed6 45%,#fdf3e3 100%);
  padding:20px; overflow-y:auto;
}
#login-gate::before{
  content:''; position:absolute; inset:0; opacity:.4;
  background-image:radial-gradient(circle at 18% 22%, #ffd9a0 0, transparent 42%),
                   radial-gradient(circle at 82% 76%, #ffc9d8 0, transparent 40%);
  pointer-events:none;
}
.lg-box{
  position:relative; width:100%; max-width:400px;
  background:#fffdf8; border:1px solid #eddfc6; border-radius:22px;
  padding:28px 24px 22px; box-shadow:0 12px 40px rgba(180,140,80,.16);
  text-align:center;
}
.lg-brand{font-size:44px;line-height:1;}
.lg-title{margin:10px 0 4px;font-size:22px;color:#5b5347;letter-spacing:.5px;}
.lg-sub{margin:0 0 18px;font-size:13px;color:#a99e8b;}

.lg-tabs{display:flex;gap:6px;background:#f5ecdd;padding:5px;border-radius:12px;margin-bottom:18px;}
.lg-tab{
  flex:1; padding:10px;border:none;border-radius:9px;cursor:pointer;
  font-size:14.5px;font-weight:700;font-family:inherit;
  background:transparent;color:#8a8175;min-height:42px;
}
.lg-tab.on{background:#fff;color:#e8912d;box-shadow:0 1px 4px rgba(180,140,80,.14);}

.lg-form{text-align:left;display:grid;gap:12px;}
.lg-field{display:block;}
.lg-field>span{display:block;font-size:12.5px;color:#8a8175;margin-bottom:5px;}
.lg-field input,.lg-field select{
  width:100%;padding:11px 13px;border:1px solid #e5d8bf;border-radius:11px;
  font-size:16px;background:#fffefa;color:#5b5347;font-family:inherit;min-height:46px;
}
.lg-field input:focus,.lg-field select:focus{outline:none;border-color:#e8912d;background:#fff;}

.lg-msg{min-height:20px;font-size:13px;text-align:center;}
.lg-msg:empty{display:none;}
.lg-msg.err{color:#d16161;}
.lg-msg.ok{color:#5a9e5c;}

.lg-btn{
  width:100%;padding:13px;border:none;border-radius:13px;cursor:pointer;
  font-size:16px;font-weight:800;font-family:inherit;min-height:48px;
  background:linear-gradient(135deg,#f6b352,#e8912d);color:#fff;
  box-shadow:0 3px 10px rgba(232,145,45,.3);
}
.lg-btn:disabled{opacity:.6;cursor:not-allowed;}
.lg-btn:active{transform:translateY(1px);}
.lg-foot{margin:16px 0 0;font-size:11.5px;color:#b5aa96;line-height:1.7;}

/* ---------- 设置抽屉 ---------- */
#sd-mask{position:fixed;inset:0;background:rgba(60,50,35,.42);z-index:8000;display:none;}
#sd-mask.on{display:block;}
#sd-panel{
  position:fixed;top:0;right:0;bottom:0;width:340px;max-width:88vw;z-index:8001;
  background:#fffdf8;box-shadow:-6px 0 24px rgba(120,90,50,.16);
  transform:translateX(102%);transition:transform .24s ease;
  padding:20px;overflow-y:auto;
}
#sd-panel.on{transform:none;}
#sd-panel h3{margin:0 0 4px;font-size:18px;color:#5b5347;}
#sd-panel .sd-sub{font-size:12px;color:#a99e8b;margin-bottom:18px;line-height:1.6;}
#sd-panel .sd-field{margin-bottom:14px;}
#sd-panel .sd-field>label{display:block;font-size:12.5px;color:#8a8175;margin-bottom:5px;}
#sd-panel input,#sd-panel select{
  width:100%;padding:10px 12px;border:1px solid #e5d8bf;border-radius:10px;
  font-size:16px;font-family:inherit;background:#fffefa;color:#5b5347;
}
.sd-btn{
  width:100%;padding:12px;border:none;border-radius:11px;cursor:pointer;
  font-size:14.5px;font-weight:700;font-family:inherit;min-height:44px;margin-bottom:9px;
  background:linear-gradient(135deg,#f6b352,#e8912d);color:#fff;
}
.sd-btn.ghost{background:#fff;color:#8a8175;border:1px solid #e5d8bf;}
.sd-btn.danger{background:#fff;color:#c96a6a;border:1px solid #f0c9c9;}
.sd-msg{font-size:12.5px;text-align:center;min-height:18px;margin:6px 0;}
.sd-msg:empty{display:none;}
.sd-msg.err{color:#d16161;}
.sd-msg.ok{color:#5a9e5c;}

/* 顶栏账号入口 */
#topbar-user{
  display:flex;align-items:center;gap:7px;cursor:pointer;
  padding:6px 12px;border-radius:20px;background:rgba(255,255,255,.75);
  border:1px solid #eddfc6;font-size:13.5px;color:#6b6152;min-height:38px;
  max-width:190px;
}
#topbar-user:hover{background:#fff;}
#topbar-user-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}

@media(max-width:640px){
  .lg-box{padding:22px 18px 18px;}
  .lg-title{font-size:19px;}
  #sd-panel{width:100%;}
  #topbar-user{max-width:110px;font-size:12.5px;}
}
/* 学习重点提示块 */
.sd-focus{
  margin:10px 0 14px;padding:10px 12px;border-radius:10px;
  background:#fdf6e8;border:1px dashed #e8d5b0;font-size:12px;color:#8a8175;line-height:1.7;
}
.sd-focus span{display:block;}

/* ---------- 付费引导弹窗 ---------- */
#pw-mask{
  position:fixed;inset:0;background:rgba(50,42,30,.62);z-index:9500;
  display:none;align-items:center;justify-content:center;padding:18px;overflow-y:auto;
}
#pw-mask.on{display:flex;}
.pw-box{
  width:100%;max-width:400px;background:#fffdf8;border-radius:20px;
  padding:26px 24px 22px;text-align:center;
  box-shadow:0 16px 48px rgba(0,0,0,.24);
}
.pw-title{font-size:19px;font-weight:800;color:#5b5347;margin-bottom:8px;}
.pw-desc{font-size:13px;color:#8a8175;line-height:1.75;margin-bottom:18px;}
.pw-qr{
  border:1px dashed #e0cfa8;border-radius:14px;background:#fdf7ec;
  padding:18px;min-height:180px;display:flex;align-items:center;justify-content:center;
}
.pw-qr img{max-width:100%;border-radius:10px;display:block;}
.pw-placeholder{color:#a99e8b;font-size:13px;line-height:1.8;}
.pw-ph-ico{font-size:36px;margin-bottom:8px;}
.pw-notice{font-size:13px;color:#8a8175;margin-top:14px;font-weight:600;}
.pw-contact{font-size:12px;color:#a99e8b;margin-top:5px;}
.pw-btn{
  width:100%;margin-top:18px;padding:13px;border:none;border-radius:13px;
  font-size:15.5px;font-weight:800;font-family:inherit;cursor:pointer;min-height:48px;
  background:linear-gradient(135deg,#f6b352,#e8912d);color:#fff;
  box-shadow:0 3px 10px rgba(232,145,45,.3);
}
.pw-btn:active{transform:translateY(1px);}

/* 顶部试用/到期提示条 */
#pw-bar{
  display:none;position:fixed;top:0;left:0;right:0;z-index:7000;
  padding:7px 14px;text-align:center;font-size:12.5px;font-weight:700;
}
#pw-bar.trial{background:linear-gradient(90deg,#ffe9c9,#fff4e0);color:#a9701a;}
#pw-bar.paid{background:linear-gradient(90deg,#ffe0e0,#fff0f0);color:#b95b5b;}
@media(max-width:640px){
  #pw-bar{font-size:11.5px;padding:6px 10px;}
}

/* ---------- 顶栏「❓使用指南」 ---------- */
.tb-help{
  display:flex;align-items:center;gap:5px;cursor:pointer;font-family:inherit;
  padding:6px 11px;border-radius:20px;background:rgba(255,255,255,.8);
  border:1px solid #eddfc6;font-size:13px;color:#6b6152;min-height:38px;
}
.tb-help:hover{background:#fff;color:#e8912d;}
.tb-help span{font-size:14px;line-height:1;}
.tb-help i{font-style:normal;font-weight:600;}
@media(max-width:640px){
  .tb-help i{display:none;}
  .tb-help{padding:6px 9px;}
}

/* ---------- 孩子档案切换器（顶栏） ---------- */
#child-switch{position:relative;z-index:7200;}
.cs-btn{
  display:flex;align-items:center;gap:7px;cursor:pointer;
  padding:6px 12px;border-radius:20px;background:rgba(255,255,255,.8);
  border:1px solid #eddfc6;font-size:13.5px;color:#6b6152;min-height:38px;
  font-family:inherit;max-width:200px;
}
.cs-btn:hover{background:#fff;}
.cs-ava{font-size:15px;line-height:1;}
.cs-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:110px;font-weight:600;}
.cs-stage{
  font-size:11px;color:#a99e8b;flex:0 0 auto;white-space:nowrap;
  padding:1px 7px;border-radius:9px;background:#fdf6e8;line-height:1.6;
}
.cs-arrow{font-size:11px;color:#a99e8b;}
.cs-menu{
  display:none;position:absolute;top:46px;right:0;min-width:230px;
  background:#fffdf8;border:1px solid #eddfc6;border-radius:14px;
  box-shadow:0 8px 26px rgba(140,110,70,.16);padding:6px;overflow:hidden;
}
.cs-menu.on{display:block;}
.cs-item{
  display:flex;align-items:center;gap:9px;padding:9px 10px;
  border-radius:10px;cursor:pointer;
}
.cs-item:hover{background:#fdf6e8;}
.cs-item.on{background:#fff3e0;}
.cs-i-ava{font-size:20px;}
.cs-i-txt{flex:1;min-width:0;}
.cs-i-txt b{display:block;font-size:13.5px;color:#5b5347;font-weight:600;}
.cs-i-txt i{display:block;font-size:11px;color:#a99e8b;font-style:normal;}
.cs-i-cur{font-size:10.5px;color:#e8912d;font-weight:700;flex:0 0 auto;}
.cs-add{
  padding:10px;text-align:center;font-size:13px;color:#e8912d;
  border-top:1px solid #f3ece0;margin-top:4px;cursor:pointer;font-weight:600;
}
.cs-add:hover{background:#fdf6e8;}

/* ---------- 档案管理面板 ---------- */
#cm-mask{position:fixed;inset:0;background:rgba(60,50,35,.45);z-index:8600;display:none;}
#cm-mask.on{display:block;}
#cm-panel{
  position:fixed;top:0;right:0;bottom:0;width:360px;max-width:92vw;z-index:8601;
  background:#fffdf8;box-shadow:-6px 0 24px rgba(120,90,50,.16);
  transform:translateX(102%);transition:transform .22s ease;padding:20px;overflow-y:auto;
}
#cm-panel.on{transform:none;}
#cm-panel h3{margin:0 0 4px;font-size:18px;color:#5b5347;}
.cm-sub{font-size:12px;color:#a99e8b;margin-bottom:16px;line-height:1.6;}
.cm-item{
  display:flex;align-items:center;gap:10px;padding:12px;
  border:1px solid #ece3d3;border-radius:12px;margin-bottom:9px;background:#fff;
  cursor:pointer;transition:border-color .15s,box-shadow .15s,transform .12s;
}
.cm-item:hover{border-color:#f0c07a;box-shadow:0 2px 10px rgba(232,145,45,.10);}
.cm-item:active{transform:scale(.985);}
.cm-item.on{border-color:#f6b352;background:#fffaf0;cursor:default;}
.cm-item.on:hover{box-shadow:none;}
.cm-ops .cm-sm[data-a="switch"]{background:#fff7ea;border-color:#f6b352;color:#c07b16;font-weight:600;}
.cm-ava{font-size:26px;flex:0 0 auto;}
.cm-info{flex:1;min-width:0;}
.cm-nm{font-size:14.5px;color:#5b5347;font-weight:600;display:flex;align-items:center;gap:6px;}
.cm-nm i{font-size:10.5px;background:#e8912d;color:#fff;padding:1px 6px;border-radius:6px;font-style:normal;font-weight:700;}
.cm-st{font-size:11.5px;color:#a99e8b;margin-top:2px;}
.cm-ops{flex:0 0 auto;display:flex;gap:5px;}
.cm-sm{
  padding:5px 9px;font-size:11.5px;border-radius:7px;cursor:pointer;
  border:1px solid #e5d8bf;background:#fff;color:#8a8175;font-family:inherit;min-height:30px;
}
.cm-sm.danger{color:#c96a6a;border-color:#f0c9c9;}
.cm-btn{
  width:100%;padding:12px;border:none;border-radius:11px;cursor:pointer;
  font-size:14.5px;font-weight:700;font-family:inherit;min-height:44px;margin-top:8px;
  background:linear-gradient(135deg,#f6b352,#e8912d);color:#fff;
}
.cm-btn.ghost{background:#fff;color:#8a8175;border:1px solid #e5d8bf;}

/* ---------- 档案编辑表单 ---------- */
#cf-mask{
  position:fixed;inset:0;background:rgba(60,50,35,.5);z-index:8800;
  display:flex;align-items:center;justify-content:center;padding:18px;overflow-y:auto;
}
.cf-box{
  width:100%;max-width:360px;background:#fffdf8;border-radius:18px;padding:22px 20px;
  box-shadow:0 14px 40px rgba(0,0,0,.2);
}
.cf-title{font-size:17px;font-weight:800;color:#5b5347;margin-bottom:14px;}
.cf-box label{display:block;font-size:12.5px;color:#8a8175;margin:12px 0 5px;}
.cf-box input,.cf-box select{
  width:100%;padding:10px 12px;border:1px solid #e5d8bf;border-radius:10px;
  font-size:16px;font-family:inherit;background:#fffefa;color:#5b5347;min-height:44px;
}
.cf-avas{display:flex;gap:6px;flex-wrap:wrap;}
.cf-av{
  width:40px;height:40px;display:flex;align-items:center;justify-content:center;
  font-size:21px;border:1px solid #e5d8bf;border-radius:10px;cursor:pointer;background:#fff;
}
.cf-av.on{border-color:#e8912d;background:#fff3e0;}
.cf-msg{min-height:18px;font-size:12.5px;text-align:center;margin-top:10px;}
.cf-msg:empty{display:none;}
.cf-msg.err{color:#c96a6a;}

@media(max-width:640px){
  .cs-name{max-width:80px;}
  #cm-panel{width:100%;}
}
