/* ============================================================
   留白小说 · 基础层
   设计变量、重置、排版、通用工具
   风格：温暖随性的小书桌，低饱和奶油底 + 杏桃/薄荷点缀
   ============================================================ */

:root {
  /* 底色 */
  --lb-bg: #fbf7ec;
  --lb-bg-soft: #f4eddc;
  --lb-surface: #fffdf7;

  /* 文字 */
  --lb-ink: #46413a;
  --lb-ink-2: #6f6a5e;
  --lb-muted: #a29a88;

  /* 线 */
  --lb-line: #ece3d0;
  --lb-line-strong: #dbd0b8;

  /* 杏桃（主行动色） */
  --lb-coral: #e2825c;
  --lb-coral-deep: #c4693f;
  --lb-coral-soft: #fceede;

  /* 薄荷（辅助） */
  --lb-mint: #8fbfa8;
  --lb-mint-deep: #5f9179;
  --lb-mint-soft: #e9f4ea;

  /* 奶油黄 / 雾蓝（点缀） */
  --lb-butter-soft: #faf3d8;
  --lb-sky-soft: #e9f2f5;

  --lb-danger: #c9654f;

  --lb-radius-lg: 24px;
  --lb-radius: 16px;
  --lb-radius-sm: 12px;
  --lb-shadow: 0 14px 40px rgba(122, 98, 66, .08);
  --lb-shadow-sm: 0 6px 20px rgba(122, 98, 66, .07);
  --lb-ease: cubic-bezier(.22, .61, .36, 1);
  --lb-header-h: 66px;
  --lb-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--lb-bg);
  color: var(--lb-ink);
  font-family: var(--lb-font);
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.01em;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s var(--lb-ease);
}

a:hover {
  color: var(--lb-coral-deep);
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: var(--lb-coral-soft);
  color: var(--lb-coral-deep);
}

:focus-visible {
  outline: 2px solid var(--lb-coral);
  outline-offset: 3px;
  border-radius: 4px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #ddcfb4;
  border: 3px solid var(--lb-bg);
  border-radius: 10px;
}

::-webkit-scrollbar-track {
  background: var(--lb-bg);
}

/* 工具类 */
.lb-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lb-skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--lb-ink);
  color: #fff;
  border-radius: 999px;
  transform: translateY(-160%);
  transition: transform .2s var(--lb-ease);
}

.lb-skip:focus {
  transform: translateY(0);
  color: #fff;
}

.lb-muted {
  color: var(--lb-muted);
}

.lb-accent {
  color: var(--lb-coral-deep);
}

.lb-dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 8px;
  border-radius: 50%;
  background: var(--lb-line-strong);
  vertical-align: middle;
}

.lb-stack {
  display: flex;
  flex-direction: column;
}

.lb-row {
  display: flex;
  align-items: center;
}

.lb-wrap {
  overflow-wrap: anywhere;
}

.lb-fade-in {
  animation: lbFadeIn .5s var(--lb-ease) both;
}

@keyframes lbFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }
}
