* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #efe9dc;
  color: #17211f;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

body {
  display: flex;
  justify-content: center;
}

#app {
  width: min(100vw, 430px);
  min-height: 100vh;
  background: #fbfaf5;
  box-shadow: 0 18px 60px rgba(47, 33, 20, 0.16);
}

view,
text,
picker,
image {
  display: block;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

image,
img {
  max-width: 100%;
}

picker {
  position: relative;
  display: block;
  cursor: pointer;
}

.web-picker-control {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.001;
  cursor: pointer;
  z-index: 20;
}

.web-picker-control-native {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
}

.web-toast,
.web-loading {
  position: fixed;
  left: 50%;
  z-index: 9999;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(35, 24, 13, 0.88);
  color: #fffaf0;
  font-size: 14px;
  box-shadow: 0 10px 26px rgba(35, 24, 13, 0.2);
}

.web-toast {
  bottom: 26px;
}

.web-loading {
  top: 18px;
}

.poster-canvas {
  display: none !important;
}

.page {
  position: relative;
  min-height: 100vh;
  padding: 18px 15px 74px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 2%, rgba(219, 236, 225, 0.75), rgba(251, 250, 245, 0) 130px),
    linear-gradient(180deg, #fffdf8 0%, #fbfaf5 42%, #f7f5ee 100%);
}

.header-ink {
  position: absolute;
  top: 42px;
  right: -4px;
  width: 144px;
  height: 80px;
  opacity: 0.46;
}

.nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 55px;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 25px;
  padding-top: 9px;
}

.nav-menu view {
  width: 20px;
  height: 2px;
  background: #1d2824;
  border-radius: 499.5px;
}

.nav-title {
  display: flex;
  flex: 1;
  align-items: center;
  flex-direction: column;
  margin-left: 10px;
}

.title {
  font-family: "Songti SC", "STSong", serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.05;
  color: #17211f;
}

.subtitle {
  margin-top: 7px;
  font-size: 11.5px;
  color: #7b8581;
}

.capsule {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 29px;
  gap: 9px;
  color: #151b19;
  background: rgba(255, 255, 255, 0.78);
  border: 0.5px solid rgba(34, 48, 42, 0.12);
  border-radius: 499.5px;
}

.capsule-divider {
  width: 0.5px;
  height: 15px;
  background: rgba(34, 48, 42, 0.14);
}

.capsule-dot {
  width: 15px;
  height: 15px;
  border: 3px solid #151b19;
  border-radius: 50%;
}

.account-strip {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin: 2px 0 9px;
  padding: 9px 10px;
  background: rgba(255, 253, 247, 0.88);
  border: 0.5px solid rgba(63, 48, 28, 0.1);
  border-radius: 9px;
  box-shadow: 0 9px 19px rgba(41, 33, 22, 0.06);
}

.account-strip view {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.account-strip text:first-child {
  font-size: 12px;
  font-weight: 800;
  color: #3d2c18;
}

.account-strip text:last-child {
  overflow: hidden;
  font-size: 10.5px;
  color: #827463;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-strip button {
  flex: 0 0 auto;
  min-width: 75px;
  height: 28px;
  margin: 0;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 800;
  line-height: 28px;
  color: #fff;
  background: #5b3a16;
  border-radius: 499.5px;
}

.ask-wrap,
.assistant-wrap {
  position: relative;
  margin-top: 8px;
}

.avatar {
  width: 38px;
  height: 38px;
  border: 0.5px solid rgba(27, 48, 38, 0.12);
  border-radius: 50%;
}

.avatar-top {
  position: absolute;
  top: 0;
  left: 9px;
  z-index: 2;
}

.ask-panel {
  margin-left: 52px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.74);
  border: 0.5px solid rgba(39, 60, 52, 0.1);
  border-radius: 10px;
  box-shadow: 0 9px 30px rgba(51, 74, 63, 0.06);
}

.ask-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: #18221f;
}

.ask-subtitle {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
  color: #69736e;
}

.question-list {
  margin-top: 10px;
}

.question-row {
  display: flex;
  align-items: center;
  min-height: 43px;
  padding: 7px 8px;
  margin-bottom: 5px;
  text-align: left;
  background: rgba(255, 255, 255, 0.78);
  border: 0.5px solid rgba(31, 48, 42, 0.08);
  border-radius: 9px;
}

.question-row-active {
  border-color: rgba(18, 116, 99, 0.35);
  background: rgba(233, 246, 239, 0.78);
}

.question-icon {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  margin-right: 8px;
  border-radius: 50%;
}

.question-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.question-title {
  font-size: 14px;
  font-weight: 650;
  color: #202b27;
}

.question-desc {
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.3;
  color: #68736e;
}

.question-arrow {
  padding-left: 8px;
  font-size: 21px;
  line-height: 1;
  color: #8f9994;
}

.custom-question {
  display: flex;
  align-items: center;
  min-height: 24px;
  gap: 6px;
  margin-top: 4px;
  color: #8a938e;
}

.spark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  font-size: 10px;
  color: #2c806f;
  background: rgba(229, 243, 237, 0.9);
  border-radius: 50%;
}

.custom-hint {
  font-size: 11.5px;
  white-space: nowrap;
}

.custom-input {
  flex: 1;
  min-width: 0;
  height: 24px;
  padding: 0 9px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 0.5px solid rgba(31, 48, 42, 0.08);
  border-radius: 8px;
}

.custom-send {
  flex: 0 0 auto;
  min-width: 43px;
  height: 24px;
  margin: 0;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 24px;
  color: #fff;
  background: #0c776d;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(12, 119, 109, 0.14);
}

.birth-card,
.chart-card,
.edit-panel {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.76);
  border: 0.5px solid rgba(31, 48, 42, 0.09);
  border-radius: 9px;
  box-shadow: 0 7px 25px rgba(51, 74, 63, 0.045);
}

.birth-card {
  display: flex;
  align-items: center;
  padding: 7px;
}

.birth-card-primary {
  margin-top: 10px;
  background: rgba(231, 242, 223, 0.86);
  border-color: rgba(12, 119, 109, 0.18);
  box-shadow: 0 12px 30px rgba(12, 119, 109, 0.08);
}

.birth-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  margin-right: 9px;
  color: #0c7464;
  background: rgba(228, 245, 238, 0.9);
  border-radius: 50%;
}

.birth-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.birth-step {
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #0c776d;
}

.birth-main {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 620;
  color: #1e2825;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.birth-sub {
  margin-top: 4px;
  overflow: hidden;
  font-size: 11.5px;
  color: #59645f;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-btn {
  flex: 0 0 auto;
  padding: 5px 0 5px 9px;
  font-size: 12px;
  color: #355d54;
}

.edit-panel {
  padding: 11px;
}

.edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.lunar-date-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.calendar-row {
  display: flex;
  gap: 6px;
  margin-bottom: 9px;
}

.calendar-chip {
  min-width: 42px;
  height: 21px;
  padding: 0 8px;
  font-size: 11.5px;
  color: #5d6863;
  background: rgba(248, 248, 244, 0.9);
  border: 0.5px solid rgba(31, 48, 42, 0.09);
  border-radius: 499.5px;
}

.calendar-chip-active {
  color: #0c7464;
  background: rgba(229, 243, 237, 0.95);
  border-color: rgba(12, 116, 100, 0.28);
}

.field-label,
.field-value {
  display: block;
}

.field-label {
  font-size: 10.5px;
  color: #7d8883;
}

.field-value {
  margin-top: 2.5px;
  font-size: 12.5px;
  color: #24302c;
}

.field-input {
  height: 21px;
  margin-top: 2.5px;
  padding: 0;
  font-size: 12.5px;
  color: #24302c;
}

.gender-row {
  display: flex;
  gap: 5px;
  margin-top: 3.5px;
}

.gender-chip {
  min-width: 36px;
  height: 19px;
  padding: 0 7px;
  font-size: 11px;
  color: #5d6863;
  background: rgba(248, 248, 244, 0.9);
  border: 0.5px solid rgba(31, 48, 42, 0.09);
  border-radius: 499.5px;
}

.gender-chip-active {
  color: #0c7464;
  background: rgba(229, 243, 237, 0.95);
  border-color: rgba(12, 116, 100, 0.28);
}

.edit-note {
  display: block;
  margin-top: 8px;
  font-size: 10.5px;
  line-height: 1.45;
  color: #87908b;
}

.chart-card {
  overflow: hidden;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 11px 6px 9px;
}

.pillar {
  display: flex;
  align-items: center;
  flex-direction: column;
  min-width: 0;
  border-right: 0.5px solid rgba(31, 48, 42, 0.1);
}

.pillar:last-child {
  border-right: 0;
}

.pillar-name {
  margin-bottom: 8px;
  font-size: 12px;
  color: #47514d;
}

.pillar-stems,
.pillar-branches {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 6px;
}

.hidden-stems {
  max-width: 100%;
  overflow: hidden;
  font-size: 9.5px;
  line-height: 1.2;
  color: #8a938e;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stem,
.branch {
  font-family: "Songti SC", "STSong", serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
}

.god {
  font-size: 10.5px;
}

.chart-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 7px 5px 7.5px;
  font-size: 11px;
  text-align: center;
  border-top: 0.5px solid rgba(31, 48, 42, 0.08);
}

.chart-meta text {
  border-right: 0.5px solid rgba(31, 48, 42, 0.08);
}

.chart-meta text:last-child {
  border-right: 0;
}

.assistant-wrap {
  margin-top: 8px;
  padding-left: 30px;
}

.avatar-assistant {
  position: absolute;
  top: 0;
  left: 5px;
  z-index: 2;
}

.assistant-panel {
  padding: 10px;
  background: rgba(255, 255, 255, 0.78);
  border: 0.5px solid rgba(31, 48, 42, 0.09);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(51, 74, 63, 0.055);
}

.assistant-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 6px;
}

.assistant-title {
  font-size: 13px;
  font-weight: 650;
}

.online {
  padding: 2px 6px;
  font-size: 10px;
  color: #2e6f43;
  background: #e7f2df;
  border: 0.5px solid rgba(47, 110, 67, 0.12);
  border-radius: 499.5px;
}

.analysis-layout {
  display: flex;
  gap: 9px;
  margin-top: 5px;
}

.analysis-main,
.evidence-block {
  background: rgba(255, 255, 255, 0.72);
  border: 0.5px solid rgba(31, 48, 42, 0.09);
  border-radius: 9px;
}

.analysis-main {
  flex: 1;
  min-width: 0;
  padding: 9px;
}

.analysis-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: #17221f;
}

.analysis-line {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  color: #4f5a55;
}

.analysis-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.analysis-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.analysis-label,
.analysis-text {
  display: block;
}

.analysis-label {
  font-size: 12.5px;
  font-weight: 650;
  color: #25302c;
}

.analysis-text {
  margin-top: 1px;
  font-size: 9.5px;
  line-height: 1.24;
  color: #5f6a65;
}

.evidence {
  width: 95px;
  flex: 0 0 auto;
}

.evidence-block {
  padding: 6px;
}

.source-block {
  margin-top: 8px;
}

.evidence-title {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 650;
  color: #1d725f;
}

.evidence-text,
.source-chip {
  display: block;
  margin-top: 3px;
  font-size: 9.5px;
  line-height: 1.24;
  color: #4e5b55;
}

.source-chip {
  color: #2b6f5f;
}

.result-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.result-nav button {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 25px;
  line-height: 30px;
  color: #17221f;
  background: rgba(255, 255, 255, 0.82);
  border: 0.5px solid rgba(34, 48, 42, 0.12);
  border-radius: 499.5px;
}

.result-nav view {
  display: grid;
  gap: 2px;
}

.result-title {
  font-size: 18px;
  font-weight: 800;
  color: #17221f;
}

.result-subtitle {
  font-size: 12px;
  color: #7b8581;
}

.report-panel {
  margin-top: 12px;
  padding: 14px;
  background: rgba(255, 253, 247, 0.94);
  border: 0.5px solid rgba(31, 48, 42, 0.09);
  border-radius: 10px;
  box-shadow: 0 14px 26px rgba(32, 44, 39, 0.08);
}

.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.report-head text {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #0c776d;
  background: #e7f2df;
  border-radius: 499.5px;
}

.report-head button {
  margin: 0;
  padding: 5px 9px;
  font-size: 12px;
  line-height: 1.2;
  color: #43504a;
  background: #fff;
  border: 0.5px solid rgba(31, 48, 42, 0.1);
  border-radius: 8px;
}

.report-title {
  display: block;
  margin-top: 10px;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
  color: #17221f;
}

.report-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
  color: #6e7974;
}

.report-chart-mini {
  overflow: hidden;
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 0.5px solid rgba(31, 48, 42, 0.08);
  border-radius: 9px;
}

.report-chart-mini .pillar-grid {
  padding-top: 10px;
}

.report-chart-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.report-chart-pillars view {
  min-width: 0;
  padding: 9px 4px 8px;
  text-align: center;
  border-right: 0.5px solid rgba(31, 48, 42, 0.08);
}

.report-chart-pillars view:last-child {
  border-right: 0;
}

.report-chart-pillars text {
  display: block;
}

.report-chart-pillars text:first-child {
  font-size: 11px;
  color: #75807b;
}

.report-chart-pillars text:nth-child(2) {
  margin-top: 5px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 20px;
  line-height: 1;
  color: #17221f;
}

.report-chart-pillars text:last-child {
  margin-top: 5px;
  overflow: hidden;
  font-size: 10px;
  color: #8b6a2b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-chart-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 7px 6px;
  font-size: 11px;
  color: #6e7974;
  text-align: center;
  background: rgba(248, 246, 238, 0.78);
  border-top: 0.5px solid rgba(31, 48, 42, 0.08);
}

.report-chart-meta view {
  display: flex;
  justify-content: center;
  gap: 3px;
  border-right: 0.5px solid rgba(31, 48, 42, 0.08);
}

.report-chart-meta view:last-child {
  border-right: 0;
}

.report-chart-meta text:last-child {
  font-weight: 700;
  color: #1d725f;
}

.report-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.report-tags text {
  padding: 5px 8px;
  font-size: 11px;
  color: #6e3b11;
  background: #fff6df;
  border: 0.5px solid rgba(188, 122, 2, 0.18);
  border-radius: 499.5px;
}

.report-body {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.report-section {
  padding: 10px;
  background: rgba(255, 255, 255, 0.78);
  border: 0.5px solid rgba(31, 48, 42, 0.08);
  border-radius: 9px;
}

.report-section-title,
.report-section-body,
.report-note {
  display: block;
}

.report-section-title {
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 700;
  color: #1d725f;
}

.report-section-body {
  font-size: 12px;
  line-height: 1.56;
  color: #3f4a46;
}

.report-note {
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #8d9691;
}

.fortune-panel {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-top: 12px;
  padding: 14px;
  background: rgba(255, 253, 247, 0.94);
  border: 0.5px solid rgba(31, 48, 42, 0.09);
  border-radius: 10px;
  box-shadow: 0 14px 26px rgba(32, 44, 39, 0.08);
}

.fortune-panel view,
.fortune-panel button {
  box-sizing: border-box;
}

.fortune-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fortune-head text:first-child {
  font-size: 15px;
  font-weight: 800;
  color: #17221f;
}

.fortune-head text:last-child {
  font-size: 11px;
  color: #6e7974;
}

.fortune-tabs {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.fortune-tabs button {
  flex: 1;
  height: 30px;
  padding: 0;
  font-size: 12px;
  line-height: 30px;
  color: #5b6761;
  background: rgba(255, 255, 255, 0.78);
  border: 0.5px solid rgba(31, 48, 42, 0.08);
  border-radius: 8px;
}

.fortune-tabs .fortune-tab-active {
  color: #fff;
  background: #0c776d;
}

.fortune-list {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 10px;
}

.fortune-chart-board {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  border: 0.5px solid rgba(31, 48, 42, 0.08);
  border-radius: 9px;
}

.fortune-chart-grid {
  grid-template-columns: repeat(6, 1fr);
  padding: 9px 4px 8px;
}

.fortune-chart-grid .pillar {
  padding: 0 2px;
}

.fortune-chart-grid .pillar-name {
  margin-bottom: 6px;
  font-size: 10.5px;
}

.fortune-chart-grid .stem,
.fortune-chart-grid .branch {
  font-size: 17px;
}

.fortune-chart-grid .god,
.fortune-chart-grid .hidden-stems {
  font-size: 9px;
}

.fortune-transit {
  background: rgba(255, 246, 223, 0.66);
  border-radius: 8px;
}

.fortune-chart-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px;
  font-size: 11px;
  color: #5f6a65;
  background: rgba(248, 246, 238, 0.78);
  border-top: 0.5px solid rgba(31, 48, 42, 0.08);
}

.fortune-chart-meta text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fortune-stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.fortune-stepper button {
  min-width: 0;
  height: 30px;
  margin: 0;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 30px;
  color: #355d54;
  background: rgba(231, 242, 223, 0.86);
  border: 0.5px solid rgba(12, 119, 109, 0.12);
  border-radius: 8px;
}

.fortune-brief-grid {
  display: grid;
  gap: 7px;
}

.fortune-brief {
  padding: 9px;
  background: rgba(255, 255, 255, 0.76);
  border: 0.5px solid rgba(31, 48, 42, 0.08);
  border-radius: 9px;
}

.fortune-brief-current {
  background: rgba(231, 242, 223, 0.78);
  border-color: rgba(12, 119, 109, 0.2);
}

.fortune-brief-muted {
  opacity: 0.62;
}

.fortune-picker-note {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #6e7974;
}

.fortune-pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.fortune-pillar-grid button {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 8px 5px;
  overflow: hidden;
  text-align: center;
  line-height: 1.2;
  background: rgba(255, 255, 255, 0.78);
  border: 0.5px solid rgba(31, 48, 42, 0.08);
  border-radius: 9px;
}

.fortune-pillar-grid text {
  display: block;
}

.fortune-pillar-grid text:first-child {
  font-size: 10px;
  line-height: 1.2;
  color: #7a8580;
}

.fortune-pillar-grid text:nth-child(2) {
  margin-top: 4px;
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.15;
  color: #17221f;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fortune-pillar-grid text:last-child {
  margin-top: 4px;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.2;
  color: #8b6a2b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fortune-pillar-grid .fortune-pillar-active {
  background: #0c776d;
  border-color: #0c776d;
}

.fortune-pillar-grid .fortune-pillar-active text {
  color: #fff;
}

.fortune-card {
  padding: 10px;
  background: rgba(255, 255, 255, 0.78);
  border: 0.5px solid rgba(31, 48, 42, 0.08);
  border-radius: 9px;
}

.fortune-period,
.fortune-theme,
.fortune-notice {
  display: block;
}

.fortune-period {
  font-size: 11px;
  color: #bc7a02;
}

.fortune-theme {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 700;
  color: #1d725f;
}

.fortune-notice {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.55;
  color: #3f4a46;
}

.chat-panel {
  margin-top: 12px;
  padding: 12px;
  background: rgba(247, 251, 246, 0.94);
  border: 0.5px solid rgba(31, 48, 42, 0.09);
  border-radius: 10px;
  box-shadow: 0 14px 26px rgba(32, 44, 39, 0.07);
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-head > view:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chat-head > view:first-child > text:first-child {
  font-size: 15px;
  font-weight: 800;
  color: #17221f;
}

.chat-status {
  font-size: 11px;
  color: #6e7974;
}

.chat-quota {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

.chat-quota text {
  font-size: 10.5px;
  color: #8b6a2b;
}

.chat-quota button {
  height: 26px;
  margin: 0;
  padding: 0 8px;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 26px;
  color: #5b3a16;
  background: #ffe1a3;
  border-radius: 499.5px;
}

.chat-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.chat-msg {
  max-width: 84%;
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.55;
  border-radius: 9px;
}

.chat-msg text {
  color: inherit;
}

.chat-msg-user {
  justify-self: end;
  color: #fff;
  background: #0c776d;
}

.chat-msg-ai {
  justify-self: start;
  color: #33403b;
  background: rgba(255, 255, 255, 0.86);
  border: 0.5px solid rgba(31, 48, 42, 0.08);
}

.chat-input-row {
  display: flex;
  gap: 7px;
  margin-top: 10px;
}

.chat-input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  color: #25302c;
  background: #fff;
  border: 0.5px solid rgba(31, 48, 42, 0.1);
  border-radius: 8px;
}

.chat-send {
  width: 58px;
  height: 34px;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 34px;
  color: #fff;
  background: #0c776d;
  border-radius: 8px;
}

.chat-send[disabled] {
  opacity: 0.62;
}

.primary-cta {
  position: fixed;
  right: 15px;
  bottom: 26px;
  left: 15px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 39px;
  gap: 7px;
  margin-top: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #0c776d 0%, #2f8e7b 100%);
  border-radius: 9px;
  box-shadow: 0 9px 21px rgba(13, 117, 106, 0.22);
}

.primary-cta-loading {
  opacity: 0.72;
}

.cta-arrow {
  font-size: 22px;
  line-height: 1;
}

.footer-note {
  display: block;
  margin-top: 9px;
  font-size: 11.5px;
  text-align: center;
  color: #9ca39f;
}

.disclaimer-note {
  margin: 12px 12px 0;
  padding: 9px 10px;
  border: 0.5px solid rgba(91, 58, 22, 0.12);
  border-radius: 7px;
  background: rgba(255, 252, 245, 0.82);
}

.disclaimer-note text {
  display: block;
  font-size: 10.5px;
  line-height: 1.55;
  color: #8a8176;
}

.poster-canvas {
  position: fixed;
  left: -4999.5px;
  top: -4999.5px;
  width: 750px;
  height: 3600px;
  pointer-events: none;
}

.tone-gold,
.accent-gold {
  color: #bc7a02;
}

.tone-red,
.accent-red {
  color: #b82920;
}

.tone-green,
.accent-green {
  color: #2e7a33;
}

.tone-blue {
  color: #1e61b6;
}

.tone-brown,
.accent-brown {
  color: #6e3b11;
}

.accent-blue {
  color: #1e61b6;
}

/* Device layout overrides */
.page {
  width: 100%;
  padding: 14px 12px 75px;
  overflow-x: hidden;
  overflow-y: visible;
}

.header-ink {
  top: 36px;
  right: -21px;
  width: 130px;
  height: 74px;
}

.nav {
  align-items: center;
  min-height: 48px;
}

.nav-menu {
  width: 21px;
  padding-top: 0;
}

.nav-menu view {
  width: 17px;
}

.nav-title {
  min-width: 0;
  margin: 0 7px;
}

.title {
  max-width: 100%;
  overflow: hidden;
  font-size: 22px;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subtitle {
  max-width: 100%;
  margin-top: 4px;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capsule {
  width: 56px;
  height: 25px;
  gap: 6px;
}

.capsule-dot {
  width: 12px;
  height: 12px;
  border-width: 2.5px;
}

.birth-card {
  align-items: flex-start;
  padding: 9px;
}

.birth-main,
.birth-sub {
  white-space: normal;
}

.edit-btn {
  min-width: 42px;
  height: 26px;
  padding: 0;
  line-height: 26px;
  text-align: center;
  background: rgba(255, 255, 255, 0.68);
  border-radius: 7px;
}

.edit-panel {
  padding: 10px;
}

.calendar-row {
  flex-wrap: wrap;
}

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

.edit-grid picker > view,
.edit-grid > view {
  min-height: 44px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.72);
  border: 0.5px solid rgba(31, 48, 42, 0.08);
  border-radius: 8px;
}

.lunar-date-grid {
  gap: 5px;
}

.lunar-date-grid picker > view {
  min-height: 41px;
  padding: 6px 5px;
}

.field-value {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gender-row {
  flex-wrap: wrap;
}

.chart-card,
.report-chart-mini,
.fortune-chart-board {
  border-radius: 8px;
}

.pillar-grid {
  gap: 0;
  padding: 9px 3px 7px;
}

.pillar {
  min-height: 94px;
  padding: 0 2px;
  justify-content: flex-start;
}

.pillar-name {
  margin-bottom: 6px;
  font-size: 11px;
  line-height: 1.2;
}

.pillar-stems,
.pillar-branches {
  gap: 2.5px;
  margin-bottom: 5px;
}

.stem,
.branch {
  font-size: 19px;
}

.god {
  font-size: 9.5px;
  line-height: 1.15;
}

.hidden-stems {
  font-size: 9px;
}

.chart-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  font-size: 11px;
  text-align: left;
}

.chart-meta > text {
  min-height: 29px;
  padding: 8px 9px;
  border-right: 0;
  border-bottom: 0.5px solid rgba(31, 48, 42, 0.08);
}

.chart-meta > text:nth-child(odd) {
  border-right: 0.5px solid rgba(31, 48, 42, 0.08);
}

.chart-meta > text:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.ask-wrap,
.assistant-wrap {
  margin-top: 9px;
  padding-left: 0;
}

.avatar-top,
.avatar-assistant {
  top: 9px;
  left: 9px;
  width: 29px;
  height: 29px;
}

.ask-panel,
.assistant-panel {
  margin-left: 0;
  padding: 11px;
  padding-top: 44px;
  border-radius: 9px;
}

.ask-title {
  font-size: 15px;
}

.question-row {
  min-height: 48px;
  padding: 8px;
}

.question-title {
  font-size: 13.5px;
  line-height: 1.2;
}

.question-desc {
  font-size: 11px;
  line-height: 1.35;
}

.question-arrow {
  padding-left: 5px;
  font-size: 17px;
}

.custom-question {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr) 48px;
  gap: 6px;
  align-items: center;
  margin-top: 9px;
}

.custom-hint {
  min-width: 0;
  overflow: hidden;
  white-space: normal;
}

.custom-input {
  grid-column: 1 / 3;
  width: 100%;
  height: 30px;
}

.custom-send {
  width: 48px;
  height: 30px;
  padding: 0;
  line-height: 30px;
}

.assistant-head {
  padding-left: 0;
}

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

.analysis-main {
  padding: 9px;
}

.analysis-title {
  font-size: 13.5px;
}

.analysis-line {
  font-size: 11.5px;
}

.evidence {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
}

.source-block {
  margin-top: 0;
}

.suggestions button {
  max-width: 100%;
  line-height: 1.2;
}

.result-nav {
  min-height: 44px;
}

.result-title {
  font-size: 17px;
}

.account-strip {
  gap: 6px;
  padding: 8px;
}

.account-strip button {
  min-width: 63px;
  padding: 0 7px;
  font-size: 10.5px;
}

.report-panel,
.fortune-panel,
.chat-panel {
  padding: 12px;
  border-radius: 9px;
}

.report-head {
  align-items: flex-start;
}

.report-title {
  font-size: 18px;
}

.report-section-body,
.fortune-notice,
.chat-msg {
  word-break: break-all;
}

.fortune-head {
  align-items: flex-start;
}

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

.fortune-stepper button {
  height: 32px;
  font-size: 12px;
  line-height: 32px;
}

.fortune-chart-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 8px 4px;
}

.fortune-chart-grid .pillar {
  min-height: 85px;
  padding: 6px 2px;
  border-bottom: 0.5px solid rgba(31, 48, 42, 0.08);
}

.fortune-chart-grid .pillar:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.fortune-chart-grid .pillar:nth-child(3n) {
  border-right: 0;
}

.fortune-chart-grid .stem,
.fortune-chart-grid .branch {
  font-size: 18px;
}

.fortune-pillar-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.fortune-pillar-grid button {
  min-height: 52px;
  padding: 6px 3px;
}

.fortune-pillar-grid text:first-child,
.fortune-pillar-grid text:last-child {
  font-size: 9.5px;
}

.fortune-pillar-grid text:nth-child(2) {
  font-size: 15px;
}

.fortune-card {
  padding: 9px;
}

.chat-input-row {
  gap: 5px;
}

.chat-head {
  align-items: flex-start;
}

.chat-quota {
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.chat-send {
  width: 52px;
}

.primary-cta {
  right: 12px;
  bottom: 17px;
  left: 12px;
  min-height: 39px;
  height: auto;
  padding: 9px 12px;
  font-size: 15px;
  line-height: 1.25;
}

/* Premium mini program redesign */
.page {
  width: 100%;
  padding: 16px 16px 22px;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(9, 54, 51, 0.96) 0, rgba(12, 78, 70, 0.88) 118px, rgba(246, 243, 234, 0) 119px),
    linear-gradient(180deg, #fbf8ef 0%, #f5f1e7 54%, #f1ede2 100%);
}

.header-ink {
  top: 56px;
  right: -18px;
  width: 152px;
  height: 84px;
  opacity: 0.28;
}

.nav {
  align-items: center;
  min-height: 68px;
  gap: 10px;
  color: #fff7e7;
}

.nav-menu {
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  gap: 4px;
  padding-top: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 0.5px solid rgba(255, 246, 224, 0.16);
  border-radius: 8px;
}

.nav-menu view {
  width: 17px;
  background: #f8efd9;
}

.nav-title {
  align-items: flex-start;
  min-width: 0;
  margin: 0;
}

.title {
  max-width: 100%;
  overflow: hidden;
  font-size: 30px;
  line-height: 1.08;
  color: #fff9e8;
  text-overflow: ellipsis;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
}

.subtitle {
  max-width: 100%;
  margin-top: 7px;
  overflow: hidden;
  font-size: 13px;
  color: rgba(255, 246, 224, 0.72);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capsule {
  width: 50px;
  height: 34px;
  flex: 0 0 50px;
  gap: 6px;
  color: #fff8e8;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 246, 224, 0.18);
}

.capsule text {
  display: none;
}

.capsule-divider {
  display: none;
}

.capsule-dot {
  width: 16px;
  height: 16px;
  border-color: #fff8e8;
}

.birth-card-primary {
  align-items: flex-start;
  overflow: hidden;
  margin-top: 8px;
  padding: 17px;
  color: #fff8e8;
  background:
    linear-gradient(135deg, rgba(18, 92, 78, 0.98), rgba(18, 41, 38, 0.98)),
    #12352f;
  border-color: rgba(255, 232, 171, 0.28);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(20, 70, 62, 0.24);
}

.birth-card-primary::after {
  position: absolute;
  right: 14px;
  bottom: 10px;
  content: "AI";
  font-family: Georgia, serif;
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  color: rgba(93, 255, 231, 0.13);
  pointer-events: none;
}

.birth-icon {
  width: 38px;
  height: 38px;
  margin-right: 12px;
  font-size: 18px;
  font-weight: 800;
  color: #13382f;
  background: linear-gradient(135deg, #ffe6a8, #82f6df);
  border-radius: 8px;
}

.birth-copy {
  min-width: 0;
}

.birth-step {
  margin-bottom: 6px;
  font-size: 13px;
  color: #8ef8df;
}

.birth-main {
  font-size: 16px;
  line-height: 1.35;
  color: #fff9e8;
  white-space: normal;
}

.birth-sub {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255, 248, 232, 0.74);
  white-space: normal;
}

.edit-btn {
  min-width: 48px;
  height: 34px;
  padding: 0 8px;
  line-height: 34px;
  color: #12372f;
  background: #ffe1a3;
  border-radius: 8px;
}

.edit-panel,
.chart-card,
.ask-panel,
.assistant-panel {
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(40, 54, 48, 0.08);
}

.edit-panel {
  margin-top: 10px;
  padding: 13px;
  background: rgba(255, 253, 247, 0.94);
  border-color: rgba(24, 61, 51, 0.12);
}

.calendar-chip,
.gender-chip {
  height: 30px;
  min-width: 58px;
  font-size: 13px;
  font-weight: 700;
  background: #f7f3ea;
  border-radius: 8px;
}

.calendar-chip-active,
.gender-chip-active {
  color: #fff;
  background: #0c776d;
  border-color: #0c776d;
  box-shadow: 0 10px 20px rgba(12, 119, 109, 0.16);
}

.edit-grid picker > view,
.edit-grid > view {
  min-height: 70px;
  padding: 11px 12px;
  background: #fffdf8;
  border: 0.5px solid rgba(31, 48, 42, 0.08);
  border-radius: 8px;
}

.field-label {
  font-size: 13px;
  font-weight: 650;
  color: #738079;
}

.field-value {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 720;
  line-height: 1.2;
  color: #1c2925;
}

.edit-note {
  display: none;
}

.chart-card {
  margin-top: 10px;
  overflow: hidden;
  background: #fffdf8;
  border-color: rgba(31, 48, 42, 0.1);
}

.pillar-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 15px 4px 13px;
}

.pillar {
  min-height: 104px;
  overflow: hidden;
}

.pillar-name {
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 700;
  color: #5f6b65;
}

.pillar-stems,
.pillar-branches {
  justify-content: center;
  gap: 3px;
}

.stem,
.branch {
  font-size: 27px;
}

.god {
  font-size: 11px;
  font-weight: 700;
}

.hidden-stems {
  display: none;
}

.chart-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
  font-size: 13px;
  text-align: left;
  background: #f8f3e7;
}

.chart-meta > text {
  min-height: 40px;
  padding: 11px 13px;
  border-right: 0;
  border-bottom: 0.5px solid rgba(31, 48, 42, 0.08);
}

.chart-meta > text:nth-child(odd) {
  border-right: 0.5px solid rgba(31, 48, 42, 0.08);
}

.chart-meta > text:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.ask-wrap,
.assistant-wrap {
  margin-top: 10px;
  padding-left: 0;
}

.avatar-top,
.avatar-assistant {
  display: none;
}

.ask-panel,
.assistant-panel {
  position: relative;
  overflow: hidden;
  margin-left: 0;
  padding: 15px;
  background: rgba(255, 253, 247, 0.96);
  border-color: rgba(31, 48, 42, 0.1);
}

.ask-panel::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, #0c776d, #7ef1d9, #ffe1a3);
}

.ask-title {
  font-size: 20px;
  line-height: 1.2;
}

.ask-subtitle {
  margin-top: 7px;
  font-size: 13px;
}

.question-list {
  margin-top: 13px;
}

.question-row {
  position: relative;
  min-height: 64px;
  margin-bottom: 8px;
  padding: 12px;
  overflow: hidden;
  background: #fffdf8;
  border-color: rgba(31, 48, 42, 0.08);
  border-radius: 8px;
}

.question-row::after {
  position: absolute;
  top: 0;
  right: 38px;
  width: 1px;
  height: 100%;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(12, 119, 109, 0.16), transparent);
}

.question-row-active {
  background: linear-gradient(135deg, rgba(231, 247, 240, 0.98), rgba(255, 250, 238, 0.98));
  border-color: rgba(12, 119, 109, 0.3);
  box-shadow: inset 3px 0 0 #0c776d;
}

.question-icon {
  width: 34px;
  height: 34px;
  margin-right: 11px;
}

.question-title {
  font-size: 16px;
}

.question-desc {
  margin-top: 5px;
  font-size: 13px;
}

.question-arrow {
  font-size: 24px;
}

.custom-question {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 76px;
  gap: 9px;
  margin-top: 12px;
  padding: 11px;
  background: #f8f3e7;
  border: 0.5px solid rgba(31, 48, 42, 0.08);
  border-radius: 8px;
}

.spark {
  width: 30px;
  height: 30px;
  font-size: 14px;
  font-weight: 800;
}

.custom-hint {
  align-self: center;
  font-size: 13px;
}

.custom-input {
  grid-column: 1 / 3;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  background: #fffdf8;
  border-radius: 8px;
}

.custom-send {
  width: 76px;
  height: 40px;
  font-size: 14px;
  line-height: 40px;
  border-radius: 8px;
}

.assistant-panel {
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.96), rgba(248, 243, 231, 0.94));
}

.assistant-panel::before {
  position: absolute;
  top: -78px;
  right: -72px;
  width: 168px;
  height: 168px;
  content: "";
  background: radial-gradient(circle, rgba(126, 241, 217, 0.24), rgba(126, 241, 217, 0));
}

.assistant-head {
  justify-content: space-between;
  padding-left: 0;
}

.assistant-title {
  font-size: 19px;
}

.assistant-title::before {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  content: "";
  background: #7ef1d9;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(126, 241, 217, 0.85);
}

.online {
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.analysis-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.analysis-main {
  position: relative;
  padding: 13px;
  overflow: hidden;
  background: #fffdf8;
  border-color: rgba(12, 119, 109, 0.14);
  border-radius: 8px;
}

.analysis-main::after {
  position: absolute;
  right: 12px;
  bottom: 10px;
  content: "AI";
  font-family: Georgia, serif;
  font-size: 42px;
  font-weight: 800;
  color: rgba(12, 119, 109, 0.07);
}

.analysis-title {
  font-size: 17px;
}

.analysis-line {
  font-size: 13px;
}

.analysis-row {
  padding: 10px 10px 10px 0;
  margin-top: 0;
  border-top: 0.5px solid rgba(31, 48, 42, 0.06);
}

.analysis-row:first-of-type {
  border-top: 0;
}

.analysis-icon {
  width: 26px;
  height: 26px;
}

.analysis-label {
  font-size: 15px;
}

.analysis-text {
  font-size: 13px;
  line-height: 1.42;
}

.evidence {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.evidence-block {
  min-height: 0;
  padding: 12px;
  background: #f8f3e7;
  border-radius: 8px;
}

.evidence-title {
  font-size: 14px;
}

.evidence-text,
.source-chip {
  padding-left: 10px;
  font-size: 12px;
  line-height: 1.38;
  border-left: 2px solid rgba(12, 119, 109, 0.16);
}

.suggestions {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 0.5px solid rgba(31, 48, 42, 0.08);
}

.suggestions > text {
  width: 100%;
  font-size: 13px;
  font-weight: 700;
}

.suggestions button {
  padding: 7px 10px;
  font-size: 13px;
  border-radius: 8px;
}

.primary-cta {
  position: relative;
  right: auto;
  bottom: auto;
  left: auto;
  width: 100%;
  min-height: 50px;
  margin: 12px 0 0;
  padding: 12px;
  font-size: 18px;
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(12, 119, 109, 0.28);
}

.footer-note {
  margin-top: 12px;
  margin-bottom: 0;
}

/* Real-device tightening pass */
.page {
  padding: 38px 14px 18px;
}

.nav {
  min-height: 39px;
  align-items: center;
}

.nav-menu {
  width: 31px;
  height: 31px;
  flex-basis: 31px;
  border-radius: 7px;
}

.title {
  font-size: 24px;
}

.subtitle {
  margin-top: 4px;
  font-size: 11px;
}

.capsule {
  width: 44px;
  height: 28px;
  flex-basis: 44px;
}

.birth-card-primary {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) auto;
  column-gap: 9px;
  align-items: start;
  padding: 12px;
}

.birth-icon {
  width: 29px;
  height: 29px;
  margin-right: 0;
  font-size: 15px;
}

.birth-step {
  margin-bottom: 4px;
  font-size: 12px;
}

.birth-main {
  font-size: 15px;
  line-height: 1.28;
}

.birth-sub {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.28;
}

.edit-btn {
  width: 41px;
  min-width: 41px;
  height: 24px;
  padding: 0;
  font-size: 11px;
  line-height: 24px;
  border-radius: 6px;
}

.edit-panel {
  padding: 11px;
}

.calendar-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

.calendar-chip {
  flex: 1;
  min-width: 0;
  height: 27px;
  font-size: 12px;
  line-height: 27px;
}

.edit-grid {
  gap: 7px;
}

.edit-grid picker > view,
.edit-grid > view {
  min-height: 47px;
  padding: 8px 9px;
}

.field-label {
  font-size: 11.5px;
}

.field-value {
  margin-top: 4px;
  font-size: 14px;
}

.gender-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
}

.gender-chip {
  flex: 1;
  min-width: 0;
  height: 24px;
  font-size: 11.5px;
  line-height: 24px;
}

.chart-card {
  margin-top: 9px;
}

.pillar-grid {
  padding: 13px 3px 11px;
}

.pillar {
  min-height: 92px;
}

.stem,
.branch {
  font-size: 24px;
}

.god {
  font-size: 10px;
}

.chart-meta {
  font-size: 12px;
}

.chart-meta > text {
  min-height: 35px;
  padding: 9px 11px;
}

.ask-panel,
.assistant-panel {
  padding: 14px;
}

.ask-title {
  font-size: 18px;
}

.ask-subtitle {
  font-size: 12px;
}

.question-list {
  width: 100%;
}

.question-row {
  width: 100%;
  min-height: 56px;
  padding: 10px;
}

.question-icon {
  width: 28px;
  height: 28px;
  margin-right: 9px;
}

.question-title {
  font-size: 15px;
}

.question-desc {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.28;
}

.question-arrow {
  font-size: 20px;
}

.custom-question {
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 7px;
  padding: 10px;
}

.spark {
  width: 26px;
  height: 26px;
  font-size: 12px;
}

.custom-hint {
  font-size: 12px;
}

.custom-input {
  grid-column: 1 / 2;
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
}

.custom-send {
  grid-column: 2 / 3;
  justify-self: end;
  width: 58px;
  height: 36px;
  font-size: 13px;
  line-height: 36px;
}

.assistant-title {
  font-size: 18px;
}

.analysis-title {
  font-size: 16px;
}

.analysis-label {
  font-size: 14px;
}

.analysis-text {
  font-size: 12px;
}

.evidence {
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.evidence-block {
  padding: 10px;
}

.evidence-title {
  font-size: 13px;
}

.evidence-text,
.source-chip {
  font-size: 11px;
}

/* Screenshot-driven layout fix */
.edit-panel {
  padding: 10px;
}

.calendar-row {
  margin-bottom: 7px;
}

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

.edit-grid > picker,
.edit-grid > view {
  min-width: 0;
}

.edit-grid > picker:nth-child(1),
.edit-grid > picker:nth-child(2) {
  grid-column: span 3;
}

.edit-grid > view:nth-child(3),
.edit-grid > picker:nth-child(4),
.edit-grid > picker:nth-child(5) {
  grid-column: span 2;
}

.edit-grid picker > view,
.edit-grid > view {
  min-height: 43px;
  padding: 7px 8px;
}

.field-label {
  font-size: 11px;
  line-height: 1.1;
}

.field-value {
  margin-top: 3.5px;
  font-size: 13px;
}

.gender-row {
  gap: 4px;
  margin-top: 4px;
}

.gender-chip {
  height: 20px;
  font-size: 10.5px;
  line-height: 20px;
}

.ask-panel {
  padding: 14px 12px;
}

.question-list {
  display: grid;
  width: 100%;
  gap: 7px;
  align-items: stretch;
}

.question-row {
  display: flex;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 10px;
  align-items: center;
  justify-content: flex-start;
}

.question-copy {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.question-title,
.question-desc {
  display: block;
  text-align: left;
}

.question-title {
  font-size: 14.5px;
}

.question-desc {
  font-size: 11.5px;
}

.custom-question {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 64px;
  gap: 7px;
  align-items: center;
  margin-top: 9px;
  padding: 9px;
}

.spark {
  grid-column: 1;
  grid-row: 1;
}

.custom-hint {
  grid-column: 2 / 4;
  grid-row: 1;
}

.custom-input {
  grid-column: 1 / 3;
  grid-row: 2;
  width: 100%;
  height: 34px;
}

.custom-send {
  grid-column: 3;
  grid-row: 2;
  width: 64px;
  height: 34px;
  line-height: 34px;
}

/* Final fix for real-device ask area */
.ask-panel {
  padding: 13px 12px;
}

.question-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 7px;
  margin-top: 11px;
}

.question-list .question-row {
  display: flex;
  width: 100%;
  max-width: none;
  min-height: 52px;
  margin: 0;
  padding: 9px 10px;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

.question-row::after {
  right: 32px;
}

.question-copy {
  width: 0;
  flex: 1 1 auto;
}

.question-title {
  font-size: 14.5px;
  line-height: 1.2;
}

.question-desc {
  font-size: 11.5px;
  line-height: 1.25;
  white-space: normal;
}

.custom-question {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  gap: 6px;
  margin-top: 9px;
  padding: 9px;
}

.spark {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
}

.custom-hint {
  flex: 1 1 0;
  min-width: 0;
  font-size: 11.5px;
}

.custom-input {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  height: 34px;
}

.custom-send {
  flex: 0 0 56px;
  width: 56px;
  height: 34px;
  line-height: 34px;
}

/* Six-question compact board */
.ask-panel {
  padding: 13px 11px 11px;
}

.ask-title {
  font-size: 17px;
  line-height: 1.15;
}

.ask-subtitle {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
}

.question-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  margin-top: 9px;
}

.question-list .question-row {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  column-gap: 5px;
  width: 100%;
  min-height: 66px;
  margin: 0;
  padding: 9px 8px;
  align-items: center;
  text-align: left;
  border-radius: 8px;
  box-sizing: border-box;
}

.question-list .question-row::after {
  display: none;
}

.question-icon {
  width: 19px;
  height: 19px;
  margin: 0;
}

.question-copy {
  width: auto;
  min-width: 0;
  flex: none;
}

.question-title {
  display: block;
  font-size: 13.5px;
  line-height: 1.18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.question-desc {
  display: -webkit-box;
  margin-top: 3.5px;
  font-size: 10.5px;
  line-height: 1.25;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.question-arrow {
  display: none;
}

.custom-question {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
  box-sizing: border-box;
}

.spark {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  line-height: 22px;
}

.custom-hint {
  flex: 1 1 0;
  min-width: 0;
  font-size: 11px;
}

.custom-input {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  height: 34px;
  box-sizing: border-box;
}

.custom-send {
  flex: 0 0 62px;
  width: 62px;
  height: 34px;
  line-height: 34px;
  margin: 0;
  box-sizing: border-box;
}

/* Final theme and compact lunar editor */
.page {
  background:
    radial-gradient(circle at 12% 0%, rgba(232, 194, 116, 0.22), rgba(250, 247, 239, 0) 125px),
    radial-gradient(circle at 96% 8%, rgba(72, 51, 28, 0.13), rgba(250, 247, 239, 0) 130px),
    linear-gradient(180deg, #faf7ef 0%, #f5efe3 54%, #efe6d7 100%);
}

.header-ink {
  opacity: 0.22;
}

.nav-menu view {
  background: #2a2119;
}

.title {
  color: #221912;
}

.subtitle {
  color: #8a6a3b;
}

.capsule {
  color: #241b13;
  background: rgba(255, 250, 238, 0.82);
  border-color: rgba(76, 51, 23, 0.14);
}

.capsule-divider {
  background: rgba(76, 51, 23, 0.18);
}

.capsule-dot {
  border-color: #2a2119;
}

.birth-card,
.chart-card,
.edit-panel,
.ask-panel,
.assistant-panel {
  border-color: rgba(88, 62, 31, 0.12);
  box-shadow: 0 11px 29px rgba(61, 43, 24, 0.08);
}

.birth-card-primary {
  position: relative;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  column-gap: 8px;
  align-items: start;
  min-height: 0;
  margin-top: 7px;
  padding: 11px 11px 10px;
  overflow: hidden;
  color: #fff8e9;
  background:
    linear-gradient(135deg, rgba(22, 17, 13, 0.99), rgba(52, 38, 24, 0.98) 58%, rgba(102, 72, 32, 0.96)),
    #211812;
  border-color: rgba(236, 197, 117, 0.34);
  border-radius: 9px;
  box-shadow: 0 15px 36px rgba(42, 28, 15, 0.25);
}

.birth-card-primary::after {
  display: none;
}

.birth-icon {
  width: 29px;
  height: 29px;
  margin-right: 0;
  font-size: 14px;
  font-weight: 850;
  color: #23180e;
  background: linear-gradient(135deg, #fff0ba, #d39a37);
  border-radius: 7px;
  box-shadow: 0 5px 12px rgba(211, 154, 55, 0.22);
}

.birth-copy {
  width: 100%;
  min-width: 0;
  padding-right: 0;
}

.birth-step {
  display: block;
  max-width: 100%;
  margin-bottom: 4px;
  padding-right: 71px;
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.15;
  color: #f0c979;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.birth-main {
  display: block;
  max-width: 100%;
  overflow: visible;
  font-size: 15.5px;
  font-weight: 760;
  line-height: 1.26;
  color: #fff8e9;
  text-overflow: clip;
  white-space: normal;
}

.birth-sub {
  display: block;
  max-width: 100%;
  margin-top: 4px;
  overflow: visible;
  font-size: 11.5px;
  line-height: 1.28;
  color: rgba(255, 245, 222, 0.76);
  text-overflow: clip;
  white-space: normal;
}

.edit-btn {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 60px;
  min-width: 60px;
  height: 26px;
  padding: 0;
  font-size: 11.5px;
  font-weight: 750;
  line-height: 26px;
  color: #21160d;
  text-align: center;
  background: linear-gradient(135deg, #ffe8a4, #dba449);
  border-radius: 7px;
  box-shadow: 0 7px 14px rgba(219, 164, 73, 0.25);
}

.edit-btn::after {
  border: 0;
}

.edit-panel {
  margin-top: 7px;
  padding: 9px;
  background: rgba(255, 252, 244, 0.94);
  border-radius: 9px;
}

.calendar-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 6px;
}

.calendar-chip,
.gender-chip {
  color: #6e6255;
  background: #f5efe4;
  border-color: rgba(88, 62, 31, 0.12);
  box-shadow: none;
}

.calendar-chip {
  width: 100%;
  height: 26px;
  min-width: 0;
  padding: 0;
  font-size: 11.5px;
  line-height: 26px;
  border-radius: 7px;
}

.calendar-chip-active,
.gender-chip-active {
  color: #fff8e9;
  background: linear-gradient(135deg, #2a2119, #6c4a20);
  border-color: rgba(214, 160, 69, 0.48);
  box-shadow: 0 7px 14px rgba(62, 40, 19, 0.16);
}

.calendar-chip::after,
.gender-chip::after {
  border: 0;
}

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

.edit-grid > picker,
.edit-grid > view {
  min-width: 0;
}

.edit-grid picker > view,
.edit-grid > view {
  min-height: 38px;
  padding: 6px 7px;
  box-sizing: border-box;
  background: rgba(255, 253, 248, 0.92);
  border: 0.5px solid rgba(88, 62, 31, 0.1);
  border-radius: 7px;
}

.edit-grid-solar > picker:nth-child(1),
.edit-grid-lunar .lunar-date-grid {
  grid-column: 1 / -1;
}

.edit-grid-solar > picker:nth-child(2),
.edit-grid-solar > view:nth-child(3),
.edit-grid-solar > picker:nth-child(4),
.edit-grid-solar > picker:nth-child(5) {
  grid-column: span 3;
}

.edit-grid-lunar .lunar-date-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 0;
  background: transparent;
  border: 0;
}

.edit-grid-lunar .lunar-date-grid picker > view {
  min-height: 38px;
  padding: 6px 7px;
}

.edit-grid-lunar > picker:nth-child(2),
.edit-grid-lunar > view:nth-child(3),
.edit-grid-lunar > picker:nth-child(4),
.edit-grid-lunar > picker:nth-child(5) {
  grid-column: span 3;
}

.field-label {
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.1;
  color: #8d806f;
}

.field-value {
  margin-top: 3px;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 720;
  line-height: 1.12;
  color: #2c2118;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gender-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin-top: 3.5px;
}

.gender-chip {
  flex: 1 1 0;
  min-width: 0;
  height: 19px;
  padding: 0 4px;
  font-size: 10px;
  line-height: 19px;
  border-radius: 499.5px;
}

.edit-note {
  margin-top: 6px;
  color: #9a8c7a;
}

.pillar-grid,
.analysis-main,
.evidence-block,
.question-row {
  background: rgba(255, 253, 248, 0.88);
  border-color: rgba(88, 62, 31, 0.1);
}

.ask-panel::before {
  background: linear-gradient(90deg, #201710, #d7a047, #fff0b7);
}

.question-row-active {
  background: linear-gradient(135deg, rgba(255, 249, 235, 0.98), rgba(242, 229, 205, 0.98));
  border-color: rgba(215, 160, 71, 0.45);
  box-shadow: inset 3px 0 0 #d7a047;
}

.custom-question {
  background: rgba(245, 239, 228, 0.88);
  border-color: rgba(88, 62, 31, 0.1);
}

.spark {
  color: #5c3f18;
  background: #f4dfae;
}

.custom-send {
  color: #fff8e9;
  background: linear-gradient(135deg, #2a2119, #6b491f);
  box-shadow: 0 8px 15px rgba(62, 40, 19, 0.18);
}

.assistant-panel {
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(246, 238, 224, 0.95));
}

.online {
  color: #6a4618;
  background: #f5e4bd;
  border-color: rgba(214, 160, 69, 0.22);
}

.assistant-title,
.analysis-title,
.question-title,
.ask-title {
  color: #251b13;
}

.evidence-title,
.source-chip {
  color: #7a511d;
}

/* Keep the edit toggle from covering birth info */
.birth-card-primary {
  padding-right: 11px;
}

.birth-step,
.birth-main,
.birth-sub {
  padding-right: 66px;
  box-sizing: border-box;
}

.birth-main {
  font-size: 14.5px;
  line-height: 1.22;
}

.birth-sub {
  font-size: 11px;
  line-height: 1.22;
}

.edit-btn {
  top: 9px;
  right: 9px;
  width: 54px;
  min-width: 54px;
  height: 23px;
  font-size: 10.5px;
  line-height: 23px;
  border-radius: 6px;
}

/* Move the edit toggle into the empty lower-right corner */
.birth-step,
.birth-main {
  padding-right: 0;
}

.birth-sub {
  padding-right: 63px;
}

.edit-btn {
  top: auto;
  right: 9px;
  bottom: 9px;
}

/* Minimal text-sized edit toggle */
.edit-btn {
  width: auto;
  min-width: 0;
  height: 19px;
  padding: 0 9px;
  font-size: 10px;
  font-weight: 750;
  line-height: 19px;
  border-radius: 499.5px;
  box-shadow: 0 4px 9px rgba(219, 164, 73, 0.18);
}

.birth-sub {
  padding-right: 44px;
}

/* Hard override: text-only tiny capsule for WeChat button defaults */
.birth-card-primary .edit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  left: auto;
  right: 8px;
  bottom: 8px;
  width: 32px;
  min-width: 32px;
  max-width: 32px;
  height: 17px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  font-size: 9px;
  line-height: 17px;
  white-space: nowrap;
  border-radius: 499.5px;
}

.birth-card-primary .birth-sub {
  padding-right: 36px;
}

/* Narrow-screen safe segmented calendar switch */
.edit-panel {
  overflow: hidden;
}

.calendar-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 0;
  padding: 2.5px;
  box-sizing: border-box;
  overflow: hidden;
  background: #f3eadc;
  border: 0.5px solid rgba(88, 62, 31, 0.12);
  border-radius: 7px;
}

.calendar-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 22px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  font-size: 11px;
  line-height: 22px;
  text-align: center;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: 5px;
  box-shadow: none;
}

.calendar-chip-active {
  background: linear-gradient(135deg, #2a2119, #6c4a20);
  box-shadow: none;
}

/* Hard containment for fortune flow on narrow WeChat devices */
.fortune-panel {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  overflow: hidden !important;
}

.fortune-panel view,
.fortune-panel button,
.fortune-panel text {
  box-sizing: border-box !important;
  max-width: 100%;
}

.fortune-list,
.fortune-chart-board,
.fortune-stepper,
.fortune-brief-grid,
.fortune-pillar-grid,
.fortune-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.fortune-stepper {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px !important;
}

.fortune-stepper button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  min-width: 0 !important;
  height: 28px !important;
  padding: 0 3px !important;
  margin: 0 !important;
  overflow: hidden !important;
  font-size: 11px !important;
  line-height: 28px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fortune-brief {
  width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  padding: 9px !important;
}

.fortune-period,
.fortune-theme,
.fortune-notice,
.fortune-picker-note {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.fortune-pillar-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
}

.fortune-pillar-grid button {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 6px 3px !important;
  overflow: hidden !important;
}

.fortune-chart-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.fortune-chart-grid .pillar {
  min-width: 0 !important;
  border-right: 0.5px solid rgba(31, 48, 42, 0.08);
}

.fortune-chart-grid .pillar:nth-child(3n) {
  border-right: 0;
}

.fortune-chart-meta text {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-all;
}

/* Final containment for gender segmented buttons */
.gender-row {
  align-items: center;
}

.gender-chip {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  min-height: 20px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}


@media (max-width: 360px) {
  #app {
    width: 100vw;
  }
}
