/* 桑拿姬 · sangnaji.lol —— 浅色底设计系统，token 提取自参考 UI 快照 */

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --text: #18181b;
  --text-2: #27272a;
  --text-3: #3f3f46;
  --muted: #52525b;
  --muted-2: #71717a;
  --faint: #a1a1aa;
  --line: #e4e4e7;
  --line-2: #f4f4f5;
  --brand: #0f766e;
  --brand-strong: #115e59;
  --brand-soft: #f0fdfa;
  --brand-line: #99f6e4;
  --brand-line-2: #5eead4;
  --amber-bg: #fffbeb;
  --amber-fg: #b45309;
  --rose: #e11d48;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 12px -2px rgb(24 24 27 / 0.1);
  --shadow-lg: 0 10px 24px -6px rgb(24 24 27 / 0.16);
  --container: 64rem;
  --sidebar: 18rem;
  --ease: cubic-bezier(0, 0, 0.2, 1);
  --header-bg: rgba(255, 255, 255, 0.9);
  --cta-bg: #2a2118;
  --cta-bg-hover: #33291d;
  --cta-fg: #ead9c0;
  --cta-fg-hover: #fdf3e3;
  --cta-bell: #1b150e;
  --cta-bell-edge: #4a3b26;
  --cta-ring: #c9a227;
  --cta-light: rgba(245, 197, 66, 0.55);
  --cta-focus: #f5c542;
  --cta-ding: rgba(245, 197, 66, 0.85);
  --cta-shadow: rgba(42, 33, 24, 0.5);
  --cta-shadow-soft: rgba(0, 0, 0, 0.5);
  --cta-shadow-inset: rgba(255, 255, 255, 0.5);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial,
    "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

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

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

body {
  margin: 0;
  padding-bottom: 180px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--brand-strong);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

h1,
h2,
h3 {
  color: var(--text);
  letter-spacing: -0.01em;
}

h1 {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
  margin: 0 0 12px;
}

h2 {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  margin: 0 0 10px;
}

h3 {
  font-size: 17px;
  line-height: 1.4;
  font-weight: 600;
  margin: 20px 0 8px;
}

p {
  margin: 0 0 14px;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

li {
  margin-bottom: 6px;
}

strong {
  font-weight: 600;
  color: var(--text);
}

code,
kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
  overflow-wrap: anywhere;
}

/* ---------- 顶部 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(8px);
}

.site-header .inner {
  max-width: var(--container);
  margin: 0 auto;
  height: 64px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-lg);
  display: block;
}

.brand strong {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
}

.main-nav {
  display: none;
  flex-grow: 1;
  justify-content: flex-end;
  gap: 2px;
}

.main-nav a {
  padding: 8px 10px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: background 150ms var(--ease), color 150ms var(--ease);
}

.main-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.main-nav a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand);
}

.nav-more {
  position: relative;
  flex-shrink: 0;
}

.nav-more > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.nav-more > summary::-webkit-details-marker {
  display: none;
}

.nav-more > summary:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-more > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--faint);
  border-bottom: 1.5px solid var(--faint);
  transform: rotate(45deg) translateY(-2px);
}

.nav-more[open] > summary {
  background: var(--surface-2);
  color: var(--text);
}

.nav-more .panel {
  position: fixed;
  left: 12px;
  right: 12px;
  top: 68px;
  z-index: 45;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 6px;
}

.nav-more .panel p {
  margin: 0;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.nav-more .panel .rule {
  height: 1px;
  background: var(--line-2);
  margin: 4px 0;
}

.nav-more .panel a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
  text-decoration: none;
}

.nav-more .panel a:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

/* ---------- 布局 ---------- */

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px 16px 0;
}

.layout {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px 16px 0;
}

.aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

/* ---------- 卡片 ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.card > :first-child {
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
}

.card > :last-child {
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
}

.card-body {
  padding: 20px;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line-2);
  padding: 12px 16px;
  background: var(--surface);
}

.card-head h2,
.card-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

.card-head .count {
  margin-left: auto;
  font-size: 12px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--brand);
  flex-shrink: 0;
}

/* ---------- hero ---------- */

.hero-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 9999px;
  background: var(--brand-soft);
  color: var(--brand);
}

.hero-icon svg {
  display: block;
}

.lead {
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0 0 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--radius-lg);
  background: var(--brand);
  color: var(--surface);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 150ms var(--ease), transform 150ms var(--ease);
}

.btn:hover {
  background: var(--brand-strong);
  color: var(--surface);
}

.btn:active {
  transform: scale(0.98);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text-3);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 150ms var(--ease), background 150ms var(--ease), color 150ms var(--ease);
}

.btn-ghost:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand);
}

/* ---------- 筛选 / 目录条 ---------- */

.scope-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.scope-bar a {
  padding: 8px 12px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: background 150ms var(--ease), color 150ms var(--ease);
}

.scope-bar a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.scope-bar a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand);
}

/* ---------- 条目 ---------- */

.entries {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entries > li {
  padding: 16px 0;
  margin: 0;
  border-bottom: 1px solid var(--line-2);
}

.entries > li:first-child {
  padding-top: 0;
}

.entries > li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.entry-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
}

.entry-title a {
  text-decoration: none;
}

.entry-title a:hover {
  text-decoration: underline;
}

.entry-title .tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-2);
}

.entry p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 15px;
}

.entry .go {
  font-size: 14px;
  font-weight: 500;
}

/* ---------- chips ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.chips li {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 9999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
}

.tag-soft {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 9999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.tag-warm {
  display: inline-block;
  border-radius: 9999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 500;
  background: var(--amber-bg);
  color: var(--amber-fg);
}

/* ---------- 表格 ---------- */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

caption {
  text-align: left;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line-2);
}

th,
td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-2);
  line-height: 1.6;
}

thead th {
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  white-space: nowrap;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

td code,
th code {
  overflow-wrap: anywhere;
}

/* ---------- 定义列表 ---------- */

.fields {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.fields > li {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-2);
}

.fields > li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.fields .k {
  flex: 0 0 7.5rem;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.fields .v {
  flex: 1 1 16rem;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- FAQ ---------- */

.faq {
  margin: 0;
}

.faq details {
  border-bottom: 1px solid var(--line-2);
}

.faq details:last-child {
  border-bottom: 0;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 6px;
  border-radius: 9999px;
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand-line);
}

.faq details[open] summary::before {
  background: var(--brand);
}

.faq summary:hover {
  color: var(--brand);
}

.faq .answer {
  padding: 0 0 16px 26px;
  color: var(--muted);
  font-size: 15px;
}

.faq .answer p {
  margin: 0 0 10px;
}

/* ---------- 侧栏 ---------- */

.aside .side-list {
  list-style: none;
  margin: 0;
  padding: 6px;
}

.aside .side-list li {
  margin: 0;
}

.aside .side-list a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
  text-decoration: none;
}

.aside .side-list a:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.aside .side-text {
  padding: 14px 16px 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.side-list.plain {
  padding: 0;
}

.side-list.plain a {
  display: block;
  padding: 10px 4px;
  font-size: 15px;
  color: var(--text-3);
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
}

.side-list.plain a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.side-list.plain li:last-child a {
  border-bottom: 0;
}

/* ---------- 面包屑 ---------- */

.crumb {
  font-size: 13px;
  color: var(--muted-2);
  margin-bottom: 10px;
}

.crumb a {
  color: var(--muted-2);
  text-decoration: none;
}

.crumb a:hover {
  color: var(--brand);
  text-decoration: underline;
}

/* ---------- 页脚 ---------- */

.site-footer {
  max-width: var(--container);
  margin: 0 auto;
  padding: 8px 16px 40px;
}

.site-footer .top {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
}

.site-footer .brand-line {
  font-size: 13px;
  color: var(--faint);
  margin: 0;
}

.site-footer .brand-line a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-3);
  text-decoration: none;
}

.site-footer .brand-line a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
}

.footer-nav a {
  font-size: 13px;
  color: var(--muted-2);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.footer-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.footer-group h2 {
  font-size: 12px;
  font-weight: 600;
  color: var(--faint);
  letter-spacing: 0.04em;
  margin: 0;
  text-transform: uppercase;
}

.note {
  font-size: 14px;
  color: var(--muted-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 14px 16px;
  margin: 0 0 14px;
}

.note strong {
  color: var(--text-3);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  font-size: 14px;
  z-index: 60;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---------- 断点 ---------- */

@media (min-width: 640px) {
  .site-header .inner,
  .wrap,
  .layout,
  .site-footer {
    padding-left: 24px;
    padding-right: 24px;
  }

  .card-body {
    padding: 24px;
  }

  .site-footer .top {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
  }

  .footer-group,
  .footer-nav {
    align-items: flex-start;
    justify-content: flex-start;
  }
}

@media (min-width: 768px) {
  .main-nav {
    display: flex;
  }

  .nav-more .panel {
    position: absolute;
    left: auto;
    right: 0;
    top: auto;
    margin-top: 8px;
    width: min(18rem, calc(100vw - 1.5rem));
  }
}

@media (min-width: 1024px) {
  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sidebar);
    gap: 32px;
    align-items: start;
  }

  .content {
    min-width: 0;
  }

  .aside {
    position: sticky;
    top: 80px;
    margin-top: 0;
  }
}

@media (max-width: 639px) {
  h1 {
    font-size: 22px;
  }

  .fields > li {
    display: block;
  }

  .fields .k,
  .fields .v {
    display: block;
    flex: none;
  }

  .fields .k {
    margin-bottom: 2px;
  }

  table {
    font-size: 13px;
  }

  th,
  td {
    padding: 9px 11px;
  }
}

/* ---------- 固定寻芳 CTA（CTA 库 #70 · 门铃应门） ---------- */

.site-cta {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 32px));
  box-sizing: border-box;
  min-height: 56px;
  padding: 20px 24px 20px 96px;
  border-radius: 12px;
  background: var(--cta-bg);
  color: var(--cta-fg);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1px;
  box-shadow: 0 14px 30px var(--cta-shadow);
}

.site-cta:hover,
.site-cta:focus-visible {
  color: var(--cta-fg-hover);
  background: var(--cta-bg-hover);
}

.site-cta:focus-visible {
  outline: 2px solid var(--cta-focus);
  outline-offset: 3px;
}

.site-cta:active {
  transform: translateX(-50%) scale(0.995);
}

.site-cta .bell {
  position: absolute;
  left: 24px;
  top: 50%;
  width: 50px;
  height: 56px;
  margin-top: -28px;
  border-radius: 8px 8px 0 0;
  background: var(--cta-bell);
  border: 1px solid var(--cta-bell-edge);
  overflow: hidden;
}

.site-cta .bell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(56px 42px at 50% 60%, var(--cta-light), transparent 75%);
  opacity: 0;
  animation: cta-lit 3.2s ease-in-out infinite;
}

.site-cta .btn-ring {
  position: absolute;
  left: 38px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--cta-ring);
  z-index: 2;
  box-shadow: 0 3px 6px var(--cta-shadow-soft), inset 0 1px 2px var(--cta-shadow-inset);
}

.site-cta .btn-ring::before,
.site-cta .btn-ring::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  border: 2.5px solid var(--cta-ding);
  border-left-color: transparent;
  border-bottom-color: transparent;
  opacity: 0;
  animation: cta-ding 3.2s ease-out infinite;
}

.site-cta .btn-ring::after {
  animation-delay: 0.3s;
}

@keyframes cta-lit {
  0%,
  30% {
    opacity: 0;
  }
  38% {
    opacity: 0.75;
  }
  46% {
    opacity: 0.3;
  }
  56% {
    opacity: 1;
  }
  86% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes cta-ding {
  0%,
  28% {
    opacity: 0;
    transform: rotate(45deg) scale(0.95);
  }
  38% {
    opacity: 1;
    transform: rotate(45deg) scale(1.35);
  }
  52%,
  100% {
    opacity: 0;
    transform: rotate(45deg) scale(2.2);
  }
}

@media (max-width: 640px) {
  .site-cta {
    left: 12px;
    right: 12px;
    transform: none;
    width: auto;
    bottom: calc(48px + env(safe-area-inset-bottom));
    font-size: 16px;
    padding-left: 88px;
  }

  body {
    padding-bottom: 150px;
  }

  .site-cta:active {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-cta .btn-ring {
    animation: none;
  }

  .site-cta .bell::before {
    animation: none;
    opacity: 1;
  }

  .site-cta .ding {
    display: none;
  }
}
