html, body {
  height: 100%;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #f9fafb;
  color: #111827;
  touch-action: none;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  position: relative;
  touch-action: none;
  overscroll-behavior: none;
}

.nb-main-row {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.nb-hidden { display: none !important; }

/* flex helpers used in sidebar markup */
.nb-flex { display: flex; }
.nb-flex-1 { flex: 1; }
.nb-items-center { align-items: center; }
.nb-justify-between { justify-content: space-between; }
.nb-gap-2 { gap: 0.5rem; }
.nb-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-text-xs { font-size: 0.75rem; }
.nb-text-sm { font-size: 0.875rem; }
.nb-text-gray-500 { color: #6b7280; }
.nb-text-gray-600 { color: #4b5563; }
.nb-text-gray-900 { color: #111827; }
.nb-font-semibold { font-weight: 600; }
.nb-mb-2 { margin-bottom: 0.5rem; }
.nb-mb-3 { margin-bottom: 0.75rem; }
.nb-p-2 { padding: 0.5rem; }
.nb-w-8 { width: 2rem; }
.nb-h-8 { height: 2rem; }
.nb-rounded-lg { border-radius: 0.5rem; }
.nb-bg-blue-600 { background: #2563eb; }
.nb-text-white { color: #fff; }
.nb-gap-1 { gap: 0.25rem; }
.nb-mt-2 { margin-top: 0.5rem; }

.font-inter { font-family: 'Inter', system-ui, sans-serif; }
.nb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.nb-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.nb-btn-danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.nb-btn-danger:hover:not(:disabled) { background: #b91c1c; }

.nb-field-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #374151;
  margin: 0.35rem 0 0.5rem;
}
.nb-field-check input { margin-top: 0.15rem; }
.nb-field textarea {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.4rem 0.5rem;
  font: inherit;
  font-size: 0.875rem;
  resize: vertical;
  min-height: 4.5rem;
}

.nb-stream-panel {
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.nb-stream-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  min-width: 0;
  width: 100%;
}
.nb-stream-device {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: #6b7280;
  font-size: 0.75rem;
}
.nb-stream-device i { width: 0.85rem; text-align: center; }
.nb-stream-select {
  width: 6.4rem;
  max-width: 6.4rem;
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.28rem 0.35rem;
  font-size: 0.75rem;
  background: #fff;
  color: #374151;
}
.nb-stream-gear-select {
  width: calc(100% - 0.5rem);
  margin: 0.15rem 0.25rem 0.4rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.28rem 0.4rem;
  font-size: 0.8rem;
  background: #fff;
}
.nb-stream-gear-wrap { margin-left: auto; }
.nb-stream-avatar {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #1d4ed8;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
}
.nb-stream-avatar img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nb-stream-avatar.has-img img { display: block; }
.nb-stream-avatar.has-img span { display: none; }
.nb-stream-live-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
}
.nb-stream-error {
  width: 100%;
  font-size: 0.72rem;
  color: #b91c1c;
}
.nb-stream-error:empty { display: none; }
.nb-stream-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #dc2626;
}
.nb-stream-live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}
.nb-stream-live-clock {
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  font-weight: 600;
  color: #111827;
}
.nb-stream-preview-pop {
  position: fixed;
  z-index: 38;
  width: 240px;
  height: 135px;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  background: #111827;
}
.nb-stream-preview-pop[hidden] { display: none !important; }
.nb-stream-preview-pop canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.nb-broadcast-frame {
  position: fixed;
  z-index: 24;
  pointer-events: none;
  box-sizing: border-box;
  border: 2px solid rgba(148, 163, 184, 0.9);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35) inset;
  border-radius: 2px;
}
.nb-broadcast-frame.is-live {
  border-color: rgba(239, 68, 68, 0.92);
  box-shadow: none;
}
.nb-stream-hud {
  position: fixed;
  z-index: 37;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.18rem 0.45rem 0.18rem 0.4rem;
  border-radius: 0.4rem;
  background: rgba(17, 24, 39, 0.55);
  color: #f9fafb;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(8px);
}
.nb-stream-hud[hidden] { display: none !important; }
.nb-stream-hud-time { font-variant-numeric: tabular-nums; }
.nb-stream-hud-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}
.nb-stream-hud-bars i {
  display: block;
  width: 3px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.28);
}
.nb-stream-hud-bars i:nth-child(1) { height: 4px; }
.nb-stream-hud-bars i:nth-child(2) { height: 7px; }
.nb-stream-hud-bars i:nth-child(3) { height: 11px; }
.nb-stream-hud-bars[data-strength="good"] i { background: #4ade80; }
.nb-stream-hud-bars[data-strength="ok"] i:nth-child(1),
.nb-stream-hud-bars[data-strength="ok"] i:nth-child(2) { background: #fbbf24; }
.nb-stream-hud-bars[data-strength="weak"] i:nth-child(1) { background: #f87171; }

.nb-stream-live-chip {
  position: absolute;
  left: 10px;
  bottom: 8px;
  z-index: 36;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.4rem 0.22rem 0.55rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #fecaca;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.nb-stream-live-chip[hidden] { display: none !important; }
.nb-stream-live-chip button {
  border: 0;
  background: #f3f4f6;
  color: #374151;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
}
.nb-stream-live-chip button:hover { background: #e5e7eb; }
#nbChipStop { background: #fee2e2; color: #b91c1c; }

#app.is-streaming .nb-focus-toggle {
  top: auto;
  bottom: 8px;
  right: 18px;
  z-index: 36;
}

#app.is-focus-mode .nb-ribbon-panel[data-panel="stream"] {
  display: none !important;
}
.nb-btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.nb-btn-primary:hover:not(:disabled) { background: #1d4ed8; }
.nb-btn-secondary { background: #fff; color: #374151; border-color: #d1d5db; }
.nb-btn-secondary:hover:not(:disabled) { background: #f3f4f6; }
.nb-btn-ghost { background: transparent; color: #4b5563; }
.nb-btn-ghost:hover:not(:disabled) { background: #f3f4f6; }
.nb-btn-icon { padding: 0.45rem; min-width: 2.25rem; min-height: 2.25rem; }
.nb-btn-active { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
.nb-btn.is-view-blocked,
.nb-pen-strip.is-view-blocked,
.nb-text-toolbar.is-view-blocked {
  opacity: 0.42;
  pointer-events: none;
}

.nb-sidebar {
  width: 280px;
  min-width: 220px;
  max-width: 360px;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
}

.nb-sidebar-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #fff 0%, #f9fafb 100%);
}

.nb-notebook-tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0.5rem 0.75rem 0;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.nb-notebook-tab {
  flex-shrink: 0;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.375rem 0.375rem 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  cursor: pointer;
  color: #6b7280;
  background: transparent;
}
.nb-notebook-tab.active {
  background: #fff;
  color: #1d4ed8;
  border-color: #e5e7eb;
}

.nb-tree {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.nb-tree-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.75rem 0.32rem 0.4rem;
  font-size: 0.8125rem;
  cursor: grab;
  border-left: 3px solid transparent;
  user-select: none;
  position: relative;
}
.nb-tree-item .nb-truncate { flex: 1; min-width: 0; }
.nb-tree-item:hover { background: #f3f4f6; }
.nb-tree-item.active {
  background: #eff6ff;
  border-left-color: #2563eb;
  color: #1e40af;
  font-weight: 500;
}
.nb-tree-item.section { font-weight: 600; color: #374151; cursor: pointer; }
.nb-tree-item.section:active,
.nb-tree-item.page:active { cursor: grabbing; }
.nb-tree-item .indent { width: 1rem; flex-shrink: 0; }
.nb-tree-item.is-dragging {
  opacity: 0.38;
}
.nb-tree-item.drop-before::before,
.nb-tree-item.drop-after::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.55rem;
  height: 2px;
  background: #2563eb;
  border-radius: 99px;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}
.nb-tree-item.drop-before::before { top: -1px; }
.nb-tree-item.drop-after::after { bottom: -1px; }
.nb-tree-item.drop-into {
  background: #dbeafe;
  box-shadow: inset 0 0 0 1px #93c5fd;
}
.nb-tree-chevron {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #9ca3af;
  border-radius: 0.25rem;
  cursor: pointer;
  padding: 0;
  font-size: 0.58rem;
}
.nb-tree-chevron:hover { background: #e5e7eb; color: #4b5563; }
.nb-tree-chevron.is-empty {
  visibility: hidden;
  pointer-events: none;
}
.nb-tree-chevron-spacer {
  width: 1.1rem;
  flex: 0 0 auto;
}

.nb-toolbar {
  display: block;
  padding: 0;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.nb-ribbon-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 0.5rem;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}
.nb-sync-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.6rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #9ca3af;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}
.nb-sync-toggle:hover { border-color: #cbd5e1; color: #6b7280; }
.nb-sync-toggle.is-on {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}
.nb-sync-now {
  margin-left: 0.35rem;
  padding: 0.22rem 0.55rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #4b5563;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}
.nb-sync-now:hover { border-color: #93c5fd; color: #1d4ed8; }
.nb-ribbon-tab {
  border: none;
  background: transparent;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.nb-ribbon-tab:hover { color: #1d4ed8; }
.nb-ribbon-tab.active {
  color: #1d4ed8;
  border-bottom-color: #2563eb;
  background: #fff;
}
.nb-ribbon-panel {

  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  min-height: 2.6rem;
}
.nb-view-hint {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-right: 0.15rem;
}
.nb-view-layer {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  min-width: 3.1rem;
  min-height: 2.85rem;
  padding: 0.28rem 0.35rem 0.22rem;
}
.nb-view-layer i { font-size: 0.95rem; }
.nb-view-layer-name {
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1;
  color: #6b7280;
}
.nb-view-layer.nb-btn-active .nb-view-layer-name { color: #1d4ed8; }
.nb-view-layer.is-off {
  background: transparent;
  color: #9ca3af;
  border-color: transparent;
}
.nb-view-layer.is-off .nb-view-layer-name { color: #9ca3af; }
.nb-view-layer.is-off i { opacity: 0.55; }
.nb-view-layer.is-off::after {
  content: "";
  position: absolute;
  top: 0.55rem;
  left: 50%;
  width: 1.15rem;
  height: 2px;
  background: #ef4444;
  transform: translateX(-50%) rotate(-28deg);
  border-radius: 1px;
  pointer-events: none;
}
.nb-view-hidden-count {
  font-size: 0.65rem;
  font-weight: 700;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 0.1rem 0.42rem;
  margin-left: 0.2rem;
  align-self: center;
}
.nb-view-show-all {
  font-size: 0.75rem;
  color: #1d4ed8;
}
.nb-view-empty-hint {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #6b7280;
  font-size: 0.9rem;
  padding: 1.5rem;
  text-align: center;
}
.nb-view-empty-hint[hidden] { display: none !important; }

.nb-pen-strip {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.nb-pen-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.45rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.45rem;
  background: #fff;
  cursor: pointer;
  color: #374151;
  font-size: 0.75rem;
}
.nb-pen-chip:hover { border-color: #93c5fd; }
.nb-pen-chip.active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 2px #dbeafe;
}
.nb-pen-chip-swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 9999px;
  border: 1px solid rgba(0,0,0,0.12);
}
.nb-pen-chip-mark {
  display: inline-block;
  flex: 0 0 auto;
  border: 1px solid rgba(0,0,0,0.18);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.7) inset;
}
.nb-pen-chip-mark.is-round { border-radius: 999px; }
.nb-pen-chip-mark.is-highlighter { border-radius: 2px; opacity: 0.55; }
.nb-pen-chip-mark.is-marker { border-radius: 2px; }

.nb-ruler-canvas {
  pointer-events: none;
  z-index: 6;
}

.nb-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  margin-top: -5px;
  background: #fff;
  border: 1.5px solid #2563eb;
  border-radius: 2px;
  pointer-events: auto;
  z-index: 5;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.9);
}
.nb-handle-rotate {
  border-radius: 999px;
  background: #2563eb;
  cursor: grab;
}
.nb-handle-corner { cursor: nwse-resize; }
.nb-handle-corner[data-handle="ne"],
.nb-handle-corner[data-handle="sw"] { cursor: nesw-resize; }
.nb-handle-stem {
  position: absolute;
  width: 1px;
  background: #2563eb;
  pointer-events: none;
  transform-origin: top center;
  margin-left: 0;
}

.nb-field-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #4b5563;
}
.nb-field-inline select,
.nb-notebook-select,
.nb-field input,
.nb-field select {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.28rem 0.45rem;
  font-size: 0.8rem;
  background: #fff;
}
.nb-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: #374151;
}
.nb-field span em { font-style: normal; color: #6b7280; }
.nb-pen-preview-row {
  border: 1px dashed #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
}
.nb-pen-preview-row canvas { display: block; width: 100%; height: 56px; }
.nb-pen-hint {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #6b7280;
}

.nb-pen-color-field { margin-bottom: 0.85rem; }
.nb-pen-color-section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.55rem;
  background: #fafafa;
}
.nb-pen-color-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9ca3af;
}
.nb-pen-swatch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.nb-pen-swatch {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 999px;
  cursor: pointer;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px #d1d5db;
  transition: box-shadow 0.12s ease, transform 0.12s ease;
}
.nb-pen-swatch:hover {
  box-shadow: 0 0 0 2px #93c5fd;
  transform: scale(1.06);
}
.nb-pen-swatch-active {
  box-shadow: 0 0 0 2px #2563eb;
}
.nb-pen-swatch-hi {
  border-radius: 0.35rem;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
    linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0;
  overflow: hidden;
}
.nb-pen-swatch-hi .nb-pen-swatch-fill {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.72;
}
.nb-pen-swatch-custom {
  position: relative;
  overflow: hidden;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: conic-gradient(#ef4444, #eab308, #22c55e, #3b82f6, #a855f7, #ef4444);
}
.nb-pen-swatch-custom input {
  position: absolute;
  inset: -0.45rem;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 0;
  cursor: pointer;
  opacity: 0;
}
.nb-pen-color-recent:not([hidden]) {
  margin-top: 0.1rem;
}

.nb-notebook-select {
  width: 100%;
  font-weight: 600;
  color: #111827;
}

.nb-menu-wrap { position: relative; }
.nb-flyout {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 240px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,0.25);
  z-index: 40;
  padding: 0.35rem;
}
.nb-flyout button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.5rem;
  border: none;
  background: transparent;
  padding: 0.45rem 0.55rem;
  border-radius: 0.35rem;
  text-align: left;
  cursor: pointer;
  font-size: 0.8rem;
  color: #374151;
}
.nb-flyout button:hover { background: #f3f4f6; }
.nb-flyout-sep { height: 1px; background: #e5e7eb; margin: 0.3rem 0.25rem; }
.nb-flyout-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
  padding: 0.25rem 0.55rem;
}
.nb-flyout-empty {
  font-size: 0.75rem;
  color: #9ca3af;
  padding: 0.35rem 0.55rem;
}

.nb-tree-rename {
  flex: 1;
  min-width: 0;
  border: 1px solid #93c5fd;
  border-radius: 0.25rem;
  padding: 0.1rem 0.3rem;
  font: inherit;
  font-size: 0.8125rem;
}

.nb-notebook-tabs { display: none; }

.nb-toolbar-divider {
  width: 1px;
  height: 1.5rem;
  background: #e5e7eb;
  margin: 0 0.25rem;
}

.nb-text-toolbar select {
  min-width: 7.5rem;
  max-width: 10rem;
}
.nb-text-toolbar #nbFontSize {
  min-width: 3.5rem;
  max-width: 4.2rem;
}
.nb-swatch-row {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}
.nb-swatch {
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  cursor: pointer;
  box-sizing: border-box;
}
.nb-swatch:hover { border-color: #2563eb; }
.nb-swatch-hi {
  border-radius: 0.2rem;
  font-size: 0.7rem;
  line-height: 1;
  color: #9ca3af;
}
.nb-swatch-pick {
  position: relative;
  overflow: hidden;
  background: conic-gradient(#ef4444, #eab308, #22c55e, #3b82f6, #a855f7, #ef4444);
  border-radius: 999px;
}
.nb-swatch-pick input {
  position: absolute;
  inset: -0.4rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  cursor: pointer;
  opacity: 0;
}

.nb-color-swatch {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #d1d5db;
  cursor: pointer;
}
.nb-color-swatch.active { box-shadow: 0 0 0 2px #2563eb; }

.nb-editor-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #e5e7eb;
  min-width: 0;
  min-height: 0;
  touch-action: none;
  overscroll-behavior: none;
}

.nb-stage {
  flex: 1;
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.nb-focus-toggle {
  position: absolute;
  top: 10px;
  right: 18px;
  z-index: 28;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.42);
  color: #6b7280;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  opacity: 0.4;
  pointer-events: auto;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.nb-stage:hover .nb-focus-toggle,
.nb-focus-toggle:hover,
.nb-focus-toggle:focus-visible {
  opacity: 0.95;
  background: rgba(255, 255, 255, 0.92);
  border-color: #e5e7eb;
  color: #374151;
}
.nb-focus-toggle:focus {
  outline: none;
}
.nb-focus-toggle:focus-visible {
  border-color: #93c5fd;
}
#app:not(.is-focus-mode) .nb-focus-exit {
  display: none;
}
#app.is-focus-mode .nb-focus-enter {
  display: none;
}
#app.is-focus-mode .nb-focus-exit {
  z-index: 32;
  opacity: 0.72;
  background: rgba(255, 255, 255, 0.88);
  border-color: #e5e7eb;
}

#app.is-focus-mode .nb-sidebar,
#app.is-focus-mode .nb-status-bar,
#app.is-focus-mode .nb-ribbon-tabs {
  display: none !important;
}
#app.is-focus-mode .nb-toolbar {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  width: max-content;
  max-width: calc(100vw - 5.5rem);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
#app.is-focus-mode .nb-ribbon-body {
  padding: 0.28rem 0.45rem;
}
#app.is-focus-mode .nb-ribbon-panel[data-panel="page"],
#app.is-focus-mode .nb-ribbon-panel[data-panel="insert"] {
  display: none !important;
}
#app.is-focus-mode .nb-ribbon-panel[data-panel="draw"]:not(.nb-hidden),
#app.is-focus-mode .nb-ribbon-panel[data-panel="shapes"]:not(.nb-hidden),
#app.is-focus-mode .nb-ribbon-panel[data-panel="text"]:not(.nb-hidden) {
  display: flex !important;
  flex-wrap: nowrap;
}
#app.is-focus-mode .nb-ribbon-panel[data-panel="text"]:not(.nb-hidden) {
  flex-wrap: wrap;
  max-width: calc(100vw - 6rem);
}
#app.is-focus-mode .nb-pen-strip {
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: min(52vw, 34rem);
}

.nb-page-canvas-host {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  cursor: crosshair;
  z-index: 1;
}

.nb-page-canvas-host.is-pen-over,
.nb-page-canvas-host.is-pen-over * {
  cursor: none !important;
}

.nb-pen-hover-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: rgba(24, 24, 27, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.5),
    0 0 0 3px rgba(24, 24, 27, 0.1);
  pointer-events: none;
  z-index: 40;
  display: none;
  will-change: transform;
}
.nb-pen-hover-dot.is-on {
  display: block;
}

.nb-preview-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform-origin: 0 0;
  pointer-events: none;
  backface-visibility: hidden;
  z-index: 2;
}
.nb-doc-preview-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  transform-origin: 0 0;
  visibility: hidden;
  z-index: 1;
}
.nb-doc-preview {
  position: absolute;
  pointer-events: none;
  transform-origin: 0 0;
}
.nb-preview-wrap.is-live .nb-doc-preview-layer {
  visibility: visible;
}
.nb-preview-wrap.is-live > canvas.nb-ink-canvas,
.nb-preview-wrap.is-live > canvas.nb-ink-highlight,
.nb-preview-wrap.is-live > .nb-image-layer,
.nb-preview-wrap.is-live > .nb-embed-layer,
.nb-preview-wrap.is-live .nb-select-layer,
.nb-preview-wrap.is-live .nb-marquee {
  visibility: hidden;
}

.nb-spin-tiles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  transform-origin: 0 0;
  visibility: hidden;
  z-index: 2;
}
.nb-spin-tile {
  pointer-events: none;
  transform-origin: center center;
  will-change: transform;
}
.nb-preview-wrap.is-spin-live .nb-spin-tiles {
  visibility: visible;
}
.nb-preview-wrap.is-spin-live > canvas.nb-ink-canvas,
.nb-preview-wrap.is-spin-live > canvas.nb-ink-highlight,
.nb-preview-wrap.is-spin-live > canvas.nb-shape-canvas,
.nb-preview-wrap.is-spin-live > .nb-image-layer,
.nb-preview-wrap.is-spin-live > .nb-embed-layer,
.nb-preview-wrap.is-spin-live .nb-select-layer,
.nb-preview-wrap.is-spin-live .nb-marquee,
.nb-preview-wrap.is-spin-live .nb-doc-preview-layer {
  visibility: hidden;
}

.nb-page-canvas-host.shape-mode { cursor: crosshair; }
.nb-page-canvas-host.pan-mode:active { cursor: grabbing; }
.nb-page-canvas-host.select-mode { cursor: text; }
.nb-page-canvas-host.select-mode .nb-text-box { cursor: text; }
.nb-page-canvas-host.select-mode .nb-image-node,
.nb-page-canvas-host.select-mode .nb-embed { cursor: pointer; }

.nb-page-canvas-host.nb-view-off-background .nb-bg-canvas,
.nb-page-canvas-host.nb-view-off-images .nb-image-layer,
.nb-page-canvas-host.nb-view-off-text .nb-text-layer:not(.nb-image-layer):not(.nb-embed-layer),
.nb-page-canvas-host.nb-view-off-embeds .nb-embed-layer,
.nb-page-canvas-host.nb-view-off-embeds .nb-embed-overlay,
.nb-page-canvas-host.nb-view-off-pen canvas.nb-ink-canvas:not(.nb-bg-canvas),
.nb-page-canvas-host.nb-view-off-pen .nb-ink-highlight,
.nb-page-canvas-host.nb-view-off-pen .nb-shape-canvas {
  visibility: hidden !important;
  pointer-events: none !important;
}
.nb-page-canvas-host.nb-view-off-pen .nb-pen-hover-dot { display: none !important; }

.nb-select-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform-origin: 0 0;
}
.nb-sel-box {
  position: absolute;
  border: 1.5px solid #2563eb;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85);
  pointer-events: none;
  opacity: 0.3;
}
.nb-sel-group {
  position: absolute;
  border: 1.5px solid #2563eb;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
  background: transparent;
  pointer-events: auto;
  cursor: move;
  z-index: 1;
}
.nb-marquee {
  position: absolute;
  display: none;
  border: 1px dashed #2563eb;
  background: rgba(37, 99, 235, 0.12);
  pointer-events: none;
  z-index: 9;
}

.nb-scroll {
  position: absolute;
  z-index: 8;
  pointer-events: auto;
  touch-action: none;
}
.nb-scroll-y {
  top: 6px;
  right: 3px;
  bottom: 16px;
  width: 8px;
}
.nb-scroll-x {
  left: 6px;
  right: 16px;
  bottom: 3px;
  height: 8px;
}
.nb-scroll-thumb {
  position: absolute;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.2);
  transition: background 0.12s ease;
}
.nb-scroll-y .nb-scroll-thumb {
  left: 1px;
  right: 1px;
  top: 0;
  min-height: 28px;
}
.nb-scroll-x .nb-scroll-thumb {
  top: 1px;
  bottom: 1px;
  left: 0;
  min-width: 28px;
}
.nb-scroll:hover .nb-scroll-thumb,
.nb-scroll:active .nb-scroll-thumb {
  background: rgba(17, 24, 39, 0.42);
}
.nb-scroll.is-disabled .nb-scroll-thumb {
  background: rgba(17, 24, 39, 0.08);
}

.nb-ink-canvas,
.nb-ink-highlight,
.nb-overlay-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  touch-action: none;
}
.nb-ink-highlight {
  z-index: 3;
}

.nb-text-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform-origin: 0 0;
}

.nb-text-frame {
  position: absolute;
  pointer-events: none;
  box-sizing: border-box;
}
.nb-text-frame::after {
  content: "";
  position: absolute;
  inset: calc(-5px / var(--nb-zoom, 1));
  border: 1px dashed transparent;
  border-radius: 3px;
  pointer-events: none;
}
.nb-text-frame:hover::after,
.nb-text-frame.is-editing::after,
.nb-text-frame.is-selected::after {
  border-color: #93c5fd;
}
.nb-text-frame.is-editing::after,
.nb-text-frame.is-selected::after {
  border-style: solid;
  border-color: #60a5fa;
}
.nb-text-edge {
  position: absolute;
  pointer-events: auto;
  z-index: 2;
  touch-action: none;
}
.nb-text-edge.is-left {
  left: calc(-10px / var(--nb-zoom, 1));
  top: calc(-10px / var(--nb-zoom, 1));
  bottom: calc(-10px / var(--nb-zoom, 1));
  width: calc(14px / var(--nb-zoom, 1));
  cursor: grab;
  z-index: 3;
}
.nb-text-edge.is-right {
  right: calc(-10px / var(--nb-zoom, 1));
  top: calc(-10px / var(--nb-zoom, 1));
  bottom: calc(-10px / var(--nb-zoom, 1));
  width: calc(14px / var(--nb-zoom, 1));
  cursor: ew-resize;
  z-index: 3;
}
.nb-text-edge.is-top {
  top: calc(-10px / var(--nb-zoom, 1));
  left: 0;
  right: 0;
  height: calc(12px / var(--nb-zoom, 1));
  cursor: grab;
}
.nb-text-edge.is-bottom {
  bottom: calc(-10px / var(--nb-zoom, 1));
  left: 0;
  right: 0;
  height: calc(12px / var(--nb-zoom, 1));
  cursor: grab;
}
.nb-text-edge.is-left:active,
.nb-text-edge.is-top:active,
.nb-text-edge.is-bottom:active {
  cursor: grabbing;
}
.nb-text-frame:hover .nb-text-edge.is-right,
.nb-text-frame.is-editing .nb-text-edge.is-right,
.nb-text-frame.is-selected .nb-text-edge.is-right {
  background: linear-gradient(to right, transparent 35%, rgba(37, 99, 235, 0.28));
}

.nb-text-box {
  position: relative;
  width: 100%;
  min-width: 120px;
  min-height: 1.5em;
  padding: 4px 8px 4px 6px;
  pointer-events: auto;
  outline: none;
  font-size: 16px;
  line-height: 1.4;
  color: #111827;
  background: transparent;
  border: 1px dashed transparent;
  border-radius: 2px;
  -webkit-user-select: text;
  user-select: text;
  touch-action: auto;
  z-index: 1;
  overflow-wrap: break-word;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.nb-text-box.selected {
  background: rgba(37, 99, 235, 0.04);
}
.nb-text-box:focus {
  background: rgba(255, 255, 255, 0.55);
}

.nb-image-node {
  position: absolute;
  pointer-events: auto;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  border: 2px solid transparent;
}
.nb-image-node.selected { border-color: #2563eb; }

.nb-embed-layer {
  pointer-events: none;
  z-index: 3;
}
.nb-embed-place {
  position: absolute;
  pointer-events: none;
  visibility: hidden;
}
.nb-embed-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 4;
}
.nb-page-canvas-host.is-nav-live .nb-select-layer {
  visibility: hidden;
  pointer-events: none;
}
/* Keep YouTube iframes on-screen while pan/zoom uses the bitmap preview.
   Cards use pointer-events:auto, so disable them too or they still steal the gesture. */
.nb-page-canvas-host.is-nav-live .nb-embed-overlay .nb-embed,
.nb-page-canvas-host.is-nav-live .nb-embed-overlay .nb-embed-frame {
  pointer-events: none !important;
}
.nb-embed {
  position: absolute;
  pointer-events: auto;
  box-sizing: border-box;
  overflow: visible;
  background: #000;
  outline: 2px solid transparent;
  border: 0;
  border-radius: 4px;
  user-select: none;
  -webkit-user-select: none;
  z-index: 1;
}
.nb-embed-graph {
  background: #fff;
  overflow: hidden;
}
.nb-embed-graph-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.nb-embed-graph.is-free .nb-embed-graph-canvas {
  cursor: grab;
}
.nb-embed.selected {
  outline-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.9);
}
.nb-embed-frame {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  border: 0;
  background: #000;
  display: block;
  border-radius: 4px;
}
.nb-embed-shield {
  display: none;
  pointer-events: none;
}
.nb-embed.selected .nb-embed-shield { display: block; }
.nb-embed-drag {
  position: absolute;
  pointer-events: auto;
  z-index: 3;
  cursor: grab;
}
.nb-embed-drag-n { left: -6px; right: -6px; top: -8px; height: 10px; }
.nb-embed-drag-s { left: -6px; right: -6px; bottom: -8px; height: 10px; }
.nb-embed-drag-w { top: 0; bottom: 0; left: -8px; width: 10px; }
.nb-embed-drag-e { top: 0; bottom: 0; right: -8px; width: 10px; }
.nb-yt-preview {
  margin-top: 0.65rem;
  border-radius: 0.65rem;
  overflow: hidden;
  background: #111827;
  aspect-ratio: 16 / 9;
  position: relative;
}
.nb-yt-preview.is-empty {
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nb-yt-preview-empty {
  font-size: 0.8rem;
  color: #6b7280;
}
.nb-yt-preview.is-empty .nb-yt-preview-img { display: none; }
.nb-yt-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nb-yt-hint {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  color: #6b7280;
}

.nb-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
  color: #6b7280;
  background: #fff;
  border-top: 1px solid #e5e7eb;
}

.nb-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.nb-busy-backdrop {
  z-index: 5000;
  cursor: wait;
}
.nb-busy-modal {
  width: min(360px, 92vw);
  overflow: hidden;
}
.nb-busy-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}
.nb-busy-bar-fill {
  height: 100%;
  width: 0%;
  background: #2563eb;
  border-radius: inherit;
  transform-origin: left center;
  transition: width 180ms ease;
}
.nb-busy-bar-fill.is-indeterminate {
  width: 36%;
  transition: none;
  animation: nb-busy-slide 1.15s ease-in-out infinite;
}
.nb-busy-detail {
  margin: 0.7rem 0 0;
  font-size: 0.8125rem;
  color: #6b7280;
  min-height: 1.2em;
}
@keyframes nb-busy-slide {
  0% { transform: translateX(-130%); }
  100% { transform: translateX(320%); }
}
.nb-modal {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  width: min(480px, 92vw);
  max-height: 80vh;
  overflow: auto;
}

.nb-modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  font-size: 1rem;
}

.nb-modal-body { padding: 1rem 1.25rem; }
.nb-modal-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.nb-modal-wide {
  width: min(560px, 94vw);
}
.nb-course-lead {
  font-size: 0.875rem;
  color: #4b5563;
  margin: 0 0 0.85rem;
}
.nb-course-email-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.nb-course-email-row .nb-field { margin: 0; }
.nb-course-search {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}
.nb-course-status {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 0.55rem;
  min-height: 1.1em;
}
.nb-course-status.is-ok { color: #047857; }
.nb-course-status.is-warn { color: #b45309; }
.nb-course-status.is-error { color: #b91c1c; }
.nb-course-list {
  max-height: min(52vh, 420px);
  overflow: auto;
  padding-right: 2px;
}
.nb-course-empty {
  font-size: 0.85rem;
  color: #6b7280;
  padding: 0.75rem 0;
}
.nb-course-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.8rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.6rem;
  margin-bottom: 0.45rem;
  background: #fff;
  cursor: pointer;
}
.nb-course-row:hover { background: #f8fafc; border-color: #93c5fd; }
.nb-course-row.is-existing { background: #f8fafc; }
.nb-course-row-main {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}
.nb-course-code {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #2563eb;
  text-transform: uppercase;
}
.nb-course-meta {
  font-size: 0.75rem;
  color: #6b7280;
}
.nb-course-row-act {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #2563eb;
}
.nb-course-row.is-existing .nb-course-row-act { color: #0f766e; }

.nb-tree-lock {
  margin-left: auto;
  font-size: 0.65rem;
  color: #b45309;
  flex-shrink: 0;
}
.nb-tree-item.is-locked .nb-truncate { padding-right: 4px; }

.nb-image-node.is-locked-bg {
  pointer-events: none;
  box-shadow: none;
  border-color: transparent;
  outline: 1px dashed rgba(37, 99, 235, 0.0);
}

.nb-page-canvas-host.is-page-locked {
  cursor: grab;
}

.nb-ctx-menu {
  position: fixed;
  z-index: 9000;
  min-width: 214px;
  padding: 6px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 18px 40px -16px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.04);
  font-family: Inter, system-ui, sans-serif;
}
.nb-ctx-sep {
  height: 1px;
  background: #e5e7eb;
  margin: 4px 6px;
}
.nb-ctx-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 7px 8px;
  border-radius: 7px;
  font-size: 13px;
  color: #111827;
  cursor: pointer;
}
.nb-ctx-item:hover:not(:disabled),
.nb-ctx-item:focus-visible {
  background: #eff6ff;
  color: #1d4ed8;
}
.nb-ctx-item:disabled {
  opacity: 0.45;
  cursor: default;
}
.nb-ctx-item.is-danger { color: #b91c1c; }
.nb-ctx-item.is-danger:hover:not(:disabled) { background: #fef2f2; color: #991b1b; }
.nb-ctx-check {
  width: 14px;
  font-size: 10px;
  color: #2563eb;
}
.nb-ctx-label { flex: 1; }
.nb-ctx-extra {
  font-size: 10px;
  color: #9ca3af;
}
.nb-ctx-sub {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 220px;
  padding: 6px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 18px 40px -16px rgba(15, 23, 42, 0.35);
}
.nb-ctx-sub.is-open { display: block; }

.nb-share-link-row {
  font-size: 0.8rem;
  color: #4b5563;
  margin: 0.85rem 0 0.4rem;
}
.nb-share-url {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 0.4rem;
  padding: 0.4rem 0.5rem;
  word-break: break-all;
  color: #1d4ed8;
  text-decoration: none;
}
.nb-share-url:hover { text-decoration: underline; }
.nb-share-link-row + .nb-btn { margin-bottom: 0.75rem; }

.nb-student-gate {
  max-width: 420px;
  margin: 12vh auto 0;
  padding: 0 1.25rem;
}
.nb-student-gate h1 {
  font-size: 1.5rem;
  font-weight: 650;
  margin: 0 0 0.35rem;
}
.nb-student-gate p {
  color: #4b5563;
  font-size: 0.9rem;
  margin: 0 0 1rem;
}
.nb-student-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.25rem 2rem;
  overflow: auto;
  flex: 1;
}
.nb-student-card {
  text-align: left;
  width: 100%;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
}
.nb-student-card:hover { border-color: #93c5fd; background: #f8fafc; }
.nb-student-card-title { font-weight: 600; }
.nb-student-card-meta { font-size: 0.8rem; color: #6b7280; margin-top: 0.2rem; }
.nb-student-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  flex-shrink: 0;
  touch-action: manipulation;
  min-height: 2.4rem;
}
.nb-student-top > .nb-btn {
  padding: 0.28rem 0.5rem;
  font-size: 0.78rem;
}
.nb-student-title {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
  flex: 1;
}
.nb-student-top h1 {
  font-size: 0.875rem;
  font-weight: 650;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nb-student-top .nb-student-sub {
  font-size: 0.72rem;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}
.nb-student-tree .nb-tree-item {
  cursor: pointer;
  width: 100%;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
}
.nb-student-tree .nb-tree-item.section,
.nb-student-tree .nb-tree-item.page,
.nb-student-tree .nb-tree-item.section:active,
.nb-student-tree .nb-tree-item.page:active {
  cursor: pointer;
}
.nb-student-tree .nb-tree-item.active {
  background: #eff6ff;
  border-left-color: #2563eb;
  color: #1e40af;
  font-weight: 600;
}
.nb-student-nav-toggle {
  flex-shrink: 0;
  gap: 0.4rem;
}
.nb-student-nav-toggle[aria-pressed="true"] {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
#app.is-student-nav-collapsed .nb-sidebar {
  display: none;
}
.nb-student-chrome {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
  margin-left: 0.15rem;
}
.nb-student-ribbon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.22rem 0.45rem;
  border: 1px solid transparent;
  border-radius: 0.4rem;
  background: transparent;
  color: #4b5563;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.nb-student-ribbon-btn:hover {
  background: #f3f4f6;
}
.nb-student-ribbon-btn[aria-expanded="true"] {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.nb-student-ribbon-caret {
  font-size: 0.62rem;
  opacity: 0.7;
}
.nb-student-ribbon-menu {
  left: 0;
  right: auto;
  min-width: 9.5rem;
  z-index: 50;
}
.nb-student-ribbon-menu button.is-on {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}
.nb-student-chrome-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.08rem;
}
.nb-student-chrome .nb-view-layer {
  flex-direction: row;
  min-width: 1.85rem;
  min-height: 1.85rem;
  padding: 0.22rem;
  gap: 0;
}
.nb-student-chrome .nb-view-layer-name { display: none; }
.nb-student-chrome .nb-view-layer.nb-btn-active,
.nb-student-chrome .nb-btn-icon.nb-btn-ghost.nb-btn-active {
  background: transparent;
  border-color: transparent;
  color: #1d4ed8;
}
.nb-student-chrome .nb-view-layer.nb-btn-active:hover,
.nb-student-chrome .nb-btn-icon.nb-btn-ghost:hover {
  background: #f3f4f6;
}
.nb-student-chrome .nb-view-layer i { font-size: 0.82rem; }
.nb-student-chrome .nb-view-layer.is-off::after {
  top: 50%;
  width: 0.95rem;
  transform: translate(-50%, -50%) rotate(-28deg);
}
.nb-student-chrome .nb-btn-icon {
  min-width: 1.85rem;
  min-height: 1.85rem;
  padding: 0.22rem;
}
.nb-student-chrome .nb-toolbar-divider {
  height: 1.05rem;
  margin: 0 0.18rem;
}
.nb-student-chrome .nb-view-hidden-count {
  min-width: 1rem;
  text-align: center;
  padding: 0.02rem 0.28rem;
  margin-left: 0.05rem;
}
.nb-student-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 6200;
  background: #111827;
  color: #fff;
  padding: 0.55rem 0.85rem;
  border-radius: 0.55rem;
  font-size: 0.8125rem;
  font-weight: 500;
  pointer-events: none;
}
@media (max-width: 860px) {
  .nb-student-top .nb-student-sub { display: none; }
}
@media (max-width: 720px) {
  .nb-student-top #nbStudentBack span,
  .nb-student-nav-toggle span { display: none; }
  .nb-student-ribbon-btn [data-ribbon-label] { display: none; }
}

.nb-student-view .nb-text-box,
.nb-student-view .nb-image-node {
  pointer-events: none;
}
.nb-student-view .nb-embed {
  pointer-events: auto;
}
.nb-student-view .nb-embed-frame {
  pointer-events: auto;
  z-index: 2;
}
.nb-student-view .nb-embed-shield {
  display: none !important;
}

html.nb-student-embed,
html.nb-student-embed body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}
html.nb-student-embed #app {
  height: 100%;
  min-height: 100vh;
}
html.nb-student-embed .nb-student-embed-host {
  height: 100%;
  min-height: 100vh;
  width: 100%;
}

.nb-print-backdrop {
  z-index: 5400;
  align-items: stretch;
  padding: 1.25rem;
}
.nb-print-modal {
  width: min(1100px, 96vw);
  max-height: calc(100vh - 2.5rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.nb-print-layout {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  min-height: 0;
  flex: 1;
  overflow: hidden;
}
.nb-print-side {
  padding: 1rem 1.15rem 1.1rem;
  border-right: 1px solid #e5e7eb;
  overflow: auto;
}
.nb-print-lead {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #4b5563;
}
.nb-print-layers-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0.45rem;
}
.nb-print-layer {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.42rem 0.35rem;
  border-radius: 0.4rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: #111827;
}
.nb-print-layer:hover { background: #f3f4f6; }
.nb-print-layer input { margin-top: 0.2rem; accent-color: #2563eb; }
.nb-print-layer strong { display: block; font-weight: 600; }
.nb-print-layer em {
  display: block;
  font-style: normal;
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.05rem;
}
.nb-print-meta {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  color: #6b7280;
}
.nb-print-pages {
  margin-top: 1.05rem;
  padding-top: 0.95rem;
  border-top: 1px solid #e5e7eb;
}
.nb-print-page-opt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.28rem 0.3rem;
  border-radius: 0.35rem;
  font-size: 0.8125rem;
  color: #111827;
  cursor: pointer;
}
.nb-print-page-opt:hover { background: #f3f4f6; }
.nb-print-page-opt.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.nb-print-page-opt input { accent-color: #2563eb; }
.nb-print-page-opt em {
  font-style: normal;
  color: #6b7280;
  margin-left: 0.15rem;
}
.nb-print-range-row,
.nb-print-list-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0.3rem 0.45rem 1.55rem;
}
.nb-print-range-row.is-off,
.nb-print-list-row.is-off { opacity: 0.45; }
.nb-print-range-row input[type="number"] {
  width: 4.2rem;
  border: 1px solid #d1d5db;
  border-radius: 0.35rem;
  padding: 0.28rem 0.4rem;
  font: inherit;
  font-size: 0.8125rem;
}
.nb-print-list-row input[type="text"] {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.35rem;
  padding: 0.32rem 0.45rem;
  font: inherit;
  font-size: 0.8125rem;
}
.nb-print-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  padding: 0.35rem 0.3rem 0.15rem;
}
.nb-print-chip {
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.35rem;
  border: 1px solid #d1d5db;
  border-radius: 0.35rem;
  background: #fff;
  color: #374151;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.nb-print-chip.is-on {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.nb-print-chip:hover:not(.is-on) { background: #eff6ff; border-color: #93c5fd; }
.nb-print-page.is-skipped {
  opacity: 0.38;
  filter: grayscale(0.35);
}
.nb-print-page.is-skipped figcaption::after {
  content: " · skipped";
}
.nb-print-preview {
  background: #e5e7eb;
  overflow: auto;
  padding: 1.15rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
}
.nb-print-page {
  margin: 0;
  width: min(100%, 520px);
}
.nb-print-page figcaption {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: #4b5563;
  text-align: center;
}
.nb-print-thumb {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
}
.nb-print-empty {
  margin: 2.5rem 1rem;
  color: #6b7280;
  font-size: 0.875rem;
}
.nb-print-footer {
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}
.nb-print-status {
  margin-right: auto;
  font-size: 0.8rem;
  color: #4b5563;
  min-height: 1.1em;
}
@media (max-width: 820px) {
  .nb-print-layout { grid-template-columns: 1fr; }
  .nb-print-side { border-right: 0; border-bottom: 1px solid #e5e7eb; }
}

#nb-print-root {
  position: absolute;
  left: -12000px;
  top: 0;
  width: auto;
  background: #fff;
}
#nb-print-root .nb-print-sheet {
  margin: 0;
  padding: 0;
  overflow: hidden;
  page-break-after: always;
  break-after: page;
  box-sizing: border-box;
}
#nb-print-root .nb-print-sheet:last-child {
  page-break-after: auto;
  break-after: auto;
}

.nb-draw-extras {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nb-ruler-tools {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 2px;
}
.nb-ruler-tools select {
  padding: 0.16rem 0.12rem;
  font-size: 0.72rem;
  line-height: 1.2;
}
.nb-ruler-units { width: 2.7em; }
.nb-ruler-tick { width: 3.7em; }
.nb-draw-extras-picker {
  position: fixed;
  z-index: 4100;
  width: min(380px, calc(100vw - 16px));
  max-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 22px 48px -18px rgba(15, 23, 42, 0.38), 0 0 0 1px rgba(15, 23, 42, 0.04);
  font-family: Inter, system-ui, sans-serif;
  overflow: hidden;
}
.nb-draw-extras-picker-head {
  padding: 0.85rem 1rem 0.55rem;
}
.nb-draw-extras-picker-title {
  font-weight: 650;
  font-size: 0.95rem;
  color: #111827;
}
.nb-draw-extras-picker-sub {
  margin-top: 2px;
  font-size: 0.75rem;
  color: #6b7280;
}
.nb-draw-extras-picker-search {
  margin: 0 0.85rem 0.55rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  font-size: 0.8125rem;
}
.nb-draw-extras-picker-search:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px #dbeafe;
}
.nb-draw-extras-picker-list {
  overflow: auto;
  padding: 0 0.55rem 0.55rem;
  min-height: 120px;
}
.nb-draw-extras-picker-group-name {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
  padding: 0.45rem 0.4rem 0.2rem;
}
.nb-draw-extras-picker-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.5rem 0.45rem;
  border-radius: 8px;
  cursor: pointer;
}
.nb-draw-extras-picker-row:hover {
  background: #f8fafc;
}
.nb-draw-extras-picker-icon {
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  color: #2563eb;
  flex-shrink: 0;
}
.nb-draw-extras-picker-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.nb-draw-extras-picker-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: #111827;
}
.nb-draw-extras-picker-desc {
  font-size: 0.72rem;
  color: #6b7280;
  line-height: 1.35;
}
.nb-draw-extras-picker-row input {
  margin-top: 0.2rem;
  width: 1rem;
  height: 1rem;
  accent-color: #2563eb;
}
.nb-draw-extras-picker-empty {
  padding: 1.25rem 0.75rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.8125rem;
}
.nb-draw-extras-picker-foot {
  border-top: 1px solid #f3f4f6;
  padding: 0.55rem 1rem 0.7rem;
  font-size: 0.7rem;
  color: #9ca3af;
}

.nb-pt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5150;
}
.nb-pt-overlay.hidden { display: none; }
.nb-pt-overlay .pt-print-modal {
  pointer-events: auto;
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.nb-pt-overlay .pt-print-modal.hidden { display: none; }
.nb-pt-overlay .pt-print-panel {
  width: min(1180px, 96vw);
  height: min(900px, 95vh);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.nb-pt-overlay .pt-print-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
  flex-shrink: 0;
}
.nb-pt-overlay .pt-print-toolbar h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
}
.nb-pt-overlay .pt-print-opts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1rem;
  font-size: 0.8rem;
  color: #374151;
}
.nb-pt-overlay .pt-print-opts label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
}
.nb-pt-overlay .pt-print-opts label[hidden] {
  display: none;
}
.nb-pt-overlay .pt-print-custom-note {
  flex: 1 0 100%;
  margin: 0;
  font-size: 0.75rem;
  color: #475569;
}
.nb-pt-overlay .pt-print-custom-note.hidden { display: none; }
.nb-pt-overlay .pt-print-actions {
  margin-left: auto;
  display: flex;
  gap: 0.4rem;
}
.nb-pt-overlay .pt-print-preview {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #e5e7eb;
  padding: 1rem;
}
.nb-pt-overlay .pt-print-preview iframe {
  width: 100%;
  height: 100%;
  min-height: 760px;
  border: 0;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.nb-pt-panel {
  pointer-events: auto;
  position: fixed;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  min-width: 640px;
  min-height: 420px;
}
.nb-pt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.55rem 0.45rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
}
.nb-pt-header-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #111827;
  white-space: nowrap;
}
.nb-pt-header-tools {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nb-pt-check,
.nb-pt-decimals {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #374151;
  cursor: pointer;
}
.nb-pt-header select {
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  padding: 0.28rem 0.45rem;
  font-size: 0.78rem;
  background: #fff;
  max-width: 220px;
}
.nb-pt-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.65rem 0.75rem 0.85rem;
  gap: 0.55rem;
  background: #f3f4f6;
}
.nb-pt-table-section {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}
.nb-pt-table-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.nb-pt-overlay .periodic-table-container {
  position: relative;
  display: inline-block;
  transform-origin: center center;
  font-size: 0.75rem;
  text-align: left;
}
.nb-pt-overlay .pt-row { white-space: nowrap; }
.nb-pt-overlay .pt-element {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 50px;
  margin: 2px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  text-align: center;
  cursor: pointer;
  background: #fff;
  vertical-align: top;
}
.nb-pt-overlay .pt-element:hover {
  transform: scale(1.08);
  z-index: 2;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.16);
  border-color: #2563eb;
}
.nb-pt-overlay .pt-animating .pt-element:hover {
  transform: none;
  box-shadow: none;
  border-color: #d1d5db;
  z-index: auto;
}
.nb-pt-overlay .pt-element.selected {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.nb-pt-overlay .pt-element-number {
  font-size: 0.6rem;
  position: absolute;
  top: 2px;
  left: 3px;
  font-weight: 600;
}
.nb-pt-overlay .pt-element-symbol {
  font-size: 0.9rem;
  font-weight: 700;
  margin-top: 12px;
  display: block;
}
.nb-pt-overlay .pt-element-value {
  font-size: 0.6rem;
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  font-weight: 500;
}
.nb-pt-overlay .pt-ionic-multivalent {
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  font-size: 0.5rem;
  line-height: 1.15;
  text-align: center;
}
.nb-pt-overlay .pt-empty {
  display: inline-block;
  width: 50px;
  height: 50px;
  margin: 2px;
  visibility: hidden;
}
.nb-pt-overlay .pt-ion-dock {
  position: absolute;
  z-index: 4;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 4px 6px 5px;
  background: #fff;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  pointer-events: auto;
}
.nb-pt-overlay .pt-ion-title {
  flex-shrink: 0;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #334155;
  margin-bottom: 2px;
  padding-bottom: 2px;
  border-bottom: 1px solid #cbd5e1;
}
.nb-pt-overlay .pt-ion-table {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(var(--pt-ion-cols, 3), minmax(0, 1fr));
  grid-template-rows: repeat(var(--pt-ion-rows, 10), minmax(0, 1fr));
  grid-auto-flow: column;
  column-gap: 10px;
  row-gap: 0;
  align-content: stretch;
}
.nb-pt-overlay .pt-ion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  padding: 0 2px;
  border-bottom: 1px solid #eef2f7;
}
.nb-pt-overlay .pt-ion-name {
  font-size: 8.5px;
  color: #334155;
  line-height: 1.1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nb-pt-overlay .pt-ion-formula {
  font-size: 10.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
  white-space: nowrap;
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
}
.nb-pt-overlay .pt-animating .pt-ion-dock {
  opacity: 0;
  pointer-events: none;
}
.nb-pt-overlay .pt-element.pt-custom {
  overflow: hidden;
  padding: 0;
  line-height: 1;
}
.nb-pt-overlay .pt-slot {
  position: absolute;
  display: flex;
  align-items: center;
  overflow: hidden;
  container-type: size;
  line-height: 1;
  box-sizing: border-box;
}
.nb-pt-overlay .pt-slot > span {
  font-weight: 700;
  white-space: nowrap;
  line-height: 1;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
  font-size: 8px;
  font-size: min(84cqh, calc(92cqw / (var(--ch, 2) * 0.62)));
}
.nb-pt-overlay .pt-slot.sym > span {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: min(92cqh, calc(100cqw / (var(--ch, 2) * 0.66)));
}
.nb-pt-overlay .pt-slot.name > span {
  font-weight: 600;
  font-size: min(80cqh, calc(96cqw / (var(--ch, 4) * 0.55)));
}
.nb-pt-overlay .pt-slot.left { justify-content: flex-start; padding-left: 8%; }
.nb-pt-overlay .pt-slot.right { justify-content: flex-end; padding-right: 8%; }
.nb-pt-overlay .pt-slot.center { justify-content: center; padding: 0 5%; }
.nb-pt-overlay .pt-slot.miss > span { opacity: 0.38; font-weight: 500; }
.nb-pt-overlay .pt-custom-dock {
  position: absolute;
  z-index: 5;
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 4px;
  background: #fff;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  pointer-events: auto;
}
.nb-pt-overlay .pt-custom-pick {
  flex: 0 1 48%;
  max-width: 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 4px 7px 5px;
}
.nb-pt-overlay .pt-custom-title {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #334155;
}
.nb-pt-overlay .pt-custom-title em {
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #64748b;
  font-size: 8px;
}
.nb-pt-overlay .pt-custom-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 8px;
  align-content: space-evenly;
}
.nb-pt-overlay .pt-custom-opt {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin: 0;
  font-size: 10.5px;
  font-weight: 650;
  color: #0f172a;
  cursor: pointer;
  line-height: 1.15;
  user-select: none;
}
.nb-pt-overlay .pt-custom-opt span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nb-pt-overlay .pt-custom-opt input {
  width: 13px;
  height: 13px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #1d4ed8;
  cursor: pointer;
}
.nb-pt-overlay .pt-custom-key {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  padding: 1px 6px 1px 2px;
}
.nb-pt-overlay .pt-ckey {
  container-type: size;
  width: 100%;
  height: 100%;
  min-height: 0;
  color: #0f172a;
}
.nb-pt-overlay .pt-ckey-grid {
  height: 100%;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) min(72cqh, 28cqw) minmax(0, 1.15fr);
  align-items: stretch;
}
.nb-pt-overlay .pt-ckey-frame {
  grid-column: 2;
  grid-row: 1 / -1;
  position: relative;
  border: 1.5px solid #334155;
  border-radius: 4px;
  background: #fff;
  min-width: 0;
  min-height: 0;
}
.nb-pt-overlay .pt-ckey-lab {
  container-type: size;
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  z-index: 1;
  color: #1e293b;
}
.nb-pt-overlay .pt-ckey-lab.L { grid-column: 1; justify-content: flex-end; padding-right: 2px; }
.nb-pt-overlay .pt-ckey-lab.R { grid-column: 3; justify-content: flex-start; padding-left: 2px; }
.nb-pt-overlay .pt-ckey-lab.R .pt-ckey-arr { transform: scaleX(-1); }
.nb-pt-overlay .pt-ckey-lab-txt {
  font-weight: 650;
  line-height: 1.05;
  white-space: nowrap;
  min-width: 0;
  font-size: 9px;
  font-size: min(58cqh, calc((100cqw - 20px) / (var(--ch, 8) * 0.62)));
}
.nb-pt-overlay .pt-ckey-arr {
  width: 16px;
  height: 8px;
  flex: 0 0 auto;
  display: block;
}
.nb-pt-overlay .pt-animating .pt-custom-dock {
  opacity: 0;
  pointer-events: none;
}
.nb-pt-overlay .pt-f-insert {
  visibility: visible;
  border: none;
  background: transparent;
}
.nb-pt-overlay .pt-f-block {
  display: inline-block;
  margin-top: 10px;
  margin-left: 108px;
  padding: 0;
  border: none;
  background: transparent;
}
.nb-pt-overlay .pt-cues {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 3;
}
.nb-pt-overlay .pt-cue-stair {
  fill: none;
  stroke: #111827;
  stroke-width: 2.6;
  stroke-linejoin: miter;
  stroke-linecap: square;
}
.nb-pt-overlay .pt-cue-socket {
  fill: rgba(15, 23, 42, 0.06);
  stroke: #111827;
  stroke-width: 2.6;
  stroke-linejoin: miter;
  stroke-linecap: square;
}
.nb-pt-overlay .pt-cue-fbox {
  fill: none;
  stroke: #111827;
  stroke-width: 2.6;
  stroke-linejoin: miter;
  stroke-linecap: square;
}
.nb-pt-overlay .pt-animating .pt-cues {
  opacity: 0;
}
.nb-pt-overlay #nbPtWide.nb-btn-active {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}
.nb-pt-details {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1rem 1.1rem;
}
.nb-pt-details.hidden,
.nb-pt-ions.hidden { display: none !important; }
.nb-pt-details-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.nb-pt-details-bar h2 {
  font-size: 1.05rem;
  font-weight: 700;
}
.nb-pt-details h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.nb-pt-overlay .pt-element-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}
.nb-pt-overlay .pt-element-details-item {
  padding: 0.55rem 0.65rem;
  background: #f9fafb;
  border-radius: 8px;
}
.nb-pt-overlay .pt-element-details-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}
.nb-pt-overlay .pt-element-details-value {
  margin-top: 0.2rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #111827;
}
.nb-pt-ions {
  flex: 0 1 auto;
  max-height: min(240px, 32%);
  overflow: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
}
.nb-pt-ions h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.nb-pt-ions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.nb-pt-ions-table th,
.nb-pt-ions-table td {
  text-align: left;
  padding: 0.22rem 0.4rem 0.22rem 0;
  border-bottom: 1px solid #f3f4f6;
}
.nb-pt-error {
  padding: 1.5rem;
  color: #b91c1c;
}
.nb-pt-resize {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  touch-action: none;
}
.nb-pt-resize::before {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 10px;
  height: 10px;
  border-right: 2px solid #9ca3af;
  border-bottom: 2px solid #9ca3af;
  border-radius: 0 0 2px 0;
}

.nb-layers-panel {
  position: fixed;
  top: 76px;
  right: 18px;
  width: 280px;
  z-index: 4200;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.16);
  padding: 0.7rem 0.8rem 0.85rem;
  color: #111827;
}
.nb-layers-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}
.nb-layers-head strong { font-size: 0.92rem; }
.nb-layers-close { font-size: 1.2rem; line-height: 1; padding: 0 0.35rem; }
.nb-layers-lead {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #6b7280;
}
.nb-layers-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  margin-bottom: 0.55rem;
}
.nb-layers-empty {
  margin: 0;
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.4;
}
.nb-layers-list {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-bottom: 0.55rem;
  max-height: min(52vh, 420px);
  overflow: auto;
}
.nb-layers-row {
  display: grid;
  grid-template-columns: 18px 22px 1fr 64px 22px;
  gap: 0.2rem;
  align-items: center;
  padding: 0.28rem 0.3rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
}
.nb-layers-row.is-active {
  border-color: #93c5fd;
  background: #eff6ff;
}
.nb-layers-row.is-dragging { opacity: 0.7; }
.nb-layers-drag,
.nb-layers-eye,
.nb-layers-del,
.nb-layers-select {
  border: 0;
  background: transparent;
  padding: 0;
  color: #4b5563;
  cursor: pointer;
}
.nb-layers-drag { cursor: grab; color: #9ca3af; }
.nb-layers-eye.is-off { color: #9ca3af; }
.nb-layers-select {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  text-align: left;
}
.nb-layers-name {
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.nb-layers-count { font-size: 0.65rem; color: #9ca3af; }
.nb-layers-opacity { width: 64px; }
.nb-layers-add { width: 100%; font-size: 0.78rem; }

.nb-class-tool-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5180;
}
.nb-class-tool-overlay.hidden { display: none; }
.nb-class-tool-panel {
  pointer-events: auto;
  position: fixed;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  min-width: 420px;
  min-height: 420px;
}
.nb-class-tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.55rem 0.45rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
}
.nb-class-tool-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #111827;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.nb-class-tool-title i { color: #2563eb; }
.nb-class-tool-header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nb-class-tool-resize {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  touch-action: none;
}
.nb-class-tool-resize::before {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 10px;
  height: 10px;
  border-right: 2px solid #9ca3af;
  border-bottom: 2px solid #9ca3af;
  border-radius: 0 0 2px 0;
}

.nb-practice-q-panel {
  min-width: 640px;
  min-height: 480px;
  background: #f8fafc;
}

.nb-organic-draw-panel,
.nb-organic-name-panel,
.nb-organic-structure-panel,
.nb-mm-panel {
  min-width: 420px;
  min-height: 400px;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
}
.nb-organic-draw-body,
.nb-organic-name-body,
.nb-organic-structure-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.65rem 0.85rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.nb-organic-draw-foot {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: #6b7280;
  padding: 0.35rem 0.85rem 0.55rem;
  border-top: 1px solid #f3f4f6;
  line-height: 1.35;
}
.nb-organic-draw-loading {
  font-size: 0.85rem;
  color: #6b7280;
  padding: 1rem 0;
}
.nb-organic-draw-mount {
  flex: 1;
  min-height: 0;
}
.nb-organic-mode-bar {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border-radius: 10px;
  background: #f3f4f6;
  align-self: flex-start;
}
.nb-organic-mode-btn {
  border: 1px solid transparent;
  background: transparent;
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
}
.nb-organic-mode-btn:hover { color: #111827; }
.nb-organic-mode-btn.is-on {
  background: #fff;
  border-color: #e5e7eb;
  color: #3730a3;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.nb-organic-draw-pane,
.nb-organic-name-pane {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-height: 0;
}
.nb-organic-draw-pane.hidden,
.nb-organic-name-pane.hidden {
  display: none;
}
.nb-organic-name-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  font-size: 0.82rem;
}
.nb-organic-name-strip.is-ok { border-color: #6ee7b7; background: #ecfdf5; }
.nb-organic-name-strip.is-bad { border-color: #fecaca; background: #fef2f2; }
.nb-organic-name-label {
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}
.nb-organic-name-value { font-weight: 700; color: #111827; }
.nb-organic-formula { color: #4b5563; font-family: ui-monospace, monospace; }
.nb-organic-3d-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.nb-organic-3d-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  user-select: none;
}
.nb-organic-3d-stage {
  height: 220px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #0f172a;
  overflow: hidden;
}
.nb-organic-name-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.nb-organic-name-input {
  flex: 1;
  min-width: 12rem;
  padding: 0.45rem 0.65rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
}
.nb-organic-name-msg {
  margin: 0;
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.4;
}
.nb-organic-name-msg.is-error { color: #b91c1c; }
.nb-organic-name-msg.is-ok { color: #047857; }
.nb-organic-name-viewbar,
.nb-organic-viewbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}
.nb-organic-2d-toggle {
  display: inline-flex;
  gap: 0.25rem;
}
.nb-organic-view-btn.is-on {
  background: #eef2ff;
  border-color: #818cf8;
  color: #3730a3;
}
.nb-organic-name-figure {
  flex: 1;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}
.nb-organic-name-figure svg {
  max-width: 100%;
  max-height: min(42vh, 320px);
}

/* Molecular modeler */
.nb-mm-panel .nb-mm-hidden {
  display: none !important;
}
.nb-mm-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0.65rem 0.85rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.nb-mm-tabs {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border-radius: 10px;
  background: #f3f4f6;
  align-self: flex-start;
  flex-shrink: 0;
}
.nb-mm-tab {
  border: 1px solid transparent;
  background: transparent;
  color: #4b5563;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.38rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
}
.nb-mm-tab.is-on {
  background: #fff;
  border-color: #e5e7eb;
  color: #3730a3;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.nb-mm-tab-panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.nb-mm-tab-panel.nb-mm-hidden {
  display: none !important;
}
.nb-mm-name-viewport {
  flex: 1;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.nb-mm-name-empty {
  margin: auto;
  font-size: 0.85rem;
  color: #9ca3af;
  text-align: center;
  padding: 1.5rem;
}
.nb-mm-name-viewport .nb-mm-name-figure,
.nb-mm-name-viewport .nb-mm-name-3d {
  flex: 1;
  min-height: 200px;
}
.nb-mm-name-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
}
.nb-mm-name-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.45rem;
}
.nb-mm-name-input {
  flex: 1;
  min-width: 12rem;
  padding: 0.45rem 0.65rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
}
.nb-mm-name-note {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #6b7280;
  min-height: 1.2em;
}
.nb-mm-name-note.is-error { color: #b91c1c; }
.nb-mm-name-note.is-ok { color: #047857; }
.nb-mm-name-note.is-warn { color: #92400e; }
.nb-mm-pill-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.nb-mm-pill {
  border: 2px solid #e5e7eb;
  background: #fff;
  color: #374151;
  border-radius: 999px;
  padding: 0.28rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.nb-mm-pill.is-on {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #fff;
}
.nb-mm-name-figure {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
}
.nb-mm-name-figure svg {
  max-width: 100%;
  max-height: min(36vh, 280px);
}
.nb-mm-name-3d {
  position: relative;
  width: 100%;
  min-height: 280px;
  height: 280px;
  flex: 1 1 280px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  overflow: hidden;
}
.nb-mm-name-viewport .nb-mm-name-3d.mol3d-stage {
  min-height: 280px;
}
.nb-mm-draw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.nb-mm-editor-mount {
  flex: 1;
  min-height: 0;
}
.nb-mm-draw-loading {
  font-size: 0.85rem;
  color: #6b7280;
  padding: 0.5rem 0;
}

/* Free-draw editor chrome (Tailwind-free, scoped) */
.nb-mm-editor-mount .odo-workspace {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 0;
}
.nb-mm-editor-mount .flex { display: flex; }
.nb-mm-editor-mount .flex-wrap { flex-wrap: wrap; }
.nb-mm-editor-mount .items-center { align-items: center; }
.nb-mm-editor-mount .gap-1 { gap: 0.25rem; }
.nb-mm-editor-mount .gap-1\.5 { gap: 0.375rem; }
.nb-mm-editor-mount .gap-2 { gap: 0.5rem; }
.nb-mm-editor-mount .odo-tool,
.nb-mm-editor-mount .odo-el {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  cursor: pointer;
}
.nb-mm-editor-mount .odo-el {
  min-width: 2rem;
  height: 2.25rem;
  font-size: 0.85rem;
  font-weight: 700;
}
.nb-mm-editor-mount .odo-tool.is-on,
.nb-mm-editor-mount .odo-el.is-on {
  background: #eef2ff;
  border-color: #818cf8;
  color: #3730a3;
}
.nb-mm-editor-mount .odo-tool:hover,
.nb-mm-editor-mount .odo-el:hover {
  border-color: #a5b4fc;
}
.nb-mm-editor-mount .text-xs { font-size: 0.75rem; }
.nb-mm-editor-mount .text-gray-400 { color: #9ca3af; }
.nb-mm-editor-mount .text-gray-500 { color: #6b7280; }
.nb-mm-editor-mount .m-0 { margin: 0; }
.nb-mm-editor-mount .leading-snug { line-height: 1.375; }
.nb-mm-editor-mount .odo-stage-wrap {
  position: relative;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  overflow: hidden;
  min-height: 360px;
}
.nb-mm-editor-mount .odo-stage {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  touch-action: none;
  user-select: none;
}
.nb-mm-editor-mount .relative { position: relative; }
.nb-mm-editor-mount .absolute { position: absolute; }
.nb-mm-editor-mount .left-3 { left: 0.75rem; }
.nb-mm-editor-mount .bottom-3 { bottom: 0.75rem; }
.nb-mm-editor-mount .font-medium { font-weight: 500; }
.nb-mm-editor-mount .bg-white\/90 {
  background: rgba(255, 255, 255, 0.92);
}
.nb-mm-editor-mount .px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.nb-mm-editor-mount .py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.nb-mm-editor-mount .rounded-md { border-radius: 6px; }
.nb-mm-editor-mount .border { border: 1px solid #e5e7eb; }
.nb-mm-editor-mount .shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.nb-mm-editor-mount .max-w-\[90\%\] { max-width: 90%; }
.nb-mm-editor-mount .pointer-events-none { pointer-events: none; }
.nb-mm-editor-mount .hidden { display: none; }
@media (min-width: 640px) {
  .nb-mm-editor-mount .sm\:inline { display: inline; }
}
.nb-practice-q-header {
  gap: 0.65rem;
}
.nb-practice-q-chip {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.nb-practice-q-paste {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 0.38rem 0.75rem;
  border-radius: 8px;
  white-space: nowrap;
}
.nb-practice-q-paste:disabled {
  opacity: 0.45;
  cursor: default;
}
.nb-practice-q-body {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #fff;
}
.nb-practice-q-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.nb-practice-q-loading {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.7rem;
  background: rgba(248, 250, 252, 0.92);
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 500;
}
.nb-practice-q-loading.is-on { display: flex; }
.nb-practice-q-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: nb-practice-q-spin 0.8s linear infinite;
}
@keyframes nb-practice-q-spin {
  to { transform: rotate(360deg); }
}
.nb-practice-q-foot {
  flex-shrink: 0;
  padding: 0.45rem 1rem 0.55rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #6b7280;
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
}

.nb-timer-tabs,
.nb-people-tabs {
  display: flex;
  gap: 0.3rem;
  padding: 0.45rem 0.75rem 0;
  flex-shrink: 0;
}
.nb-timer-tab {
  border: 0;
  background: transparent;
  color: #6b7280;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}
.nb-timer-tab:hover { background: #f3f4f6; color: #111827; }
.nb-timer-tab.is-on { background: #dbeafe; color: #1d4ed8; }
.nb-timer-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0.75rem 0.8rem;
  gap: 0.55rem;
  overflow: auto;
}
.nb-timer-stage {
  flex: 0 0 200px;
  height: 200px;
  min-height: 180px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(37, 99, 235, 0.18), transparent 52%),
    linear-gradient(180deg, #0f172a 0%, #111827 100%);
  border-radius: 18px;
  color: #f8fafc;
  position: relative;
  overflow: hidden;
}
.nb-timer-stage.is-warn { background: linear-gradient(180deg, #431407 0%, #111827 100%); }
.nb-timer-stage.is-low { background: linear-gradient(180deg, #7f1d1d 0%, #111827 100%); }
.nb-timer-stage.is-done { background: linear-gradient(180deg, #064e3b 0%, #111827 100%); }
.nb-timer-visual {
  position: relative;
  height: min(240px, 100%);
  width: auto;
  max-width: 90%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.nb-timer-ring {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}
.nb-timer-panel.hide-circle .nb-timer-ring { display: none; }
.nb-timer-ring-track {
  fill: none;
  stroke: rgba(255,255,255,0.1);
  stroke-width: 6.5;
}
.nb-timer-ring-fill {
  fill: none;
  stroke: #60a5fa;
  stroke-width: 6.5;
  stroke-linecap: round;
  transition: stroke 0.2s;
}
.nb-timer-stage.is-warn .nb-timer-ring-fill { stroke: #fb923c; }
.nb-timer-stage.is-low .nb-timer-ring-fill { stroke: #f87171; }
.nb-timer-stage.is-done .nb-timer-ring-fill { stroke: #34d399; }
.nb-timer-readout { text-align: center; z-index: 1; }
.nb-timer-caption {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 0.15rem;
}
.nb-timer-digits {
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  letter-spacing: 0.04em;
  line-height: 1;
}
.nb-timer-sub {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #9ca3af;
}
.nb-timer-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.nb-timer-start { min-width: 5.5rem; }
.nb-timer-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #374151;
  cursor: pointer;
}
.nb-timer-setup { flex: 0 0 auto; min-height: 0; overflow: visible; }
.nb-timer-duration { flex-shrink: 0; }
.nb-timer-help {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  color: #6b7280;
}
.nb-timer-drums {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}
.nb-timer-drum {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.35rem 0.2rem 0.45rem;
}
.nb-timer-drum-nudge {
  border: 0;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.1rem 0.6rem;
}
.nb-timer-drum-nudge:hover { color: #2563eb; }
.nb-timer-drum-ghost {
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  color: #d1d5db;
}
.nb-timer-drum-value {
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  font-size: 1.35rem;
  color: #111827;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.15rem;
}
.nb-timer-drum-input {
  width: 2.4rem;
  border: 0;
  background: transparent;
  font: inherit;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  font-size: 1.35rem;
  color: inherit;
  text-align: right;
  padding: 0;
  outline: none;
}
.nb-timer-drum-input:focus {
  color: #1d4ed8;
}
.nb-timer-drum-value span {
  font-size: 0.68rem;
  font-weight: 600;
  color: #6b7280;
}
.nb-timer-warns {
  margin-top: 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
  padding: 0.55rem 0.6rem 0.65rem;
  flex-shrink: 0;
}
.nb-timer-warns header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}
.nb-timer-warns h4 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.nb-timer-warn-empty {
  margin: 0;
  font-size: 0.78rem;
  color: #94a3b8;
}
.nb-timer-warn {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.45rem 0.5rem 0.5rem;
  margin-top: 0.4rem;
}
.nb-timer-warn-top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.nb-timer-warn-left {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-right: 0.15rem;
}
.nb-timer-sound-seg .nb-btn {
  padding: 0.22rem 0.45rem;
  font-size: 0.72rem;
}
.nb-timer-warn-phrase {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.32rem 0.5rem;
  font: inherit;
  font-size: 0.8rem;
  color: #111827;
  background: #f8fafc;
}
.nb-timer-warn-phrase:focus {
  outline: none;
  border-color: #93c5fd;
  background: #fff;
}
.nb-timer-voice {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  display: grid;
  place-items: center;
  z-index: 8;
  padding: 1rem;
}
.nb-timer-voice.hidden { display: none; }
.nb-timer-voice-card {
  width: min(360px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 0.85rem 0.95rem 1rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}
.nb-timer-voice-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}
.nb-timer-voice-card h3 {
  margin: 0;
  font-size: 0.95rem;
}
.nb-timer-voice-card label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.65rem;
}
.nb-timer-voice-card select,
.nb-timer-voice-card input[type="range"] {
  width: 100%;
}
.nb-timer-voice-card select {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.38rem 0.45rem;
  font: inherit;
  background: #fff;
  color: #111827;
}
.nb-timer-voice-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-top: 0.2rem;
}
.nb-timer-presets {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.4rem;
}
.nb-timer-preset {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 10px;
  padding: 0.4rem 0.2rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.nb-timer-preset strong { font-size: 0.82rem; color: #111827; }
.nb-timer-preset span { font-size: 0.62rem; color: #9ca3af; }
.nb-timer-preset:hover { border-color: #93c5fd; background: #eff6ff; }
.nb-timer-preset.is-on { border-color: #2563eb; background: #dbeafe; }
.nb-timer-stations {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.6rem;
  align-items: end;
}
.nb-timer-stations label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #4b5563;
}
.nb-timer-mini {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.2rem 0.4rem;
}
.nb-timer-mini input {
  width: 2.4rem;
  border: 0;
  background: transparent;
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.nb-timer-panel.is-running .nb-timer-stage {
  flex: 1 1 auto;
  height: auto;
  min-height: 220px;
}
.nb-timer-panel.hide-duration .nb-timer-duration { display: none; }
.nb-timer-panel.hide-duration .nb-timer-warns { margin-top: 0; }
.nb-timer-overlay.is-present {
  pointer-events: auto;
  background: #0b1220;
  z-index: 5600;
}
.nb-timer-panel.is-present {
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  left: 0 !important;
  top: 0 !important;
  border-radius: 0;
  box-shadow: none;
}
.nb-timer-panel.is-present .nb-timer-setup,
.nb-timer-panel.is-present .nb-class-tool-resize,
.nb-timer-panel.is-present .nb-timer-voice { display: none; }
.nb-timer-panel.is-present .nb-timer-stage { border-radius: 0; }
.nb-timer-panel.is-present .nb-timer-visual {
  height: min(520px, 70vh);
  width: auto;
  max-width: 90%;
}
.nb-timer-panel.is-present .nb-timer-digits { font-size: clamp(4rem, 14vw, 9rem); }

[data-draw-extra="classroom-timer"].nb-timer-run,
[data-draw-extra="classroom-timer"].nb-timer-soon,
[data-draw-extra="classroom-timer"].nb-timer-up,
.nb-student-chrome [data-draw-extra="classroom-timer"].nb-timer-run,
.nb-student-chrome [data-draw-extra="classroom-timer"].nb-timer-soon,
.nb-student-chrome [data-draw-extra="classroom-timer"].nb-timer-up {
  color: #fff;
}
[data-draw-extra="classroom-timer"].nb-timer-run,
.nb-student-chrome [data-draw-extra="classroom-timer"].nb-timer-run,
.nb-student-chrome [data-draw-extra="classroom-timer"].nb-timer-run:hover {
  background: #2563eb;
  border-color: #1d4ed8;
}
[data-draw-extra="classroom-timer"].nb-timer-soon,
.nb-student-chrome [data-draw-extra="classroom-timer"].nb-timer-soon,
.nb-student-chrome [data-draw-extra="classroom-timer"].nb-timer-soon:hover {
  background: #7c3aed;
  border-color: #6d28d9;
}
[data-draw-extra="classroom-timer"].nb-timer-up,
.nb-student-chrome [data-draw-extra="classroom-timer"].nb-timer-up,
.nb-student-chrome [data-draw-extra="classroom-timer"].nb-timer-up:hover {
  background: #dc2626;
  border-color: #b91c1c;
  animation: nb-timer-lamp 1.1s ease-in-out infinite;
}
[data-draw-extra="classroom-timer"].nb-timer-run:hover,
[data-draw-extra="classroom-timer"].nb-timer-soon:hover,
[data-draw-extra="classroom-timer"].nb-timer-up:hover,
.nb-student-chrome [data-draw-extra="classroom-timer"].nb-timer-run:hover,
.nb-student-chrome [data-draw-extra="classroom-timer"].nb-timer-soon:hover,
.nb-student-chrome [data-draw-extra="classroom-timer"].nb-timer-up:hover {
  color: #fff;
}
[data-draw-extra="classroom-timer"].nb-timer-run:hover { background: #1d4ed8; }
[data-draw-extra="classroom-timer"].nb-timer-soon:hover { background: #6d28d9; }
[data-draw-extra="classroom-timer"].nb-timer-up:hover { background: #b91c1c; }
.nb-ribbon-tab.nb-timer-run,
.nb-ribbon-tab.nb-timer-soon,
.nb-ribbon-tab.nb-timer-up {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.nb-ribbon-tab.nb-timer-run::after,
.nb-ribbon-tab.nb-timer-soon::after,
.nb-ribbon-tab.nb-timer-up::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #2563eb;
}
.nb-ribbon-tab.nb-timer-soon::after { background: #7c3aed; }
.nb-ribbon-tab.nb-timer-up::after {
  background: #dc2626;
  animation: nb-timer-lamp 1.1s ease-in-out infinite;
}
@keyframes nb-timer-lamp {
  50% { filter: brightness(1.35); }
}
@media (prefers-reduced-motion: reduce) {
  [data-draw-extra="classroom-timer"].nb-timer-up,
  .nb-ribbon-tab.nb-timer-up::after { animation: none; }
}

.nb-people-overlay { z-index: 5190; }
.nb-people-panel { min-width: 640px; }
.nb-people-body {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}
.nb-people-main {
  flex: 1;
  min-width: 0;
  overflow: auto;
  padding: 0.7rem 0.85rem 0.9rem;
}
.nb-people-drawer {
  width: 240px;
  flex-shrink: 0;
  border-left: 1px solid #e5e7eb;
  background: #f8fafc;
  padding: 0.7rem 0.7rem 0.85rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.nb-people-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
  flex-shrink: 0;
}
.nb-people-drawer-head strong { font-size: 0.82rem; }
.nb-people-drawer-note {
  margin: 0 0 0.45rem;
  font-size: 0.7rem;
  color: #6b7280;
  flex-shrink: 0;
}
.nb-people-search {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
  margin-bottom: 0.4rem;
  flex-shrink: 0;
}
.nb-people-roster { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow: auto; }
.nb-people-custom {
  flex-shrink: 0;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid #e5e7eb;
}
.nb-people-custom h4 {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.nb-people-custom-add {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.35rem;
}
.nb-people-custom-add input {
  flex: 1;
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.3rem 0.4rem;
  font: inherit;
  font-size: 0.78rem;
  background: #fff;
}
.nb-people-custom-add .nb-btn { padding: 0.28rem 0.5rem; font-size: 0.75rem; }
.nb-people-custom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  font-size: 0.78rem;
  padding: 0.18rem 0.1rem;
  color: #111827;
}
.nb-people-custom-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-people-custom-use {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: #4b5563;
}
.nb-people-custom-use label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}
.nb-people-roster-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  padding: 0.28rem 0.3rem;
  border-radius: 7px;
  cursor: pointer;
}
.nb-people-roster-row:hover { background: #eff6ff; }
.nb-people-roster-row.is-away { color: #9ca3af; text-decoration: line-through; }
.nb-people-empty {
  height: 100%;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #6b7280;
  gap: 0.4rem;
  padding: 1.5rem;
}
.nb-people-empty i { font-size: 2rem; color: #93c5fd; }
.nb-people-empty h3 { margin: 0; color: #111827; font-size: 1.05rem; }
.nb-people-empty p { margin: 0; max-width: 22rem; font-size: 0.84rem; line-height: 1.45; }
.nb-people-muted { color: #6b7280; font-size: 0.75rem; }
.nb-people-placeholder { padding: 1.2rem 0.4rem; text-align: center; }
.nb-people-spin {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 220px;
  gap: 1rem;
  align-items: center;
}
.nb-people-wheel-wrap {
  position: relative;
  display: grid;
  place-items: center;
}
.nb-people-pointer {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 16px solid #111827;
  z-index: 2;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.2));
}
.nb-people-spin-side { display: flex; flex-direction: column; gap: 0.55rem; }
.nb-people-picked {
  font-size: 1.35rem;
  font-weight: 750;
  color: #111827;
  line-height: 1.2;
}
.nb-people-picked.is-won {
  color: #1d4ed8;
  padding-left: 0.55rem;
  border-left: 4px solid #fbbf24;
}
.nb-people-spin-btn { width: 100%; padding: 0.7rem 0.8rem; font-size: 0.95rem; }
.nb-people-seat-default {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #4b5563;
}
.nb-people-seat-default input[type="number"] {
  width: 3.2rem;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  padding: 0.28rem 0.35rem;
}
.nb-people-seat-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 0.7rem;
  align-items: stretch;
  margin-bottom: 0.45rem;
}
.nb-people-desk-inspect {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  padding: 0.7rem 0.75rem;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 0;
  min-width: 0;
}
.nb-people-desk-inspect h4 {
  margin: 0;
  font-size: 0.82rem;
  color: #111827;
}
.nb-people-desk-names {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.nb-people-desk-names li {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: 0.3rem;
  align-items: center;
  color: #111827;
}
.nb-people-desk-names li span {
  color: #9ca3af;
  font-size: 0.7rem;
}
.nb-people-desk-names li.is-empty { color: #9ca3af; }
.nb-people-spin-btn { width: 100%; padding: 0.7rem 0.8rem; font-size: 0.95rem; }
.nb-people-inline-link {
  border: 0;
  background: none;
  padding: 0;
  color: #1d4ed8;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.nb-people-inline-link:hover { text-decoration: underline; }
.nb-people-overflow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.7rem;
  margin: -0.2rem 0 0.7rem;
  font-size: 0.78rem;
  color: #4b5563;
}
.nb-people-seat-opts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  margin: -0.15rem 0 0.65rem;
}
.nb-people-seg {
  display: inline-flex;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  overflow: hidden;
}
.nb-people-seg .nb-btn {
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0.28rem 0.55rem;
  font-size: 0.75rem;
}
.nb-people-select {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.28rem 0.4rem;
  font-size: 0.78rem;
  background: #fff;
  color: #374151;
}
.nb-people-seat-default.is-quiet { opacity: 0.45; }
.nb-people-saved-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.nb-people-rules-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}
.nb-people-rules-cols h4,
.nb-people-rule-add h4 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.nb-people-rule-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nb-people-rule-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.8rem;
  color: #111827;
}
.nb-people-rule-add {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.7rem 0.8rem 0.85rem;
  background: #f8fafc;
}
.nb-people-rule-add .nb-people-roster {
  max-height: 220px;
  overflow: auto;
  margin: 0.45rem 0 0.6rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.25rem;
}
.nb-people-rule-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.nb-people-groups-bar,
.nb-people-seat-bar,
.nb-people-save-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
  position: relative;
  z-index: 3;
}
.nb-people-groups-bar label,
.nb-people-save-row input {
  font-size: 0.78rem;
  color: #4b5563;
}
.nb-people-groups-bar input[type="number"] {
  width: 3.2rem;
  margin-left: 0.3rem;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  padding: 0.28rem 0.35rem;
}
.nb-people-save-row input[type="text"] {
  flex: 1;
  min-width: 10rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.38rem 0.55rem;
  font-size: 0.8rem;
}
.nb-people-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.9rem;
}
.nb-people-group-card {
  border: 1px solid hsl(var(--g) 45% 82%);
  background: hsl(var(--g) 70% 96%);
  border-radius: 12px;
  padding: 0.55rem 0.65rem 0.7rem;
}
.nb-people-group-card header {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: hsl(var(--g) 55% 32%);
  margin-bottom: 0.3rem;
}
.nb-people-group-card ol {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  color: #111827;
}
.nb-people-saved h4 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.nb-people-saved-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.4rem;
  align-items: center;
  padding: 0.28rem 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.78rem;
  color: #6b7280;
}
.nb-people-saved-open {
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  font-weight: 650;
  color: #1d4ed8;
  cursor: pointer;
}
.nb-people-saved-open:hover { text-decoration: underline; }
.nb-people-seat-tools { display: flex; gap: 0.3rem; flex-wrap: wrap; align-items: center; }
.nb-people-add { position: relative; z-index: 4; }
.nb-people-add-caret { font-size: 0.7em; opacity: 0.7; margin-left: 0.15rem; }
.nb-people-add-pop {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 272px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  padding: 0.5rem 0.5rem 0.55rem;
  z-index: 8;
}
.nb-people-add-k {
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 0.2rem 0.25rem 0.35rem;
}
.nb-people-add-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.3rem;
  margin-bottom: 0.35rem;
}
.nb-people-add-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 0; }
.nb-people-add-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.22rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.38rem 0.15rem 0.32rem;
  background: #f8fafc;
  color: #475569;
  font: 650 0.64rem Inter, system-ui, sans-serif;
  cursor: pointer;
}
.nb-people-add-item:hover,
.nb-people-add-item.is-on {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}
.nb-people-ticon {
  position: relative;
  width: 34px;
  height: 22px;
  color: inherit;
}
.nb-people-ticon.is-row {
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  align-items: end;
  gap: 2px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  padding: 8px 3px 3px;
}
.nb-people-ticon.is-row i,
.nb-people-ticon.is-sides i {
  display: block;
  height: 5px;
  background: currentColor;
  opacity: 0.45;
  border-radius: 1px;
}
.nb-people-ticon.is-sides {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  padding: 3px;
}
.nb-people-ticon.is-sides span {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
.nb-people-ticon.is-circle {
  width: 22px;
  height: 22px;
  margin: 0 auto;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.nb-people-ticon.is-circle i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  background: currentColor;
  opacity: 0.5;
  border-radius: 50%;
  transform: rotate(var(--a)) translateY(-7px);
}
.nb-people-ticon.is-board {
  width: 34px;
  height: 10px;
  margin-top: 6px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.55;
}
.nb-people-ticon.is-fa,
.nb-people-ticon.is-draw {
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}
.nb-people-desk-inspect:empty {
  visibility: hidden;
  pointer-events: none;
  border-color: transparent;
  background: transparent;
}
.nb-people-room-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
  margin-bottom: 0.4rem;
}
.nb-people-room-wrap canvas {
  display: block;
  width: 100%;
  touch-action: none;
  cursor: default;
}

.nb-grapher-panel {
  min-width: 720px;
  min-height: 480px;
  background: #fff;
}
html.nb-grapher-web,
html.nb-grapher-web body {
  background: #fff;
}
html.nb-grapher-web .nb-class-tool-overlay.nb-grapher-overlay {
  pointer-events: auto;
}
html.nb-grapher-web .nb-grapher-panel {
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  left: 0 !important;
  top: 0 !important;
  border-radius: 0;
  box-shadow: none;
  min-width: 0;
  min-height: 0;
}
html.nb-grapher-web .nb-class-tool-header {
  cursor: default;
}
html.nb-grapher-web .nb-class-tool-resize,
html.nb-grapher-web .nb-grapher-header-btn[data-embed],
html.nb-grapher-web .nb-grapher-header-btn[data-paste],
html.nb-grapher-web .nb-class-tool-header [data-close],
html.nb-grapher-web .nb-grapher-settings label:has([data-opt="includeLegend"]) {
  display: none !important;
}
.nb-grapher-header-btn {
  font-size: 0.78rem;
  padding: 0.28rem 0.55rem;
  white-space: nowrap;
}
.nb-grapher-confirm {
  pointer-events: auto;
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, 0.4);
}
.nb-grapher-confirm.hidden { display: none; }
.nb-grapher-confirm .nb-modal {
  width: min(320px, 92vw);
}
.nb-grapher-embed-opts {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.nb-grapher-embed-opts label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: #111827;
}
.nb-grapher-menu { position: relative; }
.nb-grapher-flyout {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  padding: 0.28rem;
  z-index: 5;
}
.nb-grapher-flyout button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 8px;
  padding: 0.42rem 0.55rem;
  font-size: 0.82rem;
  color: #111827;
  cursor: pointer;
}
.nb-grapher-flyout button:hover { background: #f1f5f9; }
.nb-grapher-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  padding: 0.45rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
  font-size: 0.78rem;
  color: #334155;
}
.nb-grapher-settings.hidden { display: none; }
.nb-grapher-settings label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}
.nb-grapher-settings-btn {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
  border-radius: 0;
}
.nb-grapher-settings-btn:hover,
.nb-grapher-settings-btn.is-on {
  color: #2563eb;
}
.nb-grapher-pinch-pop {
  position: absolute;
  top: 5.6rem;
  z-index: 12;
  pointer-events: auto;
}
.nb-grapher-pinch-pop.hidden { display: none; }
.nb-grapher-pinch-card {
  width: 11.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  padding: 0.55rem 0.7rem 0.7rem;
}
.nb-grapher-pinch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: #111827;
}
.nb-grapher-pinch-head .nb-btn {
  width: 1.6rem;
  height: 1.6rem;
}
.nb-grapher-pinch-dial {
  display: flex;
  justify-content: center;
  margin: 0.15rem 0 0.2rem;
}
.nb-grapher-pinch-svg {
  width: 7.4rem;
  height: 7.1rem;
}
.nb-grapher-pinch-card input[type="range"] {
  width: 100%;
  margin: 0.15rem 0 0.2rem;
  accent-color: #2563eb;
}
.nb-grapher-pinch-deg {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  color: #334155;
}
.nb-grapher-body {
  display: flex;
  flex: 1;
  min-height: 0;
  background: #fff;
}
.nb-grapher-list {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  min-height: 0;
}
.nb-grapher-rows {
  flex: 1;
  overflow: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.nb-grapher-row {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  margin: 0;
  width: 100%;
  flex: 0 0 auto;
}
.nb-grapher-row.has-error { box-shadow: inset 3px 0 0 #ef4444; }
.nb-grapher-row.is-hidden .nb-grapher-mq,
.nb-grapher-row.is-hidden .nb-grapher-value,
.nb-grapher-row.is-hidden .nb-grapher-src-fallback { opacity: 0.42; }
.nb-grapher-row-main {
  display: grid;
  grid-template-columns: 1.25rem 1.2rem minmax(0, 1fr) 1.85rem;
  align-items: center;
  gap: 0.12rem;
  padding: 0.12rem 0.12rem 0.12rem 0.28rem;
  min-height: 2.35rem;
  width: 100%;
}
.nb-grapher-row-main .nb-grapher-expr { min-width: 0; }
.nb-grapher-row-main .nb-grapher-icon[data-del] {
  width: 1.85rem;
  min-width: 1.85rem;
  justify-self: end;
  grid-column: 4;
}
.nb-grapher-index {
  font-size: 0.68rem;
  color: #94a3b8;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.nb-grapher-color {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 0;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.18);
  cursor: pointer;
  padding: 0;
  justify-self: center;
}
.nb-grapher-color.is-off {
  background: transparent !important;
}
.nb-grapher-row-main input[data-src],
.nb-grapher-src-fallback {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font: 15px/1.4 "Cambria Math", "Times New Roman", Georgia, serif;
  color: #111827;
  padding: 0.28rem 0.2rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.nb-grapher-src-fallback::-webkit-scrollbar { display: none; }
.nb-grapher-expr {
  min-width: 0;
  width: 100%;
  overflow: hidden;
}
.nb-grapher-mq {
  display: block !important;
  width: 100% !important;
  min-width: 0;
  min-height: 1.7rem;
  padding: 0.18rem 0.1rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
  border-radius: 0 !important;
}
.nb-grapher-mq::-webkit-scrollbar,
.nb-grapher-mq .mq-editable-field::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.nb-grapher-panel .nb-grapher-mq.mq-editable-field,
.nb-grapher-panel .nb-grapher-mq.mq-math-mode,
.nb-grapher-panel .nb-grapher-mq.mq-focused,
.nb-grapher-panel .nb-grapher-mq .mq-editable-field,
.nb-grapher-panel .nb-grapher-mq .mq-math-mode {
  display: block !important;
  width: 100% !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  margin: 0 !important;
  font-size: 16px;
  line-height: 1.45;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.nb-grapher-mq .mq-root-block {
  white-space: nowrap;
  display: inline-block;
  min-width: min-content;
  padding-right: 0.4rem;
  vertical-align: middle;
}
.nb-grapher-panel .mq-math-mode .mq-paren {
  vertical-align: middle;
  padding: 0 0.04em;
  transform-origin: center center;
}
.nb-grapher-panel .mq-math-mode .mq-paren + span {
  margin-top: 0;
  margin-bottom: 0;
}
.nb-grapher-value {
  padding: 0 1.85rem 0.32rem 2.7rem;
  max-width: 100%;
  font: 13px/1.3 "Cambria Math", "Times New Roman", Georgia, serif;
  color: #15803d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.nb-grapher-value.hidden { display: none; }
.nb-grapher-src-fallback.hidden { display: none; }
.nb-grapher-icon {
  border: 0;
  background: transparent;
  color: #94a3b8;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 6px;
  cursor: pointer;
}
.nb-grapher-icon:hover { background: #f1f5f9; color: #334155; }
.nb-grapher-error {
  color: #b91c1c;
  font-size: 0.7rem;
  padding: 0 0.55rem 0.4rem 2.1rem;
}
.nb-grapher-error.hidden { display: none; }
.nb-grapher-slider {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr) 2.4rem;
  gap: 0.2rem 0.3rem;
  align-items: center;
  padding: 0 0.4rem 0.45rem 0.35rem;
}
.nb-grapher-slider.hidden { display: none; }
.nb-grapher-slider input[type="range"] { width: 100%; }
.nb-grapher-slider [data-sval] {
  font-size: 0.72rem;
  color: #475569;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.nb-grapher-slider-range {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.28rem;
}
.nb-grapher-slider-range input {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.7rem;
  padding: 0.18rem 0.28rem;
  color: #475569;
}
.nb-grapher-add {
  margin: 0;
  border: 0;
  border-bottom: 0;
  background: transparent;
  color: #94a3b8;
  border-radius: 0;
  padding: 0.55rem 0.7rem;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  flex: 1 1 auto;
  min-height: 2.8rem;
  align-self: stretch;
  width: 100%;
}
.nb-grapher-add:hover { background: #f8fafc; color: #334155; }
.nb-grapher-split {
  width: 7px;
  cursor: col-resize;
  background: #f8fafc;
  flex-shrink: 0;
}
.nb-grapher-split:hover { background: #e2e8f0; }
.nb-grapher-stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #fff;
}
.nb-grapher-tools {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nb-grapher-tool {
  width: 32px;
  height: 32px;
  border: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  font-size: 0.72rem;
  font-weight: 700;
}
.nb-grapher-tool:hover { background: #f8fafc; }
.nb-grapher-tool.is-on { color: #2563eb; border-color: #93c5fd; background: #eff6ff; }
.nb-grapher-canvas-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  touch-action: none;
  cursor: default;
}
.nb-grapher-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: default;
}
.nb-grapher-box {
  position: absolute;
  border: 1.5px solid #2563eb;
  background: rgba(37, 99, 235, 0.12);
  pointer-events: none;
}
.nb-grapher-box.hidden { display: none; }
.nb-grapher-table {
  flex-shrink: 0;
  max-height: 180px;
  display: flex;
  flex-direction: column;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
}
.nb-grapher-table.hidden { display: none; }
.nb-grapher-table-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  align-items: center;
  padding: 0.35rem 0.55rem;
  font-size: 0.75rem;
}
.nb-grapher-table-head input,
.nb-grapher-table-head select {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.15rem 0.3rem;
  font-size: 0.75rem;
  background: #fff;
}
.nb-grapher-table-head input { width: 4.2rem; }
.nb-grapher-table-body {
  overflow: auto;
  padding: 0 0.55rem 0.5rem;
}
.nb-grapher-table-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  background: #fff;
}
.nb-grapher-table-body th,
.nb-grapher-table-body td {
  border: 1px solid #e5e7eb;
  padding: 0.18rem 0.4rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.nb-grapher-table-body th { background: #f1f5f9; text-align: center; }
.nb-grapher-table-empty { font-size: 0.75rem; color: #64748b; padding: 0.5rem; }

.nb-grapher-keypad {
  flex-shrink: 0;
  background: #f3f4f6;
  user-select: none;
  -webkit-user-select: none;
  border-top: 1px solid #e5e7eb;
}
.nb-gk-body {
  padding: 8px 10px 8px;
}
.nb-grapher-keypad.is-collapsed .nb-gk-body { display: none; }
.nb-gk-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.nb-gk-tabs, .nb-gk-angle {
  display: flex;
  gap: 2px;
  background: #e5e7eb;
  border-radius: 8px;
  padding: 2px;
}
.nb-gk-tab, .nb-gk-angle-btn {
  border: none;
  background: transparent;
  color: #4b5563;
  cursor: pointer;
  border-radius: 6px;
  touch-action: manipulation;
}
.nb-gk-tab {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  letter-spacing: 0.02em;
}
.nb-gk-tab.is-active {
  background: #fff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.nb-gk-angle-btn {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 9px;
}
.nb-gk-angle-btn.is-active { background: #2563eb; color: #fff; }
.nb-gk-pads {
  display: grid;
  height: 220px;
}
.nb-gk-pad {
  display: grid;
  gap: 6px;
  grid-area: 1 / 1;
  height: 100%;
  min-height: 0;
  align-content: stretch;
}
.nb-gk-pad.is-off {
  visibility: hidden;
  pointer-events: none;
}
.nb-gk-pad-main { grid-template-columns: repeat(9, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); }
.nb-gk-pad-abc { grid-template-columns: repeat(10, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); }
.nb-gk-pad-func { grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: repeat(5, minmax(0, 1fr)); }
.nb-gk-key {
  appearance: none;
  border: none;
  background: #e8eaed;
  color: #202124;
  border-radius: 8px;
  min-height: 0;
  height: 100%;
  padding: 0 3px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.nb-gk-key:active { background: #d2d4d8; transform: translateY(1px); }
.nb-gk-key i { pointer-events: none; font-size: 0.9em; }
.nb-gk-op { background: #dfe3ea; }
.nb-gk-fn { background: #eceff3; font-size: 0.78rem; }
.nb-gk-int { font-size: 1.25rem; font-weight: 500; }
.nb-gk-wide { grid-column: span 2; }
.nb-gk-enter { background: #2563eb; color: #fff; font-size: 1.15rem; }
.nb-gk-enter:active { background: #1d4ed8; }
.nb-gk-danger { color: #b91c1c; }
.nb-gk-shift.is-active { background: #2563eb; color: #fff; }
.nb-gk-dock {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  margin: 0;
  border: 0;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  touch-action: manipulation;
}
.nb-gk-dock:hover { background: #f1f5f9; color: #334155; }
.nb-gk-dock:active { background: #e2e8f0; }
.nb-gk-dock i { pointer-events: none; }
.nb-gk-dock-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  color: #334155;
}
.nb-gk-dock:hover .nb-gk-dock-pill { border-color: #cbd5e1; color: #0f172a; }
.nb-gk-grip {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 36px;
  height: 4px;
  margin-left: -18px;
  border-radius: 99px;
  background: #cbd5e1;
}
.nb-gk-chevron {
  font-size: 0.68rem;
  transition: transform 0.16s ease;
}
.nb-grapher-keypad.is-collapsed .nb-gk-dock {
  min-height: 52px;
  padding-top: 10px;
  background: #fff;
  border-top: 1px solid #e5e7eb;
}
.nb-grapher-keypad:not(.is-collapsed) .nb-gk-grip { display: none; }
.nb-grapher-keypad:not(.is-collapsed) .nb-gk-chevron { transform: rotate(180deg); }
.nb-grapher-keypad:not(.is-collapsed) .nb-gk-dock {
  min-height: 34px;
  border-top: 1px solid #e5e7eb;
  background: #f3f4f6;
}
.nb-grapher-keypad:not(.is-collapsed) .nb-gk-dock-pill {
  min-height: 26px;
  padding: 0 12px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.nb-grapher-style {
  position: fixed;
  z-index: 5400;
  width: 198px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  padding: 0.55rem;
}
.nb-grapher-swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.nb-grapher-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.2);
  cursor: pointer;
  padding: 0;
}
.nb-grapher-swatch.is-on { box-shadow: 0 0 0 2px #2563eb; }
.nb-grapher-dashes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  margin-bottom: 0.45rem;
}
.nb-grapher-dashes button {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 7px;
  font-size: 0.7rem;
  padding: 0.22rem 0.3rem;
  cursor: pointer;
}
.nb-grapher-dashes button.is-on { border-color: #93c5fd; color: #1d4ed8; background: #eff6ff; }
.nb-grapher-thick {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.7rem;
  color: #475569;
  margin-top: 0.35rem;
}
.nb-grapher-thick:first-of-type { margin-top: 0; }
@media (max-width: 760px) {
  .nb-people-spin { grid-template-columns: 1fr; }
  .nb-people-rules-cols { grid-template-columns: 1fr; }
  .nb-people-saved-grid { grid-template-columns: 1fr; }
  .nb-timer-presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nb-timer-stations { grid-template-columns: 1fr; }
  .nb-people-drawer { width: 200px; }
  .nb-grapher-panel { min-width: 0; }
  .nb-grapher-body { flex-direction: column; }
  .nb-grapher-list { width: 100% !important; max-height: 38%; border-right: 0; border-bottom: 1px solid #e5e7eb; }
  .nb-grapher-split { display: none; }
}

@media print {
  .nb-sidebar, .nb-toolbar, .nb-status-bar, .nb-notebook-tabs, .nb-scroll, .nb-focus-toggle, .nb-broadcast-frame, .nb-stream-hud, .nb-stream-preview-pop, .nb-stream-live-chip, .nb-print-backdrop, .nb-pt-overlay, .nb-draw-extras-picker, .calculator-modal-overlay, .nb-layers-panel, .nb-class-tool-overlay, .nb-student-top, .nb-student-toast { display: none !important; }
  .nb-editor-wrap { background: #fff !important; }
  body { overflow: visible !important; }
  html.nb-is-printing,
  html.nb-is-printing body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }
  html.nb-is-printing body > *:not(#nb-print-root) {
    display: none !important;
  }
  html.nb-is-printing #nb-print-root {
    position: static !important;
    left: auto !important;
    top: auto !important;
    display: block !important;
    width: auto !important;
    background: #fff !important;
  }
  html.nb-grapher-web .nb-class-tool-overlay {
    display: block !important;
  }
}
