/* Mobile homepage overrides: real visible width, one page scroller, reachable navigation. */
@media(max-width:720px),(max-width:980px) and (max-height:500px) and (pointer:coarse){
 #dashboardView .desk-shell{display:block;width:min(100%,var(--home-viewport-width,100%));min-width:0;margin-left:var(--home-viewport-left,0px);padding-bottom:calc(var(--home-nav-height,72px) + 84px);overflow:visible}
 #dashboardView .desk-main{width:100%;max-width:100%;min-width:0;box-sizing:border-box;overflow:visible;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 24px max(12px,env(safe-area-inset-left))}
 #dashboardView .daily-hero{width:100%;min-width:0;grid-template-columns:minmax(0,1fr);gap:12px;padding:14px;border-radius:18px}
 #dashboardView .daily-hero::after,#dashboardView .daily-quote::before{display:none}
 #dashboardView .today-block{gap:10px;min-width:0}
 #dashboardView .hero-avatar{width:48px;height:48px;border-width:2px;border-radius:14px;box-shadow:none}
 #dashboardView .today-copy{flex:1;min-width:0;padding-right:46px}
 #dashboardView .today-copy small{display:none}
 #dashboardView .today-copy h1{font-size:19px;line-height:1.3;letter-spacing:0;overflow-wrap:anywhere}
 #dashboardView .today-copy p{margin-top:5px;font-size:12px;line-height:1.4}
 #dashboardView .site-notification-home{display:inline-flex;top:0;right:0;width:44px;height:44px;padding:11px}
 #dashboardView .daily-quote{max-width:100%;padding:8px 0;border-block:1px solid var(--border)}
 #dashboardView .daily-quote-kicker small{font-size:8px;letter-spacing:.15em}
 #dashboardView .daily-quote-kicker{display:none}
 #dashboardView .daily-quote blockquote{margin:0 0 5px;font-size:16px;line-height:1.4;overflow-wrap:anywhere}
 #dashboardView .daily-quote figcaption{flex-wrap:wrap;gap:4px 8px;font-size:11px;line-height:1.5}
 #dashboardView .daily-quote figcaption time{display:none}
 #dashboardView .weather-card{width:100%;min-width:0;max-width:100%;grid-template-columns:32px minmax(0,1fr) 44px;gap:8px;padding:10px;border-radius:13px}
 #dashboardView .weather-icon{width:32px;height:36px;border-radius:10px;font-size:19px}
 #dashboardView .weather-refresh{width:44px;height:44px;min-width:44px}
 #dashboardView .weather-copy>strong,#dashboardView .weather-copy>span,#dashboardView .weather-copy>small{white-space:normal;overflow:visible;overflow-wrap:anywhere;text-overflow:clip}
 #dashboardView .weather-copy>strong{font-size:14px;line-height:1.4}
 #dashboardView .weather-copy>span,#dashboardView .weather-copy>small{font-size:11px;line-height:1.5}
 #dashboardView .weather-copy>small{margin-top:3px}
 #dashboardView .home-grid{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:'rhythm' 'todo' 'holiday' 'recent';gap:12px;align-items:start;margin-top:12px}
 #dashboardView .home-side{display:contents}
 #dashboardView .home-panel{width:100%;min-width:0;height:auto;min-height:0;padding:14px;border-radius:16px;overflow:visible}
 #dashboardView .home-panel:hover{transform:none}
 #dashboardView .home-panel-head{min-width:0;min-height:0;gap:8px;flex-wrap:wrap;padding-bottom:12px}
 #dashboardView .panel-title-group{min-width:0;gap:9px}
 #dashboardView .panel-title-group>div{min-width:0}
 #dashboardView .panel-title-icon{width:32px;height:32px;border-radius:10px}
 #dashboardView .home-panel-head h2{font-size:17px;line-height:1.4}
 #dashboardView .home-panel-head p{font-size:11px;line-height:1.5}
 #dashboardView .rhythm-panel .home-panel-head p{display:none}
 #dashboardView .panel-kicker{display:none}
 #dashboardView .rhythm-status{min-width:0;flex-wrap:wrap;gap:5px 10px;margin:12px 0 4px;padding:10px;font-size:11px;line-height:1.5}
 #dashboardView .rhythm-status strong{min-width:0;font-size:12px;white-space:normal;overflow-wrap:anywhere}
 #dashboardView .rhythm-panel .lesson-list,#dashboardView .rhythm-panel .week-schedule,#dashboardView .todo-list{flex:none;min-height:0;max-height:none;overflow:visible;scrollbar-gutter:auto;padding-right:0}
 #dashboardView .lesson-list.has-lessons::before{left:55px;top:23px;bottom:23px}
 #dashboardView .lesson-row{flex:none;display:grid;grid-template-columns:44px 10px minmax(0,1fr);grid-template-rows:auto auto;gap:3px 6px;align-items:start;min-height:70px;padding:12px 0}
 #dashboardView .lesson-time{grid-column:1;grid-row:1;padding-top:2px;font-size:12px;line-height:1.5}
 #dashboardView .lesson-time::after{display:none}
 #dashboardView .lesson-period{grid-column:1;grid-row:2;text-align:left;padding:0;font-size:10px;line-height:1.5;white-space:nowrap}
 #dashboardView .lesson-period::before{content:'至 ';font-size:9px}
 #dashboardView .lesson-dot{grid-column:2;grid-row:1/span 2;width:10px;height:10px;margin-top:5px;border-width:2px}
 #dashboardView .lesson-copy{grid-column:3;grid-row:1/span 2;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) 74px;gap:5px 6px;align-items:center;padding:0!important;margin:0!important}
 #dashboardView .lesson-copy strong{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:2px;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
 #dashboardView .lesson-class{font-size:11px;line-height:1.5}
 #dashboardView .lesson-copy>span{grid-column:1/-1;min-width:0;margin-top:2px;font-size:12px;line-height:1.65;overflow-wrap:anywhere}
 #dashboardView .lesson-note-button{grid-column:2;grid-row:1;width:74px;min-width:0;min-height:44px;margin:0;padding:7px 5px;font-size:11px;line-height:1.5;white-space:normal;border-radius:9px}
 #dashboardView .lesson-row.is-current::after{inset:6px 0 6px 64px}
 /* A 44px button hit area must not stretch the visible completion circle. */
 #dashboardView .todo-check{position:relative;box-sizing:border-box;width:24px;height:24px;min-width:24px;min-height:24px;max-width:24px;max-height:24px;padding:0;aspect-ratio:1;flex-shrink:0;align-self:center;border-radius:50%;appearance:none;-webkit-appearance:none}
 #dashboardView .todo-check::before{content:'';position:absolute;inset:-10px;border-radius:50%}
 #dashboardView .todo-date{max-width:100%;min-width:0;min-height:44px}
 #dashboardView .todo-add{grid-template-columns:minmax(0,1fr) 44px}
 #dashboardView .todo-add input{min-width:0;width:100%}
 #dashboardView .todo-add button{width:44px;min-height:44px}
 #dashboardView .quick-tools .module-grid{grid-template-columns:minmax(0,1fr)}
 #dashboardView .quick-tools .module-card{grid-column:auto;min-width:0;min-height:130px}
 #dashboardView .desk-sidebar{position:fixed;inset:auto;left:var(--home-viewport-left,0px);top:calc(var(--home-viewport-top,0px) + var(--home-viewport-height,100dvh) - var(--home-nav-height,72px));z-index:120;width:var(--home-viewport-width,100%);height:auto;min-height:0;padding:6px max(8px,env(safe-area-inset-right)) max(7px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));border:0;border-top:1px solid rgba(255,255,255,.13);background:linear-gradient(180deg,var(--theme-deep),color-mix(in srgb,var(--theme-deep) 88%,#08130f));box-shadow:0 -10px 30px rgba(10,28,21,.22);overflow:visible;box-sizing:border-box;isolation:isolate}
 #dashboardView .desk-sidebar::before{content:'';position:absolute;z-index:-1;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.065) 50%,transparent);pointer-events:none}
 #dashboardView .desk-sidebar::after{content:'';position:absolute;z-index:-2;left:0;right:0;top:calc(100% - 1px);height:max(64px,env(safe-area-inset-bottom));background:color-mix(in srgb,var(--theme-deep) 88%,#08130f);pointer-events:none}
 #dashboardView .desk-brand,#dashboardView .desk-context,#dashboardView .desk-nav-head,#dashboardView .sidebar-account,#dashboardView .desk-sidebar-foot{display:none!important}
 #dashboardView .desk-nav{display:block;min-width:0;overflow:visible}
 #dashboardView .desk-nav-scroll{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:3px;width:100%;padding:4px;border:1px solid rgba(255,255,255,.075);border-radius:18px;background:rgba(255,255,255,.035);overflow:visible;scroll-snap-type:none}
 #dashboardView .tool-sort-list{display:contents!important}
 #dashboardView .desk-nav-scroll button{width:100%;min-width:0;min-height:55px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px;padding:4px 2px;border:1px solid transparent;border-radius:14px;background:transparent;color:rgba(236,244,239,.72);text-align:center;box-shadow:none;transform:none!important;-webkit-tap-highlight-color:transparent}
 #dashboardView .desk-nav-scroll button.active{border-color:rgba(255,255,255,.14);background:linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,.075));color:#fff;box-shadow:0 5px 14px rgba(3,17,12,.16),inset 0 1px rgba(255,255,255,.06)}
 #dashboardView .desk-nav-scroll:has(#mobileMoreButton[aria-expanded="true"]) button.active:not(#mobileMoreButton){border-color:transparent;background:transparent;color:rgba(236,244,239,.72);box-shadow:none}
 #dashboardView #mobileMoreButton[aria-expanded="true"]{border-color:rgba(255,255,255,.14);background:linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,.075));color:#fff;box-shadow:0 5px 14px rgba(3,17,12,.16),inset 0 1px rgba(255,255,255,.06)}
 #dashboardView #mobileMoreButton[aria-expanded="true"] .desk-nav-icon{background:rgba(255,255,255,.1)}
 #dashboardView .desk-nav-scroll button:active{background:rgba(255,255,255,.12)}
 #dashboardView #sidebarToolList [data-tool]:not([data-tool='classes']):not([data-tool='dictation']):not([data-tool='listening']),#dashboardView .desk-nav-scroll [hidden],#dashboardView .sort-help{display:none!important}
 #dashboardView .desk-nav-icon{width:29px;height:29px;border:0;border-radius:10px;background:transparent;flex:none;color:currentColor}
 #dashboardView .desk-nav-scroll button.active .desk-nav-icon{background:rgba(255,255,255,.1)}
 #dashboardView .desk-nav-icon .ui-icon{width:18px;height:18px}
 #dashboardView .desk-nav-copy{display:block!important;min-width:0;max-width:100%}
 #dashboardView .desk-nav-copy strong{font-size:10.5px;font-weight:650;line-height:1.25;white-space:nowrap;overflow-wrap:normal}
 #dashboardView .desk-nav-copy span{display:none!important}
 #dashboardView .mobile-more-button{display:flex!important}
 #dashboardView .mobile-more-menu:not([hidden]){position:absolute;display:block;z-index:220;top:auto;bottom:calc(100% + 10px);right:12px;width:min(430px,calc(var(--home-viewport-width,100vw) - 24px));max-height:calc(var(--home-viewport-height,100dvh) - var(--home-nav-height,72px) - 28px);padding:0;border:1px solid color-mix(in srgb,var(--border) 78%,transparent);border-radius:24px;background:color-mix(in srgb,var(--surface) 97%,transparent);color:var(--text);box-shadow:0 24px 64px rgba(8,25,18,.28),0 2px 10px rgba(8,25,18,.12);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box;animation:mobile-more-enter .18s ease-out;-webkit-overflow-scrolling:touch}
 #dashboardView .mobile-more-menu button{min-height:44px}
 #dashboardView .mobile-more-head{position:sticky;z-index:2;top:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 16px 11px;background:linear-gradient(180deg,var(--surface) 76%,color-mix(in srgb,var(--surface) 92%,transparent));border-bottom:1px solid color-mix(in srgb,var(--border) 65%,transparent)}
 #dashboardView .mobile-more-head>div{display:grid;gap:2px}
 #dashboardView .mobile-more-head small{color:var(--muted);font-size:8px;font-weight:700;letter-spacing:.2em}
 #dashboardView .mobile-more-head strong{font-size:18px;line-height:1.3}
 #dashboardView .mobile-more-close{position:relative;width:44px;min-width:44px;min-height:44px;display:grid;place-content:center;place-items:center;padding:0;border:0;border-radius:50%;background:transparent;color:var(--muted)}
 #dashboardView .mobile-more-close::before{content:'';position:absolute;inset:5px;border-radius:50%;background:color-mix(in srgb,var(--muted) 8%,var(--surface-2));transition:background .15s ease,transform .15s ease}
 #dashboardView .mobile-more-close:active::before{background:color-mix(in srgb,var(--muted) 15%,var(--surface-2));transform:scale(.94)}
 #dashboardView .mobile-more-close .ui-icon{position:relative;z-index:1;width:15px;height:15px;stroke-width:1.7}
 #dashboardView .mobile-more-section{padding:13px 13px 4px}
 #dashboardView .mobile-more-section:last-child{padding-bottom:14px}
 #dashboardView .mobile-more-section h3{margin:0 4px 9px;color:var(--muted);font-size:10px;font-weight:700;letter-spacing:.08em}
 #dashboardView .mobile-more-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #dashboardView .mobile-more-tools>button,#dashboardView .mobile-more-settings>button,#dashboardView .mobile-theme-label{width:100%;min-width:0;display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:10px;margin:0;padding:10px;border:1px solid var(--border);border-radius:15px;background:var(--surface-2);color:var(--text);text-align:left;box-shadow:none;transform:none!important;-webkit-tap-highlight-color:transparent}
 #dashboardView .mobile-more-tools>button{grid-template-columns:36px minmax(0,1fr);grid-template-rows:auto auto;min-height:76px;padding:11px}
 #dashboardView .mobile-more-tools>button .mobile-more-icon{grid-column:1;grid-row:1/span 2}
 #dashboardView .mobile-more-tools>button .mobile-more-copy{grid-column:2;grid-row:1/span 2}
 #dashboardView .mobile-more-tools>button .mobile-more-chevron{display:none}
 #dashboardView .mobile-more-tools.has-odd>button:not([hidden]):last-child{grid-column:1/-1;grid-template-columns:36px minmax(0,1fr) auto;grid-template-rows:auto;min-height:64px}
 #dashboardView .mobile-more-tools.has-odd>button:not([hidden]):last-child .mobile-more-icon,#dashboardView .mobile-more-tools.has-odd>button:not([hidden]):last-child .mobile-more-copy{grid-column:auto;grid-row:auto}
 #dashboardView .mobile-more-tools.has-odd>button:not([hidden]):last-child .mobile-more-chevron{display:block}
 #dashboardView .mobile-more-settings{display:grid;gap:7px}
 #dashboardView .mobile-more-tools>button:active,#dashboardView .mobile-more-settings>button:active{border-color:color-mix(in srgb,var(--primary) 38%,var(--border));background:color-mix(in srgb,var(--primary) 7%,var(--surface-2))}
 #dashboardView .mobile-more-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:11px;background:color-mix(in srgb,var(--primary) 10%,var(--surface));color:var(--primary)}
 #dashboardView .mobile-more-icon .ui-icon{width:18px;height:18px}
 #dashboardView .mobile-more-copy{min-width:0;display:grid;gap:2px}
 #dashboardView .mobile-more-copy strong{font-size:13px;font-weight:700;line-height:1.35;white-space:normal}
 #dashboardView .mobile-more-copy small{color:var(--muted);font-size:9px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
 #dashboardView .mobile-more-chevron{color:var(--muted);font-size:22px;font-weight:300;line-height:1}
 #dashboardView .mobile-theme-label{cursor:pointer}
 #dashboardView #mobileThemeSelect{width:auto;min-width:124px;max-width:142px;min-height:38px;padding:6px 31px 6px 10px;border:1px solid color-mix(in srgb,var(--border) 82%,transparent);border-radius:11px;appearance:none;-webkit-appearance:none;background-color:var(--surface);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23677870' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 10 4 4 4-4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 9px center;background-size:16px;color:var(--text);font-size:16px!important;font-weight:650;line-height:1.2}
 #dashboardView #mobileThemeSelect:focus{outline:2px solid color-mix(in srgb,var(--primary) 24%,transparent);outline-offset:1px;border-color:color-mix(in srgb,var(--primary) 42%,var(--border))}
 #dashboardView .mobile-logout-button{color:var(--danger,#a84f49)}
 #dashboardView .mobile-logout-button .mobile-more-icon{background:#f9ecea;color:#a84f49}
 .mobile-more-scrim:not([hidden]){position:fixed;z-index:110;inset:0;width:100%;height:100%;padding:0;border:0;background:rgba(12,25,20,.28);animation:mobile-more-fade .16s ease-out;-webkit-tap-highlight-color:transparent}
 html.mobile-more-open,html.mobile-more-open body{overscroll-behavior:none}
 html.mobile-more-open body{overflow:hidden}
 @keyframes mobile-more-enter{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:none}}
 @keyframes mobile-more-fade{from{opacity:0}to{opacity:1}}
 .home-keyboard-open #dashboardView .desk-sidebar{visibility:hidden;pointer-events:none}
 body:has(#dashboardView:not([hidden])) #commandFloatingOpen{width:44px;height:44px;min-width:44px;min-height:44px;right:calc(100vw - var(--home-viewport-left,0px) - var(--home-viewport-width,100vw) + 12px);top:calc(var(--home-viewport-top,0px) + var(--home-viewport-height,100dvh) - var(--home-nav-height,72px) - 56px);bottom:auto;border-radius:14px}
 body:has(#dashboardView:not([hidden])) #commandFloatingOpen svg{width:21px;height:21px}
}
@media(max-width:360px){
 #dashboardView .mobile-more-tools{grid-template-columns:1fr}
 #dashboardView .mobile-more-tools>button{min-height:62px}
 #dashboardView .mobile-more-menu:not([hidden]){border-radius:21px}
}
@media(prefers-reduced-motion:reduce){
 #dashboardView .mobile-more-menu:not([hidden]),.mobile-more-scrim:not([hidden]){animation:none}
}
@container desk-content (max-width:260px){
 #dashboardView .lesson-copy{display:block}
 #dashboardView .lesson-note-button{margin-top:6px}
 #dashboardView .weather-card{grid-template-columns:minmax(0,1fr) 44px}
 #dashboardView .weather-icon{display:none}
 #dashboardView .weather-copy>span{display:none}
}
