#studyPlanWidget{position:fixed;left:26px;bottom:74px;z-index:20;width:270px;padding:18px 20px;text-align:left;border:1px solid #b69a554d;border-radius:16px;background:linear-gradient(135deg,#111c2bef,#080f1bed);box-shadow:0 12px 36px #0005;color:#e3dfce;font-family:var(--sans);cursor:pointer;backdrop-filter:blur(12px)}
#studyPlanWidget[hidden]{display:none}
.plan-caption{display:flex;justify-content:space-between;color:#cdb579;font-size:12px;letter-spacing:1px}
.plan-caption span{color:#96a5b8;font-size:11px}
#studyPlanWidget strong{display:block;font-size:18px;font-weight:400;margin:14px 0 12px}
#studyPlanWidget small,.plan-card small{color:#9faec0;font-size:12px}
.plan-meter{display:block;height:4px;background:#c8bd9620;border-radius:8px;overflow:hidden;margin:12px 0}
.plan-meter i{display:block;height:100%;background:linear-gradient(90deg,#708eaa,#dcc17c);border-radius:8px;transition:width .3s}
#studyPlanDialog{width:min(780px,94vw);max-height:86dvh;overflow:auto;background:#0d1624;color:#e3e7ed;border:1px solid #b99c5860;border-radius:20px;padding:28px;box-shadow:0 30px 100px #000a;font-family:var(--sans)}
#studyPlanDialog::backdrop{background:#020711b3;backdrop-filter:blur(5px)}
#studyPlanDialog>header,.plan-card header{display:flex;align-items:center;justify-content:space-between}
#studyPlanDialog h2{font-weight:400;margin:6px 0 22px}#studyPlanDialog small{color:#ab9b76}
#studyPlanDialog button{border:1px solid #b69c5c50;background:#182437;color:#dfca8f;padding:8px 13px;border-radius:9px;cursor:pointer;font:inherit}
#studyPlanDialog [data-close]{border-radius:50%;font-size:23px;padding:2px 11px}
#studyPlanDialog button:hover{border-color:#dbc07b;background:#233348}
#studyPlanDialog label{display:block;font-size:13px;color:#c1c9d6}
#studyPlanDialog select,#studyPlanDialog input[type=date]{display:block;width:100%;padding:10px;margin:8px 0 14px;border-radius:8px;border:1px solid #b19a5e40;color:#ece7d8;background:#111e30;font:inherit;color-scheme:dark;box-sizing:border-box}
.plan-card{border:1px solid #a59a7b30;background:#101d2d;border-radius:13px;padding:18px;margin:16px 0}
.plan-card h3{font-size:18px;font-weight:400;margin:0}.plan-card header span{color:#e0c784}.plan-card p{color:#92a3b8;font-size:12px}
.plan-actions{display:flex;gap:8px;margin-top:14px}.plan-card summary{cursor:pointer;color:#b9c3cf;font-size:13px;padding:16px 0 4px}
#studyPlanDialog .plan-note{display:flex;gap:10px;align-items:flex-start;padding:9px 0;border-bottom:1px solid #ffffff09}
.plan-note input{accent-color:#d3b574;margin-top:3px}
.plan-form{border-top:1px solid #c2ad7038;margin-top:22px;padding-top:12px}.plan-form>div{display:grid;grid-template-columns:1fr 1fr;gap:18px}.plan-form h3{font-size:17px;font-weight:400;color:#ddc88b}
#studyPlanDialog [role=status]{color:#d6bd86;font-size:13px;min-height:20px}.plan-empty{color:#96a5b6;font-size:14px;padding:15px 0}
body.auth-locked #studyPlanWidget{display:none}
@media(max-width:680px){#studyPlanWidget{left:12px;bottom:max(64px,calc(env(safe-area-inset-bottom) + 52px));width:52px;height:52px;padding:0;display:grid;place-items:center;border-radius:50%;overflow:hidden;color:#efd27f;font-size:0;box-shadow:0 10px 30px #0008,0 0 18px #d8b65b1f,inset 0 1px 0 #fff1}#studyPlanWidget::before{content:'✦';font-size:23px;line-height:1;text-shadow:0 0 12px #e9c76c80}#studyPlanWidget>*{display:none!important}#studyPlanWidget:hover{border-color:#d8b85d99;background:linear-gradient(145deg,#17283d,#0b1422)}#studyPlanDialog{padding:18px}.plan-form>div{grid-template-columns:1fr}}
#studyPlanDialog .schedule-rows{display:block}.schedule-row{display:grid;grid-template-columns:24px minmax(0,1fr) 95px auto;gap:12px;align-items:center;border:1px solid #a59a7b30;background:#101d2d;padding:15px;border-radius:12px;margin:12px 0}.schedule-number{color:#d9bf82;font-size:17px}.schedule-order{display:flex;gap:5px}#studyPlanDialog .schedule-order button{padding:7px 9px}.schedule-row>small{grid-column:2/-1;font-size:12px}.schedule-days{display:flex;align-items:center;gap:8px}.schedule-days input{width:65px;box-sizing:border-box;margin:8px 0 14px;padding:10px 5px;border-radius:8px;border:1px solid #b19a5e40;color:#ece7d8;background:#111e30;font:inherit}.plan-hint,.schedule-total{font-size:13px;line-height:1.7;color:#9daec2}.schedule-total{color:#dbc58b}.plan-card h3 small{display:block;margin-bottom:8px;font-size:11px}#studyPlanDialog button:disabled{opacity:.35;cursor:default}#studyPlanDialog .plan-form>button[type=submit]{background:#d4bd83;color:#122033}.plan-form>p{margin:12px 0}#studyPlanDialog input:focus-visible,#studyPlanDialog select:focus-visible,#studyPlanDialog button:focus-visible{outline:2px solid #c9b276;outline-offset:2px}
@media(max-width:680px){.schedule-row{grid-template-columns:20px minmax(0,1fr) 85px;gap:8px;padding:12px}.schedule-order{grid-column:2/-1;justify-content:flex-end}.schedule-row>small{grid-row:3}.schedule-days input{width:57px}#studyPlanDialog .schedule-order button{min-width:38px;min-height:38px}}
#studyPlanDialog .plan-form{border-top:0;margin-top:0;padding-top:0}.schedule-progress{grid-column:2/-1;min-width:0}.schedule-progress .plan-meter{margin:2px 0 10px}.schedule-progress details{margin-top:12px}.schedule-progress summary{cursor:pointer;color:#acbacb;font-size:12px}.schedule-row .schedule-order{flex-wrap:wrap;justify-content:flex-end}#studyPlanDialog .schedule-order [data-delete]{font-size:12px}#studyPlanDialog .schedule-row>small{font-size:11px}#studyPlanDialog .plan-manager:empty{display:none}

.plan-today-summary{display:block;margin-top:12px;padding-top:10px;border-top:1px solid #b69a5533;color:#dfc989;font-size:12px;line-height:1.6}
#studyPlanDialog>header{margin-bottom:22px}.plan-heading{display:flex}.plan-title-row{display:flex;align-items:center;gap:9px}.plan-heading h2{margin:6px 0 0!important}.plan-title-row>[data-settings]{display:grid;place-items:center;align-self:flex-end;width:28px;height:36px;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#d9bd73;line-height:1;transform:translateY(2.5px)}.plan-title-row>[data-settings] svg{display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.plan-title-row>[data-settings]:hover,.plan-title-row>[data-settings]:focus-visible{border:0!important;background:transparent!important;color:#f0d98f}.plan-title-row>[data-settings].active{color:#f2d681;background:transparent!important;border:0!important}.plan-form[hidden],.plan-manager[hidden],.plan-today[hidden]{display:none!important}.plan-back{margin:0 0 18px;background:transparent!important;border-color:transparent!important;color:#a9b8ca!important;padding-left:0!important}.plan-overview{display:grid;gap:16px}.plan-current,.plan-completion,.plan-today-list{border:1px solid #aa955e38;border-radius:15px;background:linear-gradient(145deg,#132236,#0e1928);padding:20px}.plan-current small,.plan-today-list header small{display:block;color:#b5a272!important;font-size:11px!important;letter-spacing:.14em;text-transform:uppercase}.plan-current h3,.plan-today-list h3{margin:8px 0 7px;color:#efdfb7;font-size:22px;font-weight:500}.plan-current>span{color:#91a3b7;font-size:12px}.plan-completion>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:15px}.plan-completion strong{font-size:15px;font-weight:500;color:#d9e0e9}.plan-completion span{color:#dbc583;font-size:13px}.plan-completion .plan-meter{height:7px;margin:14px 0 0}.plan-today-list{padding:0;overflow:hidden}.plan-today-list>header{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:19px 20px;border-bottom:1px solid #ffffff0d}.plan-today-list>header h3{font-size:18px;margin-bottom:0}.plan-today-list>header>span{flex:none;color:#e1c77f;font-size:12px;border:1px solid #b99b574a;border-radius:999px;padding:6px 10px}.plan-today-list>div{display:grid}.plan-today-list [data-today-note]{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;padding:14px 20px;border:0!important;border-bottom:1px solid #ffffff0b!important;border-radius:0!important;background:transparent!important;text-align:left}.plan-today-list [data-today-note]:last-child{border-bottom:0!important}.plan-today-list [data-today-note]>span{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#1d3045;color:#d8bf7e;font-size:11px}.plan-today-list [data-today-note]>strong{min-width:0;color:#dce5ef;font-size:14px;font-weight:500;overflow-wrap:anywhere}.plan-today-list [data-today-note]>i{color:#8fa3b8;font-size:11px;font-style:normal;white-space:nowrap}.plan-today-list [data-today-note]:hover{background:#1a2a3b!important}.plan-today-list>p{margin:0;padding:24px 20px;color:#91a4b8;font-size:13px}.plan-overview-empty{text-align:center;padding:50px 24px;border:1px dashed #b69c5c55;border-radius:15px;background:#101d2d}.plan-overview-empty strong{display:block;color:#ead8aa;font-size:20px;font-weight:500}.plan-overview-empty p{color:#93a5b8;font-size:13px;margin:12px 0 22px}
@media(max-width:680px){#studyPlanDialog>header{align-items:flex-start}.plan-title-row{gap:7px}.plan-heading h2{font-size:22px}.plan-title-row>[data-settings]{width:26px;height:31px}.plan-title-row>[data-settings] svg{width:18px;height:18px}.plan-current,.plan-completion{padding:16px}.plan-current h3{font-size:19px}.plan-today-list>header{align-items:flex-start;padding:16px}.plan-today-list>header>span{font-size:10px;padding:5px 8px}.plan-today-list [data-today-note]{grid-template-columns:26px minmax(0,1fr);padding:13px 16px;gap:10px}.plan-today-list [data-today-note]>i{grid-column:2;color:#8094a9}.plan-completion>div:first-child{align-items:flex-start;flex-direction:column;gap:6px}}

/* Keep the floating plan entry compact on phones and narrow tablets so it never covers note actions. */
@media(max-width:900px){#studyPlanWidget{left:12px;bottom:max(86px,calc(env(safe-area-inset-bottom) + 74px));width:50px;height:50px;padding:0;display:grid;place-items:center;border-radius:50%;overflow:hidden;color:#efd27f;font-size:0;box-shadow:0 10px 30px #0008,0 0 18px #d8b65b1f,inset 0 1px 0 #fff1}#studyPlanWidget::before{content:'✦';font-size:22px;line-height:1;text-shadow:0 0 12px #e9c76c80}#studyPlanWidget>*{display:none!important}}

/* Study workspace: the date, next lessons, current book and review tasks share one reading surface. */
#studyPlanDialog.plan-workspace{width:100%;max-width:none;height:100dvh;max-height:none;margin:0;padding:0 24px 36px;border:0;border-radius:0;background:#091524;color:#eaf1f7;box-shadow:none;overflow:auto;overscroll-behavior:contain}
#studyPlanDialog.plan-workspace:not([open]){display:none}
#studyPlanDialog.plan-workspace>*{width:min(100%,1108px);margin-left:auto;margin-right:auto;box-sizing:border-box}
#studyPlanDialog.plan-workspace>.plan-workspace-header{display:flex;align-items:center;justify-content:space-between;min-height:98px;margin-bottom:0;border-bottom:1px solid #8093a34d}
#studyPlanDialog.plan-workspace .plan-workspace-brand{display:grid;gap:3px}
#studyPlanDialog.plan-workspace .plan-workspace-brand strong{color:#e4c478;font-size:20px;font-weight:500;letter-spacing:.04em}
#studyPlanDialog.plan-workspace .plan-workspace-brand small{color:#9ec3e8;font-size:10px;letter-spacing:.16em}
#studyPlanDialog.plan-workspace .plan-workspace-tools{display:flex;align-items:center;gap:18px}
#studyPlanDialog.plan-workspace [data-plan-owner]{color:#9ebbd3;font-size:12px}
#studyPlanDialog.plan-workspace [data-close],#studyPlanDialog.plan-workspace [data-settings]{border:1px solid #71859a55;border-radius:6px;background:transparent;color:#dbe7f2;font-size:13px;white-space:nowrap}
#studyPlanDialog.plan-workspace [data-close]{padding:9px 13px}
#studyPlanDialog.plan-workspace .plan-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;min-height:187px;padding:43px 0 27px;border-bottom:1px solid #8093a34d}
#studyPlanDialog.plan-workspace .plan-hero>div{min-width:0}
#studyPlanDialog.plan-workspace [data-plan-date]{display:block;color:#9db8d2;font-size:12px;letter-spacing:.08em}
#studyPlanDialog.plan-workspace .plan-hero h2{margin:11px 0 4px!important;color:#e9ca81;font-size:clamp(30px,3vw,43px);font-weight:500;line-height:1.2;letter-spacing:.04em}
#studyPlanDialog.plan-workspace [data-plan-subtitle]{margin:0;color:#9ebbd3;font-size:13px}
#studyPlanDialog.plan-workspace [data-settings]{padding:9px 13px;margin-bottom:0}
#studyPlanDialog.plan-workspace .plan-today{padding-top:34px}
#studyPlanDialog.plan-workspace .plan-overview{display:grid;grid-template-columns:minmax(0,2.16fr) minmax(260px,1fr);gap:60px;align-items:stretch}
#studyPlanDialog.plan-workspace .plan-today-list,#studyPlanDialog.plan-workspace .plan-summary{border:0;border-radius:0;background:none;padding:0;overflow:visible}
#studyPlanDialog.plan-workspace .plan-today-list>header{display:flex;align-items:end;justify-content:space-between;gap:16px;padding:0 0 18px;border-bottom:1px solid #8093a34d}
#studyPlanDialog.plan-workspace .plan-today-list header small,#studyPlanDialog.plan-workspace .plan-current small{color:#9dbbd4!important;font-size:12px!important;letter-spacing:0;text-transform:none}
#studyPlanDialog.plan-workspace .plan-today-list header h3{margin:2px 0 0;color:#edf4fb;font-size:23px;font-weight:500}
#studyPlanDialog.plan-workspace .plan-today-list>header>span{padding:0;border:0;color:#e7c980;font-size:12px}
#studyPlanDialog.plan-workspace .plan-today-rows{display:block}
#studyPlanDialog.plan-workspace .plan-today-list [data-today-note]:not(.plan-resume){display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:14px;width:100%;min-height:70px;padding:13px 0;border:0!important;border-bottom:1px solid #8093a34d!important;border-radius:0!important;background:transparent!important;text-align:left}
#studyPlanDialog.plan-workspace .plan-today-list [data-today-note]>span{display:block;width:auto;height:auto;border-radius:0;background:none;color:#e6c576;font-family:Georgia,serif;font-size:22px;font-weight:600}
#studyPlanDialog.plan-workspace .plan-today-list [data-today-note]>strong{color:#e9f0f7;font-size:17px;font-weight:400}
#studyPlanDialog.plan-workspace .plan-today-list [data-today-note]>i{color:#e9c979;font-size:13px;white-space:nowrap}
#studyPlanDialog.plan-workspace .plan-today-list .plan-resume{display:inline-flex!important;align-items:center;justify-content:center;width:auto;min-width:125px;min-height:46px;margin-top:30px;padding:10px 18px!important;border:0!important;border-radius:6px!important;background:#e4c985!important;color:#102033!important;font-size:14px;font-weight:600;text-align:center}
#studyPlanDialog.plan-workspace .plan-today-list .plan-resume:hover{background:#f0d99d!important}
#studyPlanDialog.plan-workspace .plan-summary{display:flex;flex-direction:column;justify-content:flex-start;gap:10px;min-height:278px;padding:4px 0 0 30px;border-left:1px solid #8093a34d}
#studyPlanDialog.plan-workspace .plan-current,#studyPlanDialog.plan-workspace .plan-completion{padding:0;border:0;border-radius:0;background:none}
#studyPlanDialog.plan-workspace .plan-current h3{margin:10px 0 16px;color:#e9c978;font-size:20px;font-weight:600;line-height:1.4}
#studyPlanDialog.plan-workspace .plan-current>span{color:#9ebbd3;font-size:12px;letter-spacing:.07em}
#studyPlanDialog.plan-workspace .plan-completion{display:block;margin-top:10px}
#studyPlanDialog.plan-workspace .plan-completion .plan-meter{height:7px;margin:0 0 10px;border-radius:9px;background:#273e51}
#studyPlanDialog.plan-workspace .plan-completion .plan-meter i{background:#e2c47a;border-radius:0}
#studyPlanDialog.plan-workspace .plan-completion>span{color:#a8c4dc;font-size:12px}
#studyPlanDialog.plan-workspace .learning-home{position:static;width:100%;margin:34px 0 0;padding:28px 0 0;border:0;border-top:1px solid #8093a34d;border-radius:0;background:none;backdrop-filter:none}
#studyPlanDialog.plan-workspace .learning-home h2{display:none}
#studyPlanDialog.plan-workspace .learning-home>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0}
#studyPlanDialog.plan-workspace .learning-home button{min-width:0;min-height:64px;padding:5px 20px;border:0;border-right:1px solid #8093a34d;border-radius:0;background:none;text-align:left}
#studyPlanDialog.plan-workspace .learning-home button:first-child{padding-left:0}
#studyPlanDialog.plan-workspace .learning-home button:last-child{border-right:0}
#studyPlanDialog.plan-workspace .learning-home button:disabled{opacity:1}
#studyPlanDialog.plan-workspace .learning-home small{margin:0 0 7px;color:#9ebbd3;font-size:12px}
#studyPlanDialog.plan-workspace .learning-home strong{color:#e9c978;font-size:17px;font-weight:400}
#studyPlanDialog.plan-workspace .plan-overview-empty{margin:0;padding:48px 20px;border:1px dashed #8093a34d;background:none}
#studyPlanDialog.plan-workspace .plan-form{margin-top:30px;padding-top:0;border:0}
#studyPlanDialog.plan-workspace .plan-manager{margin-top:28px}
#studyPlanDialog.plan-workspace .plan-form>label{max-width:340px}
#studyPlanDialog.plan-workspace .schedule-row{background:#101f30;border-color:#8093a34d}
#studyPlanDialog.plan-workspace [role=status]{margin-top:16px}
@media(max-width:700px){
 #studyPlanDialog.plan-workspace{padding:0 20px 36px}
 #studyPlanDialog.plan-workspace>.plan-workspace-header{min-height:77px}
 #studyPlanDialog.plan-workspace .plan-workspace-brand strong{font-size:18px}
 #studyPlanDialog.plan-workspace .plan-workspace-brand small{font-size:10px}
 #studyPlanDialog.plan-workspace [data-plan-owner]{display:none}
 #studyPlanDialog.plan-workspace [data-close]{font-size:12px;padding:8px 12px}
 #studyPlanDialog.plan-workspace .plan-hero{min-height:154px;padding:39px 0 23px;gap:12px}
 #studyPlanDialog.plan-workspace [data-plan-date]{font-size:12px}
 #studyPlanDialog.plan-workspace .plan-hero h2{font-size:30px}
 #studyPlanDialog.plan-workspace [data-plan-subtitle]{font-size:12px}
 #studyPlanDialog.plan-workspace [data-settings]{flex:none;align-self:flex-end;font-size:12px;padding:8px 10px}
 #studyPlanDialog.plan-workspace .plan-today{padding-top:29px}
 #studyPlanDialog.plan-workspace .plan-overview{display:block}
 #studyPlanDialog.plan-workspace .plan-today-list>header{padding-bottom:18px}
 #studyPlanDialog.plan-workspace .plan-today-list header h3{font-size:23px}
 #studyPlanDialog.plan-workspace .plan-today-list [data-today-note]:not(.plan-resume){grid-template-columns:28px minmax(0,1fr) auto;gap:7px;min-height:55px;padding:12px 0}
 #studyPlanDialog.plan-workspace .plan-today-list [data-today-note]>span{font-size:20px}
 #studyPlanDialog.plan-workspace .plan-today-list [data-today-note]>strong{font-size:16px}
 #studyPlanDialog.plan-workspace .plan-today-list [data-today-note]>i{grid-column:auto;font-size:12px}
 #studyPlanDialog.plan-workspace .plan-today-list .plan-resume{margin-top:28px;font-size:13px}
 #studyPlanDialog.plan-workspace .plan-summary{min-height:0;margin-top:29px;padding:27px 0 26px;border-left:0;border-top:1px solid #8093a34d;border-bottom:1px solid #8093a34d}
 #studyPlanDialog.plan-workspace .plan-current h3{font-size:20px}
 #studyPlanDialog.plan-workspace .learning-home{margin:0;padding:8px 0 0;border-top:0}
 #studyPlanDialog.plan-workspace .learning-home>div{display:block}
 #studyPlanDialog.plan-workspace .learning-home button{width:100%;min-height:89px;padding:19px 0;border-right:0;border-bottom:1px solid #8093a34d}
 #studyPlanDialog.plan-workspace .learning-home small{font-size:12px}
 #studyPlanDialog.plan-workspace .learning-home strong{font-size:18px}
 #studyPlanDialog.plan-workspace .schedule-row{grid-template-columns:20px minmax(0,1fr) 85px}
 #studyPlanDialog.plan-workspace .schedule-row>label:last-of-type{grid-column:2}
}
