/* 相伯每日领取确认稿 · 1 次断相
   视觉母题：铜镜 / 观相仪轨道 / 朱砂印 / 云气金线。
   动效节奏：入场聚光 → 轨道运行 → 轨道加速 → 印章显现。
   只挂在 _preview-ui，不改变现网领取逻辑。 */

#dailyGiftSheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: calc(24px + var(--safe-t, 0px)) 20px calc(24px + var(--safe-b, 0px));
  box-sizing: border-box;
}

#dailyGiftSheet[hidden] { display: none !important; }

#dailyGiftSheet .daily-gift-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(23, 19, 15, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: daily-gift-backdrop-in 420ms ease-out both;
}

#dailyGiftSheet .daily-gift-card {
  position: relative;
  z-index: 1;
  width: min(328px, 100%);
  min-height: 520px;
  overflow: hidden;
  padding: 20px 20px 24px;
  border: 1px solid rgba(215, 180, 110, 0.55);
  border-radius: 28px;
  background:
    radial-gradient(210px 190px at 50% 35%, rgba(215, 180, 110, 0.12), transparent 72%),
    linear-gradient(155deg, #30291f 0%, #211d18 48%, #181612 100%);
  color: #F7F1E6;
  text-align: center;
  box-shadow: 0 24px 64px rgba(15, 13, 11, 0.52), inset 0 1px 0 rgba(255,255,255,0.07);
  animation: daily-gift-card-in 560ms cubic-bezier(.16, 1, .3, 1) both;
}

#dailyGiftSheet .daily-gift-card::before,
#dailyGiftSheet .daily-gift-card::after { content: ""; position: absolute; pointer-events: none; }

#dailyGiftSheet .daily-gift-card::before {
  inset: 10px;
  border: 1px solid rgba(215, 180, 110, 0.18);
  border-radius: 20px;
}

#dailyGiftSheet .daily-gift-card::after {
  top: -130px;
  left: -80px;
  width: 150px;
  height: 720px;
  transform: rotate(28deg);
  background: linear-gradient(90deg, transparent, rgba(255, 244, 210, .12), transparent);
  animation: daily-gift-sheen 1.8s 520ms ease-out both;
}

#dailyGiftSheet .daily-gift-close {
  position: relative;
  z-index: 2;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #C9B896;
  cursor: pointer;
}
#dailyGiftSheet .daily-gift-close::before,
#dailyGiftSheet .daily-gift-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
}
#dailyGiftSheet .daily-gift-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
#dailyGiftSheet .daily-gift-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

#dailyGiftSheet .daily-gift-close:hover,
#dailyGiftSheet .daily-gift-close:focus-visible {
  background: rgba(215, 180, 110, 0.16);
  color: #F7F1E6;
  outline: none;
}

#dailyGiftSheet .daily-gift-kicker {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 24px;
  margin: 0 40px;
  color: var(--color-gold-light, #D7B46E);
  font-family: var(--font-family-serif, serif);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0;
}

#dailyGiftSheet .daily-gift-kicker::before,
#dailyGiftSheet .daily-gift-kicker::after {
  content: "";
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(215,180,110,.7));
}

#dailyGiftSheet .daily-gift-kicker::after { transform: scaleX(-1); }
#dailyGiftSheet .daily-gift-kicker-count { letter-spacing: .08em; color: #B9AE9B; font-weight: 400; }

#dailyGiftSheet .daily-gift-stage {
  position: relative;
  height: 246px;
  margin: 4px -4px 0;
}

#dailyGiftSheet .daily-gift-aura,
#dailyGiftSheet .daily-gift-home-ring,
#dailyGiftSheet .daily-gift-trajectory,
#dailyGiftSheet .daily-gift-sparkles { position: absolute; pointer-events: none; }

#dailyGiftSheet .daily-gift-aura {
  top: 26px;
  left: 50%;
  width: 214px;
  height: 174px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(215,180,110,.22) 0%, rgba(215,180,110,.07) 46%, transparent 72%);
  filter: blur(2px);
  animation: daily-gift-aura 2.8s ease-in-out infinite;
}

#dailyGiftSheet .daily-gift-home-ring {
  top: 57px;
  left: 50%;
  width: 160px;
  height: 160px;
  transform: translateX(-50%);
  border: 1px dashed rgba(215, 180, 110, 0.42);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(255,255,255,.03), 0 0 20px rgba(215,180,110,.10);
  animation: daily-gift-home-ring 18s linear infinite;
}

#dailyGiftSheet .daily-gift-home-ring::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #F2D892;
  box-shadow: 0 0 10px #F2D892;
}

#dailyGiftSheet .daily-gift-trajectory {
  top: 128px;
  left: 50%;
  width: 180px;
  height: 44px;
  border: 1px solid rgba(215, 180, 110, .72);
  border-radius: 50%;
  opacity: .80;
  transform-origin: center;
  box-shadow: 0 0 2px rgba(255,252,246,.42);
}

#dailyGiftSheet .daily-gift-trajectory-back { clip-path: inset(-40% -50% 48% -50%); z-index: 1; }
#dailyGiftSheet .daily-gift-trajectory-front { clip-path: inset(48% -50% -40% -50%); z-index: 3; }
#dailyGiftSheet .daily-gift-trajectory-a { transform: translate(-50%, -50%) rotate(18deg) scaleY(.96); animation: daily-gift-trajectory-a 11s linear infinite; }
#dailyGiftSheet .daily-gift-trajectory-b { width: 166px; height: 52px; border-color: rgba(201,164,90,.78); transform: translate(-50%, -50%) rotate(-34deg) scaleY(.88); animation: daily-gift-trajectory-b 15s linear infinite reverse; }
#dailyGiftSheet .daily-gift-trajectory-c { width: 158px; height: 36px; border-color: rgba(184,145,75,.78); transform: translate(-50%, -50%) rotate(78deg) scaleY(.92); animation: daily-gift-trajectory-c 19s linear infinite; }

#dailyGiftSheet .daily-gift-sparkles { inset: 0; }

#dailyGiftSheet .daily-gift-sparkles::before,
#dailyGiftSheet .daily-gift-sparkles::after {
  content: "✦";
  position: absolute;
  color: #F2D892;
  text-shadow: 0 0 10px rgba(242,216,146,.72);
  animation: daily-gift-spark 2.1s ease-in-out infinite;
}

#dailyGiftSheet .daily-gift-sparkles::before { top: 34px; left: 58px; font-size: 12px; }
#dailyGiftSheet .daily-gift-sparkles::after { right: 58px; bottom: 56px; font-size: 16px; animation-delay: 680ms; }

#dailyGiftSheet .daily-gift-mirror {
  position: absolute;
  top: 72px;
  left: 50%;
  z-index: 2;
  width: 142px;
  height: 142px;
  transform: translateX(-50%);
  border: 4px solid #B58B4C;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 30%, rgba(255,236,172,.34), transparent 16%),
    radial-gradient(circle, #8E7447 0%, #51432C 54%, #2A251C 76%);
  box-shadow: 0 16px 24px rgba(0,0,0,.36), inset 0 0 0 4px rgba(242,216,146,.18), inset 0 0 28px rgba(242,216,146,.18);
  animation: none;
}

#dailyGiftSheet .daily-gift-mirror::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(242,216,146,.42);
  border-radius: 50%;
  box-shadow: inset 0 0 0 7px rgba(22,19,14,.16);
}

#dailyGiftSheet .daily-gift-mirror::after {
  content: "相";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(242,216,146,.88);
  font-family: var(--zhuan, serif);
  font-size: 42px;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(0,0,0,.34);
}

#dailyGiftSheet .daily-gift-mirror-glint {
  position: absolute;
  top: 12px;
  left: -30px;
  z-index: 2;
  width: 32px;
  height: 122px;
  overflow: hidden;
  border-radius: 50%;
  transform: rotate(34deg);
  background: linear-gradient(90deg, transparent, rgba(255,248,214,.42), transparent);
  opacity: .48;
  animation: daily-gift-mirror-glint 3.4s 860ms ease-in-out infinite;
}

#dailyGiftSheet .daily-gift-slip {
  position: absolute;
  top: 66px;
  left: 50%;
  z-index: 3;
  width: 78px;
  height: 142px;
  transform: translate(-50%, 34px) scaleY(.18);
  transform-origin: 50% 0;
  opacity: 0;
  transition: transform 760ms 120ms cubic-bezier(.16, 1, .3, 1), opacity 260ms 120ms ease;
}

#dailyGiftSheet .daily-gift-slip-paper {
  position: absolute;
  top: 7px;
  right: 7px;
  bottom: 7px;
  left: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 8px;
  border: 1px solid #C49A56;
  background: linear-gradient(90deg, #E1C98F, #F7EBC8 48%, #C6A260);
  color: #7E2B21;
  box-shadow: 0 10px 16px rgba(0,0,0,.24), inset 0 0 18px rgba(117,78,31,.14);
}

#dailyGiftSheet .daily-gift-slip-paper::before {
  content: "相伯手书";
  margin-bottom: 4px;
  writing-mode: vertical-rl;
  font-family: var(--font-family-serif, serif);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .16em;
}

#dailyGiftSheet .daily-gift-slip-no {
  font-family: var(--font-family-serif, serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

#dailyGiftSheet .daily-gift-slip-copy {
  margin-top: 4px;
  font-family: var(--font-family-sans, system-ui, sans-serif);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .16em;
}

#dailyGiftSheet .daily-gift-slip-rod {
  position: absolute;
  right: 0;
  left: 0;
  height: 12px;
  border: 1px solid #A67835;
  border-radius: 999px;
  background: linear-gradient(90deg, #805721, #E6BE6D 50%, #805721);
  box-shadow: 0 3px 8px rgba(0,0,0,.24);
}

#dailyGiftSheet .daily-gift-slip-rod-top { top: 0; }
#dailyGiftSheet .daily-gift-slip-rod-bottom { bottom: 0; }

#dailyGiftSheet .daily-gift-thread {
  position: absolute;
  top: 52px;
  left: 50%;
  z-index: 4;
  width: 1px;
  height: 94px;
  transform: translateX(-50%);
  background: #A63D2F;
  transition: height 420ms ease;
}

#dailyGiftSheet .daily-gift-copy { position: relative; z-index: 1; margin-top: -2px; }

#dailyGiftSheet .daily-gift-title {
  margin: 0 0 8px;
  color: #F7F1E6;
  font-family: var(--font-family-sans, system-ui, sans-serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: 0;
}

#dailyGiftSheet .daily-gift-sub {
  margin: 0 0 20px;
  color: #C9B896;
  font-family: var(--font-family-sans, system-ui, sans-serif);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
}

#dailyGiftSheet .daily-gift-claim {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin: 0 0 12px;
  padding: 0 24px;
  overflow: hidden;
  border: 0;
  border-radius: 26px;
  background: var(--gradient-cta, linear-gradient(105deg, #D7B46E 0%, #B8914B 52%, #8F6B31 100%));
  color: #F7F1E6;
  font-family: var(--font-family-sans, system-ui, sans-serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(143, 107, 49, 0.26);
  transition: transform 180ms ease, box-shadow 180ms ease, background 240ms ease;
}

#dailyGiftSheet .daily-gift-claim::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -46%;
  width: 28%;
  transform: skewX(-18deg);
  background: rgba(255, 248, 224, .26);
  animation: daily-gift-button-shine 2.6s 1.3s ease-in-out infinite;
}

#dailyGiftSheet .daily-gift-claim:hover,
#dailyGiftSheet .daily-gift-claim:focus-visible { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(143, 107, 49, 0.34); outline: none; }
#dailyGiftSheet .daily-gift-claim:active { transform: translateY(1px) scale(.99); }
#dailyGiftSheet .daily-gift-claim.is-opening { pointer-events: none; background: linear-gradient(105deg, #C9A45A, #A87935); }
#dailyGiftSheet .daily-gift-claim.is-done { pointer-events: none; background: #3A342C; color: #F2D892; box-shadow: none; }
#dailyGiftSheet .daily-gift-claim .claim-done { display: none; }
#dailyGiftSheet .daily-gift-claim.is-done .claim-label { display: none; }
#dailyGiftSheet .daily-gift-claim.is-done .claim-done { display: inline; }

#dailyGiftSheet .daily-gift-foot {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #A89F93;
  font-family: var(--font-family-sans, system-ui, sans-serif);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.65;
}

#dailyGiftSheet.is-opening .daily-gift-home-ring { animation-duration: 1.8s; }
#dailyGiftSheet.is-opening .daily-gift-trajectory-a { animation-duration: 1.8s; }
#dailyGiftSheet.is-opening .daily-gift-trajectory-b { animation-duration: 2.2s; }
#dailyGiftSheet.is-opening .daily-gift-trajectory-c { animation-duration: 2.6s; }
#dailyGiftSheet.is-opening .daily-gift-aura { animation: daily-gift-aura-open 760ms ease-out both; }

@keyframes daily-gift-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes daily-gift-card-in { from { opacity: 0; transform: translateY(24px) scale(.94); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes daily-gift-sheen { from { transform: translateX(-150px) rotate(28deg); opacity: 0; } 25% { opacity: 1; } to { transform: translateX(430px) rotate(28deg); opacity: 0; } }
@keyframes daily-gift-aura { 0%, 100% { transform: translateX(-50%) scale(.94); opacity: .68; } 50% { transform: translateX(-50%) scale(1.06); opacity: 1; } }
@keyframes daily-gift-aura-open { from { transform: translateX(-50%) scale(.94); opacity: .78; } 60% { transform: translateX(-50%) scale(1.26); opacity: 1; } to { transform: translateX(-50%) scale(1.1); opacity: .54; } }
@keyframes daily-gift-home-ring { to { transform: translateX(-50%) rotate(360deg); } }
@keyframes daily-gift-trajectory-a { from { transform: translate(-50%, -50%) rotate(18deg) scaleY(.96); } to { transform: translate(-50%, -50%) rotate(378deg) scaleY(.96); } }
@keyframes daily-gift-trajectory-b { from { transform: translate(-50%, -50%) rotate(-34deg) scaleY(.88); } to { transform: translate(-50%, -50%) rotate(326deg) scaleY(.88); } }
@keyframes daily-gift-trajectory-c { from { transform: translate(-50%, -50%) rotate(78deg) scaleY(.92); } to { transform: translate(-50%, -50%) rotate(438deg) scaleY(.92); } }
@keyframes daily-gift-spark { 0%, 100% { opacity: .35; transform: scale(.7) rotate(0); } 50% { opacity: 1; transform: scale(1.12) rotate(18deg); } }
@keyframes daily-gift-button-shine { 0%, 22% { left: -46%; } 54%, 100% { left: 130%; } }

@media (max-width: 360px) {
  #dailyGiftSheet { padding-inline: 16px; }
  #dailyGiftSheet .daily-gift-card { min-height: 500px; padding-inline: 16px; }
  #dailyGiftSheet .daily-gift-stage { height: 230px; }
  #dailyGiftSheet .daily-gift-mirror { transform: translateX(-50%) scale(.92); }
}

@media (prefers-reduced-motion: reduce) {
  #dailyGiftSheet *, #dailyGiftSheet::before, #dailyGiftSheet::after { animation: none !important; transition: none !important; }
}
