
/* TahtaCep v9 — light, disciplined classroom layout. */
:root{--blue:#155fc9;--blue-dark:#124aab;--ink:#1b2d45;--muted:#667994;--line:#dfe6ef;--bg:#f6f8fb;--pale:#eef4ff;--shadow:0 8px 24px rgba(20,45,82,.05)}
body{background:var(--bg)}
.site-header{background:#fff;box-shadow:0 2px 15px #2443690b}
.shell,.edu-container{max-width:1440px}
.nav-inner{gap:18px;min-height:76px}
.nav-links{display:flex!important;justify-content:stretch!important;align-items:center;flex:1;gap:2px!important;flex-wrap:nowrap!important;min-width:0}
.nav-links a{display:flex;align-items:center;justify-content:center;flex:1;padding:12px 6px!important;border-radius:9px;font-size:12px!important;color:#5b6d83!important;text-align:center;white-space:nowrap}
.nav-links a:hover{background:#f3f6fa;color:#134da5!important}
.nav-links a.active{background:#e9f1ff;color:#1254b8!important}
.nav-actions{gap:7px}
.brand{gap:9px}
.brand-icon{height:43px;width:43px;border-radius:12px}
.brand-text strong{font-size:23px}
.brand-text small{font-size:8px;letter-spacing:1.45px}
.v9-studios-badge{width:34px;height:34px;display:block;object-fit:contain;margin-left:1px;box-shadow:0 0 0 1px #dfe7f4;border-radius:9px}
.edu-container{padding-bottom:55px}
.edu-hero{padding:29px 0 19px}
.edu-hero h1{font-size:clamp(28px,3vw,41px);letter-spacing:-1.1px}
.edu-hero p{margin-top:7px}
.edu-grid{gap:12px}
.edu-card,.edu-pane,.panel,.tg8-task{border:1px solid #e0e7f0;border-radius:14px;box-shadow:0 4px 14px #173b6810}
.edu-card{padding:20px;min-height:180px}
.edu-card .edu-ico{height:42px;width:42px;font-size:20px;background:#edf3fc!important}
.edu-card:nth-child(4n+2) .edu-ico{background:#fff3e8!important}
.edu-card h3{font-size:17px}
.edu-btn,.btn,.edu-toolbar button,.tg8-expand{border-radius:9px;font-weight:700;box-shadow:none}
.edu-btn:hover,.btn:hover,.edu-toolbar button:hover{filter:brightness(.975)}
.edu-btn:focus-visible,.edu-toolbar button:focus-visible{outline:3px solid #8aaee9;outline-offset:2px}
.edu-section{margin:19px 0 32px}
/* Keep QR beside document; stop erroneous vertical push of right panel */
.board-grid{display:grid!important;grid-template-columns:minmax(0,1fr) 290px!important;gap:16px!important;align-items:start}
.board-grid .tg8-right-col{margin-top:0!important;position:sticky;top:88px}
.board-grid .qr-card.tg8-mini .qr-host{width:112px;height:112px}
.board-grid.tg8-playing .tg8-right-col,.board-grid.tg8-scanned .tg8-right-col{margin-top:0!important}
.board-grid .panel-head{min-height:64px}
.board-grid .tg8-recent{padding:14px}
/* Whiteboard canvas and tools always share a fullscreen root */
#wb-frame{height:clamp(620px,75dvh,910px);min-height:565px;display:grid;grid-template-columns:minmax(0,1fr) minmax(270px,310px);grid-template-rows:auto minmax(0,1fr) auto;position:relative;overflow:hidden;background:#fff}
#wb-frame .wb-top{grid-column:1/-1;grid-row:1;min-height:57px;display:flex;flex-wrap:nowrap;overflow-x:auto;gap:8px;padding:8px 12px}
#wb-frame .wb-top>.edu-toolbar{flex-wrap:nowrap}
#wb-frame .wb-stage{grid-column:1;grid-row:2;min-width:0;width:100%;height:100%;min-height:0;touch-action:none}
#wb-frame .wb-hint{grid-column:1/-1;grid-row:3;min-height:24px;padding:8px 11px;white-space:normal;font-size:11px}
#wb-frame .v9-board-tools{grid-column:2;grid-row:2;margin:0!important;display:flex!important;flex-direction:column!important;gap:10px!important;padding:12px;min-width:0;min-height:0;overflow-y:auto;overflow-x:hidden;background:#f7f9fc;border-left:1px solid #dfe7f1}
.v9-board-tools>.edu-pane{padding:13px;border-radius:12px;box-shadow:none}
.v9-board-tools .edu-topline h2{font-size:17px}
#wb-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
#wb-tools button{text-align:left;font-size:11px;min-height:41px;padding:7px}
.v9-board-tools .edu-toolbar{gap:8px;align-items:flex-start}
.v9-board-tools .edu-toolbar label{flex:1 1 100px}
.v9-board-tools .edu-toolbar button[data-swatch]{width:27px!important;height:27px!important}
.v9-board-tools .edu-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.v9-board-tools .edu-actions button{font-size:11px;padding:9px 5px;min-height:40px;white-space:normal}
#v9-tools-toggle{display:none;border:1px solid #cbdaf0;background:#ecf3ff;color:#184e9b;border-radius:9px;padding:9px 10px;font-size:12px;font-weight:800;white-space:nowrap}
#wb-frame:fullscreen{height:100dvh;width:100vw;max-height:none;min-height:0;border:0;border-radius:0}
#wb-frame:fullscreen .wb-stage{height:100%}
#wb-frame:fullscreen .wb-top{padding:8px 14px}
body.lesson-active .v9-board-tools{background:#f7f9fc}
/* Classroom: equal sizes, aligned buttons and no broken gaps */
.edu-split.edu-section,.tg8-tools-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:stretch!important;gap:14px!important}
.tg8-tools-grid>.edu-pane{min-height:285px;padding:21px;display:flex;flex-direction:column;gap:10px}
.tg8-tools-grid .edu-pane>h2{line-height:1.3;margin:0 115px 8px 0;font-size:19px}
.tg8-tools-grid .edu-pane>.edu-topline{margin:0 113px 8px 0}
.tg8-tools-grid .edu-pane .edu-actions{gap:9px;margin-top:8px}
.tg8-tools-grid .edu-pane .edu-field{min-width:110px}
.tg8-tools-grid .edu-pane button{min-height:39px}
.tg8-expand{font-size:11px;min-height:36px!important;padding:7px 10px;right:16px;top:17px}
.tg8-classroom .tg8-room-grid{gap:14px}
.tg8-classroom .edu-pane{min-width:0}
.tg8-classroom .edu-form{gap:14px}
.tg8-classroom input,.tg8-classroom textarea{box-sizing:border-box}
.tg8-classroom .tg8-room-row{gap:15px}
.tg8-classroom .edu-btn{white-space:normal;line-height:1.25}
.edu-list-item{min-width:0;gap:12px;flex-wrap:wrap}
/* Interactive satellite basemap loads online; vector SVG works offline */
#v9-satellite{display:none;position:absolute;inset:0;z-index:15;background:#eef3f7}
#v9-satellite.visible{display:block}
#v9-satellite .leaflet-container{height:100%;width:100%;background:#e8edf4;font:inherit}
.edu-mapwrap.v9-satellite-on #atlas-svg{visibility:hidden}
.edu-mapwrap.v9-satellite-on #v9-satellite{display:block}
.v9-map-switch{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:0 0 13px}
.v9-map-switch button{padding:9px 12px;border:1px solid #d8e3f1;background:#fff;border-radius:9px;font-size:12px;cursor:pointer;color:#37536f;font-weight:700}
.v9-map-switch button.active{background:#e8f1ff;color:#1653aa;border-color:#b5cff4}
#v9-satellite-info{min-height:36px;font-size:12px;color:#55708f;padding:7px 0}
#v9-satellite .leaflet-control-attribution{font-size:9px}
.edu-mapwrap:fullscreen{background:#fff;width:100vw;height:100dvh;border:0;border-radius:0}
.edu-mapwrap:fullscreen #v9-satellite{height:100%}
/* Teacher cloud */
#cloud-user{font-size:13px;line-height:1.6}
#edu-cloud-list .edu-list-item{align-items:center}
#edu-cloud-list .edu-actions{margin-left:auto}
.v9-account-hint{border:1px solid #cddff7;background:#f1f6ff;color:#365e99;border-radius:10px;padding:12px 13px;margin:10px 0;font-size:12px;line-height:1.5}
.v9-state{display:inline-flex;gap:6px;padding:6px 10px;border-radius:30px;background:#eef7f0;color:#267a52;font-weight:800;font-size:11px}
.v9-state.off{background:#fff4e8;color:#a86925}
.tg8-classroom .tg8-tag{background:#eef4ff}
.footer-inner{gap:12px}
.footer-inner p{font-size:11px}
@media(max-width:1350px){.nav-actions{display:none}.nav-inner{gap:10px}.nav-links a{font-size:11px!important}}
@media(max-width:1050px){.nav-links{display:none!important}.site-header .nav-inner{min-height:64px}}
@media(max-width:950px){#wb-frame{grid-template-columns:minmax(0,1fr) 270px}.board-grid{grid-template-columns:minmax(0,1fr) 240px!important}}
@media(max-width:780px){
 .board-grid{grid-template-columns:1fr!important}.board-grid .tg8-right-col{position:static;top:auto}
 .edu-split.edu-section,.tg8-tools-grid,.tg8-room-grid{grid-template-columns:1fr!important}
 #wb-frame{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;height:75dvh;min-height:490px}
 #wb-frame .wb-stage{grid-column:1;grid-row:2}
 #wb-frame .v9-board-tools{grid-column:1;grid-row:2;position:absolute;z-index:20;right:0;top:0;bottom:0;max-width:min(310px,88vw);width:310px;transform:translateX(105%);transition:transform .2s ease;border:1px solid #dfe7f1;box-shadow:-8px 0 24px #253d6420}
 #wb-frame.v9-tools-open .v9-board-tools{transform:translateX(0)}
 #v9-tools-toggle{display:inline-flex;align-items:center;justify-content:center}
 #wb-frame .wb-top{min-height:60px}
 .v9-board-tools>.edu-pane{padding:12px}
 .site-header .v9-studios-badge{width:31px;height:31px}
}
@media(prefers-reduced-motion:reduce){#wb-frame .v9-board-tools{transition:none}}

.v9-footer-studios{height:33px;width:33px;margin-right:5px}.v9-warning{background:#fff7e9;border-color:#f2d7a5;color:#89581e}

@media(max-width:780px){#wb-frame .wb-top{overflow-x:auto;scrollbar-width:thin;justify-content:flex-start}#wb-frame .wb-top>.edu-toolbar{flex:0 0 auto}#wb-frame .wb-top button{white-space:nowrap;flex:0 0 auto;font-size:11px;padding:8px 9px}#v9-tools-toggle{position:sticky;left:0;z-index:35;order:-1;background:#e7f0ff;font-weight:800;border-color:#b9cfee}}
