/* 八卦新闻网 · 基础：字级、色、材质、无障碍。系统中文字体，无 CDN。 */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Noto Sans CJK SC", "Noto Sans CJK", "Microsoft YaHei", "Heiti SC", sans-serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Noto Serif CJK",
    "Source Han Serif SC", "SimSun", "Songti SC", serif;

  --bg: #f7f4f5;
  --bg-elev: #ffffff;
  --ink: #1d1d1f;
  --ink-secondary: #6e6e73;
  --ink-tertiary: #8e8e93;
  --rule: rgba(0, 0, 0, 0.12);
  --rule-strong: rgba(0, 0, 0, 0.22);
  --accent: #e0005a;
  --accent-press: #b00048;
  --focus: #e0005a;
  --glass: rgba(247, 244, 245, 0.72);
  --glass-heavy: rgba(247, 244, 245, 0.88);
  --glass-blur: 20px;
  --sheet: rgba(255, 255, 255, 0.82);
  --shadow-sheet: 0 16px 48px rgba(0, 0, 0, 0.14);
  --hairline: 0.5px;
  --radius-sheet: 16px;
  --header-h: 104px;
  --content: 1080px;
  --article: 680px;
  --safe-top: env(safe-area-inset-top, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-elev: #1c1c1e;
    --ink: #f5f5f7;
    --ink-secondary: #a1a1a6;
    --ink-tertiary: #8e8e93;
    --rule: rgba(255, 255, 255, 0.14);
    --rule-strong: rgba(255, 255, 255, 0.28);
    --accent: #ff375f;
    --accent-press: #ff5c7a;
    --focus: #ff375f;
    --glass: rgba(22, 22, 24, 0.72);
    --glass-heavy: rgba(22, 22, 24, 0.88);
    --sheet: rgba(28, 28, 30, 0.86);
    --shadow-sheet: 0 16px 48px rgba(0, 0, 0, 0.5);
  }
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --glass: var(--bg);
    --glass-heavy: var(--bg);
    --sheet: var(--bg-elev);
    --glass-blur: 0px;
  }
}

@media (prefers-contrast: more) {
  :root {
    --glass: var(--bg);
    --glass-heavy: var(--bg);
    --sheet: var(--bg-elev);
    --glass-blur: 0px;
    --rule: var(--ink);
    --rule-strong: var(--ink);
    --ink-secondary: var(--ink);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.47;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}

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

a:hover {
  color: var(--accent);
}

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

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

h1, h2, h3, h4, p {
  margin: 0;
}

:focus {
  outline: none;
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 80;
  padding: 8px 12px;
  background: var(--bg-elev);
  color: var(--ink);
  border-radius: 8px;
}

.skip:focus {
  top: 12px;
}

/* 按下立刻反馈，不等松手 */
.pressable.is-pressed,
a.pressable:active,
button.pressable:active {
  opacity: 0.62;
}

/* 触控目标不小于 44pt */
.hit {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

::selection {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--ink);
}
