:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #20242d;
  background: #f8f9fb;
  font-synthesis: none;
  --muted: #737a87;
  --border: #e3e6ec;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { transition: background-color 120ms, color 120ms; }
button:disabled { cursor: default; opacity: .4; }
button:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid #4c637f;
  outline-offset: 3px;
}

.page { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
  border-bottom: 1px solid var(--border);
}
.brand { color: #20242d; font: 600 24px var(--mono); text-decoration: none; letter-spacing: -1.2px; }
.brand span { color: var(--muted); }
.header-note { color: var(--muted); font-size: 13px; }
.intro { padding: 38px 0 28px; }
.eyebrow { color: var(--muted); font: 12px var(--mono); letter-spacing: 1px; }
h1 { margin: 10px 0 12px; font-size: 34px; font-weight: 650; letter-spacing: -1px; }
.intro p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }

.toolbar, .conversion-actions, .indent-control { display: flex; align-items: center; }
.toolbar { justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.conversion-actions { gap: 10px; }
.button { padding: 10px 17px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: #343b48; font-size: 13px; line-height: 18px; }
.button:hover { background: #eef0f4; }
.button.primary { background: #252b36; border-color: #252b36; color: #fff; }
.button.primary:hover { background: #404a5b; }
.indent-control { gap: 8px; margin-left: 8px; color: var(--muted); font-size: 12px; }
select { min-height: 36px; padding: 0 25px 0 10px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: #454d5c; }
.shortcut { color: var(--muted); font-size: 11px; white-space: nowrap; }
kbd { font: 11px var(--mono); border: 1px solid var(--border); border-radius: 4px; padding: 3px 5px; background: #fff; }

.workspace { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.editor-panel { min-width: 0; display: flex; flex-direction: column; }
.editor-panel + .editor-panel { border-left: 1px solid var(--border); }
.editor-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 55px; padding: 0 18px; border-bottom: 1px solid var(--border); }
.editor-title, .editor-actions { display: flex; align-items: center; gap: 12px; }
.editor-title label { font-size: 13px; font-weight: 600; }
.tag { padding: 3px 6px; border-radius: 4px; background: #f3f4f7; color: var(--muted); font: 10px var(--mono); }
.text-button { border: 0; background: transparent; padding: 5px 0; font-size: 12px; color: #737a87; white-space: nowrap; }
.text-button:hover:enabled { color: #20242d; }
textarea {
  display: block;
  width: 100%;
  height: min(48vh, 480px);
  min-height: 330px;
  resize: none;
  padding: 22px;
  border: 0;
  border-radius: 0;
  outline: none;
  background: #fff;
  color: #343b48;
  font: 13px/1.85 var(--mono);
  tab-size: 2;
}
textarea::placeholder { color: #a3aab6; opacity: 1; }
textarea:focus { box-shadow: inset 0 0 0 2px #dde5ef; }
textarea[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #efd2d2; }
.editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; border-top: 1px solid var(--border); padding: 0 18px; color: #8b929f; font-size: 11px; }
.status { min-height: 23px; margin: 17px 0 8px; color: var(--muted); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.status[data-state="success"] { color: #28775b; }
.status[data-state="error"] { color: #b34b4b; }
.syntax-note { max-width: 890px; margin: 0; color: #8b929f; font-size: 11px; line-height: 1.9; }
code { font-family: var(--mono); }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 25px 0 28px; margin-top: 25px; border-top: 1px solid var(--border); color: #8b929f; font-size: 11px; line-height: 1.8; }
.local-note::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 7px; border-radius: 50%; background: #589578; vertical-align: 2px; }

@media (max-width: 760px) {
  .page { padding: 0 20px; }
  .site-header { min-height: 70px; }
  .intro { padding-top: 28px; }
  h1 { font-size: 29px; }
  .toolbar { flex-wrap: wrap; }
  .conversion-actions { flex-wrap: wrap; gap: 8px; }
  .indent-control { margin-left: 0; }
  .shortcut { display: none; }
  .workspace { grid-template-columns: 1fr; }
  .editor-panel + .editor-panel { border-left: 0; border-top: 1px solid var(--border); }
  textarea { min-height: 260px; height: 300px; padding: 18px; font-size: 16px; }
  .editor-header, .editor-footer { padding-left: 14px; padding-right: 14px; }
  .editor-title, .editor-actions { gap: 9px; }
  .site-footer { flex-wrap: wrap; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
}
