:root {
  color-scheme: dark;
  --video-black: #02060a;
  --ink: var(--video-black);
  --gold: #d2b978;
  --gold-bright: #f1dca4;
  --gold-dim: rgba(210, 185, 120, 0.48);
  --line: rgba(199, 173, 120, 0.28);
}

@font-face {
  font-family: "Source Han Serif Taichu";
  src: url("./assets/fonts/SourceHanSerifSC-VF.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; background: var(--video-black); }

body {
  margin: 0;
  overflow: hidden;
  color: var(--gold);
  font-family: "Songti SC", "STSong", "SimSun", serif;
}

button, select, input { font: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.experience, .scene { position: relative; width: 100%; height: 100cqh; min-height: 640px; background: var(--video-black); }

.scene { position: fixed; inset: 0; overflow: hidden; isolation: isolate; background: var(--video-black); container-type: size; }

.scene__ambient-base, .scene__video, .scene__shade, .scene__grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene__ambient-base {
  object-fit: cover;
  object-position: 50% 50%;
  transform: scale(1.015);
  transform-origin: 50% 50%;
}

.scene__video {
  background: var(--video-black);
  object-fit: cover;
  object-position: 50% 50%;
  transform: scale(1.015);
}

.scene__video--ambient {
  inset: auto;
  opacity: 1;
  object-fit: fill;
  object-position: initial;
  transform-origin: 50% 50%;
  -webkit-mask-image: radial-gradient(ellipse 72% 78% at 50% 50%, #000 0%, #000 68%, rgba(0, 0, 0, 0.94) 78%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 78% at 50% 50%, #000 0%, #000 68%, rgba(0, 0, 0, 0.94) 78%, transparent 100%);
}
.scene__video--transition, .scene__video--second { opacity: 0; visibility: hidden; will-change: opacity; }
.scene__video--second { mix-blend-mode: plus-lighter; }

/*
 * Align the 1168x768 standby source to the 1280x720 transition coordinate
 * system. Values are normalized from the two source frames, so alignment
 * remains stable when object-cover changes crop direction.
 */
@media (max-aspect-ratio: 16 / 9) {
  .scene__video--ambient {
    width: 140.5914cqh;
    height: 92.4437cqh;
    left: calc(50cqw - 77.3614cqh);
    top: 4.2062cqh;
  }
}

@media (min-aspect-ratio: 16 / 9) {
  .scene__video--ambient {
    width: 79.0827cqw;
    height: 51.9996cqw;
    left: 6.4842cqw;
    top: calc(50cqh - 25.759cqw);
  }
}

@supports (width: 1cqw) {
  .hero { padding-top: 4cqh; }
  .hero__trigger { width: min(560px, 86cqw); min-height: min(500px, 64cqh); }
  .hero-title-group { --title-offset-y: clamp(-22px, -1.2cqh, -10px); max-width: 82cqw; }
  .hero-title { gap: clamp(36px, 2.8cqw, 108px); font-size: clamp(76px, 4.95cqw, 190px); }
  .hero-subtitle { gap: clamp(8px, 0.7cqw, 22px); margin-top: clamp(21px, 1.55cqw, 56px); font-size: clamp(13px, 0.94cqw, 36px); }
  .mystic-field { width: clamp(210px, 13.5cqw, 270px); }
  .birth-form, .bazi-result { width: min(390px, 31cqw); }
  .birth-form { left: clamp(48px, 4.5cqw, 108px); width: min(660px, 38cqw); }
  .bazi-result { right: clamp(82px, 11.8cqw, 190px); }
  .pillar strong { font-size: clamp(34px, 3cqw, 46px); }
}

html.is-touch-landscape .scene__video--ambient {
  width: 79.0827cqw;
  height: 51.9996cqw;
  left: 6.4842cqw;
  top: calc(50cqh - 25.759cqw);
}

.scene__shade {
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 4, 8, 0.68) 0%, rgba(0, 4, 8, 0.4) 23%, rgba(0, 4, 8, 0.06) 39%, transparent 46%, transparent 54%, rgba(0, 4, 8, 0.06) 61%, rgba(0, 4, 8, 0.4) 77%, rgba(0, 4, 8, 0.68) 100%),
    linear-gradient(180deg, rgba(0, 4, 8, 0.18) 0%, transparent 45%, rgba(0, 4, 8, 0.25) 100%);
}

.scene__grain {
  z-index: 3;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: soft-light;
  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='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
}

.side-rail {
  position: absolute;
  z-index: 8;
  top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: rgba(211, 187, 136, 0.7);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  pointer-events: none;
}

.side-rail--left { left: 38px; }
.side-rail--right { right: 38px; }
.side-rail__menu { font-size: 12px; transform: scaleX(1.3); opacity: 0.62; }
.side-rail i { width: 1px; height: 72px; margin: 4px 0 18px; background: linear-gradient(var(--gold), transparent); }
.side-rail__nine { margin-bottom: 18px; }
.side-rail__words { line-height: 2.2; text-align: center; }

.hero {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  padding-top: 4cqh;
}

.hero__trigger {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(560px, 86cqw);
  min-height: min(500px, 64cqh);
  border: 0;
  padding: 24px 42px;
  color: var(--gold);
  background: transparent;
  cursor: pointer;
  text-shadow: 0 0 24px rgba(228, 196, 126, 0.24);
  will-change: transform;
}

.hero__trigger::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 9%;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, rgba(66, 156, 158, 0.12), rgba(9, 39, 47, 0.08) 42%, transparent 70%);
  filter: blur(15px);
  transition: opacity 900ms ease, transform 1100ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-title-group {
  --title-offset-y: clamp(-22px, -1.2cqh, -10px);
  position: relative;
  z-index: 2;
  display: flex;
  width: max-content;
  max-width: 82cqw;
  flex-direction: column;
  align-items: center;
  isolation: isolate;
  transform: translate3d(0, var(--title-offset-y), 0);
}

.hero-title-group::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 47%;
  width: 160%;
  height: 150%;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(31, 91, 91, 0.055), rgba(3, 12, 16, 0) 68%);
  filter: blur(10px);
  transform: translate(-50%, -50%);
}

.hero-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(36px, 2.8cqw, 108px);
  margin: 0;
  font-family: "Source Han Serif Taichu", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  font-size: clamp(76px, 4.95cqw, 190px);
  font-weight: 250;
  font-variation-settings: "wght" 250;
  line-height: 1;
  letter-spacing: 0;
  transform: scaleX(0.94);
  transform-origin: center;
}

.hero-title__glyph {
  display: block;
  color: rgba(199, 181, 139, 0.9);
  background: linear-gradient(180deg, rgba(218, 207, 177, 0.96) 0%, rgba(199, 181, 139, 0.93) 48%, rgba(168, 146, 101, 0.88) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 11px rgba(0, 0, 0, 0.55));
  opacity: 0.94;
}

.hero__trigger:hover::before, .hero__trigger:focus-visible::before { opacity: 0.14; transform: scale(1.03); }
.hero__trigger:focus-visible { outline: 1px solid rgba(241, 220, 164, 0.58); outline-offset: -12px; }

.hero-subtitle {
  display: grid;
  gap: clamp(8px, 0.7cqw, 22px);
  margin-top: clamp(21px, 1.55cqw, 56px);
  color: rgba(184, 164, 120, 0.8);
  font-family: "Source Han Serif Taichu", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  font-size: clamp(13px, 0.94cqw, 36px);
  font-weight: 240;
  font-variation-settings: "wght" 240;
  line-height: 1;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.52);
  opacity: 0.9;
}

.hero-subtitle span {
  display: block;
  letter-spacing: 0.58em;
  text-indent: 0.58em;
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-title-group {
    animation: void-title-reveal 1.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-subtitle {
    animation: void-subtitle-reveal 1.35s 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}

@keyframes void-title-reveal {
  from {
    opacity: 0;
    filter: blur(7px);
    transform: translate3d(0, calc(var(--title-offset-y) + 12px), 0) scale(0.985);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, var(--title-offset-y), 0) scale(1);
  }
}

@keyframes void-subtitle-reveal {
  from { opacity: 0; transform: translate3d(0, 8px, 0); }
  to { opacity: 0.84; transform: translate3d(0, 0, 0); }
}

.mystic-field {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: clamp(210px, 13.5cqw, 270px);
  aspect-ratio: 1;
  opacity: 0.72;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 700ms ease;
  will-change: transform, opacity;
}

.mystic-field::before {
  content: "";
  position: absolute;
  inset: 27%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(87, 191, 187, 0.11), rgba(25, 99, 104, 0.04) 45%, transparent 72%);
  filter: blur(7px);
}

.mystic-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0.88;
  background: conic-gradient(from 208deg, rgba(77, 186, 184, 0.86) 0 17%, transparent 18% 58%, rgba(204, 184, 135, 0.5) 59% 65%, transparent 66% 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1.5px));
  transition: opacity 850ms ease;
  will-change: transform, opacity;
}

.mystic-ring--middle {
  inset: 18%;
  opacity: 0.72;
  background: conic-gradient(from 26deg, rgba(81, 193, 190, 0.72) 0 13%, transparent 14% 52%, rgba(218, 196, 143, 0.38) 53% 59%, transparent 60% 100%);
}

.mystic-ring--inner {
  inset: 33%;
  opacity: 0.62;
  background: conic-gradient(from 164deg, rgba(105, 210, 202, 0.78) 0 20%, transparent 21% 72%, rgba(210, 188, 134, 0.36) 73% 80%, transparent 81% 100%);
}

.mystic-beacon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(181, 229, 219, 0.92);
  box-shadow: 0 0 9px rgba(98, 213, 207, 0.74), 0 0 24px rgba(59, 164, 164, 0.38);
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
}

.mystic-beacon::before {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(105, 205, 199, 0.22);
  border-radius: 50%;
}

.hero__trigger:hover .mystic-field, .hero__trigger:focus-visible .mystic-field { opacity: 0.94; }
.hero__trigger:hover .mystic-ring, .hero__trigger:focus-visible .mystic-ring { opacity: 1; }
@keyframes title-breathe { 0%, 100% { opacity: 0.88; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
@keyframes verse-veil { 0%, 100% { opacity: 0.76; } 50% { opacity: 1; } }

.axis-mark {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
  color: rgba(212, 190, 145, 0.64);
  pointer-events: none;
}

.axis-mark span { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid var(--gold-dim); border-radius: 50%; font-size: 8px; }
.axis-mark i { width: 1px; height: 30px; margin: 5px 0 7px; background: repeating-linear-gradient(to bottom, var(--gold-dim) 0 3px, transparent 3px 7px); }
.axis-mark b { width: 15px; height: 15px; border-right: 1px solid var(--gold); border-bottom: 1px solid var(--gold); transform: rotate(45deg); }

.bazi-panel {
  position: absolute;
  z-index: 6;
  inset: 0;
  opacity: 0;
  visibility: hidden;
}

.birth-form, .bazi-result {
  position: absolute;
  top: 50%;
  width: min(390px, 31cqw);
  transform: translateY(-43%);
}

.birth-form { left: clamp(48px, 4.5cqw, 108px); width: min(660px, 38cqw); }
.bazi-result { right: clamp(82px, 11.8cqw, 190px); }

.panel-heading {
  display: grid;
  grid-template-columns: 34px auto 1fr;
  gap: 13px;
  align-items: center;
  margin-bottom: 22px;
}

.panel-heading span { height: 1px; background: linear-gradient(90deg, transparent, var(--gold-dim)); }
.panel-heading span:last-child { background: linear-gradient(90deg, var(--gold-dim), transparent); }
.panel-heading h2 { margin: 0; font-size: 18px; font-weight: 400; letter-spacing: 0.17em; white-space: nowrap; }
.birth-form .panel-heading h2 { font-weight: 650; }

.form-options-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 12px 24px; }
.calendar-type { display: flex; gap: 24px; margin: 0; padding: 0; border: 0; }
.calendar-type label { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; font-weight: 650; color: rgba(218, 196, 151, 0.58); }
.calendar-type input { position: absolute; opacity: 0; }
.calendar-type label > span { width: 16px; height: 16px; border: 1px solid var(--gold-dim); border-radius: 50%; }
.calendar-type input:checked + span { border-color: var(--gold-bright); box-shadow: inset 0 0 0 4px #071016; background: var(--gold-bright); }
.calendar-type label:has(input:checked) { color: var(--gold-bright); }
.gender-type { display: flex; align-items: center; gap: 12px; color: rgba(218, 196, 151, 0.58); font-size: 14px; font-weight: 650; white-space: nowrap; }
.gender-type > span { color: rgba(218, 196, 151, 0.72); }
.gender-type label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.gender-type input { position: absolute; opacity: 0; }
.gender-type label > i { width: 14px; height: 14px; border: 1px solid var(--gold-dim); border-radius: 50%; }
.gender-type input:checked + i { border-color: var(--gold-bright); box-shadow: inset 0 0 0 3px #071016; background: var(--gold-bright); }
.gender-type label:has(input:checked) { color: var(--gold-bright); }

.birth-fields { display: grid; grid-template-columns: 1.02fr 0.94fr 0.94fr 1.85fr; gap: 12px; }
.birth-fields label { display: grid; min-width: 0; gap: 10px; text-align: center; font-size: 14px; font-weight: 650; }
.birth-fields select {
  width: 100%;
  min-width: 0;
  height: 50px;
  border: 1px solid rgba(199, 173, 120, 0.26);
  border-radius: 4px;
  padding: 0 26px;
  color: #d8c49a;
  font-size: 14px;
  font-weight: 650;
  background: rgba(3, 9, 14, 0.72);
  outline: none;
  cursor: pointer;
  text-align: center;
  text-align-last: center;
}
.birth-fields select:focus { border-color: rgba(234, 212, 160, 0.7); box-shadow: 0 0 18px rgba(199, 173, 120, 0.08); }
.birth-fields option { color: #d8c49a; font-size: 14px; font-weight: 650; text-align: center; }
.field-select-shell, .hour-select-shell { position: relative; display: block; width: 100%; min-width: 0; max-width: 100%; }
.field-select-shell select, #birth-hour { appearance: none; padding-right: 28px; color: transparent; }
.field-select-shell::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 13px;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #d8c49a;
  border-bottom: 1.5px solid #d8c49a;
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}
.field-selection {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: visible;
  color: #d8c49a;
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  padding: 0;
  pointer-events: none;
  text-align: center;
  transform: translateX(-1em);
}
.hour-control-cluster { display: block; width: 100%; min-width: 0; max-width: 100%; }

.time-picker-trigger {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) minmax(0, 1.2fr) minmax(22px, 0.72fr);
  align-items: center;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(199, 173, 120, 0.26);
  border-radius: 4px;
  padding: 0;
  color: #d8c49a;
  background: rgba(3, 9, 14, 0.72);
  outline: none;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.time-picker-trigger:hover,
.time-picker-trigger:focus-visible,
.hour-select-shell.is-open .time-picker-trigger {
  border-color: rgba(234, 212, 160, 0.7);
  box-shadow: 0 0 18px rgba(199, 173, 120, 0.08);
}

.time-picker-trigger .time-picker-value {
  min-width: 0;
  overflow: hidden;
  color: #dec99c;
  font-size: clamp(13px, 0.82cqw, 16px);
  font-weight: 650;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
}

.time-picker-trigger > i {
  color: rgba(225, 203, 160, 0.9);
  font-size: 15px;
  font-weight: 650;
  font-style: normal;
  line-height: 1;
}

.time-picker-trigger > strong {
  min-width: 0;
  overflow: hidden;
  color: rgba(216, 196, 154, 0.82);
  font-size: clamp(11px, 0.72cqw, 14px);
  font-weight: 650;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-picker-trigger > b {
  position: relative;
  width: 100%;
  height: 100%;
  font-weight: inherit;
}

.time-picker-trigger > b::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #d8c49a;
  border-bottom: 1.5px solid #d8c49a;
  transform: translate(-50%, -70%) rotate(45deg);
  transition: transform 180ms ease;
}

.hour-select-shell.is-open .time-picker-trigger > b::after {
  transform: translate(-50%, -30%) rotate(225deg);
}

.time-picker-panel {
  position: absolute;
  z-index: 40;
  left: 0;
  top: calc(100% + 6px);
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  padding: 10px;
  border: 1px solid rgba(213, 177, 112, 0.54);
  border-radius: 4px;
  color: #d8c49a;
  background: rgba(3, 11, 17, 0.97);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.46), inset 0 0 22px rgba(43, 92, 105, 0.06);
  backdrop-filter: blur(8px);
}

.hour-select-shell.is-upward .time-picker-panel {
  top: auto;
  bottom: calc(100% + 6px);
}

.time-picker-panel[hidden] { display: none; }
.time-picker-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; min-width: 0; }
.birth-fields .time-picker-panel label { display: grid; min-width: 0; gap: 5px; color: rgba(216, 196, 154, 0.64); font-size: 9px; font-weight: 600; text-align: center; }
.birth-fields .time-picker-panel select {
  width: 100%;
  min-width: 0;
  height: 128px;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  border: 1px solid rgba(199, 173, 120, 0.22);
  border-radius: 3px;
  padding: 3px;
  color: #d8c49a;
  background: rgba(1, 7, 12, 0.82);
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: center;
  text-align-last: center;
}

.birth-fields .time-picker-panel option { padding: 4px 0; font-size: 12px; }
.time-picker-shichen { display: flex; align-items: baseline; justify-content: center; gap: 8px; min-width: 0; margin-top: 8px; overflow: hidden; white-space: nowrap; }
.time-picker-shichen strong { flex: 0 0 auto; color: rgba(225, 201, 151, 0.94); font-size: 12px; font-weight: 650; }
.time-picker-shichen small { min-width: 0; overflow: hidden; color: rgba(216, 196, 154, 0.56); font-size: 9px; font-weight: 600; letter-spacing: 0; text-overflow: ellipsis; }
.time-picker-confirm {
  width: 100%;
  min-width: 0;
  height: 30px;
  margin-top: 8px;
  border: 1px solid rgba(213, 177, 112, 0.42);
  border-radius: 3px;
  color: rgba(235, 211, 164, 0.94);
  background: rgba(18, 28, 32, 0.82);
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
}
.time-picker-confirm:hover,
.time-picker-confirm:focus-visible {
  border-color: rgba(234, 212, 160, 0.72);
  background: rgba(28, 39, 42, 0.9);
  outline: none;
}
.birth-clock-input {
  width: 100%;
  min-width: 0;
  height: 50px;
  border: 1px solid rgba(199, 173, 120, 0.26);
  border-radius: 4px;
  padding: 0 7px;
  color: #d8c49a;
  background: rgba(3, 9, 14, 0.72);
  outline: none;
  color-scheme: dark;
  font: 650 11px "Source Han Serif Taichu", "Noto Serif SC", "Songti SC", serif;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.birth-clock-input:focus { border-color: rgba(234, 212, 160, 0.7); box-shadow: 0 0 18px rgba(199, 173, 120, 0.08); }

.birth-meta-fields {
  position: relative;
  display: grid;
  grid-template-columns: 1.14fr 0.94fr 0.94fr 0.94fr;
  gap: 8px;
  margin-top: 17px;
}

.birth-meta-fields label {
  display: grid;
  min-width: 0;
  gap: 8px;
  color: rgba(218, 196, 151, 0.72);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
}

.birth-meta-fields label > span:first-child small {
  margin-left: 0.3em;
  color: rgba(218, 196, 151, 0.43);
  font-size: 0.78em;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.birth-meta-fields input,
.birth-meta-fields select {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid rgba(199, 173, 120, 0.26);
  border-radius: 4px;
  padding: 0 14px;
  color: #d8c49a;
  background: rgba(3, 9, 14, 0.72);
  outline: none;
  font: 650 12px "Source Han Serif Taichu", "Noto Serif SC", "Songti SC", serif;
  letter-spacing: 0.06em;
  text-align: center;
  color-scheme: dark;
}

.birth-meta-fields input::placeholder {
  color: rgba(216, 196, 154, 0.38);
  opacity: 1;
}

.birth-meta-fields input:focus,
.birth-meta-fields select:focus {
  border-color: rgba(234, 212, 160, 0.7);
  box-shadow: 0 0 18px rgba(199, 173, 120, 0.08);
}

.place-select-shell { position: relative; display: block; min-width: 0; }
.birth-meta-fields select { appearance: none; padding-right: 28px; text-align-last: center; }
.place-select-shell::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 13px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #d8c49a;
  border-bottom: 1.5px solid #d8c49a;
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

.birth-form-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
}

.calculate-button,
.enter-fortune-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  height: 50px;
  border: 1px solid rgba(199, 173, 120, 0.48);
  color: var(--gold-bright);
  background: rgba(6, 13, 17, 0.72);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
  cursor: pointer;
  font-weight: 650;
  transition: border-color 200ms ease, background-color 200ms ease, box-shadow 200ms ease, transform 160ms ease;
}

.calculate-button { width: 150px; letter-spacing: 0.3em; }
.enter-fortune-button {
  width: clamp(230px, 15cqw, 286px);
  border-color: rgba(217, 183, 117, 0.66);
  color: #f0dba4;
  background: rgba(7, 22, 28, 0.82);
  box-shadow: inset 0 1px 0 rgba(109, 195, 192, 0.17), 0 0 20px rgba(78, 164, 164, 0.06);
  letter-spacing: 0.18em;
}

.birth-meta-fields .birth-district-field {
  position: static;
  width: auto;
  max-width: none;
}

.enter-fortune-button--core {
  position: absolute;
  z-index: 9;
  left: 50%;
  top: 72%;
  height: clamp(54px, 4.2cqw, 64px);
  border-color: rgba(205, 164, 98, 0.64);
  background:
    linear-gradient(90deg, rgba(5, 17, 23, 0.82), rgba(7, 25, 30, 0.91) 48%, rgba(4, 15, 21, 0.82));
  clip-path: polygon(7% 0, 46% 0, 50% 5px, 54% 0, 93% 0, 100% 28%, 96% 50%, 100% 72%, 93% 100%, 54% 100%, 50% calc(100% - 5px), 46% 100%, 7% 100%, 0 72%, 4% 50%, 0 28%);
  transform: translate(-50%, -50%);
  box-shadow: inset 0 0 26px rgba(67, 145, 148, 0.06), 0 12px 30px rgba(0, 0, 0, 0.24);
}

.enter-fortune-button--core::before {
  inset: 5px 10px;
  border-color: rgba(213, 177, 113, 0.25);
  clip-path: polygon(5% 0, 95% 0, 100% 50%, 95% 100%, 5% 100%, 0 50%);
}

.enter-fortune-button--core::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(237, 208, 147, 0.28) 49%, transparent 68%);
  opacity: 0;
  transform: translateX(-75%);
}

.enter-fortune-button--core i {
  right: auto;
  left: 50%;
  top: auto;
  bottom: 6px;
  width: 4px;
  height: 4px;
  border: 0;
  background: rgba(224, 188, 115, 0.86);
  box-shadow: 0 0 9px rgba(224, 188, 115, 0.45);
  animation: enter-core-pulse 2.8s ease-in-out infinite;
  transform: translateX(-50%);
}

.calculate-button::before,
.enter-fortune-button::before { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(199, 173, 120, 0.22); pointer-events: none; }
.calculate-button i,
.enter-fortune-button i { position: absolute; top: 50%; right: 6px; width: 6px; height: 6px; border: 1px solid var(--gold); border-radius: 50%; transform: translateY(-50%); }
.calculate-button:hover { background: rgba(52, 43, 27, 0.34); box-shadow: 0 0 24px rgba(199, 173, 120, 0.09); }
.enter-fortune-button:hover { border-color: rgba(235, 207, 150, 0.84); background: rgba(9, 30, 36, 0.9); box-shadow: inset 0 1px 0 rgba(115, 207, 201, 0.25), 0 0 24px rgba(78, 164, 164, 0.1); }
.enter-fortune-button--core:hover { transform: translate(-50%, -50%) scale(1.02); }
.enter-fortune-button--core:hover::after { opacity: 1; transform: translateX(75%); transition: opacity 180ms ease, transform 720ms ease; }
.calculate-button:active,
.enter-fortune-button:active { transform: scale(0.985); }
.enter-fortune-button--core:active { transform: translate(-50%, -50%) scale(0.96); }

.observe-trigger {
  position: absolute;
  z-index: 9;
  left: 50%;
  top: 49%;
  width: clamp(210px, 13.5cqw, 270px);
  min-height: 0;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  padding: 0;
  border: 0;
  color: rgba(222, 207, 166, 0.92);
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
  isolation: isolate;
}

.observe-trigger::before {
  content: none;
}

.observe-title-group {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  display: flex;
  width: max-content;
  max-width: 82cqw;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.observe-trigger strong {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(36px, 2.8cqw, 108px);
  margin: 0;
  color: rgba(211, 188, 139, 0.97);
  font-family: "Source Han Serif Taichu", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  font-size: clamp(76px, 4.95cqw, 190px);
  font-weight: 250;
  font-variation-settings: "wght" 250;
  line-height: 1;
  letter-spacing: 0;
  transform: scaleX(0.94);
  transform-origin: center;
  -webkit-text-stroke: 0.4px rgba(246, 224, 177, 0.68);
  text-shadow:
    0 3px 7px rgba(0, 5, 8, 0.94),
    0 0 12px rgba(198, 151, 82, 0.27),
    0 0 24px rgba(176, 126, 58, 0.12);
}

.observe-trigger small {
  position: relative;
  z-index: 2;
  display: grid;
  gap: clamp(8px, 0.7cqw, 22px);
  margin-top: clamp(21px, 1.55cqw, 56px);
  color: rgba(197, 171, 120, 0.9);
  font-family: "Source Han Serif Taichu", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  font-size: clamp(13px, 0.94cqw, 36px);
  font-weight: 240;
  font-variation-settings: "wght" 240;
  line-height: 1;
  text-align: center;
  -webkit-text-stroke: 0.2px rgba(235, 208, 155, 0.44);
  text-shadow: 0 3px 6px rgba(0, 5, 8, 0.94), 0 0 10px rgba(188, 139, 70, 0.2);
}

.observe-trigger small span {
  display: block;
  letter-spacing: 0.58em;
  text-indent: 0.58em;
  white-space: nowrap;
}

.observe-trigger:hover .mystic-field,
.observe-trigger:focus-visible .mystic-field { opacity: 0.94; }
.observe-trigger:hover .mystic-ring,
.observe-trigger:focus-visible .mystic-ring { opacity: 1; }
.observe-trigger:active { transform: translate(-50%, -50%) scale(0.975); }
.observe-trigger:focus-visible { outline: 1px solid rgba(137, 218, 215, 0.82); outline-offset: 7px; }
.observe-trigger:disabled { opacity: 0.38; cursor: wait; }

.calculate-button:disabled,
.enter-fortune-button:disabled { opacity: 0.45; cursor: wait; }
.calculate-button:focus-visible,
.enter-fortune-button:focus-visible,
.birth-meta-fields input:focus-visible,
.birth-meta-fields select:focus-visible { outline: 1px solid rgba(235, 215, 169, 0.86); outline-offset: 3px; }
.form-status { min-height: 18px; margin: 13px 0 0; color: rgba(218, 196, 151, 0.58); font-size: 11px; font-weight: 650; text-align: center; letter-spacing: 0.08em; }

@keyframes enter-core-pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

.pillars { display: grid; grid-template-columns: 1fr 1px 1fr 1px 1fr 1px 1fr; align-items: end; margin-top: 28px; }
.pillars > i { width: 1px; height: 88px; margin-bottom: 9px; background: radial-gradient(circle at center, #eacb82 0 2px, rgba(199, 173, 120, 0.2) 4px, transparent 72%); }
.pillar { text-align: center; }
.pillar > span { display: block; margin-bottom: 14px; color: rgba(211, 188, 143, 0.55); font-size: 13px; }
.pillar strong { display: flex; flex-direction: column; gap: 5px; color: #e0c995; font-size: clamp(34px, 3cqw, 46px); font-weight: 300; line-height: 1; text-shadow: 0 0 15px rgba(228, 198, 133, 0.13); }
.pillar b { font-weight: inherit; }

.day-master { margin-top: 25px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; }
.day-master p { margin: 0 0 12px; font-size: 15px; letter-spacing: 0.22em; }
.day-master span { font-size: 14px; letter-spacing: 0.15em; }

@media (pointer: fine) and (max-width: 900px) {
  :root:not(.is-fixed-desktop-stage) body { overflow-y: auto; }
  :root:not(.is-fixed-desktop-stage) .experience, :root:not(.is-fixed-desktop-stage) .scene { min-height: 820px; }
  :root:not(.is-fixed-desktop-stage) .side-rail { display: none; }
  :root:not(.is-fixed-desktop-stage) .hero__trigger { transform: translateY(-4cqh); }
  :root:not(.is-fixed-desktop-stage) .mystic-field { width: min(240px, 66cqw); }
  :root:not(.is-fixed-desktop-stage) .bazi-panel { overflow-y: auto; padding: 80px 24px 100px; }
  :root:not(.is-fixed-desktop-stage) .birth-form, :root:not(.is-fixed-desktop-stage) .bazi-result { position: relative; top: auto; left: auto; right: auto; width: min(440px, 100%); margin: 0 auto; transform: none; }
  :root:not(.is-fixed-desktop-stage) .bazi-result { margin-top: 70px; }
  :root:not(.is-fixed-desktop-stage) .scene__shade { background: rgba(0, 5, 9, 0.38); }
}

@media (pointer: fine) and (max-width: 1180px) and (orientation: landscape) {
  :root:not(.is-fixed-desktop-stage) .birth-form { left: 18px; width: 44cqw; }
  :root:not(.is-fixed-desktop-stage) .bazi-result { right: 24px; width: 36cqw; }
  :root:not(.is-fixed-desktop-stage) .birth-fields, :root:not(.is-fixed-desktop-stage) .birth-meta-fields { gap: 8px; }
  :root:not(.is-fixed-desktop-stage) .birth-meta-fields input, :root:not(.is-fixed-desktop-stage) .birth-meta-fields select { padding-inline: 9px 24px; font-size: 11px; }
  :root:not(.is-fixed-desktop-stage) .calculate-button { width: 132px; }
  :root:not(.is-fixed-desktop-stage) .enter-fortune-button { width: 230px; }
  :root:not(.is-fixed-desktop-stage) .hour-control-cluster { grid-template-columns: minmax(0, 1fr) 70px; gap: 5px; }
}

@media (pointer: fine) and (max-width: 520px) {
  :root:not(.is-fixed-desktop-stage) .experience, :root:not(.is-fixed-desktop-stage) .scene { min-height: 900px; }
  :root:not(.is-fixed-desktop-stage) .hero__trigger { width: 94cqw; min-height: 500px; padding: 18px; }
  :root:not(.is-fixed-desktop-stage) .hero-title-group { --title-offset-y: 8px; }
  :root:not(.is-fixed-desktop-stage) .hero-title { font-size: clamp(58px, 16cqw, 72px); gap: clamp(28px, 10cqw, 40px); }
  :root:not(.is-fixed-desktop-stage) .hero-subtitle { margin-top: 18px; font-size: 13px; }
  :root:not(.is-fixed-desktop-stage) .mystic-field { width: min(220px, 64cqw); }
  :root:not(.is-fixed-desktop-stage) .form-options-row { justify-content: center; margin-inline: 0; flex-wrap: wrap; }
  :root:not(.is-fixed-desktop-stage) .birth-fields { grid-template-columns: repeat(2, 1fr); }
  :root:not(.is-fixed-desktop-stage) .birth-meta-fields { grid-template-columns: repeat(2, 1fr); }
  :root:not(.is-fixed-desktop-stage) .birth-form-actions { flex-wrap: wrap; }
  :root:not(.is-fixed-desktop-stage) .pillars { margin-inline: -10px; }
  :root:not(.is-fixed-desktop-stage) .pillar strong { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; }
  .hero-title-group, .hero-subtitle, .mystic-ring, .mystic-beacon { animation: none !important; }
}
