/* Shared Telegram/MAX desktop shell. Mobile measurements remain in their screens. */
body.beta #beta-dashboard #study-main .campus-profile-header {padding:0 0 16px;border:0;}
body.beta #beta-dashboard #study-main .campus-profile-header .campus-profile-cover {border:0;border-radius:22px 22px 0 0;box-shadow:none;overflow:hidden;}
body.beta #beta-dashboard #study-main .campus-profile-cover::before,body.beta #beta-dashboard #study-main .campus-profile-cover::after {display:none;}
body.beta #beta-dashboard #study-main .campus-profile-cover>.campus-banner-placeholder {background:linear-gradient(120deg,var(--ui-accent-soft),var(--ui-soft));}
body.beta #beta-dashboard #study-main .campus-profile-actions .campus-profile-photo {flex:none;width:112px;height:112px;min-height:112px;padding:0;border:0;box-shadow:none;background:transparent;overflow:visible;}
body.beta #beta-dashboard #study-main .campus-profile-actions .campus-avatar {box-sizing:border-box;width:112px;height:112px;border:3px solid var(--ui-surface);padding:0;box-shadow:none;outline:0;}
body.beta #beta-dashboard #study-main .campus-profile-photo .campus-online-dot {box-sizing:border-box;width:18px;height:18px;border:3px solid var(--ui-surface);right:10%;bottom:10%;}
body.beta #beta-dashboard #study-main .campus-cover-view {position:absolute;inset:0;display:block;width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;border-radius:inherit;background:transparent;overflow:hidden;cursor:zoom-in;}
body.beta #beta-dashboard #study-main .campus-cover-view img {display:block;width:100%;height:100%;object-fit:cover;}
body.beta #beta-dashboard #study-main img[data-profile-media] {cursor:zoom-in;}
body.beta #beta-dashboard #study-main .campus-account-avatar-view {flex:none;width:56px;height:56px;min-height:56px;padding:0;border:0;border-radius:50%;background:transparent;}
body.beta #beta-dashboard #study-main .campus-cover-view:focus-visible {outline:3px solid var(--ui-accent);outline-offset:-3px;}
@media(max-width:999px) {body.beta #beta-dashboard #study-main .campus-profile-actions .campus-profile-photo {margin-top:-56px;}}
@media(min-width:1000px) {
 html:has(body.beta) {scroll-padding-top:calc(var(--app-safe-top,0px) + 92px);}
 body.beta:not(:has(.headman-page)):has(input:focus,textarea:focus,[contenteditable=true]:focus) #beta-dashboard .study-nav {display:flex!important;}
 body.beta #beta-app {padding:0;max-width:none;}
 /* The desktop shell owns the insets for both flowing content and fixed navigation. */
 body.beta #beta-app:has(> #beta-dashboard:not([hidden])) {padding:0;}
 body.beta :is(#beta-dashboard,.study-tour-app) {
   --desktop-edge:max(24px,calc((100vw - 1280px)/2));
   --desktop-left:max(var(--desktop-edge),var(--app-safe-left,0px));
   --desktop-right:max(var(--desktop-edge),var(--app-safe-right,0px));
   --desktop-content-top:calc(var(--app-safe-top,0px) + 100px);
   --desktop-first-row:46px;
   --desktop-rail:192px;
   --desktop-gap:32px;
 }
 body.beta :is(#beta-dashboard,.study-tour-app) .study-layout {box-sizing:border-box;width:100%;max-width:none;margin:0;padding:var(--desktop-content-top) var(--desktop-right) max(56px,var(--app-safe-bottom,0px)) calc(var(--desktop-left) + var(--desktop-rail) + var(--desktop-gap));}
 body.beta :is(#beta-dashboard,.study-tour-app) .study-top {position:fixed;top:var(--app-safe-top,0px);left:0;right:0;width:100%;height:72px;min-height:72px;margin:0;padding:0 var(--desktop-right) 0 var(--desktop-left);box-sizing:border-box;border:0;border-bottom:1px solid var(--ui-border);border-radius:0;background:var(--ui-surface);box-shadow:none;z-index:30;}
 body.beta :is(#beta-dashboard,.study-tour-app) .study-brand {gap:12px;}
 body.beta :is(#beta-dashboard,.study-tour-app) .study-wordmark {font-size:26px;letter-spacing:-1px;}
 body.beta :is(#beta-dashboard,.study-tour-app) .study-tagline {font-size:12px;}
 body.beta :is(#beta-dashboard,.study-tour-app) .study-nav {position:fixed;inset:var(--desktop-content-top) auto auto var(--desktop-left);transform:none;box-sizing:border-box;width:var(--desktop-rail);max-width:var(--desktop-rail);height:auto;min-height:0;max-height:calc(100dvh - var(--desktop-content-top) - max(24px,var(--app-safe-bottom,0px)));display:flex;flex-direction:column;gap:6px;margin:0;padding:0;overflow:auto;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none;}
 body.beta :is(#beta-dashboard,.study-tour-app) .study-nav::before,body.beta :is(#beta-dashboard,.study-tour-app) .study-nav::after {display:none;}
 body.beta :is(#beta-dashboard,.study-tour-app) .study-nav button {display:flex;flex:0 0 auto;flex-direction:row;justify-content:flex-start;align-items:center;gap:12px;box-sizing:border-box;width:100%;height:var(--desktop-first-row);min-height:var(--desktop-first-row);padding:0 14px;border:0;border-radius:14px;font-size:14px;line-height:20px;}
 body.beta :is(#beta-dashboard,.study-tour-app) .study-nav button>svg {flex:none;width:21px;height:21px;}
 body.beta :is(#beta-dashboard,.study-tour-app) .study-nav button.active {background:var(--ui-accent-soft);color:var(--ui-accent);font-weight:600;}
 body.beta :is(#beta-dashboard,.study-tour-app) .study-nav button::before {display:none;}
 body.beta :is(#beta-dashboard,.study-tour-app) .astra-desktop-account {margin-top:18px;padding:0;border:0;}
 body.beta :is(#beta-dashboard,.study-tour-app) .astra-desktop-account>button {display:grid;grid-template-columns:32px minmax(0,1fr) 16px;gap:8px;width:100%;height:auto;min-height:64px;padding:10px;border-radius:14px;background:var(--ui-surface);color:var(--ui-text);text-align:left;}
 body.beta :is(#beta-dashboard,.study-tour-app) .astra-desktop-account>button:hover {background:var(--ui-soft);}
 body.beta :is(#beta-dashboard,.study-tour-app) .astra-desktop-account>button.active {background:var(--ui-accent-soft);color:var(--ui-accent);}
 body.beta :is(#beta-dashboard,.study-tour-app) .astra-desktop-account .campus-avatar {width:32px;height:32px;}
 body.beta :is(#beta-dashboard,.study-tour-app) .astra-desktop-account .astra-account-identity {display:grid;gap:3px;min-width:0;}
 body.beta :is(#beta-dashboard,.study-tour-app) .astra-desktop-account strong {font-size:12px;line-height:16px;font-weight:600;}
 body.beta :is(#beta-dashboard,.study-tour-app) .astra-desktop-account small {font-size:11px;line-height:15px;}
 body.beta :is(#beta-dashboard,.study-tour-app) .astra-desktop-account>button>svg {width:16px;height:16px;color:var(--ui-muted);}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main {min-width:0;max-width:1056px;margin-inline:auto;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main :is(.study-heading,.files-heading,.hm-header) {margin-bottom:24px;gap:14px;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main :is(.study-heading h1,.files-heading h1,.hm-header h1,.astra-desktop-home-title) {font-size:28px;line-height:1.2;letter-spacing:-.75px;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .astra-desktop-home-title {margin:0 0 24px;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main :is(.study-heading h1,.files-heading h1,.astra-desktop-home-title) {min-height:var(--desktop-first-row);align-content:center;}
 /* Home keeps its familiar reading order: cover, filters, posts. */
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main:has(>.campus-wall) {max-width:840px;margin-inline:0;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .campus-wall:has(>.mpei-home-art) {display:flex;flex-direction:column;gap:18px;max-width:none;margin:0;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .campus-wall>* {width:100%;min-width:0;box-sizing:border-box;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .mpei-home-art {position:static;height:auto;aspect-ratio:1857/847;margin:0;border-radius:20px;overflow:hidden;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .mpei-home-art img {display:block;width:100%;height:100%;object-fit:contain;}
 /* One compose entry point, matching mobile. The full editor opens from the +. */
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .campus-wall>.campus-wall-inline {display:none;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .campus-social-profile>.campus-desktop-compose {display:none;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .campus-feed-controls {gap:12px;margin:0;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .campus-wall-inline .campus-composer {margin:0;padding:18px 20px;border:1px solid var(--ui-border);border-radius:20px;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .campus-composer.is-inline .campus-composer-text {min-height:44px;font-size:14px;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .campus-composer.is-inline .campus-composer-toolbar {margin-top:12px;gap:8px;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .campus-composer.is-inline .campus-composer-submit {min-height:40px;font-size:13px;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .campus-feed {display:flex;flex-direction:column;gap:18px;min-width:0;width:100%;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .campus-post {box-sizing:border-box;min-width:0;width:100%;padding:22px;border-radius:22px;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .campus-post-photo {display:block;box-sizing:border-box;max-width:100%;max-height:520px;width:100%;height:auto;object-fit:contain;border-radius:16px;background:var(--ui-soft);}
 body.beta #beta-dashboard #study-main .campus-post-text {max-width:76ch;font-size:15px;line-height:1.6;overflow-wrap:anywhere;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main :is(.campus-post-detail,.campus-compose-window,.lesson-detail,.campus-discovery,.campus-article) {max-width:800px;margin-inline:auto;}
 body.beta #beta-dashboard #study-main .campus-social-profile {max-width:800px;margin-inline:auto;}
 body.beta #beta-dashboard #study-main .campus-social-profile .campus-profile-cover {max-height:250px;}
 body.beta #beta-dashboard #study-main .campus-profile-actions {margin-top:-56px;}
 body.beta #beta-dashboard #study-main .campus-profile-actions .campus-profile-photo {margin:0;}
 body.beta #beta-dashboard:has(.astra-desktop-account) #study-main .campus-profile-edit-actions .campus-profile-settings-gear {display:none;}
 body.beta #beta-dashboard #study-main .campus-social-profile .campus-profile-content {padding:0 24px 22px;}
 body.beta #beta-dashboard #study-main .campus-social-identity {text-align:left;}
 body.beta #beta-dashboard #study-main .campus-profile-name {align-items:flex-start;}
 body.beta #beta-dashboard #study-main .campus-composer-more>div,
 body.beta #beta-dashboard #study-main .campus-emoji-picker>div:not(.astra-sticker-screen) {position:absolute;inset:auto auto 52px 0;width:300px;max-width:calc(100vw - 48px);max-height:60dvh;}
 body.beta #beta-dashboard #study-main .campus-composer-more>div {left:auto;right:0;}
 body.beta #beta-dashboard #study-main .campus-compose-window .campus-composer-more>div {position:fixed;top:calc(var(--app-safe-top,0px) + 92px);bottom:auto;right:max(24px,calc((100vw - 800px)/2 + 24px));max-height:calc(100dvh - var(--app-safe-top,0px) - var(--app-safe-bottom,0px) - 116px);}
 body.beta #beta-dashboard #study-main .study-role-guide {position:relative;inset:auto;display:grid;grid-template-columns:36px minmax(0,1fr);gap:10px;width:100%;margin:10px 0;padding:0;pointer-events:auto;}
 body.beta #beta-dashboard #study-main .study-role-guide .study-role-mascot {position:static;width:36px;height:36px;align-self:center;animation:none;}
 body.beta #beta-dashboard #study-main .study-role-guide .study-role-speech {animation:none;box-shadow:none;padding:10px 30px 10px 12px;background:var(--ui-soft);border:0;border-radius:12px;}
 body.beta #beta-dashboard #study-main .study-role-guide .study-role-speech::before {display:none;}
 body.beta #beta-dashboard #study-main .campus-settings-page {max-width:960px;margin-inline:0;}
 body.beta #beta-dashboard #study-main .campus-settings-page .campus-settings-panel {height:auto;max-height:none;}
 body.beta #beta-dashboard #study-main .campus-settings-window {max-width:960px;padding:24px;}
 body.beta #beta-dashboard #study-main .campus-settings-layout.is-index {height:auto;max-width:960px;margin-inline:0;}
 body.beta #beta-dashboard #study-main .campus-settings-layout.is-index .campus-settings-tabs {grid-template-columns:repeat(auto-fit,minmax(min(100%,216px),1fr));gap:16px;overflow:visible;}
 body.beta #beta-dashboard #study-main .campus-settings-layout.is-index .campus-setting-link {min-height:58px;padding:10px 2px;opacity:1;}
 body.beta #beta-dashboard #study-main .campus-settings-layout:not(.is-index) {grid-template-columns:210px minmax(0,1fr);gap:24px;}
 body.beta #beta-dashboard #study-main .campus-settings-layout:not(.is-index) .campus-settings-tabs {gap:18px;}
 body.beta #beta-dashboard #study-main .campus-settings-layout:not(.is-index) .campus-setting-list {gap:2px;padding:0;border:0;background:transparent;}
 body.beta #beta-dashboard #study-main .campus-settings-layout:not(.is-index) .campus-setting-link {min-height:40px;height:auto;padding:8px 10px;border:0;border-radius:10px;}
 body.beta #beta-dashboard #study-main .campus-settings-layout:not(.is-index) .campus-setting-link[aria-current=page] {background:var(--ui-accent-soft);}
 body.beta #beta-dashboard #study-main [data-campus-form=privacy]>button[type=submit] {position:static;align-self:flex-start;width:auto;padding-inline:22px;box-shadow:none;}
 /* Profile editing is its own screen, rather than a second settings navigation. */
 body.beta #beta-dashboard #study-main .campus-settings-page:has(.campus-settings-layout[data-section=account]) {max-width:840px;margin-inline:auto;}
 body.beta #beta-dashboard #study-main .campus-settings-layout[data-section=account] {display:flex;flex-direction:column;gap:24px;width:100%;max-width:840px;margin-inline:auto;}
 body.beta #beta-dashboard #study-main .campus-settings-layout[data-section=account]>.campus-settings-tabs,
 body.beta #beta-dashboard #study-main .campus-settings-layout[data-section=account]>.astra-settings-person {display:none;}
 /* Keep list and detail together; never leave the detail beneath a stretched list. */
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .schedule-columns {box-sizing:border-box;width:100%;max-width:none;margin:0;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:24px;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .schedule-list {box-sizing:border-box;width:100%;min-width:0;margin:0;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .schedule-detail-panel {min-width:0;position:sticky;top:calc(var(--app-safe-top,0px) + 92px);}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .schedule-detail-panel .lesson-detail {width:100%;box-sizing:border-box;margin:0;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .schedule-detail-panel .lesson-title-copy h1 {font-size:22px;line-height:1.3;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .lesson-timeline {gap:14px;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .lesson-row {grid-template-columns:56px minmax(0,1fr);gap:18px;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .lesson-body {padding:18px 20px;border-radius:20px;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .lesson-title {font-size:16px;line-height:1.45;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .lesson-subgroup-parts {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .day-strip {max-width:none;}
 body.beta #beta-dashboard #study-main :is(.account-mail,.student-files,.group-announcements) {width:100%;max-width:920px;margin-inline:0;}
 body.beta #beta-dashboard #study-main .announcement-compose {box-sizing:border-box;width:100%;max-width:680px;padding:20px;}
 body.beta #beta-dashboard #study-main .announcement-compose textarea {padding:12px;border:1px solid var(--ui-border);border-radius:12px;}
 body.beta #beta-dashboard #study-main .announcement-compose :is(textarea,select):focus-visible {outline:2px solid var(--ui-accent);outline-offset:2px;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .files-group-destinations {grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .files-group-panel {min-height:130px;padding:18px;gap:10px;}
 body.beta #beta-dashboard #study-main .mail-reader .mail-message-body {max-width:min(100%,78ch);}
 body.beta #beta-dashboard #study-main .mail-compose {max-width:920px;}
 body.beta #beta-dashboard #study-main :is(.campus-compose-fab,.mail-compose-fab,.files-create-fab) {right:var(--desktop-right);bottom:max(28px,var(--app-safe-bottom,0px));width:50px;height:50px;min-height:50px;border-radius:17px;}
 body.beta #beta-dashboard #study-main>.campus-wall .campus-compose-fab {right:max(var(--desktop-right),calc(100vw - var(--desktop-left) - var(--desktop-rail) - var(--desktop-gap) - 840px));}
 body.beta #beta-dashboard #study-main .hm-shell {grid-template-columns:144px minmax(0,1fr);gap:24px;}
 body.beta #beta-dashboard #study-main .hm-nav {position:sticky;top:calc(var(--app-safe-top,0px) + 24px);align-self:start;}
 body.beta #beta-dashboard #study-main .hm-content {min-width:0;}
 body.beta #beta-dashboard #study-main .hm-overview {padding:24px;}
 body.beta #beta-dashboard #study-main .hm-reports-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
 body.beta #beta-dashboard #study-main :is(.grade-summary,.attendance-list) {gap:16px;}
 body.beta #beta-dashboard #study-main :is(.course-card,.rating-card,.files-card,.hm-card) {min-width:0;}
 body.beta #beta-dashboard #study-main :is(input,textarea,select) {max-width:100%;box-sizing:border-box;}
 body.beta #beta-dashboard #study-main .files-form :is(input:not([type=range]):not([type=checkbox]):not([type=radio]),textarea,select):focus-visible {outline:2px solid var(--ui-accent);outline-offset:2px;border-color:var(--ui-accent);box-shadow:none;}
 /* Headman's workspace has its own navigation, without the global rail/header. */
 body.beta #beta-app #beta-dashboard:has(.headman-page) .study-layout {max-width:1120px;margin-inline:auto;padding:calc(var(--app-safe-top,0px) + 24px) max(24px,var(--app-safe-right,0px)) max(48px,var(--app-safe-bottom,0px)) max(24px,var(--app-safe-left,0px));}
 body.beta #beta-dashboard:has(.headman-page) #study-main {max-width:none;padding:0;}
 body.beta #beta-dashboard #study-main .hm-workspace {box-sizing:border-box;width:100%;max-width:none;margin:0;padding:0;}
 body.beta #beta-dashboard #study-main .hm-workspace .hm-header {padding:0 0 16px;margin-bottom:24px;}
 body.beta #beta-dashboard #study-main .hm-section-title {justify-content:flex-start;gap:10px;}
 body.beta #beta-dashboard #study-main .hm-section-title h3 {margin-inline-end:auto;}
 body.beta #beta-dashboard #study-main .hm-delegates-list {margin-top:12px;}
}
@media(min-width:1000px) and (max-width:1199px) {
 body.beta :is(#beta-dashboard,.study-tour-app) {--desktop-rail:168px;--desktop-gap:24px;}
 body.beta #beta-dashboard #study-main .campus-wall>.mpei-home-art {display:block;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .schedule-columns {gap:16px;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .lesson-row {grid-template-columns:44px minmax(0,1fr);gap:10px;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .lesson-body {padding:14px;}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .lesson-subgroup-parts {grid-template-columns:minmax(0,1fr);}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .schedule-detail-panel .lesson-teacher-card:has(.lesson-write) {grid-template-columns:36px minmax(0,1fr);}
 body.beta :is(#beta-dashboard,.study-tour-app) #study-main .schedule-detail-panel .lesson-write {grid-column:2;grid-row:3;justify-self:start;margin-top:6px;}
 body.beta #beta-dashboard #study-main .hm-shell {grid-template-columns:minmax(0,1fr);}
 body.beta #beta-dashboard #study-main .hm-nav {position:static;display:flex;flex-direction:row;}
 body.beta #beta-dashboard #study-main .hm-reports-grid {grid-template-columns:minmax(0,1fr);}
}
