:root {
  --bg: #fff1f2;
  --paper: #ffffff;
  --ink: #3f0d1c;
  --muted: #9f1239;
  --line: #fecdd3;
  --accent: #db2777;
  --cyan: #22d3ee;
  --header-h: 4.2rem;
  --max: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(680px 320px at 0% 0%, rgba(34, 211, 238, 0.18), transparent 55%),
    radial-gradient(720px 360px at 100% 0%, rgba(219, 39, 119, 0.16), transparent 50%),
    var(--bg);
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font: inherit; }

.tx-skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 1000;
}
.tx-skip:focus { left: 0.75rem; top: 0.75rem; }

.tx-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #881337;
}

.tx-header-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.tx-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: #ffffff !important;
}
.tx-brand span {
  font-weight: 800;
  letter-spacing: 0.2em;
  font-size: clamp(1.08rem, 2.2vw, 1.32rem);
  white-space: nowrap;
}

.tx-nav-toggle {
  margin-left: auto;
  height: 2.4rem;
  padding: 0 0.85rem 0 0.7rem;
  border: 1px solid #ffffff;
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  display: none;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  z-index: 60;
}
.tx-nav-toggle b {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.12em;
}
.tx-nav-toggle i {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.tx-nav-toggle i span {
  width: 14px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
}

.tx-nav {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--max), calc(100% - 2rem));
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 51;
  pointer-events: none;
}
.tx-nav > ul {
  pointer-events: auto;
  display: flex;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tx-nav-item { position: relative; }
.tx-nav-parent {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.16em;
  cursor: default;
  color: #ffffff;
}
.tx-nav-item:hover .tx-nav-parent,
.tx-nav-item:focus-within .tx-nav-parent {
  background: var(--cyan);
  color: #083344;
}
.tx-sub {
  display: none;
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  min-width: 8.5rem;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: var(--paper);
  border-radius: 16px;
  box-shadow: 0 14px 28px rgba(136, 19, 55, 0.16);
}
.tx-nav-item:hover .tx-sub,
.tx-nav-item:focus-within .tx-sub { display: block; }
.tx-sub a {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  color: var(--ink);
}
.tx-sub a:hover {
  background: #fff1f2;
  color: var(--accent);
}

.tx-wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin: 1.25rem auto 3rem;
}
.tx-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17.2rem;
  gap: 1.4rem;
  align-items: start;
}

.tx-banner {
  margin: 0 0 1rem;
  overflow: hidden;
  background: var(--paper);
  border-radius: 22px;
  border: 3px solid var(--cyan);
}
.tx-banner img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
}

.tx-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.tx-card {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--paper);
  border-radius: 8px 8px 18px 18px;
  padding: 0 0 0.85rem;
  box-shadow: 0 12px 24px rgba(136, 19, 55, 0.10);
  transform: rotate(-0.4deg);
  transition: transform 0.3s var(--ease);
}
.tx-card:nth-child(even) { transform: rotate(0.5deg); }
.tx-card:hover {
  transform: rotate(0deg) translateY(-4px);
  z-index: 2;
}
.tx-card-cover {
  display: block;
  width: 7.2rem;
  height: 7.2rem;
  margin: 1.05rem auto 0.55rem;
  border-radius: 999px;
  overflow: hidden;
  border: 4px solid var(--cyan);
  background: #fff1f2;
}
.tx-card-cover img {
  width: 7.2rem;
  height: 7.2rem;
  object-fit: cover;
  min-height: 7.2rem;
}
.tx-card > div { padding: 0 0.9rem; text-align: center; }
.tx-card h2 {
  margin: 0 0 0.28rem;
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  line-height: 1.4;
  font-weight: 750;
}
.tx-card h2 a { color: var(--ink); }
.tx-card h2 a:hover { color: var(--accent); }
.tx-card p {
  margin: 0;
  color: #9f1239;
  font-size: 0.82rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tx-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.55rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}
.tx-meta-l {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.tx-avatar {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  object-fit: cover;
}

.tx-crumb {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.86rem;
}
.tx-crumb a { color: var(--accent); }

.tx-pager {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin: 1.15rem 0 0.2rem;
}
.tx-pager a {
  min-width: 6.8rem;
  text-align: center;
  padding: 0.65rem 1.05rem;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff !important;
  font-weight: 700;
}
.tx-pager a:hover { background: #881337; }

.tx-aside {
  position: sticky;
  top: calc(var(--header-h) + 0.8rem);
  display: grid;
  gap: 0.85rem;
}
.tx-side {
  background: var(--paper);
  border-radius: 20px;
  padding: 0.95rem 0.95rem 0.6rem;
  border: 1px solid var(--line);
}
.tx-side h3 {
  margin: 0 0 0.7rem;
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.tx-side ul {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: n;
}
.tx-side li { border-top: 1px solid var(--line); }
.tx-side li a {
  display: flex;
  gap: 0.5rem;
  padding: 0.58rem 0;
  color: var(--ink);
  font-size: 0.88rem;
}
.tx-side .tx-widlist a::before {
  counter-increment: n;
  content: counter(n);
  color: var(--cyan);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  flex: 0 0 1.2rem;
}
.tx-topthub a {
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 0;
}
.tx-topthub img {
  width: 100%;
  height: 7.4rem;
  object-fit: cover;
  border-radius: 14px;
}
.tx-topthub span { font-weight: 650; }

.tx-article-card {
  background: var(--paper);
  border-radius: 24px;
  padding: clamp(1.15rem, 3.2vw, 2.2rem);
  box-shadow: 0 16px 32px rgba(136, 19, 55, 0.1);
}
.tx-article-card h1 {
  margin: 0 0 0.7rem;
  text-align: center;
  font-size: clamp(1.32rem, 3vw, 1.9rem);
  line-height: 1.35;
  color: #881337;
}
.tx-bloginfo {
  display: flex;
  justify-content: center;
  color: var(--accent);
  font-size: 0.82rem;
  margin-bottom: 1.25rem;
}
.tx-bloginfo ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tx-prose {
  font-size: clamp(1rem, 1.15vw, 1.08rem);
  line-height: 1.95;
  color: #4c0519;
  max-width: 44rem;
  margin: 0 auto;
}
.tx-prose img,
.tx-prose video,
.tx-prose iframe,
.tx-prose table { max-width: 100%; }
.tx-prose table { display: block; overflow-x: auto; }
.tx-copyright {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}
.tx-pagerow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-top: 1.15rem;
}
.tx-pagerow a {
  display: block;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: #fff1f2;
  font-size: 0.86rem;
  line-height: 1.45;
}
.tx-pagerow .next { text-align: right; }

.tx-footer {
  background: #881337;
  padding: 1.5rem 1rem 2.3rem;
  text-align: center;
  color: #fecdd3;
  font-size: 0.86rem;
}
.tx-footer p { margin: 0 0 0.7rem; }
.tx-footer a { color: var(--cyan); margin: 0 0.35rem; }

#go-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1.2rem;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 999px;
  background: var(--cyan);
  color: #083344;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-weight: 800;
}
#go-to-top::after { content: "↑"; font-size: 1.05rem; }

.tx-mask { display: none; }

@media (min-width: 640px) {
  .tx-list { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 980px) {
  .tx-list { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 980px) {
  .tx-layout { grid-template-columns: 1fr; }
  .tx-aside { position: static; }
}

@media (max-width: 768px) {
  .tx-nav-toggle { display: inline-flex; }
  .tx-nav {
    left: auto;
    right: 0;
    top: 0;
    width: min(84vw, 20rem);
    height: 100dvh;
    margin: 0;
    display: block;
    background: var(--paper);
    box-shadow: -8px 0 28px rgba(63, 13, 28, 0.16);
    padding: 5rem 1.1rem 1.5rem;
    transform: translateX(110%);
    transition: transform 0.35s var(--ease), visibility 0.35s;
    overflow-y: auto;
    visibility: hidden;
    z-index: 55;
    pointer-events: auto;
  }
  body.nav-open .tx-nav {
    transform: translateX(0);
    visibility: visible;
  }
  .tx-nav > ul {
    flex-direction: column;
    gap: 0.2rem;
  }
  .tx-sub {
    display: block;
    position: static;
    box-shadow: none;
    border: 0;
    padding: 0 0 0.4rem 0.8rem;
    background: transparent;
  }
  .tx-nav-parent {
    color: var(--ink);
  }
  .tx-nav-item:hover .tx-nav-parent {
    background: #fff1f2;
    color: var(--accent);
  }
  .tx-mask {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(63, 13, 28, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
    z-index: 40;
  }
  body.nav-open .tx-mask {
    opacity: 1;
    pointer-events: auto;
  }
  body.nav-open { overflow: hidden; }
  .tx-list { grid-template-columns: 1fr 1fr; }
  .tx-card,
  .tx-card:nth-child(even) { transform: none; }
  .tx-pagerow { grid-template-columns: 1fr; }
  .tx-pagerow .next { text-align: left; }
}

@media (max-width: 420px) {
  .tx-list { grid-template-columns: 1fr; }
}

@media (min-width: 1440px) {
  :root { --max: 1280px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
