/* somniself.com 共用样式。
   方向：纸与墨。颜色取自 NameUp 图标：暖纸白、墨黑、朱红；大留白、正文 17px、行距宽、一行不超过约 36 个字。 */
:root {
  --paper: #f6f3ec;
  --paper-2: #efebe2;
  --card: #fffdf9;
  --ink: #1d1b18;
  --ink-2: #4a463f;
  --muted: #7a7469;
  --line: #e3ddd1;
  --line-strong: #cfc7b8;
  --accent: #d8432c;
  --accent-ink: #b5341f;
  --accent-soft: #f8e3dc;
  --ok: #3f7d58;
  --shadow: 0 1px 2px rgba(60, 45, 20, .05), 0 8px 24px -12px rgba(60, 45, 20, .18);
  --radius: 20px;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "Noto Serif CJK SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161512; --paper-2: #1c1a17; --card: #211f1b;
    --ink: #eee9e0; --ink-2: #cbc4b8; --muted: #9c9588;
    --line: #2f2c27; --line-strong: #423e36;
    --accent: #ee6a52; --accent-ink: #f2876f; --accent-soft: #3a221c;
    --ok: #79b991;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.85 var(--sans); letter-spacing: .01em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent-ink); text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 100%; }
a:hover { background-size: 100% 2px; }
a.plain, .plain a { background: none; color: inherit; }
img, svg { max-width: 100%; height: auto; display: block; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* 页眉 */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 18px; letter-spacing: .03em; color: var(--ink); background: none; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
nav.main { display: flex; gap: 4px; font-size: 15px; }
nav.main a { color: var(--ink-2); background: none; padding: 6px 12px; border-radius: 999px; }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--ink); background: var(--paper-2); }

/* 通用排版 */
main { padding-bottom: 96px; }
h1, h2, h3 { color: var(--ink); font-weight: 650; letter-spacing: .01em; }
.display { font-family: var(--serif); font-weight: 700; font-size: clamp(34px, 6vw, 56px); line-height: 1.2; letter-spacing: .02em; margin: 0; }
h1 { font-size: clamp(28px, 4.6vw, 40px); line-height: 1.3; margin: 0 0 12px; }
h2 { font-size: 22px; line-height: 1.45; margin: 56px 0 14px; }
h3 { font-size: 17px; margin: 24px 0 6px; }
p { margin: 10px 0; }
ul { padding-left: 1.3em; margin: 8px 0; } li { margin: 6px 0; } li::marker { color: var(--muted); }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--ink-2); line-height: 1.75; margin: 14px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .12em; color: var(--accent-ink); margin-bottom: 10px; }

/* 按钮与标签 */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; font-size: 15px; font-weight: 600; background: var(--ink); color: var(--paper); transition: transform .15s, opacity .15s; }
.btn:hover { background: var(--ink); opacity: .88; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn.ghost:hover { background: var(--paper-2); opacity: 1; }
.btn svg { width: 18px; height: 18px; }

/* 卡片 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* 首页 */
.home-hero { padding: 72px 0 8px; }

/* 文档页（隐私、支持） */
.doc-head { padding-bottom: 8px; }
.doc-head .meta { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--muted); font-size: 14px; margin-top: 14px; }
.doc h2 { font-size: 18px; margin: 36px 0 6px; }

/* 支持页 */
.faq { margin-top: 16px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 2px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--paper-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M11 6v10M6 11h10' stroke='%237a7469' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / 22px no-repeat; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent-ink); }
.faq .answer { padding: 0 2px 18px; color: var(--ink-2); }
.faq .answer > :first-child { margin-top: 0; }
.code-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; padding: 0; list-style: none; }
.code-legend li { margin: 0; font-size: 14px; background: var(--paper-2); border-radius: 8px; padding: 2px 10px; }
.code-legend b { font-family: var(--mono); color: var(--accent-ink); margin-right: 4px; }
.table-card { margin-top: 16px; overflow-x: auto; }
table.codes { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 560px; }
table.codes th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .06em; padding: 14px 16px; border-bottom: 1px solid var(--line); }
table.codes td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.codes tr:last-child td { border-bottom: 0; }
table.codes td:first-child { font-family: var(--mono); font-weight: 600; color: var(--accent-ink); white-space: nowrap; width: 64px; }
table.codes td:nth-child(2) { width: 34%; }
table.codes td:last-child { color: var(--ink-2); }

/* 页脚 */
footer.site { border-top: 1px solid var(--line); background: var(--paper-2); color: var(--muted); font-size: 14px; }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; padding-top: 32px; padding-bottom: 40px; }
footer.site .links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
footer.site a { color: var(--muted); background: none; }
footer.site a:hover { color: var(--ink); }
footer.site .legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* 窄屏 */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap, .narrow { padding: 0 16px; }
  .home-hero { padding: 48px 0 24px; }
  nav.main a { padding: 6px 9px; }
  h2 { margin-top: 44px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* 页面内容少时页脚贴底 */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }

/* 只留隐私政策和支持两页（2026-11-28 用户定） */
.brand-icon { width: 28px; height: 28px; border-radius: 7px; box-shadow: 0 0 0 1px var(--line); }
.page-top { padding-top: 48px; }
footer.site .wrap { align-items: center; }
footer.site .copy { margin: 0; }


/* 四个入口在窄屏放得下：品牌只留图标，导航字稍小 */
@media (max-width: 480px) {
  .brand .brand-name { display: none; }
  nav.main { gap: 0; font-size: 14px; }
  nav.main a { padding: 6px 8px; }
}

.mails { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; align-items: baseline; margin: 12px 0 20px; }
.mails dt { color: var(--muted); font-size: 15px; }
.mails dd { margin: 0; font-size: 19px; font-weight: 600; }
