/* 绛紫报亭 · 对齐修复：统一版心、去掉叠字与斜切错位 */

:root {
  --paper: #f4ecdc;
  --paper-2: #ebe0cc;
  --card: #fffaf3;
  --ink: #241510;
  --ink-2: #5c433c;
  --ink-3: #7a6258;
  --plum: #43142c;
  --clay: #c45c26;
  --gold: #e4b56a;
  --line: #d7c6ae;
  --pad: max(1.25rem, calc(50% - 600px));
}

html { color-scheme: light; }
html, body, .min-h-screen, .bg-dark-900 {
  background: var(--paper) !important;
  color: var(--ink) !important;
  font-family: "DM Sans", "Noto Serif SC", system-ui, sans-serif !important;
}
body { margin: 0; }
img { max-width: 100%; height: auto; }
a, button { -webkit-tap-highlight-color: transparent; }
button, .inline-flex.items-center { min-height: 44px; }
.nav-mobile {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 .65rem;
  scrollbar-width: none;
}
.nav-mobile::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .nav-mobile { display: none !important; } }
.site-h1 {
  position: static !important;
  width: auto !important;
  height: auto !important;
  clip: auto !important;
  overflow: visible !important;
  white-space: normal !important;
  margin: 0 auto !important;
  padding: 5.6rem var(--pad) .15rem !important;
  font-size: .78rem !important;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--clay) !important;
  max-width: none;
}

.bg-dark-800 { background: var(--paper-2) !important; }
.bg-dark-700, .bg-dark-700\/60, .hover\:bg-dark-700:hover, .bg-dark-600, .hover\:bg-dark-600:hover {
  background: var(--card) !important;
}

.text-white { color: var(--ink) !important; }
.text-white\/70 { color: #4a322c !important; }
.text-white\/60 { color: var(--ink-2) !important; }
.text-white\/50 { color: var(--ink-3) !important; }
.text-white\/40, .text-white\/30 { color: #8a7368 !important; }
.placeholder\:text-white\/30::placeholder { color: #a08b80 !important; }

.bg-brand-500, .hover\:bg-brand-600:hover, .bg-brand-600 { background: var(--clay) !important; color: #fff !important; }
.bg-brand-500\/10 { background: rgba(196, 92, 38, .12) !important; }
.bg-brand-500\/20 { background: rgba(196, 92, 38, .18) !important; color: var(--clay) !important; }
.text-brand-400, .text-brand-500, .hover\:text-brand-400:hover, .hover\:text-brand-500:hover,
.group-hover\:text-brand-400:hover { color: var(--clay) !important; }
.border-brand-500, .focus-within\:border-brand-500:focus-within { border-color: var(--clay) !important; }
.border-white\/10, .border-white\/5, .border-white\/20, .border-white\/30 { border-color: var(--line) !important; }
.bg-white\/5, .hover\:bg-white\/10:hover { background: rgba(67, 20, 44, .07) !important; color: var(--ink-2) !important; }
.bg-white { background: var(--card) !important; }
.text-dark-900 { color: var(--plum) !important; }

.au-abab-badge { background: rgba(196, 92, 38, .12); border-color: rgba(196, 92, 38, .3); }
.au-abab-badge__icon { background: linear-gradient(135deg, #c45c26, #43142c); }
.au-abab-badge__text { color: var(--plum); }

/* H1 仅给爬虫/读屏，不再插在头图里造成叠字 */
h1.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* 统一左右边距：头、图内文案、区块、底同一条竖线 */
nav.fixed > div,
section.relative.w-full > .relative.z-10,
.min-h-screen > section.px-4,
.min-h-screen > section > .px-4,
footer > div {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: var(--pad) !important;
  padding-right: var(--pad) !important;
  box-sizing: border-box;
}

nav.fixed {
  background: var(--plum) !important;
  border-bottom: 3px solid var(--clay);
  box-shadow: none;
}
nav.fixed .text-white,
nav.fixed .text-white\/70,
nav.fixed a { color: #f7eee3 !important; font-weight: 600; }
nav.fixed a[aria-current="page"],
nav.fixed .text-brand-400 {
  color: var(--gold) !important;
  box-shadow: inset 0 -3px 0 var(--gold);
}
nav.fixed img { border-radius: 4px !important; }
nav.fixed span.text-white.font-semibold {
  font-family: "Noto Serif SC", serif !important;
  font-weight: 700 !important;
}

/* Hero：取消斜切，给顶栏留空，避免标题被切掉 */
section.relative.w-full {
  clip-path: none !important;
  height: 520px !important;
}
@media (min-width: 768px) {
  section.relative.w-full { height: 560px !important; }
}
section.relative.w-full > .relative.z-10 {
  padding-top: 4.5rem !important;
  align-items: center !important;
}
section.relative.w-full .bg-black\/50 {
  background: linear-gradient(90deg, rgba(67, 20, 44, .88) 0%, rgba(67, 20, 44, .42) 48%, rgba(67, 20, 44, .12) 100%) !important;
}
section.relative.w-full .inline-block.rounded-full {
  border-radius: 2px !important;
  background: var(--gold) !important;
  color: var(--plum) !important;
  letter-spacing: .16em;
}
section.relative.w-full h2 {
  font-family: "Noto Serif SC", serif !important;
  font-weight: 900 !important;
  max-width: 14ch;
  line-height: 1.2 !important;
  color: #fffaf3 !important;
}
section.relative.w-full p { color: #f4ecdc !important; max-width: 34rem; }
section.relative.w-full a.rounded-lg {
  border-radius: 2px !important;
  box-shadow: none !important;
}
section.relative.w-full a.border {
  background: transparent !important;
  border: 1.5px solid #f7eee3 !important;
}
section.relative.w-full button.rounded-full {
  border-radius: 2px !important;
  background: rgba(67, 20, 44, .7) !important;
  color: #fffaf3 !important;
}

/* 搜索区收紧上下留白 */
section.py-12.md\:py-20.bg-dark-800,
section.bg-dark-800.py-12 {
  padding-top: 2.25rem !important;
  padding-bottom: 2.25rem !important;
}
.min-h-screen > section.py-12.md\:py-20.px-4,
.min-h-screen > section.px-4.md\:px-8 {
  padding-top: 2.75rem !important;
  padding-bottom: 2.75rem !important;
}

form[role="search"] { max-width: 720px; }
form[role="search"] > div {
  border-radius: 2px !important;
  background: var(--card) !important;
  border: 1.5px solid var(--plum) !important;
  box-shadow: none !important;
  height: 52px !important;
}
form[role="search"] input { color: var(--ink) !important; }
form[role="search"] button { border-radius: 2px !important; }
form[role="search"] ~ div {
  justify-content: center;
  align-items: center;
  gap: .5rem !important;
  margin-top: .9rem !important;
}
form[role="search"] ~ div button {
  border-radius: 2px !important;
  line-height: 1.2;
}

span.uppercase.tracking-widest {
  letter-spacing: .22em !important;
  color: var(--clay) !important;
  font-size: .7rem !important;
}
h2.text-2xl, h2.md\:text-4xl, h1.text-3xl, h2.text-3xl {
  font-family: "Noto Serif SC", serif !important;
  font-weight: 900 !important;
  color: var(--plum) !important;
  margin-top: .35rem !important;
}
.flex.items-end.justify-between { align-items: flex-end !important; margin-bottom: 1.25rem !important; }

/* 卡片网格：同一栏宽、统一间距 */
.grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1rem !important;
}
@media (min-width: 900px) {
  .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 1.15rem !important;
  }
}

.lg\:grid-cols-4 > a.group,
.sm\:grid-cols-2 > a.group {
  border-radius: 2px !important;
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
  transform: none !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.lg\:grid-cols-4 > a.group:hover,
.sm\:grid-cols-2 > a.group:hover {
  transform: none !important;
  border-color: var(--plum) !important;
}
.lg\:grid-cols-4 > a.group .aspect-video,
.sm\:grid-cols-2 > a.group .aspect-video {
  aspect-ratio: 16 / 10 !important;
}
.lg\:grid-cols-4 > a.group h3,
.sm\:grid-cols-2 > a.group h3 {
  font-family: "Noto Serif SC", serif !important;
  color: var(--plum) !important;
  min-height: 2.4em;
  margin-bottom: .25rem !important;
}
.lg\:grid-cols-4 > a.group .p-3,
.sm\:grid-cols-2 > a.group .p-3 {
  padding: .7rem .8rem .85rem !important;
}
.lg\:grid-cols-4 > a.group span.rounded-md,
.sm\:grid-cols-2 > a.group span.rounded-md { border-radius: 2px !important; }

.lg\:grid-cols-3 { gap: 1.15rem !important; }
.lg\:grid-cols-3 > .group {
  border-radius: 2px !important;
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
  transform: none !important;
}
.lg\:grid-cols-3 > .group h3 {
  font-family: "Noto Serif SC", serif !important;
  color: var(--plum) !important;
  min-height: 2.6em;
}
.lg\:grid-cols-3 span.rounded-full { border-radius: 2px !important; }

.md\:grid-cols-3 { gap: 1.15rem !important; }
.md\:grid-cols-3 > div.rounded-xl {
  border-radius: 2px !important;
  background: var(--card) !important;
  border: 1px solid var(--line);
  transform: none !important;
}
.md\:grid-cols-3 h3 { font-family: "Noto Serif SC", serif !important; color: var(--plum) !important; }

blockquote {
  font-family: "Noto Serif SC", serif !important;
  color: var(--plum) !important;
}

footer {
  background: var(--plum) !important;
  border-top: 4px solid var(--clay) !important;
  color: #f7eee3 !important;
}
footer .text-white, footer h3, footer h4, footer p, footer a, footer span, footer div {
  color: #f7eee3 !important;
}
footer .text-white\/40, footer .text-white\/30, footer .text-white\/60 { color: #d8bba8 !important; }
footer .text-brand-400 { color: var(--gold) !important; }
footer h3 { font-family: "Noto Serif SC", serif !important; font-weight: 700 !important; }
footer button { border-radius: 2px !important; background: var(--clay) !important; color: #fff !important; }
footer form { border-color: rgba(247, 238, 227, .32) !important; }
footer input { color: #fffaf3 !important; }

.space-y-3 > a.flex {
  border-radius: 2px !important;
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
}
.space-y-3 > a.flex h3 { color: var(--plum) !important; font-family: "Noto Serif SC", serif !important; }
.space-y-3 > a.flex img {
  border-radius: 2px !important;
  width: 64px !important;
  height: 40px !important;
  object-fit: cover;
}

.rounded-xl.overflow-hidden.bg-black { border-radius: 2px !important; border: 2px solid var(--plum) !important; }
.rounded-xl.bg-dark-700\/60.p-5,
.rounded-xl.bg-dark-700\/60.p-5.md\:p-6 {
  border-radius: 2px !important;
  background: var(--card) !important;
  border: 1px solid var(--line);
}
.w-10.h-10.rounded-full { border-radius: 2px !important; border: 1px solid var(--line); }

nav[aria-label="面包屑"] a, nav[aria-label="面包屑"] span { color: var(--ink-2) !important; }
.text-center.py-8 h1, .text-center.md\:py-12 h1 {
  color: var(--plum) !important;
  font-family: "Noto Serif SC", serif !important;
}

.auth-card, .not-found-panel { background: var(--card); border-color: var(--line); color: var(--ink); }
.auth-card h1, .not-found-panel h1 { color: var(--plum); }
.auth-submit, .primary-btn { background: var(--clay); border-radius: 2px; }
.auth-foot a { color: var(--clay); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
