/* =========================================================
   box.html 手機版樣式 — 夢幻寶箱頁面
   ========================================================= */
@media (max-width: 768px) {

  /* ═══════════════════════════════════════════
     1. 卡片基礎 + 關掉 hover 效果
     ═══════════════════════════════════════════ */
  .tb-card {
    cursor: pointer !important;
    position: relative !important;
  }
  .tb-card:hover {
    box-shadow: none !important;
    transform: none !important;
  }
  .tb-card:hover .tb-cover-img {
    transform: none !important;
  }

  /* ═══════════════════════════════════════════
     2. 隱藏元素
     ═══════════════════════════════════════════ */
  .tb-card .tb-corner,               /* 紫色四角框 */
  .tb-card .tb-btn,                  /* 立即開箱按鈕 */
  .tb-card .tb-card-topline,         /* 頂部光條（hover 才顯示）*/
  .tb-card .tb-chest-badge {         /* 右下小寶箱徽章 */
    display: none !important;
  }

  /* ═══════════════════════════════════════════
     3. 頂部金色漸層光條（取代紫色四角框）
     ═══════════════════════════════════════════ */
  .tb-card::before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 15% !important;
    right: 15% !important;
    height: 2.5px !important;
    background: linear-gradient(90deg,
      transparent 0%,
      rgba(205, 127, 50, 0.55) 20%,
      rgba(255, 220, 130, 0.95) 50%,
      rgba(205, 127, 50, 0.55) 80%,
      transparent 100%) !important;
    pointer-events: none !important;
    z-index: 6 !important;
    box-shadow: 0 0 8px rgba(255, 200, 100, 0.4) !important;
    border: none !important;
    width: auto !important;
    transform: none !important;
    animation: none !important;
    opacity: 1 !important;
  }

  /* ═══════════════════════════════════════════
     4. 左側短金線
     ═══════════════════════════════════════════ */
  .tb-card::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 30% !important;
    bottom: 30% !important;
    width: 2px !important;
    background: linear-gradient(180deg,
      transparent,
      rgba(232, 165, 75, 0.85) 40%,
      rgba(232, 165, 75, 0.85) 60%,
      transparent) !important;
    pointer-events: none !important;
    z-index: 7 !important;
    box-shadow: 0 0 6px rgba(232, 165, 75, 0.35) !important;
    background-color: transparent !important;
  }

  /* ═══════════════════════════════════════════
     5. 活動期間 → 右上「期限 M/D」徽章
     ═══════════════════════════════════════════ */
  .tb-card .tb-time-row {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 5 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 3px 8px !important;
    margin: 0 !important;
    background: rgba(7, 7, 12, 0.88) !important;
    border: 1px solid rgba(232, 165, 75, 0.5) !important;
    border-radius: 0 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    color: var(--copper-light) !important;
    line-height: 1.3 !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
    pointer-events: none !important;
  }
  .tb-card .tb-time-icon svg {
    width: 10px !important;
    height: 10px !important;
    fill: var(--copper-light) !important;
  }
  .tb-card .tb-time-text {
    color: var(--copper-light) !important;
    font-size: 10px !important;
  }
  .tb-card .tb-time-text .tb-time-hl {
    color: var(--copper-light) !important;
  }

  /* ═══════════════════════════════════════════
     6. 描述文字 3 行
     ═══════════════════════════════════════════ */
  .tb-card .tb-card-series {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 11px !important;
    color: #999 !important;
    line-height: 1.5 !important;
    margin: 2px 0 6px !important;
    white-space: normal !important;
  }

  /* ═══════════════════════════════════════════
     7. 卡片內容
     ═══════════════════════════════════════════ */
  .tb-body {
    padding: 10px 10px 12px !important;
  }
  #tbGrid .tb-card-title {
    font-size: 15px !important;
    text-align: center !important;
    line-height: 1.35 !important;
    margin-bottom: 6px !important;
    font-weight: 900 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  /* 價格區塊（只保留單抽價格） */
  .tb-card .tb-meta {
    margin-bottom: 6px !important;
    padding: 6px 0 !important;
    border-top: 1px dashed rgba(205,127,50,0.15) !important;
  }
  .tb-card .tb-price {
    font-size: 16px !important;
    gap: 3px !important;
  }
  .tb-card .tb-price-coin {
    width: 18px !important;
    height: 18px !important;
  }

  /* ═══════════════════════════════════════════
     8. 底部導航中間按鈕扁平化
     ═══════════════════════════════════════════ */
  .mobile-bottom-nav .nav-tab.special {
    padding-top: 10px !important;
    overflow: hidden !important;
  }
  .mobile-bottom-nav .nav-tab.special .tab-icon {
    width: 28px !important;
    height: 28px !important;
    margin-top: 0 !important;
    border-radius: 50% !important;
    background: radial-gradient(circle at 30% 28%,
      #fff5c4 0%,
      #f0c848 30%,
      #c88018 70%,
      #8a5010 100%) !important;
    opacity: 1 !important;
    border: 1.5px solid rgba(255, 220, 130, 0.5) !important;
    box-shadow:
      0 0 8px rgba(232, 165, 75, 0.35),
      inset 0 1px 2px rgba(255, 255, 255, 0.45),
      inset 0 -1px 2px rgba(80, 35, 0, 0.3) !important;
    animation: none !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .mobile-bottom-nav .nav-tab.special:active .tab-icon {
    transform: scale(0.88) !important;
  }
  .mobile-bottom-nav .nav-tab.special .tab-label {
    color: var(--copper-light) !important;
    font-weight: 700 !important;
  }
  .mobile-bottom-nav .nav-tab.special::before {
    display: none !important;
  }

  /* ═══════════════════════════════════════════
     9. 卡片懸浮框（bottom sheet）
     ═══════════════════════════════════════════ */
  .card-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10000 !important;
    display: none;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
  }
  .card-modal.open {
    display: flex;
    pointer-events: auto;
  }
  .card-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    animation: cm-fade-in 0.2s ease;
  }
  @keyframes cm-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  .card-modal-panel {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    background: linear-gradient(180deg, var(--panel), var(--bg));
    border-top: 2px solid var(--copper);
    box-shadow: 0 -12px 40px rgba(0,0,0,0.7), 0 -2px 16px rgba(205,127,50,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cm-slide-up 0.28s cubic-bezier(0.4,0,0.2,1);
  }
  @keyframes cm-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
  .card-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    border: 1px solid rgba(232,165,75,0.4);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }
  .card-modal-close:active {
    background: rgba(205,127,50,0.6);
  }
  .card-modal-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .card-modal-cover-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #000;
    overflow: hidden;
  }
  .card-modal-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .card-modal-active-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #34D399;
    background: rgba(52,211,153,0.1);
    border: 1px solid rgba(52,211,153,0.4);
  }
  .card-modal-active-badge .pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34D399;
    box-shadow: 0 0 8px #34D399;
  }
  .card-modal-body {
    padding: 16px 18px 20px;
  }
  .card-modal-category {
    font-size: 12px;
    color: var(--copper-light);
    margin-bottom: 6px;
    letter-spacing: 1px;
  }
  .card-modal-title {
    font-size: 20px;
    font-weight: 900;
    color: var(--ink);
    margin: 0 0 12px;
    font-family: 'Noto Sans TC', sans-serif;
    line-height: 1.3;
  }
  .card-modal-subtitle {
    font-size: 13px;
    color: #aaa;
    line-height: 1.7;
    margin-bottom: 18px;
    white-space: pre-wrap;
  }
  .card-modal-meta {
    border-top: 1px dashed rgba(205,127,50,0.25);
    padding-top: 12px;
  }
  .card-modal-meta .meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size: 13px;
  }
  .card-modal-meta .meta-label {
    color: #888;
    letter-spacing: 1px;
  }
  .card-modal-meta .meta-value {
    color: var(--ink);
    font-weight: 700;
  }
  .card-modal-meta .meta-value.price {
    color: var(--copper-light);
    font-weight: 900;
    font-size: 16px;
    font-family: 'Outfit', serif;
  }
  .card-modal-go-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: linear-gradient(135deg, var(--copper), var(--copper-light));
    color: #07070c;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 3px;
    text-decoration: none;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
    font-family: 'Noto Sans TC', sans-serif;
  }
  .card-modal-go-btn:active {
    filter: brightness(1.15);
  }

} /* ← 結束 @media (max-width: 768px) */