/* Shared Rooms, window focus, and DocCam-style annotation palettes. */
#library { width: 320px; }
.library-heading h1 { font-size: 20px; }
.library-tabs { display: flex; gap: 5px; margin: -6px 0 14px; }
.library-tabs button { flex: 1; }
.library-tabs .active { background: var(--selected); color: var(--accent); }
#rooms-list { display: flex; flex-direction: column; gap: 3px; max-height: 130px; overflow: auto; }
#room-actions { display: flex; flex-wrap: wrap; margin-top: 6px; gap: 3px; }
#room-actions button { min-height: 30px; }
#rooms-section .section-label { margin-top: 12px; }
.new-wall-button { width: 100%; min-height: 36px; margin-bottom: 10px; background: var(--selected); color: var(--accent); flex-shrink: 0; }
.wall-list-item { position: relative; }
.wall-order { display: flex; justify-content: flex-end; gap: 4px; margin-top: -10px; margin-bottom: 10px; }
.wall-order button { min-height: 28px; padding: 3px 9px; font-size: 11px; }
#wall-rooms { border: 1px solid var(--line); border-radius: 10px; padding: 10px; max-height: 200px; overflow: auto; }
#wall-rooms legend { font-size: 11px; color: var(--muted); }
#wall-rooms label, #room-wall-choices label { display: flex; flex-direction: row; gap: 10px; align-items: center; padding: 7px; font-size: 13px; color: var(--ink); }
#room-wall-choices { max-height: 45vh; overflow: auto; }
#room-dialog p { font-size: 13px; }

.widget-header { padding: 0 5px 0 0; cursor: default; }
.widget-handle { flex: 1; min-width: 0; border: 0; background: transparent; padding: 5px 10px; height: 42px; justify-content: flex-start; cursor: grab; touch-action: none; border-radius: 16px 0 0 0; }
.widget-handle:hover { background: #879db018; }
.widget-handle span { text-align: left; }
.widget-focus { width: 36px; min-height: 36px; height: 36px; border: 0; background: transparent; padding: 7px; color: #657a91; }
.widget-focus:hover { background: #879db029; }
.widget-ink { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; touch-action: none; }
.widget-ink.drawing, #wall-ink.drawing { pointer-events: auto; cursor: none; }
.camera-frame canvas.drawing { cursor: none; }
.widget.focused { inset: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; border: 0; box-shadow: none; outline: none; z-index: 100; }
.widget.focused > .widget-header { height: 48px; }
.widget.focused .widget-handle { cursor: default; height: 48px; }
.widget.focused .widget-focus { width: auto; padding: 6px 15px; min-height: 42px; gap: 7px; }
.widget.focused > .widget-resize { display: none; }
.widget.focused .time-display { font-size: clamp(80px, 20cqw, 260px); }
.widget.focused .dice-face, .widget.focused .tally-value { font-size: clamp(100px, 25cqw, 300px); }
.widget.focused .traffic-light { width: min(20cqw, 160px); height: min(20cqw, 160px); }
.widget.focused .widget-controls button { min-height: 52px; min-width: 64px; }
body.widget-focused .app-header, body.widget-focused .wall-navigation, body.widget-focused #wall-ink, body.widget-focused #empty-wall { display: none !important; }

/* Each contextual row uses the same glass and compact controls as the dock. */
#context-toolbar.annotation-panel { display: flex; flex-direction: column; align-items: center; padding: 0; gap: 7px; width: 480px; max-height: calc(100dvh - 150px); overflow: auto; white-space: normal; border: 0; background: none; box-shadow: none; }
.ink-command-bar, .ink-palette { background: var(--glass); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); backdrop-filter: blur(16px); padding: 7px; }
.ink-command-bar { display: flex; align-items: center; gap: 6px; width: 100%; }
.ink-heading { display: flex; min-width: 0; flex: 1; }
.ink-heading label { min-width: 0; width: 100%; }
#context-toolbar .ink-heading select { width: 100%; padding: 6px; height: 36px; }
.ink-tools, .ink-footer { display: flex; align-items: center; gap: 3px; }
.ink-footer { border-left: 1px solid var(--line); padding-left: 6px; }
#context-toolbar .ink-tools button, #context-toolbar .ink-footer button { width: 36px; min-width: 36px; padding: 7px; background: transparent; border: 0; }
#context-toolbar .ink-tools button.active { background: var(--selected); box-shadow: inset 0 0 0 1px var(--accent); }
.ink-palette { display: flex; flex-direction: column; gap: 7px; width: 100%; }
.ink-colors, .ink-sizes { display: flex; gap: 6px; align-items: center; justify-content: center; }
#context-toolbar .ink-colors button { min-width: 28px; width: 28px; height: 28px; min-height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 50%; }
#context-toolbar .ink-colors .active { outline: 2px solid var(--accent); outline-offset: 2px; }
#context-toolbar .ink-sizes button { flex: 1; min-height: 30px; padding: 4px 7px; background: transparent; border: 0; }
.ink-hint { color: var(--muted); font-size: 10px; }
.stamp-favorites, .stamp-results { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.stamp-favorites { grid-template-columns: repeat(6, 1fr); }
#context-toolbar .stamp-favorites button, #context-toolbar .stamp-results button { font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif; font-size: 26px; min-width: 40px; height: 46px; padding: 2px; touch-action: manipulation; }
.stamp-results { min-height: 52px; max-height: 160px; overflow: auto; }
#stamp-search { width: 100%; min-height: 42px; }
.stamp-sound { align-self: flex-start; }
#ink-cursor { position: fixed; z-index: 10020; transform: translate(-50%, -50%); border: 1px solid; border-radius: 50%; pointer-events: none; display: flex; align-items: center; justify-content: center; font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif; line-height: 1; }
#ink-cursor.cursor-pencil { background: var(--cursor-color); opacity: .4; }
#ink-cursor.cursor-highlighter { background: var(--cursor-color); opacity: .35; }
#ink-cursor.cursor-eraser { background: #ffffff50; border-color: #233449 !important; box-shadow: 0 0 0 1px #ffffffa0; }
#ink-cursor.cursor-stamp { border: 0; }

@media (max-width: 720px) {
  #library { width: min(320px, calc(100vw - 20px)); }
  #context-toolbar.annotation-panel { width: calc(100vw - 20px); padding: 0; max-height: calc(100dvh - 125px); }
  .ink-command-bar { flex-wrap: wrap; }
  .ink-heading { flex-basis: 100%; }
  .ink-colors { gap: 4px; flex-wrap: wrap; }
  #context-toolbar .ink-colors button { width: 30px; min-width: 30px; min-height: 30px; }
  .stamp-results { grid-template-columns: repeat(6, 1fr); }
  .ink-footer .ink-hint { display: none; }
}

/* Compact window chrome retains clear drag, focus, and resize affordances. */
.widget { border-radius: 10px; border-color: #7890a526; box-shadow: 0 3px 12px #2942540c; }
.widget.selected { outline: 1px solid #5282d7; outline-offset: 1px; }
.widget-header, .widget.focused > .widget-header { height: 32px; }
.widget-handle, .widget.focused .widget-handle { height: 32px; min-height: 32px; padding: 3px 8px; border-radius: 10px 0 0; }
.widget-header span { font-size: 10px; letter-spacing: .4px; }
.widget-header svg { width: 15px; height: 15px; }
.widget-focus, .widget.focused .widget-focus { min-height: 28px; height: 28px; padding: 4px 8px; font-size: 11px; }
.widget-content { border-radius: 0 0 10px 10px; }
.widget-resize { width: 26px; height: 26px; min-height: 26px; right: -8px; bottom: -8px; border-width: 2px; }
.widget-resize svg { width: 15px; height: 15px; }
#library { top: 68px; bottom: 88px; padding: 16px 14px 12px; overflow-y: auto; }
.library-heading { margin-bottom: 16px; }
.library-heading h1 { font-size: 18px; }
.library-tabs button { min-height: 34px; padding: 5px 10px; }
#room-actions { gap: 3px; margin-top: 9px; }
#manage-room { width: 100%; min-height: 36px; font-size: 12px; }
.room-help { color: var(--muted); font-size: 11px; line-height: 1.45; width: 100%; margin: 3px 0; }
#room-actions > .text-button { flex: 1; font-size: 11px; }
#rooms-section { flex-shrink: 0; }
.section-label { margin-top: 14px; }
.wall-card { padding: 6px; margin-bottom: 8px; }
.wall-preview { height: 65px; }
.wall-card strong { margin-top: 6px; }
.wall-order { margin-top: -5px; margin-bottom: 7px; }
.library-footer { padding-top: 8px; margin-top: 8px; }
#backup-status:empty { display: none; }
@media (pointer: coarse) {
  .widget-header, .widget.focused > .widget-header, .widget-handle, .widget.focused .widget-handle { height: 40px; }
  .widget-focus, .widget.focused .widget-focus { min-height: 36px; height: 36px; }
  .widget-resize { width: 36px; height: 36px; min-height: 36px; }
}
/* The dock changes its tool set; only temporary settings float above it. */
body.annotation-dock #main-toolbar > :is(#active-tools-toggle, #dock-walls, #theme-toggle, #fullscreen-toggle, #add-widget, #background-tool, #undo, #redo, .dock-divider, #draw-tool) { display: none; }
#main-toolbar > .ink-command-bar { display: none; }
body.annotation-dock #main-toolbar > .ink-command-bar { display: flex; width: auto; padding: 0; border: 0; box-shadow: none; background: none; backdrop-filter: none; gap: 5px; }
#main-toolbar .ink-tools button, #main-toolbar .ink-footer button { width: 38px; min-width: 38px; height: 42px; min-height: 42px; border: 0; background: none; padding: 8px; }
#main-toolbar .ink-tools button.active { background: var(--selected); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
#main-toolbar .ink-heading { flex: none; }
.ink-target { position: relative; display: flex; align-items: center; justify-content: center; width: 36px; height: 40px; }
.ink-target > svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
#main-toolbar .ink-target select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.ink-target:focus-within { outline: 2px solid var(--accent); border-radius: 8px; }
#context-toolbar.annotation-panel { width: 400px; }
.widget.annotation-target { outline: 1px solid var(--accent); outline-offset: 1px; }
#context-toolbar.widget-toolbar { position: fixed; z-index: 55; max-width: calc(100vw - 16px); width: max-content; flex-wrap: wrap; white-space: normal; overflow: auto; max-height: calc(100dvh - 100px); }
.widget:not(.focused) .widget-focus { opacity: 0; }
.widget:hover .widget-focus, .widget:focus-within .widget-focus { opacity: 1; }
@media (max-width: 720px) {
  #main-toolbar .ink-tools, #main-toolbar .ink-footer { gap: 1px; }
  #main-toolbar .ink-tools button, #main-toolbar .ink-footer button { width: 30px; min-width: 30px; padding: 5px; }
  #main-toolbar .ink-footer { padding-left: 2px; }
  #main-toolbar .ink-command-bar { gap: 2px !important; flex-wrap: nowrap; }
  #main-toolbar .ink-heading { flex-basis: auto; }
  #context-toolbar.annotation-panel { width: min(400px, calc(100vw - 20px)); }
}
@media (pointer: coarse) { .widget .widget-focus { opacity: 1; } }
#draw-tool.has-ink-color { position: relative; }
#draw-tool.has-ink-color::after { content: ''; position: absolute; bottom: 4px; width: 14px; height: 3px; border-radius: 2px; background: var(--ink-color); box-shadow: 0 0 0 1px var(--line); }
.camera-surface.panning { cursor: grab; touch-action: none; }
.camera-surface.panning:active { cursor: grabbing; }
.camera-surface img, .camera-surface video { user-select: none; -webkit-user-drag: none; }
#context-toolbar.widget-toolbar:has([aria-label="Pan camera"]) .context-label { display: none; }
[data-type=camera] .camera-surface { touch-action: none; }
/* Classroom surfaces and in-widget teaching controls. */
.widget[data-type=whiteboard] .widget-content { min-height: 0; }
.widget[data-type=sticky] { border-radius: 3px 3px 20px 3px; box-shadow: 3px 8px 16px #23344922; }
.widget[data-type=sticky] .note-content { padding: 16px; }
.widget[data-type=blur], .widget[data-type=curtain] { background: transparent; }
.widget[data-type=blur] .widget-header, .widget[data-type=curtain] .widget-header { background: var(--glass); }
.widget[data-type=blur] .widget-header span, .widget[data-type=curtain] .widget-header span { color: var(--ink); }
.blur-surface { background: transparent; }
.curtain-shade { position: absolute; inset: 0; }
.curtain-grip { position: absolute; transform: translate(-50%,-50%); z-index: 4; width: 36px; height: 48px; padding: 0; touch-action: none; cursor: ew-resize; }
.timer-face { display: flex; align-items: center; justify-content: center; gap: clamp(5px, 2cqw, 15px); width: 100%; }
.timer-face .time-display { font-size: clamp(25px, 16cqw, 76px); letter-spacing: -2px; min-width: 0; }
.time-steps { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.time-step { width: 40px; height: 40px; min-height: 40px; padding: 0; font-size: 24px; background: #e9eff7; color: #345575; border: 0; touch-action: none; user-select: none; }
.widget.focused .timer-face { width: min(100%, 850px); }
.widget.focused .timer-face .time-display { font-size: clamp(60px, 15cqw, 190px); }
.widget.focused .time-step { width: 52px; height: 52px; }
.alarm-content { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 12px; }
.alarm-content input { font-size: clamp(22px, 10cqw, 40px); max-width: 100%; color: #233449; background: #f2f5f8; }
.alarm-status { font-size: 14px; text-align: center; }
#context-toolbar .surface-swatch { min-width: 26px; width: 26px; height: 26px; min-height: 26px; border-radius: 50%; padding: 0; }
#context-toolbar.background-panel { display: flex; flex-direction: column; width: 390px; max-height: calc(100dvh - 155px); overflow-y: auto; align-items: stretch; padding: 12px; }
.background-heading, .background-images, .surface-colors { display: flex; align-items: center; gap: 6px; }
.background-heading { justify-content: space-between; }
#context-toolbar .background-heading > .icon-button { width: 42px; height: 42px; padding: 8px; font-size: 22px; }
.surface-colors { flex-wrap: wrap; }
#context-toolbar .surface-colors button { min-width: 29px; width: 29px; height: 29px; min-height: 29px; border-radius: 50%; padding: 0; }
.background-patterns { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin: 8px 0; }
.background-choice { flex-direction: column; padding: 5px; }
.background-preview { width: 100%; height: 45px; border-radius: 6px; }
#library { width: 340px; }
.wall-card { min-height: 83px; padding: 8px 40px 8px 82px; position: relative; }
.wall-preview { position: absolute; left: 7px; top: 8px; width: 65px; height: 65px; }
.wall-card strong { white-space: normal; overflow-wrap: anywhere; margin-top: 8px; }
.wall-card small { display: block; line-height: 1.4; }
.organize-wall { position: absolute; top: 28px; right: 6px; width: 32px; height: 32px; min-height: 32px; padding: 6px; border: 0; background: transparent; color: var(--accent); }
.library-empty { font-size: 13px; line-height: 1.5; color: var(--muted); }
#organize-wall-rooms { max-height: 40vh; overflow: auto; }
#organize-wall-rooms label { flex-direction: row; align-items: center; gap: 10px; padding: 10px 0; }
#room-wall-search { width: 100%; margin-bottom: 10px; }
@media(max-width:720px) { #library { width: min(340px, calc(100vw - 20px)); } .time-step { width: 36px; min-height: 36px; height: 36px; } }
.time-step:hover { background: #d3e1f2; color: #233449; }
/* Tool chrome follows the classroom theme; writing surfaces keep their chosen color. */
.widget > .widget-header { background: var(--surface); color: var(--ink); border-bottom-color: var(--line); border-radius: 10px 10px 0 0; }
.widget > .widget-header span, .widget > .widget-header svg, .widget .widget-focus { color: var(--ink); }
.widget.focused { z-index: 1000002 !important; }
.widget:is([data-type=timer],[data-type=alarm],[data-type=clock],[data-type=dice],[data-type=tally],[data-type=traffic],[data-type=image]) { background: var(--surface); color: var(--ink); }
.widget:is([data-type=timer],[data-type=alarm],[data-type=clock],[data-type=dice],[data-type=tally]) :is(.time-label,.clock-date,.alarm-status) { color: var(--muted); }
.alarm-content input { background: var(--page); color: var(--ink); border-color: var(--line); }
.time-step, .time-step:hover, .widget-controls button:not(.primary) { background: var(--selected); color: var(--ink); border-color: var(--line); }
.widget.finished { background: var(--selected) !important; outline: 2px solid var(--accent); }
.traffic-content { flex-direction: column; gap: 8px; padding: 10px; }
.traffic-light { width: min(45cqw, 70px, calc((100cqh - 65px)/3)); height: min(45cqw, 70px, calc((100cqh - 65px)/3)); border-width: 3px; border-color: var(--surface); }
.widget[data-type=traffic] { container-type: size; }
.widget.focused .traffic-light { width: min(20cqw, 140px, 25cqh); height: min(20cqw, 140px, 25cqh); }
.dice-faces { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; width: 100%; min-height: 0; overflow: auto; }
.dice-faces .dice-face { font-size: clamp(30px, 22cqw, 74px); }
.widget.focused .dice-faces .dice-face { font-size: clamp(50px, 12cqw, 140px); }
.dice-count { font-size: 12px; color: var(--muted); }
.tool-surface-colors { display: flex; gap: 5px; align-items: center; }
.surface-menu { position: relative; }
.surface-menu summary { display: flex; align-items: center; justify-content: center; width: 34px; height: 36px; cursor: pointer; list-style: none; border-radius: 8px; }
.surface-menu summary::-webkit-details-marker { display: none; }
.surface-menu summary svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.surface-menu[open] .tool-surface-colors { display: grid; grid-template-columns: repeat(4,26px); padding: 8px; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
#context-toolbar button[data-direction] svg { transform: rotate(var(--direction-angle)); }
.widget[data-type=sticky] .widget-content { border-radius: 0 0 18px 3px; }
.widget[data-type=blur].focused { background: transparent; }
.widget[data-type=curtain].focused { background: transparent; }
body.overlay-focused #wall-ink { display: block !important; }
/* Neutral, theme-aware reveal grip; direction belongs to the reveal setting. */
.curtain-grip { color: var(--ink); background: var(--surface); border: 1px solid var(--muted); box-shadow: 0 2px 8px #0003; cursor: grab; font-size: 25px; line-height: 1; }
.curtain-grip:hover { color: var(--ink); background: var(--selected); }
.curtain-grip:active { cursor: grabbing; }
.widget[data-type=dice] .dice-content { display: flex; flex-direction: column; justify-content: stretch; align-items: stretch; padding: 12px; gap: 10px; overflow: hidden; }
.widget[data-type=dice] .dice-faces { display: grid; flex: 1; width: 100%; min-height: 0; gap: 8px; justify-content: center; align-content: center; overflow: hidden; }
.widget[data-type=dice] .dice-face { display: block; width: var(--die-size, 1px); height: var(--die-size, 1px); font-size: 0; line-height: 0; }
.dice-face svg { display: block; width: 100%; height: 100%; }
.dice-footer { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.dice-footer .widget-controls { flex-wrap: nowrap; gap: 8px; }
.widget[data-type=dice] .dice-footer button { min-height: 38px; height: 38px; min-width: 42px; padding: 6px; }
.dice-footer .dice-count { line-height: 16px; }
.widget[data-type=dice].focused .dice-content { padding-top: 64px; padding-bottom: 84px; }
/* Larger scroll targets and a roomier library drawer. */
* { scrollbar-width: auto; }
::-webkit-scrollbar { width: 18px; height: 18px; }
::-webkit-scrollbar-track { background: var(--page); border-radius: 10px; }
::-webkit-scrollbar-thumb { background: var(--muted); border: 3px solid var(--page); border-radius: 10px; min-height: 40px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
::-webkit-scrollbar-corner { background: var(--page); }
#library { width: min(480px, calc(100vw - 36px)); padding: 20px; }
#rooms-list { max-height: 22dvh; gap: 5px; }
#rooms-list .folder-button { min-height: 48px; padding: 10px 14px; font-size: 14px; }
#library .library-tabs button, #library #manage-room, #library #new-wall { min-height: 44px; font-size: 14px; }
#library .text-button { min-height: 40px; padding: 6px 9px; font-size: 13px; }
#library .wall-card { min-height: 100px; padding: 10px 54px 10px 104px; }
#library .wall-preview { width: 82px; height: 80px; top: 9px; left: 9px; }
#library .wall-card strong { font-size: 14px; }
#library .wall-card small { font-size: 12px; }
#library .organize-wall { top: 29px; right: 8px; width: 42px; height: 42px; min-height: 42px; padding: 10px; }
#library .wall-order button { min-height: 38px; min-width: 42px; font-size: 15px; }
@media (pointer: coarse) { ::-webkit-scrollbar { width: 22px; height: 22px; } }
@media (max-width: 720px) { #library { width: calc(100vw - 20px); padding: 14px; } }
/* Two-column Room folders and Wall browser. */
#library { width: min(1120px, calc(100vw - 36px)); bottom: 88px; overflow: hidden; }
.library-browser { display: grid; grid-template-columns: minmax(220px, 27%) minmax(0, 1fr); flex: 1; min-height: 0; gap: 22px; }
.library-room-pane, .library-wall-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.library-room-pane { border-right: 1px solid var(--line); padding-right: 18px; }
#rooms-section { display: flex; flex-direction: column; min-height: 0; flex: 1; flex-shrink: 1; }
#rooms-list { max-height: none; flex: 1; min-height: 0; overflow-y: auto; }
#rooms-list .folder-button { flex-shrink: 0; }
#room-actions { flex-shrink: 0; margin-top: 12px; }
.library-wall-pane > .section-label { margin: 0 0 12px; font-size: 16px; letter-spacing: 0; color: var(--ink); }
.library-wall-actions { display: flex; gap: 10px; flex-shrink: 0; }
#library .library-wall-actions > button { width: auto; flex: 1; margin: 0; }
#library-room-hint { margin: 10px 0; font-size: 12px; }
.library-wall-pane .search { margin-bottom: 12px; flex-shrink: 0; }
.library-wall-pane #wall-list { padding: 3px 6px 3px 3px; }
.room-add-wall { margin: -2px 0 12px; min-height: 40px; color: var(--accent); }
.library-footer > div { justify-content: flex-end; gap: 12px; }
@media(max-width:720px) { .library-browser { grid-template-columns: 170px minmax(0,1fr); gap: 12px; } .library-room-pane { padding-right: 10px; } .library-wall-actions { flex-direction: column; } #library { width: calc(100vw - 20px); } }
@media(max-width:560px) { .library-browser { grid-template-columns: 1fr; grid-template-rows: minmax(100px, 30%) minmax(0,1fr); gap: 12px; } .library-room-pane { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 8px; } .library-room-pane .section-label { margin: 0; } #room-actions { margin: 3px 0; } .library-tabs { margin: 0 0 5px; } .library-wall-actions { flex-direction: row; } #library #new-wall, #library #manage-room { font-size: 12px; } }
/* Larger previews in a narrower, reorderable Wall grid. */
#library { width: min(980px, calc(100vw - 36px)); }
.library-browser { grid-template-columns: minmax(205px, 25%) minmax(0, 1fr); gap: 18px; }
.library-wall-pane #wall-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 16px 12px; }
#library .wall-card { display: block; min-height: 0; padding: 8px; margin: 0; text-align: left; }
#library .wall-preview { position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: 16 / 9; }
#library .wall-card strong { margin: 10px 2px 4px; font-size: 14px; }
#library .wall-card small { font-size: 11px; }
.wall-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; padding-top: 5px; }
#library .wall-card-actions button { position: static; min-width: 34px; width: 34px; min-height: 36px; height: 36px; padding: 7px; border: 0; background: transparent; }
#library .wall-card-actions button:hover { background: var(--selected); }
#library .wall-drag { margin-left: auto; cursor: grab; touch-action: none; font-size: 24px; }
#library .wall-drag:active { cursor: grabbing; }
.wall-list-item.drop-target { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 12px; }
#library .wall-order { margin: 3px 0 0; }
#library .wall-order button { min-height: 32px; min-width: 36px; }
#library .room-add-wall { width: 100%; margin: 5px 0 0; }
.mini-widget { overflow: hidden; }
.mini-widget img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mini-widget.mini-text { font-size: 5px; line-height: 1.25; padding: 3px; color: #233449; white-space: pre-wrap; }
.mini-widget.mini-text::after { display: none; }
@media(max-width:850px) { .library-wall-pane #wall-list { grid-template-columns: 1fr; } }
@media(max-width:720px) { #library { width: calc(100vw - 20px); } .library-browser { grid-template-columns: 170px minmax(0,1fr); gap: 12px; } }
@media(max-width:560px) { .library-browser { grid-template-columns: 1fr; } }
#library { width: min(1280px, calc(100vw - 36px)); }
.library-browser { grid-template-columns: 235px minmax(0,1fr); }
.library-wall-pane #wall-list { grid-template-columns: repeat(3,minmax(0,1fr)); }
#categories-section { display: flex; flex-direction: column; min-height: 0; flex: 1; }
#categories-list { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 5px; }
#categories-section .folder-button { flex-shrink: 0; min-height: 48px; font-size: 14px; }
#all-walls-category { margin-bottom: 8px; }
#category-actions { display: flex; gap: 8px; padding-top: 12px; }
#category-actions button { flex: 1; }
@media(max-width:1100px) { .library-wall-pane #wall-list { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:800px) { .library-browser { grid-template-columns: 180px minmax(0,1fr); } .library-wall-pane #wall-list { grid-template-columns: 1fr; } }
@media(max-width:560px) { #library { width: calc(100vw - 20px); } .library-browser { grid-template-columns: 1fr; } }
/* Teaching displays scale against both window dimensions, including Focus. */
.widget:is([data-type=timer],[data-type=clock],[data-type=tally],[data-type=traffic]) { container-type: size; }
.widget:is([data-type=timer],[data-type=clock],[data-type=tally]) :is(.time-content,.tally-content) { padding: min(3cqw, 3cqh); gap: min(2cqw, 2cqh); }
.widget[data-type=clock] .clock-display { font-size: min(calc(90cqw / var(--digits,8) * 1.5), calc(55cqh - 16px)); letter-spacing: -.035em; white-space: nowrap; line-height: 1.1; }
.widget[data-type=clock] .clock-date { font-size: min(4cqw, 10cqh); line-height: 1.3; text-align: center; max-width: 100%; overflow-wrap: anywhere; }
.widget[data-type=tally] .tally-value { font-size: min(calc(88cqw / var(--digits,1) * 1.45), calc(60cqh - 22px)); line-height: 1.05; font-variant-numeric: tabular-nums; }
.widget[data-type=timer] { --timer-step: clamp(28px, min(10cqw, 12cqh), 80px); }
.widget[data-type=timer] .timer-face { width: 100%; gap: min(2cqw, 2cqh); }
.widget[data-type=timer] .timer-face .time-display { font-size: min(calc((90cqw - 2 * var(--timer-step)) / var(--digits,5) * 1.5), calc(42cqh - 12px)); line-height: 1.15; letter-spacing: -.035em; white-space: nowrap; }
.widget[data-type=timer] .time-step { width: var(--timer-step); height: var(--timer-step); min-height: var(--timer-step); font-size: calc(var(--timer-step) * .58); }
.widget[data-type=timer] .time-steps { gap: min(1cqh, 8px); }
.widget[data-type=timer] .time-label { font-size: min(3cqw, 5cqh); letter-spacing: .08em; }
.widget:is([data-type=timer],[data-type=tally]) .widget-controls { flex-wrap: nowrap; gap: min(2cqw, 2cqh); }
.widget:is([data-type=timer],[data-type=tally]) .widget-controls button { min-height: clamp(32px, min(11cqw, 13cqh), 88px); min-width: clamp(38px, 14cqw, 150px); padding: min(1.5cqw, 2cqh); font-size: clamp(12px, min(4cqw, 6cqh), 38px); }
.widget[data-type=traffic] .traffic-content { padding: min(3cqw, 2cqh); gap: min(3cqw, 2cqh); }
.widget[data-type=traffic] .traffic-light { width: min(76cqw, calc((88cqh - 36px) / 3)); height: min(76cqw, calc((88cqh - 36px) / 3)); border-width: clamp(2px, 1cqw, 6px); opacity: .38; box-shadow: none; }
.widget[data-type=traffic] .traffic-light.lit { opacity: 1; box-shadow: 0 0 0 3px var(--ink), 0 0 min(5cqw, 28px) color-mix(in srgb, var(--light-color), transparent 55%); }

/* Keep classroom content clear; navigation lives along the bottom edge. */
.app-header { inset: auto auto 16px 14px; width: 280px; max-width: calc(100vw - 28px); }
.wall-heading { flex: 1; width: 100%; }
.header-center { bottom: 80px; }
#library { top: 16px; }
.library-footer > .library-footer-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; }
.library-brand { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink); }
.library-brand .brand-mark { display: block; width: 32px; height: 32px; object-fit: contain; background: transparent; border-radius: 0; }
.library-backup-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-left: auto; }
@media (max-width: 1100px) {
  .app-header { inset: auto auto 84px 10px; width: 240px; }
  .header-center { bottom: 146px; }
}

@media (max-width: 420px) {
  #main-toolbar > .dock-button { width: 32px; min-width: 32px; padding: 6px; }
}

#active-tools { inset: 16px 18px 88px auto; width: 320px; max-width: calc(100vw - 28px); max-height: none; padding: 14px; display: flex; flex-direction: column; }
#active-tools .popup-heading { margin-bottom: 10px; flex-shrink: 0; }
#active-tools h2 { font-size: 17px; }
#active-tools-list { flex: 1; overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.active-tool-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.active-tool-row:last-child { border-bottom: 0; }
.active-tool-title { text-align: left; justify-content: flex-start; border: 0; background: transparent; padding: 8px; min-height: 42px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.tool-hidden .active-tool-title { color: var(--muted); }
.active-tool-row .icon-button { flex-shrink: 0; width: 40px; min-height: 42px; }
.active-tools-empty { color: var(--muted); font-size: 13px; }

.active-tool-title[aria-pressed="true"] { background: var(--selected); color: var(--accent); }
@media(max-width:720px) { #active-tools { right: 10px; } }

.widget[data-type=magnifier] .widget-content { padding: 0; overflow: hidden; cursor: grab; touch-action: none; }
.widget[data-type=magnifier] .widget-content:active { cursor: grabbing; }
.magnifier-lens { display: block; position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.magnifier-zoom { font-size: 12px; min-width: 30px; text-align: center; }

.widget:is([data-type=scoreboard],[data-type=stopwatch],[data-type=soundboard]) { container-type: size; }
.widget:is([data-type=scoreboard],[data-type=stopwatch],[data-type=soundboard],[data-type=youtube]) > .widget-content { padding: 0; background: var(--surface); color: var(--ink); }
.stopwatch-content { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 12px; padding: 14px; }
.stopwatch-display { font-size: min(calc(135cqw / var(--digits,5)), 37cqh); line-height: 1.1; font-weight: 600; font-variant-numeric: tabular-nums; }
.scoreboard-content { display: flex; flex-direction: column; height: 100%; padding: 10px; gap: 8px; }
.scoreboard-teams { display: grid; grid-template-columns: repeat(var(--columns,2),minmax(0,1fr)); grid-template-rows: repeat(var(--rows,1),minmax(0,1fr)); flex: 1; min-height: 0; gap: 8px; }
.scoreboard-team { display: flex; flex-direction: column; align-items: center; justify-content: space-between; min-width: 0; min-height: 0; padding: 7px; border: 1px solid var(--line); border-radius: 12px; overflow: auto; }
.scoreboard-team input { width: 100%; text-align: center; padding: 4px; background: transparent; border-color: transparent; font-size: clamp(11px,2.5cqw,20px); }
.team-score { font-size: min(calc(115cqw / var(--columns) / max(2,var(--digits,1))),calc(40cqh / var(--rows))); font-variant-numeric: tabular-nums; font-weight: 700; line-height: 1.1; }
.scoreboard-footer { flex-shrink: 0; }
.widget[data-type=scoreboard] .widget-controls { gap: 6px; }
.widget[data-type=scoreboard] .widget-controls button { min-width: 32px; min-height: 32px; padding: 5px; }
.soundboard-content { display: flex; flex-direction: column; height: 100%; padding: 12px; gap: 12px; }
.sound-pads { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); flex: 1; min-height: 0; gap: 8px; }
.sound-pads button { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 7px 3px; font-size: clamp(10px,3cqw,15px); }
.sound-pads button svg { width: min(8cqw,12cqh); height: min(8cqw,12cqh); }
.sound-pads button.active { background: var(--selected); color: var(--accent); }
.sound-controls { display: flex; gap: 12px; align-items: center; }
.sound-controls input { width: 100%; min-width: 0; }
.youtube-content { display: flex; flex-direction: column; height: 100%; background: var(--surface); }
.youtube-player { width: 100%; flex: 1; min-height: 0; border: 0; background: #000; }
.youtube-controls { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px; gap: 10px; flex-shrink: 0; }
.youtube-controls button { min-height: 32px; padding: 4px; }
.youtube-controls a { color: var(--accent); font-size: 12px; }
.youtube-form { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 20px; height: 100%; overflow: auto; }
.youtube-form label { display: flex; flex-direction: column; gap: 8px; }
.youtube-form small { color: var(--muted); }
.youtube-error:empty { display: none; }
.youtube-error { color: var(--ink); font-size: 13px; margin: 0; }

.soundboard-content { overflow-y: auto; }
.sound-pads { grid-template-rows: repeat(3,minmax(56px,1fr)); flex-shrink: 0; min-height: 184px; }
.sound-controls { flex-shrink: 0; }
.custom-sound-pads { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; flex-shrink: 0; }
.custom-sound-slot { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 5px; }
.custom-sound-slot > button { display: flex; flex-direction: column; width: 100%; min-height: 56px; padding: 6px; background: transparent; border: 0; }
.custom-sound-slot > button span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.custom-sound-slot > button.active { color: var(--accent); background: var(--selected); }
.custom-sound-actions { display: flex; justify-content: center; gap: 6px; }
.custom-sound-actions button { padding: 5px; min-height: 32px; }

.embed-form-actions { display: flex; gap: 10px; }
.embed-form-actions > button { flex: 0 0 calc(50% - 5px); }
.widget:is([data-type=website],[data-type=pdf],[data-type=qr]) > .widget-content { padding: 0; background: var(--surface); color: var(--ink); }
.website-content,.pdf-content { height: 100%; display: flex; flex-direction: column; }
.website-player,.pdf-player { flex: 1; min-height: 0; width: 100%; border: 0; background: white; }
.website-footer,.pdf-footer { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 8px; padding: 7px 10px; font-size: 12px; }
.website-footer small { color: var(--muted); }
.website-footer a,.pdf-footer a { color: var(--accent); flex-shrink: 0; }
.pdf-footer span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-content > button { margin: auto; }
.qr-content { display: flex; flex-direction: column; align-items: center; height: 100%; padding: 12px; gap: 10px; }
.qr-content .youtube-form { width: 100%; }
.qr-image { flex: 1; width: 100%; min-height: 0; }
.qr-link { color: var(--accent); font-size: 12px; overflow-wrap: anywhere; max-height: 42px; overflow-y: auto; flex-shrink: 0; }

.widget:is([data-type=checklist],[data-type=weblinks]) > .widget-content { padding: 0; background: var(--surface); color: var(--ink); }
.list-tool-content { display: flex; flex-direction: column; height: 100%; padding: 12px; gap: 8px; }
.list-tool-items { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; list-style: none; padding: 0; margin: 0; }
.list-tool-items[data-text-size=medium] { font-size: 20px; }
.list-tool-items[data-text-size=large] { font-size: 28px; }
.list-tool-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.checklist-label { display: flex; flex-direction: row; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 4px; cursor: pointer; overflow-wrap: anywhere; }
.checklist-label input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--accent); cursor: pointer; }
.checked .checklist-label span { text-decoration: line-through; color: var(--muted); }
.web-link { flex: 1; min-width: 0; color: var(--accent); overflow-wrap: anywhere; padding: 6px 3px; }
.list-tool-remove { flex-shrink: 0; width: 36px; min-height: 40px; padding: 6px; background: transparent; border-color: transparent; }
.list-tool-add { display: flex; gap: 8px; flex-shrink: 0; }
.list-tool-add input { flex: 1; min-width: 0; width: 0; }
.list-tool-add button { flex-shrink: 0; width: 42px; padding: 8px; }
.list-tool-empty { color: var(--muted); padding: 12px 4px; font-size: 13px; }
.list-tool-error { font-size: 12px; color: var(--ink); margin: 0; }
.list-tool-error:empty { display: none; }

.widget[data-type=slideshow] > .widget-content { padding: 0; background: var(--surface); }
.slideshow-content { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.slideshow-content .media-placeholder { flex: 1; }
.slideshow-image { display: block; flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.slideshow-next svg { transform: rotate(180deg); }
.slideshow-count { font-size: 12px; min-width: 44px; text-align: center; }

.wall-heading { display: flex; align-items: center; gap: 6px; }
.wall-heading > div { flex: 1; min-width: 0; }
#saved-states-toggle { width: 34px; height: 34px; min-height: 34px; padding: 6px; color: inherit; }
#saved-states { inset: 16px auto 88px 14px; width: 340px; max-width: calc(100vw - 28px); max-height: none; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
#saved-states .popup-heading { margin: 0; flex-shrink: 0; }
#saved-states h2 { font-size: 17px; }
.state-scopes { display: flex; gap: 6px; }
.state-scopes button { flex: 1; }
.state-scopes .active, #saved-states-toggle.active { background: var(--selected); }
#state-target { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
#state-create { display: flex; gap: 6px; }
#state-name { width: 0; flex: 1; }
#saved-state-list { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.saved-state-card { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.saved-state-card > strong { overflow-wrap: anywhere; }
.saved-state-card > small { color: var(--muted); }
.saved-state-actions { display: flex; justify-content: flex-end; gap: 6px; }
.state-preview { width: 100%; height: auto; inset: auto; aspect-ratio: 16/9; position: relative; overflow: hidden; }
.state-preview canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
@media(max-width:1100px) { #saved-states { bottom: 144px; left: 10px; } }

#background-library { width: min(1180px, calc(100vw - 32px)); max-width: none; height: min(820px, calc(100dvh - 40px)); max-height: none; padding: 20px; overflow: hidden; }
#background-library[open] { display: flex; flex-direction: column; gap: 12px; }
.background-library-header, .background-library-search, .background-library-tabs, .background-library-footer { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.background-library-header { justify-content: space-between; }
.background-library-header h2 { margin: 0; }
#background-library-search { flex: 1; width: 0; }
.background-library-tabs .active { background: var(--selected); }
#background-library-count { margin-left: auto; color: var(--muted); font-size: 12px; }
.background-library-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; flex: 1; min-height: 0; }
#background-library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: 12px; overflow-y: auto; min-height: 0; padding: 4px; overscroll-behavior: contain; }
.background-library-card { position: relative; min-width: 0; }
.background-library-choice { display: flex; flex-direction: column; padding: 5px; width: 100%; gap: 6px; height: 100%; justify-content: flex-start; }
.background-library-choice[aria-pressed=true] { outline: 3px solid var(--accent); outline-offset: -2px; background: var(--selected); }
.background-library-choice img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; }
.background-library-choice span { width: 100%; font-size: 12px; text-align: left; overflow-wrap: anywhere; padding: 2px 4px; }
.background-library-card > .icon-button { position: absolute; right: 8px; top: 8px; background: var(--surface); border: 1px solid var(--line); width: 34px; height: 34px; min-height: 34px; padding: 6px; }
.background-library-preview { min-width: 0; overflow-y: auto; }
#background-library-preview { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; margin-bottom: 12px; }
#background-library-name { display: block; overflow-wrap: anywhere; }
.background-library-preview p, .background-library-empty { color: var(--muted); font-size: 13px; }
.background-library-empty { grid-column: 1/-1; }
#background-library-status { flex-shrink: 0; margin: 0; font-size: 13px; }
#background-library-status:empty { display: none; }
.background-library-footer { justify-content: flex-end; }

/* Annotation commands share the primary dock's button sizes and rhythm. */
#main-toolbar { --command-size: 42px; --command-gap: 5px; }
body.annotation-dock #main-toolbar > .ink-command-bar { gap: var(--command-gap) !important; }
#main-toolbar .ink-tools, #main-toolbar .ink-footer { gap: var(--command-gap); }
#main-toolbar .ink-footer { border: 0; padding: 0; }
#main-toolbar .ink-tools button, #main-toolbar .ink-footer button { width: var(--command-size); min-width: var(--command-size); height: 42px; padding: 10px; border-radius: 12px; }
#main-toolbar .ink-target { position: relative; width: 156px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0; }
#main-toolbar .ink-target > svg { position: absolute; left: 9px; top: 11px; width: 19px; height: 19px; pointer-events: none; color: var(--muted); }
.ink-target-caption { position: absolute; top: 3px; left: 36px; font-size: 9px; line-height: 12px; color: var(--muted); pointer-events: none; }
#main-toolbar .ink-target select { position: static; opacity: 1; width: 100%; height: 100%; min-height: 0; border: 0; border-radius: inherit; padding: 12px 20px 1px 36px; font-size: 12px; color: var(--ink); background-color: transparent; text-overflow: ellipsis; cursor: pointer; }
#main-toolbar .ink-target select option { background: var(--surface); color: var(--ink); }
#context-toolbar .ink-sizes button { flex-direction: column; gap: 3px; min-height: 52px; padding: 5px 7px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; }
#context-toolbar .ink-sizes button[aria-pressed=true] { background: var(--selected); border-color: var(--accent); color: var(--accent); }
.ink-size-preview { display: flex; align-items: center; justify-content: center; height: 20px; width: 24px; }
.ink-size-sample { display: block; flex-shrink: 0; width: var(--sample-size); height: var(--sample-size); border-radius: 50%; background: currentColor; }

#workspace { isolation: isolate; }
#spotlight-shade { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1000001; pointer-events: none; }
.widget[data-type=spotlight], .widget[data-type=spotlight].focused { background: transparent; box-shadow: none; z-index: 1000003 !important; }
.spotlight-surface { background: transparent; cursor: grab; touch-action: none; border-radius: 0; }
.widget[data-type=spotlight][data-locked=true] .spotlight-surface { cursor: default; }
#laser-pointer { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 40; touch-action: none; cursor: none; }
.laser-colors { display: flex; gap: 8px; align-items: center; padding: 4px; }
#context-toolbar .laser-swatch { width: 30px; height: 30px; min-width: 30px; min-height: 30px; padding: 0; border-radius: 50%; border: 1px solid var(--line); }
.laser-swatch[aria-pressed=true] { outline: 2px solid var(--accent); outline-offset: 2px; }
body.annotation-dock #main-toolbar > #laser-tool { display: none; }
.ink-target-name { width: 100%; padding: 12px 8px 0 36px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media(max-width:720px) { .ink-target-name { padding: 0 6px; } }
@media(max-width:720px) {
  #main-toolbar { --command-size: 38px; --command-gap: 2px; }
  #main-toolbar .ink-tools button, #main-toolbar .ink-footer button { padding: 8px; }
  #main-toolbar .ink-target { width: 100px; }
  #main-toolbar .ink-target > svg, .ink-target-caption { display: none; }
  #main-toolbar .ink-target select { padding: 5px 18px 5px 7px; }
}
@media(max-width:420px) {
  #main-toolbar { --command-size: 30px; --command-gap: 1px; gap: 1px; }
  #main-toolbar > .dock-button { width: 30px; min-width: 30px; padding: 5px; }
  #main-toolbar .dock-divider { margin: 0; }
  #main-toolbar .ink-tools button, #main-toolbar .ink-footer button { padding: 6px; }
  #main-toolbar .ink-target { width: 68px; }
}
@media(max-width:900px) { .background-library-body { grid-template-columns: minmax(0,1fr) 220px; } #background-library-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:620px) { #background-library { padding: 12px; width: calc(100vw - 20px); height: calc(100dvh - 20px); } .background-library-search { flex-wrap: wrap; } #background-library-search { flex-basis: 100%; width: 100%; } .background-library-body { display: flex; flex-direction: column; } #background-library-grid { flex: 1; } .background-library-preview { display: none; } .background-library-tabs { gap: 4px; } .background-library-tabs button { padding: 6px 10px; } }
