/* =========================================================================
   Fortune Vibe — 今日运势系统样式
   对应 DESIGN.md §11。只扩展不覆盖——所有稀有度色直接沿用现有
   .rarity-{common|uncommon|rare|epic|legendary} 的 --rarity-accent /
   --rarity-accent2 / --rarity-glow / --border-w 变量。

   本文件承担三件事：
     1. Fortune Banner（首页顶部）
     2. Fortune Verdict Card（结局页顶部，Mint CTA 之前）
     3. Ending-screen[data-tier] 全屏氛围 + 稀有度动效升级
   ========================================================================= */

/* -------------------------------------------------------------------------
   0. 语义变量层
     把 rarity-* 的 accent 再包一层 fortune 语义。
     好处：以后如果想"运势色板" ≠ "卡牌色板"，只改这里。
   ------------------------------------------------------------------------- */
.fortune-banner.rarity-common,
.fortune-verdict-card.rarity-common {
  --fortune-accent: #6b7588;
  --fortune-accent2: #3d4556;
  --fortune-glow: #6b758833;
  --fortune-intensity: 0.05;
}
.fortune-banner.rarity-uncommon,
.fortune-verdict-card.rarity-uncommon {
  --fortune-accent: #5a9fd9;
  --fortune-accent2: #2c5f8a;
  --fortune-glow: #5a9fd94d;
  --fortune-intensity: 0.08;
}
.fortune-banner.rarity-rare,
.fortune-verdict-card.rarity-rare {
  --fortune-accent: #e0b84c;
  --fortune-accent2: #8b6914;
  --fortune-glow: #e0b84c73;
  --fortune-intensity: 0.14;
}
.fortune-banner.rarity-epic,
.fortune-verdict-card.rarity-epic {
  --fortune-accent: #b388eb;
  --fortune-accent2: #6a3c8f;
  --fortune-glow: #b388eb8c;
  --fortune-intensity: 0.22;
}
.fortune-banner.rarity-legendary,
.fortune-verdict-card.rarity-legendary {
  --fortune-accent: #ff6b47;
  --fortune-accent2: #e0b84c;
  --fortune-glow: #ff6b4799;
  --fortune-intensity: 0.32;
}

/* =========================================================================
   1. Fortune Banner — 首页顶部运势条
   ========================================================================= */
.fortune-banner {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  grid-template-areas:
    "orb meta cta"
    "orb verdict cta";
  align-items: center;
  gap: 4px 18px;
  padding: 18px 22px;
  margin-bottom: 8px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left-width: 3px;
  border-left-color: var(--fortune-accent);
  background:
    radial-gradient(ellipse at top left, var(--fortune-accent) 0%, transparent 48%),
    linear-gradient(100deg, rgba(11, 16, 27, 0.96) 0%, rgba(14, 19, 32, 0.96) 100%);
  background-blend-mode: overlay, normal;
  color: #edf2ff;
  overflow: hidden;
  animation: fortune-banner-enter 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.fortune-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, var(--fortune-accent) 0%, transparent 55%);
  opacity: var(--fortune-intensity);
  pointer-events: none;
  z-index: 0;
}
.fortune-banner > * { position: relative; z-index: 1; }

.fortune-banner__orb {
  grid-area: orb;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  position: relative;
  background:
    radial-gradient(circle at 35% 35%, var(--fortune-accent) 0%, var(--fortune-accent2) 45%, transparent 75%);
  box-shadow:
    0 0 24px var(--fortune-glow),
    inset 0 0 10px rgba(0, 0, 0, 0.45);
}
.fortune-banner__orb::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    var(--fortune-accent) 30%,
    transparent 60%,
    var(--fortune-accent2) 80%,
    transparent 100%
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  opacity: 0;
}

/* common/uncommon: 静态；rare 开始旋转，epic/legendary 加脉冲 */
.fortune-banner.rarity-rare .fortune-banner__orb::after      { opacity: .75; animation: fortune-orb-spin 2.8s linear infinite; }
.fortune-banner.rarity-epic .fortune-banner__orb             { animation: fortune-orb-breath 2.4s ease-in-out infinite; }
.fortune-banner.rarity-epic .fortune-banner__orb::after      { opacity: 1;   animation: fortune-orb-spin 1.8s linear infinite; }
.fortune-banner.rarity-legendary .fortune-banner__orb        { animation: fortune-orb-breath 1.6s ease-in-out infinite; }
.fortune-banner.rarity-legendary .fortune-banner__orb::after { opacity: 1;   animation: fortune-orb-spin 1.2s linear infinite; }

.fortune-banner__meta {
  grid-area: meta;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.fortune-banner__kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #89a2d3;
}
.fortune-banner__label {
  font-family: "Orbitron", "Noto Sans SC", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--fortune-accent);
  text-shadow: 0 0 18px var(--fortune-glow);
  white-space: nowrap;
}
.fortune-banner.rarity-legendary .fortune-banner__label {
  background: linear-gradient(100deg, #ff6b47, #e0b84c, #ff6b47);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fortune-label-shimmer 3s ease-in-out infinite;
}

.fortune-banner__verdict {
  grid-area: verdict;
  margin: 0;
  font-family: "Noto Sans SC", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  color: #eef3ff;
  opacity: 0.92;
}

.fortune-banner__cta {
  grid-area: cta;
  font-family: "Noto Sans SC", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(200, 225, 255, 0.92);
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(180, 220, 255, 0.32);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 220ms cubic-bezier(0.4, 0, 0.2, 1);
}
.fortune-banner__cta:hover {
  color: var(--fortune-accent);
  border-color: var(--fortune-accent);
  background: color-mix(in srgb, var(--fortune-accent) 12%, transparent);
  transform: translateY(-1px);
}
.fortune-banner__cta:active { transform: translateY(0); }

/* 移动端：三行堆叠 */
@media (max-width: 720px) {
  .fortune-banner {
    grid-template-columns: 44px 1fr;
    grid-template-areas:
      "orb meta"
      "verdict verdict"
      "cta cta";
    padding: 14px 16px;
    gap: 8px 14px;
  }
  .fortune-banner__orb { width: 44px; height: 44px; }
  .fortune-banner__label { font-size: 16px; }
  .fortune-banner__verdict { font-size: 13px; }
  .fortune-banner__cta {
    width: 100%;
    min-height: 44px;
    font-size: 14px;
  }
}

/* -------------------------------------------------------------------------
   紧凑变体 (.fortune-banner--inline)
     当 banner 被注入到 .start-layout 左列里（紧贴主按钮下方）时使用。
     列宽 ~460px，3 列横排会挤，所以降级为 2 列 3 行的堆叠布局。
     规则与 <=720px media query 一致，但不依赖视口宽度——由 JS 决定是否启用。
   ------------------------------------------------------------------------- */
.fortune-banner--inline {
  grid-template-columns: 44px 1fr;
  grid-template-areas:
    "orb meta"
    "verdict verdict"
    "cta cta";
  padding: 14px 16px;
  gap: 8px 14px;
  margin-top: -4px;         /* 主按钮和 banner 之间微微收紧 */
  margin-bottom: 4px;       /* 再往下的 ghost 按钮保留喘息 */
  border-radius: 14px;      /* 稍收敛半径，贴合按钮 */
}
.fortune-banner--inline .fortune-banner__orb    { width: 44px; height: 44px; }
.fortune-banner--inline .fortune-banner__label  { font-size: 16px; }
.fortune-banner--inline .fortune-banner__kicker { font-size: 10.5px; }
.fortune-banner--inline .fortune-banner__verdict { font-size: 13.5px; line-height: 1.5; }
.fortune-banner--inline .fortune-banner__cta {
  width: 100%;
  min-height: 40px;
  font-size: 13px;
}

/* =========================================================================
   2. Fortune Verdict Card — 结局页顶部判决卡
   ========================================================================= */
.fortune-verdict-card {
  position: relative;
  margin-bottom: 14px;
  padding: 20px 24px 18px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--fortune-accent) 55%, transparent);
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--fortune-accent) 10%, transparent) 0%,
      transparent 60%),
    rgba(11, 16, 27, 0.94);
  color: #edf2ff;
  overflow: hidden;
  animation: fortune-verdict-enter 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.fortune-verdict-card::before {
  /* 左缘光柱 */
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--fortune-accent), transparent);
  box-shadow: 0 0 12px var(--fortune-glow);
}
.fortune-verdict-card[data-match="true"] {
  box-shadow: 0 0 44px var(--fortune-glow), 0 4px 18px rgba(0, 0, 0, 0.4);
}
.fortune-verdict-card[data-match="false"] {
  filter: saturate(0.7);
  opacity: 0.88;
}

.fortune-verdict-card__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.fortune-verdict-card__kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #89a2d3;
}
.fortune-verdict-card__title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
  font-family: "Orbitron", "Noto Sans SC", sans-serif;
  font-size: clamp(1.2rem, 3.2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.06em;
}
.fortune-verdict-card__fortune-tag {
  color: var(--fortune-accent);
  text-shadow: 0 0 18px var(--fortune-glow);
}
.fortune-verdict-card__divider {
  color: #89a2d3;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85em;
  opacity: 0.7;
}
.fortune-verdict-card__ending-tag {
  color: #edf2ff;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--fortune-accent) 60%, transparent);
  background: color-mix(in srgb, var(--fortune-accent) 12%, transparent);
  font-size: 0.82em;
}

.fortune-verdict-card__body {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.fortune-verdict-card__sigil {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--fortune-accent);
  text-shadow: 0 0 16px var(--fortune-glow);
  border-radius: 50%;
  background: color-mix(in srgb, var(--fortune-accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--fortune-accent) 40%, transparent);
}
.fortune-verdict-card[data-match="true"] .fortune-verdict-card__sigil {
  animation: fortune-sigil-hit 1400ms cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}
.fortune-verdict-card[data-match="false"] .fortune-verdict-card__sigil {
  opacity: 0.28;
  animation: none;
}

.fortune-verdict-card__verdict {
  margin: 0;
  flex: 1;
  font-family: "Noto Sans SC", system-ui, sans-serif;
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.65;
  color: #eef3ff;
}
.fortune-verdict-card__verdict b {
  color: var(--fortune-accent);
  font-weight: 700;
  text-shadow: 0 0 10px var(--fortune-glow);
}
.fortune-verdict-card__verdict .is-matched {
  display: inline-block;
  padding: 2px 10px;
  margin-left: 4px;
  border-radius: 4px;
  font-family: "Orbitron", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--fortune-accent);
  background: color-mix(in srgb, var(--fortune-accent) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--fortune-accent) 45%, transparent);
}
.fortune-verdict-card[data-match="false"] .fortune-verdict-card__verdict .is-matched {
  color: #89a2d3;
  background: rgba(137, 162, 211, 0.12);
  border-color: rgba(137, 162, 211, 0.35);
}

/* legendary 命中：加扫描线 */
.fortune-verdict-card.rarity-legendary[data-match="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 3px,
    rgba(255, 107, 71, 0.08) 3px,
    rgba(255, 107, 71, 0.08) 4px
  );
  mix-blend-mode: overlay;
  animation: fortune-scan 4.8s linear infinite;
}

/* 移动端压缩 */
@media (max-width: 560px) {
  .fortune-verdict-card { padding: 16px 18px 14px; }
  .fortune-verdict-card__title { font-size: 1.1rem; gap: 8px; }
  .fortune-verdict-card__body { gap: 10px; }
  .fortune-verdict-card__sigil { width: 30px; height: 30px; font-size: 16px; }
  .fortune-verdict-card__verdict { font-size: 13.5px; }
}

/* =========================================================================
   3. Ending-screen[data-tier] — 全屏 tier 氛围
   ========================================================================= */
.ending-screen[data-tier] {
  position: relative;
}
.ending-screen[data-tier]::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at 50% 0%, var(--tier-accent, #6b7588) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 900ms ease;
  animation: fortune-tier-reveal 900ms ease-out 200ms both;
}
.ending-screen[data-tier="street"]::before  { --tier-accent: #6b7588; opacity: 0.06; }
.ending-screen[data-tier="city"]::before    { --tier-accent: #5a9fd9; opacity: 0.10; }
.ending-screen[data-tier="legend"]::before  { --tier-accent: #e0b84c; opacity: 0.16; }
.ending-screen[data-tier="cosmic"]::before  { --tier-accent: #b388eb; opacity: 0.24; }

/* creator = 双光晕（上橙+下金）+ 扫描线 */
.ending-screen[data-tier="creator"]::before {
  background:
    radial-gradient(ellipse at 50% 0%,  #ff6b47 0%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, #e0b84c 0%, transparent 50%);
  opacity: 0.28;
}
.ending-screen[data-tier="creator"]::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 4px,
    rgba(255, 107, 71, 0.04) 4px,
    rgba(255, 107, 71, 0.04) 5px
  );
  animation: fortune-scan 6s linear infinite;
}

/* 保证内容在氛围层之上 */
.ending-screen[data-tier] > * { position: relative; z-index: 1; }

/* =========================================================================
   4. 稀有度动效升级（tcg-card + mint-ritual）
      只加不改——通过额外的 box-shadow / ::after 伪元素叠加。
   ========================================================================= */

/* 通用：给所有 rarity-* 加一层"能量场"伪元素，默认不可见 */
.tcg-card.rarity-uncommon,
.tcg-card.rarity-rare,
.tcg-card.rarity-epic,
.tcg-card.rarity-legendary {
  position: relative;
  overflow: visible !important; /* 允许光晕溢出 */
}

/* uncommon：微光呼吸 */
.tcg-card.rarity-uncommon {
  animation: fortune-card-breath-uncommon 3.6s ease-in-out infinite;
}
/* rare：金色光晕 + shimmer 扫过 */
.tcg-card.rarity-rare {
  animation: fortune-card-breath-rare 3.2s ease-in-out infinite;
}
.tcg-card.rarity-rare::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(100deg,
    transparent 35%,
    rgba(224, 184, 76, 0.25) 50%,
    transparent 65%);
  mix-blend-mode: screen;
  animation: fortune-card-shimmer 3s ease-in-out infinite;
}
/* epic：紫色旋转描边（conic-gradient 环） */
.tcg-card.rarity-epic {
  animation: fortune-card-breath-epic 2.8s ease-in-out infinite;
}
.tcg-card.rarity-epic::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg,
    transparent 0%, #b388eb 25%,
    transparent 50%, #6a3c8f 75%,
    transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  animation: fortune-card-rotate 3.6s linear infinite;
}
/* legendary：双色旋转 + 强呼吸 + 外圈涟漪 */
.tcg-card.rarity-legendary {
  animation: fortune-card-breath-legendary 2s ease-in-out infinite;
}
.tcg-card.rarity-legendary::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 107, 71, 0.35);
  pointer-events: none;
  animation: fortune-card-ripple 2.8s ease-out infinite;
}
.tcg-card.rarity-legendary::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  padding: 3px;
  background: conic-gradient(from 0deg,
    #ff6b47 0%, #e0b84c 25%,
    #ff6b47 50%, #e0b84c 75%, #ff6b47 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  animation: fortune-card-rotate 2.4s linear infinite;
}

/* mint-ritual：铸造仪式时按稀有度加成氛围（原始 mint-ritual 是全屏覆盖） */
.mint-ritual.rarity-rare,
.mint-ritual.rarity-epic,
.mint-ritual.rarity-legendary {
  background:
    radial-gradient(ellipse at center, var(--rarity-glow) 0%, transparent 60%),
    rgba(0, 0, 0, 0.75);
}
.mint-ritual.rarity-legendary {
  background:
    radial-gradient(ellipse at 50% 30%, #ff6b4766 0%, transparent 55%),
    radial-gradient(ellipse at 50% 80%, #e0b84c55 0%, transparent 60%),
    rgba(0, 0, 0, 0.82);
}

/* =========================================================================
   5. Keyframes
   ========================================================================= */
@keyframes fortune-banner-enter {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fortune-verdict-enter {
  from { opacity: 0; transform: scale(0.98) translateY(4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes fortune-tier-reveal {
  from { opacity: 0; }
}
@keyframes fortune-orb-spin {
  to { transform: rotate(360deg); }
}
@keyframes fortune-orb-breath {
  0%, 100% { filter: brightness(1) saturate(1); transform: scale(1); }
  50%      { filter: brightness(1.2) saturate(1.3); transform: scale(1.05); }
}
@keyframes fortune-label-shimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes fortune-sigil-hit {
  0%   { transform: scale(0) rotate(-180deg); opacity: 0; }
  60%  { transform: scale(1.35) rotate(20deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes fortune-scan {
  from { background-position: 0 0; }
  to   { background-position: 0 120px; }
}

/* 卡牌呼吸（不同稀有度强度不同） */
@keyframes fortune-card-breath-uncommon {
  0%, 100% { box-shadow: 0 0 0 rgba(90, 159, 217, 0); }
  50%      { box-shadow: 0 0 18px rgba(90, 159, 217, 0.35); }
}
@keyframes fortune-card-breath-rare {
  0%, 100% { box-shadow: 0 0 8px rgba(224, 184, 76, 0.25); }
  50%      { box-shadow: 0 0 28px rgba(224, 184, 76, 0.55), 0 0 8px rgba(224, 184, 76, 0.4); }
}
@keyframes fortune-card-breath-epic {
  0%, 100% { box-shadow: 0 0 14px rgba(179, 136, 235, 0.35); }
  50%      { box-shadow: 0 0 36px rgba(179, 136, 235, 0.7), 0 0 10px rgba(179, 136, 235, 0.5); }
}
@keyframes fortune-card-breath-legendary {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 107, 71, 0.4), 0 0 40px rgba(224, 184, 76, 0.25); }
  50%      { box-shadow: 0 0 44px rgba(255, 107, 71, 0.85), 0 0 80px rgba(224, 184, 76, 0.5); }
}
@keyframes fortune-card-shimmer {
  0%       { transform: translateX(-100%); opacity: 0; }
  50%      { opacity: 1; }
  100%     { transform: translateX(100%); opacity: 0; }
}
@keyframes fortune-card-rotate {
  to { transform: rotate(360deg); }
}
@keyframes fortune-card-ripple {
  0%   { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* =========================================================================
   5.5 Guide Pulse — banner CTA 引导至"开启档案"按钮时的临时高亮
      由 JS 动态 add/remove .fortune-guide-pulse 类。
      用命运金（与 startBtn 自身的金色 gradient 视觉统一），3 次脉冲后自动移除。
   ========================================================================= */
.fortune-guide-pulse {
  position: relative;
  z-index: 2;
  animation: fortune-guide-glow 1.2s ease-in-out 3 both;
}
.fortune-guide-pulse::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  pointer-events: none;
  border: 2px solid rgba(255, 186, 62, 0.85);
  animation: fortune-guide-ring 1.2s ease-out 3 both;
}

@keyframes fortune-guide-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 186, 62, 0); }
  50%      {
    box-shadow:
      0 0 0 4px rgba(255, 186, 62, 0.35),
      0 0 34px 10px rgba(255, 141, 60, 0.55);
  }
}
@keyframes fortune-guide-ring {
  0%   { transform: scale(1);    opacity: 0.9; }
  100% { transform: scale(1.22); opacity: 0;   }
}

/* =========================================================================
   5.6 Mint-CTA Sigil Slot — 把铸造卡牌 CTA 挪到原 ENDING SIGIL 位置
        用户意图：那个位置的 emoji 不要了，整个变成"铸造卡牌"组件。
        DOM 层面：JS 把 .finale-mint-cta 从 .ending-screen 顶部移入 sigil 宿主容器，
                  并给宿主加 [data-fortune-mint-slot="1"]。
   ========================================================================= */

/* 宿主卡片变成纯框架（让内置的 mint CTA 占满整个视觉盒子） */
[data-fortune-mint-slot="1"] {
  display: block !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  min-height: 0 !important;
  /* 解除原宿主的正方形约束 / 固定高度：让 mint CTA 决定高度 */
  aspect-ratio: auto !important;
  height: auto !important;
  max-height: none !important;
  /* 解除内部原 flex 居中 emoji 的排布 */
  place-items: stretch !important;
  align-items: stretch !important;
  justify-content: stretch !important;
}

/* 隐藏 React 原渲染的 emoji/标题/ENDING SIGIL 文字 */
[data-fortune-mint-slot="1"] .sigil-emoji,
[data-fortune-mint-slot="1"] .sigil-title,
[data-fortune-mint-slot="1"] .sigil-meta {
  display: none !important;
}

/* 兜底：宿主的所有直接子元素（如 emoji 的中间容器）除了 mint CTA 一律隐藏
   —— 某些 React 组件把 emoji 套在一个命名未知的 div 里，它自身可能
      带 aspect-ratio/固定 width，导致空白占位。 */
[data-fortune-mint-slot="1"] > *:not(.finale-mint-cta):not(.finale-mint-cta--slot) {
  display: none !important;
}

/* .finale-mint-cta 的 slot 紧凑形态（在 hero 右栏窄容器里） */
.finale-mint-cta--slot {
  width: 100% !important;
  margin: 0 !important;
  /* 去掉原顶栏时的 top/左右 float 定位 */
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
}
.finale-mint-cta--slot .finale-mint-cta__body {
  padding: 18px 16px !important;
  gap: 10px !important;
}
.finale-mint-cta--slot .finale-mint-cta__kicker {
  font-size: 10px !important;
  letter-spacing: 0.18em !important;
}
.finale-mint-cta--slot .finale-mint-cta__title {
  font-size: 17px !important;
  line-height: 1.3 !important;
  flex-wrap: wrap;
  justify-content: center;
}
.finale-mint-cta--slot .finale-mint-cta__title-text {
  text-align: center;
}
.finale-mint-cta--slot .finale-mint-cta__star {
  font-size: 14px !important;
}
.finale-mint-cta--slot .finale-mint-cta__hint {
  font-size: 12px !important;
  line-height: 1.5 !important;
}
.finale-mint-cta--slot .finale-mint-cta__btn {
  min-height: 42px !important;
  font-size: 14px !important;
  padding: 0 18px !important;
}
.finale-mint-cta--slot .finale-mint-cta__collection {
  font-size: 12.5px !important;
  padding: 8px 14px !important;
}

/* =========================================================================
   5.7 Ending-screen Mobile Priority — 手机进结局页第一眼看到运势
        策略：让 .fortune-verdict-card 在手机视口下额外加一圈强提示，
              并通过 scroll-margin-top 保证任何锚点跳转时不被遮挡。
        DOM 层 verdict card 已在 ending-screen 的 firstChild 位置
        （因为 mint CTA 被搬走了），所以手机端打开就能看到。
   ========================================================================= */
@media (max-width: 720px) {
  .ending-screen > .fortune-verdict-card {
    /* 手机端加强视觉优先级：略大字号 + 更明确的 glow + scroll margin */
    margin-top: 6px;
    scroll-margin-top: 12px;
  }
  .ending-screen > .fortune-verdict-card .fortune-verdict-card__title {
    font-size: 22px;
  }
  .ending-screen > .fortune-verdict-card .fortune-verdict-card__verdict {
    font-size: 14px;
    line-height: 1.6;
  }

  /* 手机端 sigil 宿主：垂直流，mint CTA 不再受限于正方形槽位 */
  [data-fortune-mint-slot="1"] {
    aspect-ratio: auto !important;
    width: 100% !important;
  }
}

/* =========================================================================
   6. Reduced motion fallback
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  .fortune-banner,
  .fortune-verdict-card,
  .ending-screen[data-tier]::before,
  .ending-screen[data-tier="creator"]::after,
  .fortune-banner__orb,
  .fortune-banner__orb::after,
  .fortune-banner__label,
  .fortune-verdict-card__sigil,
  .fortune-verdict-card.rarity-legendary[data-match="true"]::after,
  .tcg-card.rarity-uncommon,
  .tcg-card.rarity-rare,
  .tcg-card.rarity-rare::before,
  .tcg-card.rarity-epic,
  .tcg-card.rarity-epic::after,
  .tcg-card.rarity-legendary,
  .tcg-card.rarity-legendary::before,
  .tcg-card.rarity-legendary::after,
  .fortune-guide-pulse,
  .fortune-guide-pulse::after {
    animation: none !important;
    transition: none !important;
  }
  /* reduced-motion 下改用静态的金色 ring 替代脉冲，保留"这是下一步"的视觉线索 */
  .fortune-guide-pulse {
    box-shadow: 0 0 0 4px rgba(255, 186, 62, 0.35) !important;
  }
}
