﻿:root {
  color-scheme: dark;
  --bg-top: #151511;
  --bg-bottom: #070806;
  --surface: rgba(246, 241, 229, 0.075);
  --surface-strong: rgba(246, 241, 229, 0.12);
  --surface-soft: rgba(246, 241, 229, 0.045);
  --border: rgba(246, 241, 229, 0.11);
  --border-strong: rgba(246, 241, 229, 0.2);
  --text: #f5f1e8;
  --muted: rgba(245, 241, 232, 0.54);
  --muted-strong: rgba(245, 241, 232, 0.75);
  --accent: #eee6d8;
  --accent-soft: rgba(238, 230, 216, 0.14);
  --accent-text: #171713;
  --shadow: 0 34px 120px rgba(0, 0, 0, 0.42);
  --panel-shadow: 0 18px 56px rgba(0, 0, 0, 0.28);
  --radius-panel: 34px;
  --radius-card: 22px;
  --radius-pill: 999px;
  --item-height: 56px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 22%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom) 72%);
  color: var(--text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

input,
textarea {
  border: 0;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.wheel-picker:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.app-shell,
.stitch-intro-screen,
.account-screen,
.entry-screen,
.dashboard-screen {
  min-height: 100dvh;
}

.stitch-intro-screen,
.account-screen {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  overflow: hidden;
  background: #f9f9fe;
}

.stitch-intro-frame,
.account-frame {
  display: block;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  border: 0;
  background: #f9f9fe;
}

.account-screen {
  background: #f2f2f7;
}

.account-frame {
  background: #f2f2f7;
}

.entry-screen .contact-start-panel,
.entry-screen .access-restore-panel,
.entry-screen .access-key-hint {
  display: none !important;
}

.entry-screen {
  display: grid;
  align-items: center;
  padding: 30px 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(232, 199, 136, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(3, 4, 5, 0.18), rgba(3, 4, 5, 0.62));
}

.entry-wrap {
  width: min(100%, 438px);
  margin: 0 auto;
}

.entry-appbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top) + 4px) 0 14px;
}

.entry-brand {
  color: rgba(245, 241, 232, 0.66);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.entry-card,
.sidebar,
.view-panel,
.unified-panel {
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.045)),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(34px) saturate(1.12);
  -webkit-backdrop-filter: blur(34px) saturate(1.12);
}

.entry-card {
  position: relative;
  overflow: hidden;
  padding: 18px 16px 16px;
  border-radius: var(--radius-panel);
  background:
    linear-gradient(180deg, rgba(18, 18, 15, 0.96), rgba(8, 9, 8, 0.94)),
    #080908;
  border-color: rgba(232, 199, 136, 0.18);
}

.entry-card::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto;
  height: 72px;
  border-radius: calc(var(--radius-panel) - 1px) calc(var(--radius-panel) - 1px) 18px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent);
  pointer-events: none;
}

.entry-card > * {
  position: relative;
  z-index: 1;
}

.mode-row {
  margin-bottom: 14px;
}

.access-key-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  margin-bottom: 12px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.16);
}

.entry-hero-copy {
  display: grid;
  gap: 10px;
  padding: 8px 4px 18px;
}

.entry-kicker {
  color: rgba(120, 93, 47, 0.72);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.entry-hero-copy h1 {
  max-width: 10em;
  color: #1f211a;
  font-size: clamp(32px, 9vw, 48px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.entry-hero-copy p {
  max-width: 32em;
  color: rgba(45, 45, 36, 0.66);
  font-size: 14px;
  line-height: 1.65;
}

.contact-start-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 50px rgba(92, 72, 39, 0.14);
}

.contact-start-field {
  display: grid;
  gap: 6px;
}

.contact-start-field span {
  padding-left: 8px;
  color: rgba(54, 50, 39, 0.58);
  font-size: 11px;
  font-weight: 750;
}

.contact-start-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 16px;
  background: #f6f0e3;
  color: #22231d;
  font-size: 15px;
}

.contact-start-field input::placeholder {
  color: rgba(48, 45, 36, 0.36);
}

.contact-start-button {
  align-self: end;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 16px;
  background: #1f211a;
  color: #fff8e8;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 14px 32px rgba(31, 33, 26, 0.22);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.contact-start-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(31, 33, 26, 0.26);
}

.contact-start-button:active {
  transform: translateY(1px) scale(0.99);
}

.contact-start-button:disabled {
  opacity: 0.58;
  cursor: wait;
}

.access-restore-panel {
  margin-bottom: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.42);
  color: rgba(45, 45, 36, 0.68);
}

.access-restore-panel summary {
  cursor: pointer;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 750;
  list-style: none;
}

.access-restore-panel summary::-webkit-details-marker {
  display: none;
}

.access-restore-panel .access-key-panel {
  margin: 0 10px 10px;
  background: rgba(35, 35, 27, 0.08);
}

.access-key-input {
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font-size: 12px;
}

.access-key-input::placeholder {
  color: rgba(245, 241, 232, 0.38);
}

.key-button {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(245, 241, 232, 0.1);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 650;
}

.key-button-primary {
  background: rgba(245, 241, 232, 0.18);
  color: var(--text);
}
.key-button-copy {
  background: rgba(245, 241, 232, 0.13);
  color: var(--text);
  font-size: 11px;
}

.key-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(245, 241, 232, 0.18);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease;
}

.key-toast.show {
  opacity: 1;
}

.freemium-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(245, 241, 232, 0.08);
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 600;
}

.freemium-lock {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

.access-key-hint {
  min-height: 18px;
  margin: -4px 4px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.mode-panels {
  display: grid;
}

.mode-panel {
  display: none;
  gap: 10px;
}

.mode-panel.active {
  display: grid;
}

.segment-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}

#genderGroup {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segment-button {
  min-height: 42px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.segment-button.active {
  background: rgba(245, 241, 232, 0.16);
  color: var(--text);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.segment-button:active,
.primary-button:active,
.ghost-button:active,
.side-tab:active {
  transform: translateY(1px);
}

.datetime-card {
  padding: 16px 8px 12px;
  border: 0;
  border-radius: var(--radius-card);
  background: transparent;
}

.datetime-head {
  display: grid;
  gap: 8px;
  padding: 0 8px 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.datetime-head-4,
.wheel-stage-4 {
  grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr));
}

.datetime-head-5,
.wheel-stage-5 {
  grid-template-columns: 1.24fr repeat(4, minmax(0, 1fr));
}

.wheel-stage {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 0 4px;
}

.wheel-stage::before,
.wheel-stage::after {
  content: "";
  position: absolute;
  right: 4px;
  left: 4px;
  z-index: 3;
  height: var(--item-height);
  pointer-events: none;
}

.wheel-stage::before {
  top: 0;
  background: linear-gradient(180deg, rgba(16, 16, 13, 0.92), rgba(16, 16, 13, 0));
}

.wheel-stage::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(16, 16, 13, 0.92), rgba(16, 16, 13, 0));
}

.matrix-highlight {
  position: absolute;
  right: 4px;
  left: 4px;
  top: var(--item-height);
  z-index: 2;
  height: var(--item-height);
  border-top: 1px solid rgba(245, 241, 232, 0.16);
  border-bottom: 1px solid rgba(245, 241, 232, 0.14);
  border-radius: 20px;
  background: rgba(245, 241, 232, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.wheel-picker {
  position: relative;
  z-index: 1;
  height: calc(var(--item-height) * 3);
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.16);
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  touch-action: none;
  cursor: grab;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.wheel-picker.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.wheel-picker::-webkit-scrollbar {
  display: none;
}

.wheel-track {
  padding: var(--item-height) 0;
}

.wheel-item {
  display: grid;
  place-items: center;
  height: var(--item-height);
  padding: 0 8px;
  color: rgba(245, 241, 232, 0.28);
  font-size: 19px;
  font-weight: 500;
  scroll-snap-align: center;
  user-select: none;
  transition:
    color 0.18s ease,
    opacity 0.18s ease,
    transform 0.18s ease;
}

.wheel-item.active {
  color: var(--text);
  opacity: 1;
  font-size: 24px;
  font-weight: 650;
  transform: scale(1.02);
}

.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-toolbar-note {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.chip-button,
.bazi-range-chip,
.ghost-inline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text);
}

.chip-button,
.bazi-range-chip {
  background: var(--accent-soft);
  color: var(--text);
}

.ghost-inline-button {
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted-strong);
}

.bazi-card {
  display: grid;
  gap: 14px;
  padding: 16px 8px 10px;
  border: 0;
  border-radius: var(--radius-card);
  background: transparent;
}

.bazi-pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.bazi-pillar {
  display: grid;
  justify-items: center;
  gap: 10px;
  cursor: pointer;
}

.bazi-pillar-label {
  color: var(--muted-strong);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.bazi-token {
  width: 68px;
  height: 68px;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.16);
  color: rgba(244, 241, 234, 0.4);
  font-size: 24px;
  font-weight: 700;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.bazi-pillar:hover .bazi-token {
  transform: translateY(-1px);
}

.bazi-token.active {
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(238, 230, 216, 0.18);
}

.bazi-token.filled {
  color: var(--text);
}

.bazi-range-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.selector-section {
  display: grid;
}

.selector-grid {
  display: grid;
  gap: 10px;
}

.selector-grid-stems {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.selector-grid-branches {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.selector-grid-pairs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-height: 220px;
  overflow-y: auto;
  padding-right: 2px;
  overscroll-behavior: contain;
}

.selector-button {
  min-height: 64px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.selector-button.active {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(238, 230, 216, 0.18);
}

.selector-button.stem-wood {
  color: #57d58c;
}

.selector-button.stem-fire {
  color: #ff6969;
}

.selector-button.stem-earth {
  color: #e8aa57;
}

.selector-button.stem-metal {
  color: #f0d45c;
}

.selector-button.stem-water {
  color: #4aa8ff;
}

.selector-button.branch-default {
  color: var(--muted-strong);
}

.selector-pair-button {
  display: grid;
  place-items: center;
  gap: 2px;
  height: 58px;
  padding: 6px 4px;
}

.selector-pair-main {
  font-size: 18px;
  line-height: 1;
}

.selector-pair-meta {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
}

.selector-empty-state {
  grid-column: 1 / -1;
  min-height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.14);
  color: var(--muted-strong);
  font-size: 13px;
}

.entry-divider {
  height: 1px;
  margin: 16px 8px;
  background: linear-gradient(90deg, transparent, rgba(245, 241, 232, 0.14), transparent);
}

.lunar-leap-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--muted-strong);
  font-size: 12px;
}

.lunar-leap-inline input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

.solar-place-row {
  display: grid;
  position: relative;
  z-index: 50;
  margin-top: 12px;
  align-items: center;
}

.location-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--text);
}

.location-input::placeholder,
.composer-field textarea::placeholder {
  color: rgba(244, 241, 234, 0.36);
}

.location-hint {
  min-height: 0;
  margin: 6px 2px 0;
  color: #e8c788;
  font-size: 12px;
  line-height: 1.4;
}

.location-hint:empty {
  display: none;
}

.entry-disclaimer {
  margin: 10px 2px 12px;
  padding: 9px 12px;
  border: 1px solid rgba(232, 199, 136, 0.18);
  border-radius: 14px;
  background: rgba(232, 199, 136, 0.08);
  color: rgba(244, 241, 234, 0.64);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.location-picker {
  position: relative;
  width: 100%;
}

.location-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 0;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.34);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s ease;
}

.location-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
}

.location-trigger.open {
  border-radius: 18px 18px 0 0;
  background: rgba(0, 0, 0, 0.28);
}

.location-trigger-text {
  color: var(--text);
  font-weight: 500;
}

.location-trigger-text.placeholder {
  color: rgba(244, 241, 234, 0.68);
}

.location-chevron {
  color: var(--muted);
  transition: transform 0.18s ease;
  flex-shrink: 0;
}

.location-trigger.open .location-chevron {
  transform: rotate(180deg);
}

.location-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  border-radius: 0 0 18px 18px;
  background: rgba(20, 20, 16, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.location-search-wrap {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

.location-search-input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 14px;
}

.location-search-input::placeholder {
  color: rgba(244, 241, 234, 0.56);
}

.location-columns {
  display: grid;
  grid-template-columns: 132px 1fr;
  height: min(390px, 52dvh);
}

.location-province-list {
  overflow-y: auto;
  padding: 4px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.1);
}

.location-province-list::-webkit-scrollbar,
.location-city-list::-webkit-scrollbar {
  width: 3px;
}

.location-province-list::-webkit-scrollbar-thumb,
.location-city-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

.location-province-item {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: rgba(245, 241, 232, 0.76);
  font-size: 13px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease;
  white-space: nowrap;
}

.location-province-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.location-province-item.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

.location-city-list {
  overflow-y: auto;
  padding: 4px 0;
}

.location-city-item {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 48px;
  padding: 11px 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}

.location-city-item strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}

.location-city-item span {
  color: rgba(245, 241, 232, 0.52);
  font-size: 11px;
}

.location-city-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.location-city-item.selected {
  background: rgba(200, 180, 140, 0.16);
  color: #e8c788;
}

.location-empty-hint {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 420px) {
  .location-columns {
    grid-template-columns: 108px 1fr;
    height: min(420px, 58dvh);
  }

  .location-province-item {
    min-height: 46px;
    padding-inline: 10px;
    font-size: 12px;
  }

  .location-city-item {
    min-height: 50px;
    padding-inline: 12px;
  }
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 4px 2px 0;
}

.toggle-label,
.eyebrow,
.panel-kicker,
.section-headline,
.message-meta,
.pillar-label,
.fortune-card span,
.insight-card span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.solar-inline {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.solar-inline input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.solar-switch {
  position: relative;
  width: 52px;
  height: 32px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  transition: background 0.18s ease;
}

.solar-switch::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.24);
  transition: transform 0.18s ease;
}

.solar-inline input:checked + .solar-switch {
  background: rgba(238, 230, 216, 0.32);
}

.solar-inline input:checked + .solar-switch::after {
  transform: translateX(20px);
}

.primary-button,
.ghost-button,
.side-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease;
}

.primary-button {
  width: 100%;
  height: 54px;
  margin-top: 18px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 720;
  letter-spacing: 0.05em;
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.primary-button:hover,
.segment-button:hover,
.side-tab:hover,
.ghost-button:hover,
.chip-button:hover,
.bazi-range-chip:hover,
.ghost-inline-button:hover {
  transform: translateY(-1px);
}

.dashboard-screen {
  padding: 20px;
  overflow-x: hidden;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  width: min(100%, 1180px);
  margin: 0 auto;
  min-height: calc(100dvh - 36px);
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.sidebar {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 26px;
  box-shadow: var(--panel-shadow);
}

.sidebar-top h2 {
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.1;
}

.profile-brief {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.brief-pill,
.overview-pill,
.tag-cloud span,
.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.065);
  color: var(--muted-strong);
  font-size: 12px;
}

.side-nav {
  display: flex;
  align-content: start;
  gap: 8px;
  margin-top: 0;
}

.side-tab,
.ghost-button {
  min-height: 42px;
  border: 0;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.side-tab.active {
  background: rgba(245, 241, 232, 0.17);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.side-tab-muted {
  color: var(--muted);
}

.workspace {
  min-width: 0;
  min-height: 0;
  display: grid;
  max-width: 100%;
  overflow-x: hidden;
}

.unified-panel {
  display: grid;
  min-height: 100%;
  padding: 26px;
  border-radius: 30px;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.045)),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(34px) saturate(1.12);
  -webkit-backdrop-filter: blur(34px) saturate(1.12);
}

.chat-section {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0%, transparent 40px);
  border-radius: 0 0 0 0;
  padding: 28px 0 0 0;
}

.chat-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.chat-section-head .panel-kicker {
  font-size: 13px;
  color: #e8c788;
  letter-spacing: 0.12em;
}

.ghost-back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  min-height: 42px;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.ghost-back-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
}

.view-panel {
  display: grid;
  min-height: 100%;
  padding: 26px;
  border-radius: 30px;
  box-shadow: var(--panel-shadow);
}

.view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.view-head h3 {
  margin-top: 8px;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

.overview-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.overview-pill {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.ai-brief-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(245, 241, 232, 0.12), rgba(245, 241, 232, 0.045)),
    rgba(0, 0, 0, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 52px rgba(0, 0, 0, 0.18);
}

.ai-brief-copy {
  display: grid;
  gap: 8px;
}

.ai-brief-copy h4 {
  margin: 0;
  color: var(--text);
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: 0;
  text-wrap: balance;
}

.prompt-chip-row,
.quick-prompt-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-chip {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 680;
  line-height: 1;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.prompt-chip:hover {
  background: rgba(245, 241, 232, 0.16);
  color: var(--text);
  transform: translateY(-1px);
}

.prompt-chip:active {
  transform: translateY(1px);
}

.prompt-chip.primary-prompt {
  background: rgba(245, 241, 232, 0.2);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.result-section {
  margin-top: 26px;
  animation: fadeSlideIn 0.35s ease both;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-section:nth-child(1) { animation-delay: 0s; }
.result-section:nth-child(2) { animation-delay: 0.06s; }
.result-section:nth-child(3) { animation-delay: 0.12s; }
.result-section:nth-child(4) { animation-delay: 0.18s; }

.section-headline {
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: inline-block;
  margin-bottom: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .result-section {
    animation: none;
  }
}

.pillar-grid,
.relation-board,
.fortune-grid,
.insight-grid {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.pillar-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pillar-strip {
  --pillar-gap: clamp(18px, 5vw, 56px);
  --pillar-col: clamp(56px, 7vw, 76px);
  display: flex;
  justify-content: center;
  gap: var(--pillar-gap);
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}

.pillar-strip .pillar-card {
  display: grid;
  justify-items: center;
  gap: 0;
  width: var(--pillar-col);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.pillar-strip .pillar-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin: 0;
}

.pillar-strip .pillar-main {
  font-size: 34px;
  font-weight: 760;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--text);
  margin: 0;
}

.pillar-strip .pillar-note {
  font-size: 10px;
  color: var(--muted-strong);
  line-height: 1.2;
  text-align: center;
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tengod-strip {
  --pillar-gap: clamp(18px, 5vw, 56px);
  --pillar-col: clamp(56px, 7vw, 76px);
  display: flex;
  justify-content: center;
  gap: var(--pillar-gap);
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  margin-top: 2px;
}

.tengod-cell {
  display: grid;
  justify-items: center;
  gap: 0;
  width: var(--pillar-col);
  padding: 0;
  text-align: center;
}

.tengod-stem {
  font-size: 12px;
  font-weight: 600;
  color: #e8c788;
}

.tengod-branch {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.2;
}

.relation-board {
  grid-template-columns: 1fr;
  min-width: 0;
}

.plate-reading-board,
.plate-brief-board {
  display: grid;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.plate-reading-hero {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 18px 16px;
  border: 1px solid rgba(232, 199, 136, 0.16);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(232, 199, 136, 0.12), rgba(255, 255, 255, 0.035) 36%, rgba(0, 0, 0, 0.12)),
    rgba(0, 0, 0, 0.11);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.075),
    0 18px 40px rgba(0, 0, 0, 0.2);
}

.plate-reading-hero h4 {
  margin: 0;
  color: var(--text);
  font-size: 21px;
  line-height: 1.28;
  font-weight: 780;
  letter-spacing: 0;
}

.plate-reading-hero p {
  margin: 0;
  color: rgba(245, 241, 232, 0.78);
  font-size: 14px;
  line-height: 1.82;
}

.share-result-card {
  display: grid;
  gap: 13px;
  padding: 18px;
  border: 1px solid rgba(232, 199, 136, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 82% 10%, rgba(232, 199, 136, 0.18), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(232, 199, 136, 0.05)),
    rgba(0, 0, 0, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 18px 46px rgba(0, 0, 0, 0.2);
}

.share-result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.share-result-top span {
  color: rgba(232, 199, 136, 0.78);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.12em;
}

.share-result-top strong {
  display: inline-flex;
  align-items: baseline;
  color: #e8c788;
  font-size: 36px;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.share-result-top strong::after {
  content: "/100";
  margin-left: 4px;
  color: rgba(232, 199, 136, 0.48);
  font-size: 11px;
  letter-spacing: 0;
}

.share-result-card h4 {
  margin: 0;
  color: rgba(255, 250, 239, 0.96);
  font-size: 24px;
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.share-hook {
  margin: 0;
  color: rgba(245, 241, 232, 0.78);
  font-size: 14px;
  line-height: 1.68;
}

.share-result-grid {
  display: grid;
  gap: 9px;
}

.share-result-grid section {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid rgba(232, 199, 136, 0.1);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.13);
}

.share-result-grid small {
  color: rgba(232, 199, 136, 0.7);
  font-size: 10px;
  font-weight: 780;
}

.share-result-grid strong {
  color: rgba(255, 250, 239, 0.92);
  font-size: 15px;
  font-weight: 820;
}

.share-result-grid p,
.share-score-text {
  margin: 0;
  color: rgba(245, 241, 232, 0.68);
  font-size: 12px;
  line-height: 1.62;
}

.share-cta {
  justify-self: start;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(232, 199, 136, 0.15);
  color: #e8c788;
  font-size: 11px;
  font-weight: 780;
}

.ai-pending-card {
  border-style: dashed;
  opacity: 0.82;
  cursor: pointer;
}

.plate-evidence-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.plate-evidence-line span {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  color: rgba(245, 241, 232, 0.72);
  font-size: 11px;
  font-weight: 650;
}

.plate-brief-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.022)),
    rgba(0, 0, 0, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 12px 28px rgba(0, 0, 0, 0.14);
}

.plate-brief-card-main {
  border: 1px solid rgba(232, 199, 136, 0.11);
}

.plate-brief-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.plate-brief-head span {
  color: #e8c788;
  font-size: 13px;
  font-weight: 680;
}

.plate-brief-head strong {
  color: rgba(245, 241, 232, 0.54);
  font-size: 12px;
  font-weight: 650;
}

.plate-brief-card p {
  margin: 0;
  color: rgba(245, 241, 232, 0.74);
  font-size: 13px;
  line-height: 1.75;
}

.plate-mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.plate-mini-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(232, 199, 136, 0.11);
  color: #e8c788;
  font-size: 11px;
  font-weight: 640;
}

.ai-preview-refresh {
  position: relative;
  z-index: 2;
  justify-self: start;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(232, 199, 136, 0.14);
  color: #e8c788;
  font: inherit;
  font-size: 12px;
  font-weight: 720;
  cursor: pointer;
  touch-action: manipulation;
}

.ai-preview-refresh:active {
  transform: translateY(1px);
}

.lead-section {
  margin-top: 2px;
}

.lead-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(232, 199, 136, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.044), rgba(255, 255, 255, 0.018)),
    rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.lead-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.lead-field span {
  color: rgba(245, 241, 232, 0.56);
  font-size: 12px;
  font-weight: 650;
}

.lead-field input,
.lead-field textarea {
  width: 100%;
  border: 1px solid rgba(232, 199, 136, 0.12);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  outline: none;
}

.lead-field input {
  height: 42px;
  padding: 0 12px;
}

.lead-field textarea {
  min-height: 62px;
  resize: vertical;
  padding: 10px 12px;
}

.lead-field input:focus,
.lead-field textarea:focus {
  border-color: rgba(232, 199, 136, 0.38);
  box-shadow: 0 0 0 3px rgba(232, 199, 136, 0.08);
}

.lead-submit {
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #e8c788;
  color: #20160c;
  font: inherit;
  font-size: 14px;
  font-weight: 760;
}

.lead-submit:disabled {
  opacity: 0.64;
}

.lead-hint {
  min-height: 18px;
  margin: 0;
  color: rgba(245, 241, 232, 0.56);
  font-size: 12px;
  line-height: 1.5;
}

.lead-hint[data-tone="success"] {
  color: #e8c788;
}

.lead-hint[data-tone="error"] {
  color: #ffb4a8;
}

.premium-section {
  margin-top: 2px;
}

.premium-upgrade-card {
  min-width: 0;
}

.identity-question-shell {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.identity-question-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.identity-question-head div {
  display: grid;
  gap: 5px;
}

.identity-question-head span,
.compatibility-copy > span {
  color: #7b8792;
  font-size: 12px;
  font-weight: 680;
  letter-spacing: 0.04em;
}

.identity-question-head h3,
.compatibility-copy h3 {
  margin: 0;
  color: #202832;
  font-size: 20px;
  line-height: 1.35;
}

.identity-question-head em {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(43, 111, 135, 0.09);
  color: #2b6f87;
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
}

.identity-question-intro {
  margin: -4px 0 0;
  color: #697580;
  font-size: 13px;
  line-height: 1.7;
}

.identity-topic-groups {
  display: grid;
  gap: 18px;
}

.identity-topic-group {
  display: grid;
  gap: 10px;
}

.identity-topic-group > header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 2px;
}

.identity-topic-group > header span {
  color: #8a949e;
  font-size: 11px;
  font-weight: 680;
}

.identity-topic-group > header strong {
  color: #3a4651;
  font-size: 14px;
}

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

.identity-topic-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(32, 40, 50, 0.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(52, 78, 96, 0.055);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.identity-topic-card.is-selected {
  border-color: rgba(43, 111, 135, 0.38);
  box-shadow: 0 12px 28px rgba(43, 111, 135, 0.12);
  transform: translateY(-1px);
}

.identity-topic-card.is-selected .identity-topic-icon {
  background: linear-gradient(145deg, #6f63b7, #2b7c92);
  color: #fff;
}

.identity-topic-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(116, 93, 213, 0.12), rgba(43, 111, 135, 0.11));
  color: #5f55a7;
  font-size: 14px;
  font-weight: 800;
}

.identity-topic-copy {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.identity-topic-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #77838e;
  font-size: 11px;
  font-weight: 700;
}

.identity-topic-meta em {
  color: #b06d35;
  font-style: normal;
}

.identity-question-shell.is-active .identity-topic-meta em {
  color: #2b8066;
}

.identity-topic-copy strong {
  color: #27313b;
  font-size: 14px;
  line-height: 1.45;
}

.identity-topic-copy p {
  margin: 0;
  color: #7b8690;
  font-size: 11px;
  line-height: 1.5;
}

.identity-topic-action {
  grid-column: 1 / -1;
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f7;
  color: #2b6f87;
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
  touch-action: manipulation;
}

.identity-topic-card.is-selected .identity-topic-action {
  background: rgba(43, 111, 135, 0.11);
  color: #245f74;
}

.identity-selected-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 15px;
  border: 1px solid rgba(43, 111, 135, 0.16);
  border-radius: 18px;
  background: rgba(244, 249, 251, 0.96);
}

.identity-selected-bar div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.identity-selected-bar span {
  color: #82909b;
  font-size: 11px;
  font-weight: 700;
}

.identity-selected-bar strong {
  overflow: hidden;
  color: #28343e;
  font-size: 13px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-selected-bar button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: #2b6f87;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 780;
  cursor: pointer;
  touch-action: manipulation;
}

.identity-selected-bar button b {
  margin-right: 3px;
  font-size: 15px;
}

.identity-pack-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px;
  border-radius: 18px;
  background: linear-gradient(135deg, #263846, #2b6f87);
  color: #fff;
}

.identity-pack-bar div {
  display: grid;
  gap: 3px;
}

.identity-pack-bar strong {
  font-size: 14px;
}

.identity-pack-bar span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.identity-pack-bar button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #285e72;
  font: inherit;
  font-size: 12px;
  font-weight: 780;
  cursor: pointer;
  touch-action: manipulation;
}

.identity-pack-bar button b {
  margin-right: 3px;
  font-size: 16px;
}

.identity-sync-button {
  justify-self: center;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: #7b8792;
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

.identity-sync-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.identity-sync-row {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.identity-sync-hint {
  margin: 0;
  max-width: 280px;
  color: #7b8792;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.identity-sync-hint.is-success {
  color: #285e72;
}

.identity-sync-hint.is-error {
  color: #9b3d35;
}

.premium-upgrade-card-shell {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(43, 111, 135, 0.1);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(248, 251, 253, 0.97), rgba(241, 246, 250, 0.92));
  box-shadow: 0 18px 40px rgba(52, 78, 96, 0.08);
}

.premium-upgrade-card-shell.is-active {
  border-color: rgba(43, 111, 135, 0.16);
  background: linear-gradient(180deg, rgba(244, 250, 252, 0.98), rgba(236, 245, 249, 0.94));
}

.premium-upgrade-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.premium-upgrade-copy strong {
  color: #202832;
  font-size: 16px;
  font-weight: 720;
  line-height: 1.35;
}

.premium-upgrade-copy p,
.premium-upgrade-copy em {
  margin: 0;
  color: #5d6874;
  font-size: 13px;
  line-height: 1.72;
}

.premium-upgrade-copy em {
  color: #6f7a86;
  font-style: normal;
}

.premium-upgrade-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.premium-upgrade-points span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(43, 111, 135, 0.08);
  color: #2b6f87;
  font-size: 12px;
  font-weight: 680;
}

.premium-upgrade-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.premium-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #2b6f87;
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  box-shadow: 0 12px 24px rgba(43, 111, 135, 0.18);
  cursor: pointer;
  touch-action: manipulation;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease;
}

.premium-action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(43, 111, 135, 0.22);
}

.premium-action-button:active {
  transform: translateY(1px);
}

.premium-action-button.secondary {
  border: 1px solid rgba(32, 40, 50, 0.1);
  background: rgba(255, 255, 255, 0.92);
  color: #44515d;
  box-shadow: none;
}

.premium-action-button.secondary:hover {
  box-shadow: 0 10px 22px rgba(32, 40, 50, 0.08);
}

.unlock-module-grid {
  display: grid;
  gap: 10px;
}

.open-reading-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 15px 14px;
  border: 1px solid rgba(232, 199, 136, 0.11);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(232, 199, 136, 0.1), rgba(255, 255, 255, 0.026)),
    rgba(0, 0, 0, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.058);
}

.open-reading-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.open-reading-head span {
  color: #e8c788;
  font-size: 14px;
  font-weight: 740;
}

.open-reading-head strong {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(232, 199, 136, 0.12);
  color: rgba(232, 199, 136, 0.88);
  font-size: 10px;
  font-weight: 720;
}

.open-reading-card p {
  margin: 0;
  color: rgba(245, 241, 232, 0.74);
  font-size: 13px;
  line-height: 1.72;
}

.ai-detail-grid {
  display: grid;
  gap: 7px;
  margin-top: 2px;
}

.ai-detail-item {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(232, 199, 136, 0.08);
}

.ai-detail-item strong {
  color: rgba(232, 199, 136, 0.86);
  font-size: 11px;
  font-weight: 760;
}

.ai-detail-item span {
  color: rgba(245, 241, 232, 0.72);
  font-size: 12px;
  line-height: 1.6;
}

.ai-detail-item small {
  color: rgba(245, 241, 232, 0.42);
  font-size: 10px;
  line-height: 1.45;
}

.open-reading-card h5,
.locked-reading-card h5 {
  margin: 0 0 5px;
  color: rgba(245, 241, 232, 0.86);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 720;
}

.reading-evidence-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.reading-evidence-list em {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(245, 241, 232, 0.5);
  font-size: 10px;
  font-style: normal;
  font-weight: 620;
}

.locked-reading-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 12px;
  align-items: center;
  min-width: 0;
  padding: 14px 14px;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.locked-reading-card span {
  display: block;
  color: #e8c788;
  font-size: 14px;
  font-weight: 720;
}

.locked-reading-card p {
  margin: 5px 0 0;
  color: rgba(245, 241, 232, 0.62);
  font-size: 12px;
  line-height: 1.55;
}

.locked-reading-card strong {
  grid-column: 1 / -1;
  color: rgba(245, 241, 232, 0.42);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
}

.locked-reading-card button {
  grid-row: 1;
  grid-column: 2;
  border: 0;
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(232, 199, 136, 0.16);
  color: #e8c788;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.intimacy-power-section {
  display: grid;
  gap: 12px;
}

.intimacy-power-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(0, 102, 134, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 42px rgba(78, 137, 174, 0.08);
}

.intimacy-power-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 24px;
  align-items: center;
}

.intimacy-power-copy {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.intimacy-power-head {
  align-items: center;
  justify-content: space-between;
}

.intimacy-power-copy h3 {
  margin: 0;
  color: var(--stitch-text);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
}

.intimacy-refresh-button {
  border: 1px solid rgba(0, 102, 134, 0.1);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--stitch-muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.intimacy-refresh-button:hover {
  color: var(--stitch-primary);
  background: rgba(255, 255, 255, 0.96);
}

.intimacy-refresh-button:active {
  transform: scale(0.97);
}

.intimacy-power-copy p {
  margin: 0;
  color: var(--stitch-muted);
  font-size: 14px;
  line-height: 1.75;
}

.power-total-score {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  max-width: 520px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 102, 134, 0.08);
  border-radius: 8px;
  background: rgba(246, 251, 254, 0.78);
}

.power-score-number {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: var(--stitch-primary);
  white-space: nowrap;
}

.power-score-number strong {
  font-size: 38px;
  line-height: 0.9;
  letter-spacing: 0;
  font-weight: 500;
}

.power-score-number span {
  color: var(--stitch-outline);
  font-size: 12px;
  font-weight: 500;
}

.power-score-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.power-score-copy em {
  color: var(--stitch-text);
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.power-score-copy p {
  color: var(--stitch-muted);
  font-size: 12px;
  line-height: 1.55;
}

.power-radar-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 260px;
  border: 1px solid rgba(0, 102, 134, 0.08);
  border-radius: 8px;
  background: rgba(246, 251, 254, 0.78);
  overflow: hidden;
}

.power-radar-wrap::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 102, 134, 0.055);
}

.power-radar {
  position: relative;
  width: min(100%, 240px);
  height: auto;
  overflow: visible;
}

.power-radar-grid-line {
  fill: transparent;
  stroke: rgba(0, 102, 134, 0.12);
  stroke-width: 1;
}

.power-radar-spoke {
  stroke: rgba(0, 102, 134, 0.08);
  stroke-width: 1;
}

.power-radar-shape {
  fill: rgba(0, 126, 167, 0.16);
  stroke: rgba(0, 126, 167, 0.72);
  stroke-width: 2;
  filter: drop-shadow(0 8px 18px rgba(0, 126, 167, 0.12));
}

.power-radar-label {
  fill: var(--stitch-muted);
  font-size: 11px;
  font-weight: 500;
  dominant-baseline: middle;
}

.power-axis-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.power-axis-item {
  display: grid;
  gap: 7px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 102, 134, 0.075);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.power-axis-details {
  cursor: pointer;
}

.power-axis-details summary {
  display: grid;
  gap: 5px;
  list-style: none;
}

.power-axis-details summary::-webkit-details-marker {
  display: none;
}

.power-axis-item div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.power-axis-item strong {
  color: var(--stitch-text);
  font-size: 13px;
  font-weight: 500;
}

.power-axis-item span {
  color: var(--stitch-primary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.power-axis-item p {
  color: var(--stitch-muted);
  font-size: 12px;
  line-height: 1.65;
}

.power-axis-item small {
  color: var(--stitch-outline);
  font-size: 10px;
  line-height: 1.4;
}

.axis-evidence-toggle {
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid rgba(0, 102, 134, 0.08);
  border-radius: 999px;
  color: var(--stitch-outline);
  background: rgba(255, 255, 255, 0.5);
}

.power-axis-details[open] .axis-evidence-toggle {
  color: var(--stitch-primary);
  background: rgba(246, 251, 254, 0.86);
}

.power-axis-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 3px;
}

.power-axis-evidence em {
  padding: 3px 7px;
  border: 1px solid rgba(0, 102, 134, 0.08);
  border-radius: 999px;
  color: var(--stitch-muted);
  background: rgba(246, 251, 254, 0.7);
  font-size: 10px;
  font-style: normal;
  line-height: 1.35;
}

.intimacy-combo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 4px;
}

.intimacy-combo-grid h4 {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  color: var(--stitch-primary);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
}

.intimacy-combo-item {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(0, 102, 134, 0.075);
  border-radius: 8px;
  background: rgba(246, 251, 254, 0.62);
}

.intimacy-combo-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--stitch-text);
  font-size: 13px;
  font-weight: 500;
}

.intimacy-combo-item p {
  margin: 0;
  color: var(--stitch-muted);
  font-size: 12px;
  line-height: 1.68;
}

.plate-signal-list {
  display: grid;
  gap: 8px;
}

.plate-signal-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  min-width: 0;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}

.plate-signal-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.plate-signal-item span {
  align-self: center;
  color: rgba(245, 241, 232, 0.56);
  font-size: 12px;
  font-weight: 650;
}

.plate-signal-item strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 760;
  letter-spacing: 0;
}

.plate-signal-item em {
  grid-column: 1 / -1;
  color: rgba(245, 241, 232, 0.58);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.fortune-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.current-fortune-card {
  grid-column: 1 / -1;
}

.insight-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pillar-card,
.relation-group,
.fortune-card,
.insight-card,
.message-bubble {
  border: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.pillar-card,
.relation-group,
.fortune-card,
.insight-card {
  padding: 16px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.fortune-card:hover {
  background: rgba(255, 255, 255, 0.07);
}

.relation-group {
  background: rgba(255, 255, 255, 0.048);
  transition: background 0.2s ease;
}

.relation-group:hover {
  background: rgba(255, 255, 255, 0.065);
}

.relation-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.relation-group-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.relation-group-meta {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.relation-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.relation-chip {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 0;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.12);
}

.relation-chip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.relation-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
}

.relation-pill.formed {
  background: rgba(126, 190, 153, 0.14);
  color: #b9dcc8;
}

.relation-pill.rising {
  background: rgba(126, 162, 192, 0.14);
  color: #c2d1dc;
}

.relation-pill.pending {
  background: rgba(211, 186, 130, 0.14);
  color: #e4d2ad;
}

.relation-pill.hidden {
  background: rgba(176, 156, 199, 0.14);
  color: #d3c8dc;
}

.relation-pill.active {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

.relation-strength {
  color: var(--muted);
  font-size: 12px;
}

.relation-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.relation-pattern {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0.06em;
}

.relation-arrow {
  color: var(--muted);
  font-size: 14px;
}

.relation-target {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted-strong);
  font-size: 12px;
}

.relation-meta {
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.6;
}

.relation-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.pillar-main {
  margin-top: 12px;
  font-size: 38px;
  line-height: 1;
  letter-spacing: 0;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.pillar-note,
.fortune-card p,
.insight-card p {
  margin-top: 10px;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.7;
}

.fortune-card strong,
.insight-card strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 680;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag-cloud span {
  background: rgba(200, 180, 140, 0.1);
  border: 1px solid rgba(200, 180, 140, 0.18);
  color: #e8c788;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.shensha-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgba(245, 241, 232, 0.055);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.012)),
    rgba(0, 0, 0, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 28px rgba(0, 0, 0, 0.16);
}

.shensha-column {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  padding: 12px 6px;
  border-right: 1px solid rgba(255, 255, 255, 0.035);
}

.shensha-column:last-child {
  border-right: 0;
}

.shensha-column strong {
  display: block;
  margin-bottom: 3px;
  color: rgba(245, 241, 232, 0.42);
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  text-align: center;
}

.shensha-column span {
  display: block;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #e8c788;
  font-size: 13px;
  font-weight: 560;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-align: center;
  overflow-wrap: anywhere;
}

.shensha-column em {
  color: rgba(245, 241, 232, 0.26);
  font-size: 12px;
  font-style: normal;
  text-align: center;
}

.shensha-empty {
  margin-top: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 13px;
}

.chat-view {
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
}

.message-list {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.quick-prompt-bar {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(245, 241, 232, 0.08);
}

.message {
  display: grid;
  gap: 7px;
  max-width: min(88%, 560px);
}

.message.assistant {
  justify-self: start;
}

.message.user {
  justify-self: end;
}

.message-bubble {
  padding: 13px 14px;
  font-size: 14px;
  line-height: 1.68;
}

.message-text {
  display: grid;
  gap: 10px;
}

.message-text p {
  margin: 0;
  max-width: 42em;
  letter-spacing: 0.01em;
}

.message.user .message-bubble {
  background: rgba(238, 230, 216, 0.14);
}

.attachment-preview,
.message-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attachment-preview {
  margin-top: 12px;
}

.attachment-preview figure,
.message-images figure {
  width: 72px;
  height: 72px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.attachment-preview img,
.message-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.composer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 6px 8px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.075);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.composer.composer-focused {
  border-color: rgba(232, 199, 136, 0.34);
  background: rgba(255, 255, 255, 0.075);
  box-shadow:
    0 0 0 3px rgba(232, 199, 136, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.composer-field {
  flex: 1;
}

.composer-field textarea {
  width: 100%;
  min-height: 40px;
  max-height: 160px;
  padding: 11px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  resize: none;
  outline: 0;
}

.composer-attach-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.composer-attach-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.composer-attach-button:active {
  transform: scale(0.94);
}

.composer-send-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(245, 241, 232, 0.28);
  color: rgba(16, 16, 16, 0.72);
  cursor: pointer;
  transition:
    transform 0.16s ease,
    opacity 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.composer.composer-has-content .composer-send-button {
  background: #f4f1ea;
  color: #101010;
}

.composer-send-button:hover {
  transform: scale(1.06);
}

.composer-send-button:active {
  transform: scale(0.94);
}

.composer-send-button.sending svg {
  animation: sendPulse 0.8s ease-in-out infinite alternate;
}

@keyframes sendPulse {
  from {
    opacity: 0.45;
    transform: translateY(1px);
  }
  to {
    opacity: 1;
    transform: translateY(-1px);
  }
}

.composer-send-button:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}

.composer-attach-button:disabled,
.composer-send-button:disabled {
  pointer-events: none;
}

.composer-field textarea:disabled {
  opacity: 0.58;
  cursor: default;
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: default;
  opacity: 0.54;
}

@media (max-width: 980px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .side-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pillar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pillar-strip {
    --pillar-gap: clamp(8px, 3vw, 24px);
    --pillar-col: clamp(50px, 10vw, 58px);
  }

  .pillar-strip .pillar-main {
    font-size: 26px;
  }

  .pillar-strip .pillar-card,
  .tengod-cell {
    width: var(--pillar-col);
    min-width: 0;
  }

  .tengod-strip {
    --pillar-gap: clamp(8px, 3vw, 24px);
    --pillar-col: clamp(50px, 10vw, 58px);
    gap: var(--pillar-gap);
  }

    .relation-board,
    .fortune-grid,
    .insight-grid {
      grid-template-columns: 1fr;
    }

    .fortune-grid {
      grid-auto-flow: column;
      grid-auto-columns: minmax(240px, min(76vw, 340px));
      grid-template-columns: none;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      -webkit-overflow-scrolling: touch;
      padding-bottom: 4px;
      margin: 0 -12px;
      padding: 0 12px 4px;
    }

    .fortune-grid::-webkit-scrollbar {
      height: 3px;
    }

    .fortune-grid::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.1);
      border-radius: 3px;
    }

    .fortune-card {
      scroll-snap-align: start;
      min-width: 0;
    }
  }

@media (max-width: 680px) {
  .intimacy-power-card {
    gap: 14px;
    padding: 18px;
  }

  .intimacy-power-hero,
  .intimacy-combo-grid {
    grid-template-columns: 1fr;
  }

  .power-radar-wrap {
    min-height: 226px;
  }

  .power-radar {
    width: min(100%, 220px);
  }

  .power-axis-list {
    grid-template-columns: 1fr;
  }

  .entry-screen,
  .dashboard-screen {
    padding-right: 12px;
    padding-left: 12px;
  }

  .sidebar {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    margin-left: calc(50% - 50vw + 12px);
    margin-right: calc(50% - 50vw + 12px);
    overflow: hidden;
  }

  .entry-screen {
    padding-top: calc(env(safe-area-inset-top) + 22px);
  }

  .entry-wrap {
    width: 100%;
  }

  .entry-card {
    padding: 16px 14px 14px;
    border-radius: 30px;
  }

  .datetime-head-4,
  .wheel-stage-4 {
    grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
  }

  .datetime-head-5,
  .wheel-stage-5 {
    grid-template-columns: 1.08fr repeat(4, minmax(0, 1fr));
  }

  .wheel-item {
    font-size: 17px;
  }

  .wheel-item.active {
    font-size: 22px;
  }

  .dashboard-screen {
    padding-top: calc(env(safe-area-inset-top) + 10px);
    padding-bottom: calc(env(safe-area-inset-bottom) + 10px);
  }

  .dashboard-shell {
    gap: 12px;
    min-height: calc(100dvh - 20px);
  }

  .sidebar {
    gap: 12px;
    padding: 14px;
    border-radius: 24px;
  }

  .unified-panel {
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    min-height: auto;
  }

  .view-head {
    flex-direction: column;
    margin-bottom: 14px;
  }

  .view-head h3 {
    font-size: 22px;
  }

  .bazi-pillar-grid {
    gap: 8px;
  }

  .bazi-token {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    font-size: 22px;
  }

  .selector-button {
    min-height: 60px;
    border-radius: 16px;
  }

  .pillar-grid {
    grid-template-columns: 1fr;
  }

  .pillar-strip {
    --pillar-gap: 2px;
    --pillar-col: calc((100% - 6px) / 4);
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    overflow: hidden;
    justify-content: center;
  }

  .pillar-strip .pillar-main {
    font-size: 24px;
  }

  .pillar-strip .pillar-card,
  .tengod-cell {
    width: var(--pillar-col);
  }

  .tengod-strip {
    --pillar-gap: 2px;
    --pillar-col: calc((100% - 6px) / 4);
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    overflow: hidden;
    justify-content: center;
    gap: var(--pillar-gap);
  }

  .pillar-main {
    font-size: 30px;
  }

  .result-section {
    margin-top: 18px;
  }

  .message {
    max-width: 100%;
  }

  .chat-view {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    min-height: calc(100dvh - 156px);
  }

  .message-list {
    padding-right: 0;
    padding-bottom: 10px;
  }

  .message-bubble {
    padding: 14px;
    font-size: 15px;
    line-height: 1.65;
    border-radius: 20px;
  }

  .composer {
    flex-wrap: nowrap;
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-top: 10px;
    padding: 8px;
    padding-bottom: calc(env(safe-area-inset-bottom) + 8px);
    background: rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
  }

  .composer-field {
    width: auto;
    flex-basis: auto;
    order: -1;
  }

  .composer-field textarea {
    min-height: 36px;
    padding: 10px 0;
    font-size: 16px;
    border-radius: 0;
    background: transparent;
  }
}

@media (max-width: 680px) {
  html,
  body,
  .app-shell,
  .dashboard-screen,
  .dashboard-shell,
  .workspace,
  .unified-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .dashboard-screen {
    padding-right: 12px;
    padding-left: 12px;
  }

  .overview-strip {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    min-width: 0;
    overflow: hidden;
  }

  .overview-strip > * {
    display: inline-flex;
    margin: 0 6px 6px 0;
    overflow: hidden;
  }

  .overview-pill,
  .brief-pill,
  .status-chip {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .overview-pill {
    min-height: 30px;
    padding: 0 10px;
    font-size: 11px;
    line-height: 1.25;
  }

  .result-section:first-of-type {
    display: block;
    clear: both;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    overflow: hidden;
  }

  .pillar-strip,
  .tengod-strip {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 44px)) !important;
    justify-content: center;
    align-items: start;
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    gap: 0 !important;
    overflow: hidden;
  }

  .pillar-strip .pillar-card,
  .tengod-cell {
    width: auto !important;
    min-width: 0;
    max-width: 44px;
  }

  .pillar-strip .pillar-main {
    font-size: 23px;
    line-height: 1;
    letter-spacing: 0;
  }

  .pillar-strip .pillar-label,
  .pillar-strip .pillar-note,
  .tengod-stem,
  .tengod-branch {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tengod-stem {
    font-size: 11px;
  }

  .tengod-branch {
    font-size: 9px;
  }
}

.bazi-result-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 64px));
  justify-content: center;
  gap: clamp(12px, 4vw, 34px);
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.bazi-table {
  display: grid;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(245, 241, 232, 0.065);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(0, 0, 0, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 14px 32px rgba(0, 0, 0, 0.18);
}

.bazi-table-row {
  display: grid;
  grid-template-columns: 56px repeat(4, minmax(0, 1fr));
  min-width: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
}

.bazi-table-row:last-child {
  border-bottom: 0;
}

.bazi-table-row:first-child {
  border-radius: 18px 18px 0 0;
}

.bazi-table-row:last-child {
  border-radius: 0 0 18px 18px;
}

.bazi-table-row:nth-child(odd) {
  background: rgba(255, 255, 255, 0.018);
}

.bazi-table-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.bazi-row-label,
.bazi-cell {
  display: grid;
  align-items: center;
  min-width: 0;
  padding: 10px 3px;
  color: rgba(245, 241, 232, 0.76);
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
}

.bazi-row-label {
  justify-items: start;
  padding-left: 6px;
  color: rgba(245, 241, 232, 0.36);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.bazi-cell {
  justify-items: center;
  overflow-wrap: anywhere;
}

.bazi-table-row.muted-row .bazi-cell,
.bazi-table-row.soft-row .bazi-cell {
  color: rgba(245, 241, 232, 0.7);
}

.bazi-table-row.main-row .bazi-cell {
  padding-top: 12px;
  padding-bottom: 12px;
  font-size: clamp(28px, 8vw, 42px);
  font-weight: 760;
  line-height: 1;
}

.bazi-main-token {
  display: inline-block;
  line-height: 1;
}

.bazi-table-row.stem-row .bazi-cell:nth-child(2),
.bazi-table-row.branch-row .bazi-cell:nth-child(2) {
  color: #20d68f;
}

.bazi-table-row.stem-row .bazi-cell:nth-child(3),
.bazi-table-row.branch-row .bazi-cell:nth-child(3),
.bazi-table-row.stem-row .bazi-cell:nth-child(5),
.bazi-table-row.branch-row .bazi-cell:nth-child(5) {
  color: #c9893f;
}

.bazi-table-row.stem-row .bazi-cell:nth-child(4),
.bazi-table-row.branch-row .bazi-cell:nth-child(4) {
  color: #ff6464;
}

.bazi-table-row.stack-row .bazi-cell {
  align-content: center;
  gap: 3px;
  color: #e8c788;
  font-size: 12px;
  line-height: 1.22;
}

.bazi-table-row.stack-row .bazi-cell span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bazi-table-row.hidden-row .bazi-cell {
  gap: 2px;
  font-weight: 650;
}

.bazi-table-row.god-row .bazi-cell {
  gap: 2px;
  color: rgba(245, 241, 232, 0.76);
}

.bazi-table-row.shen-row .bazi-cell {
  gap: 2px;
  color: #e8c788;
  font-size: 11px;
  line-height: 1.22;
}

.bazi-table-row.fortune-state-row .bazi-cell,
.bazi-table-row.void-row .bazi-cell,
.bazi-table-row.nayin-row .bazi-cell {
  color: rgba(245, 241, 232, 0.62);
  font-size: 12px;
}

.tone-wood {
  color: #28d890;
}

.tone-fire {
  color: #ff6868;
}

.tone-earth {
  color: #c98a43;
}

.tone-metal {
  color: #e3bd54;
}

.tone-water {
  color: #45a7ff;
}

.tone-god {
  color: rgba(245, 241, 232, 0.76);
}

.tone-default {
  color: rgba(245, 241, 232, 0.72);
}

.bazi-result-board .pillar-card {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 1px;
  min-width: 0;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.bazi-result-board .pillar-label {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.08em;
}

.bazi-result-board .pillar-main {
  margin: 0;
  color: var(--text);
  font-size: 32px;
  font-weight: 760;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.bazi-result-board .pillar-note {
  max-width: 100%;
  margin: 0;
  color: var(--muted-strong);
  font-size: 9px;
  line-height: 1.2;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pillar-gods {
  display: grid;
  justify-items: center;
  gap: 0;
  min-width: 0;
  max-width: 100%;
  margin-top: 1px;
}

.pillar-god-stem {
  color: #e8c788;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 650;
}

.pillar-god-branch {
  max-width: 100%;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .result-section:first-of-type {
    width: 100%;
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
    overflow: hidden;
  }

  .bazi-result-board {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: stretch;
    gap: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .bazi-result-board .pillar-main {
    font-size: clamp(20px, 6vw, 24px);
  }

  .bazi-result-board .pillar-label {
    font-size: 9px;
  }

  .bazi-result-board .pillar-note {
    font-size: 8px;
  }

  .pillar-god-stem {
    font-size: 10px;
  }

  .pillar-god-branch {
    font-size: 8px;
  }
}

/* The Bazi table owns its own columns. The wrapper must not be a 4-column grid. */
.bazi-result-board {
  display: block !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}

.bazi-result-board .bazi-table {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 680px) {
  .bazi-result-board {
    display: block !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .bazi-table {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .bazi-table-row {
    grid-template-columns: 52px repeat(4, minmax(0, 1fr)) !important;
    width: 100%;
    min-width: 0;
  }
}

/* Mobile dashboard rewrite: keep every result surface inside the viewport. */
@media (max-width: 680px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-shell,
  .dashboard-screen,
  .dashboard-shell,
  .workspace,
  .unified-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .dashboard-screen {
    display: block;
    padding: calc(env(safe-area-inset-top) + 10px) 12px calc(env(safe-area-inset-bottom) + 10px);
  }

  .dashboard-shell {
    display: block;
    margin: 0;
    min-height: auto;
  }

  .sidebar {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 0 14px;
    padding: 14px;
    overflow: hidden;
    border-radius: 24px;
  }

  .sidebar-top,
  .profile-brief,
  .side-nav {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .profile-brief {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .brief-pill,
  .overview-pill,
  .status-chip {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .workspace {
    display: block;
  }

  .unified-panel,
  .view-panel {
    display: block;
    min-height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .view-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    margin-bottom: 12px;
    overflow: hidden;
  }

  .view-head h3 {
    font-size: 24px;
  }

  .view-head .status-chip {
    justify-self: start;
  }

  .overview-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    overflow: hidden;
  }

  .overview-strip > * {
    margin: 0;
  }

  .result-section,
  .result-section:first-of-type {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 18px 0 0;
    overflow: hidden;
  }

  .bazi-result-board {
    display: block !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    overflow: hidden;
  }

  .bazi-table {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 16px;
    border-color: rgba(245, 241, 232, 0.055);
  }

  .bazi-table-row {
    grid-template-columns: 44px repeat(4, minmax(0, 1fr));
  }

  .bazi-table-row:first-child {
    border-radius: 16px 16px 0 0;
  }

  .bazi-table-row:last-child {
    border-radius: 0 0 16px 16px;
  }

  .bazi-row-label,
  .bazi-cell {
    padding-right: 2px;
    padding-left: 2px;
    font-size: 11px;
  }

  .bazi-row-label {
    padding-left: 4px;
  }

  .bazi-table-row.main-row .bazi-cell {
    font-size: clamp(24px, 7.2vw, 34px);
  }

  .bazi-table-row.stack-row .bazi-cell {
    font-size: 11px;
  }

  .bazi-table-row.hidden-row .bazi-cell,
  .bazi-table-row.god-row .bazi-cell,
  .bazi-table-row.shen-row .bazi-cell {
    gap: 1px;
    font-size: 10px;
    line-height: 1.18;
  }

  .bazi-table-row.fortune-state-row .bazi-cell,
  .bazi-table-row.void-row .bazi-cell,
  .bazi-table-row.nayin-row .bazi-cell {
    font-size: 10px;
    line-height: 1.25;
  }

  .bazi-result-board .pillar-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0 1px;
    overflow: hidden;
  }

  .bazi-result-board .pillar-main {
    font-size: clamp(20px, 5.8vw, 24px);
    line-height: 1;
    letter-spacing: 0;
  }

  .bazi-result-board .pillar-label,
  .bazi-result-board .pillar-note,
  .pillar-god-stem,
  .pillar-god-branch {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bazi-result-board .pillar-label {
    font-size: 9px;
  }

  .bazi-result-board .pillar-note,
  .pillar-god-branch {
    font-size: 8px;
  }

  .pillar-god-stem {
    font-size: 10px;
  }

  .relation-board,
  .fortune-grid,
  .insight-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
    overflow: hidden;
  }

  .relation-group,
  .fortune-card {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .fortune-grid {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: unset;
    gap: 12px;
    margin: 10px 0 0;
    padding: 0;
    overflow-x: hidden;
    scroll-snap-type: none;
  }

  .tag-cloud {
    max-width: 100%;
    overflow: hidden;
  }

  .shensha-board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    border-radius: 16px;
  }

  .shensha-column {
    padding: 10px 3px;
    gap: 4px;
  }

  .shensha-column span {
    font-size: 12px;
    line-height: 1.32;
  }

  .chat-section {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .message {
    max-width: 100%;
  }

  .composer {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    border-color: rgba(255, 255, 255, 0.075);
  }

  .composer.composer-focused {
    border-color: rgba(232, 199, 136, 0.34);
    background: rgba(255, 255, 255, 0.075);
  }
}

.sm-extension-mount[hidden] {
  display: none !important;
}

/* Pretext-powered SM light interaction */
body {
  font-weight: 400;
}

.entry-hero-copy h1,
.view-head h3,
.section-headline,
.plate-reading-hero h4,
.open-reading-card h5,
.locked-reading-card h5 {
  font-weight: 650;
}

.panel-kicker,
.entry-kicker,
.status-chip,
.overview-pill,
.brief-pill,
.selector-button,
.segment-button,
.lead-field span,
.contact-start-field span {
  font-weight: 560;
}

.sm-extension-mount {
  display: block;
  margin: 18px 0;
}

.sm-pretext-card {
  position: relative;
  overflow: hidden;
  overscroll-behavior: contain;
  padding: 18px;
  color: #263241;
  border: 1px solid rgba(58, 111, 145, 0.12);
  border-radius: 26px;
  background:
    radial-gradient(circle at 14% 0%, rgba(125, 211, 252, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 252, 255, 0.94));
  box-shadow:
    0 16px 38px rgba(70, 103, 128, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.sm-pretext-glow {
  position: absolute;
  inset: -80px auto auto -60px;
  width: 210px;
  height: 210px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.18), transparent 62%);
  filter: blur(2px);
  pointer-events: none;
}

.sm-pretext-copy {
  position: relative;
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.sm-pretext-kicker {
  color: #356f8a;
  font-size: 12px;
  font-weight: 560;
  letter-spacing: 0.12em;
}

.sm-pretext-copy h3 {
  color: #17212d;
  font-size: clamp(22px, 5vw, 30px);
  line-height: 1.08;
  font-weight: 620;
  letter-spacing: -0.04em;
}

.sm-pretext-copy p {
  max-width: 34em;
  color: #5d6b7a;
  font-size: 13px;
  line-height: 1.7;
}

.sm-pretext-zone-drop {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 56px;
  align-items: center;
}

.sm-pretext-source {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 16px 14px 14px;
  margin-bottom: 14px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 252, 255, 0.78)),
    rgba(255, 255, 255, 0.86);
  box-shadow:
    inset 0 0 0 1px rgba(58, 111, 145, 0.12),
    0 12px 28px rgba(70, 103, 128, 0.06);
}

.sm-pretext-source-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #667386;
  font-size: 12px;
}

.sm-pretext-source-head span {
  font-weight: 560;
}

.sm-pretext-source-head em {
  color: #8a96a6;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.sm-pretext-source-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.sm-pretext-zones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.sm-pretext-zone {
  display: grid;
  align-content: start;
  min-height: 138px;
  padding: 12px;
  border: 1px solid rgba(58, 111, 145, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 252, 255, 0.78)),
    rgba(255, 255, 255, 0.86);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.sm-pretext-zone.is-over {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(53, 111, 138, 0.26);
  background: rgba(237, 249, 255, 0.94);
  box-shadow: 0 14px 30px rgba(70, 103, 128, 0.13);
}

.sm-pretext-zone-head {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.sm-pretext-zone-head strong {
  color: #213041;
  font-size: 14px;
  font-weight: 620;
}

.sm-pretext-zone-head span,
.sm-pretext-empty {
  color: #667386;
  font-size: 12px;
  line-height: 1.5;
}

.sm-pretext-tile {
  width: auto;
  min-width: var(--tile-w);
  min-height: 38px;
  padding: 0 13px;
  border-radius: 14px;
  color: #223143;
  font-size: 15px;
  font-weight: 520;
  letter-spacing: -0.015em;
  border: 1px solid rgba(58, 111, 145, 0.1);
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 9px 22px rgba(70, 103, 128, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  animation: smTileEnter 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transform: none;
  transition:
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 180ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

.sm-pretext-tile:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 28px rgba(70, 103, 128, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.sm-pretext-tile.dragging {
  cursor: grabbing;
  opacity: 0.94;
  box-shadow: 0 22px 52px rgba(70, 103, 128, 0.2);
  animation: none;
  transition: box-shadow 140ms ease, opacity 140ms ease;
}

.sm-pretext-tile.settling {
  transition: transform 220ms cubic-bezier(0.2, 0.9, 0.18, 1);
}

.sm-pretext-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: #667386;
  font-size: 12px;
}

.sm-pretext-reset {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  color: #356f8a;
  background: rgba(78, 137, 174, 0.1);
}

@media (max-width: 720px) {
  .sm-pretext-zones {
    grid-template-columns: 1fr;
  }

  .sm-pretext-zone {
    min-height: 112px;
  }
}

@keyframes smTileEnter {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sm-pretext-tile {
    animation: none;
    transition: none;
    transform: none;
  }

  .sm-pretext-zone {
    transition: none;
  }
}

/* Unified product theme: light glass fate rhythm. */
:root {
  color-scheme: light;
  --stitch-bg: #f9f9f9;
  --stitch-bg-blue: #f0f8ff;
  --stitch-surface: rgba(255, 255, 255, 0.64);
  --stitch-surface-strong: rgba(255, 255, 255, 0.78);
  --stitch-line: rgba(0, 102, 134, 0.095);
  --stitch-line-strong: rgba(0, 102, 134, 0.16);
  --stitch-text: #1a1c1c;
  --stitch-muted: #3f484e;
  --stitch-outline: #6f787e;
  --stitch-primary: #006686;
  --stitch-primary-soft: #7dd3fc;
  --stitch-secondary: #576065;
  --stitch-container: #eeeeee;
  --stitch-shadow: 0 8px 24px rgba(125, 211, 252, 0.095);
  --stitch-shadow-strong: 0 18px 54px rgba(78, 137, 174, 0.13);
  --stitch-radius-lg: 12px;
  --stitch-radius-xl: 18px;
  --bg-top: var(--stitch-bg);
  --bg-bottom: var(--stitch-bg-blue);
  --text: var(--stitch-text);
  --muted: var(--stitch-outline);
  --muted-strong: var(--stitch-muted);
  --accent: var(--stitch-primary);
  --accent-soft: rgba(125, 211, 252, 0.18);
  --accent-text: #ffffff;
  --surface: var(--stitch-surface);
  --surface-strong: var(--stitch-surface-strong);
  --border: var(--stitch-line);
  --border-strong: var(--stitch-line-strong);
  --shadow: var(--stitch-shadow);
}

html {
  background: linear-gradient(135deg, #ffffff 0%, var(--stitch-bg-blue) 100%);
}

body {
  color: var(--stitch-text);
  background:
    radial-gradient(circle at 18% -8%, rgba(125, 211, 252, 0.18), transparent 30%),
    radial-gradient(circle at 90% 16%, rgba(192, 200, 226, 0.16), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, var(--stitch-bg-blue) 100%);
  font-family:
    "Hanken Grotesk",
    "PingFang SC",
    "Microsoft YaHei",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  letter-spacing: -0.01em;
}

body::before {
  opacity: 0.28;
  background-image:
    radial-gradient(circle, rgba(0, 102, 134, 0.12) 1px, transparent 1.4px);
  background-size: 18px 18px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 72%);
}

body::after {
  display: none;
}

.app-shell,
.account-screen,
.entry-screen,
.dashboard-screen {
  color: var(--stitch-text);
  background: transparent;
}

.account-screen,
.entry-screen,
.dashboard-screen {
  min-height: 100dvh;
}

.dashboard-screen[hidden],
.account-screen[hidden],
.entry-screen[hidden] {
  display: none !important;
}

.entry-wrap {
  width: min(100%, 560px);
  padding: 24px;
}

.entry-appbar {
  color: var(--stitch-outline);
}

.entry-brand {
  color: var(--stitch-primary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.entry-card,
.stitch-glass-card,
.dashboard-screen .result-section,
.dashboard-screen .plate-reading-hero,
.dashboard-screen .plate-brief-card,
.share-result-card,
.stitch-accordion-item,
.stitch-frequency-card,
.dashboard-screen .fortune-card,
.sm-pretext-card {
  color: var(--stitch-text);
  border-top: 1px solid rgba(255, 255, 255, 0.72);
  border-left: 1px solid rgba(255, 255, 255, 0.72);
  border-right: 1px solid rgba(255, 255, 255, 0.24);
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  background: var(--stitch-surface);
  box-shadow: var(--stitch-shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.entry-card {
  border-radius: 22px;
  padding: 30px 24px 24px;
}

.sm-pretext-card {
  color: #263241;
  border: 1px solid rgba(58, 111, 145, 0.12);
  background:
    radial-gradient(circle at 14% 0%, rgba(125, 211, 252, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 252, 255, 0.94));
  box-shadow:
    0 16px 38px rgba(70, 103, 128, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.entry-card::before,
.entry-card::after {
  display: none;
}

.entry-kicker,
.panel-kicker,
.sm-pretext-kicker {
  color: var(--stitch-primary);
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.075em;
}

.entry-kicker::before,
.panel-kicker::before,
.sm-pretext-kicker::before {
  display: none;
}

.entry-hero-copy h1 {
  max-width: 11.5em;
  color: var(--stitch-text);
  font-size: clamp(31px, 7.8vw, 39px);
  font-weight: 300;
  line-height: 1.13;
  letter-spacing: -0.024em;
  text-shadow: none;
  text-wrap: balance;
}

.entry-hero-copy p,
.plate-reading-hero p,
.open-reading-card p,
.locked-reading-card p,
.fortune-card p,
.insight-card p,
.stitch-section-note,
.stitch-accordion-body p {
  color: var(--stitch-muted);
}

.entry-hero-copy p {
  max-width: 28em;
  font-size: 15px;
  line-height: 1.78;
}

.contact-start-panel,
.entry-screen .access-key-panel,
.entry-screen .segment-group,
.entry-screen .datetime-card,
.entry-screen .bazi-card,
.entry-screen .bazi-pillar-grid,
.lead-form,
.composer {
  border: 1px solid rgba(0, 102, 134, 0.085);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 8px 22px rgba(125, 211, 252, 0.065);
}

.contact-start-field input,
.lead-field input,
.lead-field textarea,
.entry-screen .access-key-input,
.composer-field textarea,
.location-search-input {
  color: var(--stitch-text);
  background: rgba(255, 255, 255, 0.64);
}

.contact-start-field input::placeholder,
.lead-field input::placeholder,
.lead-field textarea::placeholder,
.composer-field textarea::placeholder {
  color: rgba(63, 72, 78, 0.48);
}

.contact-start-field span,
.lead-field span,
.entry-screen .datetime-head,
.entry-screen .bazi-pillar-label,
.entry-screen .toggle-label {
  color: var(--stitch-outline);
  font-weight: 500;
}

.contact-start-button,
.primary-button,
.generate-button,
.lead-submit,
.composer-send-button,
.entry-screen .key-button-primary,
.entry-screen .key-button-copy {
  color: #ffffff;
  background: linear-gradient(180deg, #0b7ba0, var(--stitch-primary));
  box-shadow: 0 12px 26px rgba(0, 102, 134, 0.16);
}

.entry-screen .contact-start-button,
.entry-screen .primary-button,
.entry-screen .generate-button,
.entry-screen .key-button-primary,
.entry-screen .key-button-copy {
  color: #ffffff;
  background: linear-gradient(180deg, #727272, #555555);
  box-shadow: 0 12px 28px rgba(46, 46, 46, 0.16);
}

.entry-screen .contact-start-button:hover,
.entry-screen .primary-button:hover,
.entry-screen .generate-button:hover,
.entry-screen .key-button-primary:hover,
.entry-screen .key-button-copy:hover {
  filter: none;
  box-shadow: 0 16px 34px rgba(46, 46, 46, 0.2);
}

.contact-start-button:hover,
.primary-button:hover,
.generate-button:hover,
.lead-submit:hover,
.composer-send-button:hover,
.entry-screen .key-button-primary:hover,
.entry-screen .key-button-copy:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 18px 40px rgba(0, 102, 134, 0.2);
}

.entry-screen .key-button,
.ghost-button,
.prompt-chip {
  color: var(--stitch-muted);
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(0, 102, 134, 0.1);
}

.entry-screen .segment-button.active,
.selector-button.active,
.location-province-item.active,
.location-city-item.selected,
.bazi-token.active,
.gender-button.active {
  color: #333333;
  background: rgba(90, 90, 90, 0.12);
  box-shadow: inset 0 0 0 1px rgba(60, 60, 60, 0.1);
}

.wheel-item.active {
  color: var(--stitch-primary);
  text-shadow: 0 8px 24px rgba(0, 102, 134, 0.12);
}

.matrix-highlight {
  border-color: rgba(125, 211, 252, 0.44);
  background: linear-gradient(90deg, rgba(125, 211, 252, 0.08), rgba(255, 255, 255, 0.42));
}

.stitch-result-shell {
  width: min(100%, 780px);
  max-width: 780px;
  margin: 0 auto;
  padding: 42px 24px calc(120px + env(safe-area-inset-bottom));
}

.dashboard-screen .unified-panel,
.dashboard-screen .view-panel,
.stitch-result-view {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  min-height: auto;
  padding: 0;
  color: var(--stitch-text);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.stitch-topbar {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 0 2px;
}

.stitch-back-button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  padding: 0;
  color: var(--stitch-primary);
}

.stitch-topbar-copy {
  min-width: 0;
}

.stitch-topbar h3 {
  margin: 4px 0 10px;
  color: var(--stitch-text);
  font-size: clamp(29px, 8vw, 40px);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.stitch-topbar .status-chip {
  grid-column: 2;
  justify-self: start;
}

.profile-brief,
.stitch-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stitch-overview {
  padding: 0 2px;
}

.stitch-overview:empty {
  display: none;
}

.stitch-quiz-section {
  display: grid;
  gap: 16px;
  align-items: center;
}

.stitch-quiz-copy {
  display: grid;
  gap: 8px;
}

.stitch-quiz-section .stitch-section-heading {
  margin: 0;
  text-align: left;
  font-size: clamp(26px, 5vw, 32px);
}

.waitquiz-launch-button {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(0, 102, 134, 0.12);
  border-radius: 9999px;
  background: linear-gradient(180deg, #0b7ba0, var(--stitch-primary));
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 14px 28px rgba(0, 102, 134, 0.16);
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.waitquiz-launch-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(0, 102, 134, 0.2);
}

.waitquiz-launch-button:active {
  transform: translateY(0);
  opacity: 0.92;
}

.waitquiz-launch-button:focus-visible {
  outline: 2px solid rgba(11, 123, 160, 0.3);
  outline-offset: 3px;
}

@media (min-width: 768px) {
  .stitch-quiz-section {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .waitquiz-launch-button {
    width: auto;
    min-width: 164px;
    padding: 0 24px;
  }
}

.overview-pill,
.brief-pill,
.status-chip,
.prompt-chip {
  border: 1px solid rgba(0, 102, 134, 0.1);
  color: var(--stitch-muted);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
}

.dashboard-screen .result-section {
  position: relative;
  overflow: hidden;
  border-radius: var(--stitch-radius-xl);
  padding: 24px 20px;
}

.dashboard-screen .result-section::before {
  display: none;
}

.stitch-section-heading,
.stitch-frequency-card h2 {
  margin: 0 0 22px;
  color: var(--stitch-text);
  font-size: 28px;
  font-weight: 300;
  line-height: 1.2;
  text-align: center;
  letter-spacing: -0.01em;
}

.section-headline {
  color: var(--stitch-primary);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.section-headline::before {
  display: none;
}

.stitch-section-note {
  margin: 6px 0 16px;
  font-size: 14px;
  line-height: 1.7;
}

.bazi-result-board {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.bazi-table {
  min-width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.bazi-table-row {
  display: grid;
  grid-template-columns: 48px repeat(4, minmax(52px, 1fr));
  gap: 8px;
  align-items: stretch;
  border: 0;
  background: transparent !important;
}

.bazi-table-row + .bazi-table-row {
  margin-top: 12px;
}

.bazi-row-label,
.bazi-cell {
  min-height: auto;
  padding: 0;
  color: var(--stitch-muted);
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 10px;
  line-height: 1.25;
}

.bazi-row-label {
  justify-content: flex-start;
  text-align: left;
  color: var(--stitch-outline);
}

.bazi-cell {
  justify-content: center;
  text-align: center;
}

.bazi-table-row.main-row .bazi-cell {
  min-height: 48px;
  color: var(--stitch-primary);
  font-family: "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(28px, 8vw, 46px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

.bazi-table-row.stem-row .bazi-cell:nth-child(2),
.bazi-table-row.branch-row .bazi-cell:nth-child(2),
.bazi-table-row.stem-row .bazi-cell:nth-child(4) {
  color: #22c55e;
}

.bazi-table-row.stem-row .bazi-cell:nth-child(3),
.bazi-table-row.branch-row .bazi-cell:nth-child(5) {
  color: #ef4444;
}

.bazi-table-row.stem-row .bazi-cell:nth-child(5),
.bazi-table-row.branch-row .bazi-cell:nth-child(4) {
  color: #3b82f6;
}

.bazi-table-row.branch-row .bazi-cell:nth-child(2),
.bazi-table-row.branch-row .bazi-cell:nth-child(3),
.bazi-table-row.branch-row .bazi-cell:nth-child(5) {
  color: #eab308;
}

.bazi-table-row.stack-row .bazi-cell,
.bazi-table-row.shen-row .bazi-cell {
  min-height: 36px;
  color: var(--stitch-muted);
  font-size: 9px;
  line-height: 1.28;
}

.bazi-table-row.stack-row .bazi-cell span {
  display: block;
  color: inherit;
}

.bazi-table-row.muted-row .bazi-cell,
.bazi-table-row.soft-row .bazi-cell,
.bazi-table-row.fortune-state-row .bazi-cell,
.bazi-table-row.void-row .bazi-cell,
.bazi-table-row.nayin-row .bazi-cell {
  color: var(--stitch-muted);
  font-size: 10px;
  font-weight: 500;
}

.bazi-base-summary {
  min-width: 100%;
  padding-top: 18px;
  border-top: 1px solid rgba(0, 102, 134, 0.08);
}

.bazi-base-summary-head {
  display: flex;
  align-items: baseline;
  margin-bottom: 12px;
}

.bazi-base-reading {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid rgba(0, 102, 134, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.bazi-base-reading p {
  margin: 0;
  color: var(--stitch-text);
  font-size: 14px;
  line-height: 1.85;
}

.bazi-reality-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.bazi-reality-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(0, 102, 134, 0.08);
  border-radius: 8px;
  background: rgba(250, 253, 252, 0.72);
}

.bazi-reality-item strong,
.bazi-reality-item span,
.bazi-reality-item small {
  display: block;
}

.bazi-reality-item strong {
  color: var(--stitch-primary);
  font-size: 12px;
  font-weight: 600;
}

.bazi-reality-item span {
  margin-top: 6px;
  color: var(--stitch-text);
  font-size: 13px;
  line-height: 1.7;
}

.bazi-reality-item small {
  margin-top: 8px;
  color: var(--stitch-muted);
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .bazi-reality-grid {
    grid-template-columns: 1fr;
  }
}

.stitch-reading-board,
.plate-reading-board {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dashboard-screen .plate-reading-hero,
.dashboard-screen .plate-brief-card,
.share-result-card {
  border-radius: var(--stitch-radius-xl);
  padding: 22px;
}

.plate-reading-hero h4,
.share-result-card h4,
.open-reading-card h5,
.locked-reading-card h5,
.stitch-accordion-body h5,
.sm-pretext-copy h3 {
  color: var(--stitch-text);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.plate-brief-head span,
.open-reading-head span,
.share-result-top span,
.stitch-section-title em,
.stitch-accordion-title em {
  color: var(--stitch-outline);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.plate-brief-head strong,
.open-reading-head strong,
.share-result-top strong,
.stitch-accordion-status {
  color: var(--stitch-primary);
  font-weight: 500;
}

.plate-mini-tags span,
.reading-evidence-list em {
  color: var(--stitch-muted);
  border: 1px solid rgba(0, 102, 134, 0.1);
  background: rgba(255, 255, 255, 0.48);
}

.unlock-module-grid {
  display: none;
}

.stitch-accordion-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stitch-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px;
}

.stitch-reading-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
}

.stitch-section-title span {
  color: var(--stitch-primary);
  font-size: 18px;
  font-weight: 400;
}

.stitch-section-title em {
  font-style: normal;
  text-align: right;
}

.stitch-refresh-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(70, 87, 107, 0.14);
  border-radius: 999px;
  color: #667386;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 1px 2px rgba(34, 52, 72, 0.04);
  font: inherit;
  font-size: 12px;
  font-weight: 450;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 120ms ease;
}

.stitch-refresh-button::before {
  content: "↻";
  font-size: 13px;
  line-height: 1;
  opacity: 0.72;
  transform: translateY(-0.5px);
}

.stitch-refresh-button:hover {
  border-color: rgba(58, 111, 145, 0.2);
  color: var(--stitch-primary);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(34, 52, 72, 0.07);
}

.stitch-refresh-button:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 1px 4px rgba(34, 52, 72, 0.06);
}

.stitch-refresh-button:focus {
  outline: none;
}

.stitch-refresh-button:focus-visible {
  outline: 2px solid rgba(58, 111, 145, 0.22);
  outline-offset: 3px;
}

.stitch-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stitch-signal-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 8px 4px;
}

.stitch-signal-inline span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(0, 102, 134, 0.1);
  border-radius: 999px;
  color: var(--stitch-muted);
  background: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  line-height: 1;
}

.stitch-accordion-item {
  overflow: hidden;
  border-radius: var(--stitch-radius-lg);
}

.stitch-accordion-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.stitch-accordion-item summary::-webkit-details-marker {
  display: none;
}

.stitch-accordion-item summary::after {
  content: "⌄";
  color: var(--stitch-outline);
  font-size: 18px;
  line-height: 1;
  transition: transform 220ms ease;
}

.stitch-accordion-item[open] summary::after {
  transform: rotate(180deg);
}

.stitch-accordion-title {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.stitch-accordion-title strong {
  color: var(--stitch-text);
  font-size: 16px;
  font-weight: 500;
}

.stitch-accordion-status {
  margin-left: auto;
  white-space: nowrap;
  font-size: 12px;
}

.stitch-accordion-body {
  padding: 0 16px 16px;
  color: var(--stitch-muted);
  font-size: 14px;
  line-height: 1.75;
}

.stitch-accordion-body h5 {
  margin: 0 0 8px;
  font-size: 18px;
}

.stitch-accordion-body p {
  margin: 0;
}

.stitch-detail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.stitch-detail-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 14px 13px;
  border: 1px solid rgba(0, 102, 134, 0.08);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.26)),
    rgba(255, 255, 255, 0.34);
  box-shadow: 0 8px 20px rgba(125, 211, 252, 0.055);
}

.stitch-detail-item strong {
  color: #6d3d12;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.stitch-detail-item span {
  color: var(--stitch-muted);
  font-size: 14px;
  line-height: 1.78;
}

.stitch-detail-item small {
  color: rgba(63, 72, 78, 0.62);
  font-size: 11px;
  line-height: 1.45;
}

.stitch-accordion-body > .reading-evidence-list {
  margin-top: 12px;
}

.stitch-accordion-body button,
.ai-preview-refresh {
  margin-top: 14px;
  border: 1px solid rgba(0, 102, 134, 0.14);
  border-radius: 999px;
  color: var(--stitch-primary);
  background: rgba(125, 211, 252, 0.14);
}

.stitch-accordion-item.is-locked {
  background: rgba(255, 255, 255, 0.54);
}

.stitch-frequency-card {
  border-radius: var(--stitch-radius-xl);
  padding: 24px 22px 26px;
}

.stitch-radar-wrap {
  position: relative;
  width: 174px;
  height: 174px;
  margin: 6px auto 30px;
}

.stitch-radar {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.stitch-radar-grid,
.stitch-radar-axis {
  fill: none;
  stroke: rgba(0, 102, 134, 0.14);
  stroke-width: 0.8;
}

.stitch-radar-shape {
  fill: rgba(125, 211, 252, 0.18);
  stroke: var(--stitch-primary-soft);
  stroke-width: 1.55;
}

.stitch-radar-label {
  position: absolute;
  color: var(--stitch-outline);
  font-size: 10px;
  line-height: 1;
}

.stitch-radar-label-0 {
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
}

.stitch-radar-label-1 {
  top: 36%;
  right: -18px;
}

.stitch-radar-label-2 {
  right: 16%;
  bottom: -8px;
}

.stitch-radar-label-3 {
  bottom: -8px;
  left: 16%;
}

.stitch-radar-label-4 {
  top: 36%;
  left: -18px;
}

.stitch-frequency-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stitch-frequency-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stitch-frequency-row div {
  display: flex;
  justify-content: space-between;
  color: var(--stitch-text);
  font-size: 12px;
  font-weight: 500;
}

.stitch-frequency-row strong {
  color: var(--stitch-primary);
  font-weight: 500;
}

.stitch-frequency-row i {
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  background: rgba(238, 238, 238, 0.72);
}

.stitch-frequency-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--stitch-primary-soft);
}

.fortune-grid,
.lead-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-screen .fortune-card {
  border-radius: var(--stitch-radius-lg);
  padding: 18px;
}

.lead-field {
  color: var(--stitch-muted);
}

.lead-submit {
  border-radius: var(--stitch-radius-lg);
}

.stitch-chat-section {
  border-radius: var(--stitch-radius-xl);
}

.message-list {
  color: var(--stitch-text);
}

.message-bubble,
.message-item {
  border-color: rgba(0, 102, 134, 0.1);
  background: rgba(255, 255, 255, 0.58);
}

.composer {
  border-radius: var(--stitch-radius-xl);
}

.composer.composer-focused,
.lead-field input:focus,
.lead-field textarea:focus,
.contact-start-field input:focus,
.entry-screen .access-key-input:focus {
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.22), 0 10px 28px rgba(125, 211, 252, 0.1);
}

@media (min-width: 900px) {
  .stitch-result-shell {
    padding-top: 56px;
  }

  .dashboard-screen .result-section,
  .stitch-frequency-card,
  .dashboard-screen .plate-reading-hero,
  .dashboard-screen .plate-brief-card,
  .share-result-card {
    padding: 32px;
  }
}

@media (max-width: 720px) {
  .entry-screen,
  .dashboard-screen {
    background:
      radial-gradient(circle at 50% -6%, rgba(125, 211, 252, 0.22), transparent 34%),
      linear-gradient(135deg, #ffffff 0%, var(--stitch-bg-blue) 100%);
  }

  .entry-wrap,
  .stitch-result-shell {
    padding-inline: 20px;
  }

  .entry-card {
    border-radius: 18px;
    padding: 22px;
  }

  .entry-hero-copy h1 {
    font-size: clamp(30px, 8.5vw, 36px);
  }

  .dashboard-screen .result-section {
    border-radius: 14px;
    padding: 18px;
  }

  .stitch-topbar {
    grid-template-columns: auto 1fr;
  }

  .stitch-topbar .status-chip {
    grid-column: 1 / -1;
  }

  .stitch-section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .stitch-section-title em {
    text-align: left;
  }

  .bazi-table-row {
    grid-template-columns: 42px repeat(4, minmax(46px, 1fr));
    gap: 6px;
  }

  .bazi-table-row + .bazi-table-row {
    margin-top: 10px;
  }

  .bazi-table-row.main-row .bazi-cell {
    min-height: 42px;
    font-size: 30px;
  }

  .bazi-base-summary-head {
    align-items: baseline;
  }

  .stitch-accordion-item summary {
    padding: 14px;
  }

  .stitch-accordion-status {
    display: none;
  }
}

/* Entry final alignment: no marketing copy, no warm/gold tint. */
.entry-screen {
  background:
    radial-gradient(circle at 50% -8%, rgba(125, 211, 252, 0.18), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(192, 200, 226, 0.12), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #eef8ff 100%) !important;
}

.entry-screen .entry-wrap {
  width: min(100%, 520px);
}

.entry-screen .entry-card,
.entry-screen .entry-card-glass {
  padding-top: 24px;
  border-color: rgba(0, 102, 134, 0.08) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.5)),
    rgba(247, 252, 255, 0.66) !important;
  box-shadow: 0 16px 48px rgba(78, 137, 174, 0.12) !important;
}

.entry-screen .entry-hero-copy,
.entry-screen .entry-kicker {
  display: none !important;
}

.entry-screen .contact-start-panel,
.entry-screen .access-restore-panel,
.entry-screen .segment-group,
.entry-screen .datetime-card,
.entry-screen .bazi-card,
.entry-screen .bazi-pillar-grid,
.entry-screen .solar-place-row,
.entry-screen .location-trigger,
.entry-screen .entry-disclaimer {
  border-color: rgba(0, 102, 134, 0.085) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.36)),
    rgba(248, 252, 255, 0.5) !important;
  box-shadow: 0 8px 22px rgba(125, 211, 252, 0.06) !important;
}

.entry-screen .contact-start-button,
.entry-screen .primary-button,
.entry-screen .generate-button,
.entry-screen .key-button-primary,
.entry-screen .key-button-copy {
  color: #ffffff !important;
  background: linear-gradient(180deg, #747b82, #555b61) !important;
  box-shadow: 0 12px 28px rgba(64, 72, 79, 0.16) !important;
}

.entry-screen .segment-button.active,
.entry-screen .selector-button.active,
.entry-screen .location-province-item.active,
.entry-screen .location-city-item.selected,
.entry-screen .bazi-token.active,
.entry-screen .gender-button.active {
  color: #2f353a !important;
  background: rgba(78, 137, 174, 0.12) !important;
  box-shadow: inset 0 0 0 1px rgba(78, 137, 174, 0.12) !important;
}

.entry-screen .matrix-highlight {
  border-color: rgba(78, 137, 174, 0.14) !important;
  background: linear-gradient(90deg, rgba(125, 211, 252, 0.08), rgba(255, 255, 255, 0.44), rgba(125, 211, 252, 0.08)) !important;
}

.entry-screen .wheel-stage::before,
.entry-screen .wheel-stage::after {
  background: linear-gradient(180deg, rgba(248, 252, 255, 0.94), rgba(248, 252, 255, 0)) !important;
}

.entry-screen .wheel-stage::after {
  background: linear-gradient(0deg, rgba(248, 252, 255, 0.94), rgba(248, 252, 255, 0)) !important;
}

.entry-screen button,
.entry-screen input,
.entry-screen textarea,
.entry-screen summary,
.entry-screen [role="button"],
.entry-screen .wheel-picker,
.entry-screen .location-trigger {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

.entry-screen button,
.entry-screen .segment-button,
.entry-screen .bazi-token,
.entry-screen .selector-button,
.entry-screen .location-trigger,
.entry-screen .location-province-item,
.entry-screen .location-city-item,
.entry-screen .solar-switch {
  overflow: hidden;
}

.entry-screen button:focus,
.entry-screen input:focus,
.entry-screen textarea:focus,
.entry-screen .wheel-picker:focus,
.entry-screen .location-trigger:focus {
  outline: none !important;
}

.entry-screen button:focus:not(:focus-visible),
.entry-screen input:focus:not(:focus-visible),
.entry-screen textarea:focus:not(:focus-visible),
.entry-screen .wheel-picker:focus:not(:focus-visible),
.entry-screen .location-trigger:focus:not(:focus-visible) {
  outline: none !important;
}

.entry-screen .segment-button:focus-visible,
.entry-screen .selector-button:focus-visible,
.entry-screen .bazi-token:focus-visible,
.entry-screen .location-province-item:focus-visible,
.entry-screen .location-city-item:focus-visible {
  outline: none !important;
  box-shadow: inset 0 0 0 1px rgba(78, 137, 174, 0.14), 0 0 0 3px rgba(78, 137, 174, 0.12) !important;
}

.entry-screen .contact-start-button:focus-visible,
.entry-screen .primary-button:focus-visible,
.entry-screen .generate-button:focus-visible,
.entry-screen .key-button:focus-visible,
.entry-screen .location-trigger:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(78, 137, 174, 0.14), 0 12px 28px rgba(64, 72, 79, 0.12) !important;
}

.entry-screen .segment-button:active,
.entry-screen .selector-button:active,
.entry-screen .bazi-token:active,
.entry-screen .location-province-item:active,
.entry-screen .location-city-item:active {
  transform: scale(0.985);
  box-shadow: inset 0 0 0 1px rgba(78, 137, 174, 0.12) !important;
}

/* Entry press polish: tactile feedback without black square shadows. */
.entry-screen {
  --entry-press-line: rgba(78, 137, 174, 0.16);
  --entry-press-fill: rgba(78, 137, 174, 0.14);
  --entry-press-fill-strong: rgba(78, 137, 174, 0.18);
  --entry-press-inner: inset 0 2px 8px rgba(78, 137, 174, 0.14);
  --entry-button-shadow: 0 8px 20px rgba(78, 137, 174, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.entry-screen button,
.entry-screen .segment-button,
.entry-screen .selector-button,
.entry-screen .bazi-token,
.entry-screen .location-trigger,
.entry-screen .location-province-item,
.entry-screen .location-city-item,
.entry-screen .solar-switch {
  touch-action: manipulation;
  user-select: none;
  transition:
    transform 140ms cubic-bezier(0.2, 0.8, 0.2, 1),
    background 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.entry-screen .contact-start-button,
.entry-screen .primary-button,
.entry-screen .generate-button,
.entry-screen .key-button-primary,
.entry-screen .key-button-copy {
  background: linear-gradient(180deg, #79838a, #626b72) !important;
  box-shadow: var(--entry-button-shadow) !important;
}

.entry-screen .contact-start-button:active,
.entry-screen .primary-button:active,
.entry-screen .generate-button:active,
.entry-screen .key-button-primary:active,
.entry-screen .key-button-copy:active {
  transform: translateY(1px) scale(0.992) !important;
  background: linear-gradient(180deg, #68727a, #5c656c) !important;
  box-shadow:
    inset 0 2px 9px rgba(78, 137, 174, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
}

.entry-screen .segment-button.active,
.entry-screen .selector-button.active,
.entry-screen .location-province-item.active,
.entry-screen .location-city-item.selected,
.entry-screen .bazi-token.active,
.entry-screen .gender-button.active {
  border-color: var(--entry-press-line) !important;
  background: linear-gradient(180deg, rgba(78, 137, 174, 0.14), rgba(78, 137, 174, 0.08)) !important;
  box-shadow: inset 0 0 0 1px rgba(78, 137, 174, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.36) !important;
}

.entry-screen .segment-button:active,
.entry-screen .selector-button:active,
.entry-screen .bazi-token:active,
.entry-screen .location-province-item:active,
.entry-screen .location-city-item:active,
.entry-screen .gender-button:active {
  transform: translateY(1px) scale(0.992) !important;
  background: var(--entry-press-fill-strong) !important;
  box-shadow: var(--entry-press-inner), inset 0 0 0 1px var(--entry-press-line) !important;
}

.entry-screen .solar-switch {
  box-shadow: inset 0 0 0 1px rgba(78, 137, 174, 0.12), inset 0 2px 8px rgba(78, 137, 174, 0.1) !important;
}

.entry-screen .solar-switch::after {
  box-shadow: 0 4px 10px rgba(78, 137, 174, 0.18) !important;
}

.entry-screen .solar-inline:active .solar-switch {
  transform: translateY(1px);
  box-shadow: inset 0 2px 9px rgba(78, 137, 174, 0.16), inset 0 0 0 1px rgba(78, 137, 174, 0.14) !important;
}

/* Bazi known-pillar candidates: quiet range and time choice. */
.entry-screen .bazi-range-row {
  display: grid;
  grid-template-columns: auto minmax(132px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.bazi-range-label {
  color: #667386;
  font-size: 12px;
  font-weight: 520;
  line-height: 1;
}

.bazi-candidate-list {
  display: grid;
  gap: 8px;
}

.bazi-candidate-card,
.bazi-candidate-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: 12px;
  row-gap: 4px;
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid rgba(70, 87, 107, 0.1);
  border-radius: 16px;
  color: #303a44;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.46)),
    rgba(248, 252, 255, 0.56);
  box-shadow: 0 8px 22px rgba(125, 211, 252, 0.06);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 140ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.bazi-candidate-card span {
  color: #8a96a6;
  font-size: 12px;
  font-weight: 480;
}

.bazi-candidate-card strong,
.bazi-candidate-card em {
  min-width: 0;
  color: #303a44;
  font-style: normal;
  font-size: 15px;
  font-weight: 520;
  line-height: 1.35;
}

.bazi-candidate-card em {
  color: #667386;
  font-weight: 440;
}

.bazi-candidate-card.active {
  border-color: rgba(58, 111, 145, 0.24);
  background:
    linear-gradient(180deg, rgba(78, 137, 174, 0.12), rgba(78, 137, 174, 0.06)),
    rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(78, 137, 174, 0.12), 0 10px 24px rgba(78, 137, 174, 0.08);
}

.bazi-candidate-card:active {
  transform: translateY(1px) scale(0.992);
}

.bazi-candidate-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a96a6;
  font-size: 13px;
  cursor: default;
}

.dashboard-screen .bazi-table-row.main-row .bazi-cell {
  color: #356f8a;
  font-weight: 520;
}

.dashboard-screen .bazi-main-token {
  filter: saturate(0.9);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.dashboard-screen .bazi-main-token.tone-wood {
  color: #2f9f7a;
}

.dashboard-screen .bazi-main-token.tone-fire {
  color: #d56f69;
}

.dashboard-screen .bazi-main-token.tone-earth {
  color: #8f8576;
}

.dashboard-screen .bazi-main-token.tone-metal {
  color: #70869e;
}

.dashboard-screen .bazi-main-token.tone-water {
  color: #457fb5;
}

.dashboard-screen .bazi-main-token.tone-default {
  color: #356f8a;
}

.fortune-ai-note {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 102, 134, 0.1);
}

.fortune-ai-note em {
  color: var(--stitch-outline);
  font-style: normal;
  font-size: 12px;
}

.fortune-ai-note p {
  margin: 0;
}

/* Wuxing color truth: wood green, fire red, earth ochre, metal gold, water blue. */
:root {
  --wuxing-wood: #10c878;
  --wuxing-fire: #ff4f55;
  --wuxing-earth: #d98a22;
  --wuxing-metal: #e2ba25;
  --wuxing-water: #1597f2;
  --wuxing-default: #425466;
}

.tone-wood,
.selector-button.stem-wood,
.entry-screen .bazi-token.tone-wood,
.dashboard-screen .bazi-main-token.tone-wood {
  color: var(--wuxing-wood) !important;
}

.tone-fire,
.selector-button.stem-fire,
.entry-screen .bazi-token.tone-fire,
.dashboard-screen .bazi-main-token.tone-fire {
  color: var(--wuxing-fire) !important;
}

.tone-earth,
.selector-button.stem-earth,
.entry-screen .bazi-token.tone-earth,
.dashboard-screen .bazi-main-token.tone-earth {
  color: var(--wuxing-earth) !important;
}

.tone-metal,
.selector-button.stem-metal,
.entry-screen .bazi-token.tone-metal,
.dashboard-screen .bazi-main-token.tone-metal {
  color: var(--wuxing-metal) !important;
}

.tone-water,
.selector-button.stem-water,
.entry-screen .bazi-token.tone-water,
.dashboard-screen .bazi-main-token.tone-water {
  color: var(--wuxing-water) !important;
}

.tone-default,
.entry-screen .bazi-token.tone-default,
.dashboard-screen .bazi-main-token.tone-default {
  color: var(--wuxing-default) !important;
}

.selector-pair-main span {
  display: inline-block;
}

.entry-screen .bazi-token.filled,
.selector-pair-main,
.dashboard-screen .bazi-main-token {
  font-weight: 620;
}

.dashboard-screen .bazi-main-token {
  filter: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.58);
}

/* Mobile wheel fix: keep four-digit years from being clipped. */
.entry-screen .datetime-head-5,
.entry-screen .wheel-stage-5 {
  grid-template-columns: minmax(84px, 1.58fr) repeat(4, minmax(42px, 1fr)) !important;
  gap: 6px;
}

.entry-screen #solarYearWheel .wheel-item,
.entry-screen #lunarYearWheel .wheel-item {
  padding-inline: 2px;
  letter-spacing: -0.035em;
}

@media (max-width: 420px) {
  .entry-screen .datetime-head-5,
  .entry-screen .wheel-stage-5 {
    grid-template-columns: minmax(82px, 1.72fr) repeat(4, minmax(38px, 0.92fr)) !important;
    gap: 4px;
    padding-inline: 2px;
  }
}

@media (max-width: 520px) {
  .entry-screen .bazi-range-row {
    grid-template-columns: auto 1fr;
  }

  .entry-screen .bazi-range-row .ghost-inline-button {
    grid-column: 1 / -1;
  }
}

/* Mobile birth information flow: preserve calculation controls, improve hierarchy and touch use. */
.entry-screen {
  align-items: flex-start !important;
  padding: max(18px, env(safe-area-inset-top)) 12px max(28px, env(safe-area-inset-bottom)) !important;
  background: linear-gradient(180deg, #f5f7fa 0%, #eef2f5 100%) !important;
}

.entry-screen::before {
  display: none !important;
}

.entry-screen .entry-wrap {
  width: min(100%, 430px) !important;
  margin: 0 auto !important;
}

.entry-screen .entry-appbar {
  padding: 8px 4px 14px !important;
  text-align: left !important;
}

.entry-screen .entry-brand {
  color: #394651 !important;
  font-size: 13px !important;
  font-weight: 720 !important;
}

.entry-screen .entry-card,
.entry-screen .entry-card-glass {
  gap: 18px !important;
  padding: 20px 16px 18px !important;
  border: 1px solid rgba(38, 52, 64, 0.07) !important;
  border-radius: 28px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 20px 55px rgba(39, 55, 68, 0.1) !important;
  backdrop-filter: none !important;
}

.birth-entry-intro {
  display: grid;
  gap: 13px;
  padding: 2px 3px 0;
}

.birth-entry-step {
  display: flex;
  align-items: center;
  width: 82px;
}

.birth-entry-step span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2f7087;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.birth-entry-step span:last-child {
  background: #e7edf0;
  color: #84919a;
}

.birth-entry-step i {
  flex: 1;
  height: 2px;
  background: #d8e1e5;
}

.birth-entry-kicker {
  color: #2f7087;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
}

.birth-entry-intro h1 {
  margin: 5px 0 0;
  color: #202a33;
  font-size: 25px;
  line-height: 1.28;
}

.birth-entry-intro p {
  margin: 7px 0 0;
  color: #75818b;
  font-size: 13px;
  line-height: 1.65;
}

.entry-screen .mode-row {
  display: grid !important;
  gap: 9px !important;
}

.entry-field-label,
.entry-section-title span {
  color: #4a5660;
  font-size: 13px;
  font-weight: 730;
}

.entry-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.entry-section-title em {
  color: #98a1a9;
  font-size: 11px;
  font-style: normal;
}

.entry-screen .mode-panels {
  gap: 10px !important;
}

.entry-screen .segment-group {
  min-height: 50px !important;
  padding: 4px !important;
  border: 0 !important;
  border-radius: 16px !important;
  background: #f1f4f6 !important;
  box-shadow: none !important;
}

.entry-screen .segment-button {
  min-height: 42px !important;
  border-radius: 13px !important;
  color: #7b8690 !important;
  font-size: 14px !important;
  font-weight: 680 !important;
}

.entry-screen .segment-button.active {
  color: #26323b !important;
  background: #fff !important;
  box-shadow: 0 5px 14px rgba(42, 58, 70, 0.09) !important;
}

.entry-screen .datetime-card,
.entry-screen .bazi-card {
  padding: 13px 10px 10px !important;
  border: 1px solid rgba(40, 55, 67, 0.07) !important;
  border-radius: 20px !important;
  background: #f7f9fa !important;
  box-shadow: none !important;
}

.entry-screen .datetime-head {
  padding: 0 8px 8px !important;
  color: #7d8992 !important;
  font-size: 11px !important;
}

.entry-screen .wheel-stage {
  min-height: 178px !important;
  border-radius: 17px !important;
  background: #eef2f4 !important;
}

.entry-screen .matrix-highlight {
  right: 5px !important;
  left: 5px !important;
  height: 54px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 7px 18px rgba(45, 61, 73, 0.08) !important;
}

.entry-screen .wheel-stage::before {
  background: linear-gradient(180deg, #eef2f4 18%, rgba(238, 242, 244, 0)) !important;
}

.entry-screen .wheel-stage::after {
  background: linear-gradient(0deg, #eef2f4 18%, rgba(238, 242, 244, 0)) !important;
}

.entry-screen .wheel-item {
  color: rgba(99, 111, 121, 0.25) !important;
  font-size: 18px !important;
}

.entry-screen .wheel-item.active {
  color: #44515c !important;
  font-size: 23px !important;
  font-weight: 780 !important;
  transform: none !important;
}

.entry-screen #genderGroup {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.entry-screen .toggle-row {
  min-height: 58px !important;
  padding: 5px 3px !important;
}

.true-solar-copy {
  display: grid;
  gap: 3px;
}

.true-solar-copy small {
  color: #9aa3aa;
  font-size: 11px;
}

.entry-screen .solar-switch {
  width: 50px !important;
  height: 30px !important;
}

.entry-screen .solar-switch::after {
  width: 24px !important;
  height: 24px !important;
}

.entry-action-copy {
  margin-bottom: -9px;
  color: #9aa3aa;
  font-size: 10px;
  text-align: center;
}

.entry-screen .primary-button,
.entry-screen .generate-button {
  position: sticky;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 5;
  min-height: 56px !important;
  height: 56px !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, #315f72, #2f7f91) !important;
  box-shadow: 0 14px 28px rgba(47, 112, 135, 0.24) !important;
}

@media (max-width: 380px) {
  .entry-screen .entry-card,
  .entry-screen .entry-card-glass {
    padding-inline: 13px !important;
  }

  .birth-entry-intro h1 {
    font-size: 23px;
  }

  .entry-screen .wheel-item.active {
    font-size: 21px !important;
  }
}

@media (max-width: 520px) {
  .sm-pretext-card {
    padding: 16px;
  }

  .sm-pretext-copy {
    margin-bottom: 14px;
  }

  .sm-pretext-source,
  .sm-pretext-zone-drop {
    gap: 9px;
  }
}

/* Final birth-entry override. Keep this block last. */
.entry-screen {
  align-items: flex-start !important;
  padding: max(18px, env(safe-area-inset-top)) 12px max(30px, env(safe-area-inset-bottom)) !important;
  background: linear-gradient(180deg, #f6f8fa 0%, #edf1f4 100%) !important;
}

.entry-screen::before {
  display: none !important;
}

.entry-screen .entry-wrap {
  width: min(100%, 430px) !important;
  margin: 0 auto !important;
}

.entry-screen .entry-appbar {
  padding: 8px 4px 14px !important;
  text-align: left !important;
}

.entry-screen .entry-brand {
  color: #3d4b56 !important;
  font-size: 13px !important;
  font-weight: 750 !important;
}

.entry-screen .entry-card,
.entry-screen .entry-card-glass {
  gap: 18px !important;
  padding: 20px 16px 18px !important;
  border: 1px solid rgba(38, 52, 64, 0.07) !important;
  border-radius: 28px !important;
  background: #ffffff !important;
  box-shadow: 0 20px 55px rgba(39, 55, 68, 0.11) !important;
  backdrop-filter: none !important;
}

.birth-entry-intro {
  display: grid !important;
  gap: 13px !important;
  padding: 2px 3px 0 !important;
}

.birth-entry-intro h1 {
  margin: 5px 0 0 !important;
  color: #202a33 !important;
  font-size: 25px !important;
  line-height: 1.28 !important;
}

.birth-entry-intro p {
  margin: 7px 0 0 !important;
  color: #75818b !important;
  font-size: 13px !important;
  line-height: 1.65 !important;
}

.birth-entry-step {
  display: flex !important;
  align-items: center !important;
  width: 82px !important;
}

.birth-entry-step span {
  display: grid !important;
  place-items: center !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  background: #2f7087 !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

.birth-entry-step span:last-child {
  background: #e7edf0 !important;
  color: #84919a !important;
}

.birth-entry-step i {
  flex: 1 !important;
  height: 2px !important;
  background: #d8e1e5 !important;
}

.birth-entry-kicker {
  color: #2f7087 !important;
  font-size: 12px !important;
  font-weight: 760 !important;
  letter-spacing: 0.08em !important;
}

.entry-screen .mode-row {
  display: grid !important;
  gap: 9px !important;
  margin: 0 !important;
}

.entry-field-label,
.entry-section-title span {
  color: #4a5660 !important;
  font-size: 13px !important;
  font-weight: 730 !important;
}

.entry-section-title {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 0 2px !important;
}

.entry-section-title em {
  color: #98a1a9 !important;
  font-size: 11px !important;
  font-style: normal !important;
}

.entry-screen .mode-panels {
  display: grid !important;
  gap: 10px !important;
}

.entry-screen .segment-group {
  min-height: 50px !important;
  padding: 4px !important;
  border: 0 !important;
  border-radius: 16px !important;
  background: #f0f3f5 !important;
  box-shadow: none !important;
}

.entry-screen .segment-button,
.entry-screen .gender-button {
  min-height: 42px !important;
  border: 0 !important;
  border-radius: 13px !important;
  color: #7b8690 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 680 !important;
}

.entry-screen .segment-button.active,
.entry-screen .gender-button.active {
  color: #26323b !important;
  background: #ffffff !important;
  box-shadow: 0 5px 14px rgba(42, 58, 70, 0.1) !important;
}

.entry-screen .datetime-card,
.entry-screen .bazi-card {
  padding: 13px 10px 10px !important;
  border: 1px solid rgba(40, 55, 67, 0.07) !important;
  border-radius: 20px !important;
  background: #f7f9fa !important;
  box-shadow: none !important;
}

.entry-screen .datetime-head {
  padding: 0 8px 8px !important;
  color: #7d8992 !important;
  font-size: 11px !important;
}

.entry-screen .wheel-stage {
  min-height: 178px !important;
  border: 0 !important;
  border-radius: 17px !important;
  background: #eef2f4 !important;
  box-shadow: none !important;
}

.entry-screen .matrix-highlight {
  right: 5px !important;
  left: 5px !important;
  height: 54px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  box-shadow: 0 7px 18px rgba(45, 61, 73, 0.09) !important;
}

.entry-screen .wheel-stage::before {
  background: linear-gradient(180deg, #eef2f4 18%, rgba(238, 242, 244, 0)) !important;
}

.entry-screen .wheel-stage::after {
  background: linear-gradient(0deg, #eef2f4 18%, rgba(238, 242, 244, 0)) !important;
}

.entry-screen .wheel-item {
  color: rgba(99, 111, 121, 0.25) !important;
  font-size: 18px !important;
  font-weight: 580 !important;
}

.entry-screen .wheel-item.active {
  color: #44515c !important;
  font-size: 23px !important;
  font-weight: 780 !important;
  transform: none !important;
}

.entry-screen .toggle-row {
  min-height: 58px !important;
  margin: 0 !important;
  padding: 5px 3px !important;
}

.true-solar-copy {
  display: grid !important;
  gap: 3px !important;
}

.true-solar-copy small {
  color: #9aa3aa !important;
  font-size: 11px !important;
}

.entry-screen .solar-switch {
  width: 50px !important;
  height: 30px !important;
  background: #d0d7dc !important;
}

.entry-screen .solar-switch::after {
  width: 24px !important;
  height: 24px !important;
}

.entry-action-copy {
  margin-bottom: -9px !important;
  color: #9aa3aa !important;
  font-size: 10px !important;
  text-align: center !important;
}

.entry-screen .primary-button,
.entry-screen .generate-button {
  position: sticky !important;
  bottom: max(10px, env(safe-area-inset-bottom)) !important;
  z-index: 5 !important;
  min-height: 56px !important;
  height: 56px !important;
  margin-top: 2px !important;
  border-radius: 18px !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #315f72, #2f7f91) !important;
  box-shadow: 0 14px 28px rgba(47, 112, 135, 0.24) !important;
  font-size: 16px !important;
  font-weight: 760 !important;
}

.entry-screen .primary-button:hover,
.entry-screen .generate-button:hover {
  background: linear-gradient(135deg, #315f72, #2f7f91) !important;
}

@media (max-width: 380px) {
  .entry-screen .entry-card,
  .entry-screen .entry-card-glass {
    padding-inline: 13px !important;
  }

  .birth-entry-intro h1 {
    font-size: 23px !important;
  }

  .entry-screen .wheel-item.active {
    font-size: 21px !important;
  }
}

/* Location picker: light inline panel with reliable mobile scrolling. */
.entry-screen .entry-card {
  overflow: visible;
}

.entry-screen .location-picker {
  isolation: isolate;
}

.entry-screen .location-trigger.open {
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(247, 252, 255, 0.5)),
    rgba(255, 255, 255, 0.62) !important;
}

.entry-screen .location-dropdown {
  position: static;
  z-index: 20;
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  border: 1px solid rgba(0, 102, 134, 0.09);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 251, 255, 0.92)),
    #ffffff;
  box-shadow: 0 14px 34px rgba(78, 137, 174, 0.12);
  overflow: hidden;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.entry-screen .location-search-wrap {
  padding: 10px;
  border-bottom: 1px solid rgba(0, 102, 134, 0.08);
  background: rgba(248, 252, 255, 0.74);
}

.entry-screen .location-search-input {
  color: #263241;
  background: rgba(224, 234, 242, 0.72);
  box-shadow: inset 0 0 0 1px rgba(78, 137, 174, 0.08);
}

.entry-screen .location-search-input::placeholder {
  color: rgba(73, 85, 99, 0.56);
}

.entry-screen .location-columns {
  height: min(360px, 48dvh);
  min-height: 248px;
  background: rgba(255, 255, 255, 0.72);
}

.entry-screen .location-province-list,
.entry-screen .location-city-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 6px 0 16px;
  background: transparent;
}

.entry-screen .location-province-list {
  border-right: 1px solid rgba(0, 102, 134, 0.08);
  background: rgba(238, 247, 252, 0.44);
}

.entry-screen .location-province-list::-webkit-scrollbar,
.entry-screen .location-city-list::-webkit-scrollbar {
  width: 4px;
}

.entry-screen .location-province-list::-webkit-scrollbar-thumb,
.entry-screen .location-city-list::-webkit-scrollbar-thumb {
  background: rgba(78, 137, 174, 0.24);
  border-radius: 999px;
}

.entry-screen .location-province-item,
.entry-screen .location-city-item {
  color: #3f484e;
  background: transparent;
  overflow: visible;
}

.entry-screen .location-province-item:hover,
.entry-screen .location-city-item:hover {
  color: #263241;
  background: rgba(78, 137, 174, 0.08);
}

.entry-screen .location-province-item.active,
.entry-screen .location-city-item.selected {
  color: #263241 !important;
  background: rgba(78, 137, 174, 0.14) !important;
  box-shadow: inset 0 0 0 1px rgba(78, 137, 174, 0.12) !important;
}

.entry-screen .location-city-item strong {
  color: #1f2933;
  font-weight: 560;
}

.entry-screen .location-city-item span,
.entry-screen .location-empty-hint {
  color: #667386;
}

@media (max-width: 520px) {
  .entry-screen {
    align-items: start;
  }

  .entry-screen .location-dropdown {
    max-height: none;
  }

  .entry-screen .location-columns {
    grid-template-columns: 112px 1fr;
    height: min(330px, 42dvh);
    min-height: 230px;
  }

  .entry-screen .location-province-item,
  .entry-screen .location-city-item {
    min-height: 48px;
  }
}

/* Entry neutral sync: align the filter form with the minimalist Stitch opening screen. */
.entry-screen {
  --entry-neutral-bg: #f8f9fb;
  --entry-neutral-panel: rgba(255, 255, 255, 0.82);
  --entry-neutral-soft: #f1f3f5;
  --entry-neutral-soft-2: #eef1f3;
  --entry-neutral-line: rgba(31, 41, 55, 0.08);
  --entry-neutral-line-strong: rgba(31, 41, 55, 0.13);
  --entry-neutral-text: #22282f;
  --entry-neutral-muted: #7a838c;
  --entry-neutral-faint: #a8afb7;
  --entry-neutral-action: #747c84;
  --entry-neutral-action-deep: #626b72;
  align-items: center !important;
  padding: 28px 16px 40px !important;
  background:
    radial-gradient(circle at 50% 18%, rgba(31, 41, 55, 0.045), transparent 32%),
    linear-gradient(180deg, #fbfcfd 0%, var(--entry-neutral-bg) 100%) !important;
}

.entry-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(31, 41, 55, 0.11) 1px, transparent 1.4px);
  background-size: 18px 18px;
  opacity: 0.16;
  mask-image: linear-gradient(90deg, #000 0 14%, transparent 23% 77%, #000 86% 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 0 14%, transparent 23% 77%, #000 86% 100%);
}

.entry-screen .entry-wrap {
  width: min(100%, 430px) !important;
}

.entry-screen .entry-appbar {
  padding: calc(env(safe-area-inset-top) + 4px) 0 16px !important;
}

.entry-screen .entry-brand {
  color: #58636d !important;
  font-size: 13px !important;
  font-weight: 560 !important;
  letter-spacing: 0.02em !important;
}

.entry-screen .entry-card,
.entry-screen .entry-card-glass {
  display: grid !important;
  gap: 14px !important;
  padding: 24px 22px !important;
  border: 1px solid var(--entry-neutral-line) !important;
  border-radius: 24px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 251, 0.78)),
    var(--entry-neutral-panel) !important;
  box-shadow:
    0 22px 70px rgba(30, 41, 59, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.entry-screen .contact-start-panel,
.entry-screen .datetime-card,
.entry-screen .bazi-card,
.entry-screen .solar-place-row,
.entry-screen .location-trigger,
.entry-screen .location-dropdown {
  border: 1px solid var(--entry-neutral-line) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(246, 247, 249, 0.6)),
    rgba(255, 255, 255, 0.64) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
}

.entry-screen .contact-start-panel {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: center !important;
  padding: 12px 12px 12px 18px !important;
  border-radius: 28px !important;
}

.entry-screen .contact-start-field {
  min-width: 0;
}

.entry-screen .contact-start-field span,
.entry-screen .datetime-head,
.entry-screen .bazi-pillar-label,
.entry-screen .toggle-label,
.entry-screen .panel-toolbar-note,
.entry-screen .bazi-range-label {
  color: var(--entry-neutral-muted) !important;
  font-weight: 520 !important;
  letter-spacing: 0 !important;
}

.entry-screen .contact-start-field input,
.entry-screen .access-key-input,
.entry-screen .location-search-input {
  color: var(--entry-neutral-text) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.entry-screen .contact-start-field input::placeholder,
.entry-screen .access-key-input::placeholder,
.entry-screen .location-search-input::placeholder {
  color: var(--entry-neutral-faint) !important;
}

.entry-screen .contact-start-button,
.entry-screen .primary-button,
.entry-screen .generate-button,
.entry-screen .key-button-primary,
.entry-screen .key-button-copy {
  color: #ffffff !important;
  border: 0 !important;
  background: linear-gradient(180deg, var(--entry-neutral-action), var(--entry-neutral-action-deep)) !important;
  box-shadow:
    0 10px 24px rgba(31, 41, 55, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

.entry-screen .contact-start-button {
  min-width: 96px !important;
  height: 48px !important;
  padding: 0 18px !important;
  border-radius: 20px !important;
  font-size: 15px !important;
}

.entry-screen .primary-button,
.entry-screen .generate-button {
  height: 56px !important;
  margin-top: 2px !important;
  border-radius: 28px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

.entry-screen .access-restore-panel {
  padding: 2px 14px 6px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.entry-screen .access-restore-panel summary {
  color: #59636d !important;
  font-size: 13px !important;
  font-weight: 520 !important;
}

.entry-screen .access-key-hint {
  min-height: 0 !important;
  margin: -8px 4px 0 !important;
  color: var(--entry-neutral-muted) !important;
}

.entry-screen .mode-row {
  margin: 0 !important;
}

.entry-screen .mode-panels {
  display: grid !important;
  gap: 12px !important;
}

.entry-screen .segment-group {
  padding: 4px !important;
  border: 1px solid var(--entry-neutral-line) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.58) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
}

.entry-screen .segment-button,
.entry-screen .gender-button {
  min-height: 42px !important;
  color: #646d76 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
  font-weight: 620 !important;
}

.entry-screen .segment-button.active,
.entry-screen .gender-button.active,
.entry-screen .selector-button.active,
.entry-screen .location-province-item.active,
.entry-screen .location-city-item.selected {
  color: var(--entry-neutral-text) !important;
  border-color: transparent !important;
  background: linear-gradient(180deg, #eef0f2, #e5e8eb) !important;
  box-shadow:
    0 8px 18px rgba(31, 41, 55, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
}

.entry-screen .segment-button:focus-visible,
.entry-screen .selector-button:focus-visible,
.entry-screen .bazi-token:focus-visible,
.entry-screen .location-province-item:focus-visible,
.entry-screen .location-city-item:focus-visible,
.entry-screen .contact-start-button:focus-visible,
.entry-screen .primary-button:focus-visible,
.entry-screen .generate-button:focus-visible,
.entry-screen .key-button:focus-visible,
.entry-screen .location-trigger:focus-visible {
  outline: none !important;
  box-shadow:
    0 0 0 3px rgba(31, 41, 55, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.74) !important;
}

.entry-screen .contact-start-button:hover,
.entry-screen .primary-button:hover,
.entry-screen .generate-button:hover,
.entry-screen .key-button-primary:hover,
.entry-screen .key-button-copy:hover {
  background: linear-gradient(180deg, #7b838b, #666f77) !important;
  box-shadow:
    0 12px 28px rgba(31, 41, 55, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.entry-screen .segment-button:active,
.entry-screen .selector-button:active,
.entry-screen .bazi-token:active,
.entry-screen .location-province-item:active,
.entry-screen .location-city-item:active,
.entry-screen .gender-button:active {
  background: #e1e5e8 !important;
  box-shadow: inset 0 2px 8px rgba(31, 41, 55, 0.08) !important;
}

.entry-screen .datetime-card,
.entry-screen .bazi-card {
  padding: 16px 14px !important;
  border-radius: 24px !important;
}

.entry-screen .datetime-head {
  padding-inline: 8px !important;
}

.entry-screen .wheel-stage {
  min-height: 170px !important;
  border: 0 !important;
  border-radius: 22px !important;
  overflow: hidden !important;
  background:
    linear-gradient(180deg, rgba(244, 246, 248, 0.82), rgba(238, 241, 244, 0.82)),
    #f2f4f6 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
}

.entry-screen .wheel-stage::before,
.entry-screen .wheel-stage::after {
  right: 0 !important;
  left: 0 !important;
  background: linear-gradient(180deg, rgba(242, 244, 246, 0.96), rgba(242, 244, 246, 0)) !important;
}

.entry-screen .wheel-stage::after {
  background: linear-gradient(0deg, rgba(242, 244, 246, 0.96), rgba(242, 244, 246, 0)) !important;
}

.entry-screen .matrix-highlight {
  right: 8px !important;
  left: 8px !important;
  border-top: 1px solid rgba(31, 41, 55, 0.05) !important;
  border-bottom: 1px solid rgba(31, 41, 55, 0.04) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(236, 239, 242, 0.52)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 6px 18px rgba(31, 41, 55, 0.04) !important;
}

.entry-screen .wheel-picker {
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.entry-screen .wheel-item {
  color: rgba(121, 128, 136, 0.42) !important;
  font-weight: 580 !important;
  text-shadow: none !important;
}

.entry-screen .wheel-item.active {
  color: #4c555f !important;
  font-weight: 720 !important;
  text-shadow: none !important;
  transform: scale(1.015) !important;
}

.entry-screen .toggle-row {
  min-height: 44px !important;
  margin: 0 !important;
  padding: 4px 0 0 !important;
}

.entry-screen .solar-switch {
  width: 54px !important;
  height: 34px !important;
  background: #c9cfd4 !important;
  box-shadow: inset 0 1px 4px rgba(31, 41, 55, 0.12) !important;
}

.entry-screen .solar-switch::after {
  width: 28px !important;
  height: 28px !important;
  background: #ffffff !important;
  box-shadow: 0 4px 12px rgba(31, 41, 55, 0.12) !important;
}

.entry-screen .solar-inline input:checked + .solar-switch {
  background: #717983 !important;
}

.entry-screen .entry-divider {
  display: none !important;
}

.entry-screen .bazi-pillar-grid {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.entry-screen .bazi-token,
.entry-screen .selector-button,
.entry-screen .bazi-range-chip,
.entry-screen .ghost-inline-button,
.entry-screen .location-province-item,
.entry-screen .location-city-item {
  border-color: var(--entry-neutral-line) !important;
  background: rgba(255, 255, 255, 0.58) !important;
  box-shadow: none !important;
}

.entry-screen .location-dropdown {
  border-radius: 22px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 18px 44px rgba(31, 41, 55, 0.1) !important;
}

.entry-screen .location-province-list {
  border-right-color: var(--entry-neutral-line) !important;
  background: #f5f6f7 !important;
}

@media (max-width: 520px) {
  .entry-screen {
    align-items: start !important;
    padding: 22px 12px 34px !important;
  }

  .entry-screen .entry-wrap {
    width: min(100%, 414px) !important;
  }

  .entry-screen .entry-card,
  .entry-screen .entry-card-glass {
    gap: 12px !important;
    padding: 22px 20px !important;
    border-radius: 22px !important;
  }

  .entry-screen .contact-start-panel {
    padding: 10px 10px 10px 16px !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  .entry-screen .contact-start-button {
    min-width: 92px !important;
    padding-inline: 14px !important;
  }
}

/* Location picker softening: remove hard box borders and column seams. */
.entry-screen .location-trigger {
  min-height: 56px !important;
  border: 1px solid rgba(31, 41, 55, 0.07) !important;
  border-radius: 19px !important;
  color: #424a53 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 248, 250, 0.66)),
    rgba(255, 255, 255, 0.7) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 6px 18px rgba(31, 41, 55, 0.035) !important;
}

.entry-screen .location-trigger.open {
  border-color: rgba(31, 41, 55, 0.08) !important;
  border-radius: 19px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 249, 251, 0.72)),
    rgba(255, 255, 255, 0.78) !important;
}

.entry-screen .location-dropdown {
  margin-top: 10px !important;
  border: 1px solid rgba(31, 41, 55, 0.055) !important;
  border-radius: 24px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(249, 250, 251, 0.88)),
    #ffffff !important;
  box-shadow:
    0 18px 48px rgba(31, 41, 55, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  overflow: hidden !important;
}

.entry-screen .location-search-wrap {
  padding: 12px !important;
  border: 0 !important;
  background: transparent !important;
}

.entry-screen .location-search-input {
  height: 44px !important;
  border: 0 !important;
  border-radius: 16px !important;
  color: #4c555f !important;
  background: #f4f5f6 !important;
  box-shadow: inset 0 1px 3px rgba(31, 41, 55, 0.045) !important;
}

.entry-screen .location-columns {
  margin: 0 12px 12px !important;
  border: 0 !important;
  border-radius: 18px !important;
  background: #fbfbfc !important;
  box-shadow: inset 0 1px 0 rgba(31, 41, 55, 0.035) !important;
  overflow: hidden !important;
}

.entry-screen .location-province-list,
.entry-screen .location-city-list {
  background: transparent !important;
  box-shadow: none !important;
}

.entry-screen .location-province-list {
  border-right: 1px solid rgba(31, 41, 55, 0.045) !important;
}

.entry-screen .location-province-item,
.entry-screen .location-city-item {
  min-height: 44px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #34404c !important;
  background: transparent !important;
  box-shadow: none !important;
  font-weight: 560 !important;
}

.entry-screen .location-province-item:hover,
.entry-screen .location-city-item:hover {
  background: rgba(31, 41, 55, 0.035) !important;
}

.entry-screen .location-province-item.active,
.entry-screen .location-city-item.selected {
  color: #202832 !important;
  background: rgba(31, 41, 55, 0.075) !important;
  box-shadow: inset 3px 0 0 rgba(31, 41, 55, 0.08) !important;
}

.entry-screen .location-province-list::-webkit-scrollbar,
.entry-screen .location-city-list::-webkit-scrollbar {
  width: 3px !important;
}

.entry-screen .location-province-list::-webkit-scrollbar-thumb,
.entry-screen .location-city-list::-webkit-scrollbar-thumb {
  background: rgba(31, 41, 55, 0.14) !important;
}

/* Final override: the chart screen should not expose the registration/contact controls. */
body .entry-screen .contact-start-panel,
body .entry-screen .access-restore-panel,
body .entry-screen .access-key-hint {
  display: none !important;
}

/* SM module neutral sync: match the entry/account pages instead of the old blue card. */
.sm-extension-mount {
  margin: 20px 0 22px !important;
}

.sm-pretext-card {
  --sm-neutral-text: #242a31;
  --sm-neutral-muted: #747d86;
  --sm-neutral-faint: #a0a7ae;
  --sm-neutral-line: rgba(31, 41, 55, 0.075);
  --sm-neutral-line-strong: rgba(31, 41, 55, 0.12);
  position: relative !important;
  padding: 22px !important;
  color: var(--sm-neutral-text) !important;
  border: 1px solid var(--sm-neutral-line) !important;
  border-radius: 28px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 249, 251, 0.82)),
    rgba(255, 255, 255, 0.76) !important;
  box-shadow:
    0 22px 64px rgba(31, 41, 55, 0.075),
    inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
}

.sm-pretext-glow {
  display: none !important;
}

.sm-pretext-copy {
  gap: 8px !important;
  margin-bottom: 18px !important;
}

.sm-pretext-kicker {
  color: var(--sm-neutral-muted) !important;
  font-size: 12px !important;
  font-weight: 520 !important;
  letter-spacing: 0.08em !important;
}

.sm-pretext-copy h3 {
  color: var(--sm-neutral-text) !important;
  font-size: clamp(23px, 5vw, 30px) !important;
  font-weight: 440 !important;
  letter-spacing: -0.035em !important;
  line-height: 1.1 !important;
}

.sm-pretext-copy p {
  color: var(--sm-neutral-muted) !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
}

.sm-pretext-source,
.sm-pretext-zone {
  border: 1px solid var(--sm-neutral-line) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(247, 248, 250, 0.56)),
    rgba(255, 255, 255, 0.62) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 10px 26px rgba(31, 41, 55, 0.045) !important;
}

.sm-pretext-source {
  padding: 15px !important;
  border-radius: 24px !important;
}

.sm-pretext-source-head {
  color: var(--sm-neutral-muted) !important;
  font-size: 12px !important;
}

.sm-pretext-source-head span {
  font-weight: 520 !important;
}

.sm-pretext-source-head em {
  color: var(--sm-neutral-faint) !important;
}

.sm-pretext-zone {
  min-height: 132px !important;
  padding: 14px !important;
  border-radius: 24px !important;
}

.sm-pretext-zone.is-over {
  transform: translateY(-2px) scale(1.005) !important;
  border-color: var(--sm-neutral-line-strong) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(244, 245, 247, 0.72)),
    rgba(255, 255, 255, 0.74) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 16px 34px rgba(31, 41, 55, 0.07) !important;
}

.sm-pretext-zone-head {
  gap: 5px !important;
  margin-bottom: 12px !important;
}

.sm-pretext-zone-head strong {
  color: var(--sm-neutral-text) !important;
  font-size: 14px !important;
  font-weight: 540 !important;
}

.sm-pretext-zone-head span,
.sm-pretext-empty {
  color: var(--sm-neutral-muted) !important;
  font-size: 12px !important;
}

.sm-pretext-zone-drop,
.sm-pretext-source-body {
  gap: 9px !important;
}

.sm-pretext-tile {
  min-height: 39px !important;
  padding: 0 14px !important;
  color: #303741 !important;
  border: 1px solid rgba(31, 41, 55, 0.075) !important;
  border-radius: 999px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 245, 247, 0.82)),
    #ffffff !important;
  box-shadow:
    0 8px 18px rgba(31, 41, 55, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.96) !important;
  font-size: 14px !important;
  font-weight: 520 !important;
}

.sm-pretext-tile:hover {
  transform: translateY(-1px) !important;
  box-shadow:
    0 12px 24px rgba(31, 41, 55, 0.075),
    inset 0 1px 0 rgba(255, 255, 255, 0.94) !important;
}

.sm-pretext-tile.dragging {
  opacity: 0.96 !important;
  box-shadow: 0 22px 44px rgba(31, 41, 55, 0.13) !important;
}

.sm-pretext-foot {
  margin-top: 14px !important;
  color: var(--sm-neutral-muted) !important;
}

.sm-pretext-reset {
  min-height: 34px !important;
  padding: 0 14px !important;
  color: #4f5862 !important;
  border: 1px solid rgba(31, 41, 55, 0.07) !important;
  background: rgba(255, 255, 255, 0.62) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

@media (max-width: 520px) {
  .sm-pretext-card {
    padding: 18px !important;
    border-radius: 24px !important;
  }

  .sm-pretext-zone {
    min-height: 108px !important;
  }
}

/* Relationship/intimacy polish: keep it report-like, not a technical debug board. */
.intimacy-power-card {
  gap: 22px !important;
  padding: 24px !important;
  border: 1px solid rgba(25, 32, 40, 0.08) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 18px 46px rgba(25, 32, 40, 0.075) !important;
}

.intimacy-power-hero {
  grid-template-columns: minmax(0, 1fr) minmax(210px, 252px) !important;
  gap: 22px !important;
  align-items: start !important;
}

.intimacy-power-head {
  color: #77808b !important;
}

.intimacy-power-copy h3 {
  color: #202832 !important;
  font-size: clamp(24px, 3.5vw, 31px) !important;
  font-weight: 520 !important;
  letter-spacing: 0 !important;
}

.intimacy-power-copy p {
  max-width: 680px !important;
  color: #59636f !important;
  font-size: 14px !important;
  line-height: 1.85 !important;
}

.intimacy-refresh-button {
  border-color: rgba(25, 32, 40, 0.08) !important;
  color: #66717d !important;
  background: rgba(247, 249, 252, 0.82) !important;
}

.power-total-score {
  max-width: 100% !important;
  border: 1px solid rgba(25, 32, 40, 0.07) !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(243, 247, 251, 0.82)) !important;
}

.power-score-number {
  color: #2b6f87 !important;
}

.power-score-copy em {
  color: #202832 !important;
}

.power-score-copy p {
  color: #66717d !important;
}

.power-radar-wrap {
  min-height: 236px !important;
  border: 1px solid rgba(25, 32, 40, 0.07) !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, rgba(249, 251, 253, 0.94), rgba(244, 248, 250, 0.86)) !important;
}

.power-radar-grid-line {
  stroke: rgba(38, 111, 135, 0.12) !important;
}

.power-radar-spoke {
  stroke: rgba(38, 111, 135, 0.08) !important;
}

.power-radar-shape {
  fill: rgba(43, 111, 135, 0.14) !important;
  stroke: rgba(43, 111, 135, 0.68) !important;
}

.power-radar-label {
  fill: #66717d !important;
}

.power-axis-list {
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  border-top: 1px solid rgba(25, 32, 40, 0.07) !important;
}

.power-axis-item {
  grid-template-columns: minmax(104px, 0.28fr) minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: baseline !important;
  padding: 14px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(25, 32, 40, 0.07) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.power-axis-item div {
  justify-content: flex-start !important;
  gap: 8px !important;
}

.power-axis-item strong {
  color: #202832 !important;
  font-size: 13px !important;
  font-weight: 560 !important;
}

.power-axis-item span {
  color: #2b6f87 !important;
  font-size: 13px !important;
}

.power-axis-item p {
  color: #5d6874 !important;
  font-size: 13px !important;
  line-height: 1.75 !important;
}

.intimacy-combo-grid {
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  padding-top: 0 !important;
  border-top: 1px solid rgba(25, 32, 40, 0.07) !important;
}

.intimacy-combo-grid h4 {
  margin: 16px 0 2px !important;
  color: #202832 !important;
  font-size: 14px !important;
  font-weight: 560 !important;
}

.intimacy-combo-item {
  padding: 12px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(25, 32, 40, 0.07) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.intimacy-combo-item strong {
  color: #202832 !important;
  font-size: 13px !important;
  font-weight: 560 !important;
}

.intimacy-combo-item p {
  color: #5d6874 !important;
  font-size: 13px !important;
  line-height: 1.75 !important;
}

.sm-pretext-card {
  padding: 20px !important;
  border-color: rgba(25, 32, 40, 0.08) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 18px 44px rgba(25, 32, 40, 0.07) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.sm-pretext-kicker {
  color: #66717d !important;
  letter-spacing: 0.04em !important;
}

.sm-pretext-copy h3 {
  color: #202832 !important;
  font-size: clamp(22px, 4.4vw, 28px) !important;
  font-weight: 560 !important;
  letter-spacing: 0 !important;
}

.sm-pretext-copy p {
  color: #66717d !important;
  font-size: 13px !important;
}

.sm-pretext-source,
.sm-pretext-zone {
  border-color: rgba(25, 32, 40, 0.075) !important;
  border-radius: 8px !important;
  background: rgba(248, 250, 252, 0.78) !important;
  box-shadow: none !important;
}

.sm-pretext-source {
  padding: 14px !important;
}

.sm-pretext-zone {
  min-height: 122px !important;
  padding: 14px !important;
}

.sm-pretext-zone.is-over {
  background: rgba(241, 247, 250, 0.92) !important;
  box-shadow: inset 0 0 0 1px rgba(43, 111, 135, 0.16) !important;
}

.sm-pretext-zone-head strong {
  color: #202832 !important;
  font-weight: 560 !important;
}

.sm-pretext-zone-head span,
.sm-pretext-empty,
.sm-pretext-source-head,
.sm-pretext-source-head em,
.sm-pretext-foot {
  color: #66717d !important;
}

.sm-pretext-tile {
  min-height: 38px !important;
  color: #25303b !important;
  border-color: rgba(25, 32, 40, 0.08) !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  box-shadow: 0 7px 16px rgba(25, 32, 40, 0.055) !important;
}

.sm-pretext-reset {
  border-color: rgba(25, 32, 40, 0.08) !important;
  border-radius: 999px !important;
  color: #4f5b66 !important;
  background: #ffffff !important;
}

@media (max-width: 680px) {
  .identity-question-head h3,
  .compatibility-copy h3 {
    font-size: 18px;
  }

  .identity-topic-list {
    grid-template-columns: 1fr;
  }

  .identity-topic-card {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    padding: 13px;
  }

  .identity-topic-action {
    grid-column: 3;
    grid-row: 1;
    min-width: 58px;
    padding: 0 12px;
  }

  .identity-topic-card.is-selected {
    transform: none;
  }

  .identity-selected-bar {
    position: sticky;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 4;
    align-items: stretch;
    flex-direction: column;
    box-shadow: 0 16px 36px rgba(31, 58, 72, 0.16);
  }

  .identity-selected-bar strong {
    white-space: normal;
  }

  .identity-selected-bar button {
    width: 100%;
    min-height: 50px;
  }

  .identity-pack-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .identity-pack-bar button {
    width: 100%;
    min-height: 50px;
  }

  .premium-upgrade-card-shell {
    padding: 16px;
    border-radius: 18px;
  }

  .premium-upgrade-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .premium-action-button {
    width: 100%;
  }

  .intimacy-power-hero {
    grid-template-columns: 1fr !important;
  }

  .power-axis-item {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
}

@media (max-width: 520px) {
  .sm-pretext-card {
    padding: 16px !important;
    border-radius: 8px !important;
  }

  .sm-pretext-zone {
    min-height: 104px !important;
  }
}

/* Final entry skeleton. Keep this block last while the page is being redesigned. */
.entry-screen {
  align-items: flex-start !important;
  min-height: 100dvh !important;
  padding: 24px 16px !important;
  background: #ffffff !important;
}

.entry-screen::before,
.entry-screen .entry-card::before,
.entry-screen .entry-card::after,
.entry-screen .wheel-stage::before,
.entry-screen .wheel-stage::after {
  display: none !important;
  content: none !important;
}

.entry-screen .entry-wrap {
  width: min(100%, 720px) !important;
  margin: 0 auto !important;
}

.entry-screen .entry-appbar {
  padding: 0 0 20px !important;
  text-align: left !important;
}

.entry-screen .entry-brand {
  color: #111111 !important;
  font: inherit !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

.entry-screen .entry-card,
.entry-screen .entry-card-glass {
  display: grid !important;
  gap: 20px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible !important;
}

.entry-screen .mode-row,
.entry-screen .mode-panels,
.entry-screen .mode-panel,
.entry-screen .toggle-row,
.entry-screen .solar-place-row {
  margin: 0 !important;
  padding: 0 !important;
}

.entry-screen .segment-group {
  display: flex !important;
  width: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.entry-screen .segment-button,
.entry-screen .gender-button {
  flex: 1 1 0 !important;
  min-height: 44px !important;
  padding: 8px 12px !important;
  border: 1px solid #cccccc !important;
  border-radius: 0 !important;
  color: #333333 !important;
  background: #ffffff !important;
  box-shadow: none !important;
  font: inherit !important;
}

.entry-screen .segment-button + .segment-button {
  border-left: 0 !important;
}

.entry-screen .segment-button.active,
.entry-screen .gender-button.active {
  color: #ffffff !important;
  background: #333333 !important;
  box-shadow: none !important;
}

.entry-screen .datetime-card,
.entry-screen .bazi-card,
.entry-screen .contact-start-panel,
.entry-screen .access-restore-panel,
.entry-screen .solar-place-row,
.entry-screen .location-trigger,
.entry-screen .location-dropdown {
  padding: 16px !important;
  border: 1px solid #dddddd !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.entry-screen .datetime-head {
  padding: 0 0 8px !important;
  color: #666666 !important;
  font: inherit !important;
  font-size: 12px !important;
}

.entry-screen .wheel-stage {
  min-height: 180px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.entry-screen .matrix-highlight {
  border: 1px solid #dddddd !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.entry-screen .wheel-item,
.entry-screen .wheel-item.active {
  color: #333333 !important;
  font: inherit !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  text-shadow: none !important;
}

.entry-screen .wheel-item:not(.active) {
  color: #aaaaaa !important;
  opacity: 1 !important;
}

.entry-screen .entry-divider {
  display: none !important;
}

.entry-screen .toggle-row {
  min-height: 44px !important;
  border: 0 !important;
  background: transparent !important;
}

.entry-screen .toggle-label,
.entry-screen .location-hint,
.entry-screen .entry-disclaimer {
  color: #333333 !important;
  font: inherit !important;
}

.entry-screen .solar-switch,
.entry-screen .solar-switch::after {
  box-shadow: none !important;
}

.entry-screen .primary-button,
.entry-screen .generate-button,
.entry-screen .contact-start-button,
.entry-screen .key-button {
  position: static !important;
  width: 100% !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 10px 16px !important;
  border: 1px solid #333333 !important;
  border-radius: 0 !important;
  color: #ffffff !important;
  background: #333333 !important;
  box-shadow: none !important;
  font: inherit !important;
  font-weight: 500 !important;
  transform: none !important;
}

.entry-screen .location-dropdown {
  position: static !important;
  margin-top: 8px !important;
}

.entry-screen .solar-inline {
  display: inline-flex !important;
  align-items: center !important;
}

.entry-screen .solar-switch {
  width: 44px !important;
  height: 24px !important;
  border: 1px solid #999999 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
}

.entry-screen .solar-switch::after {
  top: 3px !important;
  left: 3px !important;
  width: 16px !important;
  height: 16px !important;
  border-radius: 0 !important;
  background: #333333 !important;
  transform: none !important;
}

.entry-screen .solar-inline input:checked + .solar-switch {
  border-color: #333333 !important;
  background: #ffffff !important;
}

.entry-screen .solar-inline input:checked + .solar-switch::after {
  transform: translateX(20px) !important;
}

.entry-screen .location-picker {
  width: 100% !important;
  isolation: auto !important;
}

.entry-screen .location-trigger,
.entry-screen .location-trigger.open {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  min-height: 44px !important;
  padding: 10px 12px !important;
  border: 1px solid #cccccc !important;
  border-radius: 0 !important;
  color: #333333 !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.entry-screen .location-trigger-text,
.entry-screen .location-trigger-text.placeholder,
.entry-screen .location-chevron {
  color: #666666 !important;
}

.entry-screen .location-dropdown {
  display: block !important;
  padding: 0 !important;
  border: 1px solid #cccccc !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.entry-screen .location-dropdown[hidden] {
  display: none !important;
}

.entry-screen .location-search-wrap {
  padding: 12px !important;
  border: 0 !important;
  border-bottom: 1px solid #dddddd !important;
  background: #ffffff !important;
}

.entry-screen .location-search-input {
  width: 100% !important;
  min-height: 40px !important;
  padding: 8px 10px !important;
  border: 1px solid #cccccc !important;
  border-radius: 0 !important;
  color: #333333 !important;
  background: #ffffff !important;
  box-shadow: none !important;
  font: inherit !important;
}

.entry-screen .location-search-input::placeholder {
  color: #999999 !important;
}

.entry-screen .location-columns {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  height: 320px !important;
  min-height: 0 !important;
  border: 0 !important;
  background: #ffffff !important;
}

.entry-screen .location-province-list,
.entry-screen .location-city-list {
  padding: 0 !important;
  border: 0 !important;
  background: #ffffff !important;
  scrollbar-color: #bbbbbb transparent !important;
  scrollbar-width: thin !important;
}

.entry-screen .location-province-list {
  border-right: 1px solid #dddddd !important;
}

.entry-screen .location-province-list::-webkit-scrollbar,
.entry-screen .location-city-list::-webkit-scrollbar {
  width: 6px !important;
}

.entry-screen .location-province-list::-webkit-scrollbar-thumb,
.entry-screen .location-city-list::-webkit-scrollbar-thumb {
  border-radius: 0 !important;
  background: #bbbbbb !important;
}

.entry-screen .location-province-item,
.entry-screen .location-city-item {
  display: block !important;
  width: 100% !important;
  min-height: 44px !important;
  padding: 10px 12px !important;
  border: 0 !important;
  border-bottom: 1px solid #eeeeee !important;
  border-radius: 0 !important;
  color: #333333 !important;
  background: #ffffff !important;
  box-shadow: none !important;
  font: inherit !important;
  text-align: left !important;
  transform: none !important;
}

.entry-screen .location-province-item:hover,
.entry-screen .location-city-item:hover,
.entry-screen .location-province-item:active,
.entry-screen .location-city-item:active,
.entry-screen .location-province-item.active,
.entry-screen .location-city-item.selected {
  color: #ffffff !important;
  background: #333333 !important;
  box-shadow: none !important;
}

.entry-screen .location-city-item strong,
.entry-screen .location-city-item span,
.entry-screen .location-empty-hint {
  color: inherit !important;
  font: inherit !important;
}

.entry-screen .location-empty-hint {
  padding: 12px !important;
  color: #777777 !important;
}

@media (max-width: 520px) {
  .entry-screen {
    padding: 20px 16px !important;
  }

  .entry-screen .entry-wrap {
    width: 100% !important;
  }
}

/* Three-screen result shell: one viewport per page. */
.dashboard-screen {
  height: 100dvh !important;
  min-height: 100dvh !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

.dashboard-screen .stitch-result-shell {
  box-sizing: border-box !important;
  width: min(100%, 560px) !important;
  height: 100dvh !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

.dashboard-screen .stitch-result-view {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  gap: 0 !important;
  height: 100dvh !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.result-pages {
  box-sizing: border-box;
  min-height: 0;
  overflow: hidden;
}

.result-page {
  box-sizing: border-box;
  height: 100%;
  min-height: 0;
  padding: max(20px, env(safe-area-inset-top)) 20px 16px;
  overflow: hidden;
  background: #ffffff;
}

.result-page[hidden],
.result-future-content[hidden] {
  display: none !important;
}

.result-page[data-result-page="chart"] {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  padding: max(10px, env(safe-area-inset-top)) 8px 10px;
}

.chart-fact-strip {
  display: flex;
  gap: 6px;
  min-width: 0;
  padding: 0 2px 2px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.chart-fact-strip::-webkit-scrollbar {
  display: none;
}

.chart-fact-item {
  display: grid;
  flex: 0 0 auto;
  gap: 2px;
  min-width: 76px;
  max-width: 150px;
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid #dddddd;
  background: #ffffff;
}

.chart-fact-item span {
  color: #888888;
  font-size: 10px;
  line-height: 1.2;
}

.chart-fact-item strong {
  overflow: hidden;
  color: #222222;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-chart-meta {
  display: block;
  align-items: center;
}

.result-page[data-result-page="chart"] .stitch-back-button {
  display: none !important;
}

.result-page[data-result-page="chart"] .profile-brief {
  gap: 6px !important;
  padding-inline: 2px !important;
}

.result-page[data-result-page="chart"] .brief-pill {
  min-height: 28px !important;
  padding: 5px 9px !important;
  border: 1px solid #dddddd !important;
  border-radius: 0 !important;
  color: #333333 !important;
  background: #ffffff !important;
  box-shadow: none !important;
  font-size: 12px !important;
}

.result-page[data-result-page="chart"] .stitch-chart-section {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  min-height: 0;
  margin: 0 !important;
  padding: 10px 6px !important;
  border: 1px solid #dddddd !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.result-page[data-result-page="chart"] .stitch-section-heading {
  margin: 0 0 8px !important;
  color: #111111 !important;
  font-size: 20px !important;
  font-weight: 500 !important;
  text-align: left !important;
}

.result-page[data-result-page="chart"] .bazi-result-board,
.result-page[data-result-page="chart"] .bazi-table {
  max-height: 100% !important;
}

.result-page[data-result-page="chart"] .bazi-result-board {
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
  scrollbar-width: thin !important;
  scrollbar-color: #bbbbbb transparent !important;
}

.result-page[data-result-page="chart"] .bazi-result-board::-webkit-scrollbar {
  width: 5px !important;
}

.result-page[data-result-page="chart"] .bazi-result-board::-webkit-scrollbar-thumb {
  border-radius: 0 !important;
  background: #bbbbbb !important;
}

.result-page[data-result-page="chart"] .bazi-table {
  height: auto !important;
  overflow: visible !important;
}

.result-page[data-result-page="chart"] .bazi-table-row {
  grid-template-columns: 34px repeat(4, minmax(0, 1fr)) !important;
  gap: 2px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.result-page[data-result-page="chart"] .bazi-table-row + .bazi-table-row {
  margin-top: 6px !important;
}

.result-page[data-result-page="chart"] .bazi-table-row.hidden-row,
.result-page[data-result-page="chart"] .bazi-table-row.god-row,
.result-page[data-result-page="chart"] .bazi-table-row.fortune-state-row,
.result-page[data-result-page="chart"] .bazi-table-row.void-row,
.result-page[data-result-page="chart"] .bazi-table-row.nayin-row {
  display: grid !important;
}

.result-page[data-result-page="chart"] .bazi-table-row.stack-row {
  min-height: 68px !important;
  align-items: start !important;
}

.result-page[data-result-page="chart"] .bazi-table-row.stack-row .bazi-cell {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  white-space: normal !important;
  line-height: 1.45 !important;
}

.result-page[data-result-page="chart"] .bazi-table-row.stack-row .bazi-cell span {
  display: block !important;
  margin: 0 !important;
}

.result-page[data-result-page="chart"] .bazi-table-row.shen-row {
  display: grid !important;
  min-height: 96px !important;
  align-items: start !important;
  padding-top: 4px !important;
  border-top: 1px solid #eeeeee !important;
}

.result-page[data-result-page="chart"] .bazi-table-row.shen-row .bazi-cell {
  min-height: 86px !important;
  padding: 6px 2px !important;
  color: #333333 !important;
  font-size: 10px !important;
  line-height: 1.45 !important;
  white-space: normal !important;
  overflow-y: auto !important;
  scrollbar-width: thin !important;
}

.result-page[data-result-page="chart"] .bazi-table-row.shen-row .bazi-cell span,
.result-page[data-result-page="chart"] .bazi-table-row.shen-row .bazi-cell em,
.result-page[data-result-page="chart"] .bazi-table-row.shen-row .bazi-cell strong {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  background: transparent !important;
  font: inherit !important;
}

.result-page[data-result-page="chart"] .bazi-row-label,
.result-page[data-result-page="chart"] .bazi-cell {
  min-width: 0 !important;
  padding: 4px 3px !important;
  font-size: 12px !important;
}

.result-page[data-result-page="chart"] .bazi-main-token {
  font-size: clamp(26px, 7.8vw, 36px) !important;
}

.result-page-header {
  display: grid;
  gap: 8px;
  align-content: start;
  padding-top: 8px;
}

.result-page[data-result-page="reading"],
.result-page[data-result-page="more"] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: max(16px, env(safe-area-inset-top)) 12px 12px;
}

.result-page-scroll {
  min-height: 0;
  padding-right: 2px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #bbbbbb transparent;
}

.result-page-scroll::-webkit-scrollbar {
  width: 5px;
}

.result-page-scroll::-webkit-scrollbar-thumb {
  border-radius: 0;
  background: #bbbbbb;
}

.result-page-scroll > .result-section,
.result-page-scroll > .intimacy-power-section,
.result-page-scroll > .chat-section,
.result-page-scroll > .sm-extension-mount {
  margin: 0 0 12px !important;
}

.result-page[data-result-page="reading"] .result-section,
.result-page[data-result-page="more"] .result-section,
.result-page[data-result-page="reading"] .intimacy-power-section,
.result-page[data-result-page="more"] .chat-section {
  padding: 14px 12px !important;
  border: 1px solid #dddddd !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.result-page[data-result-page="reading"] .section-headline,
.result-page[data-result-page="more"] .section-headline {
  color: #222222 !important;
  font-size: 17px !important;
  font-weight: 500 !important;
}

.result-page-header span {
  color: #777777;
  font-size: 12px;
}

.result-page-header h2 {
  margin: 0;
  color: #111111;
  font-size: 24px;
  font-weight: 500;
}

.result-page-header p {
  max-width: 320px;
  margin: 0;
  color: #666666;
  font-size: 13px;
  line-height: 1.6;
}

.result-page-nav {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid #dddddd;
  background: #ffffff;
}

.result-page-nav button {
  min-height: 56px;
  padding: 8px;
  border: 0;
  border-right: 1px solid #eeeeee;
  border-radius: 0;
  color: #777777;
  background: #ffffff;
  box-shadow: none;
  font: inherit;
  font-size: 14px;
}

.result-page-nav button:last-child {
  border-right: 0;
}

.result-page-nav button.active {
  color: #ffffff;
  background: #333333;
}

@media (max-height: 680px) {
  .result-page {
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .result-page[data-result-page="chart"] .bazi-table-row.shen-row {
    min-height: 76px !important;
  }

  .result-page[data-result-page="chart"] .bazi-table-row.shen-row .bazi-cell {
    min-height: 66px !important;
    max-height: 66px !important;
    font-size: 9px !important;
  }
}

/* Unified reading page: one typography and one content structure. */
.result-page[data-result-page="reading"] .result-page-header {
  gap: 4px;
  padding: 0 2px;
}

.result-page[data-result-page="reading"] .result-page-header h2 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0;
}

.result-page[data-result-page="reading"] .result-page-header p {
  color: #666666;
  font-size: 13px;
  line-height: 1.5;
}

.result-page[data-result-page="reading"] .stitch-reading-section {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.result-page[data-result-page="reading"] .relation-board,
.result-page[data-result-page="reading"] .plate-reading-board,
.result-page[data-result-page="reading"] .stitch-reading-board {
  display: block !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.result-page[data-result-page="reading"] .bazi-base-summary {
  display: grid;
  gap: 0;
  min-width: 0;
  padding: 0 !important;
  border: 1px solid #dddddd !important;
  background: #ffffff;
}

.result-page[data-result-page="reading"] .reading-topic-list {
  display: grid;
  gap: 0;
}

.result-page[data-result-page="reading"] .reading-topic-item {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 16px 14px;
  border: 0;
  border-bottom: 1px solid #e5e5e5;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.result-page[data-result-page="reading"] .reading-topic-item:last-child {
  border-bottom: 0;
}

.result-page[data-result-page="reading"] .reading-overview-item {
  padding-top: 14px;
}

.result-page[data-result-page="reading"] .reading-topic-item h3 {
  margin: 0;
  color: #111111;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.result-page[data-result-page="reading"] .reading-topic-item p {
  margin: 0;
  color: #333333;
  font-size: 14px;
  line-height: 1.8;
}

.result-page[data-result-page="reading"] .premium-section {
  display: grid;
  gap: 12px;
  padding: 16px 14px !important;
}

.result-page[data-result-page="reading"] .premium-section > .section-headline {
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e5e5;
  color: #111111 !important;
  font-size: 17px !important;
  font-weight: 600 !important;
}

.result-page[data-result-page="reading"] .identity-question-shell,
.result-page[data-result-page="reading"] .identity-question-shell.is-active {
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.result-page[data-result-page="reading"] .identity-question-head {
  align-items: flex-start;
}

.result-page[data-result-page="reading"] .identity-question-head span,
.result-page[data-result-page="reading"] .identity-topic-group > header span {
  color: #777777;
}

.result-page[data-result-page="reading"] .identity-question-head h3 {
  color: #111111;
  font-size: 17px;
  font-weight: 600;
}

.result-page[data-result-page="reading"] .identity-question-head em,
.result-page[data-result-page="reading"] .identity-topic-meta em {
  border-radius: 0;
  color: #555555;
  background: #f1f1f1;
}

.result-page[data-result-page="reading"] .identity-question-intro {
  color: #555555;
  font-size: 13px;
  line-height: 1.7;
}

.result-page[data-result-page="reading"] .identity-topic-groups,
.result-page[data-result-page="reading"] .identity-topic-group,
.result-page[data-result-page="reading"] .identity-topic-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.result-page[data-result-page="reading"] .identity-topic-group > header {
  padding: 12px 0 8px;
  border-bottom: 1px solid #e5e5e5;
}

.result-page[data-result-page="reading"] .identity-topic-group > header strong {
  color: #222222;
  font-size: 14px;
  font-weight: 600;
}

.result-page[data-result-page="reading"] .identity-topic-card,
.result-page[data-result-page="reading"] .identity-topic-card.is-selected {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid #e5e5e5;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.result-page[data-result-page="reading"] .identity-topic-icon {
  display: none;
}

.result-page[data-result-page="reading"] .identity-topic-copy {
  gap: 4px;
}

.result-page[data-result-page="reading"] .identity-topic-meta span {
  color: #777777;
  font-size: 11px;
}

.result-page[data-result-page="reading"] .identity-topic-copy strong {
  color: #111111;
  font-size: 14px;
  font-weight: 600;
}

.result-page[data-result-page="reading"] .identity-topic-copy p {
  color: #666666;
  font-size: 12px;
  line-height: 1.55;
}

.result-page[data-result-page="reading"] .identity-topic-action,
.result-page[data-result-page="reading"] .identity-topic-card.is-selected .identity-topic-action {
  min-width: 58px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid #333333;
  border-radius: 0;
  color: #333333;
  background: #ffffff;
  box-shadow: none;
}

.result-page[data-result-page="reading"] .identity-selected-bar,
.result-page[data-result-page="reading"] .identity-pack-bar,
.result-page[data-result-page="reading"] .identity-pack-bar.is-active {
  border: 1px solid #dddddd;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

/* Current fortune page: keep only the active year and month. */
.result-page[data-result-page="more"] .fortune-grid {
  display: block;
}

.result-page[data-result-page="more"] .fortune-card {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.result-page[data-result-page="more"] .fortune-card > span,
.monthly-fortune-period span,
.monthly-fortune-item > span {
  color: #777777;
  font-size: 12px;
  font-style: normal;
}

.result-page[data-result-page="more"] .fortune-card > strong {
  display: block;
  margin-top: 6px;
  color: #111111;
  font-size: 18px;
  font-weight: 600;
}

.result-page[data-result-page="more"] .fortune-card > p {
  margin: 8px 0 0;
  color: #333333;
  font-size: 14px;
  line-height: 1.75;
}

.result-page[data-result-page="more"] .fortune-ai-note,
.result-page[data-result-page="more"] .reading-evidence-list {
  display: none;
}

.monthly-fortune-board,
.monthly-fortune-list {
  display: grid;
  gap: 0;
}

.monthly-fortune-periods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #dddddd;
}

.monthly-fortune-period {
  display: grid;
  gap: 5px;
  padding: 13px 12px;
}

.monthly-fortune-period + .monthly-fortune-period {
  border-left: 1px solid #dddddd;
}

.monthly-fortune-period strong {
  color: #111111;
  font-size: 18px;
  font-weight: 600;
}

.monthly-fortune-list {
  margin-top: 12px;
  border: 1px solid #dddddd;
}

.monthly-fortune-item {
  display: grid;
  gap: 7px;
  padding: 14px 12px;
  border-bottom: 1px solid #e5e5e5;
}

.monthly-fortune-item:last-child {
  border-bottom: 0;
}

.monthly-fortune-item strong {
  color: #111111;
  font-size: 15px;
  font-weight: 600;
}

.monthly-fortune-item p {
  margin: 0;
  color: #333333;
  font-size: 14px;
  line-height: 1.75;
}

.monthly-fortune-caution > span {
  color: #8a4b24;
}

.personal-almanac {
  display: grid;
  gap: 0;
  margin-top: 12px;
  border: 1px solid #dddddd;
}

.personal-almanac-head {
  display: grid;
  gap: 6px;
  padding: 14px 12px;
  border-bottom: 1px solid #dddddd;
}

.personal-almanac-head > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.personal-almanac-head strong {
  color: #111111;
  font-size: 16px;
  font-weight: 600;
}

.personal-almanac-head span {
  color: #666666;
  font-size: 12px;
}

.personal-almanac-head p {
  margin: 0;
  color: #666666;
  font-size: 12px;
  line-height: 1.65;
}

.personal-almanac-pending .personal-almanac-head {
  border-bottom: 0;
}

.almanac-day-group {
  display: grid;
  gap: 0;
}

.almanac-day-group + .almanac-day-group {
  border-top: 8px solid #f3f3f3;
}

.almanac-day-group-title {
  padding: 11px 12px;
  border-bottom: 1px solid #e5e5e5;
  color: #555555;
  font-size: 13px;
  font-weight: 600;
}

.almanac-day-card {
  display: grid;
  gap: 9px;
  padding: 14px 12px;
  border-bottom: 1px solid #e5e5e5;
}

.almanac-day-card:last-child {
  border-bottom: 0;
}

.almanac-day-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.almanac-day-card header > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.almanac-day-card header strong {
  color: #111111;
  font-size: 17px;
  font-weight: 600;
}

.almanac-day-card header span,
.almanac-day-card small {
  color: #777777;
  font-size: 11px;
  line-height: 1.55;
}

.almanac-day-card header em {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 1px solid #cccccc;
  border-radius: 0;
  color: #444444;
  background: #ffffff;
  font-size: 11px;
  font-style: normal;
}

.almanac-day-card p {
  margin: 0;
  color: #444444;
  font-size: 13px;
  line-height: 1.65;
}

.almanac-day-card .almanac-day-actions {
  color: #111111;
  font-size: 14px;
}

.almanac-day-actions span {
  margin-right: 8px;
  color: #39704b;
  font-size: 12px;
}

.almanac-day-card.is-caution .almanac-day-actions span,
.almanac-day-card.is-caution header em {
  color: #8a4b24;
}

/* Result page polish: keep the current chart style, refine it with a written-note rhythm. */
.dashboard-screen {
  font-family:
    "Kaiti SC",
    "STKaiti",
    "KaiTi",
    "FangSong",
    "PingFang SC",
    "Microsoft YaHei",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif !important;
  letter-spacing: 0 !important;
}

.result-page[data-result-page="chart"] {
  gap: 8px;
}

.result-page[data-result-page="chart"] .profile-brief {
  gap: 7px !important;
}

.result-page[data-result-page="chart"] .brief-pill {
  padding-inline: 2px !important;
  border-color: transparent !important;
  color: #222222 !important;
  background: transparent !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
}

.chart-fact-strip {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 1px 2px 4px;
  border-bottom: 0;
  overflow: visible !important;
}

.chart-fact-item {
  min-width: 0 !important;
  max-width: none !important;
  padding: 3px 0;
  border-color: transparent;
  background: transparent;
}

.chart-fact-item span {
  color: #777777;
  font-size: 11px;
  line-height: 1.25;
}

.chart-fact-item strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #171717;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.38;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 360px) {
  .chart-fact-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
  }
}

.result-page[data-result-page="chart"] .stitch-chart-section {
  padding: 9px 6px 10px !important;
  border-color: transparent !important;
}

.result-page[data-result-page="chart"] .stitch-section-heading {
  margin-bottom: 9px !important;
  padding-bottom: 0;
  border-bottom: 0;
  font-size: 22px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
}

.result-page[data-result-page="chart"] .bazi-table-row {
  min-height: 37px !important;
}

.result-page[data-result-page="chart"] .bazi-table-row + .bazi-table-row {
  margin-top: 3px !important;
}

.result-page[data-result-page="chart"] .bazi-table-row:not(:last-child) {
  padding-bottom: 2px !important;
  border-bottom: 0;
}

.result-page[data-result-page="chart"] .bazi-row-label {
  color: #666666 !important;
  font-size: 11.5px !important;
  line-height: 1.35 !important;
}

.result-page[data-result-page="chart"] .bazi-cell {
  color: #151515 !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

.result-page[data-result-page="chart"] .bazi-main-token {
  font-size: clamp(27px, 7.4vw, 36px) !important;
  font-weight: 600 !important;
  line-height: 1.08 !important;
}

.result-page[data-result-page="chart"] .bazi-table-row.stack-row .bazi-cell {
  line-height: 1.5 !important;
}

.result-page[data-result-page="chart"] .bazi-table-row.shen-row {
  min-height: 90px !important;
}

.result-page[data-result-page="chart"] .bazi-table-row.shen-row .bazi-cell {
  min-height: 78px !important;
  font-size: 10px !important;
  line-height: 1.5 !important;
}

.result-page-header h2 {
  font-weight: 600;
  line-height: 1.2;
}

.result-page-header p {
  line-height: 1.68;
}

.result-page[data-result-page="reading"] .reading-topic-item {
  gap: 8px;
  padding: 18px 14px;
  border-bottom-color: transparent !important;
}

.result-page[data-result-page="reading"] .reading-topic-item + .reading-topic-item {
  padding-top: 20px;
}

.result-page[data-result-page="reading"] .reading-topic-item h3 {
  font-size: 16px;
  line-height: 1.45;
}

.result-page[data-result-page="reading"] .premium-section > .section-headline {
  padding-bottom: 4px;
  border-bottom-color: transparent !important;
}

.result-page[data-result-page="reading"] .reading-topic-item p,
.result-page[data-result-page="more"] .fortune-card > p,
.monthly-fortune-item p,
.personal-almanac-head p,
.almanac-day-card p {
  line-height: 1.86;
}

.result-page[data-result-page="reading"] .bazi-base-summary,
.result-page[data-result-page="reading"] .premium-section,
.result-page[data-result-page="more"] .result-section,
.monthly-fortune-periods,
.monthly-fortune-list,
.personal-almanac {
  border-color: transparent !important;
}

.monthly-fortune-item,
.almanac-day-card,
.result-page[data-result-page="reading"] .identity-topic-card,
.result-page[data-result-page="reading"] .identity-topic-card.is-selected {
  border-bottom-color: transparent !important;
}

.almanac-day-group + .almanac-day-group {
  border-top-color: transparent;
}

/* Soft text navigation for the entry time mode and result tabs. */
.entry-screen #calendarModeGroup {
  justify-content: center !important;
  gap: 0 !important;
  width: auto !important;
  margin-inline: auto !important;
}

.entry-screen #calendarModeGroup .segment-button {
  position: relative;
  flex: 0 0 auto !important;
  min-height: 34px !important;
  padding: 4px 18px !important;
  border: 0 !important;
  color: #777777 !important;
  background: transparent !important;
  font: inherit !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.15 !important;
}

.entry-screen #calendarModeGroup .segment-button + .segment-button {
  border-left: 0 !important;
}

.entry-screen #calendarModeGroup .segment-button + .segment-button::before {
  content: "/";
  position: absolute;
  left: -3px;
  top: 50%;
  color: #cfcfcf;
  font-size: 13px;
  font-weight: 400;
  transform: translateY(-50%);
}

.entry-screen #calendarModeGroup .segment-button.active {
  color: #111111 !important;
  background: transparent !important;
  font-weight: 700 !important;
}

.entry-screen #calendarModeGroup .segment-button.active::after {
  content: "一";
  display: block;
  margin-top: -1px;
  color: #111111;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
}

.result-page-nav {
  padding-inline: 18px;
  border-top: 0 !important;
  background: #ffffff !important;
}

.result-page-nav button {
  position: relative;
  min-height: 58px;
  border: 0 !important;
  color: #888888 !important;
  background: transparent !important;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.15;
}

.result-page-nav button + button::before {
  content: "/";
  position: absolute;
  left: -1px;
  top: 50%;
  color: #dddddd;
  font-size: 14px;
  font-weight: 400;
  transform: translateY(-50%);
}

.result-page-nav button.active {
  color: #111111 !important;
  background: transparent !important;
  font-weight: 700;
}

.result-page-nav button.active::after {
  content: "一";
  display: block;
  margin-top: 2px;
  color: #111111;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
}

#entryScreen[hidden] #calendarModeGroup .segment-button::before,
#entryScreen[hidden] #calendarModeGroup .segment-button::after,
#dashboardScreen[hidden] .result-page-nav button::before,
#dashboardScreen[hidden] .result-page-nav button::after {
  content: none !important;
}

.result-page[hidden] *::before,
.result-page[hidden] *::after {
  content: none !important;
}

/* Reading page premium choices: match the handwritten result style. */
.result-page[data-result-page="reading"] .identity-topic-action,
.result-page[data-result-page="reading"] .identity-topic-card.is-selected .identity-topic-action {
  min-width: 48px !important;
  min-height: auto !important;
  padding: 0 0 2px !important;
  border: 0 !important;
  border-bottom: 1px solid #222222 !important;
  color: #222222 !important;
  background: transparent !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
}

.result-page[data-result-page="reading"] .identity-topic-card.is-selected .identity-topic-action {
  color: #666666 !important;
  border-bottom-color: transparent !important;
}

.result-page[data-result-page="reading"] .identity-selected-bar,
.result-page[data-result-page="reading"] .identity-pack-bar,
.result-page[data-result-page="reading"] .identity-pack-bar.is-active {
  display: grid !important;
  gap: 12px !important;
  justify-items: center !important;
  padding: 18px 12px 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #111111 !important;
  background: transparent !important;
}

.result-page[data-result-page="reading"] .identity-selected-bar div,
.result-page[data-result-page="reading"] .identity-pack-bar div {
  display: grid !important;
  gap: 5px !important;
  justify-items: center !important;
  min-width: 0 !important;
  text-align: center !important;
}

.result-page[data-result-page="reading"] .identity-selected-bar span,
.result-page[data-result-page="reading"] .identity-pack-bar span {
  color: #888888 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.result-page[data-result-page="reading"] .identity-selected-bar strong,
.result-page[data-result-page="reading"] .identity-pack-bar strong {
  max-width: 100% !important;
  overflow: visible !important;
  color: #111111 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

.result-page[data-result-page="reading"] .identity-selected-bar button,
.result-page[data-result-page="reading"] .identity-pack-bar button,
.result-page[data-result-page="reading"] .identity-pack-bar.is-active button {
  min-height: auto !important;
  padding: 0 0 3px !important;
  border: 0 !important;
  border-bottom: 1px solid #111111 !important;
  border-radius: 0 !important;
  color: #111111 !important;
  background: transparent !important;
  font: inherit !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}

.result-page[data-result-page="reading"] .identity-selected-bar button b,
.result-page[data-result-page="reading"] .identity-pack-bar button b {
  margin-right: 4px !important;
  font-size: 17px !important;
  font-weight: 700 !important;
}

.result-page[data-result-page="reading"] .identity-sync-button {
  justify-self: center !important;
  padding: 6px 0 2px !important;
  border: 0 !important;
  border-bottom: 1px solid #777777 !important;
  color: #555555 !important;
  background: transparent !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

.result-page[data-result-page="reading"] .identity-sync-button:disabled {
  border-bottom-color: #aaaaaa !important;
  color: #999999 !important;
}

.result-page[data-result-page="reading"] .identity-sync-row {
  display: grid !important;
  justify-items: center !important;
  gap: 5px !important;
}

.result-page[data-result-page="reading"] .identity-sync-hint {
  margin: 0 !important;
  max-width: 270px !important;
  color: #777777 !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
  text-align: center !important;
}

.result-page[data-result-page="reading"] .identity-sync-hint.is-success {
  color: #2f5f4f !important;
}

.result-page[data-result-page="reading"] .identity-sync-hint.is-error {
  color: #8a332c !important;
}

/* Reading text rhythm: handwritten notes, not boxed cards. */
.result-page[data-result-page="reading"] .bazi-base-summary {
  gap: 16px !important;
}

.result-page[data-result-page="reading"] .reading-topic-list {
  position: relative;
  display: grid;
  gap: 0;
  padding-top: 4px;
}

.result-page[data-result-page="reading"] .reading-topic-list::before,
.result-page[data-result-page="reading"] .reading-topic-list .reading-topic-item + .reading-topic-item::before {
  content: "·  ·  ·";
  justify-self: center;
  color: rgba(17, 17, 17, 0.18);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

.result-page[data-result-page="reading"] .reading-topic-list::before {
  margin: 0 0 6px;
}

.result-page[data-result-page="reading"] .reading-topic-list .reading-topic-item + .reading-topic-item::before {
  margin: 0 0 10px;
}

.result-page[data-result-page="reading"] .reading-topic-item,
.result-page[data-result-page="reading"] .reading-topic-item + .reading-topic-item {
  gap: 10px !important;
  padding: 16px 4px 18px !important;
}

.result-page[data-result-page="reading"] .reading-overview-item {
  padding-top: 6px !important;
}

.result-page[data-result-page="reading"] .reading-topic-item h3 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: #111111 !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  letter-spacing: 0;
}

.result-page[data-result-page="reading"] .reading-topic-item h3::after {
  content: "一";
  color: rgba(17, 17, 17, 0.24);
  font-size: 13px;
  font-weight: 400;
}

.result-page[data-result-page="reading"] .reading-topic-copy {
  display: grid;
  gap: 7px;
  max-width: 36em;
  text-wrap: pretty;
}

.result-page[data-result-page="reading"] .reading-topic-copy p {
  margin: 0 !important;
  color: #4d4d4d !important;
  font-size: 15px !important;
  line-height: 1.8 !important;
}

.result-page[data-result-page="reading"] .reading-topic-copy .reading-topic-lead {
  color: #181818 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.68 !important;
}

.result-page[data-result-page="reading"] .reading-tone-token {
  font-weight: 800;
}

.result-page[data-result-page="reading"] .reading-topic-prefix {
  display: inline-block;
  margin-right: 2px;
  color: #181818;
  font-weight: 800;
}

@media (max-width: 430px) {
  .result-page[data-result-page="reading"] .reading-topic-item,
  .result-page[data-result-page="reading"] .reading-topic-item + .reading-topic-item {
    padding-inline: 2px !important;
  }

  .result-page[data-result-page="reading"] .reading-topic-copy p {
    font-size: 14px !important;
  }

  .result-page[data-result-page="reading"] .reading-topic-copy .reading-topic-lead {
    font-size: 15px !important;
  }
}

