:root {
  --bg: #f7f8fa;
  --surface: #fff;
  --ink: #202b35;
  --muted: #65727e;
  --border: #e6e9ed;
  --accent: #167a67;
  --tint: #eaf5f0;
  --code: #f8fafb;
  --shadow: 0 4px 20px #243f4a04;
  --red: #b74e55;
  --redbg: #fff0f0;
  --greenbg: #e9f7ee;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    14px -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
body.dark {
  --bg: #141b22;
  --surface: #1c252e;
  --ink: #e3eaf0;
  --muted: #a0adba;
  --border: #303e4b;
  --accent: #6bccad;
  --tint: #243b36;
  --code: #171f27;
  --red: #ff9fa6;
  --redbg: #3b272e;
  --greenbg: #203c32;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
select {
  cursor: pointer;
}
button {
  transition:
    background 0.18s,
    color 0.18s;
  border: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
button svg {
  vertical-align: middle;
}
button {
  color: var(--ink);
}
.shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 244px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 35px 22px 20px;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  inset: 0 auto 0 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.7px;
}
.brandmark {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--surface);
  border-radius: 12px;
  font-size: 31px;
  font-weight: 500;
}
.brandmark span {
  font-size: 24px;
  margin-left: -5px;
}
.brand-sub {
  display: block;
  font-size: 8px;
  letter-spacing: 1.5px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 4px;
}
.workspace-label {
  margin: 29px 0 20px;
  color: var(--muted);
  font-size: 11px;
  display: flex;
  justify-content: space-between;
}
.workspace-label span {
  font-size: 9px;
  border: 1px solid var(--border);
  padding: 1px 4px;
  border-radius: 4px;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--bg);
}
.search svg {
  width: 16px;
  color: var(--muted);
}
.search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}
.search kbd {
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0 4px;
  background: var(--surface);
  border-radius: 3px;
}
.nav-label {
  font-size: 10px;
  color: var(--muted);
  margin: 28px 10px 12px;
  letter-spacing: 1px;
  display: flex;
  justify-content: space-between;
}
.nav-label span {
  font-size: 9px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  position: relative;
}
.nav-item:hover {
  background: var(--bg);
  color: var(--ink);
}
.nav-item.active {
  background: var(--tint);
  color: var(--accent);
  font-weight: 600;
}
.nav-item.active:before {
  content: "";
  position: absolute;
  left: -22px;
  height: 22px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.nav-item svg {
  width: 18px;
  height: 18px;
}
.nav-item .nav-count {
  margin-left: auto;
  font: 10px monospace;
  opacity: 0.7;
}
.second {
  margin-top: 32px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 45px;
  font-size: 10px;
  color: var(--muted);
}
.local-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #3ca77d;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 7px;
}
.sidebar-bottom strong {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
}
.sidebar-bottom p {
  margin: 9px 0 30px 13px;
  font-size: 10px;
}
.sidebar-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 19px;
  font-size: 9px;
  letter-spacing: 1.2px;
}
.sidebar-footer span {
  color: var(--accent);
  font-size: 16px;
}
.main-wrap {
  margin-left: 244px;
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 73px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 0 42px;
  gap: 20px;
  background: var(--surface);
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb span {
  margin: 0 13px;
  color: #bdc5cb;
}
.breadcrumb strong {
  font-weight: 500;
  color: var(--ink);
}
.privacy {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
}
.icon-btn:hover {
  background: var(--tint);
  color: var(--accent);
}
main {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 38px 42px 24px;
  flex: 1;
}
.eyebrow {
  color: var(--accent);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
h1 {
  font-size: 28px;
  letter-spacing: -0.8px;
  margin: 0 0 12px;
  font-weight: 650;
}
.intro {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.8;
}
.star-button {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 13px;
  font-size: 11px;
  color: var(--muted);
}
.star-button.saved {
  color: var(--accent);
  background: var(--tint);
}
.star-button svg {
  width: 14px;
  height: 14px;
}
.tool-card {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 13px;
  background: var(--surface);
  font-size: 11px;
  white-space: nowrap;
}
.button:hover {
  background: var(--bg);
}
.button.primary {
  background: var(--accent);
  color: var(--surface);
  border-color: var(--accent);
  font-weight: 550;
}
.button.primary:hover {
  filter: brightness(0.94);
}
.button svg {
  width: 14px;
  height: 14px;
}
.toolbar .push {
  margin-left: auto;
}
.shortcut {
  font-size: 10px;
  color: var(--muted);
  padding: 0 5px;
}
.editors {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.editor-pane {
  min-width: 0;
}
.editor-pane + .editor-pane {
  border-left: 1px solid var(--border);
}
.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 47px;
  padding: 0 20px;
  background: var(--code);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
}
.pane-title {
  display: flex;
  align-items: center;
  gap: 7px;
}
.pane-title svg {
  width: 13px;
  height: 13px;
  color: var(--muted);
}
.pane-tag {
  font-size: 9px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 5px;
  border-radius: 4px;
}
.pane-actions {
  display: flex;
  gap: 6px;
}
.mini {
  background: transparent;
  color: var(--muted);
  padding: 4px;
  line-height: 1;
  font-size: 10px;
}
.mini:hover {
  color: var(--accent);
}
.mini svg {
  width: 14px;
  height: 14px;
}
.editor-body {
  height: 350px;
  display: flex;
  position: relative;
  background: var(--surface);
}
.gutter {
  width: 42px;
  flex-shrink: 0;
  padding: 19px 12px 18px 4px;
  text-align: right;
  background: var(--code);
  color: #a2aeb8;
  font:
    12px/23px Consolas,
    monospace;
  overflow: hidden;
  user-select: none;
  white-space: pre;
}
.code-input {
  width: 100%;
  height: 100%;
  resize: none;
  border: 0;
  outline: 0 !important;
  background: transparent;
  color: var(--ink);
  font:
    12px/23px Consolas,
    "Microsoft YaHei",
    monospace;
  padding: 18px 17px;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
}
.output-code {
  padding: 18px 17px;
  margin: 0;
  overflow: auto;
  width: 100%;
  font:
    12px/23px Consolas,
    "Microsoft YaHei",
    monospace;
  white-space: pre;
  outline: none;
}
.syntax-key {
  color: #458a87;
}
.syntax-string {
  color: #a77a40;
}
.syntax-number {
  color: #8b6fbd;
}
.syntax-boolean {
  color: #b46e76;
}
.dark .syntax-key {
  color: #78c3bc;
}
.dark .syntax-string {
  color: #d6b378;
}
.dark .syntax-number {
  color: #bca0ef;
}
.output-placeholder {
  color: var(--muted);
  padding: 18px 17px;
  font-size: 12px;
  line-height: 2;
}
.statusbar {
  border-top: 1px solid var(--border);
  padding: 12px 18px;
  display: flex;
  gap: 18px;
  align-items: center;
  font:
    10px Consolas,
    "Microsoft YaHei",
    monospace;
  color: var(--muted);
  min-height: 39px;
}
.statusbar .right {
  margin-left: auto;
}
.status-ok {
  color: var(--accent);
}
.status-error {
  color: var(--red);
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.tip {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 13px 16px;
  background: var(--tint);
  border-radius: 8px;
  color: var(--accent);
  font-size: 11px;
  line-height: 1.8;
}
.tip svg {
  width: 15px;
  height: 15px;
  margin-top: 2px;
}
.tip strong {
  font-weight: 600;
}
.section-title {
  margin: 30px 0 14px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
}
.section-title span {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}
.recommendations {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.recommendation {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  padding: 17px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: border-color 0.18s;
}
.recommendation:hover {
  border-color: var(--accent);
}
.rec-icon {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--code);
}
.rec-icon svg {
  width: 17px;
}
.recommendation strong {
  font-size: 11px;
  font-weight: 600;
}
.recommendation p {
  font-size: 10px;
  color: var(--muted);
  margin: 6px 0 0;
}
.arrow {
  margin-left: auto;
  color: var(--muted);
}
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin: 16px 42px 0;
  padding: 19px 0 22px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--muted);
}
.footer-dot {
  margin: 0 8px;
}
#toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--surface);
  padding: 12px 20px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 10;
  font-size: 12px;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.form-area {
  padding: 24px;
}
.time-live {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 24px;
  background: var(--code);
  gap: 12px;
}
.time-live span {
  font-size: 11px;
  color: var(--muted);
}
.time-live strong {
  font:
    22px Consolas,
    monospace;
  color: var(--accent);
}
.form-label {
  font-size: 12px;
  margin-bottom: 10px;
  display: block;
}
.form-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.field,
select {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
  min-width: 0;
}
.field {
  flex: 1;
}
.result-box {
  background: var(--code);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 8px;
  padding: 16px;
  font:
    12px/2 Consolas,
    "Microsoft YaHei",
    monospace;
  overflow-wrap: anywhere;
}
.result-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.result-row span {
  color: var(--muted);
}
.diff-output {
  max-height: 400px;
  overflow: auto;
  border-top: 1px solid var(--border);
  font:
    12px/24px Consolas,
    "Microsoft YaHei",
    monospace;
}
.diff-row {
  display: flex;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.diff-row.add {
  background: var(--greenbg);
}
.diff-row.remove {
  background: var(--redbg);
}
.line-num {
  color: var(--muted);
  width: 45px;
  flex-shrink: 0;
  text-align: right;
  padding-right: 10px;
  border-right: 1px solid var(--border);
}
.diff-sign {
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.diff-row code {
  padding-left: 8px;
  font: inherit;
}
.collection {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}
.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
}
.history-item p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
  max-width: 650px;
}
.history-item strong {
  font-size: 12px;
}
.history-item .button {
  margin-left: auto;
}
.empty {
  text-align: center;
  padding: 65px 20px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
  line-height: 2;
}
.empty svg {
  width: 34px;
  height: 34px;
}
.collection-head {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}
.storage-warning {
  font-size: 11px;
  color: var(--red);
  margin-top: 10px;
}
.no-match {
  font-size: 11px;
  color: var(--muted);
  padding: 15px 10px;
}
input[type="datetime-local"] {
  color-scheme: light;
}
.dark input[type="datetime-local"] {
  color-scheme: dark;
}
@media (min-width: 1550px) {
  .editor-body {
    height: 440px;
  }
  main {
    padding-top: 50px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 210px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .nav-item.active:before {
    left: -16px;
  }
  .main-wrap {
    margin-left: 210px;
  }
  main {
    padding: 28px 24px 20px;
  }
  .topbar {
    padding: 0 24px;
  }
  .page-footer {
    margin-left: 24px;
    margin-right: 24px;
  }
  .shortcut {
    display: none;
  }
  .recommendation {
    padding: 13px;
    gap: 8px;
  }
  .rec-icon {
    display: none;
  }
  .toolbar {
    gap: 6px;
    padding: 13px;
  }
  .button {
    padding: 9px 10px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 18px 20px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .brand {
    font-size: 21px;
  }
  .brandmark {
    height: 34px;
    width: 34px;
  }
  .workspace-label,
  .nav-label,
  .sidebar-bottom,
  .search,
  .brand-sub {
    display: none;
  }
  #tools-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 18px;
  }
  #personal-nav {
    display: flex;
    flex-direction: row;
    margin-top: 6px;
  }
  .nav-item {
    padding: 8px;
    gap: 6px;
    font-size: 11px;
  }
  .nav-item.active:before,
  .nav-count {
    display: none !important;
  }
  .nav-item svg {
    width: 15px;
    height: 15px;
  }
  .main-wrap {
    margin-left: 0;
  }
  .topbar {
    height: 54px;
    padding: 0 20px;
  }
  .privacy {
    font-size: 10px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .topbar {
    gap: 10px;
  }
  main {
    padding: 25px 18px 18px;
  }
  h1 {
    font-size: 25px;
  }
  .intro {
    font-size: 11px;
  }
  .star-button {
    font-size: 10px;
    padding: 8px;
  }
  .tool-card {
    margin-top: 22px;
  }
  .editors {
    grid-template-columns: 1fr;
  }
  .editor-pane + .editor-pane {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .editor-body {
    height: 265px;
  }
  .toolbar .push {
    margin-left: 0;
  }
  .toolbar {
    gap: 7px;
  }
  .recommendations {
    grid-template-columns: 1fr;
  }
  .rec-icon {
    display: flex;
  }
  .recommendation {
    padding: 14px;
  }
  .page-footer {
    margin: 5px 18px 0;
    font-size: 9px;
    flex-wrap: wrap;
    line-height: 1.6;
  }
  .statusbar {
    gap: 9px;
    flex-wrap: wrap;
  }
  .statusbar .right {
    margin-left: 0;
  }
  .form-area {
    padding: 17px;
  }
  .time-live {
    flex-wrap: wrap;
  }
  .time-live strong {
    font-size: 19px;
  }
  .form-row .field {
    flex-basis: 100%;
  }
  .result-row {
    flex-wrap: wrap;
  }
  .history-item {
    flex-wrap: wrap;
  }
  .form-row {
    align-items: stretch;
  }
  .tip {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
