:root {
  --bg: #f8f8f6;
  --paper: #ffffff;
  --ink: #111111;
  --muted: #666666;
  --line: #e6e6e1;
  --accent: #0a0a0a;
  --tag: #f1f1ec;
  --max: 980px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top right, #fbfbf7 0%, var(--bg) 45%, #f2f1ed 100%);
  color: var(--ink);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

.site-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 18px 80px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
}

.logo {
  font-size: clamp(38px, 5vw, 52px);
  letter-spacing: 0.08em;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  line-height: 1;
}

.logo small {
  font-size: 12px;
  color: var(--muted);
  margin-left: 0;
  letter-spacing: 0.06em;
  line-height: 1.25;
  font-weight: 600;
  text-transform: none;
}

.nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.nav a {
  text-decoration: none;
  padding: 4px 8px;
  border: 1px solid transparent;
}

.nav a:hover {
  border-color: var(--line);
  background: var(--paper);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  font-size: 13px;
  color: var(--muted);
}

.lang-switch a {
  padding: 2px 4px;
  border: 1px solid transparent;
  text-decoration: none;
}

.lang-switch a.active {
  border-color: var(--line);
  background: #f7f6f2;
  color: var(--ink);
}

.hero {
  margin-top: 20px;
  margin-bottom: 44px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(34px, 6vw, 56px);
  letter-spacing: 0.02em;
}

h2 {
  font-size: clamp(24px, 3.2vw, 34px);
}

p {
  margin: 0 0 12px;
}

.lead {
  font-size: clamp(18px, 2.6vw, 24px);
  color: #252525;
}

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

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.btn {
  appearance: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  cursor: pointer;
  font-size: 15px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.btn:hover:not(:disabled),
.btn:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.btn.secondary {
  background: transparent;
  color: var(--ink);
}

.btn.ghost {
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
}

.btn.secondary:hover:not(:disabled),
.btn.secondary:focus-visible:not(:disabled) {
  background: #f2f2ee;
}

.btn.ghost:hover:not(:disabled),
.btn.ghost:focus-visible:not(:disabled) {
  border-color: #cfcfc8;
  background: #f7f7f3;
}

.section {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 24px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  border: 1px solid var(--line);
  background: var(--tag);
  margin-right: 8px;
  margin-bottom: 8px;
}

.question-box {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 20px;
}

.answers {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.option {
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.option.active {
  border-color: var(--ink);
  background: #f2f2ee;
}

.progress-wrap {
  height: 8px;
  background: #ecebe6;
  margin-bottom: 16px;
}

.progress {
  height: 8px;
  background: #1f1f1f;
  width: 0%;
  transition: width 0.2s ease;
}

.type-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.type-item {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 16px;
}

.type-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  margin-bottom: 10px;
  background: #f3f3ef;
}

.hero-cover {
  width: min(360px, 100%);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  display: block;
  margin-bottom: 14px;
  background: #f3f3ef;
}

.result-card-hero .hero-cover {
  width: min(460px, 100%);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f7f6f2;
}

.breakline-card {
  border-left: 4px solid #111111;
}

.bullet-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.hook-rotator-card {
  min-height: 130px;
  display: grid;
  align-content: center;
}

.danmu-line {
  border-left: 3px solid #111111;
  padding-left: 10px;
}

.type-marquee {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-rtl 45s linear infinite;
}

.marquee-card {
  width: 220px;
  flex: 0 0 220px;
  display: block;
  color: inherit;
  text-decoration: none;
  border-right: 1px solid var(--line);
  padding: 12px;
}

.marquee-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #f3f3ef;
  margin-bottom: 8px;
}

.marquee-title {
  font-size: 14px;
  margin: 0 0 4px;
}

.marquee-quote {
  font-size: 12px;
  color: #333;
  margin: 0;
  line-height: 1.4;
}

@keyframes marquee-rtl {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

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

.expect-main {
  grid-column: span 3;
  background: #111111;
  color: #ffffff;
}

.expect-main .muted {
  color: #d7d7d7;
}

.expect-main .lead {
  color: #ffffff;
  font-weight: 700;
  margin: 0;
}

.danmu-wall {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 8px 0;
}

.result-danmu-wall {
  margin-top: 12px;
  margin-bottom: 6px;
  border-style: dashed;
  background: #fcfcf8;
}

.danmu-row {
  display: flex;
  width: max-content;
  gap: 8px;
  padding: 6px 8px;
  animation: danmu-left 26s linear infinite;
}

.danmu-row.reverse {
  animation-name: danmu-right;
}

.danmu-bubble {
  white-space: nowrap;
  border: 1px solid var(--line);
  background: #f7f6f2;
  padding: 6px 10px;
  font-size: 13px;
}

@keyframes danmu-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes danmu-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
}

.chip.active {
  border-color: var(--ink);
  background: #f1f1ec;
}

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

.feed-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 14px;
  min-height: 250px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.feed-card:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.feed-card .quote {
  font-size: 16px;
  margin-bottom: 10px;
  min-height: 68px;
}

.feed-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.feed-thumb-wrap {
  flex: 0 0 88px;
  width: 88px;
  border: 1px solid var(--line);
  background: #f3f3ef;
}

.feed-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.feed-traits {
  font-size: 14px;
  color: #333;
}

.feed-cta {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.floating-cta {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.type-report-card {
  max-width: 760px;
}

.traits-inline {
  font-size: 14px;
  color: #333;
}

.type-hero-split {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 12px;
}

.type-hero-split .card {
  margin: 0;
}

.type-hero-image .hero-cover {
  width: 100%;
  margin: 0;
}

.type-hero-copy h1 {
  margin-bottom: 10px;
}

.related-grid .related-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.related-card h3 {
  margin-top: 4px;
  margin-bottom: 8px;
}

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

.top-rank-card h3 {
  margin-bottom: 8px;
}

.top-rank-medal {
  font-size: 15px;
  margin-bottom: 8px;
}

.top-rank-title {
  font-size: 40px;
  margin-bottom: 10px;
}

.top-rank-cover-wrap {
  display: block;
  border: 1px solid var(--line);
  background: #f3f3ef;
  margin-bottom: 10px;
}

.top-rank-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.top-rank-quote {
  font-size: 15px;
  margin-bottom: 10px;
}

.top-rank-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.mini-tag {
  font-size: 12px;
  line-height: 1.25;
  padding: 3px 8px;
  border: 1px solid var(--line);
  background: #f7f6f2;
  white-space: nowrap;
}

.top-rank-share {
  margin-bottom: 12px;
}

.rank-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.rank-table-wrap {
  overflow-x: auto;
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.rank-table th,
.rank-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.rank-row {
  cursor: pointer;
}

.rank-row:hover {
  background: #f7f6f2;
}

.rank-table th {
  white-space: nowrap;
}

.trend.up {
  color: #0b7a2f;
}

.trend.down {
  color: #b42318;
}

.trend.flat {
  color: var(--muted);
}

.trend.new {
  color: #7a42f4;
}

.trend-legend {
  font-size: 13px;
  margin: 8px 0 10px;
}

.dist-row {
  display: grid;
  grid-template-columns: 88px 1fr 58px;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.dist-label {
  font-size: 13px;
  color: #333;
}

.dist-bar {
  height: 8px;
  background: #ecebe6;
}

.dist-bar span {
  display: block;
  height: 8px;
  background: #111111;
}

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

.footer {
  margin-top: 44px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  color: var(--muted);
  font-size: 13px;
}

.footer a,
.footer a:visited,
.footer a:hover,
.footer a:active {
  text-decoration: none !important;
}

.rank-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

@media (max-width: 640px) {
  .site-wrap {
    padding: 20px 14px 70px;
  }

  .logo {
    font-size: 34px;
  }

  .logo small {
    font-size: 11px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .feed-grid {
    grid-template-columns: 1fr;
  }

  .feed-thumb-wrap {
    flex-basis: 72px;
    width: 72px;
  }

  .type-hero-split {
    grid-template-columns: 1fr;
  }

  .expect-grid {
    grid-template-columns: 1fr;
  }

  .expect-main {
    grid-column: span 1;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-rank-title {
    font-size: 34px;
  }

  .floating-cta {
    width: calc(100% - 28px);
    left: 14px;
    transform: none;
  }
}
