:root {
  --bg-1: #fff7e6;
  --bg-2: #fff2d2;
  --bg-3: #f8e7b8;
  --paper: #fffaf0;
  --paper-deep: #f6dfad;
  --ink: #2b2118;
  --muted: #7a6650;
  --cinnabar: #c94b3a;
  --cinnabar-soft: rgba(201, 75, 58, 0.16);
  --gold: #d9a441;
  --gold-soft: rgba(217, 164, 65, 0.24);
  --green: #2f5d50;
  --green-soft: rgba(47, 93, 80, 0.15);
  --card: rgba(255, 255, 255, 0.72);
  --card-strong: rgba(255, 255, 255, 0.84);
  --line: rgba(217, 164, 65, 0.34);
  --shadow: 0 24px 72px rgba(94, 63, 26, 0.12);
  --soft-shadow: 0 14px 38px rgba(94, 63, 26, 0.1);
  --inner: inset 0 1px 0 rgba(255, 255, 255, 0.82), inset 0 -20px 40px rgba(248, 231, 184, 0.2);
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-1);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.76) 0%, rgba(255, 255, 255, 0) 38%),
    linear-gradient(215deg, rgba(201, 75, 58, 0.08) 0%, rgba(201, 75, 58, 0) 32%),
    linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 54%, var(--bg-3) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  opacity: 0.42;
}

body::before {
  inset: 0;
  width: auto;
  height: auto;
  background:
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(217, 164, 65, 0.055) 39px 40px, transparent 41px 96px),
    repeating-linear-gradient(0deg, transparent 0 42px, rgba(217, 164, 65, 0.045) 43px 44px, transparent 45px 112px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0));
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.08) 72%, transparent);
}

body::after {
  width: min(360px, 46vw);
  height: 230px;
  right: -70px;
  top: 88px;
  border: 1px solid rgba(217, 164, 65, 0.16);
  border-radius: 34px;
  background:
    linear-gradient(90deg, transparent 15%, rgba(217, 164, 65, 0.12) 15% 15.6%, transparent 15.6% 45%, rgba(201, 75, 58, 0.08) 45% 45.7%, transparent 45.7%),
    linear-gradient(180deg, transparent 22%, rgba(217, 164, 65, 0.12) 22% 22.8%, transparent 22.8% 72%, rgba(217, 164, 65, 0.1) 72% 72.7%, transparent 72.7%);
  transform: rotate(-8deg);
}

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

button {
  color: inherit;
}

.page-shell {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 24px;
}

.home-shell {
  position: relative;
}

.app-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 16px;
  padding: 8px 0 4px;
  animation: riseIn 520ms ease both;
}

.hero-copy {
  position: relative;
  min-width: 0;
  padding: 6px 0 13px 62px;
}

.hero-stamp {
  position: absolute;
  left: 0;
  top: 16px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1.5px solid rgba(201, 75, 58, 0.72);
  border-radius: 12px;
  color: var(--cinnabar);
  background: rgba(255, 250, 240, 0.46);
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei", serif;
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
  transform: rotate(-6deg);
  box-shadow: inset 0 0 0 4px rgba(201, 75, 58, 0.035), 0 10px 24px rgba(201, 75, 58, 0.08);
}

.hero-copy h1 {
  position: relative;
  width: fit-content;
  margin: 0;
  color: var(--ink);
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei", serif;
  font-size: clamp(62px, 8vw, 92px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.11em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.66);
}

.hero-copy h1::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: -13px;
  width: 88%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(201, 75, 58, 0.62), rgba(217, 164, 65, 0.82), rgba(217, 164, 65, 0));
}

.hero-copy h1::before {
  content: "";
  position: absolute;
  right: -21px;
  bottom: -17px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cinnabar);
  box-shadow: 0 0 0 6px rgba(201, 75, 58, 0.08);
}

.hero-copy p {
  margin: 23px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.6;
  letter-spacing: 0.06em;
}

.qian-pill-button {
  min-height: 68px;
  min-width: 238px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(217, 164, 65, 0.5);
  border-radius: 999px;
  padding: 9px 20px 9px 12px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 247, 230, 0.62)),
    rgba(255, 255, 255, 0.68);
  box-shadow: var(--soft-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.qian-pill-button::after {
  content: "";
  position: absolute;
  inset: 9px 12px;
  border: 1px solid rgba(217, 164, 65, 0.14);
  border-radius: inherit;
  pointer-events: none;
}

.qian-pill-button:hover {
  border-color: rgba(201, 75, 58, 0.34);
  transform: translateY(-3px);
  box-shadow: 0 18px 46px rgba(94, 63, 26, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.qian-icon-wrap {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 1px solid rgba(217, 164, 65, 0.34);
  border-radius: 50%;
  background: rgba(255, 250, 240, 0.74);
  box-shadow: inset 0 0 0 6px rgba(217, 164, 65, 0.07);
}

.line-qian-icon {
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--cinnabar);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.qian-button-copy {
  display: grid;
  gap: 2px;
  text-align: left;
}

.qian-button-copy b {
  font-size: 15px;
  line-height: 1.2;
}

.qian-button-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.qian-pill-button.is-shaking .qian-icon-wrap {
  animation: shakeTube 560ms ease;
}

.daily-order {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  width: 100%;
  max-width: 100%;
  margin: 2px 0 14px;
  border: 1px solid rgba(217, 164, 65, 0.3);
  border-radius: 999px;
  padding: 9px 15px;
  color: var(--muted);
  background: rgba(255, 250, 240, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: visible;
  white-space: normal;
  scrollbar-width: none;
  animation: riseIn 520ms 80ms ease both;
}

.daily-order::-webkit-scrollbar {
  display: none;
}

.daily-order svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: rgba(217, 164, 65, 0.74);
}

.daily-order span {
  font-size: 14px;
  font-weight: 800;
}

.daily-order i {
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(217, 164, 65, 0.55);
}

.birth-card,
.direction-card,
.result-card,
.qian-dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow), var(--inner);
  backdrop-filter: blur(14px);
}

.birth-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 16px;
  position: relative;
  overflow: hidden;
  padding: 14px 16px;
  margin-bottom: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 247, 230, 0.58)),
    var(--card);
  animation: riseIn 520ms 140ms ease both;
}

.birth-card::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(201, 75, 58, 0.44), rgba(217, 164, 65, 0.36), transparent);
}

.birth-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 3px;
}

.birth-card-head h2,
.card-heading h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.paper-seal,
.direction-icon {
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(201, 75, 58, 0.72);
  border-radius: 8px;
  color: var(--cinnabar);
  background: transparent;
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei", serif;
  font-weight: 700;
  transform: rotate(-4deg);
}

.paper-seal {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  font-size: 18px;
}

.birth-fields {
  display: grid;
  grid-template-columns: minmax(146px, 1.2fr) minmax(118px, 0.88fr) minmax(104px, 0.76fr);
  gap: 10px;
}

.compact-field {
  display: grid;
  gap: 5px;
}

.compact-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.compact-field input,
.compact-field select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(217, 164, 65, 0.38);
  border-radius: 12px;
  padding: 7px 10px;
  color: var(--ink);
  background: rgba(255, 250, 240, 0.76);
  font-size: 15px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.compact-field input:focus,
.compact-field select:focus {
  border-color: rgba(217, 164, 65, 0.92);
  background: rgba(255, 252, 244, 0.94);
  box-shadow: 0 0 0 4px rgba(217, 164, 65, 0.15);
}

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

.direction-card {
  min-height: 112px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-areas:
    "seal title"
    "seal desc"
    "seal status";
  align-content: center;
  column-gap: 12px;
  row-gap: 5px;
  padding: 15px 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.84), rgba(255, 247, 230, 0.6)),
    linear-gradient(90deg, rgba(201, 75, 58, 0.06), transparent 34%),
    var(--card);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  animation: riseIn 520ms ease both;
}

.direction-card:nth-child(1) {
  animation-delay: 190ms;
}

.direction-card:nth-child(2) {
  animation-delay: 230ms;
}

.direction-card:nth-child(3) {
  animation-delay: 270ms;
}

.direction-card:nth-child(4) {
  animation-delay: 310ms;
}

.direction-card:nth-child(5) {
  animation-delay: 350ms;
}

.direction-card:nth-child(6) {
  animation-delay: 390ms;
}

.direction-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(201, 75, 58, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), transparent 38%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.direction-card::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 15px;
  border: 1px solid rgba(217, 164, 65, 0.16);
  pointer-events: none;
}

.direction-card:hover {
  border-color: rgba(201, 75, 58, 0.28);
  transform: translateY(-3px) rotate(-0.2deg);
  box-shadow: 0 26px 76px rgba(94, 63, 26, 0.16), var(--inner);
}

.direction-card:hover::before {
  opacity: 0.52;
}

.direction-card.is-measured {
  border-color: rgba(47, 93, 80, 0.32);
}

.direction-count {
  position: absolute;
  top: 10px;
  right: 13px;
  color: rgba(122, 102, 80, 0.72);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.direction-icon {
  grid-area: seal;
  align-self: center;
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: rgba(255, 250, 240, 0.4);
  font-size: 20px;
  box-shadow: inset 0 0 0 4px rgba(201, 75, 58, 0.035);
}

.direction-card strong {
  grid-area: title;
  color: var(--ink);
  padding-right: 54px;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.direction-card small {
  grid-area: desc;
  max-width: 100%;
  color: var(--muted);
  padding-right: 18px;
  font-size: 12.5px;
  line-height: 1.45;
}

.direction-status {
  grid-area: status;
  width: fit-content;
  margin-top: 2px;
  border: 1px solid rgba(201, 75, 58, 0.28);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--cinnabar);
  background: rgba(201, 75, 58, 0.06);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 900;
}

.direction-card.is-measured .direction-status {
  border-color: rgba(47, 93, 80, 0.28);
  color: var(--green);
  background: rgba(47, 93, 80, 0.07);
}

.result-hero {
  margin-bottom: 12px;
}

.result-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.result-meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--muted);
}

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

.result-meta-row strong {
  color: var(--ink);
  font-size: 13px;
}

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

.result-card {
  padding: 22px;
}

.full-card {
  grid-column: 1 / -1;
}

.card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.fortune-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fortune-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 48px;
  border: 1px solid rgba(217, 164, 65, 0.18);
  border-radius: 14px;
  padding: 12px 13px;
  color: var(--ink);
  background: rgba(255, 247, 230, 0.52);
  line-height: 1.55;
}

.good-list li::before,
.avoid-list li::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--gold);
}

.avoid-list li::before {
  background: var(--cinnabar);
}

.soft-copy,
.result-card p,
.qian-detail p {
  color: var(--muted);
  line-height: 1.8;
}

.bazi-card > p {
  margin: 0 0 10px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.tag-row span {
  border: 1px solid rgba(47, 93, 80, 0.2);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--green);
  background: rgba(47, 93, 80, 0.06);
  font-size: 13px;
  font-weight: 800;
}

.element-bars {
  display: grid;
  gap: 11px;
  margin-top: 16px;
}

.element-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 34px;
  gap: 12px;
  align-items: center;
}

.element-label {
  display: grid;
  gap: 2px;
}

.element-label span {
  font-weight: 900;
}

.element-label small,
.element-row strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.energy-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(217, 164, 65, 0.18);
}

.energy-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ecd28c, var(--cinnabar));
}

.element-row[data-element="木"] .energy-track span {
  background: linear-gradient(90deg, #b8d7a1, #3f8060);
}

.element-row[data-element="水"] .energy-track span {
  background: linear-gradient(90deg, #b8d6e8, #477a9e);
}

.element-row[data-element="火"] .energy-track span {
  background: linear-gradient(90deg, #f1c079, var(--cinnabar));
}

.element-row[data-element="土"] .energy-track span {
  background: linear-gradient(90deg, #e4ca82, #987143);
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.talisman-button,
.ghost-button,
.link-button {
  min-height: 46px;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.talisman-button {
  border: 1px solid rgba(201, 75, 58, 0.34);
  color: var(--cinnabar);
  background: rgba(255, 255, 255, 0.62);
}

.ghost-button,
.link-button {
  border: 1px solid rgba(47, 93, 80, 0.26);
  color: var(--green);
  background: rgba(255, 255, 255, 0.52);
  text-decoration: none;
}

.talisman-button:hover,
.ghost-button:hover,
.link-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(94, 63, 26, 0.1);
}

.qian-modal,
.direction-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 247, 230, 0.36), transparent 34%),
    rgba(43, 33, 24, 0.32);
  opacity: 0;
  transition: opacity 180ms ease;
}

.qian-modal[hidden],
.direction-modal[hidden] {
  display: none;
}

.qian-modal.is-visible,
.direction-modal.is-visible {
  opacity: 1;
}

.qian-dialog,
.direction-dialog {
  width: min(560px, 100%);
  position: relative;
  border: 1px solid rgba(217, 164, 65, 0.46);
  border-radius: var(--radius-lg);
  padding: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 230, 0.96)),
    var(--paper);
  box-shadow: 0 30px 90px rgba(43, 33, 24, 0.26), var(--inner);
  backdrop-filter: blur(18px);
  transform: translateY(12px) scale(0.98);
  transition: transform 180ms ease;
}

.direction-dialog {
  max-height: min(86vh, 760px);
  overflow: auto;
}

.qian-modal.is-visible .qian-dialog,
.direction-modal.is-visible .direction-dialog {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  color: var(--cinnabar);
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  transition: background 160ms ease, transform 160ms ease;
}

.modal-close:hover {
  background: rgba(201, 75, 58, 0.08);
  transform: translateY(-1px);
}

.qian-text {
  margin: 18px 0;
  color: var(--green);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.55;
}

.qian-detail {
  border-top: 1px solid rgba(217, 164, 65, 0.18);
  padding-top: 14px;
}

.qian-detail + .qian-detail {
  margin-top: 12px;
}

.qian-detail span,
.qian-count-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.qian-count-note {
  margin: 14px 0 0;
}

.inline-result-head {
  align-items: flex-start;
  padding-right: 32px;
}

.inline-result-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.inline-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.inline-meta-row span {
  border: 1px solid rgba(217, 164, 65, 0.28);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: rgba(255, 250, 240, 0.78);
  font-size: 12px;
  font-weight: 900;
}

.inline-section {
  margin-top: 14px;
}

.inline-section h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.inline-section .fortune-list {
  gap: 8px;
}

.inline-section .fortune-list li {
  min-height: 0;
  padding: 10px 12px;
  background: rgba(255, 250, 240, 0.78);
}

.inline-actions {
  margin-top: 18px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 60;
  max-width: min(420px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.site-footer {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 34px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  text-align: center;
}

@keyframes shakeTube {
  0%,
  100% {
    transform: rotate(0deg);
  }

  18% {
    transform: rotate(-9deg) translateX(-1px);
  }

  36% {
    transform: rotate(8deg) translateX(1px);
  }

  58% {
    transform: rotate(-6deg);
  }

  76% {
    transform: rotate(5deg);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 780px) {
  .page-shell {
    width: min(100% - 28px, 560px);
    padding-top: 28px;
  }

  .app-hero {
    display: grid;
    justify-items: start;
    gap: 16px;
  }

  .hero-copy {
    padding-left: 54px;
  }

  .hero-stamp {
    top: 13px;
    width: 38px;
    height: 38px;
    font-size: 21px;
  }

  .hero-copy h1 {
    font-size: 58px;
  }

  .qian-pill-button {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
  }

  .daily-order {
    width: 100%;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .birth-fields {
    grid-template-columns: minmax(112px, 1.12fr) minmax(88px, 0.82fr) minmax(84px, 0.74fr);
    gap: 8px;
  }

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

  .birth-card,
  .result-card,
  .qian-dialog,
  .direction-dialog {
    border-radius: 18px;
    padding: 18px;
  }

  .birth-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .direction-card {
    min-height: 112px;
    border-radius: 18px;
    padding: 14px;
    gap: 7px;
    grid-template-columns: 38px minmax(0, 1fr);
    column-gap: 10px;
  }

  .direction-card strong {
    font-size: 21px;
  }

  .direction-card small {
    font-size: 12.5px;
  }

  .direction-status {
    font-size: 11px;
    padding: 5px 8px;
  }

  .result-meta-row span {
    flex: 1 1 148px;
  }

  .fortune-list li {
    min-height: 44px;
  }

  .element-row {
    grid-template-columns: 68px minmax(0, 1fr) 30px;
    gap: 9px;
  }

  .action-bar button {
    flex: 1 1 100%;
  }
}

@media (max-width: 520px) {
  .birth-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 380px) {
  .hero-copy {
    padding-left: 48px;
  }

  .hero-copy h1 {
    font-size: 50px;
  }

  .hero-stamp {
    width: 34px;
    height: 34px;
  }

  .birth-fields {
    gap: 6px;
  }

  .compact-field input,
  .compact-field select {
    min-height: 38px;
    padding: 6px 8px;
    font-size: 13px;
  }

  .compact-field span {
    font-size: 11px;
  }

  .direction-card {
    min-height: 122px;
    padding: 12px;
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .direction-icon {
    width: 32px;
    height: 32px;
  }

  .direction-card strong {
    font-size: 20px;
    padding-right: 48px;
  }

  .direction-count {
    right: 11px;
    font-size: 10px;
  }
}

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