:root {
  --ink: #17130f;
  --paper: #f5ead4;
  --paper-deep: #e8d2a8;
  --cinnabar: #a83222;
  --gold: #c99a38;
  --jade: #1f7562;
  --indigo: #26384f;
  --mist: rgba(245, 234, 212, 0.74);
  --line: rgba(72, 48, 30, 0.22);
  --shadow: 0 24px 70px rgba(23, 19, 15, 0.18);
}

* {
  box-sizing: border-box;
}

* {
  min-width: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    "Noto Serif SC",
    "Source Han Serif SC",
    "Microsoft YaHei",
    serif;
  background:
    radial-gradient(circle at 16% 12%, rgba(201, 154, 56, 0.18), transparent 28rem),
    linear-gradient(120deg, #1b1511 0%, #3b2118 42%, #66512d 100%);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(245, 234, 212, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 234, 212, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.18));
}

#cosmos {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.64;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  overflow-x: clip;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
  color: var(--paper);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(245, 234, 212, 0.46);
  border-radius: 50%;
  color: var(--gold);
  font-size: 24px;
  animation: slow-spin 18s linear infinite;
}

.brand strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: rgba(245, 234, 212, 0.68);
  font-size: 11px;
  font-family: Georgia, serif;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.top-nav a {
  color: rgba(245, 234, 212, 0.82);
  text-decoration: none;
  padding: 9px 12px;
  border-bottom: 1px solid transparent;
}

.top-nav a:hover {
  color: #fff8e8;
  border-color: rgba(201, 154, 56, 0.72);
}

.top-nav a.active {
  color: #fff8e8;
  border-color: var(--gold);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  align-items: center;
  gap: 42px;
  min-height: calc(100vh - 140px);
  padding: 42px 0 78px;
  color: var(--paper);
}

.subpage-main {
  padding: 56px 0 28px;
}

.page-hero {
  max-width: 900px;
  margin: 0 0 42px;
  color: var(--paper);
}

.page-hero h1 {
  margin-bottom: 18px;
  font-size: clamp(38px, 6vw, 74px);
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  color: rgba(245, 234, 212, 0.78);
  font-size: 19px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: -22px 0 68px;
}

.route-card {
  display: block;
  min-height: 230px;
  border: 1px solid rgba(245, 234, 212, 0.22);
  border-radius: 8px;
  padding: 22px;
  color: var(--paper);
  text-decoration: none;
  background:
    linear-gradient(145deg, rgba(245, 234, 212, 0.12), rgba(23, 19, 15, 0.5)),
    rgba(23, 19, 15, 0.42);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.route-card:hover {
  border-color: rgba(201, 154, 56, 0.68);
}

.route-card span {
  color: var(--gold);
  font: 800 13px/1 Georgia, serif;
}

.route-card h2 {
  margin: 22px 0 12px;
  font-size: 26px;
}

.route-card p {
  color: rgba(245, 234, 212, 0.76);
  line-height: 1.75;
}

.hero-copy {
  min-width: 0;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  font-family: "Microsoft YaHei", sans-serif;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 20px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h1 span {
  display: block;
}

.hero-lead {
  max-width: 660px;
  color: rgba(245, 234, 212, 0.82);
  font-size: 20px;
  line-height: 1.8;
}

.hero-lead span {
  display: block;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-link,
.ghost-link,
button {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  padding: 12px 18px;
  font: 700 15px/1.2 "Microsoft YaHei", sans-serif;
  cursor: pointer;
  text-decoration: none;
}

.primary-link,
button {
  color: #fff9ec;
  background: linear-gradient(135deg, var(--cinnabar), #742219);
  box-shadow: 0 12px 30px rgba(168, 50, 34, 0.28);
}

.ghost-link,
.secondary-button {
  color: var(--paper);
  background: rgba(245, 234, 212, 0.08);
  border: 1px solid rgba(245, 234, 212, 0.28);
  box-shadow: none;
}

.secondary-button {
  color: var(--ink);
  background: rgba(255, 252, 244, 0.56);
  border-color: var(--line);
}

.hero-orbit {
  display: grid;
  place-items: center;
  min-height: 430px;
}

.compass {
  position: relative;
  width: min(420px, 84vw);
  aspect-ratio: 1;
  border: 1px solid rgba(245, 234, 212, 0.28);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(245, 234, 212, 0.12) 0 18%, transparent 19% 100%),
    conic-gradient(
      from 12deg,
      rgba(201, 154, 56, 0.22),
      rgba(31, 117, 98, 0.18),
      rgba(168, 50, 34, 0.22),
      rgba(245, 234, 212, 0.08),
      rgba(201, 154, 56, 0.22)
    );
  box-shadow:
    inset 0 0 46px rgba(245, 234, 212, 0.14),
    0 26px 80px rgba(0, 0, 0, 0.22);
  animation: float 6s ease-in-out infinite;
}

.compass::before,
.compass::after {
  position: absolute;
  inset: 12%;
  content: "";
  border: 1px solid rgba(245, 234, 212, 0.22);
  border-radius: 50%;
}

.compass::after {
  inset: 28%;
}

.trigram {
  position: absolute;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #fff2cf;
  font-size: 31px;
  text-shadow: 0 0 20px rgba(201, 154, 56, 0.4);
}

.qian { top: 18px; left: calc(50% - 24px); }
.dui { top: 74px; right: 70px; }
.li { top: calc(50% - 24px); right: 18px; }
.zhen { right: 70px; bottom: 74px; }
.xun { bottom: 18px; left: calc(50% - 24px); }
.kan { bottom: 74px; left: 70px; }
.gen { top: calc(50% - 24px); left: 18px; }
.kun { top: 74px; left: 70px; }

.tai-chi {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border-radius: 50%;
  color: #211812;
  background: radial-gradient(circle at 34% 28%, #fff6df, var(--gold) 62%, #7c2b20);
  box-shadow: 0 0 44px rgba(201, 154, 56, 0.4);
  transform: translate(-50%, -50%);
  font-size: 46px;
}

.predictor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 420px);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.fixtures-section {
  margin: 16px 0 34px;
}

.section-note {
  max-width: 760px;
  margin-top: -6px;
  color: rgba(245, 234, 212, 0.74);
  line-height: 1.8;
}

.fixture-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.filter-button {
  min-height: 38px;
  color: var(--paper);
  background: rgba(245, 234, 212, 0.08);
  border: 1px solid rgba(245, 234, 212, 0.28);
  box-shadow: none;
}

.filter-button.active {
  color: #fff9ec;
  background: var(--cinnabar);
  border-color: rgba(255, 249, 236, 0.18);
}

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

.match-card {
  display: grid;
  gap: 16px;
  min-height: 210px;
  border: 1px solid rgba(245, 234, 212, 0.2);
  border-radius: 8px;
  padding: 16px;
  color: var(--paper);
  background:
    linear-gradient(145deg, rgba(245, 234, 212, 0.12), rgba(23, 19, 15, 0.48)),
    rgba(23, 19, 15, 0.36);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.match-card.selected {
  border-color: rgba(201, 154, 56, 0.86);
  box-shadow:
    0 0 0 1px rgba(201, 154, 56, 0.3),
    0 18px 48px rgba(0, 0, 0, 0.22);
}

.match-date strong,
.match-date span,
.match-foot span {
  display: block;
}

.match-date strong {
  margin-bottom: 4px;
  color: var(--gold);
}

.match-date span,
.match-foot span {
  color: rgba(245, 234, 212, 0.68);
  font: 700 12px/1.5 "Microsoft YaHei", sans-serif;
}

.match-teams {
  display: grid;
  gap: 4px;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.15;
}

.match-teams span {
  overflow-wrap: anywhere;
}

.match-teams b {
  color: rgba(245, 234, 212, 0.48);
  font: 700 13px/1.2 Georgia, serif;
}

.match-foot {
  display: grid;
  gap: 12px;
  align-self: end;
}

.match-foot button,
.match-link {
  display: inline-grid;
  min-height: 40px;
  place-items: center;
  width: 100%;
  border-radius: 6px;
  color: #fff9ec;
  background: linear-gradient(135deg, var(--cinnabar), #742219);
  font: 700 15px/1.2 "Microsoft YaHei", sans-serif;
  text-decoration: none;
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin: 22px 0 68px;
}

.studio-panel {
  position: sticky;
  top: 18px;
}

.studio-status {
  display: grid;
  gap: 10px;
  border-block: 1px solid var(--line);
  padding: 16px 0;
  margin-bottom: 16px;
}

.studio-status span {
  color: rgba(23, 19, 15, 0.72);
  line-height: 1.6;
}

.studio-status strong {
  color: var(--jade);
}

.studio-hint {
  margin: 16px 0 0;
  color: rgba(23, 19, 15, 0.68);
  line-height: 1.8;
}

.article-panel {
  min-height: 380px;
}

.article-meta {
  margin: -8px 0 18px;
  color: rgba(23, 19, 15, 0.62);
  font: 700 13px/1.7 "Microsoft YaHei", sans-serif;
}

.article-body {
  display: grid;
  gap: 12px;
}

.article-body p {
  margin: 0;
  border-left: 3px solid rgba(168, 50, 34, 0.42);
  padding-left: 14px;
  color: rgba(23, 19, 15, 0.78);
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.rationale-panel {
  margin: 22px 0 60px;
}

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

.rationale-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 252, 244, 0.5);
}

.rationale-row strong {
  display: block;
  margin-bottom: 8px;
  color: var(--cinnabar);
  font-size: 17px;
}

.rationale-row p {
  margin: 0;
  color: rgba(23, 19, 15, 0.75);
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.compact-methods {
  margin-top: 20px;
}

.method-deep-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.method-deep {
  min-height: 330px;
}

.method-deep span {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--cinnabar);
  background: rgba(255, 252, 244, 0.64);
  font-size: 30px;
}

.method-deep h2 {
  margin-bottom: 14px;
  overflow-wrap: anywhere;
}

.method-deep p {
  color: rgba(23, 19, 15, 0.76);
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.logic-panel {
  margin-bottom: 60px;
}

.logic-steps {
  display: grid;
  gap: 12px;
}

.logic-steps div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 252, 244, 0.44);
}

.logic-steps strong {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: #fff9ec;
  background: var(--cinnabar);
}

.logic-steps p {
  margin: 0;
  color: rgba(23, 19, 15, 0.76);
  line-height: 1.75;
}

.draft-list {
  display: grid;
  gap: 12px;
}

.draft-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 252, 244, 0.52);
}

.draft-card span {
  color: rgba(23, 19, 15, 0.54);
  font: 700 12px/1.4 "Microsoft YaHei", sans-serif;
}

.draft-card h3 {
  margin: 8px 0;
  color: var(--cinnabar);
}

.draft-card p,
.empty-note {
  margin: 0;
  color: rgba(23, 19, 15, 0.68);
  line-height: 1.75;
}

main,
section,
.panel,
.method-card {
  min-width: 0;
}

.panel,
.method-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 252, 244, 0.9), rgba(232, 210, 168, 0.82)),
    var(--paper);
  box-shadow: var(--shadow);
}

.panel {
  padding: 24px;
}

.panel-head h2,
.section-title h2 {
  margin-bottom: 18px;
  font-size: clamp(24px, 3vw, 34px);
}

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

label {
  display: grid;
  gap: 8px;
  font: 700 14px/1.3 "Microsoft YaHei", sans-serif;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(72, 48, 30, 0.24);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 252, 244, 0.82);
  font: 16px/1.2 "Microsoft YaHei", sans-serif;
}

input:focus,
select:focus {
  outline: 2px solid rgba(31, 117, 98, 0.34);
  border-color: var(--jade);
}

.button-row {
  grid-column: 1 / -1;
  margin-top: 6px;
}

.result-panel {
  display: grid;
  align-content: start;
  gap: 18px;
}

.score-board {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  min-height: 98px;
  border-block: 1px solid var(--line);
  padding: 18px 0;
  text-align: center;
}

.score-board span {
  overflow-wrap: anywhere;
  font: 700 17px/1.4 "Microsoft YaHei", sans-serif;
}

.score-board strong {
  min-width: 126px;
  color: var(--cinnabar);
  font-size: 44px;
  line-height: 1;
  font-family: Georgia, serif;
}

.confidence-ring {
  display: flex;
  align-items: center;
  gap: 16px;
}

.confidence-ring svg {
  width: 96px;
  height: 96px;
  transform: rotate(-90deg);
}

.ring-bg,
.ring-value {
  fill: none;
  stroke-width: 10;
}

.ring-bg {
  stroke: rgba(72, 48, 30, 0.12);
}

.ring-value {
  stroke: var(--jade);
  stroke-linecap: round;
  stroke-dasharray: 302;
  stroke-dashoffset: 84;
  transition: stroke-dashoffset 600ms ease;
}

.confidence-ring strong {
  display: block;
  color: var(--jade);
  font-size: 28px;
}

.confidence-ring span {
  font: 700 13px/1.4 "Microsoft YaHei", sans-serif;
}

.verdict {
  margin: 0;
  color: rgba(23, 19, 15, 0.78);
  font-size: 16px;
  line-height: 1.8;
}

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

.quick-signals div {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: rgba(255, 252, 244, 0.46);
}

.quick-signals dt {
  color: rgba(23, 19, 15, 0.56);
  font: 700 12px/1.3 "Microsoft YaHei", sans-serif;
}

.quick-signals dd {
  margin: 8px 0 0;
  font-weight: 800;
}

.methods {
  margin: 70px 0 22px;
}

.section-title {
  color: var(--paper);
}

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

.method-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 22px;
}

.method-card::after {
  position: absolute;
  right: -24px;
  bottom: -28px;
  color: rgba(168, 50, 34, 0.07);
  content: attr(data-method);
  font: 800 52px/1 Georgia, serif;
}

.method-card span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--cinnabar);
  background: rgba(255, 252, 244, 0.64);
  font-size: 28px;
}

.method-card h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.method-card p {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  color: rgba(23, 19, 15, 0.74);
  line-height: 1.75;
}

.flow-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  margin: 22px 0;
  border: 1px solid rgba(245, 234, 212, 0.24);
  border-radius: 8px;
  background: rgba(245, 234, 212, 0.2);
  color: var(--paper);
}

.flow-band div {
  display: flex;
  align-items: center;
  min-height: 88px;
  gap: 14px;
  padding: 18px;
  background: rgba(23, 19, 15, 0.42);
}

.flow-band strong {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--gold);
  font-family: Georgia, serif;
}

.flow-band span {
  font-weight: 800;
}

.archive-panel {
  margin: 22px 0 52px;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  background: rgba(255, 252, 244, 0.52);
}

.history-item strong {
  color: var(--cinnabar);
  white-space: nowrap;
  font-size: 20px;
}

.history-item span {
  display: block;
  color: rgba(23, 19, 15, 0.6);
  font: 700 12px/1.5 "Microsoft YaHei", sans-serif;
}

.site-footer {
  padding: 20px 0 34px;
  color: rgba(245, 234, 212, 0.72);
  line-height: 1.7;
}

@keyframes slow-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes float {
  50% {
    transform: translateY(-14px);
  }
}

@media (max-width: 920px) {
  .hero,
  .predictor-grid,
  .studio-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 28px;
  }

  .hero-orbit {
    min-height: 330px;
  }

  .method-grid,
  .route-grid,
  .method-deep-grid,
  .rationale-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .studio-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 22px, 1180px);
  }

  .page-hero p:not(.eyebrow),
  .method-deep p,
  .rationale-row p,
  .article-body p {
    word-break: break-all;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .top-nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 20px;
  }

  .top-nav a {
    padding-inline: 0;
  }

  h1 {
    max-width: 100%;
    font-size: 28px;
    line-height: 1.12;
    word-break: break-all;
  }

  .hero-copy,
  .hero-lead {
    width: 100%;
    max-width: 100%;
  }

  .hero-lead {
    font-size: 16px;
    word-break: break-all;
  }

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

  .filter-button {
    width: 100%;
    padding-inline: 8px;
  }

  form,
  .method-grid,
  .route-grid,
  .method-deep-grid,
  .rationale-grid,
  .match-list,
  .flow-band,
  .quick-signals {
    grid-template-columns: 1fr;
  }

  .score-board {
    grid-template-columns: 1fr;
  }

  .score-board strong {
    min-width: 0;
  }

  .panel {
    padding: 18px;
  }

  .history-item {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
