/* Desktop keeps the existing inspector structure and grid. */
.inspector-sheet-content{display:contents}
.inspector-sheet-hide{display:none}
.mobile-editor-dock[hidden]{display:none!important}
@media(max-width:699px){
  :root[data-student-workspace=modern] body{min-height:100vh;min-height:100dvh}
  :root[data-student-workspace=modern] [data-mobile-sheet=true] main{padding-bottom:calc(var(--editor-dock-height,180px) + var(--editor-sheet-height,240px) + 24px)}
  :root[data-student-workspace=modern] .controls-region[data-mobile-sheet=true]{
    --editor-top-safe:env(safe-area-inset-top,0px);position:fixed;z-index:12;inset:auto 8px var(--editor-sheet-bottom,188px);
    display:flex;flex-direction:column;width:auto;max-width:none;margin:0;padding:0;border-radius:22px 22px 16px 16px;
    height:var(--editor-sheet-height,40dvh);max-height:var(--editor-sheet-available,calc(100dvh - 200px));min-height:0;overflow:hidden;
    background:var(--surface-panel);touch-action:auto;transition:height var(--editor-sheet-duration,0ms) cubic-bezier(.2,.7,.2,1);
  }
  :root[data-student-workspace=modern] .controls-region[data-sheet-dragging=true]{transition:none;user-select:none}
  :root[data-student-workspace=modern] .controls-region[data-mobile-sheet=true][data-sheet-hidden=true]{display:none!important}
  :root[data-student-workspace=modern] .controls-region[data-mobile-sheet=true][data-sheet-hidden=true][data-sheet-exiting=true]{display:flex!important;pointer-events:none}
  :root[data-student-workspace=modern] .controls-region>.inspector-sheet-hide{display:grid;place-items:center;position:absolute;z-index:3;top:10px;right:8px;width:44px;height:44px;padding:0;border:0;border-radius:10px;background:transparent;color:var(--muted);touch-action:manipulation}
  :root[data-student-workspace=modern] .inspector-sheet-hide:hover{background:var(--surface-hover)}
  :root[data-student-workspace=modern] .inspector-sheet-hide svg{width:18px;height:18px;pointer-events:none}
  :root[data-student-workspace=modern] .controls-region>.inspector-sheet-toggle{
    display:flex;flex-direction:column;align-items:stretch;justify-content:center;position:relative;top:auto;z-index:2;
    flex:0 0 60px;width:100%;height:60px;min-height:60px;gap:6px;padding:7px 14px 8px;border:0;border-bottom:1px solid var(--line);
    border-radius:22px 22px 0 0;background:var(--surface-panel);color:inherit;cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none;
  }
  :root[data-student-workspace=modern] .inspector-sheet-toggle:active{cursor:grabbing}
  :root[data-student-workspace=modern] .inspector-sheet-toggle>.sheet-grip{display:block;align-self:center;width:36px;height:4px;flex:0 0 4px;border-radius:999px;background:currentColor;opacity:.28}
  :root[data-student-workspace=modern] .inspector-sheet-toggle>.sheet-heading{display:flex;align-items:center;gap:12px;width:100%;height:28px;padding-right:44px;background:none;opacity:1}
  .sheet-heading .sheet-title{min-width:0;font-size:14px;font-weight:600;text-align:left}
  .sheet-heading .sheet-count{margin-left:auto;font-size:11px;font-weight:400;color:var(--muted);white-space:nowrap}
  .sheet-heading svg{width:16px;height:16px;flex:none;color:var(--muted)}
  [data-sheet-snap="90"] .sheet-heading svg{rotate:180deg}
  :root[data-student-workspace=modern] .inspector-sheet-content{
    display:block;flex:1 1 auto;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;padding:8px 12px 16px;
    overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:rgba(110,110,125,.3) transparent;
  }
  .inspector-sheet-content::-webkit-scrollbar{width:5px}.inspector-sheet-content::-webkit-scrollbar-thumb{background:rgba(110,110,125,.3);border-radius:999px}
  .inspector-sheet-content>:is(form,section,aside,div){min-height:0;min-width:0}
  .inspector-sheet-content input[type=range]{touch-action:pan-y}
  :root[data-student-workspace=modern] .inspector-sheet-content :is(input[type=number],input[type=text],input[type=search],textarea,select){font-size:16px}
  :root[data-student-workspace=modern] .inspector-sheet-content .bento-parameter .pen-range-number input{font-size:16px}
  :root[data-student-workspace=modern] .inspector-sheet-content .pen-panel{padding:0}
  .inspector-sheet-content .pen-heading{display:none!important}
  .inspector-sheet-content:has(.pen-panel:not([hidden]))>.control-footer{display:none}
  :root[data-student-workspace=modern] .inspector-sheet-content :is(.artwork-library,.image-inspector,.image-inspector-body){position:static;inset:auto;max-height:none;min-height:0;overflow:visible}
  :root[data-student-workspace=modern] .inspector-sheet-content .image-inspector{width:auto;padding:16px 0 0;margin-top:16px;border:0;border-top:1px solid var(--line);border-radius:0;box-shadow:none;background:transparent}
  :root[data-student-workspace=modern] .mobile-editor-dock{
    position:fixed;z-index:14;inset:auto 0 var(--editor-visual-bottom,0px);display:flex;flex-direction:column;gap:8px;
    min-height:0;padding:0 8px max(8px,env(safe-area-inset-bottom,0px));background:var(--workspace-background);isolation:isolate;
  }
  :root[data-student-workspace=modern] .mobile-editor-dock>.editor-tools{position:static;inset:auto;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));width:100%;min-width:0;min-height:68px;margin:0;padding:4px;border-radius:18px;gap:0}
  :root[data-student-workspace=modern] .mobile-editor-dock .editor-tools button{min-width:0;min-height:56px;padding:4px 1px;font-size:10px;gap:2px;border-radius:12px}
  :root[data-student-workspace=modern] .mobile-editor-dock>.mobile-save{position:static;inset:auto;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);width:100%;min-width:0;margin:0;padding:8px 10px;gap:4px 8px;border-radius:14px;background:var(--surface-popover)}
  .mobile-editor-dock .mobile-save [role=status]{grid-column:1/-1;min-width:0;font-size:11px;line-height:1.5}
  .mobile-editor-dock .mobile-save>:is(button,a){width:100%;min-width:0;min-height:48px;padding:8px;font-size:12px;gap:6px}
  :root[data-student-workspace=modern] .mobile-editor-dock>.layer-context{position:static!important;inset:auto!important;width:100%;max-width:none!important;margin:0;transform:none;translate:none}
  .mobile-editor-dock .layer-context-bar{min-height:56px}
  :root[data-student-workspace=modern] .canvas-viewport{height:clamp(150px,26dvh,260px)}
  :root[data-student-workspace=modern] body[data-mobile-sheet=true] #toast{bottom:calc(var(--editor-dock-height,180px) + var(--editor-visual-bottom,0px) + 16px)}
  .preview-only .mobile-editor-dock,.view-only .mobile-editor-dock{display:none!important}
  :root[data-student-workspace=modern] :is(.view-only,.preview-only) .controls-region{display:none!important}
}
@media(prefers-reduced-motion:reduce){.controls-region{transition:none!important}}
@media print{.mobile-editor-dock{display:none!important}}
