/* Shared card states and motion for classic and compact home layouts. */
.dashboard[data-home-layout] .home-panel:hover{transform:none}
.dashboard[data-home-layout] .todo-list.is-empty{display:flex;min-height:0;overflow:hidden;padding-right:0;scrollbar-gutter:auto}
.dashboard[data-home-layout] .todo-list.is-empty .todo-empty{display:flex;flex:1;min-width:0;min-height:140px;flex-direction:column;align-items:center;justify-content:center;gap:9px;margin:6px 0 0;padding:20px 15px;background:var(--surface-2);border-color:var(--border)}
.dashboard[data-home-layout] .todo-empty strong,.dashboard[data-home-layout] .todo-empty>span{display:block;max-width:100%}
.dashboard[data-home-layout] .todo-empty>span{max-width:245px;line-height:1.8}
.dashboard[data-home-layout] .todo-templates{gap:6px;margin-top:3px}
/* Extend the scroll clip into the card padding while leaving row content aligned. */
.dashboard[data-home-layout] .todo-list{box-sizing:border-box;width:calc(100% + 10px);margin-left:-10px;padding-right:0;padding-left:10px;scrollbar-gutter:auto}
.dashboard[data-home-layout] .todo-item{position:relative;grid-template-columns:24px minmax(0,1fr) 28px}
#dashboardView[data-home-layout] .todo-check{display:grid;place-items:center;flex:none;box-sizing:border-box;width:20px;height:20px;min-width:20px;min-height:20px;max-width:20px;max-height:20px;padding:0;aspect-ratio:1;border:2px solid var(--primary);border-radius:50%;background:var(--surface);appearance:none;-webkit-appearance:none;line-height:1;transform:none;transition:background .18s,border-color .18s}
#dashboardView[data-home-layout] .todo-check::after{content:"";position:absolute;inset:-5px;border:2px solid color-mix(in srgb,var(--primary) 35%,transparent);border-radius:50%;opacity:0;transform:scale(.72);pointer-events:none}
#dashboardView[data-home-layout] .todo-check:disabled{opacity:1;filter:none}
.dashboard[data-home-layout] .todo-mark{display:block;width:13px;height:13px;opacity:0;color:#fff}
.dashboard[data-home-layout] .todo-mark path{stroke-dasharray:20;stroke-dashoffset:20}
#dashboardView[data-home-layout] .todo-item:is(.done,.is-completing) .todo-check{background:var(--primary);border-color:var(--primary)}
.dashboard[data-home-layout] .todo-item:is(.done,.is-completing) .todo-mark{opacity:1}
.dashboard[data-home-layout] .todo-item:is(.done,.is-completing){opacity:1;--todo-strike-color:color-mix(in srgb,var(--muted) 55%,var(--surface))}
.dashboard[data-home-layout] .todo-item.done .todo-text{color:var(--muted);text-decoration:none}
/* Clone the thin background for each inline fragment; keep the check and gap clean. */
.dashboard[data-home-layout] .todo-item:is(.done,.is-completing) .todo-label{background-image:linear-gradient(var(--todo-strike-color),var(--todo-strike-color));background-position:left center;background-repeat:no-repeat;background-size:100% 2px;-webkit-box-decoration-break:clone;box-decoration-break:clone}
#dashboardView[data-home-layout] .todo-item.done .todo-check{background:color-mix(in srgb,var(--primary) 72%,var(--surface));border-color:transparent}
.dashboard[data-home-layout] .todo-item.done .todo-mark path{stroke-dashoffset:0}
.dashboard[data-home-layout] .todo-item.is-completing{opacity:1}
.dashboard[data-home-layout] .todo-item.is-completing .todo-check{will-change:transform;animation:todo-check-fill .44s cubic-bezier(.2,.8,.25,1) both}
.dashboard[data-home-layout] .todo-item.is-completing .todo-check::after{will-change:transform,opacity;animation:todo-check-halo .44s cubic-bezier(.2,.8,.25,1) both}
.dashboard[data-home-layout] .todo-item.is-completing .todo-mark path{animation:todo-mark-draw .34s .10s ease-out both}
.dashboard[data-home-layout] .todo-item.is-completing .todo-text{animation:todo-text-fade .50s .08s ease both}
.dashboard[data-home-layout] .todo-item.is-completing .todo-label{animation:todo-strike-draw .46s .14s ease-out both}
.dashboard[data-home-layout] .todo-delete{justify-self:end;padding:0;display:grid;place-items:center;color:var(--muted);opacity:.8}
.dashboard[data-home-layout] .todo-delete:hover{opacity:1}
@keyframes todo-check-fill{0%{transform:scale(1)}52%{transform:scale(1.1)}100%{transform:scale(1)}}
@keyframes todo-check-halo{0%{opacity:0;transform:scale(.72)}42%{opacity:.55}100%{opacity:0;transform:scale(1.12)}}
@keyframes todo-mark-draw{from{stroke-dashoffset:20}to{stroke-dashoffset:0}}
@keyframes todo-text-fade{from{opacity:1}to{opacity:.65}}
@keyframes todo-strike-draw{from{background-size:0% 2px}to{background-size:100% 2px}}
.dashboard[data-home-layout] .holiday-footer{align-items:center;gap:10px}
.dashboard[data-home-layout] .holiday-source{line-height:1.65}
.dashboard[data-home-layout="classic"] :is(.rhythm-panel,.todo-panel,.holiday-panel) .home-panel-head{min-height:76px;gap:8px;padding-bottom:15px;align-items:flex-start}
.dashboard[data-home-layout="classic"] .panel-title-group{gap:8px;min-width:0;align-items:flex-start}
.dashboard[data-home-layout="classic"] .panel-title-icon{width:30px;height:30px;border-radius:9px}
.dashboard[data-home-layout="classic"] .home-panel-head h2{font-size:18px;line-height:1.35;letter-spacing:0;white-space:nowrap}
.dashboard[data-home-layout="classic"] .home-panel-head p{margin-top:5px;line-height:1.6;font-size:10px}
.dashboard[data-home-layout="classic"] .todo-date{flex:none;width:104px;min-width:0;max-width:100%;min-height:32px;padding:5px;font-size:10px}
.dashboard[data-home-layout="classic"] .todo-add input{font-size:13px;background:var(--surface-2)}
.dashboard[data-home-layout] .lesson-list:not(.has-lessons){display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;scrollbar-gutter:auto}
.dashboard[data-home-layout] .lesson-list .lesson-empty{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:100%;max-width:440px;height:auto;min-height:280px;margin:0;padding:28px 18px;border:0;border-radius:20px;background:radial-gradient(ellipse at 50% 38%,var(--surface-2),transparent 72%);text-align:center}
.dashboard[data-home-layout] .lesson-empty .lesson-empty-icon{position:relative;isolation:isolate;flex:none;width:68px;height:68px;margin:0 0 8px;border:1px solid color-mix(in srgb,var(--primary) 14%,var(--border));border-radius:22px;background:var(--surface-3);color:var(--primary);box-shadow:0 7px 20px color-mix(in srgb,var(--primary) 9%,transparent)}
.dashboard[data-home-layout] .lesson-empty-icon .ui-icon{width:30px;height:30px}
.dashboard[data-home-layout] .lesson-empty>strong{color:var(--text);font-size:18px;line-height:1.5;font-weight:650}
.dashboard[data-home-layout] .lesson-empty>span{max-width:290px;color:var(--muted);font-size:12px;line-height:1.85;text-wrap:pretty}
.dashboard[data-home-layout] .lesson-empty-action{margin-top:5px;padding:9px 16px;border:1px solid color-mix(in srgb,var(--primary) 24%,var(--border));border-radius:11px;background:var(--surface);color:var(--primary);font-size:12px;line-height:1.5;font-weight:650;cursor:pointer;transition:background .18s,border-color .18s}
.dashboard[data-home-layout] .lesson-empty-action:hover{background:var(--surface-3);border-color:var(--primary)}
.dashboard[data-home-layout] .lesson-empty-action:focus-visible{outline:2px solid var(--primary);outline-offset:3px}
.dashboard[data-home-layout="classic"] .holiday-countdown{margin-top:16px;background:linear-gradient(135deg,#fffaf0,#faf2dc)}
.dashboard[data-home-layout="classic"] .holiday-countdown::after{display:none}
.dashboard[data-home-layout="classic"] .holiday-upcoming{gap:8px}
@media(min-width:1320px){
 .dashboard[data-home-layout="compact"] .desk-main{display:flex;flex-direction:column;min-height:100dvh}
 @container desk-content (min-width:1018px){
  /* Fill the actual browser/Electron viewport instead of relying on a fixed height subtraction. */
  .dashboard[data-home-layout="compact"] .home-grid{flex:1 1 auto;min-height:0;align-items:stretch}
  .dashboard[data-home-layout="compact"] .home-side{grid-template-rows:1fr auto}
  .dashboard[data-home-layout="compact"] .rhythm-panel{align-self:stretch}
 }
}
@media(min-width:1320px) and (max-height:820px){
 .dashboard[data-home-layout="compact"] .desk-main{display:flex;flex-direction:column;min-height:100dvh;padding-top:16px;padding-bottom:14px}
 @container desk-content (min-width:1018px){
  /* High-DPI/short desktop view: preserve all content while fitting the compact home in one viewport. */
  .dashboard[data-home-layout="compact"] .daily-hero{padding-block:20px}
  .dashboard[data-home-layout="compact"] .home-grid{flex:1 1 auto;min-height:0;margin-top:14px;gap:14px}
  .dashboard[data-home-layout="compact"] .home-side{gap:14px}
  .dashboard[data-home-layout="compact"] .home-panel{padding:20px}
  .dashboard[data-home-layout="compact"] .home-panel-head{min-height:62px;padding-bottom:14px}
  .dashboard[data-home-layout="compact"] .holiday-countdown{margin:12px 0 10px;padding:11px 13px}
  .dashboard[data-home-layout="compact"] .holiday-upcoming{gap:6px}
  .dashboard[data-home-layout="compact"] .holiday-row{padding-block:4px}
  .dashboard[data-home-layout="compact"] .holiday-footer{padding-top:10px}
  .dashboard[data-home-layout="compact"] .continue-work{padding:10px 14px}
  .dashboard[data-home-layout="compact"] .continue-work-head{min-height:0;padding-bottom:0}
  .dashboard[data-home-layout="compact"] .recent-tools-list{padding-top:8px}
  .dashboard[data-home-layout="compact"] .recent-tool{min-height:58px;padding:7px 8px}
 }
}
@container desk-content (min-width:1018px){
 .dashboard[data-home-layout="classic"] .home-grid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}
 .dashboard[data-home-layout="classic"] .holiday-panel{grid-column:auto}
 .dashboard[data-home-layout="classic"] .holiday-upcoming{grid-template-columns:minmax(0,1fr)}
 .dashboard[data-home-layout="classic"] .home-grid :is(.rhythm-panel,.todo-panel,.holiday-panel){height:auto;min-height:var(--home-panel-height);align-self:stretch}
 .dashboard[data-home-layout="classic"] :is(.rhythm-panel,.todo-panel,.holiday-panel) .home-panel-head{height:76px;flex:none}
 .dashboard[data-home-layout="classic"] .rhythm-panel :is(.lesson-list,.week-schedule),.dashboard[data-home-layout="classic"] .todo-list{flex:1 1 0}
}
@container desk-content (max-width:760px){
 .dashboard[data-home-layout] .todo-list.is-empty .todo-empty{flex:auto;min-height:150px;margin-top:10px}
 .dashboard[data-home-layout="classic"] :is(.rhythm-panel,.todo-panel,.holiday-panel) .home-panel-head{min-height:64px}
 /* Auto-height stacked cards keep their original, compact guidance footprint. */
 .dashboard[data-home-layout] .lesson-list:not(.has-lessons){padding-top:5px;scrollbar-gutter:stable}
 .dashboard[data-home-layout] .lesson-list .lesson-empty{display:grid;grid-template-columns:38px minmax(0,1fr);justify-items:start;gap:7px 13px;min-height:0;margin:12px 0;max-width:none;padding:18px 16px;border:1px solid var(--border);border-radius:13px;background:var(--surface-2);text-align:left}
 .dashboard[data-home-layout] .lesson-empty .lesson-empty-icon{grid-row:1/4;width:38px;height:38px;margin:0;border:0;border-radius:11px;box-shadow:none;align-self:start}
 .dashboard[data-home-layout] .lesson-empty-icon .ui-icon{width:20px;height:20px}
 .dashboard[data-home-layout] .lesson-empty>strong,.dashboard[data-home-layout] .lesson-empty>span,.dashboard[data-home-layout] .lesson-empty-action{grid-column:2}
 .dashboard[data-home-layout] .lesson-empty>strong{font-size:13px;line-height:normal;font-weight:700}
 .dashboard[data-home-layout="compact"] .lesson-empty>strong{font-weight:600}
 .dashboard[data-home-layout] .lesson-empty>span{max-width:none;font-size:11px;line-height:1.7}
 .dashboard[data-home-layout] .lesson-empty-action{margin:0;padding:4px 0;border:0;border-radius:0;background:transparent;font-size:11px;line-height:normal}
}
@media(max-width:800px){#dashboardView[data-home-layout] .todo-check{width:24px;height:24px;min-width:24px;min-height:24px;max-width:24px;max-height:24px}.dashboard[data-home-layout] .todo-mark{width:15px;height:15px}}
@media(prefers-reduced-motion:reduce){.dashboard[data-home-layout] .home-panel,.dashboard[data-home-layout] .todo-template{transition:none}.dashboard[data-home-layout] .todo-item.is-completing :is(.todo-check,.todo-mark path,.todo-text,.todo-label),.dashboard[data-home-layout] .todo-item.is-completing .todo-check::after{animation:none;will-change:auto}}
