/*
 * 问卜首页 PC 视觉还原 v5。
 * 仅覆盖首页；六爻、解梦、记录的业务路由和移动端布局继续沿用既有实现。
 */

.oracle-entry-action {
  display: contents;
}

.oracle-entry-cost {
  display: none;
}

.oracle-recent-row .oracle-recent-copy,
.oracle-recent-row .oracle-recent-status,
.oracle-recent-row .oracle-recent-chevron {
  width: auto;
  height: auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.oracle-recent-row .oracle-recent-copy {
  display: grid;
  place-items: initial;
  min-width: 0;
}

.oracle-recent-row time,
.oracle-recent-row .oracle-recent-status,
.oracle-recent-row .oracle-recent-chevron {
  display: none;
}

@media (min-width: 1180px) {
  :root {
    --oracle-hub-width: min(calc(100vw - 90px), 1580px);
    --oracle-hub-paper: #f7f3ea;
    --oracle-hub-surface: rgba(255, 253, 248, 0.78);
    --oracle-hub-ink: #25231f;
    --oracle-hub-muted: #69645d;
    --oracle-hub-line: rgba(91, 74, 50, 0.18);
    --oracle-hub-line-soft: rgba(91, 74, 50, 0.12);
    --oracle-hub-red: #b6382b;
    --oracle-hub-red-dark: #9f2f24;
    --oracle-hub-green: #357157;
    --oracle-hub-green-dark: #285d47;
    --oracle-hub-gold: #a87936;
  }

  .workspace:not(.is-auth-route) > .oracle-screen[data-screen="oracle"] {
    box-sizing: border-box;
    position: relative;
    left: auto;
    width: var(--oracle-hub-width);
    max-width: 1580px;
    min-height: calc(100dvh - 82px);
    margin: 0 0 0 calc((100% - var(--oracle-hub-width)) / 2);
    padding: 31px 0 24px;
    transform: none;
  }

  .oracle-screen[data-screen="oracle"].is-active {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 106px 398px 268px;
    gap: 16px;
    align-content: start;
    isolation: isolate;
  }

  .oracle-screen[data-screen="oracle"]::before,
  .oracle-screen[data-screen="oracle"]::after {
    display: none !important;
  }

  .workspace:not(.is-auth-route) > .oracle-screen[data-screen="oracle"] > .fortune-top {
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: minmax(0, 1fr);
    align-items: start;
    min-height: 106px;
    height: 106px;
    padding: 10px 0 18px 6px;
    border: 0;
  }

  .oracle-screen[data-screen="oracle"] > .fortune-top .fortune-title {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    justify-self: start;
  }

  .oracle-screen[data-screen="oracle"] > .fortune-top .fortune-title h1 {
    color: var(--oracle-hub-ink);
    font-size: 46px;
    font-weight: 820;
    line-height: 1.06;
    letter-spacing: 0.1em;
  }

  .oracle-screen[data-screen="oracle"] > .fortune-top .fortune-title h1 .seal {
    transform: translateY(-2px);
  }

  .oracle-screen[data-screen="oracle"] > .fortune-top .fortune-title .sub {
    margin-top: 10px;
    color: var(--oracle-hub-muted);
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.1em;
  }

  .workspace:not(.is-auth-route) > .oracle-screen[data-screen="oracle"] > .fortune-top .oracle-history-button {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    display: inline-flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    width: 167px;
    min-width: 167px;
    height: 60px;
    min-height: 60px;
    margin-top: 4px;
    padding: 0 20px;
    border: 1px solid rgba(182, 56, 43, 0.62);
    border-radius: 10px;
    background: rgba(255, 253, 248, 0.58);
    color: var(--oracle-hub-ink);
    box-shadow: none;
  }

  .workspace:not(.is-auth-route) > .oracle-screen[data-screen="oracle"] > .fortune-top .oracle-history-button::after {
    display: inline !important;
    margin: 0;
    color: var(--oracle-hub-ink);
    content: "问卜记录";
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 650;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  .workspace:not(.is-auth-route) > .oracle-screen[data-screen="oracle"] > .fortune-top .oracle-history-button svg {
    width: 23px;
    height: 23px;
  }

  .workspace:not(.is-auth-route) > .oracle-screen[data-screen="oracle"] > .fortune-top .oracle-history-button:hover {
    border-color: var(--oracle-hub-red);
    background: rgba(255, 250, 244, 0.94);
    color: var(--oracle-hub-red);
    box-shadow: none;
    transform: translateY(-1px);
  }

  .oracle-screen[data-screen="oracle"] .oracle-hub-hero {
    display: none;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-grid {
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.491fr) minmax(0, 1fr);
    gap: 13px;
    height: 398px;
    margin: 0;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card {
    position: relative;
    display: grid;
    align-items: stretch;
    min-width: 0;
    min-height: 398px;
    height: 398px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--oracle-hub-line);
    border-radius: 10px;
    background: var(--oracle-hub-surface);
    box-shadow: 0 8px 24px rgba(73, 53, 31, 0.045);
    color: inherit;
    font-family: var(--serif);
    text-align: left;
    transform: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card::after {
    display: none;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card picture {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    opacity: 1;
    mix-blend-mode: normal;
    filter: none;
    transform: none;
    transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card:hover {
    border-color: rgba(182, 56, 43, 0.44);
    box-shadow: 0 14px 34px rgba(73, 53, 31, 0.075);
    transform: translateY(-2px);
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-dream:hover {
    border-color: rgba(53, 113, 87, 0.44);
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card:hover .oracle-entry-card-bg {
    filter: none;
    transform: scale(1.008);
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-copy {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-rows: auto auto auto 1fr auto;
    justify-items: start;
    align-content: start;
    width: 43%;
    height: 100%;
    padding: 43px 0 49px 35px;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-dream .oracle-entry-card-copy {
    width: 47%;
    padding: 43px 0 49px 31px;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-copy small {
    color: var(--oracle-hub-red);
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 760;
    line-height: 1.4;
    letter-spacing: 0.13em;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-copy small::before,
  .oracle-screen[data-screen="oracle"] .oracle-entry-card-copy small::after {
    color: currentColor;
    content: "←";
    margin-right: 9px;
    font-weight: 400;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-copy small::after {
    margin-right: 0;
    margin-left: 9px;
    content: "→";
  }

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

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-copy strong {
    margin-top: 36px;
    color: var(--oracle-hub-ink);
    font-size: 46px;
    font-weight: 790;
    line-height: 1.08;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-dream .oracle-entry-card-copy strong {
    font-size: 44px;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-copy em {
    max-width: 24em;
    margin-top: 21px;
    color: var(--oracle-hub-muted);
    font-family: var(--serif);
    font-size: 16px;
    font-style: normal;
    line-height: 1.7;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-dream .oracle-entry-card-copy em {
    max-width: 17em;
    white-space: normal;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-action {
    grid-row: 5;
    align-self: end;
    display: inline-flex;
    align-items: center;
    gap: 16px;
    min-height: 58px;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 156px;
    height: 58px;
    min-height: 58px;
    margin: 0;
    padding: 0 24px;
    border: 0;
    border-radius: 7px;
    background: var(--oracle-hub-red);
    color: #fffaf3;
    box-shadow: 0 7px 16px rgba(182, 56, 43, 0.12);
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-arrow::before {
    color: inherit;
    content: "开始问事";
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.08em;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-dream .oracle-entry-arrow {
    border: 0;
    background: var(--oracle-hub-green);
    color: #fffdf7;
    box-shadow: 0 7px 16px rgba(53, 113, 87, 0.12);
  }

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

  .oracle-screen[data-screen="oracle"] .oracle-entry-arrow svg {
    display: none;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-cost {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    min-height: 38px;
    padding: 0 12px 0 17px;
    border: 0;
    border-left: 1px solid rgba(91, 74, 50, 0.22);
    border-radius: 0;
    background: transparent;
    color: var(--oracle-hub-green);
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-cost img {
    width: 23px;
    height: 23px;
    object-fit: contain;
    mix-blend-mode: multiply;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-cost b {
    color: var(--oracle-hub-green);
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 650;
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-panel {
    grid-row: 3;
    width: 100%;
    height: 268px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--oracle-hub-line-soft);
    border-radius: 9px;
    background: rgba(255, 253, 248, 0.58);
    box-shadow: 0 8px 22px rgba(73, 53, 31, 0.035);
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 61px;
    margin: 0;
    padding: 0 36px 0 39px;
    border-bottom: 1px solid var(--oracle-hub-line-soft);
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-head strong {
    display: inline-flex;
    gap: 11px;
    align-items: center;
    color: var(--oracle-hub-ink);
    font-size: 19px;
    font-weight: 760;
    letter-spacing: 0.08em;
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-head strong svg {
    width: 22px;
    height: 22px;
    color: var(--oracle-hub-red);
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-head button {
    border: 0;
    background: transparent;
    color: var(--oracle-hub-green);
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-head button::after {
    margin-left: 10px;
    content: "›";
    font-family: var(--sans);
    font-size: 22px;
    font-weight: 400;
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(3, 68px);
    gap: 0;
    height: 204px;
    border: 0;
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-list .oracle-recent-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 160px 168px 32px;
    gap: 0;
    align-items: center;
    width: 100%;
    min-height: 68px;
    height: 68px;
    padding: 0 34px 0 38px;
    border: 0;
    border-bottom: 1px solid var(--oracle-hub-line-soft);
    background: transparent;
    color: inherit;
    font-family: var(--serif);
    text-align: left;
    transition: background 150ms ease;
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-list .oracle-recent-row:last-child {
    border-bottom: 0;
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-list .oracle-recent-row:hover {
    background: rgba(244, 238, 227, 0.5);
    transform: none;
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-row .oracle-recent-kind {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    overflow: visible;
    border: 1px solid rgba(182, 56, 43, 0.48);
    border-radius: 50%;
    background: rgba(255, 253, 248, 0.62);
    color: var(--oracle-hub-red);
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 690;
    letter-spacing: 0.06em;
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-row.is-dream .oracle-recent-kind {
    border-color: rgba(53, 113, 87, 0.5);
    color: var(--oracle-hub-green);
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-row .oracle-recent-copy {
    display: grid;
    gap: 3px;
    place-items: initial;
    min-width: 0;
    width: auto;
    height: auto;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-row .oracle-recent-copy strong {
    min-width: 0;
    overflow: hidden;
    color: var(--oracle-hub-ink);
    font-size: 17px;
    font-weight: 660;
    line-height: 1.25;
    letter-spacing: 0.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-row .oracle-recent-copy small {
    grid-column: auto;
    overflow: hidden;
    color: var(--oracle-hub-muted);
    font-family: var(--serif);
    font-size: 13px;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-row time {
    display: block;
    color: var(--oracle-hub-muted);
    font-family: var(--serif);
    font-size: 14px;
    letter-spacing: 0.05em;
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-row .oracle-recent-status {
    display: block;
    width: auto;
    height: auto;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--oracle-hub-green);
    font-family: var(--serif);
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0.06em;
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-row.is-dream .oracle-recent-status {
    color: var(--oracle-hub-gold);
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-row .oracle-recent-chevron {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--oracle-hub-muted);
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-chevron svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    transform: rotate(180deg);
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-empty {
    display: grid;
    place-items: center;
    min-height: 204px;
    padding: 28px;
    border: 0;
    color: var(--oracle-hub-muted);
    font-size: 14px;
  }
}

@media (min-width: 1180px) and (max-width: 1320px) {
  .oracle-screen[data-screen="oracle"] .oracle-entry-card-copy,
  .oracle-screen[data-screen="oracle"] .oracle-entry-card-dream .oracle-entry-card-copy {
    width: 50%;
    padding-left: 28px;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-copy strong {
    font-size: 38px;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-dream .oracle-entry-card-copy strong {
    font-size: 35px;
  }

  .oracle-screen[data-screen="oracle"] .oracle-entry-card-copy em {
    font-size: 14px;
    white-space: normal;
  }

  .oracle-screen[data-screen="oracle"] .oracle-recent-list .oracle-recent-row {
    grid-template-columns: 82px minmax(0, 1fr) 126px 132px 28px;
    padding-right: 24px;
    padding-left: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .oracle-screen[data-screen="oracle"] .oracle-entry-card,
  .oracle-screen[data-screen="oracle"] .oracle-entry-card-bg,
  .oracle-screen[data-screen="oracle"] .oracle-recent-row {
    transition-duration: 0.01ms !important;
    transform: none !important;
  }
}
