:root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; color: #242d2b; background: #fff; font-size: 14px; line-height: 1.5; letter-spacing: 0; --green: #14764d; --muted: #737d79; --line: #e2e7e4; --red: #b43b32; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select, summary, input[type="checkbox"] { cursor: pointer; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 12px; min-height: 38px; border: 1px solid #d5ddd8; border-radius: 5px; background: #fff; white-space: nowrap; }
button:hover { background: #f0f5f2; border-color: #a3b9ab; }
button:disabled { opacity: .42; cursor: not-allowed; }
button.primary { background: var(--green); border-color: var(--green); color: #fff; }
button.primary:hover { background: #0d6040; }
svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid #158b94; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.topbar { position: sticky; top: 0; z-index: 4; background: #fff; min-height: 94px; padding: 20px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.identity { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.brand-icon { display: grid; place-items: center; width: 42px; height: 42px; color: var(--green); background: #e8f3ec; border-radius: 6px; }
.brand-icon svg { width: 26px; height: 26px; }
h1 { font-size: 24px; line-height: 1.3; font-weight: 650; }
h1 span { font-size: 20px; font-weight: 500; }
.identity p { margin-top: 5px; color: var(--muted); font-size: 10px; }
.version { margin-left: 10px; padding-left: 10px; border-left: 1px solid #cbd5cf; color: #387b72; }
.commands { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.command-divider { height: 23px; width: 1px; margin: 0 4px; background: var(--line); }
.workspace { display: grid; grid-template-columns: 240px minmax(420px, 1fr) minmax(320px, 420px); max-width: 1600px; margin: auto; min-height: calc(100vh - 136px); }
.dependencies { background: #f6f8f6; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
details { width: 100%; }
summary { padding: 24px 20px 18px; font-weight: 650; font-size: 15px; list-style: none; display: flex; align-items: center; justify-content: space-between; }
summary::-webkit-details-marker { display: none; }
.badge { font-size: 11px; min-width: 22px; text-align: center; padding: 2px 5px; color: #5a7265; background: #e5ece6; border-radius: 4px; }
.dependency-content { padding: 0 20px 24px; }
label { display: block; font-size: 13px; margin-bottom: 7px; font-weight: 500; }
input:not([type="checkbox"]), select, textarea { display: block; width: 100%; min-width: 0; border: 1px solid #d4dcd6; border-radius: 5px; background: #fff; padding: 9px 10px; min-height: 40px; }
select { padding-right: 24px; text-overflow: ellipsis; }
input[type="checkbox"] { accent-color: var(--green); width: 16px; height: 16px; margin: 0; flex-shrink: 0; }
.sidebar-rule { border-bottom: 1px solid var(--line); margin: 22px 0; }
.profile-field { margin-bottom: 18px; }
.profile-field > label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.selection-state { margin-left: auto; flex-shrink: 0; font-size: 11px; font-weight: 400; color: #487359; }
.profile-constraint { display: flex; align-items: flex-start; gap: 6px; margin-top: 9px; font-size: 12px; line-height: 1.6; color: #426b53; overflow-wrap: anywhere; }
.profile-constraint svg { width: 14px; height: 14px; margin-top: 3px; }
.profile-field.is-unavailable > label, .check-label.is-unavailable, .is-unavailable .selection-state { color: #7c8580; }
.profile-field.is-unavailable select:disabled { background: #e9eeeb; border-color: #dce3de; color: #78827c; opacity: 1; -webkit-text-fill-color: #78827c; }
.profile-field.is-linked select:disabled { background: #eef4ef; border-color: #cddccf; color: #426b53; opacity: 1; -webkit-text-fill-color: #426b53; }
.profile-constraint.is-unavailable { color: #65716a; }
.profile-field select:disabled, .check-label.is-unavailable, .check-label input:disabled { cursor: not-allowed; }
.module-options { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 22px; display: grid; gap: 14px; }
.module-name { min-width: 0; overflow-wrap: anywhere; }
.check-label { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 14px; }
.sidebar-baseline { padding: 18px 20px; margin-top: auto; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.tiny-dot { display: inline-block; height: 6px; width: 6px; flex-shrink: 0; border-radius: 50%; background: #5d9f82; }
.editor { min-width: 0; }
#parameter-panel { padding: 28px 30px 50px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 24px; }
.eyebrow { color: #8a958f; font-size: 10px; margin-bottom: 5px; }
h2 { font-size: 18px; font-weight: 600; }
.validation-state { display: inline-flex; align-items: center; gap: 6px; color: var(--green); background: #ecf5ef; border: 1px solid #d7e8db; padding: 4px 8px; border-radius: 4px; font-size: 11px; white-space: nowrap; }
.validation-state.invalid { color: #a64130; background: #fff3ee; border-color: #f2d7ca; }
.form-section { padding: 23px 0 28px; border-top: 1px solid var(--line); min-width: 0; }
.section-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 23px; }
.section-index { color: #98a49c; font-family: ui-monospace, monospace; font-size: 12px; }
h3 { font-size: 17px; font-weight: 600; }
.provider-badge { margin-left: auto; font-size: 11px; padding: 2px 7px; background: #f0f4f3; color: #59817b; border-radius: 4px; }
.field { margin-bottom: 19px; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field-path { display: block; margin: 5px 0 0; font: 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; color: #8b958f; overflow-wrap: anywhere; }
.required { color: #b44d3a; margin-left: 4px; }
.input-wrap { display: flex; gap: 7px; align-items: flex-start; }
.input-wrap input { flex: 1; }
.icon-button { height: 38px; width: 38px; min-width: 38px; padding: 0; flex-shrink: 0; }
.input-wrap .icon-button { height: 40px; }
.field-error { margin-top: 6px; color: var(--red); font-size: 12px; overflow-wrap: anywhere; }
[aria-invalid="true"] { border-color: var(--red) !important; }
.array-list { display: grid; gap: 8px; margin: 8px 0; }
.array-row { display: flex; align-items: flex-start; gap: 7px; }
.array-row-content { flex: 1; min-width: 0; }
.array-row input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.add-button { min-height: 30px; font-size: 12px; padding: 4px 8px; }
.array-count, .duplicate-notice { font-size: 11px; color: var(--muted); margin: 7px 0; }
.duplicate-notice { color: #9a6c18; }
.error-summary { padding: 13px; border-left: 3px solid #c5523e; background: #fff5f1; margin-bottom: 20px; overflow-wrap: anywhere; }
.error-summary p { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.error-summary ul { padding-left: 17px; margin: 0; }
.error-summary button { display: inline; background: none; border: 0; color: #a03f30; text-align: left; white-space: normal; min-height: 0; padding: 3px 0; border-radius: 0; font-size: 12px; overflow-wrap: anywhere; }
.preview { min-width: 0; border-left: 1px solid var(--line); padding: 28px 22px; background: #fcfdfc; }
.preview-heading { display: flex; justify-content: space-between; align-items: center; }
.preview-heading h2 { display: flex; align-items: center; gap: 7px; font-size: 16px; }
.preview-heading h2 svg { color: #678678; }
.preview-heading .icon-button { background: transparent; border-color: transparent; }
.preview-meta { display: flex; justify-content: space-between; gap: 8px; color: #5b8b82; margin-top: 25px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 11px; }
#preview-validity { color: #87948d; }
.code-container { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f6f8f6; min-height: 260px; max-height: calc(100vh - 345px); overflow: auto; }
pre { padding: 18px 14px; margin: 0; font: 12px/1.9 ui-monospace, SFMono-Regular, Consolas, monospace; color: #355a48; min-width: 0; tab-size: 2; }
.preview-bottom { display: flex; justify-content: space-between; gap: 8px; padding: 12px 0; font: 10px/1.5 ui-monospace, monospace; color: #88958e; flex-wrap: wrap; }
.text-button { border: none; background: transparent; color: #56786a; font-size: 12px; min-height: 34px; padding: 6px 0; }
.text-button svg { width: 15px; height: 15px; }
.statusbar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); min-height: 36px; padding: 9px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); z-index: 3; }
.statusbar > span:first-child { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
#status { overflow-wrap: anywhere; }
.view-tabs { display: none; }
dialog { padding: 0; max-width: 680px; width: calc(100% - 32px); max-height: calc(100dvh - 32px); border: 1px solid #cbd8cf; border-radius: 8px; box-shadow: 0 14px 70px #17332833; overflow-y: auto; }
dialog::backdrop { background: #1c302b66; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
#dialog-body { padding: 20px; }
.dialog-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fff; flex-wrap: wrap; }
.dialog-actions:empty { display: none; }
dialog textarea { resize: vertical; min-height: 170px; font: 12px/1.6 ui-monospace, monospace; margin-bottom: 16px; white-space: pre; }
.import-file { margin-bottom: 18px; }
.import-profile { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin-top: 20px; }
.import-profile .module-options { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; margin: 0 0 18px; }
.import-review { font-size: 13px; overflow-wrap: anywhere; margin: 15px 0; }
.import-review ul { padding-left: 18px; max-height: 160px; overflow: auto; font-family: ui-monospace, monospace; font-size: 12px; }
.import-review p { margin: 7px 0; }
.confirm-check { margin-top: 18px; }
.full-text { min-height: 350px; }
@media (min-width: 1280px) { .topbar { position: sticky; top: 0; z-index: 4; background: #fff; } .dependencies > details, .preview { position: sticky; top: 94px; align-self: start; max-height: calc(100vh - 136px); overflow-y: auto; } .preview { min-height: calc(100vh - 136px); } }
@media (max-width: 1279px) {
  .workspace { grid-template-columns: 220px minmax(0, 1fr); }
  .view-tabs { display: flex; padding: 16px 25px 0; gap: 5px; border-bottom: 1px solid var(--line); background: #fff; }
  .view-tabs button { border: none; border-bottom: 2px solid transparent; border-radius: 0; padding: 8px 18px; color: var(--muted); }
  .view-tabs [aria-selected="true"] { color: var(--green); border-bottom-color: var(--green); }
  .preview { display: none; grid-column: 2; grid-row: 1; margin-top: 58px; border-left: 0; }
  .workspace.json-view #parameter-panel { display: none; }
  .workspace.json-view .preview { display: block; }
  .code-container { max-height: 65vh; }
  .topbar { flex-wrap: wrap; padding: 18px 24px; }
}
@media (max-width: 767px) {
  .topbar { padding: 16px; gap: 18px; height: 136px; }
  h1 { font-size: 22px; } h1 span { font-size: 18px; }
  .commands { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 6px; }
  .commands button { font-size: 12px; padding: 7px 4px; gap: 4px; min-width: 0; }
  .commands svg { width: 15px; height: 15px; }
  #copy-button { font-size: 0; gap: 0; }
  #copy-button::after { content: '复制'; font-size: 12px; margin-left: 4px; }
  .command-divider { display: none; }
  .workspace { display: block; min-height: calc(100vh - 190px); }
  .dependencies { border-right: 0; border-bottom: 1px solid var(--line); }
  summary { padding: 15px 18px; }
  summary::after { content: '+'; color: #718278; margin-left: 8px; }
  details[open] summary::after { content: '−'; }
  .badge { margin-left: auto; }
  .dependency-content { padding: 4px 18px 20px; }
  .sidebar-baseline { display: none; }
  .view-tabs { padding: 8px 16px 0; position: sticky; top: 136px; z-index: 2; }
  #parameter-panel { padding: 24px 18px 32px; }
  .panel-heading { gap: 8px; }
  .validation-state { font-size: 10px; padding: 4px 6px; }
  .preview { padding: 24px 18px; margin: 0; }
  .statusbar { padding: 9px 16px; }
  .import-profile { grid-template-columns: 1fr; }
  .dialog-heading, #dialog-body, .dialog-actions { padding: 14px; }
}
