:root {
  --page-bg: #FFFBF6;
  --page-bg-2: #F7E3C8;
  --accent: #D48246;
  --accent-soft: #FCEAD6;
  --ink: #4E3426;
  --meta-ink: #8F6B54;
  --surface: rgba(255, 253, 248, 0.88);
  --surface-strong: rgba(255, 253, 249, 0.96);
  --border-soft: rgba(188, 146, 98, 0.25);

  --bm-bg: #FFFDF9;
  --bm-bg-2: #FBEEDB;
  --bm-border: #E5BE8F;
  --bm-frame: #DBA971;
  --bm-ribbon: #E39256;
  --bm-ribbon-dark: #BF6F36;
  --bm-pattern: rgba(216, 158, 95, 0.21);
  --bm-shadow: rgba(148, 96, 48, 0.16);
  --bm-ink: #4E3426;
  --bm-meta-ink: #8F6B54;

  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "PingFang SC", "Hiragino Maru Gothic ProN", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(155deg, var(--page-bg) 0%, var(--page-bg-2) 100%);
  background-attachment: fixed;
  transition: background 0.45s var(--ease-soft), color 0.35s var(--ease-soft);
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

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

.ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(62px);
  opacity: 0.46;
  transition: background 0.5s var(--ease-soft);
}

.blob-1 { width: 360px; height: 360px; top: -90px; left: -80px; background: var(--accent-soft); }
.blob-2 { width: 400px; height: 400px; bottom: -120px; right: -70px; background: var(--bm-bg-2); }
.blob-3 { width: 240px; height: 240px; top: 44%; left: 48%; background: rgba(255, 255, 255, 0.72); }

/* Top Bar */
.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 14px 20px 6px;
  transition: padding-right 0.35s var(--ease-soft);
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-avatar {
  width: 40px; height: 40px; border-radius: 13px; object-fit: cover;
  box-shadow: 0 4px 12px var(--bm-shadow); border: 2px solid #FFFFFF; flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title { font-size: 16px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink); white-space: nowrap; }
.brand-sub { font-size: 11px; color: var(--meta-ink); letter-spacing: 0.03em; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-soft);
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(105, 110, 100, 0.07);
  transition: transform 0.2s var(--ease-spring), background 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.pill-btn:hover:not(:disabled) { transform: translateY(-1.5px); box-shadow: 0 6px 16px rgba(105, 110, 100, 0.12); border-color: var(--bm-border); }
.pill-btn:active:not(:disabled) { transform: scale(0.96); }
.pill-btn:disabled { opacity: 0.58; cursor: not-allowed; }
.pill-btn.primary { background: var(--accent); border-color: transparent; color: #FFFFFF; box-shadow: 0 5px 15px rgba(212, 130, 70, 0.3); }
.pill-btn.primary:hover:not(:disabled) { filter: brightness(1.04); }
.btn-emoji { font-size: 14px; line-height: 1; }

/* Main Centered Workspace */
.workspace {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 18px 28px;
  transition: padding-right 0.35s var(--ease-soft), padding-bottom 0.35s var(--ease-soft);
}

@media (min-width: 800px) {
  body.settings-open .workspace { padding-right: 398px; }
  body.settings-open .topbar { padding-right: 400px; }
}

.bookmark-stage { display: flex; flex-direction: column; align-items: center; gap: 18px; }

.bookmark-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 22px;
  animation: gentleFloat 5.5s ease-in-out infinite;
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.bookmark-ribbon-area {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-soft), transform 0.35s var(--ease-spring);
}
.bookmark-ribbon-area.is-hidden { opacity: 0; transform: translateX(-50%) scale(0.75); }
.bookmark-bow-svg { width: 84px; height: 50px; filter: drop-shadow(0 3px 5px rgba(138, 76, 94, 0.16)); }

.bookmark-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--bm-bg);
  background-image: linear-gradient(170deg, var(--bm-bg) 0%, var(--bm-bg-2) 100%);
  border: 2px solid var(--bm-border);
  border-radius: 28px;
  box-shadow: 0 22px 46px -10px var(--bm-shadow), 0 6px 14px rgba(110, 96, 76, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  overflow: visible;
  transition: width 0.38s var(--ease-soft), min-height 0.38s var(--ease-soft), background 0.35s var(--ease-soft), border-color 0.35s var(--ease-soft), box-shadow 0.35s var(--ease-soft);
}
.bookmark-card.shape-vertical { width: 314px; min-height: 540px; padding: 50px 24px 22px; }
.bookmark-card.shape-card { width: 368px; min-height: 458px; padding: 46px 32px 22px; }
.bookmark-card::before { content: ""; position: absolute; inset: 0; border-radius: 26px; pointer-events: none; }
.bookmark-card.texture-cotton::before {
  opacity: 0.42;
  background-image: radial-gradient(rgba(165, 130, 90, 0.14) 0.7px, transparent 0.7px), radial-gradient(rgba(165, 130, 90, 0.09) 0.7px, transparent 0.7px);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
}
.bookmark-card.texture-gingham::before {
  background-image: linear-gradient(90deg, var(--bm-pattern) 50%, transparent 50%), linear-gradient(var(--bm-pattern) 50%, transparent 50%);
  background-size: 26px 26px;
  opacity: 0.55;
}
.bookmark-card.texture-dots::before { background-image: radial-gradient(var(--bm-pattern) 2.6px, transparent 2.8px); background-size: 22px 22px; opacity: 0.9; }
.bookmark-card.texture-cream::before { background: radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.65), transparent 70%); }

.bookmark-hole {
  position: absolute; top: 15px; left: 50%; transform: translateX(-50%);
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--page-bg-2); border: 2px solid var(--bm-border);
  box-shadow: inset 0 2px 4px rgba(100, 92, 74, 0.16);
  z-index: 3; transition: opacity 0.28s, transform 0.28s;
}
.bookmark-hole.is-hidden { opacity: 0; transform: translateX(-50%) scale(0.4); }

.bookmark-inner-frame { position: absolute; inset: 12px; border-radius: 20px; border: 1.8px dashed var(--bm-frame); pointer-events: none; z-index: 2; opacity: 0.85; transition: opacity 0.3s; }
.bookmark-inner-frame.is-hidden { opacity: 0; }

.bookmark-stickers { position: absolute; inset: 0; pointer-events: none; z-index: 3; transition: opacity 0.3s; }
.bookmark-stickers.is-hidden { opacity: 0; }
.sticker { position: absolute; display: block; opacity: 0.88; filter: drop-shadow(0 2px 3px rgba(120, 80, 50, 0.1)); }
.sticker-tl { top: 22px; left: 18px; width: 28px; height: 28px; transform: rotate(-12deg); }
.sticker-tr { top: 24px; right: 20px; width: 22px; height: 22px; transform: rotate(10deg); }
.sticker-bl { bottom: 24px; left: 20px; width: 26px; height: 26px; transform: rotate(-8deg); }
.sticker-br { bottom: 22px; right: 18px; width: 30px; height: 22px; transform: rotate(12deg); }

.bookmark-content { position: relative; z-index: 4; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 24px; padding: 20px 6px 10px; }
.bookmark-content.is-entering { animation: quotePopIn 0.28s var(--ease-soft); }

@keyframes quotePopIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.bookmark-quote-wrap { display: flex; align-items: center; flex: 1; }
.bookmark-quote {
  margin: 0; width: 100%;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "BiauKai", "FangSong", serif;
  font-size: 16px; line-height: 2; text-align: left; color: var(--bm-ink);
  white-space: pre-wrap; word-break: break-word; letter-spacing: 0.04em;
}
.bookmark-footer { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; color: var(--bm-meta-ink); font-size: 12.5px; letter-spacing: 0.06em; }
.bookmark-footer.is-hidden { display: none; }
.bookmark-author { font-weight: 600; }
.bookmark-date { font-size: 11.5px; opacity: 0.82; }

.card-mascot-bubble {
  position: absolute; bottom: 98px; left: 50%; width: min(258px, calc(100% - 26px));
  padding: 10px 14px; border-radius: 18px; background: rgba(255, 255, 255, 0.97);
  border: 1.8px solid var(--bm-border); box-shadow: 0 10px 26px rgba(90, 82, 72, 0.16);
  color: var(--ink); font-size: 12.8px; line-height: 1.55; text-align: center;
  z-index: 12; opacity: 0; pointer-events: none;
  transform: translateX(-50%) translateY(8px) scale(0.92); transform-origin: bottom center;
  transition: opacity 0.26s var(--ease-soft), transform 0.32s var(--ease-spring);
}
.card-mascot-bubble::after {
  content: ""; position: absolute; bottom: -7px; left: 50%; width: 12px; height: 12px;
  background: rgba(255, 255, 255, 0.97); border-right: 1.8px solid var(--bm-border);
  border-bottom: 1.8px solid var(--bm-border); transform: translateX(-50%) rotate(45deg);
}
.card-mascot-bubble.is-visible { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }

.bookmark-mascot-slot {
  position: relative; z-index: 6; display: flex; align-items: flex-end; justify-content: center;
  margin: 0 auto -8px; padding: 0; border: none; background: transparent; cursor: pointer;
  width: 132px; height: 112px; perspective: 560px; -webkit-tap-highlight-color: transparent;
}
.plush-switch-wrap {
  position: relative; display: flex; align-items: flex-end; justify-content: center;
  width: 118px; height: 108px; transform-origin: 50% 92%;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform; transform-style: preserve-3d;
}
.bookmark-mascot-slot:hover .plush-switch-wrap {
  transform: translateY(-2px) scale(1.05);
}
.bookmark-mascot-slot:active .plush-switch-wrap {
  transform: translateY(3px) scale(1.1, 0.88);
}

/* Signature Click Burst Animations (layered smoothly over the ongoing motion) */
.bookmark-mascot-slot[data-burst="jelly"] .plush-switch-wrap {
  animation: burstJelly 0.64s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes burstJelly {
  0% { transform: scale3d(1, 1, 1); }
  20% { transform: scale3d(1.16, 0.85, 1) translateY(4px); }
  46% { transform: scale3d(0.91, 1.11, 1) translateY(-8px); }
  70% { transform: scale3d(1.06, 0.95, 1) translateY(1px); }
  88% { transform: scale3d(0.98, 1.02, 1) translateY(-1px); }
  100% { transform: scale3d(1, 1, 1); }
}

.bookmark-mascot-slot[data-burst="doubleHop"] .plush-switch-wrap {
  animation: burstDoubleHop 0.72s cubic-bezier(0.25, 0.8, 0.25, 1);
}
@keyframes burstDoubleHop {
  0% { transform: translateY(0) scale(1, 1); }
  14% { transform: translateY(4px) scale(1.12, 0.88); }
  34% { transform: translateY(-14px) scale(0.94, 1.08) rotate(-5deg); }
  52% { transform: translateY(3px) scale(1.09, 0.91) rotate(0deg); }
  72% { transform: translateY(-11px) scale(0.96, 1.06) rotate(5deg); }
  90% { transform: translateY(2px) scale(1.03, 0.97); }
  100% { transform: translateY(0) scale(1, 1); }
}

.bookmark-mascot-slot[data-burst="cuteNod"] .plush-switch-wrap {
  animation: burstCuteNod 0.66s cubic-bezier(0.34, 1.2, 0.64, 1);
}
@keyframes burstCuteNod {
  0% { transform: rotate(0deg) scale(1, 1); }
  22% { transform: rotate(-9deg) translateY(3px) scale(1.04, 0.95); }
  45% { transform: rotate(8deg) translateY(-4px) scale(0.97, 1.04); }
  68% { transform: rotate(-6deg) translateY(2px) scale(1.03, 0.97); }
  86% { transform: rotate(3deg) translateY(-1px) scale(0.99, 1.01); }
  100% { transform: rotate(0deg) scale(1, 1); }
}

.bookmark-mascot-slot[data-burst="spinJump"] .plush-switch-wrap {
  animation: burstSpinJump 0.82s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes burstSpinJump {
  0% { transform: translateY(0) rotateY(0deg) scale(1, 1); }
  14% { transform: translateY(4px) rotateY(0deg) scale(1.12, 0.88); }
  52% { transform: translateY(-16px) rotateY(190deg) scale(1.04, 1.04); }
  82% { transform: translateY(-2px) rotateY(360deg) scale(0.97, 1.03); }
  92% { transform: translateY(2px) rotateY(360deg) scale(1.05, 0.95); }
  100% { transform: translateY(0) rotateY(360deg) scale(1, 1); }
}

.plush-motion-rig {
  position: relative; width: 116px; height: 106px; display: flex; align-items: flex-end; justify-content: center;
  transform-origin: 50% 92%; will-change: transform;
}
.plush-motion-rig .plush-single {
  height: 104px; width: auto; max-width: 116px; object-fit: contain; display: block;
  user-select: none; -webkit-user-drag: none; pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(122, 84, 48, 0.2));
}

/* 5 Smooth Continuous Motions on the SAME Unified Plushie (all loop smoothly through neutral origin) */
/* 1. idle: Gentle breathing & soft warm sway */
.bookmark-mascot-slot[data-action="idle"] .plush-motion-rig {
  animation: singleIdleBreathe 3.6s ease-in-out infinite;
}
@keyframes singleIdleBreathe {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1, 1); }
  25% { transform: translate3d(-1px, -2.5px, 0) rotate(-2.2deg) scale(0.99, 1.02); }
  50% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1.015, 0.985); }
  75% { transform: translate3d(1px, -2.5px, 0) rotate(2.2deg) scale(0.99, 1.02); }
}

/* 2. hop: Joyful squishy bounce-cheer rhythm */
.bookmark-mascot-slot[data-action="hop"] .plush-motion-rig {
  animation: singleCheerHop 1.5s cubic-bezier(0.42, 0, 0.58, 1) infinite;
}
@keyframes singleCheerHop {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.05, 0.95) rotate(0deg); }
  24% { transform: translate3d(-1.5px, -8.5px, 0) scale(0.95, 1.06) rotate(-3.5deg); }
  48% { transform: translate3d(0, 0.5px, 0) scale(1.04, 0.96) rotate(0deg); }
  74% { transform: translate3d(1.5px, -8.5px, 0) scale(0.95, 1.06) rotate(3.5deg); }
}

/* 3. sway: Playful metronome cute wiggle */
.bookmark-mascot-slot[data-action="sway"] .plush-motion-rig {
  animation: singlePlayfulSway 1.9s ease-in-out infinite;
}
@keyframes singlePlayfulSway {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1, 1); }
  25% { transform: translate3d(-3px, -3px, 0) rotate(-6deg) scale(0.98, 1.03); }
  50% { transform: translate3d(0, 1px, 0) rotate(0deg) scale(1.03, 0.97); }
  75% { transform: translate3d(3px, -3px, 0) rotate(6deg) scale(0.98, 1.03); }
}

/* 4. tilt: Curious head-tilt & cute double-nod */
.bookmark-mascot-slot[data-action="tilt"] .plush-motion-rig {
  animation: singleCuteTilt 2.8s ease-in-out infinite;
}
@keyframes singleCuteTilt {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1, 1); }
  18% { transform: translate3d(-1.5px, -1px, 0) rotate(-6.5deg) scale(1.01, 0.99); }
  36% { transform: translate3d(-1.5px, 2px, 0) rotate(-6.5deg) scale(1.03, 0.96); }
  50% { transform: translate3d(0, -1px, 0) rotate(0deg) scale(0.99, 1.01); }
  68% { transform: translate3d(1.5px, -1px, 0) rotate(6.5deg) scale(1.01, 0.99); }
  84% { transform: translate3d(1.5px, 2px, 0) rotate(6.5deg) scale(1.03, 0.96); }
}

/* 5. spin: Happy bouncy float rhythm after spin-jump */
.bookmark-mascot-slot[data-action="spin"] .plush-motion-rig {
  animation: singleHappyFloat 2.2s ease-in-out infinite;
}
@keyframes singleHappyFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1, 1); }
  25% { transform: translate3d(0, -5px, 0) rotate(-3deg) scale(0.98, 1.03); }
  50% { transform: translate3d(0, 1px, 0) rotate(0deg) scale(1.03, 0.97); }
  75% { transform: translate3d(0, -5px, 0) rotate(3deg) scale(0.98, 1.03); }
}

/* Subtle Ambient Floating Micro-Emblems around Plushie */
.plush-fx-emblems {
  position: absolute; inset: 0; pointer-events: none; z-index: 7;
}
.plush-emblem {
  position: absolute; font-size: 13px; line-height: 1; opacity: 0;
  filter: drop-shadow(0 2px 4px rgba(130, 88, 48, 0.16));
}
.plush-emblem.e1 {
  left: 4px; top: 14px;
  animation: emblemFloatA 2.8s ease-in-out infinite;
}
.plush-emblem.e2 {
  right: 4px; top: 22px;
  animation: emblemFloatB 3.1s ease-in-out 0.9s infinite;
}
@keyframes emblemFloatA {
  0%, 100% { opacity: 0; transform: translate(2px, 8px) scale(0.7) rotate(-10deg); }
  35%, 65% { opacity: 0.92; transform: translate(-3px, -2px) scale(1.04) rotate(8deg); }
  90% { opacity: 0; transform: translate(-5px, -10px) scale(0.8) rotate(14deg); }
}
@keyframes emblemFloatB {
  0%, 100% { opacity: 0; transform: translate(-2px, 8px) scale(0.7) rotate(10deg); }
  35%, 65% { opacity: 0.9; transform: translate(3px, -3px) scale(1.02) rotate(-8deg); }
  90% { opacity: 0; transform: translate(5px, -11px) scale(0.8) rotate(-14deg); }
}

.bookmark-mascot-slot .cookie-puppy-svg { width: 90px; height: 82px; filter: drop-shadow(0 4px 8px rgba(130, 96, 54, 0.14)); transition: transform 0.25s var(--ease-spring); }
.bookmark-mascot-slot:hover .cookie-puppy-svg { transform: translateY(-2px) scale(1.06); }
.cookie-puppy-svg .puppy-eyes-happy { opacity: 0; }
.cookie-puppy-svg .puppy-ear-left { transform-origin: 58px 76px; animation: earSwayLeft 3.8s ease-in-out infinite; }
.cookie-puppy-svg .puppy-ear-right { transform-origin: 122px 76px; animation: earSwayRight 3.8s ease-in-out infinite; }
@keyframes earSwayLeft { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(4deg); } }
@keyframes earSwayRight { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-4deg); } }
.is-poked .cookie-puppy-svg { animation: puppyBounce 0.56s var(--ease-spring); }
.is-poked .cookie-puppy-svg .puppy-eyes-normal { opacity: 0; }
.is-poked .cookie-puppy-svg .puppy-eyes-happy { opacity: 1; }
@keyframes puppyBounce {
  0% { transform: scale(1, 1); }
  25% { transform: scale(1.16, 0.85) translateY(4px); }
  55% { transform: scale(0.92, 1.12) translateY(-10px); }
  80% { transform: scale(1.04, 0.97) translateY(1px); }
  100% { transform: scale(1, 1); }
}

/* Stage Action Bar */
.stage-controls { display: flex; align-items: center; justify-content: center; gap: 9px; }
.stage-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 41px; border-radius: var(--radius-pill); border: 1.5px solid var(--border-soft);
  background: var(--surface-strong); color: var(--ink); font-size: 13.5px; font-weight: 600;
  font-family: inherit; cursor: pointer; box-shadow: 0 6px 18px rgba(100, 108, 102, 0.09);
  transition: transform 0.2s var(--ease-spring), border-color 0.22s, background 0.22s, color 0.22s;
}
.stage-btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.stage-btn:active { transform: scale(0.95); }
.next-btn { padding: 0 16px; }
.wheel-entry-btn { padding: 0 16px; background: linear-gradient(135deg, #FFFDF7 0%, var(--accent-soft) 100%); border-color: var(--bm-border); }
.spin-badge { display: inline-flex; align-items: center; justify-content: center; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #FFFFFF; font-size: 11px; font-weight: 700; }
.spin-badge.is-empty { background: #B8ABA0; }
.fav-btn { width: 41px; padding: 0; }
.fav-btn.is-favorited { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.fav-btn.is-favorited svg { fill: var(--accent); }

/* Settings Drawer (Zero Blur) */
.drawer-backdrop { position: fixed; inset: 0; background: transparent; z-index: 40; opacity: 0; transition: opacity 0.25s; }
.drawer-backdrop.is-open { opacity: 1; }
.settings-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 92vw);
  background: rgba(255, 253, 249, 0.97); border-left: 1.5px solid var(--border-soft);
  z-index: 50; box-shadow: -14px 0 38px rgba(70, 62, 54, 0.12);
  display: flex; flex-direction: column;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(16px + env(safe-area-inset-bottom));
  transform: translateX(104%); transition: transform 0.35s var(--ease-soft);
}
.settings-drawer.is-open { transform: translateX(0); }

@media (max-width: 799px) {
  .settings-drawer {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: min(56vh, 470px);
    border-left: none; border-top: 1.5px solid var(--border-soft); border-radius: 26px 26px 0 0;
    box-shadow: 0 -12px 34px rgba(70, 62, 54, 0.14); padding: 16px 18px calc(14px + env(safe-area-inset-bottom));
    transform: translateY(104%);
  }
  .settings-drawer.is-open { transform: translateY(0); }
}

.drawer-header, .modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.drawer-title, .modal-title { margin: 0; font-size: 18px; color: var(--ink); }
.drawer-sub, .modal-sub { margin: 4px 0 0; font-size: 12px; color: var(--meta-ink); line-height: 1.45; }
.icon-close { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--accent-soft); color: var(--ink); font-size: 15px; cursor: pointer; flex-shrink: 0; }

.drawer-tabs, .wheel-tabs { display: grid; gap: 6px; padding: 5px; margin-bottom: 14px; border-radius: var(--radius-pill); background: rgba(244, 240, 232, 0.72); border: 1px solid var(--border-soft); }
.drawer-tabs { grid-template-columns: repeat(2, 1fr); }
.wheel-tabs { grid-template-columns: repeat(3, 1fr); margin-bottom: 6px; }
.tab-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 35px; border: none; border-radius: var(--radius-pill); background: transparent; color: var(--meta-ink); font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer; transition: background 0.25s, color 0.25s, box-shadow 0.25s; }
.tab-btn.is-active { background: #FFFFFF; color: var(--ink); box-shadow: 0 3px 10px rgba(100, 96, 86, 0.1); }
.mini-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; }

.drawer-body { flex: 1; overflow-y: auto; padding-right: 2px; }
.tab-pane, .wheel-pane { display: none; flex-direction: column; gap: 14px; animation: fadeSlide 0.22s var(--ease-soft); }
.tab-pane.is-active, .wheel-pane.is-active { display: flex; }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.field-group { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 12.5px; font-weight: 700; color: var(--meta-ink); letter-spacing: 0.03em; }
.choice-pills { display: flex; gap: 8px; }
.choice-pill { flex: 1; height: 36px; padding: 0 12px; border-radius: var(--radius-pill); border: 1.5px solid var(--border-soft); background: #FFFFFF; color: var(--ink); font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; }
.choice-pill.is-active { background: var(--accent-soft); border-color: var(--accent); }
.theme-grid, .texture-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.theme-card { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-radius: var(--radius-md); border: 1.8px solid var(--border-soft); background: #FFFFFF; color: var(--ink); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.theme-card.is-active, .texture-card.is-active { border-color: var(--accent); background: var(--accent-soft); }
.theme-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #FFFFFF; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); flex-shrink: 0; position: relative; overflow: hidden; }
.theme-dot::after { content: ""; position: absolute; right: 0; bottom: 0; width: 50%; height: 50%; background: var(--dot-accent); border-top-left-radius: 100%; }
.texture-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 9px; border-radius: var(--radius-md); border: 1.8px solid var(--border-soft); background: #FFFFFF; color: var(--ink); font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.texture-preview { width: 100%; height: 32px; border-radius: 9px; border: 1px solid var(--bm-border); background-color: var(--bm-bg); }
.texture-preview.prev-cotton { background-image: radial-gradient(rgba(165, 130, 90, 0.22) 0.9px, transparent 0.9px), radial-gradient(rgba(165, 130, 90, 0.14) 0.9px, transparent 0.9px); background-size: 10px 10px; background-position: 0 0, 5px 5px; }
.texture-preview.prev-gingham { background-image: linear-gradient(90deg, var(--bm-pattern) 50%, transparent 50%), linear-gradient(var(--bm-pattern) 50%, transparent 50%); background-size: 16px 16px; }
.texture-preview.prev-dots { background-image: radial-gradient(var(--bm-pattern) 2.5px, transparent 2.6px); background-size: 14px 14px; }
.texture-preview.prev-cream { background: linear-gradient(135deg, var(--bm-bg) 0%, var(--bm-bg-2) 100%); }

.toggle-list { display: flex; flex-direction: column; gap: 9px; }
.toggle-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: var(--radius-md); background: #FFFFFF; border: 1.5px solid var(--border-soft); cursor: pointer; }
.toggle-info { display: flex; flex-direction: column; gap: 2px; }
.toggle-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.toggle-desc { font-size: 11.5px; color: var(--meta-ink); line-height: 1.4; }
.soft-switch { -webkit-appearance: none; appearance: none; width: 42px; height: 24px; border-radius: 999px; background: #E4DDD4; position: relative; flex-shrink: 0; cursor: pointer; transition: background 0.25s; }
.soft-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 2px 5px rgba(80, 72, 64, 0.18); transition: transform 0.25s var(--ease-spring); }
.soft-switch:checked { background: var(--accent); }
.soft-switch:checked::after { transform: translateX(18px); }
.vault-status { margin: 0; font-size: 11.5px; color: var(--meta-ink); }

.fav-list { display: flex; flex-direction: column; gap: 10px; }
.fav-empty { padding: 36px 16px; text-align: center; color: var(--meta-ink); font-size: 13px; line-height: 1.7; }
.fav-card { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 15px; border: 1.5px solid var(--border-soft); background: #FFFFFF; cursor: pointer; }
.fav-card-body { flex: 1; min-width: 0; }
.fav-card-quote { margin: 0 0 4px; font-family: "Kaiti SC", "STKaiti", "KaiTi", serif; font-size: 14px; color: var(--ink); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fav-card-meta { font-size: 11.5px; color: var(--meta-ink); }
.fav-del-btn { width: 28px; height: 28px; border-radius: 50%; border: none; background: rgba(244, 139, 159, 0.12); color: #C75D79; font-size: 12px; cursor: pointer; flex-shrink: 0; }
.drawer-footer-tip { margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: #FFF7DF; font-size: 11.5px; line-height: 1.5; color: #8A6848; }

/* ---------- Lucky Wheel Modal & Auto-Dismiss Win Popup ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(60, 48, 38, 0.36);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  z-index: 70; display: flex; align-items: center; justify-content: center; padding: 14px;
}
.win-backdrop { z-index: 80; background: rgba(60, 48, 38, 0.24); backdrop-filter: blur(3px); }

.soft-modal {
  width: min(474px, 100%); max-height: min(92dvh, 800px); overflow-x: hidden; overflow-y: auto;
  scrollbar-gutter: stable;
  background: #FFFDF9; border: 2px solid var(--bm-border); border-radius: 26px;
  box-shadow: 0 24px 60px rgba(70, 52, 36, 0.24); padding: 18px 20px 20px;
  display: flex; flex-direction: column; gap: 10px;
  animation: quotePopIn 0.26s var(--ease-spring);
}

.soft-modal > * {
  flex-shrink: 0;
}

/* ---------- Luxury Obsidian & 24K Champagne Gold Wheel Skin ---------- */
.golden-banner {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  padding: 9px 14px;
  line-height: 1.45;
  border-radius: 14px;
  background: linear-gradient(110deg, #2A1E0C 0%, #4E3612 48%, #2A1E0C 100%);
  border: 1.5px solid #EBC66C;
  color: #FFE9A8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  box-shadow: 0 8px 22px rgba(219, 168, 52, 0.28), inset 0 1px 0 rgba(255, 245, 200, 0.35);
  animation: quotePopIn 0.32s var(--ease-spring);
}

.golden-banner-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 25%, rgba(255, 244, 198, 0.32) 50%, transparent 75%);
  transform: translateX(-100%);
  animation: goldBannerSheen 3.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes goldBannerSheen {
  0% { transform: translateX(-110%); }
  45%, 100% { transform: translateX(110%); }
}

.wheel-modal.is-golden-mode {
  background: radial-gradient(circle at 50% 0%, #3A2A14 0%, #1B1510 40%, #100C09 100%);
  border: 2px solid #E5BF64;
  color: #FFF4D6;
  box-shadow:
    0 0 0 3px rgba(240, 200, 102, 0.32),
    0 0 42px rgba(235, 184, 62, 0.36),
    0 28px 72px rgba(0, 0, 0, 0.58);
}

.wheel-modal.is-golden-mode .modal-title {
  background: linear-gradient(120deg, #FFF7D6 0%, #F7D47A 55%, #D99B2B 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.wheel-modal.is-golden-mode .modal-sub {
  color: #D7C298;
}

.wheel-modal.is-golden-mode .icon-close {
  background: rgba(255, 224, 148, 0.12);
  border: 1px solid rgba(244, 202, 106, 0.32);
  color: #FCE29C;
}

.wheel-modal.is-golden-mode .wheel-tabs {
  background: rgba(255, 226, 150, 0.08);
  border: 1px solid rgba(242, 200, 104, 0.24);
}

.wheel-modal.is-golden-mode .tab-btn {
  color: #CBB78E;
}

.wheel-modal.is-golden-mode .tab-btn.is-active {
  background: linear-gradient(135deg, #F2CB6B 0%, #C68B22 100%);
  color: #211506;
  box-shadow: 0 4px 14px rgba(226, 174, 58, 0.36);
}

.wheel-modal.is-golden-mode .vault-bar,
.wheel-modal.is-golden-mode .fortune-strip,
.wheel-modal.is-golden-mode .checkin-bar,
.wheel-modal.is-golden-mode .legend-gift-card,
.wheel-modal.is-golden-mode .debug-switch-bar,
.wheel-modal.is-golden-mode .history-summary,
.wheel-modal.is-golden-mode .history-item,
.wheel-modal.is-golden-mode .gift-photo-card {
  background: rgba(255, 226, 152, 0.07);
  border-color: rgba(242, 200, 106, 0.28);
  color: #FFF4D6;
}

.wheel-modal.is-golden-mode .vault-icon,
.wheel-modal.is-golden-mode .fortune-strip-icon {
  background: rgba(255, 224, 140, 0.14);
  border-color: rgba(245, 206, 114, 0.38);
}

.wheel-modal.is-golden-mode .vault-label,
.wheel-modal.is-golden-mode .checkin-sub,
.wheel-modal.is-golden-mode .fortune-strip-sub,
.wheel-modal.is-golden-mode .gifts-intro,
.wheel-modal.is-golden-mode .gift-upload-status,
.wheel-modal.is-golden-mode .history-meta {
  color: #CCB88F;
}

.wheel-modal.is-golden-mode .vault-balance {
  color: #FFD973;
  text-shadow: 0 0 14px rgba(255, 212, 92, 0.38);
}

.wheel-modal.is-golden-mode .checkin-title,
.wheel-modal.is-golden-mode .fortune-strip-title,
.wheel-modal.is-golden-mode .legend-name,
.wheel-modal.is-golden-mode .history-name {
  color: #FFF5D8;
}

.wheel-modal.is-golden-mode .history-result-line {
  color: #FFD87A;
}

.wheel-modal.is-golden-mode .legend-tier {
  color: #F7D372;
}

.wheel-modal.is-golden-mode .debug-chip,
.wheel-modal.is-golden-mode .debug-reset-btn,
.wheel-modal.is-golden-mode .fortune-mini-btn {
  background: rgba(255, 232, 170, 0.12);
  border-color: rgba(244, 204, 112, 0.34);
  color: #FFE7A8;
}

.wheel-modal.is-golden-mode .wheel-rotor-clip {
  box-shadow:
    0 0 0 3px rgba(245, 206, 110, 0.55),
    0 0 34px rgba(242, 186, 56, 0.42),
    0 14px 32px rgba(0, 0, 0, 0.55);
}

.wheel-modal.is-golden-mode .wheel-center-btn {
  background: radial-gradient(circle at 30% 25%, #FFF6C6 0%, #F2C452 52%, #B87B14 100%);
  border: 3px solid #FFF7D6;
  color: #2B1904;
  box-shadow: 0 0 22px rgba(248, 202, 84, 0.65), 0 6px 16px rgba(0, 0, 0, 0.45);
}

.wheel-modal.is-golden-mode .wheel-spin-cta {
  background: linear-gradient(120deg, #F7D87C 0%, #E09F24 52%, #F9DE8A 100%);
  color: #261604;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(235, 178, 48, 0.42);
}

.wheel-modal.is-golden-mode .withdraw-btn {
  background: linear-gradient(135deg, #F7D574 0%, #CE8B1C 100%);
  color: #241404;
  box-shadow: 0 5px 16px rgba(235, 178, 48, 0.36);
}

.wheel-modal.is-golden-mode .checkin-btn {
  background: linear-gradient(135deg, #F4C962 0%, #C9891B 100%);
  color: #241404;
}

.wheel-modal.is-golden-mode .checkin-btn:disabled {
  background: rgba(255, 224, 150, 0.14);
  color: #A9956E;
}

.vault-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #FFF5D8 0%, #FFEAD2 100%);
  border: 1.6px solid #E9BE82;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s;
}

.vault-bar.is-coin-pop {
  animation: vaultPop 0.48s var(--ease-spring);
  box-shadow: 0 0 0 4px rgba(246, 184, 72, 0.32);
}

@keyframes vaultPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.035); }
  100% { transform: scale(1); }
}

.vault-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.vault-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1.3px solid #EBD0A4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.vault-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.vault-label {
  font-size: 11px;
  font-weight: 700;
  color: #8E6542;
}

.vault-amount-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.vault-balance {
  font-size: 20px;
  font-weight: 900;
  color: #C9462C;
  line-height: 1.1;
}

.vault-gift-pill {
  padding: 1px 7px;
  border-radius: 999px;
  background: #FFE2EC;
  color: #B84268;
  font-size: 10.5px;
  font-weight: 700;
}

.withdraw-btn {
  flex-shrink: 0;
  height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #F29C4B 0%, #DC6342 100%);
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(220, 99, 66, 0.3);
  transition: transform 0.2s var(--ease-spring), filter 0.2s;
}

.withdraw-btn:hover {
  transform: translateY(-1.5px);
  filter: brightness(1.05);
}

.withdraw-btn:active {
  transform: scale(0.95);
}

/* Temporary Debug Switch Strip */
.debug-switch-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 13px;
  background: rgba(255, 250, 240, 0.85);
  border: 1.4px dashed #D8B48A;
  font-size: 11.5px;
  color: var(--meta-ink);
}

.debug-tag {
  font-weight: 700;
}

.debug-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1.2px solid var(--border-soft);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}

.debug-chip input {
  accent-color: var(--accent);
  cursor: pointer;
}

/* History Gamble / Redeemed Badges */
.history-gamble-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: #FFE8A3;
  color: #8A4F0B;
  font-size: 10.5px;
  font-weight: 800;
}

.history-redeemed-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: #E8F5EE;
  color: #3B7B58;
  font-size: 10px;
  font-weight: 700;
}

/* Coin Flip Gamble Modal */
.gamble-modal {
  width: min(370px, 100%);
  align-items: center;
  text-align: center;
  padding: 22px 20px 20px;
  gap: 10px;
  border-color: #EBB55C;
  background: linear-gradient(165deg, #FFFDF8 0%, #FFF4DA 100%);
}

.gamble-kicker {
  padding: 4px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FFE8A3, #FFD1DC);
  color: #6B3C14;
  font-size: 12px;
  font-weight: 800;
}

.gamble-title {
  margin: 2px 0 0;
  font-size: 19px;
  color: var(--ink);
}

.gamble-sub {
  margin: 0;
  font-size: 13px;
  color: var(--meta-ink);
  line-height: 1.5;
}

.coin-stage {
  perspective: 600px;
  margin: 6px auto;
}

.cookie-coin {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #FFF7C8 0%, #FFD463 48%, #E49A24 100%);
  border: 4px solid #FFFDF2;
  box-shadow:
    0 12px 28px rgba(212, 138, 28, 0.34),
    inset 0 0 0 3px rgba(182, 114, 18, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cookie-coin.is-flipping {
  animation: coinFlip3D 1.05s cubic-bezier(0.3, 0.85, 0.4, 1);
}

@keyframes coinFlip3D {
  0% { transform: rotateY(0deg) scale(1); }
  45% { transform: rotateY(720deg) scale(1.18) translateY(-14px); }
  100% { transform: rotateY(1440deg) scale(1); }
}

.coin-face {
  font-size: 46px;
  font-weight: 900;
  color: #7A3D08;
  line-height: 1;
}

.gamble-result-msg {
  margin: 0;
  padding: 7px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1.4px solid var(--bm-border);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
}

.gamble-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.gamble-safe-btn {
  height: 44px;
  background: #FFFFFF;
  border-color: var(--bm-border);
  font-size: 13px;
}

.gamble-risk-btn {
  height: 44px;
  background: linear-gradient(135deg, #FF9E44 0%, #E84A70 100%);
  border: none;
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 800;
  box-shadow: 0 7px 18px rgba(232, 74, 112, 0.34);
}

/* Withdraw Receipt Preview Modal */
.receipt-modal {
  width: min(420px, 100%);
  max-height: min(90dvh, 780px);
}

.receipt-preview-wrap {
  width: 100%;
  max-height: 52dvh;
  overflow-y: auto;
  border-radius: 18px;
  border: 1.5px solid var(--border-soft);
  background: #FFF6E6;
  padding: 8px;
}

.receipt-preview-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.receipt-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.receipt-save-btn {
  width: 100%;
  height: 43px;
}

.receipt-settle-btn {
  width: 100%;
  height: 38px;
  font-size: 12.5px;
}

/* Daily Chat Check-in Bonus Bar */
.checkin-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 13px; border-radius: 16px;
  background: linear-gradient(135deg, #FFF8EA 0%, #FFEAF0 100%);
  border: 1.5px solid var(--bm-border);
}
.checkin-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.checkin-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.checkin-sub { font-size: 11.5px; color: var(--meta-ink); }
.checkin-btn {
  flex-shrink: 0; height: 34px; padding: 0 13px; border-radius: 999px; border: none;
  background: linear-gradient(135deg, #FF94AE 0%, #EF6F92 100%); color: #FFFFFF;
  font-size: 12px; font-weight: 700; font-family: inherit; cursor: pointer;
  box-shadow: 0 4px 12px rgba(239, 111, 146, 0.28);
  transition: transform 0.2s var(--ease-spring), filter 0.2s, background 0.2s;
}
.checkin-btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.04); }
.checkin-btn:disabled { background: #E8DFD5; color: #8A7A6E; box-shadow: none; cursor: default; }

/* Wheel Stage with Circular Rotor Clip (Prevents scrollbar jitter during spin!) */
.wheel-stage {
  position: relative; width: min(334px, 82vw); aspect-ratio: 1;
  margin: 6px auto 2px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.wheel-rotor-clip {
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  contain: layout paint;
  box-shadow: 0 12px 26px rgba(154, 108, 58, 0.22);
  position: relative;
}

.wheel-pointer {
  position: absolute; top: -12px; left: 50%;
  transform: translateX(-50%); transform-origin: 50% 10px;
  z-index: 8; filter: drop-shadow(0 4px 6px rgba(110, 62, 42, 0.28));
  pointer-events: none;
}
.wheel-pointer.is-ticking { animation: pointerTick 0.13s ease-out; }
@keyframes pointerTick {
  0% { transform: translateX(-50%) rotate(0deg); }
  40% { transform: translateX(-50%) rotate(-15deg); }
  100% { transform: translateX(-50%) rotate(0deg); }
}

.wheel-canvas {
  width: 100%; height: 100%; display: block; border-radius: 50%;
  will-change: transform; transform: translateZ(0);
}

.wheel-center-btn {
  position: absolute; width: 66px; height: 66px; border-radius: 50%;
  border: 3.5px solid #FFFFFF; background: linear-gradient(145deg, #FF9EB5 0%, #EE6E90 100%);
  color: #FFFFFF; box-shadow: 0 6px 16px rgba(214, 96, 128, 0.36); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.05; font-family: inherit; z-index: 6;
  transition: transform 0.2s var(--ease-spring);
}
.wheel-center-btn:hover:not(:disabled) { transform: scale(1.07); }
.wheel-center-btn:active:not(:disabled) { transform: scale(0.94); }
.wheel-center-btn:disabled { background: linear-gradient(145deg, #CFC3B8 0%, #B4A599 100%); box-shadow: none; cursor: not-allowed; }
.center-go { font-size: 16px; font-weight: 800; letter-spacing: 0.03em; }
.center-sub { font-size: 10px; font-weight: 600; opacity: 0.92; }
.wheel-spin-cta { width: 100%; height: 44px; font-size: 14.5px; }

.wheel-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.legend-gift-card { display: flex; align-items: center; gap: 7px; padding: 7px 8px; border-radius: 13px; background: #FFF9F0; border: 1.3px solid var(--border-soft); min-width: 0; }
.legend-thumb { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; background: #FFFFFF; border: 1px solid var(--bm-border); display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.legend-info { display: flex; flex-direction: column; min-width: 0; }
.legend-tier { font-size: 10.5px; font-weight: 700; color: var(--accent); }
.legend-name { font-size: 11px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Custom Gift Photo-Only Upload Grid */
.gifts-intro { margin: 0; font-size: 12.5px; color: var(--meta-ink); line-height: 1.5; }
.gift-photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.gift-photo-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 10px; border-radius: 18px; background: #FFFFFF; border: 1.6px solid var(--border-soft); }
.gift-tier-badge { padding: 3px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: 12.5px; font-weight: 700; }
.gift-upload-box {
  position: relative; width: 100%; aspect-ratio: 1; max-width: 110px; border-radius: 16px;
  border: 2px dashed var(--bm-border); background: #FFF9F0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  cursor: pointer; overflow: hidden; transition: border-color 0.2s, background 0.2s;
}
.gift-upload-box:hover { border-color: var(--accent); background: var(--accent-soft); }
.gift-upload-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upload-placeholder-icon { font-size: 26px; }
.upload-placeholder-text { font-size: 11px; font-weight: 700; color: var(--meta-ink); }
.gift-clear-img { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(70, 50, 40, 0.74); color: #FFFFFF; font-size: 11px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.gift-upload-status { font-size: 11px; color: var(--meta-ink); }
.gift-editor-footer { display: flex; justify-content: flex-end; }
.mini-link-btn { border: none; background: var(--accent-soft); color: var(--ink); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer; }

/* Prize History Tab */
.history-summary { padding: 10px 13px; border-radius: 14px; background: #FFF7E4; border: 1.3px solid var(--bm-border); font-size: 12.5px; font-weight: 600; color: var(--ink); text-align: center; }
.history-list { display: flex; flex-direction: column; gap: 9px; max-height: 360px; overflow-y: auto; }
.history-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 15px; background: #FFFFFF; border: 1.5px solid var(--border-soft); }
.history-thumb { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: #FFF7EB; border: 1.2px solid var(--bm-border); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.history-body { flex: 1; min-width: 0; }
.history-name { margin: 0 0 3px; font-size: 13.5px; font-weight: 700; color: var(--ink); display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.history-crit-badge { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 999px; background: linear-gradient(135deg, #FF7B54 0%, #E83F6F 100%); color: #FFFFFF; font-size: 10.5px; font-weight: 800; }
.history-result-line { margin: 0 0 2px; font-size: 12px; font-weight: 700; color: #C95B2B; }
.history-meta { font-size: 11px; color: var(--meta-ink); }
.history-tag { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.history-tag.is-gift { background: #FFE6EE; color: #C94D73; }
.history-tag.is-cash { background: #FFF2CE; color: #A6651A; }
.history-tag.is-miss { background: #F1ECE6; color: #7D6B5E; }

/* Auto-Dismiss Result Popup + 10x Crit VFX */
.win-modal {
  position: relative; overflow: hidden; width: min(360px, 100%);
  align-items: center; text-align: center; padding: 22px 22px 20px; gap: 9px;
  cursor: pointer;
}
.win-modal > * { position: relative; z-index: 2; }
.win-modal.is-crit-hit {
  border-color: #F2A83B;
  box-shadow: 0 0 0 4px rgba(255, 206, 86, 0.35), 0 24px 64px rgba(224, 118, 42, 0.36);
  animation: critModalImpact 0.56s var(--ease-spring);
}
@keyframes critModalImpact {
  0% { transform: scale(1) rotate(0deg); }
  18% { transform: scale(1.07) rotate(-2.2deg); }
  36% { transform: scale(0.96) rotate(2.2deg); }
  56% { transform: scale(1.04) rotate(-1.2deg); }
  78% { transform: scale(0.99) rotate(0.6deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.win-crit-aura {
  position: absolute !important; inset: -45%; z-index: 0 !important; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 214, 92, 0.25) 0deg 15deg, rgba(255, 166, 193, 0.08) 15deg 30deg);
  animation: critAuraSpin 9s linear infinite;
}
@keyframes critAuraSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.win-crit-stamp {
  position: absolute !important; top: 15px; right: 15px; z-index: 6 !important;
  padding: 5px 12px; border-radius: 12px;
  background: linear-gradient(135deg, #FF6B4A 0%, #E63968 100%);
  border: 2.5px solid #FFF4B8; color: #FFFFFF; font-size: 14px; font-weight: 900;
  box-shadow: 0 8px 20px rgba(230, 57, 104, 0.4); transform: rotate(10deg);
  animation: critStampSlam 0.42s var(--ease-spring);
}
@keyframes critStampSlam {
  0% { opacity: 0; transform: scale(2.4) rotate(-8deg); }
  65% { opacity: 1; transform: scale(0.9) rotate(13deg); }
  100% { opacity: 1; transform: scale(1) rotate(10deg); }
}

.win-ribbon-tag { padding: 4px 14px; border-radius: 999px; background: #FFF1C8; border: 1.4px solid #F0C066; color: #8C5114; font-size: 12px; font-weight: 700; }
.win-visual {
  position: relative; width: 142px; height: 142px; border-radius: 24px; margin: 6px auto 2px;
  background: linear-gradient(145deg, #FFFDF7 0%, #FFEED4 100%); border: 3px solid var(--bm-border);
  box-shadow: 0 12px 28px rgba(178, 120, 60, 0.18);
  display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden;
  transition: transform 0.25s var(--ease-spring), border-color 0.25s;
}
.win-modal.is-crit-hit .win-visual { border-color: #F5B23E; transform: scale(1.04); }
.win-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.win-visual-emoji { font-size: 52px; line-height: 1; }
.win-visual-cash { margin-top: 6px; font-size: 26px; font-weight: 900; color: #D4583B; }
.win-gift-mult-chip { position: absolute; bottom: 7px; right: 7px; padding: 2px 8px; border-radius: 999px; background: linear-gradient(135deg, #FF7043, #E63968); color: #FFFFFF; font-size: 13px; font-weight: 900; border: 2px solid #FFFFFF; box-shadow: 0 3px 10px rgba(230, 57, 104, 0.35); }
.win-tier-pill { padding: 3px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: 12px; font-weight: 700; }
.win-title { margin: 2px 0 0; font-size: 20px; color: var(--ink); }
.win-crit-calc { margin: 0; padding: 5px 12px; border-radius: 999px; background: #FFF2C9; border: 1.4px solid #F3BD52; color: #B44D18; font-size: 12.5px; font-weight: 800; }
.win-desc { margin: 0; font-size: 13px; color: var(--meta-ink); line-height: 1.5; }
.win-time { margin: 0; font-size: 11.5px; color: var(--meta-ink); opacity: 0.78; }

/* Particles */
.particle-layer { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.burst-particle { position: fixed; font-size: 20px; user-select: none; will-change: transform, opacity; animation: particleFly var(--dur, 1.25s) cubic-bezier(0.2, 0.8, 0.3, 1) forwards; }
@keyframes particleFly {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4) rotate(0deg); }
  16% { opacity: 1; transform: translate(calc(-50% + var(--tx) * 0.25), calc(-50% + var(--ty) * 0.35)) scale(1.14) rotate(calc(var(--rot) * 0.3)); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty) + 125px)) scale(0.75) rotate(var(--rot)); }
}

/* Fullscreen */
.fullscreen-hud { display: none; }
body.is-fullscreen .topbar, body.is-fullscreen .stage-controls { display: none !important; }
body.is-fullscreen .workspace { min-height: 100dvh; padding: 24px; }
body.is-fullscreen .bookmark-wrapper { transform: scale(1.06); }
body.is-fullscreen .fullscreen-hud {
  position: fixed; bottom: calc(24px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-pill);
  background: rgba(255, 253, 248, 0.88); backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255, 255, 255, 0.9); box-shadow: 0 10px 28px rgba(100, 92, 82, 0.16);
  z-index: 60; transition: opacity 0.3s, transform 0.3s;
}
body.is-fullscreen.hud-hidden .fullscreen-hud { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(14px); }

/* Toast */
.toast {
  position: fixed; top: calc(64px + env(safe-area-inset-top)); left: 50%;
  transform: translateX(-50%) translateY(-16px); padding: 10px 18px; border-radius: var(--radius-pill);
  background: rgba(68, 56, 50, 0.92); color: #FFFDF8; font-size: 13px; font-weight: 600;
  box-shadow: 0 10px 24px rgba(68, 56, 50, 0.22); opacity: 0; pointer-events: none; z-index: 95;
  transition: opacity 0.25s, transform 0.3s var(--ease-spring);
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 600px) {
  .topbar { padding: 10px 12px 4px; gap: 8px; }
  .brand-sub { display: none; }
  .brand-avatar { width: 33px; height: 33px; border-radius: 10px; }
  .brand-title { font-size: 14.5px; }
  .topbar-actions { gap: 5px; }
  .pill-btn { height: 34px; padding: 0 10px; font-size: 12.5px; }
  .bookmark-card.shape-vertical { width: min(296px, 86vw); min-height: 498px; padding: 46px 22px 20px; }
  .bookmark-card.shape-card { width: min(338px, 90vw); min-height: 420px; padding: 42px 22px 20px; }
  .wheel-legend { grid-template-columns: 1fr; }
}

@media (max-width: 440px) {
  .topbar-actions .btn-label { display: none; }
  .topbar-actions .pill-btn { padding: 0 9px; }
  .topbar-actions .pill-btn.primary { padding: 0 11px; }
  .topbar-actions .pill-btn.primary .btn-label { display: inline; }
}


/* ---------- Stage Daily Fortune Entry Button (CookieAnn Kawaii Pastel) ---------- */
.fortune-entry-btn {
  padding: 0 13px;
  gap: 5px;
  background: linear-gradient(135deg, #FFF7E8 0%, #FFEAF0 100%);
  border-color: #EBC3A3;
  color: #6B4532;
  font-weight: 700;
}

.fortune-dot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FF9BB4 0%, #EE7495 100%);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.4;
}

.fortune-dot-badge.is-drawn {
  background: #FFFDF8;
  color: #8A5334;
  border: 1px solid #EBC4A0;
}

/* ---------- Vault Pending Pill & Debug Reset Chip ---------- */
.vault-pending-pill {
  padding: 2px 7px;
  border-radius: 999px;
  background: #FFF0C8;
  border: 1px solid #E5B95C;
  color: #8A510A;
  font-size: 10.5px;
  font-weight: 800;
}

.debug-reset-btn {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1.2px solid var(--border-soft);
  background: #FFFFFF;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s;
}

.debug-reset-btn:active {
  transform: scale(0.95);
}

/* ---------- Dramatic Luxury Golden Wheel Entrance Modal ---------- */
.golden-intro-backdrop {
  z-index: 92;
  background: radial-gradient(circle at 50% 45%, rgba(64, 42, 10, 0.72) 0%, rgba(12, 9, 6, 0.88) 72%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.golden-intro-card {
  position: relative;
  width: min(390px, 92vw);
  padding: 30px 24px 26px;
  border-radius: 28px;
  background: radial-gradient(circle at 50% 18%, #3B2910 0%, #1C140C 56%, #0E0A07 100%);
  border: 2px solid #F0C96A;
  box-shadow:
    0 0 0 4px rgba(245, 204, 102, 0.22),
    0 0 65px rgba(245, 190, 62, 0.45),
    0 24px 64px rgba(0, 0, 0, 0.72);
  text-align: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: goldenIntroPop 0.48s cubic-bezier(0.22, 1.35, 0.36, 1);
}

.golden-intro-card > * {
  position: relative;
  z-index: 2;
}

@keyframes goldenIntroPop {
  0% { opacity: 0; transform: scale(0.76) translateY(22px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.golden-rays {
  position: absolute;
  inset: -75%;
  z-index: 0 !important;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 218, 114, 0.14) 0deg 10deg,
    transparent 10deg 24deg
  );
  animation: spinAura 16s linear infinite;
  pointer-events: none;
}

.golden-sparkles {
  position: absolute;
  inset: 0;
  z-index: 1 !important;
  pointer-events: none;
}

.golden-sparkles span {
  position: absolute;
  color: #FFE492;
  text-shadow: 0 0 10px rgba(255, 212, 92, 0.9);
  animation: sparkleFloat 2.4s ease-in-out infinite;
}

.golden-sparkles span:nth-child(1) { top: 14%; left: 12%; font-size: 16px; animation-delay: 0s; }
.golden-sparkles span:nth-child(2) { top: 22%; right: 14%; font-size: 13px; animation-delay: 0.4s; }
.golden-sparkles span:nth-child(3) { top: 52%; left: 9%; font-size: 12px; animation-delay: 0.9s; }
.golden-sparkles span:nth-child(4) { top: 44%; right: 10%; font-size: 17px; animation-delay: 0.2s; }
.golden-sparkles span:nth-child(5) { bottom: 26%; left: 16%; font-size: 14px; animation-delay: 1.1s; }
.golden-sparkles span:nth-child(6) { bottom: 24%; right: 16%; font-size: 13px; animation-delay: 0.6s; }

@keyframes sparkleFloat {
  0%, 100% { opacity: 0.35; transform: scale(0.85) translateY(0); }
  50% { opacity: 1; transform: scale(1.25) translateY(-6px); }
}

.golden-intro-badge {
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(248, 206, 98, 0.16);
  border: 1px solid rgba(248, 210, 114, 0.55);
  color: #FFE69C;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.golden-crown-emblem {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF7C8 0%, #F2BE46 52%, #9B6410 100%);
  border: 3px solid #FFF5CC;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  box-shadow: 0 0 32px rgba(248, 198, 76, 0.72);
  animation: crownPulse 1.8s ease-in-out infinite;
}

@keyframes crownPulse {
  0%, 100% { transform: scale(1) translateY(0); box-shadow: 0 0 28px rgba(248, 198, 76, 0.65); }
  50% { transform: scale(1.07) translateY(-4px); box-shadow: 0 0 46px rgba(255, 224, 120, 0.92); }
}

.golden-intro-title {
  margin: 2px 0 0;
  font-size: 25px;
  line-height: 1.3;
  font-weight: 900;
  background: linear-gradient(125deg, #FFFBE2 0%, #F9D97A 45%, #E39F28 75%, #FFF4BE 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.5));
}

.golden-intro-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #E2CCA0;
  max-width: 310px;
}

.golden-perks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 2px;
}

.golden-perks span {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 224, 140, 0.12);
  border: 1px solid rgba(245, 206, 114, 0.35);
  color: #FFE9AA;
  font-size: 11.5px;
  font-weight: 700;
}

.golden-enter-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 46px;
  margin-top: 6px;
  border-radius: 999px;
  border: 1.5px solid #FFF4BE;
  background: linear-gradient(120deg, #FCE28B 0%, #E3A024 52%, #FBE088 100%);
  color: #241403;
  font-size: 15px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(235, 178, 48, 0.48);
  transition: transform 0.2s var(--ease-spring), filter 0.2s;
}

.golden-enter-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.58) 50%, transparent 80%);
  transform: translateX(-110%);
  animation: goldBannerSheen 2.4s ease-in-out infinite;
}

.golden-enter-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

/* ---------- Simple Pending Payout Notice Modal ---------- */
.payout-modal {
  width: min(360px, 100%);
  align-items: center;
  text-align: center;
  padding: 24px 22px 22px;
  gap: 10px;
}

.payout-status-badge {
  padding: 4px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FFF2C6, #FFE0A3);
  border: 1.4px solid #E5B14B;
  color: #824908;
  font-size: 12px;
  font-weight: 800;
}

.payout-icon-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(145deg, #FFF7E4, #FFE4CC);
  border: 2.5px solid #F0C28D;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  box-shadow: 0 10px 24px rgba(212, 134, 62, 0.2);
}

.payout-title {
  margin: 0;
  font-size: 20px;
  color: var(--ink);
}

.payout-amount-box {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #FFF8E6 0%, #FFEBF0 100%);
  border: 1.5px solid #F0CFA4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.payout-amount-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--meta-ink);
}

.payout-amount-val {
  font-size: 30px;
  font-weight: 900;
  color: #C9462C;
  line-height: 1.15;
}

.payout-gift-note {
  font-size: 12px;
  font-weight: 700;
  color: #B4486D;
}

.payout-desc {
  margin: 0;
  font-size: 13px;
  color: var(--meta-ink);
  line-height: 1.55;
}

.payout-time {
  margin: 0;
  font-size: 11.5px;
  color: var(--meta-ink);
  opacity: 0.78;
}

.payout-ok-btn {
  width: 100%;
  height: 43px;
  margin-top: 4px;
  font-size: 14px;
}

/* ---------- Win Reroll Bar (乾坤再转) & Gamble Shield Tip ---------- */
.win-reroll-bar {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
}

.win-reroll-btn {
  width: 100%;
  height: 40px;
  background: linear-gradient(135deg, #FF9E44 0%, #E55353 100%);
  border: none;
  color: #FFFFFF;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(229, 83, 83, 0.32);
}

.gamble-shield-tip {
  width: 100%;
  padding: 6px 10px;
  border-radius: 12px;
  background: #EDF9F1;
  border: 1.3px solid #8AD1A6;
  color: #266A43;
  font-size: 12px;
  font-weight: 700;
}

/* ---------- Daily Fortune Strip Inside Wheel (CookieAnn Bakery Style) ---------- */
.fortune-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 16px;
  background: linear-gradient(135deg, #FFF8EC 0%, #FFEFF4 100%);
  border: 1.5px solid #ECC4A0;
}

.fortune-strip-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.fortune-strip-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1.3px solid #EFCAB0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.fortune-strip-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.fortune-strip-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #6B4431;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fortune-strip-sub {
  font-size: 11px;
  color: var(--meta-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fortune-strip-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.fortune-mini-btn {
  height: 31px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1.3px solid #E9C1A0;
  background: #FFFDF8;
  color: #7D523B;
  font-size: 11.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.fortune-cta-btn {
  height: 31px;
  padding: 0 12px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #FF9BB4 0%, #EE7394 100%);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(238, 115, 148, 0.3);
  transition: transform 0.2s var(--ease-spring);
}

.fortune-cta-btn:hover {
  transform: translateY(-1px);
}

/* ---------- Daily Fortune Modal (Image-2 CookieAnn Gingham Bakery Kawaii Style!) ---------- */
.fortune-modal-outer {
  position: relative;
  width: min(392px, 94vw);
  padding-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fortune-top-bow {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  z-index: 6;
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(154, 96, 58, 0.2));
}

.fortune-modal {
  position: relative;
  width: 100%;
  padding: 24px 22px 20px;
  border-radius: 28px;
  border: 2.2px solid #E6BF98;
  background-color: #FFFBF2;
  background-image:
    linear-gradient(90deg, rgba(238, 198, 154, 0.26) 50%, transparent 50%),
    linear-gradient(rgba(238, 198, 154, 0.26) 50%, transparent 50%);
  background-size: 26px 26px;
  box-shadow: 0 24px 56px rgba(114, 78, 48, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.85);
}

.fortune-inner-frame {
  position: absolute;
  inset: 10px;
  border-radius: 20px;
  border: 1.6px dashed #DFB98E;
  pointer-events: none;
  z-index: 0;
}

.fortune-corner-stickers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.f-sticker {
  position: absolute;
  width: 24px;
  height: 24px;
  opacity: 0.9;
}

.f-tl { top: 15px; left: 16px; }
.f-tr { top: 15px; right: 16px; width: 20px; height: 20px; }
.f-bl { bottom: 15px; left: 16px; }
.f-br { bottom: 15px; right: 16px; width: 26px; }

.fortune-modal > :not(.fortune-inner-frame):not(.fortune-corner-stickers) {
  position: relative;
  z-index: 2;
}

.fortune-modal-head {
  padding: 10px 18px 0;
}

.fortune-draw-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px 10px;
  gap: 12px;
}

.shaker-scene {
  position: relative;
  width: 220px;
  height: 236px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  user-select: none;
}

.shaker-halo {
  position: absolute;
  width: 196px;
  height: 196px;
  border-radius: 50%;
  top: 22px;
  background: radial-gradient(circle, rgba(255, 224, 150, 0.52) 0%, rgba(255, 198, 214, 0.18) 54%, transparent 74%);
  pointer-events: none;
  animation: haloBreathe 1.4s ease-in-out infinite;
}

@keyframes haloBreathe {
  0%, 100% { transform: scale(0.95); opacity: 0.78; }
  50% { transform: scale(1.08); opacity: 1; }
}

.fortune-cylinder {
  position: relative;
  width: 196px;
  height: 200px;
  transform-origin: 50% 82%;
  z-index: 3;
  filter: drop-shadow(0 12px 18px rgba(154, 102, 56, 0.22));
}

.cookie-shaker-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.fortune-cylinder.is-shaking {
  animation: shakeKawaiiCup 0.24s ease-in-out infinite;
}

@keyframes shakeKawaiiCup {
  0% { transform: rotate(0deg) translateY(0) scale(1); }
  25% { transform: rotate(-12deg) translateY(-7px) scale(1.03, 0.98); }
  50% { transform: rotate(2deg) translateY(-2px) scale(0.99, 1.02); }
  75% { transform: rotate(13deg) translateY(-8px) scale(1.03, 0.98); }
  100% { transform: rotate(0deg) translateY(0) scale(1); }
}

.ejected-stick {
  position: absolute;
  bottom: 112px;
  left: 50%;
  transform: translateX(-50%) translateY(38px) scale(0.7);
  width: 62px;
  height: 142px;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 10px 18px rgba(212, 134, 72, 0.36));
}

.cookie-stick-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ejected-stick.is-ejected {
  z-index: 5;
  animation: ejectFortuneStick 0.76s cubic-bezier(0.22, 1.32, 0.36, 1) forwards;
}

@keyframes ejectFortuneStick {
  0% { opacity: 0; transform: translateX(-50%) translateY(38px) rotate(-10deg) scale(0.72); }
  45% { opacity: 1; transform: translateX(-50%) translateY(-64px) rotate(6deg) scale(1.08); }
  100% { opacity: 1; transform: translateX(-50%) translateY(-50px) rotate(0deg) scale(1.04); }
}

.fortune-draw-hint {
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  border: 1.3px solid #EBC8A4;
  font-size: 12.5px;
  font-weight: 700;
  color: #7D523B;
  text-align: center;
}

/* Mini CookieAnn Lucky Bookmark Result Slip */
.fortune-result-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 9px;
  padding: 16px 16px 14px;
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.92);
  border: 1.8px solid #EBC49B;
  box-shadow: 0 10px 24px rgba(154, 102, 58, 0.12);
  animation: quotePopIn 0.4s var(--ease-spring);
}

.fortune-result-card.tier-supreme {
  background: linear-gradient(165deg, #FFFDF5 0%, #FFF3CE 100%);
  border-color: #E8B95B;
  box-shadow: 0 0 0 3px rgba(255, 218, 122, 0.36), 0 14px 30px rgba(212, 148, 42, 0.22);
}

.fortune-tier-pill {
  padding: 4px 15px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1.2px solid rgba(138, 86, 46, 0.16);
}

.fortune-res-head {
  display: flex;
  align-items: center;
  gap: 7px;
}

.fortune-res-emoji {
  font-size: 25px;
}

.fortune-res-name {
  margin: 0;
  font-size: 21px;
  font-weight: 900;
  color: #5A3B2C;
}

.fortune-res-poem {
  margin: 0;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-size: 17px;
  color: #7E4E33;
  letter-spacing: 0.04em;
}

.fortune-res-explain {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: #F0FAF8;
  border: 1.3px solid #C2E4DD;
  color: #2E5F59;
  font-size: 12.5px;
  line-height: 1.65;
  text-align: left;
}

.fortune-effect-box {
  width: 100%;
  padding: 11px 13px;
  border-radius: 16px;
  background: #FFF9EE;
  border: 1.5px dashed #E5BD8E;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.fortune-effect-label {
  font-size: 11px;
  font-weight: 800;
  color: #C47644;
  letter-spacing: 0.05em;
}

.fortune-effect-text {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #5E3F30;
  line-height: 1.55;
}

.fortune-live-status {
  padding: 2px 11px;
  border-radius: 999px;
  background: #FFE7EE;
  color: #B4486A;
  font-size: 11px;
  font-weight: 800;
}

.fortune-res-mascot {
  width: 96px;
  height: 88px;
  margin: 0 auto -2px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fortune-res-mascot svg,
.fortune-res-mascot .cookie-plush-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 5px 8px rgba(122, 84, 48, 0.18));
  transform-origin: 50% 90%;
  animation: singleIdleBreathe 2.8s ease-in-out infinite;
}
.fortune-res-mascot[data-mood="hop"] .cookie-plush-img {
  animation: singleCheerHop 1.5s cubic-bezier(0.42, 0, 0.58, 1) infinite;
}

.fortune-res-actions {
  width: 100%;
  margin-top: 2px;
}

.fortune-go-wheel-btn {
  width: 100%;
  height: 42px;
}

.fortune-modal-footer {
  display: flex;
  justify-content: center;
  padding-top: 2px;
}

.fortune-rules-link {
  background: rgba(255, 253, 248, 0.9);
  border: 1.2px solid #EBC4A0;
  color: #7A4F38;
}

/* ---------- Complete Fortune Rules Modal (CookieAnn Gingham Journal Style) ---------- */
.fortune-rules-modal {
  width: min(500px, 100%);
  max-height: min(88dvh, 760px);
  background-color: #FFFBF2;
  background-image:
    linear-gradient(90deg, rgba(238, 198, 154, 0.2) 50%, transparent 50%),
    linear-gradient(rgba(238, 198, 154, 0.2) 50%, transparent 50%);
  background-size: 24px 24px;
  border: 2px solid #E6BF98;
}

.fortune-rules-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  max-height: 58dvh;
  padding-right: 4px;
}

.rules-general-box {
  padding: 11px 13px;
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.94);
  border: 1.5px dashed #E2B88C;
  font-size: 12.5px;
  line-height: 1.62;
  color: #6B4431;
}

.rules-tier-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.rules-tier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid rgba(138, 86, 46, 0.14);
}

.rules-fortune-item {
  padding: 10px 12px;
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.94);
  border: 1.3px solid #EED4B8;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rules-fortune-title {
  font-size: 13px;
  font-weight: 800;
  color: #5A3B2C;
}

.rules-fortune-poem {
  font-size: 12.5px;
  color: #9A5E35;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
}

.rules-fortune-explain {
  font-size: 11.5px;
  color: #366862;
  line-height: 1.55;
}

.rules-fortune-effect {
  font-size: 12px;
  color: var(--meta-ink);
  line-height: 1.5;
}


/* ---------- Custom Hand-Drawn Kawaii UI Icon Sizing & Chat Check-in Warning ---------- */
.ui-svg-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}

.ui-svg-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.stage-fortune-svg {
  width: 21px;
  height: 21px;
}

.vault-icon svg {
  width: 31px;
  height: 31px;
  display: block;
}

.fortune-strip-icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

.fortune-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-fortune-svg {
  width: 17px;
  height: 17px;
}

.checkin-title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.checkin-svg {
  width: 22px;
  height: 22px;
}

.checkin-warn {
  display: inline-flex;
  align-items: center;
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 138, 138, 0.14);
  border: 1px dashed rgba(214, 92, 92, 0.36);
  color: #B84242;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.35;
  width: fit-content;
}

.wheel-modal.is-golden-mode .checkin-warn {
  background: rgba(255, 178, 120, 0.14);
  border-color: rgba(255, 198, 120, 0.38);
  color: #FFD29D;
}

.legend-thumb svg {
  width: 26px;
  height: 26px;
  display: block;
}

.upload-placeholder-icon svg {
  width: 44px;
  height: 44px;
  display: block;
}

.win-visual-svg {
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.win-visual-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}


/* ---------- Single Featured Custom Physical Gift Legend & Editor (Custom Amount + Photo) ---------- */
.wheel-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-gift-featured {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 15px;
  background: linear-gradient(135deg, #FFF9F0 0%, #FFF0F5 100%);
  border: 1.5px solid #ECC4A0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: transform 0.2s var(--ease-spring), border-color 0.2s;
}

.legend-gift-featured:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.legend-featured-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.legend-edit-chip {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1.2px solid #EBC0A0;
  color: #8C5030;
  font-size: 11.5px;
  font-weight: 800;
}

.wheel-modal.is-golden-mode .legend-gift-featured {
  background: rgba(255, 226, 152, 0.08);
  border-color: rgba(242, 200, 106, 0.32);
}

.wheel-modal.is-golden-mode .legend-edit-chip {
  background: rgba(255, 224, 140, 0.14);
  border-color: rgba(244, 204, 112, 0.38);
  color: #FFE7A8;
}

.gift-single-wrap {
  display: flex;
  flex-direction: column;
}

.gift-single-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  background: #FFFFFF;
  border: 1.6px solid var(--border-soft);
}

.gift-single-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gift-upload-large {
  width: 120px;
  height: 120px;
  max-width: 120px;
  flex-shrink: 0;
  border-radius: 18px;
}

.gift-single-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.gift-amount-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--meta-ink);
}

.gift-amount-input-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 40px;
  border-radius: 13px;
  background: #FFF9F0;
  border: 1.6px solid var(--bm-border);
}

.gift-amount-input-wrap:focus-within {
  border-color: var(--accent);
  background: #FFFFFF;
}

.gift-yen-prefix {
  font-size: 16px;
  font-weight: 900;
  color: #C95B2B;
}

.gift-amount-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  font-family: inherit;
}

.gift-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gift-preset-pill {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1.2px solid var(--border-soft);
  background: #FFFDF8;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.gift-preset-pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

.gift-single-hint {
  margin: 0;
  font-size: 11.5px;
  color: var(--meta-ink);
  text-align: center;
}

.wheel-modal.is-golden-mode .gift-single-card {
  background: rgba(255, 226, 152, 0.07);
  border-color: rgba(242, 200, 106, 0.28);
}

.wheel-modal.is-golden-mode .gift-amount-input-wrap {
  background: rgba(255, 224, 140, 0.1);
  border-color: rgba(244, 204, 112, 0.36);
}

.wheel-modal.is-golden-mode .gift-amount-input,
.wheel-modal.is-golden-mode .gift-yen-prefix {
  color: #FFE7A8;
}

.wheel-modal.is-golden-mode .gift-preset-pill {
  background: rgba(255, 224, 140, 0.12);
  border-color: rgba(244, 204, 112, 0.34);
  color: #FFE7A8;
}

.wheel-modal.is-golden-mode .gift-preset-pill.is-active {
  background: #F2CB6B;
  border-color: #F2CB6B;
  color: #211506;
}

@media (max-width: 440px) {
  .gift-single-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .gift-single-fields {
    width: 100%;
    align-items: center;
  }
  .gift-preset-row {
    justify-content: center;
  }
}


/* ---------- Probability Rules Button, Live Gift Prob Pill & Probability Table ---------- */
.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.prob-rules-btn {
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1.3px solid var(--bm-border);
  background: #FFF9EE;
  color: #7A4B2E;
  font-size: 12px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.18s var(--ease-spring), background 0.18s;
}

.prob-rules-btn:hover {
  transform: translateY(-1px);
  background: #FFF2D8;
}

.wheel-modal.is-golden-mode .prob-rules-btn {
  background: rgba(255, 224, 148, 0.12);
  border-color: rgba(244, 202, 106, 0.36);
  color: #FCE29C;
}

.gift-prob-pill {
  padding: 4px 10px;
  border-radius: 10px;
  background: #FFF4E0;
  border: 1.2px dashed #E5B87B;
  color: #7D4B1E;
  font-size: 11.5px;
  line-height: 1.4;
}

.wheel-modal.is-golden-mode .gift-prob-pill {
  background: rgba(255, 224, 140, 0.12);
  border-color: rgba(244, 204, 112, 0.38);
  color: #FFE7A8;
}

.prob-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.prob-sec-title {
  padding: 6px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FFF3DB 0%, #FFEAEF 100%);
  border: 1.2px solid #EBC3A0;
  color: #6B4229;
  font-size: 13px;
  font-weight: 800;
}

.prob-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 253, 248, 0.95);
  border-radius: 14px;
  overflow: hidden;
  border: 1.3px solid #EED4B8;
  font-size: 12.5px;
}

.prob-table th,
.prob-table td {
  padding: 8px 10px;
  text-align: center;
  border-bottom: 1px solid #F3E2CC;
  color: #5A3B2C;
}

.prob-table th {
  background: #FFF7E8;
  font-weight: 800;
  color: #7D5033;
  font-size: 12px;
}

.prob-table td:first-child,
.prob-table th:first-child {
  text-align: left;
}

.prob-table tr:last-child td {
  border-bottom: none;
}

.prob-note {
  margin: 0;
  padding: 8px 11px;
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.92);
  border: 1.2px dashed #E2B88C;
  font-size: 11.8px;
  line-height: 1.55;
  color: #744A30;
}

.prob-list {
  margin: 0;
  padding: 10px 14px 10px 26px;
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.95);
  border: 1.3px solid #EED4B8;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #5A3B2C;
}


/* ==========================================================================
   Wheel-Only Bookmark Gingham Hand-Journal Mode
   ========================================================================== */
body.wheel-only-mode .bookmark-feature,
body.wheel-only-mode #stagePanel,
body.wheel-only-mode #settingsDrawer,
body.wheel-only-mode #drawerBackdrop,
body.wheel-only-mode #btnCloseWheel,
body.wheel-only-mode #btnOpenProbRules {
  display: none !important;
}

body.wheel-only-mode .wheel-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

body.wheel-only-mode .wheel-top-btn.is-muted {
  opacity: 0.72;
}

body.wheel-only-mode #wheelModal.wheel-page-stage {
  position: relative;
  inset: auto;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  min-height: calc(100vh - 68px);
  padding: 20px 14px 52px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
}

.wheel-bookmark-outer {
  position: relative;
  width: min(468px, 100%);
  margin: 14px auto 0;
}

.wheel-bookmark-bow {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 54px;
  z-index: 12;
  pointer-events: none;
  filter: drop-shadow(0 5px 10px rgba(130, 96, 54, 0.2));
}

.wheel-bookmark-bow svg {
  width: 100%;
  height: 100%;
  display: block;
}

body.wheel-only-mode #wheelModalCard {
  position: relative;
  width: 100%;
  max-width: none;
  max-height: none;
  overflow: visible;
  padding: 48px 22px 20px;
  border-radius: 30px;
  border: 2px solid var(--bm-border);
  background-color: var(--bm-bg);
  background-image:
    linear-gradient(90deg, rgba(243, 222, 192, 0.44) 50%, transparent 50%),
    linear-gradient(rgba(243, 222, 192, 0.44) 50%, transparent 50%);
  background-size: 26px 26px;
  box-shadow:
    0 24px 54px var(--bm-shadow),
    0 3px 10px rgba(96, 68, 38, 0.06);
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.wheel-bookmark-hole {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--page-bg2);
  border: 2px solid var(--bm-border);
  box-shadow: inset 0 2px 4px rgba(120, 88, 52, 0.14);
  z-index: 5;
  pointer-events: none;
}

.wheel-bookmark-frame {
  position: absolute;
  inset: 11px;
  border-radius: 21px;
  border: 1.6px dashed var(--bm-frame);
  pointer-events: none;
  z-index: 1;
}

.wheel-bookmark-stickers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.wb-sticker {
  position: absolute;
  opacity: 0.92;
  filter: drop-shadow(0 2px 4px rgba(130, 96, 54, 0.14));
}

.wb-sticker svg {
  width: 100%;
  height: 100%;
  display: block;
}

.wb-tl { top: 20px; left: 20px; width: 28px; height: 28px; transform: rotate(-10deg); }
.wb-tr { top: 22px; right: 22px; width: 22px; height: 22px; transform: rotate(10deg); }
.wb-bl { bottom: 20px; left: 22px; width: 26px; height: 26px; transform: rotate(-8deg); }
.wb-br { bottom: 20px; right: 22px; width: 30px; height: 22px; transform: rotate(12deg); }

/* Keep interactive layers cleanly above inner dashed frame */
body.wheel-only-mode #wheelModalCard > :not(.wheel-bookmark-hole):not(.wheel-bookmark-frame):not(.wheel-bookmark-stickers) {
  position: relative;
  z-index: 3;
}

body.wheel-only-mode .wheel-card-header {
  justify-content: center;
  text-align: center;
  margin-bottom: 0;
}

body.wheel-only-mode .wheel-title-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

body.wheel-only-mode #wheelTitle {
  font-family: 'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi', 'Songti SC', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #5C3D28;
}

body.wheel-only-mode #wheelLimitText {
  font-size: 12.5px;
  color: #8C694C;
}

body.wheel-only-mode .wheel-tabs {
  background: rgba(255, 250, 241, 0.88);
  border: 1.4px solid #EBD4B4;
  box-shadow: 0 4px 12px rgba(138, 102, 58, 0.08);
}

body.wheel-only-mode .vault-bar,
body.wheel-only-mode .fortune-strip,
body.wheel-only-mode .checkin-bar {
  background: rgba(255, 253, 248, 0.9);
  border-color: #EAD2B1;
  box-shadow: 0 5px 14px rgba(138, 102, 58, 0.08);
}

body.wheel-only-mode .wheel-legend {
  background: rgba(255, 253, 248, 0.86);
  border: 1.3px dashed #E5C8A0;
  border-radius: 16px;
  padding: 10px 12px;
}

body.wheel-only-mode .gift-card,
body.wheel-only-mode .history-item,
body.wheel-only-mode .history-summary,
body.wheel-only-mode .gifts-intro {
  background: rgba(255, 253, 248, 0.92);
}

/* Bookmark-Style Interactive Plushie Footer at bottom of Wheel Card */
.wheel-mascot-footer {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2px;
  padding: 4px 10px 4px;
}

.wheel-kitchen-sign {
  align-self: flex-end;
  margin-right: 12px;
  margin-bottom: -6px;
  font-family: 'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi', serif;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: #8E6E52;
  opacity: 0.9;
}

.wheel-mascot-footer .card-mascot-bubble {
  bottom: calc(100% + 2px);
}

.wheel-mascot-slot {
  margin: 0 auto;
}

/* 24K Luxury Golden Wheel Bookmark Transformation */
body.wheel-only-mode #wheelModalCard.is-golden-mode {
  background-color: #16110C;
  background-image:
    linear-gradient(90deg, rgba(244, 200, 100, 0.08) 50%, transparent 50%),
    linear-gradient(rgba(244, 200, 100, 0.08) 50%, transparent 50%);
  background-size: 26px 26px;
  border-color: rgba(246, 206, 114, 0.65);
  box-shadow:
    0 26px 64px rgba(18, 12, 4, 0.45),
    0 0 0 1px rgba(255, 232, 160, 0.25) inset,
    0 0 36px rgba(240, 184, 62, 0.22);
}

body.wheel-only-mode #wheelModalCard.is-golden-mode .wheel-bookmark-hole {
  background: #2A2013;
  border-color: rgba(246, 206, 114, 0.72);
}

body.wheel-only-mode #wheelModalCard.is-golden-mode .wheel-bookmark-frame {
  border-color: rgba(246, 206, 114, 0.48);
}

body.wheel-only-mode #wheelModalCard.is-golden-mode #wheelTitle {
  color: #FFE7A3;
  text-shadow: 0 2px 12px rgba(245, 196, 78, 0.35);
}

body.wheel-only-mode #wheelModalCard.is-golden-mode #wheelLimitText,
body.wheel-only-mode #wheelModalCard.is-golden-mode .wheel-kitchen-sign {
  color: rgba(252, 224, 156, 0.84);
}

body.wheel-only-mode #wheelModalCard.is-golden-mode .wheel-tabs,
body.wheel-only-mode #wheelModalCard.is-golden-mode .vault-bar,
body.wheel-only-mode #wheelModalCard.is-golden-mode .fortune-strip,
body.wheel-only-mode #wheelModalCard.is-golden-mode .checkin-bar,
body.wheel-only-mode #wheelModalCard.is-golden-mode .wheel-legend {
  background: rgba(34, 25, 15, 0.88);
  border-color: rgba(244, 202, 106, 0.32);
}

@media (max-width: 520px) {
  body.wheel-only-mode #wheelModal.wheel-page-stage {
    padding: 14px 10px 42px;
  }
  body.wheel-only-mode #wheelModalCard {
    padding: 44px 15px 18px;
    border-radius: 26px;
  }
  .wb-tl { top: 17px; left: 16px; width: 24px; height: 24px; }
  .wb-tr { top: 18px; right: 17px; width: 19px; height: 19px; }
  .wb-bl { bottom: 17px; left: 17px; width: 23px; height: 23px; }
  .wb-br { bottom: 17px; right: 17px; width: 26px; height: 19px; }
}

/* Exclusive Li Zihan Badge & Unified Rules Tabs */
.zihan-exclusive-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 241, 246, 0.94) 0%, rgba(255, 246, 224, 0.94) 100%);
  border: 1.2px dashed #E8B5C4;
  color: #A05268;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
  box-shadow: 0 3px 8px rgba(176, 108, 128, 0.1);
}

body.wheel-only-mode #wheelModalCard.is-golden-mode .zihan-exclusive-pill {
  background: rgba(255, 224, 140, 0.14);
  border-color: rgba(246, 206, 114, 0.45);
  color: #FFE7A8;
}

.rules-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 14px;
  background: #FFF6E6;
  border: 1.2px solid #EBD4B5;
  flex-shrink: 0;
}

.rules-tabs .tab-btn {
  height: 34px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

/* Unified Kaiti Storybook Typography Across Both Tabs of Rules Modal */
.prob-rules-modal,
.prob-rules-modal .modal-title,
.prob-rules-modal .modal-sub,
.prob-rules-modal .rules-tabs .tab-btn,
.prob-rules-modal .prob-sec-title,
.prob-rules-modal .prob-table,
.prob-rules-modal .prob-table th,
.prob-rules-modal .prob-table td,
.prob-rules-modal .prob-note,
.prob-rules-modal .rules-general-box,
.prob-rules-modal .rules-tier-head,
.prob-rules-modal .rules-fortune-title,
.prob-rules-modal .rules-fortune-poem,
.prob-rules-modal .rules-fortune-explain,
.prob-rules-modal .rules-fortune-effect,
.prob-rules-modal #btnProbRulesOk {
  font-family: "LXGW WenKai", "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", serif;
}

.prob-rules-modal .prob-sec-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.prob-rules-modal .prob-table {
  font-size: 13.5px;
}

.prob-rules-modal .prob-table th {
  font-size: 13px;
  font-weight: 700;
}

.prob-rules-modal .prob-note {
  font-size: 12.8px;
  line-height: 1.62;
}

.prob-rules-modal .rules-general-box,
.prob-rules-modal .rules-fortune-title,
.prob-rules-modal .rules-fortune-poem,
.prob-rules-modal .rules-fortune-effect {
  font-size: 13.5px;
}
