/* V1.3：沿用阳光书房材料，只调整日常操作的密度、触控和状态含义。 */
body[data-route] :is(button,a,input,select,textarea,summary){scroll-margin-block:24px 110px}
body[data-route] :is(.study-date-shortcuts,.study-task-actions,.study-complete-actions) .btn{min-width:44px;min-height:44px;font-size:14px}
body[data-route] .period-tabs{gap:4px;padding:5px;display:flex;flex-wrap:wrap}
body[data-route] .period-tabs button{min-width:44px;min-height:44px;font-size:14px;padding:9px 12px;flex:1 0 auto;border:1px solid transparent}
body[data-route] .period-tabs button[aria-pressed=true]{border-color:var(--w-coral);background:var(--w-coral-light);color:var(--w-ink);font-weight:650;box-shadow:var(--w-inset)}
body[data-route] .task-tools{gap:10px;align-items:center}.task-tools .link-button{display:inline-flex;align-items:center;justify-content:center;min-width:48px;min-height:44px;font-size:14px}
body[data-route] .design-task-list .study-task-row{display:grid;grid-template-columns:44px minmax(0,1fr);gap:3px 10px;padding:15px 3px;min-height:0}
body[data-route] .study-task-row .task-check{grid-column:1;grid-row:1;align-self:start;min-width:44px;min-height:44px;margin:0}
body[data-route] .study-task-row .task-open{grid-column:2;grid-row:1;min-height:44px;min-width:0;padding:0;align-self:start;flex-basis:auto}
body[data-route] .study-task-row .task-open strong{font-size:16px;line-height:1.6;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
body[data-route] .study-task-row .study-task-meta{display:flex;flex-wrap:wrap;gap:2px 10px;font-size:13px;line-height:1.7;color:var(--w-muted);margin-top:3px}
body[data-route] .study-task-row.done .task-open small{opacity:1}
.study-task-footer{grid-column:2;display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;min-width:0}
.study-task-state,.study-priority{font-size:12px;line-height:1.6;padding:3px 7px;border-radius:8px;background:var(--w-soft);color:var(--w-ink);white-space:nowrap}
.study-task-state.overdue{background:var(--peach);color:var(--danger)}
.study-task-state.done{background:var(--w-green);color:var(--w-green-ink)}
.study-task-state.unscheduled{background:var(--w-yellow)}.study-priority{padding-inline:0;background:none;color:var(--w-coral)}
.study-task-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin-left:auto}
body[data-route] .study-task-row .task-schedule{grid-area:auto;margin:0;font-size:13px;padding:8px 12px}
body[data-route] .study-task-actions .quiet{padding:8px 10px;text-decoration:none}
.study-date-shortcuts{display:flex;flex-wrap:wrap;gap:8px;margin-top:-5px}
.study-date-shortcuts .btn{border:1px solid var(--line)}
.study-task-extra{border-top:1px dashed var(--line);border-bottom:1px dashed var(--line);padding:4px 0}
.study-task-extra>summary{min-height:48px;padding:12px 0;cursor:pointer;font-size:14px}
.study-editor{max-width:720px;margin:auto}.study-editor .field{margin:0}.study-editor form{gap:17px}
.study-editor .form-grid{margin:0;gap:16px}.study-editor .form-grid .field{min-width:0}.study-editor input,.study-editor select{min-height:46px;font-size:16px}
.study-editor .actions{flex-wrap:wrap;gap:10px}.study-editor .actions>*{min-height:46px}
.study-plan-layout{display:grid;gap:26px;align-items:start}
.study-plan-main,.study-agenda{min-width:0}
body[data-route] .study-plan-main .v21-plan{max-width:none;margin:0}
.study-agenda{background:var(--w-paper);border:1px solid var(--line);border-radius:25px;padding:22px;box-shadow:var(--w-shadow)}
.study-agenda h2{font-size:18px;margin:0}.study-agenda .section-head{gap:12px;flex-wrap:wrap}.study-agenda .section-head a{font-size:13px;min-height:44px;display:inline-flex;align-items:center}
.study-agenda-section{padding-top:20px;margin-top:16px;border-top:1px dashed var(--line)}.study-agenda-section h2{font-size:16px}.study-agenda-section h2 small{font-weight:400;font-size:13px}
body[data-route] .study-agenda-row{display:flex;flex-direction:row;gap:10px;align-items:center;padding:11px 0;min-height:70px;border-bottom:1px dashed var(--line);flex-wrap:nowrap}.study-agenda-row:last-child{border-bottom:0}
body[data-route] .study-agenda-row>a{display:block;min-width:0;flex:1;text-decoration:none;min-height:44px}body[data-route] .study-agenda-row b{font-weight:550;font-size:14px;display:block;overflow-wrap:anywhere}body[data-route] .study-agenda-row small{display:block;font-size:13px;color:var(--w-muted);margin-top:5px}body[data-route] .study-agenda-row .btn{flex:none;font-size:13px;min-height:44px;padding:8px}
.study-plan-main .v21-plan-row{min-height:82px;padding:16px 0}.study-plan-main .v21-plan-row small{font-size:13px}
/* 准备和计时共享画布与圆心位置；状态变化只淡入按钮，不移动时钟。 */
body[data-route=focus] #page-header,body[data-route=focus] .bottom-nav{display:none!important}
body[data-route=focus] .workspace{padding-top:18px;padding-bottom:18px}
body[data-route=focus] #main,body[data-focus-session=true][data-route=focus] #main{max-width:1000px;margin:0 auto;padding:0!important;min-height:0}
body[data-route=focus] .study-focus,body[data-focus-session=true][data-route=focus] .study-focus{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(64px,auto) 1fr minmax(22px,auto) auto;gap:12px;align-items:center;justify-items:center;width:100%;max-width:none;margin:0!important;min-height:650px;min-height:min(800px,calc(100dvh - 36px));height:auto;max-height:none;border-radius:30px;padding:18px 24px 26px}
.study-focus .v21-focus-top{grid-area:auto;align-self:start;gap:12px}.study-focus .v21-focus-top .btn{min-height:44px;font-size:14px}
.study-focus-caption{display:flex;align-items:center;justify-content:center;height:84px;min-height:84px;width:100%;min-width:0;overflow:auto}
body[data-route] .study-focus .v21-focus-task,body[data-route] .study-focus .focus-task-pill{font-size:16px;line-height:1.7;margin:0;max-width:100%;padding:8px 13px;text-align:center;overflow-wrap:anywhere}
.study-focus .v21-focus-task{background:var(--w-paper);color:var(--w-ink);border-radius:16px}
body[data-route] .study-focus .focus-glass{grid-area:auto;width:250px;height:250px;margin:0;min-height:0;align-self:center;box-sizing:border-box}
body[data-route] .study-focus .focus-glass output{font-size:64px}.study-focus .focus-glass p{font-size:14px;margin:8px 10px 0;text-align:center}
.study-focus-message{min-height:22px;max-width:650px}.study-focus-message:empty{visibility:hidden}
body[data-route] .study-focus .focus-primary{grid-area:auto;width:min(100%,360px);max-width:360px;margin:0;padding:0;align-self:end;animation:study-controls-in .16s ease-out}
.study-focus .focus-primary .btn{min-height:52px;font-size:17px}
body[data-route] .study-focus .focus-primary .btn.full{margin-top:0}
@keyframes study-controls-in{from{opacity:.65}to{opacity:1}}
.study-complete{max-width:690px;margin:auto}.study-save-mark{display:grid;place-items:center;width:62px;height:62px;border-radius:50%;margin:0 auto 15px;background:var(--w-yellow);color:var(--w-ink);font-size:32px;font-weight:650}
.study-save-mark svg{width:29px;height:29px;fill:none;stroke:currentColor;stroke-width:1.7}
.study-complete[data-save-state=saved] .study-save-mark{background:var(--w-green);color:var(--w-green-ink)}
.study-complete:is([data-save-state=failed],[data-save-state=unconfirmed]) .study-save-mark{background:var(--peach);color:var(--danger)}
body[data-route] .study-complete .complete-duration{color:var(--w-ink);font-size:42px}
.study-complete .v21-ticket h1{font-size:25px;line-height:1.5;margin-bottom:20px}.study-save-message{font-size:14px;line-height:1.8;max-width:32em;margin:14px auto 0}
.study-complete .self-completion{padding:15px 20px;margin:0 0 18px;background:var(--w-soft);border-radius:20px}.self-completion h2{font-size:16px;margin:0 0 7px}.self-completion p{font-size:14px;margin:7px 0}.study-complete-actions{display:grid;gap:10px}
#toast[data-tone=error]{background:var(--w-paper);border:1px solid var(--danger);color:var(--danger)}
#toast[data-tone=success]{background:var(--w-green);border:1px solid var(--line);color:var(--w-green-ink)}
.study-evidence{margin-top:18px}.study-evidence li{font-size:14px;line-height:1.7;margin-block:8px}.study-evidence h3{font-size:15px}
.study-chart-table{margin:15px 0}.study-chart-table summary{min-height:44px;padding:12px 0;font-size:14px;cursor:pointer}.study-chart-table table{border-collapse:collapse;width:100%;font-size:14px}.study-chart-table th,.study-chart-table td{padding:10px 5px;border-bottom:1px dashed var(--line);text-align:left}.study-chart-table th:last-child,.study-chart-table td:last-child{text-align:right}
@media(max-width:600px){.allocation-donut :is(.donut-label,.donut-minutes,polyline,rect){display:none}.allocation-donut{max-height:235px}.donut-total{font-size:29px}.donut-caption{font-size:15px}}
@media(min-width:1120px){.study-plan-layout{grid-template-columns:minmax(0,1.3fr) minmax(320px,1fr)}.study-plan-main{padding:20px 24px;background:var(--w-paper);border:1px solid var(--line);border-radius:27px}.study-plan-main .v21-book-heading h1{font-size:27px}.study-agenda{margin-top:0}}
@media(min-width:1000px){body[data-route] .design-task-list .study-task-row{grid-template-columns:44px minmax(0,1fr) minmax(290px,auto);gap:10px}.study-task-footer{grid-column:3;grid-row:1;justify-content:flex-end;align-self:center}.study-task-actions{margin-left:0}.study-task-row .task-open strong{-webkit-line-clamp:2}}
@media(max-width:600px){body[data-route] .study-task-row .task-open strong{font-size:16px}.study-task-footer{grid-column:1/-1;padding-left:3px;gap:5px}.study-task-actions{gap:6px}.study-task-row .study-task-state{font-size:12px}.study-plan-layout{gap:22px}.study-agenda{padding:18px}.study-editor .form-grid{grid-template-columns:minmax(0,1fr)}
 body[data-route=focus] .workspace{padding:10px 10px max(10px,env(safe-area-inset-bottom))}body[data-route=focus] .study-focus,body[data-focus-session=true][data-route=focus] .study-focus{min-height:calc(100dvh - 20px);border-radius:24px;padding:14px 14px 24px;gap:10px}body[data-route] .study-focus .focus-glass{width:230px;height:230px}body[data-route] .study-focus .focus-glass output{font-size:58px}
 .study-complete .v21-ticket{padding:23px 18px}.study-complete .v21-ticket h1{font-size:22px}.study-complete .self-completion{padding:15px}.self-completion .actions>*{flex:1 0 auto}
 body[data-route] .v21-analysis{padding:18px}.v21-analysis .subject-breakdown{display:block}.v21-analysis .subject-breakdown .subject-list{display:block}.subject-breakdown summary{font-size:14px;min-height:44px;padding-block:12px}.subject-list a{display:grid;grid-template-columns:12px minmax(0,1fr);gap:7px 10px;min-height:44px;font-size:14px;padding:12px}.subject-list small{grid-column:2;font-size:13px}.subject-list span{overflow-wrap:anywhere}.donut-label{font-size:14px}.donut-minutes{font-size:12px}.v21-analysis .bar-chart{gap:4px}.v21-analysis .bar-day span{font-size:12px}.v21-analysis .bar-chart[data-period=month] .bar-day span{visibility:hidden}.v21-analysis .bar-chart[data-period=month] .bar-day:nth-child(6n + 1) span{visibility:visible}
}
@media(max-width:359px){body[data-route] .period-tabs button{padding-inline:9px;font-size:14px}.study-task-footer{gap:5px}.study-task-actions{width:100%;justify-content:flex-end}.study-task-state{margin-left:51px}body[data-route] .study-focus .focus-glass{width:214px;height:214px}.study-complete .complete-duration{font-size:36px}.study-date-shortcuts{gap:6px}.study-date-shortcuts .btn{padding-inline:11px}}
@media(max-height:520px) and (orientation:landscape){body[data-route=focus] .study-focus,body[data-focus-session=true][data-route=focus] .study-focus{min-height:calc(100dvh - 36px);grid-template-columns:1fr 1fr;grid-template-rows:auto auto auto;gap:10px 20px;padding:12px 20px}.study-focus .v21-focus-top{grid-column:1/-1}.study-focus-caption{grid-column:1;grid-row:2}body[data-route] .study-focus .focus-glass{grid-column:2;grid-row:2/4;width:170px;height:170px}body[data-route] .study-focus .focus-glass output{font-size:46px}.study-focus-message{grid-column:1/-1}.study-focus-message:empty{display:none}body[data-route] .study-focus .focus-primary{grid-column:1;grid-row:3}}
@media(prefers-reduced-motion:reduce){body[data-route] .study-focus .focus-primary{animation:none;transition:none}}
