@charset "utf-8";

:root {
  --header-color: #1a1a1a;
  --primary-color: #ff7555;
  --secondary-color: #0c86ff;
  --third-color: #00ae80;
  --fourth-color: #044498;

  --gray-color-50: #fafafa;
  --gray-color-100: #f5f5f5;
  --gray-color-200: #e6e6e6;
  --gray-color-300: #d6d6d6;
  --gray-color-400: #a5a5a5;
  --gray-color-500: #767676;
  --gray-color-600: #575757;
  --gray-color-700: #434343;
  --gray-color-800: #292929;
  --gray-color-900: #1a1a1a;
  --gray-color-950: #000000;

  /* padding */
  --padding-s: clamp(12px, 1vw, 16px);
  --padding-m: clamp(20px, 2vw, 32px);
  --padding-l: clamp(32px, 4vw, 64px);
  /* gap */
  --gap-s: clamp(8px, 0.8vw, 12px);
  --gap-m: clamp(16px, 1.5vw, 24px);
  --gap-l: clamp(24px, 2.5vw, 40px);
  /* radius */
  --radius-s: 4px;
  --radius-m: 4px;
  --radius-l: 4px;
  /* shadow */
  --shadow-s: 0 4px 10px rgba(0, 0, 0, 0.08), 0 1px 0 rgba(255, 255, 255, 0.14);
  --shadow-m:
    0 10px 30px rgba(0, 0, 0, 0.09), 0 3px 8px rgba(255, 255, 255, 0.12);
  --shadow-l:
    inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 16px 44px rgba(0, 0, 0, 0.26);
  --shadow-long:
    1px 1px 0 rgba(0, 0, 0, 0.03), 2px 2px 0 rgba(0, 0, 0, 0.0275),
    3px 3px 0 rgba(0, 0, 0, 0.025), 4px 4px 0 rgba(0, 0, 0, 0.0225),
    5px 5px 0 rgba(0, 0, 0, 0.02), 6px 6px 0 rgba(0, 0, 0, 0.02),
    7px 7px 0 rgba(0, 0, 0, 0.0175), 8px 8px 0 rgba(0, 0, 0, 0.0175),
    10px 10px 0 rgba(0, 0, 0, 0.015), 12px 12px 0 rgba(0, 0, 0, 0.015),
    14px 14px 0 rgba(0, 0, 0, 0.0125), 16px 16px 0 rgba(0, 0, 0, 0.0125),
    18px 18px 0 rgba(0, 0, 0, 0.01);

  /* border-color */
  --border-color: rgba(255, 255, 255, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  line-height: 1.6;
  color: var(--gray-color-950);
  margin: 0px;
  padding: 0px;
  font-size: clamp(16px, 1vw, 18px);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    "Noto Sans",
    "Liberation Sans",
    sans-serif,
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol";
  background-color: var(--gray-color-50);
}

/* ==================================================
   basic
================================================== */

::selection {
  background-color: var(--primary-color);
  color: #fff;
}

img {
  max-width: 100%;
  width: auto;
}

hr {
  border: 0px;
  border-bottom: 1px solid var(--border-color);
}

/* ==================================================
   html
================================================== */

header {
  width: 100%;
  position: fixed;
  z-index: 999;
  height: 50px;
}

main {
  padding-top: 55px;
  min-height: 80vh;
}

.container {
  padding: 0 clamp(15px, 2vw, 30px);
  margin: 0 auto;
  max-width: 1440px;
}

/* ==================================================
   breadcrumb
================================================== */

.breadcrumb {
  padding: 6px clamp(15px, 2vw, 30px);
  font-size: clamp(12px, 1vw, 13px);
}

.breadcrumb-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.breadcrumb-item {
}

.breadcrumb-item a {
  color: var(--gray-color-50);
  transition: color 0.2s ease;
}

.breadcrumb-item a:hover,
.breadcrumb-item a:focus {
  color: var(--primary-color);
  text-decoration: underline;
  outline: none;
}

.breadcrumb-item a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* 當前頁面 */
[aria-current="page"] {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
  pointer-events: none;
}

/* 分隔符 */
.breadcrumb-item:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  opacity: 0.5;
}
@media only screen and (max-width: 767px) {
  .breadcrumb {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
  }
}

/* ==================================================
   section-box
================================================== */

.section-box {
  padding: clamp(30px, 2vw, 60px) 0;
}

.section-dark {
  background-color: var(--gray-color-900);
  color: #fff;
}
.section-dark * {
  color: #fff;
}

a {
  text-decoration: none;
  color: #000;
}

a:hover {
  color: var(--primary-color);
}

a:hover {
}

article,
aside,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section {
  display: block;
}

p {
  margin-top: 10px;
  margin-bottom: 10px;
}

/* ==================================================
   h1~h4
================================================== */

h1,
h2,
h3 {
  line-height: 1.1;
  padding: 5px 0;
  margin: 5px 0;
}

h1 {
  font-size: clamp(20px, 2.5vw, 46px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(18px, 2vw, 36px);
}

h3 {
  font-size: clamp(16px, 1.2vw, 24px);
}
.text-primary {
  color: var(--primary-color);
}
/* ==================================================
   submenu
================================================== */

.submenu ul {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
}

.submenu ul li a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: clamp(8px, 1vw, 20px);
  text-decoration: none;
  color: var(--gray-color-50);
  transition: all 0.2s ease;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  min-width: clamp(84px, 9vw, 108px);
  border-radius: 4px;
}

.submenu ul li a .icon {
  width: clamp(44px, 4.5vw, 52px);
  height: clamp(44px, 4.5vw, 52px);
  opacity: 0.7;
  object-fit: contain;
  /* 線條 SVG：黑線轉白 */
  filter: brightness(0) invert(1);
  transition:
    opacity 0.2s ease,
    filter 0.2s ease;
}

/* 品牌原稿 logo：預設灰階，hover / active 原色 */
.submenu ul li a .icon.icon-brand {
  width: auto;
  max-width: clamp(80px, 9vw, 108px);
  height: clamp(34px, 3.8vw, 44px);
  opacity: 0.82;
  filter: grayscale(100%);
  transition:
    opacity 0.25s ease,
    filter 0.35s ease;
}

.submenu ul li a:hover {
  color: var(--primary-color);
}

.submenu ul li a:hover .icon:not(.icon-brand) {
  opacity: 1;
}

.submenu ul li a:hover .icon.icon-brand,
.submenu ul li a:focus-visible .icon.icon-brand {
  opacity: 1;
  filter: grayscale(0%);
}

.submenu ul li a.active {
  color: #fff;
  background: var(--primary-color);
}

.section-dark .submenu ul li a.active,
.section-dark .submenu ul li a.active span {
  color: #fff;
}

.submenu ul li a.active span {
  display: inline-block;
  border-bottom: none;
  padding-bottom: 0;
}

.submenu ul li a.active .icon:not(.icon-brand) {
  opacity: 1;
  filter: brightness(0) invert(1);
}

/* active：主色底 + logo 反白 */
.submenu ul li a.active .icon.icon-brand {
  opacity: 1;
  filter: brightness(0) invert(1);
}

.submenu ul li a.active:hover,
.submenu ul li a.active:focus-visible {
  color: #fff;
  background: color-mix(in srgb, var(--primary-color) 88%, #000 12%);
}

.submenu ul li a.active:hover .icon.icon-brand,
.submenu ul li a.active:focus-visible .icon.icon-brand,
.submenu ul li a.active:hover .icon:not(.icon-brand) {
  filter: brightness(0) invert(1);
}

@media (prefers-reduced-motion: reduce) {
  .submenu ul li a .icon.icon-brand {
    transition-duration: 0.01ms;
  }
}

/* ==================================================
   Back to top（--p：捲動進度 0–100，由 custom.js 寫入）
================================================== */
.go-top {
  --size: 48px;
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  border: 3px solid transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 9999;
  color: #fff;
  opacity: 0;
  transform: translateY(18px) scale(0.9);
  pointer-events: none;
  isolation: isolate;
  overflow: visible;
  transition:
    opacity 0.35s cubic-bezier(0.33, 1, 0.68, 1),
    transform 0.35s cubic-bezier(0.33, 1, 0.68, 1),
    box-shadow 0.35s ease,
    filter 0.3s ease;
  background:
    linear-gradient(155deg, rgba(14, 22, 48, 0.98), rgba(6, 12, 28, 0.99))
      padding-box,
    conic-gradient(
        from -90deg,
        var(--primary-color) calc(var(--p, 0) * 1%),
        color-mix(in srgb, var(--primary-color) 22%, transparent) 0
      )
      border-box;
  background-clip: padding-box, border-box;
  -webkit-background-clip: padding-box, border-box;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 8px 28px rgba(0, 0, 0, 0.5),
    0 0 0 0 transparent;
}

.go-top.is-show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  animation: go-top-pulse-glow 2.6s ease-in-out infinite;
}

@keyframes go-top-pulse-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.4),
      0 8px 28px rgba(0, 0, 0, 0.5),
      0 0 18px color-mix(in srgb, var(--primary-color) 32%, transparent);
  }

  50% {
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.4),
      0 10px 32px rgba(0, 0, 0, 0.55),
      0 0 36px color-mix(in srgb, var(--primary-color) 52%, transparent);
  }
}

.go-top:hover {
  animation-play-state: paused;
  filter: brightness(1.12);
  transform: translateY(-4px) scale(1.06);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--primary-color) 45%, transparent),
    0 16px 40px rgba(0, 0, 0, 0.55),
    0 0 44px color-mix(in srgb, var(--primary-color) 48%, transparent);
}

.go-top:hover svg {
  transform: translateY(-5px) scale(1.1);
  fill: #fff;
  filter: drop-shadow(
    0 0 10px color-mix(in srgb, var(--primary-color) 55%, transparent)
  );
}

.go-top svg {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  fill: #d8e6ff;
  transition:
    transform 0.4s cubic-bezier(0.34, 1.25, 0.64, 1),
    fill 0.25s ease,
    filter 0.35s ease;
}

.go-top:active {
  transform: translateY(-1px) scale(0.96);
  filter: brightness(0.94);
  transition-duration: 0.1s;
}

.go-top:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .go-top {
    transition: opacity 0.2s ease;
  }

  .go-top.is-show {
    animation: none;
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.4),
      0 8px 24px rgba(0, 0, 0, 0.45),
      0 0 20px color-mix(in srgb, var(--primary-color) 35%, transparent);
  }

  .go-top:hover {
    transform: translateY(-2px) scale(1.02);
  }

  .go-top:hover svg {
    transform: translateY(-2px);
  }
}

@supports (padding: max(0px)) {
  .go-top {
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
  }
}

/* ==================================================
   float-back（文章頁 · go-top 上方）
================================================== */
.float-back {
  --size: 48px;
  position: fixed;
  right: 18px;
  bottom: calc(18px + var(--size) + 12px);
  z-index: 9998;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--primary-color) 45%, transparent);
  display: none;
  place-items: center;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(
    155deg,
    rgba(14, 22, 48, 0.98),
    rgba(6, 12, 28, 0.99)
  );
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 8px 24px rgba(0, 0, 0, 0.45);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

.float-back svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.float-back:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--primary-color) 45%, transparent),
    0 12px 28px rgba(0, 0, 0, 0.5);
}

.float-back:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 4px;
}

body.has-float-back .float-back {
  display: grid;
}

@supports (padding: max(0px)) {
  .float-back {
    right: max(18px, env(safe-area-inset-right));
    bottom: calc(max(18px, env(safe-area-inset-bottom)) + var(--size) + 12px);
  }
}

@media only screen and (max-width: 767px) {
  body {
    --fab-size: 43px;
    --fab-right: 4px;
    --fab-base: 12px;
    --fab-gap: 8px;
  }

  .go-top,
  .float-back,
  .toc-toggle {
    --size: var(--fab-size);
    box-sizing: border-box;
    width: var(--fab-size);
    height: var(--fab-size);
    right: var(--fab-right);
    margin: 0;
    padding: 0;
  }

  .go-top {
    bottom: var(--fab-base);
    border-width: 1px;
  }

  .go-top svg,
  .float-back svg,
  .toc-toggle svg {
    width: 19px;
    height: 19px;
  }

  .float-back {
    bottom: calc(var(--fab-base) + var(--fab-size) + var(--fab-gap));
  }

  body.has-toc-mobile .toc-toggle {
    bottom: calc(var(--fab-base) + var(--fab-size) + var(--fab-gap));
  }

  body.has-float-back .toc-toggle {
    bottom: calc(var(--fab-base) + (var(--fab-size) + var(--fab-gap)) * 2);
  }

  @supports (padding: max(0px)) {
    .go-top,
    .float-back,
    .toc-toggle {
      right: max(var(--fab-right), env(safe-area-inset-right));
    }

    .go-top {
      bottom: max(var(--fab-base), env(safe-area-inset-bottom));
    }

    .float-back {
      bottom: calc(
        max(var(--fab-base), env(safe-area-inset-bottom)) + var(--fab-size) +
          var(--fab-gap)
      );
    }

    body.has-toc-mobile:not(.has-float-back) .toc-toggle {
      bottom: calc(
        max(var(--fab-base), env(safe-area-inset-bottom)) + var(--fab-size) +
          var(--fab-gap)
      );
    }

    body.has-float-back .toc-toggle {
      bottom: calc(
        max(var(--fab-base), env(safe-area-inset-bottom)) +
          (var(--fab-size) + var(--fab-gap)) * 2
      );
    }
  }
}

/* ==================================================
   faq
================================================== */

.faq {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(5px, 0.5vw, 15px);
  padding: clamp(10px, 2vw, 40px);
  padding-left: 60px;
  border-radius: 4px;
  counter-reset: num;
  background-color: var(--gray-color-900);
}
.faq * {
  color: #fff;
}

.faq details {
  padding: 0 clamp(10px, 1.5vw, 30px);
  flex: 1 1 100%;
  border-radius: 4px;
  transition: all 0.3s;
}

/* 標題 */

.faq summary {
  position: relative;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  padding: 5px 20px 5px 5px;
}

.faq summary::after {
  counter-increment: num;
  content: counter(num);
  position: absolute;
  left: -50px;
  top: 10px;
  background-color: var(--secondary-color);
  color: #fff;
  font-weight: 700;
  border-radius: 4px;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.faq summary h3 {
  font-size: clamp(15px, 1vw, 18px);
}

/* open */

.faq details[open] {
  background-color: var(--gray-color-700);
  color: #fff;
  padding: clamp(10px, 1.5vw, 30px);
  padding-top: 0;
}

.faq details[open] summary {
  padding-top: clamp(10px, 1.5vw, 30px);
}

.faq details[open] summary h3 {
  font-size: 130%;
}

.faq details[open] summary::after {
  background-color: var(--primary-color);
  color: #fff;
}

.faq summary:hover::after {
  background-color: var(--primary-color);
  color: #fff;
}

.faq details[open] ul,
.faq details[open] ol {
  margin: 0;
  padding: 5px 5px 5px 25px;
}

/* 隱藏預設箭頭 */

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::marker {
  content: none;
}

/* 自訂 + / – 記號 */

.faq summary::before {
  content: "+";
  position: absolute;
  right: 0px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6em;
}

.faq details[open] summary::before {
  content: "–";
  color: #fff;
}

@media only screen and (max-width: 767px) {
  .faq {
    padding-left: 25px;
  }

  .faq summary::after {
    left: -30px;
    top: 10px;
    width: 24px;
    height: 24px;
  }
}

/* ==================================================
   date
================================================== */

.date {
  position: relative;
  font-size: 0.85rem;
}

.date .year::before {
  position: absolute;
  font-family: "iconsmind" !important;
  content: "\e70a";
  font-size: 18px;
  top: -4px;
  left: 0;
}

.date .year::after,
.date .mon::after {
  content: "-";
  padding-left: 4px;
}

.date .day::after {
  content: "｜";
}

/* ==================================================
   main-box
================================================== */
.main-box {
  max-width: 1400px;
  padding: 0 5px;
  margin: 0 auto;
}
.main-box h1 {
  text-align: center;
}
/* ==================================================
   content-box
================================================== */

.content-box {
  position: relative;
  overflow: hidden;
  padding: clamp(5px, 3vw, 50px) 0;
  max-width: 1440px;
  margin: 0px auto;
  border-radius: var(--radius-m);
  isolation: isolate;
}

/* 內頁 TOC sticky：祖先 overflow:hidden 會讓 sticky 失效 */
.content-box:has(.bonus-content) {
  overflow: visible;
  padding: clamp(16px, 3vw, 44px) 0;
}

.main-box:has(.bonus-content) {
  padding-inline: clamp(8px, 2vw, 16px) 0;
  margin-bottom: 0;
}

main:has(.bonus-content) > .section-box.section-dark .text-primary a {
  color: var(--primary-color);
  text-decoration: none;
}

main:has(.bonus-content) > .section-box.section-dark .text-primary a:hover {
  color: #fff;
  text-decoration: underline;
}

main:has(.bonus-content) > .section-box.dark {
  padding-bottom: clamp(28px, 4vw, 48px);
}

main:has(.bonus-content) > .section-box.dark .btn-box {
  margin-top: clamp(8px, 1.5vw, 14px);
}

main:has(.bonus-content) .section-related {
  margin-top: 0;
  padding-top: clamp(32px, 4vw, 56px);
  padding-bottom: clamp(32px, 4vw, 56px);
}

.content-box > * {
  position: relative;
  z-index: 1;
}

/* list 內頁 intro — 全寬編輯區、平面無框 */
.content-box .intro {
  width: 100%;
  max-width: none;
  margin: 0 0 clamp(20px, 2.8vw, 36px);
  padding: clamp(24px, 3.2vw, 44px) clamp(20px, 4.5vw, 80px)
    clamp(20px, 2.8vw, 36px);
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--primary-color) 9%, #fff) 0%,
    color-mix(in srgb, var(--primary-color) 4%, var(--gray-color-100)) 38%,
    var(--gray-color-100) 100%
  );
  border-radius: var(--radius-m);
}

.content-box .intro h1 {
  width: 100%;
  max-width: 100%;
  margin: 0 auto clamp(12px, 1.5vw, 18px);
  padding: 0;
  border: 0;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--gray-color-900);
  text-align: center;
  text-wrap: balance;
}

.content-box .intro h2 {
  max-width: 72rem;
  margin: clamp(22px, 2.6vw, 32px) auto clamp(8px, 1vw, 12px);
  padding: 0;
  font-size: clamp(1.125rem, 1.45vw, 1.375rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--gray-color-800);
  text-align: center;
  text-wrap: balance;
}

.content-box .intro h2::after {
  content: "";
  display: block;
  width: min(2.75rem, 12vw);
  height: 2px;
  margin: clamp(8px, 1vw, 10px) auto 0;
  background: var(--gray-color-300);
  border-radius: 1px;
}

.content-box .intro p {
  max-width: 72rem;
  margin: 0 auto clamp(10px, 1.2vw, 14px);
  font-size: clamp(0.96875rem, 1vw, 1.0625rem);
  color: var(--gray-color-700);
  text-align: left;
}

.intro p a,
.content-box .intro p a {
  color: var(--secondary-color);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.intro p a:hover,
.content-box .intro p a:hover {
  color: var(--primary-color);
}

.section-dark .intro p a {
  color: var(--primary-color);
}

.section-dark .intro p a:hover {
  color: #fff;
}

.content-box .intro p:last-child {
  margin-bottom: 0;
}

.content-box .intro h1 + p {
  margin-top: 0;
}

.content-box .intro h2 + p {
  margin-top: 0;
}

/* intro 摺疊：h1 固定顯示，其餘約 4 行 + 箭頭（JS 注入 .intro-more / .intro-toggle） */
.content-box .intro.intro-collapsible:not(.is-expanded) {
  padding-bottom: clamp(14px, 2vw, 22px);
}

.content-box .intro .intro-more {
  max-width: 72rem;
  margin: 0 auto;
}

.content-box .intro.intro-collapsible:not(.is-expanded) .intro-more {
  max-height: calc(1.78em * 4);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    180deg,
    #000 0%,
    #000 72%,
    transparent 100%
  );
  mask-image: linear-gradient(180deg, #000 0%, #000 72%, transparent 100%);
}

.content-box .intro.intro-collapsible.is-expanded .intro-more {
  max-height: none;
  overflow: visible;
  -webkit-mask-image: none;
  mask-image: none;
}

.content-box .intro .intro-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: clamp(8px, 1vw, 12px) auto 0;
  padding: 0;
  border: 1px solid
    color-mix(in srgb, var(--primary-color) 28%, var(--gray-color-300));
  border-radius: 50%;
  background: #fff;
  color: var(--primary-color);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.content-box .intro .intro-toggle:hover,
.content-box .intro .intro-toggle:focus-visible {
  border-color: var(--primary-color);
  background: color-mix(in srgb, var(--primary-color) 8%, #fff);
  outline: none;
}

.content-box .intro .intro-toggle-icon {
  display: block;
  width: 0;
  height: 0;
  margin-top: 3px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid currentColor;
  transition: transform 0.25s ease;
}

.content-box .intro.is-expanded .intro-toggle-icon {
  margin-top: 0;
  transform: rotate(180deg);
}

@media only screen and (max-width: 767px) {
  .content-box .intro {
    margin-bottom: clamp(16px, 4vw, 24px);
    padding: clamp(18px, 5vw, 28px) clamp(14px, 4vw, 20px)
      clamp(16px, 4vw, 22px);
    border-radius: 0;
  }

  .content-box .intro.intro-collapsible:not(.is-expanded) {
    padding-bottom: clamp(12px, 3.5vw, 16px);
  }

  .content-box .intro h1 {
    font-size: clamp(1.5rem, 6.5vw, 1.875rem);
    line-height: 1.2;
    letter-spacing: -0.025em;
  }

  .content-box .intro h1::after {
    width: min(3.5rem, 28vw);
    height: 3px;
    margin-top: clamp(8px, 2.5vw, 12px);
  }

  .content-box .intro h2 {
    margin-top: clamp(18px, 4.5vw, 24px);
    font-size: clamp(1.0625rem, 4.2vw, 1.1875rem);
    text-align: left;
  }

  .content-box .intro h2::after {
    margin-left: 0;
    margin-right: auto;
  }

  .content-box .intro p,
  .content-box .intro p:first-of-type {
    max-width: none;
    font-size: 15px;
    line-height: 1.7;
    text-align: left;
  }

  .content-box .intro.intro-collapsible:not(.is-expanded) .intro-more {
    max-height: calc(1.7em * 4);
  }

  .content-box .intro .intro-more {
    max-width: none;
  }
}

.banner-ad {
  margin: 10px auto;
}

.list-banner-section{
  padding: 10px 0;
}

.banner-ad img {
  border-radius: var(--radius-m);
  border: 1px solid var(--gray-color-700);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--gray-color-500) 14%, transparent),
    0 12px 48px color-mix(in srgb, var(--gray-color-950) 72%, transparent);
}

.content-box h1 {
  text-align: center;
}

.game-play {
  position: absolute;
  top: 20px;
  right: 20px;
}

/* ==================================================
   tabs, nav-tabs
================================================== */

.nav-tabs {
  list-style: none;
  margin: 0;
  padding: 0;
  padding-top: 20px;
  display: flex;
  justify-content: center;
  flex: 1 1 80px;
  flex-wrap: wrap;
  gap: 0.8vw;
  justify-content: center;
}

.nav-tabs > li {
  margin-bottom: 3px;
}

.nav-tabs a {
  font-weight: 700;
  padding: 8px clamp(10px, 1.5vw, 20px);
  text-decoration: none;
  display: block;
  border-radius: 4px;
  background-color: var(--gray-color-200);
  font-size: clamp(12px, 3vw, 16px);
}

.nav-tabs a:hover {
  color: var(--primary-color);
}

.nav-tabs a.active {
  position: relative;
  background-color: var(--primary-color-light);
  color: #fff;
}

.nav-tabs a.active::after {
  content: "";
}

.tab-content {
  padding: 20px 0;
}

.tab-content h2 {
  text-align: center;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.tab-content .index-puzzle-pic {
  gap: clamp(10px, 1.5vw, 15px);
}

.tab-content .index-puzzle-pic .cell {
  aspect-ratio: auto 3 / 2;
}

/* ==================================================
   bonus-list-filters（精緻卡片 · 淺色按鈕 · 主色選中）
================================================== */
.bonus-list-filters {
  margin-bottom: clamp(16px, 2vw, 24px);
}

.bonus-list-filters-bar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px 16px;
  padding: clamp(14px, 1.6vw, 18px) clamp(14px, 1.8vw, 20px);
  padding-top: clamp(16px, 1.8vw, 20px);
  border-radius: var(--radius-m);
  border: 1px solid var(--gray-color-200);
  background: #fff;
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.06),
    0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
@media only screen and (max-width: 767px) {
  .bonus-list-filters-bar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
  }
}
.bonus-filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.bonus-filter-group-brand {
  flex: 1 1 auto;
  min-width: 0;
}

.bonus-filter-scroll {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.bonus-filter-group-sort {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 6px 10px 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--gray-color-200);
  background: var(--gray-color-50);
  max-width: 100%;
}

.bonus-filter-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-color-500);
}

/* 覆寫全站 .tag-list / .tag-item，避免 content-box 內跑版 */
.bonus-list-filters .tag-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.bonus-list-filters .bonus-filter-brand {
  flex: 1 1 auto;
  min-width: 0;
}

.bonus-list-filters .bonus-filter-sort {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  justify-content: stretch;
  width: 100%;
  max-width: 100%;
}

.bonus-list-filters .tag-list > li {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bonus-list-filters .bonus-filter-sort > li {
  flex: 1 1 0;
  min-width: 0;
}

.content-box .bonus-list-filters button.tag-item,
.bonus-list-filters button.tag-item {
  cursor: pointer;
  font-family: inherit;
  color: var(--gray-color-800);
  background: #fff;
  border: 1px solid var(--gray-color-300);
  font-size: 15px;
  font-weight: 600;
  padding: 7px 14px;
  line-height: 1.25;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.bonus-list-filters button.tag-item:hover {
  color: #fff;
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 3px 10px
    color-mix(in srgb, var(--primary-color) 32%, transparent);
  transform: translateY(-1px);
}

.bonus-list-filters button.tag-item.is-active {
  color: #fff;
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow:
    0 2px 10px color-mix(in srgb, var(--primary-color) 38%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.bonus-list-filters button.tag-item:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.bonus-box .bonus-list.is-filter-hidden {
  display: none;
}

.bonus-filter-more {
  display: none;
}

@media only screen and (min-width: 768px) {
  .bonus-list-filters-bar {
    flex-wrap: nowrap;
    align-items: center;
  }

  .bonus-filter-group-sort {
    flex: 0 0 auto;
    flex-shrink: 0;
    margin-left: auto;
    align-self: center;
  }

  .bonus-list-filters .bonus-filter-sort {
    width: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .bonus-list-filters .bonus-filter-sort > li {
    flex: 0 0 auto;
    min-width: auto;
  }

  .bonus-list-filters .bonus-filter-sort .tag-item {
    white-space: nowrap;
  }

  /* Bet88 分類標籤較長：桌面橫向捲動，Sort 固定右側 */
  .bonus-list-filters[data-bonus-filters="category"] .bonus-filter-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .bonus-list-filters[data-bonus-filters="category"] .bonus-filter-brand {
    flex-wrap: nowrap;
    width: max-content;
    max-width: none;
  }

  .bonus-list-filters[data-bonus-filters="category"] .bonus-filter-brand > li {
    flex: 0 0 auto;
  }

  .bonus-list-filters[data-bonus-filters="category"]
    .bonus-filter-brand
    .tag-item {
    white-space: nowrap;
  }
}

@media only screen and (max-width: 767px) {
  .bonus-list-filters {
    margin-bottom: 16px;
    padding-inline: clamp(10px, 3vw, 14px);
    box-sizing: border-box;
  }

  .bonus-list-filters-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-width: 100%;
    padding: 0;
    padding-top: 3px;
    border-radius: 8px;
    border-left: none;
    border-right: none;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    box-sizing: border-box;
  }

  .bonus-filter-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 12px 14px;
    box-sizing: border-box;
  }

  .bonus-filter-group-brand {
    padding-bottom: 2px;
  }

  .bonus-filter-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    max-height: 2.7rem;
    margin: 0;
    padding: 0;
  }

  .bonus-list-filters.is-brand-expanded .bonus-filter-scroll {
    max-height: none;
    overflow: visible;
  }

  .bonus-filter-group-sort {
    margin-left: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    padding: 5px 14px 7px;
    border: none;
    border-top: 1px solid var(--gray-color-200);
    border-radius: 0;
    background: var(--gray-color-50);
    box-sizing: border-box;
  }

  .bonus-filter-group-sort .bonus-filter-label {
    width: auto;
    margin: 0;
    font-size: 9px;
  }

  .bonus-filter-label {
    display: block;
    flex: none;
    width: 100%;
    padding: 0;
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--gray-color-600);
  }

  /* 品牌：預設只顯示第一行，其餘用 View all 展開 */
  .bonus-list-filters .bonus-filter-brand {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  .bonus-list-filters .bonus-filter-brand > li {
    flex: 0 0 auto;
  }

  .bonus-list-filters .bonus-filter-brand .tag-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 14px;
    transform: none;
  }

  .bonus-list-filters .bonus-filter-brand .tag-item:hover {
    transform: none;
  }

  .bonus-list-filters .bonus-filter-brand .tag-item.is-active {
    color: #fff;
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 1px 4px
      color-mix(in srgb, var(--primary-color) 35%, transparent);
  }

  .bonus-list-filters .bonus-filter-brand .tag-item.is-active:hover {
    color: #fff;
    background: var(--primary-color);
    border-color: var(--primary-color);
  }

  /* 排序：小顆切換，不佔滿寬 */
  .bonus-list-filters .bonus-filter-sort {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    width: auto;
    max-width: 100%;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-sizing: border-box;
  }

  .bonus-list-filters .bonus-filter-sort > li {
    flex: 0 0 auto;
    min-width: 0;
    display: flex;
  }

  .bonus-list-filters .bonus-filter-sort .tag-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 0;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid var(--gray-color-300);
    border-radius: 999px;
    background: #fff;
    box-shadow: none;
    color: var(--gray-color-600);
    transform: none;
  }

  .bonus-list-filters .bonus-filter-sort .tag-item:hover {
    color: var(--gray-color-800);
    background: #fff;
    border-color: var(--gray-color-400);
    box-shadow: none;
    transform: none;
  }

  .bonus-list-filters .bonus-filter-sort .tag-item.is-active {
    color: #fff;
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: none;
  }

  .bonus-filter-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--primary-color);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
  }

  .bonus-filter-more[hidden] {
    display: none;
  }

  .bonus-filter-more::after {
    content: "";
    width: 0.55em;
    height: 0.55em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: transform 0.18s ease;
  }

  .bonus-list-filters.is-brand-expanded .bonus-filter-more::after {
    transform: rotate(-135deg) translateY(-1px);
  }
}

/* ==================================================
   bonus-box / bonus-list（平面 · 層次）
================================================== */
.bonus-box {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.2vw, 20px);
  padding: clamp(16px, 2vw, 28px) 0;
}

.page-content .bonus-box {
  padding: clamp(16px, 2vw, 24px);
  background: var(--gray-color-100);
  border: 1px solid var(--gray-color-200);
  border-radius: var(--radius-m);
}

.bonus-box .bonus-list {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--gray-color-300);
  border-radius: var(--radius-m);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}

.bonus-box .bonus-list:hover,
.bonus-box .bonus-list:focus-within {
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.1),
    0 4px 10px rgba(0, 0, 0, 0.05);
}

.bonus-box .bonus-list-pic {
  position: relative;
  width: 100%;
  aspect-ratio: 764 / 408;
  overflow: hidden;
  background: var(--gray-color-100);
  border-bottom: 1px solid var(--gray-color-200);
}

.bonus-box .bonus-list-pic::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 28%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.1));
  opacity: 0.7;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.bonus-box .bonus-list:hover .bonus-list-pic::after,
.bonus-box .bonus-list:focus-within .bonus-list-pic::after {
  opacity: 1;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.18));
}

.bonus-box .bonus-list-pic a {
  display: block;
  height: 100%;
  outline: none;
}

.bonus-box .bonus-list-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%;
  transition:
    transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    filter 0.35s ease;
}

.bonus-box .bonus-list:hover .bonus-list-pic img,
.bonus-box .bonus-list:focus-within .bonus-list-pic img {
  transform: scale(1.05);
  filter: brightness(1.06) saturate(1.08);
}

.bonus-box .bonus-list-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(12px, 1vw, 16px);
  text-align: left;
  color: var(--gray-color-800);
}

.bonus-box .bonus-list-brand {
  display: inline-block;
  align-self: flex-start;
  margin: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--primary-color);
}

.bonus-box .bonus-list-text h3 {
  margin: 0;
  font-size: clamp(14px, 0.85vw, 17px);
  font-weight: 600;
  line-height: 1.4;
}

.bonus-box .bonus-list-text h3 a {
  color: var(--gray-color-800);
  text-decoration: none;
  transition: color 0.2s ease;
}

.bonus-box .bonus-list-text h3 a:hover {
  color: var(--primary-color);
}

.bonus-box .bonus-list:hover .bonus-list-text h3 a,
.bonus-box .bonus-list:focus-within .bonus-list-text h3 a {
  color: var(--gray-color-900);
}

.bonus-box .bonus-list-text .date {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gray-color-500);
  border-top: 1px solid var(--gray-color-200);
}

.bonus-box .bonus-list-text .date::before {
  content: "";
  flex-shrink: 0;
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: var(--primary-color);
  opacity: 0.65;
}

.bonus-box .bonus-list-text h3 a:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary-color) 50%, transparent);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .bonus-box .bonus-list,
  .bonus-box .bonus-list-pic img,
  .bonus-box .bonus-list-pic::after {
    transition-duration: 0.01ms;
  }

  .bonus-box .bonus-list:hover .bonus-list-pic img,
  .bonus-box .bonus-list:focus-within .bonus-list-pic img {
    transform: none;
    filter: none;
  }
}

@media only screen and (max-width: 1100px) {
  .bonus-box {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media only screen and (max-width: 800px) {
  .game-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bonus-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 0;
  }

  .bonus-box .bonus-list-text {
    padding: 10px 12px;
    gap: 6px;
  }

  .bonus-box .bonus-list-text h3 {
    font-size: 14px;
  }

  .bonus-box .bonus-list-text .date {
    font-size: 13px;
    padding-top: 6px;
  }

  .game-box .game-list-text h2 {
    font-size: 16px;
    margin: 0;
  }

  .game-box .game-list-text p {
    -webkit-line-clamp: 2;
  }

  .bonus-box .bonus-list-text p {
    -webkit-line-clamp: 2;
  }
}

@media only screen and (max-width: 480px) {
  .bonus-box {
    gap: 8px;
  }

  .bonus-box .bonus-list-text h3 {
    font-size: 13px;
    line-height: 1.35;
  }
}

/* ==================================================
   bonus-content-guide（平面線條 · 側欄區塊）
================================================== */
.bonus-content-guide .sidebar-section,
.content-extras-mobile .sidebar-section {
  margin-bottom: clamp(22px, 2.8vw, 30px);
  border: 1px solid var(--gray-color-300);
  border-radius: 4px;
  background: var(--gray-color-50);
  overflow: hidden;
}

.bonus-content-guide .sidebar-section:last-child,
.content-extras-mobile .sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-heading {
  margin: 0;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-color-700);
  background: #fff;
  border-bottom: 1px solid var(--gray-color-300);
}

.sidebar-section-inner {
  margin: 0;
  padding: 14px;
  border-top: 1px solid var(--gray-color-200);
  background: var(--gray-color-50);
}

/* TOC — 編號章節 + 子項時間軸 */
.bonus-content-guide .sidebar-section-toc .toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc-chapter;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bonus-content-guide .sidebar-section-toc .toc-item.h2 {
  counter-increment: toc-chapter;
  counter-reset: toc-section;
  margin: 0 0 6px;
  padding-top: 0;
  border-top: none;
}

.bonus-content-guide .sidebar-section-toc .toc-item.h2:not(:first-child) {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-color-300);
}

.bonus-content-guide .sidebar-section-toc .toc-item.h3 {
  counter-increment: toc-section;
  position: relative;
  margin: 0 0 2px 13px;
  padding: 0 0 0 18px;
  border-left: 1px solid var(--gray-color-300);
}

.bonus-content-guide .sidebar-section-toc .toc-item.h3::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.72em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--gray-color-400);
  box-sizing: border-box;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.bonus-content-guide .sidebar-section-toc .toc-item.h3:last-child,
.bonus-content-guide
  .sidebar-section-toc
  .toc-item.h2
  + .toc-item.h3:last-of-type {
  margin-bottom: 4px;
}

.bonus-content-guide .sidebar-section-toc .toc-item.h2 a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--gray-color-900);
  background: #fff;
  border: 1px solid var(--gray-color-300);
  border-radius: 4px;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background-color 0.15s ease;
}

.bonus-content-guide .sidebar-section-toc .toc-item.h2 a::before {
  content: counter(toc-chapter, decimal-leading-zero);
  flex-shrink: 0;
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--primary-color);
  background: var(--gray-color-50);
  border: 1px solid var(--gray-color-300);
  border-radius: 4px;
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.bonus-content-guide .sidebar-section-toc .toc-item.h3 a {
  display: block;
  padding: 7px 8px 7px 4px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--gray-color-600);
}

.bonus-content-guide .sidebar-section-toc .toc-item.h3 a::before {
  content: counter(toc-chapter) "." counter(toc-section) " ";
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-color-500);
  margin-right: 4px;
}

.bonus-content-guide .sidebar-section-toc .toc-list a {
  text-decoration: none;
}

.bonus-content-guide .sidebar-section-toc .toc-item.h2 a:hover {
  color: var(--gray-color-900);
  border-color: var(--gray-color-400);
  background: #fff;
}

.bonus-content-guide .sidebar-section-toc .toc-item.h3 a:hover {
  color: var(--gray-color-900);
}

.bonus-content-guide .sidebar-section-toc .toc-item.h3 a:hover::before {
  color: var(--gray-color-700);
}

.bonus-content-guide .sidebar-section-toc .toc-item.h2 a.active {
  color: var(--gray-color-900);
  border-color: var(--primary-color);
  background: #fff;
  padding-left: 12px;
  margin-left: 0;
}

.bonus-content-guide .sidebar-section-toc .toc-item.h2 a.active::before {
  color: #fff;
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.bonus-content-guide .sidebar-section-toc .toc-item.h3 a.active {
  color: var(--primary-color);
  font-weight: 600;
}

.bonus-content-guide .sidebar-section-toc .toc-item.h3 a.active::before {
  color: var(--primary-color);
}

.bonus-content-guide .sidebar-section-toc .toc-item.h3:has(a.active)::before {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

/* Tags（側欄 / 手機 extras） */
.bonus-content-guide .sidebar-section .tag-box,
.content-extras-mobile .sidebar-section .tag-box {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.bonus-content-guide .sidebar-section-tags .tag-list,
.content-extras-mobile .sidebar-section-tags .tag-list {
  justify-content: flex-start;
  gap: 8px;
}

.bonus-content-guide .sidebar-section-tags .tag-item,
.content-extras-mobile .sidebar-section-tags .tag-item {
  color: var(--gray-color-800);
  background: #fff;
  border: 1px solid var(--gray-color-300);
  font-size: 12px;
  padding: 5px 10px;
}

.bonus-content-guide .sidebar-section-tags a.tag-item:hover,
.content-extras-mobile .sidebar-section-tags a.tag-item:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

/* 廣告（側欄平面線框） */
.bonus-content-guide .sidebar-section .toc-ad-box,
.content-extras-mobile .sidebar-section .toc-ad-box {
  margin-top: 0;
  display: grid;
  gap: 12px;
}

.bonus-content-guide .sidebar-section-promo .toc-ad-item,
.content-extras-mobile .sidebar-section-promo .toc-ad-item {
  border: 1px solid var(--gray-color-300);
  box-shadow: none;
  transition: border-color 0.2s ease;
}

.bonus-content-guide .sidebar-section-promo .toc-ad-item:hover,
.content-extras-mobile .sidebar-section-promo .toc-ad-item:hover {
  border-color: var(--primary-color);
  box-shadow: none;
  transform: none;
}

.bonus-content-guide .sidebar-section-promo .toc-ad-item:hover img,
.content-extras-mobile .sidebar-section-promo .toc-ad-item:hover img {
  transform: none;
}

/* ==================================================
   tag-box
================================================== */
.tag-box {
  margin-top: clamp(16px, 2vw, 24px);
}

.tag-box a.tag-item:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

/* section-dark 內 tag-box（通用） */
.section-dark .tag-box {
  margin-top: 0;
  margin-bottom: clamp(14px, 2vw, 22px);
}

.section-dark .tag-box .tag-list {
  gap: clamp(8px, 1.2vw, 12px);
}

.section-dark .tag-box .tag-item {
  color: rgba(255, 255, 255, 0.9);
  border-color: color-mix(
    in srgb,
    var(--primary-color) 42%,
    rgba(255, 255, 255, 0.22)
  );
  background: color-mix(
    in srgb,
    var(--primary-color) 14%,
    rgba(255, 255, 255, 0.07)
  );
  backdrop-filter: blur(4px);
}

.section-dark .tag-box a.tag-item:hover {
  color: #fff;
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 4px 16px
    color-mix(in srgb, var(--primary-color) 40%, transparent);
}

.section-dark .tag-box .tag-item.is-active,
.section-dark .tag-box span.tag-item {
  color: #fff;
  background: var(--primary-color);
  border-color: color-mix(in srgb, var(--primary-color) 80%, #fff);
  box-shadow:
    0 4px 18px color-mix(in srgb, var(--primary-color) 45%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ==================================================
   Tag 頁（page-tag）
   當前標籤強調 → 淺色標籤雲（手機全部顯示、自動換行）
================================================== */
.page-tag .tag-page-hero {
  padding: clamp(32px, 4.5vw, 64px) 0 clamp(24px, 3vw, 40px) !important;
}

.page-tag .tag-page-intro {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.page-tag .tag-page-current {
  display: inline-flex;
  align-items: center;
  margin: 0 0 14px;
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  border-radius: 999px;
  background: var(--primary-color);
  border: 1px solid color-mix(in srgb, var(--primary-color) 70%, #fff);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--primary-color) 40%, transparent);
}

.page-tag .section-dark .tag-page-current {
  color: #fff;
}

.page-tag .tag-page-intro h1 {
  margin: 0 0 12px;
}

.page-tag .tag-page-intro p {
  margin: 0 auto 10px;
  max-width: 38em;
  color: rgba(255, 255, 255, 0.78);
}

.page-tag .section-dark .tag-page-intro p {
  color: rgba(255, 255, 255, 0.78);
}

.page-tag .tag-page-intro a {
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 淺色標籤瀏覽區 */
.page-tag .tag-page-rail {
  padding: clamp(16px, 2.5vw, 28px) 0 clamp(20px, 3vw, 36px);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--gray-color-100) 80%, #fff) 0%,
      #fff 100%
    );
  border-bottom: 1px solid color-mix(in srgb, var(--gray-color-300) 55%, transparent);
}

.page-tag .tag-page-rail-label {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-color-500);
  text-align: center;
}

.page-tag .tag-page-cloud {
  max-width: 1100px;
  margin: 0 auto;
}

.page-tag .tag-page-cloud .tag-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.page-tag .tag-page-cloud .tag-item {
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-color-800);
  border-color: color-mix(in srgb, var(--primary-color) 35%, var(--gray-color-300));
  background: #fff;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--gray-color-300) 50%, transparent);
}

.page-tag .tag-page-cloud a.tag-item:hover {
  color: #fff;
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary-color) 35%, transparent);
}

.page-tag .tag-page-cloud .tag-item.is-active,
.page-tag .tag-page-cloud span.tag-item {
  color: #fff;
  background: var(--primary-color);
  border-color: color-mix(in srgb, var(--primary-color) 75%, #fff);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--primary-color) 40%, transparent);
}

@media only screen and (max-width: 767px) {
  .page-tag .tag-page-hero {
    padding: clamp(20px, 5vw, 28px) 0 18px !important;
  }

  .page-tag .tag-page-intro {
    text-align: left;
  }

  .page-tag .tag-page-current {
    margin-bottom: 12px;
    padding: 7px 14px;
    font-size: 0.7rem;
  }

  .page-tag .tag-page-intro h1 {
    margin-bottom: 10px;
    font-size: clamp(1.4rem, 6.2vw, 1.75rem);
    text-align: left;
    line-height: 1.2;
  }

  .page-tag .tag-page-intro p {
    margin-bottom: 8px;
    text-align: left;
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .page-tag .tag-page-rail {
    padding: 14px 0 20px;
  }

  .page-tag .tag-page-rail-label {
    text-align: left;
    margin: 0 auto 10px;
    padding-inline: clamp(15px, 2vw, 30px);
    max-width: 1440px;
  }

  /* 手機：全部顯示、自動換行（不加外框） */
  .page-tag .tag-page-cloud {
    max-width: none;
    margin: 0;
    padding: 0 clamp(15px, 2vw, 30px);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .page-tag .tag-page-cloud .tag-list {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 7px;
    padding: 0;
    overflow: visible;
  }

  .page-tag .tag-page-cloud .tag-list > li {
    flex: 0 1 auto;
    max-width: 100%;
  }

  .page-tag .tag-page-cloud .tag-item {
    padding: 6px 10px;
    font-size: 11px;
    line-height: 1.3;
    white-space: normal;
    text-align: left;
  }
}

.toc-ad-box .toc-ad-item {
  display: block;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--gray-color-400) 35%, transparent);
  box-shadow: var(--shadow-s);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.toc-ad-box .toc-ad-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 768 / 403;
  object-fit: cover;
  object-position: 50% 50%;
  transition: transform 0.4s ease;
}

.toc-ad-box .toc-ad-item:hover {
  border-color: color-mix(in srgb, var(--primary-color) 50%, transparent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
}

.toc-ad-box .toc-ad-item:hover img {
  transform: scale(1.04);
}

/* 手機：tag / 廣告在 section-related 上方 */
.content-extras-mobile {
  display: none;
}

@media only screen and (max-width: 767px) {
  .content-extras-mobile {
    display: block;
    padding: clamp(20px, 5vw, 28px) clamp(10px, 3vw, 16px);
    background: var(--gray-color-100);
    border-top: 1px solid var(--gray-color-300);
  }

  .content-extras-mobile .container {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-inline: 0;
    max-width: 100%;
  }
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(6px, 1vw, 10px);
  list-style: none;
  padding: 0;
  margin: 0;
}

.tag-item {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: clamp(12px, 1vw, 13px);
  font-weight: 600;
  line-height: 1.3;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--primary-color) 45%, transparent);
  background: color-mix(in srgb, var(--primary-color) 14%, transparent);
  color: #fff;
  text-decoration: none;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

a.tag-item:hover,
.content-box a.tag-item:hover,
.dark a.tag-item:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

span.tag-item {
  cursor: default;
}

.content-box .tag-item {
  color: var(--gray-color-800);
  border-color: color-mix(
    in srgb,
    var(--primary-color) 35%,
    var(--gray-color-300)
  );
  background: color-mix(
    in srgb,
    var(--primary-color) 10%,
    var(--gray-color-100)
  );
}

/* 篩選列預設「All Brands」等 active 狀態（覆寫 .content-box .tag-item） */
.content-box .bonus-list-filters .bonus-filter-brand button.tag-item.is-active,
.content-box .bonus-list-filters .bonus-filter-sort button.tag-item.is-active,
.bonus-list-filters .bonus-filter-brand button.tag-item.is-active {
  color: #fff;
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow:
    0 2px 10px color-mix(in srgb, var(--primary-color) 38%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dark .tag-item {
  border-color: color-mix(in srgb, var(--primary-color) 55%, transparent);
  background: color-mix(
    in srgb,
    var(--primary-color) 18%,
    rgba(255, 255, 255, 0.06)
  );
}

/* ==================================================
   bonus-expired-notice（優惠內頁 · 過期提示）
================================================== */
.bonus-expired-notice {
  margin-top: clamp(24px, 3vw, 36px);
  padding-top: clamp(20px, 2.5vw, 28px);
  border-top: 1px solid var(--gray-color-200);
}

.bonus-content .bonus-expired-notice {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

.bonus-expired-notice-inner {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 3vw, 32px) clamp(18px, 3vw, 36px);
  border-radius: var(--radius-m);
  border: 1px dashed color-mix(in srgb, var(--gray-color-500) 55%, var(--gray-color-300));
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.96) 0%,
      color-mix(in srgb, var(--gray-color-100) 88%, #fff) 100%
    );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    0 10px 28px rgba(0, 0, 0, 0.06);
}

.bonus-expired-stamp {
  position: absolute;
  top: 38%;
  right: clamp(12px, 4vw, 48px);
  z-index: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(128px, 20vw, 172px);
  padding: 12px 18px;
  font-size: clamp(1.55rem, 3.2vw, 2.25rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, #c0392b 72%, var(--gray-color-700));
  border: 4px double color-mix(in srgb, #c0392b 55%, var(--gray-color-400));
  border-radius: 6px;
  opacity: 0.22;
  transform: translateY(-50%) rotate(-18deg);
  pointer-events: none;
  user-select: none;
}

.bonus-expired-notice-body {
  position: relative;
  z-index: 1;
  max-width: 100%;
}

.bonus-expired-notice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 2vw, 24px);
}

.bonus-expired-notice-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9b2c2c;
  background: color-mix(in srgb, #c0392b 10%, #fff);
  border: 1px solid color-mix(in srgb, #c0392b 24%, transparent);
  border-radius: 999px;
}

.bonus-expired-notice-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c0392b;
  box-shadow: 0 0 0 3px color-mix(in srgb, #c0392b 18%, transparent);
}

.bonus-expired-notice-title {
  margin: 0 0 12px;
  font-size: clamp(1.2rem, 2.2vw, 1.65rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--gray-color-900);
}

.bonus-expired-notice-text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.65;
  color: var(--gray-color-600);
}

.bonus-expired-notice-text strong {
  color: var(--gray-color-800);
}

.bonus-expired-notice-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  margin-top: 0;
}

.bonus-expired-notice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 8px 7px 14px;
  font-size: clamp(12px, 1vw, 13px);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  color: var(--gray-color-900);
  background:
    linear-gradient(
      180deg,
      #fff 0%,
      color-mix(in srgb, var(--gray-color-100) 70%, #fff) 100%
    );
  border: 1px solid color-mix(in srgb, var(--primary-color) 38%, var(--gray-color-300));
  border-radius: 999px;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.28s ease,
    background 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease;
}

.bonus-expired-notice-btn-label {
  white-space: nowrap;
  color: var(--gray-color-900);
  transition: color 0.28s ease;
  text-decoration: none!important;
}

.bonus-expired-notice-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    color-mix(in srgb, var(--primary-color) 78%, #000 22%) 100%
  );
  box-shadow:
    0 4px 12px color-mix(in srgb, var(--primary-color) 34%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.28s ease,
    box-shadow 0.28s ease;
}

.bonus-expired-notice-btn-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.bonus-expired-notice-btn:hover,
.bonus-expired-notice-btn:hover .bonus-expired-notice-btn-label,
.bonus-content .bonus-expired-notice-btn:hover,
.bonus-content .bonus-expired-notice-btn:hover .bonus-expired-notice-btn-label,
.content-box .bonus-expired-notice-btn:hover,
.content-box .bonus-expired-notice-btn:hover .bonus-expired-notice-btn-label {
  color: #fff !important;
  border-color: var(--primary-color);
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    color-mix(in srgb, var(--primary-color) 72%, var(--primary-color) 28%) 100%
  );
  box-shadow:
    0 10px 24px color-mix(in srgb, var(--primary-color) 34%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.bonus-expired-notice-btn:hover .bonus-expired-notice-btn-icon {
  color: var(--primary-color);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transform: translateX(3px);
}

.bonus-expired-notice-btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
}

.bonus-expired-notice-btn:active {
  transform: translateY(0);
  box-shadow:
    0 4px 12px color-mix(in srgb, var(--primary-color) 24%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

@media only screen and (max-width: 767px) {
  .bonus-expired-notice-inner {
    padding-top: clamp(28px, 6vw, 36px);
  }

  .bonus-expired-stamp {
    top: 14px;
    right: 14px;
    min-width: 96px;
    padding: 6px 10px;
    font-size: 1rem;
    transform: rotate(-14deg);
    opacity: 0.18;
  }

  .bonus-expired-notice-body {
    max-width: 100%;
  }

  .bonus-expired-notice-row {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .bonus-expired-notice-actions {
    width: 100%;
    justify-content: stretch;
  }

  .bonus-expired-notice-btn {
    width: 100%;
    justify-content: space-between;
    min-height: 40px;
    padding-inline: 16px 10px;
  }

  .bonus-expired-notice-btn-label {
    white-space: normal;
    text-align: left;
  }
}

/* ==================================================
   related（bonus-list 同款卡片 · 桌機 4 · 手機 2）
================================================== */

.section-related {
  background-color: var(--gray-color-900);
}

.section-related-intro {
  margin-bottom: clamp(16px, 2.5vw, 24px);
  text-align: center;
}

.section-related-intro h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  color: #fff;
}

.section-related-intro h2::after {
  content: "";
  display: block;
  width: min(4rem, 18vw);
  height: 3px;
  margin: 0.75rem auto 0;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  opacity: 0.85;
}

.section-related .bonus-box {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.2vw, 20px);
  padding: 0;
}

.section-related .bonus-box .bonus-list {
  background: #fff;
  border: 1px solid var(--gray-color-300);
  color: var(--gray-color-800);
}

.section-related .bonus-box .bonus-list-text,
.section-related .bonus-box .bonus-list-text h3,
.section-related .bonus-box .bonus-list-text h3 a {
  color: var(--gray-color-800);
}

.section-related .bonus-box .bonus-list-text h3 a:hover {
  color: var(--primary-color);
}

.section-related .bonus-box .bonus-list:hover .bonus-list-text h3 a,
.section-related .bonus-box .bonus-list:focus-within .bonus-list-text h3 a {
  color: var(--gray-color-900);
}

@media only screen and (min-width: 768px) {
  .section-related .bonus-box {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media only screen and (max-width: 767px) {
  .section-related .bonus-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .section-related .bonus-box .bonus-list-text {
    padding: 10px 12px;
  }

  .section-related .bonus-box .bonus-list-text h3 {
    font-size: 14px;
  }
}

@media only screen and (max-width: 480px) {
  .section-related .bonus-box {
    gap: 8px;
  }

  .section-related .bonus-box .bonus-list-text h3 {
    font-size: 13px;
    line-height: 1.35;
  }
}

/* ==================================================
   bonus-content
================================================== */
.bonus-content {
  min-height: 350px;
}

@media only screen and (min-width: 768px) {
  .bonus-content {
    display: grid;
    grid-template-columns: minmax(0, 75%) minmax(0, 1fr);
    gap: clamp(12px, 1.4vw, 24px);
    align-items: start;
  }

  .bonus-content-guide {
    position: sticky;
    top: calc(50px + 20px);
    align-self: start;
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    padding-left: clamp(8px, 1.2vw, 16px);
    padding-top: 0;
  }
}

/* list-content 手機版內文與區塊節奏 */
@media only screen and (max-width: 767px) {
  .content-box:has(.bonus-content) {
    padding: clamp(8px, 2.2vw, 12px) clamp(8px, 2.5vw, 12px);
  }

  .main-box:has(.bonus-content) {
    padding-inline: 0;
  }

  .bonus-content {
    min-height: 0;
  }

  .content-extras-mobile {
    padding: clamp(20px, 5vw, 28px) clamp(10px, 3vw, 16px);
  }

  .content-extras-mobile .container {
    padding-inline: 0;
    max-width: 100%;
  }

  .content-extras-mobile .sidebar-section {
    margin-bottom: clamp(18px, 4.5vw, 24px);
  }

  main:has(.bonus-content) .section-related {
    padding-top: clamp(28px, 6vw, 40px);
    padding-bottom: clamp(28px, 6vw, 40px);
  }

  main:has(.bonus-content) .section-related .container {
    padding-inline: clamp(10px, 3vw, 16px);
  }
}

.toc-modal-header {
  display: none;
}

.toc-mobile-modal {
  display: none;
}

@media only screen and (max-width: 767px) {
  .bonus-content .bonus-content-guide {
    display: none !important;
  }

  body.toc-modal-open {
    overflow: hidden;
  }

  .toc-mobile-modal {
    display: block;
    pointer-events: none;
  }

  .toc-mobile-modal.is-open {
    pointer-events: auto;
  }

  .toc-mobile-modal .toc-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  .toc-mobile-modal.is-open .toc-modal-backdrop {
    display: block;
  }

  .toc-mobile-modal .toc-modal-panel {
    display: none;
    position: fixed;
    left: clamp(12px, 4vw, 20px);
    right: clamp(12px, 4vw, 20px);
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 10001;
    max-height: min(72vh, 560px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: clamp(16px, 4vw, 24px);
    background: var(--gray-color-900);
    color: var(--gray-color-50);
    border: 1px solid color-mix(in srgb, var(--gray-color-400) 35%, transparent);
    border-radius: 4px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
  }

  .toc-mobile-modal.is-open .toc-modal-panel {
    display: block;
  }

  .toc-mobile-modal .toc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid
      color-mix(in srgb, var(--gray-color-400) 28%, transparent);
  }

  .toc-mobile-modal .toc-modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
  }

  .toc-mobile-modal .toc-modal-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--gray-color-400) 35%, transparent);
    border-radius: 4px;
    background: transparent;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
  }

  .toc-mobile-modal .toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc-chapter;
  }

  .toc-mobile-modal .toc-item.h2 {
    counter-increment: toc-chapter;
    counter-reset: toc-section;
    margin: 0 0 8px;
  }

  .toc-mobile-modal .toc-item.h2:not(:first-child) {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid
      color-mix(in srgb, var(--gray-color-400) 35%, transparent);
  }

  .toc-mobile-modal .toc-item.h2 a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.45;
    color: #fff;
    border: 1px solid color-mix(in srgb, var(--gray-color-400) 40%, transparent);
    border-radius: 4px;
    background: color-mix(in srgb, #fff 4%, transparent);
  }

  .toc-mobile-modal .toc-item.h2 a::before {
    content: counter(toc-chapter, decimal-leading-zero);
    flex-shrink: 0;
    min-width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-color);
    border: 1px solid color-mix(in srgb, var(--primary-color) 45%, transparent);
    border-radius: 4px;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
  }

  .toc-mobile-modal .toc-item.h3 {
    counter-increment: toc-section;
    position: relative;
    margin: 0 0 4px 14px;
    padding: 0 0 0 16px;
    border-left: 1px solid
      color-mix(in srgb, var(--gray-color-400) 35%, transparent);
  }

  .toc-mobile-modal .toc-item.h3::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 0.72em;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--gray-color-900);
    border: 1px solid color-mix(in srgb, var(--gray-color-400) 50%, transparent);
    box-sizing: border-box;
  }

  .toc-mobile-modal .toc-item.h3 a {
    display: block;
    padding: 6px 8px 6px 2px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-color-200);
  }

  .toc-mobile-modal .toc-item.h3 a::before {
    content: counter(toc-chapter) "." counter(toc-section) " ";
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-color-400);
    margin-right: 4px;
  }

  .toc-mobile-modal .toc-item.h2 a.active {
    color: #fff;
    border-color: var(--primary-color);
  }

  .toc-mobile-modal .toc-item.h2 a.active::before {
    color: #fff;
    background: var(--primary-color);
    border-color: var(--primary-color);
  }

  .toc-mobile-modal .toc-item.h3 a.active {
    color: var(--primary-color);
    font-weight: 600;
  }

  .toc-mobile-modal .toc-item.h3 a.active::before {
    color: var(--primary-color);
  }

  .toc-mobile-modal .toc-item.h3:has(a.active)::before {
    background: var(--primary-color);
    border-color: var(--primary-color);
  }

  .toc-toggle {
    position: fixed;
    z-index: 9998;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--primary-color) 45%, transparent);
    display: none;
    place-items: center;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(
      155deg,
      rgba(14, 22, 48, 0.98),
      rgba(6, 12, 28, 0.99)
    );
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.4),
      0 8px 24px rgba(0, 0, 0, 0.45);
    transition:
      transform 0.25s ease,
      box-shadow 0.25s ease,
      filter 0.25s ease;
  }

  body.has-toc-mobile .toc-toggle {
    display: grid;
  }

  body.toc-modal-open .toc-toggle {
    border-color: var(--primary-color);
    filter: brightness(1.08);
  }

  .toc-toggle svg {
    fill: currentColor;
  }

  .toc-toggle:hover {
    transform: translateY(-2px);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--primary-color) 45%, transparent),
      0 12px 28px rgba(0, 0, 0, 0.5);
  }

  @supports (padding: max(0px)) {
    .toc-mobile-modal .toc-modal-panel {
      bottom: max(16px, env(safe-area-inset-bottom));
    }
  }
}

@media only screen and (min-width: 768px) {
  .toc-toggle,
  .toc-mobile-modal {
    display: none !important;
  }
}

/* ==================================================
   btn 按鈕系統
================================================== */

.btn-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 0.5vw, 10px);
  padding: 10px 0;
}

.btn-box .btn {
  padding: 9px 20px;
  border-radius: 100px;
  font-weight: 700;
}

/* Claim Now 等一般 CTA（非 .btn-primary）— 黑色圓形 + 互動光影 */
.btn-box .btn:not(.btn-primary) {
  position: relative;
  z-index: 0;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: clamp(60px, 4vw, 90px);
  height: clamp(60px, 4vw, 90px);
  padding: 10px;
  box-sizing: border-box;
  border-radius: 50%;
  font-size: clamp(13px, 1vw, 16px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-align: center;
  white-space: normal;
  color: #fff;
  background-color: var(--secondary-color);
  border: 1px solid var(--border-color);

  transition:
    background-color 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.5s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.btn-box .btn:not(.btn-primary)::after {
  content: "";
  position: absolute;
  top: -10%;
  left: -130%;
  width: 45%;
  height: 120%;
  border-radius: 50%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.32) 48%,
    transparent 100%
  );
  transform: skewX(-16deg);
  opacity: 0;
  transition:
    left 0.9s cubic-bezier(0.25, 0.1, 0.25, 1),
    opacity 0.35s ease;
  pointer-events: none;
}

.btn-box .btn:not(.btn-primary):hover {
  color: #fff;
  background-color: var(--primary-color);
  border-color: color-mix(in srgb, var(--primary-color) 70%, #fff);
  box-shadow:
    0 10px 26px color-mix(in srgb, var(--primary-color) 42%, transparent),
    0 0 22px color-mix(in srgb, var(--primary-color) 28%, transparent);
  transform: translateY(-3px) scale(1.05);
  animation: none;
}

.btn-box .btn:not(.btn-primary):hover::after {
  left: 130%;
  opacity: 1;
}

@keyframes btn-claim-ring {
  0%,
  100% {
    box-shadow:
      0 4px 14px rgba(0, 0, 0, 0.22),
      0 0 0 0 color-mix(in srgb, var(--primary-color) 0%, transparent);
  }

  35% {
    box-shadow:
      0 5px 16px rgba(0, 0, 0, 0.24),
      0 0 8px color-mix(in srgb, var(--primary-color) 14%, transparent);
  }

  65% {
    box-shadow:
      0 6px 18px rgba(0, 0, 0, 0.26),
      0 0 14px color-mix(in srgb, var(--primary-color) 22%, transparent);
  }
}

.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 90%;
  padding: clamp(5px, 0.5vw, 8px) 15px;
  border-radius: 100px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  background-color: transparent;
  box-shadow: var(--shadow-s);
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}

.btn:hover {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  color: var(--gray-color-100);
  box-shadow: 0 6px 18px
    color-mix(in srgb, var(--primary-color) 32%, transparent);
  transform: translateY(-1px);
}

.btn-box .btn:not(.btn-primary):active {
  transform: translateY(-1px) scale(1.02);
  box-shadow:
    0 5px 14px color-mix(in srgb, var(--primary-color) 32%, transparent),
    0 0 10px color-mix(in srgb, var(--primary-color) 18%, transparent);
  transition-duration: 0.2s;
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-s);
}

.btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
}

.btn-primary {
  border-color: #fff;
  background: linear-gradient(
    135deg,
    var(--primary-color) 30%,
    var(--primary-color) 100%
  );
  box-shadow: 0 4px 14px
    color-mix(in srgb, var(--primary-color) 28%, transparent);
}

.btn-primary:hover {
  border-color: var(--gray-color-100);
  color: #fff;
  background-color: var(--gray-color-950) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* Dark section CTA（list-content / about / 404 等）— 統一滑過 */
.section-box.section-dark .btn-box {
  gap: 12px;
  flex-wrap: wrap;
}

main:has(.bonus-content) > .section-box.section-dark .btn-box > div:not(:has(.btn)) {
  display: none;
}

.section-box.section-dark .btn-box .btn.btn-primary,
.section-box.section-dark .btn-box a.btn.btn-primary {
  position: relative;
  z-index: 0;
  overflow: hidden;
  isolation: isolate;
  color: #fff !important;
  border: 2px solid var(--primary-color);
  background-color: var(--primary-color) !important;
  background-image: none !important;
  box-shadow:
    0 4px 14px color-mix(in srgb, var(--primary-color) 28%, transparent);
  transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    color 0.35s ease,
    box-shadow 0.4s ease,
    transform 0.3s ease;
}

.section-box.section-dark .btn-box .btn.btn-primary::after,
.section-box.section-dark .btn-box a.btn.btn-primary::after {
  content: "";
  position: absolute;
  top: -15%;
  left: -130%;
  width: 42%;
  height: 130%;
  border-radius: 50%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 48%,
    transparent 100%
  );
  transform: skewX(-16deg);
  opacity: 0;
  transition:
    left 0.85s cubic-bezier(0.25, 0.1, 0.25, 1),
    opacity 0.3s ease;
  pointer-events: none;
}

.section-box.section-dark .btn-box .btn.btn-primary:hover,
.section-box.section-dark .btn-box a.btn.btn-primary:hover {
  color: var(--primary-color) !important;
  background-color: var(--gray-color-950) !important;
  background-image: none !important;
  border-color: var(--primary-color) !important;
  transform: translateY(-3px);
  box-shadow:
    0 10px 28px color-mix(in srgb, var(--primary-color) 28%, transparent),
    0 0 14px color-mix(in srgb, var(--primary-color) 18%, transparent);
}

.section-box.section-dark .btn-box .btn.btn-primary:hover::after,
.section-box.section-dark .btn-box a.btn.btn-primary:hover::after {
  left: 125%;
  opacity: 1;
}

.section-box.section-dark .btn-box .btn.btn-primary:active,
.section-box.section-dark .btn-box a.btn.btn-primary:active {
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition-duration: 0.01ms;
  }

  .btn-box .btn:not(.btn-primary) {
    animation: none;
  }

  .btn-box .btn:not(.btn-primary)::after {
    display: none;
  }

  .btn:hover,
  .btn-primary:hover,
  .btn-box .btn:not(.btn-primary):hover,
  .section-box.section-dark .btn-box .btn.btn-primary:hover,
  .section-box.section-dark .btn-box a.btn.btn-primary:hover {
    transform: none;
  }

  .section-box.section-dark .btn-box .btn.btn-primary,
  .section-box.section-dark .btn-box a.btn.btn-primary,
  .section-box.section-dark .btn-box .btn.btn-primary::after,
  .section-box.section-dark .btn-box a.btn.btn-primary::after {
    transition: none;
  }

  .section-box.section-dark .btn-box .btn.btn-primary::after,
  .section-box.section-dark .btn-box a.btn.btn-primary::after {
    display: none;
  }
}

/* ==================================================
   lazy
================================================== */

/* 你已經有 class="lazy"，直接用它 */
img.lazy {
  display: block;
  max-width: 100%;
  height: auto;
  opacity: 1;
}

/* 載入完成 */
img.lazy.is-loaded {
}

/* 載入失敗 */
img.lazy.is-error {
  opacity: 1;
  transform: none;
  filter: grayscale(1);
}

/* 如果你的 loading.png 比較刺眼，可以加一點柔化（可刪） */
img.lazy:not(.is-loaded) {
  filter: blur(2px);
}

img.lazy.is-loaded {
  filter: none;
}

/* ==================================================
   about
================================================== */

.about-list {
  display: flex;
  align-items: center;
  border-radius: 4px;
  overflow: hidden;
  background-color: #000;
  background-repeat: no-repeat;
  background-size: cover;
  background-color: var(--gray-color-100);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  margin-bottom: 2vw;
}

.about-text {
  padding: clamp(20px, 2vw, 40px);
  text-align: left;
}

.about-text a {
  color: #000;
  font-weight: 700;
  text-decoration: underline;
}

.about-text a:hover {
  color: var(--third-color);
}

@media only screen and (min-width: 767px) {
  .about-list {
    color: #000;
    overflow: hidden;
  }

  .about-list:nth-child(2n) {
    /* flex-direction: row-reverse; */
  }

  .about-pic {
    width: 65%;
  }

  .about-text {
    width: 35%;
  }
}

@media only screen and (max-width: 767px) {
  .about-list {
    flex-direction: column-reverse;
    overflow: hidden;
  }

  .about-list h3 {
    text-align: center;
  }

  .mobile-center {
    text-align: center;
  }
}

/* ==================================================
   footer — 一排三區塊
================================================== */

.site-footer {
  padding-block: clamp(20px, 3vw, 32px);
  padding-inline: 0;
  font-size: 13px;
  color: var(--gray-color-300);
  background: var(--header-color);
  border-top: 1px solid
    color-mix(in srgb, var(--gray-color-600) 80%, transparent);
}

.footer-row {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 2fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(16px, 3vw, 40px);
}

.footer-block {
  min-width: 0;
}

.footer-brand {
  padding-right: clamp(8px, 2vw, 24px);
  border-right: 1px solid
    color-mix(in srgb, var(--gray-color-600) 55%, transparent);
}

.footer-logo {
  display: inline-block;
  margin-bottom: 10px;
  line-height: 0;
}

.footer-logo img {
  height: 32px;
  width: auto;
}

.footer-about {
  margin: 0;
  max-width: 36em;
  font-size: 14px;
  line-height: 1.65;
  color: var(--gray-color-400);
}

.footer-block-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-color-400);
}

.footer-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Explore：寬度為 Legal 2 倍，連結每排 2 個 */
.footer-block-explore ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px clamp(10px, 1.5vw, 16px);
}

.footer-block-explore a,
.footer-block-legal a {
  display: inline-block;
  padding: 0;
  font-size: clamp(13px, 0.95vw, 15px);
  font-weight: 500;
  line-height: 1.45;
  color: color-mix(in srgb, var(--gray-color-100) 94%, var(--gray-color-300));
  text-decoration: none;
  white-space: normal;
  transition:
    color 0.28s ease,
    transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.footer-block-explore a:hover,
.footer-block-legal a:hover,
.footer-block-explore a:focus-visible,
.footer-block-legal a:focus-visible {
  color: var(--primary-color);
  transform: translateX(2px);
  text-decoration: none;
}

.footer-block-explore a:active,
.footer-block-legal a:active {
  transform: translateX(1px) scale(0.99);
  transition-duration: 0.12s;
}

/* Legal：直向排列 */
.footer-block-legal ul {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.site-footer a {
  color: var(--gray-color-200);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer .footer-logo {
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.site-footer .footer-logo:hover,
.site-footer .footer-logo:focus-visible {
  opacity: 0.92;
  transform: translateY(-1px);
}

@media only screen and (max-width: 767px) {
  .footer-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .footer-brand {
    padding-right: 0;
    padding-bottom: 14px;
    border-right: none;
    border-bottom: 1px solid
      color-mix(in srgb, var(--gray-color-600) 55%, transparent);
  }

  .footer-block-explore ul {
    gap: 4px 12px;
  }
}

@media only screen and (min-width: 768px) {
  .footer-row {
    grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 1fr);
  }

  .footer-logo img {
    height: 44px;
  }

  .footer-about {
    font-size: clamp(15px, 1.1vw, 16px);
    line-height: 1.7;
  }

  .footer-block-title {
    margin-bottom: 10px;
    font-size: 12px;
  }

  .footer-block-explore a,
  .footer-block-legal a {
    font-size: clamp(14px, 0.9vw, 15px);
  }

  .footer-block-explore ul {
    gap: 5px clamp(12px, 1.5vw, 20px);
  }

  .footer-block-legal ul {
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-block-explore a,
  .footer-block-legal a,
  .site-footer .footer-logo {
    transition-duration: 0.01ms;
  }

  .footer-block-explore a:hover,
  .footer-block-legal a:hover,
  .footer-block-explore a:focus-visible,
  .footer-block-legal a:focus-visible {
    transform: none;
  }
}

.social-menu ul {
  margin: 0;
  padding: 5px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  gap: clamp(10px, 1.2vw, 30px);
}

.social-menu ul li a {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.social-menu ul li i {
  width: 42px;
  aspect-ratio: auto 1 / 1;
  align-content: center;
  font-size: 25px;
  border-radius: 4px;
  background-color: var(--gray-color-100);
  color: var(--gray-color-500);
  display: flex;
  justify-content: center;
  align-items: center;
}

.social-menu ul li a:hover i {
  background-color: var(--primary-color);
  color: #fff;
}

@media only screen and (max-width: 767px) {
  .social-menu .label {
    display: none;
  }
}

/* ==================================================
   左下角浮動廣告（圖檔 + 關閉）
================================================== */

.float-promo {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  margin: 0;
  max-width: min(100px, 32vw);
  line-height: 1.2;
  border-radius: var(--radius-s);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.float-promo-close {
  width: 100%;
  margin: 0;
  padding: 6px 8px;
  border: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, #ff9a4d 0%, #d9783d 100%);
}

.float-promo-close:hover,
.float-promo-close:focus-visible {
  filter: brightness(1.06);
  outline: none;
}

.float-promo-close:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.float-promo-close-icon {
  font-size: 0.95em;
  line-height: 1;
}

.float-promo-link {
  display: block;
  line-height: 0;
}

.float-promo-img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

@supports (padding: max(0px)) {
  .float-promo {
    left: max(12px, env(safe-area-inset-left));
    bottom: max(12px, env(safe-area-inset-bottom));
  }
}
