:root {
  --pink: #ea27c2;
  --pink-soft: #fdeaf9;
  --text: #000;
  --muted: #4c4c4c;
  --panel: #f4f4f4;
  --background: #fff;
  --border: #ececec;
  --desktop-width: 960px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5rem;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--background);
  border-bottom: 1px solid var(--pink);
  transition: transform 0.25s ease;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logo-link img {
  width: 140px;
  height: auto;
}

.desktop-header {
  display: none;
}

.mobile-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 20px;
}

.menu-toggle,
.menu-close,
.toc-toggle {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.menu-toggle {
  position: absolute;
  left: 20px;
  top: 50%;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 4px;
  transform: translateY(-50%);
}

.menu-toggle img,
.menu-close img {
  width: 24px;
  height: 24px;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.mobile-menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.mobile-menu-panel {
  position: relative;
  left: 0;
  width: min(78vw, 320px);
  min-height: 100%;
  background: var(--background);
  padding: 11px 20px 30px;
  margin-right: auto;
  margin-left: 0;
  text-align: left !important;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
}

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

.mobile-menu.is-open .mobile-menu-overlay {
  opacity: 1;
}

.mobile-menu.is-open .mobile-menu-panel {
  transform: translateX(0);
}

.menu-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 4px;
}

.mobile-menu nav {
  display: grid;
  width: 100%;
  justify-items: start;
  justify-content: start;
  gap: 28px;
  margin-top: 40px;
  text-align: left !important;
}

.mobile-menu a {
  display: block;
  width: max-content;
  max-width: 100%;
  justify-self: start;
  margin-right: auto;
  margin-left: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5rem;
  text-align: left !important;
}

.mobile-menu a.active {
  color: var(--pink);
}

.page-shell {
  width: 100%;
  padding: 18px 20px 36px;
}

.article {
  width: 100%;
  max-width: var(--desktop-width);
  margin: 0 auto;
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
  text-align: center;
}

h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5rem;
}

.category > h2::before,
.faq > h2::before,
.recommend > h2::before {
  content: "";
  flex: 0 0 6px;
  width: 6px;
  height: 18px;
  background: var(--pink);
}

h3 {
  margin-bottom: 12px;
  color: var(--pink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5rem;
}

p {
  margin-bottom: 16px;
}

.intro > p:not(.source) {
  margin-top: 12px;
  margin-bottom: 12px;
  line-height: 1.5rem;
}

.item > p:not(.source) {
  margin-top: 12px;
  margin-bottom: 16px;
}

.intro > p:not(.source),
.toc ul,
.toc li,
.toc a,
.item > h3,
.item > p:not(.source),
.info-box p,
.qa h3,
.qa p,
.author-card h3,
.author-card p {
  text-align: left;
}

.intro,
.toc,
.category,
.faq,
.author-card,
.recommend {
  margin-bottom: 34px;
}

.intro {
  margin-bottom: 20px;
}

.toc {
  margin-bottom: 24px;
}

.category {
  margin-bottom: 40px;
}

.faq,
.author-card {
  margin-bottom: 40px;
}

.recommend {
  margin-bottom: 0;
}

.source {
  margin: 8px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5rem;
  text-align: center;
}

.source a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.image-pair,
.image-layout,
.recommend-grid,
.product-grid {
  display: grid;
  width: 100%;
  overflow: hidden;
}

.image-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.image-pair img,
.image-layout img,
.recommend-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.layout-tall-left {
  grid-template-columns: 1.05fr 0.95fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.layout-tall-left img:first-child {
  grid-row: 1 / span 2;
}

.layout-wide {
  grid-template-columns: 1fr 1.35fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.layout-wide img:nth-child(3) {
  grid-row: 1 / span 2;
  grid-column: 2;
}

.toc {
  padding: 30px 24px 16px;
  background: var(--pink-soft);
}

.toc-head h2 {
  margin-bottom: 20px;
}

.toc-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  color: var(--text);
  text-align: left;
}

.toc-category {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5rem;
  cursor: default;
}

.toc-toggle {
  display: inline-flex;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  align-self: center;
  align-items: center;
  justify-content: center;
  line-height: 0;
  padding: 0;
}

.toc-icon {
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-4px);
}

.toc ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 0 10px 18px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    opacity 0.2s ease;
}

.toc-group.is-open ul {
  max-height: var(--toc-list-height, 320px);
  opacity: 1;
}

.toc a {
  display: block;
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
}

.toc a:hover,
.toc a:focus-visible,
.cta:hover,
.cta:focus-visible {
  color: var(--pink);
}

.category {
  display: grid;
  gap: 24px;
}

.category > h2 {
  margin-bottom: -16px;
}

.item {
  scroll-margin-top: 72px;
}

.item + .item {
  padding-top: 6px;
}

.item-banner img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.info-box {
  display: grid;
  justify-items: start;
  gap: 4px;
  padding: 16px;
  border-radius: 16px;
  background: var(--panel);
  text-align: left;
}

.info-box p {
  margin: 0;
}

.cta {
  display: flex;
  width: fit-content;
  align-items: center;
  justify-self: start;
  margin-right: auto;
  margin-left: 0;
  gap: 6px;
  color: var(--pink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5rem;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cta img {
  width: 16px;
  height: 16px;
}

.faq {
  display: grid;
  gap: 16px;
}

.faq > h2 {
  margin-bottom: 8px;
}

.qa h3 {
  margin-bottom: 8px;
  padding: 10px 20px 10px 16px;
  border-radius: 10px;
  background: var(--pink-soft);
  color: var(--text);
  font-size: 15px;
  font-weight: 400;
}

.qa p {
  margin-bottom: 0;
  padding: 0 0 0 16px;
}

.author-card {
  display: grid;
  grid-template-columns: 60px 1fr;
  align-items: center;
  row-gap: 4px;
  column-gap: 12px;
  padding: 14px;
  border: 1px solid var(--pink);
  border-radius: 20px;
  background: var(--pink-soft);
}

.author-card > div {
  display: contents;
}

.author-card img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.author-card h3 {
  align-self: center;
  margin-bottom: 4px;
  color: var(--pink);
  font-size: 16px;
  line-height: 1.5rem;
}

.author-card p {
  grid-column: 1 / -1;
  margin: 0;
}

.recommend h2 {
  margin-bottom: 24px;
}

.PD_layout h3,
.PD_layout h4,
.PD_layout p {
  margin: 0;
}

.article .PD_layout .PD_into p {
  overflow: visible;
  line-height: 1.2;
}

.PD_layout {
  margin: 0 auto;
}

.PD_layout .PD_wrapper {
  border: 1px solid #d1d1d1;
}

.PD_layout .PD_slide {
  background: #fff;
  border-color: #d1d1d1;
}

.PD_layout .PD_img img {
  margin: 0 auto;
}

.recommend-grid {
  gap: 10px;
}

.recommend-grid img {
  height: auto;
}

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

.product-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--background);
}

.product-thumb {
  display: grid;
  aspect-ratio: 1.25 / 1;
  place-items: center;
  background: var(--pink-soft);
  color: var(--pink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5rem;
}

.product-card strong,
.product-card span,
.product-card b {
  min-width: 0;
  overflow-wrap: anywhere;
}

.product-card strong {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5rem;
}

.product-card span:not(.product-thumb) {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5rem;
}

.product-card b {
  color: var(--pink);
  font-size: 15px;
  line-height: 1.5rem;
}

.site-footer {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 767px) {
  body .mobile-menu .mobile-menu-panel,
  body .mobile-menu .mobile-menu-panel nav,
  body .mobile-menu .mobile-menu-panel nav a {
    text-align: left !important;
  }

  body .mobile-menu .mobile-menu-panel {
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  body .mobile-menu .mobile-menu-panel nav {
    place-items: start !important;
    justify-content: start !important;
  }

  body .mobile-menu .mobile-menu-panel nav a {
    justify-self: start !important;
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  .image-pair {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .layout-tall-left img,
  .layout-wide img,
  .image-pair img {
    aspect-ratio: auto;
  }
}

@media (min-width: 768px) {
  body {
    font-size: 18px;
    line-height: 1.8;
  }

  .mobile-header,
  .mobile-menu {
    display: none;
  }

  .desktop-header {
    display: block;
    min-height: 0;
    padding: 0;
  }

  .desktop-header .logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
  }

  .desktop-header .logo-link img {
    width: 200px;
  }

  .desktop-nav {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    gap: 34px;
    border-top: 1px solid var(--pink);
  }

  .desktop-nav a {
    padding: 12px 4px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5rem;
  }

  .desktop-nav a.active {
    color: var(--pink);
  }

  .page-shell {
    padding: 30px 50px 52px;
  }

  h1 {
    margin-bottom: 24px;
    font-size: 28px;
    line-height: 44px;
  }

  h2 {
    margin-bottom: 20px;
    font-size: 24px;
    line-height: 1.5rem;
  }

  .category > h2::before,
  .faq > h2::before,
  .recommend > h2::before {
    flex-basis: 10px;
    width: 10px;
    height: 24px;
  }

  .category {
    gap: 36px;
  }

  .item > p:not(.source) {
    margin-top: 16px;
    margin-bottom: 20px;
  }

  h3 {
    margin-bottom: 16px;
    font-size: 20px;
    line-height: 1.5rem;
  }

  .intro,
  .toc,
  .category,
  .faq,
  .author-card,
  .recommend {
    margin-bottom: 42px;
  }

  .intro {
    margin-bottom: 24px;
  }

  .category {
    margin-bottom: 60px;
  }

  .toc {
    margin-bottom: 40px;
  }

  .faq,
  .author-card {
    margin-bottom: 60px;
  }

  .recommend {
    margin-bottom: 0;
  }

  .recommend h2 {
    margin-bottom: 40px;
  }

  .faq {
    gap: 24px;
  }

  .faq > h2 {
    margin-bottom: 20px;
  }

  .intro > p:not(.source) {
    margin-top: 16px;
  }

  .hero-images {
    max-height: 500px;
  }

  .image-pair {
    max-height: 500px;
  }

  .layout-tall-left,
  .layout-wide {
    height: 500px;
  }

  .item-banner img {
    border-radius: 20px;
  }

  .toc {
    padding: 40px 30px 20px;
  }

  .toc-head h2 {
    margin-bottom: 24px;
  }

  .toc-category {
    font-size: 20px;
    line-height: 1.5rem;
  }

  .toc-row {
    padding: 8px 0;
  }

  .toc a {
    font-size: 18px;
    line-height: 1;
  }

  .source {
    margin: 12px 0;
    font-size: 14px;
    line-height: 1.5rem;
  }

  .article p:not(.source),
  .info-box p,
  .qa p,
  .author-card p {
    line-height: 1.8;
  }

  .cta {
    font-size: 20px;
    line-height: 1.5rem;
  }

  .item {
    scroll-margin-top: 138px;
  }

  .info-box {
    padding: 24px;
    border-radius: 20px;
  }

  .qa h3 {
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 400;
  }

  .qa p {
    padding: 0 0 0 20px;
  }

  .author-card {
    grid-template-columns: 126px 1fr;
    align-items: center;
    gap: 24px;
    padding: 18px;
  }

  .author-card > div {
    display: block;
  }

  .author-card img {
    width: 126px;
    height: 126px;
  }

  .author-card h3 {
    font-size: 20px;
    line-height: 1.5rem;
  }

  .author-card p {
    grid-column: auto;
  }

  .recommend-grid,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-grid {
    gap: 16px;
  }

  .product-card {
    padding: 14px;
  }

  .product-thumb {
    font-size: 18px;
    line-height: 1.5rem;
  }

  .product-card strong {
    font-size: 18px;
    line-height: 1.5rem;
  }

  .product-card span:not(.product-thumb),
  .product-card b {
    font-size: 18px;
    line-height: 1.5rem;
  }
}

@media (min-width: 1280px) {
  .desktop-header {
    position: relative;
    display: flex;
    min-height: 72px;
    align-items: center;
    padding: 0 72px;
  }

  .desktop-header .logo-link {
    justify-content: flex-start;
    padding: 0;
    position: relative;
    z-index: 1;
  }

  .desktop-nav {
    position: absolute;
    left: 50%;
    top: 50%;
    min-height: 0;
    border-top: 0;
    border-bottom: 0;
    transform: translate(-50%, -50%);
  }
}
