:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f3f4f6;
  --primary: #18181b;
  --primary-text: #ffffff;
  --accent: #2563eb;
  --danger: #dc2626;
  --panel: #ffffff;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
  background-size: 16px 16px;
}

button,
textarea,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.brand-sidebar {
  width: 192px;
  flex: 0 0 192px;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 100vh;
  border-right: 1px solid var(--line);
  background: #fafafa;
  transition: width 180ms ease, flex-basis 180ms ease;
}

.brand-sidebar.collapsed {
  width: 50px;
  flex-basis: 50px;
}

.brand-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #4e7ca1, #eeaa9c);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.brand-copy {
  min-width: 0;
  display: grid;
  line-height: 1.15;
}

.brand-copy strong,
.brand-copy span,
.login-row span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy span {
  color: var(--muted);
  font-size: 12px;
}

.brand-spacer {
  flex: 1;
}

.brand-sidebar.collapsed .brand-copy,
.brand-sidebar.collapsed .login-row span:last-child {
  display: none;
}

.login-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.login-row:hover,
.icon-btn:hover,
.tool-btn:hover,
.ghost-btn:hover {
  background: #f4f4f5;
}

.avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
}

.main {
  flex: 1;
  min-width: 0;
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}

.crumb {
  color: #374151;
  font-size: 14px;
}

.workspace {
  position: relative;
  display: flex;
  height: calc(100vh - 64px);
  min-height: 620px;
  width: 100%;
  border-top: 1px solid transparent;
}

.input-panel,
.settings-panel {
  position: relative;
  width: 250px;
  flex: 0 0 250px;
  background: var(--panel);
  z-index: 2;
}

.input-panel {
  border-right: 1px solid var(--line);
}

.settings-panel {
  border-left: 1px solid var(--line);
}

.input-panel.collapsed,
.settings-panel.collapsed {
  width: 0;
  flex-basis: 0;
}

.input-panel.collapsed > :not(.collapse-handle),
.settings-panel.collapsed > :not(.collapse-handle) {
  display: none;
}

.panel-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 8px;
}

.mode-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.segmented {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border-radius: 9px;
  background: #f4f4f5;
}

.segment {
  height: 30px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #52525b;
  font-weight: 600;
}

.segment.active {
  background: #fff;
  color: #111827;
  border-color: #e4e4e7;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.icon-btn,
.tool-btn {
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: #27272a;
  background: transparent;
}

.icon-btn {
  width: 32px;
  height: 32px;
}

.tool-btn {
  width: 28px;
  height: 28px;
  font-size: 13px;
}

.tool-btn.active {
  background: #e0ecff;
  color: #1d4ed8;
}

.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.examples button {
  border: 1px solid #e9d5ff;
  border-radius: 999px;
  background: #faf5ff;
  color: #7e22ce;
  padding: 3px 8px;
  font-size: 12px;
}

.examples button:hover {
  background: #f3e8ff;
}

.editor-wrap {
  position: relative;
  min-height: 150px;
  flex: 1;
}

#sourceInput {
  width: 100%;
  height: 100%;
  min-height: 150px;
  resize: none;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px;
  padding-bottom: 32px;
  outline: none;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

#sourceInput:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

#sourceInput.dragging {
  border-color: #7c3aed;
  background: #faf5ff;
}

.char-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 1px 4px;
  border-radius: 4px;
  color: #9ca3af;
  background: rgba(255, 255, 255, 0.85);
  font-size: 12px;
}

.primary-btn,
.primary-small {
  border: 0;
  border-radius: 7px;
  background: var(--primary);
  color: var(--primary-text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.primary-btn {
  width: 100%;
  height: 36px;
  font-weight: 600;
}

.primary-small {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.primary-btn:hover,
.primary-small:hover {
  background: #27272a;
}

.primary-btn:disabled,
.primary-small:disabled,
.source-black-btn:disabled,
.source-button-grid button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 4px;
  color: #52525b;
  font-size: 12px;
  line-height: 1.4;
}

.notice span {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #71717a;
  font-weight: 700;
}

.notice p {
  margin: 0;
}

.left-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.ghost-btn {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #27272a;
  font-size: 13px;
}

.ghost-btn.full {
  width: 100%;
}

.file-drop {
  position: relative;
  overflow: hidden;
}

.file-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.collapse-handle {
  position: absolute;
  top: 50%;
  width: 24px;
  height: 48px;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  background: #fff;
  color: #52525b;
  z-index: 5;
}

.collapse-handle.right {
  right: -13px;
  border-radius: 0 7px 7px 0;
}

.collapse-handle.left {
  left: -13px;
  border-radius: 7px 0 0 7px;
}

.canvas-panel {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  background: #f8fafc;
}

.diagram {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
}

.diagram .grid-bg {
  fill: #f8fafc;
}

.diagram .edge {
  stroke: var(--edge-color, #64748b);
  stroke-width: 1.5;
  fill: none;
  cursor: pointer;
}

.diagram .edge-hit {
  stroke: transparent;
  stroke-width: 12;
  fill: none;
  cursor: pointer;
}

.diagram .edge.selected {
  stroke: #2563eb;
  stroke-width: 2.4;
}

.diagram .label {
  fill: #334155;
  font-size: var(--diagram-font-size, 12px);
  font-family: var(--diagram-font-family, Arial);
  pointer-events: none;
}

.diagram .node {
  cursor: move;
}

.diagram .node-shape {
  stroke: #334155;
  stroke-width: 1.4;
  fill: var(--node-fill, #ffffff);
  filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.08));
}

.diagram .node.selected .node-shape {
  stroke: #2563eb;
  stroke-width: 2.4;
}

.diagram .selection-box {
  fill: rgba(37, 99, 235, 0.12);
  stroke: #2563eb;
  stroke-width: 1.2;
  stroke-dasharray: 5 4;
  pointer-events: none;
}

.diagram .entity .node-shape {
  rx: 0;
}

.diagram .attr.pk text {
  text-decoration: underline;
}

.diagram .attr .node-shape {
  fill: #ffffff;
}

.diagram .attr.pk.key-color .node-shape {
  fill: #d8f5d7;
}

.diagram .attr.fk.key-color .node-shape {
  fill: #f3edca;
}

.diagram .relation .node-shape {
  fill: #fff7ed;
}

.diagram text {
  fill: #111827;
  font-size: var(--diagram-font-size, 12px);
  font-family: var(--diagram-font-family, Arial);
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.canvas-panel.theme-fresh {
  background: #f7fee7;
}

.canvas-panel.theme-fresh .diagram .grid-bg {
  fill: #f7fee7;
}

.canvas-panel.theme-fresh .diagram .entity .node-shape {
  fill: #ecfeff;
  stroke: #0f766e;
}

.canvas-panel.theme-fresh .diagram .relation .node-shape {
  fill: #fef9c3;
  stroke: #a16207;
}

.canvas-panel.theme-contrast {
  background: #f9fafb;
}

.canvas-panel.theme-contrast .diagram .node-shape {
  stroke: #020617;
  stroke-width: 1.8;
}

.canvas-panel.theme-blueprint {
  background: #082f49;
}

.canvas-panel.theme-blueprint .diagram .grid-bg {
  fill: #082f49;
}

.canvas-panel.theme-blueprint .diagram .edge,
.canvas-panel.theme-blueprint .diagram .label,
.canvas-panel.theme-blueprint .diagram text {
  stroke: none;
  fill: #e0f2fe;
}

.canvas-panel.theme-blueprint .diagram .edge {
  stroke: #bae6fd;
}

.canvas-panel.theme-blueprint .diagram .node-shape {
  fill: #0c4a6e;
  stroke: #7dd3fc;
}

.toolbar {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
}

.storage-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #9ca3af;
}

.storage-switch .active {
  color: #2563eb;
}

.switch {
  position: relative;
  width: 32px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: #d4d4d8;
  padding: 1px;
}

.switch span {
  position: absolute;
  left: 2px;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 160ms ease;
}

.switch.on {
  background: #18181b;
}

.switch.on span {
  transform: translateX(14px);
}

.toolbar-sep {
  width: 1px;
  height: 16px;
  margin: 0 3px;
  background: var(--line);
}

.export-wrap {
  position: relative;
}

.export-menu {
  position: absolute;
  top: 34px;
  right: 0;
  display: grid;
  min-width: 168px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.export-menu button:hover {
  background: #f4f4f5;
}

.canvas-status,
.zoom-controls {
  position: absolute;
  z-index: 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.canvas-status {
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 7px 10px;
  color: #475569;
  font-size: 12px;
}

.zoom-controls {
  left: 12px;
  top: 12px;
  display: flex;
  overflow: hidden;
}

.zoom-controls button {
  min-width: 34px;
  height: 30px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
}

.zoom-controls button:last-child {
  border-right: 0;
  padding: 0 8px;
  font-size: 12px;
}

.zoom-controls button:hover {
  background: #f4f4f5;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: #475569;
  pointer-events: none;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.85);
  font-weight: 800;
  letter-spacing: 0;
}

.empty-state strong {
  color: #1f2937;
}

.empty-state span {
  font-size: 13px;
}

.table-drawer {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  width: min(640px, calc(100% - 24px));
  max-height: 42%;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.table-drawer.collapsed {
  width: auto;
  max-height: 50px;
}

.table-drawer.collapsed .drawer-grid {
  display: none;
}

.drawer-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tiny-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #334155;
  font-size: 12px;
}

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

.table-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.table-card h3 {
  margin: 0;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  font-size: 13px;
}

.table-card ul {
  list-style: none;
  margin: 0;
  padding: 6px 10px 8px;
  display: grid;
  gap: 4px;
  font-size: 12px;
}

.table-card li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #475569;
}

.table-card b {
  color: #111827;
  font-weight: 600;
}

.right-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin: 8px;
  padding: 3px;
  border-radius: 9px;
  background: #f4f4f5;
}

.right-tabs button {
  min-width: 0;
  height: 31px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #52525b;
  font-size: 13px;
  font-weight: 600;
}

.right-tabs button.active {
  background: #fff;
  color: #111827;
  border-color: #e4e4e7;
}

.right-content {
  height: calc(100% - 54px);
  overflow: auto;
  padding: 4px 12px 12px;
}

.tool-section {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  font-size: 13px;
}

.tool-section > label:first-child,
.tool-section > label {
  color: #374151;
  font-weight: 600;
}

.tool-section select,
.tool-section input[type="text"],
.tool-section input[type="number"] {
  width: 100%;
  height: 32px;
  border: 1px solid #d4d4d8;
  border-radius: 7px;
  padding: 0 8px;
  background: #fff;
}

.tool-section input[type="color"] {
  width: 42px;
  height: 28px;
  padding: 2px;
  border: 1px solid #d4d4d8;
  border-radius: 6px;
  background: #fff;
  vertical-align: middle;
}

.two-cols {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.compact-row {
  grid-template-columns: 1fr 70px;
  align-items: center;
}

.radio-row {
  display: flex;
  gap: 14px;
}

.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #475569;
  font-weight: 400;
}

.shape-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.shape-tools button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
}

.shape-tools button:hover {
  border-color: #60a5fa;
  background: #eff6ff;
}

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

.editor-empty,
.tip-box {
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
  color: #991b1b;
  padding: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.editor-form {
  display: grid;
  gap: 10px;
}

.editor-form h3 {
  margin: 2px 0;
  text-align: center;
  font-size: 14px;
}

.editor-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.editor-row input,
.editor-row select {
  min-width: 0;
  height: 32px;
  border: 1px solid #d4d4d8;
  border-radius: 7px;
  padding: 0 8px;
}

.editor-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.small-btn {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 0 8px;
  font-size: 13px;
}

.small-btn.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.small-btn.danger {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff1f2;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 3px 0;
}

.inline-note {
  color: #71717a;
  font-size: 12px;
  line-height: 1.45;
}

.seo-copy {
  margin-top: 48px;
  padding: 48px 24px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

.seo-copy.seo-copy-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  background: transparent;
}

.seo-copy.seo-copy-source-doc {
  width: min(826px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}

.seo-copy.seo-copy-er {
  min-height: 514px;
}

.seo-copy.seo-copy-structure {
  min-height: 552px;
}

.seo-copy.seo-copy-source-doc h2,
.seo-copy.seo-copy-source-doc p,
.seo-copy.seo-copy-source-doc ol,
.seo-copy.seo-copy-source-doc h3,
.seo-copy.seo-copy-source-doc .keywords {
  max-width: 778px;
}

.seo-copy.seo-copy-source-doc ol {
  line-height: 1.8;
}

.seo-copy.seo-copy-source-doc ol li {
  margin-bottom: 12px;
}

.seo-copy.seo-copy-hide-faq ol li {
  margin-bottom: 12px;
}

.seo-copy.seo-copy-source-doc .keywords,
.seo-copy.seo-copy-hide-faq .keywords {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.seo-copy h2,
.seo-copy p,
.seo-copy ol {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.seo-copy h2 {
  margin-top: 0;
  font-size: 24px;
}

.seo-copy p,
.seo-copy ol {
  color: #64748b;
  line-height: 1.8;
}

.help-popover {
  position: fixed;
  top: 74px;
  left: 214px;
  z-index: 30;
  width: 300px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 13px;
}

.help-popover p {
  margin: 6px 0 0;
  color: #475569;
  line-height: 1.55;
}

.toast-layer {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 60;
  display: grid;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  min-width: 220px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  color: #111827;
  font-size: 13px;
  text-align: center;
}

.toast.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.toast.warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.toast.error {
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b;
}

.mobile-only {
  display: none;
}

@media (max-width: 980px) {
  .brand-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .brand-sidebar.open {
    transform: translateX(0);
  }

  .mobile-only {
    display: inline-grid;
  }

  .workspace {
    height: auto;
    min-height: calc(100vh - 64px);
    display: grid;
    grid-template-columns: 1fr;
  }

  .input-panel,
  .settings-panel {
    width: 100%;
    flex-basis: auto;
    border: 0;
    border-bottom: 1px solid var(--line);
  }

  .canvas-panel {
    min-height: 680px;
    order: 2;
  }

  .settings-panel {
    order: 3;
  }

  .collapse-handle {
    display: none;
  }

  .toolbar {
    left: 8px;
    right: 8px;
    flex-wrap: wrap;
  }

  .zoom-controls {
    top: 82px;
  }

  .drawer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .topbar {
    height: 54px;
  }

  .workspace {
    min-height: calc(100vh - 54px);
  }

  .canvas-panel {
    min-height: 620px;
  }

  .table-drawer {
    left: 8px;
    right: 8px;
    width: auto;
  }

  .toolbar {
    align-items: flex-start;
  }

  .storage-switch {
    width: 100%;
  }
}

/* Pixel-aligned replica overrides for the referenced ER tool page. */
body {
  background-color: #ffffff;
  background-image: radial-gradient(#eef0f4 0.8px, transparent 0.8px);
  background-size: 16px 16px;
  font-size: 14px;
}

.brand-sidebar {
  position: relative;
  width: 192px;
  flex: 0 0 192px;
  overflow: visible;
  border-right: 1px solid #eceef2;
  background: rgba(250, 250, 251, 0.88);
}

.brand-card {
  height: 48px;
  gap: 8px;
  margin: 8px;
  padding: 8px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  position: relative;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
}

.brand-mark::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 7px;
  width: 13px;
  height: 13px;
  border: 2px solid #28b7d7;
  border-right-color: #ff72a8;
  border-bottom-color: #37d979;
  border-radius: 50%;
  transform: rotate(-18deg);
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 5px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ff7ab6;
  box-shadow:
    15px -1px 0 #5b8cff,
    19px 8px 0 #22c55e,
    4px 18px 0 #f59e0b,
    16px 18px 0 #7c3aed,
    2px 9px 0 #38bdf8;
}

.brand-copy strong {
  font-size: 14px;
  font-weight: 700;
}

#toggleShellSidebar {
  position: absolute;
  left: 204px;
  top: 18px;
  width: 28px;
  height: 28px;
  margin-left: 0;
  font-size: 16px;
  z-index: 9;
}

.side-nav {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 8px 8px;
  scrollbar-width: none;
}

.side-nav::-webkit-scrollbar {
  display: none;
}

.brand-spacer {
  display: none;
}

.side-label {
  height: 32px;
  margin: 0;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9ca3af;
  font-size: 14px;
  line-height: 32px;
}

.side-label::before {
  width: 16px;
  flex: 0 0 16px;
  color: #111827;
  font-size: 14px;
  line-height: 1;
  text-align: center;
}

.side-label[data-section="nav"]::before {
  content: "⌘";
}

.side-label[data-section="draw"]::before {
  content: "◷";
}

.side-label[data-section="doc"]::before {
  content: "▣";
}

.side-label[data-section="other"]::before {
  content: "□";
}

.side-label[data-section="product"]::before {
  content: "⌘";
}

.side-label[data-section="account"]::before {
  content: "⌁";
}

.side-label[data-section="draw"]::after,
.side-label[data-section="doc"]::after,
.side-label[data-section="other"]::after,
.side-label[data-section="product"]::after,
.side-label[data-section="account"]::after {
  content: "⌄";
  margin-left: auto;
  color: #111827;
  font-size: 14px;
}

.nav-line {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 15px;
  padding: 0 8px;
  border-radius: 6px;
  color: #30333a;
  text-decoration: none;
  font-size: 14px;
  line-height: 28px;
  white-space: nowrap;
}

.nav-line[data-tool="app-center"] {
  height: 32px;
  margin-left: 0;
  line-height: 32px;
}

.side-label + .nav-line:not([data-tool="app-center"]),
.nav-line:not([data-tool="app-center"]) + .side-label {
  margin-top: 2px;
}

.nav-line::before {
  content: "□";
  width: 16px;
  flex: 0 0 16px;
  color: #111827;
  font-size: 14px;
  line-height: 1;
  text-align: center;
}

.nav-line[data-tool="app-center"]::before {
  content: "◷";
}

.nav-line[data-tool="er"]::before {
  content: "▣";
}

.nav-line[data-tool="function-structure"]::before {
  content: "◷";
}

.nav-line[data-tool="software-engineering"]::before,
.nav-line[data-tool="architecture"]::before,
.nav-line[data-tool="qixing-huitu"]::before {
  content: "▤";
}

.nav-line[data-tool="mindmap"]::before,
.nav-line[data-tool="ai-knowledge-graph"]::before {
  content: "◧";
}

.nav-line[data-tool="sql-three-line"]::before,
.nav-line[data-tool="smart-doc"]::before,
.nav-line[data-tool="use-case-doc"]::before,
.nav-line[data-tool="test-doc"]::before,
.nav-line[data-tool="word-table"]::before {
  content: "▥";
}

.nav-line[data-tool="course-code"]::before,
.nav-line[data-tool="code-runner"]::before,
.nav-line[data-tool="pseudocode"]::before {
  content: "⌘";
}

.nav-line[data-tool="aigc-check"]::before,
.nav-line[data-tool="aigc-reduce"]::before,
.nav-line[data-tool="paper-rewrite"]::before {
  content: "▧";
}

.nav-line[data-tool="wallet"]::before,
.nav-line[data-tool="membership"]::before {
  content: "♔";
}

.nav-line[data-tool="profile-center"]::before,
.nav-line[data-tool="my-files"]::before,
.nav-line[data-tool="help-center"]::before,
.nav-line[data-tool="feedback"]::before,
.nav-line[data-tool="activity-list"]::before {
  content: "◇";
}

.nav-line[data-tool="qixing-aippt"]::before {
  content: "P";
  font-size: 12px;
  font-weight: 700;
}

.nav-line:hover,
.nav-line.active {
  background: #f1f3f7;
}

.brand-sidebar.collapsed {
  box-sizing: border-box;
  width: 56px;
  flex-basis: 56px;
  transition: none;
  overflow: visible;
}

.brand-sidebar.collapsed .brand-card {
  position: relative;
  height: 54px;
  margin: 0;
  justify-content: center;
  padding: 8px 0;
}

.brand-sidebar.collapsed .brand-mark {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
}

.brand-sidebar.collapsed #toggleShellSidebar {
  position: absolute;
  right: -10px;
  top: 16px;
  z-index: 8;
  width: 20px;
  height: 24px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  font-size: 0;
}

.brand-sidebar.collapsed #toggleShellSidebar::before {
  content: "›";
  color: #111827;
  font-size: 16px;
  line-height: 1;
}

.brand-sidebar.collapsed .side-nav {
  padding: 6px 8px;
  overflow: hidden;
}

.brand-sidebar.collapsed .side-label {
  height: 1px;
  margin: 8px 0;
  overflow: hidden;
  background: #eef0f4;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

.brand-sidebar.collapsed .nav-line {
  width: 40px;
  height: 32px;
  justify-content: center;
  padding: 0;
  gap: 0;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}

.brand-sidebar.collapsed .nav-line::before {
  content: "•";
  color: #374151;
  font-size: 15px;
  line-height: 1;
}

.brand-sidebar.collapsed .nav-line[data-tool="app-center"]::before {
  content: "◎";
}

.brand-sidebar.collapsed .nav-line[data-tool="er"]::before {
  content: "ER";
  font-size: 11px;
  font-weight: 700;
}

.brand-sidebar.collapsed .nav-line[data-tool="function-structure"]::before {
  content: "结";
}

.brand-sidebar.collapsed .nav-line[data-tool="software-engineering"]::before {
  content: "图";
}

.brand-sidebar.collapsed .nav-line[data-tool="architecture"]::before {
  content: "架";
}

.brand-sidebar.collapsed .nav-line[data-tool="mindmap"]::before {
  content: "思";
}

.brand-sidebar.collapsed .nav-line[data-tool="sql-three-line"]::before {
  content: "SQL";
  font-size: 10px;
  font-weight: 700;
}

.brand-sidebar.collapsed .nav-line[data-tool="smart-doc"]::before,
.brand-sidebar.collapsed .nav-line[data-tool="use-case-doc"]::before,
.brand-sidebar.collapsed .nav-line[data-tool="test-doc"]::before,
.brand-sidebar.collapsed .nav-line[data-tool="word-table"]::before {
  content: "文";
}

.brand-sidebar.collapsed .nav-line[data-tool="course-code"]::before,
.brand-sidebar.collapsed .nav-line[data-tool="pseudocode"]::before {
  content: "码";
}

.brand-sidebar.collapsed .nav-line[data-tool="aigc-check"]::before,
.brand-sidebar.collapsed .nav-line[data-tool="aigc-reduce"]::before,
.brand-sidebar.collapsed .nav-line[data-tool="paper-rewrite"]::before {
  content: "论";
}

.brand-sidebar.collapsed .nav-line[data-tool="profile-center"]::before {
  content: "人";
}

.brand-sidebar.collapsed .nav-line[data-tool="wallet"]::before {
  content: "币";
}

.brand-sidebar.collapsed .nav-line[data-tool="membership"]::before {
  content: "会";
}

.brand-sidebar.collapsed .nav-line[data-tool="my-files"]::before {
  content: "件";
}

.brand-sidebar.collapsed .nav-line[data-tool="help-center"]::before {
  content: "?";
}

.brand-sidebar.collapsed .nav-line[data-tool="feedback"]::before {
  content: "馈";
}

.brand-sidebar.collapsed .nav-line[data-tool="activity-list"]::before {
  content: "动";
}

.brand-sidebar.collapsed .nav-line[data-tool="qixing-huitu"]::before {
  content: "图";
}

.brand-sidebar.collapsed .nav-line[data-tool="qixing-aippt"]::before {
  content: "PPT";
  font-size: 9px;
  font-weight: 700;
}

.brand-sidebar.collapsed .nav-line:not([data-tool]) {
  display: none;
}

.brand-sidebar.collapsed .hot,
.brand-sidebar.collapsed .new-badge,
.brand-sidebar.collapsed .paper-badge,
.brand-sidebar.collapsed .product-badge {
  display: none;
}

.brand-sidebar.collapsed .login-row {
  width: 40px;
  justify-content: center;
  margin: 7px 8px 8px;
  padding: 0;
}

.hot,
.new-badge,
.paper-badge,
.product-badge {
  flex: 0 0 auto;
  color: #ef4444;
  font-size: 11px;
  font-weight: 600;
}

.new-badge,
.paper-badge,
.product-badge {
  padding: 0 4px;
  border-radius: 999px;
  background: #fff1f2;
  line-height: 16px;
}

.paper-badge {
  color: #7c3aed;
  background: #f5f3ff;
}

.product-badge {
  color: #0f766e;
  background: #ecfdf5;
}

.login-row {
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  margin: 8px;
  padding: 8px;
  border-radius: 8px;
  color: #27272a;
}

.login-row span:last-child {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.login-row b {
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-row small {
  color: #9ca3af;
  font-size: 12px;
}

.avatar {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  border-radius: 8px;
  font-size: 12px;
}

.main {
  background: rgba(255, 255, 255, 0.64);
}

.topbar {
  height: 64px;
  padding: 0 12px;
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.72);
  color: #20242a;
}

.top-menu {
  flex: 0 0 32px;
}

.breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 14px;
  color: #2f3339;
}

.breadcrumbs span::after {
  content: ">";
  margin-left: 7px;
  color: #9ca3af;
}

.breadcrumbs strong {
  font-weight: 500;
}

.top-sep {
  width: 1px;
  height: 22px;
  background: #e5e7eb;
}

.top-storage {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: #30343a;
  font-size: 14px;
}

#lastSaveText {
  color: #6b7280;
  white-space: nowrap;
}

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 24px;
  color: #20242a;
  font-size: 14px;
}

.top-action-link {
  border: 0;
  background: transparent;
  color: #20242a;
  padding: 0;
  font: inherit;
}

.top-action-link:hover {
  color: #2563eb;
}

.workspace {
  height: calc(100vh - 64px);
  min-height: calc(100vh - 64px);
  border-top: 0;
}

.input-panel,
.settings-panel {
  height: calc(100vh - 64px);
  min-height: calc(100vh - 64px);
  border-color: #eceef2;
  background: rgba(255, 255, 255, 0.92);
}

.panel-inner {
  padding: 8px;
  gap: 8px;
}

.mode-row {
  height: 33px;
  gap: 5px;
}

.segmented {
  height: 32px;
  padding: 2px;
  border-radius: 8px;
  background: #f4f4f5;
}

.segment {
  height: 28px;
  border-radius: 7px;
  font-weight: 500;
}

.help-trigger {
  width: 32px;
  height: 32px;
  position: relative;
}

.help-trigger::before {
  content: "?";
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #a855f7;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.help-copy {
  position: absolute;
  left: 207px;
  top: 17px;
  color: #374151;
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
}

.examples {
  min-height: 22px;
  gap: 5px;
  margin-bottom: 3px;
}

.examples button {
  height: 22px;
  padding: 0 8px;
  border-color: #e9d5ff;
  color: #6d28d9;
  background: #faf5ff;
  font-size: 12px;
}

.editor-wrap {
  flex: 0 0 500px;
  height: 500px;
  min-height: 500px;
}

#sourceInput {
  height: 500px;
  min-height: 500px;
  padding: 9px 10px 30px;
  border-color: #e3e5ea;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: none;
  font-size: 14px;
  line-height: 1.55;
}

body[data-mode="ai"] #sourceInput::placeholder {
  color: #9ca3af;
}

.char-count {
  right: 9px;
  bottom: 8px;
  color: #9ca3af;
  background: transparent;
}

body[data-mode="ai"] .sql-actions {
  display: none;
}

body[data-mode="sql"] .examples,
body[data-mode="sql"] #aiNotice {
  display: none !important;
}

body[data-mode="sql"] .sql-actions {
  display: grid;
}

.primary-btn {
  height: 36px;
  border-radius: 7px;
  background: #0b0b0f;
  font-size: 14px;
  font-weight: 500;
}

.notice {
  padding: 6px 6px 0;
  align-items: flex-start;
  justify-content: flex-start;
}

.notice span {
  margin-top: 1px;
}

.canvas-panel {
  background: #ffffff;
}

.diagram .grid-bg {
  fill: #ffffff;
}

.canvas-status,
.zoom-controls {
  display: none;
}

.toolbar {
  top: 8px;
  right: 8px;
  height: 47px;
  gap: 2px;
  padding: 5px 7px;
  border-color: #e5e7eb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.storage-switch {
  height: 36px;
  align-items: center;
  gap: 4px;
  color: #71717a;
  font-size: 10px;
}

.switch {
  width: 32px;
  height: 18px;
}

.toolbar-sep {
  height: 22px;
  margin: 0 2px;
}

.tool-btn {
  width: 29px;
  height: 37px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1;
}

.tool-btn span {
  display: block;
  max-width: 34px;
  overflow: hidden;
  color: #6b7280;
  font-size: 9px;
  line-height: 10px;
  text-overflow: clip;
  white-space: nowrap;
}

.tool-btn.active {
  background: #eef2ff;
  color: #4f46e5;
}

.export-menu {
  top: 43px;
}

.diagram .edge {
  stroke: var(--edge-color, #000000);
  stroke-width: 1;
}

.diagram .edge.selected {
  stroke: #2563eb;
  stroke-width: 2;
}

.diagram .edge.dim,
.diagram .node.dim {
  opacity: 0.18;
}

.diagram .edge.highlight,
.diagram .node.highlight .node-shape {
  stroke: #7c3aed;
  stroke-width: 2;
}

.diagram .label {
  fill: #111827;
  font-size: var(--diagram-font-size, 14px);
}

.diagram .node-shape {
  stroke: #000000;
  stroke-width: 1;
  filter: none;
}

.diagram .relation .node-shape {
  fill: #ffffff;
}

.diagram text {
  fill: #000000;
  font-size: var(--diagram-font-size, 14px);
}

.right-tabs {
  height: 35px;
  margin: 3px 4px 8px;
  padding: 3px;
  border-radius: 8px;
}

.right-tabs button {
  height: 29px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 500;
}

.right-content {
  height: calc(100% - 46px);
  padding: 13px 12px 14px;
}

.tool-section {
  gap: 8px;
  margin-bottom: 15px;
  font-size: 14px;
}

.tool-section > label:first-child,
.tool-section > label {
  color: #333740;
  font-weight: 500;
}

.color-tools label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-panel .right-content > .tool-section {
  position: relative;
  margin-bottom: 8px;
  font-size: 12px;
}

.settings-panel .right-content > .color-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 24px;
  margin-bottom: 12px;
}

.settings-panel .right-content > .tool-section:not(.color-tools):not(.table-drawer) {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
}

.settings-panel .right-content > .tool-section:nth-of-type(2),
.settings-panel .right-content > .tool-section:nth-of-type(4) {
  min-height: 36px;
}

.settings-panel .right-content > .tool-section:nth-of-type(2) {
  margin-bottom: 12px;
}

.settings-panel .right-content > .tool-section:nth-of-type(5) {
  min-height: 20px;
  margin-bottom: 18px;
}

.settings-panel .right-content > .tool-section:nth-of-type(6) {
  display: block;
  margin-bottom: 25px;
}

.settings-panel .right-content > .tool-section > label:first-child,
.settings-panel .right-content > .tool-section > label {
  font-size: 12px;
  line-height: 16px;
}

.tool-section input[type="color"] {
  width: 24px;
  height: 24px;
  padding: 1px;
}

.tool-section select,
.tool-section input[type="text"],
.tool-section input[type="number"] {
  height: 32px;
  border-color: #dfe3eb;
  border-radius: 6px;
  font-size: 14px;
}

.settings-panel .right-content > .tool-section:nth-of-type(2) select {
  width: 106px;
}

.settings-panel .right-content > .tool-section:nth-of-type(4) select {
  width: 79px;
}

.settings-panel .right-content > .tool-section input[type="number"] {
  width: 64px;
}

.purple-tip {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid #eadcff;
  border-radius: 8px;
  background: #faf5ff;
  color: #7c3aed;
  font-size: 12px;
  line-height: 1.45;
}

.settings-panel .right-content > .tool-section .purple-tip:not(.dismissable) {
  position: absolute;
  top: -36px;
  left: 20px;
  z-index: 2;
  width: 185px;
  min-height: 28px;
  padding: 5px 10px;
  line-height: 18px;
  text-align: center;
}

.compact-row {
  grid-template-columns: 1fr 74px;
}

.radio-row {
  gap: 18px;
}

.settings-panel .radio-row {
  align-items: center;
  gap: 14px;
}

.shape-tools.two-shapes {
  grid-template-columns: repeat(2, 1fr);
}

.settings-panel .shape-tools.two-shapes {
  margin-top: 8px;
}

.shape-tools button {
  min-height: 34px;
  border-radius: 7px;
  background: #ffffff;
}

.table-drawer {
  position: static;
  width: auto;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.settings-panel .table-drawer {
  display: block;
  font-size: 12px;
}

.table-drawer.collapsed .drawer-grid {
  display: grid;
}

.section-help {
  margin: -2px 0 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.4;
}

.drawer-head {
  display: grid;
  grid-template-columns: 58px 1fr 1fr;
  gap: 8px;
}

.primary-small {
  height: 32px;
  padding: 0 11px;
  border-radius: 7px;
  background: #ffffff;
  color: #27272a;
  border: 1px solid #e5e7eb;
  box-shadow: none;
}

.primary-small.active,
.primary-small:hover {
  background: #0b0b0f;
  color: #ffffff;
}

.tiny-toggle {
  min-height: 32px;
  justify-content: center;
  gap: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  background: #ffffff;
  color: #27272a;
  font-size: 13px;
}

.tiny-toggle input {
  accent-color: #0b0b0f;
}

.dismissable {
  display: grid;
  gap: 8px;
}

.dismissable button {
  justify-self: end;
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: #7c3aed;
  color: #ffffff;
  font-size: 12px;
}

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

.table-pill {
  min-height: 32px;
  border: 1px solid #e9d5ff;
  border-radius: 8px;
  background: #fbf8ff;
  color: #7c3aed;
  font-size: 13px;
}

.table-pill.active,
.table-pill:hover {
  border-color: #7c3aed;
  background: #f3e8ff;
}

.clear-row {
  margin-top: 18px;
}

.floating-shortcut {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #8557ff, #18c8c8);
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(79, 70, 229, 0.28);
  font-size: 22px;
}

.floating-shortcut span {
  position: absolute;
  right: -2px;
  top: -3px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  line-height: 18px;
}

.tool-workspace {
  position: relative;
  display: flex;
  height: calc(100vh - 64px);
  min-height: 916px;
  border-top: 0;
}

.tool-input-panel {
  width: 330px;
  flex: 0 0 330px;
  border-right: 1px solid #eceef2;
  background: rgba(255, 255, 255, 0.94);
}

.tool-panel-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.tool-title-block {
  display: grid;
  gap: 6px;
}

.tool-title-block span {
  color: #8b95a5;
  font-size: 13px;
}

.tool-title-block h2 {
  margin: 0;
  color: #20242a;
  font-size: 22px;
  line-height: 1.25;
}

.tool-title-block p {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}

.generic-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}

.generic-examples button {
  height: 26px;
  padding: 0 10px;
  border: 1px solid #e9d5ff;
  border-radius: 999px;
  background: #faf5ff;
  color: #7c3aed;
  font-size: 12px;
}

.generic-label {
  color: #374151;
  font-weight: 600;
}

#genericInput {
  width: 100%;
  flex: 1;
  min-height: 420px;
  resize: none;
  border: 1px solid #e3e5ea;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  padding: 12px;
  outline: none;
  font-size: 14px;
  line-height: 1.6;
}

#genericInput:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.16);
}

.generic-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.notice.compact {
  padding: 4px 0;
}

.generic-output-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.generic-toolbar {
  height: 56px;
  flex: 0 0 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid #eceef2;
  background: rgba(255, 255, 255, 0.88);
}

.generic-toolbar strong {
  color: #20242a;
  font-size: 15px;
}

.generic-toolbar > div {
  display: flex;
  gap: 8px;
}

.generic-result {
  flex: 1;
  overflow: auto;
  padding: 24px;
  color: #111827;
  line-height: 1.72;
}

.generic-result h2,
.generic-result h3,
.generic-result h4 {
  margin: 0 0 10px;
  color: #111827;
  line-height: 1.35;
}

.generic-result h2 {
  font-size: 24px;
}

.generic-result h3 {
  margin-top: 18px;
  font-size: 18px;
}

.generic-result h4 {
  margin-top: 14px;
  font-size: 15px;
}

.generic-result p {
  margin: 0 0 10px;
}

.generic-result ul,
.generic-result ol {
  margin: 0 0 14px 22px;
  padding: 0;
}

.generic-result table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 18px;
  font-size: 13px;
}

.generic-result th,
.generic-result td {
  border: 1px solid #d9dce3;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.generic-result th {
  background: #f4f6f9;
  color: #1f2937;
}

.diagram-output {
  display: grid;
  place-items: center;
  min-height: 620px;
}

.diagram-output svg {
  width: min(100%, 980px);
  min-height: 540px;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  background: #ffffff;
}

.tool-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.tool-card {
  min-height: 112px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.tool-card strong {
  display: block;
  margin-bottom: 6px;
  color: #111827;
}

.tool-card span {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}

.seo-copy {
  margin-top: 48px;
}

.seo-copy h3,
.seo-copy .keywords {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.seo-copy h3 {
  margin-top: 22px;
  margin-bottom: 6px;
  color: #0f172a;
  font-size: 18px;
}

@media (max-width: 900px) {
  .help-copy,
  .top-storage,
  .top-actions {
    display: none;
  }

  .workspace,
  .input-panel,
  .settings-panel {
    min-height: 0;
    height: auto;
  }

  .editor-wrap,
  #sourceInput {
    height: 360px;
    min-height: 360px;
  }
}

/* Source-site replica layouts for every non-ER tool. */
.tool-workspace.source-apps,
.tool-workspace.source-doc-sql,
.tool-workspace.source-doc-agent,
.tool-workspace.source-doc-usecase,
.tool-workspace.source-doc-test,
.tool-workspace.source-doc-table,
.tool-workspace.source-doc-code,
.tool-workspace.source-doc-tutor,
.tool-workspace.source-doc-code-runner,
.tool-workspace.source-doc-poster,
.tool-workspace.source-doc-pseudo,
.tool-workspace.source-paper-check,
.tool-workspace.source-paper-lower,
.tool-workspace.source-paper-rewrite {
  display: block;
  height: auto;
  min-height: calc(100vh - 64px);
}

.tool-workspace.source-apps .tool-input-panel,
.tool-workspace.source-apps .generic-toolbar,
.tool-workspace.source-doc-sql .tool-input-panel,
.tool-workspace.source-doc-sql .generic-toolbar,
.tool-workspace.source-doc-agent .tool-input-panel,
.tool-workspace.source-doc-agent .generic-toolbar,
.tool-workspace.source-doc-usecase .tool-input-panel,
.tool-workspace.source-doc-usecase .generic-toolbar,
.tool-workspace.source-doc-test .tool-input-panel,
.tool-workspace.source-doc-test .generic-toolbar,
.tool-workspace.source-doc-table .tool-input-panel,
.tool-workspace.source-doc-table .generic-toolbar,
.tool-workspace.source-doc-code .tool-input-panel,
.tool-workspace.source-doc-code .generic-toolbar,
.tool-workspace.source-doc-tutor .tool-input-panel,
.tool-workspace.source-doc-tutor .generic-toolbar,
.tool-workspace.source-doc-code-runner .tool-input-panel,
.tool-workspace.source-doc-code-runner .generic-toolbar,
.tool-workspace.source-doc-poster .tool-input-panel,
.tool-workspace.source-doc-poster .generic-toolbar,
.tool-workspace.source-doc-pseudo .tool-input-panel,
.tool-workspace.source-doc-pseudo .generic-toolbar,
.tool-workspace.source-paper-check .tool-input-panel,
.tool-workspace.source-paper-check .generic-toolbar,
.tool-workspace.source-paper-lower .tool-input-panel,
.tool-workspace.source-paper-lower .generic-toolbar,
.tool-workspace.source-paper-rewrite .tool-input-panel,
.tool-workspace.source-paper-rewrite .generic-toolbar,
.tool-workspace.source-structure .tool-input-panel,
.tool-workspace.source-structure .generic-toolbar,
.tool-workspace.source-mindmap .tool-input-panel,
.tool-workspace.source-mindmap .generic-toolbar,
.tool-workspace.source-uml .tool-input-panel,
.tool-workspace.source-uml .generic-toolbar {
  display: none;
}

.tool-workspace.source-apps .generic-output-panel,
.tool-workspace.source-doc-sql .generic-output-panel,
.tool-workspace.source-doc-agent .generic-output-panel,
.tool-workspace.source-doc-usecase .generic-output-panel,
.tool-workspace.source-doc-test .generic-output-panel,
.tool-workspace.source-doc-table .generic-output-panel,
.tool-workspace.source-doc-code .generic-output-panel,
.tool-workspace.source-doc-tutor .generic-output-panel,
.tool-workspace.source-doc-code-runner .generic-output-panel,
.tool-workspace.source-doc-poster .generic-output-panel,
.tool-workspace.source-doc-pseudo .generic-output-panel,
.tool-workspace.source-paper-check .generic-output-panel,
.tool-workspace.source-paper-lower .generic-output-panel,
.tool-workspace.source-paper-rewrite .generic-output-panel,
.tool-workspace.source-structure .generic-output-panel,
.tool-workspace.source-mindmap .generic-output-panel,
.tool-workspace.source-uml .generic-output-panel {
  display: block;
  min-height: calc(100vh - 64px);
  background: transparent;
}

.tool-workspace.source-apps .generic-result,
.tool-workspace.source-doc-sql .generic-result,
.tool-workspace.source-doc-agent .generic-result,
.tool-workspace.source-doc-usecase .generic-result,
.tool-workspace.source-doc-test .generic-result,
.tool-workspace.source-doc-table .generic-result,
.tool-workspace.source-doc-code .generic-result,
.tool-workspace.source-doc-tutor .generic-result,
.tool-workspace.source-doc-code-runner .generic-result,
.tool-workspace.source-doc-poster .generic-result,
.tool-workspace.source-doc-pseudo .generic-result,
.tool-workspace.source-paper-check .generic-result,
.tool-workspace.source-paper-lower .generic-result,
.tool-workspace.source-paper-rewrite .generic-result,
.tool-workspace.source-structure .generic-result,
.tool-workspace.source-mindmap .generic-result,
.tool-workspace.source-uml .generic-result {
  min-height: calc(100vh - 64px);
  padding: 0;
  overflow: visible;
}

.source-apps-page {
  width: min(1138px, calc(100vw - 240px));
  margin: 0 auto;
  padding: 24px 0 42px;
}

.main.app-center-mode .topbar {
  display: none;
}

.main.app-center-mode .tool-workspace,
.main.app-center-mode .generic-output-panel,
.main.app-center-mode .generic-result {
  min-height: 100vh;
}

.main.app-center-mode .source-apps-page {
  padding-top: 37px;
}

.source-apps-page h1 {
  margin: 0 0 26px;
  text-align: center;
  color: #1f2937;
  font-size: 30px;
  line-height: 1.25;
}

.source-apps-page h1 small {
  margin-left: 8px;
  color: #4b5563;
  font-size: 18px;
  font-weight: 400;
}

.source-app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

body.source-auth-gate {
  overflow-x: hidden;
  background: #eaf4ff;
  background-image: none;
}

body.source-auth-gate .app-shell {
  display: block;
  min-height: 100vh;
}

body.source-auth-gate .brand-sidebar,
body.source-auth-gate .topbar,
body.source-auth-gate .tool-input-panel,
body.source-auth-gate .generic-toolbar,
body.source-auth-gate .seo-copy,
body.source-auth-gate .floating-shortcut {
  display: none !important;
}

body.source-auth-gate .main {
  display: contents;
}

body.source-auth-gate .tool-workspace,
body.source-auth-gate .generic-output-panel,
body.source-auth-gate .generic-result {
  display: block;
  width: 100%;
  min-height: 100vh;
  padding: 0;
  overflow: visible;
  background: transparent;
}

.source-sso-page {
  position: relative;
  min-height: 971px;
  display: grid;
  grid-template-columns: 640px 448px;
  column-gap: 87px;
  padding: 32px 96px 72px;
  color: #1f2937;
  background: linear-gradient(90deg, #edf7ff 0%, #e8f4ff 54%, #dcecff 100%);
}

.source-sso-left {
  padding-top: 123px;
}

.source-sso-atom {
  position: relative;
  width: 42px;
  height: 42px;
  margin: 0 auto 35px;
}

.source-sso-atom i,
.source-sso-atom b {
  position: absolute;
  inset: 8px;
  border: 2px solid #a78bfa;
  border-radius: 50%;
}

.source-sso-atom i:nth-child(1) {
  transform: rotate(26deg) scaleX(1.55);
}

.source-sso-atom i:nth-child(2) {
  border-color: #60a5fa;
  transform: rotate(-26deg) scaleX(1.55);
}

.source-sso-atom i:nth-child(3) {
  border-color: #f472b6;
  transform: rotate(90deg) scaleX(1.45);
}

.source-sso-atom b {
  inset: 18px;
  border: 0;
  background: #7c3aed;
}

.source-sso-left > h1 {
  margin: 0 0 24px;
  text-align: center;
  color: #1f2937;
  font-size: 30px;
  line-height: 1.72;
  font-weight: 900;
  letter-spacing: 0;
}

.source-sso-products {
  display: grid;
  gap: 28px;
  margin-top: 18px;
}

.source-sso-product {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 17px;
  align-items: start;
}

.source-sso-product-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #c8f7d9;
  color: #10a34a;
  font-size: 16px;
  font-weight: 900;
}

.source-sso-product-icon::before {
  content: "";
  width: 17px;
  height: 17px;
  background: currentColor;
}

.source-sso-product-icon.icon-cap::before {
  clip-path: polygon(50% 3%, 98% 25%, 50% 48%, 2% 25%);
  box-shadow: 0 8px 0 -3px currentColor;
}

.source-sso-product-icon.icon-nodes::before {
  width: 20px;
  height: 16px;
  clip-path: polygon(10% 20%, 30% 20%, 30% 40%, 10% 40%, 10% 20%, 70% 20%, 90% 20%, 90% 40%, 70% 40%, 70% 20%, 40% 62%, 60% 62%, 60% 82%, 40% 82%, 40% 62%);
}

.source-sso-product-icon.icon-pin::before {
  clip-path: polygon(50% 0, 76% 16%, 76% 48%, 50% 100%, 24% 48%, 24% 16%);
}

.source-sso-product-icon.icon-code::before {
  content: "</>";
  width: auto;
  height: auto;
  background: none;
  font-size: 14px;
  letter-spacing: 0;
}

.source-sso-product-icon.icon-plus::before {
  content: "+";
  width: auto;
  height: auto;
  background: none;
  font-size: 22px;
  line-height: 1;
}

.source-sso-product h2 {
  margin: 1px 0 6px;
  color: #1f2937;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
}

.source-sso-product p {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.48;
}

.source-sso-panel {
  width: 448px;
  min-height: 751px;
  padding: 68px 32px 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 24px 48px rgba(31, 41, 55, 0.12);
  text-align: center;
}

.source-sso-panel > h2 {
  margin: 0 0 12px;
  color: #0b63df;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
}

.source-sso-panel > p {
  margin: 0;
  color: #1a73e8;
  font-size: 14px;
  line-height: 1.4;
}

.source-sso-card {
  width: 384px;
  height: 486px;
  margin: 27px auto 29px;
  padding: 36px 32px 24px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 32px rgba(31, 41, 55, 0.12);
}

.source-sso-card h3 {
  margin: 0 0 13px;
  color: #1f2937;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
}

.source-sso-card span,
.source-sso-card small {
  display: block;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.45;
}

.source-sso-qr {
  width: 212px;
  height: 212px;
  display: grid;
  place-items: center;
  margin: 47px auto 23px;
  padding: 13px;
  background: #ffffff;
}

.source-sso-qr svg {
  width: 186px;
  height: 186px;
  display: block;
  image-rendering: pixelated;
}

.source-sso-qr.pulse {
  animation: ssoQrPulse 280ms ease;
}

.source-sso-card button,
.source-sso-alt {
  border: 0;
  background: transparent;
  color: #1a73e8;
  font-size: 14px;
}

.source-sso-card button {
  margin-top: 15px;
}

.source-sso-card button::before {
  content: "○";
  margin-right: 6px;
  color: #1a73e8;
}

.source-sso-alt {
  display: inline-block;
  margin-top: 0;
}

.source-sso-policy {
  margin-top: 26px !important;
  color: #18a58c !important;
  font-size: 12px !important;
}

.source-sso-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 39px;
  text-align: center;
  color: #4b5563;
  font-size: 14px;
}

@keyframes ssoQrPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.97);
  }
  100% {
    transform: scale(1);
  }
}

.source-app-card {
  height: 306px;
  overflow: hidden;
  border: 1px solid #eef0f4;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.source-app-visual {
  height: 126px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #ffffff;
  color: #111827;
}

.source-app-visual svg {
  width: 220px;
  height: 126px;
}

.source-app-body {
  height: 180px;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 8px;
  padding: 15px 16px 16px;
}

.source-app-body h2 {
  margin: 0;
  overflow: hidden;
  color: #182031;
  font-size: 20px;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.source-app-body p {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.source-tags {
  display: flex;
  gap: 8px;
}

.source-tags span {
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff1f7;
  color: #ff6aa4;
  font-size: 11px;
  line-height: 20px;
}

.source-tags span + span {
  background: #eaffef;
  color: #37c06b;
}

.source-app-body button {
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-size: 14px;
}

.visual-lower {
  background: #fff8c5;
}

.visual-paper {
  background: #bbe1fb;
}

.visual-test {
  background: #7c63d9;
}

.visual-tutor {
  background: #ffffff;
}

.poster-big {
  color: #000;
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 0;
}

.poster-big.lower-mark {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, transparent 48.5%, rgba(209, 213, 219, 0.6) 49%, rgba(209, 213, 219, 0.6) 50%, transparent 50.5%),
    linear-gradient(45deg, transparent 48.5%, rgba(209, 213, 219, 0.5) 49%, rgba(209, 213, 219, 0.5) 50%, transparent 50.5%);
  color: transparent;
  font-size: 0;
}

.poster-big.lower-mark::before {
  content: "降AIGC";
  width: 200px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ffdf5a;
  color: #000000;
  font-size: 42px;
  font-weight: 900;
  transform: rotate(-2deg);
}

.poster-big.lower-mark::after {
  content: "";
  position: absolute;
  inset: 12px auto 14px -8px;
  width: 12px;
  border-left: 4px solid #111827;
  border-right: 2px solid #ef4444;
  transform: skewY(-12deg);
}

.poster-big.blue {
  font-size: 44px;
}

.poster-big.purple,
.poster-big.yellow {
  color: #ffffff;
  font-size: 39px;
  line-height: 1.08;
  text-align: center;
}

.poster-big.yellow {
  color: #174ea6;
  text-shadow: 2px 2px 0 #ffe14f;
}

.poster-preview {
  width: 176px;
  height: 96px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, #111827 0%, #2563eb 52%, #f97316 100%);
  color: #ffffff;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.poster-preview strong {
  font-size: 24px;
  line-height: 1;
}

.poster-preview span,
.poster-preview em {
  font-size: 12px;
  font-style: normal;
}

.poster-preview em {
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ffffff;
  color: #1d4ed8;
  font-weight: 700;
}

.mini-table,
.mini-doc,
.code-preview,
.code-form-preview,
.upload-card,
.doc-preview,
.smart-doc-preview,
.mind-preview,
.structure-preview,
.arch-preview,
.diagram-preview,
.dataflow-preview,
.swimlane-preview {
  width: 86%;
  height: 86%;
  display: grid;
  place-content: center;
  gap: 6px;
  color: #111827;
  font-size: 12px;
}

.mini-table span,
.mini-doc span,
.doc-preview span,
.code-preview span,
.code-form-preview span {
  border-bottom: 1px solid #d1d5db;
}

.mini-table {
  align-content: center;
  gap: 5px;
  text-align: left;
}

.mini-table b {
  text-align: center;
}

.upload-card {
  border: 1px dashed #93c5fd;
  background: #eff6ff;
  text-align: center;
}

.upload-card em {
  color: #2563eb;
  font-size: 30px;
  font-style: normal;
}

.code-preview {
  align-content: start;
  gap: 8px;
  padding: 14px;
  border: 1px solid #eef0f4;
  background: #ffffff;
  color: #111827;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

.code-preview span {
  height: 12px;
  border-radius: 3px;
  background: #f3f4f6;
}

.code-preview span:nth-child(1) {
  width: 84%;
}

.code-preview span:nth-child(2) {
  width: 94%;
}

.code-preview span:nth-child(3) {
  width: 70%;
}

.code-preview code {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  font-family: Menlo, Consolas, monospace;
  font-size: 11px;
}

.code-preview small {
  color: #6b7280;
  font-size: 10px;
}

.code-form-preview {
  width: 100%;
  height: 100%;
  align-content: start;
  gap: 7px;
  padding: 15px 20px 10px;
  border-right: 1px solid #edf2f7;
  border-left: 1px solid #edf2f7;
  background:
    radial-gradient(circle at 12% 18%, rgba(37, 99, 235, 0.06), transparent 24%),
    #ffffff;
  color: #111827;
}

.code-form-preview b {
  text-align: center;
  color: #334155;
  font-size: 9px;
  font-weight: 700;
}

.code-form-preview span {
  height: 13px;
  border: 1px solid #eef0f4;
  border-radius: 2px;
  background: #ffffff;
}

.code-form-preview i {
  height: 10px;
  border-radius: 2px;
  background: #f1f5f9;
}

.smart-doc-preview {
  width: 100%;
  height: 100%;
  align-content: start;
  justify-items: center;
  padding: 14px 0 0;
  background: #ffffff;
}

.smart-doc-preview strong {
  color: #6d38ff;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.05;
}

.smart-doc-preview span {
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

.smart-doc-preview b {
  width: 100%;
  height: 32px;
  margin-top: 13px;
  display: grid;
  place-items: center;
  background: #f5f6f8;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
}

.mind-preview,
.structure-preview,
.arch-preview,
.diagram-preview {
  position: relative;
}

.mind-preview span,
.structure-preview span,
.arch-preview span,
.diagram-preview span,
.mind-preview b,
.structure-preview b {
  display: block;
  padding: 7px 9px;
  border: 1px solid #111827;
  border-radius: 6px;
  background: #fff;
}

.arch-preview {
  grid-template-columns: repeat(2, 86px);
}

.blank-visual {
  width: 18px;
  height: 14px;
  overflow: hidden;
  border: 2px solid #9ca3af;
  border-radius: 999px;
  color: transparent;
  font-size: 0;
}

.dataflow-preview,
.swimlane-preview {
  width: 100%;
  height: 100%;
  display: block;
}

.tool-workspace.source-structure,
.tool-workspace.source-mindmap,
.tool-workspace.source-uml {
  display: block;
  height: calc(100vh - 64px);
  min-height: 760px;
}

.tool-workspace.source-mindmap,
.tool-workspace.source-mindmap .generic-output-panel,
.tool-workspace.source-mindmap .generic-result,
.source-mindmap-shell {
  height: calc(100vh - 64px);
  min-height: 0;
  overflow: hidden;
}

.source-draw-shell,
.source-uml-shell {
  position: relative;
  display: grid;
  grid-template-columns: 250px 1fr 250px;
  min-height: calc(100vh - 64px);
}

.source-draw-shell {
  transition: grid-template-columns 180ms ease;
}

.source-draw-shell.left-collapsed {
  grid-template-columns: 36px 1fr 250px;
}

.source-draw-shell.right-collapsed {
  grid-template-columns: 250px 1fr 36px;
}

.source-draw-shell.left-collapsed.right-collapsed {
  grid-template-columns: 36px 1fr 36px;
}

.source-draw-shell.left-collapsed .source-left-panel > :not(.source-collapse),
.source-draw-shell.right-collapsed .source-right-panel > :not(.source-collapse) {
  visibility: hidden;
  pointer-events: none;
}

.source-draw-shell.left-collapsed .source-collapse {
  right: 4px;
}

.source-draw-shell.right-collapsed .source-right-collapse {
  left: 4px;
}

.source-left-panel,
.source-right-panel,
.source-uml-left {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.94);
}

.source-mindmap-shell .source-left-panel,
.source-mindmap-shell .source-right-panel,
.source-mindmap-shell .source-canvas-wrap {
  height: 100%;
  overflow: auto;
}

.source-left-panel,
.source-uml-left {
  border-right: 1px solid #eceef2;
}

.source-right-panel {
  border-left: 1px solid #eceef2;
  padding: 18px 14px;
}

.source-panel-title {
  display: block;
  padding: 7px 8px 4px;
  color: #111827;
  font-weight: 700;
  text-align: center;
}

.source-structure-text {
  width: calc(100% - 16px);
  height: 318px;
  margin: 0 8px;
  resize: none;
  border: 1px solid #dfe3ea;
  background: rgba(255, 255, 255, 0.76);
  color: #111827;
  outline: none;
  font-size: 14px;
  line-height: 1.55;
}

.source-mindmap-shell .source-structure-text {
  height: 322px;
}

.source-mindmap-shell .source-ai-title {
  margin-top: -16px;
}

.source-ai-title {
  margin-top: 10px;
  font-size: 16px;
}

.source-ai-input {
  width: calc(100% - 16px);
  height: 402px;
  margin: 0 8px 12px;
  resize: none;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  outline: none;
  color: #111827;
  line-height: 1.55;
}

.source-structure-shell .source-ai-input {
  height: 325px;
}

.source-mindmap-shell .source-ai-input {
  height: 350px;
}

.source-black-btn,
.source-button-grid button {
  height: 36px;
  border: 0;
  border-radius: 7px;
  background: #171717;
  color: #fff;
}

.source-black-btn {
  width: calc(100% - 16px);
  margin: 0 8px;
}

.source-ai-notice {
  padding: 12px 12px 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.source-collapse {
  position: absolute;
  right: -15px;
  top: 50%;
  z-index: 4;
  width: 28px;
  height: 48px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #111827;
}

.source-right-collapse {
  left: -15px;
  right: auto;
}

.source-canvas-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: auto;
}

.source-canvas-wrap::after {
  content: attr(data-watermark);
  position: absolute;
  right: 28px;
  bottom: 22px;
  color: rgba(148, 163, 184, 0.34);
  font-size: 18px;
  font-weight: 700;
  pointer-events: none;
}

.source-canvas-wrap.watermark-off::after {
  display: none;
}

.source-mindmap-shell .source-canvas-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%27240%27%20height%3D%27140%27%20viewBox%3D%270%200%20240%20140%27%3E%3Cg%20transform%3D%27translate%2820%2030%29%20rotate%2835%29%27%20fill%3D%27%239ca3af%27%20fill-opacity%3D%270.32%27%20font-family%3D%27Arial%2C%20sans-serif%27%20font-size%3D%2717%27%3E%3Ctext%3E%E6%A0%A1%E5%9B%AD%E5%B0%8F%E5%8A%A9%E6%89%8B%3C/text%3E%3C/g%3E%3C/svg%3E");
  background-size: 240px 140px;
  z-index: 0;
}

.source-mindmap-shell .source-canvas-wrap.watermark-off::before {
  display: none;
}

.source-mindmap-shell .source-canvas-wrap::after {
  display: none;
}

.source-structure-svg {
  width: min(100%, 1080px);
  aspect-ratio: 1268 / 692;
  height: auto;
  max-height: calc(100vh - 118px);
}

.source-structure-svg .structure-node,
.source-mindmap-svg .mindmap-node,
[data-source-svg="uml"] .uml-edit-node {
  cursor: text;
}

.source-structure-svg .structure-node:hover rect,
.source-mindmap-svg .mindmap-node:hover rect,
[data-source-svg="uml"] .uml-edit-node:hover rect,
[data-source-svg="uml"] .uml-edit-node:hover ellipse,
[data-source-svg="uml"] .uml-edit-node:hover circle,
[data-source-svg="uml"] .uml-edit-node:hover path:first-child {
  stroke: #2563eb;
  stroke-width: 2;
}

.structure-node-editor {
  position: absolute;
  z-index: 6;
  height: 32px;
  transform: translate(-50%, -50%);
  border: 1px solid #2563eb;
  border-radius: 6px;
  background: #ffffff;
  padding: 0 8px;
  color: #111827;
  font-size: 14px;
  text-align: center;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
}

.source-mindmap-svg {
  width: min(86%, 860px);
  height: 560px;
  position: relative;
  z-index: 1;
}

[data-source-svg] {
  transition: transform 180ms ease;
}

.source-right-panel h3 {
  margin: 0 0 14px;
  color: #1f2937;
  font-size: 16px;
}

.source-right-panel h3:not(:first-child) {
  margin-top: 18px;
}

.source-zoom-row,
.source-setting-row {
  display: grid;
  grid-template-columns: 1fr 38px 54px 38px;
  gap: 6px;
  align-items: center;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 13px;
}

.source-zoom-row button,
.source-setting-row input,
.source-setting-row select,
.source-bold-btn {
  height: 32px;
  min-width: 0;
  border: 1px solid #d4dbe6;
  border-radius: 6px;
  background: #fff;
  color: #111827;
}

.source-bold-btn.active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.source-button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.source-setting-row {
  grid-template-columns: 64px 38px 64px 44px;
}

.source-setting-row span {
  white-space: nowrap;
}

.source-setting-row.full {
  grid-template-columns: 64px 1fr;
}

.source-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.source-setting-row input[type="number"] {
  padding: 0 4px;
  text-align: center;
}

.source-soft-btn {
  width: 100%;
  height: 36px;
  border: 0;
  border-radius: 9px;
  color: #111827;
  text-align: left;
  padding: 0 14px;
}

.source-soft-btn.blue {
  background: #eef5ff;
}

.source-soft-btn.green {
  background: #ecfdf3;
}

.source-soft-btn.purple {
  background: #faf5ff;
}

.source-inline-label,
.source-range {
  display: grid;
  gap: 6px;
  margin: 8px 0;
  color: #64748b;
  font-size: 13px;
}

.source-inline-label input[type="text"] {
  height: 32px;
  border: 1px solid #d4dbe6;
  border-radius: 8px;
  padding: 0 10px;
}

.source-uml-shell {
  grid-template-columns: 250px 1fr;
}

.source-uml-left {
  padding: 24px 16px;
}

.source-draw-ad {
  margin-bottom: 22px;
  padding: 14px 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, #121212 0%, #121212 55%, #f97316 56%, #fb923c 100%);
  color: #fff;
  line-height: 1.55;
}

.source-uml-left label {
  display: block;
  margin: 14px 0 8px;
  font-weight: 700;
  text-align: center;
}

.source-segment,
.source-wide-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border-radius: 9px;
  background: #f0f0f1;
  padding: 2px;
}

.source-segment button,
.source-wide-tabs button {
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #111827;
}

.source-segment button.active,
.source-wide-tabs button.active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.source-uml-left select,
.source-uml-left textarea {
  width: 100%;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  background: #fff;
}

.source-uml-left select {
  height: 36px;
  padding: 0 10px;
}

.source-uml-left textarea {
  height: 318px;
  resize: none;
  padding: 12px;
}

.source-uml-canvas {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100vh - 64px);
  cursor: zoom-in;
}

.source-uml-canvas p {
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  text-align: center;
  color: #64748b;
}

.source-uml-canvas svg {
  width: min(760px, 80%);
  height: 460px;
  cursor: default;
}

.source-uml-canvas.modern svg g rect {
  rx: 14px;
  filter: drop-shadow(0 8px 18px rgba(15, 23, 42, 0.12));
}

.source-export-top {
  position: absolute;
  top: 18px;
  right: 42px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #111827;
  font-weight: 600;
}

.source-seo-block {
  padding: 42px 24px;
  background: #fff;
}

.source-seo-block h2,
.source-seo-block p {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.main.app-center-mode .seo-copy {
  display: none;
}

.poster-card-output {
  width: min(100%, 620px);
  min-height: 360px;
  display: grid;
  align-content: center;
  gap: 16px;
  margin: 18px auto;
  padding: 42px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #111827 0%, #1d4ed8 56%, #fb923c 100%);
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.poster-card-output .poster-kicker {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  letter-spacing: 0;
}

.poster-card-output strong {
  max-width: 11em;
  color: #ffffff;
  font-size: 42px;
  line-height: 1.12;
}

.poster-card-output p,
.poster-card-output small {
  max-width: 32em;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.poster-card-output div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.poster-card-output b {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 13px;
}

.poster-card-output em {
  width: fit-content;
  padding: 10px 18px;
  border-radius: 999px;
  background: #ffffff;
  color: #1d4ed8;
  font-style: normal;
  font-weight: 700;
}

.source-doc-page,
.source-paper-page {
  width: 826px;
  max-width: calc(100vw - 260px);
  margin: 0 auto;
  padding: 24px 0 72px;
}

.tool-workspace.source-paper-lower .source-paper-page,
.tool-workspace.source-paper-rewrite .source-paper-page {
  padding-bottom: 53px;
}

.tool-workspace.source-doc-sql .source-doc-page {
  padding-bottom: 0;
}

.tool-workspace.source-doc-sql ~ .seo-copy-source-doc {
  min-height: 676px;
  margin-bottom: 22px;
}

.source-doc-hero {
  text-align: center;
}

.source-doc-hero h1 {
  margin: 0 0 14px;
  color: #050505;
  font-size: 34px;
  line-height: 1.2;
}

.source-doc-hero p {
  margin: 0 0 14px;
  color: #8b8f98;
  font-size: 18px;
}

.source-doc-hero span {
  display: block;
  max-width: 660px;
  margin: 0 auto;
  color: #737983;
  font-size: 16px;
  line-height: 1.65;
}

.source-agent-banner {
  position: relative;
  margin: 48px 0 40px;
  padding: 20px 150px 19px 20px;
  border: 1px solid #fde68a;
  border-radius: 14px;
  background: linear-gradient(110deg, #fff7df, #fffbd0);
  color: #92400e;
}

.tool-workspace.source-doc-usecase .source-agent-banner,
.tool-workspace.source-doc-table .source-agent-banner {
  margin: 20px 0;
}

.tool-workspace.source-doc-usecase .source-doc-hero span,
.tool-workspace.source-doc-test .source-doc-hero span {
  display: none;
}

.source-agent-banner small,
.source-agent-banner strong,
.source-agent-banner p {
  display: block;
}

.source-agent-banner strong {
  margin: 8px 0;
  color: #9a3412;
  font-size: 20px;
}

.source-agent-banner p {
  margin: 0;
  font-size: 14px;
  line-height: 1.43;
}

.source-agent-banner button {
  position: absolute;
  right: 20px;
  top: 50%;
  width: 78px;
  height: 32px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: #ff9500;
  color: #fff;
  font-weight: 700;
}

.source-start h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 24px;
}

.source-start > p {
  margin: 0 0 10px;
  color: #8b8f98;
  font-size: 16px;
}

.source-wide-tabs {
  margin: 10px 0 32px;
  border-radius: 8px;
}

.source-main-textarea {
  width: 100%;
  height: 128px;
  resize: none;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  padding: 14px;
  outline: none;
  color: #111827;
}

.source-option-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.2fr;
  gap: 28px;
  margin-top: 44px;
}

.source-option-grid fieldset {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  align-content: start;
  column-gap: 22px;
  row-gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  color: #111827;
}

.source-option-grid legend {
  grid-column: 1 / -1;
  margin-bottom: 8px;
  font-weight: 700;
}

.source-option-grid label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.source-bottom-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 42px;
}

.source-bottom-actions .source-black-btn {
  width: 150px;
  margin: 0;
}

.source-result-panel {
  margin-top: 32px;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  padding: 18px;
}

.source-sql-preview-panel {
  margin-top: 28px;
  border: 0;
  background: transparent;
  padding: 0;
}

.source-word-preview-panel {
  margin-top: 42px;
  border: 0;
  background: transparent;
  padding: 0;
}

.tool-workspace.source-doc-usecase .source-result-panel {
  margin-top: 24px;
}

.tool-workspace.source-doc-test .source-result-panel {
  margin-top: 48px;
}

.tool-workspace.source-doc-usecase .source-main-textarea + .source-black-btn {
  display: block;
  height: 40px;
  margin: 58px 8px 0;
}

.tool-workspace.source-doc-test .source-main-textarea + .source-black-btn {
  display: block;
  height: 40px;
  margin: 34px 8px 0;
}

.tool-workspace.source-doc-usecase .source-ai-notice {
  margin-top: 24px;
}

.tool-workspace.source-doc-test .source-ai-notice {
  margin-top: 48px;
}

.source-sql-empty-preview h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 24px;
}

.source-sql-empty-preview > p {
  margin: 0 0 8px;
  color: #8b8f98;
  font-size: 16px;
  line-height: 1.5;
}

.source-sql-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.source-sql-preview-grid figure {
  margin: 0;
  text-align: center;
  color: #8b8f98;
}

.source-sql-preview-grid figure > div {
  min-height: 222px;
  display: grid;
  place-items: center;
  border: 1px dashed #d7dce3;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 28px;
}

.source-sql-preview-grid figcaption {
  margin-top: 12px;
}

.source-mini-table {
  width: 100%;
  max-width: 340px;
  border-collapse: collapse;
  background: #ffffff;
  color: #111827;
  font-size: 10px;
}

.source-mini-table caption {
  caption-side: top;
  padding-bottom: 6px;
  color: #111827;
  font-weight: 700;
}

.source-mini-table th,
.source-mini-table td {
  border: 1px solid #9ca3af;
  padding: 5px 7px;
  text-align: center;
}

.source-mini-table th {
  background: #eeeeee;
}

.source-mini-three-line {
  border-top: 2px solid #111827;
  border-bottom: 2px solid #111827;
}

.source-mini-three-line th,
.source-mini-three-line td {
  border-left: 0;
  border-right: 0;
}

.source-mini-three-line th {
  border-top: 0;
  border-bottom: 1.5px solid #111827;
}

.source-mini-three-line td {
  border-top: 0;
  border-bottom: 0;
}

.source-word-effect h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 24px;
}

.source-word-effect > p {
  margin: 0 0 18px;
  color: #8b8f98;
  font-size: 16px;
}

.source-word-effect-notes {
  margin: 22px 0 28px;
  color: #4b5563;
  line-height: 1.78;
}

.source-word-effect-notes h3 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 18px;
}

.source-word-effect-notes ul {
  margin: 0;
  padding-left: 22px;
}

.source-word-preview-grid {
  display: grid;
  justify-items: center;
  gap: 30px;
}

.tool-workspace.source-doc-table .source-word-effect {
  min-height: 627px;
}

.source-usecase-effect {
  min-height: 361px;
}

.source-test-effect {
  min-height: 470px;
}

.source-test-effect-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(420px, 1fr);
  align-items: start;
  gap: 42px;
}

.source-test-notes {
  margin-top: 10px;
}

.source-word-example {
  width: min(100%, 620px);
  margin: 0;
  text-align: center;
}

.source-test-doc-preview {
  width: min(100%, 520px);
}

.source-usecase-doc-preview {
  width: min(100%, 520px);
}

.source-test-doc-preview figcaption,
.source-usecase-doc-preview figcaption {
  margin-top: 16px;
  color: #8b8f98;
}

.source-test-doc-preview .source-word-example-table,
.source-usecase-doc-preview .source-word-example-table {
  font-size: 11px;
}

.source-test-doc-preview .source-word-example-table th,
.source-test-doc-preview .source-word-example-table td,
.source-usecase-doc-preview .source-word-example-table th,
.source-usecase-doc-preview .source-word-example-table td {
  padding: 9px 8px;
}

.source-word-example-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
}

.source-word-example-table caption {
  caption-side: top;
  padding-bottom: 10px;
  color: #111827;
  font-size: 15px;
  font-weight: 700;
}

.source-word-example-table th,
.source-word-example-table td {
  border: 1px solid #111827;
  padding: 10px 12px;
  text-align: center;
  vertical-align: middle;
}

.source-word-example-table th {
  background: #f3f4f6;
  font-weight: 700;
}

.source-word-three-line {
  border-top: 2px solid #111827;
  border-bottom: 2px solid #111827;
}

.source-word-three-line th,
.source-word-three-line td {
  border-left: 0;
  border-right: 0;
}

.source-word-three-line tr:first-child th {
  border-top: 0;
  border-bottom: 1.5px solid #111827;
}

.source-word-three-line td {
  border-top: 0;
  border-bottom: 0;
}

.source-word-effect:not(.source-test-effect) .source-word-preview-grid {
  gap: 20px;
}

.source-word-effect:not(.source-test-effect) .source-word-example {
  width: min(100%, 600px);
  height: 150px;
  display: flex;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 0;
}

.source-word-effect:not(.source-test-effect) .source-word-example:nth-child(2) {
  height: 121px;
}

.source-word-effect:not(.source-test-effect) .source-word-example-table {
  width: 760px;
  flex: 0 0 auto;
  transform: scale(0.78);
  transform-origin: top center;
  font-size: 11px;
}

.source-word-effect:not(.source-test-effect) .source-word-example-table caption {
  padding-bottom: 5px;
  font-size: 13px;
}

.source-word-effect:not(.source-test-effect) .source-word-example-table th,
.source-word-effect:not(.source-test-effect) .source-word-example-table td {
  padding: 5px 8px;
}

.source-result-panel table {
  width: 100%;
  border-collapse: collapse;
}

.source-result-panel th,
.source-result-panel td {
  border: 1px solid #d9dce3;
  padding: 8px 10px;
}

.source-result-panel th {
  background: #f5f6f8;
}

.source-result-panel .sql-three-line-table {
  border-top: 2px solid #111827;
  border-bottom: 2px solid #111827;
}

.source-result-panel .sql-three-line-table th,
.source-result-panel .sql-three-line-table td {
  border-left: 0;
  border-right: 0;
}

.source-result-panel .sql-three-line-table th {
  border-top: 0;
  border-bottom: 1.5px solid #111827;
}

.source-result-panel .sql-three-line-table td {
  border-top: 0;
  border-bottom: 0;
}

.source-result-panel .source-mini-table {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 10px;
}

.source-result-panel .source-mini-table caption {
  caption-side: top;
  padding-bottom: 6px;
  color: #111827;
  font-weight: 700;
}

.source-result-panel .source-mini-table th,
.source-result-panel .source-mini-table td {
  border: 1px solid #9ca3af;
  padding: 5px 7px;
  text-align: center;
}

.source-result-panel .source-mini-table th {
  background: #eeeeee;
}

.source-result-panel .source-mini-three-line {
  border-top: 2px solid #111827;
  border-bottom: 2px solid #111827;
}

.source-result-panel .source-mini-three-line th,
.source-result-panel .source-mini-three-line td {
  border-left: 0;
  border-right: 0;
}

.source-result-panel .source-mini-three-line th {
  border-top: 0;
  border-bottom: 1.5px solid #111827;
}

.source-result-panel .source-mini-three-line td {
  border-top: 0;
  border-bottom: 0;
}

.source-word-box {
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  padding: 20px 16px;
}

.source-word-form {
  display: grid;
  gap: 16px;
}

.source-word-box h3 {
  margin: 0 0 16px;
  font-size: 16px;
}

.source-word-notice {
  text-align: center;
}

.source-basic-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

.source-basic-row label,
.source-author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.source-basic-row input,
.source-basic-row select,
.source-author input,
.source-header-row input,
.source-border-grid input[type="number"] {
  height: 34px;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  padding: 0 12px;
}

.source-basic-row input[type="number"] {
  width: 64px;
}

.source-runner-form,
.source-tutor-form {
  display: grid;
  gap: 14px;
}

.source-code-editor,
.source-run-stdin {
  width: 100%;
  resize: vertical;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  outline: none;
  padding: 14px;
}

.source-code-editor {
  min-height: 230px;
  background: #0f172a;
  color: #dbeafe;
  font-family: Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
}

.source-run-stdin {
  min-height: 74px;
  background: rgba(255, 255, 255, 0.76);
  color: #111827;
}

.source-form-label {
  display: block;
  margin: 18px 0 8px;
  color: #737983;
}

.source-header-row {
  display: flex;
  gap: 8px;
}

.source-file-upload[hidden],
.source-manual-table-input[hidden],
[data-source-header][hidden] {
  display: none !important;
}

.source-manual-table-input {
  height: 106px;
  margin: 14px 0 0;
}

.source-word-request-input {
  height: 126px;
  margin: 0;
  resize: vertical;
}

.source-word-action-row {
  display: flex;
  justify-content: center;
  margin: 26px 0 0;
}

.source-word-action-row .source-black-btn {
  width: 150px;
  margin: 0;
}

.source-border-grid {
  display: grid;
  gap: 14px;
}

.source-border-grid > div {
  display: grid;
  grid-template-columns: 120px repeat(4, 1fr);
  gap: 10px;
  align-items: center;
}

.source-border-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0 8px;
}

.source-border-grid input[type="number"] {
  width: 58px;
}

.source-guide {
  margin-top: 32px;
  color: #4b5563;
  line-height: 1.75;
}

.source-paper-page {
  padding-top: 24px;
}

.source-paper-form label {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  color: #111827;
  font-weight: 700;
}

.source-paper-form input,
.source-paper-form textarea {
  width: 100%;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  padding: 12px;
  font-weight: 400;
}

.source-paper-form input {
  height: 36px;
}

.source-paper-form textarea {
  height: 198px;
  resize: none;
}

.source-file-upload {
  min-height: 96px;
  place-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.82);
  color: #111827;
  text-align: center;
  cursor: pointer;
}

.source-file-upload.dragging {
  border-color: #111827;
  background: rgba(240, 249, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.14);
}

.source-file-upload input {
  display: none;
}

.source-file-upload small {
  color: #8b8f98;
  font-weight: 400;
}

.source-status-bar {
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eff6ff;
  color: #64748b;
}

.source-status-bar i {
  width: 8px;
  height: 8px;
  margin-right: 8px;
  display: inline-block;
  border-radius: 999px;
  background: #22c55e;
}

.source-paper-form > .source-black-btn {
  width: 100%;
  margin: 10px 0 0;
}

.source-split-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 16px;
  color: #64748b;
}

.source-split-row span {
  flex: 1;
  font-size: 13px;
}

.source-fold {
  display: grid;
  place-items: center;
  height: 32px;
  color: #111827;
}

@media (max-width: 1180px) {
  .source-app-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .source-draw-shell {
    grid-template-columns: 250px minmax(520px, 1fr) 250px;
  }
}

@media (max-width: 980px) {
  .source-apps-page,
  .source-doc-page,
  .source-paper-page {
    max-width: calc(100vw - 32px);
    width: auto;
  }

  .source-app-grid {
    grid-template-columns: 1fr;
  }

  .source-draw-shell,
  .source-uml-shell {
    grid-template-columns: 1fr;
  }

  .source-sql-preview-grid,
  .source-test-effect-grid {
    grid-template-columns: 1fr;
  }

  .source-left-panel,
  .source-right-panel,
  .source-uml-left {
    border: 0;
  }

  .source-basic-row,
  .source-header-row,
  .source-bottom-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .source-basic-row label,
  .source-author {
    justify-content: space-between;
  }

  .source-basic-row input,
  .source-basic-row select,
  .source-author input {
    width: min(100%, 220px);
  }

  .main.app-center-mode .topbar {
    display: flex;
  }

  .main.app-center-mode .source-apps-page {
    padding-top: 20px;
  }
}

/* Local user, wallet, and membership system. */
.tool-workspace.source-account,
.tool-workspace.source-product {
  display: block;
  height: auto;
  min-height: calc(100vh - 64px);
}

.tool-workspace.source-account .tool-input-panel,
.tool-workspace.source-account .generic-toolbar,
.tool-workspace.source-product .tool-input-panel,
.tool-workspace.source-product .generic-toolbar {
  display: none;
}

.tool-workspace.source-account .generic-output-panel,
.tool-workspace.source-product .generic-output-panel {
  display: block;
  min-height: calc(100vh - 64px);
  background: transparent;
}

.tool-workspace.source-account .generic-result,
.tool-workspace.source-product .generic-result {
  min-height: calc(100vh - 64px);
  padding: 0;
  overflow: visible;
}

.account-page {
  width: min(1040px, calc(100vw - 260px));
  margin: 0 auto;
  padding: 24px 0 72px;
}

.product-page {
  width: min(1040px, calc(100vw - 300px));
}

.account-hero {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.account-avatar {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #f59e0b);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
}

.account-hero h1 {
  margin: 0 0 6px;
  font-size: 28px;
}

.account-hero p {
  margin: 0;
  color: #64748b;
}

.account-hero-actions button,
.account-tabs button,
.account-inline-actions button,
.plan-card button,
.account-card-head button,
.account-primary,
.activity-card button {
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  padding: 0 14px;
}

.account-tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0;
  padding: 4px;
  border-radius: 10px;
  background: rgba(241, 245, 249, 0.9);
}

.account-tabs button {
  flex: 1;
  background: transparent;
  color: #334155;
}

.account-tabs button.active {
  background: #fff;
  color: #111827;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.account-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  padding: 18px;
}

.account-card.wide {
  grid-column: 1 / -1;
}

.account-card.metric span,
.activity-card span {
  color: #64748b;
  font-size: 13px;
}

.account-card.metric strong,
.activity-card strong {
  display: block;
  margin: 8px 0;
  color: #111827;
  font-size: 26px;
}

.account-card.metric p,
.activity-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.account-card h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.account-profile-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px 14px;
  color: #64748b;
}

.account-profile-list b {
  color: #111827;
}

.account-inline-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.plan-card {
  display: grid;
  gap: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  padding: 16px;
}

.plan-card > span {
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
}

.plan-card b {
  font-size: 18px;
}

.plan-card strong {
  font-size: 26px;
}

.plan-card p,
.plan-card ul {
  margin: 0;
  color: #64748b;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.benefit-grid span {
  min-height: 58px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
}

.account-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.account-table th,
.account-table td {
  border: 1px solid #e2e8f0;
  padding: 10px;
  text-align: left;
}

.account-table th {
  background: #f8fafc;
}

.account-empty {
  min-height: 96px;
  display: grid;
  place-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
}

.account-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.account-card-head h2 {
  margin: 0;
}

.account-card-head div {
  display: flex;
  gap: 8px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
}

.faq-list p {
  margin: 10px 0 0;
  color: #64748b;
}

.feedback-textarea {
  width: 100%;
  height: 160px;
  resize: none;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  padding: 12px;
}

.account-primary {
  margin-top: 12px;
}

.activity-card {
  display: grid;
  gap: 8px;
}

.auth-open {
  overflow: hidden;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 15, 22, 0.58);
}

.auth-modal[hidden] {
  display: none;
}

.auth-card {
  position: relative;
  width: min(430px, calc(100vw - 40px));
  padding: 26px 22px 20px;
  border-radius: 28px;
  background: #ffffff;
  color: #000000;
  text-align: center;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #9ca3af;
  font-size: 22px;
  line-height: 1;
}

.auth-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.auth-card h2 {
  margin: 0 32px 8px;
  color: #000000;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.15;
}

.auth-card p {
  margin: 0 0 16px;
  color: #65666b;
  font-size: 17px;
  font-weight: 800;
}

.auth-switch {
  height: 52px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0 0 12px;
  padding: 6px;
  border-radius: 26px;
  background: #ededed;
}

.auth-switch button {
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: #6b6b6b;
  font-size: 20px;
  font-weight: 900;
}

.auth-switch button.active {
  background: #000000;
  color: #ffffff;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form input {
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 19px;
  background: #e5e5e5;
  color: #111827;
  padding: 0 24px;
  font-size: 20px;
  font-weight: 500;
  outline: none;
}

.auth-form input::placeholder {
  color: #9a9a9a;
}

.auth-form input:focus {
  box-shadow: inset 0 0 0 3px rgba(255, 205, 0, 0.55);
}

.auth-code-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.auth-code-row[hidden] { display: none; }
.auth-code-row button { border: 0; border-radius: 16px; padding: 0 14px; background: #111827; color: #fff; font-weight: 800; }
.auth-code-row button:disabled { opacity: .55; cursor: wait; }

.auth-submit {
  height: 56px;
  border: 0;
  border-radius: 24px;
  background: #ffcc00;
  color: #000000;
  font-size: 20px;
  font-weight: 900;
}

.auth-submit:hover {
  background: #f5c400;
}

.auth-card small {
  display: block;
  margin-top: 14px;
  color: #969696;
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 980px) {
  .account-page {
    width: calc(100vw - 32px);
  }

  .account-hero,
  .account-grid,
  .plan-grid,
  .benefit-grid {
    grid-template-columns: 1fr;
  }

  .account-tabs {
    overflow-x: auto;
  }

  .account-tabs button {
    min-width: 96px;
  }

  .auth-card {
    padding: 24px 18px 18px;
    border-radius: 24px;
  }

  .auth-card h2 {
    font-size: 24px;
  }

  .auth-card p,
  .auth-card small {
    font-size: 14px;
  }

  .auth-switch,
  .auth-form input,
  .auth-submit {
    height: 50px;
  }

  .auth-switch button,
  .auth-form input,
  .auth-submit {
    font-size: 18px;
  }
}
