* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.fs-page {
  display: flex;
  flex-direction: column;
  background: #f7f8fb;
  color: #1f2937;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}
.fs-header {
  height: 64px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.fs-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.fs-brand .wb-header-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: #fff;
  flex: none;
}
.fs-brand .wb-header-icon svg {
  width: 21px;
  height: 21px;
}
.fs-brand h1 {
  font-size: 16px;
  line-height: 1.3;
}
.fs-brand p {
  font-size: 12px;
  color: #6b7280;
  margin-top: 3px;
}
.fs-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.fs-header-actions a {
  padding: 7px 10px;
  color: #64748b;
  text-decoration: none;
  font-size: 13px;
  border-radius: 6px;
}
.fs-header-actions a:hover {
  background: #f3f4f6;
  color: #111827;
}
.fs-local {
  padding: 5px 9px;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 11px;
}
.fs-toolbar {
  min-height: 58px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 16px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}
.fs-options {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.fs-options .option-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-width: 190px;
}
.fs-options .form-label {
  display: block;
  margin: 0;
  white-space: nowrap;
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.fs-options .form-select {
  height: 34px;
  min-width: 135px;
  padding: 0 32px 0 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-size: 12px;
}
.fs-actions {
  display: flex;
  gap: 7px;
}
.fs-btn,
.fs-copy {
  height: 34px;
  padding: 0 13px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #4b5563;
  font-size: 12px;
  cursor: pointer;
}
.fs-btn:hover,
.fs-copy:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}
.fs-btn-primary {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}
.fs-btn-primary:hover {
  background: #4338ca;
  border-color: #4338ca;
}
.fs-btn kbd {
  margin-left: 5px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.18);
  font: 10px inherit;
}
.fs-main {
  display: flex;
  flex: 1;
  min-height: 0;
  background: #fff;
}
.fs-panel {
  display: flex;
  flex: 0 0 50%;
  min-width: 0;
  flex-direction: column;
}
.fs-panel-head {
  height: 42px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
}
.fs-panel-hint {
  color: #9ca3af;
  font-size: 10px;
  font-weight: 400;
}
.fs-copy {
  height: 27px;
  padding: 0 9px;
  font-size: 11px;
}
.fs-panel textarea {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 16px 18px;
  border: 0;
  outline: 0;
  resize: none;
  background: #fff;
  color: #111827;
  font: 13px/1.65 ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas,
    monospace;
  tab-size: 2;
}
.fs-output-panel textarea {
  background: #fafafa;
  color: #334155;
}
.fs-panel textarea:focus {
  box-shadow: inset 0 0 0 2px rgba(79, 70, 229, 0.12);
}
.fs-panel .CodeMirror {
  width: 100%;
  height: 100%;
  font: 13px/1.65 ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas,
    monospace;
  background: #fff;
  color: #111827;
}
.fs-output-panel .CodeMirror {
  background: #fafafa;
}
.fs-panel .CodeMirror-scroll {
  height: 100%;
  min-height: 0;
}
.fs-panel .CodeMirror-gutters {
  background: #f8fafc;
  border-right: 1px solid #e5e7eb;
}
.fs-panel .CodeMirror-linenumber {
  color: #a1a1aa;
}
.fs-panel .CodeMirror-focused {
  box-shadow: inset 0 0 0 2px rgba(79, 70, 229, 0.1);
}
.local-code-editor {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #fff;
}
.fs-output-panel .local-code-editor {
  background: #fafafa;
}
.local-code-input,
.local-code-highlight,
.local-code-lines {
  position: absolute;
  top: 0;
  height: 100%;
  margin: 0;
  border: 0;
  font: 13px/1.65 ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas,
    monospace;
  tab-size: 2;
  white-space: pre;
}
.local-code-input {
  z-index: 3;
  left: 45px;
  width: calc(100% - 45px) !important;
  padding: 16px 18px !important;
  background: transparent !important;
  color: transparent !important;
  caret-color: #111827;
  overflow: auto;
}
.local-code-highlight {
  z-index: 2;
  left: 45px;
  min-width: calc(100% - 45px);
  padding: 16px 18px;
  color: #334155;
  pointer-events: none;
}
.local-code-lines {
  z-index: 2;
  left: 0;
  width: 45px;
  padding: 16px 10px;
  text-align: right;
  color: #a1a1aa;
  background: #f8fafc;
  border-right: 1px solid #e5e7eb;
  pointer-events: none;
}
.tok-keyword {
  color: #7c3aed;
  font-weight: 600;
}
.tok-string {
  color: #047857;
}
.tok-number {
  color: #c2410c;
}
.tok-atom {
  color: #2563eb;
}
.tok-property {
  color: #0369a1;
}
.tok-tag {
  color: #be123c;
}
.tok-attr {
  color: #7c2d12;
}
.tok-comment {
  color: #94a3b8;
  font-style: italic;
}
.fs-divider {
  position: relative;
  width: 5px;
  flex: none;
  background: #e5e7eb;
  cursor: col-resize;
}
.fs-divider:hover,
.fs-divider.dragging {
  background: #818cf8;
}
.fs-divider span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #9ca3af;
  font-size: 16px;
}
.fs-status {
  height: 32px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 14px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #6b7280;
  font-size: 10px;
}
.fs-status .success {
  color: #047857;
}
.fs-status .error {
  color: #b91c1c;
}
@media (max-width: 768px) {
  .fs-header {
    height: 58px;
    padding: 0 12px;
  }
  .fs-brand p,
  .fs-header-actions a:not(:first-child),
  .fs-local {
    display: none;
  }
  .fs-brand h1 {
    font-size: 14px;
  }
  .fs-toolbar {
    align-items: flex-end;
    padding: 7px 10px;
  }
  .fs-options {
    overflow: auto;
  }
  .fs-options .option-item {
    min-width: 125px;
  }
  .fs-options .form-select {
    min-width: 125px;
  }
  .fs-btn {
    padding: 0 9px;
  }
  .fs-btn kbd {
    display: none;
  }
  .fs-main {
    flex-direction: column;
  }
  .fs-panel {
    flex: 0 0 calc(50% - 2px);
  }
  .fs-divider {
    width: 100%;
    height: 5px;
    cursor: row-resize;
  }
  .fs-divider span {
    transform: translate(-50%, -50%) rotate(90deg);
  }
  .fs-status span:last-child {
    display: none;
  }
}
