* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: #f5f6fa;
    color: #232b40;
    font: 14px -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif
}

button, input, textarea, select {
    font: inherit
}

button {
    cursor: pointer;
    border: 1px solid #e2e5ed;
    background: white;
    border-radius: 8px;
    padding: 10px 13px;
    color: #4b5368
}

button:hover {
    background: #eef1fc;
    border-color: #adbce9
}

button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid #5377e5;
    outline-offset: 2px
}

aside {
    position: fixed;
    width: 205px;
    inset: 0 auto 0 0;
    background: #fff;
    border-right: 1px solid #e6e8ef;
    padding: 32px 20px
}

.brand {
    display: block;
    color: #263044;
    text-decoration: none;
    font-size: 30px;
    font-weight: 650;
    letter-spacing: -1px;
    margin-bottom: 65px
}

.brand b {
    color: #4e6ce8;
    font-size: 40px;
    vertical-align: middle
}

.brand span {
    display: block;
    font-size: 9px;
    letter-spacing: 2px;
    margin: 8px 0 0 36px;
    color: #9097a8
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: #949aac
}

.nav {
    display: block;
    width: 100%;
    text-align: left;
    margin-top: 12px;
    border: 0;
    padding: 13px
}

.nav.active {
    background: #eef1ff;
    color: #4666d7;
    font-weight: 600
}

.sidebottom {
    position: absolute;
    bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px
}

.avatar {
    display: grid;
    place-items: center;
    background: #eaf0fd;
    color: #5570c0;
    border-radius: 50%;
    width: 35px;
    height: 35px
}

small {
    display: block;
    font-size: 11px;
    line-height: 1.6;
    color: #9299aa;
    margin-top: 7px
}

main {
    margin-left: 205px;
    padding: 30px 28px
}

header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px
}

header > div {
    flex: 1
}

h1 {
    font-size: 23px;
    font-weight: 550;
    letter-spacing: -.7px;
    margin: 10px 0
}

h3 {
    font-size: 14px;
    font-weight: 550;
    margin: 12px 0 16px
}

.lessonbar {
    display: flex;
    gap: 20px;
    align-items: center;
    background: white;
    border: 1px solid #e4e7ef;
    border-radius: 13px 13px 0 0;
    padding: 18px 20px
}

label {
    display: block;
    font-size: 11px;
    color: #9299aa;
    margin-bottom: 6px
}

input, textarea, select {
    border: 1px solid #e1e5ee;
    border-radius: 7px;
    background: #fff;
    padding: 9px;
    color: #323d56;
    max-width: 100%
}

.lessonbar input, .lessonbar select {
    border: 0;
    padding: 2px 0;
    font-weight: 600
}

.titlefield {
    flex: 1
}

.saved {
    color: #6a9b86;
    font-size: 11px
}

.workspace {
    display: grid;
    grid-template-columns:minmax(0, 1fr) 270px;
    border: 1px solid #e4e7ef;
    border-top: 0;
    border-radius: 0 0 13px 13px;
    overflow: hidden
}

.boardarea {
    background: #edf0f7;
    min-width: 0;
    display: flex;
    flex-direction: column
}

.toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    background: #fff;
    padding: 12px;
    border-bottom: 1px solid #e5e8f0
}

.toolbar button {
    padding: 7px 10px;
    border: 0;
    font-size: 16px
}

.toolbar #clear {
    font-size: 11px
}

.toolbar i {
    height: 24px;
    border-left: 1px solid #e0e4ee;
    margin: 0 5px
}

#tools {
    display: flex;
    gap: 3px
}

.selected {
    background: #eaf0ff !important;
    color: #4569de !important
}

input[type=color] {
    width: 30px;
    height: 30px;
    padding: 3px
}

.canvaswrap {
    position: relative;
    margin: 22px;
    box-shadow: 0 4px 24px #25366008;
    background: white;
    flex: 1;
    align-content: center;
    overflow: hidden
}

canvas {
    width: 100%;
    height: auto;
    display: block;
    touch-action: none
}

.boardbadge {
    position: absolute;
    bottom: 13px;
    left: 16px;
    color: #acb3c2;
    font-size: 10px;
    pointer-events: none
}

footer {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 20px 16px;
    flex-wrap: wrap
}

footer button {
    font-size: 11px
}

#pages {
    display: flex;
    gap: 5px;
    flex-wrap: wrap
}

#toolHint {
    font-size: 10px;
    color: #9199ab;
    margin-left: auto
}

.inspector {
    background: #fff;
    border-left: 1px solid #e5e8ee
}





.inspector section {
    padding: 22px 18px;
    border-bottom: 1px solid #edf0f5
}

.equation {
    display: flex;
    align-items: center;
    background: #f7f8fc;
    border: 1px solid #e4e7f0;
    border-radius: 8px;
    padding-left: 10px
}

.equation input {
    width: 100%;
    border: 0;
    background: transparent;
    font-family: Georgia, serif;
    font-size: 19px
}

.equation span {
    white-space: nowrap;
    font: italic 18px Georgia
}

.presets {
    display: flex;
    gap: 7px;
    margin: 10px 0 14px
}

.presets button {
    font: italic 14px Georgia;
    flex: 1;
    padding: 5px
}

.primary {
    background: #536dde;
    color: #fff;
    border: 0
}

.primary:hover {
    background: #405bc6;
    color: white
}

#graphForm .primary {
    width: 100%;
    font-size: 12px
}

.inspector textarea {
    width: 100%;
    resize: vertical;
    margin-top: 14px;
    font-size: 12px
}

.inspector label {
    margin-top: 12px
}

#symbols {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    margin-top: 8px
}

#symbols button {
    padding: 4px 7px
}

#graphError {
    font-size: 11px;
    color: #b44
}

.localnote {
    padding: 18px;
    font-size: 10px;
    line-height: 1.7;
    color: #99a0af
}

.studentshead {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0
}

.studentshead p {
    color: #9199ab
}

#studentCards {
    display: grid;
    grid-template-columns:repeat(auto-fill, minmax(270px, 1fr));
    gap: 20px
}

.studentcard {
    padding: 24px;
    background: white;
    border: 1px solid #e4e8f0;
    border-radius: 12px
}

.studentcard h3 {
    font-size: 20px
}

.studentcard p {
    color: #80899e
}

.studentcard button {
    margin-top: 14px
}

dialog {
    border: 1px solid #e1e6ef;
    border-radius: 16px;
    width: 430px;
    padding: 28px
}

dialog::backdrop {
    background: #26365155
}

dialog label {
    margin: 17px 0
}

dialog input {
    display: block;
    width: 100%;
    margin-top: 6px
}

.actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px
}

#toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: #27334c;
    color: #fff;
    padding: 12px 22px;
    border-radius: 9px;
    display: none;
    z-index: 10
}

[hidden] {
    display: none !important
}

@media (min-width: 1500px) {
    main {
        max-width: 1750px;
        margin: auto auto auto 205px
    }

    .canvaswrap {
        margin: 30px
    }
}

@media (max-width: 1100px) {
    aside {
        width: 160px;
        padding: 25px 12px
    }

    main {
        margin-left: 160px;
        padding: 20px 15px
    }

    header {
        flex-wrap: wrap
    }

    header > div {
        flex-basis: 100%
    }

    .workspace {
        grid-template-columns:1fr
    }

    .inspector {
        display: grid;
        grid-template-columns:repeat(3, 1fr)
    }

     .localnote {
        grid-column: 1/-1
    }

    .saved {
        display: none
    }
}

@media (max-width: 650px) {
    aside {
        position: static;
        width: 100%;
        padding: 10px 15px;
        display: flex;
        align-items: center;
        gap: 10px
    }

    .brand {
        font-size: 24px;
        margin: 0
    }

    .brand span, aside > .eyebrow, .sidebottom {
        display: none
    }

    .nav {
        width: auto;
        margin: 0;
        font-size: 12px
    }

    main {
        margin: 0;
        padding: 15px 10px
    }

    h1 {
        font-size: 21px
    }

    .lessonbar {
        flex-wrap: wrap;
        gap: 12px
    }

    .inspector {
        display: block
    }

    .canvaswrap {
        margin: 8px
    }

    .studentshead {
        display: block
    }

    .toolbar {
        padding: 7px
    }

    header button {
        font-size: 12px
    }
}

/* 01Математика: original brand assets and tokens from Micron */
@font-face {
    font-family: Ubuntu;
    src: url('assets/ubuntu.woff2') format('woff2');
    font-weight: 400;
    font-display: swap
}

@font-face {
    font-family: Ubuntu;
    src: url('assets/ubuntu-bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap
}

@font-face {
    font-family: 'Ubuntu Condensed';
    src: url('assets/ubuntu-condensed.woff2') format('woff2');
    font-weight: 400;
    font-display: swap
}

:root {
    --brand: #0066ff;
    --navy: #08164c;
    --wine: #991747
}

body {
    font-family: Ubuntu, Arial, sans-serif;
    background: #f4f5f8;
    color: #333
}

h1, h2, h3 {
    font-family: 'Ubuntu Condensed', Ubuntu, sans-serif;
    font-weight: 400;
    letter-spacing: -.5px
}

h1 {
    font-size: 30px
}

h2 {
    font-size: 27px
}

h3 {
    font-size: 19px
}

aside {
    background: linear-gradient(165deg, #08164c 0%, #201642 65%, #401248 100%);
    border: 0;
    color: white;
    width: 220px;
    padding: 28px 18px
}

.brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 46px
}

.brandowl {
    height: 87px;
    width: auto
}

.wordmark {
    width: 182px;
    height: auto
}

.brand span {
    margin: 5px 0 0;
    color: #c0c8e3;
    font: 10px Ubuntu, sans-serif;
    letter-spacing: 1.6px
}

aside > .eyebrow {
    color: #acb5d3;
    font-size: 9px
}

.nav {
    background: transparent;
    color: #ccd4e9;
    border-radius: 6px;
    padding: 14px 12px
}

.nav:hover {
    background: #ffffff12;
    color: white
}

.nav.active {
    color: #fff;
    background: #0066ff;
    box-shadow: 0 4px 14px #0002
}

.sidebottom small {
    color: #acb5d3
}

.avatar {
    background: #ffffff18;
    color: #fff;
    border: 1px solid #ffffff25
}

.sidebottom {
    border-top: 1px solid #ffffff20;
    padding-top: 20px;
    left: 18px;
    right: 18px
}

main {
    margin-left: 220px;
    padding: 0 28px 28px
}

header {
    background: linear-gradient(110deg, #141c4f, #401248 57%, #9b1747);
    margin: 0 -28px 26px;
    padding: 25px 28px;
    color: white;
    min-height: 135px
}

header .eyebrow {
    color: #c9c9dc;
    font-size: 9px
}

header button {
    background: #ffffff10;
    color: #fff;
    border-color: #ffffff45;
    font-size: 12px
}

header button:hover {
    background: #ffffff25;
    border-color: #fff
}

.eyebrow {
    color: #6e7690
}

.lessonbar, .workspace {
    border-color: #d9dee8
}

.lessonbar {
    border-radius: 8px 8px 0 0
}

.workspace {
    border-radius: 0 0 8px 8px
}

.primary {
    background: var(--brand);
    border: 1px solid #005ce6;
    border-radius: 6px;
    box-shadow: inset 0 1px #ffffff12
}

.primary:hover {
    background: #0053d1;
    border-color: #0048b5
}

.selected {
    background: #0066ff !important;
    color: #fff !important
}

.toolbar .selected {
    box-shadow: 0 2px 5px #0066ff22
}

.toolbar button {
    border-radius: 5px
}





.inspector section:nth-of-type(1) > .eyebrow {
    color: #0066ff
}

.inspector section:nth-of-type(2) > .eyebrow {
    color: #991747
}

.inspector section:nth-of-type(3) > .eyebrow {
    color: #0775a1
}

.boardarea {
    background: #ecf0f5
}

.boardbadge {
    color: #8190a6
}

.saved {
    color: #21804a
}

.presets button {
    color: #0066ff;
    border-color: #d5e3fa
}

.equation {
    background: #f4f8ff;
    border-color: #cfddf4
}

small, .localnote {
    color: #727b8d
}

label {
    color: #737b8c
}

.studentcard {
    border-radius: 8px;
    border-top: 3px solid #0066ff
}

.studentcard h3 {
    color: #08164c
}

.studentcard p {
    color: #6a7386
}

button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline-color: #0066ff
}

#toast {
    background: #08164c
}

button:disabled {
    opacity: .4;
    cursor: default
}

.studentshead p {
    color: #6f7789
}

@media (min-width: 1500px) {
    main {
        margin-left: 220px
    }
}

@media (max-width: 1100px) {
    aside {
        width: 175px;
        padding: 24px 12px
    }

    .wordmark {
        width: 148px
    }

    .brandowl {
        height: 74px
    }

    main {
        margin-left: 175px;
        padding: 0 18px 22px
    }

    header {
        margin: 0 -18px 22px;
        padding: 22px 18px
    }

    .brand span {
        font-size: 8px
    }

    .sidebottom {
        left: 12px;
        right: 12px
    }
}

@media (max-width: 650px) {
    aside {
        width: 100%;
        padding: 12px;
        justify-content: space-between
    }

    .brand {
        margin: 0;
        gap: 6px;
        flex-wrap: nowrap
    }

    .brandowl {
        height: 32px
    }

    .wordmark {
        width: 125px
    }

    .nav {
        padding: 9px;
        font-size: 11px
    }

    .brand span {
        display: none
    }

    main {
        margin: 0;
        padding: 0 10px 20px
    }

    header {
        margin: 0 -10px 16px;
        padding: 20px 15px
    }

    h1 {
        font-size: 27px
    }

    .sidebottom {
        display: none
    }
}
.boardpicker{display:flex;align-items:center;gap:10px;padding:12px 18px;background:white;border:1px solid #d9dee8;border-top:0;flex-wrap:wrap}.boardpicker label{margin:0;display:flex;align-items:center;gap:8px}.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:18px;margin-top:20px}.cards article{background:white;border:1px solid #d9dee8;border-top:3px solid #0066ff;border-radius:8px;padding:20px}.cards button,.studentcard button{margin:8px 6px 0 0;font-size:12px}.cards p{white-space:pre-wrap;color:#68748a;overflow-wrap:anywhere}#keyForm{display:flex;gap:12px;align-items:end;flex-wrap:wrap}#keyForm label{margin:0}#keyOutput{display:block;white-space:pre-wrap;overflow-wrap:anywhere;background:#fff;padding:15px;margin:15px 0}#emptyBoard{padding:30px;background:white}#authError{color:#b0203f}#authDialog::backdrop{background:#08164ced}dialog textarea{width:100%;min-height:65px}dialog select{width:100%}.guest .teacher-only,.guest #appSidebar,.guest #backup,.guest #restore{display:none}.guest main{margin-left:0}.guest .inspector{display:block}.guest #lessonTitle{pointer-events:none}.guest .lessonbar>div:first-child{display:none}.readonly .toolbar,.readonly #addPage,.readonly #deletePage,.readonly #graphForm button,.readonly #symbols{display:none}.guest #shareBtn{display:none}.sync-error{color:#b0203f!important}.saved{max-width:260px}.studentcard .archived{color:#991747}@media(max-width:650px){aside{flex-wrap:wrap}.nav{font-size:10px}#userName{font-size:11px}}

.selectionbar,.viewbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:9px 12px;background:#fff;border-bottom:1px solid #dce3ef}.selectionbar button,.viewbar button{font-size:11px;padding:7px 9px}.selectionbar span{font-size:10px;color:#6c7890;margin-right:8px}.viewbar{background:#f7f9fc}.viewbar label{display:flex;align-items:center;gap:7px;margin:0 0 0 auto}.viewbar select{font-size:11px;padding:6px}.viewbar #zoomFit{min-width:58px}.readonly .selectionbar{display:none}#tools{flex-wrap:wrap}.canvaswrap{min-height:0}#toolHint{max-width:100%;line-height:1.5}#fontSize{margin-top:3px}.toolbar button[aria-pressed=true]{background:#0066ff;color:white}

/* Full-window board and collapsible lesson tools. */
#boardWorkspace {position:relative;grid-template-columns:minmax(0,1fr) 324px;height:calc(100dvh - 280px);min-height:520px;border-radius:0 0 12px 12px}

#boardWorkspace .boardarea {min-height:0;overflow:hidden}
#boardWorkspace .canvaswrap {position:relative;flex:1;min-height:100px;margin:0;background:#e8edf5;align-content:normal;box-shadow:none}
#boardWorkspace #board {position:absolute;inset:0;width:100%;height:100%}
#boardWorkspace footer {flex-shrink:0;margin:0;padding:8px 12px;background:#fff;border-top:1px solid #e4e7ef;max-height:100px;overflow:auto}
#boardWorkspace .inspector {position:relative;inset:auto;width:auto;padding:0;display:flex;min-width:0;min-height:0;background:#fff;border-left:1px solid #dce3ef;overflow:hidden}





#inspectorContent {position:relative;flex:1;min-width:0;overflow:auto;overscroll-behavior:contain}

body.board-focused {overflow:hidden}
#boardWorkspace.board-fullscreen {position:fixed;inset:0;z-index:20;width:100%;height:100dvh;min-height:0;border:0;border-radius:0}
.board-fullscreen .toolbar {padding:7px 12px}
.board-fullscreen .selectionbar {padding:5px 12px}
#toast {z-index:50}
@media(max-width:700px) {
    #boardWorkspace {grid-template-columns:minmax(0,1fr) 54px;min-height:480px}
    
    #boardWorkspace .viewbar {gap:4px;padding:6px}
    #boardWorkspace .viewbar label {margin-left:0}
    #boardWorkspace .selectionbar {max-height:76px;overflow:auto}
    #boardWorkspace #toolHint {display:none}
    #boardWorkspace.board-fullscreen {min-height:0}
}

.board-save-state {font-size:10px;color:#328061;max-width:240px;overflow-wrap:anywhere}.viewbar #retrySync {color:#b0203f}

/* Cabinet navigation folds into an icon rail, including the full-window board. */
body {--navigation-width:220px}
body.navigation-collapsed {--navigation-width:58px}
body.guest {--navigation-width:0px}
#appSidebar {position:fixed;inset:0 auto 0 0;width:var(--navigation-width);height:100dvh;z-index:30;display:flex;flex-direction:column;align-items:stretch;gap:0;padding:12px;overflow-y:auto;overflow-x:hidden;flex-wrap:nowrap}
#toggleSidebar {align-self:flex-end;flex:none;width:34px;height:34px;padding:0;margin-bottom:14px;background:#ffffff12;color:#fff;border:0;font-size:26px}
#appSidebar .brand {margin-bottom:24px}
#appSidebar .nav {display:flex;align-items:center;gap:12px;font-size:13px;width:100%;margin:8px 0 0;padding:12px}
#appSidebar .nav svg {width:21px;height:21px;flex:0 0 21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#appSidebar .nav-label {white-space:nowrap}
#appSidebar .sidebottom {position:static;flex:none;margin-top:auto;padding-top:16px}
body.navigation-collapsed #appSidebar {padding:12px 6px}
body.navigation-collapsed #toggleSidebar {align-self:center}
body.navigation-collapsed #appSidebar .brand,body.navigation-collapsed #appSidebar>.eyebrow,body.navigation-collapsed #appSidebar .nav-label,body.navigation-collapsed #appSidebar .sidebottom {display:none}
body.navigation-collapsed #appSidebar .nav {justify-content:center;padding:12px 0}
body>main {margin-left:var(--navigation-width);max-width:none}
body.board-focused #boardWorkspace.board-fullscreen {left:var(--navigation-width);width:calc(100% - var(--navigation-width))}
body.guest #appSidebar {display:none}
@media(max-width:650px) {
    body:not(.navigation-collapsed):not(.guest) {--navigation-width:210px}
    body>main {margin-left:58px}
    body.guest>main {margin-left:0}
    body.board-focused:not(.navigation-collapsed):not(.guest) #boardWorkspace.board-fullscreen {left:58px;width:calc(100% - 58px)}
}

.selectionbar .arrange-label {display:flex;align-items:center;gap:6px;margin:0;font-size:11px}.selectionbar select {padding:6px;font-size:11px;max-width:220px}


/* Smooth menu movement; branding remains visible in the icon rail. */
body {--menu-duration:280ms;--menu-easing:cubic-bezier(.22,.68,0,1)}
body.navigation-collapsed {--navigation-width:76px}
body.guest {--navigation-width:0px}
#appSidebar {transition:width var(--menu-duration) var(--menu-easing),padding var(--menu-duration) var(--menu-easing)}
body>main {transition:margin-left var(--menu-duration) var(--menu-easing)}
#boardWorkspace {transition:grid-template-columns var(--menu-duration) var(--menu-easing),left var(--menu-duration) var(--menu-easing),width var(--menu-duration) var(--menu-easing)}
#appSidebar .brand,body.navigation-collapsed #appSidebar .brand {display:flex;order:-1;flex:none;flex-direction:column;justify-content:flex-start;flex-wrap:nowrap;gap:8px;margin:4px 0 12px;height:140px;overflow:hidden;transition:height var(--menu-duration) var(--menu-easing)}
#appSidebar .brandowl {width:auto;height:82px;max-width:none;object-fit:contain;flex:none;transition:height var(--menu-duration) var(--menu-easing)}
#appSidebar .wordmark {width:160px;max-width:none;flex:none}
#appSidebar .brand span {display:block;white-space:nowrap;font-size:8px;margin:0}
#appSidebar .wordmark,#appSidebar .brand span {transition:opacity 180ms ease,transform var(--menu-duration) var(--menu-easing)}
body.navigation-collapsed #appSidebar .brand {height:76px}
body.navigation-collapsed #appSidebar .brandowl {height:68px}
body.navigation-collapsed #appSidebar .wordmark,body.navigation-collapsed #appSidebar .brand span {opacity:0;transform:translateX(-10px);pointer-events:none}
#appSidebar .nav,body.navigation-collapsed #appSidebar .nav {justify-content:flex-start;padding:12px;transition:gap var(--menu-duration) var(--menu-easing)}
#appSidebar .nav-label,body.navigation-collapsed #appSidebar .nav-label {display:block;overflow:hidden;max-width:160px;opacity:1;transition:max-width var(--menu-duration) var(--menu-easing),opacity 160ms ease}
body.navigation-collapsed #appSidebar .nav {gap:0}
body.navigation-collapsed #appSidebar .nav-label {max-width:0;opacity:0}
#inspectorContent {flex:0 0 270px;width:270px;opacity:1;visibility:visible;transform:translateX(0);transition:opacity 180ms ease,transform var(--menu-duration) var(--menu-easing),visibility 0s}

@media(max-width:700px) {
    #boardWorkspace .inspector{position:absolute;top:0;right:0;bottom:0;z-index:3;width:min(324px,90vw);transition:width var(--menu-duration) var(--menu-easing),box-shadow var(--menu-duration) ease}
    
    #inspectorContent {flex-basis:min(270px,calc(90vw - 54px));width:min(270px,calc(90vw - 54px))}
}
@media(max-width:650px) {
    body>main {margin-left:76px}
    body.guest>main {margin-left:0}
    body.board-focused:not(.navigation-collapsed):not(.guest) #boardWorkspace.board-fullscreen {left:76px;width:calc(100% - 76px)}
}
@media(prefers-reduced-motion:reduce) {
    #appSidebar,body>main,#boardWorkspace,#boardWorkspace .inspector,#inspectorContent,#appSidebar .brand,#appSidebar .brandowl,#appSidebar .wordmark,#appSidebar .brand span,#appSidebar .nav,#appSidebar .nav-label {transition:none!important}
}

/* Drawing settings and student directory */
.drawing-settings{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 12px;background:#f5f8ff;border-bottom:1px solid #e2e9f5;font-size:12px}
.drawing-settings label{display:flex;align-items:center;gap:6px}.drawing-settings small{color:#66758b}.drawing-settings input[type=color]{width:32px;height:28px;padding:2px}.drawing-settings input[type=checkbox]{width:auto}
.readonly .drawing-settings{display:none}
.directory-filters{display:flex;flex-wrap:wrap;gap:16px;padding:18px;background:#fff;border:1px solid #e2e9f5;border-radius:14px}.directory-filters label{display:flex;flex-direction:column;gap:6px;font-size:13px}.directory-filters label:first-child{flex:1;min-width:220px}.directory-filters input,.directory-filters select{padding:10px;border:1px solid #d8e2f0;border-radius:8px}
#studentSummary{color:#63708a;font-size:14px}#studentCards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,380px),1fr));gap:20px;align-items:start}
.student-profile{min-width:0}.student-profile-head{display:flex;align-items:center;gap:12px}.student-profile-head h3{flex:1;margin:0;overflow-wrap:anywhere}.student-avatar{width:44px;height:44px;display:grid;place-items:center;border-radius:14px;background:#e9f1ff;color:#0066ff;font-weight:700;flex-shrink:0}.student-status{font-size:11px;padding:4px 8px;background:#f0f4fa;border-radius:20px}.student-metrics{font-weight:600}.student-next{padding:12px;border-radius:10px;background:#eef5ff;color:#174b8c}.student-warning{color:#925200!important}.student-actions{display:flex;flex-wrap:wrap;gap:6px}.student-actions button{margin:0}.student-profile details{border-top:1px solid #e4ebf5;margin-top:16px;padding-top:14px}.student-profile summary{cursor:pointer;color:#0066ff;font-size:13px}.student-profile h4{margin:18px 0 8px}.student-notes{white-space:pre-wrap;overflow-wrap:anywhere;max-height:240px;overflow:auto}.student-detail-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #edf1f7;font-size:13px}.student-detail-row span{overflow-wrap:anywhere;min-width:0}.student-detail-row button{flex-shrink:0}.directory-empty{padding:32px;background:#fff;border-radius:12px}#studentForm textarea{width:100%;resize:vertical}

.student-detail-row{flex-wrap:wrap}.student-detail-row span{flex:1;min-width:130px}

/* A reversible, calm deletion moment, above the canvas and below dialogs. */
.deletion-notice{position:absolute;bottom:24px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;padding:10px 12px 10px 16px;border:1px solid #adcfff55;border-radius:16px;background:linear-gradient(120deg,#142750f5,#163d71f5);color:white;box-shadow:0 12px 36px #10274d30;backdrop-filter:blur(12px);font-size:13px;white-space:nowrap;animation:deletion-notice-in .28s ease-out;z-index:3}
.deletion-notice[hidden]{display:none}.deletion-notice button{background:#ffffff18;border:1px solid #ffffff40;color:white;padding:7px 12px;border-radius:9px;font:inherit}.deletion-notice button:hover{background:#ffffff30}.deletion-notice #dismissDeletion{border:0;background:transparent;padding:6px}.deletion-spark{color:#94d7ff;font-size:24px;line-height:1}.deletion-notice button:focus-visible{outline:2px solid #94d7ff;outline-offset:3px}
@keyframes deletion-notice-in{from{opacity:0;transform:translate(-50%,8px) scale(.96)}to{opacity:1;transform:translate(-50%,0) scale(1)}}
@media(prefers-reduced-motion:reduce){.deletion-notice{animation:none}}
@media(max-width:520px){.deletion-notice{gap:6px;padding:8px;max-width:calc(100% - 16px);font-size:11px;white-space:normal}.deletion-notice button{padding:6px}}

#tools{display:flex;align-items:stretch;gap:8px}.toolbar{align-items:center}
.latex-preview{background:white;border:1px solid #dce6f4;border-radius:10px;min-height:76px;margin:12px 0;padding:12px;overflow:auto;color:#153462}#latexError{font-size:12px;color:#a52b47;overflow-wrap:anywhere}.latex-capture{position:absolute;left:-10000px;top:0;display:inline-block;width:max-content;max-width:none;padding:16px;background:transparent;line-height:normal;pointer-events:none}
#mathPanel label,#taskPanel label{display:flex;flex-direction:column;gap:5px;margin-bottom:10px;font-size:12px}#mathPanel select,#taskPanel input{width:100%;padding:8px;border:1px solid #dce6f4;border-radius:8px}#mathPanel textarea{width:100%;font:13px/1.6 ui-monospace,monospace}.lesson-tool-actions{display:flex;gap:8px;margin:10px 0}.lesson-tool-actions button{flex:1;font-size:12px;padding:9px 7px}.readonly #latexInsert,.readonly #latexNew{display:none}#noteTemplate{font-size:11px;margin:8px 0;padding:8px}

#taskPreview{display:block;width:100%;height:auto;max-height:420px;object-fit:contain;margin:10px 0;border-radius:8px}#taskPanel input,#taskPanel textarea{width:100%}#taskError{font-size:12px;color:#a52b47}.readonly #taskInsert,.readonly #taskNew{display:none}

#taskPreview{position:static;inset:auto;aspect-ratio:auto;cursor:default;touch-action:auto}

/* Clear access paths and focused teaching utilities. */
#authDialog{width:min(520px,94vw);padding:30px;border:0;border-radius:20px;max-height:92vh;overflow:auto}
.auth-brand{display:flex;align-items:center;gap:14px;color:#16376b;font-size:21px;font-weight:700;margin-bottom:22px}.auth-brand img{width:50px;height:65px;object-fit:contain}.auth-brand small{font-size:12px;font-weight:400;color:#6b7487}
.auth-tabs{display:flex;gap:4px;background:#f0f4fa;padding:5px;border-radius:12px}.auth-tabs button{flex:1;padding:10px 5px;border:0;background:transparent;font-size:12px}.auth-tabs button.active{background:#0066ff;color:white;box-shadow:0 3px 12px #0066ff26}
#authDescription,#authHelp{font-size:14px;line-height:1.6;color:#526077}#authHelp ol{padding-left:22px}#authHelp li{margin:12px 0}#authForm label{display:block;margin:14px 0}#authForm input{width:100%;box-sizing:border-box}#authSubmit{width:100%;margin:12px 0}.password-field{display:flex;gap:6px;align-items:center}.password-field input{min-width:0}.password-field button{font-size:12px;flex-shrink:0}#authError,#materialEditError{color:#bd254a}#passwordHint{display:block;color:#66758c}
#authForm[hidden],#setupName[hidden],#confirmPasswordLabel[hidden],#eraserSettings[hidden]{display:none!important}
#authForm label[hidden],#passwordLabel[hidden],#authSecondary[hidden],#authSubmit[hidden]{display:none!important}.auth-secondary{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.auth-secondary button{border:0;background:transparent;color:#0066ff;padding:6px 0;text-align:left}.auth-secondary button+button{margin-left:auto}#authError.success{color:#217a4b}
.precision-tools{background:#f8faff;border-bottom:1px solid #e5ebf5;padding:8px 12px;font-size:12px;display:flex;flex-wrap:wrap;gap:14px}.precision-tools summary{cursor:pointer;color:#315a91}.ruler-controls{display:flex;flex-wrap:wrap;gap:10px;padding:12px 0}.ruler-controls label{display:flex;align-items:center;gap:5px}.ruler-controls input{width:75px}.ruler-controls small{flex-basis:100%;max-width:720px;line-height:1.5;color:#66758c}.ruler-controls output{font-weight:600;align-self:center}.precision-tools select,.precision-tools input{padding:6px}.precision-tools details{flex:1}
.material-filters{display:flex;flex-wrap:wrap;gap:14px;background:white;padding:18px;border-radius:12px;border:1px solid #e2e8f2}.material-filters label{flex:1;min-width:135px;font-size:12px;color:#63728a}.material-filters input,.material-filters select{display:block;width:100%;box-sizing:border-box;margin-top:6px}.section-description{color:#62718a;line-height:1.5}.empty-state{text-align:center;padding:45px;background:white;border:1px dashed #b9cbea;border-radius:16px;color:#65748b}.material-card{min-width:0;background:white;border:1px solid #e1e8f2;border-radius:14px;overflow:hidden;padding:16px}.material-card h3{overflow-wrap:anywhere;margin:16px 0 8px}.material-card p{font-size:13px;color:#6d7990}.material-thumbnail{display:flex;width:100%;height:150px;align-items:center;justify-content:center;overflow:hidden;background:linear-gradient(135deg,#e8f1ff,#f6f9ff);color:#2665af;font-size:32px;font-weight:bold;border:0}.material-thumbnail img{width:100%;height:100%;object-fit:contain}.material-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.material-actions button{font-size:12px;padding:9px 11px}#materialPreviewDialog{width:min(980px,94vw);max-height:92vh;overflow:auto}#materialPreviewContent img,#materialPreviewContent canvas{display:block;max-width:100%;height:auto;margin:16px auto}#materialPreviewTitle{overflow-wrap:anywhere;font-size:20px}#materialSummary{color:#64758b;font-size:13px}#materialEditForm label{display:block;margin:14px 0}#materialEditForm input{display:block;width:100%;box-sizing:border-box}

/* Whiteboard polish: contextual controls keep the sheet in focus. */
.board-style-options{background:#f7f9ff;border-bottom:1px solid #e5ebf5;flex-shrink:0}.board-style-options>summary{padding:8px 12px;font-size:12px;color:#315a91;cursor:pointer}.board-style-options .drawing-settings{border:0}.selectionbar[hidden]{display:none!important}
#board:focus-visible{outline:2px solid #0066ff;outline-offset:-2px}.boardarea button:focus-visible,.boardarea summary:focus-visible{outline:2px solid #0066ff;outline-offset:2px}
.board-shortcuts{display:grid;grid-template-columns:minmax(130px,1fr) 2fr;gap:12px;font-size:14px}.board-shortcuts dt{font-weight:600;color:#2456a2}.board-shortcuts dd{margin:0}#boardHelpDialog{width:min(600px,90vw);max-height:85vh;overflow:auto}#boardHelpDialog p{line-height:1.6;color:#5e6e88}#boardHelp{font-weight:bold;min-width:32px}#rulerSettings[open] .ruler-controls{max-height:180px;overflow:auto}
@media(pointer:coarse){.boardarea button,.boardarea select{min-height:42px}#tools{flex-wrap:nowrap;max-width:100%;overflow-x:auto;padding-bottom:4px}.precision-tools{padding:6px 10px}#boardWorkspace .viewbar{flex-wrap:nowrap;overflow-x:auto;flex-shrink:0}#boardWorkspace .viewbar>*{flex-shrink:0}}
@media(max-width:700px){.board-fullscreen .toolbar{max-height:122px;overflow:auto;flex-shrink:0}.precision-tools details[open] .ruler-controls{max-height:120px}.board-style-options[open] .drawing-settings{max-height:100px;overflow:auto}.viewbar #boardSaveState{max-width:130px}.board-shortcuts{grid-template-columns:1fr}}
#canvas3dDialog{width:min(560px,92vw);max-height:90vh;overflow:auto}
#canvas3dPreview{display:block;width:100%;height:auto;border:1px solid #dfe5ef;border-radius:8px;background:#fff;margin:10px 0}
.canvas3d-list{display:flex;flex-direction:column;gap:6px;margin:8px 0}
.canvas3d-row{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#f4f7fd;border:1px solid #e2e9f5;border-radius:8px;padding:6px 10px;font-size:13px}
.canvas3d-row button{margin:0;padding:2px 10px}
#canvas3dDialog fieldset{border:1px solid #e2e9f5;border-radius:10px;margin:12px 0;padding:10px 14px}
#canvas3dDialog legend{font-size:12px;color:#315a91;padding:0 6px}
#canvas3dDialog fieldset label{margin:6px 0;font-size:13px}
#canvas3dDialog fieldset label input,#canvas3dDialog fieldset label select{margin-top:3px}
#canvas3dError{color:#b0203f;min-height:18px;margin:8px 0 0}
#canvas3dDialog small{color:#68748a}

#boardWorkspace.is-3d{grid-template-columns:minmax(0,1fr)}
#boardWorkspace.is-3d>.inspector,#boardWorkspace.is-3d .toolbar,#boardWorkspace.is-3d .precision-tools{display:none}
.scene3d-panel [hidden],.scene3d-panel[hidden],#scene3dTopbar[hidden],#scene3dMenu[hidden]{display:none!important}
.scene3d-topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 14px;background:linear-gradient(135deg,#f8faff,#eef4ff);border-bottom:1px solid #dce6f5;flex-shrink:0}
.scene3d-title{display:flex;align-items:center;gap:10px;color:#203556}.scene3d-title>div{display:flex;flex-direction:column;gap:2px}.scene3d-title strong{font-size:14px}.scene3d-title small{color:#6b7b95;font-size:11px}
.scene3d-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#2f6fdd;color:#fff;font-size:23px;box-shadow:0 5px 14px #2f6fdd2b}
.scene3d-top-actions{display:flex;gap:6px}.scene3d-top-actions button{background:#fff;border:1px solid #d9e3f2;color:#38516f;padding:7px 10px;font-size:12px}.scene3d-top-actions button:hover{background:#edf4ff;border-color:#b7ccef}.scene3d-top-actions button:disabled{opacity:.45}
.scene3d-panel{position:absolute;z-index:5;top:16px;right:16px;bottom:16px;left:auto;width:324px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;flex-wrap:nowrap;gap:0;overflow-y:auto;overscroll-behavior:contain;padding:16px;background:rgba(255,255,255,.96);border:1px solid rgba(207,220,238,.95);border-radius:18px;box-shadow:0 20px 55px #243b651f,0 3px 12px #243b650f;backdrop-filter:blur(16px);scrollbar-width:thin;scrollbar-color:#b9c8dc transparent}


.scene3d-panel input[type=color]{width:42px;height:30px;padding:2px;border:1px solid #cfd9e8;border-radius:7px;background:#fff}
.scene3d-card{display:flex;flex-direction:column;align-items:flex-start;min-height:112px;padding:10px;margin:0;text-align:left;border:1px solid #dfe7f2;border-radius:12px;background:linear-gradient(150deg,#fff,#f4f8ff);color:#3568b5;transition:transform .15s,border-color .15s,box-shadow .15s}.scene3d-card:hover{transform:translateY(-2px);border-color:#9dbce9;box-shadow:0 7px 16px #315b9214}.scene3d-card svg{width:52px;height:40px;margin-bottom:6px}.scene3d-card strong{color:#293e5e;font-size:12px;line-height:1.25}.scene3d-card small{margin-top:3px;color:#7a899d;font-size:10px;line-height:1.3}
.scene3d-panel input[type=text],.scene3d-panel input[type=number]{box-sizing:border-box;width:100%;margin-top:4px;padding:7px 8px;border:1px solid #cfdaea;border-radius:8px;background:#fff;color:#263b59;font:inherit}
.scene3d-camera{padding:11px;margin-bottom:13px;border:1px solid #e0e8f3;border-radius:12px;background:#f7faff}.scene3d-camera>strong{display:block;margin-bottom:8px;color:#3a506e;font-size:12px}.scene3d-camera>div{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}.scene3d-camera button{padding:6px 3px;border:1px solid #d7e2f0;border-radius:7px;background:#fff;color:#537095;font-size:10px}.scene3d-camera button:hover{border-color:#8aaedf;color:#2459aa}

.scene3d-object{display:flex;align-items:center;gap:3px;padding:4px;border:1px solid #e0e7f1;border-radius:10px;background:#fff}.scene3d-object.selected{border-color:#91b4e6;background:#f3f7ff}

.scene3d-error{margin:8px 0 0;color:#b0203f;font-size:11px;line-height:1.4}.scene3d-error:empty{display:none}
@media(max-width:1100px){.scene3d-panel{width:300px;right:10px;top:10px;bottom:10px}.scene3d-title small{display:none}}
@media(max-width:700px){.scene3d-topbar{padding:8px 10px}.scene3d-top-actions button span{display:none}.scene3d-top-actions button{padding:7px 8px}.scene3d-panel{left:10px;right:10px;width:auto}.scene3d-top-actions #scene3dAdvanced{font-size:0}.scene3d-top-actions #scene3dAdvanced:after{content:'Вид';font-size:11px}}
@keyframes scene3d-panel-in{from{opacity:0;transform:translateX(12px)}to{opacity:1;transform:translateX(0)}}
.scene3d-panel:not([hidden]){animation:scene3d-panel-in .22s ease-out}
.scene3d-settings{width:min(620px,92vw);max-height:90vh;overflow:auto;padding:22px;border:1px solid #dce6f3;border-radius:20px;background:#fbfcff;color:#263b59;box-shadow:0 26px 80px #14294b33}
.scene3d-settings::backdrop{background:#182c4a55;backdrop-filter:blur(3px)}.scene3d-settings-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.scene3d-settings-head .eyebrow{margin:0;color:#5679aa}.scene3d-settings-head h2{margin:5px 0 6px;color:#1e3557;font-size:24px}.scene3d-settings-head p{margin:0;color:#718198;font-size:13px}.scene3d-settings-head>button{width:32px;height:32px;padding:0;border:0;border-radius:9px;background:#edf2f8;color:#61748e;font-size:21px}
.scene3d-settings-section{margin-top:16px;padding:14px;border:1px solid #e0e8f3;border-radius:14px;background:#fff}.scene3d-settings-section h3{margin:0 0 11px;color:#334e71;font-size:13px}.scene3d-toggles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.scene3d-toggles label{display:flex;align-items:flex-start;gap:10px;margin:0;padding:11px;border:1px solid #e3eaf4;border-radius:11px;background:#f8faff;cursor:pointer}.scene3d-toggles input{width:19px;height:19px;margin:1px 0 0;accent-color:#3478d4;flex:none}.scene3d-toggles span{display:flex;flex-direction:column;gap:3px}.scene3d-toggles strong{color:#34506f;font-size:12px}.scene3d-toggles small{color:#7b8a9f;font-size:10px;line-height:1.4}
.scene3d-settings-camera{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.scene3d-settings-camera button{padding:9px 6px;border:1px solid #d6e2f1;border-radius:9px;background:#f5f8fd;color:#38639a}.scene3d-settings-camera button:hover{background:#e7f0fd;border-color:#92b4e3}
.scene3d-help-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.scene3d-help-grid>div{display:grid;grid-template-columns:28px 1fr;column-gap:8px;padding:9px;border-radius:10px;background:#f5f8fd}.scene3d-help-grid>div>span{grid-row:1/3;display:grid;place-items:center;width:27px;height:27px;border-radius:8px;background:#e2edfc;color:#3470bd;font-size:10px;font-weight:700}.scene3d-help-grid strong{color:#3c526e;font-size:11px}.scene3d-help-grid small{color:#74849a;font-size:10px;line-height:1.4}

.scene3d-settings-foot{display:flex;align-items:center;gap:8px;margin-top:17px}.scene3d-settings-foot>span{flex:1;color:#71849b;font-size:10px;line-height:1.4}.scene3d-settings-foot button{padding:8px 11px;font-size:12px}
@media(max-width:600px){.scene3d-settings{padding:16px}.scene3d-toggles,.scene3d-help-grid{grid-template-columns:1fr}.scene3d-settings-camera{grid-template-columns:repeat(2,1fr)}.scene3d-settings-foot{flex-wrap:wrap}.scene3d-settings-foot>span{flex-basis:100%}}
@media(prefers-reduced-motion:reduce){.scene3d-card{transition:none}.scene3d-card:hover{transform:none}.scene3d-panel:not([hidden]){animation:none}}

/* Mouse controls stay visible while the library is closed. */
#scene3dControls[hidden]{display:none!important}
.scene3d-controls{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;padding:10px 14px;border-bottom:1px solid #dce6f5;background:#fff}
.scene3d-mode-group,.scene3d-view-group{display:flex;flex-wrap:wrap;gap:5px}
.scene3d-mode-group{padding:4px;background:#edf3fb;border-radius:13px}
.scene3d-controls button{min-height:38px;padding:8px 12px;border:1px solid transparent;border-radius:10px;font-size:12px;color:#486180;background:transparent}
.scene3d-mode-group button[aria-pressed=true]{background:#2769d2;color:#fff;box-shadow:0 3px 9px #2769d22a}
.scene3d-controls button:hover{border-color:#9dbde8;background:#e6effd;color:#205bad}
.scene3d-mode-group button[aria-pressed=true]:hover{background:#205cba;color:#fff}
.scene3d-view-group button{border-color:#dde6f2;background:#f8faff}
.scene3d-controls button:focus-visible,.scene3d-panel button:focus-visible{outline:3px solid #80b1ff;outline-offset:2px}
#boardWorkspace.is-3d #board{cursor:grab}
#boardWorkspace.is-3d .board-style-options,#boardWorkspace.is-3d .selectionbar{display:none}
#boardWorkspace.is-3d .boardbadge{display:none}
.scene3d-card{min-height:125px;padding:14px;border-radius:15px}
.scene3d-card svg{width:66px;height:48px;filter:drop-shadow(0 4px 4px #3568b51a)}
.scene3d-card strong{font-size:14px}.scene3d-card small{font-size:11px}


@media(max-width:700px){.scene3d-controls{padding:7px;gap:5px}.scene3d-controls button{padding:7px 8px;font-size:11px}.scene3d-mode-group{width:100%}.scene3d-mode-group button{flex:1}.scene3d-view-group{width:100%}.scene3d-view-group button{flex:1}.scene3d-panel{max-height:60%;top:auto!important}}

/* One top toolbox for school geometry. The canvas always has the full width. */
#scene3dPanel[hidden],#scene3dSelection[hidden]{display:none!important}
.scene3d-school-tools{position:static;flex:none;padding:10px 14px;background:#fff;border-bottom:1px solid #dce6f5}
.scene3d-palette-row{display:flex;align-items:center;gap:12px}.scene3d-palette-row>strong{font-size:12px;color:#50637e;max-width:65px;line-height:1.4;flex:none}
.scene3d-school-shapes{display:flex;gap:6px;flex:1;min-width:0;overflow-x:auto;padding:2px}
.scene3d-school-shapes .scene3d-card{flex:1;min-width:80px;min-height:70px;max-width:155px;align-items:center;justify-content:center;padding:6px 8px;border-radius:12px;gap:3px;text-align:center;font-size:11px}
.scene3d-school-shapes .scene3d-card svg{width:43px;height:32px;margin:0}.scene3d-school-shapes .scene3d-card span{color:#2b4568;font-weight:600}
.scene3d-new-color,.scene3d-selection-tools>label{display:flex;align-items:center;gap:6px;font-size:11px;color:#546985;margin:0}
.scene3d-school-tools input[type=color]{width:34px;height:30px;padding:2px;border:1px solid #cbd9ec;border-radius:8px;background:#fff}
.scene3d-selection-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:10px;padding-top:9px;border-top:1px solid #ecf0f6;min-height:37px}
.scene3d-object-picker{display:flex;align-items:center;gap:7px;color:#60758f;font-size:11px;margin:0}.scene3d-object-picker select{max-width:200px;font-size:12px;padding:7px;border-radius:8px;margin:0}
.scene3d-selection-tools,.scene3d-dimension-inputs{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.scene3d-dimension-inputs label{display:flex;align-items:center;gap:5px;margin:0;font-size:11px;color:#526c8e}.scene3d-dimension-inputs input{width:65px;padding:6px;font-size:12px;border:1px solid #cbd9ec;border-radius:8px;margin:0}
.scene3d-selection-tools button{min-height:32px;font-size:11px;padding:6px 9px;background:#f3f7fd;color:#3c5c86;border:1px solid #dce5f2}
#scene3dStatus{font-size:11px;color:#647a96;line-height:1.4}#scene3dSelection:not([hidden])+#scene3dStatus{display:none}
#boardWorkspace.is-3d .canvaswrap #board{right:0;width:100%}
#boardWorkspace.is-3d #scene3dMenu{display:none}
#boardWorkspace.is-3d .scene3d-controls{padding-top:6px;padding-bottom:6px}
@media(max-width:850px){.scene3d-palette-row{gap:6px}.scene3d-palette-row>strong{display:none}.scene3d-school-tools{padding:8px}.scene3d-school-shapes .scene3d-card{min-width:79px}.scene3d-new-color{flex-direction:column;font-size:10px}.scene3d-selection-row{gap:8px}.scene3d-selection-tools{gap:6px}}

.scene3d-controls .scene3d-top-actions{margin-left:auto}.scene3d-controls .scene3d-top-actions button{min-height:32px;padding:6px 9px}
.scene3d-school-shapes .scene3d-card{min-height:62px}
.scene3d-school-tools{padding-top:7px;padding-bottom:7px}
.scene3d-school-tools .scene3d-selection-row{margin-top:7px;padding-top:6px}
@media(max-width:1050px){.scene3d-controls{gap:6px}.scene3d-controls button{padding:6px 8px;font-size:11px}.scene3d-controls .scene3d-top-actions{margin-left:0}.scene3d-top-actions button span{display:none}}

/* Compact tools: separate camera gestures from object actions. */
#boardWorkspace.is-3d .scene3d-controls{padding:8px 14px;gap:12px;background:#f8faff}
.scene3d-controls .scene3d-mode-group{padding:0;gap:6px;background:transparent;border-radius:0;width:auto}
.scene3d-controls .scene3d-mode-group button{display:flex;align-items:center;gap:9px;min-height:48px;padding:7px 12px;border:1px solid #dce5f1;border-radius:12px;background:white;color:#4d6382;text-align:left;box-shadow:none}
.scene3d-mode-group button>span:last-child{display:flex;flex-direction:column;gap:3px}.scene3d-mode-group strong{font-size:12px;font-weight:600}.scene3d-mode-group small{font-size:10px;font-weight:400;color:#6f829b;line-height:1.2}
.scene3d-tool-icon{display:grid;place-items:center;width:28px;height:28px;font-size:23px;border-radius:8px;background:#f0f4fa;color:#5a769d}
.scene3d-controls .scene3d-mode-group button[aria-pressed=true]{border-color:#75a4eb;background:#eaf2ff;color:#215fbc;box-shadow:0 2px 6px #2167c712}
.scene3d-mode-group button[aria-pressed=true] .scene3d-tool-icon{background:#2c6ed2;color:white}.scene3d-mode-group button[aria-pressed=true] small{color:#4c74ab}
.scene3d-controls .scene3d-mode-group button:hover{border-color:#8cafe1;background:#f0f6ff;color:#215fbc}
.scene3d-controls .scene3d-view-group{align-items:center;width:auto;gap:7px}
.scene3d-camera-picker{display:flex;align-items:center;gap:7px;margin:0;color:#677c98;font-size:11px}.scene3d-camera-picker select{min-width:112px;margin:0;padding:9px 10px;border:1px solid #d6e2f1;border-radius:9px;background:white;font-size:12px;color:#385578}
.scene3d-controls .scene3d-top-actions{margin-left:auto;align-items:center}.scene3d-controls .scene3d-top-actions button{height:36px;min-width:36px;padding:7px 10px;border:1px solid #d6e2f1;background:white;font-size:12px}
.scene3d-controls .scene3d-top-actions #scene3dUndo,.scene3d-controls .scene3d-top-actions #scene3dRedo{font-size:20px;padding:3px 8px}
.scene3d-accessible-hint{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.scene3d-school-tools .scene3d-school-shapes .scene3d-card{min-height:72px;gap:0;padding:4px 8px;background:#fff;transition:border-color .15s,background .15s}
.scene3d-school-shapes .scene3d-card img{width:66px;height:44px;object-fit:contain;mix-blend-mode:multiply;pointer-events:none}
.scene3d-school-tools .scene3d-card:hover{transform:none;background:#edf4ff;border-color:#90b5e8;box-shadow:0 3px 10px #2a60a815}
.scene3d-school-tools button:focus-visible,.scene3d-controls button:focus-visible,.scene3d-context button:focus-visible{outline:3px solid #7ba8ec;outline-offset:2px}
#boardWorkspace.is-3d #zoomFit{display:none}
.scene3d-context[hidden]{display:none!important}
.scene3d-context{position:fixed;z-index:10000;width:254px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);overflow-y:auto;box-sizing:border-box;padding:7px;background:#fffffff5;border:1px solid #d6e0ee;border-radius:15px;box-shadow:0 16px 55px #21365330,0 3px 10px #21365312;backdrop-filter:blur(14px);color:#2e486a}
.scene3d-context-title{padding:7px 10px 10px;font-weight:600;font-size:12px;color:#70829b;border-bottom:1px solid #e8edf5;margin-bottom:4px}
.scene3d-context>button{display:flex;align-items:center;gap:10px;min-height:36px;width:100%;margin:0;padding:8px 10px;border:0;border-radius:8px;background:transparent;color:#324f73;font:inherit;font-size:12px;text-align:left}
.scene3d-context>button:hover{background:#edf4ff;color:#215fbc}.scene3d-context-icon{display:grid;place-items:center;width:22px;color:#6b85aa;font-size:19px}
.scene3d-context>button.danger{color:#be4455}.scene3d-context>button.danger:hover{background:#fff0f2}.scene3d-context>button.danger .scene3d-context-icon{color:inherit}
.scene3d-context-separator{height:1px;margin:5px 7px;background:#e7edf5}
.scene3d-context-colors{display:flex;justify-content:space-around;padding:8px 5px;gap:9px}.scene3d-context-colors button{width:28px;height:28px;min-height:0;padding:0;border:3px solid white;border-radius:50%;box-shadow:0 0 0 1px #d2ddec}.scene3d-context-colors button:hover,.scene3d-context-colors button.chosen{box-shadow:0 0 0 2px #7895bf;transform:scale(1.06)}
@media(max-width:1100px){.scene3d-mode-group small{font-size:9px}.scene3d-controls .scene3d-mode-group button{padding:6px 8px;gap:6px}.scene3d-controls .scene3d-top-actions{margin-left:0}#boardWorkspace.is-3d .scene3d-controls{gap:8px}.scene3d-camera-picker{font-size:0}}
@media(max-width:760px){.scene3d-controls .scene3d-mode-group{width:100%}.scene3d-controls .scene3d-mode-group button{flex:1;justify-content:center}.scene3d-mode-group small{display:none}.scene3d-controls .scene3d-top-actions{margin-left:auto}.scene3d-controls .scene3d-view-group{width:auto}.scene3d-controls .scene3d-top-actions #scene3dAdvanced{font-size:11px}.scene3d-controls .scene3d-top-actions #scene3dAdvanced:after{content:none}}
@media(prefers-reduced-motion:reduce){.scene3d-school-tools .scene3d-card{transition:none}}



/* Shared school workspace: generous drawing space, consistent tools and compact navigation. */
[hidden]{display:none!important}
.school-app{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;font-size:14px;background:#f3f6fb;color:#2e4360}

.school-app button,.school-app input,.school-app select,.school-app textarea{font-family:inherit}.school-app button{border-radius:9px}.school-app button:focus-visible,.school-app a:focus-visible,.school-app summary:focus-visible{outline:3px solid #82abe8;outline-offset:2px}.school-app button:disabled{cursor:default}
.school-app main>header{padding:22px 28px;margin-bottom:18px;border-bottom:1px solid #e1e8f3;background:#f8faff}.school-app header h1{font-size:26px;line-height:1.25;color:#2d476d}.school-app header>.eyebrow,.school-app header .eyebrow{font-size:9px;letter-spacing:1.6px;color:#8a9db8}.school-app header button{font-size:11px;min-height:34px}
.school-app #boardWorkspace{border:1px solid #dbe4ef;border-radius:14px;box-shadow:0 6px 24px #25436706;grid-template-columns:minmax(0,1fr) 300px}.school-app #boardWorkspace.board-fullscreen{border:0;border-radius:0}.school-app #inspectorContent section{padding:15px}
.school-app .toolbar{position:relative;z-index:4;display:flex;align-items:center;flex-wrap:wrap;gap:6px;background:#fff;padding:7px 10px;border-bottom:1px solid #e0e7f2}
.school-app #tools.school-tools{display:flex;align-items:center;flex-wrap:nowrap;gap:3px;padding:0;margin:0;min-width:0}
.school-tools>button,.school-shape-menu>summary{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:48px;min-height:49px;margin:0;padding:5px 8px;border:1px solid transparent;border-radius:9px;background:transparent;color:#647d9f;font-size:10px;line-height:1.1;white-space:nowrap;font-weight:500;box-sizing:border-box}
.school-tools svg,.school-tool-popup svg,.toolbar>button svg,.school-empty svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.school-app .school-tools>button.selected,.school-app .school-tools>button[aria-pressed=true]{color:#236ac9;background:#eaf2ff;border-color:#b9d0f0}
.school-app .school-tools>button:hover,.school-shape-menu>summary:hover{background:#f0f5fd;color:#2a68be}.school-shape-menu{position:relative;display:block;border:0;margin:0;padding:0}.school-shape-menu>summary{cursor:pointer;list-style:none;position:relative;padding-right:14px}.school-shape-menu>summary>span:last-child{position:absolute;right:4px;top:10px;font-size:10px}.school-shape-menu>summary::-webkit-details-marker{display:none}
.school-tool-popup{position:absolute;top:calc(100% + 7px);left:0;z-index:15;width:300px;max-width:85vw;padding:8px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;background:#fff;border:1px solid #d7e3f2;border-radius:13px;box-shadow:0 15px 40px #223d6526;max-height:45dvh;overflow:auto}
.school-tool-popup button{display:flex;align-items:center;gap:8px;text-align:left;background:#fff;border:0;border-radius:8px;padding:10px 8px;color:#536e94;font-size:11px;min-height:42px}.school-tool-popup button:hover{background:#edf4ff;color:#286ac6}
.school-app .toolbar>i{height:24px;width:1px;background:#e4eaf3;margin:0 2px}.school-app .toolbar>input[type=color]{width:32px;height:34px;margin:0;padding:2px;border:1px solid #dbe4ef;border-radius:8px;background:white}.school-app .toolbar>select{width:63px;font-size:11px;padding:7px 6px;border:1px solid #dbe4ef;border-radius:8px;margin:0}.school-app .toolbar>button{display:flex;align-items:center;justify-content:center;gap:5px;min-width:33px;min-height:34px;padding:6px;border:1px solid transparent;color:#6b819f;background:transparent;font-size:10px}.school-app .toolbar>button:hover{background:#edf4ff;border-color:#ccdcf2}.school-app .toolbar>button svg{width:19px;height:19px}.school-app .toolbar>button:disabled{opacity:.35}
.school-app .toolbar .board-style-options{position:relative;margin:0 0 0 auto;padding:0;border:0;background:transparent}.school-app .toolbar .board-style-options>summary{padding:9px;font-size:10px;color:#7a8da9;cursor:pointer}.school-app .toolbar .drawing-settings{position:absolute;top:calc(100% + 8px);right:0;z-index:15;display:flex;flex-direction:column;align-items:stretch;width:245px;padding:14px;background:#fff;border:1px solid #d7e3f2;border-radius:12px;box-shadow:0 15px 40px #223d6526;max-height:45dvh;overflow:auto}.school-app .drawing-settings label{font-size:11px;margin:0;display:flex;align-items:center;justify-content:space-between;gap:10px}.school-app .drawing-settings small{font-size:10px;color:#94a3b9}.school-app .drawing-settings select{font-size:11px}
.school-app #boardWorkspace .precision-tools{display:none}.school-app #boardWorkspace[data-active-tool=ruler] .precision-tools,.school-app #boardWorkspace[data-active-tool=eraser] .precision-tools{display:block;max-height:135px;overflow:auto;background:#fafcff;border-bottom:1px solid #e2e9f4}.school-app #boardWorkspace .selectionbar{display:none;padding:6px 10px;background:#f4f8ff;font-size:11px}.school-app .selectionbar button{padding:6px 8px;font-size:10px}
.school-app #boardWorkspace .viewbar{padding:6px 10px;gap:6px;background:#f9fbff;min-height:34px;flex-shrink:0}.school-app .viewbar button{padding:6px 9px;font-size:10px;min-height:30px;white-space:nowrap;color:#657d9f;border:1px solid #dce5f1;background:white}.school-app .viewbar label{font-size:10px;color:#8798b0;gap:5px}.school-app .viewbar select{padding:6px 7px;font-size:10px;border-radius:7px}.school-app .viewbar .school-mode-switch{display:flex;align-items:center;gap:2px;padding:3px;background:#eaf0f9;border-radius:9px}.school-app .school-mode-switch button{padding:5px 12px;border:0;background:transparent;color:#7287a4;font-size:11px;min-height:27px;border-radius:7px}.school-app .school-mode-switch button[aria-pressed=true]{background:#fff;color:#2869bf;box-shadow:0 1px 5px #375a821a}.school-app .board-save-state{font-size:10px;margin-left:auto}.school-app #boardWorkspace #board{background:white;touch-action:none}.school-app #boardWorkspace .boardbadge{font-size:9px;background:#ffffffb3;border-radius:5px;padding:3px 7px;left:10px;right:auto;top:10px;bottom:auto;pointer-events:none}
.school-app #boardWorkspace footer{display:flex;align-items:center;gap:6px;padding:6px 10px;min-height:35px;max-height:70px;font-size:10px}.school-app #pages{display:flex;gap:4px;overflow-x:auto;min-width:0}.school-app #pages button{min-width:30px;height:29px;padding:4px 9px;margin:0;border-radius:7px;font-size:10px}.school-app #addPage,.school-app #deletePage{font-size:10px;padding:5px 8px;white-space:nowrap;border-radius:7px}.school-app #toolHint{font-size:10px;color:#8a9db5;line-height:1.3;margin-left:auto}
.school-board-dialog{width:min(730px,94vw);max-height:85dvh;overflow:auto;padding:24px;border:1px solid #dbe4f0;border-radius:18px;color:#354d70;background:#fbfcff;box-shadow:0 24px 80px #142a4e30}.school-board-dialog::backdrop{background:#182d4c55;backdrop-filter:blur(3px)}.school-dialog-heading{display:flex;align-items:center;justify-content:space-between}.school-dialog-heading span{font-size:9px;color:#8c9eb8;letter-spacing:1.4px}.school-dialog-heading h2{font-size:23px;margin:5px 0}.school-dialog-heading button{width:32px;height:32px;font-size:22px;border:0;background:#eef2f8;color:#6d829f}.school-board-dialog>p{font-size:12px;color:#8295af}.school-context-content .lessonbar,.school-context-content .boardpicker{display:flex!important;position:static;padding:16px;background:#fff;border:1px solid #dce5f1;border-radius:12px;margin-top:12px;gap:10px;flex-wrap:wrap;box-shadow:none}.school-context-content .lessonbar{align-items:end}.school-context-content label{font-size:11px;color:#748aa7}.school-context-content input,.school-context-content select{font-size:13px;padding:9px;border-radius:8px;min-width:140px}.school-context-content button{font-size:11px;min-height:34px}.school-context-content .saved{flex-basis:100%;font-size:11px}.school-context-content .titlefield{min-width:200px}
.school-empty{text-align:center;max-width:660px;margin:35px auto;padding:45px 35px;background:#fff;border:1px solid #dfe7f3;border-radius:20px;box-shadow:0 12px 40px #25446e08}.school-empty h2{margin:0 0 12px;font-size:25px;color:#355277}.school-empty p{color:#8295ad;font-size:14px;line-height:1.7;max-width:420px;margin:0 auto 20px}.school-empty small{display:block;font-size:11px;color:#a0aec1;margin-top:12px}.school-empty .primary{padding:13px 22px;font-size:13px}.school-app .cards article,.school-app .studentcard{border:1px solid #dfe7f2;border-radius:14px;background:white;box-shadow:0 3px 16px #25446e05}.school-app dialog{font-family:inherit}.school-app #authDialog{border-radius:20px}
@media(max-width:1100px){.school-app .toolbar{gap:3px}.school-tools>button,.school-shape-menu>summary{min-width:43px;padding:5px 6px;font-size:9px}.school-app .toolbar>button>span{display:none}.school-app #toolHint{display:none}.school-app .board-save-state{max-width:160px}}
@media(max-width:700px){.school-app .toolbar{flex-wrap:nowrap;padding:5px;overflow:visible}.school-app #tools.school-tools{overflow-x:auto;flex:1;padding-bottom:3px}.school-tools>button,.school-shape-menu>summary{min-width:44px;min-height:44px}.school-app .toolbar>i,.school-app .toolbar>#imageBtn,.school-app .toolbar>#clear,.school-app .toolbar>.board-style-options{display:none}.school-app .toolbar>select{width:47px}.school-app .toolbar>input[type=color]{width:27px}.school-app #boardWorkspace .viewbar{flex-wrap:nowrap;overflow-x:auto;gap:5px;padding:5px}.school-app .viewbar>*{flex-shrink:0}.school-app .board-save-state{max-width:none}.school-app #boardWorkspace{min-height:420px}.school-app #boardWorkspace.board-fullscreen{min-height:0}.school-app main>header{padding:18px 14px}.school-app header h1{font-size:21px}.school-app .school-tool-popup{position:fixed;left:70px;right:10px;top:70px;width:auto;max-width:none;max-height:50dvh}.school-app .school-board-dialog{padding:18px}.school-context-content .lessonbar>div{flex-basis:100%}.school-context-content input,.school-context-content select{width:100%}.school-empty{padding:30px 20px;margin:20px 8px}.school-empty h2{font-size:22px}}
@media(prefers-reduced-motion:reduce){.school-app *{scroll-behavior:auto!important}}

.school-app h1,.school-app h2,.school-app h3,.school-app h4{font-family:inherit}
.school-app #boardView:has(#emptyBoard:not([hidden]))>.lessonbar,.school-app #boardView:has(#emptyBoard:not([hidden]))>.boardpicker{display:none}

.school-app #appSidebar,.school-app #appSidebar button{font-family:Ubuntu,Arial,sans-serif}
@media(max-width:700px){.school-app .school-tool-popup{left:calc(var(--navigation-width) + 8px)}}

.school-app #boardWorkspace.is-3d .precision-tools{display:none}

.school-app .viewbar .school-mode-switch{order:-2}.school-app .viewbar #schoolBoardContext{order:-1}
.school-app #boardWorkspace.is-3d .school-paper-size{display:none}
@media(max-width:700px){.school-app .school-mode-switch button{padding:5px 8px;font-size:10px}}

.school-math-menu{position:relative;display:block;border:0;margin:0;padding:0}.school-math-menu>summary{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:65px;min-height:49px;padding:5px 12px 5px 8px;border:1px solid transparent;border-radius:9px;color:#647d9f;font-size:10px;cursor:pointer;list-style:none;position:relative;box-sizing:border-box}.school-math-menu>summary::-webkit-details-marker{display:none}.school-math-menu>summary>span:last-child{position:absolute;right:3px;top:10px;font-size:10px}.school-math-menu>summary:hover{background:#edf4ff}.school-math-menu svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}.school-math-popup{grid-template-columns:1fr;width:270px}.school-app .viewbar .school-mode-switch button{font-weight:600}
@media(max-width:700px){.school-math-menu>summary{min-height:44px;min-width:63px;font-size:9px}}



/* Keep button contents inside their hit area, including compact icon controls. */
.school-app button{line-height:1.25}
.school-app button svg{display:block;flex-shrink:0}
.school-app .school-dialog-heading>button,
.school-app .scene3d-settings-head>button,
.school-app #dismissDeletion{
    display:inline-flex;align-items:center;justify-content:center;flex:0 0 36px;
    width:36px;height:36px;min-width:36px;min-height:36px;padding:0;line-height:1;
}
.school-app .school-dialog-heading>button svg,
.school-app .scene3d-settings-head>button svg,
.school-app #dismissDeletion svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.school-app .school-dialog-heading>button:hover,
.school-app .scene3d-settings-head>button:hover{background:#dfe9f6;color:#284b78}
.school-app .viewbar button,
.school-app .scene3d-top-actions button,.school-app .selectionbar button,
.school-app .school-context-content button{
    display:inline-flex;align-items:center;justify-content:center;gap:6px;
}
.school-app :is(#zoomOut,#zoomIn,#boardHelp,#scene3dUndo,#scene3dRedo){
    flex-shrink:0;min-width:34px;min-height:34px;padding:0;line-height:1;
}
/* === 01Математика: школьный интерфейс (порядок важен: эти правила идут после базовых) === */
/* 01Математика — школьный интерфейс. Подключается после style.css и задаёт весь внешний вид. */
:root{--blue:#0066ff;--blue-d:#0044b8;--blue-l:#edf5ff;--navy:#08164c;--plum:#401248;--burgundy:#991747;--sun:#5cc1fa;--sun-d:#2a9fdf;--mint:#1c8f73;--coral:#991747;--grape:#401248;--ink:#141c4f;--ink-2:#5f5d70;--ink-3:#8b8394;--line:#e5e0e8;--bg:#f7f6f8;--card:#fff;--r-s:12px;--r:18px;--r-l:26px;--shadow:0 10px 30px #141c4f14;--shadow-l:0 24px 70px #141c4f4d;--spring:cubic-bezier(.2,1.25,.35,1);--ease:cubic-bezier(.2,.8,.2,1);--rail:88px;--brand-gradient:linear-gradient(165deg,#08164c 0%,#201642 65%,#401248 100%);--brand-wave:linear-gradient(110deg,#141c4f,#401248 57%,#991747)}
body.school-app{--navigation-width:var(--rail);font:15px/1.45 Ubuntu,-apple-system,'Segoe UI',Arial,sans-serif;color:var(--ink);background-color:var(--bg);background-image:linear-gradient(#0066ff0a 1px,transparent 1px),linear-gradient(90deg,#0066ff0a 1px,transparent 1px);background-size:28px 28px}
body.school-app.guest{--navigation-width:0px}
.school-app button,.school-app input,.school-app select,.school-app textarea,.school-app #appSidebar button{font-family:inherit}
.school-app h1,.school-app h2,.school-app h3,.school-app h4{color:var(--ink);font-weight:700;letter-spacing:-.01em}
.school-app small{color:var(--ink-3);font-size:12px}
.school-app .eyebrow{display:none}
/* Buttons */
.school-app button{border-radius:var(--r-s);border:1.5px solid var(--line);background:#fff;color:var(--ink);font-size:14px;font-weight:500;padding:9px 14px;transition:transform .16s var(--spring),box-shadow .16s,background-color .16s,border-color .16s,color .16s}
.school-app button:hover:not(:disabled){background:var(--blue-l);border-color:#a9cdfb;color:var(--blue-d)}
.school-app button:active:not(:disabled){transform:scale(.96)}
.school-app button:disabled{opacity:.45}
.school-app button:focus-visible,.school-app a:focus-visible,.school-app summary:focus-visible,.school-app input:focus-visible,.school-app select:focus-visible,.school-app textarea:focus-visible{outline:3px solid #5cc1fa;outline-offset:2px}
.school-app button.primary,.school-app .primary{background:var(--blue);border:0;color:#fff;font-weight:700;box-shadow:0 4px 0 var(--blue-d);padding:11px 18px}
.school-app button.primary:hover:not(:disabled){background:#1f7bff;color:#fff;transform:translateY(-1px);box-shadow:0 5px 0 var(--blue-d)}
.school-app button.primary:active:not(:disabled){transform:translateY(3px);box-shadow:0 1px 0 var(--blue-d)}
.school-app input,.school-app select,.school-app textarea{border:1.5px solid var(--line);border-radius:var(--r-s);background:#fff;color:var(--ink);font-size:14px;padding:9px 12px;transition:border-color .15s,box-shadow .15s}
.school-app input[type=checkbox],.school-app input[type=radio]{width:18px;height:18px;padding:0;accent-color:var(--blue)}
.school-app input:hover,.school-app select:hover,.school-app textarea:hover{border-color:#a9cdfb}
.school-app input:focus,.school-app textarea:focus,.school-app select:focus{border-color:var(--blue);box-shadow:0 0 0 3px #0066ff22}
.school-app label{color:var(--ink-2);font-size:13px;font-weight:500}
/* Rail */
.school-app #appSidebar{background:#fff;border-right:1.5px solid var(--line);padding:12px 8px;box-shadow:none;align-items:stretch;color:var(--ink)}
.school-app #appSidebar::before,.school-app #appSidebar::after{display:none}
.school-app #toggleSidebar{display:none}
body.school-app.navigation-collapsed #appSidebar .brand{display:block;margin:0 auto 14px;width:52px;padding:0}
.school-app #appSidebar .brand .wordmark,.school-app #appSidebar .brand>span{display:none}
.school-app #appSidebar .brandowl{display:block;width:46px;height:auto;margin:0 auto;transition:transform .35s var(--spring)}
.school-app #appSidebar .brand:hover .brandowl{transform:rotate(-8deg) scale(1.08)}
.school-app #mainNavigation{position:relative;display:flex;flex-direction:column;flex:1;gap:6px;min-height:0}
.school-app .nav-pill{position:absolute;left:0;top:0;border-radius:16px;background:var(--blue);box-shadow:0 4px 0 var(--blue-d);opacity:0;transition:transform .38s var(--spring),width .3s,height .3s;z-index:0}
.school-app #appSidebar .nav,body.school-app.navigation-collapsed #appSidebar .nav{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;margin:0;padding:10px 2px;border:0;border-radius:16px;background:transparent;color:var(--ink-2);min-height:62px;box-shadow:none}
.school-app #appSidebar .nav:hover{background:var(--blue-l);color:var(--blue-d)}
.school-app #appSidebar .nav.active,.school-app #appSidebar .nav.active:hover{background:transparent;color:#fff;font-weight:700}
.school-app #appSidebar .nav svg{width:24px;height:24px;flex:none;stroke-width:1.9;transition:transform .3s var(--spring)}
.school-app #appSidebar .nav.active svg{transform:scale(1.1)}
body.school-app.navigation-collapsed #appSidebar .nav-label,.school-app #appSidebar .nav-label{display:block;font-size:11.5px;line-height:1.1;white-space:nowrap}

.school-app #appSidebar .sidebottom,body.school-app.navigation-collapsed #appSidebar .sidebottom{display:none}
/* Page */
body.school-app>main{margin-left:var(--navigation-width);padding:0;min-height:100dvh;background:transparent}
.school-app main>header{display:flex;align-items:center;gap:12px;background:transparent;border:0;padding:26px 34px 8px;margin:0;max-width:1240px}
.school-app main>header h1{font-size:30px;line-height:1.15;margin:0}
.school-app main>header #pageSubtitle{margin:4px 0 0;color:var(--ink-2);font-size:15px}
.school-app main>header button{font-size:14px;background:#fff}
.school-app main>section{padding:12px 34px 40px;max-width:1240px;background:transparent}
.school-app #boardView{padding:0;max-width:none}
.school-app .studentshead{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin:0 0 14px;background:transparent;border:0;padding:0}
.school-app main>section>.studentshead h2,.school-app #studentsView>.studentshead>div{display:none}
.school-app .section-description{display:none}
.school-app .directory-filters,.school-app .material-filters{background:#fff;border:1.5px solid var(--line);border-radius:var(--r);padding:12px 14px;box-shadow:none;gap:12px}
.school-app #studentSummary,.school-app #materialSummary{color:var(--ink-3);font-size:13px;margin:12px 2px}
.school-app .studentcard,.school-app .cards article,.school-app #studentCards>*{background:#fff;border:1.5px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);padding:18px;transition:transform .25s var(--spring),box-shadow .25s}
.school-app .studentcard:hover,.school-app .cards article:hover{transform:translateY(-3px);box-shadow:0 16px 36px #141c4f1f}
.school-app #studentCards{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:16px}
.school-app .empty-state,.school-app #lessonCards:empty::after{display:block;grid-column:1/-1;text-align:center;background:#fff url(assets/owl.png) center 26px/58px no-repeat;border:2px dashed #d5cfdc;border-radius:var(--r-l);padding:104px 24px 34px;color:var(--ink-2);font-size:16px}
.school-app #lessonCards:empty::after{content:'Занятий пока нет. Нажми «+ Запланировать», и урок появится здесь.'}
/* Start screen */
.school-app .school-empty{max-width:880px;margin:14px auto 40px;padding:28px 34px 36px!important;background:transparent;border:0;box-shadow:none;text-align:center}
.school-app .start-owl{width:92px;height:auto;display:block;margin:0 auto 6px;animation:owl-float 4s ease-in-out infinite}
.school-app .school-empty h2{font-size:26px;margin:6px 0 4px}
.school-app .school-empty>p{color:var(--ink-2);margin:0 0 24px;max-width:none}
.start-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.school-app .start-card{display:flex;flex-direction:column;align-items:flex-start;gap:6px;text-align:left;padding:22px;border:0;border-radius:var(--r-l);color:#fff;min-height:190px;position:relative;overflow:hidden;box-shadow:0 7px 0 var(--d),0 18px 34px #141c4f26;background:var(--c);animation:card-in .55s var(--spring) backwards}
.school-app .start-card:nth-child(2){animation-delay:.08s}.school-app .start-card:nth-child(3){animation-delay:.16s}
.school-app .start-card:hover:not(:disabled){transform:translateY(-4px) rotate(-.6deg);background:var(--c);color:#fff;box-shadow:0 11px 0 var(--d),0 24px 40px #141c4f33}
.school-app .start-card:active:not(:disabled){transform:translateY(5px);box-shadow:0 2px 0 var(--d)}
.start-draw{--c:#0066ff;--d:#0044b8}.start-geo{--c:#991747;--d:#6d0f32}.start-3d{--c:#401248;--d:#240a28}
.start-art{font-size:44px;line-height:1;margin-bottom:auto;transition:transform .4s var(--spring);font-weight:700}
.start-card:hover .start-art{transform:scale(1.18) rotate(-6deg)}
.school-app .start-card strong{font-size:19px}.school-app .start-card small{color:#ffffffd9;font-size:13.5px;margin:0}
/* Board */
.school-app #boardWorkspace.board-fullscreen,.school-app #boardWorkspace{background:var(--bg);border:0;border-radius:0;box-shadow:none}
.school-app #boardWorkspace .viewbar{display:flex;flex-wrap:nowrap;align-items:center;gap:8px;padding:9px 12px;background:#fff;border-bottom:1.5px solid var(--line);overflow-x:auto;scrollbar-width:none;min-height:56px}
.school-app #boardWorkspace .viewbar::-webkit-scrollbar{display:none}
.school-app .viewbar button{font-size:13px;min-height:38px;padding:7px 12px;flex:none;white-space:nowrap}
.school-app .viewbar .school-mode-switch{position:relative;display:flex;gap:2px;padding:4px;background:var(--bg);border:0;border-radius:15px;flex:none}
.school-app .school-mode-switch button,.school-app .school-mode-switch button:hover:not(:disabled){position:relative;z-index:1;background:transparent;border:0;color:var(--ink-2);font-size:14px;font-weight:700;padding:7px 16px;border-radius:11px;min-height:36px}
.school-app .school-mode-switch button:hover:not(:disabled){color:var(--blue-d)}
.school-app .school-mode-switch button[aria-pressed=true],.school-app .school-mode-switch button[aria-pressed=true]:hover:not(:disabled){color:#fff;background:transparent;box-shadow:none}
.mode-slider{position:absolute;top:4px;bottom:4px;left:0;border-radius:11px;background:var(--blue);box-shadow:0 3px 0 var(--blue-d);transition:transform .38s var(--spring),width .3s var(--ease),opacity .2s;z-index:0}
.school-app .viewbar .board-save-state,.school-app #boardSaveState{margin-left:auto;flex:none;font-size:12.5px;font-weight:500;color:var(--mint);padding-left:8px;white-space:nowrap;animation:save-in .3s var(--ease)}
.school-app #scene3dMenu[hidden],.school-app #retrySync[hidden]{display:none}
.school-app .toolbar{display:flex;align-items:center;gap:6px;background:#fff;border-bottom:1.5px solid var(--line);padding:6px 12px;min-height:64px}
.school-app #tools.school-tools{gap:2px;flex:none}
.school-app .school-tools>button,.school-app .school-shape-menu>summary,.school-app .school-math-menu>summary,.school-app .toolbar>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:58px;min-height:50px;padding:5px 6px;border:0;border-radius:13px;background:transparent;color:var(--ink-2);font-size:11.5px;font-weight:500;cursor:pointer;list-style:none;transition:transform .2s var(--spring),background-color .15s,color .15s}
.school-app .school-tools svg,.school-app .toolbar svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.school-app .school-tools>button:hover:not(:disabled),.school-app .school-shape-menu>summary:hover,.school-app .school-math-menu>summary:hover,.school-app .toolbar>button:hover:not(:disabled){background:var(--blue-l);color:var(--blue-d);border:0}
.school-app .school-tools>button.selected,.school-app .school-tools>button[aria-pressed=true],.school-app .school-tools>button.selected:hover,.school-app .school-tools>button[aria-pressed=true]:hover{background:var(--blue)!important;color:#fff;box-shadow:0 3px 0 var(--blue-d);animation:tool-pop .34s var(--spring)}
.school-app .school-tool-popup,.school-app .toolbar .drawing-settings{border:1.5px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-l)}
.school-app .school-tool-popup button{font-size:14px;border-radius:var(--r-s);text-align:left;justify-content:flex-start}
.color-swatches{display:flex;gap:5px;align-items:center;flex:none}
.school-app .color-swatches button{width:26px;height:26px;min-height:0;min-width:0;padding:0;border-radius:50%;border:3px solid #fff;background:var(--swatch)!important;box-shadow:0 0 0 1.5px var(--line)}
.school-app .color-swatches button:hover:not(:disabled){transform:scale(1.14)}
.school-app .color-swatches button[aria-pressed=true]{box-shadow:0 0 0 2.5px var(--swatch);transform:scale(1.08)}
.school-app .toolbar>input[type=color]{width:30px;height:30px;padding:2px;border-radius:50%;overflow:hidden;flex:none}
.school-app .toolbar>select{flex:none;padding:6px 8px;min-height:38px}
.school-app .toolbar>i{height:30px;width:1.5px;background:var(--line);flex:none;margin:0 4px}
.school-app .toolbar .board-style-options{margin-left:auto;flex:none}
.school-app .toolbar .board-style-options>summary{font-size:13px;font-weight:500;color:var(--ink-2);padding:9px 12px;border:1.5px solid var(--line);border-radius:var(--r-s);cursor:pointer;background:#fff;list-style:none}
.school-app .drawing-settings label{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%}
.school-app .drawing-settings small{font-size:12px}
.school-app .canvaswrap{background:#fff}
.school-app .boardbadge{display:none}
.board-invite{position:absolute;left:50%;top:44%;display:flex;align-items:center;gap:12px;transform:translate(-50%,-50%);pointer-events:none;color:var(--ink-3);font-size:20px;font-weight:500;animation:invite-in .6s var(--ease)}
.board-invite[hidden]{display:none}
.board-invite img{width:56px;height:auto;opacity:.9;animation:owl-float 4s ease-in-out infinite}
.school-app #boardWorkspace footer{background:#fff;border-top:1.5px solid var(--line);padding:7px 12px;min-height:50px;gap:8px;display:flex;align-items:center}
.school-app #pages{display:flex;gap:5px}
.school-app #pages button{min-width:38px;min-height:36px;padding:4px 8px;font-weight:700}
.school-app #pages button.active,.school-app #pages button[aria-current]{background:var(--blue);border-color:var(--blue);color:#fff;animation:tool-pop .3s var(--spring)}
.school-app #boardWorkspace footer>button{font-size:13px;min-height:36px;padding:6px 10px}
.school-app #deletePage{color:var(--ink-3);border-color:transparent;background:transparent}
.school-app #toolHint{margin-left:auto;color:var(--ink-2);font-size:13px;text-align:right;max-width:58%}
.school-app .selectionbar{background:#fff;border-bottom:1.5px solid var(--line);gap:6px;padding:6px 12px;animation:drop-in .22s var(--ease)}
.school-app .selectionbar button{font-size:13px;padding:6px 10px;min-height:34px}
/* Motion */
.school-app main>section:not(#boardView):not([hidden]){animation:view-in .42s var(--ease)}
.school-app #boardView:not([hidden]){animation:fade-in .3s ease-out}
.school-app #studentCards>*,.school-app .cards>*{animation:card-in .5s var(--spring) backwards}
.school-app #studentCards>:nth-child(2),.school-app .cards>:nth-child(2){animation-delay:.05s}
.school-app #studentCards>:nth-child(3),.school-app .cards>:nth-child(3){animation-delay:.1s}
.school-app #studentCards>:nth-child(4),.school-app .cards>:nth-child(4){animation-delay:.15s}
.school-app #studentCards>:nth-child(n+5),.school-app .cards>:nth-child(n+5){animation-delay:.2s}
body.no-stagger #studentCards>*,body.no-stagger .cards>*{animation:none!important}
.school-app dialog,.school-app dialog[open]{animation:none}
.school-app dialog{border:0;border-radius:var(--r-l);box-shadow:var(--shadow-l);color:var(--ink);padding:24px;opacity:0;transform:translateY(16px) scale(.95);transition:opacity .22s ease-out,transform .3s var(--spring),display .24s allow-discrete,overlay .24s allow-discrete}
.school-app dialog[open]{opacity:1;transform:none}
@starting-style{.school-app dialog[open]{opacity:0;transform:translateY(22px) scale(.92)}}
.school-app dialog::backdrop{background:#10235033;backdrop-filter:blur(5px);opacity:0;transition:opacity .24s,display .24s allow-discrete,overlay .24s allow-discrete}
.school-app dialog[open]::backdrop{opacity:1}
@starting-style{.school-app dialog[open]::backdrop{opacity:0}}
.school-app #toast{display:block;position:fixed;left:50%;bottom:26px;right:auto;top:auto;transform:translate(-50%,20px);background:var(--ink);color:#fff;border:0;border-radius:16px;padding:12px 20px;font-weight:500;box-shadow:var(--shadow-l);opacity:0;pointer-events:none;transition:opacity .22s,transform .34s var(--spring),display .25s allow-discrete;z-index:60;max-width:min(560px,calc(100vw - 32px))}
.school-app #toast[style*="block"]{opacity:1;transform:translate(-50%,0);pointer-events:auto}
.school-app #toast[style*="none"]{display:none}
@starting-style{.school-app #toast[style*="block"]{opacity:0;transform:translate(-50%,20px)}}
.school-app #toast:empty{display:none}
@keyframes view-in{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes fade-in{from{opacity:0}to{opacity:1}}
@keyframes card-in{from{opacity:0;transform:translateY(22px) scale(.96)}to{opacity:1;transform:none}}
@keyframes tool-pop{0%{transform:scale(.86)}60%{transform:scale(1.07)}100%{transform:none}}
@keyframes owl-float{0%,100%{transform:translateY(0) rotate(-1.5deg)}50%{transform:translateY(-7px) rotate(1.5deg)}}
@keyframes invite-in{from{opacity:0;transform:translate(-50%,-40%)}to{opacity:1;transform:translate(-50%,-50%)}}
@keyframes drop-in{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
@keyframes save-in{from{opacity:.2}to{opacity:1}}
/* Auth */
.school-app #authDialog{width:min(900px,calc(100vw - 28px));max-width:none;max-height:calc(100dvh - 28px);padding:0;overflow:auto;display:none}
.school-app #authDialog[open]{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr)}
.school-app #authDialog::backdrop{background:radial-gradient(1000px 700px at 20% 10%,#4d7dff,transparent),#1639a8;backdrop-filter:none}
.auth-hero{position:relative;overflow:hidden;background:linear-gradient(160deg,#0066ff,#0044b8);color:#fff;padding:36px 32px;display:flex;flex-direction:column;justify-content:flex-end;gap:10px;min-height:560px}
.auth-hero img{width:150px;height:auto;margin:auto;animation:owl-float 4.5s ease-in-out infinite;filter:drop-shadow(0 16px 20px #0b225f77);background:#fff;border-radius:38px;padding:14px}
.auth-hero strong{font-size:28px;line-height:1.15}.auth-hero span{color:#d9e4ff;font-size:15px}
.auth-hero i{position:absolute;font-style:normal;font-weight:700;color:#ffffff30;font-size:34px;animation:drift 7s ease-in-out infinite}
.auth-hero i:nth-child(1){left:9%;top:9%}.auth-hero i:nth-child(2){right:12%;top:14%;font-size:44px;animation-delay:-1s}.auth-hero i:nth-child(3){left:18%;top:36%;animation-delay:-2s}.auth-hero i:nth-child(4){right:9%;top:42%;font-size:40px;animation-delay:-3s}.auth-hero i:nth-child(5){left:7%;top:60%;font-size:26px;animation-delay:-4s}.auth-hero i:nth-child(6){right:24%;top:5%;font-size:24px;animation-delay:-5s}
@keyframes drift{0%,100%{transform:translateY(0) rotate(-5deg)}50%{transform:translateY(-14px) rotate(6deg)}}
.auth-main{padding:30px 34px;display:flex;flex-direction:column;gap:10px;min-width:0;overflow:auto}
.school-app .auth-main .auth-brand{display:none}
.school-app .auth-main .auth-start{display:flex;flex-direction:column;align-items:center;gap:1px;width:100%;padding:14px 18px;background:var(--sun);color:#08164c;border:0;border-radius:18px;font-size:18px;font-weight:700;box-shadow:0 6px 0 var(--sun-d)}
.school-app .auth-main .auth-start small{color:#141c4f;font-size:13px;font-weight:500;margin:0}
.school-app .auth-main .auth-start:hover:not(:disabled){background:#7dcffb;color:#08164c;transform:translateY(-2px);box-shadow:0 8px 0 var(--sun-d)}
.school-app .auth-main .auth-start:active:not(:disabled){transform:translateY(4px);box-shadow:0 2px 0 var(--sun-d)}
.auth-or{display:flex;align-items:center;gap:12px;color:var(--ink-3);font-size:13px;margin:6px 0 0}.auth-or::before,.auth-or::after{content:'';flex:1;height:1.5px;background:var(--line)}
.school-app .auth-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;background:var(--bg);padding:4px;border-radius:14px;margin:0;border:0}
.school-app .auth-tabs button,.school-app .auth-tabs button:hover:not(:disabled){border:0;background:transparent;font-size:13px;padding:8px 4px;min-height:38px;color:var(--ink-2);box-shadow:none;border-radius:11px;outline-offset:0}
.school-app .auth-tabs button.active,.school-app .auth-tabs button.active:hover{background:#fff;color:var(--blue-d);font-weight:700;box-shadow:0 2px 8px #141c4f22}
.school-app #authTitle{font-size:21px;margin:8px 0 0}.school-app #authDescription{margin:0;color:var(--ink-2)}
.school-app #authForm{display:flex;flex-direction:column;gap:10px}.school-app #authForm[hidden]{display:none}
.school-app #authForm label{display:flex;flex-direction:column;gap:4px;margin:0}.school-app #authForm label[hidden]{display:none}.school-app #authForm input{width:100%}
.school-app .password-field{display:flex;gap:6px}.school-app .password-field button{flex:none;font-size:13px;padding:0 10px}
.school-app #authError,.school-app #authGuestError{color:var(--coral);margin:0;font-size:13px}.school-app #authError:empty,.school-app #authGuestError:empty,.school-app #passwordHint:empty{display:none}
.school-app .auth-secondary{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}.school-app .auth-secondary[hidden]{display:none}.school-app .auth-secondary button{border:0;background:none;color:var(--blue-d);padding:4px 0;font-size:13px}
/* Cabinet */
.school-app .school-dialog-heading>span,.school-app .school-dialog-heading div>span{color:var(--ink-3);font-size:11px;letter-spacing:.08em}


.school-app .help-tour{display:block;margin:0 0 10px}
/* Tour */
.tour-ring{position:fixed;z-index:70;border-radius:18px;box-shadow:0 0 0 3px var(--sun),0 0 0 9999px #10235055;pointer-events:none;animation:ring-in .36s var(--spring);transition:all .3s var(--ease)}
.tour-card{position:fixed;z-index:71;display:flex;gap:14px;background:#fff;border-radius:22px;padding:16px;box-shadow:var(--shadow-l);color:var(--ink);animation:card-in .42s var(--spring)}
.tour-card img{width:54px;height:auto;align-self:flex-start;flex:none}
.tour-card strong{font-size:17px}.tour-card p{margin:4px 0 12px;color:var(--ink-2)}
.tour-actions{display:flex;justify-content:flex-end;gap:8px}.school-app .tour-skip{border:0;background:none;color:var(--ink-3)}
@keyframes ring-in{from{opacity:0;transform:scale(1.08)}to{opacity:1;transform:none}}
/* Geometry */
#geometryWorkspace{flex:1;min-height:0;overflow:auto;background:var(--bg);padding:14px 16px 18px}
#geometryWorkspace[hidden]{display:none}
.school-app #boardWorkspace.is-geometry .toolbar,.school-app #boardWorkspace.is-geometry .canvaswrap,.school-app #boardWorkspace.is-geometry .selectionbar,.school-app #boardWorkspace.is-geometry .precision-tools,.school-app #boardWorkspace.is-geometry #gridMode,.school-app #boardWorkspace.is-geometry #panView,.school-app #boardWorkspace.is-geometry #zoomOut,.school-app #boardWorkspace.is-geometry #zoomIn,.school-app #boardWorkspace.is-geometry #zoomFit{display:none}
.geo-head{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.geo-tabs{display:flex;gap:6px;flex:1;overflow-x:auto;scrollbar-width:none;padding:2px 2px 6px}
.school-app .geo-tabs button{display:flex;align-items:center;gap:7px;flex:none;font-weight:700;padding:9px 14px;border-radius:14px}
.geo-tabs button span{font-size:18px;line-height:1}
.school-app .geo-tabs button[aria-pressed=true],.school-app .geo-tabs button[aria-pressed=true]:hover:not(:disabled){background:var(--mint);border-color:var(--mint);color:#fff;box-shadow:0 3px 0 #1c8f73;animation:tool-pop .32s var(--spring)}
.geo-history{display:flex;gap:6px}.school-app .geo-history button{width:40px;height:40px;padding:0;font-size:18px}
.geo-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:14px;align-items:start}.geo-grid[hidden]{display:none}
.geo-stage,.geo-side{background:#fff;border:1.5px solid var(--line);border-radius:var(--r-l);box-shadow:var(--shadow)}
.geo-stage{padding:12px;min-width:0;position:relative}
.geo-presets{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px;min-height:0}.geo-presets:empty{display:none}
.school-app .geo-presets button{font-size:13px;padding:6px 11px;border-radius:999px}
#geoSvg{display:block;width:100%;height:auto;max-height:calc(100dvh - 300px);touch-action:none;user-select:none;border-radius:16px;background:#fcfafd}
.geo-handle{cursor:grab}.dragging .geo-handle{cursor:grabbing}.locked .geo-handle{cursor:default}.locked .geo-handle-dot{fill:var(--ink-3)}
.geo-handle-dot{transition:r .18s var(--spring);filter:drop-shadow(0 2px 3px #0044b877)}
.geo-handle:hover .geo-handle-dot{r:10.5px}
.geo-draw{stroke-dasharray:1;stroke-dashoffset:1;animation:geo-draw .65s var(--ease) forwards}
@keyframes geo-draw{to{stroke-dashoffset:0}}
.geo-stage-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;color:var(--ink-3);font-size:13px;margin-top:8px}.geo-stage-foot label{display:flex;align-items:center;gap:7px}
.geo-side{padding:16px;display:flex;flex-direction:column;gap:14px;min-width:0}
.geo-kind{font-size:17px;font-weight:700}
.geo-values{display:grid;grid-template-columns:1fr 1fr;gap:6px}.geo-values[hidden]{display:none}
.geo-values div{display:flex;justify-content:space-between;align-items:baseline;gap:6px;background:var(--bg);padding:7px 10px;border-radius:10px;font-size:13px;color:var(--ink-2);min-width:0}
.geo-values div.on{grid-column:1/-1;background:color-mix(in srgb,var(--dot) 12%,white);color:var(--dot);font-weight:700;animation:card-in .4s var(--spring)}
.geo-values b{color:var(--ink);font-variant-numeric:tabular-nums;white-space:nowrap}.geo-values .on b{color:inherit}



.geo-formulas{display:flex;flex-direction:column;gap:18px}.geo-formulas[hidden]{display:none}.geo-formulas h3{margin:0 0 8px}.geo-formulas section>div{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px}
.geo-formulas article{background:#fff;border:1.5px solid var(--line);border-radius:var(--r);padding:12px 14px;animation:card-in .45s var(--spring) backwards}
.geo-formulas article span{color:var(--ink-3);font-size:12px}.geo-formulas article p{margin:3px 0 0;font-size:16px;font-weight:500}
/* Tasks and practice */
.study-tasks{display:flex;flex-direction:column;gap:9px;border-top:1.5px solid var(--line);padding-top:12px}
.study-tasks h4{margin:0;font-size:15px}.study-tasks label{display:flex;flex-direction:column;gap:3px}.study-tasks textarea,.study-tasks input,.study-tasks select{width:100%}
.task-error{color:var(--coral);font-size:13px;margin:0}.task-error:empty,.task-exact:empty{display:none}.task-exact{color:var(--mint)!important;margin:0}
.task-list{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-direction:column;gap:8px}
.task-list li{display:flex;flex-direction:column;gap:5px;background:var(--bg);padding:10px;border-radius:12px;font-size:13px;animation:card-in .4s var(--spring)}
.task-text{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.school-app .task-del{align-self:flex-start;border:0;background:none;color:var(--coral);padding:0;font-size:13px}.school-app .task-stale{background:#edf5ff;border-color:var(--sun);font-size:12.5px;padding:6px 8px}
.practice-host{position:absolute;left:14px;bottom:14px;z-index:6;width:min(380px,calc(100% - 28px));max-height:calc(100% - 28px);overflow:visible}.practice-host[hidden]{display:none}
#geoPractice{position:static;width:100%;margin-top:10px}
.practice-card{position:relative;background:#fff;border:1.5px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-l);animation:card-in .45s var(--spring)}
.practice-card.solved{border-color:var(--mint)}
.school-app .practice-head,.school-app .practice-head:hover:not(:disabled){display:flex;align-items:center;gap:9px;width:100%;background:transparent;border:0;color:var(--ink);text-align:left;padding:10px 12px;font-size:15px}
.practice-badge{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--sun);color:#08164c;font-weight:700;flex:none;transition:background-color .2s}
.solved .practice-badge{background:var(--mint);color:#fff;animation:tool-pop .4s var(--spring)}
.practice-chevron{margin-left:auto;color:var(--ink-3);transition:transform .25s var(--ease)}.collapsed .practice-chevron{transform:rotate(180deg)}
.practice-body{padding:0 12px 12px;display:flex;flex-direction:column;gap:9px;max-height:min(46dvh,420px);overflow:auto}
.practice-prompt{margin:0;font-size:15px}.practice-form{display:flex;align-items:center;gap:7px}.practice-form input{flex:1;min-width:0}.practice-unit{font-weight:700}
.school-app .practice-form .primary{padding:9px 14px;flex:none}
.practice-feedback{margin:0;font-weight:700;font-size:14px;min-height:0}.practice-feedback:empty{display:none}.practice-feedback.good{color:#1c8f73;animation:tool-pop .4s var(--spring)}.practice-feedback.bad{color:var(--coral)}
.practice-extra{display:flex;flex-wrap:wrap;gap:6px}.practice-extra:empty{display:none}.school-app .practice-extra button{font-size:13px;padding:6px 10px}.practice-reveal[hidden]{display:none}.practice-hint{margin:0;background:#edf5ff;padding:8px 10px;border-radius:10px;font-size:14px;animation:drop-in .25s var(--ease)}
.practice-nav{display:flex;justify-content:space-between}.school-app .practice-nav button{font-size:13px;padding:6px 10px}
.practice-confetti{position:absolute;left:50%;top:40%;width:9px;height:9px;border-radius:2px;pointer-events:none;z-index:2}
/* 3D study panel */
.school-app #scene3dControls,.school-app #scene3dPanel{background:#fff;border-bottom:1.5px solid var(--line)}
.school-app .scene3d-mode-group button[aria-pressed=true]{background:var(--blue-l);border-color:var(--blue);color:var(--blue-d)}
.school-app .scene3d-card{border-radius:var(--r);transition:transform .25s var(--spring),box-shadow .2s,border-color .2s}
.school-app .scene3d-card:hover:not(:disabled){transform:translateY(-3px);box-shadow:var(--shadow)}
.school-app #scene3dStudyOpen{padding:8px 13px;white-space:nowrap}
.study-panel{position:absolute;top:12px;right:12px;bottom:12px;width:min(340px,calc(100% - 24px));z-index:7;background:#fff;border:1.5px solid var(--line);border-radius:var(--r-l);box-shadow:var(--shadow-l);padding:14px;overflow:auto;display:flex;flex-direction:column;gap:11px;animation:panel-in .38s var(--spring)}
.study-panel[hidden]{display:none}
@keyframes panel-in{from{opacity:0;transform:translateX(26px)}to{opacity:1;transform:none}}
.study-head{display:flex;align-items:center;justify-content:space-between}.study-head h3{margin:0;font-size:18px}.school-app .study-close{width:34px;height:34px;padding:0;font-size:20px;line-height:1;border-radius:50%}
.study-tools{display:flex;flex-wrap:wrap;gap:5px}.school-app .study-tools button{font-size:13px;padding:7px 10px;border-radius:10px;font-weight:500}
.school-app .study-tools button[aria-pressed=true],.school-app .study-tools button[aria-pressed=true]:hover:not(:disabled){background:var(--grape);border-color:var(--grape);color:#fff;animation:tool-pop .3s var(--spring)}
.study-step{background:#f6eef3;border-radius:14px;padding:10px;animation:drop-in .25s var(--ease)}.study-step p{margin:0 0 8px;font-size:13.5px}
.study-chips{display:flex;flex-wrap:wrap;gap:5px}.school-app .study-chips button{position:relative;min-width:40px;min-height:36px;padding:4px 7px;font-weight:700;border-radius:10px}
.school-app .study-chips button[aria-pressed=true]{background:var(--sun);border-color:var(--sun-d);color:#08164c;animation:tool-pop .28s var(--spring)}
.study-chips button[data-order]::after{content:attr(data-order);position:absolute;right:-5px;top:-5px;width:16px;height:16px;border-radius:50%;background:var(--ink);color:#fff;font-size:10px;line-height:16px}
.study-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.study-list li{display:flex;align-items:center;gap:8px;background:var(--bg);border-radius:11px;padding:7px 9px;font-size:13.5px;animation:card-in .4s var(--spring)}
.study-list li::before{content:'';width:10px;height:10px;border-radius:50%;background:var(--dot);flex:none}
.study-name{flex:1;min-width:0}.study-list b{white-space:nowrap}.school-app .study-del{border:0;background:none;color:var(--ink-3);width:24px;height:24px;padding:0;font-size:17px;flex:none}
.study-empty{margin:0;color:var(--ink-2);font-size:13.5px}.school-app .study-off{border:0;background:none;color:var(--ink-3);font-size:13px;align-self:flex-start;padding:2px 0}
/* Tablet & phone */
@media(max-width:1000px){.geo-grid{grid-template-columns:1fr}.school-app .school-tools>button,.school-app .school-shape-menu>summary,.school-app .school-math-menu>summary,.school-app .toolbar>button{min-width:50px}#geoSvg{max-height:none}}
@media(max-width:760px),(max-height:500px){
body.school-app{--navigation-width:0px;--tabs:66px}
.school-app #appSidebar,body.school-app.navigation-collapsed #appSidebar{inset:auto 0 0 0;width:100%;height:calc(var(--tabs) + env(safe-area-inset-bottom));flex-direction:row;padding:5px 6px calc(5px + env(safe-area-inset-bottom));border-right:0;border-top:1.5px solid var(--line);overflow:visible}
.school-app #appSidebar .brand,body.school-app.navigation-collapsed #appSidebar .brand{display:none}
.school-app #mainNavigation{flex-direction:row;width:100%;gap:2px}
.school-app #appSidebar .nav,body.school-app.navigation-collapsed #appSidebar .nav{flex:1;min-width:0;min-height:0;height:100%;padding:3px 1px}

body.school-app:not(.guest)>main{padding-bottom:var(--tabs)}
body.school-app.board-focused:not(.guest) #boardWorkspace.board-fullscreen,body.school-app.board-focused #boardWorkspace.board-fullscreen{left:0;width:100%}
body.school-app.board-focused:not(.guest) #boardWorkspace.board-fullscreen{bottom:calc(var(--tabs) + env(safe-area-inset-bottom));height:auto}
.school-app main>header{padding:16px 16px 6px;flex-wrap:wrap}.school-app main>header h1{font-size:25px}
.school-app main>section{padding:10px 16px 28px}
.school-app #boardView{padding:0}
.start-cards{grid-template-columns:1fr;gap:14px}.school-app .start-card{flex-direction:row;flex-wrap:wrap;align-items:center;min-height:0;padding:16px}.start-art{font-size:34px;margin:0 8px 0 0}.school-app .start-card strong{flex:1 1 60%}.school-app .start-card small{flex:1 0 100%}
.school-app .school-empty{padding:6px 16px 20px!important;margin-top:0}.school-app .start-owl{width:62px}
.school-app #studentCards{grid-template-columns:1fr}
.school-app .directory-filters,.school-app .material-filters{grid-template-columns:1fr 1fr;display:grid}.school-app .directory-filters label:first-child,.school-app .material-filters label:first-child{grid-column:1/-1}
.school-app .directory-filters select,.school-app .material-filters select,.school-app .directory-filters input,.school-app .material-filters input{width:100%}
/* board chrome */
.school-app #boardWorkspace .viewbar{padding:6px 8px;min-height:50px}
.school-app .viewbar #boardExport,.school-app #panView{display:none}
.school-app .school-mode-switch button,.school-app .school-mode-switch button:hover:not(:disabled){padding:6px 11px;font-size:13px}
.school-app .toolbar{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding:4px 6px;min-height:58px}
.school-app .toolbar .board-style-options{margin-left:0}.school-app #tools.school-tools{overflow:visible;flex:none;padding:0}
.school-app #toolHint{display:none}.school-app #boardWorkspace footer{min-height:46px;padding:5px 8px;overflow-x:auto}
.school-app #boardWorkspace footer>button{flex:none}
#geometryWorkspace{padding:10px 10px 16px}.geo-stage{padding:8px;border-radius:var(--r)}.geo-stage-foot span{display:none}
.school-app .auth-tabs button{font-size:12.5px}
.school-app #authDialog[open]{display:block;width:calc(100vw - 20px);max-height:calc(100dvh - 20px)}
.auth-hero{min-height:0;padding:16px 18px;flex-direction:row;align-items:center;gap:12px;justify-content:flex-start}.auth-hero img{width:50px;margin:0;padding:5px;border-radius:14px;order:-1}.auth-hero strong{font-size:18px}.auth-hero span,.auth-hero i{display:none}.auth-hero strong br{display:none}
.auth-main{padding:18px;overflow:visible}
.study-panel{top:auto;left:8px;right:8px;bottom:8px;width:auto;max-height:66%;animation:sheet-in .36s var(--spring)}
.practice-host{left:8px;bottom:8px;width:calc(100% - 16px)}.practice-body{max-height:34dvh}
.tour-card{left:12px!important;right:12px;width:auto!important}
}
@keyframes sheet-in{from{opacity:0;transform:translateY(30px)}to{opacity:1;transform:none}}
@media(max-height:620px){.auth-hero img{width:90px}.auth-hero{min-height:0}}
@media(prefers-reduced-motion:reduce){.school-app *,.school-app *::before,.school-app *::after,.tour-card,.tour-ring{animation-duration:.01ms!important;animation-delay:0s!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}.geo-draw{stroke-dashoffset:0}}
/* Sidebar states win over legacy rules */
.school-app #appSidebar .nav.active,.school-app #appSidebar .nav.active:hover{color:#fff!important}
.school-app #appSidebar .nav.active svg{stroke:#fff}
.school-app #appSidebar .nav .nav-label{display:block}
.board-invite span{white-space:nowrap}
@media(max-width:760px),(max-height:500px){
.school-app #appSidebar .nav,body.school-app.navigation-collapsed #appSidebar .nav{justify-content:center;gap:2px;box-sizing:border-box;max-height:100%}
.school-app #appSidebar .nav svg{width:21px;height:21px}
.school-app #appSidebar .nav .nav-label{font-size:10.5px}
.school-app #mainNavigation{height:100%;align-items:stretch}
.school-app #scene3dControls{display:flex;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:6px;padding:6px 8px}
.school-app #scene3dControls[hidden],.school-app #scene3dPanel[hidden]{display:none}
.school-app #scene3dControls>*{flex:none;width:auto}
.school-app #scene3dControls .scene3d-mode-group{display:flex;flex-wrap:nowrap;gap:4px}
.school-app #scene3dControls .scene3d-mode-group button{flex:none;width:auto;min-height:42px;padding:4px 10px}
.school-app #scene3dControls .scene3d-mode-group small,.school-app .scene3d-camera-picker{font-size:0}
.school-app .scene3d-camera-picker select{font-size:13px}
.school-app #scene3dPanel{padding:6px 8px}
.school-app .scene3d-palette-row{display:flex;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:6px}
.school-app .scene3d-palette-row>strong,.school-app .scene3d-new-color{display:none}
.school-app .scene3d-school-shapes{display:flex;flex-wrap:nowrap;gap:5px}
.school-app .scene3d-school-shapes .scene3d-card{flex:none;width:76px;min-height:0;padding:3px}
.school-app .scene3d-card img{width:44px;height:30px}
.school-app .scene3d-selection-row{display:flex;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:6px;align-items:center;margin-top:5px}
.school-app .scene3d-object-picker{display:none}
.school-app #scene3dSelection{display:flex;flex-wrap:nowrap;gap:6px;flex:none;align-items:center}
.school-app #scene3dSelection[hidden]{display:none}
.school-app #scene3dStatus{display:none}
.school-app #scene3dDimensions{display:flex;flex-wrap:nowrap;gap:5px}
.school-app #scene3dDimensions input{width:60px}
.study-panel{position:fixed;left:8px;right:8px;bottom:calc(var(--tabs,66px) + 54px);top:auto;max-height:58dvh}
body.guest .study-panel{bottom:54px}
}
.school-app #boardWorkspace{grid-template-columns:minmax(0,1fr)}
body.school-app{overflow-x:clip}
.school-app #boardWorkspace,.school-app .boardarea,.school-app .canvaswrap{overflow:clip}
body.guest .scene3d-palette-row{display:none!important}

/* Round two */
.practice-progress{height:8px;background:var(--bg);border-radius:9px;overflow:hidden}.practice-progress i{display:block;height:100%;background:var(--mint);border-radius:9px;transition:width .5s var(--spring)}
.practice-allset{margin:0;font-weight:700;color:#1c8f73;animation:tool-pop .45s var(--spring)}
.practice-keys{display:flex;gap:4px}.school-app .practice-keys button{flex:1;min-width:0;min-height:34px;padding:2px;font-weight:700;font-size:15px;border-radius:9px}
.study-ready{background:#edf5ff;border-radius:14px;padding:9px 11px}.study-ready summary{cursor:pointer;font-weight:700;list-style:none}.study-ready summary::-webkit-details-marker{display:none}
.study-ready>div{display:flex;flex-direction:column;gap:5px;margin-top:8px;animation:drop-in .25s var(--ease)}.school-app .study-ready button{font-size:13px;padding:7px 10px;text-align:left;background:#fff}
.geo-handle:focus{outline:none}.geo-handle:focus-visible .geo-handle-dot{stroke:var(--sun);stroke-width:4}
/* Bigger 3D canvas: one compact control row */
@media(min-width:761px){.school-app #scene3dControls{display:flex;flex-wrap:nowrap;align-items:center;gap:8px;padding:7px 12px}.school-app #scene3dControls[hidden]{display:none}.school-app #scene3dControls .scene3d-mode-group{display:flex;flex:none;width:auto;gap:4px}.school-app #scene3dControls .scene3d-mode-group button{flex:none;width:auto;min-height:40px;padding:4px 12px}.school-app #scene3dControls .scene3d-mode-group small{display:none}.school-app .scene3d-view-group,.school-app .scene3d-top-actions{flex:none;display:flex;align-items:center;gap:6px;margin:0}.school-app .scene3d-view-group{margin-left:auto}.school-app .scene3d-tool-icon{width:26px;height:26px}}

/* Board round three */
.width-dots{display:flex;align-items:center;gap:2px;flex:none}
.school-app .width-dots button{display:grid;place-items:center;width:30px;height:34px;min-height:0;padding:0;border:0;background:transparent;border-radius:9px}
.width-dots button::before{content:'';width:var(--dot);height:var(--dot);border-radius:50%;background:var(--ink-3);transition:background-color .15s,transform .25s var(--spring)}
.school-app .width-dots button:hover:not(:disabled){background:var(--blue-l)}
.width-dots button[aria-pressed=true]{background:var(--blue-l)!important}.width-dots button[aria-pressed=true]::before{background:var(--blue);transform:scale(1.12)}
.school-app .toolbar>#width{display:none}
.school-app .canvaswrap .selectionbar{position:absolute;left:50%;top:10px;transform:translateX(-50%);z-index:6;display:none;flex-wrap:wrap;justify-content:center;width:max-content;max-width:calc(100% - 20px);border:1.5px solid var(--line);border-radius:16px;box-shadow:var(--shadow-l);padding:6px 8px;animation:bar-in .28s var(--spring)}
.school-app #boardWorkspace[data-has-selection=true] .canvaswrap .selectionbar{display:flex}
@keyframes bar-in{from{opacity:0;transform:translate(-50%,-10px) scale(.97)}to{opacity:1;transform:translateX(-50%)}}
.school-app .selectionbar #selectionCount{font-weight:700;font-size:13px;padding:0 4px}
.school-app #deleteObject:not(:disabled){color:var(--coral)}
.stroke-tidy{position:absolute;left:50%;top:18px;transform:translateX(-50%);padding:6px 14px;border-radius:999px;background:var(--ink);color:#fff;font-weight:700;font-size:14px;opacity:0;pointer-events:none;z-index:6}
.stroke-tidy.show{animation:tidy 1s var(--ease)}
@keyframes tidy{0%{opacity:0;transform:translate(-50%,8px) scale(.9)}18%{opacity:1;transform:translate(-50%,0) scale(1.04)}75%{opacity:1;transform:translate(-50%,0)}100%{opacity:0;transform:translate(-50%,-6px)}}
.school-app #boardFocus[aria-pressed=true]{background:var(--blue);color:#fff;border-color:var(--blue)}
.school-app .zen-exit{display:none}
body.board-zen.school-app{--navigation-width:0px}
body.board-zen #appSidebar,body.board-zen #boardWorkspace .viewbar,body.board-zen #boardWorkspace footer,body.board-zen .board-style-options{display:none!important}
body.board-zen.school-app .zen-exit{display:block;position:fixed;right:12px;bottom:12px;z-index:25;box-shadow:var(--shadow);animation:drop-in .3s var(--ease)}
body.board-zen.school-app #boardWorkspace.board-fullscreen{left:0;width:100%;bottom:0}
@media(prefers-reduced-motion:reduce){.stroke-tidy.show{animation-duration:1s!important}}
@media(max-width:760px),(max-height:500px){.school-app .width-dots button{width:27px}.school-app .canvaswrap .selectionbar{left:8px;right:8px;width:auto;max-width:none;transform:none;flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;animation:drop-in .25s var(--ease)}.school-app .selectionbar button{flex:none}}

/* Audit fixes */
.school-app .school-tool-popup,.school-app .toolbar .drawing-settings{position:fixed;z-index:40;background:#fff}
#boardHelpTitle:focus{outline:none}

.school-app .board-tool-dialog{width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto}
.school-app .board-tool-dialog #inspectorContent section>h3,.school-app .board-tool-dialog .eyebrow,.school-app .board-tool-dialog .localnote{display:none}
.school-app .board-tool-dialog #inspectorContent,.school-app .board-tool-dialog #inspectorContent section{width:100%;padding:0;background:none;border:0;max-height:none;overflow:visible}
.school-app .board-tool-dialog section label{display:flex;flex-direction:column;gap:4px;margin-bottom:10px}.school-app .board-tool-dialog section :is(select,textarea,input:not([type=checkbox])){width:100%}
.school-app .board-tool-dialog .equation{display:flex;align-items:center;gap:8px}.school-app .board-tool-dialog .presets{display:flex;gap:6px;margin:10px 0}
.school-app .board-tool-dialog .lesson-tool-actions{display:flex;gap:8px;margin-top:8px}.school-app .board-tool-actions{display:flex;justify-content:flex-end;margin-top:12px}
.school-app .board-tool-dialog #latexPreview{min-height:80px}
.school-app .toolbar{flex-wrap:nowrap}.school-app .toolbar .board-style-options>summary{width:40px;height:40px;padding:0;display:grid;place-items:center;font-size:18px}
.school-app #tools.school-tools{min-width:0}
@media(max-width:1240px){.school-app .school-tools>button,.school-app .school-shape-menu>summary,.school-app .school-math-menu>summary,.school-app .toolbar>button{min-width:46px;font-size:10.5px}.school-app .color-swatches button{width:22px;height:22px}.school-app .width-dots button{width:25px}}
@media(max-width:1060px){.school-app .toolbar{overflow-x:auto;scrollbar-width:none}.school-app .toolbar>*{flex:none}}
/* Simple 3D */
.school-app #scene3dControls{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 12px}.school-app #scene3dControls[hidden]{display:none}
.school-app #scene3dControls .scene3d-mode-group,.school-app #scene3dPanel,.school-app .scene3d-camera-picker,.school-app .scene3d-palette-row>strong,.school-app .scene3d-new-color,.school-app .scene3d-object-picker,.school-app #scene3dStatus,.school-app #scene3dMouseHint{display:none}
.school-app .scene3d-palette-row{display:flex;flex:0 1 auto;min-width:0;margin:0;padding:0;border:0;background:none}
.school-app #scene3dShapes.scene3d-school-shapes{display:flex;flex-wrap:nowrap;gap:4px;overflow-x:auto;scrollbar-width:none}
.school-app #scene3dShapes .scene3d-card{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:none;width:auto;min-width:64px;height:58px;min-height:0;padding:3px 7px;gap:1px;border:0;background:transparent;border-radius:13px;font-size:11px;font-weight:500;color:var(--ink-2)}
.school-app #scene3dShapes .scene3d-card:hover:not(:disabled){background:var(--blue-l);color:var(--blue-d);box-shadow:none;transform:translateY(-2px)}
.school-app #scene3dShapes .scene3d-card img{width:40px;height:30px;object-fit:contain;transition:transform .3s var(--spring)}.school-app #scene3dShapes .scene3d-card:hover img{transform:scale(1.14) rotate(-4deg)}
.school-app .scene3d-view-group{display:flex;align-items:center;gap:6px;margin:0 0 0 auto;flex:none}



.school-app #scene3dFit{font-size:13px;min-height:38px;padding:6px 10px}
.school-app .scene3d-top-actions{display:flex;gap:4px;flex:none;margin:0}.school-app .scene3d-top-actions button{width:38px;height:38px;min-height:0;padding:0;display:grid;place-items:center;font-size:17px}
.school-app .scene3d-card-panel{position:absolute;left:12px;top:12px;z-index:5;display:none;flex-direction:column;align-items:stretch;gap:9px;width:236px;margin:0;padding:12px;background:#fff;border:1.5px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-l);animation:card-panel-in .3s var(--spring)}
.school-app .scene3d-card-panel:has(#scene3dSelection:not([hidden])){display:flex}
@keyframes card-panel-in{from{opacity:0;transform:translateX(-14px) scale(.97)}to{opacity:1;transform:none}}
.scene3d-card-title{font-size:16px}
.school-app #scene3dSelection{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.school-app #scene3dSelection[hidden]{display:none}
.school-app #scene3dDimensions{display:flex;flex-direction:column;gap:6px;width:100%}
.school-app #scene3dDimensions label,.school-app #scene3dSelection>label{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;margin:0}
.school-app #scene3dDimensions input{width:76px;padding:5px 8px}
.school-app #scene3dStudyOpen{order:3;width:100%;white-space:normal}
.school-app #scene3dDuplicate,.school-app #scene3dDelete{order:4;flex:1;font-size:13px;padding:7px 6px}.school-app #scene3dDelete{color:var(--coral)}
.school-app #scene3dError{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);margin:0;z-index:6;background:#f9edf2;color:var(--coral);padding:6px 12px;border-radius:10px}.school-app #scene3dError:empty{display:none}
@media(max-width:760px),(max-height:500px){
.school-app #scene3dControls{flex-wrap:wrap;overflow:visible;padding:4px 6px;gap:4px}.school-app .scene3d-palette-row{width:100%;flex:1 0 100%}
.school-app #scene3dShapes .scene3d-card{min-width:56px;height:50px;font-size:10px}.school-app #scene3dShapes .scene3d-card img{width:30px;height:24px}
.school-app .scene3d-view-group{margin:0;min-width:0;flex:1;overflow-x:auto;scrollbar-width:none}.school-app #scene3dFit{display:none}.school-app .scene3d-top-actions button{width:34px;height:34px}
.school-app .scene3d-card-panel{left:6px;right:6px;top:6px;width:auto;flex-direction:row;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding:7px;align-items:center}
.scene3d-card-title{display:none}.school-app #scene3dSelection{flex-wrap:nowrap;flex:none}.school-app #scene3dDimensions{flex-direction:row;width:auto;flex:none}.school-app #scene3dDimensions label,.school-app #scene3dSelection>label{width:auto;white-space:nowrap}.school-app #scene3dDimensions input{width:54px}.school-app #scene3dStudyOpen{order:0;width:auto;white-space:nowrap;padding:7px 10px}.school-app #scene3dDuplicate,.school-app #scene3dDelete{flex:none;order:5}
}

/* 01Математика brand: tokens come from the project's site styles */
.school-app #appSidebar,body.school-app.navigation-collapsed #appSidebar{background:var(--brand-gradient);border:0}
.school-app .nav-pill{background:var(--blue);box-shadow:0 4px 0 #08164c}
.school-app #appSidebar .nav,body.school-app.navigation-collapsed #appSidebar .nav{color:#ffffffc4}
.school-app #appSidebar .nav svg{stroke:currentColor}
.school-app #appSidebar .nav:hover{background:#ffffff1c;color:#fff}
.school-app #authDialog::backdrop{background:var(--brand-wave);backdrop-filter:none}
.auth-hero{background:var(--brand-gradient)}
.auth-hero img{background:none;padding:0;border-radius:0;filter:drop-shadow(0 16px 24px #000a)}
.auth-hero .auth-wordmark{width:190px;height:auto;margin:0 0 4px;animation:none;filter:none}
.school-app .auth-main .auth-start{background:var(--blue);color:#fff;box-shadow:0 6px 0 var(--blue-d)}
.school-app .auth-main .auth-start small{color:#ffffffd9}
.school-app .auth-main .auth-start:hover:not(:disabled){background:#1f7bff;color:#fff;box-shadow:0 8px 0 var(--blue-d)}
.school-app .auth-main .auth-start:active:not(:disabled){box-shadow:0 2px 0 var(--blue-d)}
.school-app #authSubmit{background:var(--ink);box-shadow:0 4px 0 #08164c}.school-app #authSubmit:hover:not(:disabled){background:#222c6a;box-shadow:0 5px 0 #08164c}
.start-art svg{width:44px;height:44px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;display:block}
.school-app .geo-tabs button[aria-pressed=true],.school-app .geo-tabs button[aria-pressed=true]:hover:not(:disabled){background:var(--blue);border-color:var(--blue);box-shadow:0 3px 0 var(--blue-d)}
.school-app .study-chips button[aria-pressed=true]{color:#08164c}
.tour-ring{box-shadow:0 0 0 3px var(--sun),0 0 0 9999px #08164c66}
/* Fit and small refinements */
.school-app .toolbar{gap:4px;padding:6px 8px}.school-app .toolbar>i{margin:0 1px}
.school-app .school-tools>button,.school-app .school-shape-menu>summary,.school-app .school-math-menu>summary,.school-app .toolbar>button{min-width:52px}
.school-app .drawing-settings label:has(#fillEnabled){justify-content:flex-start}
.school-app #scene3dSelectionColor{width:38px;height:30px;padding:2px;flex:none}

#inviteStudent{flex:none}.school-app #inviteStudent{font-weight:700;color:var(--blue);border-color:#a9cdfb;background:var(--blue-l)}

.school-app #guestLink{width:100%;min-height:70px;margin-top:10px}.school-app #guestLink:placeholder-shown{display:none}
.school-app #shareDialog{width:min(520px,calc(100vw - 24px))}.school-app #copyGuest{width:100%;margin-top:6px}.school-app #copyGuest[hidden]{display:none}
.tour-card ol{margin:0 0 12px;padding-left:18px;color:var(--ink-2)}.tour-card li{margin:2px 0}
@media(max-width:1280px){.school-app #inviteStudent{padding-inline:9px}}
@media(max-width:760px),(max-height:500px){.school-app #appSidebar,body.school-app.navigation-collapsed #appSidebar{background:var(--brand-wave);border:0}}
@media(max-width:760px),(max-height:500px){.auth-hero strong{display:none}.auth-hero .auth-wordmark{width:170px;margin:0;display:block}.auth-hero .auth-owl{width:46px}}

/* Showpieces: net, spin, worked steps, graph lab */
.scene3d-motion{display:flex;flex-wrap:wrap;gap:6px;width:100%;order:2}.school-app .scene3d-motion button{flex:1;font-size:13px;padding:7px 6px}.school-app .scene3d-motion button[hidden],.scene3d-motion input[hidden]{display:none}
.school-app .scene3d-motion button[aria-pressed=true]{background:var(--blue-l);color:var(--blue-d);border-color:#a9cdfb}
.school-app .scene3d-motion input[type=range]{width:100%;padding:0;border:0;accent-color:var(--blue);box-shadow:none}
.practice-steps{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px;font-size:14px}.practice-steps li{animation:card-in .4s var(--spring)}.practice-steps-open[hidden]{display:none}
.graph-preview{display:block;width:100%;height:auto;border:1.5px solid var(--line);border-radius:14px;margin:6px 0 10px}
.graph-sliders{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}.graph-sliders:empty{display:none}
.school-app .board-tool-dialog .graph-sliders label{display:grid;grid-template-columns:18px 1fr 40px;align-items:center;gap:8px;margin:0}.graph-sliders b{color:var(--ink)}.graph-sliders output{text-align:right;font-variant-numeric:tabular-nums;color:var(--ink)}
.school-app .board-tool-dialog .graph-sliders input[type=range]{padding:0;border:0;box-shadow:none;accent-color:var(--blue);width:100%}
.school-app .board-tool-dialog .presets{flex-wrap:wrap}
@media(max-width:760px),(max-height:500px){.scene3d-motion{width:auto;flex-wrap:nowrap;flex:none;order:4}.school-app .scene3d-motion button{flex:none;padding:7px 10px;white-space:nowrap}.scene3d-motion input[type=range]{width:90px}}
.school-app #boardWorkspace:not(.is-3d) .scene3d-card-panel,.school-app #boardWorkspace:not(.is-3d) #scene3dError{display:none}
@media(min-width:761px){#scene3dPractice{left:262px;width:min(380px,calc(100% - 276px))}}

/* ---------- Touch devices ---------- */
.school-app{-webkit-tap-highlight-color:transparent}
.school-app button,.school-app summary,.school-app a,.school-app label,.school-app select{touch-action:manipulation}
.mobile-sheet{display:none}
#mobileMore{display:none}
@media(pointer:coarse){
.school-app input:not([type=range]):not([type=checkbox]):not([type=color]),.school-app select,.school-app textarea{font-size:16px}
.school-app button,.school-app summary{-webkit-user-select:none;user-select:none}
.school-app dialog::backdrop{backdrop-filter:none;background:#08164c66}
.school-app #authDialog::backdrop{background:var(--brand-wave)}
.school-app .password-field button,.school-app .auth-secondary button{min-height:44px}
.school-app input[type=checkbox]{width:22px;height:22px}
.school-app input[type=range]{height:32px}
.school-app .color-swatches button{width:32px;height:32px}.school-app .width-dots button{width:36px;height:44px}.school-app .toolbar>input[type=color]{width:36px;height:36px}
.school-app .study-ready summary{padding:8px 0}.school-app .study-del{width:36px;height:36px}.school-app .task-del{min-height:36px}
.school-app :is(.studentcard,.cards article,.start-card,.scene3d-card):hover{transform:none}
.school-app :is(dialog,.studentcard,.cards article,.geo-presets,.study-tools,.study-chips,.practice-card,.scene3d-motion,.scene3d-card-panel) button:not(.primary):not([aria-pressed=true]):hover:not(:disabled){background:#fff;border-color:var(--line);color:var(--ink)}
}
/* ---------- Phone: the board fills the screen ---------- */
@media(max-width:760px),(max-height:500px){
html,body.school-app{overscroll-behavior:none}
.school-app main>header,.school-app main>section{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
body.school-app{--navigation-width:0px;--tabs:62px}
.school-app #appSidebar,body.school-app.navigation-collapsed #appSidebar{inset:auto 0 0 0;width:100%;height:calc(var(--tabs) + env(safe-area-inset-bottom));flex-direction:row;padding:5px 6px calc(5px + env(safe-area-inset-bottom));overflow:visible}
.school-app #appSidebar .brand,body.school-app.navigation-collapsed #appSidebar .brand{display:none}
.school-app #mainNavigation{flex-direction:row;width:100%;height:100%;gap:2px}
.school-app #appSidebar .nav,body.school-app.navigation-collapsed #appSidebar .nav{flex:1;min-width:0;min-height:0;height:100%;padding:3px 1px;gap:2px}

body.school-app:not(.guest)>main{padding-bottom:calc(var(--tabs) + env(safe-area-inset-bottom))}
body.board-focused.school-app #appSidebar{display:none!important}
body.board-focused.school-app>main{padding-bottom:0}
body.school-app.board-focused #boardWorkspace.board-fullscreen,body.school-app.board-focused:not(.guest) #boardWorkspace.board-fullscreen{left:0;right:0;top:0;bottom:0;width:100%;height:100dvh;max-height:100dvh;padding:env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left)}
.school-app #boardWorkspace .boardarea{display:flex;flex-direction:column;position:relative;height:100%;min-height:0}
.school-app #boardWorkspace .viewbar{order:0;min-height:50px;padding:5px 8px;gap:6px;overflow:visible;flex-wrap:nowrap}
.school-app .viewbar .school-mode-switch{flex:1;min-width:0}
.school-app .school-mode-switch button,.school-app .school-mode-switch button:hover:not(:disabled){flex:1;padding:6px 3px;min-width:0;font-size:13px;min-height:38px}
.school-app #mobileMore{display:grid;place-items:center;flex:none;width:44px;height:44px;min-height:0;padding:0;font-size:22px;line-height:1;font-weight:700;border-radius:13px}
.school-app #boardSaveState{position:absolute;left:50%;top:54px;transform:translateX(-50%);margin:0;padding:3px 10px;background:#fff;border-radius:999px;box-shadow:var(--shadow);z-index:7;font-size:12px;max-width:80vw}
.school-app #boardSaveState:empty,.school-app #boardSaveState.is-saved{display:none}
.school-app #retrySync{position:absolute;left:8px;right:8px;top:54px;z-index:8;white-space:normal}
.school-app .canvaswrap{order:1;flex:1;min-height:0}
.school-app #boardWorkspace .toolbar{order:3;flex:none;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;min-height:62px;padding:4px 6px calc(4px + env(safe-area-inset-bottom));border-top:1.5px solid var(--line);border-bottom:0;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
.school-app #boardWorkspace .toolbar::-webkit-scrollbar{display:none}
.school-app #boardWorkspace .toolbar>*{flex:none}
.school-app .school-tools>button,.school-app .school-shape-menu>summary,.school-app .school-math-menu>summary,.school-app .toolbar>button{min-width:54px;min-height:52px;font-size:11px}
.school-app #boardWorkspace .precision-tools{order:2;flex:none;max-height:38dvh}
/* Undo stays under the thumb without scrolling the toolbar */
.school-app #boardWorkspace .toolbar>#undo,.school-app #boardWorkspace .toolbar>#redo{position:fixed;top:calc(env(safe-area-inset-top) + 58px);z-index:6;width:44px;height:44px;min-width:0;min-height:0;padding:0;background:#fff;border:1.5px solid var(--line);border-radius:50%;box-shadow:var(--shadow);color:var(--ink);display:grid;place-items:center}
.school-app #boardWorkspace .toolbar>#undo{right:calc(env(safe-area-inset-right) + 60px)}.school-app #boardWorkspace .toolbar>#redo{right:calc(env(safe-area-inset-right) + 10px)}
.school-app #boardWorkspace.is-3d .toolbar>#undo,.school-app #boardWorkspace.is-3d .toolbar>#redo,.school-app #boardWorkspace.is-geometry .toolbar>#undo,.school-app #boardWorkspace.is-geometry .toolbar>#redo{display:none}
/* Pages float over the sheet */
.school-app #boardWorkspace footer{position:absolute;left:8px;bottom:70px;z-index:5;min-height:0;max-width:calc(100% - 16px);padding:4px;gap:4px;background:#ffffffee;border:1.5px solid var(--line);border-radius:14px;box-shadow:var(--shadow);overflow-x:auto;scrollbar-width:none}
.school-app #boardWorkspace.is-3d footer,.school-app #boardWorkspace.is-geometry footer{bottom:calc(8px + env(safe-area-inset-bottom))}
.school-app #boardWorkspace footer #toolHint,.school-app #boardWorkspace footer #deletePage{display:none}
.school-app #boardWorkspace footer>button,.school-app #pages button{min-height:36px;min-width:38px;padding:2px 9px;font-size:13px}
.school-app #boardWorkspace footer>#addPage{font-size:0}.school-app #boardWorkspace footer>#addPage::before{content:'+';font-size:20px;line-height:1}
.school-app #boardWorkspace[data-active-tool=pen] footer{opacity:.92}
.school-app .canvaswrap .selectionbar{left:8px;right:108px;width:auto;max-width:none;top:8px;transform:none;flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;scrollbar-width:none}
.school-app .canvaswrap .selectionbar>*{flex:none}.school-app .selectionbar button{min-height:40px}
.board-invite{font-size:17px;top:40%}.board-invite img{width:44px}
/* Bottom sheet */
.school-app .mobile-sheet{position:fixed;inset:auto 0 0 0;margin:0;width:100%;max-width:none;max-height:82dvh;overflow:auto;border-radius:24px 24px 0 0;padding:8px 16px calc(14px + env(safe-area-inset-bottom));transform:translateY(100%);opacity:1;transition:transform .34s var(--ease),display .34s allow-discrete,overlay .34s allow-discrete}
.school-app .mobile-sheet[open]{display:block;transform:none}
@starting-style{.school-app .mobile-sheet[open]{transform:translateY(100%)}}
.sheet-grip{display:block;width:44px;height:5px;margin:2px auto 12px;border-radius:9px;background:var(--line)}
.mobile-sheet h3{margin:14px 0 8px;font-size:14px;color:var(--ink-2);font-weight:500}
.sheet-actions,.sheet-nav>div{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.school-app .mobile-sheet button{min-height:48px;font-size:15px;display:flex;align-items:center;justify-content:center;width:100%}
.sheet-zoom{display:grid;grid-template-columns:56px 1fr 56px;gap:8px}
.school-app .sheet-close{margin-top:14px;background:var(--bg);border-color:transparent}
.school-app #inviteStudent{grid-column:1/-1;background:var(--blue);color:#fff;border-color:var(--blue);font-weight:700}
.school-app .mobile-sheet #boardFocus{font-size:0}.school-app .mobile-sheet #boardFocus::after{content:'Только доска';font-size:15px}
.school-app .mobile-sheet #boardHelp{font-size:0}.school-app .mobile-sheet #boardHelp::after{content:'Подсказки';font-size:15px}
/* 3D */
.school-app #scene3dControls{order:0;flex:none;display:flex;flex-wrap:wrap;gap:4px;padding:4px 6px}
.school-app .scene3d-palette-row{width:100%;flex:1 0 100%}
.school-app #scene3dShapes .scene3d-card{min-width:62px;height:52px;font-size:10.5px}
.school-app .scene3d-view-group{margin:0;flex:1;min-width:0;overflow-x:auto;scrollbar-width:none}
.school-app #scene3dFit{flex:none;min-height:40px}.school-app .scene3d-views{flex:none}
.school-app .scene3d-views button{min-height:38px;padding:4px 9px;font-size:13px}
.school-app .scene3d-top-actions button{width:42px;height:42px}
.school-app .scene3d-card-panel{left:6px;right:6px;top:auto;bottom:calc(58px + env(safe-area-inset-bottom));width:auto;flex-direction:row;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding:6px;align-items:center}
.school-app .scene3d-card-panel #scene3dSelection{flex:none;flex-wrap:nowrap;width:auto;align-items:center}
.school-app .scene3d-card-panel button{min-height:44px;flex:none;white-space:nowrap}
.school-app #scene3dStudyOpen{order:-2;width:auto;padding:7px 12px}
.school-app .scene3d-motion{order:-1;flex:none;width:auto;flex-wrap:nowrap}.school-app .scene3d-motion input[type=range]{display:none}
.school-app #scene3dDimensions{order:0;flex-direction:row;width:auto;flex:none}.school-app #scene3dDimensions label,.school-app #scene3dSelection>label{width:auto;white-space:nowrap;font-size:12px}.school-app #scene3dDimensions input{width:64px;min-height:40px}
.school-app #scene3dSelectionColor{height:40px}
.scene3d-card-title{display:none}
.study-panel{position:fixed;left:8px;right:8px;top:auto;bottom:calc(8px + env(safe-area-inset-bottom));width:auto;max-height:60dvh;z-index:9;overscroll-behavior:contain}
.study-panel.picking{max-height:38dvh}.study-panel.picking :is(.study-list,.study-ready,.study-tasks,.study-off,.study-empty){display:none}
.school-app .study-tools button,.school-app .study-chips button{min-height:44px;min-width:44px}
.school-app .study-tools{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}.school-app .study-tools button{flex:none}
.practice-host{left:8px;right:8px;bottom:calc(112px + env(safe-area-inset-bottom));width:auto}
#scene3dPractice{left:8px;width:auto;right:8px;bottom:calc(112px + env(safe-area-inset-bottom))}
.practice-body{max-height:34dvh}.school-app .practice-keys button{min-height:42px}
#geoPractice{position:static}
/* Geometry */
#geometryWorkspace{order:1;padding:8px 8px calc(64px + env(safe-area-inset-bottom));overscroll-behavior:contain}
.geo-grid{grid-template-columns:1fr}.geo-tabs{padding-bottom:4px}.school-app .geo-tabs button{min-height:44px;padding:6px 11px}.school-app .geo-history button{width:44px;height:44px}.geo-history{flex:none}
.school-app .geo-presets{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}.school-app .geo-presets button{flex:none;min-height:40px}.geo-stage-foot span{display:none}
#geoSvg{max-height:none}.school-app .geo-toggles button{min-height:42px;min-width:48px}
.geo-handle-dot{r:10px}
/* Tools dialogs become sheets */
.school-app .board-tool-dialog{position:fixed;inset:auto 0 0 0;margin:0;width:100%;max-width:none;max-height:90dvh;border-radius:24px 24px 0 0;padding-bottom:calc(16px + env(safe-area-inset-bottom));transform:translateY(40px)}
.school-app .board-tool-dialog[open]{transform:none}
.tour-card{left:12px!important;right:12px;width:auto!important;max-height:58dvh;overflow:auto}
}
/* Landscape phones: keep every pixel of height for the sheet */
@media(max-height:500px){
.school-app #boardWorkspace .viewbar{min-height:44px;padding:3px 8px}.school-app #mobileMore{height:38px}.school-app .school-mode-switch button,.school-app .school-mode-switch button:hover:not(:disabled){min-height:32px}.school-app .viewbar .school-mode-switch{max-width:420px;margin-right:auto}
.school-app #boardWorkspace .toolbar{min-height:54px;padding-block:2px}.school-app .school-tools>button,.school-app .school-shape-menu>summary,.school-app .school-math-menu>summary,.school-app .toolbar>button{min-height:48px}
.school-app #boardWorkspace footer{bottom:60px}
.school-app #boardWorkspace .toolbar>#undo,.school-app #boardWorkspace .toolbar>#redo{top:50px}
.school-app #scene3dControls{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}.school-app #scene3dControls>*{flex:none!important;width:auto!important}.school-app .scene3d-palette-row{width:auto}.school-app .scene3d-view-group{overflow:visible}.school-app #scene3dShapes.scene3d-school-shapes{overflow:visible}
.school-app #scene3dShapes .scene3d-card{height:44px;min-width:54px}.school-app #scene3dShapes .scene3d-card img{height:20px}
.geo-grid{grid-template-columns:minmax(0,1fr) 280px}#geoSvg{max-height:calc(100dvh - 120px)}
.study-panel{left:auto;right:8px;top:8px;bottom:8px;width:320px;max-height:none}.study-panel.picking{max-height:none}
.practice-host,#scene3dPractice{right:auto;left:8px;top:8px;bottom:auto;width:320px;max-height:calc(100% - 16px)}.practice-body{max-height:48dvh}
.school-app .school-empty{padding-top:0!important}.start-cards{grid-template-columns:repeat(3,1fr)}.school-app .start-card{flex-direction:column;align-items:flex-start;padding:12px}.school-app .start-card small{display:none}.start-art{margin:0}.school-app .start-owl{display:none}
.auth-hero{display:none}.school-app #authDialog[open]{display:block}
.school-app main>header{padding-top:10px}
}
@media(min-width:761px) and (min-height:501px) and (pointer:coarse){
.school-app .viewbar button{min-height:44px}.school-app #zoomOut,.school-app #zoomIn,.school-app #boardHelp,.school-app #boardFocus{min-width:44px}
.school-app #boardWorkspace .viewbar{overflow-x:auto}
}

/* 3D controls on a phone: one line under the figures */
@media(max-width:760px),(max-height:500px){.school-app #scene3dControls>.scene3d-view-group{flex:1 1 0!important;min-width:0}.school-app #scene3dControls{flex-wrap:wrap}}
@media(max-height:500px){.school-app #scene3dControls{flex-wrap:nowrap}.school-app #scene3dControls>.scene3d-view-group{flex:none!important}}
/* My boards */
.school-app .cabinet-dialog{width:min(480px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;padding:20px;display:none;background:#fff}
.school-app .cabinet-dialog[open]{display:flex;flex-direction:column;gap:12px}
.school-app .cabinet-dialog .school-dialog-heading{display:flex;align-items:center;justify-content:space-between;margin:0}.school-app .cabinet-dialog h2{margin:0;font-size:22px}
.boards-list{display:flex;flex-direction:column;gap:6px;max-height:38dvh;overflow:auto}.boards-list p{margin:6px 0;color:var(--ink-2)}
.school-app .board-row{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:50px;padding:10px 14px;text-align:left;font-size:15px;font-weight:500;border-radius:14px}
.board-row span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.school-app .board-row small{margin:0;flex:none;color:var(--blue);font-weight:700;font-size:12px}
.school-app .board-row[aria-current=true],.school-app .board-row[aria-current=true]:hover:not(:disabled){background:var(--blue-l);border-color:var(--blue);color:var(--ink)}
.school-app .boards-new #newBoard{width:100%;min-height:46px}
.boards-current{border-top:1.5px solid var(--line);padding-top:12px;display:flex;flex-direction:column;gap:10px}.boards-current h3{margin:0;font-size:15px}
.boards-fields{display:flex;flex-direction:column;gap:8px}.boards-fields>div{display:flex;flex-direction:column;gap:3px}.boards-fields>div[hidden]{display:none}.boards-fields input,.boards-fields select{width:100%}
.boards-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.boards-actions>div{display:contents}.school-app .boards-actions button{min-height:44px;width:100%;font-size:14px}
.school-app #shareBtn{grid-column:1/-1;background:var(--blue-l);border-color:#a9cdfb;color:var(--blue);font-weight:700}
.school-app #archiveBoard{border:0;background:none;color:var(--ink-3);font-size:13px;padding:4px 0}
.school-app .cabinet-backup{border:0;padding:0;background:none;font-size:13px;color:var(--ink-2)}.cabinet-backup summary{cursor:pointer;padding:4px 0}.cabinet-backup p{margin:6px 0}
/* Geometry side panel */
.geo-side{gap:12px;padding:14px;position:sticky;top:0}
.geo-kind{font-size:17px;line-height:1.25;animation:drop-in .25s var(--ease)}
.geo-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px}.geo-stats[hidden]{display:none}
.geo-stats div{background:var(--blue-l);border-radius:14px;padding:9px 12px;min-width:0}.geo-stats span{display:block;font-size:12px;color:var(--ink-2)}.geo-stats b{display:block;font-size:22px;line-height:1.2;font-variant-numeric:tabular-nums}
.geo-rows{display:flex;flex-direction:column;gap:4px}.geo-rows h4{margin:0 0 4px;font-size:13px;font-weight:700;color:var(--ink)}
.geo-row{border-radius:12px;padding:5px 8px;transition:background-color .2s}.geo-row.on{background:color-mix(in srgb,var(--dot) 9%,white)}
.geo-row-head{display:flex;align-items:center;gap:8px;min-height:36px}.geo-dot{width:10px;height:10px;border-radius:50%;background:var(--dot);flex:none}.geo-row-name{flex:1;min-width:0;font-size:14px;line-height:1.2}
.geo-chips{display:flex;gap:3px;flex:none}.school-app .geo-chips button{width:32px;height:32px;min-height:0;padding:0;font-size:13px;font-weight:700;border-radius:9px}
.school-app .geo-chips button[aria-pressed=true],.school-app .geo-chips button[aria-pressed=true]:hover:not(:disabled){background:var(--dot);border-color:var(--dot);color:#fff;animation:tool-pop .28s var(--spring)}
.school-app .geo-switch,.school-app .geo-switch:hover:not(:disabled){position:relative;flex:none;width:42px;height:24px;min-height:0;padding:0;border:0;border-radius:999px;background:var(--line);transition:background-color .2s}
.school-app .geo-switch[aria-pressed=true],.school-app .geo-switch[aria-pressed=true]:hover:not(:disabled){background:var(--dot)}
.geo-switch i{position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #141c4f55;transition:transform .28s var(--spring)}.geo-switch[aria-pressed=true] i{transform:translateX(18px)}
.geo-reading{padding:0 0 3px 18px;font-size:14px;font-weight:700;color:var(--dot);font-variant-numeric:tabular-nums;animation:drop-in .22s var(--ease)}.geo-reading[hidden]{display:none}
.geo-fold{border-top:1.5px solid var(--line);padding-top:8px}.geo-fold[hidden]{display:none}.geo-fold>summary{cursor:pointer;font-size:14px;font-weight:700;padding:5px 0;list-style:none;display:flex;align-items:center}.geo-fold>summary::-webkit-details-marker{display:none}.geo-fold>summary::after{content:'⌄';margin-left:auto;color:var(--ink-3);transition:transform .25s var(--ease)}.geo-fold[open]>summary::after{transform:rotate(180deg)}
.geo-fold .geo-values{margin-top:6px}.geo-fold .study-tasks{border:0;padding-top:6px}
@media(pointer:coarse){.school-app .geo-chips button{width:40px;height:40px}.school-app .geo-switch,.school-app .geo-switch:hover:not(:disabled){width:48px;height:28px}.geo-switch i{width:22px;height:22px}.geo-switch[aria-pressed=true] i{transform:translateX(20px)}.geo-row-head{min-height:44px}.geo-fold>summary{min-height:44px}}
@media(max-width:1000px){.geo-side{position:static}}

/* Storage choice */
.storage-choice>span{display:block;font-size:13px;color:var(--ink-2);margin-bottom:5px}.storage-choice>div{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.school-app .storage-choice button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;padding:9px 11px;border-radius:13px;min-height:74px}
.storage-choice strong{font-size:13.5px}.school-app .storage-choice small{margin:0;font-size:11.5px;line-height:1.25;color:var(--ink-2)}
.school-app .storage-choice button[aria-checked=true],.school-app .storage-choice button[aria-checked=true]:hover:not(:disabled){background:var(--blue-l);border-color:var(--blue);color:var(--ink)}
.geo-fold .study-tasks>h4{display:none}
/* Laser pointer and who is here */
.laser-layer{position:absolute;inset:0;width:100%;height:100%;z-index:4;pointer-events:none}.laser-layer.active{pointer-events:auto;touch-action:none;cursor:crosshair}
.school-app .laser-button{position:absolute;right:12px;bottom:12px;z-index:6;display:grid;place-items:center;width:46px;height:46px;min-height:0;padding:0;border-radius:50%;background:#fff;box-shadow:var(--shadow);color:var(--ink)}.laser-button[hidden]{display:none!important}
.laser-button svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.school-app .laser-button[aria-pressed=true],.school-app .laser-button[aria-pressed=true]:hover:not(:disabled){background:var(--burgundy);border-color:var(--burgundy);color:#fff;animation:tool-pop .3s var(--spring);box-shadow:0 0 0 5px #99174733}
.presence-badge{position:absolute;right:66px;bottom:20px;z-index:5;padding:5px 12px 5px 24px;background:#fff;border:1.5px solid var(--line);border-radius:999px;font-size:13px;color:var(--ink);box-shadow:var(--shadow);animation:drop-in .3s var(--ease);white-space:nowrap}
.presence-badge::before{content:'';position:absolute;left:10px;top:50%;width:8px;height:8px;margin-top:-4px;border-radius:50%;background:var(--mint);animation:presence-pulse 2s ease-in-out infinite}.presence-badge[hidden]{display:none}
@keyframes presence-pulse{0%,100%{box-shadow:0 0 0 0 #1c8f7366}50%{box-shadow:0 0 0 5px #1c8f7300}}
.school-app .boards-fields label{margin:0}.school-app .boards-fields .titlefield{margin:0;padding:0;gap:3px;display:flex;flex-direction:column}
@media(max-width:760px),(max-height:500px){#scene3dPractice~.laser-button,.school-app .laser-button{bottom:12px}.school-app #boardWorkspace.is-3d .laser-button{bottom:calc(64px + env(safe-area-inset-bottom))}.presence-badge{right:8px;left:auto;bottom:auto;top:8px;font-size:12px}.school-app #boardWorkspace:not(.is-3d):not(.is-geometry) .presence-badge{top:60px}}

/* Invite dialog */
.school-app #shareDialog{width:min(460px,calc(100vw - 24px));padding:20px;display:none}.school-app #shareDialog[open]{display:flex;flex-direction:column;gap:12px}
#shareTitle:focus{outline:none}.school-app #shareDialog .school-dialog-heading{display:flex;align-items:center;justify-content:space-between;margin:0}.school-app #shareDialog h2{margin:0;font-size:22px}
.share-intro{margin:0;color:var(--ink-2)}
.share-roles{display:grid;grid-template-columns:1fr 1fr;gap:8px}.school-app .share-roles button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;padding:11px 12px;border-radius:14px;min-height:64px}
.school-app .share-roles small{margin:0;color:var(--ink-2);font-size:12.5px}.school-app .share-roles button[aria-checked=true],.school-app .share-roles button[aria-checked=true]:hover:not(:disabled){background:var(--blue-l);border-color:var(--blue);color:var(--ink)}
.school-app #createGuest{width:100%;min-height:46px}
#guestResult{display:flex;flex-direction:column;gap:8px;animation:drop-in .28s var(--ease)}#guestResult[hidden]{display:none}.school-app #guestLink{width:100%;min-height:44px;margin:0;color:var(--ink-2);text-overflow:ellipsis}
.share-send{display:flex;gap:8px}.school-app .share-send #copyGuest{flex:1;margin:0;min-height:46px;width:auto}.school-app #sendGuest{flex:none;min-height:46px}.school-app #sendGuest[hidden]{display:none}#guestResult small{margin:0}
#guestLinks summary{cursor:pointer;font-size:13px;color:var(--ink-2);padding:3px 0}#guestLinks[hidden]{display:none}
.guest-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 0;border-top:1.5px solid var(--line);font-size:13px}.school-app .guest-row button{flex:none;font-size:13px;padding:5px 10px;color:var(--coral);min-height:36px}
.storage-choice em{font-style:normal;color:var(--ink-3)}
.school-app #shareDialog:has(#guestResult:not([hidden])) #createGuest{order:5;background:#fff;color:var(--ink);border:1.5px solid var(--line);box-shadow:none;font-weight:500}
.share-note{margin:0;padding:9px 11px;background:#f9edf2;color:var(--burgundy);border-radius:11px;font-size:13px}

/* Guests never see teacher controls, wherever those controls live */
body.guest .teacher-only,body.guest #inviteStudent,body.guest #schoolBoardContext,body.guest .sheet-nav{display:none!important}
.practice-body>*{flex-shrink:0}
.school-app .mobile-sheet #boardHelp{font-weight:500}
@media(max-width:760px),(max-height:500px){.practice-card:not(:focus-within) .practice-keys{display:none}.practice-prompt{font-size:14px}.practice-body{gap:7px}}

/* 3D menu: tabs with figures, tools and views */
.school-app #scene3dControls,.school-app #scene3dControls[class]{display:flex;flex-wrap:nowrap;align-items:center;gap:10px;padding:7px 12px;min-height:72px;background:#fff;border-bottom:1.5px solid var(--line)}
.school-app #scene3dControls[hidden]{display:none}




.scene3d-pane{flex:1 1 0;min-width:0;display:flex;align-items:center;gap:6px;overflow-x:auto;scrollbar-width:none;animation:pane-in .28s var(--ease)}.scene3d-pane::-webkit-scrollbar{display:none}.scene3d-pane[hidden]{display:none}
@keyframes pane-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
.school-app #scene3dControls>.scene3d-pane{flex:1 1 0!important;width:auto!important}
.school-app .scene3d-pane .scene3d-palette-row{width:auto;flex:none}
.school-app #scene3dShapes.scene3d-school-shapes{overflow:visible;gap:5px}
.school-app #scene3dShapes .scene3d-card{width:auto;min-width:70px;height:58px;padding:3px 6px;background:var(--bg);border:1.5px solid transparent;border-radius:14px;color:var(--ink);font-size:11px}
.school-app #scene3dShapes .scene3d-card:hover:not(:disabled){background:var(--blue-l);border-color:#a9cdfb;transform:translateY(-2px);box-shadow:var(--shadow)}
.school-app #scene3dShapes .scene3d-card:active:not(:disabled){transform:scale(.95)}

.school-app .scene3d-tool,.school-app .scene3d-tool:hover:not(:disabled){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;flex:none;min-width:58px;height:56px;min-height:0;padding:4px 5px;border:0;border-radius:13px;background:transparent;color:var(--ink-2);font-size:11px;font-weight:500}
.school-app .scene3d-tool:hover:not(:disabled){background:var(--blue-l);color:var(--blue-d)}.scene3d-tool[hidden]{display:none!important}
.scene3d-tool svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:transform .25s var(--spring)}.scene3d-tool:hover svg{transform:scale(1.12)}
.school-app .scene3d-tool[aria-pressed=true],.school-app .scene3d-tool[aria-pressed=true]:hover:not(:disabled){background:var(--blue);color:#fff;box-shadow:0 3px 0 var(--blue-d);animation:tool-pop .3s var(--spring)}
.school-app .scene3d-pane .scene3d-view-group{margin:0;flex:none;overflow:visible}
.school-app #scene3dControls>.scene3d-top-actions{flex:none;margin-left:auto}
.school-app #scene3dControls>.scene3d-view-group{display:none}
@media(max-width:760px),(max-height:500px){
.school-app #scene3dControls,.school-app #scene3dControls[class]{flex-wrap:wrap;gap:5px;padding:5px 6px;min-height:0;overflow:visible}

.school-app #scene3dControls>.scene3d-top-actions{order:1;margin:0}.school-app .scene3d-top-actions button{width:40px;height:40px}
.school-app #scene3dControls>.scene3d-pane{order:2;flex:1 0 100%!important;width:100%!important}
.school-app .scene3d-tool,.school-app .scene3d-tool:hover:not(:disabled){min-width:58px;height:52px}
}
@media(max-height:500px){.school-app #scene3dControls,.school-app #scene3dControls[class]{flex-wrap:nowrap}.school-app #scene3dControls>.scene3d-pane{flex:1 1 0!important;width:auto!important;order:1}.school-app #scene3dControls>.scene3d-top-actions{order:2}.school-app .scene3d-tool,.school-app .scene3d-tool:hover:not(:disabled){height:46px}}
/* The tools menu owns net and spin; the card keeps only the fold slider */
.school-app .scene3d-motion>button{display:none}
.school-app .scene3d-motion input[type=range]:not([hidden]){display:block!important;width:100%!important}
@media(max-width:760px),(max-height:500px){.school-app .scene3d-card-panel{right:62px}.school-app .scene3d-motion input[type=range]:not([hidden]){width:90px!important}}
.school-app .cards article a[target=_blank],.school-app .studentcard a[target=_blank]{display:inline-flex;align-items:center;min-height:40px;padding:6px 14px;border-radius:var(--r-s);background:var(--blue-l);color:var(--blue);font-weight:700;text-decoration:none}
.school-app .cards article,.school-app .studentcard{display:flex;flex-direction:column;gap:6px}.school-app .cards article h3,.school-app .studentcard h3{margin:0}.school-app .cards article p{margin:0;color:var(--ink-2)}

/* Native dialog close controls stay usable independently of animation code. */
.school-app .share-close-form{margin:0;display:flex;flex:0 0 auto}
.school-app #closeShare{display:grid;place-items:center;width:36px;height:36px;min-height:36px;padding:0;flex-shrink:0;background:var(--surface-2,#eef2f8);border:0;border-radius:10px}
.school-app #closeShare svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;pointer-events:none}
.share-footer{display:flex;justify-content:flex-end;margin:0;padding-top:12px;border-top:1px solid var(--line);order:10}
#shareStatus,#shareError{margin:0;font-size:13px;line-height:1.4}#shareStatus:empty,#shareError:empty{display:none}#shareError{color:var(--coral,#b53f58)}

/* Compact navigation still needs visible names below its icons. */
.school-app #appSidebar .nav .nav-label,
body.school-app.navigation-collapsed #appSidebar .nav .nav-label{
    display:block;max-width:100%;opacity:1;overflow:visible;
    font-size:11px;line-height:1.3;font-weight:500;white-space:nowrap;
    transition:color .16s ease;
}
.school-app #appSidebar .nav,
body.school-app.navigation-collapsed #appSidebar .nav{gap:6px;padding:10px 3px;min-height:68px}
.school-app #appSidebar .nav svg{width:23px;height:23px}
.school-app #appSidebar .nav.active .nav-label{font-weight:700}
@media(max-width:760px),(max-height:500px){
    .school-app #appSidebar .nav,body.school-app.navigation-collapsed #appSidebar .nav{min-height:0;padding:3px 1px;gap:3px}
    .school-app #appSidebar .nav svg{width:21px;height:21px}
    .school-app #appSidebar .nav .nav-label,body.school-app.navigation-collapsed #appSidebar .nav .nav-label{font-size:10px;line-height:1.2}
}

.school-app #appSidebar #accountLink{margin-top:auto;text-decoration:none}
.school-app #appSidebar #accountLink[hidden]{display:none}
.sheet-nav .sheet-account{display:flex;align-items:center;justify-content:center;min-height:44px;padding:0 14px;border-radius:12px;background:var(--blue-l,#e8f1ff);color:var(--blue-d,#0052cc);font-weight:600;text-decoration:none}

/* 3D toolbar: the same look as the board's */
.school-app #scene3dControls{display:flex;align-items:center;gap:6px;padding:4px 12px;min-height:62px;flex-wrap:nowrap}
.school-app #scene3dControls[hidden]{display:none}
.school-app .scene3d-bar{display:flex;align-items:center;gap:2px;flex:1 1 0;min-width:0;overflow-x:auto;scrollbar-width:none}
.school-app .scene3d-bar::-webkit-scrollbar{display:none}
.school-app .scene3d-bar>*{flex:none}
.school-app .scene3d-bar>i{width:1.5px;height:30px;margin:0 5px;background:var(--line);border-radius:1px}
.school-app .scene3d-bar>button[hidden]{display:none}
.school-app .scene3d-bar .color-swatches{margin-right:4px}
.school-app .ink-picker{width:26px;height:26px;padding:0;border:0;border-radius:7px;background:none;flex:none;cursor:pointer}
.school-app .scene3d-menu .school-tool-popup{position:fixed;z-index:60}
.school-app .scene3d-menu .school-tool-popup[id=scene3dShapes],.school-app #scene3dShapes.school-tool-popup{display:grid;grid-template-columns:1fr 1fr;gap:4px;overflow:visible auto;flex-wrap:initial}
.school-app #scene3dShapes .scene3d-card,.school-app .scene3d-menu .school-tool-popup>button{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:10px;width:auto;min-height:44px;padding:8px 12px;border:1.5px solid var(--line);border-radius:13px;background:#fff;color:var(--ink);font-size:14px;font-weight:500;text-align:left}
.school-app #scene3dShapes .scene3d-card:hover,.school-app .scene3d-menu .school-tool-popup>button:hover:not(:disabled){background:var(--blue-l);border-color:var(--blue);color:var(--blue-d)}
.school-app .scene3d-menu .school-tool-popup>button[aria-pressed=true]{background:var(--blue);border-color:var(--blue);color:#fff}
.school-app .scene3d-menu .school-tool-popup svg{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.school-app .scene3d-menu .school-tool-popup>button[hidden]{display:none}
.school-app .scene3d-menu>.scene3d-view-popup{display:grid;grid-template-columns:1fr 1fr;gap:4px}
body.guest .scene3d-shapes-menu{display:none!important}
.school-app .scene3d-motion{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--ink-2);margin:0}
.school-app .scene3d-motion[hidden]{display:none}.school-app .scene3d-motion input{flex:1;min-width:0}
.school-app .scene3d-top-actions{flex:none}
@media(max-width:760px),(max-height:500px){
.school-app #scene3dControls{order:3;flex:none;flex-wrap:nowrap;overflow:visible;min-height:62px;padding:4px 6px calc(4px + env(safe-area-inset-bottom));border-top:1.5px solid var(--line);border-bottom:0}
.school-app .scene3d-top-actions{position:fixed;top:calc(env(safe-area-inset-top) + 58px);right:calc(env(safe-area-inset-right) + 10px);z-index:6}
.school-app .scene3d-top-actions button{width:44px;height:44px;background:#fff}
.school-app .scene3d-top-actions #scene3dAdvanced{display:none}
}
@media(max-width:760px),(max-height:500px){.school-app #boardWorkspace.is-3d footer{bottom:calc(70px + env(safe-area-inset-bottom))}.school-app #boardWorkspace.is-3d .laser-button{bottom:calc(70px + env(safe-area-inset-bottom))}}
.school-app .scene3d-bar summary:focus-visible,.school-app .scene3d-bar>button:focus-visible{outline-offset:-3px}
.school-app .school-tool-popup button{gap:8px;padding-inline:8px;font-size:13.5px;min-width:0}.school-app #scene3dShapes .scene3d-card{padding-inline:8px;gap:8px;font-size:13.5px}

.geo-ink-bar{display:flex;align-items:center;gap:2px;margin-bottom:8px;padding-bottom:6px;border-bottom:1.5px solid var(--line);overflow-x:auto;scrollbar-width:none}
.geo-ink-bar::-webkit-scrollbar{display:none}.geo-ink-bar>*{flex:none}.geo-ink-bar>i{width:1.5px;height:28px;margin:0 5px;background:var(--line)}
#geoSvg.inking{cursor:crosshair}#geoSvg.inking .geo-handle{pointer-events:none}
.geo-reading{overflow-wrap:anywhere}

.school-app .storage-toggle{display:inline-flex;align-items:center;gap:6px;flex:none;margin-left:auto;min-height:36px;padding:4px 10px;border:1.5px solid var(--line);border-radius:999px;background:#fff;font-size:12.5px;font-weight:500;color:var(--ink-3);cursor:pointer}
.school-app .storage-toggle:hover:not(:disabled){border-color:var(--blue);background:#fff}
.storage-toggle i{position:relative;display:block;width:30px;height:18px;border-radius:999px;background:var(--blue);transition:background-color .2s var(--ease)}
.storage-toggle b{position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #141c4f55;transition:transform .25s var(--spring)}
.storage-toggle[aria-checked=true] b{transform:translateX(12px)}.storage-toggle[aria-checked=true] i{background:var(--plum,#401248)}
.storage-toggle[aria-checked=false] [data-side=server],.storage-toggle[aria-checked=true] [data-side=local]{color:var(--ink);font-weight:700}
.school-app .viewbar .storage-toggle + .board-save-state,.school-app .viewbar .storage-toggle + #boardSaveState{margin-left:0}
body.guest .storage-toggle{display:none!important}
.mobile-sheet .storage-toggle{width:100%;justify-content:center;min-height:48px;font-size:14px}
@media(max-width:1400px){.school-app #panView{max-width:42px;overflow:hidden;white-space:nowrap;padding-inline:9px}.school-app #boardSaveState{max-width:18px;overflow:hidden;padding-left:4px}}
@media(max-width:1240px) and (min-width:761px){.school-app #boardWorkspace .viewbar{overflow-x:auto;scrollbar-width:none}.school-app #boardWorkspace .viewbar>*{flex:none}.storage-toggle[aria-checked=false] [data-side=local],.storage-toggle[aria-checked=true] [data-side=server]{display:none}}
/* Menu buttons: same size, one line, text always inside */
.school-app .school-tool-popup{box-sizing:border-box}
.school-app .school-shape-menu>.school-tool-popup,.school-app #scene3dShapes.school-tool-popup{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:8px;overflow-x:hidden}
.school-app .school-shape-menu>.school-tool-popup>button,.school-app #scene3dShapes .scene3d-card{box-sizing:border-box;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;width:100%;min-width:0;min-height:46px;margin:0;padding:6px 10px;font-size:13.5px;font-weight:500;line-height:1.15;text-align:left}
.school-app .school-shape-menu>.school-tool-popup>button svg,.school-app #scene3dShapes .scene3d-card svg{flex:none;width:22px;height:22px}
.school-app .school-shape-menu>.school-tool-popup>button span,.school-app #scene3dShapes .scene3d-card span{min-width:0;white-space:normal;overflow-wrap:normal;font:inherit}
.school-app .school-shape-menu>.school-tool-popup>button:last-child:nth-child(odd):not([hidden]),.school-app #scene3dShapes .scene3d-card:last-child:nth-child(odd){grid-column:1/-1}
@media(max-width:380px){.school-app .school-shape-menu>.school-tool-popup,.school-app #scene3dShapes.school-tool-popup{grid-template-columns:minmax(0,1fr)}}
.school-app #scene3dShapes.school-tool-popup .scene3d-card{width:100%;max-width:none;justify-self:stretch}
.school-app #scene3dShapes.school-tool-popup .scene3d-card{height:auto;min-height:46px;flex-direction:row;justify-content:flex-start}
.school-app #appSidebar .brand{cursor:default}.school-app #appSidebar .brand:hover .brandowl{transform:none}
body.student-account :is(#inviteStudent,#shareBtn,#studentsNav,#lessonsNav,.sheet-nav [data-section=studentsNav],.sheet-nav [data-section=lessonsNav]){display:none!important}
.school-app #boardWorkspace .precision-tools{position:absolute;top:8px;left:50%;transform:translateX(-50%);z-index:5;width:max-content;max-width:calc(100% - 16px);margin:0;padding:0;border:0;background:none;display:flex;gap:6px;pointer-events:none}
.school-app #boardWorkspace .precision-tools>*{pointer-events:auto;background:#fff;border:1.5px solid var(--line);border-radius:12px;padding:5px 10px;box-shadow:var(--shadow);margin:0}
.school-app #boardWorkspace .precision-tools>[hidden]{display:none}
@media(max-width:1400px){.school-app #panView{justify-content:flex-start;text-align:left;text-indent:0;display:block}}
