:root {
  color: #182026;
  background: #f5f7fa;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  --edugeo-app-bg: #eef3f8;
  --edugeo-panel-bg: #ffffff;
  --edugeo-panel-muted: #f8fafc;
  --edugeo-border: #d7dee7;
  --edugeo-board-surround: #e8eef5;
  --edugeo-text: #182026;
  --edugeo-muted: #64748b;
  --edugeo-accent: #2563eb;
  --edugeo-control-height: 40px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.editor-body {
  background: var(--edugeo-app-bg);
  color: var(--edugeo-text);
  overflow: hidden;
}

.editor-app {
  display: grid;
  grid-template-rows: 40px auto minmax(0, 1fr) 48px 30px;
  height: 100vh;
  min-width: 980px;
}

.presentation-controls {
  display: none;
}

.editor-app.is-presentation-mode {
  background: #101820;
  grid-template-rows: 58px minmax(0, 1fr) 32px;
  min-width: 0;
}

.editor-app.is-presentation-mode .editor-menubar,
.editor-app.is-presentation-mode .geometry-toolbar,
.editor-app.is-presentation-mode .object-panel,
.editor-app.is-presentation-mode .property-panel,
.editor-app.is-presentation-mode .command-bar {
  display: none;
}

.editor-app.is-presentation-mode .presentation-controls {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #d7dee7;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 8px 16px;
  grid-row: 1;
}

.presentation-controls strong {
  font-size: 16px;
}

.presentation-controls > div {
  display: flex;
  gap: 8px;
}

.construction-player-panel {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  border-top: 3px solid #60a5fa;
  bottom: 28px;
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.28);
  color: #fff;
  display: grid;
  gap: 10px;
  left: 0;
  padding: 12px 18px 14px;
  position: fixed;
  right: 0;
  z-index: 1500;
}

.construction-player-panel[hidden] {
  display: none;
}

.construction-player-heading,
.construction-player-controls {
  align-items: center;
  display: flex;
  gap: 10px;
}

.construction-player-heading strong {
  flex: 1 1 auto;
  font-size: 17px;
  min-width: 0;
}

.construction-player-mode {
  background: #fbbf24;
  border-radius: 999px;
  color: #422006;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
}

.construction-player-controls button,
.construction-player-controls select {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  min-height: 44px;
  padding: 8px 13px;
}

.construction-player-controls button {
  background: #fff;
  color: #172554;
  cursor: pointer;
  font-weight: 750;
}

.construction-player-controls button:disabled {
  cursor: default;
  opacity: 0.42;
}

.construction-player-controls label {
  align-items: center;
  display: flex;
  font-size: 12px;
  gap: 6px;
}

.construction-player-step-picker {
  flex: 1 1 260px;
  min-width: 180px;
}

.construction-player-step-picker select {
  max-width: 420px;
  min-width: 0;
  width: 100%;
}

.construction-player-controls .construction-player-exit {
  background: #fef2f2;
  color: #991b1b;
}

.construction-player-progress {
  accent-color: #fbbf24;
  cursor: pointer;
  height: 24px;
  width: 100%;
}

.custom-tool-list {
  display: contents;
}

.custom-tool-empty {
  color: #94a3b8;
  font-size: 12px;
  padding: 8px 10px;
}

.custom-tool-button {
  border-color: #a7f3d0 !important;
  color: #065f46 !important;
}

.custom-tool-editor {
  align-items: center;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 1700;
}

.custom-tool-editor[hidden] {
  display: none;
}

.custom-tool-editor-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.35);
  display: grid;
  gap: 14px;
  max-height: min(760px, 90vh);
  max-width: 760px;
  overflow: auto;
  padding: 22px;
  width: min(760px, 94vw);
}

.custom-tool-editor-card header,
.custom-tool-editor-card footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.custom-tool-editor-card h2 {
  margin: 2px 0 0;
}

.custom-tool-editor-card > label {
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

.custom-tool-editor-card input[type="text"] {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  min-height: 44px;
  padding: 9px 11px;
}

.custom-tool-choice-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.custom-tool-choice-grid fieldset {
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  margin: 0;
  min-width: 0;
  padding: 12px;
}

.custom-tool-choice-list {
  display: grid;
  gap: 7px;
  max-height: 260px;
  overflow: auto;
}

.custom-tool-choice-list label {
  align-items: center;
  background: #f8fafc;
  border-radius: 7px;
  display: flex;
  gap: 8px;
  min-height: 40px;
  padding: 6px 9px;
}

.custom-tool-editor-card button {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  min-height: 44px;
  padding: 8px 14px;
}

.custom-tool-editor-card .custom-tool-primary {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.demo-component-library {
  align-items: center;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 1680;
}

.demo-component-library[hidden] {
  display: none;
}

.demo-library-dialog {
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
  display: grid;
  gap: 18px;
  max-height: 90vh;
  max-width: 1040px;
  overflow: auto;
  padding: 24px;
  width: min(1040px, 95vw);
}

.demo-library-dialog header,
.demo-library-dialog footer {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.demo-library-dialog h2 {
  color: #0f172a;
  font-size: 24px;
  margin: 3px 0 4px;
}

.demo-library-dialog p {
  color: #64748b;
  margin: 0;
}

.demo-library-eyebrow {
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-library-dialog button {
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  min-height: 44px;
  padding: 8px 14px;
}

.demo-library-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.demo-library-card {
  align-content: start;
  background: #fff;
  border: 1px solid #dbe4ef !important;
  color: #334155;
  display: grid;
  gap: 7px;
  min-height: 158px;
  padding: 15px !important;
  text-align: left;
}

.demo-library-card:hover {
  border-color: #60a5fa !important;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.demo-library-card strong {
  color: #0f172a;
  font-size: 16px;
}

.demo-library-card small {
  color: #64748b;
  line-height: 1.55;
}

.demo-library-card em,
.demo-library-category {
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.demo-library-category {
  color: #2563eb;
}

.demo-library-card em {
  align-self: end;
  color: #a16207;
}

.demo-library-dialog footer {
  align-items: center;
}

.demo-library-dialog output {
  color: #1d4ed8;
  font-weight: 700;
}

.about-edugeo-dialog {
  max-width: 680px;
  width: min(680px, 95vw);
}

.about-edugeo-meta {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.about-edugeo-meta div {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
}

.about-edugeo-meta span,
.about-edugeo-technology,
.about-edugeo-dialog footer small {
  color: #64748b;
  font-size: 12px;
}

.about-edugeo-meta strong {
  color: #0f172a;
}

.about-edugeo-features,
.about-edugeo-technology {
  line-height: 1.7;
}

.status-version {
  color: #64748b;
  font-size: 11px;
  margin-left: 10px;
}

@media (max-width: 820px) {
  .demo-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .demo-library-grid {
    grid-template-columns: 1fr;
  }

  .about-edugeo-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .custom-tool-choice-grid {
    grid-template-columns: 1fr;
  }
}

.editor-app.is-construction-playback-mode .geometry-toolbar,
.editor-app.is-construction-playback-mode .editor-menubar,
.editor-app.is-construction-playback-mode .command-bar,
.editor-app.is-construction-playback-mode .board-frame {
  pointer-events: none;
  user-select: none;
}

.editor-app.is-construction-playback-mode .geometry-toolbar,
.editor-app.is-construction-playback-mode .command-bar {
  opacity: 0.5;
}

@media (max-width: 900px) {
  .construction-player-controls {
    flex-wrap: wrap;
  }

  .construction-player-step-picker {
    flex-basis: 100%;
  }

  .construction-player-heading strong {
    font-size: 14px;
  }
}

.editor-app.is-presentation-mode .editor-workspace,
.editor-app.is-presentation-mode.is-left-collapsed .editor-workspace,
.editor-app.is-presentation-mode.is-right-collapsed .editor-workspace,
.editor-app.is-presentation-mode.is-left-collapsed.is-right-collapsed .editor-workspace {
  grid-template-columns: minmax(0, 1fr);
  grid-row: 2;
}

.editor-app.is-presentation-mode .board-center {
  background: #101820;
  padding: 14px;
}

.editor-app.is-presentation-mode .board-frame {
  min-height: 0;
}

.editor-app.is-presentation-mode .status-bar {
  font-size: 14px;
  grid-row: 3;
}

.editor-app:fullscreen,
.editor-app:-webkit-full-screen {
  height: 100vh;
  width: 100vw;
}

.editor-menubar {
  align-items: center;
  background: var(--edugeo-panel-bg);
  border-bottom: 1px solid var(--edugeo-border);
  display: flex;
  gap: 22px;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 20;
}

.editor-brand {
  align-items: baseline;
  display: flex;
  gap: 10px;
  white-space: nowrap;
}

.editor-brand strong {
  font-size: 17px;
}

.editor-brand span {
  color: #64748b;
  font-size: 13px;
}

.menu-cluster {
  align-items: stretch;
  display: flex;
  height: 100%;
}

.menu-item {
  position: relative;
}

.menu-item > button {
  background: transparent;
  border: 0;
  border-radius: 0;
  height: 100%;
  padding: 0 12px;
}

.menu-item > button:hover,
.menu-item:focus-within > button,
.menu-item:hover > button {
  background: #f1f5f9;
}

.menu-popover {
  background: var(--edugeo-panel-bg);
  border: 1px solid var(--edugeo-border);
  border-radius: 8px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
  display: none;
  min-width: 190px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: 38px;
  z-index: 40;
}

.menu-item:hover .menu-popover,
.menu-item:focus-within .menu-popover {
  display: grid;
}

.menu-popover button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  text-align: left;
}

.menu-popover button:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.menu-popover button.is-active {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
}

.menu-popover button.is-active::after {
  content: "✓";
  float: right;
}

.menu-section-label {
  color: var(--edugeo-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px 3px;
}

.command-help-examples {
  color: #334155;
  font-size: 12px;
  line-height: 1.65;
  min-width: 330px;
  padding: 4px 10px 8px;
}

.command-help-examples small {
  color: var(--edugeo-muted);
  display: block;
  line-height: 1.45;
  margin-top: 5px;
}

.menu-separator {
  border-top: 1px solid var(--edugeo-border);
  margin: 5px 3px;
}

.menu-popover button:disabled {
  color: #94a3b8;
  cursor: default;
}

.menu-shortcut {
  color: #94a3b8;
  float: right;
  font-size: 11px;
  margin-left: 18px;
}

.edu-geo-context-menu {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.2);
  display: grid;
  min-width: 176px;
  padding: 5px;
  position: fixed;
  z-index: 1000;
}

.edu-geo-context-menu[hidden] {
  display: none;
}

.edu-geo-context-menu button {
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #1e293b;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}

.edu-geo-context-menu button:hover,
.edu-geo-context-menu button:focus-visible {
  background: #eff6ff;
  color: #1d4ed8;
  outline: 0;
}

.edu-geo-context-menu button.is-danger {
  color: #b42318;
}

.edu-geo-context-menu button.is-danger:hover,
.edu-geo-context-menu button.is-danger:focus-visible {
  background: #fff1f2;
  color: #be123c;
}

.edu-geo-context-separator {
  border-top: 1px solid #e2e8f0;
  margin: 4px 2px;
}

.geometry-toolbar {
  align-items: stretch;
  background: #f8fafc;
  border-bottom: 1px solid #d7dee7;
  display: flex;
  gap: 0;
  min-height: 86px;
  overflow-x: auto;
  padding: 8px 10px;
}

.toolbar-group {
  align-content: flex-start;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 112px;
  padding: 0 10px;
}

.toolbar-group:first-child {
  padding-left: 0;
}

.toolbar-group > summary > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.toolbar-group button,
.toolbar-group a {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #182026;
  font-size: 13px;
  min-height: 30px;
  padding: 5px 9px;
  text-decoration: none;
}

.toolbar-group button:hover,
.toolbar-group a:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.toolbar-group button.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.toolbar-group button:disabled {
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.72;
}

.toolbar-group .danger-button {
  color: #b42318;
}

.toolbar-group .danger-button.is-active {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.geometry-toolbar details.toolbar-group {
  overflow: visible;
  padding: 0;
}

.toolbar-group summary {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e1ec;
  border-radius: 7px;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  min-height: 32px;
  padding: 6px 9px;
  user-select: none;
}

.toolbar-group summary::marker {
  color: #64748b;
}

.toolbar-group[open] summary {
  background: #eef6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.toolbar-menu {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 6px;
}

.toolbar-menu button,
.toolbar-menu a {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  max-width: 180px;
}

.tool-icon {
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #dbe4ee;
  border-radius: 5px;
  color: #0f172a;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  height: 22px;
  justify-content: center;
  line-height: 1;
  min-width: 22px;
  padding: 0 4px;
}

.toolbar-menu button:hover .tool-icon,
.toolbar-menu button.is-active .tool-icon {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
  color: inherit;
}

.toolbar-menu button[data-tool="image"] {
  color: #64748b;
}

.editor-workspace {
  display: grid;
  gap: 0;
  grid-template-columns: 280px minmax(0, 1fr) 320px;
  min-height: 0;
}

.editor-app.is-left-collapsed .editor-workspace {
  grid-template-columns: 0 minmax(0, 1fr) 320px;
}

.editor-app.is-right-collapsed .editor-workspace {
  grid-template-columns: 280px minmax(0, 1fr) 0;
}

.editor-app.is-left-collapsed.is-right-collapsed .editor-workspace {
  grid-template-columns: 0 minmax(0, 1fr) 0;
}

.object-panel,
.property-panel {
  background: var(--edugeo-panel-bg);
  border-right: 1px solid var(--edugeo-border);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.property-panel {
  border-left: 1px solid var(--edugeo-border);
  border-right: 0;
}

.editor-app.is-left-collapsed .object-panel,
.editor-app.is-right-collapsed .property-panel {
  visibility: hidden;
}

.panel-header {
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 12px;
}

.panel-header h2 {
  font-size: 15px;
  margin: 0;
}

.panel-header p {
  color: #64748b;
  font-size: 12px;
  margin: 3px 0 0;
}

.panel-toggle {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  padding: 0;
  width: 30px;
}

.board-center {
  background: var(--edugeo-board-surround);
  min-height: 0;
  padding: 10px;
}

.editor-app[data-theme="classroom"] {
  --edugeo-app-bg: #dbe4ee;
  --edugeo-panel-bg: #ffffff;
  --edugeo-panel-muted: #f1f5f9;
  --edugeo-border: #94a3b8;
  --edugeo-board-surround: #cbd5e1;
  --edugeo-text: #0f172a;
  --edugeo-muted: #334155;
  --edugeo-accent: #dc2626;
  grid-template-rows: 48px auto minmax(0, 1fr) 52px 34px;
}

.editor-app[data-theme="classroom"] .editor-brand strong {
  font-size: 20px;
}

.editor-app[data-theme="classroom"] .toolbar-menu button,
.editor-app[data-theme="classroom"] .menu-item > button,
.editor-app[data-theme="classroom"] .property-editor {
  font-size: 15px;
}

.editor-app[data-theme="classroom"] .board-frame .edu-geo-jxg-board {
  box-shadow: 0 0 0 2px #64748b, 0 16px 30px rgba(15, 23, 42, 0.16);
}

.editor-app[data-theme="compact"] {
  --edugeo-app-bg: #eef2f3;
  --edugeo-panel-bg: #fbfdfc;
  --edugeo-panel-muted: #f1f5f4;
  --edugeo-border: #cbd5d1;
  --edugeo-board-surround: #e2e8e6;
  --edugeo-text: #1f2933;
  --edugeo-muted: #52616b;
  --edugeo-accent: #0f766e;
  grid-template-rows: 34px auto minmax(0, 1fr) 40px 26px;
}

.editor-app[data-theme="compact"] .editor-workspace {
  grid-template-columns: 240px minmax(0, 1fr) 280px;
}

.editor-app[data-theme="compact"].is-left-collapsed .editor-workspace {
  grid-template-columns: 0 minmax(0, 1fr) 280px;
}

.editor-app[data-theme="compact"].is-right-collapsed .editor-workspace {
  grid-template-columns: 240px minmax(0, 1fr) 0;
}

.editor-app[data-theme="compact"] .panel-header {
  min-height: 46px;
  padding: 7px 9px;
}

.editor-app[data-theme="compact"] .property-section {
  gap: 7px;
  padding: 9px;
}

.editor-app[data-theme="compact"] .toolbar-menu button {
  min-height: 30px;
  padding: 4px 7px;
}

.board-frame {
  height: 100%;
  min-height: 380px;
  width: 100%;
}

.board-frame .editor-board,
.board-frame .edu-geo-jxg-board {
  height: 100%;
  width: 100%;
}

.property-panel {
  overflow-y: auto;
}

.property-empty {
  align-items: center;
  color: #64748b;
  display: flex;
  flex-direction: column;
  gap: 7px;
  justify-content: center;
  min-height: 180px;
  padding: 24px;
  text-align: center;
}

.property-empty strong {
  color: #334155;
  font-size: 14px;
}

.property-empty span {
  font-size: 12px;
  line-height: 1.55;
}

.property-editor[hidden],
.property-empty[hidden],
.property-section[hidden],
.property-kind[hidden] {
  display: none;
}

.property-section {
  border-bottom: 1px solid #e2e8f0;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.property-section h3 {
  font-size: 14px;
  margin: 0;
}

.property-section label {
  color: #475569;
  display: grid;
  font-size: 13px;
  gap: 5px;
}

.property-section input,
.property-section textarea,
.property-section select {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #1e293b;
  font: inherit;
  min-width: 0;
  padding: 7px 8px;
  width: 100%;
}

.property-section input:focus,
.property-section textarea:focus,
.property-section select:focus {
  border-color: #60a5fa;
  outline: 2px solid rgba(37, 99, 235, 0.12);
}

.property-section input:disabled {
  background: #f1f5f9;
  color: #64748b;
}

.property-section input[type="color"] {
  cursor: pointer;
  min-height: 36px;
  padding: 3px;
}

.inline-control,
.property-switch {
  align-items: center;
  display: flex !important;
  gap: 8px !important;
}

.inline-control input,
.property-switch input {
  accent-color: #2563eb;
  flex: 0 0 auto;
  width: auto;
}

.property-switch {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  min-height: 36px;
  padding: 7px 9px;
}

.property-readout {
  display: grid;
  gap: 8px;
  margin: 0;
}

.property-readout div {
  display: grid;
  gap: 6px;
  grid-template-columns: 56px minmax(0, 1fr);
}

.property-readout dt {
  color: #64748b;
  font-size: 12px;
}

.property-readout dd {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-readout .property-definition {
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 11px;
}

.property-color-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.property-color-grid label {
  min-width: 0;
}

.property-field-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.property-kind {
  display: grid;
  gap: 10px;
}

.property-note {
  background: #f8fafc;
  border-left: 3px solid #94a3b8;
  color: #64748b;
  font-size: 11px;
  line-height: 1.5;
  margin: 0;
  padding: 7px 9px;
}

.project-section textarea {
  min-height: 128px;
  resize: vertical;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-workbench {
  gap: 0;
  padding: 0;
}

.ai-workbench-tabs {
  background: #f1f5f9;
  border-bottom: 1px solid #dbe3ec;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
}

.ai-workbench-tabs button {
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  min-height: 32px;
  padding: 6px 8px;
}

.ai-workbench-tabs button:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #334155;
}

.ai-workbench-tabs button[aria-selected="true"] {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  color: #1d4ed8;
}

.ai-workbench-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.ai-workbench-panel[hidden] {
  display: none;
}

.ai-workbench-panel-heading h3,
.ai-workbench-panel-heading p {
  margin: 0;
}

.ai-workbench-panel-heading p {
  color: #64748b;
  font-size: 11px;
  line-height: 1.5;
  margin-top: 3px;
}

.property-actions {
  display: flex;
  margin-top: 8px;
}

.property-actions button {
  width: 100%;
}

.cas-test-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.cas-test-heading [data-cas-status] {
  background: #e2e8f0;
  border-radius: 999px;
  color: #475569;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
}

.cas-test-heading [data-cas-status][data-state="loading"] {
  background: #fef3c7;
  color: #92400e;
}

.cas-test-heading [data-cas-status][data-state="ready"] {
  background: #dcfce7;
  color: #166534;
}

.cas-test-heading [data-cas-status][data-state="error"] {
  background: #ffe4e6;
  color: #be123c;
}

.cas-test-controls {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 88px;
}

.cas-test-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cas-test-result {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #1e293b;
  display: block;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 12px;
  line-height: 1.55;
  min-height: 42px;
  max-height: 126px;
  overflow: auto;
  overflow-wrap: anywhere;
  padding: 9px;
  user-select: text;
  white-space: pre-wrap;
}

.cas-test-result.is-long {
  box-shadow: inset 0 -14px 12px -16px rgba(15, 23, 42, 0.7);
}

.cas-test-result.is-error {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.command-bar {
  align-items: center;
  background: #ffffff;
  border-top: 1px solid #d7dee7;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 7px 10px 6px;
}

.command-bar label {
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.command-bar input {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
  height: 32px;
  padding: 0 10px;
}

.command-bar input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: 0;
}

.command-bar button {
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
  border: 1px solid #bfd3ef;
  border-radius: 6px;
  color: #1d4ed8;
  font-weight: 700;
  height: 32px;
  padding: 0 14px;
}

.command-bar button:hover,
.command-bar button:focus-visible {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: 0;
}

.command-bar button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.command-feedback {
  color: #64748b;
  font-size: 12px;
  grid-column: 1 / -1;
  line-height: 1.35;
  margin: 0;
  min-height: 16px;
  overflow-wrap: anywhere;
  padding-left: 1px;
}

.command-feedback[data-state="success"] {
  color: #047857;
}

.command-feedback[data-state="error"] {
  color: #b42318;
}

.status-bar {
  align-items: center;
  background: #182026;
  color: #dbeafe;
  display: flex;
  font-size: 13px;
  gap: 18px;
  justify-content: space-between;
  padding: 0 12px;
}

.status-bar span:last-child {
  color: #cbd5e1;
}

.editor-shell {
  display: grid;
  gap: 14px;
  margin: 0 auto;
  padding: 18px;
  width: min(1280px, 100%);
}

.editor-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.editor-header h1 {
  font-size: 26px;
  margin: 0 0 4px;
}

.editor-header p {
  color: #52616f;
  margin: 0;
}

.editor-status {
  background: #eef6ff;
  border: 1px solid #c8ddff;
  border-radius: 8px;
  color: #1d4f91;
  font-size: 14px;
  line-height: 1.45;
  max-width: 420px;
  padding: 10px 12px;
}

.editor-toolbar {
  align-items: stretch;
  background: #ffffff;
  border: 1px solid #d7dee7;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px;
}

.editor-tool-group {
  align-items: center;
  border-right: 1px solid #e6ebf1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-right: 12px;
}

.editor-tool-group:last-child {
  border-right: 0;
  padding-right: 0;
}

.editor-tool-group span {
  color: #697888;
  font-size: 13px;
  font-weight: 700;
}

.editor-toolbar button.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.editor-toolbar .danger-button {
  color: #b42318;
}

.editor-toolbar .danger-button.is-active {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.editor-layout {
  align-items: stretch;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.editor-board-panel,
.editor-side-panel,
.editor-json-panel {
  background: #ffffff;
  border: 1px solid #d7dee7;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(24, 32, 38, 0.06);
}

.editor-board-panel {
  overflow: hidden;
}

.editor-board {
  width: 100%;
}

.editor-side-panel {
  display: flex;
  flex-direction: column;
  min-height: 560px;
  overflow: hidden;
}

.editor-side-panel h2,
.editor-json-panel h2 {
  font-size: 16px;
  margin: 0;
}

.editor-side-panel h2 {
  border-bottom: 1px solid #e6ebf1;
  padding: 12px;
}

.object-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 8px 8px 18px;
}

.construction-history-panel {
  border-top: 1px solid #d7dee7;
  flex: 0 0 auto;
  max-height: 238px;
  overflow: hidden;
}

.construction-history-panel > summary {
  align-items: center;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: space-between;
  min-height: 34px;
  padding: 7px 10px;
  user-select: none;
}

.construction-history-panel > summary::marker {
  color: #64748b;
}

#construction-history-count {
  align-items: center;
  background: #e2e8f0;
  border-radius: 999px;
  color: #475569;
  display: inline-flex;
  font-size: 10px;
  height: 18px;
  justify-content: center;
  min-width: 18px;
  padding: 0 5px;
}

.construction-history-list {
  display: grid;
  gap: 2px;
  max-height: 202px;
  overflow-y: auto;
  padding: 5px;
}

.construction-history-empty {
  color: #94a3b8;
  font-size: 11px;
  margin: 12px 6px;
  text-align: center;
}

.construction-history-item {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #334155;
  display: grid;
  gap: 7px;
  grid-template-columns: 24px minmax(0, 1fr);
  padding: 5px 6px;
  text-align: left;
  width: 100%;
}

.construction-history-item:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.construction-step-number {
  align-items: center;
  background: #e2e8f0;
  border-radius: 4px;
  color: #475569;
  display: inline-flex;
  font-size: 10px;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.construction-step-content {
  display: grid;
  min-width: 0;
}

.construction-step-title {
  font-size: 11px;
  font-weight: 700;
}

.construction-step-definition {
  color: #64748b;
  font-family: Consolas, monospace;
  font-size: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.object-list-empty {
  align-items: center;
  color: #697888;
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  min-height: 160px;
  padding: 20px;
  text-align: center;
}

.object-list-empty strong {
  color: #475569;
  font-size: 14px;
}

.object-list-empty span {
  font-size: 12px;
  line-height: 1.5;
}

.object-group + .object-group {
  margin-top: 8px;
}

.object-group-heading {
  align-items: center;
  color: #64748b;
  display: flex;
  font-size: 11px;
  font-weight: 700;
  justify-content: space-between;
  min-height: 26px;
  padding: 4px 6px;
}

.object-group-count {
  align-items: center;
  background: #eef2f7;
  border-radius: 999px;
  color: #64748b;
  display: inline-flex;
  font-size: 10px;
  height: 18px;
  justify-content: center;
  min-width: 18px;
  padding: 0 5px;
}

.object-group-items {
  display: grid;
  gap: 2px;
}

.object-list-item {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #1e293b;
  cursor: default;
  display: grid;
  gap: 7px;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  min-height: 48px;
  padding: 5px 6px;
  text-align: left;
  width: 100%;
}

.object-list-item:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.object-list-item:focus-visible {
  border-color: #60a5fa;
  outline: 2px solid rgba(37, 99, 235, 0.16);
}

.object-list-item.is-selected {
  background: #eff6ff;
  border-color: #93c5fd;
  box-shadow: inset 3px 0 0 #2563eb;
}

.object-visibility {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #2563eb;
  display: inline-flex;
  font-size: 15px;
  height: 24px;
  justify-content: center;
  padding: 0;
  width: 24px;
}

.object-visibility:hover {
  background: #dbeafe;
}

.object-visibility.is-hidden {
  color: #94a3b8;
}

.object-item-content {
  min-width: 0;
}

.object-item-headline {
  align-items: baseline;
  display: flex;
  gap: 6px;
  min-width: 0;
}

.object-name {
  color: #0f172a;
  cursor: text;
  font-size: 13px;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.object-type {
  color: #64748b;
  flex: 0 0 auto;
  font-size: 10px;
}

.object-definition {
  color: #64748b;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 10px;
  line-height: 1.45;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.object-lock-state {
  color: #9a6700;
  font-size: 10px;
  min-width: 20px;
  text-align: right;
}

.object-name-input {
  border: 1px solid #60a5fa;
  border-radius: 4px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  height: 25px;
  min-width: 0;
  outline: 2px solid rgba(37, 99, 235, 0.13);
  padding: 2px 5px;
  width: 100%;
}

.object-context-menu {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
  display: grid;
  min-width: 148px;
  padding: 5px;
  position: fixed;
  z-index: 100;
}

.object-context-menu[hidden] {
  display: none;
}

.object-context-menu button {
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #1e293b;
  font-size: 13px;
  padding: 8px 10px;
  text-align: left;
}

.object-context-menu button:hover,
.object-context-menu button:focus-visible {
  background: #eff6ff;
  color: #1d4ed8;
  outline: 0;
}

.object-context-menu button[data-object-action="delete"] {
  color: #b42318;
}

.edu-geo-text-selected {
  background: rgba(245, 158, 11, 0.12);
  border-radius: 3px;
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
}

.edu-geo-text-pending {
  background: rgba(56, 189, 248, 0.12);
  border-radius: 3px;
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.editor-json-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.editor-json-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.editor-json-header p {
  color: #697888;
  font-size: 14px;
  margin: 4px 0 0;
}

.editor-json-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-json-panel textarea {
  border: 1px solid #ccd5df;
  border-radius: 6px;
  font-family: Consolas, monospace;
  min-height: 180px;
  padding: 12px;
  resize: vertical;
  width: 100%;
}

.project-message {
  border-radius: 6px;
  color: #52616f;
  font-size: 14px;
  line-height: 1.55;
  min-height: 22px;
  padding: 8px 10px;
  white-space: pre-wrap;
}

.project-message.is-error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
}

.project-message.is-success {
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.example-shell {
  width: min(920px, calc(100vw - 32px));
  margin: 28px auto;
}

.example-header {
  margin-bottom: 14px;
}

.example-header h1 {
  font-size: 28px;
  margin: 0 0 4px;
}

.example-header p {
  color: #52616f;
  margin: 0;
}

.example-board,
.edu-geo-jxg-board {
  background: #ffffff;
  border: 1px solid #d7dee7;
  border-radius: 8px;
  box-sizing: border-box;
  box-shadow: 0 10px 24px rgba(24, 32, 38, 0.08);
  max-width: 100%;
  min-height: 1px;
  min-width: 1px;
  overflow: hidden;
}

.edu-geo-jxg-board > svg {
  display: block;
}

button {
  border: 1px solid #ccd5df;
  border-radius: 6px;
  background: #ffffff;
  color: #182026;
  cursor: pointer;
  font: inherit;
  padding: 8px 14px;
}

button:hover {
  border-color: #8aa0b8;
}

.demo-shell {
  width: min(1040px, calc(100vw - 32px));
  margin: 28px auto;
}

.demo-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.demo-header h1 {
  font-size: 28px;
  margin: 0 0 4px;
}

.demo-header p {
  color: #52616f;
  margin: 0;
}

.demo-status {
  background: #eaf2ff;
  border: 1px solid #c9dcff;
  border-radius: 6px;
  color: #2457a6;
  font-size: 14px;
  font-weight: 700;
  min-width: 136px;
  padding: 8px 12px;
  text-align: center;
}

.demo-toolbar {
  align-items: stretch;
  background: #ffffff;
  border: 1px solid #d7dee7;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px;
}

.tool-group {
  align-items: center;
  border-right: 1px solid #e6ebf1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-right: 12px;
}

.tool-group:last-child {
  border-right: 0;
  padding-right: 0;
}

.tool-group span {
  color: #697888;
  font-size: 13px;
  font-weight: 700;
  margin-right: 2px;
}

.tool-button {
  min-width: 64px;
}

.tool-button.is-active {
  background: #2f6fed;
  border-color: #2f6fed;
  color: #ffffff;
}

.tool-button-danger {
  color: #b42318;
}

.tool-button-danger.is-active {
  background: #d92d20;
  border-color: #d92d20;
  color: #ffffff;
}

.demo-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.demo-examples button {
  background: #f8fafc;
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.demo-board {
  width: 100%;
}

.demo-tip {
  color: #52616f;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 10px;
}

.demo-json-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.demo-json-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.demo-json-panel label {
  color: #52616f;
  font-size: 14px;
}

.demo-json-panel textarea {
  border: 1px solid #ccd5df;
  border-radius: 6px;
  font-family: Consolas, monospace;
  min-height: 210px;
  padding: 12px;
  resize: vertical;
  width: 100%;
}

.edu-geo-board {
  background: #ffffff;
  border: 1px solid #d7dee7;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(24, 32, 38, 0.08);
  overflow: hidden;
  user-select: none;
}

.edu-geo-jxg-board {
  position: relative;
}

.edugeo-control-layer {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  z-index: 20;
}

.edugeo-control {
  align-items: stretch;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.14);
  display: flex;
  min-height: 44px;
  min-width: 96px;
  pointer-events: auto;
  position: absolute;
  touch-action: manipulation;
  transform: translateY(-50%);
}

.edugeo-control.is-selected {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.28), 0 3px 10px rgba(15, 23, 42, 0.14);
}

.edugeo-control-drag-handle {
  align-items: center;
  background: #f1f5f9;
  border: 0;
  border-right: 1px solid #cbd5e1;
  border-radius: 8px 0 0 8px;
  color: #64748b;
  cursor: grab;
  display: flex;
  font-size: 15px;
  justify-content: center;
  min-height: 44px;
  min-width: 30px;
  padding: 0 7px;
  touch-action: none;
}

.edugeo-control-drag-handle:active {
  cursor: grabbing;
}

.edugeo-control-input {
  align-items: center;
  color: #1e293b;
  display: flex;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 16px;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px;
}

button.edugeo-control-input {
  background: #2563eb;
  border: 0;
  border-radius: 0 8px 8px 0;
  color: #ffffff;
  cursor: pointer;
  justify-content: center;
  min-width: 96px;
}

.edugeo-control-input input[type="checkbox"] {
  height: 24px;
  margin: 0;
  width: 24px;
}

.edugeo-inputbox-control input,
.edugeo-dropdown-control select {
  border: 1px solid #94a3b8;
  border-radius: 6px;
  font-size: 16px;
  min-height: 36px;
  min-width: 110px;
  padding: 5px 8px;
}

.edugeo-slider-control input[type="range"] {
  min-height: 36px;
  min-width: 150px;
  touch-action: pan-y;
}

.edugeo-slider-control output {
  min-width: 42px;
  text-align: right;
}

.edu-geo-svg {
  display: block;
  height: auto;
  touch-action: none;
  width: 100%;
}

.edu-geo-axis-line {
  stroke: #d6dee7;
  stroke-width: 1.5;
}

.edu-geo-polygon {
  cursor: pointer;
  fill: rgba(47, 111, 237, 0.08);
  pointer-events: visiblePainted;
  stroke: #2f6fed;
  stroke-width: 2;
  transition: opacity 120ms ease, stroke 120ms ease, stroke-width 120ms ease;
}

.edu-geo-segment,
.edu-geo-line {
  cursor: pointer;
  pointer-events: stroke;
  stroke: #263238;
  stroke-linecap: round;
  stroke-width: 2;
  transition: opacity 120ms ease, stroke 120ms ease, stroke-width 120ms ease;
}

.edu-geo-line {
  stroke-dasharray: 8 6;
}

.edu-geo-parallel-line {
  stroke: #12a594;
}

.edu-geo-perpendicular-line {
  stroke: #e5484d;
}

.edu-geo-circle {
  cursor: pointer;
  fill: transparent;
  pointer-events: visibleStroke;
  stroke: #2f6fed;
  stroke-width: 2;
  transition: opacity 120ms ease, stroke 120ms ease, stroke-width 120ms ease;
}

.edu-geo-point {
  cursor: grab;
  fill: #2f6fed;
  stroke: #ffffff;
  stroke-width: 2;
  touch-action: none;
  transition: filter 120ms ease, r 120ms ease, stroke 120ms ease, stroke-width 120ms ease;
}

.edu-geo-point:active {
  cursor: grabbing;
}

.edu-geo-point-static {
  cursor: pointer;
}

.edu-geo-label {
  cursor: pointer;
  fill: #182026;
  font-size: 16px;
  font-weight: 700;
  pointer-events: auto;
  transition: fill 120ms ease, stroke 120ms ease;
}

.edu-geo-point:hover,
.edu-geo-segment:hover,
.edu-geo-line:hover,
.edu-geo-circle:hover,
.edu-geo-polygon:hover,
.edu-geo-label:hover {
  filter: drop-shadow(0 2px 4px rgba(47, 111, 237, 0.24));
  opacity: 0.92;
}

.edu-geo-point.edu-geo-selected {
  stroke: #f59f00;
  stroke-width: 4;
}

.edu-geo-segment.edu-geo-selected,
.edu-geo-line.edu-geo-selected,
.edu-geo-circle.edu-geo-selected,
.edu-geo-polygon.edu-geo-selected {
  stroke: #f59f00;
  stroke-width: 4;
}

.edu-geo-label.edu-geo-selected {
  fill: #b76e00;
  stroke: rgba(245, 159, 0, 0.35);
  stroke-width: 3;
  paint-order: stroke;
}

@media (max-width: 720px) {
  .editor-header,
  .editor-json-header {
    align-items: stretch;
    flex-direction: column;
  }

  .editor-layout {
    grid-template-columns: 1fr;
  }

  .editor-side-panel {
    min-height: 240px;
  }

  .editor-tool-group {
    border-right: 0;
    border-bottom: 1px solid #e6ebf1;
    padding-bottom: 10px;
    padding-right: 0;
    width: 100%;
  }

  .demo-header,
  .demo-json-header {
    align-items: stretch;
    flex-direction: column;
  }

  .demo-actions,
  .demo-toolbar,
  .demo-examples,
  .tool-group {
    justify-content: flex-start;
  }

  .tool-group {
    border-right: 0;
    border-bottom: 1px solid #e6ebf1;
    padding-bottom: 10px;
    padding-right: 0;
    width: 100%;
  }

}

/* Embeddable SDK shells */
.edu-geo-sdk {
  background: var(--edugeo-app-bg);
  color: var(--edugeo-text);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  isolation: isolate;
  max-width: 100%;
  min-height: 260px;
  overflow: hidden;
  position: relative;
}

.edu-geo-sdk,
.edu-geo-sdk * {
  box-sizing: border-box;
}

.edu-geo-sdk-viewer {
  background: #ffffff;
  border: 1px solid var(--edugeo-border);
  border-radius: 8px;
}

.edu-geo-sdk-viewer .edu-geo-sdk-board,
.edu-geo-sdk-viewer .edu-geo-jxg-board {
  border: 0;
  border-radius: inherit;
  box-shadow: none;
  height: 100% !important;
  width: 100% !important;
}

.edu-geo-viewer-controls {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  bottom: 10px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  display: flex;
  gap: 4px;
  padding: 4px;
  position: absolute;
  right: 10px;
  z-index: 15;
}

.edu-geo-viewer-controls button {
  background: transparent;
  border: 0;
  font-size: 12px;
  padding: 6px 8px;
}

.edu-geo-viewer-controls button:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.edu-geo-sdk.edu-geo-sdk-editor {
  display: grid;
  grid-template-rows: 40px auto minmax(0, 1fr) 44px 30px;
  height: 720px;
  min-width: 0;
  width: 100%;
}

.edu-geo-sdk-editor .editor-menubar {
  min-width: 0;
  position: relative;
}

.edu-geo-sdk-editor .editor-brand span {
  display: none;
}

.edu-geo-sdk-editor .geometry-toolbar {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}

.edu-geo-sdk-editor .editor-workspace {
  grid-template-columns: minmax(190px, 22%) minmax(320px, 1fr) minmax(230px, 27%);
}

.edu-geo-sdk-editor.is-left-collapsed .editor-workspace {
  grid-template-columns: 0 minmax(320px, 1fr) minmax(230px, 27%);
}

.edu-geo-sdk-editor.is-right-collapsed .editor-workspace {
  grid-template-columns: minmax(190px, 22%) minmax(320px, 1fr) 0;
}

.edu-geo-sdk-editor.is-left-collapsed.is-right-collapsed .editor-workspace {
  grid-template-columns: 0 minmax(320px, 1fr) 0;
}

.edu-geo-sdk-editor .board-frame {
  min-height: 260px;
}

.edu-geo-sdk-editor .command-bar {
  min-width: 0;
}

.edu-geo-sdk-editor .status-bar {
  min-width: 0;
}

.edu-geo-sdk-editor [data-history-count] {
  align-items: center;
  background: #e2e8f0;
  border-radius: 999px;
  display: inline-flex;
  font-size: 10px;
  justify-content: center;
  min-width: 18px;
  padding: 2px 5px;
}

.ai-tutor-panel {
  display: grid;
  gap: 10px;
}

.ai-task-field textarea {
  min-height: 58px;
  resize: vertical;
}

.ai-advice-button {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  font-weight: 700;
  width: 100%;
}

.ai-advice-button:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.ai-advice-button:disabled {
  background: #93c5fd;
  border-color: #93c5fd;
  cursor: wait;
}

.ai-result-grid {
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  overflow: hidden;
}

.ai-result-section {
  background: #ffffff;
  border-bottom: 1px solid #e8edf3;
  padding: 10px;
}

.ai-result-section:last-child {
  border-bottom: 0;
}

.ai-result-section h4 {
  color: #475569;
  font-size: 10px;
  letter-spacing: 0.06em;
  margin: 0 0 5px;
  text-transform: uppercase;
}

.ai-result-section p,
.ai-result-section ol,
.ai-result-section ul {
  color: #1e293b;
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
}

.ai-result-section ol,
.ai-result-section ul {
  padding-left: 18px;
}

.ai-result-section.is-warning {
  background: #fffaf0;
}

.ai-result-section.is-warning h4 {
  color: #b45309;
}

.ai-teacher-report {
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  overflow: hidden;
}

.ai-teacher-report summary {
  align-items: center;
  color: #334155;
  cursor: pointer;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  justify-content: space-between;
  list-style-position: inside;
  padding: 9px 10px;
}

.ai-teacher-report summary small {
  color: #64748b;
  font-size: 10px;
  font-weight: 500;
}

.ai-teacher-report[open] summary {
  border-bottom: 1px solid #e2e8f0;
}

.ai-teacher-report-content {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.ai-teacher-report-content section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
}

.ai-teacher-report-content h4 {
  color: #475569;
  font-size: 11px;
  margin: 0 0 4px;
}

.ai-teacher-report-content p,
.ai-teacher-report-content ul {
  color: #1e293b;
  font-size: 12px;
  line-height: 1.55;
  margin: 0;
}

.ai-teacher-report-content ul {
  padding-left: 18px;
}

.ai-teacher-difficulty-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.ai-teacher-difficulty-row h4 {
  margin: 0;
}

.ai-teacher-difficulty-row span {
  background: #e0f2fe;
  border-radius: 999px;
  color: #075985;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
}

.ai-workbench .ai-tutor-transcript {
  min-height: 0;
}

.ai-workbench .ai-tutor-transcript:empty {
  display: none;
}

.edu-geo-ai-action-overlay {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  z-index: 30;
}

.edu-geo-ai-highlight-layer,
.edu-geo-ai-label-layer {
  height: 100%;
  inset: 0;
  overflow: visible;
  pointer-events: none;
  position: absolute;
  width: 100%;
}

.edu-geo-ai-highlight-shape {
  animation: edu-geo-ai-pulse 1.35s ease-in-out infinite;
  fill: rgba(245, 158, 11, 0.12) !important;
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.85));
  opacity: 1 !important;
  pointer-events: none !important;
  stroke: #f59e0b !important;
  stroke-opacity: 1 !important;
  stroke-width: 6px !important;
  vector-effect: non-scaling-stroke;
}

.edu-geo-ai-temporary-label {
  background: #fffbeb;
  border: 1px solid #fbbf24;
  border-radius: 5px;
  box-shadow: 0 3px 10px rgba(120, 53, 15, 0.18);
  color: #92400e;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  max-width: 180px;
  padding: 4px 7px;
  position: absolute;
  transform: translate(9px, -110%);
  white-space: normal;
}

[data-tool].is-ai-suggested {
  animation: edu-geo-ai-tool-pulse 1.35s ease-in-out infinite;
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.22) !important;
  color: #92400e !important;
}

@keyframes edu-geo-ai-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.6));
    opacity: 0.75;
  }
  50% {
    filter: drop-shadow(0 0 7px rgba(245, 158, 11, 0.95));
    opacity: 1;
  }
}

@keyframes edu-geo-ai-tool-pulse {
  0%,
  100% {
    background: #ffffff;
  }
  50% {
    background: #fffbeb;
  }
}

@media (prefers-reduced-motion: reduce) {
  .edu-geo-ai-highlight-shape,
  [data-tool].is-ai-suggested {
    animation: none;
  }
}

.ai-tutor-heading {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.ai-tutor-heading h3,
.ai-tutor-heading p {
  margin: 0;
}

.ai-tutor-heading p {
  color: #64748b;
  font-size: 11px;
  margin-top: 3px;
}

.ai-tutor-heading [data-ai-status] {
  background: #e2e8f0;
  border-radius: 999px;
  color: #475569;
  flex: 0 0 auto;
  font-size: 10px;
  padding: 4px 7px;
}

.ai-tutor-heading [data-ai-status][data-state="loading"] {
  background: #fef3c7;
  color: #92400e;
}

.ai-tutor-heading [data-ai-status][data-state="success"] {
  background: #dcfce7;
  color: #166534;
}

.ai-tutor-heading [data-ai-status][data-state="error"] {
  background: #fee2e2;
  color: #b91c1c;
}

.ai-context-readout {
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  display: grid;
  gap: 5px;
  padding: 9px 10px;
}

.ai-context-readout div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.ai-context-readout strong { color: #1d4ed8; }
.ai-context-readout p { color: #475569; font-size: 11px; margin: 0; }
.ai-context-readout button { justify-self: end; min-height: 32px; padding: 4px 9px; }

.ai-command-planner {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #cbdaf1;
  border-radius: 10px;
  background: rgba(248, 251, 255, 0.94);
}
.ai-command-planner label { display: grid; gap: 5px; color: #334155; font-size: 12px; font-weight: 700; }
.ai-command-planner textarea { width: 100%; min-height: 56px; resize: vertical; }
.ai-command-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ai-command-actions span { color: #64748b; font-size: 11px; }
.ai-command-actions span[data-state="error"] { color: #b91c1c; }
.ai-command-actions span[data-state="success"] { color: #15803d; }
.ai-command-preview { padding: 9px; border: 1px solid #93c5fd; border-radius: 8px; background: #eff6ff; }
.ai-command-preview strong { color: #1d4ed8; }
.ai-command-preview p { margin: 5px 0; color: #475569; font-size: 12px; }
.ai-command-preview ol { margin: 6px 0 8px; padding-left: 22px; }
.ai-command-preview li { margin: 4px 0; color: #475569; font-size: 12px; }
.ai-command-preview code { color: #0f3d78; font-weight: 700; overflow-wrap: anywhere; }

.ai-teaching-generator { display: grid; gap: 8px; padding: 10px; border: 1px solid #d7c8f3; border-radius: 10px; background: rgba(250, 248, 255, .95); }
.ai-teaching-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #5b21b6; }
.ai-teaching-heading label { display: flex; align-items: center; gap: 5px; color: #475569; font-size: 12px; }
.ai-teaching-kinds, .ai-teaching-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ai-teaching-kinds button { min-height: 34px; padding: 5px 8px; }
.ai-teaching-generator > span { color: #64748b; font-size: 11px; }
.ai-teaching-generator > span[data-state="error"] { color: #b91c1c; }
.ai-teaching-generator > span[data-state="success"] { color: #15803d; }
.ai-teaching-output { padding: 9px; border: 1px solid #c4b5fd; border-radius: 8px; background: #fff; }
.ai-teaching-output > strong { color: #6d28d9; }
.ai-teaching-output pre { max-height: 260px; overflow: auto; margin: 7px 0; padding: 8px; border-radius: 7px; background: #f8fafc; color: #334155; font: 12px/1.6 system-ui, sans-serif; white-space: pre-wrap; }

.ai-tutor-source {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #64748b;
  font-size: 10px;
  line-height: 1.5;
  padding: 7px 8px;
}

.ai-tutor-transcript {
  display: grid;
  gap: 8px;
  max-height: 260px;
  min-height: 96px;
  overflow: auto;
}

.ai-tutor-message {
  background: #eff6ff;
  border-radius: 10px 10px 10px 3px;
  color: #1e3a5f;
  font-size: 12px;
  line-height: 1.55;
  padding: 8px 10px;
  white-space: pre-wrap;
}

.ai-tutor-message strong {
  display: block;
  font-size: 10px;
  margin-bottom: 3px;
  opacity: 0.7;
}

.ai-tutor-message.is-student {
  background: #f1f5f9;
  border-radius: 10px 10px 3px 10px;
  color: #334155;
  margin-left: 18px;
}

.ai-tutor-message.is-error {
  background: #fef2f2;
  color: #b91c1c;
}

.ai-tutor-quick-actions {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-tutor-quick-actions button {
  font-size: 11px;
  min-width: 0;
  padding: 6px;
}

.ai-tutor-form {
  display: grid;
  gap: 6px;
}

.ai-tutor-form textarea {
  min-height: 58px;
  resize: vertical;
}

.ai-tutor-form button {
  justify-self: end;
}

.edu-geo-sdk:fullscreen,
.edu-geo-sdk:-webkit-full-screen {
  height: 100vh !important;
  width: 100vw !important;
}

@media (max-width: 820px) {
  .editor-app {
    grid-template-rows: 40px auto minmax(0, 1fr) 44px 30px;
    min-width: 0;
  }

  .editor-app .editor-brand span,
  .editor-app .object-panel,
  .editor-app .property-panel {
    display: none;
  }

  .editor-app .editor-menubar {
    gap: 8px;
    padding: 0 6px 0 10px;
  }

  .editor-app .menu-item > button {
    padding: 0 8px;
  }

  .editor-app .geometry-toolbar {
    min-height: 64px;
    padding: 6px;
  }

  .editor-app .editor-workspace,
  .editor-app.is-left-collapsed .editor-workspace,
  .editor-app.is-right-collapsed .editor-workspace,
  .editor-app.is-left-collapsed.is-right-collapsed .editor-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .editor-app .board-center {
    padding: 6px;
  }

  .editor-app .command-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 6px;
  }

  .editor-app .command-bar label {
    display: none;
  }

  .editor-app .status-bar {
    gap: 8px;
    overflow: hidden;
    padding: 0 8px;
  }

  .editor-app .status-bar span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .edu-geo-sdk-editor .editor-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .edu-geo-sdk-editor .object-panel,
  .edu-geo-sdk-editor .property-panel {
    display: none;
  }

  .edu-geo-sdk-editor .editor-brand {
    display: none;
  }
}
.edugeo-dynamic-text-rendered {
  white-space: pre-wrap;
}

.edugeo-latex {
  display: inline-flex;
  align-items: baseline;
  gap: 0.04em;
  font-family: "Cambria Math", "STIX Two Math", "Times New Roman", serif;
}

.edugeo-latex-group {
  display: inline-flex;
  align-items: baseline;
}

.edugeo-latex-frac {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  vertical-align: middle;
  line-height: 1.05;
  margin: 0 0.12em;
}

.edugeo-latex-num,
.edugeo-latex-den {
  display: block;
  padding: 0 0.14em;
  text-align: center;
}

.edugeo-latex-num {
  border-bottom: 1px solid currentColor;
}

.edugeo-latex-sqrt {
  display: inline-flex;
  align-items: flex-start;
}

.edugeo-latex-radical {
  font-size: 1.15em;
  line-height: 1;
}

.edugeo-latex-radicand {
  border-top: 1px solid currentColor;
  padding: 0 0.08em;
}

.edugeo-latex-root-index {
  font-size: 0.55em;
  margin-right: -0.18em;
}

.edugeo-latex-sup,
.edugeo-latex-sub {
  font-size: 0.72em;
  line-height: 1;
}

.edugeo-latex-matrix,
.edugeo-latex-cases {
  display: inline-flex;
  flex-direction: column;
  gap: 0.12em;
  padding: 0.08em 0.25em;
  vertical-align: middle;
}

.edugeo-latex-pmatrix::before,
.edugeo-latex-pmatrix::after {
  font-size: 1.8em;
  line-height: 0.6;
  position: absolute;
}

.edugeo-latex-pmatrix::before {
  content: "(";
  transform: translateX(-0.35em);
}

.edugeo-latex-pmatrix::after {
  content: ")";
  align-self: flex-end;
  transform: translateX(0.35em);
}

.edugeo-latex-bmatrix {
  border-left: 1px solid currentColor;
  border-right: 1px solid currentColor;
}

.edugeo-latex-matrix-row,
.edugeo-latex-case-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(1.2em, auto);
  gap: 0.45em;
}

.edugeo-latex-matrix-cell,
.edugeo-latex-case-cell {
  text-align: center;
}

.edugeo-latex-cases {
  border-left: 2px solid currentColor;
  border-radius: 45% 0 0 45%;
}

.developer-only { display: none !important; }
.board-frame { position: relative; }
.interaction-mode-toggle {
  position: absolute; right: 14px; bottom: 14px; z-index: 18;
  min-width: 62px; min-height: 40px; padding: 8px 13px;
  border: 1px solid rgba(37, 99, 235, .26); border-radius: 999px;
  background: rgba(248, 251, 255, .9); color: #1d4ed8;
  box-shadow: 0 8px 24px rgba(30, 64, 175, .14); backdrop-filter: blur(10px);
  font-weight: 700; cursor: pointer; touch-action: manipulation;
}
.interaction-mode-toggle:hover, .interaction-mode-toggle:focus-visible {
  background: #fff; border-color: rgba(37, 99, 235, .55); transform: translateY(-1px);
}
.interaction-mode-toggle[data-mode="construct"] {
  color: #0f766e; border-color: rgba(13, 148, 136, .34); background: rgba(240, 253, 250, .92);
}
.developer-panel {
  position: fixed; right: 18px; top: 72px; z-index: 90;
  width: min(460px, calc(100vw - 36px)); max-height: calc(100vh - 160px); overflow: auto;
  padding: 16px; border: 1px solid rgba(37, 99, 235, .2); border-radius: 16px;
  background: rgba(248, 251, 255, .97); box-shadow: 0 22px 56px rgba(15, 23, 42, .22);
  backdrop-filter: blur(16px);
}
.developer-panel[hidden] { display: none; }
.developer-panel header, .developer-panel .developer-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.developer-panel header div { display: grid; gap: 3px; }
.developer-panel header small { color: #64748b; }
.developer-panel button {
  min-height: 38px; border: 1px solid #cbd5e1; border-radius: 10px;
  background: #fff; color: #334155; cursor: pointer;
}
.developer-panel a[data-developer-test] { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 10px; border: 1px solid #9db8da; border-radius: 8px; background: #f7fbff; color: #244d7d; text-decoration: none; }
.developer-panel .developer-actions { margin: 14px 0; justify-content: flex-start; flex-wrap: wrap; }
.developer-panel section { margin-top: 12px; }
.developer-panel h3 { margin: 0 0 6px; font-size: 13px; color: #334155; }
.developer-panel pre {
  max-height: 220px; overflow: auto; margin: 0; padding: 10px; border-radius: 10px;
  background: #eef4fb; color: #334155; font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere;
}
@media (max-width: 640px) {
  .interaction-mode-toggle { right: 10px; bottom: 10px; min-height: 44px; }
  .developer-panel { right: 10px; top: 62px; width: calc(100vw - 20px); max-height: calc(100vh - 150px); }
}
