/* Shared language control: always in the upper-right of the page header. */
header:has(>.language-switch){position:relative;padding-right:148px;min-height:76px}
header>.language-switch{position:absolute;top:22px;right:24px}
.language-switch{display:inline-flex!important;align-items:center;justify-content:center;gap:8px;width:auto!important;min-height:38px;margin:0!important;padding:8px 12px!important;border:1px solid var(--theme-border-d8e5df,#d8e5df)!important;border-radius:9px!important;background:var(--theme-background-ffffff,#fff)!important;color:var(--theme-color-245f51,#245f51)!important;font:500 13px/1.4 Inter,"Segoe UI","Microsoft YaHei",sans-serif!important;white-space:nowrap;cursor:pointer}
.language-switch svg{width:18px;height:18px;flex:none}.language-switch:focus-visible{outline:3px solid #bb8e42;outline-offset:3px}
@media(max-width:600px){header:has(>.language-switch){padding-right:130px}header>.language-switch{right:16px;top:18px}}

#app>.top:has(>.language-switch){padding-right:148px;min-height:76px}@media(max-width:820px){#app>.top:has(>.language-switch){padding-right:16px;min-height:76px}#app>.top:has(>.language-switch)>div:first-child{padding-right:120px;min-height:42px;width:100%}}

.classroom-invitation{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border:1px solid var(--theme-border-d8e5df,#d8e5df);border-radius:9px;background:var(--theme-background-ffffff,white);color:var(--theme-color-245f51,#245f51);text-decoration:none}.classroom-invitation svg{width:22px;height:22px}.classroom-invitation:focus-visible{outline:3px solid #bb8e42;outline-offset:3px}header>.classroom-invitation{position:absolute;right:132px;top:22px}header:has(>.classroom-invitation),#app>.top:has(>.classroom-invitation){padding-right:190px}@media(max-width:820px){#app>.top:has(>.classroom-invitation){padding-right:16px}#app>.top:has(>.classroom-invitation)>div:first-child{padding-right:170px}}@media(max-width:600px){header>.classroom-invitation{right:124px;top:18px}header:has(>.classroom-invitation){padding-right:180px}}

/* One compact header shared by learning, presentation and hosting pages. */
header:has(.language-switch),#app>.top:has(>.language-switch),#app:has(.classroom)>.top{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:6px;min-height:44px;height:44px;padding:4px 12px}
header>.language-switch,header>.classroom-invitation{position:static;flex:none;order:10;margin:0}
header>.language-switch{order:11}
header .language-switch{width:34px!important;height:34px;min-height:34px;padding:7px!important;gap:0}
header .language-switch span{display:none}
header>.classroom-invitation{width:34px;height:34px}
header .header-icon{display:inline-flex;align-items:center;justify-content:center;flex:none;width:34px;height:34px;min-height:34px;padding:7px;border:1px solid transparent;border-radius:7px;text-decoration:none;line-height:1;background:transparent;color:inherit}
header .header-icon:hover{background:var(--theme-background-e8f0ed,#e8f0ed);border-color:var(--theme-bordercolor-cbdcd6,#cbdcd6)}header .header-icon:focus-visible{outline:2px solid #bb8e42;outline-offset:-2px}header .header-icon svg{width:19px;height:19px;flex:none}
#app>.top:has(>.language-switch)>div:first-child{padding:0;min-height:0;width:auto;flex:1 1 180px;min-width:50px;overflow:hidden}
#app>.top .eyebrow,#app>.top .user-name{display:none}#app>.top h1{font-size:15px;line-height:1.3;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
header>.actions,#app>.top>.actions,header>nav:not(.breadcrumbs){width:auto;min-width:0;flex:0 1 auto;flex-wrap:nowrap;gap:3px;margin:0;padding:0;overflow-x:auto;scrollbar-width:none}
header .brand{font-size:18px;white-space:nowrap;margin-right:auto}header .brand span{font-size:13px}
header.ppt-top{overflow:hidden}header.ppt-top>.ppt-navigation{min-width:80px;flex:1 1 200px;gap:6px}header.ppt-top .ppt-navigation select{min-width:70px;height:32px;min-height:32px;padding:3px;font-size:12px}header.ppt-top .ppt-navigation label{margin:0;font-size:11px}header.ppt-top .ppt-navigation input{width:52px}header.ppt-top>.actions{flex:0 1 auto}header.ppt-top>.actions>.small{max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}
@media(max-width:820px){header:has(.language-switch),#app>.top:has(>.language-switch),#app:has(.classroom)>.top{height:48px;min-height:48px;padding:4px 6px;gap:3px}header .header-icon,header .language-switch,header>.classroom-invitation{width:40px!important;height:40px;min-height:40px}#app>.top:has(>.language-switch)>div:first-child{padding:0;min-width:48px;flex:1 1 90px}header.ppt-top>div:first-child{min-width:50px;flex:0 1 90px}header.ppt-top .ppt-navigation label{display:none}header.ppt-top>.ppt-navigation{flex:1 1 100px}header.ppt-top>.actions>.small{display:none}header .brand span{display:none}}

/* Shared immediate tooltips and explicit light/dark themes. */
.instant-tool-tip{position:fixed!important;inset:auto;margin:0;padding:9px 13px;border:1px solid #555;border-radius:6px;background:#242424;color:#fff;box-shadow:0 5px 18px #0005;font:600 15px/1.45 Inter,"Segoe UI","Microsoft YaHei",sans-serif;max-width:min(320px,calc(100vw - 16px));width:max-content;overflow:visible;overflow-wrap:anywhere;pointer-events:none;z-index:2147483647;opacity:1;animation:none!important;transition:none!important}
.instant-tool-tip::before{content:"";position:absolute;left:var(--tip-arrow,50%);width:9px;height:9px;background:#242424;transform:translateX(-50%) rotate(45deg)}
.instant-tool-tip[data-side=bottom]::before{top:-5px}.instant-tool-tip[data-side=top]::before{bottom:-5px}
.theme-switch{display:inline-flex!important;align-items:center;justify-content:center;flex:none;width:34px;height:34px;padding:7px!important;color:var(--ink);background:transparent;border:1px solid var(--line);border-radius:7px}.theme-switch svg{width:19px;height:19px}.theme-switch:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
:root[data-theme=light]{color-scheme:light}
:root[data-theme=dark]{color-scheme:dark;--bg:#0f1723;--paper:#172334;--ink:#e6edf7;--muted:#aab9ce;--line:#40516a;--blue:#79b5ff;--soft:#223b57;--amber:#f0c36b;--green:#80d6ad;--shadow:0 8px 35px #0005;--theme-background-ffffff:#172334;--theme-color-b12e35:#dce7f5;--theme-background-fff3dd:#223147;--theme-background-e8f6ee:#223147;--theme-background-fff8e9:#172334;--theme-background-f8faff:#172334;--theme-background-f1f5ff:#172334;--theme-color-405477:#dce7f5;--theme-border-d6e0f6:#40516a;--theme-background-eaf0ff:#223147;--theme-color-285ac9:#dce7f5;--theme-background-edf3ff:#223147;--theme-border-b9ccef:#40516a;--theme-background-ffe39c:#223147;--theme-color-182744:#dce7f5;--theme-background-fff3d5:#223147;--theme-color-805b14:#dce7f5;--theme-color-2455bc:#dce7f5;--theme-bordercolor-9eb6ed:#40516a;--theme-background-f5f7fb:#172334;--theme-color-285ba8:#dce7f5;--theme-background-e8effc:#223147;--theme-background-f0f5ff:#223147;--theme-color-244e87:#dce7f5;--theme-background-fff8f0:#172334;--theme-color-ac4d2a:#dce7f5;--theme-background-fffaf4:#172334;--theme-bordercolor-f0ddc4:#40516a;--theme-color-b85b2b:#dce7f5;--theme-background-edf1f7:#223147;--theme-background-f1f4f9:#223147;--theme-color-64738b:#dce7f5;--theme-color-183c72:#dce7f5;--theme-background-f9d5b7:#223147;--theme-color-874122:#dce7f5;--theme-color-492411:#dce7f5;--theme-color-8793a5:#dce7f5;--theme-color-345b85:#dce7f5;--theme-color-42536b:#dce7f5;--theme-border-d4e2f9:#40516a;--theme-background-edf4ff:#223147;--theme-background-f4f2ff:#223147;--theme-color-264a7a:#dce7f5;--theme-background-fff5e8:#172334;--theme-background-f5f4ff:#172334;--theme-bordercolor-ecdcc6:#40516a;--theme-border-d8e5df:#40516a;--theme-color-245f51:#dce7f5;--theme-background-e8f0ed:#223147;--theme-bordercolor-cbdcd6:#40516a;--theme-color-39786b:#dce7f5;--theme-color-5b7c7b:#dce7f5;--theme-background-e7efed:#223147;--theme-color-3d665f:#dce7f5;--theme-border-efd7ae:#40516a;--theme-background-fff7e9:#172334;--theme-color-8a5b22:#dce7f5;--theme-background-e5f4ec:#223147;--theme-color-256a42:#dce7f5;--theme-background-fff2db:#223147;--theme-color-825d26:#dce7f5;--theme-background-eff5f3:#223147;--theme-background-f0f4fa:#223147;--theme-color-2f665e:#dce7f5;--theme-border-dce3eb:#40516a;--theme-color-62738b:#dce7f5;--theme-background-f4f7f6:#172334;--theme-color-193d3e:#dce7f5;--theme-background-f3f7f5:#172334;--theme-color-225f54:#dce7f5;--theme-color-69817a:#dce7f5;--theme-border-dde9e3:#40516a;--theme-color-68857a:#dce7f5;--theme-background-e8f3ed:#223147;--theme-color-56736a:#dce7f5;--theme-color-6c817a:#dce7f5;--theme-color-789087:#dce7f5;--theme-background-edf4f0:#223147}
:root[data-theme=dark] button.primary,:root[data-theme=dark] .primary{color:#0c192a}
:root[data-theme=dark] .error,:root[data-theme=dark] .danger,:root[data-theme=dark] .danger-text{color:#ff9fa4}
:root[data-theme=dark] .instant-tool-tip{background:#252b35;color:#fff;border-color:#7d899b;box-shadow:0 5px 20px #0009}:root[data-theme=dark] .instant-tool-tip::before{background:#252b35}

/* One web dialog for teaching and hosting confirmations and input. */
.project-dialog{width:min(480px,calc(100vw - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:24px;border:1px solid var(--line,#dae2ef);border-radius:14px;background:var(--paper,#fff);color:var(--ink,#182b43);box-shadow:0 16px 60px #0005;overflow:auto}.project-dialog::backdrop{background:#07142699}.project-dialog form{margin:0}.project-dialog h2{font-size:20px;line-height:1.4;margin:0 32px 16px 0}.project-dialog p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;margin:0 0 18px}.project-dialog input{box-sizing:border-box;width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--bg,#f3f5fa);color:var(--ink);font:inherit}.project-dialog .project-dialog-close{float:right;width:30px;min-width:30px;margin:0;padding:0;border:0;background:transparent;color:var(--muted);font-size:24px;line-height:30px}.project-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.project-dialog-actions button{width:auto;min-width:80px;padding:9px 16px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);font:inherit;cursor:pointer}.project-dialog-actions .primary{background:var(--blue,#275ec0);border-color:var(--blue);color:white}:root[data-theme=dark] .project-dialog-actions .primary{color:#0c192a}.project-dialog button:focus-visible,.project-dialog input:focus-visible{outline:3px solid var(--blue);outline-offset:3px}

/* Account actions stay on the right and open in the browser top layer. */
header>.account-menu-trigger{order:100;flex:none}header>.account-menu[popover]{position:fixed;inset:auto;margin:0;padding:8px;width:240px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 64px);overflow:auto;border:1px solid var(--line,#cbdcd6);border-radius:12px;background:var(--theme-background-ffffff,#fff);color:var(--ink,#183d35);box-shadow:0 12px 40px #0003;font:14px/1.5 "Segoe UI","Microsoft YaHei",sans-serif}header>.account-menu .account-menu-name{display:block;padding:8px 10px;overflow-wrap:anywhere;border-bottom:1px solid var(--line,#cbdcd6);margin-bottom:6px}header>.account-menu button,header>.account-menu a{display:block;width:100%;text-align:left;margin:0;padding:10px;border:0;border-radius:7px;background:transparent;color:inherit;text-decoration:none;font:inherit;min-height:42px;white-space:normal}header>.account-menu button:hover,header>.account-menu a:hover{background:var(--theme-background-e8f0ed,#e8f0ed)}header>.account-menu #logout{border-top:1px solid var(--line,#cbdcd6);border-radius:0;margin-top:6px}#ownProfileDialog input{box-sizing:border-box;width:100%}#ownProfileDialog>form>p{overflow-wrap:anywhere}
