/* One full-height application, with a movable companion above it. */
.study-intro{position:fixed;inset:0;margin:0;border:0;border-radius:0;width:100%;max-width:none;height:var(--app-viewport-height,100dvh);max-height:none;padding:var(--app-safe-top,env(safe-area-inset-top,0px)) var(--app-safe-right,0px) var(--app-safe-bottom,env(safe-area-inset-bottom,0px)) var(--app-safe-left,0px);background:#fff;color:#17243b;color-scheme:light;overflow:hidden;font-family:inherit;box-sizing:border-box}
.study-intro[open]{display:flex}.study-intro *{box-sizing:border-box}.study-intro::backdrop{background:#fff}.study-intro [hidden]{display:none!important}.study-intro button{font:inherit;cursor:pointer}.study-intro button:focus-visible{outline:2px solid #1557ff;outline-offset:3px}
.study-intro-stage{position:relative;flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;padding:44px 0 0;overflow:hidden}
.study-intro-brand{position:absolute;left:16px;top:12px;font-size:16px;font-weight:750;color:#1557ff;letter-spacing:-.6px}
.study-intro-skip{position:absolute;right:12px;top:calc(var(--app-safe-top,env(safe-area-inset-top,0px)) + 3px);z-index:12;min-height:40px;border:0;background:white;border-radius:12px;color:#66738b;padding:8px 12px;font-size:12px!important}
.study-coach{position:relative;z-index:10;width:min(340px,calc(100% - 24px));margin:auto;display:flex;flex-direction:column;align-items:center;gap:10px;max-height:100%;transition:none}
.study-intro-bubble{width:100%;min-width:0;padding:14px;border:1px solid #e4eaf5;border-radius:20px;background:#fff;box-shadow:0 10px 35px #193c7412;overflow:auto}
.study-coach-grip{display:block;border:0;background:none;color:#1557ff;font-size:10px!important;font-weight:700!important;letter-spacing:.6px;padding:0 0 8px;touch-action:none;cursor:grab!important}
.study-intro h2{font-size:21px;line-height:1.2;letter-spacing:-.5px;margin:0 0 8px}.study-intro-text{font-size:13px;line-height:1.45;margin:0;color:#5d6980}
.study-intro-actor{width:150px;height:140px;flex:none;border:0;background:transparent;padding:0;touch-action:none;cursor:grab!important;filter:drop-shadow(0 12px 12px #1557ff15)}
.study-pet{width:100%;height:100%;overflow:visible;pointer-events:none}.study-pet-body{transform-origin:center;animation:study-breathe 3s ease-in-out infinite}.study-pet-eyes{transform-origin:80px 73px;animation:study-blink 5s infinite}.study-pet-smile{opacity:0;transition:opacity .2s}
.study-intro[data-scene="0"] .study-intro-actor{animation:study-appear 1.2s cubic-bezier(.2,.8,.2,1) both}
.study-intro[data-emotion="happy"] .study-pet-smile,.study-intro[data-emotion="excited"] .study-pet-smile{opacity:1}.study-intro[data-emotion="sleepy"] .study-pet-eyes{transform:scaleY(.3);animation:none}.study-intro[data-emotion="curious"] .study-pet-eyes{transform:translateX(7px)}
.study-intro-controls{margin-top:12px}.study-intro-actions{display:flex;gap:6px}.study-intro-actions button{min-height:40px;border:0;border-radius:10px;padding:8px 12px;font-size:12px;font-weight:650}.study-intro-next{flex:1;background:#1557ff;color:#fff}.study-intro-back{background:#f1f4fa;color:#526078}
.study-intro-choices{display:grid;gap:6px}.study-intro-choices button{display:flex;align-items:center;gap:8px;border:1px solid #e0e7f4;border-radius:10px;background:#fff;color:#223454;padding:10px;min-height:42px;font-size:12px;text-align:left}.study-intro-choices span{color:#7c8ba5;font-size:10px}.study-intro-choices b{margin-left:auto;color:#1557ff}
.study-intro-progress{font-size:10px;color:#8691a3;margin:6px 0 0;text-align:center}.study-intro-reaction{font-size:12px;line-height:1.4;color:#1557ff;margin:0 0 8px}.study-intro-reaction:empty{display:none}
.study-intro-details,.study-intro-spark,.study-intro-orbit,.study-intro-dots{display:none}
.study-intro-wall{flex:1;min-height:0;width:100%;display:flex;margin:0;animation:study-screen-in .6s ease both}
.study-tour-app{position:relative;isolation:isolate;overflow:auto;overscroll-behavior:contain;flex:1;width:100%;min-height:0;max-height:none;background:var(--bg,#fff);color:var(--text,#17243b);padding:0 12px;scroll-padding:180px 0;--app-safe-top:0px;--app-safe-bottom:0px;--app-safe-left:0px;--app-safe-right:0px}
/* Mobile practice uses its own scrollable wall; desktop uses the cabinet rail. */
@media(max-width:999px){
 .study-tour-app .study-layout{display:flex;flex-direction:column;padding:0!important;margin:0!important}
 .study-tour-app .study-main{padding:0 0 16px!important;margin:0!important;min-width:0;flex:1}
 .study-tour-app .study-nav{position:relative!important;inset:auto!important;transform:none!important;width:100%!important;max-width:none!important;margin:0!important;flex:none}
}
.study-tour-app .study-footer,.study-tour-app .campus-file-label,.study-tour-app [data-campus="banner-edit"],.study-tour-app [data-campus="avatar-edit"]{display:none!important}
.study-tour-app .campus-modal-backdrop{position:absolute!important;inset:0!important}.study-tour-app .campus-settings-window{max-height:100%}.study-tour-app .campus-profile-hero{padding-top:0!important}
.study-intro.is-tour .study-coach{position:fixed;flex-direction:row;align-items:flex-start;gap:6px;margin:0;width:min(338px,calc(100vw - 24px));max-height:calc(100dvh - var(--app-safe-top,0px) - var(--app-safe-bottom,0px) - 64px)}
.study-intro.is-tour .study-intro-actor{width:46px;height:48px;margin-top:12px}.study-intro.is-tour .study-intro-bubble{flex:1;border-color:#d9e5ff;padding:11px;max-height:inherit}.study-intro.is-tour h2{font-size:14px;line-height:1.3;margin-bottom:5px}.study-intro.is-tour .study-intro-text{font-size:12px}.study-intro.is-tour .study-intro-controls{margin-top:9px}
.study-coach.is-dragging{transition:none!important}.study-guide-target{outline:2px solid #1557ff!important;outline-offset:2px;box-shadow:0 0 0 5px #1557ff12!important;border-radius:10px}
.study-tour-app [data-campus-form="profile"] .campus-public-person,.study-tour-app [data-campus-form="profile"] label:has([name="bio"]),.study-tour-app [data-campus-form="profile"] > button[type="submit"],.study-tour-app [data-campus-form="profile"] > .campus-muted{display:none}
@keyframes study-appear{0%{opacity:0;transform:scale(.05) translateY(70px)}50%{opacity:1;transform:scale(1.1,.9) rotate(-9deg)}75%{transform:scale(.97,1.04) rotate(7deg)}100%{transform:none}}
@keyframes study-breathe{50%{transform:translateY(-5px) rotate(2deg)}}@keyframes study-blink{0%,43%,47%,100%{transform:scaleY(1)}45%{transform:scaleY(.08)}}@keyframes study-screen-in{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none}}
@media(min-width:700px){.study-intro-stage{max-width:660px;margin:0 auto}.study-intro.is-tour .study-coach{width:338px}}
@media(max-height:570px){.study-intro:not(.is-tour) .study-coach{flex-direction:row}.study-intro:not(.is-tour) .study-intro-actor{width:65px;height:65px}.study-intro h2{font-size:17px}}
@media(prefers-reduced-motion:reduce){.study-intro *{animation:none!important;transition:none!important}}.is-background *{animation-play-state:paused!important}
/* Fixed overlays do not inherit the cabinet's safe padding. */
@media(max-width:999px){body.beta.telegram-display #beta-app{padding-left:max(16px,var(--app-safe-left))!important;padding-right:max(16px,var(--app-safe-right))!important;padding-top:max(12px,var(--app-safe-top))!important}}
body.beta.telegram-display .campus-modal-backdrop{padding:var(--app-safe-top) var(--app-safe-right) var(--app-safe-bottom) var(--app-safe-left);box-sizing:border-box}
body.beta.telegram-display .campus-settings-window{max-height:calc(100dvh - var(--app-safe-top) - var(--app-safe-bottom) - 24px)}
@media(max-width:1173px){body.beta.telegram-display .study-nav{padding-left:max(10px,var(--app-safe-left));padding-right:max(10px,var(--app-safe-right));box-sizing:border-box}}
@media(min-width:1000px){body.beta.telegram-display #beta-app:not(:has(> #beta-dashboard:not([hidden]))){padding:max(36px,var(--app-safe-top)) max(16px,var(--app-safe-right)) 0 max(16px,var(--app-safe-left))}}
@media(min-width:1174px){body.beta.telegram-display .study-nav{top:calc(160px + var(--app-safe-top))}}

.study-tour-app{display:flex;flex-direction:column;overflow:hidden}
.study-tour-app .study-layout{flex:1;min-height:0!important;overflow:auto;scroll-padding:180px 0 100px}

/* Small, explicit controls beside the companion, not a second navigation bar. */
.study-intro .study-coach-grip{min-height:24px;padding:0;width:28px;float:right;line-height:24px;color:#8090ac;font-size:18px!important}
.study-intro .study-intro-actions button{min-height:36px;padding:6px 10px;line-height:20px}
.study-intro .study-intro-next{background:#1557ff;color:white}.study-intro .study-intro-back{background:#f1f4fa;color:#526078}
.study-intro.is-tour .study-intro-progress{display:none}.study-intro.is-tour .study-intro-controls{margin-top:6px}
.study-intro.is-section .study-intro-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:center}
.study-intro.is-section .study-intro-reaction{grid-column:1/-1}
.study-intro.is-section .study-intro-progress{display:block;grid-column:1;grid-row:2;text-align:left;color:var(--ui-muted);margin:0;font-size:11px}
.study-intro.is-section .study-intro-actions{grid-column:2;grid-row:2;justify-content:flex-end}
.study-intro.is-section .study-intro-actions button{flex:none;min-height:44px;min-width:44px;padding:6px;font-size:12px}
.study-intro.is-section .study-intro-actions .study-intro-back{font-size:20px}
.study-intro.is-tour .study-intro-bubble{padding:10px}.study-intro.is-tour h2{font-size:13px}.study-intro.is-tour .study-intro-text{font-size:12px}
.study-intro[data-emotion="impatient"] .study-pet-eyes{transform:scaleY(.55) rotate(-5deg);animation:none}
.study-tour-app input[aria-invalid=true]{outline:2px solid #ef9a39;outline-offset:2px}
.study-intro:not(.is-tour) .study-intro-progress{margin:14px 0 3px;line-height:1.4}
.study-intro.is-tour .study-intro-controls{margin-top:12px}

.study-intro-text{position:relative}.study-speech-full{opacity:0}.study-speech-ink{position:absolute;inset:0;pointer-events:none}

.study-pet-body>path:first-child{transition:fill .28s ease}.study-pet-eyes{transition:transform .28s ease}
@media(prefers-reduced-motion:reduce){.study-pet-body>path:first-child,.study-pet-eyes{transition:none}}

.study-tour-app{position:relative}.study-tour-detour{position:absolute;inset:0;z-index:5;background:#fff;padding:80px 24px 24px;text-align:center;color:#172239}.study-tour-detour h2{font-size:24px}.study-tour-detour p{color:#64718b;font-size:15px}.study-tour-detour button{margin-top:20px}
.study-tour-app>[inert]{visibility:hidden}

/* Compact first encounter leaves room to drag the companion on a phone. */
.study-intro:not(.is-tour) .study-coach{width:min(266px,calc(100% - 56px));gap:7px}
.study-intro:not(.is-tour) .study-intro-actor{width:98px;height:94px}
.study-intro:not(.is-tour) .study-intro-bubble{padding:12px;border-radius:18px}
.study-intro:not(.is-tour) h2{font-size:18px;line-height:1.2;margin-bottom:6px;padding-right:19px}
.study-intro:not(.is-tour) .study-intro-text{font-size:12px;line-height:1.4}
.study-intro:not(.is-tour) .study-intro-progress{display:none}
.study-coach,.study-coach-grip,.study-intro-actor{touch-action:none;user-select:none;-webkit-user-select:none;overscroll-behavior:none}
.study-intro,.study-intro-stage{overscroll-behavior:none}
.study-intro .study-intro-actions button:disabled{cursor:default;opacity:.55}

/* The tour has an isolated light palette, even when the app uses a saved dark theme. */
.study-intro{
 --ui-bg:#fff;--ui-surface:#fff;--ui-soft:#f2f4f8;
 --ui-text:#182033;--ui-muted:#626f85;--ui-border:#e3e7ef;
 --ui-accent:#2449df;--ui-accent-soft:#edf1ff;--ui-on-accent:#fff;
 --ui-success-bg:#e5f5ed;--ui-success:#246749;--ui-warning-bg:#fff3e1;--ui-warning:#82560e;
 --ui-danger-bg:#ffebef;--ui-danger:#a12e45;
 --ink:var(--ui-text);--muted:var(--ui-muted);--blue:var(--ui-accent);
 --page:#fff;--surface:var(--ui-soft);--line:var(--ui-border);--bg:#fff;--text:var(--ui-text);
}
/* The practice cabinet uses the application's light canvas behind its white cards. */
.study-tour-app{--ui-bg:#f5f6fa;--page:var(--ui-bg);--bg:var(--ui-bg);--surface:var(--ui-surface)}
/* One aligned brand and Skip; account controls belong to the actual application. */
.study-intro.is-tour .study-intro-brand{display:none}
.study-intro.is-tour .study-intro-stage{padding-top:0}
@media(max-width:999px){
 .study-intro.is-tour .study-tour-app .study-top{position:sticky!important;top:0;z-index:3;min-height:44px;padding:6px 94px 6px 0!important;background:#fff;gap:8px}
}
@media(min-width:1000px){
 .study-intro.is-tour .study-intro-stage{max-width:none;margin:0}
 .study-tour-app{contain:layout;padding:0}
 .study-intro.is-tour .astra-desktop-tagline{display:none}
 .study-intro.is-tour .study-intro-skip{right:max(24px,calc((100vw - 1280px)/2))}
}
.study-intro.is-tour .study-top-actions{display:none!important}
.study-intro.is-tour .study-top .study-brand{width:auto;display:flex;align-items:baseline;justify-content:flex-start;gap:10px;white-space:nowrap;min-height:0}
.study-intro.is-tour .study-top .study-wordmark{font-size:20px;line-height:1.2;color:#1557ff}
.study-intro.is-tour .study-top .study-institution{font-size:13px;line-height:1.2;margin:0;padding-left:10px;color:#626f85;align-self:baseline}
.study-intro.is-tour .study-intro-skip{font-size:12px;min-height:44px;padding:8px}
.study-mode-choice{width:100%;max-width:680px;margin:0 auto;padding:22px 20px 12px;box-sizing:border-box;color:#192237}
.study-mode-eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:650;color:#8b94a5;margin:0 0 12px}
.study-intro .study-mode-choice h2{font-size:32px;line-height:1.1;letter-spacing:-1.2px;margin:0 0 10px}
.study-mode-lead{font-size:14px;line-height:1.5;color:#758097;margin:0 0 20px}
.study-mode-choice fieldset{border:0;margin:0;padding:0;display:grid;gap:10px}
.study-mode-card{display:block;position:relative;cursor:pointer}
.study-mode-card input,.study-mode-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.study-mode-card-body{display:flex;flex-direction:column;gap:7px;border:1px solid #e4e7ee;border-radius:22px;padding:16px 18px;background:#fff;transition:background .18s,border-color .18s}
.study-mode-card input:checked + .study-mode-card-body{border-color:#1557ff;background:#f4f7ff;box-shadow:0 0 0 1px #1557ff}
.study-mode-card input:focus-visible + .study-mode-card-body{outline:3px solid #1557ff;outline-offset:3px}
.study-mode-card input:disabled + .study-mode-card-body{opacity:.65;cursor:wait}
.study-mode-card-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:2px}
.study-mode-icon{display:grid;place-items:center;color:#66748d}.study-mode-icon svg{width:25px;height:25px}
.study-mode-radio{width:18px;height:18px;box-sizing:border-box;border:1.5px solid #c8ceda;border-radius:50%}
.study-mode-card input:checked + span .study-mode-radio{border:5px solid #1557ff;background:white}
.study-mode-card input:checked + span .study-mode-icon{color:#1557ff}
.study-mode-card strong{font-size:18px;letter-spacing:-.4px;line-height:1.25}
.study-mode-caption{font-size:12px;color:#788398;margin-bottom:5px}
.study-mode-benefit{font-size:12px;line-height:1.5;display:flex;gap:8px}
.study-mode-benefit:before{content:'✓';color:#1557ff;flex:none}
.study-mode-note{font-size:11px;line-height:1.5;color:#7b8597;margin-top:4px}
.study-mode-footnote{font-size:11px;line-height:1.5;color:#8a93a2;text-align:center;margin:14px 8px 0}
.study-intro.is-mode-choice .study-intro-stage{overflow:auto;display:block;padding-top:50px;max-width:none;scrollbar-width:thin}
.study-intro.is-mode-choice .study-coach{position:relative;inset:auto;width:100%;max-width:680px;max-height:none;margin:0 auto;padding:14px 20px 20px;box-sizing:border-box;display:flex;flex-direction:row;align-items:center;gap:12px}
.study-intro.is-mode-choice .study-mode-choice{order:-1}
.study-intro.is-mode-choice .study-intro-bubble{box-shadow:none;border:0;padding:0;overflow:visible;background:transparent}
.study-intro.is-mode-choice .study-intro-actor{width:54px;height:54px;margin:0;pointer-events:none}
.study-intro.is-mode-choice .study-coach-grip,.study-intro.is-mode-choice .study-intro-progress,.study-intro.is-mode-choice .study-intro-reaction{display:none}
.study-intro.is-mode-choice .study-intro-bubble h2{font-size:13px;margin:0 0 3px}
.study-intro.is-mode-choice .study-intro-text{font-size:12px}
.study-intro.is-mode-choice .study-intro-controls{margin-top:10px}
.study-intro.is-mode-choice .study-intro-actions button{min-height:44px;border-radius:14px;font-size:13px}
@media(min-width:620px){.study-mode-choice fieldset{grid-template-columns:1fr 1fr;gap:16px}.study-mode-card-body{height:100%;box-sizing:border-box;padding:22px}.study-mode-note{margin-top:auto;padding-top:14px}.study-intro .study-mode-choice h2{font-size:42px}.study-mode-choice{padding-top:50px}.study-intro.is-mode-choice .study-coach{padding-top:24px}}
.study-mode-choice .study-mode-lead{margin-bottom:20px}
.study-mode-choice .study-mode-footnote{margin-top:14px}
.study-intro.is-mode-choice .study-intro-brand{display:block}
/* Keep the mode actions full-width and clear of Telegram's bottom safe area. */
.study-intro.is-mode-choice .study-coach{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;padding-bottom:max(28px,env(safe-area-inset-bottom));gap:10px 12px}
.study-intro.is-mode-choice .study-intro-actor{grid-column:1;grid-row:1;width:48px;height:48px}
.study-intro.is-mode-choice .study-intro-bubble{display:contents}
.study-intro.is-mode-choice .study-intro-bubble h2{grid-column:2;grid-row:1;align-self:start;margin-top:3px}
.study-intro.is-mode-choice .study-intro-text{grid-column:2;grid-row:1;align-self:end;margin:22px 0 0}
.study-intro.is-mode-choice .study-intro-controls{grid-column:1/-1;margin-top:8px}
.study-intro.is-mode-choice .study-intro-actions{display:grid;grid-template-columns:92px minmax(0,1fr);gap:10px}
.study-intro.is-mode-choice .study-intro-actions button{width:100%;min-height:48px;padding:12px;font-size:14px}

/* Keep the final action clear of Telegram's rounded sheet edge. */
.study-intro.is-mode-choice .study-intro-stage{padding-bottom:24px;scroll-padding-bottom:24px}
@media(max-width:1173px){
 body:has(input:focus,textarea:focus,[contenteditable="true"]:focus) .study-nav,
 body:has(input:focus,textarea:focus,[contenteditable="true"]:focus) .campus-compose-fab{display:none!important}
}

/* One scroll container: the action row remains in document flow to the very end. */
.study-intro.is-mode-choice[open]{display:block;overflow-y:auto;overscroll-behavior:contain;scroll-padding-bottom:32px}
.study-intro.is-mode-choice .study-intro-stage{display:block;overflow:visible;min-height:100%;height:auto;padding:50px 0 max(36px,var(--app-safe-bottom,env(safe-area-inset-bottom,0px)))}
.study-intro.is-mode-choice .study-coach{position:relative!important;inset:auto!important;transform:none!important;max-height:none;flex-shrink:0;padding-bottom:20px}
.study-intro.is-mode-choice .study-intro-controls{overflow:visible;padding-bottom:4px}

/* A short landscape window has room beside the practice screen for the hint. */
@media (min-width: 540px) and (max-height: 600px) and (orientation: landscape) {
 .study-intro.is-section .study-intro-stage { --guide-rail:clamp(208px,30vw,288px);max-width:none;margin:0 }
 .study-intro.is-section .study-intro-wall { width:calc(100% - var(--guide-rail)) }
 .study-intro.is-section .study-coach { display:block;width:calc(var(--guide-rail) - 16px) }
 .study-intro.is-section .study-intro-actor { position:absolute;top:8px;left:8px;width:30px;height:28px;margin:0 }
 .study-intro.is-section .study-intro-bubble h2 { padding-inline-start:32px;min-height:25px }
 .study-intro.is-section .study-intro-bubble { max-height:inherit }
}
@media (min-width:540px) and (max-width:699px) and (max-height:420px) {
 .study-intro.is-section .files-group-destinations { display:flex;flex-direction:column;gap:4px }
 body.beta .study-intro.is-section .files-group-destinations > .files-group-panel { display:grid;grid-template-columns:32px minmax(0,1fr);align-content:center;column-gap:8px;row-gap:0;min-height:44px;padding:4px 8px }
 .study-tour-app .files-group-panel .files-panel-icon { grid-column:1;grid-row:1 / 3;width:28px;height:28px }
 .study-tour-app .files-group-panel :is(strong,small) { grid-column:2 }
}
