:root {
  color-scheme: light;
  --ink: #171926;
  --ink-soft: #333647;
  --night: #10121c;
  --night-soft: #1b1e2c;
  --paper: #f3efe6;
  --paper-deep: #e9e1d3;
  --card: rgba(255, 253, 248, 0.9);
  --card-solid: #fffdf8;
  --gold: #d7ad5b;
  --gold-deep: #a77b32;
  --gold-pale: #f0dfb3;
  --jade: #577e6f;
  --jade-soft: #dce8e1;
  --rose: #a75f65;
  --rose-soft: #f1dede;
  --muted: #77766e;
  --line: rgba(32, 34, 45, 0.11);
  --line-light: rgba(255, 255, 255, 0.12);
  --shadow-sm: 0 8px 24px rgba(21, 22, 34, 0.06);
  --shadow-md: 0 24px 70px rgba(14, 16, 26, 0.13);
  --shadow-dark: 0 28px 80px rgba(0, 0, 0, 0.34);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", SimSun, serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 7% 18%, rgba(215, 173, 91, 0.13), transparent 27rem),
    radial-gradient(circle at 94% 78%, rgba(87, 126, 111, 0.12), transparent 30rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.15'/%3E%3C/svg%3E");
  content: "";
  opacity: 0.16;
  pointer-events: none;
}

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

button {
  cursor: pointer;
}

button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
}

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

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ambient {
  position: fixed;
  z-index: -2;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
}

.ambient-one {
  top: 34%;
  left: -14rem;
  width: 30rem;
  height: 30rem;
  border: 1px solid rgba(215, 173, 91, 0.11);
}

.ambient-two {
  right: -17rem;
  bottom: -16rem;
  width: 38rem;
  height: 38rem;
  border: 1px solid rgba(87, 126, 111, 0.12);
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 clamp(20px, 4vw, 68px);
  color: rgba(255, 255, 255, 0.82);
  transition:
    background 220ms ease,
    color 220ms ease,
    box-shadow 220ms ease;
}

body.has-profile .site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 236, 0.86);
  box-shadow: 0 8px 30px rgba(19, 20, 31, 0.04);
  color: var(--ink);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  display: grid;
  width: 43px;
  height: 43px;
  color: var(--gold);
  place-items: center;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.1;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: currentColor;
  font-size: 9px;
  letter-spacing: 0.28em;
  opacity: 0.56;
}

.top-nav {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
}

body.has-profile .top-nav {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.52);
}

.nav-link {
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 13px;
  opacity: 0.64;
  transition: 180ms ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
}

body.has-profile .nav-link:hover,
body.has-profile .nav-link.active {
  background: var(--card-solid);
  box-shadow: 0 4px 12px rgba(20, 22, 34, 0.07);
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.icon-button,
.profile-button {
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  place-items: center;
  transition: 180ms ease;
}

.icon-button:hover,
.profile-button:hover {
  background: rgba(255, 255, 255, 0.13);
}

body.has-profile .icon-button,
body.has-profile .profile-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.64);
}

body.has-profile .icon-button:hover,
body.has-profile .profile-button:hover {
  background: var(--card-solid);
}

.icon-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.profile-button {
  overflow: hidden;
  border-color: rgba(215, 173, 91, 0.45);
  background: rgba(215, 173, 91, 0.18);
  color: #f3dcab;
  font-family: var(--serif);
  font-size: 14px;
}

body.has-profile .profile-button {
  background: var(--ink);
  color: var(--gold-pale);
}

.welcome-screen {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.82fr);
  gap: clamp(54px, 8vw, 140px);
  align-items: center;
  min-height: 100svh;
  padding: 126px clamp(24px, 7vw, 120px) 72px;
  overflow: hidden;
  background:
    radial-gradient(circle at 17% 33%, rgba(215, 173, 91, 0.15), transparent 24rem),
    radial-gradient(circle at 71% 88%, rgba(74, 101, 112, 0.2), transparent 30rem),
    linear-gradient(135deg, #0b0d16 0%, #171927 54%, #13151f 100%);
  color: #f6f2e9;
}

.welcome-screen::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 90px;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.24));
  content: "";
  pointer-events: none;
}

.night-sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.night-sky::before {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 249, 228, 0.9) 0 1px, transparent 1.7px),
    radial-gradient(circle at 44% 8%, rgba(255, 249, 228, 0.65) 0 1px, transparent 1.7px),
    radial-gradient(circle at 78% 19%, rgba(255, 249, 228, 0.7) 0 1px, transparent 1.5px),
    radial-gradient(circle at 94% 44%, rgba(255, 249, 228, 0.55) 0 1px, transparent 1.8px),
    radial-gradient(circle at 18% 73%, rgba(255, 249, 228, 0.5) 0 1px, transparent 1.8px),
    radial-gradient(circle at 53% 86%, rgba(255, 249, 228, 0.6) 0 1px, transparent 1.7px),
    radial-gradient(circle at 88% 79%, rgba(255, 249, 228, 0.55) 0 1px, transparent 1.8px);
  content: "";
  opacity: 0.68;
}

.orbit {
  position: absolute;
  top: 48%;
  left: 31%;
  border: 1px solid rgba(215, 173, 91, 0.12);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-17deg);
}

.orbit-a {
  width: clamp(420px, 44vw, 740px);
  height: clamp(300px, 31vw, 530px);
}

.orbit-b {
  width: clamp(300px, 31vw, 530px);
  height: clamp(500px, 53vw, 880px);
  opacity: 0.56;
  transform: translate(-50%, -50%) rotate(44deg);
}

.orbit-c {
  width: clamp(580px, 62vw, 990px);
  height: clamp(200px, 21vw, 350px);
  opacity: 0.42;
  transform: translate(-50%, -50%) rotate(-7deg);
}

.star {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-pale);
  box-shadow: 0 0 16px 4px rgba(240, 223, 179, 0.4);
  animation: breathe 4s ease-in-out infinite;
}

.star-a {
  top: 19%;
  left: 9%;
}

.star-b {
  top: 63%;
  left: 24%;
  animation-delay: -1.2s;
}

.star-c {
  top: 35%;
  left: 55%;
  width: 2px;
  height: 2px;
  animation-delay: -2.5s;
}

.star-d {
  top: 82%;
  left: 48%;
  animation-delay: -0.7s;
}

.star-e {
  top: 15%;
  left: 44%;
  width: 2px;
  height: 2px;
  animation-delay: -3.1s;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.25);
  }
}

.welcome-copy,
.birth-card,
.auth-card {
  position: relative;
  z-index: 2;
}

.welcome-copy {
  max-width: 660px;
  animation: rise-in 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold-deep);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  line-height: 1.6;
  text-transform: uppercase;
}

.eyebrow.light {
  color: var(--gold-pale);
  opacity: 0.76;
}

.welcome-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(50px, 6vw, 88px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.09;
}

.welcome-copy h1 em {
  color: var(--gold-pale);
  font-style: normal;
  text-shadow: 0 8px 44px rgba(215, 173, 91, 0.12);
}

.welcome-lead {
  max-width: 540px;
  margin: 28px 0 0;
  color: rgba(246, 242, 233, 0.62);
  font-size: 16px;
  letter-spacing: 0.025em;
  line-height: 1.95;
}

.welcome-proof {
  display: flex;
  gap: 0;
  width: fit-content;
  margin-top: 38px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.welcome-proof span {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 128px;
  padding: 17px 26px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.welcome-proof span:first-child {
  padding-left: 0;
}

.welcome-proof span:last-child {
  border-right: 0;
}

.welcome-proof strong {
  color: var(--gold-pale);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

.welcome-proof small {
  color: rgba(246, 242, 233, 0.48);
  font-size: 11px;
}

.text-link {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  margin-top: 32px;
  padding: 0 0 7px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.23);
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.text-link svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 180ms ease;
}

.text-link:hover svg {
  transform: translateX(4px);
}

.privacy-note {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 30px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.privacy-note svg {
  width: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.3;
}

.birth-card,
.auth-card {
  width: 100%;
  max-width: 540px;
  margin-left: auto;
  padding: clamp(26px, 3.5vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(16, 18, 28, 0.76);
  box-shadow: var(--shadow-dark);
  backdrop-filter: blur(22px);
  animation: rise-in 780ms 120ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-card {
  align-self: center;
}

.auth-lead {
  margin: -10px 0 24px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  line-height: 1.75;
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.code-button {
  min-height: 47px;
  padding: 0 14px;
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

.code-button:hover {
  background: rgba(255, 255, 255, 0.07);
}

.wechat-button {
  margin-top: 9px;
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
}

.wechat-button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.demo-auth-note {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.28);
  font-size: 8px;
  line-height: 1.7;
  text-align: center;
}

.demo-auth-note strong {
  color: var(--gold-pale);
  font-weight: 600;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.birth-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 26px;
}

.birth-card-heading .eyebrow {
  margin-bottom: 7px;
  color: rgba(240, 223, 179, 0.58);
}

.birth-card-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.step-badge {
  flex: 0 0 auto;
  margin-top: 3px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 14px;
}

.field {
  margin-bottom: 18px;
}

.field label,
.field-label {
  display: block;
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.field-label small {
  margin-left: 5px;
  color: rgba(255, 255, 255, 0.28);
  font-weight: 400;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="date"],
.field select {
  width: 100%;
  height: 47px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  outline: 0;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.field select {
  padding-right: 36px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23b8b4aa' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
}

.field select option {
  background: #272a3a;
  color: #f5f2eb;
}

.field input::placeholder {
  color: rgba(255, 255, 255, 0.24);
}

.field input:focus,
.field select:focus {
  border-color: rgba(215, 173, 91, 0.48);
  background-color: rgba(255, 255, 255, 0.075);
}

.field input[type="date"] {
  color-scheme: dark;
}

.field-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
}

.field-title-row .field-label {
  margin-bottom: 0;
}

.calendar-switch,
.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.segmented {
  display: flex;
  width: 100%;
  height: 47px;
}

.calendar-switch label,
.segmented label {
  position: relative;
  flex: 1;
}

.calendar-switch input,
.segmented input,
.topic-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.calendar-switch span {
  display: block;
  min-width: 46px;
  padding: 4px 10px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  text-align: center;
  transition: 160ms ease;
}

.calendar-switch input:checked + span {
  background: rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.84);
}

.segmented label {
  display: grid;
  place-items: center;
}

.segmented span {
  display: grid;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 12px;
  place-items: center;
  transition: 160ms ease;
}

.segmented input:checked + span {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.field-help {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.28);
  font-size: 9px;
  line-height: 1.7;
}

.lunar-date-fields {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 0.8fr auto;
  gap: 8px;
  align-items: center;
}

.lunar-date-fields select {
  height: 47px;
}

.leap-toggle {
  display: flex !important;
  gap: 5px;
  align-items: center;
  height: 47px;
  margin: 0 !important;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.45) !important;
  font-size: 9px !important;
  white-space: nowrap;
}

.leap-toggle input {
  width: 13px;
  height: 13px;
  accent-color: var(--gold);
}

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

.topic-picker label {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.topic-picker span {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.44);
  font-size: 10px;
  letter-spacing: 0.02em;
  transition: 160ms ease;
}

.topic-picker span i {
  display: grid;
  width: 25px;
  height: 25px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(240, 223, 179, 0.58);
  font-family: var(--serif);
  font-size: 11px;
  font-style: normal;
  place-items: center;
}

.topic-picker input:checked + span {
  border-color: rgba(215, 173, 91, 0.38);
  background: rgba(215, 173, 91, 0.075);
  color: rgba(255, 255, 255, 0.82);
}

.topic-picker input:checked + span i {
  background: rgba(215, 173, 91, 0.16);
  color: var(--gold-pale);
}

.consent-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 2px 0 18px;
  color: rgba(255, 255, 255, 0.32);
  font-size: 9px;
  line-height: 1.65;
  cursor: pointer;
}

.consent-row input {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  accent-color: var(--gold);
}

.form-error {
  min-height: 16px;
  margin: -5px 0 8px;
  color: #e6a0a0;
  font-size: 10px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.05em;
  transition:
    transform 170ms ease,
    box-shadow 170ms ease,
    background 170ms ease;
}

.primary-button {
  border: 1px solid var(--gold-pale);
  background: linear-gradient(135deg, #edd69e, #d4a654);
  box-shadow: 0 10px 26px rgba(165, 115, 35, 0.23);
  color: #211b10;
}

.primary-button:hover {
  box-shadow: 0 12px 35px rgba(165, 115, 35, 0.34);
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.secondary-button:hover {
  background: rgba(23, 25, 38, 0.045);
}

.full {
  width: 100%;
}

.primary-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.app-screen {
  min-height: 100svh;
  padding: 116px clamp(20px, 4vw, 68px) 52px;
  animation: fade-in 420ms ease both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.app-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  max-width: 1420px;
  margin: 0 auto 28px;
}

.app-intro .eyebrow {
  margin-bottom: 8px;
}

.app-intro h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.streak-pill {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 14px 9px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.62);
  color: var(--muted);
  font-size: 10px;
  backdrop-filter: blur(10px);
}

.streak-pill strong {
  color: var(--ink);
}

.streak-flame {
  display: grid;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #f1e0b8;
  color: #956e2b;
  font-size: 11px;
  place-items: center;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.69fr) minmax(570px, 1.31fr);
  gap: 20px;
  max-width: 1420px;
  margin: 0 auto;
}

.insight-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-card,
.today-card,
.checkin-card,
.data-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.profile-card {
  overflow: hidden;
}

.profile-card-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 22px 22px 18px;
}

.portrait {
  position: relative;
  display: grid;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.3) 0 2px, transparent 3px),
    linear-gradient(145deg, #34394d, #171a27);
  color: var(--gold-pale);
  font-family: var(--serif);
  font-size: 18px;
  place-items: center;
}

.portrait i {
  position: absolute;
  right: -9px;
  bottom: -12px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(215, 173, 91, 0.25);
  border-radius: 50%;
}

.profile-card .eyebrow {
  margin-bottom: 5px;
}

.profile-card h2 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
}

.profile-card-top p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.mini-button {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
}

.mini-button:hover {
  background: var(--paper);
}

.identity-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.identity-strip button {
  min-width: 0;
  padding: 15px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  text-align: left;
  transition: background 160ms ease;
}

.identity-strip button:last-child {
  border-right: 0;
}

.identity-strip button:hover {
  background: rgba(215, 173, 91, 0.055);
}

.identity-strip span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.identity-strip strong {
  display: block;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-card-link {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 13px 20px;
  border: 0;
  background: rgba(23, 25, 38, 0.018);
  color: var(--muted);
  font-size: 9px;
}

.profile-card-link span {
  color: var(--gold-deep);
  font-size: 14px;
}

.today-card {
  padding: 22px;
}

.today-card-heading {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
}

.today-card .eyebrow {
  margin-bottom: 6px;
}

.today-card h3,
.checkin-card h3,
.data-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.energy-ring {
  --energy: 78;
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: conic-gradient(var(--gold) calc(var(--energy) * 1%), rgba(23, 25, 38, 0.075) 0);
  place-content: center;
  text-align: center;
}

.energy-ring::before {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--card-solid);
  content: "";
}

.energy-ring span,
.energy-ring small {
  position: relative;
  z-index: 1;
}

.energy-ring span {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1;
}

.energy-ring small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
}

.today-card > p {
  margin: 16px 0;
  color: #5e5c56;
  font-size: 11px;
  line-height: 1.85;
}

.energy-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.energy-tags span {
  padding: 5px 8px;
  border-radius: 6px;
  background: #f2eadb;
  color: #7d6a48;
  font-size: 8px;
}

.energy-tags span:last-child {
  background: var(--jade-soft);
  color: #526e64;
}

.checkin-card {
  padding: 20px 22px;
}

.checkin-card .eyebrow {
  margin-bottom: 6px;
}

.mood-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 15px 0 10px;
}

.mood-row button {
  min-width: 0;
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  font-size: 9px;
  transition: 160ms ease;
}

.mood-row button:hover,
.mood-row button.selected {
  border-color: rgba(167, 123, 50, 0.32);
  background: #f3ead8;
  color: #765b2c;
}

.checkin-reply {
  margin: 0;
  color: #939087;
  font-size: 8px;
  line-height: 1.6;
}

.data-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
}

.data-icon {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--jade-soft);
  color: var(--jade);
  font-size: 15px;
  place-items: center;
}

.data-card h3 {
  margin-bottom: 5px;
  font-size: 12px;
}

.data-card p {
  margin: 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.7;
}

.chat-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: min(780px, calc(100svh - 184px));
  min-height: 630px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.chat-header {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.88);
}

.companion-avatar {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.27), transparent 22%),
    linear-gradient(145deg, #435c55, #1c2b29);
  box-shadow: 0 6px 16px rgba(32, 52, 46, 0.2);
  color: #e8d8ad;
  font-family: var(--serif);
  font-size: 16px;
  place-items: center;
}

.companion-avatar::after {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
}

.companion-avatar i {
  position: absolute;
  right: 1px;
  bottom: 2px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--card-solid);
  border-radius: 50%;
  background: #6fa386;
}

.companion-info {
  min-width: 0;
  flex: 1;
}

.companion-info h2 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}

.companion-info h2 span {
  margin-left: 7px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.companion-info p {
  display: flex;
  gap: 5px;
  align-items: center;
  margin: 0;
  color: #89877f;
  font-size: 8px;
}

.companion-info p i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #74a786;
}

.chat-info-button {
  width: 30px;
  height: 30px;
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

.chat-info-button svg {
  width: 16px;
}

.chat-feed {
  flex: 1;
  min-height: 0;
  padding: 24px 22px 14px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(23, 25, 38, 0.14) transparent;
  scrollbar-width: thin;
}

.chat-feed::-webkit-scrollbar {
  width: 5px;
}

.chat-feed::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(23, 25, 38, 0.13);
}

.chat-day-divider {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 22px;
  color: #a09d94;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.chat-day-divider::before,
.chat-day-divider::after {
  flex: 1;
  height: 1px;
  background: var(--line);
  content: "";
}

.message-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 18px;
  animation: message-in 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.message-row.user {
  justify-content: flex-end;
  padding-left: 64px;
}

.message-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, #435c55, #1c2b29);
  color: var(--gold-pale);
  font-family: var(--serif);
  font-size: 10px;
  place-items: center;
}

.message-content {
  max-width: min(88%, 620px);
}

.message-author {
  margin: 0 0 6px;
  color: #929087;
  font-size: 8px;
}

.message-bubble {
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 5px 16px 16px;
  background: #fffdf9;
  color: #34343b;
  font-size: 12px;
  line-height: 1.85;
}

.message-row.user .message-bubble {
  border-color: transparent;
  border-radius: 16px 5px 16px 16px;
  background: var(--ink);
  color: #f5f1e8;
}

.message-bubble p {
  margin: 0 0 9px;
}

.message-bubble p:last-child {
  margin-bottom: 0;
}

.message-bubble strong {
  color: #75551f;
  font-weight: 650;
}

.message-row.user .message-bubble strong {
  color: var(--gold-pale);
}

.message-insight {
  margin-top: 10px;
  padding: 12px 13px;
  border: 1px solid rgba(167, 123, 50, 0.16);
  border-radius: 12px;
  background: #f7f0e1;
}

.message-insight-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #937137;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.message-insight-label span:last-child {
  color: #b3a88e;
  font-weight: 400;
}

.message-insight h4 {
  margin: 0 0 6px;
  color: #2b2a28;
  font-family: var(--serif);
  font-size: 13px;
}

.message-insight p {
  color: #69665f;
  font-size: 10px;
  line-height: 1.75;
}

.message-evidence {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 9px;
}

.message-evidence span {
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(255, 253, 248, 0.72);
  color: #847a66;
  font-size: 7px;
}

.feedback-box {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.feedback-box button {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  color: #7f7d74;
  font-size: 8px;
}

.feedback-box button:hover,
.feedback-box button.selected {
  border-color: rgba(87, 126, 111, 0.3);
  background: var(--jade-soft);
  color: #45675b;
}

.feedback-box > span {
  color: #aaa79f;
  font-size: 7px;
}

.typing-row .message-bubble {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 62px;
  padding: 14px 16px;
}

.typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #928a7c;
  animation: typing 1.2s ease-in-out infinite;
}

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

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

@keyframes typing {
  0%,
  70%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  35% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.prompt-shelf {
  display: flex;
  gap: 7px;
  padding: 0 20px 11px;
  overflow-x: auto;
  scrollbar-width: none;
}

.prompt-shelf::-webkit-scrollbar {
  display: none;
}

.prompt-shelf button {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid rgba(23, 25, 38, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #6e6c65;
  font-size: 8px;
  white-space: nowrap;
  transition: 160ms ease;
}

.prompt-shelf button:hover {
  border-color: rgba(167, 123, 50, 0.25);
  background: #f7efdf;
  color: #795a28;
}

.chat-composer {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin: 0 16px;
  padding: 8px 8px 8px 10px;
  border: 1px solid rgba(23, 25, 38, 0.13);
  border-radius: 18px;
  background: #fffefa;
  box-shadow: 0 5px 18px rgba(21, 22, 33, 0.045);
}

.chat-composer:focus-within {
  border-color: rgba(167, 123, 50, 0.35);
  box-shadow: 0 5px 22px rgba(140, 100, 32, 0.08);
}

.chat-composer textarea {
  flex: 1;
  min-height: 34px;
  max-height: 100px;
  padding: 7px 2px 5px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.55;
}

.chat-composer textarea::placeholder {
  color: #aaa79f;
}

.composer-action,
.send-button {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  place-items: center;
}

.composer-action {
  border: 0;
  background: #f3ead9;
  color: #927038;
}

.composer-action:hover {
  background: #ebdcc2;
}

.composer-action svg,
.send-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.send-button {
  border: 0;
  background: var(--ink);
  color: #f5e9cb;
}

.send-button:hover {
  background: #2d3042;
}

.chat-disclaimer {
  margin: 8px 0 11px;
  color: #aaa79f;
  font-size: 7px;
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  padding: 24px;
  overflow-y: auto;
  background: rgba(9, 10, 17, 0.74);
  backdrop-filter: blur(12px);
  place-items: center;
  animation: fade-in 180ms ease both;
}

.modal {
  position: relative;
  width: min(100%, 1040px);
  max-height: calc(100svh - 48px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background: #f8f4eb;
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.38);
  animation: modal-in 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.intro-modal {
  width: min(100%, 560px);
  overflow: hidden;
  padding: 54px 46px 38px;
  border-color: rgba(215, 173, 91, 0.2);
  background:
    radial-gradient(circle at 50% 0%, rgba(215, 173, 91, 0.2), transparent 19rem),
    linear-gradient(145deg, #171a28, #0d0f18);
  color: #f7f2e7;
  text-align: center;
}

.intro-modal .eyebrow {
  color: rgba(240, 223, 179, 0.68);
}

.intro-modal h2 {
  position: relative;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(35px, 5vw, 49px);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.intro-lead {
  position: relative;
  max-width: 390px;
  margin: 18px auto 24px;
  color: rgba(247, 242, 231, 0.56);
  font-size: 12px;
  line-height: 1.9;
}

.intro-orbit {
  position: absolute;
  top: 26px;
  left: 50%;
  width: 300px;
  height: 120px;
  border: 1px solid rgba(215, 173, 91, 0.12);
  border-radius: 50%;
  pointer-events: none;
  transform: translateX(-50%) rotate(-9deg);
}

.intro-orbit::after {
  position: absolute;
  inset: 17px -38px;
  border: 1px solid rgba(215, 173, 91, 0.08);
  border-radius: 50%;
  content: "";
  transform: rotate(22deg);
}

.intro-orbit span {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-pale);
  box-shadow: 0 0 18px 4px rgba(240, 223, 179, 0.28);
}

.intro-orbit span:nth-child(1) {
  top: 18px;
  left: 36px;
}

.intro-orbit span:nth-child(2) {
  right: 15px;
  bottom: 18px;
}

.intro-orbit span:nth-child(3) {
  top: 48%;
  left: 49%;
  width: 2px;
  height: 2px;
}

.intro-promises {
  position: relative;
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 27px;
}

.intro-promises span {
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: rgba(247, 242, 231, 0.5);
  font-size: 8px;
}

.intro-modal .primary-button {
  position: relative;
}

.intro-skip {
  margin-top: 16px;
  padding: 5px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.35);
  font-size: 9px;
}

.intro-skip:hover {
  color: rgba(255, 255, 255, 0.6);
}

.blind-modal {
  width: min(100%, 760px);
  max-height: calc(100svh - 46px);
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(215, 173, 91, 0.12), transparent 20rem),
    #f8f4eb;
}

.blind-header {
  display: flex;
  gap: 22px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 30px 34px 22px;
}

.blind-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(25px, 4vw, 35px);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.blind-score {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--gold-pale);
  font-size: 9px;
}

.blind-progress {
  height: 3px;
  overflow: hidden;
  background: rgba(23, 25, 38, 0.07);
}

.blind-progress-bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  transition: width 260ms ease;
}

.blind-body {
  padding: 32px 34px 36px;
}

.blind-kicker {
  margin: 0 0 11px;
  color: var(--gold-deep);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.blind-question {
  max-width: 610px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(20px, 3.4vw, 29px);
  font-weight: 500;
  line-height: 1.55;
}

.blind-hint {
  margin: 10px 0 22px;
  color: #89857d;
  font-size: 9px;
  line-height: 1.7;
}

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

.blind-option {
  min-height: 50px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.78);
  color: #68665f;
  font-size: 11px;
  transition: 160ms ease;
}

.blind-option:hover,
.blind-option.selected {
  border-color: rgba(167, 123, 50, 0.36);
  background: #f2e5cc;
  color: #72531f;
}

.blind-other-wrap {
  margin-top: 12px;
}

.blind-other-wrap textarea {
  width: 100%;
  min-height: 76px;
  padding: 11px 13px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: rgba(255, 253, 248, 0.8);
  font-size: 11px;
  line-height: 1.7;
}

.blind-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
}

.blind-actions .primary-button {
  min-width: 120px;
}

.blind-actions .secondary-button {
  min-height: 40px;
  padding: 0 15px;
  font-size: 9px;
}

.blind-result-icon {
  display: grid;
  width: 66px;
  height: 66px;
  margin-bottom: 18px;
  border: 1px solid rgba(167, 123, 50, 0.28);
  border-radius: 50%;
  background: var(--gold-pale);
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 24px;
  place-items: center;
}

.blind-result-copy {
  margin: 15px 0 23px;
  color: #69665e;
  font-size: 11px;
  line-height: 1.9;
}

.blind-result-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0 24px;
}

.blind-result-stats span {
  padding: 12px 8px;
  border-radius: 10px;
  background: rgba(23, 25, 38, 0.045);
  color: #777269;
  font-size: 8px;
  text-align: center;
}

.blind-result-stats strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 27px 30px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
}

.close-button {
  display: grid;
  width: 33px;
  height: 33px;
  padding: 0 0 2px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: #747169;
  font-size: 21px;
  font-weight: 300;
  line-height: 1;
  place-items: center;
}

.close-button:hover {
  background: rgba(23, 25, 38, 0.05);
}

.close-button.floating {
  position: absolute;
  z-index: 3;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.7);
}

.chart-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding: 15px 30px;
  border-bottom: 1px solid var(--line);
}

.chart-meta span {
  padding: 5px 9px;
  border-radius: 6px;
  background: #eee6d8;
  color: #6f624b;
  font-size: 8px;
}

.chart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 18px;
  padding: 22px 30px 28px;
}

.palace-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(118px, auto));
  border-top: 1px solid rgba(23, 25, 38, 0.16);
  border-left: 1px solid rgba(23, 25, 38, 0.16);
}

.palace-cell {
  position: relative;
  min-width: 0;
  padding: 10px;
  border-right: 1px solid rgba(23, 25, 38, 0.16);
  border-bottom: 1px solid rgba(23, 25, 38, 0.16);
  background: rgba(255, 253, 248, 0.42);
  text-align: left;
  transition: background 160ms ease;
}

.palace-cell:hover,
.palace-cell.active {
  z-index: 1;
  background: #fff9ea;
  box-shadow: inset 0 0 0 1px rgba(167, 123, 50, 0.28);
}

.palace-cell.soul {
  background: rgba(215, 173, 91, 0.09);
}

.palace-cell.body {
  box-shadow: inset 0 0 0 1px rgba(87, 126, 111, 0.3);
}

.palace-cell-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.palace-cell-name {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 650;
}

.palace-cell-branch {
  color: #aaa69c;
  font-size: 8px;
}

.palace-marker {
  margin-left: 3px;
  color: var(--gold-deep);
  font-size: 7px;
}

.palace-stars {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.palace-star {
  color: #302f33;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
}

.palace-star.bright {
  color: #8c5b42;
}

.palace-star.minor {
  color: #79766f;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
}

.palace-star.mutagen {
  padding: 1px 3px;
  border-radius: 3px;
  background: var(--rose-soft);
  color: #945662;
  font-family: var(--sans);
  font-size: 7px;
}

.palace-empty {
  color: #aaa79f;
  font-size: 9px;
}

.palace-minor {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 6px;
  color: #8d8a83;
  font-size: 7px;
}

.palace-decade {
  position: absolute;
  right: 7px;
  bottom: 6px;
  color: #bbb5aa;
  font-size: 7px;
}

.palace-center {
  display: grid;
  grid-row: 2 / 4;
  grid-column: 2 / 4;
  padding: 22px 18px;
  background:
    radial-gradient(circle at 50% 50%, rgba(215, 173, 91, 0.1), transparent 60%),
    #f8f1e3;
  place-items: center;
  text-align: center;
}

.palace-center-inner {
  width: 100%;
}

.center-circle {
  display: grid;
  width: 70px;
  height: 70px;
  margin: 0 auto 11px;
  border: 1px solid rgba(167, 123, 50, 0.35);
  border-radius: 50%;
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 24px;
  place-items: center;
}

.palace-center h3 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 14px;
}

.palace-center p {
  margin: 0;
  color: #8a8478;
  font-size: 8px;
  line-height: 1.7;
}

.center-attributes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 12px;
}

.center-attributes span {
  padding: 5px 4px;
  border-radius: 5px;
  background: rgba(255, 253, 248, 0.72);
  color: #776b57;
  font-size: 7px;
}

.palace-detail {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.64);
}

.palace-detail h3 {
  margin: 0 0 11px;
  font-family: var(--serif);
  font-size: 18px;
}

.palace-detail > p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}

.detail-stars {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 15px 0;
}

.detail-stars span {
  padding: 5px 7px;
  border-radius: 6px;
  background: #f1e7d5;
  color: #745b32;
  font-family: var(--serif);
  font-size: 10px;
}

.detail-note {
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: #88837a;
  font-size: 9px;
  line-height: 1.75;
}

.detail-ask {
  width: 100%;
  margin-top: 13px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 16px 30px;
  border-top: 1px solid var(--line);
}

.modal-footer > span {
  color: #9c978d;
  font-size: 8px;
}

.modal-footer .secondary-button {
  min-height: 36px;
  padding: 0 14px;
  font-size: 9px;
}

.pricing-modal {
  padding: 38px 38px 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 8%, rgba(215, 173, 91, 0.14), transparent 22rem),
    #f8f4eb;
}

.pricing-intro {
  max-width: 600px;
  margin-bottom: 30px;
}

.pricing-intro h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(27px, 4vw, 39px);
  font-weight: 500;
  line-height: 1.3;
}

.pricing-intro > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

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

.plan-card {
  position: relative;
  padding: 24px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.7);
}

.plan-card.featured {
  border-color: rgba(167, 123, 50, 0.38);
  background: linear-gradient(160deg, #fffaf0, #f1e3c5);
  box-shadow: 0 15px 35px rgba(126, 89, 29, 0.09);
}

.plan-badge {
  display: inline-block;
  margin-bottom: 20px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #eee6d7;
  color: #82683c;
  font-size: 7px;
  letter-spacing: 0.05em;
}

.featured .plan-badge {
  background: rgba(167, 123, 50, 0.14);
}

.plan-card h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 19px;
}

.plan-price {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
}

.plan-price small {
  margin-right: 2px;
  font-family: var(--sans);
  font-size: 12px;
}

.plan-price span {
  margin-left: 4px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 8px;
}

.plan-card ul {
  min-height: 84px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.plan-card li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 13px;
  color: #6e6b64;
  font-size: 9px;
  line-height: 1.5;
}

.plan-card li::before {
  position: absolute;
  top: 0.58em;
  left: 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-deep);
  content: "";
}

.plan-card .primary-button,
.plan-card .secondary-button {
  min-height: 39px;
  font-size: 10px;
}

.pricing-footnote {
  margin: 21px 0 0;
  color: #a19c92;
  font-size: 8px;
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 200;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  max-width: calc(100vw - 40px);
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(20, 22, 33, 0.94);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
  color: #f5f1e8;
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1120px) {
  .welcome-screen {
    grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1fr);
    gap: 44px;
    padding-right: 42px;
    padding-left: 42px;
  }

  .welcome-copy h1 {
    font-size: clamp(48px, 6.2vw, 72px);
  }

  .workspace-grid {
    grid-template-columns: minmax(270px, 0.68fr) minmax(500px, 1.32fr);
  }

  .chat-column {
    min-height: 610px;
  }

  .chart-layout {
    grid-template-columns: minmax(0, 1fr) 230px;
  }
}

@media (max-width: 900px) {
  .site-header {
    height: 68px;
    padding: 0 22px;
  }

  .top-nav {
    display: none;
  }

  .welcome-screen {
    grid-template-columns: 1fr;
    gap: 44px;
    padding: 116px 24px 50px;
  }

  .welcome-copy {
    max-width: 620px;
    padding-top: 12px;
  }

  .welcome-copy h1 {
    font-size: clamp(46px, 10vw, 70px);
  }

  .welcome-lead {
    max-width: 580px;
  }

  .birth-card,
  .auth-card {
    max-width: 620px;
    margin: 0;
  }

  .app-screen {
    padding: 94px 18px 30px;
  }

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

  .chat-column {
    order: -1;
  }

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

  .profile-card {
    grid-column: 1 / -1;
  }

  .data-card {
    grid-column: 1 / -1;
  }

  .chart-layout {
    grid-template-columns: 1fr;
  }

  .palace-detail {
    min-height: 160px;
  }
}

@media (max-width: 700px) {
  body {
    background:
      radial-gradient(circle at 5% 9%, rgba(215, 173, 91, 0.13), transparent 18rem),
      var(--paper);
  }

  .site-header {
    height: 64px;
    padding: 0 16px;
  }

  .brand {
    gap: 7px;
  }

  .brand-mark {
    width: 35px;
    height: 35px;
  }

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

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

  .header-actions .icon-button {
    display: none;
  }

  .profile-button {
    width: 34px;
    height: 34px;
  }

  .welcome-screen {
    min-height: auto;
    padding: 96px 16px 38px;
  }

  .welcome-copy h1 {
    font-size: clamp(42px, 14vw, 60px);
  }

  .welcome-lead {
    margin-top: 19px;
    font-size: 13px;
    line-height: 1.85;
  }

  .welcome-proof {
    width: 100%;
  }

  .welcome-proof span {
    flex: 1;
    min-width: 0;
    padding: 14px 10px;
  }

  .welcome-proof span:first-child {
    padding-left: 0;
  }

  .welcome-proof strong {
    font-size: 21px;
  }

  .welcome-proof small {
    font-size: 9px;
  }

  .privacy-note {
    margin-top: 22px;
  }

  .birth-card,
  .auth-card {
    padding: 24px 18px;
    border-radius: 24px;
  }

  .intro-modal {
    padding: 48px 22px 30px;
    border-radius: 24px;
  }

  .intro-orbit {
    width: 230px;
  }

  .blind-header {
    padding: 24px 18px 17px;
  }

  .blind-body {
    padding: 24px 18px max(28px, env(safe-area-inset-bottom));
  }

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

  .blind-result-stats {
    grid-template-columns: 1fr;
  }

  .birth-card-heading h2 {
    font-size: 23px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

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

  .lunar-date-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .leap-toggle {
    grid-column: 1 / -1;
    justify-content: center;
    height: 34px;
  }

  .app-screen {
    padding: 80px 12px 18px;
  }

  .app-intro {
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding: 0 3px;
  }

  .app-intro h1 {
    font-size: 28px;
    line-height: 1.3;
  }

  .app-intro .eyebrow {
    font-size: 8px;
  }

  .streak-pill {
    padding: 6px 8px;
    font-size: 8px;
  }

  .streak-flame {
    width: 21px;
    height: 21px;
  }

  .insight-column {
    display: flex;
  }

  .chat-column {
    height: calc(100svh - 146px);
    min-height: 600px;
  }

  .profile-card-top {
    padding: 18px;
  }

  .identity-strip button {
    padding: 13px 10px;
  }

  .identity-strip strong {
    font-size: 12px;
  }

  .today-card,
  .checkin-card {
    padding: 18px;
  }

  .chat-column {
    border-radius: 22px;
  }

  .chat-header {
    padding: 13px 14px;
  }

  .companion-avatar {
    width: 39px;
    height: 39px;
  }

  .companion-info h2 {
    font-size: 14px;
  }

  .companion-info h2 span {
    display: none;
  }

  .chat-feed {
    padding: 19px 13px 10px;
  }

  .message-row {
    gap: 7px;
  }

  .message-content {
    max-width: 90%;
  }

  .message-avatar {
    width: 25px;
    height: 25px;
  }

  .message-bubble {
    padding: 11px 12px;
    font-size: 11px;
  }

  .message-row.user {
    padding-left: 38px;
  }

  .prompt-shelf {
    padding: 0 12px 9px;
  }

  .chat-composer {
    margin: 0 10px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 92svh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 24px 24px 0 0;
  }

  .modal-header {
    padding: 22px 18px 16px;
  }

  .modal-header h2 {
    font-size: 23px;
  }

  .chart-meta {
    padding: 12px 18px;
  }

  .chart-layout {
    padding: 14px 12px 20px;
  }

  .palace-grid {
    grid-template-rows: repeat(4, minmax(92px, auto));
  }

  .palace-cell {
    padding: 7px;
  }

  .palace-cell-name {
    font-size: 11px;
  }

  .palace-star {
    font-size: 10px;
  }

  .palace-minor {
    display: none;
  }

  .palace-decade {
    display: none;
  }

  .palace-center {
    padding: 9px 5px;
  }

  .center-circle {
    width: 45px;
    height: 45px;
    margin-bottom: 7px;
    font-size: 17px;
  }

  .palace-center h3 {
    font-size: 11px;
  }

  .palace-center p {
    font-size: 6px;
  }

  .center-attributes {
    display: none;
  }

  .modal-footer {
    padding: 13px 18px max(15px, env(safe-area-inset-bottom));
  }

  .modal-footer > span {
    display: none;
  }

  .modal-footer .secondary-button {
    width: 100%;
  }

  .pricing-modal {
    padding: 32px 18px calc(22px + env(safe-area-inset-bottom));
  }

  .pricing-intro {
    padding-right: 30px;
    margin-bottom: 22px;
  }

  .pricing-intro h2 {
    font-size: 28px;
  }

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

  .plan-card {
    padding: 20px 18px;
  }

  .plan-badge {
    margin-bottom: 13px;
  }

  .plan-card ul {
    min-height: auto;
  }
}

@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;
  }
}
