/* 新增的服務說明獨立成檔，沿用全站字體、配色及紙張語言。 */
.service-details {
  margin-top: clamp(90px, 9.5vw, 184px);
  color: var(--ink);
  text-align: center;
}

.service-heading {
  width: min(29vw, 560px);
  margin: 0 auto;
  padding: clamp(12px, 1.15vw, 22px) clamp(16px, 1.6vw, 30px);
  border: clamp(5px, .48vw, 9px) solid var(--ink);
  border-radius: clamp(20px, 1.8vw, 34px);
  background: var(--white);
  box-shadow: clamp(6px, .6vw, 11px) clamp(6px, .6vw, 11px) 0 var(--ink);
  font-family: var(--font-main);
  font-size: clamp(32px, 4.15vw, 80px);
  font-weight: 900;
  line-height: 1.12;
  text-wrap: balance;
}

.service-copy {
  width: min(88%, 1260px);
  margin-inline: auto;
  color: var(--ink);
  font-family: var(--font-main);
  font-size: var(--body-copy-size);
  font-weight: var(--body-copy-weight);
  line-height: var(--body-copy-leading);
  text-wrap: pretty;
}

.service-copy p { margin: 0; }
.service-details section { scroll-margin-top: 110px; }
.service-intro { margin-top: clamp(42px, 4.7vw, 90px); }

.style-marquee {
  margin: clamp(25px, 2.6vw, 50px) 0 clamp(30px, 3vw, 56px);
  overflow: hidden;
}

.style-marquee-track {
  display: flex;
  width: max-content;
  animation: service-marquee-travel 34s linear infinite;
}

.style-marquee-group {
  flex: none;
  padding-right: clamp(30px, 3vw, 60px);
}

.style-marquee img {
  width: auto;
  max-width: none;
  height: clamp(100px, 10.5vw, 204px);
}

.service-outline {
  --outlined-copy-weight: 900; /* 這行強調文字使用最粗字重，其他共用樣式文字維持原字重。 */
  margin-bottom: 4px !important;
  font-size: clamp(22px, 2.5vw, 48px);
  line-height: 1.55;
}
.service-outline span { display: inline-block; white-space: nowrap; }

.editing-impact { margin-top: clamp(100px, 12vw, 230px); }
.impact-intro { margin-top: clamp(38px, 3.6vw, 70px); }
.impact-intro p + p { margin-top: clamp(35px, 3.5vw, 68px); }
.impact-turn { font-size: 1.3em; }

.editing-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(30px, 2.7vw, 52px);
  width: min(41vw, 790px);
  margin: clamp(42px, 4vw, 78px) auto 0;
  perspective: 1200px;
}

.comparison-indicator {
  display: block;
  width: clamp(64px, 5.7vw, 110px);
  height: clamp(64px, 5.7vw, 110px);
  margin: 0 auto clamp(20px, 1.8vw, 35px);
}
.comparison-item { display: grid; grid-template-rows: auto 1fr; }
.comparison-row-heading { display: none; }

.comparison-check img { width: 100%; height: 100%; }

.comparison-card {
  padding: clamp(24px, 2.5vw, 48px) clamp(20px, 2.5vw, 48px) clamp(24px, 2.8vw, 54px);
  border: 2px dashed var(--ink);
  border-radius: clamp(20px, 1.5vw, 29px);
  background: #f8f8f8;
  text-align: left;
}

.comparison-after {
  border: 7px solid var(--white);
  outline: 2px dashed var(--ink);
  outline-offset: -1px;
  background: #ffe18a;
  padding-inline: calc(clamp(20px, 2.5vw, 48px) - 5px);
}

.comparison-video-link {
  position: relative;
  display: block;
  width: 100%;
  border: 4px solid var(--ink);
  border-radius: 4px;
  transform-origin: center;
  transition: transform 260ms var(--ease-out-expo), box-shadow 260ms var(--ease-out-expo);
}
.comparison-video-link > img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; }
.comparison-video-link:hover,
.comparison-video-link:focus-visible { transform: scale(1.045); box-shadow: 4px 6px 0 var(--ink); z-index: 1; }
.comparison-video-link:focus-visible { outline: 3px solid var(--ink); outline-offset: 7px; }
.comparison-video-hint {
  position: absolute;
  left: 50%;
  bottom: 10%;
  width: max-content;
  max-width: 95%;
  padding: 8px 14px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--white);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font-size: clamp(14px, 1.1vw, 20px);
  font-weight: 900;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity 180ms, transform 240ms var(--ease-out-expo);
  pointer-events: none;
}
.comparison-video-link:hover .comparison-video-hint,
.comparison-video-link:focus-visible .comparison-video-hint { opacity: 1; transform: translate(-50%, 0); }
.comparison-card ul {
  margin: clamp(16px, 1.3vw, 25px) 0 clamp(20px, 1.7vw, 32px);
  padding-left: 1.15em;
  font-size: clamp(15px, 1.2vw, 23px);
  line-height: 1.5;
  white-space: nowrap;
}
.comparison-after ul {
  --outlined-copy-weight: 900;
  list-style: none;
}
.comparison-after li { position: relative; }
/* 圓點獨立於文字的描邊與陰影，保留清楚的純白圓心。 */
.comparison-after li::before {
  content: "";
  position: absolute;
  left: -1.05em;
  top: .75em;
  transform: translateY(-50%);
  width: .6em;
  height: .6em;
  border: .1em solid var(--ink);
  border-radius: 50%;
  background: #fff;
}
.comparison-stats { margin: 0; display: grid; gap: 12px; }
/* 電腦和平板：兩列圖示與數字作為同一組，在各自卡片內水平置中。 */
@media (min-width: 601px) {
  .comparison-stats { width: max-content; margin-inline: auto; }
}
.comparison-stats > div { display: flex; align-items: center; gap: clamp(10px, 1vw, 19px); }
.comparison-stats dt { flex: none; width: clamp(32px, 3.3vw, 63px); }
.comparison-stats dt img { width: 100%; height: auto; max-height: clamp(38px, 3.8vw, 73px); object-fit: contain; }
.comparison-stats dd {
  margin: 0;
  font-family: var(--font-main);
  font-weight: 900;
  font-size: clamp(28px, 2.5vw, 48px);
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.comparison-after .comparison-stats {
  /* 剪輯後觀看數的金黃色樣式；圖示 SVG 使用相同的三個色碼。 */
  --stat-gradient-top: #fff8cc;
  --stat-gradient-bottom: #ffc22f;
  --stat-outline: #191919;
}
.comparison-after .comparison-stats dt img {
  filter: drop-shadow(1px 2px 0 var(--stat-outline));
}
.comparison-after .comparison-stats dd {
  position: relative;
  filter: drop-shadow(.045em .07em 0 var(--stat-outline));
}
.comparison-after .stat-number-outline {
  position: absolute;
  inset: 0 auto auto 0;
  color: var(--stat-outline);
  -webkit-text-stroke: .18em var(--stat-outline);
  paint-order: stroke fill;
}
.comparison-after .stat-number-fill {
  position: relative;
  display: inline-block;
  /* 向下延伸填色範圍覆蓋逗號尾巴；負邊距維持原本行高與位置。 */
  padding-bottom: .25em;
  margin-bottom: -.25em;
  background: linear-gradient(to bottom, var(--stat-gradient-top), var(--stat-gradient-bottom) calc(100% - .25em));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.impact-summary { margin-top: clamp(55px, 4.6vw, 90px); margin-bottom: 0; }

.resource-library { margin-top: clamp(100px, 11vw, 210px); }
.resource-library-surface {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(24px, 2.4vw, 46px) 0;
  border-block: 2px solid var(--ink);
  background: #f8f8f8;
  box-shadow: 0 10px 0 var(--ink);
  transform: skewY(3deg);
}
/* 電腦版加厚底部白色留白，讓下排影片陰影與斜邊保持距離。 */
@media (min-width: 901px) {
  .resource-library-surface { padding-bottom: clamp(72px, 6vw, 120px); }
}
.resource-library-surface::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  background: url("assets/texture/halftone-optimized.webp") center top / clamp(320px, 340vw, 6500px);
  opacity: .03;
}
.resource-library-content {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  row-gap: clamp(28px, 2.4vw, 46px);
  width: 100%;
  max-width: 1920px;
  margin-inline: auto;
  height: clamp(680px, 60vw, 1152px);
  min-height: clamp(680px, 60vw, 1152px);
  padding-top: clamp(16px, 2.4vw, 46px);
  transform: skewY(-3deg);
  isolation: isolate;
}
/* 標題獨佔一列；3D 影片只在下方舞台定位，保留陰影與擺動所需的留白。 */
.resource-library .service-heading {
  position: relative;
  z-index: 2;
  justify-self: center;
  transform: none;
}
.resource-library-stage { position: relative; min-height: 0; }
.resource-panels {
  position: absolute;
  inset: 0;
  perspective: 1600px;
  /* 上緣保護標題；左右額外保留空間，避免 3D 透視後的白框與陰影被切平。 */
  clip-path: inset(-12px -256px -64px);
  pointer-events: none;
}
.resource-panel {
  --panel-rx: 0deg;
  --panel-ry: 0deg;
  --panel-rz: 0deg;
  --panel-float: -8px;
  position: absolute;
  width: 45%;
  aspect-ratio: 55 / 36;
  border: clamp(4px, .42vw, 8px) solid #fff;
  border-radius: 3px;
  outline: 3px solid var(--ink); /* 四支影片共用：白框外側的細黑框。 */
  background: var(--dark-section);
  box-shadow: clamp(5px, .6vw, 11px) clamp(6px, .7vw, 13px) 0 var(--ink);
  transform: rotateX(var(--panel-rx)) rotateY(var(--panel-ry)) rotateZ(var(--panel-rz));
  animation: resource-panel-float 13s ease-in-out infinite;
}
/* 純白覆蓋層固定為 25%，只覆蓋影片畫面，不降低白框或陰影的不透明度。 */
.resource-panel::after {
  position: absolute;
  z-index: 3;
  inset: 0;
  content: "";
  background: #fff;
  opacity: .25;
  pointer-events: none;
}
.resource-panel video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.resource-panel-sound {
  --panel-rx: -5deg;
  --panel-ry: 15deg;
  --panel-rz: 3deg;
  top: clamp(28px, 3.2vw, 64px);
  left: 4%;
  width: 47%;
  animation-delay: -3s;
}
.resource-panel-music {
  --panel-rx: 4deg;
  --panel-ry: -11deg;
  --panel-rz: -4deg;
  top: clamp(34px, 3.5vw, 68px);
  right: 3%;
  width: 43%;
  animation-duration: 15s;
  animation-delay: -8s;
}
.resource-panel-meme {
  --panel-rx: 8deg;
  --panel-ry: 9deg;
  --panel-rz: -1deg;
  bottom: 4%;
  left: 3%;
  width: 40%;
  animation-duration: 14s;
  animation-delay: -5s;
}
.resource-panel-visual {
  --panel-rx: 24deg;
  --panel-ry: -15deg;
  --panel-rz: 6deg;
  bottom: 2%;
  right: 2%;
  width: 46%;
  animation-duration: 16s;
  animation-delay: -11s;
}
.resource-library .resource-description {
  --resource-sticker-height: clamp(72px, 7vw, 132px);
  position: absolute;
  z-index: 2;
  top: 45%;
  left: 50%;
  width: min(64%, 1260px);
  margin: 0;
  padding: clamp(20px, 1.8vw, 35px) clamp(22px, 2vw, 38px);
  border: 2px dashed var(--ink);
  border-radius: clamp(24px, 2.6vw, 48px);
  background: #f8f8f8;
  transform: translate(-50%, -50%);
}
.resource-sticker {
  position: absolute;
  z-index: 1;
  width: auto;
  height: var(--resource-sticker-height);
  max-width: none;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(clamp(3px, .35vw, 7px) clamp(4px, .4vw, 8px) 0 var(--ink));
}
.resource-sticker-video { top: calc(var(--resource-sticker-height) * -.65); left: clamp(-28px, -1.4vw, -12px); transform: rotate(-6deg); }
.resource-sticker-note { top: calc(var(--resource-sticker-height) * -.8); right: 9%; transform: rotate(-12deg); }
.resource-sticker-sound { bottom: calc(var(--resource-sticker-height) * -.7); left: 12%; transform: rotate(10deg); }
.resource-sticker-music { bottom: calc(var(--resource-sticker-height) * -.65); right: -2%; transform: rotate(15deg); }
.resource-library.is-library-inactive .resource-panel { animation-play-state: paused; }
.service-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.service-motion-ready .resource-library-surface { clip-path: inset(0 100% 0 0); transition: clip-path 1250ms var(--ease-out-expo); }
.service-motion-ready .resource-library.is-library-visible .resource-library-surface { clip-path: inset(0 0 0 0); }
@keyframes service-marquee-travel { to { transform: translateX(-50%); } }
@keyframes resource-panel-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotateX(var(--panel-rx)) rotateY(var(--panel-ry)) rotateZ(var(--panel-rz)); }
  50% { transform: translate3d(0, var(--panel-float), 0) rotateX(calc(var(--panel-rx) + 2deg)) rotateY(calc(var(--panel-ry) - 2deg)) rotateZ(calc(var(--panel-rz) + .6deg)); }
}

@media (max-width: 900px) {
  .service-heading { width: min(66vw, 460px); font-size: clamp(32px, 5vw, 48px); }
  .service-copy { width: min(88%, 760px); }
  .editing-comparison { width: min(76vw, 660px); }
  .comparison-card { padding: 26px 24px 30px; }
  .comparison-after { padding-inline: 19px; }
  .comparison-card ul { font-size: clamp(15px, 1.9vw, 19px); }
  .comparison-stats dd { font-size: clamp(32px, 4vw, 42px); }
  .service-desktop-break { display: none; }
  .resource-library .resource-description { width: 80%; }
}
@media (max-width: 600px) {
  .service-details { margin-top: 90px; }
  .service-heading { width: min(78vw, 350px); border-width: 5px; padding: 14px 20px; font-size: clamp(29px, 8.4vw, 40px); }
  .service-copy { width: calc(100% - 40px); }
  .service-intro { margin-top: 40px; }
  .service-intro br { display: none; }
  .service-intro strong { display: block; margin-bottom: 12px; }
  .style-marquee { margin: 30px 0; }
  .service-outline { font-size: 23px; line-height: 1.85; }
  .editing-impact { margin-top: 100px; }
  /* 手機共用一張比較卡；同一份影片、數字與清單透過 subgrid 逐列對齊。 */
  .editing-comparison {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto auto auto auto auto auto repeat(3, minmax(44px, auto));
    align-items: stretch;
    width: min(calc(100% - 24px), 460px);
    margin-top: 42px;
    padding: 16px 6px 12px;
    gap: 12px 0;
    border: 5px solid var(--white);
    border-radius: 24px;
    outline: 1.5px dashed var(--ink);
    outline-offset: -5px;
    background: linear-gradient(to right, #f8f8f8 50%, #ffe18a 50%);
    box-shadow: 4px 5px 0 var(--ink);
    perspective: none;
  }
  .comparison-item {
    grid-row: 1 / 11;
    grid-template-rows: subgrid;
    min-width: 0;
  }
  .comparison-item:first-child { grid-column: 1; }
  .comparison-item:nth-child(2) { grid-column: 2; }
  .editing-comparison .comparison-card {
    display: grid;
    grid-row: 2 / 11;
    grid-template-rows: subgrid;
    min-width: 0;
    padding: 0 5px;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: none;
    /* 完整卡片共用邊框，手機不再讓兩個半邊各自翻轉。 */
    opacity: 1;
    transform: none;
    transition: none;
  }
  .comparison-indicator { grid-row: 1; width: 54px; height: 54px; margin: 0 auto; }
  .comparison-video-link { grid-row: 1; align-self: start; min-width: 0; border-width: 2px; }
  .comparison-video-link:hover,
  .comparison-video-link:focus-visible { transform: none; }
  .comparison-video-hint {
    display: grid;
    place-items: center;
    min-height: 44px;
    opacity: 1;
    bottom: 5%;
    font-size: 14px;
    padding: 4px 8px;
    transform: translate(-50%, 0);
  }
  .comparison-row-heading {
    position: relative;
    z-index: 2;
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: var(--ink);
    font: 900 14px / 1.4 var(--font-main);
  }
  .comparison-row-heading::before {
    content: "";
    position: absolute;
    inset: 50% 0 auto;
    z-index: -1;
    border-top: 1px dashed var(--ink);
  }
  .comparison-row-heading span {
    padding: 4px 12px;
    border: 2px solid var(--ink);
    border-radius: 24px;
    background: var(--white);
  }
  .comparison-youtube-heading { grid-row: 3; }
  .comparison-instagram-heading { grid-row: 5; }
  .comparison-differences-heading { grid-row: 7; }
  .comparison-stats {
    grid-row: 2 / 6;
    grid-template-rows: subgrid;
    min-width: 0;
  }
  .comparison-stats > div { display: contents; }
  /* 平台名稱改由整列的共用標籤顯示；保留 dt 供輔助閱讀使用。 */
  .comparison-stats dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .comparison-stats dd { justify-self: center; align-self: center; font-size: clamp(26px, 8vw, 44px); }
  .comparison-stats > div:first-child dd { grid-row: 2; }
  .comparison-stats > div:last-child dd { grid-row: 4; }
  .comparison-card ul {
    display: grid;
    grid-row: 7 / 10;
    grid-template-rows: subgrid;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: clamp(14px, 4vw, 18px);
    line-height: 1.6;
    letter-spacing: -.02em;
    white-space: normal;
    overflow-wrap: normal;
  }
  .comparison-card li {
    position: relative;
    display: flex;
    align-items: center;
    padding: 6px 0 6px .8em;
  }
  .comparison-card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: .55em;
    height: .55em;
    border: 1.5px solid var(--ink);
    border-radius: 50%;
    background: #fff;
  }
  .comparison-after ul { --outlined-copy-stroke-width: 1.5px; --outlined-copy-shadow: 1px 1px 0 var(--ink); }
  .resource-library { margin-top: 100px; }
  .resource-library-surface { padding: 20px 0; }
  .resource-library-content { height: 600px; min-height: 600px; padding-top: 20px; }
  .resource-panel { --panel-float: -4px; }
  .resource-panel-sound { --panel-rx: -3deg; --panel-ry: 8deg; --panel-rz: 3deg; top: 10px; left: 3%; width: 53%; }
  .resource-panel-music { --panel-rx: 3deg; --panel-ry: -7deg; --panel-rz: -4deg; top: 18px; right: 2%; width: 53%; }
  /* 下排略藏在文字卡後面；較寬的手機保留更多影片畫面。 */
  .resource-panel-meme { --panel-rx: 5deg; --panel-ry: -6deg; --panel-rz: -2deg; bottom: clamp(10px, calc(190px - 30vw), 70px); left: 2%; width: 53%; }
  .resource-panel-visual { --panel-rx: 16deg; --panel-ry: -9deg; --panel-rz: 5deg; bottom: clamp(8px, calc(188px - 30vw), 68px); right: 2%; width: 55%; }
  .resource-library .resource-description { --resource-sticker-height: 52px; top: 40%; width: calc(100% - 40px); padding: 22px 20px; }
  .resource-sticker-video { top: -36px; left: -8px; }
  .resource-sticker-note { top: -40px; right: 8%; }
  .resource-sticker-sound { bottom: -36px; left: 10%; }
  .resource-sticker-music { bottom: -36px; right: -8px; }
  .resource-description br { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .style-marquee-track, .resource-panel { animation: none; }
  .comparison-video-link, .comparison-video-hint { transition: none; }
  .comparison-video-link:hover, .comparison-video-link:focus-visible { transform: none; }
  .service-motion-ready .resource-library-surface { clip-path: none; transition: none; }
}
