:root {
  --paper: #f3eee3;
  --paper-deep: #e8dfcf;
  --ivory: #fbf8f0;
  --ink: #20352d;
  --ink-soft: #455b52;
  --ink-faint: #78867d;
  --jade: #426a59;
  --jade-dark: #29493d;
  --jade-pale: #dce7df;
  --cinnabar: #ae4636;
  --cinnabar-dark: #84372c;
  --gold: #b38a50;
  --gold-pale: #e6d6b9;
  --line: rgba(37, 58, 48, 0.12);
  --line-strong: rgba(37, 58, 48, 0.2);
  --white-line: rgba(255, 255, 255, 0.16);
  --shadow: 0 20px 60px rgba(53, 47, 37, 0.09);
  --serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.sheet-open,
body.loading {
  overflow: hidden;
}

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

button,
summary,
label,
select {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

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

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

input::placeholder {
  color: #9b9e94;
}

[hidden] {
  display: none !important;
}

svg {
  display: block;
}

.page-texture {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 92% 7%, rgba(183, 139, 80, 0.11), transparent 22rem),
    radial-gradient(circle at -8% 40%, rgba(66, 106, 89, 0.075), transparent 25rem),
    linear-gradient(180deg, #f5f0e6 0%, #f2ecdf 48%, #f5f1e8 100%);
}

.page-texture::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.21;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.page-texture::after {
  content: "";
  position: absolute;
  top: 7rem;
  right: -12rem;
  width: 30rem;
  height: 30rem;
  border: 1px solid rgba(66, 106, 89, 0.07);
  border-radius: 50%;
  box-shadow:
    0 0 0 5rem rgba(66, 106, 89, 0.018),
    0 0 0 10rem rgba(66, 106, 89, 0.012);
}

.topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: max(10px, env(safe-area-inset-top)) 20px 10px;
  border-bottom: 1px solid rgba(37, 58, 48, 0.08);
  background: rgba(244, 239, 229, 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand-seal {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px 11px 11px 3px;
  color: #fff8ee;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 42%),
    var(--cinnabar);
  box-shadow: inset 0 0 0 1px rgba(255, 244, 227, 0.24), 0 8px 18px rgba(133, 55, 44, 0.17);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.12em;
  line-height: 1.2;
}

.brand-copy small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 7px;
  letter-spacing: 0.19em;
}

.topbar-actions {
  display: flex;
  gap: 9px;
  align-items: center;
}

.icon-button,
.round-menu {
  display: grid;
  position: relative;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 252, 245, 0.62);
}

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

.favorite-count {
  display: grid;
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  place-items: center;
  border: 2px solid var(--paper);
  border-radius: 9px;
  color: white;
  background: var(--cinnabar);
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

.favorite-count:empty,
.favorite-count[data-count="0"] {
  opacity: 0;
}

.round-menu {
  font-family: var(--serif);
  font-size: 17px;
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 22px 30px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  animation: rise-in 0.7s both;
}

.eyebrow {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--cinnabar);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow > span {
  display: block;
  width: 24px;
  height: 1px;
  background: currentColor;
}

.eyebrow b {
  font-weight: 650;
}

.eyebrow.light {
  color: rgba(246, 225, 192, 0.82);
}

.hero h1 {
  margin: 18px 0 18px;
  font-family: var(--serif);
  font-size: clamp(46px, 14vw, 72px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1.06;
}

.hero h1 em {
  position: relative;
  color: var(--jade);
  font-style: normal;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 6px;
  left: 5px;
  height: 7px;
  opacity: 0.45;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  filter: blur(5px);
}

.hero-copy > p {
  max-width: 32rem;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.9;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 24px;
}

.hero-points span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.hero-points span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cinnabar);
}

.hero-visual {
  position: relative;
  width: min(70vw, 300px);
  height: min(70vw, 300px);
  margin: 4px auto 0;
  border-radius: 50%;
  opacity: 0;
  animation: fade-in 1.3s 0.3s forwards;
}

.hero-visual::before,
.hero-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.hero-visual::before {
  inset: 12%;
  border: 1px dashed rgba(66, 106, 89, 0.19);
  animation: slow-spin 40s linear infinite;
}

.hero-visual::after {
  inset: 30%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.56), transparent 38%),
    linear-gradient(145deg, rgba(79, 120, 102, 0.93), rgba(35, 71, 57, 0.97));
  box-shadow:
    0 28px 55px rgba(44, 76, 64, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(66, 106, 89, 0.13);
}

.orbit-one {
  inset: 0;
}

.orbit-two {
  inset: 20%;
}

.orbit-core {
  display: grid;
  position: absolute;
  z-index: 2;
  inset: 37%;
  place-items: center;
  color: #f4e8d2;
  font-family: var(--serif);
  font-size: clamp(30px, 10vw, 44px);
}

.orbit-core::before,
.orbit-core::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.16);
}

.orbit-core::before {
  width: 1px;
  height: 170%;
}

.orbit-core::after {
  width: 170%;
  height: 1px;
}

.orbit-label {
  display: grid;
  position: absolute;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(66, 106, 89, 0.18);
  border-radius: 50%;
  color: var(--jade);
  background: rgba(245, 239, 228, 0.9);
  font-family: var(--serif);
  font-size: 12px;
}

.label-top {
  top: 2%;
  left: calc(50% - 15px);
}

.label-right {
  top: calc(50% - 15px);
  right: 3%;
}

.label-bottom {
  bottom: 2%;
  left: calc(50% - 15px);
}

.label-left {
  top: calc(50% - 15px);
  left: 3%;
}

.orbit-note {
  position: absolute;
  right: -13px;
  bottom: 24px;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: 0.23em;
  writing-mode: vertical-rl;
}

.form-section,
.results {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 18px 16px 40px;
}

.section-heading {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin: 0 5px 20px;
}

.section-index {
  display: grid;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  margin-top: 3px;
  place-items: center;
  border: 1px solid rgba(174, 70, 54, 0.45);
  border-radius: 50%;
  color: var(--cinnabar);
  font-family: var(--serif);
  font-size: 13px;
}

.section-kicker {
  margin: 0 0 2px;
  color: var(--cinnabar);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.18em;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 6.6vw, 30px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.naming-form {
  overflow: hidden;
  border: 1px solid rgba(37, 58, 48, 0.11);
  border-radius: 26px 26px 26px 6px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 251, 243, 0.44)),
    var(--ivory);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.form-block {
  position: relative;
  padding: 22px 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
}

.form-block.first-block {
  padding-top: 26px;
}

.form-block.compact {
  padding: 18px 0;
}

.field-label-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}

.field-label-row label,
.field-label-row > .group-label,
.form-block > legend {
  color: var(--ink);
  font-size: 13px;
  font-style: normal;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.field-label-row > span:not(.group-label),
.form-block > legend small {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 400;
}

.form-block > legend {
  padding: 0;
  margin-bottom: 12px;
}

.surname-input-wrap {
  display: flex;
  align-items: center;
  border-bottom: 1.5px solid var(--jade);
}

.surname-input-wrap input {
  flex: 1;
  width: 100%;
  height: 64px;
  padding: 0 2px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--serif);
  font-size: 34px;
  letter-spacing: 0.12em;
}

.surname-input-wrap:focus-within {
  border-bottom-color: var(--cinnabar);
}

.input-hint {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--jade);
  background: var(--jade-pale);
  font-family: var(--serif);
  font-size: 12px;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: rgba(36, 59, 49, 0.055);
}

.segmented-control label {
  cursor: pointer;
}

.segmented-control input,
.choice-chips input,
.inline-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 13px;
  transition: 0.2s ease;
}

.segmented-control input:checked + span {
  border-color: rgba(37, 58, 48, 0.06);
  color: var(--jade-dark);
  background: #fffdf7;
  box-shadow: 0 4px 13px rgba(48, 50, 40, 0.075);
  font-weight: 650;
}

.text-button {
  padding: 3px 0;
  border: 0;
  color: var(--cinnabar);
  background: transparent;
  font-size: 10px;
}

.field-grid {
  display: grid;
  gap: 9px;
}

.date-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.field-card {
  display: flex;
  position: relative;
  flex-direction: column;
  min-width: 0;
  padding: 10px 12px 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.56);
}

.field-card:focus-within {
  border-color: rgba(66, 106, 89, 0.44);
  box-shadow: 0 0 0 3px rgba(66, 106, 89, 0.06);
}

.field-card > span {
  margin-bottom: 1px;
  color: var(--ink-faint);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.field-card input {
  width: 100%;
  min-width: 0;
  height: 31px;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
  font-weight: 550;
}

.field-tip {
  margin: 9px 1px 0;
  color: var(--ink-faint);
  font-size: 10px;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  width: 100%;
  min-height: 50px;
  padding: 0 42px 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  appearance: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.56);
  font-size: 16px;
}

.select-wrap select:focus {
  border-color: rgba(66, 106, 89, 0.44);
}

.select-wrap svg {
  position: absolute;
  top: calc(50% - 9px);
  right: 15px;
  width: 18px;
  fill: none;
  stroke: var(--ink-faint);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
  pointer-events: none;
}

.advanced {
  border-bottom: 1px solid var(--line);
}

.advanced summary {
  display: flex;
  min-height: 72px;
  padding: 18px 20px;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
}

.advanced summary::-webkit-details-marker {
  display: none;
}

.advanced summary > span:first-child {
  display: flex;
  flex-direction: column;
}

.advanced summary b {
  font-size: 13px;
}

.advanced summary small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9px;
}

.summary-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 300;
  transition: transform 0.25s ease;
}

.advanced[open] .summary-icon {
  transform: rotate(45deg);
}

.advanced-content {
  padding: 0 20px 20px;
  animation: reveal 0.25s ease both;
}

.inline-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.inline-options label {
  cursor: pointer;
}

.inline-options span {
  display: grid;
  min-height: 43px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.42);
  font-size: 12px;
}

.inline-options input:checked + span {
  border-color: rgba(66, 106, 89, 0.35);
  color: var(--jade-dark);
  background: var(--jade-pale);
  font-weight: 650;
}

.choice-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-chips label {
  cursor: pointer;
}

.choice-chips span {
  display: inline-grid;
  min-width: 54px;
  min-height: 38px;
  padding: 0 13px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.42);
  font-size: 11px;
}

.choice-chips input:checked + span {
  border-color: var(--jade);
  color: #f7f0e2;
  background: var(--jade);
}

.plain-input {
  width: 100%;
  min-height: 47px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: rgba(255, 255, 255, 0.55);
  font-size: 16px;
}

.plain-input:focus {
  border-color: rgba(66, 106, 89, 0.44);
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.switch-row > span {
  display: flex;
  flex-direction: column;
}

.switch-row b {
  font-size: 12px;
}

.switch-row small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 9px;
}

.switch-row input {
  position: absolute;
  opacity: 0;
}

.switch-row i {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: #c8ccc5;
  transition: background 0.22s ease;
}

.switch-row i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(30, 43, 36, 0.2);
  transition: transform 0.22s ease;
}

.switch-row input:checked + i {
  background: var(--jade);
}

.switch-row input:checked + i::after {
  transform: translateX(18px);
}

.privacy-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 15px 20px 0;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.55;
}

.privacy-note svg {
  flex: 0 0 auto;
  width: 16px;
  fill: none;
  stroke: var(--jade);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.primary-submit {
  display: none;
  position: relative;
  width: calc(100% - 40px);
  min-height: 58px;
  margin: 20px;
  overflow: hidden;
  border: 0;
  border-radius: 15px 15px 15px 4px;
  color: #fff9f0;
  background:
    linear-gradient(110deg, transparent 0 42%, rgba(255, 255, 255, 0.07) 42% 58%, transparent 58%),
    var(--jade-dark);
  box-shadow: 0 14px 28px rgba(36, 72, 58, 0.18);
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.11em;
}

.button-mark {
  display: grid;
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #e6cfaa;
  font-size: 11px;
}

.submit-caption {
  display: none;
  margin: -7px 20px 22px;
  color: var(--ink-faint);
  text-align: center;
  font-size: 9px;
}

.floating-submit {
  display: flex;
  position: fixed;
  z-index: 40;
  right: 16px;
  bottom: calc(14px + var(--safe-bottom));
  left: 16px;
  min-height: 56px;
  padding: 0 19px 0 24px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px 16px 16px 4px;
  color: #fff8ec;
  background:
    radial-gradient(circle at 90% 0, rgba(197, 160, 97, 0.18), transparent 35%),
    var(--jade-dark);
  box-shadow: 0 18px 40px rgba(32, 62, 50, 0.27);
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.09em;
}

.floating-submit svg {
  width: 20px;
  fill: none;
  stroke: #ead8b8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.method-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  max-width: 960px;
  margin: 20px auto 58px;
  padding: 0 18px;
}

.method-strip div {
  display: flex;
  position: relative;
  flex-direction: column;
  min-width: 0;
  padding: 16px 10px;
  border-top: 1px solid var(--line-strong);
}

.method-strip span {
  margin-bottom: 6px;
  color: var(--cinnabar);
  font-family: var(--serif);
  font-size: 9px;
}

.method-strip b {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
}

.method-strip small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
  line-height: 1.5;
}

.results {
  padding-top: 8px;
  animation: fade-in 0.5s both;
}

.result-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.back-button {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 38px;
  padding: 0 12px 0 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.42);
  font-size: 10px;
}

.back-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.result-date {
  color: var(--ink-faint);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.result-intro {
  display: flex;
  position: relative;
  min-height: 205px;
  padding: 27px 22px;
  align-items: flex-end;
  justify-content: space-between;
  overflow: hidden;
  border-radius: 26px 26px 26px 6px;
  color: #f8f1e3;
  background:
    radial-gradient(circle at 91% 16%, rgba(215, 179, 113, 0.25), transparent 27%),
    radial-gradient(circle at 60% 110%, rgba(121, 163, 144, 0.28), transparent 38%),
    linear-gradient(145deg, #315c4b, #1d3c30 72%);
  box-shadow: 0 20px 45px rgba(36, 70, 56, 0.2);
}

.result-intro::before,
.result-intro::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(237, 230, 211, 0.1);
  border-radius: 50%;
}

.result-intro::before {
  top: -50px;
  right: -42px;
  width: 190px;
  height: 190px;
  box-shadow: 0 0 0 28px rgba(237, 230, 211, 0.018), 0 0 0 56px rgba(237, 230, 211, 0.014);
}

.result-intro::after {
  right: 50px;
  bottom: -110px;
  width: 170px;
  height: 170px;
}

.result-intro > div {
  position: relative;
  z-index: 1;
}

.result-intro h2 {
  margin: 21px 0 6px;
  font-family: var(--serif);
  font-size: clamp(27px, 8vw, 42px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.result-intro p {
  max-width: 22rem;
  margin: 0;
  color: rgba(247, 239, 225, 0.68);
  font-family: var(--serif);
  font-size: 11px;
}

.name-count {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  white-space: nowrap;
}

.name-count strong {
  color: #e2c58f;
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 400;
  line-height: 1;
}

.name-count span {
  margin-top: 4px;
  color: rgba(247, 239, 225, 0.62);
  font-size: 9px;
}

.bazi-panel {
  position: relative;
  margin-top: 14px;
  padding: 22px 18px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 252, 246, 0.66);
  box-shadow: 0 13px 35px rgba(57, 54, 44, 0.06);
}

.bazi-panel::after {
  content: "四时";
  position: absolute;
  top: 12px;
  right: 17px;
  color: rgba(37, 58, 48, 0.05);
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1;
  pointer-events: none;
}

.panel-title-row {
  display: flex;
  position: relative;
  z-index: 1;
  align-items: flex-start;
  justify-content: space-between;
}

.panel-eyebrow {
  color: var(--cinnabar);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.17em;
}

.panel-title-row h3 {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.zodiac-pill {
  display: inline-flex;
  min-height: 29px;
  padding: 0 11px;
  align-items: center;
  border: 1px solid rgba(174, 70, 54, 0.2);
  border-radius: 15px;
  color: var(--cinnabar);
  background: rgba(174, 70, 54, 0.045);
  font-size: 9px;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin: 17px 0;
}

.pillar {
  position: relative;
  padding: 10px 3px 9px;
  border: 1px solid rgba(37, 58, 48, 0.09);
  border-radius: 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.45);
}

.pillar.highlight {
  border-color: rgba(174, 70, 54, 0.25);
  background: rgba(174, 70, 54, 0.045);
}

.pillar > span {
  display: block;
  color: var(--ink-faint);
  font-size: 8px;
}

.pillar b {
  display: block;
  margin: 4px 0 1px;
  font-family: var(--serif);
  font-size: clamp(22px, 6.5vw, 30px);
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.25;
}

.pillar small {
  color: var(--jade);
  font-size: 8px;
}

.balance-reading {
  display: flex;
  gap: 12px;
  padding: 12px 13px;
  align-items: flex-start;
  border-left: 2px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: rgba(187, 150, 89, 0.06);
}

.balance-reading span {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.balance-reading p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 10px;
  line-height: 1.7;
}

.element-chart {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 17px;
}

.element-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.element-item .element-track {
  display: flex;
  width: 5px;
  height: 45px;
  overflow: hidden;
  align-items: flex-end;
  border-radius: 3px;
  background: rgba(37, 58, 48, 0.07);
}

.element-item .element-fill {
  width: 100%;
  min-height: 4px;
  border-radius: 3px;
  background: var(--bar);
}

.element-item b {
  margin-top: 5px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 10px;
  font-weight: 600;
}

.element-item small {
  color: var(--ink-faint);
  font-size: 8px;
}

.element-item[data-element="木"] { --bar: #6e9574; }
.element-item[data-element="火"] { --bar: #bb6650; }
.element-item[data-element="土"] { --bar: #b08f5d; }
.element-item[data-element="金"] { --bar: #928b7c; }
.element-item[data-element="水"] { --bar: #52788b; }

.solar-detail {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--ink-faint);
  font-size: 8px;
  text-align: center;
}

.names-heading {
  margin-top: 44px;
}

.ai-summary {
  display: flex;
  position: relative;
  gap: 13px;
  padding: 17px 16px;
  align-items: flex-start;
  border: 1px solid rgba(66, 106, 89, 0.12);
  border-radius: 17px;
  background:
    linear-gradient(120deg, rgba(220, 231, 223, 0.55), rgba(255, 255, 255, 0.38));
}

.ai-symbol {
  display: grid;
  position: relative;
  flex: 0 0 auto;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 11px 11px 11px 3px;
  color: #f7ecda;
  background: var(--jade);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ai-symbol i {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #e6ca91;
}

.ai-summary > div:last-child {
  min-width: 0;
}

.ai-summary-label {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ai-summary-label b {
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 650;
}

.ai-summary-label span {
  color: var(--ink-faint);
  font-size: 8px;
}

.ai-summary p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 10px;
  line-height: 1.75;
}

.names-list {
  display: grid;
  gap: 12px;
  margin-top: 17px;
}

.name-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: rgba(255, 252, 246, 0.76);
  box-shadow: 0 10px 28px rgba(53, 50, 40, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.name-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: transparent;
}

.name-card:first-child {
  border-color: rgba(187, 142, 80, 0.3);
  background:
    radial-gradient(circle at 101% -5%, rgba(216, 182, 117, 0.2), transparent 35%),
    linear-gradient(145deg, rgba(255, 253, 246, 0.92), rgba(246, 239, 226, 0.72));
  box-shadow: 0 20px 45px rgba(66, 61, 45, 0.09);
}

.name-card:first-child::before {
  background: var(--gold);
}

.name-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 13px;
  padding: 18px 16px 14px;
  align-items: start;
}

.name-title-row {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}

.rank-number {
  display: grid;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  margin-top: 5px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 9px;
}

.name-card:first-child .rank-number {
  border-color: var(--gold);
  color: var(--gold);
}

.name-name {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(31px, 9vw, 40px);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.18;
  white-space: nowrap;
}

.name-pinyin {
  display: block;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.name-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.name-tags span {
  display: inline-flex;
  min-height: 20px;
  padding: 0 7px;
  align-items: center;
  border-radius: 10px;
  color: var(--jade);
  background: rgba(66, 106, 89, 0.075);
  font-size: 8px;
}

.name-tags span:first-child {
  color: var(--cinnabar);
  background: rgba(174, 70, 54, 0.065);
}

.score-orbit {
  display: grid;
  position: relative;
  width: 65px;
  height: 65px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--score-color) calc(var(--score) * 1%), rgba(37, 58, 48, 0.08) 0);
}

.score-orbit::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #faf6ed;
}

.score-orbit > span {
  position: relative;
  z-index: 1;
  text-align: center;
}

.score-orbit b {
  display: block;
  color: var(--jade-dark);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
}

.score-orbit small {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 7px;
}

.name-desc {
  margin: 0 16px;
  padding: 12px 0 13px;
  border-top: 1px solid var(--line);
}

.name-desc p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 10px;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.ai-reviewed {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin-bottom: 5px;
  color: var(--jade);
  font-family: var(--sans);
  font-size: 7px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.ai-reviewed::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(66, 106, 89, 0.08);
}

.name-card-footer {
  display: flex;
  min-height: 43px;
  padding: 0 14px 0 16px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(37, 58, 48, 0.07);
  background: rgba(37, 58, 48, 0.018);
}

.mini-metrics {
  display: flex;
  gap: 12px;
}

.mini-metric {
  display: flex;
  flex-direction: column;
}

.mini-metric span {
  color: var(--ink-faint);
  font-size: 7px;
}

.mini-metric b {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 600;
}

.card-actions {
  display: flex;
  gap: 4px;
}

.card-action {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--ink-soft);
  background: transparent;
}

.card-action svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

.card-action.favorited {
  color: var(--cinnabar);
}

.card-action.favorited svg {
  fill: currentColor;
}

.retry-card {
  display: flex;
  gap: 18px;
  margin-top: 28px;
  padding: 22px;
  align-items: center;
  justify-content: space-between;
  border-radius: 19px 19px 19px 5px;
  color: #f7eddd;
  background:
    radial-gradient(circle at 98% 0, rgba(205, 171, 110, 0.2), transparent 33%),
    var(--jade-dark);
}

.retry-card span {
  color: rgba(247, 237, 221, 0.6);
  font-size: 9px;
}

.retry-card h3 {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
}

.retry-card button {
  flex: 0 0 auto;
  min-height: 39px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  color: #f2dfbf;
  background: rgba(255, 255, 255, 0.05);
  font-size: 10px;
}

.about-section {
  max-width: 760px;
  margin: 58px auto 0;
  padding: 54px 28px 46px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.about-seal {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 18px;
  place-items: center;
  border: 1px solid rgba(174, 70, 54, 0.35);
  border-radius: 50%;
  color: var(--cinnabar);
  font-family: var(--serif);
  font-size: 18px;
}

.about-section h2 {
  margin: 9px 0 13px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
}

.about-section > p:not(.section-kicker) {
  max-width: 38rem;
  margin: 0 auto;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.9;
}

.about-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 30px;
}

.about-metrics span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 13px 6px;
  color: var(--ink-faint);
  border-right: 1px solid var(--line);
  font-size: 8px;
}

.about-metrics span:last-child {
  border-right: 0;
}

.about-metrics b {
  color: var(--jade);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
}

footer {
  padding: 30px 24px calc(95px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.footer-brand span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 6px 6px 6px 2px;
  color: #fff5e7;
  background: var(--cinnabar);
  font-family: var(--serif);
  font-size: 12px;
}

.footer-brand b {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.08em;
}

footer p {
  margin: 9px 0 15px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 10px;
}

footer small {
  color: var(--ink-faint);
  font-size: 8px;
}

.loading-screen {
  display: grid;
  position: fixed;
  z-index: 100;
  inset: 0;
  padding: 22px;
  place-items: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(248, 242, 230, 0.94), rgba(232, 223, 206, 0.97));
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  animation: fade-in 0.25s ease both;
}

.loading-paper {
  width: min(100%, 420px);
  text-align: center;
}

.loading-orbit {
  position: relative;
  width: 168px;
  height: 168px;
  margin: 0 auto 25px;
}

.loading-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(66, 106, 89, 0.18);
  border-radius: 50%;
  animation: slow-spin 8s linear infinite;
}

.loading-ring::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(174, 70, 54, 0.2);
  border-radius: 50%;
}

.loading-ring::after {
  content: "";
  position: absolute;
  top: -3px;
  left: calc(50% - 3px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cinnabar);
  box-shadow: 0 0 13px rgba(174, 70, 54, 0.45);
}

.loading-core {
  display: grid;
  position: absolute;
  inset: 48px;
  place-items: center;
  border-radius: 50%;
  color: #f7ecd9;
  background: var(--jade-dark);
  box-shadow: 0 17px 38px rgba(42, 77, 62, 0.25);
  font-family: var(--serif);
  font-size: 29px;
}

.load-element {
  display: grid;
  position: absolute;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--jade);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 10px;
}

.load-element.one { top: 3px; left: calc(50% - 13px); }
.load-element.two { top: 31px; right: 9px; }
.load-element.three { right: 19px; bottom: 14px; }
.load-element.four { bottom: 14px; left: 19px; }
.load-element.five { top: 31px; left: 9px; }

.loading-kicker {
  margin: 0 0 5px;
  color: var(--cinnabar);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.16em;
}

.loading-paper h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
}

.loading-paper > p:not(.loading-kicker) {
  min-height: 20px;
  margin: 7px 0 20px;
  color: var(--ink-faint);
  font-size: 10px;
}

.loading-progress {
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(37, 58, 48, 0.09);
}

.loading-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--jade), var(--gold));
  transition: width 0.65s ease;
}

.loading-steps {
  display: flex;
  gap: 30px;
  margin-top: 15px;
  justify-content: center;
}

.loading-steps span {
  position: relative;
  color: #a7aca4;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.loading-steps span.active {
  color: var(--jade);
}

.loading-steps span.active::before {
  content: "";
  position: absolute;
  top: calc(50% - 2px);
  left: -10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cinnabar);
}

.sheet-layer {
  position: fixed;
  z-index: 90;
  inset: 0;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(24, 39, 32, 0.43);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fade-in 0.2s ease both;
}

.bottom-sheet {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: min(90dvh, 780px);
  padding: 19px 20px calc(24px + var(--safe-bottom));
  overflow: auto;
  border-radius: 26px 26px 0 0;
  background:
    radial-gradient(circle at 96% 0, rgba(205, 171, 110, 0.11), transparent 25%),
    var(--paper);
  box-shadow: 0 -20px 50px rgba(25, 38, 31, 0.18);
  animation: sheet-up 0.3s cubic-bezier(0.22, 0.78, 0.24, 1) both;
  overscroll-behavior: contain;
}

.sheet-handle {
  width: 38px;
  height: 4px;
  margin: -7px auto 18px;
  border-radius: 2px;
  background: rgba(37, 58, 48, 0.17);
}

.sheet-close {
  display: grid;
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.42);
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
}

.detail-name {
  margin-right: 38px;
}

.detail-name h2 {
  margin: 3px 0 4px;
  font-family: var(--serif);
  font-size: 43px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.detail-name p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.detail-score-line {
  display: flex;
  gap: 14px;
  margin: 21px 0;
  align-items: center;
}

.detail-score {
  display: flex;
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(174, 70, 54, 0.2);
  border-radius: 50%;
  color: var(--cinnabar);
  background: rgba(174, 70, 54, 0.04);
}

.detail-score b {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
}

.detail-score span {
  margin-top: 3px;
  font-size: 7px;
}

.detail-score-copy {
  min-width: 0;
}

.detail-score-copy b {
  font-family: var(--serif);
  font-size: 14px;
}

.detail-score-copy p {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.55;
}

.detail-section {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.detail-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 11px;
}

.detail-section-title h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}

.detail-section-title span {
  color: var(--ink-faint);
  font-size: 8px;
}

.detail-review {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.9;
}

.score-bars {
  display: grid;
  gap: 10px;
}

.score-bar-row {
  display: grid;
  grid-template-columns: 38px 1fr 25px;
  gap: 9px;
  align-items: center;
}

.score-bar-row > span,
.score-bar-row > b {
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 500;
}

.score-bar-row > b {
  text-align: right;
}

.score-track {
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(37, 58, 48, 0.08);
}

.score-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jade), #8fa790);
}

.detail-char-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.detail-char {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.38);
}

.detail-char > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.detail-char b {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
}

.detail-char span,
.detail-char small {
  color: var(--ink-faint);
  font-size: 8px;
}

.detail-char p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 9px;
}

.five-grid-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.five-grid-item {
  padding: 8px 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: center;
}

.five-grid-item span {
  display: block;
  color: var(--ink-faint);
  font-size: 7px;
}

.five-grid-item b {
  display: block;
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 9px;
  margin-top: 18px;
}

.detail-actions button,
.sheet-primary {
  min-height: 49px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.44);
  font-size: 12px;
}

.detail-actions .primary,
.sheet-primary {
  border-color: var(--jade-dark);
  color: #fbf2e3;
  background: var(--jade-dark);
}

.sheet-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin: 2px 38px 18px 0;
}

.sheet-heading h2 {
  margin: 3px 0 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
}

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

.favorite-row {
  display: flex;
  padding: 12px 13px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.4);
}

.favorite-row > div {
  display: flex;
  gap: 11px;
  align-items: center;
}

.favorite-row strong {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.07em;
}

.favorite-row span {
  color: var(--ink-faint);
  font-size: 9px;
}

.favorite-row button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--cinnabar);
  background: rgba(174, 70, 54, 0.06);
}

.empty-state {
  padding: 46px 20px;
  color: var(--ink-faint);
  text-align: center;
  font-family: var(--serif);
  font-size: 12px;
}

.empty-state span {
  display: block;
  margin-bottom: 9px;
  color: var(--gold);
  font-size: 32px;
}

.info-sheet {
  text-align: center;
}

.info-mark {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 8px auto 14px;
  place-items: center;
  border-radius: 15px 15px 15px 4px;
  color: #fff4e4;
  background: var(--cinnabar);
  font-family: var(--serif);
  font-size: 21px;
}

.info-sheet h2 {
  margin: 0 auto 10px;
  max-width: 20rem;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.45;
}

.info-sheet > p {
  margin: 0 auto 20px;
  max-width: 24rem;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 10px;
  line-height: 1.8;
}

.info-rules {
  text-align: left;
}

.info-rules p {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

.info-rules b {
  font-size: 10px;
}

.info-rules span {
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.65;
}

.sheet-primary {
  width: 100%;
  margin-top: 18px;
}

.toast {
  position: fixed;
  z-index: 120;
  bottom: calc(86px + var(--safe-bottom));
  left: 50%;
  max-width: calc(100vw - 40px);
  padding: 10px 16px;
  border-radius: 20px;
  color: #fff7eb;
  background: rgba(31, 55, 45, 0.94);
  box-shadow: 0 8px 25px rgba(25, 42, 34, 0.22);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: 0.25s ease;
  white-space: nowrap;
}

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

.fade-out {
  opacity: 0;
  transform: translateY(-8px);
  transition: 0.25s ease;
}

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

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

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slow-spin {
  to { transform: rotate(360deg); }
}

@keyframes sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@media (min-width: 600px) {
  .topbar {
    height: 76px;
    padding-right: 32px;
    padding-left: 32px;
  }

  .hero {
    grid-template-columns: 1.25fr 0.75fr;
    gap: 20px;
    align-items: center;
    padding: 64px 34px 44px;
  }

  .hero-visual {
    width: min(34vw, 300px);
    height: min(34vw, 300px);
  }

  .form-section,
  .results {
    padding-right: 28px;
    padding-left: 28px;
  }

  .form-block {
    padding: 25px 30px;
  }

  .advanced summary {
    padding-right: 30px;
    padding-left: 30px;
  }

  .advanced-content {
    padding-right: 30px;
    padding-left: 30px;
  }

  .privacy-note {
    padding-right: 30px;
    padding-left: 30px;
  }

  .primary-submit {
    display: block;
    width: calc(100% - 60px);
    margin: 23px 30px;
  }

  .submit-caption {
    display: block;
    margin-right: 30px;
    margin-left: 30px;
  }

  .floating-submit {
    display: none;
  }

  footer {
    padding-bottom: 34px;
  }

  .name-count {
    display: flex;
  }

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

  .name-card:first-child {
    grid-column: span 2;
  }

  .name-card:first-child .name-card-main {
    padding: 24px 24px 18px;
  }

  .name-card:first-child .name-desc {
    margin-right: 24px;
    margin-left: 24px;
  }

  .name-card:first-child .name-card-footer {
    padding-right: 18px;
    padding-left: 24px;
  }

  .result-intro {
    padding: 34px;
  }

  .bazi-panel {
    padding: 28px;
  }

  .element-chart {
    gap: 12px;
  }

  .element-item .element-track {
    width: 7px;
    height: 55px;
  }

  .bottom-sheet {
    right: 50%;
    left: auto;
    width: min(92vw, 600px);
    padding-right: 28px;
    padding-left: 28px;
    border-radius: 28px 28px 0 0;
    transform: translateX(50%);
  }

  .topbar .brand-copy small {
    font-size: 8px;
  }
}

@media (min-width: 960px) {
  .topbar {
    padding-right: max(48px, calc((100vw - 1180px) / 2));
    padding-left: max(48px, calc((100vw - 1180px) / 2));
  }

  .hero {
    padding-top: 82px;
    padding-bottom: 68px;
  }

  .hero h1 {
    font-size: 78px;
  }

  .hero-copy > p {
    font-size: 16px;
  }

  .hero-visual {
    width: 320px;
    height: 320px;
    margin-left: auto;
  }

  .form-section {
    padding-top: 34px;
  }

  .naming-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .form-block.first-block,
  .advanced,
  .privacy-note,
  .primary-submit,
  .submit-caption {
    grid-column: 1 / -1;
  }

  .form-block {
    padding: 24px 28px;
  }

  .form-block:nth-of-type(2) {
    border-right: 1px solid var(--line);
  }

  .form-block:nth-of-type(3) {
    border-right: 1px solid var(--line);
  }

  .advanced-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 28px;
    padding-bottom: 24px;
  }

  .advanced-content .form-block {
    padding: 18px 0;
  }

  .advanced-content .switch-row {
    grid-column: 1 / -1;
  }

  .primary-submit {
    width: calc(100% - 56px);
    max-width: 560px;
    margin-right: auto;
    margin-left: auto;
  }

  .submit-caption {
    margin-right: auto;
    margin-left: auto;
  }

  .method-strip {
    margin-bottom: 80px;
  }

  .method-strip div {
    padding: 22px 18px;
  }

  .method-strip b {
    font-size: 15px;
  }

  .method-strip small {
    font-size: 9px;
  }

  .results {
    max-width: 980px;
  }

  .result-intro {
    min-height: 225px;
  }

  .bazi-panel {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 10px 28px;
    align-items: center;
  }

  .panel-title-row,
  .pillars,
  .balance-reading {
    grid-column: 1;
  }

  .element-chart,
  .solar-detail {
    grid-column: 2;
  }

  .element-chart {
    grid-row: 1 / 3;
    margin-top: 0;
  }

  .solar-detail {
    align-self: end;
    margin-top: 0;
  }

  .pillars {
    margin-bottom: 0;
  }

  .name-card-main {
    padding: 21px 20px 16px;
  }

  .name-desc {
    min-height: 75px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
