.spark-studio,.sound-settings{display:grid;gap:18px}.spark-pass{text-align:center;display:grid;justify-items:center;gap:14px;background:linear-gradient(135deg,#ede6ff,#f5ffd7);padding:22px;border-radius:24px;color:#361d91}.spark-pass img{max-width:100%;height:auto}.spark-pass strong{font-size:1.2rem;letter-spacing:.12em}.spark-actions,.call-controls{display:flex;gap:12px;flex-wrap:wrap;justify-content:center}.spark-actions button{flex:1}.spark-result{padding:16px;border-top:1px solid var(--border,#ddd)}.sound-toggle{display:flex;align-items:center;justify-content:space-between;gap:18px}.sound-toggle input{width:24px;height:24px;accent-color:#6236ff}.incoming-call,.call-error{position:fixed;z-index:1000;top:max(16px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:min(440px,calc(100vw - 24px));padding:24px;border-radius:24px;background:var(--mode-surface,#fff);box-shadow:0 12px 70px #0004;color:var(--mode-text,#222);text-align:center}.call-room{position:fixed;inset:0;z-index:1000;background:#171124;color:#fff;display:flex;flex-direction:column;padding:max(20px,env(safe-area-inset-top)) 20px max(24px,env(safe-area-inset-bottom));gap:16px;overflow:auto}.call-room header{display:flex;align-items:center;justify-content:space-between}.call-room h2,.incoming-call h2{margin:0}.call-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;flex:1;min-height:0}.call-person{position:relative;margin:0;min-height:150px;background:radial-gradient(circle,#6236ff44,#21162f);border-radius:24px;overflow:hidden}.call-person video{width:100%;height:100%;max-height:65vh;object-fit:cover}.call-person figcaption{position:absolute;bottom:12px;left:12px;padding:4px 10px;border-radius:20px;background:#0008;font-size:14px}.call-controls button{display:flex;gap:8px;align-items:center;justify-content:center;border:0;border-radius:99px;background:#ffffff20;color:inherit;padding:14px 18px;font:inherit;min-height:48px}.incoming-call .call-controls button{background:#ede8f8;color:#361d91}.call-controls .call-reject{background:#e74b61;color:#fff}.call-controls .call-answer{background:#d8ff62;color:#241b37}.call-privacy{font-size:12px;color:#c4b8d6;text-align:center;margin:0}.call-minimised{inset:auto 16px calc(86px + env(safe-area-inset-bottom)) auto;width:min(420px,calc(100vw - 32px));padding:16px;border-radius:24px;box-shadow:0 5px 40px #0005}.call-minimised .call-grid{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;overflow:hidden}.call-start{flex-shrink:0}.call-minimised .call-controls{gap:6px}.call-minimised .call-controls button{padding:10px}.call-room button:focus-visible,.incoming-call button:focus-visible{outline:3px solid #d8ff62;outline-offset:4px}@media(max-width:600px){.thread-header{gap:6px}.thread-header .thread-identity{min-width:0}.thread-header h2{font-size:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.thread-header .call-start{width:36px;min-width:36px;padding:6px}.thread-header .chat-avatar{display:none}.call-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.call-person{min-height:110px}.call-controls button{font-size:13px;padding:12px}.call-room{height:100dvh}.spark-pass{padding:16px}.spark-actions{width:100%}}

html.stu-native .topbar{padding-top:var(--native-inset-top,env(safe-area-inset-top,0px))}html.stu-native .mobile-nav{padding-bottom:var(--native-inset-bottom,env(safe-area-inset-bottom,0px))}html.stu-native .welcome,html.stu-native .setup-shell,html.stu-native .restriction-environment{padding-top:max(20px,var(--native-inset-top,env(safe-area-inset-top,0px)));padding-bottom:max(20px,var(--native-inset-bottom,env(safe-area-inset-bottom,0px)))}html.stu-native .call-room{padding-top:max(20px,var(--native-inset-top,env(safe-area-inset-top,0px)));padding-bottom:max(20px,var(--native-inset-bottom,env(safe-area-inset-bottom,0px)))}

.call-person video{position:absolute;inset:0}.call-grid{grid-auto-rows:minmax(0,1fr)}.call-report{text-align:center;font-size:12px}.call-report button{color:inherit}.call-report form{display:grid;gap:8px;max-width:440px;margin:8px auto}.call-report textarea{display:block;width:100%;color:#201a35;background:#fff;padding:10px;border-radius:12px}.call-report .text-link{min-height:32px;color:#d8ff62}@media(max-width:600px){.call-grid:has(.call-person:nth-child(5)){grid-template-columns:repeat(3,minmax(0,1fr))}.call-grid:has(.call-person:nth-child(5)) .call-person{min-height:80px}.call-person figcaption{font-size:11px;max-width:90%;left:5px;bottom:5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}}
.spark-studio .spark-pass img{width:260px;max-width:100%;height:auto}
@media(max-width:600px){.spark-studio{gap:12px}.spark-studio>p{margin:0;font-size:13px;line-height:1.5}.spark-studio .spark-pass{padding:12px;gap:8px}.spark-studio .spark-pass img{width:180px}.spark-studio .spark-pass strong{font-size:15px;letter-spacing:.08em}.spark-studio form{display:flex;align-items:end;gap:10px}.spark-studio form .field{flex:1;min-width:0;margin:0}.spark-studio form button{flex-shrink:0}.spark-studio .spark-actions button{white-space:nowrap}}

/* Contain browser rubber-banding while preserving intentional local scrolling. */
html,body{overscroll-behavior:none}body{overflow-x:clip}*{scrollbar-width:thin;scrollbar-color:#a899bd66 transparent}::-webkit-scrollbar{width:5px;height:5px}::-webkit-scrollbar-thumb{background:#a899bd66;border-radius:20px}::-webkit-scrollbar-track{background:transparent}
html.stu-native .topbar{padding-top:calc(12px + var(--native-inset-top,env(safe-area-inset-top,0px)));height:auto;min-height:calc(64px + var(--native-inset-top,env(safe-area-inset-top,0px)))}
html.stu-native .thread-header{padding-top:calc(12px + var(--native-inset-top,env(safe-area-inset-top,0px)))}
html.stu-native .welcome,html.stu-native .setup-shell,html.stu-native .restriction-environment,html.stu-native .call-room:not(.call-minimised),html.stu-native .incoming-personal{padding-top:calc(20px + var(--native-inset-top,env(safe-area-inset-top,0px)))}
@media(prefers-reduced-motion:no-preference){button:active,.person-card:active{animation:stu-tap .22s ease-out}@keyframes stu-tap{50%{transform:scale(.97)}}}
.message-bubble.message-visual{padding:0!important;background:transparent!important;border:0!important;box-shadow:none;overflow:hidden;border-radius:15px!important;width:min(300px,80vw)}.message-visual .chat-media{padding:0;margin:0}.message-visual .chat-media img,.message-visual .chat-media video{width:100%;max-height:360px;object-fit:cover;display:block;border-radius:15px}.message-visual>.markdown-text,.message-visual>p{padding:9px 12px;background:var(--mode-surface,#fffdf8)}.message-visual .message-meta{padding:4px 8px;background:var(--mode-surface,#fffdf8);margin:0}.message-visual>.message-author{padding:7px 10px;background:var(--mode-surface,#fffdf8)}

.message-bubble.message-profile{padding:0!important;background:var(--mode-surface,#fffdf8)!important;overflow:hidden;width:min(295px,80vw);border:1px solid var(--mode-line,#e6deeb);border-radius:16px!important}.message-profile .shared-profile-card{display:block;width:100%;padding:0;background:none!important;border:0;border-radius:0;box-shadow:none;text-align:left}.shared-profile-hero{height:105px;position:relative;padding:14px 16px;display:flex;align-items:center;gap:12px}.shared-profile-hero>.stu-avatar{width:72px;height:72px;flex:0 0 72px;overflow:hidden;box-shadow:none}.shared-profile-hero>span:last-child{font:17px/1.3 var(--font-display,inherit);color:#463257;max-width:130px}.shared-profile-card>.shared-profile-hero+span{display:block;padding:14px 16px 10px}.shared-profile-card>span>small{font-size:8px;letter-spacing:.8px;color:var(--mode-muted,#796e83)}.shared-profile-card>span>strong{display:block;font-size:21px;line-height:1.3;margin:7px 0}.shared-profile-card p{font-size:12px;margin:9px 0 0;line-height:1.5}.shared-profile-interests{display:flex;gap:5px;flex-wrap:wrap;margin:9px 0}.shared-profile-interests span{font-size:9px;border-radius:12px;padding:4px 7px;background:var(--mode-soft,#eee8f5)}.message-profile>.message-meta{padding:2px 12px 7px;margin:0}.message-profile>.message-author{padding:8px 12px;margin:0}

html.stu-native body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}html.stu-native input,html.stu-native textarea,html.stu-native [contenteditable="true"]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}html.stu-native img{-webkit-user-drag:none}.device-setup,.device-health{padding:20px;border:1px solid var(--border,#e4ddec);border-radius:20px;background:var(--mode-surface,#fff)}.device-setup h3,.device-health h3{margin:0 0 10px}.device-actions{display:flex;flex-wrap:wrap;gap:10px}.device-actions button{flex:1 1 140px;min-height:44px}.device-state{font-weight:600}.device-permissions{display:grid;gap:8px}.device-permissions div{display:flex;justify-content:space-between;gap:12px}.device-permissions dt{text-transform:capitalize}.device-permissions dd{margin:0}.device-report{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;max-height:260px;overflow:auto;padding:14px;background:var(--mode-background,#f8f5fc);border-radius:12px}.device-health summary{cursor:pointer;padding:14px 0;font-weight:600}.device-checks p{font-size:13px;margin:8px 0}.call-controls button:disabled{opacity:.6}@media(max-width:600px){.device-setup,.device-health{padding:16px}.device-actions button{font-size:13px}}

.sound-settings [hidden]{display:none!important}.device-tabs{display:flex;gap:6px;padding:5px;border-radius:16px;background:var(--mode-background,#eee9fa)}.device-tabs button{flex:1;min-height:44px;border:0;background:transparent;border-radius:12px;font:600 13px inherit;color:inherit}.device-tabs button[aria-selected="true"]{background:var(--mode-surface,#fff);color:var(--stu-purple,#633cff);box-shadow:0 2px 8px #29223712}.device-preferences{display:grid;gap:18px}
