:root {
  --bg: #f8f3ec;
  --text: #1f1425;
  --accent: #a447e2;
  --accent-2: #22b2da;
  --card: rgba(255, 255, 255, 0.82);
  --border: #1c0f2a;
  --muted: #5a4d64;
  --shadow: 0 0 0 2px #000, 0 12px 24px rgba(0, 0, 0, 0.2);
  --page-bg: radial-gradient(circle at 15% 20%, #fdd9ff 0, transparent 25%),
    radial-gradient(circle at 85% 0%, #c9f0ff 0, transparent 30%),
    linear-gradient(135deg, #fef8ff, #eff7ff);
  --card-bg: var(--card);
  color-scheme: light;
}

@font-face {
  font-family: 'SourceHanSerifCN';
  font-weight: 400;
  src: url('/assets/SourceSans3-Regular.otf.woff2') format('woff2'),
    url('/assets/SourceSans3-Regular.otf') format('opentype');
  font-display: swap;
}

@font-face {
  font-family: 'SourceHanSerifCN';
  font-weight: 700;
  src: url('/assets/SourceSans3-Bold.otf.woff2') format('woff2'),
    url('/assets/SourceSans3-Bold.otf') format('opentype');
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'SourceHanSerifCN', 'Noto Serif SC', 'Songti SC', serif;
  background: var(--page-bg);
  color: var(--text);
  padding: 0 18px 32px;
}

main {
  max-width: 1080px;
  margin: 0 auto;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-shadow: 1px 1px #fff;
}

a:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

header.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 16px;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'SourceHanSerifCN', 'Noto Serif SC', 'Songti SC', serif;
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.logo-mark span.badge {
  padding: 4px 8px;
  border: 2px solid var(--border);
  background: repeating-linear-gradient(45deg, #fff 0, #fff 6px, #f4e6ff 6px, #f4e6ff 12px);
  box-shadow: var(--shadow);
}

.hero {
  background: var(--card-bg);
  border: 3px solid var(--border);
  box-shadow: var(--shadow);
  padding: 22px;
  position: relative;
  margin-bottom: 28px;
}

.hero::after {
  content: '';
  position: absolute;
  inset: -10px -12px auto auto;
  width: 140px;
  height: 32px;
  background: url('/assets/88x31/magmaus3.gif') center/contain no-repeat, linear-gradient(90deg, #000, #000);
  border: 2px solid #000;
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0 0 10px;
  font-family: 'SourceHanSerifCN', 'Noto Serif SC', 'Songti SC', serif;
  font-size: 34px;
  letter-spacing: 1px;
}

.hero .tagline {
  color: var(--muted);
  margin: 0 0 12px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.pill {
  padding: 8px 12px;
  border: 2px solid var(--border);
  background: #fff9ff;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.section-title {
  font-family: 'SourceHanSerifCN', 'Noto Serif SC', 'Songti SC', serif;
  font-size: 22px;
  margin: 18px 0 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 960px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  header.site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .hero::after {
    position: static;
    display: block;
    margin-top: 12px;
  }
}

.card {
  border: 3px solid var(--border);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.card:hover {
  transform: translateY(-2px);
  transition: transform 120ms ease;
}

.card img.cover {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border: 2px solid var(--border);
  background: repeating-linear-gradient(45deg, #f0f0f0 0, #f0f0f0 8px, #fff 8px, #fff 16px);
}

.meta {
  color: var(--muted);
  font-size: 12px;
}

.button-link {
  align-self: flex-start;
  padding: 8px 12px;
  border: 2px solid var(--border);
  background: linear-gradient(90deg, #ffe2ff, #dff3ff);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow);
}

.button-link:hover {
  background: linear-gradient(90deg, #ffe5b4, #c8f0ff);
}

.article-shell {
  background: var(--card-bg);
  border: 3px solid var(--border);
  box-shadow: var(--shadow);
  padding: 20px;
}

.article-shell h1 {
  font-family: 'SourceHanSerifCN', 'Noto Serif SC', 'Songti SC', serif;
  margin-top: 0;
}

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

.article-shell pre {
  overflow-x: auto;
  padding: 14px;
  border: 2px solid var(--border);
  background: #0b0b0f;
  color: #f8f8f2;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.article-shell code {
  font-family: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
}

.notice {
  font-size: 12px;
  color: var(--muted);
}

.rss-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-weight: 700;
}

.footer-nav {
  margin-top: 32px;
  color: var(--muted);
  font-size: 12px;
}

ul.inline {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 10px;
}

ul.inline li::before {
  content: '✶';
  margin-right: 6px;
  color: var(--accent);
}
