*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;color:#24313c;background:#f5f6f8}button,input,select{font:inherit}button{cursor:pointer;border:1px solid #dde2e8;background:#fff;color:#455260;border-radius:8px;padding:9px 12px}button:hover{background:#edf0fa}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #939ee8;outline-offset:2px}button:disabled{opacity:.4;cursor:default}.primary{background:#3649a7;color:white;border-color:#3649a7}header{height:76px;padding:0 28px;display:flex;align-items:center;justify-content:space-between;background:white;border-bottom:1px solid #e2e6eb}.brand{display:flex;align-items:center;gap:14px;flex-shrink:0}.brand b{font-size:20px;letter-spacing:-.6px}.brand>span:last-child{font-size:14px;color:#65717f}.logo{display:block;flex-shrink:0;width:36px;height:36px;object-fit:contain}.divider{color:#cbd1db}.actions{display:flex;gap:8px;font-size:13px}main{height:calc(100dvh - 76px);display:grid;grid-template-columns:minmax(360px,39%) 1fr;gap:18px;padding:20px}aside,.workspace{background:#fff;border:1px solid #dfe4eb;border-radius:14px;overflow:hidden;display:flex;flex-direction:column;min-height:0;min-width:0}.panel-head{height:85px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid #e7eaf0;gap:10px}small{font-size:10px;letter-spacing:1.6px;color:#8b94a4;font-weight:700}h1{font-size:18px;margin:6px 0 0;letter-spacing:-.4px}.tag{font-size:11px;background:#eff6f0;color:#3e7857;padding:6px 9px;border-radius:6px}iframe{border:0;width:100%;flex:1;min-height:240px}.calc-note{padding:13px 18px;background:#fafbfc;font-size:11px;color:#74808f;line-height:1.7;border-top:1px solid #e7eaf0}a{color:#3d51ab}#title{display:block;margin-top:5px;width:100%;border:0;background:transparent;font-weight:600;font-size:18px;color:#263543}#status{font-size:10px;color:#718779;max-width:120px;text-align:right}.tools{display:flex;flex-wrap:wrap;gap:3px;padding:10px 12px;border-bottom:1px solid #e4e8ee}.tools button{border:0;min-width:43px;padding:6px;font-size:20px;line-height:22px}.tools button span{display:block;font-size:9px;line-height:17px}.tools .active{color:#3549a5;background:#e9edff}.tool-sep{width:1px;background:#e3e6ed;margin:6px}.tools label{display:flex;align-items:center}input[type=color]{width:29px;height:30px;border:0;background:none;padding:0}.tools select{font-size:11px;border:0;max-width:75px;color:#647083;background:#fff}#board{position:relative;flex:1;min-height:260px;overflow:hidden;background:#fcfcfe}canvas{display:block;width:100%;height:100%;touch-action:none}#empty{position:absolute;top:35%;width:100%;text-align:center;pointer-events:none;color:#8993a1}#empty span{display:inline-block;font-size:30px;color:#8996d4;background:#eff1fc;border-radius:18px;padding:10px 17px}h2{font-size:21px;font-weight:600;letter-spacing:-.4px}#empty p{font-size:13px;line-height:1.8}.bottom{position:absolute;bottom:17px;left:17px;right:17px;display:flex;justify-content:space-between;gap:10px;pointer-events:none}.bottom>div{display:flex;box-shadow:0 3px 16px #25324510;background:white;border:1px solid #e3e7ed;border-radius:10px;padding:3px;pointer-events:auto}.bottom button{border:0;font-size:13px;padding:7px 10px}.bottom select{border:0;color:#637184;background:white;font-size:11px;padding:4px}footer{display:flex;align-items:center;justify-content:space-between;padding:10px 17px;font-size:10px;color:#8791a0;border-top:1px solid #e6e9ef}footer button{border:0;font-size:11px;padding:6px 8px}dialog{border:1px solid #dce2eb;border-radius:18px;max-width:580px;padding:30px;color:#344151;box-shadow:0 20px 100px #17213b30}dialog::backdrop{background:#17213b66}dialog p,dialog li{font-size:14px;line-height:1.7}dialog li{margin:10px 0}@media(max-width:950px){main{grid-template-columns:minmax(300px,40%) 1fr;padding:10px;gap:10px}.panel-head{padding:14px}.bottom{left:8px;right:8px}.bottom button{padding:7px}.brand>span:last-child,.divider{display:none}}@media(max-width:700px){header{padding:12px;height:auto;gap:10px;flex-wrap:wrap}.actions{font-size:11px}.brand b{font-size:18px}main{height:auto;display:flex;flex-direction:column}aside{height:480px}.workspace{height:700px}.tools{gap:5px}footer{font-size:9px}.panel-head{height:75px}}

#board.image-drop{outline:3px dashed #5268cd;outline-offset:-7px}#board.image-drop::after{content:"Drop images onto your board";position:absolute;inset:0;display:grid;place-items:center;background:#edf0ffdd;color:#344bb3;font-size:20px;font-weight:600;pointer-events:none}

.tools button svg{display:block;margin:0 auto;width:22px;height:22px}.tools .clear-board{color:#ab3e48;margin-left:5px}.tools .clear-board:hover{background:#fff0f1}

main{grid-template-columns:39fr 28px 61fr;gap:0}#splitter{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;cursor:col-resize;touch-action:none;color:#8a95ad}#splitter:hover,#splitter:focus-visible{background:#e7ebf6;border-radius:8px}#splitter button{padding:4px 0;width:24px;font-size:22px;line-height:25px;color:#4559a5}#splitter span{font-size:24px}.resizing-panels{cursor:col-resize;user-select:none}.resizing-panels iframe{pointer-events:none}@media(max-width:700px){#splitter{display:none}main{gap:10px}}

.tools #inkStyle,.tools #stabilization{max-width:112px;padding:5px;background:#f4f6fb;border-radius:6px}canvas{user-select:none;-webkit-user-select:none}

.board-text-editor{position:absolute;z-index:5;resize:none;border:2px solid #5268cd;border-radius:3px;outline:none;font-family:Segoe UI,Arial,sans-serif;overflow:hidden;box-shadow:0 3px 14px #25324515;min-width:60px;white-space:pre-wrap;overflow-wrap:anywhere}

.board-text-editor{border:2px dotted #5268cd}

main.board-only{grid-template-columns:minmax(0,1fr)!important}
#slideNav{display:flex;align-items:center;gap:7px;padding:8px 14px;border-bottom:1px solid #e4e8ee;flex-wrap:wrap;background:#f8f9fd;font-size:12px}#slideNav[hidden]{display:none}#slideNav button{padding:5px 9px}#slideChoice{max-width:200px;padding:5px;border:1px solid #dde2e8;border-radius:6px;background:white}#slideMessage{color:#667489}#slideImport{max-width:480px}#slideImport p{font-size:13px}
main.board-only>aside,main.board-only>#splitter{display:none}
@media(max-width:700px){main.board-only .workspace{height:calc(100dvh - 120px);min-height:480px}.actions{flex-wrap:wrap}}

/* Keep the writing surface prominent while retaining labeled, pen-friendly controls. */
header{height:48px;padding:0 12px;gap:12px}
.brand{gap:8px}.brand b{font-size:17px}.logo{width:36px;height:36px}
.actions{gap:5px;font-size:12px}.actions button{padding:6px 9px}
main{height:calc(100dvh - 48px);padding:6px}
aside,.workspace{border-radius:8px}
.panel-head{height:38px;padding:5px 12px}.panel-head small{display:none}
h1,#title{font-size:15px;margin:0}.tag{padding:3px 7px}
.tools{padding:4px 7px;gap:2px}.tools button{padding:3px 5px;min-width:42px}.tools button span{line-height:14px}
footer{padding:2px 10px}footer button{padding:4px 7px}
.calc-note{padding:5px 10px;line-height:1.4}
#slideNav{padding:4px 8px;gap:5px}#slideNav button,#slideChoice{padding:4px 7px}
.bottom{bottom:8px;left:8px;right:8px}
#board{min-height:120px}
@media(max-width:700px){
 header{height:auto;min-height:48px;padding:6px 8px;gap:6px}
 .brand{gap:5px}.brand b{font-size:15px}.actions{gap:4px;font-size:11px}
 .actions button{padding:6px}.panel-head{height:34px;padding:4px 8px}
 main{height:auto;padding:4px;gap:4px}
 main.board-only{height:calc(100dvh - 96px)}
 main.board-only .workspace{height:100%;min-height:0}
 .tools{padding:3px;gap:1px}.tools button{min-width:39px}
 #slideMessage{display:none}
}
@media(max-width:700px){body:has(main.board-only){height:100dvh;display:flex;flex-direction:column}body:has(main.board-only)>header{flex-shrink:0}main.board-only{height:auto;flex:1;min-height:0}main.board-only .workspace{flex:1;min-height:0}}

/* One shared top bar; wrap controls only when the viewport requires it. */
body{height:100dvh;display:flex;flex-direction:column}
header{height:auto;min-height:52px;flex-shrink:0;flex-wrap:wrap;justify-content:flex-start;gap:4px 10px;padding:4px 8px}
header .brand>span:last-child,header .brand .divider{display:none}
.board-heading{width:160px;flex-shrink:0}.board-heading #title{width:100%;font-size:13px}.board-heading #status{display:block;max-width:none;text-align:left;font-size:9px;margin-top:3px}
header .tools{border:0;padding:0;flex:1;flex-wrap:nowrap;min-width:720px;gap:0}
header .tools button{min-width:36px;padding:3px;font-size:18px}header .tools button span{font-size:8px}
header .tools select{font-size:10px}header .tools #inkStyle,header .tools #stabilization{max-width:95px;padding:4px}
header .actions{margin-left:auto;flex-wrap:nowrap;flex-shrink:0;font-size:11px}header .actions button{padding:6px 7px}
main,main.board-only{height:auto;flex:1;min-height:0;padding-top:2px}
@media(max-width:1400px){header .tools{order:4;flex-basis:100%;min-width:0;justify-content:flex-start;flex-wrap:wrap}.board-heading{flex:1;max-width:220px}header .actions{margin-left:auto}}
@media(max-width:700px){header{gap:4px 6px}.board-heading{width:140px}header .actions{flex-wrap:wrap;flex:1 1 100%;justify-content:flex-start}header .tools{gap:1px}main:not(.board-only){overflow:auto;flex-shrink:0}.workspace{flex-shrink:0}main.board-only .workspace{height:100%;flex:1}}
.color-presets{display:flex;align-items:center;gap:3px;padding:0 5px}
header .tools button.color-swatch{min-width:24px;width:24px;height:28px;padding:0;border:2px solid transparent;border-radius:6px;background:transparent;position:relative}
.color-swatch::after{content:'';position:absolute;inset:4px 2px;border-radius:50%;background:var(--swatch);border:1px solid #0002}
header .tools button.color-swatch[aria-pressed=true]{border-color:#5268cd;background:#edf0ff}
header .tools button.color-swatch:hover{background:#e4e8f3}

/* ByteBoard: keep the application name visible beside the StudyByte mascot. */
header .brand > span:last-child{display:inline-block!important;color:#465474!important;font-size:13px!important;font-weight:700!important;white-space:nowrap}
header .brand > .divider{display:none!important}
@media(max-width:700px){header .brand > span:last-child{font-size:12px!important}}

header .brand b{display:block;font-size:16px}header .brand>span{display:none}
