@layer theme-custom {
/* BLOG-REDESIGN-2026-07-11 START */

/* 隱藏搜尋、最新文章與 Tag；保留分類 */
body.b_blog_list #tab-side {
  display: block !important;
  flex: 0 0 100%;
  max-width: 100%;
  order: 1;
  padding: 0 20px;
}

body.b_blog_list #tab-home {
  flex: 0 0 100%;
  max-width: 100%;
  order: 2;
}

body.b_blog_list #tab-home > section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

body.b_blog_list #tab-side aside {
  max-width: 1180px;
  margin: 0 auto;
}

body.b_blog_list #tab-side aside > .form-group,
body.b_blog_list #tab-side aside > .article-group,
body.b_blog_list #tab-side aside > .tag-group {
  display: none;
}

/* 手機：分類可左右滑動 */
body.b_blog_list #tab-side aside > ul {
  display: flex;
  gap: 10px;
  margin: 0 auto 28px;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  white-space: nowrap;
}

body.b_blog_list #tab-side aside > ul li {
  flex: 0 0 auto;
}

body.b_blog_list #tab-side aside > ul a {
  display: block;
  padding: 10px 18px;
  border-radius: 999px;
  background: #f3f0fa;
  color: #7255c8;
  font-weight: 700;
  text-decoration: none;
}

/* 文章列表卡片 */
body.b_blog_list .blog-row .row {
  background: #ffffff;
  border: 1px solid #e8e2f3;
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 24px;
  align-items: center;
}

body.b_blog_list .blog-row .row picture img {
  display: block;
  border-radius: 14px;
}

body.b_blog_list .blog-row .row > div:last-child {
  padding-left: 24px;
}

/* 桌機：分類改為左側直式 */
@media (min-width: 769px) {
  body.b_blog_list #tab-side {
    flex: 0 0 220px;
    max-width: 220px;
    padding: 0;
  }

  body.b_blog_list #tab-home {
    flex: 1 1 0;
    max-width: calc(100% - 220px);
  }

  body.b_blog_list #tab-side aside {
    margin: 0;
  }

  body.b_blog_list #tab-side aside > ul {
    flex-direction: column;
    gap: 4px;
    margin: 0;
    overflow: visible;
    white-space: normal;
  }

  body.b_blog_list #tab-side aside > ul li {
    width: 100%;
  }

  body.b_blog_list #tab-side aside > ul a {
    padding: 12px 14px;
    border-radius: 12px;
  }
}

/* 手機：文章卡片調整 */
@media (max-width: 768px) {
  body.b_blog_list #tab-home > section {
    padding: 0 20px;
  }

  body.b_blog_list .blog-row .row {
    padding: 14px;
    margin-bottom: 16px;
  }

  body.b_blog_list .blog-row .row > div:last-child {
    padding-top: 14px;
    padding-left: 0;
  }
}

/* BLOG-REDESIGN-2026-07-11 END */
/* PRODUCT-REDESIGN-2026-07-11 START */

/* 商品頁：桌機側欄比例 */
#tab-side:has(~ #tab-home .product-group) {
  flex: 0 0 230px;
  max-width: 230px;
}

#tab-home:has(.product-group) {
  flex: 1 1 0;
  max-width: calc(100% - 230px);
}

#tab-home:has(.product-group) > section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 商品分類 */
#tab-side:has(~ #tab-home .product-group) .sideBar-menu {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

#tab-side:has(~ #tab-home .product-group) .sidebar-item > a:first-child {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f3f0fa;
  color: #7255c8;
  font-weight: 700;
  text-decoration: none;
}

/* Tag：整理成容易閱讀的直式選單 */
#tab-side:has(~ #tab-home .product-group) .tag-group {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e8e2f3;
}

#tab-side:has(~ #tab-home .product-group) .tag-group::before {
  content: "依主題探索";
  display: block;
  margin-bottom: 10px;
  color: #7255c8;
  font-size: 14px;
  font-weight: 700;
}

#tab-side:has(~ #tab-home .product-group) .article-tag {
  display: block;
  margin: 0 0 6px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #faf9fd;
  color: #5f5a6d;
  font-size: 14px;
  text-decoration: none;
}

#tab-side:has(~ #tab-home .product-group) .article-tag:hover {
  background: #f0ebfb;
  color: #7255c8;
}

/* 商品卡片 */
#tab-home:has(.product-group) > section > .row {
  row-gap: 28px;
}

#tab-home:has(.product-group) > section > .row > [class*="col"] {
  margin-bottom: 0 !important;
}

#tab-home:has(.product-group) .product-group {
  color: inherit;
  text-decoration: none;
}

#tab-home:has(.product-group) > section > .row > [class*="col"] > .product-group {
  height: 100%;
  overflow: hidden;
  border: 1px solid #e8e2f3;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(86, 67, 130, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#tab-home:has(.product-group) > section > .row > [class*="col"] > .product-group:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(86, 67, 130, 0.14);
}

#tab-home:has(.product-group) .img-box {
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #f8f7fb;
}

#tab-home:has(.product-group) .img-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#tab-home:has(.product-group) .text-box {
  padding: 16px 18px 20px;
}

#tab-home:has(.product-group) .text-box h3 {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 10px;
  color: #34303f;
  font-size: 18px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#tab-home:has(.product-group) .price-row {
  margin-bottom: 10px;
  color: #7255c8;
  font-size: 17px;
  font-weight: 700;
}

#tab-home:has(.product-group) .text-box p {
  display: -webkit-box;
  overflow: hidden;
  color: #77717f;
  font-size: 14px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* 手機：保留兩欄商品，分類與 Tag 橫向滑動 */
@media (max-width: 768px) {
  #tab-side:has(~ #tab-home .product-group),
  #tab-home:has(.product-group) {
    flex: 0 0 100%;
    max-width: 100%;
  }

  #tab-side:has(~ #tab-home .product-group) {
    padding: 0 20px;
  }

  #tab-home:has(.product-group) > section {
    padding: 0 20px;
  }

  #tab-side:has(~ #tab-home .product-group) .sideBar-menu,
  #tab-side:has(~ #tab-home .product-group) .tag-group {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
  }

  #tab-side:has(~ #tab-home .product-group) .tag-group::before {
    display: none;
  }

  #tab-side:has(~ #tab-home .product-group) .sideBar-menu li,
  #tab-side:has(~ #tab-home .product-group) .article-tag {
    flex: 0 0 auto;
  }

  #tab-home:has(.product-group) .text-box {
    padding: 12px;
  }

  #tab-home:has(.product-group) .text-box h3 {
    font-size: 15px;
  }

  #tab-home:has(.product-group) .text-box p {
    display: none;
  }
}
/* PRODUCT-REDESIGN-2026-07-11 END */
/* 商品頁左側 Tag 新版 */
body:has(#tab-home .product-group) #tab-side .tag-group {
  border: 0 !important;
  background: transparent !important;
  padding: 16px 0 !important;
}

body:has(#tab-home .product-group) #tab-side .tag-group::before {
  content: "依主題探索" !important;
  display: block !important;
  margin-bottom: 10px !important;
  color: #7255c8 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

body:has(#tab-home .product-group) #tab-side .article-tag {
  display: block !important;
  margin: 6px 0 !important;
  padding: 9px 12px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #faf9fd !important;
  color: #5f5a6d !important;
  font-size: 14px !important;
  text-decoration: none !important;
}

body:has(#tab-home .product-group) #tab-side .article-tag::before {
  content: "" !important;
  display: none !important;
}
/* VIDEO-REDESIGN-2026-07-11 START */

/* 左側分類與 Tag */
body.b_video_list #tab-side .sideBar-menu {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

body.b_video_list #tab-side .sideBar-menu a {
  display: block;
  margin-bottom: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #faf9fd;
  color: #5f5a6d;
  font-weight: 700;
  text-decoration: none;
}

body.b_video_list #tab-side .tag-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 18px;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid #e8e2f3;
  background: transparent;
}

body.b_video_list #tab-side .tag-group::before {
  content: "依主題探索" !important;
  grid-column: 1 / -1;
  color: #7255c8;
  font-size: 14px;
  font-weight: 700;
}

body.b_video_list #tab-side .article-tag {
  margin: 0;
  padding: 9px 6px;
  border-radius: 10px;
  background: #faf9fd;
  color: #5f5a6d;
  font-size: 13px;
  text-align: center;
  text-decoration: none;
}

body.b_video_list #tab-side .article-tag::before {
  content: "" !important;
  display: none !important;
}

/* 影音卡片 */
body.b_video_list .video-block {
  height: 100%;
}

body.b_video_list .video-block > a {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid #e8e2f3;
  border-radius: 18px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(86, 67, 130, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.b_video_list .video-block > a:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(86, 67, 130, 0.14);
}

body.b_video_list .video-block .img-box {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #f8f7fb;
}

body.b_video_list .video-block .img-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.b_video_list .video-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 76px;
  margin: 0;
  padding: 16px 18px 18px;
  color: #34303f;
  font-size: 18px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* 手機 */
@media (max-width: 768px) {
  body.b_video_list #tab-side .sideBar-menu,
  body.b_video_list #tab-side .tag-group {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    white-space: nowrap;
  }

  body.b_video_list #tab-side .tag-group::before {
    display: none;
  }

  body.b_video_list #tab-side .sideBar-menu li,
  body.b_video_list #tab-side .article-tag {
    flex: 0 0 auto;
  }

  body.b_video_list .video-title {
    min-height: 64px;
    padding: 12px;
    font-size: 15px;
  }
}
/* VIDEO-REDESIGN-2026-07-11 END */
body.b_video_list #tab-side .tag-group {
  display: none !important;
}
/* ANIMATION-PASTEL-2026-07-11 START */

/* 僅套用在泡劇場動畫頁 */
body.blank-page:has(img[alt="泡泡家族成員"]) .index-editor {
  padding: 56px 0;
  background: #fffdf7;
}

/* 頁面標題 */
body.blank-page:has(img[alt="泡泡家族成員"]) .page-title .title {
  border: 0;
  border-radius: 999px;
  background: #e8f6ff;
  color: #4c7da7;
  padding: 12px 24px;
}

/* 角色介紹：粉藍＋粉紅 */
body.blank-page:has(img[alt="泡泡家族成員"]) .index-editor .row:first-child {
  align-items: center;
  margin: 0 0 36px;
  padding: 32px;
  border-radius: 24px;
  background: linear-gradient(135deg, #e8f6ff 0%, #fff0f6 100%);
}

body.blank-page:has(img[alt="泡泡家族成員"]) .index-editor .row:first-child img {
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(90, 130, 170, 0.15);
}

body.blank-page:has(img[alt="泡泡家族成員"]) .index-editor .row:first-child h3 {
  color: #5b78a7;
  font-size: 30px;
}

body.blank-page:has(img[alt="泡泡家族成員"]) .index-editor .row:first-child p {
  color: #5d5a67;
  line-height: 1.9;
}

/* 影片卡片 */
body.blank-page:has(img[alt="泡泡家族成員"]) .index-editor .row:has(.embed-responsive) {
  margin-bottom: 28px;
}

body.blank-page:has(img[alt="泡泡家族成員"]) .index-editor .row:has(.embed-responsive) > .col-md-6 {
  padding: 12px;
}

body.blank-page:has(img[alt="泡泡家族成員"]) .index-editor .embed-responsive {
  overflow: hidden;
  border-radius: 18px 18px 0 0;
}

body.blank-page:has(img[alt="泡泡家族成員"]) .index-editor .display {
  min-height: 74px;
  padding: 12px 16px;
  border-radius: 0 0 18px 18px;
  background: #e8f6ff;
}

body.blank-page:has(img[alt="泡泡家族成員"]) .index-editor .row:has(.embed-responsive) > .col-md-6:nth-child(even) .display {
  background: #fff0f6;
}

body.blank-page:has(img[alt="泡泡家族成員"]) .index-editor .row:has(.embed-responsive):last-of-type .display {
  background: #fff7c9;
}

body.blank-page:has(img[alt="泡泡家族成員"]) .index-editor .display h1 {
  margin: 0;
  color: #555060;
  font-size: 19px;
  line-height: 1.45;
}

/* 手機 */
@media (max-width: 768px) {
  body.blank-page:has(img[alt="泡泡家族成員"]) .index-editor {
    padding: 28px 0;
  }

  body.blank-page:has(img[alt="泡泡家族成員"]) .index-editor .row:first-child {
    margin: 0 16px 24px;
    padding: 20px;
  }

  body.blank-page:has(img[alt="泡泡家族成員"]) .index-editor .row:has(.embed-responsive) {
    margin: 0 8px 18px;
  }
}
/* ANIMATION-PASTEL-2026-07-11 END */
}
