:root {
  color-scheme: light;
  --theme-primary: #2563eb;
  --theme-background: #f6f7fb;
  --theme-surface: #ffffff;
  --theme-accent: #f59e0b;
  --theme-text: #172033;
  --theme-border: #d8dee9;
  --theme-heading: Inter, system-ui, sans-serif;
  --theme-body: Inter, system-ui, sans-serif;
  --chrome-bg: #f3f4f6;
  --chrome-surface: #ffffff;
  --chrome-text: #111827;
  --chrome-muted: #64748b;
  --chrome-border: #d8dee9;
  --shadow: 0 18px 42px rgba(15, 23, 42, 0.10);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; margin: 0; }
body {
  background: var(--chrome-bg);
  color: var(--chrome-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }

.holomua-shell { min-height: 100vh; display: grid; grid-template-rows: 58px 1fr; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 10px 16px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--chrome-border);
  backdrop-filter: blur(14px);
}
.course-chip {
  min-width: 126px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--chrome-border);
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  font-size: 13px;
}
.top-title-input {
  width: 100%;
  min-height: 38px;
  border: 0;
  background: transparent;
  color: var(--chrome-text);
  font-size: 18px;
  font-weight: 800;
  outline: none;
}
.top-actions { display: flex; align-items: center; gap: 8px; }
.top-nav {
  display: flex;
  gap: 6px;
  align-items: center;
}
.top-nav a, .nav-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--chrome-border);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--chrome-text);
  text-decoration: none;
  font-weight: 750;
  background: #fff;
}
.top-nav a.active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}
.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--chrome-border);
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}
.segmented button {
  min-height: 36px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 10px;
  color: var(--chrome-muted);
}
.segmented button.active { background: #111827; color: #fff; }
.primary, .secondary, .tool-button, .add-bottom {
  min-height: 38px;
  border: 1px solid var(--chrome-border);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--chrome-text);
  font-weight: 700;
}
.primary { background: #111827; color: #fff; border-color: #111827; }
.secondary:hover, .tool-button:hover, .add-bottom:hover { border-color: #94a3b8; }

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 240px;
}
body.layout-mode .workspace {
  grid-template-columns: minmax(0, 1fr) 260px;
}
body.layout-mode .left-sidebar {
  display: none;
}
body.layout-mode .activity-canvas {
  width: min(1320px, 100%);
}
body.layout-mode .canvas-wrap {
  padding: 22px;
}
.left-sidebar, .right-inspector {
  min-height: calc(100vh - 58px);
  padding: 14px;
  background: var(--chrome-surface);
  border-right: 1px solid var(--chrome-border);
  overflow: auto;
}
.right-inspector { border-right: 0; border-left: 1px solid var(--chrome-border); }
.tool-section, .inspector-section { margin-bottom: 20px; }
.tool-section h2, .inspector-section h2 {
  margin: 0 0 10px;
  color: #334155;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.block-button-grid { display: grid; gap: 8px; }
.block-type-button {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--chrome-border);
  border-radius: 8px;
  background: #f8fafc;
  color: #172033;
  padding: 0 10px;
  text-align: left;
}
.ai-panel {
  margin-top: 10px;
  min-height: 130px;
  border: 1px solid var(--chrome-border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
}
.ai-panel pre { white-space: pre-wrap; margin: 0 0 10px; }
.muted { color: var(--chrome-muted); }

.canvas-wrap {
  position: relative;
  min-width: 0;
  min-height: calc(100vh - 58px);
  padding: 28px;
  overflow: auto;
  background: var(--theme-background);
  background-image: var(--theme-background-image, none);
}
.activity-canvas {
  width: min(880px, 100%);
  margin: 0 auto;
  color: var(--theme-text);
  font-family: var(--theme-body);
}
.activity-header {
  margin-bottom: 18px;
  border: 1px solid var(--theme-border);
  border-radius: 8px;
  background: var(--theme-surface);
  box-shadow: var(--shadow);
  padding: 22px;
}
.activity-title {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--theme-primary);
  font-family: var(--theme-heading);
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: 0;
}
.activity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.activity-meta input {
  width: auto;
  min-width: 120px;
  min-height: 34px;
  border: 1px solid var(--theme-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-surface) 88%, var(--theme-background));
  color: var(--theme-text);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
}
.blocks { display: grid; gap: 14px; }
.canvas-only { display: none; }
body.canvas-activity .canvas-only { display: inline-flex; }
body.canvas-activity .left-sidebar,
body.canvas-activity .right-inspector,
body.canvas-activity .activity-header,
body.canvas-activity #addBlockBottom {
  display: none;
}
body.canvas-activity .workspace {
  grid-template-columns: minmax(0, 1fr);
}
body.canvas-activity .canvas-wrap {
  padding: 18px;
  background: #eef1f4;
}
body.canvas-activity .activity-canvas {
  width: 100%;
  max-width: none;
}
.canvas-editor {
  width: min(100%, 1360px);
  margin: 0 auto;
}
.canvas-editor-toolbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid var(--chrome-border);
  border-radius: 8px;
  background: #fff;
}
.canvas-scale-wrap {
  position: relative;
  width: 100%;
  min-height: 180px;
}
.freeform-canvas {
  position: relative;
  width: 1280px;
  height: 720px;
  overflow: visible;
  transform-origin: top left;
  background: var(--canvas-bg, #faf9f6);
  border: 1px solid rgba(15,23,42,.22);
  box-shadow: 0 18px 42px rgba(15,23,42,.16);
  color: var(--canvas-text, #2d2d2d);
}
.canvas-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.canvas-grid-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(15,23,42,.14) 1px, transparent 1.5px);
  background-size: 20px 20px;
}
.canvas-box {
  position: absolute;
  display: grid;
  grid-template-rows: 28px minmax(0, 1fr);
  background: rgba(245,245,240,.96);
  border: 2px dashed #ccc;
  border-radius: 10px;
  overflow: visible;
  touch-action: none;
}
.canvas-box.assigned {
  border-style: solid;
  border-color: var(--canvas-primary, #2563eb);
  background: rgba(255,255,255,.96);
}
.canvas-box.selected {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.canvas-box-label {
  width: calc(100% - 16px);
  min-width: 0;
  height: 24px;
  margin: 4px 8px 0;
  border: 0;
  border-bottom: 1px solid rgba(15,23,42,.12);
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 750;
  outline: none;
}
.canvas-box-content {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
}
.box-placeholder {
  display: grid;
  gap: 6px;
  place-items: center;
  color: #7c7c73;
  font-weight: 800;
}
.box-plus {
  font-size: 54px;
  line-height: 1;
  color: #a1a1aa;
}
.box-type-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--canvas-primary, #2563eb) 12%, #fff);
  color: var(--canvas-primary, #2563eb);
}
.canvas-box-toolbar {
  position: absolute;
  left: 0;
  top: -46px;
  z-index: 50;
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: max-content;
  padding: 5px;
  border: 1px solid var(--chrome-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15,23,42,.16);
}
.canvas-box-toolbar select,
.canvas-box-toolbar button {
  min-height: 30px;
  font-size: 12px;
}
.resize-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid #2563eb;
  border-radius: 999px;
  background: #fff;
  z-index: 45;
}
.resize-dot.nw { left: -6px; top: -6px; cursor: nwse-resize; }
.resize-dot.n { left: calc(50% - 5px); top: -6px; cursor: ns-resize; }
.resize-dot.ne { right: -6px; top: -6px; cursor: nesw-resize; }
.resize-dot.e { right: -6px; top: calc(50% - 5px); cursor: ew-resize; }
.resize-dot.se { right: -6px; bottom: -6px; cursor: nwse-resize; }
.resize-dot.s { left: calc(50% - 5px); bottom: -6px; cursor: ns-resize; }
.resize-dot.sw { left: -6px; bottom: -6px; cursor: nesw-resize; }
.resize-dot.w { left: -6px; top: calc(50% - 5px); cursor: ew-resize; }
.canvas-hud {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 60;
  min-height: 28px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(17,24,39,.88);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.empty-canvas-add {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-height: 48px;
}
.background-popover {
  width: 320px;
}
.background-tabs {
  display: grid;
  gap: 10px;
}
.background-tabs label {
  display: grid;
  gap: 5px;
  font-weight: 800;
  color: #334155;
}
.preset-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.preset-row button {
  width: 34px;
  height: 28px;
  border: 1px solid rgba(15,23,42,.18);
  border-radius: 6px;
}
.bg-preview {
  height: 90px;
  border-radius: 8px;
  border: 1px solid var(--chrome-border);
  background-size: cover;
  background-position: center;
}

.hm-loading { min-height: 100vh; display: grid; place-items: center; background: #f5f5f5; color: #334155; font: 700 16px Inter, system-ui, sans-serif; }
.hm-loading.error { color: #dc2626; }
.hm-react-shell { min-height: 100vh; display: grid; grid-template-rows: 58px 1fr; background: #f5f5f5; font-family: Inter, system-ui, sans-serif; }
.hm-react-topbar { display: grid; grid-template-columns: auto minmax(260px, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 16px; background: #fff; border-bottom: 1px solid #e5e7eb; }
.hm-periods { min-height: 34px; display: grid; place-items: center; padding: 0 12px; border: 1px solid #d1d5db; border-radius: 999px; font-size: 13px; font-weight: 800; color: #475569; }
.hm-title { border: 0; outline: 0; background: transparent; font: 800 22px Georgia, serif; color: var(--hm-heading, #172033); }
.hm-react-topbar nav { display: flex; gap: 8px; align-items: center; }
.hm-react-topbar button, .hm-popover button, .hm-box-toolbar button, .hm-box-toolbar select { min-height: 36px; border: 1px solid color-mix(in srgb, var(--hm-secondary, #64748b) 42%, #fff); border-radius: 8px; background: #fff; padding: 0 10px; font: 700 14px Inter, system-ui, sans-serif; color: var(--hm-text, #111827); }
.hm-react-topbar button:hover, .hm-popover button:hover, .hm-box-toolbar button:hover { border-color: var(--hm-primary, #2563eb); }
.hm-react-topbar button:disabled, .hm-box-toolbar button:disabled { opacity: .45; }
.hm-saved { color: #16a34a; font-weight: 800; animation: hmFade 1.5s ease forwards; }
.hm-status-badge { justify-self: end; border-radius: 999px; background: #dcfce7; color: #166534; padding: 5px 10px; font-size: 12px; font-weight: 900; }
@keyframes hmFade { 0%, 55% { opacity: 1; } 100% { opacity: 0; } }
.hm-editor-body { position: relative; min-width: 0; overflow: auto; padding: 18px; }
.hm-editor-body.with-slides { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
.hm-canvas-frame { width: min(100%, 1320px); margin: 0 auto; }
.hm-canvas { position: relative; width: 1280px; height: 720px; margin: 0 auto; overflow: visible; background: var(--hm-bg); color: var(--hm-text); border: 1px solid color-mix(in srgb, var(--hm-secondary, #64748b) 45%, transparent); box-shadow: 0 18px 42px rgba(15,23,42,.16); cursor: crosshair; transform-origin: top left; }
@media (max-width: 1320px) { .hm-canvas { transform: scale(calc((100vw - 36px) / 1280)); margin: 0; } .hm-canvas-frame { height: calc(720px * ((100vw - 36px) / 1280)); } }
.hm-bg-img, .hm-bg-image-layer, .hm-bg-overlay, .hm-dot-grid { position: absolute; inset: 0; pointer-events: none; }
.hm-bg-img { background-size: cover; background-position: center; }
.hm-bg-image-layer { width: 100%; height: 100%; object-fit: cover; }
.hm-bg-overlay { z-index: 0; }
.hm-dot-grid { z-index: 0; background-image: radial-gradient(circle, rgba(15,23,42,.18) 1px, transparent 1.5px); background-size: 20px 20px; opacity: .35; }
.hm-empty { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; color: rgba(15,23,42,.36); font-weight: 800; pointer-events: none; }
.hm-empty:first-letter { font-size: 42px; }
.hm-box { position: absolute; display: grid; grid-template-rows: 28px 1fr; border-radius: 10px; background: #f9f9f6; border: 2px dashed color-mix(in srgb, var(--hm-primary, #2563eb) 55%, #ccc); overflow: visible; cursor: move; }
.hm-box.assigned-empty, .hm-box.with-content { border-style: solid; border-color: var(--hm-primary); background: rgba(255,255,255,.94); }
.hm-box.selected { outline: 2px solid var(--hm-primary, #2563eb); outline-offset: 2px; }
.hm-box-label { width: calc(100% - 16px); margin: 4px 8px 0; border: 0; border-bottom: 1px solid rgba(15,23,42,.12); outline: 0; background: transparent; color: #64748b; font: 800 12px Inter, system-ui, sans-serif; }
.hm-box-body { min-height: 0; display: grid; place-items: center; padding: 12px; overflow: hidden; text-align: center; }
.hm-placeholder { display: grid; place-items: center; gap: 4px; color: #8a8a82; font-weight: 800; }
.hm-placeholder div { font-size: 54px; line-height: .9; color: #a1a1aa; }
.hm-assigned-empty { display: grid; place-items: center; gap: 8px; color: #475569; text-transform: capitalize; }
.hm-assigned-empty span { font-size: 13px; color: #64748b; text-transform: none; }
.hm-text-preview, .hm-text-edit { width: 100%; height: 100%; text-align: left; line-height: 1.45; outline: 0; white-space: pre-wrap; }
.hm-img-preview { max-width: 100%; max-height: 100%; object-fit: contain; }
.hm-rich-text { width: 100%; height: 100%; overflow: auto; white-space: pre-wrap; text-align: left; line-height: 1.45; }
.hm-text-content-image { display: block; width: 100%; max-height: 180px; object-fit: cover; border-radius: 6px; margin-bottom: .75rem; }
.hm-content-image { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.hm-content-video, .hm-map-content iframe, .hm-map-content img { width: 100%; height: 100%; border: 0; object-fit: cover; }
.hm-map-content { position: relative; width: 100%; height: 100%; }
.hm-map-caption { position: absolute; left: 8px; right: 8px; bottom: 8px; display: grid; gap: 2px; padding: 7px 9px; border-radius: 8px; background: rgba(255,255,255,.9); color: #172033; font-size: 12px; text-align: left; }
.hm-primary-source { width: 100%; height: 100%; overflow: auto; padding: 12px; background: #f8efd8; color: #2d2618; font-family: Georgia, "Times New Roman", serif; text-align: left; line-height: 1.55; }
.hm-primary-source header { display: grid; gap: 3px; margin-bottom: 10px; border-bottom: 1px solid rgba(45,38,24,.22); padding-bottom: 6px; }
.hm-primary-source header strong { font-size: 18px; } .hm-primary-source header span { font-size: 12px; color: #6b5d45; }
.hm-primary-source .with-scan { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 10px; }
.hm-primary-source img { width: 100%; max-height: 100%; object-fit: contain; }
.hm-primary-source p { margin: 0; white-space: pre-wrap; }
.hm-mc-content, .hm-short-content { width: 100%; height: 100%; display: grid; align-content: start; gap: 8px; overflow: auto; text-align: left; }
.hm-mc-content > div { display: grid; gap: 7px; }
.hm-mc-content button { min-height: 36px; border: 1px solid rgba(15,23,42,.16); border-radius: 8px; background: #fff; color: #172033; padding: 7px 9px; text-align: left; font-weight: 800; }
.hm-mc-content button:hover { background: var(--hm-mc-option-hover, #eff6ff); }
.hm-mc-content button.selected { border-color: var(--hm-primary, #2563eb); background: color-mix(in srgb, var(--hm-primary, #2563eb) 10%, #fff); }
.hm-mc-content .correct { color: #166534; font-weight: 900; } .hm-mc-content .incorrect { color: #b91c1c; font-weight: 900; }
.hm-short-content textarea { min-height: 86px; border: 1px solid #d1d5db; border-radius: 8px; padding: 8px; resize: vertical; }
.hm-short-content textarea::placeholder { color: var(--hm-sa-placeholder, #64748b); }
.hm-short-content button, .hm-link-cta { min-height: 38px; border: 0; border-radius: 10px; background: var(--hm-primary, #2563eb); color: #fff; padding: 0 14px; font-weight: 900; }
.hm-short-content span { color: #166534; font-weight: 900; }
.hm-table-content { width: 100%; height: 100%; overflow: auto; margin: 0; }
.hm-table-content table { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
.hm-table-content th, .hm-table-content td { border: 1px solid #d1d5db; padding: 7px 8px; text-align: left; }
.hm-table-content th { background: color-mix(in srgb, var(--hm-primary, #2563eb) 12%, #fff); color: var(--hm-heading, #172033); }
.hm-table-content figcaption { margin-top: 6px; color: #64748b; font-size: 12px; text-align: left; }
.hm-timeline-content { width: 100%; height: 100%; display: flex; gap: 10px; align-items: stretch; overflow-x: auto; padding-bottom: 4px; }
.hm-timeline-content button { min-width: 150px; border: 1px solid color-mix(in srgb, var(--hm-primary, #2563eb) 35%, #d1d5db); border-radius: 10px; background: #fff; padding: 10px; color: #172033; text-align: left; }
.hm-timeline-content span { display: block; color: var(--hm-primary, #2563eb); font-size: 12px; font-weight: 900; }
.hm-timeline-content strong { display: block; margin-top: 4px; }
.hm-timeline-content small { display: block; margin-top: 8px; line-height: 1.35; color: #475569; }
.hm-link-cta { display: inline-grid; place-items: center; align-self: center; justify-self: center; text-decoration: none; }
.hm-box-toolbar { position: absolute; left: 50%; top: -48px; transform: translateX(-50%); z-index: 80; display: flex; gap: 8px; align-items: center; height: 36px; padding: 0 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 24px; background: #1a1a2e; color: #fff; box-shadow: 0 10px 28px rgba(15,23,42,.28); white-space: nowrap; }
.hm-box-toolbar.below { top: auto; bottom: -48px; }
.hm-box-toolbar button, .hm-box-toolbar select { width: 24px; min-width: 24px; height: 24px; min-height: 24px; display: grid; place-items: center; border: 0; border-radius: 999px; background: transparent; padding: 0; color: #fff; font: 800 15px/1 Inter, system-ui, sans-serif; }
.hm-box-toolbar button:hover, .hm-box-toolbar button.active { background: rgba(255,255,255,.12); border-color: transparent; }
.hm-box-toolbar button:disabled { opacity: .38; }
.hm-box-toolbar .danger { position: relative; margin-left: 8px; color: #ef4444; }
.hm-box-toolbar .danger::before { content: ""; position: absolute; left: -8px; top: 4px; bottom: 4px; width: 1px; background: rgba(255,255,255,.18); }
.hm-link-menu-wrap { position: relative; width: 24px; height: 24px; }
.hm-link-menu { position: absolute; top: 32px; left: 50%; transform: translateX(-50%); z-index: 120; min-width: 220px; display: grid; gap: 6px; padding: 10px; border: 1px solid rgba(15,23,42,.16); border-radius: 10px; background: #fff; color: #111827; box-shadow: 0 16px 38px rgba(15,23,42,.24); }
.hm-box-toolbar.below .hm-link-menu { top: auto; bottom: 32px; }
.hm-link-menu-title { padding: 2px 4px; color: #64748b; font: 800 11px Inter, system-ui, sans-serif; text-transform: uppercase; letter-spacing: .04em; }
.hm-link-menu button { width: 100%; min-width: 0; height: 30px; min-height: 30px; display: block; border-radius: 7px; background: #fff; color: #111827; text-align: left; padding: 0 8px; font-size: 12px; }
.hm-link-menu button:hover, .hm-link-menu button.selected { background: color-mix(in srgb, var(--hm-primary, #2563eb) 12%, #fff); }
.hm-link-menu button.muted { color: #64748b; }
.hm-link-url-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 6px; }
.hm-link-url-row input { min-width: 0; height: 30px; border: 1px solid #d1d5db; border-radius: 7px; padding: 0 8px; font: 12px Inter, system-ui, sans-serif; }
.hm-link-url-row button { text-align: center; }
.hm-link-indicator { position: absolute; left: -10px; top: -10px; z-index: 92; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; background: #fff; color: var(--hm-accent, #f59e0b); border: 1px solid color-mix(in srgb, var(--hm-accent, #f59e0b) 55%, #fff); font-size: 12px; box-shadow: 0 6px 16px rgba(15,23,42,.12); }
.hm-box-delete { position: absolute; top: -12px; right: -12px; z-index: 95; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #fecaca; border-radius: 999px; background: #fff; color: #dc2626; font: 900 18px/1 Inter, system-ui, sans-serif; cursor: pointer; box-shadow: 0 6px 16px rgba(15,23,42,.16); }
.hm-box-delete:hover { background: #fef2f2; border-color: #f87171; }
.hm-delete-confirm { position: absolute; top: -48px; right: -12px; z-index: 110; display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 6px 5px 10px; border: 1px solid #fecaca; border-radius: 8px; background: #fff; color: #7f1d1d; font: 800 12px Inter, system-ui, sans-serif; box-shadow: 0 10px 24px rgba(15,23,42,.18); white-space: nowrap; }
.hm-delete-confirm button { min-height: 24px; border: 1px solid #fecaca; border-radius: 6px; background: #fff; color: #7f1d1d; font: 800 12px Inter, system-ui, sans-serif; }
.hm-delete-confirm button:first-of-type { background: #dc2626; border-color: #dc2626; color: #fff; }
.hm-resize { position: absolute; width: 10px; height: 10px; border: 2px solid var(--hm-primary, #2563eb); border-radius: 999px; background: #fff; z-index: 90; }
.hm-resize.nw { left: -6px; top: -6px; cursor: nwse-resize; } .hm-resize.n { left: calc(50% - 5px); top: -6px; cursor: ns-resize; } .hm-resize.ne { right: -6px; top: -6px; cursor: nesw-resize; } .hm-resize.e { right: -6px; top: calc(50% - 5px); cursor: ew-resize; } .hm-resize.se { right: -6px; bottom: -6px; cursor: nwse-resize; } .hm-resize.s { left: calc(50% - 5px); bottom: -6px; cursor: ns-resize; } .hm-resize.sw { left: -6px; bottom: -6px; cursor: nesw-resize; } .hm-resize.w { left: -6px; top: calc(50% - 5px); cursor: ew-resize; }
.hm-draft { position: absolute; border: 2px solid var(--hm-primary, #2563eb); background: color-mix(in srgb, var(--hm-primary, #2563eb) 10%, transparent); pointer-events: none; }
.hm-hud { position: absolute; right: 12px; bottom: 12px; z-index: 120; padding: 6px 10px; border-radius: 999px; background: rgba(17,24,39,.88); color: #fff; font-size: 12px; font-weight: 800; }
.hm-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(15,23,42,.32); }
.hm-type-menu { width: min(920px, calc(100vw - 36px)); max-height: calc(100vh - 48px); overflow: auto; border-radius: 14px; background: #fff; padding: 20px; box-shadow: 0 24px 70px rgba(15,23,42,.28); }
.hm-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.hm-panel-head h2, .hm-panel-head h3 { margin: 0; font-family: Georgia, serif; }
.hm-type-menu section { margin-top: 16px; }
.hm-type-menu h3 { margin: 0 0 8px; color: #475569; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.hm-type-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hm-type-grid button { min-height: 118px; display: grid; gap: 6px; align-content: center; padding: 14px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; text-align: left; }
.hm-type-grid button span { font-size: 28px; } .hm-type-grid button small { color: #64748b; line-height: 1.35; } .hm-type-grid button:disabled { background: #f3f4f6; opacity: .62; }
.hm-popover { position: fixed; right: 18px; top: 68px; z-index: 180; width: 340px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; padding: 16px; box-shadow: 0 18px 48px rgba(15,23,42,.18); transition: opacity 150ms ease; }
.hm-content-panel { position: fixed; right: 18px; top: 68px; bottom: 18px; z-index: 170; width: 360px; overflow: auto; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; padding: 16px; box-shadow: 0 18px 48px rgba(15,23,42,.18); }
.hm-content-fields { display: grid; gap: 12px; }
.hm-content-fields label { display: grid; gap: 6px; color: #475569; font-size: 12px; font-weight: 800; }
.hm-content-fields input, .hm-content-fields textarea { width: 100%; border: 1px solid #d1d5db; border-radius: 8px; padding: 9px 10px; font: 14px Inter, system-ui, sans-serif; color: #111827; }
.hm-content-fields textarea { min-height: 104px; resize: vertical; line-height: 1.45; }
.hm-content-fields .hm-inline-check { display: flex; align-items: center; gap: 8px; }
.hm-content-fields .hm-inline-check input { width: auto; }
.hm-save-content { width: 100%; margin-top: 14px; min-height: 38px; border: 0; border-radius: 8px; background: #2563eb; color: #fff; font-weight: 800; }
.hm-inline-editor-wrap { width: 100%; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 8px; overflow: hidden; text-align: left; }
.hm-inline-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #334155; text-transform: capitalize; }
.hm-inline-editor-head button { min-height: 26px; border: 0; border-radius: 999px; background: #111827; color: #fff; padding: 0 9px; font-weight: 800; }
.hm-inline-editor { min-height: 0; display: grid; gap: 8px; overflow: auto; }
.hm-inline-editor input, .hm-inline-editor textarea, .hm-inline-editor select { min-width: 0; width: 100%; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #111827; padding: 7px 8px; font: 13px Inter, system-ui, sans-serif; }
.hm-inline-editor textarea { min-height: 72px; resize: vertical; line-height: 1.4; }
.hm-inline-editor button { min-height: 30px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #111827; padding: 0 9px; font-weight: 800; }
.hm-inline-editor button.active { background: var(--hm-primary, #2563eb); border-color: var(--hm-primary, #2563eb); color: #fff; }
.hm-editor-row { display: flex; gap: 6px; align-items: center; min-width: 0; }
.hm-editor-row input { min-width: 0; }
.hm-color-dot { width: 24px; min-width: 24px; height: 24px; min-height: 24px; border-radius: 999px !important; padding: 0 !important; }
.hm-editor-preview-img { max-width: 100%; max-height: 120px; border-radius: 8px; object-fit: cover; }
.hm-provider-pill { justify-self: start; border-radius: 999px; background: #e0f2fe; color: #075985; padding: 3px 8px; font-size: 12px; font-weight: 900; }
.hm-choice-edit { display: grid; grid-template-columns: 22px minmax(0, 1fr) 28px; gap: 6px; align-items: center; }
.hm-choice-edit input[type="checkbox"] { width: 16px; }
.hm-table-editor { display: grid; grid-template-columns: repeat(var(--hm-table-cols, 2), minmax(54px, 1fr)); gap: 4px; }
.hm-event-edit { display: grid; gap: 6px; padding: 8px; border: 1px solid #e5e7eb; border-radius: 8px; background: #f8fafc; }
.hm-event-edit div { display: flex; gap: 6px; }
.hm-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; } .hm-tabs .active { background: #111827; color: #fff; }
.hm-panel-body { display: grid; gap: 12px; } .hm-panel-body input { min-height: 38px; border: 1px solid #d1d5db; border-radius: 8px; padding: 0 10px; }
.hm-inline-check { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: #475569; font: 800 12px Inter, system-ui, sans-serif; }
.hm-inline-check input { width: auto; }
.hm-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; } .hm-swatches button { min-height: 34px; border-radius: 8px; }
.hm-bg-preview { height: 110px; border-radius: 8px; background-size: cover; background-position: center; border: 1px solid #e5e7eb; }
.hm-theme-grid { display: grid; gap: 8px; max-height: 70vh; overflow: auto; } .hm-theme-grid button { display: flex; justify-content: space-between; align-items: center; text-transform: capitalize; } .hm-theme-grid button.active { outline: 2px solid #2563eb; }
.hm-theme-grid span { display: flex; gap: 4px; } .hm-theme-grid i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); }
.hm-slides-panel { position: sticky; top: 0; align-self: start; max-height: calc(100vh - 94px); overflow: auto; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; padding: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.12); }
.hm-slide-list { display: grid; gap: 10px; }
.hm-slide-thumb { position: relative; display: grid; gap: 8px; padding: 8px; border: 2px solid transparent; border-radius: 10px; background: #f8fafc; cursor: pointer; }
.hm-slide-thumb.active { border-color: var(--hm-primary, #2563eb); background: color-mix(in srgb, var(--hm-primary, #2563eb) 9%, #fff); }
.hm-slide-preview { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid rgba(15,23,42,.12); border-radius: 6px; background-image: radial-gradient(circle, rgba(15,23,42,.18) 1px, transparent 1.5px); background-size: 8px 8px; }
.hm-slide-preview span:not(.hm-home-badge) { position: absolute; min-width: 5px; min-height: 4px; border: 1px solid var(--hm-primary, #2563eb); background: rgba(255,255,255,.72); border-radius: 2px; }
.hm-home-badge { position: absolute; left: 6px; top: 6px; z-index: 4; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; background: rgba(15,23,42,.86); color: #fff; font-size: 13px; box-shadow: 0 6px 14px rgba(15,23,42,.18); }
.hm-slide-meta { display: grid; grid-template-columns: 24px minmax(0, 1fr) 26px; gap: 6px; align-items: center; }
.hm-slide-meta strong { display: grid; place-items: center; height: 24px; border-radius: 999px; background: #e2e8f0; color: #334155; font-size: 12px; }
.hm-slide-meta input { min-width: 0; height: 28px; border: 1px solid #d1d5db; border-radius: 6px; padding: 0 7px; font: 800 12px Inter, system-ui, sans-serif; color: #111827; }
.hm-slide-meta button { width: 26px; height: 26px; border: 1px solid #fecaca; border-radius: 999px; background: #fff; color: #dc2626; font-weight: 900; }
.hm-slide-context { position: absolute; z-index: 20; margin-top: 4px; padding: 6px; border: 1px solid rgba(15,23,42,.12); border-radius: 8px; background: #fff; box-shadow: 0 14px 28px rgba(15,23,42,.2); }
.hm-slide-context button { height: 30px; border: 0; border-radius: 6px; background: #fff; padding: 0 10px; color: #111827; font: 800 12px Inter, system-ui, sans-serif; }
.hm-slide-context button:hover:not(:disabled) { background: #f1f5f9; }
.hm-add-slide-full { width: 100%; margin-top: 12px; min-height: 36px; border: 0; border-radius: 8px; background: var(--hm-primary, #2563eb); color: #fff; font-weight: 800; }
.hm-student-shell { min-height: 100vh; display: grid; place-items: center; overflow: auto; background: var(--hm-bg, #f5f5f5); }
.hm-student-scale { width: min(100vw, 1280px); aspect-ratio: 16 / 9; overflow: visible; }
.hm-student-canvas { position: relative; width: 1280px; height: 720px; transform-origin: top left; background: var(--hm-bg); color: var(--hm-text); overflow: hidden; opacity: 1; transition: opacity 200ms ease; }
.hm-student-canvas.fading { opacity: 0; }
@media (max-width: 1280px) { .hm-student-canvas { transform: scale(calc(100vw / 1280)); } }
.hm-student-box { position: absolute; padding: 0; background: transparent; border: 0; border-radius: 0; overflow: visible; box-shadow: none; transition: transform 150ms ease; }
.hm-student-box.linked { cursor: pointer; animation: hm-link-pulse 3s ease-in-out infinite; }
.hm-student-box.pressed { opacity: .85; }
.hm-student-link-indicator { position: absolute; left: 8px; top: 8px; z-index: 2; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; background: rgba(255,255,255,.88); color: var(--hm-accent, #f59e0b); font-size: 12px; box-shadow: 0 4px 12px rgba(15,23,42,.14); }
.hm-question-scroll-cue { position: absolute; left: 50%; z-index: 35; display: grid; justify-items: center; gap: 4px; transform: translateX(-50%); color: #d4af70; font: 900 15px Inter, system-ui, sans-serif; letter-spacing: .02em; text-shadow: 0 2px 10px rgba(0,0,0,.36); pointer-events: none; animation: hmQuestionCuePulse 1.8s ease-in-out infinite; }
.hm-question-scroll-cue i { width: 18px; height: 18px; border-right: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: rotate(45deg); }
@keyframes hmQuestionCuePulse { 0%, 100% { opacity: .68; transform: translate(-50%, 0); } 50% { opacity: 1; transform: translate(-50%, 6px); } }
.hm-student-text { font: 17px/1.6 Georgia, serif; text-align: left; white-space: pre-wrap; }
.hm-student-short { display: grid; gap: 8px; text-align: left; }
.hm-student-short textarea { border: 1px solid rgba(15,23,42,.22); border-radius: 8px; padding: 10px; font: 16px/1.4 Inter, system-ui, sans-serif; }
.hm-student-mc { display: grid; gap: 8px; text-align: left; }
.hm-student-mc button { min-height: 44px; border: 1px solid rgba(15,23,42,.16); border-radius: 8px; background: #fff; padding: 8px 10px; text-align: left; font: 700 14px Inter, system-ui, sans-serif; }
.hm-student-mc button.selected { border-color: var(--hm-accent, #f59e0b); background: color-mix(in srgb, var(--hm-accent, #f59e0b) 18%, #fff); }
.hm-student-box img { width: 100%; height: 100%; object-fit: contain; } .hm-student-box textarea { width: 100%; min-height: 90px; }
.hm-student-box.image { padding: 0; }
.hm-student-box.image img { object-fit: cover; }
.hm-student-slides { position: absolute; left: 50%; bottom: 12px; z-index: 140; display: flex; gap: 6px; transform: translateX(-50%); padding: 6px; border-radius: 999px; background: rgba(255,255,255,.78); box-shadow: 0 10px 24px rgba(15,23,42,.16); }
.hm-student-slides button { width: 28px; height: 28px; border: 0; border-radius: 999px; background: transparent; color: #334155; font-weight: 900; }
.hm-student-slides button.active { background: var(--hm-primary, #2563eb); color: #fff; }
.hm-lightbox { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; background: rgba(0,0,0,.82); cursor: zoom-out; }
.hm-lightbox img { max-width: 92vw; max-height: 92vh; object-fit: contain; box-shadow: 0 24px 80px rgba(0,0,0,.36); }
.hm-student-nav { position: absolute; left: 14px; bottom: 14px; z-index: 60; display: flex; gap: 8px; }
.hm-student-nav button { min-height: 38px; border: 0; border-radius: 999px; background: rgba(15,23,42,.9); color: #fff; padding: 0 14px; font: 800 13px Inter, system-ui, sans-serif; box-shadow: 0 10px 24px rgba(15,23,42,.24); }
@keyframes hm-link-pulse { 0%, 100% { box-shadow: 0 0 0 rgba(245,158,11,0); } 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--hm-accent, #f59e0b) 18%, transparent); } }
.hm-coming { display: grid; place-items: center; height: 100%; color: #64748b; font-weight: 800; }
.hm-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--hm-progress-bg, rgba(15,23,42,.1)); } .hm-progress span { display: block; height: 100%; background: var(--hm-progress-color, var(--hm-accent)); }
.hm-progress-pill { position: absolute; right: 10px; bottom: 10px; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.72); color: rgba(15,23,42,.6); font-size: 12px; }
.hm-progress.complete span { animation: hmCompletePulse .9s ease; }
.hm-progress-pill.complete { background: color-mix(in srgb, var(--hm-accent, #f59e0b) 18%, #fff); color: #111827; font-weight: 900; }
@keyframes hmCompletePulse { 0% { filter: brightness(1); } 45% { filter: brightness(1.35); } 100% { filter: brightness(1); } }
.hm-student-email form { display: grid; gap: 12px; width: min(360px, calc(100vw - 32px)); padding: 22px; border-radius: 14px; background: #fff; box-shadow: 0 18px 48px rgba(15,23,42,.14); }
.hm-student-email h1 { margin: 0; font: 800 24px Georgia, serif; color: #172033; }
.hm-student-email input { min-height: 42px; border: 1px solid #d1d5db; border-radius: 10px; padding: 0 12px; font: 15px Inter, system-ui, sans-serif; }
.hm-student-email button { min-height: 42px; border: 0; border-radius: 10px; background: #2563eb; color: #fff; font-weight: 900; }
.hm-responses-panel { width: min(780px, calc(100vw - 36px)); max-height: calc(100vh - 92px); overflow: auto; }
.hm-response-filter { margin-bottom: 12px; }
.hm-response-filter select { min-height: 34px; border: 1px solid #d1d5db; border-radius: 8px; padding: 0 10px; }
.hm-response-grid { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); gap: 12px; }
.hm-response-list, .hm-response-detail { display: grid; align-content: start; gap: 8px; }
.hm-response-list button { display: grid; gap: 3px; min-height: auto; justify-items: start; padding: 10px; text-align: left; }
.hm-response-list button.active { border-color: var(--hm-primary, #2563eb); background: color-mix(in srgb, var(--hm-primary, #2563eb) 10%, #fff); }
.hm-response-list span, .hm-response-list small, .hm-response-detail span { color: #64748b; font-size: 12px; }
.hm-response-detail article { display: grid; gap: 4px; border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px; background: #f8fafc; }
.hm-response-detail p { margin: 0; white-space: pre-wrap; color: #111827; }
.hm-response-detail .correct { color: #166534; font-weight: 900; }
.hm-response-detail .incorrect { color: #b91c1c; font-weight: 900; }
.hm-empty-mini { color: #64748b; font-size: 13px; }
.blocks.canvas-grid {
  position: relative;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 72px;
  grid-auto-flow: dense;
  align-items: stretch;
  min-height: 560px;
}
.layout-toolbar {
  grid-column: 1 / -1;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--theme-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--theme-surface) 88%, var(--theme-background));
  color: var(--theme-text);
  padding: 8px 10px;
}
.block {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  border: 1px solid var(--theme-border);
  border-radius: 8px;
  background: var(--theme-surface);
  box-shadow: 0 12px 28px rgba(15,23,42,.08);
  overflow: hidden;
}
.canvas-panel {
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  box-shadow: 0 18px 42px rgba(15,23,42,.12);
}
.canvas-panel .block-main {
  min-height: 0;
  overflow: auto;
}
.canvas-panel.scenario {
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-primary) 14%, var(--theme-surface)), var(--theme-surface));
  border-color: color-mix(in srgb, var(--theme-primary) 40%, var(--theme-border));
}
.canvas-panel.visual, .canvas-panel.video {
  background: #111827;
}
.canvas-panel.interactive {
  border-color: color-mix(in srgb, var(--theme-accent) 45%, var(--theme-border));
}
.layout-editing .canvas-panel {
  cursor: grab;
}
.layout-editing .canvas-panel:active {
  cursor: grabbing;
}
.resize-handle {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 18px;
  height: 18px;
  border-right: 3px solid var(--theme-primary);
  border-bottom: 3px solid var(--theme-primary);
  cursor: nwse-resize;
  opacity: .8;
}
.scenario-panel .panel-kicker {
  color: var(--theme-primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.scenario-panel p {
  margin: 8px 0 0;
  font-family: var(--theme-heading);
  font-size: clamp(20px, 2vw, 31px);
  line-height: 1.22;
}
.perspective-card h3, .primary-source-text h3 {
  margin: 0 0 10px;
  color: var(--theme-primary);
  font-family: var(--theme-heading);
  font-size: 22px;
  line-height: 1.15;
}
.perspective-card p {
  margin: 0 0 14px;
  line-height: 1.55;
}
.reflection-list {
  display: grid;
  gap: 12px;
}
.reflection-list label {
  display: grid;
  gap: 8px;
  color: var(--theme-text);
  font-weight: 750;
  line-height: 1.35;
}
.primary-source-text pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.65;
}
.inline-edit-wrap {
  display: grid;
  gap: 10px;
}
.inline-display {
  display: block;
  width: 100%;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--theme-text);
  padding: 7px 9px;
  white-space: pre-wrap;
  cursor: text;
}
.inline-display:hover, .inline-display:focus {
  border-color: color-mix(in srgb, var(--theme-primary) 45%, var(--theme-border));
  outline: 3px solid color-mix(in srgb, var(--theme-primary) 12%, transparent);
  background: color-mix(in srgb, var(--theme-surface) 95%, var(--theme-background));
}
.scenario-panel .inline-display:not(.compact) {
  font-family: var(--theme-heading);
  font-size: clamp(20px, 2vw, 31px);
  line-height: 1.22;
}
.perspective-card .inline-display:not(.compact), .primary-source-text .inline-display:not(.compact) {
  font-family: var(--theme-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--theme-primary);
}
.inline-display.compact {
  display: inline-flex;
  width: auto;
  min-height: 28px;
  align-items: center;
  margin-left: 8px;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 800;
}
.inline-edit-field {
  width: 100%;
  min-height: 38px;
  border: 1px solid color-mix(in srgb, var(--theme-border) 82%, var(--theme-primary));
  border-radius: 8px;
  background: color-mix(in srgb, var(--theme-surface) 95%, var(--theme-background));
  color: var(--theme-text);
  padding: 9px 10px;
  font: inherit;
}
.inline-edit-field:hover, .inline-edit-field:focus {
  border-color: var(--theme-primary);
  outline: 3px solid color-mix(in srgb, var(--theme-primary) 16%, transparent);
}
.inline-edit-field.multiline {
  min-height: 52px;
  resize: none;
  overflow: hidden;
  line-height: 1.5;
}
.scenario-panel .inline-edit-field.multiline {
  font-family: var(--theme-heading);
  font-size: clamp(20px, 2vw, 31px);
  line-height: 1.22;
}
.perspective-card .inline-edit-field:not(.multiline), .primary-source-text .inline-edit-field:not(.multiline) {
  color: var(--theme-primary);
  font-family: var(--theme-heading);
  font-size: 22px;
  font-weight: 800;
}
.inline-edit-field.compact {
  width: 84px;
  min-height: 30px;
  margin-left: 8px;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 800;
}
.inline-list {
  display: grid;
  gap: 8px;
}
.inline-list-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 7px;
  align-items: start;
}
.inline-remove {
  background: color-mix(in srgb, var(--theme-surface) 90%, #fee2e2);
}
.inline-add {
  justify-self: start;
  min-height: 32px;
}
.inline-save-status {
  display: inline-flex;
  width: max-content;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 850;
  margin-top: 6px;
}
.inline-save-status.error {
  background: #fee2e2;
  color: #991b1b;
}
.block.selected { outline: 3px solid color-mix(in srgb, var(--theme-primary) 35%, transparent); border-color: var(--theme-primary); }
.drag-handle {
  display: grid;
  place-items: start center;
  padding-top: 18px;
  color: var(--chrome-muted);
  background: rgba(15,23,42,.03);
  user-select: none;
  cursor: grab;
}
.block-main { min-width: 0; padding: 14px; }
.block-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.block-label {
  color: var(--theme-primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.block-toolbar { display: flex; gap: 6px; }
.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--theme-border);
  border-radius: 8px;
  background: transparent;
  color: var(--theme-text);
}

/* Holomua React polish pass */
.hm-loading-skeleton div { width: min(720px, 86vw); height: 405px; display: grid; gap: 16px; align-content: center; padding: 48px; border-radius: 10px; background: #e5e7eb; box-shadow: 0 18px 42px rgba(15,23,42,.12); }
.hm-loading-skeleton span { height: 72px; border-radius: 8px; background: linear-gradient(90deg, #f3f4f6, #d1d5db, #f3f4f6); background-size: 220% 100%; animation: hmSkeleton 1.2s ease-in-out infinite; }
@keyframes hmSkeleton { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.hm-react-shell { grid-template-rows: auto auto 1fr; }
.hm-react-topbar { grid-template-columns: minmax(260px, 1fr) auto minmax(260px, 1fr) auto; }
.hm-topbar-left, .hm-topbar-center, .hm-topbar-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hm-topbar-center { justify-content: center; }
.hm-topbar-right { justify-content: flex-end; flex-wrap: wrap; }
.hm-title { min-width: 160px; }
.hm-title:focus { border-bottom: 2px solid var(--hm-primary, #2563eb); }
.hm-mobile-editor-banner { display: none; padding: 9px 14px; background: #fff7ed; color: #9a3412; border-bottom: 1px solid #fed7aa; font: 800 13px Inter, system-ui, sans-serif; text-align: center; }
@media (max-width: 760px) { .hm-mobile-editor-banner { display: block; } .hm-react-topbar { grid-template-columns: 1fr; } .hm-topbar-center, .hm-topbar-right { justify-content: flex-start; overflow-x: auto; } }
.hm-empty-canvas { gap: 10px; text-align: center; pointer-events: none; }
.hm-empty-canvas svg { width: 220px; height: 140px; }
.hm-empty-canvas rect { fill: rgba(255,255,255,.62); stroke: color-mix(in srgb, var(--hm-primary, #2563eb) 45%, #cbd5e1); stroke-width: 3; }
.hm-empty-canvas path { fill: none; stroke: color-mix(in srgb, var(--hm-primary, #2563eb) 54%, #94a3b8); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.hm-empty-canvas path:last-child { fill: color-mix(in srgb, var(--hm-accent, #f59e0b) 70%, #fff); stroke: #111827; stroke-width: 2; }
.hm-empty-canvas div { display: flex; gap: 8px; pointer-events: auto; }
.hm-empty-canvas button { min-height: 36px; border: 1px solid color-mix(in srgb, var(--hm-primary, #2563eb) 45%, #fff); border-radius: 999px; background: #fff; color: var(--hm-primary, #2563eb); padding: 0 14px; font-weight: 900; }
.hm-guide { position: absolute; z-index: 105; pointer-events: none; background: color-mix(in srgb, var(--hm-accent, #f59e0b) 82%, transparent); box-shadow: 0 0 0 1px rgba(255,255,255,.68); }
.hm-guide.vertical { top: 0; bottom: 0; width: 1px; }
.hm-guide.horizontal { left: 0; right: 0; height: 1px; }
.hm-ai-popover { width: min(420px, calc(100vw - 36px)); display: grid; gap: 14px; border-radius: 14px; background: #fff; padding: 18px; box-shadow: 0 24px 70px rgba(15,23,42,.28); }
.hm-ai-popover label { display: grid; gap: 6px; color: #475569; font: 800 12px Inter, system-ui, sans-serif; }
.hm-ai-popover input { min-height: 40px; border: 1px solid #d1d5db; border-radius: 8px; padding: 0 10px; font: 14px Inter, system-ui, sans-serif; }
.hm-ai-popover > button { min-height: 40px; border: 0; border-radius: 8px; background: var(--hm-primary, #2563eb); color: #fff; font-weight: 900; }
.hm-skeleton-list { display: grid; gap: 10px; }
.hm-skeleton-list span { height: 52px; border-radius: 8px; background: linear-gradient(90deg, #f3f4f6, #e5e7eb, #f3f4f6); background-size: 220% 100%; animation: hmSkeleton 1.2s ease-in-out infinite; }
.hm-student-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 28px; color: color-mix(in srgb, var(--hm-text, #172033) 74%, transparent); font: 900 24px Georgia, serif; text-align: center; }
.hm-student-box { padding: 0; background: transparent; border: 0; border-radius: 0; overflow: visible; box-shadow: none; }
.hm-student-box.text { background: transparent; color: #2d2618; border: 0; }
.hm-student-box.text .hm-rich-text { padding: 0; font-family: Georgia, "Times New Roman", serif; line-height: 1.62; text-shadow: 0 1px 2px rgba(255,255,255,.65); }
.hm-student-box.image { padding: 0; background: transparent; box-shadow: none; }
.hm-student-box.image img { object-fit: cover; }
.hm-student-box.video { background: transparent; box-shadow: none; }
.hm-student-box.video .hm-content-video { display: block; background: #050510; }
.hm-student-box.primary_source { background: transparent; border: 0; }
.hm-student-box.primary_source .hm-primary-source { background: #f4e4bc; }
.hm-student-box.question_mc { background: transparent; border: 0; }
.hm-student-box.question_mc .hm-mc-content { gap: 0; }
.hm-student-box.question_mc .hm-mc-content > strong { margin: 0; padding: 14px 16px; background: var(--hm-primary, #2563eb); color: #fff; font: 900 17px/1.25 Inter, system-ui, sans-serif; }
.hm-student-box.question_mc .hm-mc-content > div, .hm-student-box.question_mc .hm-mc-content > span { margin: 12px 0; }
.hm-student-box.question_short { background: transparent; border: 0; }
.hm-student-box.question_short .hm-short-content { padding: 12px; }
.hm-student-box.question_short textarea:focus { outline: 3px solid color-mix(in srgb, var(--hm-primary, #2563eb) 28%, transparent); border-color: var(--hm-primary, #2563eb); }
.hm-student-box.timeline { background: transparent; box-shadow: none; }
.hm-student-box.timeline .hm-timeline-content { position: relative; padding: 18px 10px 20px; }
.hm-student-box.timeline .hm-timeline-content::before { content: ""; position: absolute; left: 18px; right: 18px; top: 42px; height: 4px; border-radius: 999px; background: var(--hm-accent, #f59e0b); }
.hm-student-box.timeline .hm-timeline-content button { position: relative; z-index: 1; background: #fff; box-shadow: 0 10px 22px rgba(15,23,42,.14); }
.hm-student-box.map { background: #1a1a2e; }
.hm-student-box.map .hm-map-content img, .hm-student-box.map .hm-map-content iframe { object-fit: cover; }
.hm-student-box.map .hm-map-caption { background: rgba(17,24,39,.86); color: #fff; }
.hm-student-box.graph_table { background: transparent; border: 0; }
.hm-student-box.graph_table .hm-table-content { padding: 12px; }
.hm-student-box.graph_table .hm-table-content th { background: var(--hm-primary, #2563eb); color: #fff; }
.hm-student-box.link { display: grid; place-items: center; background: transparent; border: 0; }
.hm-student-box.link .hm-link-cta { width: min(100%, 320px); min-height: 52px; padding: 0 18px; box-shadow: 0 12px 28px rgba(0,0,0,.20); }
.library-empty { display: grid; justify-items: center; gap: 12px; }
.library-empty button { min-height: 42px; border: 0; border-radius: 8px; background: var(--theme-primary, #2563eb); color: #fff; padding: 0 18px; font-weight: 900; }
.block input[type="text"], .block input[type="url"], .block textarea, .block select {
  width: 100%;
  border: 1px solid var(--theme-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--theme-surface) 92%, var(--theme-background));
  color: var(--theme-text);
  padding: 10px 12px;
}
.block textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.question-input { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.student-question {
  margin: 0 0 12px;
  color: var(--theme-primary);
  font-family: var(--theme-heading);
  font-size: 21px;
  letter-spacing: 0;
}
.student-options {
  display: grid;
  gap: 8px;
}
.option-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.option-row input[type="radio"] { accent-color: #16a34a; }
.option-row.correct input[type="text"] { border-color: #16a34a; box-shadow: inset 4px 0 0 #16a34a; }
.inline-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.video-preview {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  border: 1px solid var(--theme-border);
  border-radius: 8px;
  background: #111827;
  overflow: hidden;
  color: #fff;
}
.video-preview img, .video-preview iframe { width: 100%; height: 100%; border: 0; object-fit: cover; }
.student-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--theme-primary);
  border-radius: 8px;
  background: var(--theme-primary);
  color: var(--theme-surface);
  padding: 0 16px;
  font-weight: 800;
  text-decoration: none;
}
.add-bottom { width: 100%; margin-top: 16px; background: var(--theme-surface); color: var(--theme-primary); border-color: var(--theme-border); }

.settings-stack { display: grid; gap: 10px; }
.settings-stack label, .activity-settings label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}
.settings-stack input, .activity-settings input, .activity-settings select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--chrome-border);
  border-radius: 8px;
  background: #fff;
  color: #111827;
  padding: 0 9px;
}
.toggle-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}
.toggle-row input { width: 42px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.chip {
  min-height: 32px;
  border: 1px solid var(--chrome-border);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  padding: 0 10px;
  font-weight: 800;
}
.chip.on { background: #111827; border-color: #111827; color: #fff; }
.theme-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.theme-card {
  min-height: 68px;
  border: 1px solid var(--chrome-border);
  border-radius: 8px;
  background: #fff;
  color: #111827;
  padding: 8px;
  text-align: left;
}
.theme-card.active { outline: 2px solid #111827; }
.theme-swatches { display: flex; gap: 4px; margin-bottom: 8px; }
.theme-swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); }
.custom-theme summary { cursor: pointer; margin: 12px 0 8px; color: #334155; font-weight: 800; }
.custom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.custom-grid label { display: grid; gap: 4px; color: #334155; font-size: 12px; font-weight: 700; }
.span-2 { grid-column: span 2; }

.library-view, .my-assignments-view, .view-library, .view-assignments {
  background: #f3f4f6;
}
.library-view .holomua-shell,
.my-assignments-view .holomua-shell,
.view-library .holomua-shell,
.view-assignments .holomua-shell {
  display: block;
}
.library-shell, .assignments-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 22px 18px 48px;
}
.library-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.library-top h1 {
  margin: 4px 0 0;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}
.eyebrow {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.library-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.library-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--chrome-border);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 18px;
}
.library-filters label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}
.library-filters select {
  min-height: 38px;
  border: 1px solid var(--chrome-border);
  border-radius: 8px;
  padding: 0 10px;
  background: #f8fafc;
  color: #111827;
}
.unit-list, .assignment-groups {
  display: grid;
  gap: 18px;
}
.unit-group h2, .assignment-group h2 {
  margin: 0 0 8px;
  color: #334155;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.library-grid {
  display: grid;
  gap: 10px;
}
.library-card, .assignment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--chrome-border);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}
.library-card-main, .assignment-card {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.card-title {
  color: #111827;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.25;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
  color: #64748b;
  font-size: 13px;
}
.card-meta span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0 8px;
  background: #f8fafc;
}
.card-side {
  display: grid;
  justify-items: end;
  gap: 7px;
  min-width: 150px;
}
.status-pill {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
  text-transform: capitalize;
}
.status-pill.published, .status-pill.submitted { background: #dcfce7; color: #166534; }
.status-pill.scheduled, .status-pill.upcoming { background: #dbeafe; color: #1e40af; }
.status-pill.closed, .status-pill.missing { background: #fee2e2; color: #991b1b; }
.submission-count {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.close-activity {
  width: auto;
  min-height: 32px;
}
.empty-state {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  padding: 18px;
  text-align: center;
}
.assignment-card {
  margin-bottom: 10px;
}
.assignment-card.overdue {
  border-color: #fca5a5;
  box-shadow: inset 4px 0 0 #ef4444;
}
.assignment-due {
  display: grid;
  justify-items: end;
  gap: 7px;
  color: #334155;
}
.assignment-due strong {
  color: #111827;
  font-size: 13px;
}

/* Activity Library redesign */
body.view-library,
body:not(.student-view) {
  --library-bg: #f6f0e5;
}
.library-shell {
  min-height: 100vh;
  max-width: 1220px;
  margin: 0 auto;
  padding: 34px clamp(18px, 4vw, 48px) 54px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.74), rgba(255,255,255,.36)),
    radial-gradient(circle at 20% 0, rgba(200,148,44,.18), transparent 32%),
    #f7f1e8;
}
.library-hero {
  display: grid;
  gap: 20px;
  margin-bottom: 18px;
}
.library-brand-row,
.library-title-row,
.library-filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.library-wordmark {
  color: #16324f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.library-title-row h1 {
  margin: 0;
  color: #2f261b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: 0;
}
.library-title-row p {
  margin: 8px 0 0;
  color: #776b5e;
  font-size: 15px;
}
.library-new-button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: #16324f;
  color: #fff;
  font-weight: 850;
  box-shadow: 0 14px 28px rgba(22, 50, 79, .22);
}
.library-search {
  display: grid;
  gap: 7px;
  max-width: 620px;
  color: #776b5e;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.library-search input {
  min-height: 46px;
  border: 1px solid #d8c7a4;
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  color: #2f261b;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 650;
  box-shadow: 0 10px 24px rgba(47, 38, 27, .06);
}
.library-filter-panel {
  display: grid;
  gap: 12px;
  margin: 18px 0 28px;
  border: 1px solid rgba(216, 199, 164, .86);
  border-radius: 8px;
  background: rgba(255,250,240,.82);
  padding: 14px;
  box-shadow: 0 12px 32px rgba(47, 38, 27, .07);
}
.library-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.library-filter-label {
  min-width: 54px;
  color: #776b5e;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.library-pill,
.library-view-toggle button,
.library-create-toggle button,
.library-create-pills button,
.library-theme-picker button {
  min-height: 34px;
  border: 1px solid #d8c7a4;
  border-radius: 999px;
  background: #fffaf0;
  color: #3f3529;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
}
.library-pill.active,
.library-view-toggle button.active,
.library-create-toggle button.active,
.library-create-pills button.active,
.library-theme-picker button.active {
  background: #16324f;
  border-color: #16324f;
  color: #fff;
}
.library-filter-count {
  color: #776b5e;
  font-size: 13px;
  font-weight: 800;
}
.library-view-toggle {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: #efe4cf;
}
.unit-list {
  display: grid;
  gap: 28px;
}
.unit-group {
  display: grid;
  gap: 14px;
}
.unit-group-header {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-left: 5px solid var(--unit-color, #16324f);
  border-radius: 0;
  background: transparent;
  color: #2f261b;
  padding: 0 0 0 13px;
  text-align: left;
}
.unit-group-header span {
  font-size: 18px;
  font-weight: 850;
}
.unit-group-header em {
  color: #776b5e;
  font-size: 13px;
  font-style: normal;
  font-weight: 750;
}
.unit-group.collapsed .library-grid {
  display: none;
}
.unit-group.collapsed .unit-group-header span::before {
  content: "+ ";
  color: var(--unit-color, #16324f);
}
.library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.library-grid.list-view {
  grid-template-columns: 1fr;
}
.library-card {
  min-height: 200px;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(216, 199, 164, .82);
  border-radius: 8px;
  background: #fffaf0;
  padding: 0;
  box-shadow: 0 14px 32px rgba(47, 38, 27, .09);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.library-card:hover {
  transform: translateY(-4px);
  border-color: rgba(22, 50, 79, .32);
  box-shadow: 0 22px 44px rgba(47, 38, 27, .15);
}
.library-card-main {
  display: grid;
  grid-template-rows: minmax(118px, 3fr) minmax(82px, 2fr);
  min-height: 200px;
  color: inherit;
  text-decoration: none;
}
.library-card-band {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.library-card-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,.16), transparent 42%),
    radial-gradient(circle at 84% 18%, rgba(255,255,255,.22), transparent 18%);
}
.library-card-unit-mark {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 1;
  max-width: calc(100% - 28px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,.92);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.library-card-body {
  display: grid;
  gap: 8px;
  align-content: start;
  background: #fffdf7;
  padding: 13px 14px 14px;
}
.library-grid.list-view .library-card-main {
  grid-template-columns: 190px 1fr;
  grid-template-rows: 1fr;
  min-height: 142px;
}
.library-grid.list-view .library-card {
  min-height: 142px;
}
.card-title {
  color: #2f261b;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.25;
}
.library-card-details,
.library-card-bottom,
.period-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}
.library-card-bottom {
  justify-content: space-between;
  color: #776b5e;
}
.unit-tag {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--unit-accent, #c8942c) 22%, white);
  color: #3f3529;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 850;
}
.period-dot {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #efe4cf;
  color: #493c2d;
  font-size: 10px;
  font-weight: 900;
}
.muted-dot {
  color: transparent;
}
.status-pill.draft {
  background: #fef3c7;
  color: #92400e;
}
.status-pill.published, .status-pill.submitted {
  background: #dcfce7;
  color: #166534;
}
.status-pill.scheduled, .status-pill.upcoming {
  background: #dbeafe;
  color: #1e40af;
}
.status-pill.closed, .status-pill.missing {
  background: #fee2e2;
  color: #991b1b;
}
.submission-count {
  color: #776b5e;
  font-size: 12px;
  font-weight: 750;
}
.library-empty {
  min-height: 330px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 1px dashed #d8c7a4;
  border-radius: 8px;
  background: rgba(255,250,240,.8);
  color: #776b5e;
  padding: 30px;
}
.library-empty strong {
  color: #2f261b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}
.library-empty p {
  margin: 0;
}
.library-empty-art {
  width: 180px;
  height: auto;
}
.library-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(22, 32, 45, .42);
  padding: 20px;
}
.library-modal {
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  border-radius: 8px;
  background: #fffdf7;
  padding: 20px;
  box-shadow: 0 30px 80px rgba(17, 24, 39, .32);
}
.library-modal-head,
.library-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.library-modal h2 {
  margin: 0;
  color: #2f261b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
}
.modal-field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: #5f5346;
  font-size: 13px;
  font-weight: 850;
}
.modal-field input {
  min-height: 42px;
  border: 1px solid #d8c7a4;
  border-radius: 8px;
  background: #fff;
  color: #2f261b;
  padding: 0 12px;
}
.library-create-toggle,
.library-create-pills,
.library-theme-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.library-theme-picker button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.library-theme-picker button span {
  width: 13px;
  height: 13px;
  border-radius: 999px;
}
.library-modal-actions {
  margin-top: 20px;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .library-brand-row,
  .library-title-row,
  .library-filter-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .library-grid,
  .library-grid.list-view {
    grid-template-columns: 1fr;
  }
  .library-grid.list-view .library-card-main {
    grid-template-columns: 1fr;
  }
}

.student-only { display: none; }
.student-theme-menu {
  position: fixed;
  right: 18px;
  top: 64px;
  z-index: 50;
  width: 220px;
  border: 1px solid var(--theme-border);
  border-radius: 8px;
  background: var(--theme-surface);
  padding: 8px;
  box-shadow: var(--shadow);
}
.student-theme-menu button { width: 100%; margin: 4px 0; text-align: left; }

body.student-view {
  background: var(--theme-background);
  background-image: var(--theme-background-image, none);
}
body.student-view .edit-chrome { display: none !important; }
body.student-view .student-only { display: block; }
body.student-view .holomua-shell { display: block; min-height: 100vh; }
body.student-view .workspace { display: block; min-height: 100vh; }
body.student-view .canvas-wrap { min-height: 100vh; padding: 24px clamp(16px, 3vw, 38px) 48px; overflow: auto; }
body.student-view .activity-canvas { width: min(1440px, 100%); max-width: none; }
body.student-view .activity-header { box-shadow: none; border-color: color-mix(in srgb, var(--theme-border) 70%, transparent); }
body.student-view .blocks.canvas-grid { min-height: calc(100vh - 240px); }
body.student-view .block { grid-template-columns: minmax(0, 1fr); }
body.student-view .block:not(.canvas-panel) { display: block; box-shadow: none; }
body.student-view .block.selected { outline: none; border-color: var(--theme-border); }
body.student-view .drag-handle, body.student-view .block-top { display: none; }
body.student-view .block-main { padding: 20px; }
body.student-view .reading-text { font-family: Georgia, "Times New Roman", serif; font-size: 20px; line-height: 1.75; white-space: pre-wrap; }
body.student-view input[readonly], body.student-view textarea[readonly] { border-color: transparent; background: transparent; padding-left: 0; }
.student-palette {
  position: fixed;
  right: 16px;
  top: 16px;
  z-index: 40;
  width: 44px;
  height: 44px;
  overflow: hidden;
  text-indent: 80px;
  border: 1px solid var(--theme-border);
  border-radius: 999px;
  background: conic-gradient(#ef4444, #f59e0b, #22c55e, #3b82f6, #a855f7, #ef4444);
}

/* Holomua learning canvas refresh */
.theme-top-button {
  width: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: 50%;
}
.theme-section {
  display: none;
}
.theme-popover {
  top: 58px;
  right: 16px;
}
.block-button-group {
  display: grid;
  gap: 6px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #eef2f7;
}
.block-group-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.block-type-button {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 8px;
  border-color: transparent;
  background: transparent;
}
.block-type-button:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
}
.block-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #eaf2ff;
  color: #1d4ed8;
  font-weight: 850;
}
.right-inspector .inspector-section:first-child h2 {
  display: none;
}
.settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.switch-row {
  min-height: 42px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}
.switch-row input[type="checkbox"] {
  appearance: none;
  width: 42px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #cbd5e1;
  padding: 2px;
}
.switch-row input[type="checkbox"]::after {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform .16s ease;
}
.switch-row input[type="checkbox"]:checked {
  background: var(--theme-primary);
}
.switch-row input[type="checkbox"]:checked::after {
  transform: translateX(18px);
}
body.edit-view .block {
  border-color: #e5e7eb;
  box-shadow: 0 2px 12px rgba(15, 23, 42, .06);
}
body.edit-view .block-main {
  padding: 18px;
}
body.edit-view .block-label {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  padding: 0 8px;
  font-size: 10px;
}
body.edit-view .block.editing {
  border-color: color-mix(in srgb, var(--theme-primary) 52%, #e5e7eb);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-primary) 12%, transparent), 0 2px 12px rgba(15,23,42,.08);
}
.block-save-status {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 850;
}
body.student-view {
  background: #faf9f6;
  color: #2d2d2d;
}
body.student-view .canvas-wrap {
  background: #faf9f6;
  background-image: none;
}
body.student-view .activity-canvas {
  width: min(1240px, 100%);
}
body.student-view .activity-header {
  padding: 18px 0 22px;
  border: 0;
  border-top: 5px solid var(--theme-primary);
  border-radius: 0;
  background: transparent;
}
body.student-view .activity-title {
  color: #252525;
  font-family: var(--theme-heading);
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.02;
  text-align: left;
}
body.student-view .activity-meta input {
  min-height: 24px;
  border: 0;
  background: transparent;
  color: #6b7280;
  padding: 0;
}
body.student-view .blocks.canvas-grid {
  grid-auto-rows: auto;
  align-items: start;
  min-height: 0;
  gap: 18px;
}
body.student-view .canvas-panel {
  grid-row: auto !important;
  border: 1px solid rgba(45,45,45,.08);
  border-radius: 12px;
  background: color-mix(in srgb, var(--theme-surface) 92%, #faf9f6);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
body.student-view .canvas-panel .block-main {
  padding: 28px;
  overflow: visible;
}
body.student-view .scenario-panel p,
body.student-view .perspective-card p,
body.student-view .map-card p,
body.student-view .timeline-card p,
body.student-view .generic-content p {
  color: #2d2d2d;
  font-size: 17px;
  line-height: 1.7;
}
body.student-view .scenario-panel .panel-kicker {
  display: none;
}
body.student-view .scenario-panel p {
  margin: 0;
  font-size: 22px;
}
body.student-view .perspective-card h3,
body.student-view .map-card h3,
body.student-view .timeline-card h3,
body.student-view .generic-content h3 {
  margin: 0 0 12px;
  color: #252525;
  font-family: var(--theme-heading);
  font-size: 24px;
}
body.student-view .canvas-panel.interactive {
  background: color-mix(in srgb, var(--theme-accent) 9%, #fff);
}
body.student-view .reflection-list label {
  color: #2d2d2d;
  font-size: 17px;
}
body.student-view .student-options .inline-row {
  min-height: 48px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
}
body.student-view .student-options .inline-row:has(input:checked) {
  border-color: var(--theme-primary);
  background: color-mix(in srgb, var(--theme-primary) 10%, #fff);
}
body.student-view textarea {
  min-height: 120px;
  border: 1px solid #d6d3ce;
  border-radius: 10px;
  background: #fff;
  color: #2d2d2d;
  padding: 12px;
  font-size: 17px;
}
body.student-view .student-link {
  min-height: 44px;
  border-radius: 10px;
}

@media (max-width: 980px) {
  .workspace { grid-template-columns: 1fr; }
  .left-sidebar, .right-inspector {
    min-height: auto;
    border: 0;
    border-bottom: 1px solid var(--chrome-border);
  }
  .left-sidebar { order: 1; }
  .canvas-wrap { order: 2; padding: 18px; }
  .right-inspector { order: 3; }
  .block-button-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .holomua-shell { grid-template-rows: auto 1fr; }
  .topbar { grid-template-columns: 1fr; align-items: stretch; }
  .top-actions { flex-wrap: wrap; }
  .top-nav, .library-actions { width: 100%; }
  .top-nav a, .library-actions > * { flex: 1; }
  .segmented { width: 100%; }
  .library-top, .library-card, .assignment-card { grid-template-columns: 1fr; align-items: stretch; }
  .library-filters { grid-template-columns: 1fr; }
  .card-side, .assignment-due { justify-items: start; }
  .workspace { min-height: auto; }
  .activity-meta { display: grid; }
  .activity-meta input { width: 100%; }
  .block { grid-template-columns: 24px minmax(0, 1fr); }
  .blocks.canvas-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    min-height: 0;
  }
  .blocks.canvas-grid .canvas-panel {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    min-height: 220px;
  }
  .canvas-wrap { min-height: auto; }
}
