/* ==========================================================================
   章节票根（Chapter Ticket）—— 全站唯一样式源（2026-10-28）
   --------------------------------------------------------------------------
   使用方：store.html（COLLECTIONS 列表）、checkout.html（兑换码预览）
   结构来源：Figma Group 552 / Group 128
   信息一律来自 products 表（VOL / SERIES / ARCHIVE / EDITION / 配色），
   改产品信息只改数据库；**改样式只改这一个文件**。

   注意：本文件必须在这两个页面的主样式之后加载，
        且不包含任何「页面专属」的覆盖（那些留在各自页面里）。
   ========================================================================== */

.chapter-ticket-card {
      position: relative;
      width: 100%;
      height: 94px;
      border-radius: 6px;
      padding: 7px 12px 6px 12px;
      box-sizing: border-box;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      cursor: pointer;
      overflow: hidden;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
      transition: transform 0.18s ease, box-shadow 0.18s ease;
      user-select: none;
      -webkit-user-select: none;
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      forced-color-adjust: none !important;
      -webkit-forced-color-adjust: none !important;
      color-scheme: only light !important;
    }

    .chapter-ticket-card:active {
      transform: scale(0.985);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }

    /* TOP MOMENTS → GET THIS MOMENT 跳过来的落点提示（用户 2026-10-17）：
       用户否掉了内圈描边框 —— 改成「票根稍微放大，然后往上抬一下」。
        只做纵向（scaleY），不能做等比 scale：.chapter-pager 是 overflow-x: auto 的
         横向滚动容器，卡片往左/右涨出去的体积属于「负向/正向溢出」，前者根本滚不回来，
         实测 scale(1.06) 左边会被切掉 8px，看着就是被裁。
       纵向这点余量由 .chapter-pager 的 padding: 10px 0 提供（见其上）。
       基础样式里有 transition: transform .18s ease，所以加/去 class 都是平滑的。 */
    .chapter-ticket-card.is-jump-target {
      z-index: 3;
    }
    .chapter-ticket-card.is-jump-target.is-lifted {
      transform: translateY(-4px) scaleY(1.08);
    }
    .chapter-ticket-card.is-jump-target:not(.is-lifted) {
      transform: scaleY(1.08);
    }

    /* Series 02 upper dark color band (Figma layout_53fc5a70: height 46.5px) */
    .chapter-ticket-card .ct-upper-band {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 46.5px;
      pointer-events: none;
      z-index: 0;
    }

    /* 票根代码底纹 (DiNERBOX 标志性算法代码水印，1:1 严格参考 Figma Group 552 Group 128 排版) */
    .chapter-ticket-card .ct-code-texture {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: 0;
      /* 2026-10-26：底纹色可由 pattern_color 指定；未指定时沿用「文字色 30%」
         （by JS 内联 --ct-pattern 覆盖，见 chapterTicketHTML） */
      opacity: 0.30;
      background-color: var(--ct-pattern, currentColor);
      forced-color-adjust: none !important;
      -webkit-forced-color-adjust: none !important;
      color-scheme: only light !important;
      -webkit-mask: url('https://dinerbox-1254136958.cos.ap-guangzhou.myqcloud.com/assets/ticket_code_texture.svg?v=20261019_g552_native') no-repeat center / cover;
      mask: url('https://dinerbox-1254136958.cos.ap-guangzhou.myqcloud.com/assets/ticket_code_texture.svg?v=20261019_g552_native') no-repeat center / cover;
    }

    .ct-top {
      position: relative;
      z-index: 1;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      width: 100%;
      /* 2026-10-26 用户要求：票面文字一律裁剪，绝不溢出卡片 */
      min-width: 0;
      overflow: hidden;
    }

    .ct-meta-left {
      display: flex;
      align-items: flex-start;
      gap: 16px;
      min-width: 0;
      overflow: hidden;
    }

    /* Figma style_88dce846: Inter SemiBold 600, fontSize 7.6px */
    .ct-series-badge {
      font-family: 'Inter', sans-serif;
      font-size: 7.6px;
      font-weight: 600;
      letter-spacing: 0.3px;
      text-transform: uppercase;
      line-height: 1.1;
      /* 2026-10-24 用户反馈「为什么不是顶部对齐」：
         原来这里多了一个 padding-top: 1px，导致 SERIES 比 EDITION / ARCHIVE 低 1px。
         现在三格统一 padding-top: 0，全部与票根顶边对齐。 */
      padding-top: 0;
    }

    .ct-meta-cell {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: flex-start;
      gap: 1px;
      padding-top: 0;
      margin-top: 0;
      /* 2026-10-26：单元格内的单词不允许撑破，超长按省略号截断 */
      min-width: 0;
      max-width: 100%;
    }

    .ct-meta-k {
      font-family: 'Inter', sans-serif;
      /* 2026-10-24：字号 / 字重 / 字距 / 透明度一律继承
         css/style.css 的「统一标签规范」，这里不再写死数值。 */
      line-height: 1;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .ct-meta-v {
      font-family: 'Inter', sans-serif;
      font-size: 7.6px;
      font-weight: 600;
      letter-spacing: 0.2px;
      line-height: 1;
      /* 2026-10-26：票面数值一律单行省略，不折行、不撑破 */
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    /* DiNERBOX vector logo mask with 1:1 currentColor fill */
    .ct-logo-mask {
      display: block;
      width: 71px;
      height: 14px;
      background-color: currentColor;
      -webkit-mask: url('https://dinerbox-1254136958.cos.ap-guangzhou.myqcloud.com/assets/logo_vector_currentColor.svg') no-repeat center / contain;
      mask: url('https://dinerbox-1254136958.cos.ap-guangzhou.myqcloud.com/assets/logo_vector_currentColor.svg') no-repeat center / contain;
      flex-shrink: 0;
    }

    .ct-bottom {
      position: relative;
      z-index: 1;
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      width: 100%;
      /* 2026-10-26 用户要求：文字不要被裁剪，完整显示 */
      gap: 10px;
      min-width: 0;
    }

    /* Figma style_aa09b1d0: Inter Bold 700, fontSize 41.7px */
    .ct-vol {
      font-family: 'Inter', sans-serif;
      font-size: 42px;
      font-weight: 700;
      line-height: 0.82;
      letter-spacing: -1.2px;
      /* 2026-10-26：不裁剪。字号由 JS fitTicketText() 按可用宽度自动缩放 */
      white-space: nowrap;
      flex: 0 0 auto;
    }

    .ct-titles {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      text-align: right;
      gap: 2px;
      /* 标题列占剩余宽度，字号自动缩放，不做省略 */
      flex: 1 1 auto;
      min-width: 0;
    }

    /* Figma style_9e8e9bd7 / style_06885a5b: Inter Bold Italic 700, fontSize 14.3px */
    .ct-series-title {
      font-family: 'Inter', sans-serif;
      font-size: 14px;
      font-weight: 700;
      font-style: italic;
      line-height: 1.1;
      letter-spacing: -0.03em;
      width: 100%;
      white-space: nowrap;
    }

    /* Figma style_9b70f94c: Inter SemiBold Italic 600, fontSize 9.5px */
    .ct-chapter-title {
      font-family: 'Inter', sans-serif;
      font-size: 9.5px;
      font-weight: 600;
      font-style: italic;
      line-height: 1.1;
      opacity: 0.92;
      width: 100%;
      white-space: nowrap;
    }