/* Five Fortune activity styles */
:root {
  --ff-red-900: #4c0b0b;
  --ff-red-800: #7f1d1d;
  --ff-red-700: #b91c1c;
  --ff-red-600: #dc2626;
  --ff-gold-300: #fde68a;
  --ff-gold-400: #fbbf24;
  --ff-gold-500: #f59e0b;
  --ff-gold-600: #d97706;
  --ff-cream: #fff7ed;
  --ff-shadow: rgba(0, 0, 0, 0.3);
  --ff-badge-top: calc(env(safe-area-inset-top, 0px) + 10px);
  --ff-badge-height: 28px;
  --ff-badge-gap: 12px;
}

.spring-festival-placeholder.spring-festival-react {
  background: radial-gradient(circle at top, #d97706 0%, #b91c1c 45%, #4c0b0b 100%);
}

body.spring-festival-mode {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

@supports (-webkit-touch-callout: none) {
  .spring-festival-placeholder.spring-festival-react .ff-firework-frame {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 20;
  }

  .spring-festival-placeholder.spring-festival-react .ff-firework-iframe {
    pointer-events: none;
  }
}


.five-fortune-app {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--ff-cream);
  font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  display: flex;
  align-items: stretch;
  justify-content: center;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

body.ff-ambient-paused .ff-bg,
body.ff-ambient-paused .ff-bg *,
body.ff-ambient-paused .ff-decor,
body.ff-ambient-paused .ff-decor *,
body.ff-ambient-paused .ff-decor-lanterns,
body.ff-ambient-paused .ff-decor-lanterns *,
body.ff-ambient-paused .ff-cards,
body.ff-ambient-paused .ff-cards *,
body.ff-ambient-paused .ff-home,
body.ff-ambient-paused .ff-home * {
  animation-play-state: paused !important;
}

body.ff-ambient-paused .ff-firework-frame {
  opacity: 0;
}

.ff-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.ff-bg-layer {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 232, 176, 0.25), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(250, 204, 21, 0.25), transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(239, 68, 68, 0.35), transparent 50%),
    linear-gradient(160deg, #7f1d1d 0%, #b91c1c 35%, #7f1d1d 100%);
  opacity: 0.85;
}

.ff-bg-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.2), transparent 60%);
  filter: blur(10px);
  animation: ff-glow 6s ease-in-out infinite;
  opacity: 0.6;
}

.five-fortune-app:not([data-view="home"]) .ff-bg-glow {
  animation-play-state: paused;
}

.ff-bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.06) 0 2px, transparent 2px 5px);
  mix-blend-mode: soft-light;
}

.ff-firework-frame {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0.5;
  mix-blend-mode: screen;
}

.ff-firework-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.ff-firework-canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.ff-firework-app,
.ff-firework-app .container,
.ff-firework-app .stage-container,
.ff-firework-app .canvas-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ff-firework-app .stage-container {
  border: none !important;
  margin: 0 !important;
}

.ff-firework-app .canvas-container {
  filter: none !important;
}

.ff-firework-app .canvas-container canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: lighten;
  transform: translateZ(0);
}

.ff-firework-app .loading-init,
.ff-firework-app .controls,
.ff-firework-app .menu,
.ff-firework-app .help-modal {
  display: none !important;
}

.ff-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.ff-decor > div,
.ff-decor-lanterns > div {
  position: absolute;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.3));
}

.ff-decor-lanterns {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
}

.ff-decor-cloud {
  top: 14%;
  left: 50%;
  width: min(360px, 70vw);
  transform: translateX(-50%);
  opacity: 0.08;
  mix-blend-mode: screen;
  filter: blur(1.5px);
}

.ff-decor-cloud svg {
  width: 100%;
  height: auto;
  display: block;
}

.ff-decor-lantern {
  top: 0;
  width: 72px;
  animation: ff-lantern-sway 6s ease-in-out infinite;
  transform-origin: 50% 0;
  z-index: 8;
}

.ff-decor-lantern::before {
  content: '';
  position: absolute;
  top: -28px;
  left: 50%;
  width: 3px;
  height: 28px;
  background: rgba(251, 191, 36, 0.6);
  transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}

.ff-decor-lantern-left {
  left: 18px;
}

.ff-decor-lantern-right {
  right: 18px;
  animation-delay: 1.2s;
}

.ff-decor-lantern svg {
  width: 100%;
  height: auto;
  display: block;
}

.ff-decor-coin {
  width: 72px;
  animation: ff-coin-spin 8s linear infinite;
  opacity: 0.5;
}

.ff-decor-coin-main {
  top: 28%;
  right: 10%;
  width: 76px;
  opacity: 0.55;
}

.ff-decor-coin-small {
  top: 18%;
  left: 12%;
  width: 48px;
  opacity: 0.42;
  animation-duration: 10s;
}

.ff-decor-coin-large {
  bottom: 22%;
  right: 20%;
  width: 88px;
  opacity: 0.48;
  animation-duration: 12s;
}

.ff-decor-coin svg {
  width: 100%;
  height: auto;
  display: block;
}

.ff-decor-fireworks {
  width: 90px;
  animation: ff-firework 4.2s ease-in-out infinite;
  opacity: 0.5;
}

.ff-decor-fireworks-main {
  top: 16%;
  right: 18%;
  width: 92px;
  opacity: 0.55;
}

.ff-decor-fireworks-left {
  top: 32%;
  left: 6%;
  width: 70px;
  opacity: 0.45;
  animation-delay: 0.8s;
}

.ff-decor-fireworks-right {
  bottom: 26%;
  right: 6%;
  width: 64px;
  opacity: 0.4;
  animation-delay: 1.4s;
}

.ff-decor-fireworks svg {
  width: 100%;
  height: auto;
  display: block;
}

.ff-decor-firecracker {
  bottom: 30%;
  width: 72px;
  animation: ff-float 5.5s ease-in-out infinite;
  opacity: 0.6;
}

.ff-decor-firecracker-left {
  left: 8%;
}

.ff-decor-firecracker-right {
  right: 8%;
  animation-delay: 1.1s;
}

.ff-decor-firecracker svg {
  width: 100%;
  height: auto;
  display: block;
}

.ff-decor-firecracker-right svg {
  transform: scaleX(-1);
}

.ff-firecracker-spark {
  position: absolute;
  top: -18px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, #fde68a 0%, rgba(251, 191, 36, 0.1) 70%);
  transform: translateX(-50%);
  animation: ff-spark 1.2s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.9);
}

@keyframes ff-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes ff-lantern-sway {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}

@keyframes ff-coin-spin {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(180deg); }
  100% { transform: rotate(360deg); }
}

@keyframes ff-firework {
  0%, 100% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; }
}

@keyframes ff-spark {
  0%, 100% { transform: translateX(-50%) scale(0.6); opacity: 0.4; }
  50% { transform: translateX(-50%) scale(1.2); opacity: 1; }
}

.ff-user {
  position: fixed;
  top: 88px;
  right: 16px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.ff-user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--ff-cream);
  cursor: pointer;
  box-shadow: none;
}

.ff-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(251, 191, 36, 0.4), rgba(127, 29, 29, 0.85));
  border: 2px solid rgba(251, 191, 36, 0.5);
  box-shadow: inset 0 0 8px rgba(251, 191, 36, 0.35), 0 6px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--ff-gold-300);
  background-size: cover;
  background-position: center;
}

.ff-user-avatar.has-avatar {
  color: transparent;
  border-color: rgba(251, 191, 36, 0.65);
  background-color: rgba(127, 29, 29, 0.35);
}

.ff-user-name {
  font-size: 12px;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ff-user-menu {
  position: absolute;
  right: 0;
  top: 52px;
  min-width: 140px;
  background: linear-gradient(150deg, rgba(128, 24, 24, 0.9), rgba(58, 10, 10, 0.95));
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 14px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.35);
  z-index: 6;
}

.ff-user[data-open="true"] .ff-user-menu {
  display: flex;
}

.ff-user-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(160deg, rgba(128, 24, 24, 0.92), rgba(78, 14, 14, 0.96));
  color: var(--ff-cream);
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 120px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.ff-user-item-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  fill: currentColor;
}

.ff-user-item:hover {
  background: linear-gradient(160deg, rgba(152, 30, 30, 0.98), rgba(92, 18, 18, 0.98));
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4);
}

.ff-left-menu {
  position: fixed;
  left: 0;
  top: 88px;
  min-width: 112px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 30;
}

.ff-left-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(160deg, rgba(128, 24, 24, 0.92), rgba(78, 14, 14, 0.96));
  color: var(--ff-cream);
  border: none;
  border-radius: 0 12px 12px 0;
  padding: 7px 10px;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  min-width: 112px;
  border-left: 2px solid rgba(251, 191, 36, 0.7);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ff-left-item:hover {
  background: linear-gradient(160deg, rgba(152, 30, 30, 0.98), rgba(92, 18, 18, 0.98));
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4);
}

@media (max-width: 560px) {
  .ff-user {
    top: 72px;
    right: 12px;
  }

  .ff-user-menu {
    top: 48px;
    min-width: 120px;
  }

  .ff-user-item {
    min-width: 110px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .ff-left-menu {
    top: 72px;
    min-width: 100px;
  }

  .ff-left-item {
    min-width: 100px;
    padding: 6px 9px;
    font-size: 11px;
  }
}

.ff-home {
  position: relative;
  z-index: 5;
  width: min(720px, 92vw);
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.ff-details {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: stretch;
  text-align: left;
}

.five-fortune-app .rules-section,
.five-fortune-app .faq-section {
  text-align: left;
}

.spring-festival-mode .five-fortune-app .footer {
  display: block !important;
}

.five-fortune-app .rules-section {
  background: linear-gradient(160deg, rgba(127, 29, 29, 0.92), rgba(76, 11, 11, 0.92));
  border: 1px solid rgba(251, 191, 36, 0.25);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.five-fortune-app .rules-card {
  gap: 14px;
}

.five-fortune-app .rule-item {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.18);
}

.five-fortune-app .rule-item:hover {
  background: rgba(251, 191, 36, 0.16);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.five-fortune-app .rule-number {
  background: radial-gradient(circle at 30% 30%, #fde68a, #f59e0b);
  color: #7f1d1d;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
}

.five-fortune-app .rule-text,
.five-fortune-app .rule-sub {
  color: var(--ff-cream);
}

.five-fortune-app .faq-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(251, 191, 36, 0.25);
}

.five-fortune-app .faq-title {
  color: var(--ff-gold-300);
}

.five-fortune-app .faq-question {
  color: var(--ff-cream);
}

.five-fortune-app .faq-answer {
  color: rgba(255, 247, 237, 0.75);
}

.five-fortune-app .footer {
  margin-top: 28px;
  padding: 24px 0 12px;
  color: rgba(255, 247, 237, 0.75);
}

.five-fortune-app .footer-text {
  color: rgba(255, 247, 237, 0.9);
}

.five-fortune-app .footer-slogan {
  color: rgba(251, 191, 36, 0.75);
}

.five-fortune-app .footer-links-text {
  color: rgba(255, 247, 237, 0.7);
}

.ff-inventory {
  position: relative;
  z-index: 2;
  width: min(760px, 94vw);
  margin: 16px auto 0;
  display: none;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  padding: 24px 18px 48px;
  border-radius: 18px;
  min-height: 100vh;
  height: auto;
}

.ff-orders {
  position: relative;
  z-index: 2;
  width: min(760px, 94vw);
  margin: 16px auto 0;
  display: none;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  padding: 24px 18px 48px;
  border-radius: 18px;
  min-height: 100vh;
  height: auto;
}

.inventory-groups {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.five-fortune-app[data-view="drawing"] .ff-home {
  opacity: 0.35;
  transform: scale(0.98);
  filter: blur(2px);
  pointer-events: none;
}

.five-fortune-app[data-view="result"] .ff-home {
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
}

.five-fortune-app[data-view="inventory"] .ff-home {
  display: none;
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
}

.five-fortune-app[data-view="inventory"] .ff-inventory {
  display: flex;
}

.five-fortune-app[data-view="orders"] .ff-home {
  display: none;
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
}

.five-fortune-app[data-view="orders"] .ff-orders {
  display: flex;
}

.five-fortune-app[data-view="inventory"] {
  justify-content: flex-start;
  align-items: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.five-fortune-app[data-view="orders"] {
  justify-content: flex-start;
  align-items: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.five-fortune-app[data-view="drawing"],
.five-fortune-app[data-view="result"] {
  overflow-y: hidden;
  touch-action: none;
}

/* ff-bg 已固定，不需要按视图切换 */

.five-fortune-app[data-view="inventory"] .ff-bg-glow,
.five-fortune-app[data-view="inventory"] .ff-bg-noise {
  display: none;
}

.five-fortune-app[data-view="inventory"] .ff-bg-layer {
  background: linear-gradient(160deg, rgba(127, 29, 29, 0.96), rgba(76, 11, 11, 0.98));
}

.five-fortune-app[data-view="inventory"] .ff-user {
  display: none;
}

.five-fortune-app[data-view="inventory"] .ff-left-menu {
  display: none;
}

.five-fortune-app[data-view="orders"] .ff-bg-glow,
.five-fortune-app[data-view="orders"] .ff-bg-noise {
  display: none;
}

.five-fortune-app[data-view="orders"] .ff-bg-layer {
  background: linear-gradient(160deg, rgba(127, 29, 29, 0.96), rgba(76, 11, 11, 0.98));
}

.five-fortune-app[data-view="orders"] .ff-user {
  display: none;
}

.five-fortune-app[data-view="orders"] .ff-left-menu {
  display: none;
}

body.spring-festival-inventory-mode .ff-home,
body.spring-festival-inventory-mode .ff-overlay,
body.spring-festival-inventory-mode .ff-result,
body.spring-festival-inventory-mode .ff-decor,
body.spring-festival-inventory-mode .ff-decor-lanterns,
body.spring-festival-inventory-mode .ff-firework-frame,
body.spring-festival-inventory-mode .ff-bg-noise,
body.spring-festival-inventory-mode .ff-bg-glow {
  display: none !important;
}

body.spring-festival-inventory-mode .ff-left-menu {
  display: none !important;
}

body.spring-festival-inventory-mode .five-fortune-app {
  justify-content: flex-start;
  align-items: stretch;
  overflow-y: auto;
}

body.spring-festival-inventory-mode .ff-inventory {
  display: flex !important;
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  border: none;
  min-height: 100vh;
}

body.spring-festival-orders-mode .ff-home,
body.spring-festival-orders-mode .ff-overlay,
body.spring-festival-orders-mode .ff-result,
body.spring-festival-orders-mode .ff-decor,
body.spring-festival-orders-mode .ff-decor-lanterns,
body.spring-festival-orders-mode .ff-firework-frame,
body.spring-festival-orders-mode .ff-bg-noise,
body.spring-festival-orders-mode .ff-bg-glow {
  display: none !important;
}

body.spring-festival-orders-mode .ff-left-menu {
  display: none !important;
}

body.spring-festival-orders-mode .five-fortune-app {
  justify-content: flex-start;
  align-items: stretch;
  overflow-y: auto;
}

body.spring-festival-orders-mode .ff-orders {
  display: flex !important;
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  border: none;
  min-height: 100vh;
}

.ff-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  padding-top: calc(var(--ff-badge-top) + var(--ff-badge-height) + var(--ff-badge-gap));
  position: relative;
  z-index: 13;
}

.ff-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.5);
  background: rgba(127, 29, 29, 0.5);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ff-gold-300);
  z-index: 40;
  height: var(--ff-badge-height);
  position: fixed;
  left: 50%;
  top: var(--ff-badge-top);
  transform: translateX(-50%);
  pointer-events: none;
}

.ff-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ff-gold-400);
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.8);
}

.ff-title-main {
  font-size: clamp(30px, 5.2vw, 46px);
  margin: 0;
  letter-spacing: 6px;
  font-weight: 800;
  font-family: "STKaiti", "Kaiti SC", "KaiTi", "STSong", "Songti SC", "SimSun", serif;
  background: linear-gradient(180deg, #fff2c2 0%, #ffd27a 40%, #f7b13c 70%, #d4851f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 2px 0 rgba(120, 50, 10, 0.65),
    0 6px 14px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 12;
}

.ff-title-sub {
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(255, 245, 210, 0.8);
}

.ff-cards {
  position: relative;
  width: min(460px, 92vw);
  height: min(620px, 140vw);
  margin-top: 6px;
  display: block;
  perspective: 800px;
}

.ff-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(160px, 34vw, 240px);
  height: auto;
  cursor: pointer;
  --ff-card-lift: 0px;
  --ff-card-scale: 1;
  transition: filter 0.25s ease;
  transform: translate3d(calc(-50% + var(--x)), calc(-50% + var(--y) + var(--ff-card-lift)), 0) rotate(var(--r)) scale(var(--ff-card-scale));
  transform-style: preserve-3d;
  animation: ff-card-float 4.8s ease-in-out infinite;
  animation-delay: var(--d);
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.35));
}

.five-fortune-app:not([data-view="home"]) .ff-card {
  animation-play-state: paused;
}

.ff-card.is-active {
  --ff-card-lift: -10px;
  --ff-card-scale: 1.04;
  filter: drop-shadow(0 26px 40px rgba(0, 0, 0, 0.5));
}

.ff-card-face {
  width: 100%;
  height: auto;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(155deg, rgba(251, 191, 36, 0.96), rgba(239, 68, 68, 0.95));
  box-shadow: inset 0 2px 12px rgba(255, 255, 255, 0.2), inset 0 -12px 20px rgba(127, 29, 29, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  will-change: transform;
}

.ff-card-face::before {
  content: "";
  position: absolute;
  top: -35%;
  left: -40%;
  width: 60%;
  height: 180%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 244, 214, 0.7) 50%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transform: translateX(-60%) rotate(-12deg);
  pointer-events: none;
  border-radius: inherit;
  z-index: 3;
  mix-blend-mode: screen;
}

.ff-card-image {
  position: relative;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 5px;
  display: none;
  z-index: 1;
}

.ff-card-text {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ff-card-face.has-image .ff-card-text {
  opacity: 0;
  display: none;
}

.ff-card-face.has-image {
  background: transparent;
  border: none;
  box-shadow: none;
  gap: 0;
}

.ff-card-face.has-image::after {
  content: none;
}

.ff-card-face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35), transparent 55%);
  opacity: 0.6;
  border-radius: inherit;
  z-index: 2;
}

.ff-card.is-active .ff-card-face {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35), inset 0 2px 14px rgba(255, 255, 255, 0.3);
  filter: brightness(1.05) saturate(1.08);
}

.ff-card.is-active .ff-card-face::before {
  opacity: 0.55;
  animation: ff-card-sheen 1.2s ease;
}

.ff-card-title {
  font-size: clamp(40px, 8vw, 62px);
  font-weight: 800;
  color: #7f1d1d;
  text-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
  z-index: 1;
}

.ff-card-sub {
  font-size: clamp(16px, 4vw, 22px);
  font-weight: 600;
  color: rgba(127, 29, 29, 0.85);
  letter-spacing: 4px;
  z-index: 1;
}

.ff-remaining-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(127, 29, 29, 0.55);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--ff-gold-300);
}

.ff-remaining-info.is-disabled {
  opacity: 0.6;
}

.ff-remaining-info.is-zero {
  border-color: rgba(239, 68, 68, 0.6);
  background: rgba(127, 29, 29, 0.75);
  color: #fecaca;
}

.ff-remaining {
  font-weight: 700;
  color: #fff7ed;
}

.ff-remaining-status {
  margin-left: 4px;
  font-weight: 700;
  color: #fecaca;
}

.ff-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ff-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #fbbf24, #ef4444);
  color: #7f1d1d;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ff-cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.ff-cta.is-disabled,
.ff-cta:disabled {
  cursor: not-allowed;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.4), rgba(239, 68, 68, 0.4));
  box-shadow: none;
  transform: none;
}

.ff-cta-icon {
  font-size: 22px;
}

.ff-cta-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.ff-cta-main {
  font-size: 16px;
}

.ff-cta-sub {
  font-size: 12px;
  opacity: 0.85;
}

.ff-cta.is-auth {
  padding: 9px 18px;
  gap: 8px;
}

.ff-cta.is-auth .ff-cta-icon {
  font-size: 18px;
}

.ff-cta.is-auth .ff-cta-main {
  font-size: 14px;
}

.ff-cta.is-auth .ff-cta-sub {
  display: none;
}

.ff-action-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.65);
}

.ff-divider {
  width: 18px;
  height: 1px;
  background: rgba(255, 255, 255, 0.45);
}

.ff-paid {
  width: min(520px, 90vw);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(127, 29, 29, 0.35);
  border: 1px solid rgba(251, 191, 36, 0.25);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.ff-paid-header {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.ff-paid-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff7ed;
}

.ff-paid-sub {
  font-size: 11px;
  color: rgba(255, 247, 237, 0.6);
}

.ff-paid-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.ff-paid-btn {
  border: none;
  border-radius: 14px;
  padding: 10px 12px;
  background: linear-gradient(140deg, rgba(251, 191, 36, 0.9), rgba(239, 68, 68, 0.9));
  color: #7f1d1d;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ff-paid-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.3);
}

.ff-paid-btn-main {
  font-size: 14px;
}

.ff-paid-btn-price {
  font-size: 12px;
  color: rgba(127, 29, 29, 0.8);
}

.ff-pool {
  width: min(680px, 92vw);
  margin-top: 10px;
  padding: 18px 20px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(127, 29, 29, 0.75), rgba(76, 11, 11, 0.9));
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.ff-pool::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(251, 191, 36, 0.25), transparent 45%);
  opacity: 0.7;
  pointer-events: none;
}

.ff-pool-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(251, 191, 36, 0.35);
  position: relative;
  z-index: 1;
}

.ff-pool-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.ff-pool-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ff-pool-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff8dc;
}

.ff-pool-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: var(--ff-gold-300);
  letter-spacing: 1px;
}

.ff-pool-meta {
  font-size: 12px;
  color: rgba(255, 247, 237, 0.78);
  display: flex;
  align-items: center;
  gap: 4px;
}

.ff-pool-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ff-pool-open-hint {
  font-size: 12px;
  color: #fde68a;
  background: rgba(127, 29, 29, 0.6);
  border: 1px solid rgba(251, 191, 36, 0.4);
  padding: 4px 10px;
  border-radius: 999px;
  line-height: 1.4;
}

.ff-universal-count {
  color: #fde68a;
  font-weight: 700;
}

.ff-pool-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.ff-pool-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ff-pool-draw {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #fbbf24, #ef4444);
  color: #7f1d1d;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 140px;
  white-space: nowrap;
}

.ff-pool-draw.ff-pool-draw-multi {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.ff-pool-draw.is-disabled,
.ff-pool-draw:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.ff-pool-draw:not(.is-disabled):not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.3);
}

.ff-pool-hint {
  font-size: 11px;
  color: rgba(255, 247, 237, 0.6);
}

.ff-pool-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  position: relative;
  z-index: 1;
}

.ff-pool-item {
  background: linear-gradient(160deg, rgba(127, 29, 29, 0.7), rgba(76, 11, 11, 0.8));
  border-radius: 16px;
  padding: 12px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  border: 1px solid rgba(251, 191, 36, 0.2);
  box-shadow: inset 0 1px 6px rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ff-pool-item:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3), inset 0 1px 6px rgba(255, 255, 255, 0.08);
}

.ff-pool-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(251, 191, 36, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.ff-pool-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ff-pool-name {
  font-size: 12px;
  color: #fff8dc;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ff-pool-name-text {
  display: inline-block;
}

.ff-pool-rarity {
  font-size: 10px;
  color: #fff7ed;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.ff-pool-empty {
  font-size: 12px;
  color: rgba(255, 247, 237, 0.72);
  text-align: center;
  position: relative;
  z-index: 1;
}

.ff-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  background: rgba(15, 3, 3, 0.72);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 4;
  pointer-events: none;
}

.ff-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.five-fortune-app:not([data-view="drawing"]) .ff-overlay .ff-anim,
.five-fortune-app:not([data-view="drawing"]) .ff-overlay .ff-rune,
.five-fortune-app:not([data-view="drawing"]) .ff-overlay .ff-orbit-ring,
.five-fortune-app:not([data-view="drawing"]) .ff-overlay .ff-orbit-card,
.five-fortune-app:not([data-view="drawing"]) .ff-overlay .ff-fusion-beam,
.five-fortune-app:not([data-view="drawing"]) .ff-overlay .ff-fusion-core,
.five-fortune-app:not([data-view="drawing"]) .ff-overlay .ff-shuffle-card {
  animation-play-state: paused;
}

.ff-overlay.is-finishing .ff-anim {
  opacity: 0.35 !important;
  filter: blur(2px);
}

.ff-overlay-title {
  font-size: 18px;
  letter-spacing: 3px;
  color: var(--ff-gold-300);
  text-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

.ff-runes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ff-rune {
  position: absolute;
  color: rgba(253, 230, 138, 0.7);
  animation: ff-float 6s ease-in-out infinite;
}

.ff-anim {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ff-overlay[data-style="orbit"] .ff-anim-orbit,
.ff-overlay[data-style="fusion"] .ff-anim-fusion,
.ff-overlay[data-style="shuffle"] .ff-anim-shuffle {
  opacity: 1;
}

.ff-anim-orbit,
.ff-anim-fusion,
.ff-anim-shuffle {
  pointer-events: none;
}

.ff-anim-orbit {
  animation: ff-spin 7s linear infinite;
}

.ff-orbit-ring {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 2px solid rgba(251, 191, 36, 0.35);
  animation: ff-spin 4s linear infinite;
}

.ff-orbit-card {
  position: absolute;
  width: 66px;
  height: auto;
  aspect-ratio: 500 / 896;
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(251, 191, 36, 0.8), rgba(239, 68, 68, 0.9));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
  transform: rotate(calc(var(--i) * 72deg)) translate(140px) rotate(calc(var(--i) * -72deg));
  animation: ff-card-pop 1.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.15s);
}

.ff-orbit-core {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, #fde68a, #f59e0b 60%, #b45309 100%);
  color: #7f1d1d;
  font-size: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.ff-fusion-beam {
  position: absolute;
  width: 6px;
  height: 120px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.8));
  transform: rotate(calc(var(--i) * 30deg)) translateY(-80px);
  animation: ff-beam 1.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.08s);
}

.ff-fusion-core {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, #fde68a, #f59e0b 65%, #b45309 100%);
  box-shadow: 0 0 40px rgba(251, 191, 36, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 700;
  color: #7f1d1d;
  animation: ff-pulse 2s ease-in-out infinite;
}

.ff-shuffle-card {
  position: absolute;
  width: 70px;
  height: auto;
  aspect-ratio: 500 / 896;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(251, 191, 36, 0.75), rgba(239, 68, 68, 0.9));
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
  animation: ff-shuffle 1.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.18s);
}

.ff-result {
  position: fixed;
  inset: 0;
  z-index: 9997;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(10, 2, 2, 0.8);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  text-align: center;
  padding: 20px 20px 28px;
  overflow: hidden;
  pointer-events: none;
}

.ff-result.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.five-fortune-app:not([data-view="result"]) .ff-result-silk {
  animation-play-state: paused;
}

.ff-result-card {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 12px 0 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.ff-result-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #fff7ed;
  text-shadow: 0 8px 20px rgba(251, 191, 36, 0.35);
}

.ff-result-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(255, 250, 230, 0.7);
}

.ff-result-dots {
  display: inline-flex;
  gap: 4px;
}

.ff-result-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.6);
}

.ff-result-cover {
  width: 82vw !important;
  max-width: 640px !important;
  height: auto !important;
  aspect-ratio: auto !important;
  margin: 0 auto;
  border-radius: 12px;
  background: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  position: relative;
}

.ff-result-media {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.4),
    0 8px 16px rgba(0, 0, 0, 0.2);
}

.ff-result-media .ff-result-img,
.ff-result-media .ff-result-gif,
.ff-result-media .ff-result-fallback {
  border-radius: 12px !important;
}

.ff-result.has-multiple .ff-result-cover {
  width: 64vw !important;
  max-width: 460px !important;
}

.ff-result-silk {
  position: absolute;
  inset: -22%;
  pointer-events: none;
  z-index: 6;
  opacity: 0.78;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.35));
  animation: ff-silk-drift 14s ease-in-out infinite;
}

body.ff-result-open .ff-result-silk {
  animation: none;
  mix-blend-mode: normal;
  filter: none;
  opacity: 0.5;
}

body.ff-result-open .ff-result-silk .ff-silk {
  animation: none;
  filter: none;
}

body.ff-result-open .ff-result-silk .ff-silk.s4,
body.ff-result-open .ff-result-silk .ff-silk.s5 {
  display: none;
}

body.ff-result-open .ff-result-silk {
  display: none;
}

.ff-result-silk .ff-silk {
  position: absolute;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  width: 150%;
  height: 38%;
  left: -25%;
  top: 6%;
  opacity: 0.6;
  transform-origin: center;
  filter: blur(0.35px);
  will-change: transform, opacity;
}

.ff-result-silk .ff-silk.s1 {
  width: 170%;
  height: 42%;
  left: -38%;
  top: -6%;
  background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20600%20140'%20fill='none'%3E%3Cpath%20d='M0%2090%20C80%2010%20170%20140%20260%2080%20C340%2020%20420%20120%20510%2070%20C560%2040%20590%20100%20600%2060'%20stroke='%23F7C948'%20stroke-opacity='0.85'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E");
  opacity: 0.75;
  animation: ff-silk-float-1 12s ease-in-out infinite;
}

.ff-result-silk .ff-silk.s2 {
  width: 155%;
  height: 36%;
  left: -24%;
  top: 18%;
  background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20640%20160'%20fill='none'%3E%3Cpath%20d='M0%20110%20C90%2040%20160%20160%20260%2090%20C330%2040%20430%20140%20520%2080%20C570%2050%20610%20120%20640%2070'%20stroke='%23FACC15'%20stroke-opacity='0.7'%20stroke-width='1.7'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E");
  opacity: 0.6;
  animation: ff-silk-float-2 14.5s ease-in-out infinite;
}

.ff-result-silk .ff-silk.s3 {
  width: 168%;
  height: 40%;
  left: -32%;
  top: 40%;
  background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20640%20140'%20fill='none'%3E%3Cpath%20d='M0%2070%20C90%2020%20170%20110%20250%2060%20C330%2010%20420%20100%20500%2050%20C560%2020%20600%2080%20640%2045'%20stroke='%23FCD34D'%20stroke-opacity='0.65'%20stroke-width='2.4'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E");
  opacity: 0.5;
  animation: ff-silk-float-3 13s ease-in-out infinite;
}

.ff-result-silk .ff-silk.s4 {
  width: 160%;
  height: 36%;
  left: -20%;
  top: 58%;
  background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20680%20150'%20fill='none'%3E%3Cpath%20d='M0%2090%20C70%2030%20150%20140%20240%2090%20C320%2040%20420%20120%20500%2070%20C560%2040%20610%20110%20680%2060'%20stroke='%23F59E0B'%20stroke-opacity='0.5'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E");
  opacity: 0.42;
  animation: ff-silk-float-4 15.5s ease-in-out infinite;
}

.ff-result-silk .ff-silk.s5 {
  width: 182%;
  height: 34%;
  left: -45%;
  top: -22%;
  background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20720%20140'%20fill='none'%3E%3Cpath%20d='M0%2080%20C100%2030%20190%20120%20300%2070%20C380%2020%20460%20110%20560%2060%20C620%2030%20680%20100%20720%2050'%20stroke='%23FDE68A'%20stroke-opacity='0.55'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E");
  opacity: 0.35;
  animation: ff-silk-float-5 17s ease-in-out infinite;
}

.ff-result-img {
  width: 100% !important;
  height: auto !important;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px !important;
  position: relative;
  z-index: 3;
  animation: none;
}

.ff-result-gif {
  width: 100% !important;
  height: auto !important;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px !important;
  display: none;
  position: relative;
  z-index: 4;
  animation: none;
}

.ff-result.has-multiple .ff-result-img,
.ff-result.has-multiple .ff-result-gif {
  max-height: 54vh;
}

@media (max-width: 768px) {
  body.ff-result-open .ff-result-silk {
    animation: none;
    opacity: 0.45;
    filter: none;
  }

  .ff-result-media {
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
  }

  .ff-result-cover::after {
    box-shadow: none;
  }
}

@keyframes ff-silk-drift {
  0% { transform: translate3d(-1%, -2%, 0) rotate(0deg); }
  45% { transform: translate3d(1.6%, 1%, 0) rotate(0.6deg); }
  70% { transform: translate3d(0.6%, -1.6%, 0) rotate(-0.4deg); }
  100% { transform: translate3d(-1%, -2%, 0) rotate(0deg); }
}

@keyframes ff-silk-float-1 {
  0% { transform: rotate(-12deg) translate3d(-2%, -1%, 0) scale(1); opacity: 0.72; }
  40% { transform: rotate(-7deg) translate3d(2%, 1%, 0) scale(1.03); opacity: 0.92; }
  70% { transform: rotate(-10deg) translate3d(1%, -2%, 0) scale(1.01); opacity: 0.68; }
  100% { transform: rotate(-12deg) translate3d(-1%, -1%, 0) scale(1); opacity: 0.78; }
}

@keyframes ff-silk-float-2 {
  0% { transform: rotate(14deg) translate3d(1%, -1%, 0) scale(1); opacity: 0.55; }
  45% { transform: rotate(8deg) translate3d(-2%, 2%, 0) scale(1.02); opacity: 0.72; }
  75% { transform: rotate(11deg) translate3d(1%, -2%, 0) scale(1.01); opacity: 0.5; }
  100% { transform: rotate(14deg) translate3d(1%, -1%, 0) scale(1); opacity: 0.6; }
}

@keyframes ff-silk-float-3 {
  0% { transform: rotate(-16deg) translate3d(-1%, 1%, 0) scale(1); opacity: 0.48; }
  35% { transform: rotate(-10deg) translate3d(2%, -1%, 0) scale(1.03); opacity: 0.66; }
  65% { transform: rotate(-14deg) translate3d(-1%, 2%, 0) scale(1.01); opacity: 0.42; }
  100% { transform: rotate(-16deg) translate3d(-1%, 1%, 0) scale(1); opacity: 0.5; }
}

@keyframes ff-silk-float-4 {
  0% { transform: rotate(6deg) translate3d(1.5%, -1%, 0) scale(1); opacity: 0.36; }
  50% { transform: rotate(1deg) translate3d(-2%, 1.8%, 0) scale(1.02); opacity: 0.52; }
  80% { transform: rotate(4deg) translate3d(1%, -2%, 0) scale(1.01); opacity: 0.32; }
  100% { transform: rotate(6deg) translate3d(1.5%, -1%, 0) scale(1); opacity: 0.4; }
}

@keyframes ff-silk-float-5 {
  0% { transform: rotate(18deg) translate3d(-2%, 0.5%, 0) scale(1); opacity: 0.32; }
  45% { transform: rotate(12deg) translate3d(2%, -1.5%, 0) scale(1.03); opacity: 0.48; }
  75% { transform: rotate(15deg) translate3d(-1%, 2%, 0) scale(1.01); opacity: 0.28; }
  100% { transform: rotate(18deg) translate3d(-2%, 0.5%, 0) scale(1); opacity: 0.34; }
}

.ff-result-cover::before {
  content: "";
  position: absolute;
  inset: -10%;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 45%,
      rgba(251, 191, 36, 0.55),
      rgba(251, 191, 36, 0.18) 45%,
      rgba(251, 191, 36, 0.06) 65%,
      transparent 75%);
  filter: blur(14px);
  opacity: 0.55;
  z-index: 1;
  animation: ff-card-aura 2.8s ease-in-out infinite;
}

.ff-result-cover::after {
  content: "";
  position: absolute;
  inset: 2%;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.55);
  box-shadow: inset 0 0 18px rgba(251, 191, 36, 0.35), 0 0 20px rgba(251, 191, 36, 0.3);
  z-index: 4;
  pointer-events: none;
}

body.ff-result-open .ff-result-cover::before {
  animation: none;
  filter: blur(6px);
  opacity: 0.35;
}

body.ff-result-open .ff-result-cover::after {
  box-shadow: none;
}

body.ff-result-open .ff-result-media {
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.32);
}

@keyframes ff-card-aura {
  0%, 100% {
    opacity: 0.35;
    transform: scale(0.98);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.02);
  }
}

.ff-result-fallback {
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  background: rgba(251, 191, 36, 0.1);
  color: var(--ff-gold-300);
  font-size: 36px;
}

.ff-result-fu {
  font-size: 36px;
  font-weight: 700;
  color: var(--ff-gold-400);
  text-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.ff-result-name {
  display: none;
  font-size: 14px;
  font-weight: 600;
  color: #fff7ed;
  margin-top: 10px;
  text-align: center;
}

.ff-result-divider {
  display: none;
}

.ff-result-desc {
  display: none;
}

.ff-result-list {
  display: none;
  width: min(92vw, 420px);
  margin: 8px auto 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 8px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(127, 29, 29, 0.6), rgba(76, 11, 11, 0.8));
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.ff-result-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  padding: 0;
}

.ff-result-thumb {
  width: 100%;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(251, 191, 36, 0.12);
}

.ff-result-thumb::before {
  content: "";
  display: block;
  width: 100%;
  padding-top: var(--ff-result-thumb-pct, 100%);
}

.ff-result-thumb img,
.ff-result-thumb .spring-fortune-default-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.ff-result-thumb .spring-fortune-default-icon {
  display: grid;
  place-items: center;
}

.ff-result-item-name {
  display: none;
}

.ff-result.is-prize-pool .ff-result-name {
  display: block;
}

.ff-result-item.is-active .ff-result-thumb {
  border: 1px solid rgba(251, 191, 36, 0.8);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.5);
}

.ff-result-no {
  display: none;
}

.ff-result-btn {
  padding: 10px 26px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #fbbf24, #ef4444);
  color: #7f1d1d;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  margin: 0;
  z-index: 8;
  pointer-events: auto;
}

.ff-result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
}

.ff-result-btn-inventory {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.9), rgba(220, 38, 38, 0.9));
  color: #7f1d1d;
}

.ff-toast {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 6, 6, 0.9);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 6;
}

.ff-toast.is-visible {
  opacity: 1;
}

.ff-synth-notice {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 4, 4, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 9998;
}

.ff-synth-notice.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.ff-synth-notice-card {
  width: min(78vw, 320px);
  padding: 22px 20px 18px;
  border-radius: 20px;
  background: radial-gradient(circle at top, rgba(251, 191, 36, 0.25), rgba(127, 29, 29, 0.95));
  border: 1px solid rgba(251, 191, 36, 0.4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  text-align: center;
  color: #fff7ed;
}

.ff-synth-notice-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.ff-synth-notice-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ff-synth-notice-btn {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(127, 29, 29, 0.7);
  color: #fff7ed;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ff-synth-notice-btn.primary {
  background: linear-gradient(135deg, #fbbf24, #f97316);
  color: #7f1d1d;
  border: none;
}

.ff-synth-notice-btn.ghost {
  background: transparent;
}

.ff-synth-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 4, 4, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.ff-synth-overlay.is-visible {
  opacity: 1;
}

.ff-synth-overlay.is-finish {
  opacity: 0;
}

.ff-synth-card {
  position: relative;
  width: min(72vw, 280px);
  padding: 28px 24px 26px;
  border-radius: 24px;
  background: radial-gradient(circle at top, rgba(251, 191, 36, 0.35), rgba(127, 29, 29, 0.9));
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  text-align: center;
  color: #fff7ed;
}

.ff-synth-ring {
  position: absolute;
  inset: -22px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 0 40px rgba(251, 191, 36, 0.2);
  animation: ff-synth-spin 3.6s linear infinite;
}

.ff-synth-core {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.9), rgba(244, 63, 94, 0.9));
  display: grid;
  place-items: center;
  color: #7f1d1d;
  font-weight: 800;
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.35), 0 18px 35px rgba(0, 0, 0, 0.35);
  animation: ff-synth-pulse 1.6s ease-in-out infinite;
}

.ff-synth-emoji {
  font-size: 32px;
}

.ff-synth-fu {
  position: absolute;
  bottom: 10px;
  right: 14px;
  font-size: 22px;
  color: #7f1d1d;
  text-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
}

.ff-synth-title {
  font-size: 18px;
  font-weight: 700;
  color: #fde68a;
  letter-spacing: 2px;
}

.ff-synth-desc {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255, 247, 237, 0.85);
  letter-spacing: 2px;
}

@keyframes ff-synth-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

@keyframes ff-synth-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spring-festival-mode .modal.inventory-modal .modal-content.inventory-modal-content {
  background: linear-gradient(160deg, rgba(127, 29, 29, 0.96), rgba(76, 11, 11, 0.98)) !important;
  color: var(--ff-cream) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.spring-festival-mode .ff-inventory {
  background: linear-gradient(160deg, rgba(127, 29, 29, 0.96), rgba(76, 11, 11, 0.98));
  color: var(--ff-cream);
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.spring-festival-mode .ff-orders {
  background: linear-gradient(160deg, rgba(127, 29, 29, 0.96), rgba(76, 11, 11, 0.98));
  color: var(--ff-cream);
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --bg-secondary: rgba(127, 29, 29, 0.55);
  --bg-tertiary: rgba(127, 29, 29, 0.4);
  --text-primary: #fff7ed;
  --text-secondary: rgba(255, 247, 237, 0.75);
  --border-color: rgba(251, 191, 36, 0.25);
  --primary-color: #fbbf24;
  --primary-light: rgba(251, 191, 36, 0.55);
  --shadow-sm: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.spring-festival-mode .modal.inventory-modal .modal-content.inventory-modal-content::before {
  display: none !important;
}

.spring-festival-mode .modal.inventory-modal .modal-title {
  color: #fff7ed !important;
  text-shadow: 0 6px 16px rgba(251, 191, 36, 0.25) !important;
}

.spring-festival-mode .ff-inventory .modal-title {
  color: #fff7ed;
  text-shadow: 0 6px 16px rgba(251, 191, 36, 0.25);
}

.spring-festival-mode .ff-inventory-header .modal-title,
.spring-festival-mode .ff-orders-header .modal-title {
  color: #fff7ed;
  text-shadow: 0 6px 16px rgba(251, 191, 36, 0.25);
}

.five-fortune-app .ff-inventory-header .modal-title,
.five-fortune-app .ff-orders-header .modal-title {
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: #fff7ed !important;
  color: #fff7ed !important;
  text-shadow: 0 6px 16px rgba(251, 191, 36, 0.25);
}

.five-fortune-app .ff-orders .orders-query {
  background: rgba(127, 29, 29, 0.55) !important;
  border: 1px solid rgba(251, 191, 36, 0.25) !important;
  border-radius: 16px;
  padding: 12px;
}

.five-fortune-app .ff-orders .orders-query .input-field {
  background: rgba(127, 29, 29, 0.45) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  color: #fff7ed !important;
}

.five-fortune-app .ff-orders .orders-query .input-field::placeholder {
  color: rgba(255, 247, 237, 0.55) !important;
}

.five-fortune-app .ff-orders .order-card {
  background: rgba(127, 29, 29, 0.55) !important;
  border: 1px solid rgba(251, 191, 36, 0.25) !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.five-fortune-app .ff-orders .order-card:hover {
  border-color: rgba(251, 191, 36, 0.45) !important;
  background: rgba(127, 29, 29, 0.7) !important;
}

.five-fortune-app .ff-orders .order-header {
  border-bottom: 1px solid rgba(251, 191, 36, 0.25) !important;
}

.five-fortune-app .ff-orders .order-item-rarity {
  background: rgba(127, 29, 29, 0.7) !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
  color: #fde68a !important;
}

.spring-festival-mode .ff-inventory-header,
.spring-festival-mode .ff-orders-header {
  border-bottom: 1px solid rgba(251, 191, 36, 0.25);
  padding-bottom: 8px;
}

.spring-festival-mode .ff-inventory-header .inventory-back-btn,
.spring-festival-mode .ff-inventory-header .inventory-refresh-btn,
.spring-festival-mode .ff-orders-header .inventory-back-btn,
.spring-festival-mode .ff-orders-header .inventory-refresh-btn {
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  background: rgba(127, 29, 29, 0.7) !important;
  color: var(--ff-cream) !important;
}
.spring-festival-mode .ff-orders .modal-title {
  color: #fff7ed;
  text-shadow: 0 6px 16px rgba(251, 191, 36, 0.25);
}

.spring-festival-mode .ff-orders .orders-query .input-field {
  background: rgba(127, 29, 29, 0.4);
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: #fff7ed;
}

.spring-festival-mode .ff-orders .orders-query .input-field:focus,
.spring-festival-mode .ff-orders .orders-query .input-field:focus-visible,
.spring-festival-mode #ordersModal .orders-query .input-field:focus,
.spring-festival-mode #ordersModal .orders-query .input-field:focus-visible {
  outline: none;
  border-color: rgba(251, 191, 36, 0.85);
  border-bottom-color: rgba(251, 191, 36, 0.85);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
  background: rgba(127, 29, 29, 0.45);
  color: #fff7ed;
  transform: none;
}

.spring-festival-mode .ff-orders .orders-query .input-field::placeholder {
  color: rgba(255, 247, 237, 0.5);
}

.spring-festival-mode .ff-orders .orders-query .input-label {
  color: rgba(255, 247, 237, 0.8);
}

.spring-festival-mode .ff-orders .orders-query {
  background: rgba(127, 29, 29, 0.5);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 16px;
  padding: 12px;
}

.spring-festival-mode .ff-orders .orders-list .empty-state {
  background: rgba(127, 29, 29, 0.4);
  border: 1px dashed rgba(251, 191, 36, 0.25);
  color: rgba(255, 247, 237, 0.75);
}

.spring-festival-mode .ff-orders .orders-query .btn {
  background: rgba(251, 191, 36, 0.9);
  color: #7f1d1d;
  border: none;
}

.spring-festival-mode .ff-orders .btn,
.spring-festival-mode .ff-orders .btn-primary {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #7f1d1d;
  border: none;
  box-shadow: 0 10px 18px rgba(127, 29, 29, 0.25);
}

.spring-festival-mode .ff-orders .btn:hover,
.spring-festival-mode .ff-orders .btn-primary:hover {
  filter: brightness(1.05);
}

.spring-festival-mode .ff-orders .order-card {
  background: rgba(127, 29, 29, 0.55);
  border: 1px solid rgba(251, 191, 36, 0.2);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.spring-festival-mode .ff-orders .order-card:hover {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(127, 29, 29, 0.7);
}

.spring-festival-mode .ff-orders .order-header {
  border-bottom: 1px solid rgba(251, 191, 36, 0.25);
}

.spring-festival-mode .ff-orders .order-no,
.spring-festival-mode .ff-orders .order-details,
.spring-festival-mode .ff-orders .order-item-name,
.spring-festival-mode .ff-orders .order-item-meta,
.spring-festival-mode .ff-orders .order-item-empty,
.spring-festival-mode .ff-orders .order-note-text,
.spring-festival-mode .ff-orders .order-product-name,
.spring-festival-mode .ff-orders .order-rarity {
  color: #fff7ed;
}

.spring-festival-mode .ff-orders .order-item-rarity {
  background: rgba(127, 29, 29, 0.7);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fde68a;
}

.spring-festival-mode .ff-orders .order-note-edit {
  background: rgba(127, 29, 29, 0.45);
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.spring-festival-mode .ff-orders .order-note-input {
  background: rgba(127, 29, 29, 0.35);
  color: #fff7ed;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.spring-festival-mode .ff-orders .order-note-btn {
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(127, 29, 29, 0.7);
  color: #fff7ed;
}

.spring-festival-mode .ff-orders .order-note-btn.primary {
  background: rgba(251, 191, 36, 0.95);
  color: #7f1d1d;
  border: none;
}

.spring-festival-mode .ff-orders .status-badge.paid {
  background: rgba(34, 197, 94, 0.2);
  color: #bbf7d0;
}

.spring-festival-mode .ff-orders .status-badge.shipped {
  background: rgba(59, 130, 246, 0.2);
  color: #bfdbfe;
}

.spring-festival-mode .ff-orders .status-badge.unpaid {
  background: rgba(239, 68, 68, 0.25);
  color: #fecaca;
}

.spring-festival-mode .ff-orders .status-badge.refunded {
  background: rgba(251, 191, 36, 0.25);
  color: #fde68a;
}

.spring-festival-mode .inventory-modal-header {
  margin-bottom: 14px;
}

.spring-festival-mode .inventory-back-btn,
.spring-festival-mode .inventory-refresh-btn {
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  background: rgba(127, 29, 29, 0.7) !important;
  color: var(--ff-cream) !important;
}

.spring-festival-mode .inventory-meta {
  color: rgba(255, 247, 237, 0.72) !important;
}

.spring-festival-mode .inventory-group {
  margin-bottom: 16px;
}

.spring-festival-mode .inventory-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ff-gold-300);
  margin-bottom: 8px;
}

.spring-festival-mode .inventory-group-count {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.3);
  font-size: 11px;
  color: #fff7ed;
}

.spring-festival-mode .inventory-list {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.spring-festival-mode .inventory-list--five {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.spring-festival-mode .inventory-list--props {
  grid-template-columns: 1fr;
}

.spring-festival-mode .inventory-item {
  background: rgba(127, 29, 29, 0.55) !important;
  border: 1px solid rgba(251, 191, 36, 0.18) !important;
}

.spring-festival-mode .inventory-card {
  background: rgba(127, 29, 29, 0.6) !important;
  border: 1px solid rgba(251, 191, 36, 0.22) !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  gap: 6px;
}

.spring-festival-mode .inventory-card-media {
  width: 96px;
  height: auto;
  aspect-ratio: 500 / 896;
}

.spring-festival-mode .inventory-card-cover {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(251, 191, 36, 0.18);
  object-fit: contain;
}

.spring-festival-mode .inventory-card .spring-fortune-default-icon {
  width: 100%;
  height: 100%;
  background: rgba(251, 191, 36, 0.12);
}

.spring-festival-mode .inventory-card-name {
  color: #fff7ed !important;
}

.spring-festival-mode .inventory-card-count {
  background: #facc15;
  color: #7f1d1d;
  border: 1px solid rgba(127, 29, 29, 0.45);
  box-shadow: 0 6px 14px rgba(127, 29, 29, 0.35);
}

.spring-festival-mode .inventory-item-name {
  color: #fff7ed !important;
}

.spring-festival-mode .inventory-item-desc {
  color: rgba(255, 247, 237, 0.75) !important;
}

.spring-festival-mode .inventory-item-meta {
  color: rgba(255, 247, 237, 0.72) !important;
}

.spring-festival-mode .inventory-item-countdown {
  color: #fbbf24;
}

.spring-festival-mode .inventory-use-btn {
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(127, 29, 29, 0.75);
  color: #fff7ed;
}

.spring-festival-mode .inventory-use-status {
  color: rgba(255, 247, 237, 0.6);
}

.spring-festival-mode .inventory-empty {
  color: rgba(255, 247, 237, 0.7) !important;
}

.spring-festival-mode .inventory-five-fortune {
  background: rgba(251, 191, 36, 0.12) !important;
  border: 1px solid rgba(251, 191, 36, 0.28) !important;
}

.spring-festival-mode .inventory-five-fortune-title {
  color: var(--ff-gold-300) !important;
}

.spring-festival-mode .inventory-five-fortune-desc,
.spring-festival-mode .inventory-five-fortune-count {
  color: rgba(255, 247, 237, 0.8) !important;
}

.spring-festival-mode .inventory-five-fortune-input {
  color: rgba(255, 247, 237, 0.8);
  display: flex;
  align-items: center;
  gap: 12px;
}

.spring-festival-mode .inventory-five-fortune-input input {
  background: transparent;
  border: none;
  color: #fff7ed;
  text-align: center;
  width: 56px;
  font-weight: 600;
}

.spring-festival-mode .ff-synth-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(127, 29, 29, 0.5);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.spring-festival-mode .ff-synth-step {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.15);
  color: #fff7ed;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.spring-festival-mode .ff-synth-step:active {
  transform: scale(0.95);
}

.spring-festival-mode .ff-synth-step:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.spring-festival-mode .inventory-five-fortune-btn.ghost {
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fde68a;
}

.spring-festival-mode .redeem-use-content {
  background: linear-gradient(160deg, rgba(127, 29, 29, 0.96), rgba(20, 6, 6, 0.98)) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  color: #fff7ed !important;
}

.spring-festival-mode .redeem-use-name {
  color: #fff7ed;
}

.spring-festival-mode .redeem-use-desc,
.spring-festival-mode .redeem-use-tip {
  color: rgba(255, 247, 237, 0.75);
}

.spring-festival-mode .redeem-use-code {
  background: rgba(251, 191, 36, 0.12);
  color: #fff7ed;
}

.spring-festival-mode .redeem-use-btn {
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(127, 29, 29, 0.75);
  color: #fff7ed;
}

.spring-festival-mode .redeem-use-btn.primary {
  background: linear-gradient(135deg, #fbbf24, #ef4444);
  color: #7f1d1d;
  border: none;
}

.spring-festival-mode .redeem-success-content {
  background: linear-gradient(160deg, rgba(127, 29, 29, 0.96), rgba(20, 6, 6, 0.98)) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  color: #fff7ed !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5) !important;
}

.spring-festival-mode .redeem-success-title {
  color: #fff7ed;
}

.spring-festival-mode .redeem-success-order {
  color: rgba(255, 247, 237, 0.75);
}

.spring-festival-mode .redeem-success-order span {
  color: #fde68a;
}

.spring-festival-mode .redeem-success-btn {
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(127, 29, 29, 0.75);
  color: #fff7ed;
}

.spring-festival-mode .redeem-success-btn.primary {
  background: linear-gradient(135deg, #fbbf24, #ef4444);
  color: #7f1d1d;
  border: none;
}

.spring-festival-mode #resultModal .modal-content,
.spring-festival-mode #addressModal .modal-content {
  background: linear-gradient(160deg, rgba(127, 29, 29, 0.96), rgba(20, 6, 6, 0.98)) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  color: #fff7ed !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5) !important;
}

.spring-festival-mode #resultModal .result-title,
.spring-festival-mode #resultModal .hero-tag,
.spring-festival-mode #resultModal .prize-name {
  color: #fff7ed !important;
}

.spring-festival-mode #resultModal .prize-card,
.spring-festival-mode #resultModal .prize-result,
.spring-festival-mode #resultModal .shipping-section {
  background: rgba(127, 29, 29, 0.4) !important;
  border: 1px solid rgba(251, 191, 36, 0.2) !important;
  border-radius: 16px;
}

.spring-festival-mode #resultModal .input-field,
.spring-festival-mode #addressModal .input-field,
.spring-festival-mode #resultModal .region-select,
.spring-festival-mode #addressModal .region-select,
.spring-festival-mode #resultModal .address-detail,
.spring-festival-mode #addressModal .address-detail {
  background: rgba(20, 6, 6, 0.6) !important;
  border: 1px solid rgba(251, 191, 36, 0.25) !important;
  color: #fff7ed !important;
}

.spring-festival-mode #resultModal .input-label,
.spring-festival-mode #addressModal .input-label,
.spring-festival-mode #resultModal .form-title,
.spring-festival-mode #addressModal .form-title {
  color: #fde68a !important;
}

.spring-festival-mode #resultModal .btn-primary,
.spring-festival-mode #addressModal .btn-primary {
  background: linear-gradient(135deg, #fbbf24, #ef4444) !important;
  color: #7f1d1d !important;
  border: none !important;
}

.spring-festival-mode #resultModal .btn-secondary,
.spring-festival-mode #addressModal .btn-secondary {
  background: rgba(127, 29, 29, 0.6) !important;
  color: #fff7ed !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
}

.spring-festival-mode #resultModal .modal-tips,
.spring-festival-mode #addressModal .modal-tips {
  background: rgba(251, 191, 36, 0.1) !important;
  border: 1px solid rgba(251, 191, 36, 0.2) !important;
  color: rgba(255, 247, 237, 0.8) !important;
}

@keyframes ff-glow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 0.9; }
}

@keyframes ff-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes ff-pulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes ff-float {
  0% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(-18px); opacity: 1; }
  100% { transform: translateY(0); opacity: 0.6; }
}

@keyframes ff-card-float {
  0%, 100% {
    transform: translate3d(calc(-50% + var(--x)), calc(-50% + var(--y) + var(--ff-card-lift)), 0) rotate(var(--r)) scale(var(--ff-card-scale));
  }
  50% {
    transform: translate3d(calc(-50% + var(--x)), calc(-50% + var(--y) - 14px + var(--ff-card-lift)), 0) rotate(calc(var(--r) + 2deg)) scale(var(--ff-card-scale));
  }
}

@keyframes ff-card-pop {
  0%, 100% { transform: rotate(calc(var(--i) * 72deg)) translate(140px) rotate(calc(var(--i) * -72deg)) scale(0.9); }
  50% { transform: rotate(calc(var(--i) * 72deg)) translate(150px) rotate(calc(var(--i) * -72deg)) scale(1); }
}

@keyframes ff-card-sheen {
  0% { transform: translateX(-60%) rotate(-12deg); opacity: 0; }
  30% { opacity: 0.5; }
  100% { transform: translateX(140%) rotate(-12deg); opacity: 0; }
}

@keyframes ff-beam {
  0%, 100% { opacity: 0.4; transform: rotate(calc(var(--i) * 30deg)) translateY(-80px) scaleY(0.8); }
  50% { opacity: 1; transform: rotate(calc(var(--i) * 30deg)) translateY(-90px) scaleY(1); }
}

@keyframes ff-shuffle {
  0% { transform: translateX(-120px) rotate(-8deg) scale(0.8); opacity: 0.2; }
  40% { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; }
  70% { transform: translateX(80px) rotate(6deg) scale(0.9); opacity: 0.8; }
  100% { transform: translateX(-120px) rotate(-8deg) scale(0.8); opacity: 0.2; }
}

@media (max-width: 420px) {
  .ff-synth-notice-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .ff-user-name {
    display: none;
  }
  .ff-result-cover {
    width: 150px;
    height: 150px;
  }
  .ff-cards {
    width: min(320px, 86vw);
    height: min(420px, 115vw);
  }
  .ff-card {
    width: clamp(100px, 30vw, 130px);
    height: auto;
  }
  .ff-orbit-ring {
    width: 220px;
    height: 220px;
  }
  .ff-orbit-card {
    width: 58px;
    height: 80px;
    transform: rotate(calc(var(--i) * 72deg)) translate(110px) rotate(calc(var(--i) * -72deg));
  }
  .ff-fusion-core {
    width: 100px;
    height: 100px;
  }
  .ff-pool {
    padding: 12px;
  }
  .ff-pool-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .ff-pool-actions {
    width: 100%;
    align-items: stretch;
  }
  .ff-pool-buttons {
    flex-direction: column;
  }
  .ff-pool-draw {
    width: 100%;
    justify-content: center;
  }
  .ff-paid {
    width: min(560px, 92vw);
  }
  .ff-paid-buttons {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}
