:root {
  color-scheme: dark;
  --bg: #080b0d;
  --panel: rgba(17, 22, 24, 0.86);
  --panel-strong: rgba(24, 30, 31, 0.96);
  --line: rgba(215, 182, 108, 0.24);
  --gold: #d7b66c;
  --gold-soft: #f1d995;
  --jade: #7ed6ba;
  --red: #b74338;
  --text: #f3efe2;
  --muted: #9da49d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(126, 214, 186, 0.12), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(215, 182, 108, 0.12), transparent 24rem),
    linear-gradient(135deg, #080b0d 0%, #101313 48%, #0b1110 100%);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

.shell {
  width: min(1440px, 100%);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 48px);
  background: rgba(8, 11, 13, 0.78);
  border-bottom: 1px solid rgba(215, 182, 108, 0.16);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold-soft);
  background: linear-gradient(145deg, rgba(215, 182, 108, 0.16), rgba(126, 214, 186, 0.06));
}

.brand strong,
.brand small {
  display: block;
}

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

.nav {
  display: flex;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(215, 182, 108, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.nav a {
  padding: 9px 16px;
  border-radius: 999px;
  color: var(--muted);
}

.nav a.active {
  color: #090b0b;
  background: var(--gold);
}

.page {
  padding: clamp(28px, 5vw, 64px) clamp(18px, 4vw, 48px);
}

#home-page {
  padding-bottom: 26px;
}

#matches-page {
  margin-top: -34px;
  padding-top: 0;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(240px, 0.88fr) minmax(210px, 0.38fr);
  gap: clamp(18px, 2.6vw, 34px);
  align-items: start;
  min-height: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--jade);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  max-width: 880px;
  font-size: clamp(28px, 3.6vw, 52px);
  line-height: 1.18;
  font-weight: 700;
  text-wrap: balance;
}

.hero-title span {
  display: block;
}

h2 {
  font-size: clamp(24px, 3vw, 36px);
}

.lead {
  max-width: 640px;
  color: #c5cabe;
  font-size: 17px;
  line-height: 1.85;
}

.hero-copy {
  max-width: 980px;
  align-self: center;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.accuracy-card {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 2px 12px;
  align-items: baseline;
  width: fit-content;
  margin-top: 18px;
  padding: 10px 14px;
  border: 1px solid rgba(126, 214, 186, 0.2);
  border-radius: 8px;
  color: var(--text);
  background: rgba(126, 214, 186, 0.055);
}

.accuracy-card:empty {
  display: none;
}

.accuracy-card span {
  color: var(--jade);
  font-size: 12px;
}

.accuracy-card strong {
  color: var(--gold-soft);
  font-size: 24px;
  line-height: 1;
}

.accuracy-card em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.hero-risk-note {
  margin: 12px 0 0;
  color: rgba(197, 202, 190, 0.72);
  font-size: 12px;
  line-height: 1.6;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(215, 182, 108, 0.26);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.button.primary {
  color: #10100c;
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: 0 14px 40px rgba(215, 182, 108, 0.18);
}

.button.subtle {
  color: var(--gold-soft);
  background: rgba(215, 182, 108, 0.05);
}

.button.ghost:hover,
.button.subtle:hover {
  border-color: rgba(215, 182, 108, 0.5);
}

.button.full {
  width: 100%;
}

.hero-quick {
  margin-top: 28px;
  max-width: 960px;
}

.hero-quick-head {
  display: grid;
  justify-items: start;
  gap: 6px;
  margin-bottom: 14px;
}

.hero-quick-head .eyebrow {
  margin-bottom: 0;
}

.hero-quick-head h2 {
  font-size: clamp(20px, 2.2vw, 28px);
}

.hero-quick-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.hero-quick-card {
  display: grid;
  gap: 7px;
  flex: 0 0 168px;
  min-height: 124px;
  padding: 12px 12px 14px;
  border: 1px solid rgba(215, 182, 108, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.hero-quick-card strong {
  font-size: 14px;
  line-height: 1.28;
}

.hero-quick-card p {
  margin: 0;
  color: #c6ccc2;
  font-size: 12px;
  line-height: 1.35;
}

.hero-quick-card .button {
  justify-self: start;
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

@media (min-width: 1101px) {
  .hero-quick {
    max-width: none;
    width: calc(100% + 300px);
  }
}

.hero-quick-empty {
  padding: 14px 0;
  color: #c6ccc2;
  font-size: 15px;
}

.hero-orb {
  display: grid;
  place-items: center;
  padding-top: 18px;
}

.compass {
  position: relative;
  width: min(330px, 82vw);
  aspect-ratio: 1;
  border: 1px solid rgba(215, 182, 108, 0.36);
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, rgba(215, 182, 108, 0.13) 0 1deg, transparent 1deg 22.5deg),
    radial-gradient(circle, rgba(126, 214, 186, 0.13), rgba(215, 182, 108, 0.05) 42%, transparent 68%);
  box-shadow: var(--shadow), inset 0 0 70px rgba(215, 182, 108, 0.08);
  animation: breathe 7s ease-in-out infinite;
}

.compass::before,
.compass::after {
  content: "";
  position: absolute;
  inset: 13%;
  border: 1px solid rgba(215, 182, 108, 0.24);
  border-radius: 50%;
}

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

.compass span {
  position: absolute;
  color: var(--gold-soft);
}

.compass span:nth-child(1) { left: 48%; top: 7%; }
.compass span:nth-child(2) { right: 18%; top: 18%; }
.compass span:nth-child(3) { right: 8%; top: 48%; }
.compass span:nth-child(4) { right: 18%; bottom: 18%; }
.compass span:nth-child(5) { left: 48%; bottom: 7%; }
.compass span:nth-child(6) { left: 18%; bottom: 18%; }
.compass span:nth-child(7) { left: 8%; top: 48%; }
.compass span:nth-child(8) { left: 18%; top: 18%; }

.coin {
  position: absolute;
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 50%;
  color: #151109;
  background: radial-gradient(circle at 35% 30%, #fff0b8, #c99d45 66%, #785a20);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
  animation: floatCoin 5s ease-in-out infinite;
}

.coin.one {
  top: 34%;
  left: 28%;
}

.coin.two {
  right: 25%;
  bottom: 31%;
  animation-delay: -1.8s;
}

.section {
  padding-top: 10px;
}

.leadgen-section {
  padding-top: 12px;
}

.leadgen-side {
  align-self: start;
  justify-self: end;
  display: grid;
  align-content: start;
  gap: 14px;
  width: min(210px, 100%);
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(215, 182, 108, 0.16);
  border-radius: 8px;
  background: rgba(17, 22, 24, 0.7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.leadgen-head h2 {
  font-size: clamp(18px, 1.7vw, 24px);
}

.leadgen-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.leadgen-button {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 16px 16px 66px;
  border: 1px solid rgba(215, 182, 108, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(215, 182, 108, 0.08), rgba(126, 214, 186, 0.04)),
    var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.leadgen-button:hover {
  transform: translateY(-3px);
  border-color: rgba(215, 182, 108, 0.44);
}

.leadgen-button::after {
  content: "联系老师";
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #10100c;
  background: var(--gold);
  font-weight: 700;
  font-size: 13px;
}

.leadgen-button span {
  color: var(--jade);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.leadgen-button strong {
  max-width: 168px;
  color: var(--text);
  font-size: clamp(18px, 1.5vw, 26px);
  line-height: 1.2;
}

.leadgen-button em {
  color: #c6ccc2;
  font-style: normal;
  font-size: 13px;
  max-width: 160px;
  line-height: 1.5;
}

.leadgen-button.merged-service strong,
.leadgen-button.merged-service em {
  max-width: 220px;
}

.leadgen-button.mystic {
  background:
    radial-gradient(circle at 82% 18%, rgba(215, 182, 108, 0.16), transparent 18rem),
    var(--panel);
}

.leadgen-button.ai {
  background:
    radial-gradient(circle at 82% 18%, rgba(126, 214, 186, 0.16), transparent 18rem),
    var(--panel);
}

.service-page {
  min-height: calc(100vh - 82px);
}

.service-detail {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid rgba(215, 182, 108, 0.2);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.service-detail h1 {
  font-size: clamp(36px, 5vw, 68px);
}

.back-link {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--gold-soft);
}

.detail-body {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid rgba(215, 182, 108, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.service-actions {
  margin-top: 22px;
}

.qr-placeholder.large {
  width: min(220px, 100%);
}

.service-qr-image {
  width: min(220px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
}

.contact-list.big p {
  font-size: 20px;
  padding-bottom: 16px;
}

.contact-list.big strong {
  font-size: 24px;
}

.leadgen-body {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  padding: 0 22px 22px;
  align-items: center;
}

.qr-placeholder {
  display: grid;
  width: 132px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px dashed rgba(215, 182, 108, 0.42);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.2);
  font-size: 13px;
}

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

.contact-list p {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(215, 182, 108, 0.1);
}

.contact-list span {
  color: var(--muted);
}

.contact-list strong {
  color: var(--gold-soft);
  text-align: right;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

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

.schedule-controls,
.knockout-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(215, 182, 108, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.knockout-fields {
  margin-bottom: 0;
}

.wide-control {
  grid-column: span 1;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px solid rgba(215, 182, 108, 0.14);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.match-card,
.panel,
.divination-stage,
.admin-shell {
  border: 1px solid rgba(215, 182, 108, 0.18);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.match-card {
  padding: 22px;
}

.match-card h3 {
  margin: 8px 0 14px;
  font-size: 23px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  color: var(--muted);
  border-top: 1px solid rgba(215, 182, 108, 0.12);
}

.mode-badge,
.source-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 6px 10px;
  border: 1px solid rgba(126, 214, 186, 0.28);
  border-radius: 999px;
  color: var(--jade);
  background: rgba(126, 214, 186, 0.07);
  font-size: 12px;
}

.mode-badge.human,
.source-pill.human {
  border-color: rgba(215, 182, 108, 0.34);
  color: var(--gold-soft);
  background: rgba(215, 182, 108, 0.1);
}

.score-badge {
  color: var(--gold-soft);
  font-size: 20px;
}

.prediction-review {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(215, 182, 108, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.prediction-review span {
  flex: 0 0 auto;
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 700;
}

.prediction-review small {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.prediction-review.hit {
  border-color: rgba(126, 214, 186, 0.28);
  background: rgba(126, 214, 186, 0.07);
}

.prediction-review.hit span {
  color: var(--jade);
}

.prediction-review.miss {
  border-color: rgba(215, 182, 108, 0.2);
}

.prediction-review.excluded {
  border-color: rgba(157, 164, 157, 0.22);
  background: rgba(255, 255, 255, 0.025);
}

.prediction-review.excluded span {
  color: var(--muted);
}

.finished-row span {
  color: var(--muted);
}

.button.disabled {
  color: var(--muted);
  cursor: default;
  background: rgba(255, 255, 255, 0.03);
}

.oracle-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: stretch;
}

.panel,
.divination-stage,
.admin-shell {
  padding: 22px;
}

.match-tabs {
  display: grid;
  gap: 10px;
  margin: 24px 0;
  max-height: 56vh;
  overflow: auto;
  padding-right: 4px;
}

.oracle-back-button {
  width: 100%;
  margin-top: 14px;
}

.match-tab {
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(215, 182, 108, 0.15);
  border-radius: 8px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.match-tab.active {
  border-color: var(--gold);
  background: rgba(215, 182, 108, 0.12);
}

.risk-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.stage-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.confidence {
  display: grid;
  min-width: 96px;
  place-items: center;
  border: 1px solid rgba(126, 214, 186, 0.28);
  border-radius: 8px;
  background: rgba(126, 214, 186, 0.07);
}

.confidence span {
  color: var(--jade);
  font-size: 28px;
  font-weight: 700;
}

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

.hexagram-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.gua-card {
  padding: 18px;
  border: 1px solid rgba(215, 182, 108, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.gua-card span,
.gua-card strong {
  display: block;
}

.gua-card span {
  color: var(--muted);
}

.gua-card strong {
  margin: 5px 0 16px;
  font-size: 26px;
}

.lines {
  display: grid;
  gap: 8px;
}

.yao {
  display: flex;
  height: 12px;
  gap: 10px;
}

.yao i {
  flex: 1;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
}

.yao.yin i {
  flex-basis: 42%;
}

.yao.moving i {
  background: linear-gradient(90deg, var(--red), var(--gold));
}

.change-arrow {
  display: grid;
  height: 64px;
  place-items: center;
  border-radius: 50%;
  color: var(--gold-soft);
  border: 1px solid var(--line);
}

.process {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(215, 182, 108, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  opacity: 0;
  transform: translateY(8px);
  animation: reveal 0.55s ease forwards;
}

.step-index {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #0b0d0d;
  background: var(--gold);
}

.step h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.step p {
  margin: 0;
  color: #c9cec4;
  line-height: 1.75;
}

.verdict {
  margin: 18px 0;
  padding: 24px;
  border: 1px solid rgba(126, 214, 186, 0.22);
  border-radius: 8px;
  color: var(--jade);
  background: rgba(126, 214, 186, 0.07);
  font-size: 30px;
  font-weight: 700;
}

.signal-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.signal {
  padding: 12px;
  border-left: 3px solid var(--gold);
  color: #d8ddd2;
  background: rgba(255, 255, 255, 0.04);
}

.strength-panel {
  margin-top: 16px;
  padding: 22px;
  border: 1px solid rgba(215, 182, 108, 0.18);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.compact-head {
  align-items: center;
}

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

.strength-card {
  min-height: 190px;
  padding: 16px;
  border: 1px solid rgba(215, 182, 108, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.strength-card span {
  color: var(--jade);
  font-size: 13px;
}

.strength-card p {
  color: #c6ccc2;
  line-height: 1.7;
}

.strength-card .data-source {
  color: var(--muted);
  font-size: 12px;
}

.strength-metrics {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.strength-metrics b {
  font-size: 16px;
}

.power-bars {
  display: grid;
  gap: 10px;
}

.power-bars label {
  position: relative;
  display: block;
  padding-bottom: 8px;
  color: var(--muted);
}

.power-bars label::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.power-bars i {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--jade), var(--gold));
}

.h2h-card strong {
  display: block;
  margin: 14px 0 8px;
  font-size: 18px;
  line-height: 1.5;
}

.result-source-note {
  margin: -6px 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(126, 214, 186, 0.18);
  border-radius: 8px;
  color: #c9d8cf;
  background: rgba(126, 214, 186, 0.06);
  line-height: 1.6;
}

.agent-teaser {
  color: #c6ccc2;
  line-height: 1.8;
}

.locked-verdict {
  margin: 18px 0;
  padding: 22px;
  border: 1px solid rgba(215, 182, 108, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(215, 182, 108, 0.08), rgba(126, 214, 186, 0.05)),
    rgba(0, 0, 0, 0.18);
}

.locked-verdict span,
.locked-verdict strong {
  display: block;
}

.locked-verdict span {
  color: var(--muted);
  font-size: 13px;
}

.locked-verdict strong {
  margin-top: 6px;
  color: var(--gold-soft);
  font-size: 28px;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 5, 6, 0.76);
  backdrop-filter: blur(16px);
}

.dialog-backdrop[hidden] {
  display: none;
}

.agent-dialog {
  width: min(760px, 100%);
  max-height: min(760px, 90vh);
  display: grid;
  grid-template-rows: auto auto minmax(260px, 1fr) auto;
  border: 1px solid rgba(215, 182, 108, 0.28);
  border-radius: 8px;
  background: rgba(10, 14, 15, 0.98);
  box-shadow: 0 28px 120px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(215, 182, 108, 0.12);
}

.dialog-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(215, 182, 108, 0.22);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.dialog-match {
  padding: 14px 24px;
  color: var(--jade);
  border-bottom: 1px solid rgba(215, 182, 108, 0.1);
}

.chat-stream {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px 24px;
  overflow: auto;
}

.chat-message {
  max-width: 92%;
  padding: 14px 16px;
  border: 1px solid rgba(215, 182, 108, 0.16);
  border-radius: 8px;
  color: #d9ded4;
  background: rgba(255, 255, 255, 0.045);
  line-height: 1.75;
  animation: reveal 0.35s ease forwards;
}

.chat-message.agent {
  border-left: 3px solid var(--gold);
}

.chat-message.final {
  color: #10100c;
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  font-weight: 700;
}

.typing-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px 22px;
  color: var(--muted);
}

.typing-row[hidden] {
  display: none;
}

.typing-row span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulseDot 1s ease-in-out infinite;
}

.typing-row span:nth-child(2) {
  animation-delay: 0.16s;
}

.typing-row span:nth-child(3) {
  animation-delay: 0.32s;
}

.typing-row em {
  font-style: normal;
  margin-left: 4px;
}

.admin-shell {
  max-width: 1100px;
  margin: 0 auto;
}

.status-pill {
  padding: 8px 12px;
  border: 1px solid rgba(126, 214, 186, 0.32);
  border-radius: 999px;
  color: var(--jade);
}

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

.teacher-form {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(215, 182, 108, 0.22);
}

.teacher-form h3 {
  margin: 0 0 8px;
  color: var(--paper);
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.owner-note {
  margin: 4px 0 0;
  padding: 14px;
  border: 1px solid rgba(126, 214, 186, 0.2);
  border-radius: 8px;
  color: #c9d8cf;
  background: rgba(126, 214, 186, 0.06);
  line-height: 1.7;
}

.solar-admin-card {
  padding: 16px;
  border: 1px solid rgba(215, 182, 108, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(215, 182, 108, 0.12), rgba(126, 214, 186, 0.06));
}

.solar-admin-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--jade);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.solar-admin-card strong {
  display: block;
  color: var(--gold);
  font-size: 20px;
  margin-bottom: 8px;
}

.solar-admin-card p {
  margin: 0;
  color: #c9d8cf;
  line-height: 1.7;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(215, 182, 108, 0.18);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  outline: none;
}

textarea {
  resize: vertical;
}

.wide,
.form-actions {
  grid-column: 1 / -1;
}

@keyframes breathe {
  50% {
    transform: scale(1.025) rotate(1deg);
  }
}

@keyframes floatCoin {
  50% {
    transform: translateY(-16px) rotateY(180deg);
  }
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseDot {
  50% {
    opacity: 0.35;
    transform: translateY(-3px);
  }
}

@media (max-width: 1100px) {
  .hero,
  .oracle-layout,
  .match-grid {
    grid-template-columns: 1fr;
  }

  .oracle-layout {
    align-items: start;
  }

  .hero-copy {
    align-self: start;
  }

  .leadgen-side {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

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

  .hero-quick-list {
    overflow-x: auto;
  }

  .leadgen-button strong,
  .leadgen-button em {
    max-width: none;
  }
}

@media (max-width: 900px) {
  h1 {
    max-width: none;
    font-size: clamp(24px, 5.2vw, 38px);
    line-height: 1.16;
    text-wrap: unset;
  }

  .lead {
    max-width: 32ch;
    font-size: 16px;
    line-height: 1.8;
  }

  .hero-title span {
    display: block;
  }
}

@media (max-width: 680px) {
  .topbar,
  .section-head,
  .stage-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .nav a {
    flex: 1;
    text-align: center;
  }

  .hero {
    min-height: auto;
  }

  .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(24px, 10vw, 40px);
  }

  .hero-title span {
    display: block;
  }

  .hexagram-board,
  .admin-form,
  .schedule-controls,
  .knockout-fields,
  .strength-grid,
  .leadgen-grid,
  .leadgen-body {
    grid-template-columns: 1fr;
  }

  .leadgen-side {
    padding: 0;
  }

  .qr-placeholder {
    width: min(180px, 100%);
  }

  .change-arrow {
    width: 64px;
    margin: 0 auto;
  }
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  body {
    background:
      radial-gradient(circle at 100% 0%, rgba(215, 182, 108, 0.12), transparent 18rem),
      radial-gradient(circle at 0% 18%, rgba(126, 214, 186, 0.1), transparent 16rem),
      linear-gradient(160deg, #080b0d 0%, #101313 58%, #090d0c 100%);
  }

  .shell {
    width: 100%;
    overflow-x: hidden;
  }

  .topbar {
    position: sticky;
    padding: 12px 16px;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
  }

  .brand strong {
    font-size: 15px;
  }

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

  .page {
    padding: 22px 16px;
  }

  #home-page {
    padding-top: 28px;
    padding-bottom: 16px;
  }

  #matches-page {
    margin-top: 0;
    padding-top: 14px;
  }

  .hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    overflow: hidden;
  }

  .hero-copy {
    position: relative;
    z-index: 2;
    max-width: none;
  }

  .hero-copy h1 {
    max-width: 11.5em;
    font-size: clamp(30px, 8.2vw, 38px);
    line-height: 1.16;
  }

  .hero-title span {
    display: block;
  }

  .eyebrow {
    margin-bottom: 9px;
    font-size: 11px;
    letter-spacing: 0.16em;
  }

  .lead {
    max-width: 100%;
    margin: 16px 0 0;
    font-size: 14px;
    line-height: 1.75;
  }

  .hero-actions {
    margin-top: 20px;
  }

  .hero-actions .button {
    min-width: 148px;
  }

  .accuracy-card {
    width: 100%;
    grid-template-columns: auto 1fr;
    margin-top: 14px;
  }

  .hero-risk-note {
    margin-top: 10px;
  }

  .hero-orb {
    position: absolute;
    top: 86px;
    right: -128px;
    z-index: 1;
    width: 260px;
    padding: 0;
    opacity: 0.42;
    pointer-events: none;
  }

  .compass {
    width: 260px;
  }

  .coin {
    width: 58px;
    height: 58px;
  }

  .hero-quick {
    margin-top: 22px;
    max-width: none;
  }

  .hero-quick-head {
    margin-bottom: 10px;
  }

  .hero-quick-head h2 {
    font-size: 24px;
  }

  .hero-quick-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    overflow: visible;
    padding-bottom: 0;
  }

  .hero-quick-card {
    min-height: 116px;
    padding: 11px;
  }

  .hero-quick-card strong {
    font-size: 14px;
  }

  .hero-quick-card p {
    font-size: 11px;
  }

  .hero-quick-card .button {
    min-height: 32px;
    padding: 0 9px;
  }

  .leadgen-side {
    position: relative;
    z-index: 2;
    width: 100%;
    margin-top: 4px;
    padding: 14px;
    border: 1px solid rgba(215, 182, 108, 0.14);
    background: rgba(17, 22, 24, 0.64);
  }

  .leadgen-head {
    margin-bottom: 10px;
  }

  .leadgen-head h2 {
    font-size: 20px;
  }

  .leadgen-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .leadgen-button {
    min-height: 104px;
    padding: 13px 14px 56px;
  }

  .leadgen-button strong {
    max-width: 13em;
    font-size: 22px;
  }

  .leadgen-button em {
    max-width: 100%;
    font-size: 12px;
  }

  .leadgen-button::after {
    right: 14px;
    bottom: 14px;
    padding: 6px 12px;
    font-size: 12px;
  }

  .section-head {
    margin-bottom: 14px;
  }

  .section-head h2 {
    font-size: 30px;
  }

  .schedule-controls {
    gap: 12px;
    padding: 14px;
  }

  .match-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .match-card {
    padding: 16px;
  }

  .match-card h3 {
    font-size: 21px;
  }

  .prediction-review {
    align-items: flex-start;
    flex-direction: column;
  }

  .prediction-review small {
    text-align: left;
  }

  .oracle-layout {
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .panel,
  .divination-stage,
  .admin-shell,
  .strength-panel {
    padding: 16px;
    max-width: 100%;
    min-width: 0;
  }

  .match-selector {
    order: 1;
  }

  .divination-stage {
    order: 2;
    min-width: 0;
    overflow: hidden;
  }

  .verdict-panel {
    order: 3;
    min-width: 0;
    overflow: hidden;
  }

  .match-tabs {
    display: flex;
    gap: 10px;
    max-height: none;
    margin: 16px 0;
    overflow-x: auto;
    padding: 0 0 4px;
  }

  .match-tab {
    flex: 0 0 78%;
    min-height: 82px;
  }

  .stage-head {
    gap: 12px;
  }

  .stage-head h2 {
    font-size: 28px;
  }

  .confidence {
    width: 100%;
    min-height: 70px;
    grid-template-columns: auto auto;
    justify-content: center;
    gap: 10px;
  }

  .confidence span {
    font-size: 26px;
  }

  .hexagram-board {
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .gua-card {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    padding: 14px;
  }

  .gua-card strong {
    font-size: 22px;
  }

  .yao {
    height: 10px;
  }

  .change-arrow {
    width: 52px;
    height: 52px;
    margin: 0 auto;
  }

  .verdict-panel .button.full,
  .locked-verdict,
  .verdict,
  .signal-list,
  .agent-teaser {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .verdict-panel .button.full {
    display: flex;
    justify-content: center;
    overflow: hidden;
    white-space: normal;
  }

  .step {
    grid-template-columns: 30px 1fr;
    gap: 10px;
    padding: 12px;
  }

  .step-index {
    width: 30px;
    height: 30px;
  }

  .step p {
    line-height: 1.65;
  }

  .strength-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .strength-card {
    min-height: 0;
  }

  .admin-shell {
    max-width: none;
  }

  .admin-form {
    gap: 12px;
  }

  .form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .service-page {
    min-height: auto;
  }

  .service-detail {
    padding: 20px 16px;
  }

  .service-detail h1 {
    font-size: 34px;
  }

  .detail-body {
    padding: 16px;
  }

  .leadgen-body {
    gap: 14px;
    padding: 0;
  }

  .service-qr-image,
  .qr-placeholder.large {
    width: min(220px, 100%);
    justify-self: center;
  }

  .contact-list p {
    display: grid;
    gap: 4px;
  }

  .contact-list strong {
    text-align: left;
  }

  .dialog-backdrop {
    padding: 10px;
  }

  .agent-dialog {
    max-height: 92vh;
  }
}

@media (max-width: 430px) {
  .page {
    padding-left: 14px;
    padding-right: 14px;
    overflow-x: hidden;
  }

  .hero-copy h1 {
    max-width: 10.5em;
    font-size: clamp(28px, 8.8vw, 34px);
  }

  .hero-quick-list {
    grid-template-columns: 1fr;
  }

  .hero-quick-card {
    min-height: 0;
  }

  .match-tab {
    flex-basis: 86%;
  }

  .stage-head h2,
  .section-head h2 {
    font-size: 26px;
  }

  .panel,
  .divination-stage,
  .admin-shell,
  .strength-panel {
    padding: 14px;
  }

  .gua-card {
    padding: 12px;
  }

  .yao {
    width: 100%;
    max-width: 100%;
    gap: 6px;
  }

  .yao i {
    min-width: 0;
  }

  .gua-card strong {
    font-size: 20px;
  }

  .lines {
    gap: 7px;
  }

  .locked-verdict strong,
  .verdict {
    font-size: 24px;
  }
}
