/* HAT Physics SmartBoard 0.7.2 — compact editing / focused document navigation */
#hat064TextDialog.hat072-side-editor[hidden]{display:none!important}
#hat064TextDialog.hat072-side-editor{position:absolute!important;top:65px;bottom:27px;left:0;right:0;z-index:8;display:block;box-sizing:border-box;background:#112937;color:#ecf7f7;padding:0!important;overflow:auto;overscroll-behavior:contain;border:none!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important}
#hat064TextDialog .hat064-editor{box-sizing:border-box;display:flex;flex-direction:column;gap:10px;margin:0;padding:13px;width:100%;min-height:0;max-height:none;color:#eef8fb;background:transparent;border:0;box-shadow:none;transform:none;position:static}
#hat064TextDialog .hat064-ed-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:2px;padding-bottom:7px;border-bottom:1px solid #ffffff25}
#hat064TextDialog .hat064-ed-head strong{font-size:14px}
#hat064TextDialog #hat064Close{font-size:22px;color:white;background:#234a5d;border:1px solid #527586;border-radius:8px;min-width:36px;height:36px}
#hat064TextDialog label{font-size:12px;line-height:1.45;color:#d4e9ed}
#hat064TextInput{display:block;box-sizing:border-box;width:100%;min-height:110px;max-height:220px;resize:vertical;font:14px/1.6 ui-monospace,Consolas,monospace;background:#f7fafc!important;color:#162638!important;border:1px solid #87b6bd!important;border-radius:12px!important;padding:12px!important;outline-color:#49c5be}
#hat064TextDialog .hat064-ed-examples{margin:0;border:1px solid #426575;border-radius:10px;padding:8px 10px;color:#eaf5f6}
#hat064TextDialog .hat064-ed-examples summary{font-size:12px;cursor:pointer;font-weight:700}
#hat064TextDialog .hat072-example-buttons{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:9px}
#hat064TextDialog .hat072-example-buttons button{min-height:35px;font-size:11px;padding:5px;background:#264a5d;color:#f3fafc;border:1px solid #59808d;border-radius:8px}
#hat064TextDialog .hat064-ed-settings{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
#hat064TextDialog .hat064-ed-settings label{display:flex;align-items:center;gap:8px}
#hat064TextDialog #hat064Font{width:71px;min-height:37px;padding:5px;border:1px solid #628b9a;background:#213d4b;color:#fff;border-radius:8px}
#hat064TextDialog .hat064-ed-settings small{font-size:10px;color:#a4c9d3}
#hat064TextDialog .hat064-preview-label{margin:0;font-size:11px;color:#a9d9d9}
#hat064TextDialog .hat064-preview{background:white!important;color:#132331!important;font-family:Arial,sans-serif;font-size:21px;line-height:1.6;min-height:55px;max-height:145px;overflow:auto;overflow-wrap:anywhere;border-radius:12px;border:1px solid #cee3e9;padding:13px}
#hat064TextDialog .hat064-math-preview svg{vertical-align:middle;max-width:none}
#hat064TextDialog .hat064-math-error{color:#b72222;background:#ffebeb;padding:2px;border-radius:3px}
#hat064TextDialog .hat064-ed-actions{display:grid;grid-template-columns:1fr 1.4fr;gap:8px;margin-top:5px;padding-bottom:10px}
#hat064TextDialog .hat064-ed-actions button{min-height:43px;border-radius:10px;border:1px solid #618c9c;background:#2d4c5b;color:#fff;font-weight:700}
#hat064TextDialog .hat064-ed-actions .hat064-primary{background:#16a18f;border-color:#60d7c4;color:white}
#hat072InsertText.hat072-text-action{display:block;width:100%;min-height:44px;background:#117c7c;border:1px solid #62dac6;border-radius:9px;color:#fff;font-weight:800;margin:9px 0}
/* PDF page-specific floating controls (only shown for imported pages). */
#hat072PageNav[hidden]{display:none!important}
#hat072PageNav{position:absolute;z-index:90;top:12px;left:50%;transform:translateX(-50%);display:flex;gap:5px;flex-wrap:wrap;align-items:center;justify-content:center;padding:7px 11px;border:1px solid #7297a6;border-radius:13px;background:#102632ef;color:#f7ffff;box-shadow:0 9px 22px #0005;max-width:calc(100% - 32px);font:12px system-ui,Segoe UI,sans-serif}
#hat072PageNav .hat072-page-line,#hat072PageNav .hat072-nav-line{display:flex;align-items:center;gap:5px}
#hat072PageNav .hat072-doc-icon{font-size:20px;color:#93e0db}
#hat072PageNav #hat072PageCount{font-weight:800;white-space:nowrap;margin:0 6px}
#hat072PageNav button{font:700 16px system-ui,Segoe UI,sans-serif;cursor:pointer;min-width:36px;min-height:35px;padding:5px 9px;background:#254657;color:#f3fafd;border:1px solid #557b8e;border-radius:8px}
#hat072PageNav #hat072Hand{font-size:13px;min-width:75px}
#hat072PageNav #hat072Hand[aria-pressed=true]{background:#0b8d7e;border-color:#81ead9}
#hat072PageNav button:hover{background:#2b6871}
#hat072PageNav select{min-height:35px;border:1px solid #4f8796;background:#122e40;color:white;border-radius:8px;padding:6px;font-size:12px}
#hat072PageNav small{display:block;flex-basis:100%;text-align:center;font-size:10px;color:#b6d1d6;margin-top:1px}
body.hat072-has-pdf #hat061Zoom{display:none!important}
/* Deduplicate: left rail chooses tools, right panel edits; Studio remains specialist-only. */
#hatDock{display:none!important}
#hatStudio [id=hatDocumentImport],#hatStudio [id=hatDocumentExport],#hatStudio [id=hatDocumentFit],#hatStudio [id=hatDocumentSave]{display:none!important}
#hatStudio #hatInkPalette,#hatStudio #hatInkFreeWidth,#hatStudio [data-hat-width],#hatStudio #hatSmartPen,#hatStudio #hatSmartMarker{display:none!important}
#hatStudio .hat-tab[data-tab=ink] h4:first-of-type,#hatStudio .hat-tab[data-tab=ink] h4:nth-of-type(2){display:none!important}
#hatStudio #hatInkFreeWidth+div{display:none!important}
#hat063Context .hat063-extra:not([open]){opacity:.88}
#hat063Context #hat063SelectionControls .hat063-extra{margin-top:11px}
/* large pen widths remain tap-friendly on PC/tablet */
#hat063Context .hat063-widths{flex-wrap:wrap;justify-content:flex-start;gap:6px}
#hat063Context .hat063-widths button{min-width:39px}
@media(max-width:900px){#hat072PageNav{top:7px;max-width:calc(100vw - 92px)}#hat072PageNav small{display:none}#hat064TextDialog.hat072-side-editor{top:58px}}
@media(max-width:560px){#hat072PageNav{top:auto;bottom:72px;left:50%;padding:5px 6px;max-width:calc(100vw - 85px)}#hat072PageNav .hat072-doc-icon{display:none}#hat072PageNav .hat072-page-line{gap:3px}#hat072PageNav #hat072PageCount{font-size:10px;margin:0 2px}#hat072PageNav button{min-height:32px;min-width:30px;padding:3px 5px}#hat072PageNav select{min-height:32px;padding:3px}#hat064TextDialog.hat072-side-editor{top:54px;bottom:12px}#hat064TextDialog .hat064-editor{padding:8px}}
@media print{#hat072PageNav,#hat064TextDialog{display:none!important}}

#hat063Context .hat072-width-label{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:4px 0 12px;font-size:12px}
#hat063Context input[data-hat072-width-number]{max-width:94px;min-height:35px}
#hat069Gallery .hat072-gallery-check{display:flex;align-items:center;gap:6px;font-size:12px;line-height:1.3;max-width:210px}
#hat069Gallery .hat072-gallery-check input{width:18px;height:18px;accent-color:#21ac94}
#hat069Gallery .hat069-preview svg{max-width:100%;height:100%;object-fit:contain}
/* Final layout lock: legacy `nav` rules must never stack the PDF toolbar vertically. */
#hat072PageNav{width:max-content!important;min-width:410px;flex-direction:row!important;flex-wrap:nowrap!important;gap:8px;align-items:center!important}
#hat072PageNav .hat072-page-line,#hat072PageNav .hat072-nav-line{flex-direction:row!important;flex-wrap:nowrap!important;white-space:nowrap}
#hat072PageNav small{display:none!important}
@media(max-width:700px){#hat072PageNav{width:min(390px,calc(100vw - 92px))!important;min-width:0;flex-wrap:wrap!important;gap:4px}}
#hat064TextDialog .hat064-preview{white-space:nowrap!important;overflow-x:auto!important;overflow-wrap:normal!important}
#hat064TextInput{white-space:pre!important;overflow-x:auto!important;overflow-wrap:normal!important}
#hatStudio .hat-tab[data-tab=document]>.hat-grid:first-of-type,#hatStudio .hat-tab[data-tab=ink]>.hat-grid:first-of-type{display:none!important}
@media(max-width:650px){
 #hat064TextDialog.hat072-side-editor:not([hidden]){position:fixed!important;top:auto!important;bottom:0!important;left:0!important;right:0!important;height:min(64vh,560px)!important;max-height:calc(100dvh - 80px)!important;border:1px solid #69929e!important;border-bottom:0!important;border-radius:17px 17px 0 0!important;box-shadow:0 -12px 35px #0007!important;z-index:2200!important}
 #hat064TextDialog .hat064-editor{gap:7px!important;padding:12px!important}
 #hat064TextDialog #hat064TextInput{min-height:85px;max-height:120px}
 #hat064TextDialog .hat064-preview{max-height:95px}
}
@media(max-width:650px){
 #hat064TextDialog.hat072-side-editor:not([hidden]){left:64px!important;right:0!important;width:calc(100vw - 64px)!important;height:min(57vh,490px)!important;z-index:3000!important}
}
@media(max-width:650px){
 #hat064TextDialog .hat064-editor{gap:5px!important;padding:9px 11px!important}
 #hat064TextDialog .hat064-ed-settings small{display:none}
 #hat064TextDialog #hat064TextInput{min-height:75px;max-height:95px;padding:9px!important}
 #hat064TextDialog .hat064-ed-head{margin-bottom:0;padding-bottom:4px}
 #hat064TextDialog .hat064-preview{max-height:76px;min-height:48px;padding:8px}
 #hat064TextDialog .hat064-ed-actions{position:sticky;bottom:0;background:#112937;z-index:3;padding:5px 0 7px}
}
