:root {
  --bg: #F5EFE2;
  --bg-card: rgba(255, 252, 244, 0.9);
  --bg-sheet: #FFFAF0;
  --text: #1F3A34;
  --text-soft: #596860;
  --text-mute: #7A857F;
  --text-faint: #9C9688;
  --accent: #B8924A;
  --accent-deep: #8A6A2C;
  --warn: #B73A3A;
  --border: #E2D9C5;
  --shadow: 0 1px 8px rgba(31, 58, 52, 0.06);
  --tabbar-h: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

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

input,
textarea,
select {
  font-size: 16px;
  font-family: inherit;
  color: inherit;
  outline: none;
}

textarea {
  resize: none;
}

.title-font,
.page-title,
.brand-title,
.summary-text,
.hex-name,
.section-title,
.hero-name,
.modal-title,
.daily-name,
.sheet-title,
.empty-title,
.profile-title,
.doc-title {
  font-family: "Songti SC", "Source Han Serif SC", "STSong", "SimSun", serif;
}

.muted {
  color: var(--text-mute);
}

.hairline {
  height: 1px;
  background: var(--border);
}

.page {
  min-height: 100dvh;
  padding: 16px 14px 24px;
  padding-top: calc(var(--safe-top) + 16px);
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 24px);
  max-width: 720px;
  margin: 0 auto;
}

.page-no-tab {
  padding-bottom: calc(var(--safe-bottom) + 24px);
}

.safe-bottom {
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 24px);
}

.top-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px 12px 0;
  color: var(--accent-deep);
  font-size: 14px;
  background: none;
  border: none;
  cursor: pointer;
}

.top-back::before {
  content: "‹";
  font-size: 22px;
  line-height: 1;
}

.page-head {
  margin-bottom: 12px;
}

.page-title {
  margin: 0;
  font-size: 24px;
  color: var(--text);
}

.page-sub {
  margin-top: 5px;
  color: var(--text-mute);
  font-size: 12px;
}

.bottom-note,
.footer-note,
.disclaimer,
.detail-note {
  margin-top: 18px;
  text-align: center;
  color: var(--text-mute);
  font-size: 11px;
  line-height: 1.6;
}
