/* Mobile app layout; desktop keeps the full workspace. */
.mobile-navigation,.mobile-lesson-summary{display:none}
@media(max-width:850px){
 :root{--canvas:#f2f5fa;--ink:#172a46;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
 body{background:var(--canvas)}
 .topbar{height:72px;position:sticky;top:0;z-index:15;padding:0 20px;background:#ffffffed;backdrop-filter:blur(18px);border-bottom:1px solid #e5ebf4}
 .brand{gap:10px}.brand-logo{width:38px;height:42px}.brand strong{font-size:17px;letter-spacing:.4px}.brand-divider{display:none}.brand>span:last-child{display:flex;flex-direction:column;gap:3px}.brand>span:last-child>span:last-child{display:block;font-size:11px;color:#7a8ba4;font-weight:500}
 .header-mobile-actions{gap:7px}.mobile-search,.mobile-favorites{width:42px;height:42px;border:1px solid #e6ecf5;background:#f6f8fc;border-radius:14px;color:#4b6387}.header-mobile-actions svg{width:19px;height:19px}
 .layout{min-height:calc(100dvh - 72px)}.main{padding:18px 16px calc(100px + env(safe-area-inset-bottom));scroll-margin-top:88px}
 .schedule-heading{background:linear-gradient(125deg,#1c3e88 0%,#245bc9 100%);color:white;border-radius:25px;padding:23px 20px;margin:0 0 18px;box-shadow:0 10px 26px #245bc922;gap:14px;min-height:155px}
 .entity-heading{min-width:0}.entity-heading .eyebrow{font-size:9px;letter-spacing:1.3px;color:#c5d6f9}.entity-heading h1{font-size:29px;font-weight:700;letter-spacing:-.8px;line-height:1.22;margin:10px 0 7px;overflow-wrap:anywhere}.entity-heading p{font-size:12px;color:#d4e1fa;line-height:1.5;max-width:none}
 .mobile-lesson-summary{display:inline-flex;align-items:center;font-size:11px;color:#f1f6ff;border:1px solid #ffffff20;background:#ffffff12;padding:7px 10px;border-radius:9px;margin-top:14px;line-height:1.5}
 .heading-actions{max-width:42px;display:flex;flex-direction:column;gap:7px;margin:0;flex:none}.heading-actions .icon-button{width:38px;height:38px;border:1px solid #ffffff25;background:#ffffff12;color:#ecf3ff;border-radius:12px}.heading-actions .favorite-toggle[aria-pressed=true]{background:#fff3cf;color:#a87e16;border-color:#ffedb7}.heading-actions a{display:none}.heading-actions svg{width:17px;height:17px}
 .toolbar{display:flex;flex-direction:column;align-items:stretch;background:white;border:1px solid #e3eaf4;border-radius:19px;padding:12px;margin-bottom:13px;gap:12px}
 .week-navigation{display:flex;justify-content:space-between;width:100%;gap:5px}.week-navigation>.icon-button{width:36px;height:40px;border-radius:11px;background:#f4f7fc;color:#526c94;flex:none}.week-label{flex:1;min-width:0;gap:3px}.week-label strong{font-size:14px;color:#263e63}.week-label>span{font-size:11px;color:#7b8da7}.today-button{font-size:11px;min-height:38px;padding:8px 11px;border:0;background:#edf3ff;color:#245bc9;border-radius:10px;margin:0}
 .view-tools{display:flex;width:100%;justify-content:space-between;gap:10px;padding-top:10px;border-top:1px solid #eef2f7}.view-switch{display:flex;flex:1;max-width:none;background:#f0f3f8;border-radius:12px;padding:3px}.view-switch button{flex:1;min-height:35px;font-size:12px;border-radius:9px;color:#7a8ba3}.view-switch button[aria-pressed=true]{color:#234f9c;background:#fff;box-shadow:0 2px 7px #193b7310}.date-button{height:41px;width:41px;border-radius:12px;border-color:#e4eaf4;background:#f8faff}.date-button svg{width:17px}
 .day-tabs{gap:5px;border:0;padding:0;margin:0 0 8px;grid-template-columns:repeat(6,minmax(0,1fr))}.day-tab{background:#fff;border:1px solid #e4ebf5;border-radius:15px;min-height:78px;padding:11px 3px 8px;gap:6px}.day-tab .weekday{font-size:9px;letter-spacing:.7px;color:#8494ab}.day-tab .day-number{font-size:22px;font-weight:650;color:#3a5277}.day-tab .day-dot{width:4px;height:4px}.day-tab[aria-pressed=true]{border-color:#245bc9;background:#245bc9;box-shadow:0 5px 13px #245bc92b}.day-tab[aria-pressed=true] .day-number{color:white}.day-tab[aria-pressed=true] .weekday{color:#dbe8ff}.day-tab.is-today:not([aria-pressed=true]){background:#edf3ff;border-color:#bbd0f5}
 .schedule-options{padding:8px 2px 14px;gap:9px;min-height:56px;flex-wrap:wrap}.schedule-options>label{gap:7px;font-size:11px;color:#8492a8}.schedule-options select{font-size:11px;padding-top:7px;padding-bottom:7px;min-height:35px;border-color:#e0e8f3;border-radius:10px;max-width:175px}.freshness{font-size:9px;color:#91a0b5;max-width:none}.freshness .icon-button{height:32px;width:28px}.freshness .icon-button svg{width:13px}
 .day-title-row{margin:6px 0 15px;gap:10px}.day-title-row h2{font-size:17px;font-weight:700;letter-spacing:-.4px;color:#253f64}.day-title-row>span{padding:5px 8px;font-size:10px;border-radius:8px;background:#e8eef8;color:#7d91ae;white-space:nowrap}
 .lesson-row{display:grid;grid-template-columns:55px minmax(0,1fr);gap:10px;margin-bottom:13px;align-items:start}.lesson-time{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:17px 0 0}.lesson-time strong{font-size:12px;font-weight:750;letter-spacing:-.2px;color:#355275}.lesson-time>span{font-size:10px;color:#94a3b8}.lesson-time>span::before{content:none}.lesson-time .time-current{font-size:8px;line-height:1.5;letter-spacing:0;margin:5px 0 0;color:#245bc9}
 .lesson-card{border:1px solid #e2e9f3;border-left:3px solid var(--lesson-color);border-radius:17px;background:#fff;padding:14px;box-shadow:0 3px 14px #233f6804;overflow:hidden}.lesson-card h3{font-size:14px;font-weight:650;line-height:1.45;letter-spacing:-.15px;color:#294365;margin-bottom:11px}.lesson-topline{gap:6px;margin-bottom:9px}.lesson-kind{font-size:9px;font-weight:650;border-radius:6px;padding:4px 6px}.cycle-tag{font-size:9px;color:#9aa8ba}.lesson-details{gap:10px}.detail-row{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;font-size:11px;line-height:1.55}.detail-row .subgroup-badge{font-size:10px;padding:3px 7px;border-radius:6px;background:#f0f4fb;color:#728bab;justify-self:start;min-height:0}.detail-row .detail-line{gap:6px;align-items:flex-start;max-width:100%;min-width:0}.detail-row svg{width:13px;height:13px;color:#9aacc6;flex:none;margin-top:3px}.lesson-card .detail-link{font-size:11px;min-height:28px;padding:2px 0;line-height:1.55;color:#5f7fae;text-decoration-color:#d5dfed;text-underline-offset:3px}.detail-row .room-line{width:auto;color:#7089ab}.lesson-row.is-past{opacity:.88}.lesson-row.is-current .lesson-card{border-color:#83a7e7;border-left-color:#245bc9;box-shadow:0 4px 18px #245bc914}.lesson-comment{font-size:10px;padding:8px;margin-top:9px;border-radius:8px;background:#f5f8fc}.lesson-groups{gap:5px;margin-top:8px}.group-link{font-size:10px;min-height:28px;padding:5px 7px;border-radius:7px}
 .week-list{gap:21px}.week-section{padding-bottom:14px}.week-section .empty-day{padding:14px;border-radius:14px}.empty-day{background:#fff;border:1px dashed #cfdced;border-radius:17px;padding:28px 18px}.empty-day h3{font-size:14px}.empty-day p{font-size:11px}.week-section .empty-day p{padding-left:0}.notice{font-size:12px;border-radius:14px}.schedule-status{font-size:12px;border-radius:16px}
 .schedule-footer{margin:20px 0 15px;padding-top:15px;font-size:9px;color:#93a1b5}.schedule-footer button{font-size:11px;min-height:40px;background:white;padding:9px 12px;border:1px solid #e1e9f4;border-radius:11px}.page-footer{font-size:9px;color:#a2aec0;margin-top:25px;border:0;padding:0;text-align:center;justify-content:center}.page-footer span{width:100%}
 .mobile-navigation{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));position:fixed;z-index:40;left:12px;right:12px;bottom:calc(10px + env(safe-area-inset-bottom));border:1px solid #ffffff;background:#ffffffed;backdrop-filter:blur(20px);border-radius:23px;padding:7px;box-shadow:0 8px 35px #1a385822}
 .mobile-navigation button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:54px;border:0;background:transparent;color:#91a0b6;border-radius:17px;font-size:10px;font-weight:550}.mobile-navigation svg{width:21px;height:21px;stroke-width:1.7}.mobile-navigation button[aria-current=page]{color:#245bc9;background:#edf3ff}.mobile-navigation button[aria-current=page] svg{stroke-width:2}.mobile-navigation button:active{transform:scale(.97)}
 .sidebar{z-index:51;top:74px;left:0;right:0;bottom:0;width:100%;max-height:calc(100dvh - 74px);border:0;border-radius:27px 27px 0 0;padding:28px 22px calc(22px + env(safe-area-inset-bottom));transform:translateY(105%);box-shadow:0 -10px 45px #17345822;transition:transform .25s ease;background:#fff}.sidebar::before{content:"";display:block;position:absolute;top:10px;left:calc(50% - 19px);width:38px;height:4px;border-radius:3px;background:#dce4ef}.sidebar.open{transform:translateY(0)}.drawer-backdrop:not([hidden]){z-index:50;background:#17325266;backdrop-filter:blur(5px)}.sidebar h1{font-size:24px;margin-top:8px;margin-bottom:21px}.sidebar .drawer-close{width:36px;height:36px;background:#f3f6fa;border-radius:12px}.entity-tabs{padding:4px;border-radius:13px;background:#f0f4fa}.entity-tabs button{border-radius:10px;font-size:12px;min-height:43px}.search-field{border-radius:14px;min-height:51px;background:#fbfcff}.search-field input{font-size:15px}.search-field kbd{display:none}.search-hint{font-size:11px;line-height:1.6}.period-selects label{font-size:11px}.period-selects select,.group-filters select{border-radius:11px;font-size:12px;min-height:44px}.catalog-item{padding:13px 11px;border-radius:13px}.catalog-item .item-mark{border-radius:12px;width:37px;height:37px}.item-copy strong{font-size:14px}.item-copy small{font-size:11px}.sidebar-bottom{position:static;font-size:11px;padding-bottom:5px}.catalog-caption{margin-top:21px}.favorites-section{margin-top:19px}.favorite-chip{font-size:11px;min-height:36px;border-radius:9px}
 .personal-dialog{width:100%;max-width:none;margin:auto 0 0;max-height:85dvh;border:0;border-radius:28px 28px 0 0;box-shadow:0 -12px 45px #17345825;padding-bottom:env(safe-area-inset-bottom)}.personal-dialog::before{content:"";position:absolute;top:10px;left:calc(50% - 19px);width:38px;height:4px;background:#dce4ef;border-radius:3px}.personal-dialog::backdrop{background:#17325266;backdrop-filter:blur(5px)}.personal-dialog .personal-panel{padding:32px 22px 25px}.personal-dialog .personal-heading h2{font-size:24px}.personal-close{right:19px;top:24px;border-radius:12px;width:36px;height:36px}.personal-dialog .personal-heading{padding-right:42px;gap:20px}.personal-dialog .quick-card{min-height:77px;border-radius:16px;padding:15px}.personal-dialog .quick-icon{width:38px;height:38px;border-radius:12px}.personal-dialog .quick-copy strong{font-size:15px}.personal-dialog .change-button{border-radius:12px;min-height:44px}.personal-dialog .remember-hint{font-size:11px;line-height:1.7}
 .welcome{min-height:calc(100dvh - 220px);padding:36px 8px}.welcome h2{font-size:34px;line-height:1.12;letter-spacing:-1.3px;color:#223f67}.welcome>p{font-size:13px;line-height:1.8}.welcome-icon{width:80px;height:80px;border-radius:25px;background:#e7efff;margin-bottom:29px}.welcome .primary-button{min-height:49px;border-radius:14px;font-size:14px;padding:14px 22px}.welcome-features{font-size:10px;gap:14px;margin-top:30px}.quick-examples{font-size:11px}.quick-examples button{font-size:11px;border-radius:8px;padding:7px 10px}.toast{bottom:calc(95px + env(safe-area-inset-bottom));border-radius:14px;font-size:12px;padding:13px 17px;background:#213b60;border:0}
}
@media(max-width:359px){.topbar{padding:0 14px}.brand>span:last-child>span:last-child{font-size:10px}.brand-logo{width:33px;height:37px}.header-mobile-actions{gap:5px}.mobile-search,.mobile-favorites{width:38px;height:38px}.main{padding-left:12px;padding-right:12px}.schedule-heading{padding:20px 16px;border-radius:22px}.entity-heading h1{font-size:25px}.lesson-row{grid-template-columns:48px minmax(0,1fr);gap:7px}.lesson-time strong{font-size:11px}.lesson-card{padding:12px}.lesson-card h3{font-size:13px}.day-tabs{gap:4px}.day-tab{border-radius:13px;min-height:73px}.day-tab .day-number{font-size:20px}.week-label strong{font-size:13px}.today-button{padding:8px}.sidebar{padding-left:17px;padding-right:17px}.mobile-navigation{left:9px;right:9px}}
@media(prefers-reduced-motion:reduce){.sidebar,.mobile-navigation button{transition:none!important;transform:none}.sidebar:not(.open){transform:translateY(105%)}}

@media(max-width:850px){.search-field input{font-size:16px}.period-selects select,.group-filters select{font-size:16px}.group-filters{grid-template-columns:minmax(0,1fr)}.schedule-options select{font-size:16px;max-width:220px}.schedule-options>label{flex-wrap:wrap}.freshness{margin-left:0}}

@media(max-width:850px){.schedule-heading{min-height:0;padding-top:20px;padding-bottom:20px}.mobile-lesson-summary{border:0;background:none;padding:0;margin-top:10px;color:#dbe8ff}.schedule-options>label{font-size:0;gap:0}.schedule-options{align-items:center;min-height:51px}.freshness{margin-left:auto}.personal-dialog .personal-heading{padding-right:40px;margin-bottom:16px}.personal-dialog .personal-heading h2{margin:0}.personal-dialog .quick-access{padding-bottom:0}}

/* Time belongs above the full-width lesson card on every screen. */
.lesson-row{display:block;margin-bottom:18px}
.lesson-time{display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;gap:6px;padding:0 3px 8px}
.lesson-time strong{font-size:14px}.lesson-time>span{font-size:12px}
.lesson-time>span::before{content:"– ";}.lesson-time .time-current::before{content:none}
.lesson-time .time-current{margin:0 0 0 auto;font-size:9px}
.kind-practice .lesson-kind{background:#C9F3E9;color:#009F7E}
@media(max-width:850px){.lesson-row{display:block;margin-bottom:17px}.lesson-time{padding:0 3px 8px;flex-direction:row;align-items:center}.lesson-time strong{font-size:13px}.lesson-time>span{font-size:12px}.lesson-time>span::before{content:"– ";}.lesson-time .time-current{margin:0 0 0 auto;font-size:9px}}

.kind-lecture .lesson-kind{background:#FFF0C4;color:#E6A000}

.kind-lecture .lesson-kind,.kind-practice .lesson-kind{border-radius:10px;padding:5px 9px}

/* Plain schedule heading without a colored panel. */
@media(max-width:850px){
.schedule-heading{background:none;box-shadow:none;border:0;border-radius:0;color:var(--ink);padding:8px 2px 15px;min-height:0}
.entity-heading .eyebrow{color:#708098}.entity-heading h1{color:var(--ink)}.entity-heading p{color:#64748b}.mobile-lesson-summary{color:#64748b;background:none;border:0}
.heading-actions .icon-button{background:#fff;color:#667c9a;border:1px solid #e1e7f0}
.heading-actions .favorite-toggle[aria-pressed=true]{background:#fff3cf;color:#a87e16;border-color:#ffedb7}
}

.kind-practice{--lesson-color:#009F7E;--lesson-bg:#C9F3E9}.kind-lecture{--lesson-color:#E6A000;--lesson-bg:#FFF0C4}

.lesson-topline{display:flex;align-items:center;flex-wrap:wrap;gap:7px 10px;margin-bottom:13px}
.lesson-top-groups{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:5px;margin-left:auto;max-width:100%}
.lesson-group-badge{display:inline-flex;align-items:center;min-height:27px;border:0;border-radius:7px;background:#eff3fb;color:#7c96b9;font-size:11px;padding:4px 8px;line-height:1.5;text-align:left;overflow-wrap:anywhere}
button.lesson-group-badge:hover{background:#e0ebff;color:var(--accent)}
@media(max-width:850px){.lesson-topline{gap:6px 8px;margin-bottom:13px}.lesson-group-badge{font-size:10px;padding:4px 7px;min-height:25px}.lesson-card h3{margin-bottom:13px}.lesson-details{gap:13px}.detail-row{gap:8px}.lesson-card{padding:15px}.lesson-card .detail-link{font-size:12px}.lesson-card h3{font-size:15px}}

/* Full-width app navigation, matching the reference. */
@media(max-width:850px){
.mobile-navigation{left:0;right:0;bottom:0;border-radius:0;border:0;border-top:1px solid #dce4ef;background:#ffffffed;padding:10px 14px calc(10px + env(safe-area-inset-bottom));gap:8px;box-shadow:none}
.mobile-navigation button{position:relative;min-height:62px;border-radius:18px 18px 14px 14px;font-size:10px;gap:7px;background:transparent;color:#8794a6}
.mobile-navigation svg{width:24px;height:24px;stroke-width:1.7}
.mobile-navigation button[aria-current=page]{background:#eaf0ff;color:#245bc9}
.mobile-navigation button[aria-current=page]::after{content:"";position:absolute;height:2px;left:16px;right:16px;bottom:0;border-radius:2px;background:currentColor}
.mobile-navigation button:active{transform:none}
.main{padding-bottom:calc(112px + env(safe-area-inset-bottom))}
.toast{bottom:calc(102px + env(safe-area-inset-bottom))}
}
