:root {
  color-scheme: light;
  --ink: #1c2437;
  --muted: #616b7d;
  --line: #e1e5ed;
  --blue: #354cdc;
  --mono: "IBM Plex Mono", Consolas, "SFMono-Regular", "Microsoft YaHei", monospace;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f6f7fa;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .7; }
button:focus-visible, textarea:focus-visible, [tabindex="-1"]:focus-visible { outline: 3px solid #667aff; outline-offset: 3px; }
button, textarea, .editor { transition: background-color .15s, border-color .15s, box-shadow .15s; }
.wrap { width: min(1160px, calc(100% - 80px)); margin-inline: auto; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.nav { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; gap: 10px; align-items: center; font-size: 25px; letter-spacing: -1.4px; font-weight: 720; }
.brand-sub { border-left: 1px solid #d9dee9; padding-left: 16px; margin-left: 6px; letter-spacing: .04em; color: var(--muted); font-size: 13px; font-weight: 500; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.guide-link, .import, .close { border: 0; background: transparent; display: inline-flex; gap: 7px; align-items: center; padding: 6px 3px; color: #4b5569; font-size: 13px; font-weight: 550; border-radius: 5px; }
.guide-link:hover, .import:hover { color: #2039bd; background: #eef1ff; }
main { padding: 32px 0 48px; }
.banner { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 158px; padding: 32px 38px; border-radius: 16px; overflow: hidden; color: white; background: linear-gradient(110deg,#293fbf 0%,#394fd5 57%,#5065e0 100%); }
.intro { position: relative; z-index: 1; }
h1, h2, h3, p, pre { margin: 0; }
h1 { font-size: clamp(30px,3.2vw,42px); line-height: 1.28; font-weight: 720; letter-spacing: .025em; }
.intro p { margin-top: 12px; color: #e3e8ff; font-size: 15px; line-height: 1.7; }
.banner-art { position: absolute; z-index: -1; right: 1%; top: 0; width: 40%; height: 100%; }
.columns { display: grid; grid-template-columns: minmax(0,1.97fr) minmax(280px,1fr); gap: 22px; align-items: start; margin-top: 24px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 6px -4px #1a2c4b24; }
.panel-heading, .preview-heading, .field-row, .hint-row, .form-actions, .preview-footer, .dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.heading-group, .form-actions > span, .submit, .preview-footer > span:first-child { display: inline-flex; align-items: center; gap: 9px; }
h2 { font-size: 17px; line-height: 1.5; letter-spacing: .01em; font-weight: 680; }
.panel-heading { padding: 17px 24px; border-bottom: 1px solid var(--line); }
.heading-icon, .tip-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 8px; color: #3950d4; background: #eef1ff; }
.require-note, .hint-row, .form-actions > span { font-size: 12px; color: var(--muted); }
b { color: #c94e54; font-weight: 600; }
.require-note b { margin-right: 2px; }
form { padding: 21px 25px 22px; }
.field-row { min-height: 25px; margin-bottom: 9px; }
label { font-size: 15px; font-weight: 650; }
label b { margin-left: 2px; font-size: 13px; }
.counter { font: 11px/1.4 var(--mono); color: #647086; white-space: nowrap; }
textarea { display: block; width: 100%; max-width: 100%; border-radius: 8px; resize: vertical; color: var(--ink); line-height: 1.65; font-size: 14px; }
textarea::placeholder { color: #737e91; opacity: 1; }
.description { height: 105px; min-height: 80px; padding: 12px 14px; border: 1px solid #ced5e1; }
.description:focus, .editor:focus-within { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px #3e52d61b; }
.logs-field { margin-top: 19px; }
.import { font-size: 12px; padding: 3px 1px 3px 5px; color: var(--blue); }
.import .icon { width: 15px; height: 15px; }
.editor { border: 1px solid #ced5e1; border-radius: 8px; background: #fafbfd; overflow: hidden; }
.editor-bar { background: #f1f3f8; border-bottom: 1px solid #e1e5ed; color: #586379; font: 11px/1.2 var(--mono); padding: 9px 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.editor-bar > span:first-child { display: flex; min-width: 0; align-items: center; gap: 8px; }
#filename { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-bar .icon { width: 14px; height: 14px; }
#logs { height: 129px; min-height: 98px; background: transparent; padding: 11px 13px; border: 0; border-radius: 0; outline: none; font: 13px/1.65 var(--mono); tab-size: 4; }
.hint-row { margin-top: 8px; font-size: 11px; line-height: 1.5; }
.form-actions { border-top: 1px solid var(--line); padding-top: 17px; margin-top: 20px; }
.form-actions > span { gap: 6px; }
.form-actions > span .icon { width: 15px; height: 15px; }
.submit, .secondary { background: var(--blue); color: white; border: 1px solid transparent; border-radius: 8px; padding: 10px 19px; font-size: 14px; line-height: 1.5; font-weight: 600; }
.submit:hover { background: #293fbd; }
.submit:active { transform: translateY(1px); }
.submit .icon { width: 16px; height: 16px; }
.field-error, #notice { color: #a52633; font-size: 13px; margin-top: 8px; }
#notice { background: #fff2f2; border-radius: 6px; padding: 10px 12px; line-height: 1.55; }
[aria-invalid="true"].description, .editor:has([aria-invalid="true"]) { border-color: #bf4055; }
aside { display: grid; gap: 18px; }
.preview { overflow: hidden; color: #eff3ff; background: #20283c; border: 1px solid #253149; border-radius: 14px; }
.preview-heading { padding: 18px 21px; background: #252e44; border-bottom: 1px solid #3b4356; }
.preview-heading .icon { color: #b1bdff; }
.preview h2, .tips h2 { font-size: 16px; }
.live { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 5px; font-size: 11px; letter-spacing: .04em; background: #283f43; color: #a4eac9; }
.live i, .dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #83d8b4; }
.preview-body { padding: 21px; }
.code-heading { font: 12px/1.5 var(--mono); color: #afbcff; }
.code-heading span { color: #8195fd; }
.excerpt { white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.65 var(--mono); color: #e1e7f4; tab-size: 4; max-height: 8em; overflow: auto; margin: 7px 0 21px; }
.excerpt:last-child { margin-bottom: 0; }
.empty { color: #a4afc2; }
.preview-footer { padding: 11px 21px; border-top: 1px solid #394256; color: #b6c2d7; font: 11px/1.5 var(--mono); }
.preview-footer > span:first-child { gap: 7px; }
.dot { background: #9baafd; }
.tips { padding: 18px 21px 19px; }
.tip-icon { background: #fff3db; color: #94681d; width: 28px; height: 28px; }
.tips ul { padding: 0 0 0 17px; margin: 12px 0 0; color: #586277; font-size: 13px; line-height: 1.75; }
.tips li + li { margin-top: 6px; }
.tips li::marker { color: #98a2b5; }
.success { padding: 58px 24px; text-align: center; }
.success-icon { margin: 0 auto 16px; background: #e3f6ed; color: #237b51; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; }
.success h3 { font-size: 24px; }
.success p, .guide-body p { color: var(--muted); font-size: 14px; line-height: 1.75; margin-top: 8px; }
.success .receipt { margin: 20px auto; }
.receipt strong { font: bold 14px var(--mono); color: var(--ink); margin-left: 6px; }
.secondary { border-color: #c9d1e4; color: var(--blue); background: #f6f8ff; }
dialog { width: min(495px,calc(100% - 32px)); border: 1px solid var(--line); padding: 0; border-radius: 14px; color: var(--ink); max-height: 86dvh; box-shadow: 0 20px 80px #141d3d30; }
dialog::backdrop { background: #141c36a8; }
.dialog-heading { border-bottom: 1px solid var(--line); padding: 16px 23px; }
.close { padding: 6px; }
.close:hover { background: #eef0f6; }
.guide-body { padding: 20px 23px 25px; }
.guide-body h3 { font-size: 15px; }
.guide-body h3:not(:first-child) { margin-top: 19px; }
.example { color: #46559a; border-left: 3px solid #9daaf4; background: #f2f4ff; padding: 10px 13px; font-size: 13px; line-height: 1.7; margin-top: 10px; }
@media (max-width: 900px) {
  .wrap { width: calc(100% - 40px); }
  .columns { grid-template-columns: minmax(0,1.75fr) minmax(245px,1fr); gap: 16px; }
  .panel-heading, form { padding-inline: 19px; }
  .preview-heading, .preview-body, .preview-footer, .tips { padding-inline: 16px; }
  .banner-art { right: -3%; width: 38%; }
}
@media (max-width: 720px) {
  .wrap { width: calc(100% - 32px); }
  .nav { height: 60px; }
  .brand { font-size: 22px; }
  .brand img { width: 30px; height: 30px; }
  .brand-sub { font-size: 12px; margin-left: 0; padding-left: 10px; }
  main { padding-top: 18px; }
  .banner { padding: 25px 22px; min-height: 125px; }
  .banner-art { width: 34%; opacity: .4; right: -7%; }
  .intro p { font-size: 13px; margin-top: 8px; max-width: 86%; }
  .columns { grid-template-columns: minmax(0,1fr); gap: 16px; margin-top: 16px; }
  aside { gap: 14px; }
  .panel-heading { padding-block: 14px; }
}
@media (max-width: 420px) {
  .brand-sub { display: none; }
  .banner-art { display: none; }
  .intro p { max-width: none; }
  .form-actions > span, .require-note { font-size: 11px; }
  .submit { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
