:root {
  color-scheme: dark;
  --bg: #0d0b10;
  --panel: #17131d;
  --panel-2: #211926;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f8f1ff;
  --muted: #a99db5;
  --pink: #ff5c9a;
  --gold: #f8c95b;
  --cyan: #6ee7ff;
  --green: #5ff0a0;
  --danger: #ff8c7a;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 22% 12%, rgba(255, 92, 154, 0.18), transparent 28%),
    radial-gradient(circle at 78% 20%, rgba(110, 231, 255, 0.13), transparent 24%),
    linear-gradient(135deg, #0b0710 0%, #121018 52%, #08090c 100%);
  color: var(--text);
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.side-panel {
  border-right: 1px solid var(--line);
  background: rgba(18, 14, 21, 0.92);
  padding: 24px 18px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(248, 201, 91, 0.35);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 92, 154, 0.26), rgba(248, 201, 91, 0.18));
  color: var(--gold);
  font-weight: 900;
}

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

h1 {
  font-size: 20px;
}

h2 {
  margin-top: 6px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0;
}

h3 {
  font-size: 22px;
}

.brand-row p,
.copy,
.empty-state p,
label,
.metric-row span,
.reward-grid span {
  color: var(--muted);
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  padding: 12px 14px;
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  border-color: rgba(248, 201, 91, 0.25);
  background: rgba(248, 201, 91, 0.12);
  color: var(--gold);
}

.side-card,
.form-panel,
.result-panel,
.content-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 19, 29, 0.86);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.side-card {
  margin-top: 28px;
  padding: 16px;
}

.eyebrow {
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}

.metric-row strong {
  color: var(--green);
}

.content-area {
  padding: 36px clamp(18px, 4vw, 48px);
}

.top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.ghost-button,
.primary-button {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 800;
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.primary-button {
  border: 0;
  background: linear-gradient(135deg, var(--pink), #ff8c3a);
  color: white;
}

.primary-button.compact {
  align-self: flex-start;
  margin-top: 16px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(310px, 440px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.form-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pill {
  border-radius: 999px;
  background: rgba(95, 240, 160, 0.12);
  color: var(--green);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

select,
textarea,
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  outline: none;
  padding: 12px;
}

select:focus,
textarea:focus,
input:focus {
  border-color: rgba(255, 92, 154, 0.72);
}

textarea {
  resize: vertical;
}

.result-panel {
  min-height: 620px;
  padding: 20px;
}

.empty-state {
  display: grid;
  min-height: 100%;
  place-items: center;
  gap: 16px;
  text-align: center;
}

.zodiac-wheel {
  position: relative;
  width: min(420px, 78vw);
  aspect-ratio: 1;
  border: 1px solid rgba(248, 201, 91, 0.24);
  border-radius: 50%;
  background:
    conic-gradient(
      from -20deg,
      rgba(255, 92, 154, 0.2),
      rgba(248, 201, 91, 0.18),
      rgba(110, 231, 255, 0.18),
      rgba(255, 92, 154, 0.2)
    );
}

.zodiac-wheel::after {
  content: "关系能量盘";
  position: absolute;
  inset: 32%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(13, 11, 16, 0.7);
  color: var(--gold);
  font-weight: 900;
}

.zodiac-wheel span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  margin-left: -29px;
  margin-top: -10px;
  color: rgba(248, 241, 255, 0.82);
  font-size: 13px;
  text-align: center;
  transform: rotate(calc(var(--i) * 30deg)) translateY(-180px) rotate(calc(var(--i) * -30deg));
}

.zodiac-wheel span:nth-child(1) { --i: 0; }
.zodiac-wheel span:nth-child(2) { --i: 1; }
.zodiac-wheel span:nth-child(3) { --i: 2; }
.zodiac-wheel span:nth-child(4) { --i: 3; }
.zodiac-wheel span:nth-child(5) { --i: 4; }
.zodiac-wheel span:nth-child(6) { --i: 5; }
.zodiac-wheel span:nth-child(7) { --i: 6; }
.zodiac-wheel span:nth-child(8) { --i: 7; }
.zodiac-wheel span:nth-child(9) { --i: 8; }
.zodiac-wheel span:nth-child(10) { --i: 9; }
.zodiac-wheel span:nth-child(11) { --i: 10; }
.zodiac-wheel span:nth-child(12) { --i: 11; }

.reading-card {
  display: grid;
  gap: 16px;
}

.score-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.score-band div,
.locked-item,
.reward-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
}

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

.score-band strong {
  display: block;
  margin-top: 6px;
  color: var(--gold);
  font-size: 28px;
}

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

.reading-section h4 {
  margin: 0 0 8px;
  color: var(--gold);
}

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

.locked-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.locked-item span {
  color: var(--muted);
}

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

.content-card {
  max-width: 900px;
  padding: 24px;
}

.daily-output {
  margin-top: 18px;
  color: var(--text);
}

.share-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 18px;
}

.reward-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.reward-grid strong,
.reward-grid span {
  display: block;
}

.reward-grid strong {
  color: var(--gold);
  font-size: 22px;
}

.order-table {
  display: grid;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.order-table > div {
  display: grid;
  grid-template-columns: 1.5fr 0.6fr 0.7fr 0.8fr;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.order-table > div:first-child {
  border-top: 0;
}

.order-head {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.order-table em {
  color: var(--green);
  font-style: normal;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.66);
  padding: 18px;
}

.modal.show {
  display: grid;
}

.modal-card {
  position: relative;
  display: grid;
  width: min(460px, 100%);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 24px;
}

.close-button {
  position: absolute;
  right: 12px;
  top: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
}

.qr-placeholder {
  display: grid;
  width: 190px;
  height: 190px;
  place-items: center;
  justify-self: center;
  border: 1px dashed rgba(248, 201, 91, 0.5);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 47%, rgba(248, 201, 91, 0.16) 48%, rgba(248, 201, 91, 0.16) 52%, transparent 53%),
    linear-gradient(transparent 47%, rgba(248, 201, 91, 0.16) 48%, rgba(248, 201, 91, 0.16) 52%, transparent 53%);
  color: var(--gold);
  font-weight: 900;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .side-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .nav-item {
    text-align: center;
  }

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

@media (max-width: 640px) {
  .content-area {
    padding: 22px 14px;
  }

  .top-bar,
  .form-header,
  .locked-item {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-list,
  .score-band,
  .reward-grid,
  .share-box {
    grid-template-columns: 1fr;
  }

  .result-panel {
    min-height: auto;
  }

  .zodiac-wheel span {
    transform: rotate(calc(var(--i) * 30deg)) translateY(-38vw) rotate(calc(var(--i) * -30deg));
  }

  .order-table > div {
    grid-template-columns: 1fr;
  }
}
