:root {
  --paper: #f7f6f2;
  --white: #fffefa;
  --navy: #172f3d;
  --ink: #283d45;
  --muted: #65726f;
  --line: #dcded5;
  --gold: #8b6c3e;
  --pale: #ebece4;
  --light: #bfcac9;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
header {
  max-width: 1320px;
  margin: auto;
  padding: 27px 52px;
  display: flex;
  align-items: center;
  gap: 64px;
}
.brand {
  font-family: Georgia, "Songti SC", serif;
  font-size: 28px;
  letter-spacing: 3px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 17px;
}
.brand small {
  font: 10px sans-serif;
  letter-spacing: 3px;
  color: var(--gold);
  border-left: 1px solid var(--line);
  padding-left: 17px;
}
nav {
  display: flex;
  gap: 32px;
  align-items: center;
  flex: 1;
  font-size: 13px;
}
nav a {
  padding: 13px 0;
  color: var(--muted);
}
nav a.active {
  color: var(--ink);
}
.header-end {
  display: flex;
  align-items: center;
  gap: 24px;
}
.lang {
  background: none;
  border: 0;
  min-width: 44px;
  min-height: 44px;
  font-size: 12px;
}
.account-link {
  font-size: 12px;
  min-height: 44px;
  display: flex;
  align-items: center;
}
main {
  max-width: 1216px;
  margin: 0 auto;
  padding: 45px 44px 58px;
  min-height: calc(100dvh - 175px);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.21em;
  color: var(--gold);
  font-weight: 500;
  text-transform: uppercase;
}
.entry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.98fr);
  gap: 100px;
  align-items: center;
}
.entry-main h1 {
  font:
    400 46px/1.5 Georgia,
    "Songti SC",
    STSong,
    serif;
  letter-spacing: 0.01em;
  margin: 21px 0 14px;
}
.entry-sub {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 38px;
  line-height: 1.7;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12px;
}
.field.full {
  grid-column: 1/-1;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  padding: 13px 12px;
  color: var(--ink);
  min-height: 49px;
  font-variant-numeric: tabular-nums;
}
input:disabled {
  color: var(--muted);
  background: var(--pale);
}
.form-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 17px 0 26px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
}
.check {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 11px;
}
.check input {
  width: 14px;
  min-height: 14px;
  margin: 0;
  accent-color: var(--navy);
}
.primary {
  background: var(--navy);
  color: var(--white);
  border: 1px solid var(--navy);
  padding: 15px 21px;
  min-height: 50px;
  border-radius: 4px;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 14px;
}
.primary:hover {
  background: #294958;
}
.primary span {
  font-size: 20px;
  font-weight: 300;
}
.wide {
  width: 100%;
}
.privacy-line {
  font-size: 11px;
  text-align: center;
  line-height: 1.7;
  color: var(--muted);
  margin: 13px 0 0;
}
.preview-panel {
  background: var(--navy);
  color: var(--white);
  padding: 29px 36px 25px;
  border-radius: 5px;
  min-height: 542px;
  box-shadow: 0 18px 45px -28px #243a4055;
}
.preview-top {
  display: flex;
  justify-content: space-between;
  color: var(--light);
  font-size: 9px;
  letter-spacing: 0.18em;
}
.preview-title {
  font:
    29px/1.7 Georgia,
    "Songti SC",
    serif;
  margin: 36px 0 24px;
}
.pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  text-align: center;
}
.pillar {
  padding: 12px 3px;
  border-right: 1px solid #ffffff1f;
}
.pillar:last-child {
  border: 0;
}
.pillar span {
  font-size: 10px;
  color: var(--light);
}
.pillar strong {
  display: block;
  font:
    30px/1.65 "Songti SC",
    Georgia,
    serif;
  font-weight: 400;
}
.pillar small {
  display: block;
  color: var(--light);
  font-size: 9px;
  margin-top: 5px;
  min-height: 16px;
}
.pillar.master strong {
  color: #ddc593;
}
.preview-insight {
  border-top: 1px solid #ffffff26;
  padding-top: 23px;
  margin-top: 22px;
}
.preview-insight .eyebrow {
  color: #ddc593;
  font-size: 9px;
}
.preview-insight h2 {
  font:
    19px/1.6 Georgia,
    "Songti SC",
    serif;
  margin: 10px 0;
}
.preview-insight p {
  font-size: 12px;
  color: var(--light);
  line-height: 1.9;
  margin: 0;
  max-width: 300px;
}
.preview-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 28px;
  font-size: 9px;
  color: var(--light);
}
.preview-bottom span {
  letter-spacing: 0.16em;
}
.entry-bottom {
  display: flex;
  align-items: center;
  gap: 35px;
  border-top: 1px solid var(--line);
  margin-top: 49px;
  padding-top: 23px;
  font-size: 12px;
}
.entry-bottom > span {
  color: var(--muted);
  margin-right: auto;
  font-size: 11px;
}
.entry-bottom a {
  min-height: 44px;
  display: flex;
  align-items: center;
}
.result-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -15px;
  margin-bottom: 22px;
}
.link-btn {
  background: none;
  border: 0;
  min-height: 44px;
  padding: 8px 0;
  font-size: 12px;
  color: var(--muted);
}
.save-button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 20px;
  min-height: 44px;
  font-size: 12px;
}
.save-button span {
  margin-left: 20px;
}
.result-heading h1 {
  font:
    35px/1.5 Georgia,
    "Songti SC",
    serif;
  margin: 14px 0;
}
.result-heading > p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}
.sample-label {
  font-size: 10px;
  background: var(--pale);
  padding: 3px 9px;
  border-radius: 3px;
}
.result-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 75px;
  margin-top: 38px;
  align-items: start;
}
.chart-summary {
  padding: 25px 25px 18px;
  background: #efefe8;
  border-radius: 4px;
}
.chart-caption {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 14px;
}
.chart-summary .pillar {
  border-color: var(--line);
}
.chart-summary .pillar strong {
  font-size: 28px;
  color: var(--ink);
}
.chart-summary .pillar.master strong {
  color: var(--gold);
}
.chart-summary .pillar span,
.chart-summary .pillar small {
  color: var(--muted);
}
.day-master {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 20px;
  padding-top: 22px;
}
.day-master > span {
  font:
    50px "Songti SC",
    serif;
  color: var(--gold);
}
.day-master small {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.day-master h2 {
  font:
    23px "Songti SC",
    Georgia,
    serif;
  margin: 7px 0;
}
.help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.85;
}
.chart-summary .help {
  margin: 17px 0;
}
.unknown-note {
  font-size: 12px;
  line-height: 1.7;
  color: var(--gold);
}
details {
  border-top: 1px solid var(--line);
  padding: 15px 0;
  font-size: 12px;
}
summary {
  cursor: pointer;
  line-height: 1.8;
}
details p {
  color: var(--muted);
  line-height: 1.85;
}
.reading-label {
  display: flex;
  justify-content: space-between;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.1em;
}
.reading-label span + span {
  color: var(--muted);
  font-size: 9px;
}
.insight-column > h2 {
  font:
    30px/1.5 Georgia,
    "Songti SC",
    serif;
  margin: 19px 0 15px;
}
.insight-lead {
  font-size: 16px;
  line-height: 1.95;
  color: var(--muted);
  margin: 0 0 18px;
}
.reflection-row {
  display: grid;
  grid-template-columns: 27px 1fr;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 21px 0;
}
.reflection-row > span {
  font: italic 17px Georgia;
  color: var(--gold);
  padding-top: 4px;
}
.reflection-row h3 {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 8px;
}
.reflection-row p {
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
  margin: 0;
}
.question-area {
  margin-top: 29px;
}
.question-area > h3 {
  font:
    20px Georgia,
    "Songti SC",
    serif;
  font-weight: 400;
  margin: 0 0 16px;
}
.composer {
  display: flex;
  align-items: end;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.composer:focus-within {
  border-color: var(--gold);
}
.composer textarea {
  border: 0;
  resize: vertical;
  min-height: 70px;
  padding: 8px 10px;
  background: transparent;
  font-size: 13px;
  line-height: 1.8;
}
.composer textarea:focus {
  outline: none;
}
.send {
  background: var(--navy);
  color: var(--white);
  border: 0;
  border-radius: 4px;
  min-width: 40px;
  min-height: 40px;
  font-size: 22px;
}
.suggestions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.suggestions button {
  background: transparent;
  border: 0;
  font-size: 11px;
  min-height: 40px;
  color: var(--muted);
  padding: 4px 5px;
}
.demo-reply {
  font-size: 13px;
  line-height: 1.8;
  padding: 16px;
  border-left: 2px solid var(--gold);
  margin-top: 10px;
}
.intro h1 {
  font:
    36px/1.5 Georgia,
    "Songti SC",
    serif;
  margin: 18px 0;
}
.intro p {
  line-height: 1.9;
  color: var(--muted);
}
.article {
  max-width: 720px;
  margin: 20px auto 60px;
}
.article h2 {
  font:
    25px/1.6 Georgia,
    "Songti SC",
    serif;
  margin-top: 30px;
}
.article p {
  line-height: 1.9;
  color: var(--muted);
}
.article-list a {
  display: block;
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.article-list h2 {
  font-size: 23px;
  margin: 8px 0;
}
.article-list p {
  font-size: 13px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.saved-item {
  border-top: 1px solid var(--line);
  padding: 30px 0;
}
.empty {
  padding: 50px 0;
}
.empty .primary {
  margin-top: 20px;
}
footer {
  border-top: 1px solid var(--line);
  max-width: 1128px;
  margin: auto;
  padding: 23px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
}
footer a {
  margin-left: 18px;
}
dialog {
  border: 0;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  width: min(430px, calc(100% - 32px));
  padding: 36px;
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 30px 90px #12293733;
}
dialog::backdrop {
  background: #142a3a88;
  backdrop-filter: blur(5px);
}
dialog h2 {
  font:
    32px/1.5 Georgia,
    "Songti SC",
    serif;
  margin: 26px 0 10px;
}
dialog p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 26px;
}
dialog .primary {
  margin: 5px 0 9px;
}
dialog .privacy-line {
  font-size: 10px;
  margin: 6px 0 0;
}
.close {
  float: right;
  border: 0;
  background: none;
  font-size: 23px;
  min-width: 40px;
  min-height: 40px;
  margin: -15px -15px 0 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: var(--white);
  padding: 14px 24px;
  border-radius: 4px;
  max-width: 90vw;
  display: none;
  z-index: 100;
  font-size: 13px;
}
.skip {
  position: absolute;
  top: -100px;
  background: white;
  padding: 12px;
}
.skip:focus {
  top: 8px;
  z-index: 200;
}
.fade {
  animation: appear 0.22s ease-out;
}
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (min-width: 1400px) {
  main {
    padding-top: 63px;
  }
  .entry-grid {
    gap: 110px;
  }
  .entry-main h1 {
    font-size: 49px;
  }
}
@media (max-width: 1050px) {
  header {
    padding: 23px 35px;
    gap: 35px;
  }
  main {
    padding: 32px 35px 40px;
  }
  .entry-grid {
    gap: 45px;
  }
  .entry-main h1 {
    font-size: 37px;
  }
  .preview-panel {
    padding: 27px;
    min-height: 510px;
  }
  .preview-title {
    font-size: 26px;
  }
  .result-grid {
    gap: 38px;
    grid-template-columns: 290px minmax(0, 1fr);
  }
  footer {
    margin: 0 35px;
  }
}
@media (max-width: 760px) {
  header {
    padding: 17px 22px;
    gap: 24px;
  }
  .brand {
    font-size: 25px;
    gap: 10px;
  }
  .brand small {
    font-size: 8px;
    padding-left: 10px;
  }
  nav {
    gap: 20px;
    font-size: 12px;
  }
  .header-end {
    gap: 12px;
  }
  main {
    padding: 26px 24px 36px;
  }
  .entry-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }
  .entry-main {
    max-width: 470px;
    margin: auto;
    width: 100%;
  }
  .entry-main h1 {
    font-size: 38px;
    line-height: 1.45;
    margin: 18px 0 10px;
  }
  .entry-sub {
    margin-bottom: 27px;
    font-size: 14px;
  }
  .preview-panel {
    min-height: 0;
    padding: 28px 30px;
    max-width: 470px;
    width: 100%;
    margin: auto;
  }
  .preview-title {
    font-size: 25px;
    margin: 26px 0 15px;
  }
  .preview-insight h2 {
    font-size: 20px;
  }
  .preview-bottom {
    margin-top: 23px;
  }
  .entry-bottom {
    margin-top: 30px;
    padding-top: 18px;
    gap: 14px;
    flex-wrap: wrap;
  }
  .entry-bottom > span {
    flex-basis: 100%;
  }
  .entry-bottom a {
    font-size: 11px;
  }
  .result-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 25px;
  }
  .chart-summary {
    padding: 20px;
  }
  .chart-summary .pillars {
    max-width: 440px;
    margin: auto;
  }
  .day-master {
    padding-top: 16px;
    margin-top: 15px;
  }
  .chart-summary .help {
    max-width: 440px;
  }
  .result-heading h1 {
    font-size: 29px;
  }
  .insight-column > h2 {
    font-size: 28px;
  }
  .insight-lead {
    font-size: 15px;
  }
  .composer textarea {
    font-size: 16px;
  }
  .result-top {
    margin-top: -10px;
    margin-bottom: 16px;
  }
  footer {
    margin: 0 24px;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 10px;
  }
  .article {
    margin: 10px auto 30px;
  }
  .intro h1 {
    font-size: 30px;
  }
  input,
  select {
    font-size: 16px;
  }
}
@media (max-width: 460px) {
  header {
    padding: 14px 20px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .brand small {
    display: none;
  }
  nav {
    gap: 18px;
    margin-left: 8px;
  }
  .header-end {
    margin-left: auto;
    gap: 5px;
  }
  .account-link {
    font-size: 11px;
  }
  .lang {
    min-width: 40px;
  }
  main {
    padding: 24px 20px 34px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .entry-main h1 {
    font-size: 34px;
  }
  .entry-sub {
    font-size: 13px;
  }
  .fields {
    gap: 17px 12px;
  }
  .field {
    font-size: 11px;
  }
  .form-meta {
    flex-wrap: wrap;
    font-size: 9px;
    row-gap: 12px;
  }
  .check {
    font-size: 11px;
  }
  .preview-panel {
    padding: 24px;
  }
  .preview-title {
    font-size: 26px;
  }
  .preview-top {
    font-size: 8px;
  }
  .pillar strong {
    font-size: 30px;
  }
  .preview-insight p {
    font-size: 12px;
  }
  .result-heading h1 {
    font-size: 27px;
  }
  .reading-label {
    font-size: 9px;
  }
  .save-button {
    padding: 8px 13px;
  }
  .save-button span {
    margin-left: 10px;
  }
  .reflection-row {
    padding: 19px 0;
  }
  .insight-column > h2 {
    font-size: 26px;
  }
  .article h2 {
    font-size: 22px;
  }
  footer {
    margin: 0 20px;
  }
  .send {
    min-width: 44px;
    min-height: 44px;
  }
  .suggestions button {
    min-height: 44px;
  }
  .entry-bottom {
    column-gap: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 760px) {
  .chart-summary .day-master,
  .chart-summary > .help {
    display: none;
  }
  .chart-summary details {
    margin-top: 15px;
    padding-bottom: 0;
  }
  .chart-summary {
    padding: 18px 20px;
  }
  .chart-summary .pillar {
    padding: 7px 3px;
  }
  .chart-summary .pillar strong {
    font-size: 27px;
    line-height: 1.5;
  }
}
/* 公开工具保持原型配色，补足真实结果、长文本和无障碍状态。 */
html {
  scroll-behavior: smooth;
}
body {
  overflow-wrap: anywhere;
}
h1 {
  font:
    400 38px/1.5 Georgia,
    "Songti SC",
    STSong,
    serif;
}
.entry-main h1 {
  font-size: 41px;
}
header .lang {
  display: flex;
  align-items: center;
  justify-content: center;
}
details .fields {
  margin: 18px 0;
}
details .check {
  min-height: 44px;
}
.check {
  min-height: 32px;
}
.check input {
  flex: 0 0 16px;
}
#result:not(:empty) {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding-top: 32px;
  scroll-margin-top: 20px;
}
#result .result-grid {
  margin-top: 20px;
}
#result p {
  line-height: 1.9;
}
#result .actions {
  margin-top: 0;
  gap: 12px;
}
#result .result-top {
  gap: 20px;
  flex-wrap: wrap;
}
#result .pillar span {
  color: var(--muted);
}
#result .pillar strong {
  color: var(--ink);
}
#form-error,
.warnings {
  color: #834327;
  line-height: 1.8;
}
footer span {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
footer a {
  margin: 0;
}
a:hover {
  text-decoration: underline;
}
.article-list a {
  min-height: 48px;
}
.saved-item h2 {
  font-size: 23px;
}
.insight-column p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
}
.primary {
  margin-top: 12px;
}
#status {
  line-height: 1.8;
  color: var(--gold);
}
@media (max-width: 760px) {
  h1 {
    font-size: 30px;
  }
  .entry-main h1 {
    font-size: 34px;
  }
  #result .chart-summary .day-master {
    display: flex;
  }
  #result .result-top {
    align-items: start;
  }
  footer {
    font-size: 12px;
  }
  .lang {
    min-height: 44px;
  }
  nav {
    gap: 16px;
  }
  .header-end {
    gap: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* 与旅程原型一致：成功排盘后直接阅读自己的结果，修改时再展开输入。 */
.has-result .entry-grid {
  display: none;
}
.has-result #result:not(:empty) {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}
/* 出生信息聚合在一个短表单中；日历与时间弹层沿用如如纸色和暖金。 */
.entry-main h1 {
  font-size: 36px;
  line-height: 1.4;
  margin-top: 14px;
  margin-bottom: 12px;
}
.entry-sub {
  margin-bottom: 24px;
}
.birth-form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.birth-form-heading h2 {
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  margin: 0;
}
.birth-form-heading > span {
  font-size: 11px;
  color: var(--muted);
}
.birth-fields {
  gap: 17px;
}
.time-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.time-label-row .check {
  font-size: 12px;
  min-height: 24px;
}
.time-control {
  display: block;
}
.location-summary {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  margin: 10px 0 12px;
}
#advanced {
  padding: 11px 0;
}
#advanced > summary {
  font-size: 12px;
}
#birth-form > .primary {
  margin-top: 12px;
}
.birth-picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 49px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--white);
  text-align: left;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--ink);
}
.birth-picker-trigger > span + span {
  color: var(--gold);
  font-size: 20px;
}
.birth-picker-trigger.is-placeholder {
  color: var(--muted);
}
.birth-picker-trigger[aria-invalid="true"] {
  border-color: #834327;
}
.birth-picker-trigger:disabled {
  opacity: 0.7;
  background: var(--pale);
}
.birth-picker-dialog {
  padding: 23px;
  width: min(390px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 90px #172f3d33;
}
.birth-picker-dialog::backdrop {
  background: #172f3d52;
  backdrop-filter: blur(2px);
}
.picker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.picker-heading h2 {
  font:
    26px/1.4 Georgia,
    "Songti SC",
    serif;
  margin: 0;
}
.picker-close {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  min-width: 44px;
  min-height: 44px;
  font-size: 24px;
  color: var(--muted);
}
.birth-picker-dialog .picker-note {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin: 9px 0 18px;
}
.calendar-navigation {
  display: grid;
  grid-template-columns: 40px minmax(0, 1.1fr) minmax(0, 1fr) 40px;
  gap: 5px;
  align-items: center;
  margin-bottom: 12px;
}
.calendar-navigation > button {
  border: 1px solid var(--line);
  border-radius: 5px;
  min-width: 40px;
  min-height: 44px;
  background: var(--white);
  font-size: 26px;
}
.calendar-navigation label {
  min-width: 0;
}
.calendar-navigation select {
  padding: 9px 7px;
  min-height: 44px;
  font-size: 15px;
}
.calendar-grid {
  display: grid;
  gap: 4px;
}
.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}
.calendar-week > span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  font-size: 11px;
  color: var(--muted);
}
.calendar-week > button {
  min-width: 0;
  min-height: 44px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.calendar-week > button:hover {
  background: var(--pale);
}
.calendar-week > button[aria-selected="true"] {
  background: var(--navy);
  color: var(--white);
}
.calendar-week > button[aria-current="date"] {
  box-shadow: inset 0 0 0 1px var(--gold);
}
.calendar-week > button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}
.birth-picker-dialog .picker-selection {
  font-size: 12px;
  color: var(--muted);
  margin: 16px 0 4px;
  min-height: 20px;
}
.picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 12px;
}
.picker-footer > span {
  font-size: 11px;
  color: var(--muted);
}
.picker-footer .primary {
  margin: 0;
}
.time-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  margin: 24px 0;
}
.time-fields > label {
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.time-fields > span {
  align-self: center;
  text-align: center;
  padding-top: 20px;
  font-size: 22px;
}
.time-fields select {
  font-size: 22px;
  text-align: center;
  min-height: 56px;
}
@media (min-width: 761px) {
  main {
    padding-top: 24px;
    padding-bottom: 30px;
  }
  .entry-grid {
    gap: 80px;
    align-items: center;
  }
  .preview-panel {
    min-height: 510px;
  }
  .entry-bottom {
    margin-top: 28px;
    padding-top: 13px;
  }
  .entry-main h1 {
    font-size: 36px;
  }
  header {
    padding-top: 22px;
    padding-bottom: 22px;
  }
}
@media (min-width: 1400px) {
  main {
    padding-top: 30px;
  }
  .entry-main h1 {
    font-size: 38px;
  }
  .entry-grid {
    gap: 100px;
  }
}
@media (max-width: 760px) {
  .entry-main h1 {
    font-size: 32px;
  }
  .entry-sub {
    margin-bottom: 22px;
  }
  .birth-form-heading {
    margin-bottom: 16px;
  }
  .birth-picker-trigger {
    font-size: 16px;
  }
  .birth-picker-dialog {
    padding: 18px;
  }
  .calendar-week > button {
    min-height: 44px;
  }
  .time-label-row .check {
    font-size: 12px;
  }
}
@media (max-width: 390px) {
  .birth-picker-dialog {
    padding: 15px;
    width: calc(100vw - 20px);
  }
  .calendar-navigation {
    grid-template-columns: 40px minmax(0, 1.1fr) minmax(0, 1fr) 40px;
  }
  .calendar-navigation > button {
    min-width: 40px;
  }
  .calendar-week > button {
    min-height: 44px;
  }
  .picker-heading h2 {
    font-size: 24px;
  }
  .birth-form-heading > span {
    font-size: 10px;
  }
}
/* 地点搜索与日期/时间共用品牌弹层；手机采用可滚动底部面板。 */
#location-trigger strong {
  font-size: 15px;
  font-weight: 500;
  display: block;
}
#location-trigger small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 3px;
}
.location-dialog {
  width: min(480px, calc(100vw - 24px));
  max-height: min(760px, calc(100dvh - 32px));
}
.location-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.location-search-row input {
  font-size: 16px;
  min-width: 0;
}
.location-clear {
  border: 0;
  background: transparent;
  min-width: 44px;
  min-height: 44px;
  font-size: 22px;
  color: var(--muted);
}
.location-dialog .location-search-status {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 14px 0;
  min-height: 20px;
}
#location-options {
  max-height: min(360px, 45dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--line);
}
#location-options button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-height: 70px;
  padding: 12px 13px;
  gap: 3px;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 4px;
}
#location-options button:hover,
#location-options button.is-active {
  background: var(--pale);
}
#location-options strong {
  font-size: 15px;
  font-weight: 500;
}
#location-options span {
  font-size: 12px;
  color: var(--muted);
}
#location-options small {
  font-size: 11px;
  color: var(--muted);
}
#location-options button[aria-selected="true"] {
  box-shadow: inset 3px 0 var(--gold);
}
.location-dialog .location-source {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  margin: 14px 0 0;
}
.location-retry {
  margin: 12px 0;
}
.location-dialog .picker-footer {
  flex-wrap: wrap;
}
.location-dialog .picker-footer button {
  min-height: 44px;
}
.location-dialog .picker-note {
  margin-bottom: 14px;
}
@media (max-width: 600px) {
  .location-dialog {
    width: 100%;
    max-width: 100%;
    max-height: 90dvh;
    margin: auto 0 0;
    border-radius: 16px 16px 0 0;
    padding: 20px 20px calc(16px + env(safe-area-inset-bottom));
    border-bottom: 0;
  }
  #location-options {
    max-height: 42dvh;
  }
  .location-dialog .picker-heading h2 {
    font-size: 25px;
  }
  .location-dialog .location-source {
    font-size: 11px;
  }
}
/* 布局类不能覆盖原生hidden，手工字段仅在明确切换后出现。 */
[hidden] {
  display: none !important;
}
.location-search-row input::-webkit-search-cancel-button {
  display: none;
}
/* 结果以四柱对照为主：字符、拼音和元素文本共同编码，手机无需横滑。 */
.chart-overview {
  display: grid;
  gap: 26px;
  margin: 28px 0;
}
.four-pillars-sheet {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.chart-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.chart-section-heading h3 {
  font:
    400 23px/1.5 Georgia,
    "Songti SC",
    serif;
  margin: 0;
}
.chart-section-heading > span {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}
.four-pillars-sheet > .chart-section-heading {
  padding: 20px 26px;
}
.four-pillars-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  text-align: center;
}
.four-pillars-table col.pillar-row-label {
  width: 76px;
}
.four-pillars-table th {
  font-size: 13px;
  font-weight: 500;
  background: var(--paper);
  padding: 15px 6px;
}
.four-pillars-table td,
.four-pillars-table th {
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.four-pillars-table td:last-child,
.four-pillars-table th:last-child {
  border-right: 0;
}
.four-pillars-table tbody th {
  font-size: 12px;
  color: var(--muted);
}
.pillar-cell {
  position: relative;
  padding: 15px 6px 17px;
  height: 152px;
  vertical-align: middle;
}
.pillar-cell strong {
  display: block;
  font:
    400 51px/1.2 "Songti SC",
    STSong,
    Georgia,
    serif;
  color: var(--element-color, var(--ink));
}
.symbol-pinyin {
  display: block;
  font:
    14px/1.5 Georgia,
    serif;
  color: var(--ink);
  margin-top: 7px;
}
.symbol-element {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 2px;
}
.four-pillars-table .day-column {
  background: #f3eee4;
}
.master-tag {
  display: inline-block;
  margin-top: 7px;
  font-size: 10px;
  line-height: 1.5;
  color: var(--gold);
  border: 1px solid #d5c5a9;
  border-radius: 3px;
  padding: 1px 6px;
}
.pillar-open strong {
  color: var(--muted);
}
.pillar-open small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}
.chart-footnote {
  font-size: 12px;
  line-height: 1.85;
  color: var(--muted);
  margin: 16px 0 0;
}
.four-pillars-sheet > .chart-footnote {
  padding: 0 26px 18px;
  margin-top: 15px;
}
.chart-uncertainty {
  color: var(--gold);
}
.chart-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 26px;
}
.day-master-summary {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
  padding: 28px;
  background: #efefe8;
  border-radius: 6px;
}
.day-master-symbol {
  text-align: center;
  padding-top: 10px;
}
.day-master-symbol strong {
  font:
    400 76px/1 "Songti SC",
    STSong,
    serif;
  color: var(--element-color, var(--muted));
  display: block;
}
.day-master-symbol > span {
  display: block;
  font:
    15px/1.5 Georgia,
    serif;
  color: var(--muted);
  margin-top: 12px;
}
.day-master-summary h3 {
  font:
    400 27px/1.5 Georgia,
    "Songti SC",
    serif;
  margin: 11px 0;
}
.day-master-summary p {
  font-size: 13px;
  line-height: 1.95;
  color: var(--muted);
  margin: 0;
}
.surface-elements {
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.surface-element-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
.surface-element-row {
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr) 40px;
  gap: 13px;
  align-items: center;
  min-height: 22px;
}
.element-label {
  font-size: 13px;
  color: var(--element-color, var(--ink));
}
.element-count {
  text-align: right;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.element-count small {
  font-size: 10px;
  color: var(--muted);
}
.surface-element-row meter {
  width: 100%;
  height: 12px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--pale);
  border: 0;
  border-radius: 8px;
  overflow: hidden;
}
.surface-element-row meter::-webkit-meter-bar {
  background: var(--pale);
  border: 0;
  border-radius: 8px;
}
.surface-element-row meter::-webkit-meter-optimum-value {
  background: var(--element-color, var(--navy));
  border-radius: 8px;
}
.surface-element-row meter::-moz-meter-bar {
  background: var(--element-color, var(--navy));
  border-radius: 8px;
}
.element-unavailable {
  grid-column: 2/4;
  color: var(--muted);
  text-align: right;
}
.element-wood {
  --element-color: #4e6d54;
}
.element-fire {
  --element-color: #a14e37;
}
.element-earth {
  --element-color: #80673d;
}
.element-metal {
  --element-color: #596c7b;
}
.element-water {
  --element-color: #3d6986;
}
.result-notes {
  border-top: 1px solid var(--line);
  padding: 20px 0 22px;
}
.result-notes h3 {
  font:
    400 22px/1.5 Georgia,
    "Songti SC",
    serif;
  margin: 0 0 12px;
}
.result-notes .actions {
  margin: 12px 0 0;
}
#result .result-birth-summary {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}
.chart-candidates {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 24px;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.8;
}
.result-top h2 {
  font:
    400 30px/1.5 Georgia,
    "Songti SC",
    serif;
  margin: 0;
}
.result-top .actions {
  flex-wrap: wrap;
}
#result .result-top {
  margin-bottom: 10px;
}
@media (max-width: 760px) {
  .chart-overview {
    gap: 20px;
    margin-top: 22px;
  }
  .four-pillars-sheet > .chart-section-heading {
    padding: 17px 18px;
  }
  .chart-section-heading h3 {
    font-size: 21px;
  }
  .chart-section-heading > span {
    font-size: 10px;
  }
  .four-pillars-table col.pillar-row-label {
    width: 54px;
  }
  .four-pillars-table th {
    font-size: 12px;
    padding: 12px 3px;
  }
  .four-pillars-table tbody th {
    font-size: 11px;
  }
  .pillar-cell {
    padding: 15px 3px;
    height: 128px;
  }
  .pillar-cell strong {
    font-size: 36px;
  }
  .symbol-pinyin {
    font-size: 12px;
    margin-top: 6px;
  }
  .symbol-element {
    font-size: 11px;
  }
  .master-tag {
    font-size: 9px;
    padding: 1px 3px;
  }
  .four-pillars-sheet > .chart-footnote {
    padding: 0 17px 16px;
    font-size: 11px;
  }
  .chart-summary-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .day-master-summary {
    grid-template-columns: 80px minmax(0, 1fr);
    padding: 23px 20px;
    gap: 16px;
  }
  .day-master-symbol strong {
    font-size: 64px;
  }
  .day-master-summary h3 {
    font-size: 25px;
  }
  .day-master-summary p {
    font-size: 13px;
  }
  .surface-elements {
    padding: 20px;
  }
  .surface-element-row {
    grid-template-columns: 49px minmax(0, 1fr) 40px;
    gap: 11px;
  }
  .result-top h2 {
    font-size: 26px;
  }
  .result-top .actions {
    gap: 8px !important;
  }
  .result-top .save-button {
    font-size: 12px;
    padding: 10px 12px;
  }
  .result-birth-summary {
    font-size: 12px !important;
  }
  .pillar-open small {
    font-size: 9px;
    line-height: 1.5;
  }
  .chart-candidates {
    font-size: 13px;
  }
  #result > .result-top {
    align-items: start;
  }
}
@media (max-width: 390px) {
  .four-pillars-table col.pillar-row-label {
    width: 54px;
  }
  .four-pillars-table th {
    font-size: 11px;
  }
  .pillar-cell strong {
    font-size: 33px;
  }
  .master-tag {
    font-size: 8px;
  }
  .symbol-pinyin {
    font-size: 11px;
  }
  .symbol-element {
    font-size: 10px;
  }
  .four-pillars-sheet > .chart-section-heading {
    padding: 14px;
  }
  .chart-section-heading h3 {
    font-size: 20px;
  }
}

.result-notes .actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.four-pillars-table tbody th {
  white-space: nowrap;
  padding-left: 2px;
  padding-right: 2px;
}
/* 结果三层阅读：概览、关系、时间。选中与今年分别标记。 */
#result .result-top {
  padding: 22px 26px;
  background: #172f3d;
  color: #f7f6f2;
  border-radius: 8px 8px 0 0;
  margin: 0;
  gap: 16px;
}
#result .result-top h2 {
  color: inherit;
  font-size: 27px;
}
#result .result-top .save-button,
#result .result-top .link-btn {
  color: #f7f6f2;
  border-color: #62737b;
  background: transparent;
  min-height: 44px;
}
.result-birth-summary {
  margin: 0;
  padding: 14px 26px;
  background: #eeeae1;
  line-height: 1.8;
}
.result-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding: 10px 0;
  margin: 8px 0;
  border-bottom: 1px solid var(--line);
}
.result-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--gold);
  font-size: 13px;
}
#chart-overview,
#chart-relations,
#chart-timing {
  scroll-margin-top: 24px;
}
.chart-overview {
  gap: 18px;
  margin: 20px 0 32px;
}
.pillar-cell {
  height: 128px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.four-pillars-sheet > .chart-section-heading {
  padding: 14px 24px;
}
.four-pillars-table th {
  padding-top: 11px;
  padding-bottom: 11px;
}
.day-master-summary {
  padding: 22px;
  gap: 18px;
}
.surface-elements {
  padding-top: 18px;
  padding-bottom: 18px;
}
.natal-relations,
#chart-timing {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.section-number {
  display: block;
  color: var(--gold);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.natal-relation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
  border: 1px solid var(--line);
  background: #faf9f5;
}
.relation-card {
  padding: 20px;
  min-width: 0;
  border-right: 1px solid var(--line);
}
.relation-card:last-child {
  border-right: 0;
}
.relation-day {
  background: #f3eee4;
}
.relation-card h4 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  font-weight: 400;
  font-size: 13px;
}
.relation-card h4 strong {
  font:
    400 26px "Songti SC",
    serif;
}
.stem-relation {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
  font-size: 13px;
}
.stem-relation > span,
.relation-label {
  font-size: 11px;
  color: var(--muted);
}
.stem-relation strong {
  font-weight: 500;
}
.hidden-stems ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}
.hidden-stems li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.hidden-stem-symbol {
  white-space: nowrap;
  font-family: "Songti SC", serif;
  font-size: 18px;
}
.hidden-stem-symbol small {
  font:
    11px Georgia,
    serif;
  color: var(--muted);
}
.hidden-stems li > span:last-child {
  text-align: right;
}
.chart-explainer {
  margin-top: 15px;
  font-size: 13px;
}
#result summary {
  min-height: 44px;
  align-content: center;
  cursor: pointer;
}
.luck-onset {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 20px 0;
  font-size: 12px;
  line-height: 1.8;
}
.luck-onset strong {
  color: var(--gold);
}
.decade-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}
.decade-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 15px 5px;
  min-height: 166px;
  border: 1px solid #d8d7cf;
  border-top: 3px solid #d8d7cf;
  border-radius: 4px;
  background: #fbfaf7;
  color: var(--ink);
  cursor: pointer;
}
.decade-option strong {
  font:
    400 28px "Songti SC",
    serif;
}
.decade-option span,
.decade-option small {
  font-size: 10px;
  line-height: 1.5;
}
.decade-option em {
  font-size: 9px;
  font-style: normal;
  color: var(--gold);
}
.decade-option.is-selected {
  border-color: var(--gold);
  border-top-color: var(--gold);
  background: #f0eadf;
  box-shadow: inset 0 0 0 1px var(--gold);
}
.selected-decade {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.selected-decade h4 {
  margin: 5px 0;
  font:
    400 26px "Songti SC",
    serif;
}
.selected-decade h4 small {
  font:
    12px/1.5 system-ui,
    sans-serif;
}
.selected-decade p {
  font-size: 12px;
  line-height: 1.8;
  margin: 6px 0 0;
}
.selected-decade details {
  min-width: 170px;
  font-size: 12px;
}
.timing-empty {
  margin: 20px 0;
  padding: 20px;
  background: #efefe8;
  font-size: 13px;
}
.timing-empty p {
  margin: 8px 0;
}
.timing-empty .link-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--gold);
}
.year-controls {
  display: flex;
  gap: 8px;
  align-items: end;
  margin: 24px 0 16px;
}
.year-controls label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
}
.year-controls input {
  width: 122px;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 16px;
  border: 1px solid #aaa99e;
  background: #fbfaf7;
  border-radius: 4px;
  color: var(--ink);
}
.year-controls button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid #c5c3b9;
  border-radius: 4px;
  color: var(--ink);
  cursor: pointer;
}
.year-controls button:disabled {
  opacity: 0.35;
  cursor: default;
}
.annual-year-grid {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 6px;
}
.annual-year-grid button {
  min-height: 72px;
  padding: 8px 3px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.annual-year-grid button strong {
  font-size: 12px;
  font-weight: 500;
}
.annual-year-grid button span {
  font:
    18px "Songti SC",
    serif;
}
.annual-year-grid button small {
  font-size: 9px;
}
.annual-year-grid button.is-selected {
  border-color: var(--gold);
  background: #172f3d;
  color: #f7f6f2;
}
#timing-message {
  margin: 12px 0;
  font-size: 13px;
  color: var(--gold);
}
.annual-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 32px;
  margin-top: 24px;
  padding: 24px;
  background: #eeeee7;
  border-left: 3px solid var(--gold);
}
.annual-pillar h4 {
  font:
    400 40px "Songti SC",
    serif;
  margin: 10px 0 20px;
}
.annual-pillar h4 small {
  font:
    13px Georgia,
    serif;
  color: var(--muted);
}
.annual-pillar .hidden-stems {
  max-width: 330px;
}
.year-segments h4 {
  font:
    400 19px/1.5 Georgia,
    "Songti SC",
    serif;
  margin: 0;
}
.year-segments .chart-footnote {
  margin-top: 10px;
}
.year-segments ol {
  list-style: none;
  padding: 0 0 0 15px;
  margin: 20px 0 0;
  border-left: 1px solid #b5a181;
}
.year-segments li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  padding: 0 0 22px;
  overflow-wrap: anywhere;
}
.year-segments li:before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  left: -19px;
  top: 7px;
  background: var(--gold);
}
.year-segments li:last-child {
  padding-bottom: 0;
}
.year-segments li strong {
  font:
    400 21px "Songti SC",
    serif;
}
@media (max-width: 1000px) {
  .decade-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .annual-year-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  #result .result-top {
    padding: 20px 18px;
  }
  #result .result-top h2 {
    font-size: 25px;
  }
  .result-birth-summary {
    padding: 12px 18px;
    font-size: 12px;
  }
  .result-nav {
    gap: 4px 16px;
  }
  .result-nav a {
    font-size: 12px;
  }
  .pillar-cell {
    height: 116px;
  }
  .day-master-summary {
    padding: 18px;
  }
  .chart-summary-grid {
    gap: 14px;
  }
  .natal-relation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .relation-card {
    padding: 16px 12px;
  }
  .relation-card:nth-child(2) {
    border-right: 0;
  }
  .relation-card:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .relation-card h4 {
    margin-bottom: 16px;
  }
  .hidden-stems li {
    gap: 5px;
    font-size: 11px;
  }
  .hidden-stem-symbol {
    font-size: 17px;
  }
  .hidden-stem-symbol small {
    font-size: 10px;
  }
  .natal-relations > .chart-section-heading {
    align-items: start;
  }
  .natal-relations > .chart-section-heading > span {
    max-width: 90px;
  }
  .luck-onset {
    gap: 4px 12px;
    font-size: 11px;
  }
  .decade-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .decade-option {
    min-height: 160px;
  }
  .decade-option span,
  .decade-option small {
    font-size: 11px;
  }
  .selected-decade {
    flex-direction: column;
    gap: 10px;
  }
  .selected-decade p time {
    display: block;
  }
  .annual-year-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .annual-detail {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 20px 16px;
  }
  .year-controls {
    gap: 6px;
    flex-wrap: wrap;
  }
  .year-controls button {
    padding-left: 10px;
    padding-right: 10px;
  }
  .year-controls input {
    width: 112px;
  }
  .birth-fields small {
    line-height: 1.7;
  }
}

.decade-option:disabled {
  opacity: 0.5;
  cursor: default;
}
