:root {
  --paper: #f3efe4;
  --paper-deep: #e8e0cf;
  --ink: #24261f;
  --muted: #777469;
  --red: #8e3028;
  --red-dark: #6f211d;
  --line: rgba(50, 48, 41, 0.16);
  --white: rgba(255, 254, 248, 0.72);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Noto Serif SC", "Songti SC", serif;
  background:
    linear-gradient(rgba(89, 73, 46, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(89, 73, 46, 0.02) 1px, transparent 1px),
    var(--paper);
  background-size: 4px 4px;
  overflow-x: hidden;
}

.welcome-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff8ec;
  background:
    radial-gradient(circle at 18% 0%, rgba(204, 107, 83, 0.35), transparent 25rem),
    linear-gradient(115deg, #171c19 0%, #27231e 54%, #6f211d 140%);
  text-decoration: none;
  box-shadow: 0 12px 35px rgba(39, 30, 24, 0.16);
}

.welcome-banner::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(110deg, transparent 28%, rgba(255, 255, 255, 0.06) 48%, transparent 68%),
    repeating-linear-gradient(90deg, transparent 0 95px, rgba(255, 255, 255, 0.025) 96px);
  transform: translateX(-100%);
  animation: banner-shine 7s ease-in-out infinite;
}

.welcome-banner-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 56px));
  min-height: 118px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 20px 0;
}

.welcome-emblem {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  color: #fff7e9;
  background: var(--red);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  box-shadow: 0 9px 25px rgba(0, 0, 0, 0.2);
  font-family: Georgia, serif;
  font-size: 32px;
}

.welcome-copy {
  font-family: Arial, sans-serif;
}

.welcome-copy span {
  display: block;
  margin-bottom: 5px;
  color: #e5a293;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.36em;
}

.welcome-copy strong {
  display: block;
  color: #fff;
  font-family: Georgia, serif;
  font-size: clamp(23px, 2.2vw, 32px);
  letter-spacing: 0.08em;
}

.welcome-copy p {
  margin: 7px 0 0;
  color: rgba(255, 248, 236, 0.72);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.welcome-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.welcome-actions a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 43px;
  padding: 10px 17px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  transition: transform 140ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.welcome-youtube {
  background: #b43a31;
  box-shadow: 0 8px 22px rgba(141, 39, 31, 0.28);
}

.welcome-tiktok {
  background: rgba(255, 255, 255, 0.08);
}

.welcome-actions a:hover {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
  transform: translateY(-2px);
}

.welcome-actions a:active {
  transform: translateY(1px) scale(0.97);
}

@keyframes banner-shine {
  0%,
  55% {
    transform: translateX(-100%);
  }

  85%,
  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 560px) {
  .welcome-banner-inner {
    width: calc(100% - 28px);
    min-height: 0;
    grid-template-columns: 48px 1fr;
    gap: 12px;
    padding: 15px 0;
  }

  .welcome-emblem {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  .welcome-copy span {
    font-size: 8px;
  }

  .welcome-copy strong {
    font-size: 17px;
  }

  .welcome-copy p {
    font-size: 9px;
    line-height: 1.5;
  }

  .welcome-actions {
    grid-column: 1 / -1;
  }

  .welcome-actions a {
    flex: 1;
    justify-content: center;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 10px;
  }
}

#language-toggle[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.wash {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(4px);
  pointer-events: none;
}

.wash-one {
  width: 42vw;
  height: 42vw;
  top: -18vw;
  right: -8vw;
  background: radial-gradient(circle, rgba(129, 139, 113, 0.15), transparent 67%);
}

.wash-two {
  width: 50vw;
  height: 50vw;
  left: -25vw;
  bottom: -28vw;
  background: radial-gradient(circle, rgba(142, 48, 40, 0.08), transparent 65%);
}

.site-header {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-seal,
.mini-seal {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #f5ead7;
  background: var(--red);
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2);
  font-family: "Ma Shan Zheng", cursive;
  font-size: 28px;
  transform: rotate(-2deg);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 20px;
  letter-spacing: 0.18em;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.2em;
}

.header-note {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.3em;
}

main {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  padding: 76px 0 48px;
  text-align: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 15px;
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.32em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 68px);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.35;
}

.hero h1 em {
  color: var(--red);
  font-family: "Ma Shan Zheng", cursive;
  font-size: 1.08em;
  font-style: normal;
  font-weight: 400;
}

.hero-copy {
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.plum-mark {
  position: absolute;
  top: 52px;
  right: 7%;
  color: rgba(142, 48, 40, 0.18);
  font-size: 60px;
  transform: rotate(18deg);
}

.divination-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(59, 56, 47, 0.14);
  border-radius: 2px;
  box-shadow: 0 26px 70px rgba(67, 56, 38, 0.08);
  backdrop-filter: blur(8px);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(60, 58, 49, 0.045);
  border-bottom: 1px solid var(--line);
}

.tab {
  padding: 19px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 0.12em;
  transition: 180ms ease;
}

.tab:first-child {
  border-right: 1px solid var(--line);
}

.tab span {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  margin-right: 9px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 12px;
}

.tab.active {
  color: var(--red);
  background: rgba(255, 254, 248, 0.7);
}

.tab.active span {
  color: #fff7e9;
  background: var(--red);
  border-color: var(--red);
}

.form-panel {
  padding: 38px 48px 46px;
}

.question-field {
  padding: 26px 48px 24px;
  background: rgba(142, 48, 40, 0.025);
  border-bottom: 1px solid var(--line);
}

.question-field p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.customer-fields {
  margin-top: 17px;
  border-top: 1px solid var(--line);
}

.customer-fields summary {
  padding: 12px 0 5px;
  color: var(--red);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.customer-fields > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-top: 8px;
}

.record-consent {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 15px;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.55;
}

.record-consent input {
  flex: 0 0 auto;
  margin-top: 2px;
  accent-color: var(--red);
}

.record-consent.invalid {
  color: var(--red);
}

.record-status {
  min-height: 17px;
  color: var(--red) !important;
  font-weight: 700 !important;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}

.panel-heading h2,
.result-heading h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.text-button {
  padding: 7px 0;
  color: var(--red);
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  cursor: pointer;
  font-size: 12px;
}

.field {
  display: block;
}

.field > span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.field input {
  width: 100%;
  padding: 15px 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
  border-radius: 1px;
  outline: none;
  transition: border-color 160ms, box-shadow 160ms;
}

.field input:focus {
  border-color: rgba(142, 48, 40, 0.55);
  box-shadow: 0 0 0 3px rgba(142, 48, 40, 0.08);
}

.number-intro {
  margin: -12px 0 24px;
  color: var(--muted);
  font-size: 13px;
}

.number-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.method-note {
  margin: 17px 0 26px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.primary-button {
  width: 100%;
  padding: 16px;
  color: #fff9ed;
  background: var(--red);
  border: 0;
  border-radius: 1px;
  box-shadow: 0 7px 18px rgba(111, 33, 29, 0.18);
  cursor: pointer;
  letter-spacing: 0.35em;
  transition: 180ms ease;
}

.primary-button:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.primary-button i {
  margin-left: 7px;
  font-style: normal;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.history-section {
  margin-top: 18px;
  padding: 24px 28px;
  background: rgba(255, 254, 248, 0.5);
  border: 1px solid var(--line);
}

.history-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.history-heading .section-kicker {
  margin-bottom: 6px;
}

.history-heading h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.12em;
}

.history-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.history-item {
  padding: 14px 15px;
  color: inherit;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
  transition: 160ms ease;
}

.history-item:hover {
  border-color: rgba(142, 48, 40, 0.38);
  transform: translateY(-1px);
}

.history-item strong,
.history-item span,
.history-item small {
  display: block;
}

.history-item strong {
  overflow: hidden;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item span {
  color: var(--red);
  font-size: 12px;
}

.history-item small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}

.casting-overlay {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.casting-overlay[hidden] {
  display: none;
}

.casting-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 34, 28, 0.74);
  backdrop-filter: blur(8px);
  animation: casting-fade-in 300ms ease both;
}

.casting-dialog {
  position: relative;
  width: min(430px, 100%);
  padding: 40px 34px 34px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 50% 20%, rgba(142, 48, 40, 0.08), transparent 42%),
    var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.28);
  animation: casting-rise 400ms ease both;
}

.casting-dialog::before,
.casting-dialog::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  border: 1px solid rgba(142, 48, 40, 0.1);
  transform: rotate(45deg);
}

.casting-dialog::before {
  top: -58px;
  left: -58px;
}

.casting-dialog::after {
  right: -58px;
  bottom: -58px;
}

.casting-dialog h2 {
  margin: 0;
  font-family: "Ma Shan Zheng", cursive;
  font-size: 34px;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.fortune-cylinder {
  position: relative;
  width: 150px;
  height: 190px;
  margin: 28px auto 12px;
  transform-origin: 50% 90%;
  animation: shake-cylinder 500ms ease-in-out infinite;
}

.fortune-sticks {
  position: absolute;
  top: 0;
  left: 26px;
  width: 100px;
  height: 112px;
}

.fortune-sticks i {
  position: absolute;
  bottom: 0;
  left: 44px;
  width: 9px;
  height: 105px;
  background: linear-gradient(90deg, #c79b5d, #efd39a 50%, #a9793e);
  border-radius: 5px 5px 1px 1px;
  transform-origin: 50% 100%;
  box-shadow: 0 2px 4px rgba(51, 35, 17, 0.18);
}

.fortune-sticks i:nth-child(1) { transform: rotate(-18deg) translateY(8px); }
.fortune-sticks i:nth-child(2) { transform: rotate(-11deg) translateY(-4px); }
.fortune-sticks i:nth-child(3) { transform: rotate(-4deg) translateY(3px); }
.fortune-sticks i:nth-child(4) { transform: rotate(5deg) translateY(-8px); }
.fortune-sticks i:nth-child(5) { transform: rotate(12deg) translateY(5px); }
.fortune-sticks i:nth-child(6) { transform: rotate(19deg) translateY(-2px); }

.cylinder-rim {
  position: absolute;
  z-index: 2;
  top: 85px;
  left: 10px;
  width: 130px;
  height: 24px;
  background: #7d2923;
  border: 3px solid #5f1c18;
  border-radius: 50%;
  box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.12);
}

.cylinder-body {
  position: absolute;
  z-index: 1;
  top: 94px;
  left: 17px;
  display: grid;
  place-items: center;
  width: 116px;
  height: 94px;
  color: #f0d8ad;
  background: linear-gradient(90deg, #6e201b, #a53a30 48%, #72221d);
  border: 2px solid #5f1c18;
  border-radius: 8px 8px 24px 24px;
  box-shadow: inset 8px 0 14px rgba(255, 255, 255, 0.05), 0 12px 20px rgba(74, 31, 24, 0.2);
}

.cylinder-body span {
  font-family: "Ma Shan Zheng", cursive;
  font-size: 45px;
}

.casting-countdown {
  color: var(--red);
}

.casting-countdown strong {
  font-family: "Ma Shan Zheng", cursive;
  font-size: 42px;
  font-weight: 400;
}

.casting-countdown span {
  margin-left: 4px;
  color: var(--muted);
  font-size: 11px;
}

.casting-message {
  min-height: 22px;
  margin: 7px 0 20px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.casting-progress {
  height: 2px;
  overflow: hidden;
  background: rgba(36, 38, 31, 0.1);
}

.casting-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--red);
}

.casting-overlay.running .casting-progress i {
  animation: casting-progress 6s linear forwards;
}

@keyframes shake-cylinder {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  25% { transform: rotate(5deg) translateY(-4px); }
  50% { transform: rotate(-3deg) translateY(1px); }
  75% { transform: rotate(4deg) translateY(-3px); }
}

@keyframes casting-progress {
  to { width: 100%; }
}

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

@keyframes casting-rise {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
}

.result-section {
  margin: 38px 0 64px;
  scroll-margin-top: 24px;
}

.result-section.reveal {
  animation: reveal 500ms ease both;
}

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

.result-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  text-align: center;
}

.result-heading .section-kicker {
  display: none;
}

.result-heading h2 {
  font-size: 21px;
}

.result-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.cast-question {
  margin: 5px 0 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
}

.hexagram-flow {
  display: grid;
  grid-template-columns: 1fr 76px 1fr;
  align-items: center;
  gap: 10px;
}

.hexagram-card {
  min-height: 270px;
  padding: 18px 24px;
  text-align: center;
  background: rgba(255, 254, 248, 0.66);
  border: 1px solid var(--line);
}

.hexagram-card.transformed {
  background: rgba(233, 226, 211, 0.56);
}

.card-label {
  display: inline-block;
  margin: 0 0 5px;
  padding: 4px 10px;
  color: var(--red);
  border: 1px solid rgba(142, 48, 40, 0.25);
  font-size: 11px;
  letter-spacing: 0.2em;
}

.hexagram-name {
  min-height: 52px;
  font-family: "Ma Shan Zheng", cursive;
  font-size: 31px;
}

.hexagram-name small {
  display: block;
  color: var(--muted);
  font-family: "Noto Serif SC", serif;
  font-size: 11px;
  letter-spacing: 0.16em;
}

.hexagram-lines {
  width: 128px;
  margin: 12px auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.yao {
  position: relative;
  display: flex;
  height: 9px;
  gap: 11px;
}

.yao span {
  display: block;
  height: 100%;
  background: var(--ink);
}

.yao.yang span {
  width: 100%;
}

.yao.yin span {
  width: calc(50% - 5.5px);
}

.yao.moving span {
  background: var(--red);
}

.yao.moving::after {
  content: "动";
  position: absolute;
  left: calc(100% + 12px);
  top: -4px;
  color: var(--red);
  font-size: 11px;
}

.trigram-pair {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.trigram-pair b {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.change-mark {
  text-align: center;
}

.change-mark span {
  display: block;
  margin-bottom: 10px;
  color: var(--red);
  font-size: 12px;
}

.change-mark i {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: auto;
  color: var(--red);
  border: 1px solid rgba(142, 48, 40, 0.35);
  border-radius: 50%;
  font-family: "Ma Shan Zheng", cursive;
  font-size: 24px;
  font-style: normal;
}

.interpretation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

.interpretation-grid article {
  position: relative;
  min-height: 142px;
  padding: 28px 30px 25px 86px;
  background: rgba(255, 254, 248, 0.5);
  border: 1px solid var(--line);
}

.mini-seal {
  position: absolute;
  top: 27px;
  left: 27px;
  width: 40px;
  height: 40px;
  font-size: 22px;
}

.mini-seal.pale {
  color: var(--red);
  background: transparent;
  border: 1px solid rgba(142, 48, 40, 0.45);
  box-shadow: none;
}

.interpretation-grid h3 {
  margin: 0 0 9px;
  font-size: 16px;
  font-weight: 600;
}

.interpretation-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.analysis-panel {
  margin-top: 10px;
  padding: 20px 24px 0;
  background: rgba(255, 254, 248, 0.7);
  border: 1px solid var(--line);
  box-shadow: 0 18px 45px rgba(67, 56, 38, 0.05);
}

.analysis-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 10px;
  border-bottom: 0;
}

.analysis-heading .section-kicker {
  display: none;
}

.analysis-heading h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.12em;
}

.relation-badge {
  flex: 0 0 auto;
  padding: 7px 12px;
  color: var(--red);
  border: 1px solid rgba(142, 48, 40, 0.3);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.analysis-lead {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: center;
  padding: 8px 0 16px;
}

.analysis-lead > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff8eb;
  background: var(--red);
  border-radius: 50%;
  font-family: "Ma Shan Zheng", cursive;
  font-size: 21px;
}

.analysis-lead h4,
.analysis-stages h4 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}

.analysis-lead p,
.analysis-stages p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.reading-details {
  margin: 0 -24px;
  border-top: 1px solid var(--line);
}

.reading-details > summary {
  padding: 13px 24px;
  color: var(--red);
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.12em;
  list-style-position: inside;
}

.reading-details > .interpretation-grid,
.reading-details > .analysis-stages,
.reading-details > .analysis-rule {
  margin-right: 24px;
  margin-left: 24px;
}

.analysis-stages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.analysis-stages article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 13px;
  padding: 24px 20px;
}

.analysis-stages article + article {
  border-left: 1px solid var(--line);
}

.analysis-stages article > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--red);
  border: 1px solid rgba(142, 48, 40, 0.3);
  border-radius: 50%;
  font-family: "Ma Shan Zheng", cursive;
  font-size: 17px;
}

.analysis-stages small {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 10px;
  letter-spacing: 0.1em;
}

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

.stage-details div {
  margin-top: 10px;
}

.stage-details dt {
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.stage-details dd {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
}

.analysis-rule {
  margin: 18px 0 0;
  color: #8a877d;
  font-size: 10px;
  line-height: 1.8;
}

.calculation {
  margin-top: 10px;
  padding: 12px 24px;
  background: rgba(255, 254, 248, 0.45);
  border: 1px solid var(--line);
}

.calculation summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

#calculation-copy {
  padding-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 2;
}

#calculation-copy p {
  margin: 0;
}

.disclaimer {
  margin: 10px auto 0;
  color: #8a877d;
  font-size: 10px;
  line-height: 1.7;
  text-align: center;
}

footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 36px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.18em;
}

@media (max-width: 700px) {
  .site-header {
    padding: 20px 0;
  }

  .header-note,
  .plum-mark {
    display: none;
  }

  .hero {
    padding: 52px 0 34px;
  }

  .hero-copy {
    max-width: 280px;
    line-height: 1.9;
  }

  .form-panel {
    padding: 30px 22px 32px;
  }

  .question-field {
    padding: 22px;
  }

  .history-section {
    padding: 20px 18px;
  }

  .history-list {
    grid-template-columns: 1fr;
  }

  .number-fields,
  .interpretation-grid,
  .analysis-stages {
    grid-template-columns: 1fr;
  }

  .analysis-panel {
    padding: 18px 18px 0;
  }

  .reading-details {
    margin-right: -18px;
    margin-left: -18px;
  }

  .reading-details > summary {
    padding-right: 18px;
    padding-left: 18px;
  }

  .reading-details > .interpretation-grid,
  .reading-details > .analysis-stages,
  .reading-details > .analysis-rule {
    margin-right: 18px;
    margin-left: 18px;
  }

  .analysis-stages article {
    padding: 22px 0;
  }

  .analysis-stages article + article {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .hexagram-flow {
    grid-template-columns: 1fr 38px 1fr;
    gap: 5px;
  }

  .change-mark {
    padding: 0;
  }

  .change-mark i {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .hexagram-card {
    min-height: 230px;
    padding: 15px 8px;
  }

  .hexagram-name {
    min-height: 47px;
    font-size: 25px;
  }

  .hexagram-lines {
    width: 90px;
  }

  .trigram-pair {
    font-size: 9px;
  }

  .trigram-pair b {
    font-size: 11px;
  }

  .result-heading {
    display: block;
    text-align: left;
  }

  .result-heading > p:last-child {
    margin-top: 4px;
  }

  .analysis-lead p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  footer {
    gap: 18px;
    line-height: 1.8;
  }
}

/* Visual refresh: editorial oracle layout */
:root {
  --paper: #f4f1e9;
  --paper-deep: #ded8ca;
  --ink: #1c201d;
  --muted: #777970;
  --red: #a13a2e;
  --red-dark: #7d2b23;
  --line: rgba(28, 32, 29, 0.12);
  --white: #fbfaf5;
}

body {
  background:
    radial-gradient(circle at 15% 5%, rgba(161, 58, 46, 0.07), transparent 24rem),
    radial-gradient(circle at 85% 42%, rgba(75, 91, 76, 0.07), transparent 28rem),
    var(--paper);
}

.wash {
  display: none;
}

.site-header {
  width: min(1180px, calc(100% - 56px));
  padding: 22px 0;
  border-bottom-color: rgba(28, 32, 29, 0.1);
}

.brand-seal {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 23px;
  box-shadow: none;
}

.brand strong {
  font-size: 17px;
}

.brand small {
  display: none;
}

.header-note {
  font-family: sans-serif;
  font-size: 9px;
  letter-spacing: 0.42em;
}

main {
  width: min(1180px, calc(100% - 56px));
}

.oracle-stage {
  min-height: calc(100vh - 83px);
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(520px, 1.18fr);
  gap: clamp(44px, 7vw, 100px);
  align-items: center;
  padding: 54px 0 70px;
}

.hero {
  padding: 0;
  text-align: left;
}

.eyebrow {
  margin-bottom: 24px;
  font-family: Arial, sans-serif;
  font-size: 9px;
  letter-spacing: 0.48em;
}

.hero h1 {
  font-size: clamp(68px, 7vw, 104px);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.95;
}

.hero h1 em {
  display: inline-block;
  margin: 13px 0 0 0.58em;
  font-size: 0.78em;
  letter-spacing: 0.05em;
}

.hero-copy {
  margin: 30px 0 0 4px;
  font-size: 13px;
  line-height: 2;
  letter-spacing: 0.12em;
}

.plum-mark {
  display: none;
}

.hero-orbit {
  width: 224px;
  margin-top: 54px;
  display: grid;
  grid-template-columns: repeat(9, auto);
  align-items: center;
  gap: 8px;
  color: rgba(28, 32, 29, 0.34);
  font-size: 13px;
}

.hero-orbit b {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 50%;
  font-family: "Ma Shan Zheng", cursive;
  font-size: 19px;
  font-weight: 400;
}

.divination-card {
  position: relative;
  overflow: visible;
  background: var(--white);
  border: 0;
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(43, 42, 36, 0.11);
  backdrop-filter: none;
}

.divination-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -15px;
  bottom: -15px;
  width: 70%;
  height: 55%;
  border: 1px solid rgba(161, 58, 46, 0.22);
  border-radius: 18px;
}

.card-intro {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 32px 38px 24px;
}

.card-intro > span {
  color: var(--red);
  font-family: Arial, sans-serif;
  font-size: 10px;
}

.card-intro small,
.card-intro strong {
  display: block;
}

.card-intro small {
  margin-bottom: 6px;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 8px;
  letter-spacing: 0.32em;
}

.card-intro strong {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.tabs {
  width: calc(100% - 76px);
  margin: 0 38px;
  display: flex;
  gap: 8px;
  padding: 5px;
  background: #eeece5;
  border: 0;
  border-radius: 999px;
}

.tab {
  flex: 1;
  padding: 10px 15px;
  border-radius: 999px;
  font-size: 12px;
}

.tab:first-child {
  border: 0;
}

.tab span {
  display: none;
}

.tab.active {
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 3px 12px rgba(40, 40, 34, 0.08);
}

.question-field {
  padding: 28px 38px 0;
  background: transparent;
  border: 0;
}

.field > span {
  margin-bottom: 7px;
  font-family: sans-serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.field input {
  padding: 13px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(28, 32, 29, 0.18);
  border-radius: 0;
  font-size: 14px;
}

.field input:focus {
  border-bottom-color: var(--red);
  box-shadow: none;
}

.question-field p {
  margin-top: 7px;
  font-size: 9px;
}

.form-panel {
  padding: 24px 38px 38px;
}

.panel-heading {
  margin-bottom: 14px;
}

.panel-heading .section-kicker,
.panel-heading h2,
.number-intro {
  display: none;
}

.text-button {
  padding: 4px 0;
  border: 0;
  font-size: 10px;
}

.number-fields {
  gap: 20px;
}

.number-fields .field input {
  font-size: 24px;
  text-align: center;
}

.method-note {
  margin: 14px 0 20px;
  font-size: 9px;
  line-height: 1.7;
}

.primary-button {
  padding: 15px;
  border-radius: 999px;
  box-shadow: none;
  font-size: 12px;
}

.history-section {
  margin: -38px 0 60px;
  padding: 0;
  background: transparent;
  border: 0;
}

.history-heading {
  align-items: center;
  margin-bottom: 12px;
}

.history-heading .section-kicker {
  display: none;
}

.history-heading h2 {
  font-size: 13px;
  font-weight: 500;
}

.history-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 1px 10px;
  scrollbar-width: none;
}

.history-list::-webkit-scrollbar {
  display: none;
}

.history-item {
  flex: 0 0 250px;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.45);
  border: 0;
  border-radius: 10px;
}

.history-item strong {
  margin-bottom: 5px;
  font-size: 11px;
}

.history-item span {
  font-size: 10px;
}

.result-section {
  position: relative;
  margin: 24px 0 70px;
  padding: 36px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(43, 42, 36, 0.08);
}

.result-heading {
  margin-bottom: 22px;
  text-align: left;
}

.result-heading h2 {
  font-size: 15px;
  font-weight: 500;
}

.cast-question {
  max-width: 600px;
  font-size: 16px;
}

.hexagram-flow {
  grid-template-columns: 1fr 90px 1fr;
  gap: 0;
  padding: 8px 0 22px;
}

.hexagram-card,
.hexagram-card.transformed {
  min-height: 246px;
  padding: 14px 30px;
  background: transparent;
  border: 0;
}

.hexagram-card:first-child {
  border-right: 1px solid var(--line);
}

.hexagram-card.transformed {
  border-left: 1px solid var(--line);
}

.card-label {
  padding: 0;
  border: 0;
  font-family: Arial, sans-serif;
  font-size: 9px;
}

.hexagram-name {
  font-size: 35px;
}

.hexagram-lines {
  width: 142px;
  margin: 10px auto 14px;
}

.change-mark i {
  color: var(--white);
  background: var(--ink);
  border: 0;
}

.analysis-panel {
  margin-top: 0;
  padding: 20px 24px 0;
  background: #f0eee7;
  border: 0;
  border-radius: 14px;
  box-shadow: none;
}

.analysis-heading h3 {
  font-size: 14px;
}

.relation-badge {
  padding: 5px 9px;
  border: 0;
  background: rgba(161, 58, 46, 0.08);
  border-radius: 999px;
  font-size: 9px;
}

.analysis-lead > span {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.reading-details {
  border-top-color: rgba(28, 32, 29, 0.08);
}

.calculation {
  padding: 10px 4px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
}

footer {
  width: min(1180px, calc(100% - 56px));
  padding-top: 22px;
}

@media (max-width: 820px) {
  .site-header,
  main,
  footer {
    width: min(100% - 32px, 680px);
  }

  .oracle-stage {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 44px 0 60px;
  }

  .hero {
    text-align: center;
  }

  .hero h1 {
    font-size: clamp(58px, 17vw, 82px);
  }

  .hero h1 em {
    margin-left: 0;
  }

  .hero-copy {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-orbit {
    margin: 32px auto 0;
  }

  .history-section {
    margin-top: -28px;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 16px 0;
  }

  .header-note {
    display: block;
    font-size: 7px;
  }

  .oracle-stage {
    gap: 22px;
    padding-top: 26px;
  }

  .hero h1 {
    font-size: 58px;
    line-height: 1;
  }

  .hero-copy {
    margin-top: 18px;
    line-height: 1.7;
  }

  .hero-orbit {
    display: none;
  }

  .divination-card {
    border-radius: 14px;
  }

  .divination-card::after {
    display: none;
  }

  .card-intro {
    padding: 21px 22px 16px;
  }

  .card-intro strong {
    font-size: 17px;
  }

  .tabs {
    width: calc(100% - 44px);
    margin: 0 22px;
  }

  .question-field,
  .form-panel {
    padding-right: 22px;
    padding-left: 22px;
  }

  .question-field {
    padding-top: 20px;
  }

  .customer-fields > div {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .form-panel {
    padding-top: 18px;
    padding-bottom: 24px;
  }

  .method-note {
    margin-top: 10px;
    margin-bottom: 14px;
  }

  .result-section {
    margin-right: -4px;
    margin-left: -4px;
    padding: 24px 15px;
    border-radius: 16px;
  }

  .hexagram-flow {
    grid-template-columns: 1fr 34px 1fr;
  }

  .hexagram-card,
  .hexagram-card.transformed {
    min-height: 220px;
    padding: 10px 8px;
  }

  .hexagram-card:first-child,
  .hexagram-card.transformed {
    border: 0;
  }

  .hexagram-name {
    font-size: 25px;
  }

  .hexagram-lines {
    width: 88px;
  }

  .change-mark span {
    font-size: 9px;
  }

  .change-mark i {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }

  .analysis-panel {
    padding-right: 16px;
    padding-left: 16px;
  }

  .reading-details {
    margin-right: -16px;
    margin-left: -16px;
  }
}

/* Larger, stronger typography */
body {
  font-weight: 500;
}

.brand strong {
  font-size: 20px;
  font-weight: 700;
}

.guide-open-button {
  padding: 9px 16px;
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(28, 32, 29, 0.25);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

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

.language-button {
  min-width: 48px;
  padding: 9px 12px;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

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

.hero-copy {
  font-size: 16px;
  font-weight: 600;
}

.card-intro small {
  font-size: 10px;
  font-weight: 700;
}

.card-intro strong {
  font-size: 23px;
  font-weight: 700;
}

.tab {
  font-size: 14px;
  font-weight: 700;
}

.field > span {
  font-size: 11px;
  font-weight: 700;
}

.field input {
  font-size: 17px;
  font-weight: 600;
}

.question-field p,
.method-note {
  font-size: 11px;
  font-weight: 600;
}

.text-button {
  font-size: 12px;
  font-weight: 700;
}

.primary-button {
  font-size: 15px;
  font-weight: 700;
}

.history-heading h2 {
  font-size: 16px;
  font-weight: 700;
}

.history-item strong {
  font-size: 13px;
  font-weight: 700;
}

.history-item span {
  font-size: 12px;
  font-weight: 600;
}

.result-heading h2 {
  font-size: 18px;
  font-weight: 700;
}

.result-heading > p:last-child,
.trigram-pair {
  font-size: 12px;
  font-weight: 600;
}

.cast-question {
  font-size: 18px;
  font-weight: 700;
}

.card-label,
.hexagram-name small,
.change-mark span {
  font-size: 12px;
  font-weight: 700;
}

.analysis-heading h3 {
  font-size: 18px;
  font-weight: 700;
}

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

.analysis-lead h4,
.analysis-stages h4 {
  font-size: 18px;
  font-weight: 700;
}

.analysis-lead p,
.analysis-stages p,
.interpretation-grid p,
#calculation-copy {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.8;
}

.reading-details > summary,
.calculation summary {
  font-size: 13px;
  font-weight: 700;
}

.stage-details dt {
  font-size: 13px;
  font-weight: 700;
}

.stage-details dd {
  font-size: 13px;
}

.disclaimer {
  font-size: 11px;
  font-weight: 600;
}

/* Intro guide */
.guide-overlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.guide-overlay[hidden] {
  display: none;
}

.guide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 23, 21, 0.72);
  backdrop-filter: blur(12px);
  animation: casting-fade-in 260ms ease both;
}

.guide-dialog {
  position: relative;
  width: min(980px, 100%);
  max-height: min(88vh, 820px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  background: #f9f7f0;
  border-radius: 22px;
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.34);
  animation: casting-rise 320ms ease both;
}

.guide-scroll {
  overflow-y: auto;
  padding: 44px 48px 34px;
}

.guide-close {
  position: absolute !important;
  z-index: 2;
  top: 18px;
  right: 20px;
  width: 38px;
  height: 38px;
  color: var(--ink);
  background: rgba(28, 32, 29, 0.06);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 25px;
}

.guide-close:not(:disabled):hover {
  color: #fff;
  background: var(--red);
  box-shadow: 0 6px 16px rgba(125, 43, 35, 0.18);
}

.guide-header {
  position: relative;
  padding-left: 72px;
}

.guide-seal {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #fff4e3;
  background: var(--red);
  border-radius: 50%;
  font-family: "Ma Shan Zheng", cursive;
  font-size: 30px;
}

.guide-header p {
  margin: 0 0 7px;
  color: var(--red);
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.35em;
}

.guide-header h2 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.guide-header strong {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.guide-origin {
  margin-top: 34px;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 30px;
  align-items: center;
  padding: 27px 30px;
  background: #efede5;
  border-radius: 16px;
}

.guide-origin-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 28px;
}

.guide-origin-mark b {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  color: #f9f7f0;
  background: var(--ink);
  border-radius: 50%;
  font-family: "Ma Shan Zheng", cursive;
  font-size: 29px;
  font-weight: 400;
}

.guide-dialog h3 {
  margin: 0 0 9px;
  font-size: 18px;
  font-weight: 700;
}

.guide-dialog p {
  margin: 5px 0;
  color: #62665f;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.8;
}

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

.guide-basics,
.guide-reading {
  margin-top: 32px;
}

.guide-section-heading {
  margin-bottom: 17px;
}

.guide-section-heading > span {
  display: block;
  margin-bottom: 5px;
  color: var(--red);
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.3em;
}

.guide-section-heading > p {
  max-width: 760px;
}

.concept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.concept-grid article {
  padding: 22px;
  background: #fff;
  border: 1px solid rgba(28, 32, 29, 0.09);
  border-radius: 14px;
}

.concept-grid h4 {
  margin: 15px 0 7px;
  font-size: 16px;
}

.concept-grid p {
  font-size: 12px;
}

.line-demo {
  height: 64px;
  display: grid;
  align-content: center;
  gap: 13px;
}

.line-demo i {
  display: block;
  width: 88px;
  height: 8px;
  background: var(--ink);
}

.line-demo i + i {
  background: linear-gradient(90deg, var(--ink) 0 42%, transparent 42% 58%, var(--ink) 58%);
}

.trigram-demo {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 44px;
}

.hexagram-demo {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.hexagram-demo span {
  font-size: 40px;
}

.hexagram-demo b {
  color: var(--muted);
  font-size: 9px;
}

.hexagram-demo i {
  color: var(--red);
  font-style: normal;
}

.reading-map {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.reading-map article {
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.48);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.reading-map article:nth-child(3n) {
  border-right: 0;
}

.reading-map article:nth-child(n+4) {
  border-bottom: 0;
}

.reading-map b,
.reading-map span {
  display: block;
}

.reading-map b {
  font-size: 16px;
}

.reading-map span {
  margin-top: 3px;
  color: var(--red);
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.reading-map p {
  margin-top: 10px;
  font-size: 12px;
}

.five-elements-guide {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 22px;
  align-items: center;
  padding: 18px 22px;
  background: rgba(161, 58, 46, 0.05);
  border-left: 4px solid var(--red);
}

.element-cycle {
  color: var(--red);
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
}

.element-cycle i {
  margin: 0 5px;
  color: var(--muted);
  font-style: normal;
}

.five-elements-guide p {
  font-size: 12px;
}

html[lang="en"] body {
  font-family: Georgia, "Times New Roman", serif;
}

html[lang="en"] .hero h1,
html[lang="en"] .guide-header h2 {
  letter-spacing: 0;
}

html[lang="en"] .hero h1 {
  font-size: clamp(58px, 6vw, 88px);
  line-height: 1;
}

html[lang="en"] .field > span,
html[lang="en"] .tab,
html[lang="en"] button {
  letter-spacing: 0.03em;
}

html[lang="en"] .yao.moving::after {
  content: "chg";
  font-family: Arial, sans-serif;
  font-size: 8px;
  text-transform: uppercase;
}

.guide-steps article {
  position: relative;
  min-width: 0;
  padding: 22px;
  background: #fff;
  border: 1px solid rgba(28, 32, 29, 0.09);
  border-radius: 14px;
}

.guide-step-number {
  position: absolute;
  top: 18px;
  right: 20px;
  color: var(--red);
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
}

.guide-illustration {
  height: 84px;
  margin-bottom: 18px;
}

.question-illustration {
  position: relative;
  padding-top: 15px;
}

.question-illustration i {
  display: block;
  width: 75%;
  height: 2px;
  margin: 0 0 13px;
  background: var(--paper-deep);
}

.question-illustration i:nth-child(2) {
  width: 52%;
}

.question-illustration b {
  position: absolute;
  top: 0;
  right: 4px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: var(--red);
  border: 1px solid rgba(161, 58, 46, 0.3);
  border-radius: 50%;
  font-family: "Ma Shan Zheng", cursive;
  font-size: 25px;
}

.method-illustration,
.result-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.method-illustration > span {
  text-align: center;
}

.method-illustration b {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: auto;
  color: #fff;
  background: var(--red);
  border-radius: 50%;
  font-size: 18px;
}

.method-illustration small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.method-illustration em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.result-illustration span {
  font-size: 48px;
}

.result-illustration i {
  color: var(--red);
  font-size: 12px;
  font-style: normal;
}

.guide-steps h3 {
  font-size: 16px;
}

.guide-steps p {
  font-size: 12px;
}

.guide-method {
  margin-top: 28px;
}

.guide-method > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.guide-method p {
  padding: 14px 17px;
  font-size: 12px;
}

.guide-method p + p {
  border-left: 1px solid var(--line);
}

.guide-method b {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.guide-notice {
  margin-top: 24px;
  padding: 17px 20px;
  border-left: 4px solid var(--red);
  background: rgba(161, 58, 46, 0.05);
}

.guide-notice b {
  font-size: 13px;
}

.guide-notice p {
  display: inline;
  margin-left: 8px;
  font-size: 12px;
}

.guide-actions {
  width: auto;
  margin: 0;
  padding: 16px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  background: #efede5;
  border: 0;
  font-size: 12px;
  letter-spacing: 0;
}

.guide-actions label {
  display: flex;
  gap: 9px;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
}

.guide-actions input {
  accent-color: var(--red);
}

.guide-actions button {
  padding: 12px 30px;
  color: #fff;
  background: var(--red);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

@media (max-width: 720px) {
  .guide-overlay {
    padding: 10px;
  }

  .guide-dialog {
    max-height: 94vh;
    border-radius: 16px;
  }

  .guide-scroll {
    padding: 34px 22px 24px;
  }

  .guide-header {
    padding-left: 57px;
  }

  .guide-seal {
    width: 44px;
    height: 44px;
    font-size: 25px;
  }

  .guide-header h2 {
    font-size: 27px;
  }

  .guide-origin {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 22px;
  }

  .guide-steps,
  .guide-method > div,
  .concept-grid,
  .reading-map {
    grid-template-columns: 1fr;
  }

  .reading-map article,
  .reading-map article:nth-child(3n),
  .reading-map article:nth-child(n+4) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .reading-map article:last-child {
    border-bottom: 0;
  }

  .five-elements-guide {
    grid-template-columns: 1fr;
  }

  .guide-method p + p {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .guide-actions {
    padding: 13px 22px;
  }

  .guide-actions button {
    padding: 11px 21px;
  }
}

/* Button interaction feedback */
button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:not(:disabled) {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  transition:
    transform 120ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

button:not(:disabled):hover {
  filter: brightness(0.98);
}

button:not(:disabled):active,
button.is-pressed {
  transform: translateY(1px) scale(0.975);
}

button:focus-visible {
  outline: 3px solid rgba(161, 58, 46, 0.24);
  outline-offset: 3px;
}

button:disabled,
button.is-loading {
  cursor: wait;
  opacity: 0.62;
}

.button-ripple {
  position: absolute;
  z-index: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  background: currentColor;
  border-radius: 50%;
  opacity: 0.18;
  pointer-events: none;
  transform: scale(0);
  animation: button-ripple 520ms ease-out forwards;
}

button > :not(.button-ripple) {
  position: relative;
  z-index: 1;
}

.primary-button:not(:disabled):hover,
.guide-actions button:not(:disabled):hover {
  box-shadow: 0 9px 22px rgba(125, 43, 35, 0.2);
  filter: none;
}

.tab:not(:disabled):active {
  transform: scale(0.985);
}

.history-item:not(:disabled):hover {
  box-shadow: 0 8px 20px rgba(43, 42, 36, 0.08);
}

@keyframes button-ripple {
  to {
    opacity: 0;
    transform: scale(22);
  }
}

@media (prefers-reduced-motion: reduce) {
  button,
  .button-ripple {
    animation: none !important;
    transition: none !important;
  }
}
/* Kiana Eastern Wisdom channel links */
.channel-links {
  display: flex;
  gap: 7px;
  align-items: center;
}

.channel-links a {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 8px 12px;
  color: var(--ink);
  border: 1px solid rgba(28, 32, 29, 0.16);
  border-radius: 999px;
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  transition: transform 120ms ease, background-color 180ms ease,
    color 180ms ease, box-shadow 180ms ease;
}

.channel-links a:hover {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 7px 18px rgba(43, 42, 36, 0.12);
  transform: translateY(-1px);
}

.channel-links a:active {
  transform: translateY(1px) scale(0.97);
}

.channel-links a:focus-visible,
.footer-channel a:focus-visible {
  outline: 3px solid rgba(161, 58, 46, 0.24);
  outline-offset: 3px;
}

.channel-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #fff;
  background: var(--red);
  border-radius: 50%;
  font-size: 9px;
}

.tiktok-icon {
  background: var(--ink);
  font-size: 13px;
}

.footer-channel {
  display: flex;
  gap: 13px;
  align-items: center;
}

.footer-channel > span {
  color: var(--ink);
  font-weight: 700;
}

.footer-channel a {
  color: var(--red);
  font-weight: 700;
  text-decoration: none;
}

.footer-channel a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 820px) {
  .channel-label {
    display: none;
  }

  .channel-links a {
    padding: 7px;
  }
}

@media (max-width: 560px) {
  .site-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .brand {
    justify-content: center;
  }

  .header-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .channel-links {
    gap: 4px;
  }

  .channel-links a {
    border: 0;
  }

  .channel-icon {
    width: 18px;
    height: 18px;
  }

  .footer-channel {
    flex-wrap: wrap;
    justify-content: center;
  }

  .element-cycle {
    white-space: normal;
  }
}

/* Compact first-screen casting layout */
.record-status:empty {
  display: none;
}

.oracle-stage {
  padding-top: 42px;
  padding-bottom: 54px;
}

.hero h1 {
  font-size: clamp(64px, 6.5vw, 96px);
}

.hero-copy {
  margin-top: 24px;
}

.hero-orbit {
  margin-top: 42px;
}

.card-intro {
  padding-top: 27px;
  padding-bottom: 20px;
}

.question-field {
  padding-top: 24px;
}

.form-panel {
  padding-top: 18px;
  padding-bottom: 32px;
}

.panel-heading {
  margin-bottom: 10px;
}

.method-note {
  margin-top: 11px;
  margin-bottom: 17px;
}

#use-now {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  color: var(--red);
  background: rgba(161, 58, 46, 0.08);
  border: 1px solid rgba(161, 58, 46, 0.28);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(82, 42, 34, 0.06);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  transition: color 160ms ease, background-color 160ms ease,
    border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

#use-now::before {
  content: "◷";
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1;
}

#use-now:hover {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 7px 18px rgba(125, 43, 35, 0.18);
  transform: translateY(-1px);
}

#use-now:active {
  transform: translateY(1px) scale(0.97);
}

#use-now:focus-visible {
  outline: 3px solid rgba(161, 58, 46, 0.22);
  outline-offset: 3px;
}

/* Unified Kiana Eastern Wisdom brand */
.brand {
  gap: 15px;
}

.brand-seal {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  color: #fff8ec;
  background: linear-gradient(145deg, #b54135, #76231e);
  border: 1px solid rgba(111, 33, 29, 0.24);
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(111, 33, 29, 0.2);
  font-family: Georgia, serif;
  font-size: 29px;
  font-weight: 700;
  transform: none;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.brand small {
  display: block;
  margin-top: 5px;
  color: var(--red);
  font-family: Arial, sans-serif;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.25em;
}

.tool-identity {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-family: Arial, sans-serif;
}

.tool-identity span {
  color: var(--red);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.26em;
}

.tool-identity strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  letter-spacing: 0.12em;
}

@media (max-width: 820px) {
  .brand-seal {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    font-size: 25px;
  }

  .brand strong {
    font-size: 16px;
  }
}

@media (max-width: 560px) {
  .tool-identity {
    justify-content: center;
  }

  .tool-identity span {
    display: none;
  }

  .brand strong {
    font-size: 15px;
  }

  .brand small {
    font-size: 7px;
  }
}

/* Phone-first layout: keep the casting form close to the first screen */
@media (max-width: 560px) {
  .welcome-banner-inner {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 12px 0;
  }

  .welcome-emblem {
    width: 42px;
    height: 42px;
    font-size: 21px;
  }

  .welcome-copy span {
    margin-bottom: 3px;
    font-size: 7px;
  }

  .welcome-copy strong {
    font-size: 15px;
    line-height: 1.1;
  }

  .welcome-copy p {
    margin-top: 4px;
    font-size: 8px;
    line-height: 1.35;
  }

  .welcome-actions {
    gap: 7px;
  }

  .welcome-actions a {
    min-height: 40px;
    padding: 7px 8px;
    font-size: 9px;
  }

  .site-header {
    min-height: 60px;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
  }

  .tool-identity {
    min-width: 0;
    justify-content: flex-start;
  }

  .tool-identity strong {
    font-size: 12px;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  .header-actions {
    flex: 0 0 auto;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .language-button {
    min-width: 40px;
    min-height: 40px;
    padding: 7px;
  }

  .guide-open-button {
    min-height: 40px;
    padding: 7px 10px;
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  .oracle-stage {
    gap: 16px;
    padding-top: 16px;
    padding-bottom: 38px;
  }

  .hero {
    padding: 8px 0 4px;
  }

  .eyebrow {
    margin-bottom: 10px;
    font-size: 8px;
  }

  .hero h1 {
    font-size: 46px;
    line-height: 1.02;
  }

  .hero h1 em {
    margin-top: 5px;
    margin-left: 0.18em;
  }

  .hero-copy {
    margin-top: 13px;
    font-size: 12px;
    line-height: 1.6;
  }

  .card-intro {
    padding: 18px 20px 14px;
  }

  .tabs {
    width: calc(100% - 36px);
    margin-right: 18px;
    margin-left: 18px;
  }

  .question-field,
  .form-panel {
    padding-right: 20px;
    padding-left: 20px;
  }

  .question-field {
    padding-top: 17px;
  }

  .form-panel {
    padding-top: 14px;
    padding-bottom: 22px;
  }

  #use-now {
    min-height: 40px;
  }

  .primary-button {
    min-height: 48px;
  }
}

@media (max-width: 350px) {
  .welcome-copy p {
    display: none;
  }

  .welcome-actions a {
    font-size: 8px;
  }

  .tool-identity strong {
    font-size: 11px;
  }

  .guide-open-button {
    padding-right: 8px;
    padding-left: 8px;
  }

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

@media (max-height: 500px) and (min-width: 561px) {
  .welcome-banner-inner {
    width: calc(100% - 32px);
    min-height: 84px;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 10px 0;
  }

  .welcome-emblem {
    width: 48px;
    height: 48px;
    font-size: 23px;
  }

  .welcome-copy strong {
    font-size: 19px;
  }

  .welcome-copy p {
    display: none;
  }

  .welcome-actions {
    gap: 7px;
  }

  .welcome-actions a {
    min-height: 40px;
    padding: 8px 11px;
    font-size: 9px;
  }

  .site-header,
  main,
  footer {
    width: calc(100% - 32px);
  }

  .site-header {
    min-height: 58px;
    padding: 9px 0;
  }

  .oracle-stage {
    min-height: auto;
    grid-template-columns: minmax(210px, 0.7fr) minmax(360px, 1.3fr);
    gap: 20px;
    align-items: start;
    padding: 22px 0 36px;
  }

  .hero {
    padding-top: 28px;
  }

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

  .hero-copy {
    margin-top: 16px;
    font-size: 11px;
    line-height: 1.6;
  }

  .hero-orbit {
    display: none;
  }

  .divination-card {
    min-width: 0;
  }
}

.site-disclaimer {
  width: min(1180px, calc(100% - 56px));
  margin: 0 auto 18px;
  padding: 20px 24px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(28, 32, 29, 0.1);
  border-left: 4px solid var(--red);
  border-radius: 10px;
}

.site-disclaimer strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.site-disclaimer p {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.8;
}

@media (max-width: 820px) {
  .site-disclaimer {
    width: min(100% - 32px, 680px);
  }
}

@media (max-width: 560px) {
  .site-disclaimer {
    margin-bottom: 12px;
    padding: 16px 17px;
  }

  .site-disclaimer strong {
    font-size: 12px;
  }

  .site-disclaimer p {
    font-size: 10px;
    line-height: 1.75;
  }
}

@media (max-width: 820px) {
  .oracle-stage {
    padding-top: 34px;
    padding-bottom: 48px;
  }
}
