.woven-adventures-app,
.woven-adventures-app * {
      box-sizing: border-box;
    }
.woven-adventures-app {
      background: radial-gradient(circle at 50% 35%, #181c2b 0%, #0e111a 60%, #07080d 100%) !important;
      color: #f1f5f9;
      min-height: 100vh;
      width: 100%;
      margin: 0 auto;
      padding: 0;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      -webkit-font-smoothing: antialiased;
      overflow-x: hidden;
    }

    .tabletop-wrapper {
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start !important;
      padding-top: max(48px, 6vh) !important;
      padding: 30px 16px 50px 16px;
      perspective: 1200px;
      position: relative;
    }

    /* ======================================================== */
    /* 3D GAME BOX INTRO STAGE                                  */
    /* ======================================================== */
    .unboxing-stage {
      position: relative;
      width: 420px;
      height: 480px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
      z-index: 10;
    }

    .unboxing-stage.dismissed {
      opacity: 0;
      pointer-events: none;
      transform: translateY(80px) scale(0.85);
      position: absolute;
    }

    .box-container {
      position: relative;
      width: 360px;
      height: 462px;
      cursor: pointer;
      transform-style: preserve-3d;
      transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .box-container:hover {
      transform: translateY(-8px) scale(1.02);
    }
    .box-container svg {
      width: 100%;
      height: 100%;
      overflow: visible;
    }
    .btn-open-box {
      position: absolute;
      bottom: 24px;
      z-index: 20;
      background: linear-gradient(135deg, #2563eb, #1d4ed8);
      border: 1px solid rgba(255, 255, 255, 0.25);
      color: #ffffff;
      padding: 10px 24px;
      border-radius: 30px;
      font-size: 13.5px;
      font-weight: 800;
      letter-spacing: 1px;
      text-transform: uppercase;
      box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: all 0.25s ease;
      animation: pulseBtn 1.8s infinite;
    }
    .box-container.opening .btn-open-box {
      opacity: 0;
      transform: scale(0.8);
      pointer-events: none;
    }

    .box-container:hover {
      transform: translateY(-8px) rotateX(4deg);
    }

    /* Box Cover Art */
    .box-lid {
      width: 100%;
      height: 100%;
      border-radius: 16px;
      background: linear-gradient(145deg, #1e293b, #0f172a);
      border: 2px solid #3b82f6;
      box-shadow: 
        0 30px 70px rgba(0, 0, 0, 0.85),
        0 0 35px rgba(59, 130, 246, 0.25);
      overflow: hidden;
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: space-between;
      padding: 24px 20px;
      transition: all 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
      z-index: 5;
    }

    .box-lid img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      position: absolute;
      top: 0;
      left: 0;
      opacity: 0.95;
    }

    .box-lid-overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, rgba(15, 23, 42, 0.2) 0%, rgba(15, 23, 42, 0.8) 100%);
      z-index: 2;
    }

    .box-branding {
      position: relative;
      z-index: 3;
      text-align: center;
    }

    .box-game-title {
      font-size: 26px;
      font-weight: 900;
      letter-spacing: 2px;
      color: #ffffff;
      text-transform: uppercase;
      text-shadow: 0 3px 12px rgba(0, 0, 0, 0.8);
      margin-bottom: 4px;
    }

    .box-subtitle {
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 3px;
      color: #93c5fd;
      text-transform: uppercase;
    }

    .box-glow {
      position: absolute;
      inset: 0;
      border-radius: 16px;
      background: radial-gradient(circle at center, rgba(59, 130, 246, 0.35) 0%, transparent 70%);
      opacity: 0;
      transition: opacity 0.5s ease;
      pointer-events: none;
    }

    /* Open Action Button on Box */
    .btn-open-box {
      position: relative;
      z-index: 4;
      background: linear-gradient(135deg, #2563eb, #1d4ed8);
      border: 1px solid #60a5fa;
      color: #ffffff;
      padding: 10px 24px;
      border-radius: 30px;
      font-size: 14px;
      font-weight: 800;
      letter-spacing: 1px;
      text-transform: uppercase;
      box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: all 0.25s ease;
      animation: pulseBtn 1.8s infinite;
    }

    @keyframes pulseBtn {
      0%, 100% { transform: scale(1); box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5); }
      50% { transform: scale(1.05); box-shadow: 0 12px 35px rgba(37, 99, 235, 0.75); }
    }

    /* Unboxing Animation Trigger States */
    .box-container.opening .box-lid {
      transform: translateY(-120px) rotateX(45deg) scale(0.92);
      opacity: 0;
    }

    .box-container.opening .box-glow {
      opacity: 1;
    }

    /* ======================================================== */
    /* PLAY STAGE (THE CARD THAT EMERGES)                       */
    /* ======================================================== */
    .play-stage {
      display: none;
      flex-direction: column;
      align-items: center;
      width: 100%;
      opacity: 0;
      pointer-events: none;
      transform: translateY(30px) scale(0.92);
      transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .play-stage.active {
      display: flex !important;
      opacity: 1;
      pointer-events: auto;
      transform: translateY(0) scale(1);
    }

    /* Top Controls Bar */
    .controls-bar {
      display: flex;
      gap: 12px;
      margin-bottom: 20px;
      align-items: center;
    }

    .btn-action {
      background: #1e2538;
      border: 1px solid #2f3b59;
      color: #e2e8f0;
      padding: 8px 18px;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: all 0.2s ease;
    }

    .btn-action:hover {
      background: #2a3450;
      border-color: #3b82f6;
      color: #ffffff;
      transform: translateY(-1px);
    }

    .btn-read {
      background: #2563eb;
      border-color: #3b82f6;
      color: #ffffff;
    }
    .btn-read:hover {
      background: #1d4ed8;
    }

    .reading-indicator {
      font-size: 13px;
      color: #94a3b8;
      display: flex;
      align-items: center;
      gap: 6px;
      transition: opacity 0.25s ease;
    }
    .reading-indicator:has(#status-text:empty) {
      opacity: 0;
      pointer-events: none;
    }
    .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #64748b;
    }
    .status-dot.active {
      background: #22c55e;
      box-shadow: 0 0 8px #22c55e;
      animation: pulseDot 1.2s infinite;
    }
    @keyframes pulseDot {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.5; transform: scale(1.3); }
    }

    /* 3D TWO-SIDED CARD FLIPPER STAGE (NATURAL PROPORTIONAL 440x535 MATCHING AUTHENTIC ART RATIO 1.215) */
    .card-flipper-stage {
      perspective: 2000px;
      width: 480px;
      height: 585px;
      position: relative;
      margin: 0 auto;
      flex-shrink: 0;
    }

    .game-card-3d-wrapper {
      position: relative;
      width: 480px;
      height: 585px;
      transform-style: preserve-3d;
      transition: transform 1.15s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .game-card-3d-wrapper.flipped-to-front {
      transform: rotateY(180deg);
    }

    .card-face {
      width: 480px;
      height: 585px;
      border-radius: 16px;
      overflow: hidden;
      backface-visibility: hidden;
      -webkit-backface-visibility: hidden;
      box-shadow: 
        0 22px 60px rgba(0, 0, 0, 0.88),
        0 8px 20px rgba(0, 0, 0, 0.65);
      user-select: none;
    }

    /* FACE 1: 100% PURE AUTHENTIC CARD BACK #28 (PROPORTIONAL ARTWORK, ZERO OVERLAYS) */
    .card-face-back {
      position: relative;
      width: 480px;
      height: 585px;
      background: url('../images/back_28_proportional_web.webp') center / cover no-repeat;
      transform: rotateY(0deg);
      border-radius: 16px;
      overflow: hidden;
    }

    /* Diamond Hotspots: centered directly on the printed purple diamonds on the card art */
    .diamond-hotspot {
      position: absolute;
      width: 10.6%;
      aspect-ratio: 1;
      transform: translate(-50%, -50%) rotate(45deg);
      border-radius: 3px;
      cursor: default;
      pointer-events: auto;
      transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .diamond-hotspot.interactive {
      cursor: pointer;
    }

    .diamond-hotspot.interactive:hover {
      border: none !important;
      background: transparent !important;
      box-shadow: none !important;
      transform: translate(-50%, -50%) rotate(45deg) scale(1.08) !important;
    }

    .diamond-hotspot.active-target {
      border: 2px solid rgba(255, 255, 255, 0.95);
      background: rgba(255, 255, 255, 0.12);
      box-shadow: 0 0 12px rgba(255, 255, 255, 0.8), inset 0 0 4px rgba(255, 255, 255, 0.35);
      animation: diamondGlowPulse 1.8s infinite ease-in-out;
      transform: translate(-50%, -50%) rotate(45deg) scale(1.02);
    }

    .diamond-hotspot.active-target:hover {
      border: 2px solid #ffffff !important;
      background: rgba(255, 255, 255, 0.2) !important;
      box-shadow: 0 0 18px rgba(255, 255, 255, 1) !important;
      transform: translate(-50%, -50%) rotate(45deg) scale(1.06) !important;
    }

    .diamond-hotspot.filled {
      border: 2px solid #22c55e !important;
      background: rgba(34, 197, 94, 0.22) !important;
      box-shadow: 0 0 10px rgba(34, 197, 94, 0.65) !important;
      transform: translate(-50%, -50%) rotate(45deg);
    }

    /* FACE 2: CARD FRONT ("THE HOLE" NARRATIVE STORY) */
    .card-face-front {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      transform: rotateY(180deg);
      background: #f8f6ed;
      border-radius: 16px;
    }

    .game-card {
      width: 100%;
      height: 100%;
      background: #f8f6ed;
      border-radius: 16px;
      overflow: hidden;
      position: relative;
      user-select: none;
    }

    .card-header {
      width: 100%;
      height: 52px;
      position: relative;
      background: linear-gradient(180deg, #2d3e7d 0%, #1e2b5e 55%, #151f46 100%);
      border-bottom: 2px solid #101838;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: inset 0 -2px 6px rgba(0, 0, 0, 0.3);
    }

    .card-title {
      color: #ffffff;
      font-size: 16px;
      font-weight: 800;
      letter-spacing: 2px;
      text-transform: uppercase;
      text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
    }

    .card-body {
      padding: 14px 22px 14px 22px;
      color: #1a1e24;
      font-size: 13.2px;
      line-height: 1.5;
      font-weight: 500;
      letter-spacing: -0.01px;
      word-spacing: 0.4px;
      height: calc(100% - 52px);
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      gap: 5px;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
      scrollbar-width: thin;
      scrollbar-color: rgba(30, 58, 138, 0.25) transparent;
    }

    .card-body::-webkit-scrollbar {
      width: 4px;
    }

    .card-body::-webkit-scrollbar-thumb {
      background: rgba(30, 58, 138, 0.25);
      border-radius: 4px;
    }

    .narrative-block {
      margin-bottom: 2px;
      line-height: 1.5;
      text-align: left;
    }

    .choice-block {
      display: flex;
      align-items: flex-start;
      gap: 9px;
      margin: 4px 0;
      line-height: 1.46;
      padding: 3px 8px;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.25s ease;
      border-left: 3px solid transparent;
      user-select: none;
    }

    .choice-block:hover {
      background: rgba(0, 0, 0, 0.04);
    }

    .choice-block.branch-selected.choice-green {
      background: rgba(57, 108, 86, 0.08);
      border-left-color: #396c56;
      opacity: 1 !important;
      filter: none !important;
    }

    .choice-block.branch-selected.choice-red {
      background: rgba(183, 50, 50, 0.08);
      border-left-color: #b73232;
      opacity: 1 !important;
      filter: none !important;
    }

    .choice-block.branch-dimmed {
      opacity: 0.38;
      filter: grayscale(0.5);
    }

    .choice-block.branch-selected .choice-arrow {
      transform: scale(1.25);
      filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
    }

    .choice-arrow {
      flex-shrink: 0;
      margin-top: 5px;
      width: 9px;
      height: 11px;
    }

    .arrow-green { fill: #396c56; }
    .arrow-red { fill: #b73232; }

    .choice-content {
      flex: 1;
      line-height: 1.74;
      text-align: left;
    }

    
    .blank-slot {
      display: inline-flex !important;
      align-items: baseline !important;
      vertical-align: baseline !important;
      cursor: pointer !important;
      margin: 0 2px !important;
      position: relative !important;
      transition: transform 0.15s ease !important;
    }

    .blank-slot:hover {
      transform: translateY(-1px) !important;
    }

    .blank-slot:hover .blank-input {
      border-bottom-color: #3b82f6 !important;
      background: rgba(59, 130, 246, 0.18) !important;
      box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25) !important;
    }

    .blank-input {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      font-family: inherit !important;
      font-size: 13.5px !important;
      font-weight: 700 !important;
      color: #1e3a8a !important;
      background: rgba(37, 99, 235, 0.08) !important;
      border: none !important;
      border-bottom: 2px solid #212429 !important;
      border-radius: 3px 3px 0 0 !important;
      outline: none !important;
      width: auto !important;
      min-width: 40px !important;
      height: 22px !important;
      padding: 0 6px !important;
      text-align: center !important;
      line-height: 22px !important;
      vertical-align: baseline !important;
      box-sizing: border-box !important;
      white-space: nowrap !important;
      letter-spacing: 0.3px !important;
      user-select: none !important;
      -webkit-user-select: none !important;
      transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
    }

    .blank-input:empty::before {
      content: '\00a0' !important;
      display: inline-block !important;
      width: 24px !important;
    }

    .blank-input.filled {
      color: #1d4ed8 !important;
      border-bottom: 2px solid #2563eb !important;
      background: rgba(37, 99, 235, 0.12) !important;
    }

    .blank-input.highlight-bounce {
      background: rgba(37, 99, 235, 0.3) !important;
      color: #1d4ed8 !important;
      border-bottom-color: #2563eb !important;
      box-shadow: 0 0 12px rgba(37, 99, 235, 0.4) !important;
      transform: none !important;
    }

    .stat-badge {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      padding: 1px 6px;
      border-radius: 4px;
      color: #ffffff;
      font-size: 11.2px;
      font-weight: 800;
      letter-spacing: 0.3px;
      vertical-align: middle;
      margin-left: 4px;
      line-height: 1.25;
    }

    .badge-red { background-color: #b73232; }
    .badge-green { background-color: #396c56; }

    .badge-icon {
      width: 9px;
      height: 9px;
      fill: #ffffff;
      display: inline-block;
    }

    .word-unit {
      display: inline-block;
      transition: background-color 0.16s ease, color 0.16s ease;
      border-radius: 3px;
      padding: 0 1px;
    }

    .word-unit.reading-bounce {
      color: #1d4ed8 !important;
      background: rgba(37, 99, 235, 0.2) !important;
      font-weight: 700;
      text-shadow: none;
      transform: none !important;
    }

    /* TABLETOP PLAY AREA: CARD ON LEFT, OPTIONS ON RIGHT */
    .tabletop-play-area {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      gap: 44px;
      width: 100%;
      max-width: 1120px;
      margin: 0 auto;
      padding: 10px 20px 24px 20px;
    }

    .player-dock {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: auto;
      transition: all 0.5s ease;
    }

    .cards-row {
      display: grid;
      grid-template-columns: repeat(2, 175px);
      gap: 18px;
      justify-content: center;
      align-items: center;
      width: auto;
    }

    .play-card {
      width: 175px;
      height: 175px;
      border-radius: 14px;
      cursor: pointer;
      position: relative;
      background: #110d24;
      border: 1.5px solid rgba(255, 255, 255, 0.16);
      padding: 0;
      overflow: visible; /* Allows slices to expand outward on hover! */
      box-shadow: 0 12px 28px rgba(0, 0, 0, 0.75), 0 2px 6px rgba(0, 0, 0, 0.5);
      transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
      animation: popInCard 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    }

    .play-card:hover {
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(255, 255, 255, 0.3);
      border-color: rgba(255, 255, 255, 0.4);
      z-index: 15;
    }

    .card-slices-wrapper {
      position: relative;
      width: 100%;
      height: 100%;
      border-radius: 12px;
      overflow: visible;
    }

    /* 4 Triangular Card Slices */
    .card-slice {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      border-radius: 12px;
      cursor: pointer;
      transition: transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease, opacity 0.25s ease;
      will-change: transform, filter;
    }

    .card-slice img.slice-img {
      width: 100%;
      height: 100%;
      display: block;
      object-fit: cover;
      border-radius: 12px;
      pointer-events: none;
    }

    /* Slicing Polygons: 4 Quadrants meeting at the center point (50% 50%) */
    .slice-top {
      clip-path: polygon(0% 0%, 100% 0%, 50% 50%);
      transform-origin: 50% 25%;
    }

    .slice-right {
      clip-path: polygon(100% 0%, 100% 100%, 50% 50%);
      transform-origin: 75% 50%;
    }

    .slice-bottom {
      clip-path: polygon(100% 100%, 0% 100%, 50% 50%);
      transform-origin: 50% 75%;
    }

    .slice-left {
      clip-path: polygon(0% 100%, 0% 0%, 50% 50%);
      transform-origin: 25% 50%;
    }

    /* Active Target Choice Slice: Full white illumination with soft pulsing glow */
    .card-slice.slice-active {
      z-index: 6;
      filter: brightness(1.2) contrast(1.1) drop-shadow(0 0 10px rgba(255, 255, 255, 0.95));
      opacity: 1;
      animation: pulseWhiteGlow 2.2s infinite ease-in-out;
    }

    @keyframes pulseWhiteGlow {
      0%, 100% {
        filter: brightness(1.15) contrast(1.08) drop-shadow(0 0 8px rgba(255, 255, 255, 0.85));
      }
      50% {
        filter: brightness(1.35) contrast(1.15) drop-shadow(0 0 16px rgba(255, 255, 255, 1));
      }
    }

    /* Dimmed / Inactive Slices: Darkened down just enough so they get the point */
    .card-slice.slice-dimmed {
      z-index: 2;
      filter: brightness(0.72) saturate(0.85);
      opacity: 0.88;
    }

    /* Interactive Slice Hover: Pop forward, get bigger & light up in pure white! */
    .card-slice:hover {
      z-index: 30 !important;
      opacity: 1 !important;
      filter: brightness(1.3) contrast(1.15) drop-shadow(0 0 18px rgba(255, 255, 255, 1)) drop-shadow(0 8px 25px rgba(0, 0, 0, 0.85)) !important;
    }

    .card-slice.slice-top:hover {
      transform: scale(1.24) translateY(-10px);
    }

    .card-slice.slice-right:hover {
      transform: scale(1.24) translateX(10px);
    }

    .card-slice.slice-bottom:hover {
      transform: scale(1.24) translateY(10px);
    }

    .card-slice.slice-left:hover {
      transform: scale(1.24) translateX(-10px);
    }

    .dock-actions-row {
      display: flex;
      gap: 12px;
      width: 100%;
      justify-content: center;
      margin-top: 4px;
    }

    .btn-dock-autofill {
      background: rgba(30, 41, 59, 0.85);
      border: 1px solid rgba(251, 191, 36, 0.4);
      color: #fef08a;
      padding: 8px 16px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 800;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .btn-dock-autofill:hover {
      background: rgba(51, 65, 85, 0.95);
      border-color: #fbbf24;
      transform: translateY(-1px);
    }

    .btn-dock-flip {
      background: linear-gradient(135deg, #f59e0b 0%, #d97706 60%, #b45309 100%);
      border: 1.5px solid #fef08a;
      color: #ffffff;
      padding: 9px 24px;
      border-radius: 20px;
      font-size: 12.5px;
      font-weight: 900;
      letter-spacing: 0.8px;
      text-transform: uppercase;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 8px;
      box-shadow: 0 8px 20px rgba(245, 158, 11, 0.45);
      transition: all 0.25s ease;
    }

    .btn-dock-flip:hover:not(:disabled) {
      transform: translateY(-2px) scale(1.04);
      box-shadow: 0 12px 28px rgba(245, 158, 11, 0.7);
    }

    .btn-dock-flip:disabled {
      opacity: 0.35;
      cursor: not-allowed;
      box-shadow: none;
      filter: grayscale(0.8);
    }

    .btn-dock-flip.ready-glow {
      animation: pulseGoldGlow 1.4s infinite;
    }

    .flying-token {
      position: fixed;
      z-index: 9999;
      pointer-events: none;
      background: #2563eb;
      color: #ffffff;
      padding: 5px 12px;
      border-radius: 6px;
      font-size: 13.5px;
      font-weight: 800;
      letter-spacing: 0.5px;
      box-shadow: 0 14px 30px rgba(37, 99, 235, 0.7);
      transition: all 0.52s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    }
  
    .view-panel {
      display: none;
      width: 100%;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
    .view-panel.active {
      display: flex;
    }
    .vector-viewer-frame {
      max-width: 620px;
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;
    }
    .viewer-toolbar {
      display: flex;
      gap: 12px;
      margin-bottom: 8px;
    }
    .viewer-btn {
      background: #1e293b;
      border: 1px solid #334155;
      color: #e2e8f0;
      padding: 7px 16px;
      border-radius: 8px;
      font-size: 12.5px;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .viewer-btn:hover {
      background: #334155;
      color: #ffffff;
    }

  
    /* ======================================================== */
    /* AUTHENTIC WRAPPED GAME BOX (CLEAN 2D WRAPPED PRESENTATION) */
    /* ======================================================== */
    .unboxing-stage {
      position: relative;
      width: 480px;
      height: 600px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
      z-index: 20;
    }

    .unboxing-stage.dismissed {
      opacity: 0;
      pointer-events: none;
      transform: translateY(60px) scale(0.92);
      position: absolute;
    }

    .box-wrapper {
      position: relative;
      width: 360px;
      height: 548px; /* Exact 614:936 authentic box aspect ratio */
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .box-wrapper:hover {
      transform: translateY(-8px);
    }

    /* Ambient tabletop ground shadow */
    .tabletop-ambient-shadow {
      position: absolute;
      bottom: -22px;
      width: 345px;
      height: 56px;
      background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.45) 50%, transparent 75%);
      filter: blur(14px);
      pointer-events: none;
      transition: transform 0.4s ease, opacity 0.4s ease;
    }

    .box-wrapper:hover .tabletop-ambient-shadow {
      transform: scale(1.08) translateY(4px);
      opacity: 0.95;
    }

    /* Authentic Wrapped Box Lid (Clean physical board game wrap) */
    .box-lid-wrapped {
      position: absolute;
      inset: 0;
      border-radius: 12px;
      overflow: hidden;
      box-shadow: 
        0 28px 70px -10px rgba(0, 0, 0, 0.88),
        0 14px 30px -6px rgba(0, 0, 0, 0.65),
        inset 0 1px 1px rgba(255, 255, 255, 0.55),
        inset 0 -2px 3px rgba(0, 0, 0, 0.45),
        0 0 0 1.5px rgba(255, 255, 255, 0.14);
      background: #1e092b;
      transition: transform 0.85s cubic-bezier(0.2, 0.9, 0.3, 1.2), opacity 0.75s ease, box-shadow 0.85s ease;
      z-index: 10;
    }

    .box-cover-art {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      border-radius: 12px;
    }

    /* Wrapped paper sheen & bevel rim */
    .box-wrap-sheen {
      position: absolute;
      inset: 0;
      border-radius: 12px;
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.02) 38%, transparent 60%, rgba(0, 0, 0, 0.22) 100%);
      pointer-events: none;
    }

    .box-wrap-rim {
      position: absolute;
      inset: 0;
      border-radius: 12px;
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), inset 0 2px 4px rgba(255, 255, 255, 0.22);
      pointer-events: none;
    }

    /* Flush Card Deck Base underneath - Sitting level and proud, NOT sunken into a hole or tray! */
    .deck-flush-base {
      position: absolute;
      width: 340px;
      height: 528px;
      border-radius: 10px;
      background: #170726;
      box-shadow: 
        0 16px 45px rgba(0, 0, 0, 0.85),
        0 0 25px rgba(168, 85, 247, 0.45);
      border: 1.5px solid rgba(192, 132, 252, 0.65);
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 5;
      transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.85s ease;
    }

    .deck-top-card {
      width: 100%;
      height: 100%;
      position: relative;
    }

    .deck-card-image {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    /* Unboxing Animation */
    .box-wrapper.opening .box-lid-wrapped {
      transform: translateY(-115px) scale(1.05);
      opacity: 0;
      box-shadow: 0 45px 95px rgba(0, 0, 0, 0.95);
      pointer-events: none;
    }

    .box-wrapper.opening .deck-flush-base {
      transform: translateY(-15px) scale(1.03);
      box-shadow: 0 25px 65px rgba(0, 0, 0, 0.85), 0 0 35px rgba(168, 85, 247, 0.65);
    }

    .box-wrapper.opening .btn-open-3d {
      opacity: 0;
      transform: scale(0.85);
      pointer-events: none;
    }

    .btn-open-3d {
      position: absolute;
      bottom: -62px;
      background: linear-gradient(135deg, #a855f7 0%, #7e22ce 50%, #3b82f6 100%);
      border: 1.5px solid rgba(254, 240, 138, 0.65);
      color: #ffffff;
      padding: 11px 28px;
      border-radius: 30px;
      font-size: 13.5px;
      font-weight: 800;
      letter-spacing: 1.4px;
      text-transform: uppercase;
      box-shadow: 0 10px 28px rgba(168, 85, 247, 0.55), 0 0 20px rgba(234, 179, 8, 0.3);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      transition: all 0.25s ease;
      z-index: 25;
    }

    .btn-open-3d:hover {
      transform: translateY(-2px) scale(1.05);
      box-shadow: 0 14px 36px rgba(168, 85, 247, 0.75), 0 0 25px rgba(234, 179, 8, 0.5);
    }

    /* Persistent Buy Now (Matching Purple, No Glow, Square with Rounded Edges, Scales on Hover) */
    .btn-buy-now {
      position: fixed !important;
      top: 18px !important;
      right: 24px !important;
      z-index: 999999 !important;
      display: inline-flex !important;
      align-items: center !important;
      gap: 8px !important;
      background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%) !important;
      color: #ffffff !important;
      font-family: inherit !important;
      font-size: 13px !important;
      font-weight: 700 !important;
      letter-spacing: 0.8px !important;
      text-transform: uppercase !important;
      text-decoration: none !important;
      padding: 10px 22px !important;
      border-radius: 9999px !important;
      box-shadow: 0 4px 20px rgba(168, 85, 247, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.2) inset !important;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
      cursor: pointer !important;
    }
    body.admin-bar .btn-buy-now {
      top: 52px !important;
    }

    .btn-buy-now:hover {
      transform: scale(1.08);
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
      color: #ffffff !important;
    }

    body.admin-bar .btn-buy-now {
      position: fixed !important;
      top: 18px !important;
      right: 24px !important;
      z-index: 999999 !important;
      display: inline-flex !important;
      align-items: center !important;
      gap: 8px !important;
      background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%) !important;
      color: #ffffff !important;
      font-family: inherit !important;
      font-size: 13px !important;
      font-weight: 700 !important;
      letter-spacing: 0.8px !important;
      text-transform: uppercase !important;
      text-decoration: none !important;
      padding: 10px 22px !important;
      border-radius: 9999px !important;
      box-shadow: 0 4px 20px rgba(168, 85, 247, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.2) inset !important;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
      cursor: pointer !important;
    }
    body.admin-bar .btn-buy-now {
      top: 52px !important;
    }

    body.admin-bar .tabletop-wrapper {
      min-height: calc(100vh - 32px) !important;
    }

    /* DARK TABLETOP THEME */
    html, body {
      background-color: #07080d !important;
      background: radial-gradient(circle at 50% 35%, #181c2b 0%, #0e111a 60%, #07080d 100%) !important;
      color: #f1f5f9 !important;
      min-height: 100vh;
      height: auto !important;
      margin: 0;
      padding: 0;
      overflow-x: hidden !important;
      overflow-y: auto !important; /* Enable natural page scroll */
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      -webkit-font-smoothing: antialiased;
    }

    .tabletop-wrapper {
      min-height: 100vh !important;
      height: auto !important;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start !important;
      padding-top: max(48px, 6vh) !important;
      background: transparent !important;
      box-sizing: border-box;
      overflow-x: hidden !important;
      overflow-y: visible !important;
      padding: 40px 16px 80px 16px !important;
    }

    /* CARD CONTAINER: Authentic Unsquished 480x585 Proportions */
    .card-flipper-stage {
      width: 480px;
      height: 585px;
      perspective: 1200px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto;
    }

    .game-card-3d-wrapper {
      width: 480px;
      height: 585px;
      position: relative;
      transform-style: preserve-3d;
      transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .card-face-back {
      position: absolute;
      inset: 0;
      width: 480px;
      height: 585px;
      background: url('../images/back_28_proportional_web.webp') center / 100% 100% no-repeat !important;
      transform: rotateY(0deg);
      border-radius: 18px;
      overflow: hidden;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 0, 0, 0.5);
      border: 1px solid rgba(255, 255, 255, 0.12);
    }

    .card-face-front {
      position: absolute;
      inset: 0;
      width: 480px;
      height: 585px;
      transform: rotateY(180deg);
      border-radius: 18px;
      overflow: hidden;
      backface-visibility: hidden;
      background: #f8f6ed;
    }

    /* CLEAN, AUTHENTIC DIAMOND HOTSPOTS - SNUG 10.6% FIT TO PRINTED DIAMOND ART */
    .diamond-hotspot {
      position: absolute;
      width: 10.6%;
      aspect-ratio: 1;
      transform: translate(-50%, -50%) rotate(45deg);
      border-radius: 3px;
      cursor: pointer;
      pointer-events: auto;
      border: none !important;
      background: transparent !important;
      box-shadow: none !important;
      transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    /* Hover State: Subtle clean expansion */
    .diamond-hotspot:hover {
      transform: translate(-50%, -50%) rotate(45deg) scale(1.08) !important;
    }

    /* Active Target Diamond: Crisp, snug white glowing halo matching authentic artwork */
    .diamond-hotspot.active-target {
      border: 2px solid rgba(255, 255, 255, 0.95) !important;
      background: rgba(255, 255, 255, 0.12) !important;
      box-shadow: 0 0 12px rgba(255, 255, 255, 0.8), inset 0 0 4px rgba(255, 255, 255, 0.35) !important;
      animation: diamondGlowPulse 1.8s infinite ease-in-out;
      transform: translate(-50%, -50%) rotate(45deg) scale(1.02);
    }

    @keyframes diamondGlowPulse {
      0%, 100% {
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.75), inset 0 0 3px rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.9);
      }
      50% {
        box-shadow: 0 0 18px rgba(255, 255, 255, 1), inset 0 0 8px rgba(255, 255, 255, 0.55);
        border-color: #ffffff;
      }
    }

    /* Filled Diamond: Clean emerald green completion */
    .diamond-hotspot.filled {
      border: 2px solid #22c55e !important;
      background: rgba(34, 197, 94, 0.22) !important;
      box-shadow: 0 0 10px rgba(34, 197, 94, 0.65) !important;
      transform: translate(-50%, -50%) rotate(45deg);
    }

/* ======================================================== */
/* MOBILE & TABLET RESPONSIVE: 2x2 CARDS & FLUID TABLETOP   */
/* ======================================================== */
@media (max-width: 1024px) {
  html, body {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh !important;
  }

  .tabletop-wrapper {
    min-height: auto !important;
    height: auto !important;
    padding: 16px 12px 60px 12px !important;
    overflow-y: visible !important;
  }

  /* Unboxing stage scales down to fit viewport */
  .unboxing-stage {
    width: 100% !important;
    max-width: 360px !important;
    height: auto !important;
    min-height: 500px !important;
  }

  .box-wrapper {
    max-width: 90vw !important;
    transform-origin: center center;
  }

  /* Vertical stack on mobile/tablet: Story card on top, 2x2 cards hand below */
  .tabletop-play-area {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 18px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 6px 6px 36px 6px !important;
  }

  /* Fluid proportional story card - Exact 480x585 natural ratio */
  .card-flipper-stage {
    width: min(88vw, 360px) !important;
    height: calc(min(88vw, 360px) * (585 / 480)) !important;
    max-width: 380px !important;
    margin: 0 auto !important;
    transition: height 0.4s ease;
  }

  .card-flipper-stage.show-front {
    height: min(560px, calc(100vh - 120px)) !important;
  }

  .game-card-3d-wrapper,
  .card-face-back,
  .card-face-front {
    width: 100% !important;
    height: 100% !important;
  }

  .card-body {
    padding: 12px 16px 16px 16px !important;
    font-size: 12.2px !important;
    line-height: 1.45 !important;
    gap: 4px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
  }

  .narrative-block {
    margin-bottom: 2px !important;
    line-height: 1.45 !important;
  }

  .choice-block {
    margin: 3px 0 !important;
    line-height: 1.42 !important;
  }

  /* 2x2 Mobile Grid for Word Cards */
  .player-dock {
    width: 100% !important;
    max-width: 340px !important;
    margin: 0 auto !important;
    padding: 0 2px !important;
  }

  .cards-row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    grid-template-rows: repeat(2, auto) !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 330px !important;
    margin: 0 auto !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .play-card {
    width: 100% !important;
    max-width: 155px !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    margin: 0 auto !important;
  }
}

@media (max-width: 480px) {
  .btn-buy-now {
      position: fixed !important;
      top: 18px !important;
      right: 24px !important;
      z-index: 999999 !important;
      display: inline-flex !important;
      align-items: center !important;
      gap: 8px !important;
      background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%) !important;
      color: #ffffff !important;
      font-family: inherit !important;
      font-size: 13px !important;
      font-weight: 700 !important;
      letter-spacing: 0.8px !important;
      text-transform: uppercase !important;
      text-decoration: none !important;
      padding: 10px 22px !important;
      border-radius: 9999px !important;
      box-shadow: 0 4px 20px rgba(168, 85, 247, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.2) inset !important;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
      cursor: pointer !important;
    }
    body.admin-bar .btn-buy-now {
      top: 52px !important;
    }

  .card-flipper-stage {
    width: min(92vw, 320px) !important;
    height: calc(min(92vw, 320px) * (585 / 480)) !important;
  }

  .card-flipper-stage.show-front {
    height: min(530px, calc(100vh - 100px)) !important;
  }

  .card-body {
    padding: 10px 14px 14px 14px !important;
    font-size: 11.5px !important;
    line-height: 1.42 !important;
  }

  .cards-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    max-width: 290px !important;
  }

  .play-card {
    max-width: 140px !important;
  }
}
