/*
 * Desktop reference restoration layer.
 * This layer only changes presentation. Existing routes, forms, data and cast
 * state remain owned by element-bazi-ink-v1.aiqa20260606z.js.
 */

[data-consult-method-panel][hidden] {
  display: none !important;
}

/* 问答手札详情在 PC 上是阅读面板，不沿用移动端的 430px 底部抽屉。 */
@media (min-width: 1024px) {
  .ai-qa-history-detail-panel {
    width: min(980px, calc(100vw - 96px));
    height: min(90dvh, calc(100dvh - 56px));
    bottom: clamp(24px, 4vh, 42px);
    padding: 24px clamp(24px, 3vw, 38px) 22px;
    border-bottom: 1px solid rgba(173, 138, 77, 0.22);
    border-radius: 28px;
    transform: translate(-50%, calc(100% + 56px));
  }

  .ai-qa-history-detail.is-open .ai-qa-history-detail-panel {
    transform: translate(-50%, 0);
  }

  .ai-qa-history-detail-body {
    gap: 20px;
    padding-top: 20px;
  }

  .ai-qa-history-detail-thread {
    gap: 22px;
  }

  .ai-qa-history-detail-question,
  .ai-qa-history-detail-answer {
    padding: 22px 24px;
  }

  .ai-qa-history-detail-answer p {
    max-width: 76ch;
    font-size: 15px;
    line-height: 1.88;
  }
}

.nav .desktop-nav-account {
  display: none;
}

/* 该总览仅用于宽屏桌面；移动端继续使用原命盘概览，避免桌面结构裸露。 */
.desktop-bazi-board {
  display: none;
}

.desktop-fortune-daily,
.desktop-fortune-entry-cta {
  display: none;
}

/* 侧栏布局仍沿用移动命盘卡片：文字须避开左侧书册与合盘图。 */
@media (min-width: 1024px) and (max-width: 1179px) {
  .overview-screen .overview-feature-card {
    padding-left: clamp(204px, 20vw, 232px);
  }

  .overview-screen .overview-feature-copy {
    column-gap: 12px;
  }
}

@media (min-width: 1180px) {
  :root {
    --restore-page-width: min(calc(100% - 72px), 1400px);
    --restore-narrow-width: min(calc(100% - 72px), 980px);
    --restore-paper: #fdfaf4;
    --restore-paper-deep: #f5efe4;
    --restore-ink: #26231f;
    --restore-muted: #746d62;
    --restore-line: rgba(107, 84, 53, 0.2);
    --restore-red: #bd3228;
    --restore-green: #39775f;
    --restore-shadow: 0 18px 48px rgba(80, 61, 37, 0.08);
  }

  html,
  body {
    min-width: 0;
  }

  body {
    background:
      radial-gradient(circle at 50% -12%, rgba(255, 255, 255, 0.96), transparent 38%),
      linear-gradient(180deg, #fcfaf6 0%, #f7f2e9 100%);
  }

  .workspace {
    width: 100%;
    min-height: 100dvh;
    margin: 0;
    padding: 84px 0 0;
  }

  .workspace:not(.is-auth-route) {
    padding: 82px 0 0;
  }

  /* 登录、注册和找回密码页不经过桌面顶栏，不能预留顶栏高度。 */
  .workspace.is-auth-route {
    padding: 0;
  }

  .nav {
    position: fixed;
    inset: 0 0 auto;
    left: 0;
    bottom: auto;
    z-index: 150;
    display: grid;
    grid-template-columns: minmax(250px, 1fr) repeat(5, minmax(88px, 118px)) max-content;
    grid-template-rows: 82px;
    align-items: center;
    gap: 0;
    width: 100%;
    height: 82px;
    padding: 0 30px;
    border: 0;
    border-bottom: 1px solid rgba(108, 83, 53, 0.18);
    border-radius: 0;
    background: rgba(255, 253, 249, 0.96);
    box-shadow: 0 6px 22px rgba(88, 67, 40, 0.04);
    backdrop-filter: blur(18px);
    transform: none;
  }

  .desktop-nav-brand {
    display: grid;
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .desktop-nav-seal {
    width: 46px;
    height: 46px;
    border-radius: 12px 14px 12px 15px;
    font-size: 27px;
    box-shadow: inset 0 0 0 4px rgba(255, 248, 237, 0.1), 0 7px 16px rgba(118, 44, 35, 0.15);
  }

  .desktop-nav-brand strong {
    font-size: 23px;
    letter-spacing: 0.14em;
  }

  .desktop-nav-brand small {
    font-size: 11px;
    letter-spacing: 0.04em;
  }

  .nav > button:not(.desktop-nav-account) {
    grid-row: 1;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    place-items: center;
    gap: 7px;
    width: auto;
    min-height: 54px;
    padding: 0 13px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--restore-ink);
    background: transparent;
    box-shadow: none;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-align: center;
    transform: none;
  }

  .nav > button:not(.desktop-nav-account)::after {
    display: none;
  }

  .nav > button:not(.desktop-nav-account):hover {
    color: var(--restore-red);
    background: rgba(193, 54, 43, 0.03);
    transform: none;
  }

  .nav > button:not(.desktop-nav-account).active {
    border: 1px solid rgba(189, 50, 40, 0.12);
    border-bottom: 2px solid var(--restore-red);
    border-radius: 12px 12px 8px 8px;
    color: var(--restore-red);
    background: linear-gradient(180deg, rgba(202, 71, 58, 0.07), rgba(255, 253, 249, 0.4));
    box-shadow: none;
  }

  .nav > button:not(.desktop-nav-account) svg {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .nav > button:nth-of-type(1) { grid-column: 2; }
  .nav > button:nth-of-type(2) { grid-column: 3; }
  .nav > button:nth-of-type(3) { grid-column: 4; }
  .nav > button:nth-of-type(4) { grid-column: 5; }
  .nav > button:nth-of-type(5) { grid-column: 6; }

  .nav .desktop-nav-account {
    grid-column: 7;
    grid-row: 1;
    justify-self: end;
    display: block;
    width: fit-content;
    max-width: 194px;
  }

  .nav .desktop-nav-account .profile-switcher-trigger {
    grid-template-columns: 34px minmax(0, 1fr) 12px;
    gap: 8px;
    min-height: 44px;
    max-width: 194px;
    padding: 4px 10px 4px 4px;
    border: 1px solid rgba(107, 84, 53, 0.16);
    border-radius: 24px;
    background: rgba(255, 253, 249, 0.72);
    color: var(--restore-ink);
  }

  .nav .desktop-nav-account .profile-switcher-trigger:hover {
    border-color: rgba(107, 84, 53, 0.3);
    background: rgba(255, 253, 249, 0.96);
  }

  .nav .desktop-nav-account .profile-switcher-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(107, 84, 53, 0.13);
    border-radius: 50%;
    background: rgba(255, 253, 249, 0.92);
    color: var(--restore-ink);
    font-family: Georgia, serif;
    font-size: 19px;
    transform: none;
  }

  .nav .desktop-nav-account .profile-switcher-mark span {
    transform: none;
  }

  .nav .desktop-nav-account .profile-switcher-name {
    max-width: 112px;
    font-size: 16px;
  }

  .nav .desktop-nav-account .profile-switcher-chevron {
    color: var(--restore-muted);
    font-size: 13px;
  }

  .nav .desktop-nav-account .profile-switcher-menu {
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    width: 280px;
    z-index: 190;
  }

  .desktop-nav-note {
    display: none;
  }

  .workspace:not(.is-auth-route) > .screen {
    min-height: calc(100dvh - 82px);
    margin: 0 auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .workspace:not(.is-auth-route) > .screen .fortune-title h1,
  .workspace:not(.is-auth-route) > .screen .page-title h1 {
    color: var(--restore-ink);
  }

  /* 问卜首页：两张任务卡 + 单一最近记录区，保持原来的实际入口。 */
  .workspace:not(.is-auth-route) > .oracle-screen[data-screen="oracle"] {
    width: var(--restore-page-width);
    max-width: 1400px;
    padding: 42px 0 54px;
  }

  .oracle-screen[data-screen="oracle"].is-active {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto 52px minmax(360px, auto) auto;
    gap: 18px 24px;
    align-content: start;
    isolation: isolate;
  }

  .oracle-screen[data-screen="oracle"]::before,
  .oracle-screen[data-screen="oracle"]::after {
    position: absolute;
    z-index: -1;
    width: 32%;
    height: 56%;
    content: "";
    opacity: 0.58;
    background: url("/prototype/assets/oracle-ink/oracle-cast-landscape-v3.webp") center / contain no-repeat;
    pointer-events: none;
  }

  .oracle-screen[data-screen="oracle"]::before {
    top: 128px;
    left: -7%;
  }

  .oracle-screen[data-screen="oracle"]::after {
    right: -7%;
    bottom: 36px;
    transform: scaleX(-1);
  }

  .oracle-screen[data-screen="oracle"] > .fortune-top {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    justify-content: center;
    min-height: 96px;
    margin: 0;
    padding: 2px 0 0;
    text-align: center;
  }

  .oracle-screen[data-screen="oracle"] > .fortune-top .fortune-title h1 {
    margin: 0;
    font-size: clamp(48px, 4vw, 60px);
    letter-spacing: 0.18em;
    line-height: 1.08;
  }

  .oracle-screen[data-screen="oracle"] > .fortune-top .fortune-title .sub {
    display: none;
  }

  .oracle-screen[data-screen="oracle"] > .fortune-top .oracle-history-button {
    position: absolute;
    top: 18px;
    right: 0;
    width: auto;
    min-width: 112px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--restore-line);
    border-radius: 21px;
    background: rgba(255, 253, 249, 0.72);
  }

  .oracle-screen[data-screen="oracle"] > .fortune-top .oracle-history-button::after {
    content: "问卜记录";
    margin-left: 7px;
    color: var(--restore-muted);
    font-family: var(--serif);
    font-size: 13px;
    white-space: nowrap;
  }

  .oracle-screen[data-screen="oracle"] .oracle-hub-hero {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    place-items: center;
    min-height: 52px;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .oracle-screen[data-screen="oracle"] .oracle-hub-hero > div {
    display: grid;
    gap: 7px;
    justify-items: center;
  }

  .oracle-screen[data-screen="oracle"] .oracle-hub-hero strong {
    color: #4b4740;
    font-size: 19px;
    font-weight: 580;
    letter-spacing: 0.22em;
  }

  .oracle-screen[data-screen="oracle"] .oracle-hub-hero span {
    color: var(--restore-muted);
    font-size: 14px;
    letter-spacing: 0.1em;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-grid {
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto;
    margin: 0;
    gap: 24px;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card {
    min-height: 370px;
    padding: 42px 42px;
    overflow: hidden;
    border: 1px solid rgba(121, 92, 54, 0.26);
    border-radius: 20px;
    background: rgba(255, 253, 248, 0.8);
    box-shadow: var(--restore-shadow);
    text-align: left;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card::after {
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(163, 126, 78, 0.18);
    border-radius: 14px;
    content: "";
    pointer-events: none;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-bg {
    right: -2%;
    bottom: -3%;
    width: 74%;
    max-width: none;
    opacity: 0.92;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-copy {
    position: relative;
    z-index: 2;
    display: grid;
    justify-items: start;
    width: 47%;
    gap: 12px;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-copy small {
    color: var(--restore-red);
    font-size: 16px;
    font-weight: 760;
    letter-spacing: 0.12em;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-dream .oracle-entry-card-copy small {
    color: var(--restore-green);
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-copy strong {
    color: var(--restore-ink);
    font-size: clamp(36px, 3.3vw, 50px);
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.08;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-copy em {
    color: var(--restore-muted);
    font-size: 16px;
    font-style: normal;
    line-height: 1.7;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-arrow {
    display: grid;
    grid-template-columns: auto 16px;
    gap: 14px;
    align-items: center;
    min-width: 168px;
    min-height: 50px;
    margin-top: 58px;
    padding: 0 20px;
    border: 1px solid var(--restore-red);
    border-radius: 7px;
    color: var(--restore-red);
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-arrow::before {
    content: "开始问事";
    font-size: 17px;
    font-weight: 700;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-dream .oracle-entry-arrow {
    border-color: var(--restore-green);
    color: var(--restore-green);
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-dream .oracle-entry-arrow::before {
    content: "记下梦境";
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-arrow svg {
    width: 20px;
    transform: rotate(180deg);
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-panel {
    grid-column: 1 / -1;
    grid-row: 4;
    width: min(100%, 950px);
    margin: 4px auto 0;
    border: 1px solid rgba(121, 92, 54, 0.24);
    border-radius: 16px;
    background: rgba(255, 253, 249, 0.76);
    box-shadow: 0 12px 32px rgba(80, 61, 37, 0.05);
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-head {
    min-height: 56px;
    padding: 0 22px;
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-head strong {
    font-size: 18px;
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-head button {
    color: var(--restore-muted);
    font-size: 13px;
  }

  /* 六爻问事：窄而有仪式感的单一任务台。 */
  .workspace:not(.is-auth-route) > .oracle-screen[data-screen="oracle-question"] {
    width: min(calc(100% - 72px), 1160px);
    max-width: 1160px;
    padding: 42px 0 68px;
  }

  .oracle-screen[data-screen="oracle-question"].is-active {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(270px, auto) 250px;
    gap: 16px;
    align-content: start;
    padding-top: 42px;
  }

  .oracle-screen[data-screen="oracle-question"]::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    opacity: 0.46;
    background:
      radial-gradient(ellipse at 50% 34%, rgba(224, 210, 184, 0.34), transparent 31%),
      url("/prototype/assets/oracle-ink/oracle-cast-landscape-v3.webp") center bottom / 96% auto no-repeat;
    pointer-events: none;
  }

  .oracle-screen[data-screen="oracle-question"] > .fortune-top {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    justify-content: center;
    min-height: 118px;
    margin: 0;
    text-align: center;
  }

  .oracle-screen[data-screen="oracle-question"] .fortune-title h1 {
    font-size: clamp(48px, 4.2vw, 62px);
    letter-spacing: 0.18em;
  }

  .oracle-screen[data-screen="oracle-question"] .fortune-title .sub {
    margin-top: 8px;
    color: var(--restore-muted);
    font-size: 18px;
    letter-spacing: 0.16em;
  }

  .oracle-screen[data-screen="oracle-question"] > .fortune-top .icon-button:first-child,
  .oracle-screen[data-screen="oracle-question"] > .fortune-top .icon-button:last-child {
    position: absolute;
    top: 20px;
  }

  .oracle-screen[data-screen="oracle-question"] > .fortune-top .icon-button:first-child { left: 4px; }
  .oracle-screen[data-screen="oracle-question"] > .fortune-top .icon-button:last-child { right: 4px; }

  .oracle-screen[data-screen="oracle-question"] > .oracle-query {
    grid-column: 1;
    grid-row: 2;
    width: min(100%, 820px);
    min-height: 270px;
    margin: 0 auto;
    padding: 30px 42px 24px;
    border: 1px solid rgba(126, 95, 56, 0.26);
    border-radius: 15px;
    background: rgba(255, 252, 247, 0.92);
    box-shadow: var(--restore-shadow);
  }

  .oracle-screen[data-screen="oracle-question"] .oracle-question {
    min-height: 0;
    padding: 0;
    background: transparent;
  }

  .oracle-screen[data-screen="oracle-question"] .oracle-question-head strong {
    color: var(--restore-ink);
    font-size: 22px;
    letter-spacing: 0.08em;
  }

  .oracle-screen[data-screen="oracle-question"] .oracle-question > small,
  .oracle-screen[data-screen="oracle-question"] .oracle-question-hint {
    color: var(--restore-muted);
    font-size: 14px;
  }

  .oracle-screen[data-screen="oracle-question"] .oracle-input-shell {
    min-height: 124px;
    margin-top: 16px;
    border-color: rgba(126, 95, 56, 0.32);
    border-radius: 10px;
    background: rgba(255, 253, 249, 0.76);
  }

  .oracle-screen[data-screen="oracle-question"] .oracle-question-input {
    height: 124px;
    min-height: 124px;
    padding: 18px 20px;
    color: var(--restore-ink);
    font-size: 17px;
    line-height: 1.75;
  }

  .oracle-screen[data-screen="oracle-question"] .oracle-button.ritual {
    width: min(100%, 580px);
    min-height: 66px;
    margin: 22px auto 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #a9241d, #cb3a2e 60%, #a8241e);
    box-shadow: 0 10px 18px rgba(150, 38, 29, 0.17);
  }

  .oracle-screen[data-screen="oracle-question"] .ritual-button-kicker,
  .oracle-screen[data-screen="oracle-question"] .ritual-button-seal { display: none; }

  .oracle-screen[data-screen="oracle-question"] .ritual-button-main {
    font-size: 25px;
    letter-spacing: 0.16em;
  }

  .oracle-screen[data-screen="oracle-question"] > .oracle-hero {
    grid-column: 1;
    grid-row: 3;
    width: min(100%, 700px);
    min-height: 250px;
    margin: 0 auto;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .oracle-screen[data-screen="oracle-question"] .oracle-entry-visual {
    top: -18px;
    right: 50%;
    bottom: auto;
    left: auto;
    width: 590px;
    height: 278px;
    transform: translateX(50%);
  }

  .oracle-screen[data-screen="oracle-question"] .oracle-entry-focus {
    top: 0;
    width: 540px;
  }

  .oracle-screen[data-screen="oracle-question"] .oracle-entry-coins {
    top: 75px;
    transform: translateX(-50%) scale(1.16);
  }

  /* 起卦：固定为逐爻记录，不能再选择快速/标准两种方式。 */
  .workspace:not(.is-auth-route) > .oracle-screen[data-screen="oracle-cast"] {
    width: var(--restore-narrow-width);
    max-width: 980px;
    padding: 34px 0 64px;
  }

  .oracle-screen[data-screen="oracle-cast"].is-active {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-content: start;
  }

  .oracle-screen[data-screen="oracle-cast"] > .fortune-top {
    position: relative;
    display: flex;
    justify-content: center;
    min-height: 108px;
    margin: 0;
    text-align: center;
  }

  .oracle-screen[data-screen="oracle-cast"] .fortune-title h1 {
    font-size: 52px;
    letter-spacing: 0.18em;
  }

  .oracle-screen[data-screen="oracle-cast"] .fortune-title .sub {
    margin-top: 8px;
    color: var(--restore-muted);
    font-size: 17px;
    letter-spacing: 0.14em;
  }

  .oracle-screen[data-screen="oracle-cast"] > .fortune-top .icon-button:first-child,
  .oracle-screen[data-screen="oracle-cast"] > .fortune-top .icon-button:last-child {
    position: absolute;
    top: 16px;
  }

  .oracle-screen[data-screen="oracle-cast"] > .fortune-top .icon-button:first-child { left: 0; }
  .oracle-screen[data-screen="oracle-cast"] > .fortune-top .icon-button:last-child { right: 0; }

  .oracle-screen[data-screen="oracle-cast"] .oracle-copy {
    width: min(100%, 650px);
    margin: -14px auto 8px;
    color: var(--restore-muted);
    font-size: 15px;
    text-align: center;
  }

  .oracle-screen[data-screen="oracle-cast"] .oracle-cast-stage {
    position: relative;
    display: grid;
    grid-template-columns: minmax(280px, 0.82fr) minmax(330px, 1.18fr);
    grid-template-rows: auto auto 1fr;
    min-height: 490px;
    padding: 48px 58px 38px;
    overflow: hidden;
    border: 1px solid rgba(126, 95, 56, 0.25);
    border-radius: 16px;
    background:
      radial-gradient(circle at 22% 58%, rgba(222, 201, 164, 0.25), transparent 30%),
      rgba(255, 252, 247, 0.9);
    box-shadow: var(--restore-shadow);
  }

  .oracle-screen[data-screen="oracle-cast"] .oracle-mountain-art {
    right: -15%;
    bottom: -16%;
    width: 80%;
    opacity: 0.28;
  }

  .oracle-screen[data-screen="oracle-cast"] .oracle-coin-button {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    grid-column: 1;
    grid-row: 1 / 3;
    z-index: 2;
    align-self: center;
    justify-self: center;
    width: 255px;
    min-height: 248px;
    border: 0;
    background: transparent;
    transform: none;
  }

  .oracle-screen[data-screen="oracle-cast"] .oracle-coin-button > span:last-child {
    position: absolute;
    bottom: -16px;
    width: 100%;
    color: var(--restore-muted);
    font-size: 14px;
  }

  .oracle-screen[data-screen="oracle-cast"] .oracle-coin-tray {
    transform: scale(1.05);
  }

  .oracle-screen[data-screen="oracle-cast"] .oracle-hex-lines {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    grid-column: 2;
    grid-row: 1;
    z-index: 2;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    transform: none;
  }

  .oracle-screen[data-screen="oracle-cast"] .oracle-cast-number {
    grid-column: 2;
    grid-row: 2;
    z-index: 2;
    align-self: start;
    margin-top: 15px;
  }

  .oracle-screen[data-screen="oracle-cast"] .oracle-cast-steps {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    grid-column: 2;
    grid-row: 3;
    z-index: 2;
    align-self: end;
    width: 100%;
    margin: 16px 0 0;
  }

  .oracle-screen[data-screen="oracle-cast"] [data-cast-idle-coins] { display: none !important; }

  .oracle-screen[data-screen="oracle-cast"] .oracle-cast-note {
    position: absolute;
    right: 57px;
    bottom: 34px;
    left: 57px;
    z-index: 2;
    margin: 0;
    color: var(--restore-muted);
    font-size: 14px;
    text-align: center;
  }

  .oracle-screen[data-screen="oracle-cast"] .oracle-cast-actions {
    width: min(100%, 760px);
    margin: 10px auto 0;
  }

  .oracle-screen[data-screen="oracle-cast"] .oracle-cast-status-panel {
    min-height: 56px;
    margin-bottom: 10px;
    border-radius: 8px;
  }

  .oracle-screen[data-screen="oracle-cast"] .oracle-cast-actions .oracle-button {
    min-height: 66px;
    border-radius: 8px;
    background: linear-gradient(135deg, #a9241d, #cb3a2e 60%, #a8241e);
    font-size: 22px;
    letter-spacing: 0.12em;
  }

  /* 解卦：卦象、摘要和行动信息按内容密度分栏，不以空白补宽。 */
  .workspace:not(.is-auth-route) > .oracle-screen[data-screen="oracle-result"] {
    width: var(--restore-page-width);
    max-width: 1400px;
    padding: 34px 0 64px;
  }

  .oracle-screen[data-screen="oracle-result"].is-active {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
    gap: 18px 22px;
    align-content: start;
  }

  .oracle-screen[data-screen="oracle-result"] > .fortune-top,
  .oracle-screen[data-screen="oracle-result"] > .oracle-result-visual,
  .oracle-screen[data-screen="oracle-result"] > .oracle-report-longform {
    grid-column: 1 / -1;
  }

  .oracle-screen[data-screen="oracle-result"] > .fortune-top {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 104px;
    margin: 0;
  }

  .oracle-screen[data-screen="oracle-result"] > .fortune-top .fortune-title {
    position: absolute !important;
    top: 0;
    left: 0;
    width: auto !important;
    margin: 0 !important;
    transform: none !important;
    justify-items: start !important;
    text-align: left !important;
  }

  .oracle-screen[data-screen="oracle-result"] > .fortune-top .icon-button:first-child { display: none; }

  .oracle-screen[data-screen="oracle-result"] > .fortune-top .fortune-title h1 {
    font-size: 42px;
    letter-spacing: 0.12em;
  }

  .oracle-screen[data-screen="oracle-result"] > .fortune-top .fortune-title .sub {
    font-size: 16px;
  }

  .oracle-screen[data-screen="oracle-result"] > .fortune-top .icon-button:last-child {
    width: auto;
    min-width: 128px;
    padding: 0 16px;
    border: 1px solid var(--restore-line);
    border-radius: 7px;
  }

  .oracle-screen[data-screen="oracle-result"] > .fortune-top .icon-button:last-child::after {
    content: "重新起卦";
    margin-left: 7px;
    color: var(--restore-muted);
    font-family: var(--serif);
    font-size: 14px;
    white-space: nowrap;
  }

  .oracle-screen[data-screen="oracle-result"] .oracle-result-visual {
    min-height: 218px;
    margin: 0;
    border: 1px solid rgba(126, 95, 56, 0.25);
    border-radius: 14px;
    background: rgba(255, 253, 249, 0.78);
    box-shadow: 0 12px 32px rgba(80, 61, 37, 0.05);
  }

  .oracle-screen[data-screen="oracle-result"] .oracle-result-hexes {
    width: min(100%, 780px);
    margin: 0 auto;
  }

  .oracle-screen[data-screen="oracle-result"] .oracle-result-copy,
  .oracle-screen[data-screen="oracle-result"] .oracle-answer-grid {
    margin: 0;
    border: 1px solid rgba(126, 95, 56, 0.24);
    border-radius: 12px;
    background: rgba(255, 253, 249, 0.78);
    box-shadow: 0 10px 28px rgba(80, 61, 37, 0.04);
  }

  .oracle-screen[data-screen="oracle-result"] .oracle-result-copy {
    grid-column: 1;
    padding: 28px 30px;
  }

  .oracle-screen[data-screen="oracle-result"] .oracle-result-copy h2 {
    color: var(--restore-ink);
    font-size: clamp(27px, 2.2vw, 36px);
    line-height: 1.34;
  }

  .oracle-screen[data-screen="oracle-result"] .oracle-result-copy p {
    color: #5f584f;
    font-size: 16px;
    line-height: 1.86;
  }

  .oracle-screen[data-screen="oracle-result"] .oracle-answer-grid {
    grid-column: 2;
    display: grid;
    grid-template-columns: 1fr;
    padding: 12px 20px;
  }

  .oracle-screen[data-screen="oracle-result"] .oracle-answer-grid > div {
    min-height: 74px;
    padding: 13px 4px;
    border-radius: 0;
    background: transparent;
  }

  .oracle-screen[data-screen="oracle-result"] .oracle-report-longform {
    margin: 0;
    padding: 26px 30px;
    border: 1px solid rgba(126, 95, 56, 0.22);
    border-radius: 12px;
    background: rgba(255, 253, 249, 0.7);
  }

  /* 运势：首页保留移动端每日运势的阅读密度，右侧承担日期切换与两条延展入口。 */
  .workspace:not(.is-auth-route) > .fortune-home-screen[data-screen="fortune"] {
    width: var(--restore-page-width);
    max-width: 1400px;
    padding: 10px 0 38px;
  }

  .fortune-home-screen.is-active {
    display: grid;
    grid-template-columns: minmax(432px, 0.88fr) minmax(610px, 1.12fr);
    grid-template-rows: 164px minmax(430px, 1fr);
    gap: 18px 36px;
    align-content: start;
    background: transparent;
  }

  .fortune-home-screen::before,
  .fortune-home-screen::after {
    display: none;
  }

  .fortune-home-screen > * {
    position: relative;
    z-index: 1;
  }

  .fortune-home-screen .fortune-home-topbar {
    display: contents;
  }

  .fortune-home-screen .fortune-home-topbar .profile-switcher-host { display: none; }

  .fortune-home-screen .fortune-calendar-button {
    grid-column: 2;
    grid-row: 1;
    z-index: 3;
    align-self: start;
    justify-self: end;
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    margin: 12px 16px 0 0;
    padding: 0;
    border: 1px solid var(--restore-line);
    border-radius: 7px;
  }

  .fortune-home-screen .fortune-calendar-button::after {
    content: none;
  }

  .fortune-home-title {
    display: none;
  }

  .fortune-day-wheel {
    display: none;
  }

  .desktop-fortune-daily {
    grid-column: 1;
    grid-row: 1 / span 2;
    position: relative;
    display: block;
    min-height: 640px;
    overflow: hidden;
    border: 1px solid rgba(110, 86, 55, 0.22);
    border-radius: 14px 14px 4px 14px;
    background: #f9f5ec;
    box-shadow: 0 12px 32px rgba(80, 61, 37, 0.055);
    isolation: isolate;
  }

  .desktop-fortune-daily::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    background:
      linear-gradient(180deg, rgba(255, 253, 248, 0.03), rgba(255, 253, 248, 0.18) 48%, rgba(255, 253, 248, 0.62) 100%),
      linear-gradient(90deg, rgba(255, 253, 248, 0.44), rgba(255, 253, 248, 0.06) 64%, rgba(255, 253, 248, 0.18));
    pointer-events: none;
  }

  .desktop-fortune-daily-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 32%;
    opacity: 1;
    filter: saturate(0.98) contrast(1.02);
  }

  .desktop-fortune-daily[data-fortune-grade="good"] .desktop-fortune-daily-bg { object-position: center 27%; }
  .desktop-fortune-daily[data-fortune-grade="steady"] .desktop-fortune-daily-bg { object-position: center 30%; }
  .desktop-fortune-daily[data-fortune-grade="neutral"] .desktop-fortune-daily-bg { object-position: center 34%; }
  .desktop-fortune-daily[data-fortune-grade="careful"] .desktop-fortune-daily-bg { object-position: center 31%; }

  .desktop-fortune-daily-copy {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    min-height: 640px;
    padding: 32px 36px 28px;
  }

  .desktop-fortune-daily-copy > header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(108, 83, 53, 0.17);
    color: var(--restore-ink);
    font-family: var(--serif);
  }

  .desktop-fortune-daily-copy > header > span {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.12em;
  }

  .desktop-fortune-daily-copy > header time {
    color: var(--restore-muted);
    font-size: 14px;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }

  .desktop-fortune-day {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 98px;
    align-items: center;
    gap: 20px;
    padding: 34px 0 20px;
  }

  .desktop-fortune-day > strong {
    color: var(--restore-ink);
    font-family: var(--serif);
    font-size: clamp(46px, 4vw, 64px);
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1;
    white-space: nowrap;
  }

  .desktop-fortune-day > b {
    display: grid;
    place-items: center;
    width: 94px;
    height: 94px;
    border: 1px solid rgba(62, 118, 89, 0.42);
    border-radius: 50%;
    background: rgba(255, 253, 248, 0.54);
    box-shadow: inset 0 0 0 7px rgba(62, 118, 89, 0.09);
    color: #39775f;
    font-family: var(--serif);
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
  }

  .desktop-fortune-daily[data-fortune-grade="careful"] .desktop-fortune-day > b { color: #af4436; border-color: rgba(175, 68, 54, 0.48); box-shadow: inset 0 0 0 7px rgba(175, 68, 54, 0.08); }
  .desktop-fortune-daily[data-fortune-grade="neutral"] .desktop-fortune-day > b { color: #9b7638; border-color: rgba(155, 118, 56, 0.48); box-shadow: inset 0 0 0 7px rgba(155, 118, 56, 0.08); }

  .desktop-fortune-headline {
    max-width: 18ch;
    margin: 0;
    padding: 21px 0 20px;
    border-top: 1px solid rgba(108, 83, 53, 0.17);
    color: #332f29;
    font-family: var(--serif);
    font-size: clamp(24px, 2.15vw, 31px);
    font-weight: 750;
    letter-spacing: 0.04em;
    line-height: 1.43;
    text-wrap: balance;
  }

  .desktop-fortune-guidance {
    display: grid;
    gap: 14px;
    padding-top: 6px;
  }

  .desktop-fortune-guidance p {
    display: grid;
    grid-template-columns: 35px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid rgba(108, 83, 53, 0.12);
    color: #514a41;
  }

  .desktop-fortune-guidance b {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-top: 2px;
    border-radius: 50%;
    background: #4d8465;
    color: #fffdf8;
    font-family: var(--serif);
    font-size: 16px;
  }

  .desktop-fortune-guidance .is-avoid b { background: #b44435; }

  .desktop-fortune-guidance span {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 650;
    letter-spacing: 0.05em;
    line-height: 1.72;
    white-space: normal;
  }

  .desktop-fortune-daily-copy footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 22px;
    color: #6f6558;
    font-family: var(--serif);
    font-size: 14px;
    letter-spacing: 0.06em;
  }

  .desktop-fortune-term-seal {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(175, 68, 54, 0.56);
    color: #b44435;
    font-weight: 800;
  }

  .fortune-week-strip.date-strip {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    position: relative;
    height: 164px;
    margin: 0;
    padding: 58px 8px 10px;
    border: 1px solid rgba(126, 95, 56, 0.2);
    border-radius: 12px;
    background: rgba(255, 253, 249, 0.72);
  }

  .fortune-week-strip.date-strip::before {
    content: "本周节奏";
    position: absolute;
    top: 18px;
    left: 24px;
    color: var(--restore-ink);
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 0.08em;
  }

  .fortune-week-strip.date-strip::after {
    display: none;
  }

  .fortune-week-strip.date-strip button {
    padding: 10px 6px;
    border-radius: 7px;
  }

  .fortune-week-strip.date-strip button span,
  .fortune-week-strip.date-strip button em { font-size: 13px; }
  .fortune-week-strip.date-strip button strong { margin-top: 7px; font-size: 17px; }

  .fortune-home-entry-list {
    grid-column: 2;
    grid-row: 2;
    align-self: stretch;
    display: grid;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 16px;
    min-height: 398px;
    margin: 0;
  }

  .fortune-home-entry-card,
  .fortune-home-entry-card.fortune-annual-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    min-height: 0;
    height: 100%;
    padding: 24px 28px 24px 47%;
    overflow: hidden;
    border: 1px solid rgba(110, 86, 55, 0.22);
    border-radius: 12px;
    background: rgba(255, 253, 249, 0.72);
    box-shadow: 0 12px 30px rgba(80, 61, 37, 0.05);
  }

  .fortune-home-entry-card.fortune-annual-card {
    background: rgba(255, 253, 249, 0.74);
  }

  .fortune-home-entry-card .fortune-home-entry-bg {
    width: 100%;
    opacity: 0.92;
    object-position: left center;
  }

  .fortune-home-entry-card::after {
    background: linear-gradient(90deg, rgba(255, 253, 249, 0.04) 0 33%, rgba(255, 253, 249, 0.66) 48%, rgba(255, 253, 249, 0.94) 100%);
  }

  .fortune-home-entry-copy,
  .fortune-home-entry-copy.fortune-annual-copy { gap: 10px; }

  .fortune-home-entry-copy > strong,
  .fortune-home-entry-copy > span strong,
  .fortune-home-entry-copy.fortune-annual-copy strong {
    font-size: clamp(27px, 2.2vw, 33px);
    letter-spacing: 0.07em;
  }

  .fortune-home-entry-copy > small,
  .fortune-home-entry-copy.fortune-annual-copy small {
    color: #5c554b;
    font-family: var(--serif);
    font-size: 15px;
    line-height: 1.5;
    white-space: normal;
  }

  .fortune-home-entry-copy.fortune-annual-copy em {
    height: 23px;
    padding: 0 8px;
    font-size: 11px;
  }

  .fortune-home-entry-card .fortune-round-arrow { display: none; }

  .desktop-fortune-entry-cta {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    margin-top: 16px;
    padding: 9px 15px;
    border: 1px solid rgba(117, 87, 44, 0.56);
    border-radius: 5px;
    color: #79572c;
    font-family: var(--serif);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }

  .desktop-fortune-entry-cta i {
    font-family: var(--sans);
    font-size: 19px;
    font-style: normal;
    line-height: 1;
  }

  .fortune-home-entry-card:hover .desktop-fortune-entry-cta {
    border-color: rgba(62, 118, 89, 0.64);
    color: #39775f;
  }

  /* 命盘：桌面端以四柱、五行和当日建议构成一张信息完整的总览。 */
  .workspace:not(.is-auth-route) > .overview-screen[data-screen="overview"] {
    width: var(--restore-page-width);
    max-width: 1400px;
    min-height: calc(100dvh - 82px);
    padding: 18px 0 28px;
  }

  .overview-screen.is-active {
    display: block;
  }

  .overview-screen > .topbar,
  .overview-screen > .overview-title-block,
  .overview-screen > .hero,
  .overview-screen > .quick-actions,
  .overview-screen > .overview-feature-card,
  .overview-screen > .overview-data-strip {
    display: none;
  }

  .desktop-bazi-board {
    display: block;
    color: var(--restore-ink);
  }

  .desktop-bazi-main-grid {
    display: grid;
    grid-template-columns: minmax(340px, 0.82fr) minmax(430px, 1.08fr) minmax(330px, 0.78fr);
    min-height: 570px;
    border-bottom: 1px solid rgba(110, 86, 55, 0.22);
  }

  .desktop-bazi-main-grid > section {
    min-width: 0;
    padding: 22px 28px 18px;
  }

  .desktop-bazi-main-grid > section + section {
    border-left: 1px solid rgba(110, 86, 55, 0.22);
  }

  .desktop-bazi-main-grid h3,
  .desktop-bazi-explore h3 {
    margin: 0;
    color: var(--restore-ink);
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 760;
    letter-spacing: 0.08em;
  }

  .desktop-bazi-pillars h3 {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(110, 86, 55, 0.28);
  }

  .desktop-pillar-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 22px;
  }

  .desktop-pillar-grid article {
    display: grid;
    justify-items: center;
    gap: 6px;
    min-height: 232px;
    padding: 0 8px;
    border-right: 1px solid rgba(110, 86, 55, 0.18);
  }

  .desktop-pillar-grid article:last-child { border-right: 0; }
  .desktop-pillar-grid small { color: #5d574e; font-size: 13px; }
  .desktop-pillar-grid b { margin-top: 5px; color: #5d574e; font-size: 15px; font-weight: 600; }
  .desktop-pillar-grid strong { color: #26231f; font-family: var(--serif); font-size: 42px; line-height: 1; }
  .desktop-pillar-grid em {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: #827f75;
    color: #fff;
    font-size: 12px;
    font-style: normal;
  }

  .desktop-pillar-grid .wood { color: #418158; }
  .desktop-pillar-grid em.wood { background: #4b8a61; color: #fff; }
  .desktop-pillar-grid .fire { color: #b44639; }
  .desktop-pillar-grid em.fire { background: #b44639; color: #fff; }
  .desktop-pillar-grid .water { color: #3d7891; }
  .desktop-pillar-grid em.water { background: #3d7891; color: #fff; }
  .desktop-pillar-grid .metal { color: #9b7840; }
  .desktop-pillar-grid em.metal { background: #9b7840; color: #fff; }

  .desktop-bazi-facts {
    display: grid;
    gap: 0;
    margin: 14px 0 0;
  }

  .desktop-bazi-facts > div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(110, 86, 55, 0.16);
    font-size: 14px;
  }

  .desktop-bazi-facts dt { color: #70685e; }
  .desktop-bazi-facts dd {
    max-width: 240px;
    margin: 0;
    color: #37322d;
    font-weight: 650;
    line-height: 1.45;
    text-align: right;
  }

  .desktop-bazi-facts > div { align-items: start; }
  .desktop-bazi-facts > .is-dimension {
    border-bottom-style: dashed;
  }

  .desktop-bazi-dimension-link {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 7px;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: inherit;
    text-align: right;
    cursor: pointer;
  }

  .desktop-bazi-dimension-link span {
    color: rgba(72, 117, 88, 0.78);
    font-size: 18px;
    line-height: 1;
  }

  .desktop-bazi-dimension-link:hover,
  .desktop-bazi-dimension-link:focus-visible {
    color: #2d6d48;
    outline: 0;
  }

  .desktop-bazi-dimension-link:focus-visible {
    text-decoration: underline;
    text-decoration-color: rgba(72, 117, 88, 0.54);
    text-underline-offset: 3px;
  }

  .desktop-bazi-facts > div:nth-child(7) dd {
    max-width: 230px;
  }

  .desktop-bazi-elements {
    display: grid;
    grid-template-rows: auto 1fr auto;
    justify-items: center;
  }

  .desktop-bazi-elements h3 { width: 100%; }

  .desktop-element-info-wrap {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
  }

  .desktop-element-info-trigger {
    display: inline-grid;
    place-items: center;
    width: 17px;
    height: 17px;
    margin-left: 4px;
    padding: 0;
    border: 1px solid rgba(74, 64, 52, 0.5);
    border-radius: 50%;
    background: rgba(255, 253, 249, 0.72);
    color: #776f64;
    cursor: help;
    font-family: Georgia, serif;
    font-size: 11px;
    font-style: normal;
    line-height: 1;
  }

  .desktop-element-info-trigger:focus-visible {
    outline: 2px solid rgba(59, 119, 95, 0.72);
    outline-offset: 2px;
  }

  .desktop-element-info-tip {
    position: absolute;
    z-index: 10;
    top: calc(100% + 9px);
    left: 50%;
    width: 244px;
    padding: 9px 10px;
    border: 1px solid rgba(121, 98, 66, 0.2);
    border-radius: 9px;
    background: rgba(46, 42, 37, 0.94);
    box-shadow: 0 9px 22px rgba(46, 39, 30, 0.18);
    color: rgba(255, 252, 246, 0.95);
    font-family: var(--sans);
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
    line-height: 1.5;
    opacity: 0;
    pointer-events: none;
    text-align: left;
    transform: translate(-50%, -3px);
    transition: opacity 160ms ease, transform 160ms ease;
    visibility: hidden;
  }

  .desktop-element-info-wrap:hover .desktop-element-info-tip,
  .desktop-element-info-wrap:focus-within .desktop-element-info-tip {
    opacity: 1;
    transform: translate(-50%, 0);
    visibility: visible;
  }

  .desktop-bazi-wheel {
    align-self: center;
    width: min(100%, 366px);
    height: min(100%, 366px);
    margin: 14px 0 8px;
  }

  .desktop-bazi-wheel .element-char {
    width: 60px;
    height: 60px;
    font-size: 32px;
  }

  .desktop-bazi-wheel .seal-wheel-core {
    width: 112px;
    height: 112px;
  }

  .desktop-bazi-wheel .seal-wheel-core strong { font-size: 62px; }

  .desktop-bazi-wheel .desktop-wheel-status {
    position: absolute;
    z-index: 5;
    display: inline-flex;
    gap: 7px;
    align-items: center;
    color: #59534a;
    font-family: var(--serif);
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0.04em;
    white-space: nowrap;
    pointer-events: none;
  }

  .desktop-bazi-wheel .desktop-wheel-status.fire { top: -28px; left: 50%; transform: translateX(-50%); color: #a94134; }
  .desktop-bazi-wheel .desktop-wheel-status.earth { top: 28%; right: -52px; color: #947342; }
  .desktop-bazi-wheel .desktop-wheel-status.metal { right: -24px; bottom: 14%; color: #65635d; }
  .desktop-bazi-wheel .desktop-wheel-status.water { bottom: 14%; left: -24px; color: #3d7891; }
  .desktop-bazi-wheel .desktop-wheel-status.wood { top: 28%; left: -52px; color: #3f7b59; }

  .desktop-bazi-wheel .desktop-strength {
    display: inline-flex;
    gap: 2px;
    align-items: flex-end;
    height: 18px;
    flex: 0 0 auto;
  }

  .desktop-bazi-wheel .desktop-strength em {
    display: block;
    width: 4px;
    height: 12px;
    border-radius: 1px;
    background: currentColor;
    opacity: 0.78;
  }

  .desktop-bazi-wheel .desktop-strength em:nth-child(2) { height: 15px; }
  .desktop-bazi-wheel .desktop-strength em:nth-child(3) { height: 18px; }
  .desktop-bazi-wheel .desktop-strength em:nth-child(4) { height: 15px; }
  .desktop-bazi-wheel .desktop-strength em:nth-child(5) { height: 12px; }

  .desktop-element-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
    margin: 0;
    color: #625b51;
    font-size: 13px;
  }

  .desktop-element-legend .wood { color: #39775f; }
  .desktop-element-legend .fire { color: #b44639; }
  .desktop-element-legend .earth { color: #a27b3d; }
  .desktop-element-legend .metal { color: #74716a; }
  .desktop-element-legend .water { color: #3f7d96; }

  .desktop-bazi-guidance {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
      radial-gradient(circle at 105% -4%, rgba(57, 119, 95, 0.14), transparent 38%),
      linear-gradient(145deg, rgba(253, 250, 244, 0.98), rgba(245, 239, 228, 0.86));
  }

  .desktop-bazi-guidance::before {
    position: absolute;
    top: 22px;
    left: 28px;
    z-index: -1;
    width: 52px;
    height: 1px;
    content: "";
    background: linear-gradient(90deg, #39775f 0 35%, rgba(57, 119, 95, 0.08) 35% 100%);
  }

  .desktop-bazi-guidance::after {
    position: absolute;
    right: -24px;
    bottom: -10px;
    width: 54%;
    height: 52%;
    content: "";
    z-index: -1;
    opacity: 0.14;
    background: url("/prototype/assets/oracle-ink/oracle-cast-landscape-v3.webp") right bottom / contain no-repeat;
    pointer-events: none;
  }

  .desktop-bazi-guidance-head {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
  }

  .desktop-bazi-guidance-head h3 {
    margin: 0;
    padding-top: 7px;
  }

  .desktop-bazi-guidance-head p {
    max-width: 24em;
    margin: 13px 0 0;
    color: #71695e;
    font-size: 12px;
    line-height: 1.65;
  }

  .desktop-bazi-guidance-link {
    flex: 0 0 auto;
    margin-top: 2px;
    padding: 5px 0 6px 9px;
    border: 0;
    border-bottom: 1px solid rgba(57, 119, 95, 0.3);
    background: transparent;
    color: #39775f;
    font-family: var(--serif);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
    transition: color 180ms ease, border-color 180ms ease, transform 180ms ease;
  }

  .desktop-bazi-guidance-link i {
    padding-left: 3px;
    font-family: Georgia, serif;
    font-size: 16px;
    font-style: normal;
    line-height: 0;
  }

  .desktop-bazi-guidance-link:hover {
    border-color: #39775f;
    color: #285c46;
    transform: translateX(2px);
  }

  .desktop-bazi-guidance-link:focus-visible {
    outline: 2px solid rgba(57, 119, 95, 0.55);
    outline-offset: 3px;
  }

  .desktop-bazi-guidance h4 {
    position: relative;
    z-index: 1;
    max-width: 10.5em;
    margin: 16px 0 13px;
    color: var(--restore-ink);
    font-family: var(--serif);
    font-size: clamp(25px, 2vw, 30px);
    font-weight: 780;
    letter-spacing: -0.045em;
    line-height: 1.26;
    text-wrap: balance;
  }

  .desktop-bazi-guidance-list {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(110, 86, 55, 0.2);
  }

  .desktop-bazi-guidance article {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 13px;
    align-items: start;
    min-height: 56px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(110, 86, 55, 0.14);
  }

  .desktop-bazi-guidance article > p {
    min-height: 38px;
    margin: 2px 0 0;
    padding: 1px 9px 0 1px;
    border-right: 1px solid rgba(110, 86, 55, 0.16);
    font-family: var(--serif);
  }

  .desktop-bazi-guidance article > p b {
    display: block;
    color: #39775f;
    font-size: 18px;
    line-height: 1.04;
  }

  .desktop-bazi-guidance article > p small {
    display: block;
    margin-top: 4px;
    color: #8a8174;
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.08em;
    line-height: 1;
  }

  .desktop-bazi-guidance article.is-avoid > p b { color: #ae4b3d; }
  .desktop-bazi-guidance article.is-steady > p b { color: #9b763c; }
  .desktop-bazi-guidance article > span { display: grid; gap: 3px; padding-top: 1px; }
  .desktop-bazi-guidance article strong { color: #37312b; font-size: 15px; letter-spacing: -0.02em; }
  .desktop-bazi-guidance article > span small { color: #776f64; font-size: 11px; line-height: 1.45; }

  .desktop-bazi-entry-stack {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
    margin-top: 12px;
  }

  .desktop-bazi-entry-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    align-items: center;
    min-height: 84px;
    padding: 8px 10px 8px 104px;
    overflow: hidden;
    border: 1px solid rgba(173, 138, 77, 0.24);
    border-radius: 16px;
    background: rgba(255, 252, 247, 0.86);
    color: var(--restore-ink);
    text-align: left;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 10px 22px rgba(54, 44, 32, 0.05);
  }

  .desktop-bazi-entry-card::before {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    background: linear-gradient(90deg, rgba(255, 252, 247, 0) 0 26%, rgba(255, 252, 247, 0.58) 43%, rgba(255, 252, 247, 0.98) 78%);
    pointer-events: none;
  }

  .desktop-bazi-entry-card > img {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
    mix-blend-mode: multiply;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
  }

  .desktop-bazi-entry-copy {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    column-gap: 6px;
    row-gap: 3px;
    min-width: 0;
  }

  .desktop-bazi-entry-copy em {
    order: 2;
    flex: 0 0 auto;
    width: fit-content;
    min-width: 0;
    height: 16px;
    min-height: 16px;
    padding: 0 5px;
    border: 1px solid rgba(167, 52, 39, 0.24);
    border-radius: 999px;
    background: rgba(255, 252, 247, 0.64);
    color: rgba(167, 52, 39, 0.82);
    font-size: 9px;
    font-style: normal;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
  }

  .desktop-bazi-entry-copy strong {
    order: 1;
    flex: 0 0 auto;
    width: fit-content;
    min-width: 0;
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    white-space: nowrap;
  }

  .desktop-bazi-entry-copy small {
    order: 3;
    flex: 0 0 100%;
    overflow: hidden;
    color: rgba(24, 23, 21, 0.62);
    font-size: 10px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .desktop-bazi-entry-tags {
    order: 4;
    display: flex;
    flex: 0 0 100%;
    gap: 7px;
    min-width: 0;
  }

  .desktop-bazi-entry-tags i {
    position: relative;
    display: inline-grid;
    place-items: center;
    min-height: 16px;
    padding: 0 5px;
    border: 1px solid rgba(173, 138, 77, 0.18);
    border-radius: 999px;
    background: rgba(247, 242, 234, 0.76);
    color: rgba(24, 23, 21, 0.62);
    font-size: 9px;
    font-style: normal;
    line-height: 1;
    white-space: nowrap;
  }

  .desktop-bazi-entry-tags i:not(:last-child)::after {
    position: absolute;
    top: 50%;
    right: -7px;
    color: rgba(24, 23, 21, 0.25);
    content: "›";
    font-size: 13px;
    line-height: 1;
    transform: translateY(-50%);
  }

  .desktop-bazi-entry-arrow {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    justify-self: end;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(72, 117, 88, 0.38);
    border-radius: 50%;
    background: rgba(76, 139, 102, 0.88);
    color: #fffaf1;
    font-family: Georgia, serif;
    font-size: 33px;
    line-height: 1;
    box-shadow: inset 0 0 0 4px rgba(255, 252, 247, 0.22), 0 7px 16px rgba(54, 44, 32, 0.1);
  }

  .desktop-bazi-entry-card.is-relationship .desktop-bazi-entry-arrow {
    border-color: rgba(160, 121, 59, 0.42);
    background: rgba(189, 145, 75, 0.9);
  }

  .desktop-bazi-primary {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 60px;
    margin-top: 18px;
    padding: 0 18px;
    border: 0;
    border-radius: 6px;
    background: #3f7e5a;
    color: #fff;
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.08em;
  }

  .desktop-bazi-primary i,
  .desktop-bazi-ai i { font-size: 24px; font-style: normal; }

  .desktop-bazi-ai {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
    width: 100%;
    min-height: 36px;
    border: 0;
    background: transparent;
    color: #4a453e;
    font-family: var(--serif);
    font-size: 15px;
  }

  .desktop-bazi-explore { padding: 18px 0 0; }
  .desktop-bazi-explore > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 0;
  }

  .desktop-bazi-explore button {
    display: grid;
    grid-template-columns: 56px 1fr 18px;
    gap: 13px;
    align-items: center;
    min-height: 96px;
    padding: 14px 18px;
    border: 1px solid rgba(110, 86, 55, 0.22);
    border-radius: 8px;
    background: rgba(255, 253, 249, 0.82);
    color: var(--restore-ink);
    text-align: left;
  }

  .desktop-bazi-explore button > b {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(72, 117, 88, 0.36);
    border-radius: 50%;
    background: #edf4eb;
    color: #4c8465;
    font-family: var(--serif);
    font-size: 17px;
  }

  .desktop-bazi-explore button > b svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .desktop-bazi-explore button.is-daymaster > b { border-color: rgba(64, 119, 143, 0.35); background: #e8f1f2; color: #39768e; }
  .desktop-bazi-explore button.is-dimensions > b { border-color: rgba(160, 121, 59, 0.35); background: #f4ecdf; color: #95713a; }
  .desktop-bazi-explore button span { display: grid; gap: 6px; }
  .desktop-bazi-explore button strong { font-family: var(--serif); font-size: 19px; }
  .desktop-bazi-explore button small { color: #71695f; font-size: 13px; line-height: 1.5; }
  .desktop-bazi-explore button > i { color: #514b43; font-size: 26px; font-style: normal; }
}

@media (min-width: 1180px) and (max-width: 1370px) {
  .nav {
    grid-template-columns: minmax(220px, 1fr) repeat(5, minmax(76px, 100px)) max-content;
    padding-inline: 24px;
  }

  .nav > button:not(.desktop-nav-account) {
    font-size: 14px;
    letter-spacing: 0.08em;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card { min-height: 330px; }
  .oracle-screen[data-screen="oracle"] .oracle-entry-arrow { margin-top: 38px; }
}

/* 每日一卦：宽屏保留居中的阅读栏，但让卦象与正文达到桌面端合适的行长。 */
@media (min-width: 1180px) {
  .fortune-screen[data-screen="fortune-hexagram"] .daily-date-control {
    width: min(100%, 660px);
    margin: 8px auto 16px;
    font-size: 14px;
  }

  .fortune-screen[data-screen="fortune-hexagram"] .daily-date-control-value {
    width: 224px;
    height: 42px;
    font-size: 16px;
  }

  .fortune-screen[data-screen="fortune-hexagram"] .oracle-intro {
    width: min(100%, 660px);
    margin: 4px auto 20px;
    font-size: 16px;
    line-height: 1.8;
  }

  .fortune-screen[data-screen="fortune-hexagram"] .oracle-intro strong {
    font-size: 18px;
  }

  .fortune-screen[data-screen="fortune-hexagram"] .fortune-button {
    width: 286px;
    min-height: 52px;
    font-size: 17px;
  }

  .fortune-screen[data-screen="fortune-hexagram"] .oracle-visual-stage {
    width: min(100%, 760px);
    min-height: 328px;
    margin: 2px auto 18px;
  }

  .fortune-screen[data-screen="fortune-hexagram"] .oracle-visual-stage.has-oracle {
    min-height: 680px;
    margin-top: 4px;
  }

  .fortune-screen[data-screen="fortune-hexagram"] .daily-oracle-panel {
    width: min(100%, 700px);
    gap: 22px;
    padding: 30px 36px 34px;
  }

  .fortune-screen[data-screen="fortune-hexagram"] .oracle-hexagrams {
    gap: 34px;
  }

  .fortune-screen[data-screen="fortune-hexagram"] .oracle-hexagram {
    gap: 10px;
  }

  .fortune-screen[data-screen="fortune-hexagram"] .oracle-hexagram h2 {
    font-size: 22px;
  }

  .fortune-screen[data-screen="fortune-hexagram"] .oracle-hexagram p {
    font-size: 13px;
  }

  .fortune-screen[data-screen="fortune-hexagram"] .oracle-change-arrow {
    padding-top: 54px;
    font-size: 28px;
  }

  .fortune-screen[data-screen="fortune-hexagram"] .oracle-line-set {
    gap: 9px;
    min-height: 110px;
  }

  .fortune-screen[data-screen="fortune-hexagram"] .oracle-line {
    width: 132px;
    height: 8px;
  }

  .fortune-screen[data-screen="fortune-hexagram"] .oracle-line.yin::before,
  .fortune-screen[data-screen="fortune-hexagram"] .oracle-line.yin::after {
    width: 52px;
    height: 8px;
  }

  .fortune-screen[data-screen="fortune-hexagram"] .oracle-reading {
    gap: 12px;
    font-size: 16px;
    line-height: 1.82;
  }

  .fortune-screen[data-screen="fortune-hexagram"] .oracle-reading strong {
    font-size: 22px;
  }
}
