/* 基础变量与重置，index / editor 共用 */
:root {
  --bg: #fbf9f6;
  --bg-soft: #f4f1eb;
  --surface: #ffffff;
  --ink: #1a1c1f;
  --ink-soft: #5f646b;
  --ink-faint: #8f959c;
  --line: #e6e1d8;
  --accent: #b0452c;
  --accent-soft: #f7ece8;
  --shadow: 0 1px 2px rgba(26, 28, 31, .04), 0 8px 24px rgba(26, 28, 31, .05);
  --radius: 14px;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

html[data-theme="dark"] {
  --bg: #141519;
  --bg-soft: #1a1c21;
  --surface: #1c1f25;
  --ink: #e8e5df;
  --ink-soft: #a4aab2;
  --ink-faint: #797f88;
  --line: #2c3037;
  --accent: #e17a5c;
  --accent-soft: #2c2020;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
li,
figure,
blockquote,
dl,
dd {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--accent-soft);
  color: var(--accent);
}

/* 通用按钮 */
.soft-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 14px;
  cursor: pointer;
  transition: border-color .18s, color .18s, transform .18s, background .18s;
}

.soft-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.solid-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: filter .18s, transform .18s;
}

.solid-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.solid-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}