/* 最新消息（tools/column/news-templates.mjs 產生的 /nc_news.html、/nc_event_*.html）。
   全部掛在 .nw-* 底下，不影響主站其他頁。版面刻意跟醫美新知（css/column.css）不同：
   列表是新聞室（頭條大圖＋類別頁籤＋卡片格），文章頁是置中窄欄、加寬首圖。
   色票沿用主站：深棕 #2f2a25／#524b43、淺底上的金色字 #8a6d3b（#d8c397 在白底對比不足）、米白底 #faf8f4。 */

.nw-page {
  --nw-ink: #2f2a25;
  --nw-text: #4a423a;
  --nw-muted: #7d7367;
  --nw-line: #e6dfd3;
  --nw-gold: #d8c397;
  --nw-gold-ink: #8a6d3b;
  --nw-paper: #faf8f4;
  --nw-radius: 6px;
  --nw-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nw-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --nw-latin: "Archivo", "Noto Sans TC", sans-serif;
  /* 類別的小圓點 */
  --nw-c-announcement: #524b43;
  --nw-c-treatment: #b8975a;
  --nw-c-event: #b4705a;
  --nw-c-collab: #7a8a6e;
  background: #fff;
  color: var(--nw-text);
}

.nw-page main {
  padding-top: 64px;
  font-family: var(--nw-sans);
}
/* 有設 display 的元素（頭條、按鈕）也要能用 hidden 藏起來 */
.nw-page [hidden] {
  display: none !important;
}
.nw-page main :focus-visible {
  outline: 2px solid var(--nw-gold-ink);
  outline-offset: 3px;
}

.nw-wrap {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}
.nw-wrap--text {
  width: min(680px, 100% - 40px);
}

/* ---------- 共用：麵包屑、類別＋日期 ---------- */
.nw-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 32px;
  font-size: 13px;
  color: var(--nw-muted);
}
.nw-crumbs a {
  color: inherit;
  text-decoration: none;
}
.nw-crumbs a:hover {
  color: var(--nw-gold-ink);
}

.nw-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--nw-muted);
}
.nw-kicker time,
.nw-updated {
  font-family: var(--nw-latin);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.nw-cat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
  color: var(--nw-ink);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.nw-cat::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nw-dot, var(--nw-gold-ink));
}
.nw-cat--announcement { --nw-dot: var(--nw-c-announcement); }
.nw-cat--treatment { --nw-dot: var(--nw-c-treatment); }
.nw-cat--event { --nw-dot: var(--nw-c-event); }
.nw-cat--collab { --nw-dot: var(--nw-c-collab); }
a.nw-cat:hover {
  color: var(--nw-gold-ink);
}

.nw-page svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ================================================================ 列表頁 */
.nw-masthead {
  display: grid;
  gap: 16px;
  padding: 28px 0 28px;
}
.nw-eyebrow {
  display: block;
  margin-bottom: 14px;
  font-family: var(--nw-latin);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--nw-gold-ink);
}
.nw-masthead__title {
  margin: 0;
  font-size: clamp(34px, 5.2vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.06em;
  color: var(--nw-ink);
}
.nw-masthead__intro {
  margin: 0;
  max-width: 30em;
  font-size: 15px;
  line-height: 1.8;
  color: var(--nw-muted);
}
@media (min-width: 900px) {
  .nw-masthead {
    grid-template-columns: 1fr auto;
    align-items: end;
    padding: 40px 0 36px;
  }
  .nw-masthead__intro {
    max-width: 22em;
    text-align: right;
  }
}

/* 類別頁籤：手機版太多時可以左右滑 */
.nw-tabs {
  display: flex;
  gap: 4px 28px;
  border-bottom: 1px solid var(--nw-line);
  border-top: 1px solid var(--nw-ink);
  overflow-x: auto;
  scrollbar-width: none;
  margin-inline: -20px;
  padding-inline: 20px;
}
.nw-tabs::-webkit-scrollbar {
  display: none;
}
@media (min-width: 1160px) {
  .nw-tabs {
    margin-inline: 0;
    padding-inline: 0;
  }
}
.nw-tab {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 16px 0 15px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--nw-muted);
  cursor: pointer;
  transition: color 0.2s;
}
.nw-tab small {
  font-family: var(--nw-latin);
  font-size: 11px;
  font-weight: 500;
  color: var(--nw-muted);
  opacity: 0.8;
}
.nw-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--nw-ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--nw-ease);
}
.nw-tab:hover {
  color: var(--nw-ink);
}
.nw-tab[aria-pressed="true"] {
  color: var(--nw-ink);
}
.nw-tab[aria-pressed="true"]::after {
  transform: scaleX(1);
}

/* 頭條 */
.nw-lead {
  display: grid;
  gap: 24px;
  padding: 32px 0 48px;
  border-bottom: 1px solid var(--nw-line);
}
.nw-lead__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--nw-radius);
  background: var(--nw-paper);
}
.nw-lead__media img,
.nw-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--nw-ease);
}
.nw-lead:hover .nw-lead__media img,
.nw-card__link:hover .nw-card__media img {
  transform: scale(1.035);
}
.nw-lead__title {
  margin: 14px 0 0;
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-wrap: pretty;
}
.nw-lead__title a {
  color: var(--nw-ink);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--nw-ease);
}
.nw-lead:hover .nw-lead__title a {
  background-size: 100% 1px;
}
.nw-lead__excerpt {
  margin: 16px 0 0;
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--nw-text);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nw-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--nw-gold-ink);
  text-decoration: none;
}
.nw-more svg {
  transition: transform 0.3s var(--nw-ease);
}
.nw-lead:hover .nw-more svg {
  transform: translateX(4px);
}
@media (min-width: 900px) {
  .nw-lead {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
    gap: 56px;
    padding: 48px 0 64px;
  }
}

/* 消息格子 */
.nw-feed {
  padding: 48px 0 96px;
}
.nw-feed__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
}
.nw-feed__label {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--nw-ink);
}
.nw-feed__count {
  margin: 0;
  font-size: 13px;
  color: var(--nw-muted);
}
.nw-feed__count strong {
  font-family: var(--nw-latin);
  font-weight: 600;
  color: var(--nw-ink);
}
.nw-feed__all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--nw-gold-ink);
  text-decoration: none;
}
.nw-grid {
  display: grid;
  gap: 44px 32px;
}
@media (min-width: 640px) {
  .nw-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .nw-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 56px 36px;
  }
}
/* 看「全部」時，頭條那則已經在上面，格子裡的那張藏起來；選了類別才排進格子 */
.nw-feed:not(.is-filtered) .nw-card[data-lead] {
  display: none;
}
.js .nw-card[data-later] {
  display: none;
}
.nw-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.nw-card__media {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--nw-radius);
  background: var(--nw-paper);
  margin-bottom: 18px;
}
.nw-card__title {
  margin: 10px 0 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--nw-ink);
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}
.nw-card__link:hover .nw-card__title {
  color: var(--nw-gold-ink);
}
.nw-card__excerpt {
  display: -webkit-box;
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--nw-muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nw-empty {
  margin: 24px 0 0;
  padding: 48px 0;
  text-align: center;
  color: var(--nw-muted);
}
.nw-loadmore {
  display: block;
  margin: 56px auto 0;
  padding: 13px 40px;
  border: 1px solid var(--nw-ink);
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--nw-ink);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.nw-loadmore:hover {
  background: var(--nw-ink);
  color: #fff;
}

/* ================================================================ 文章頁 */
.nw-article .nw-crumbs {
  justify-content: center;
}
.nw-head {
  padding: 36px 0 0;
  text-align: center;
}
.nw-kicker--lg {
  justify-content: center;
  font-size: 14px;
}
.nw-updated {
  color: var(--nw-muted);
}
.nw-title {
  margin: 18px 0 0;
  font-size: clamp(26px, 3.6vw, 40px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.03em;
  color: var(--nw-ink);
  text-wrap: pretty;
}
.nw-cover {
  width: min(1040px, 100% - 40px);
  margin: 44px auto 0;
}
.nw-cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--nw-radius);
}
.nw-cover figcaption,
.nw-prose figcaption {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
  color: var(--nw-muted);
}

/* 內文 */
.nw-prose {
  padding-top: 48px;
  font-size: 17px;
  line-height: 1.95;
  letter-spacing: 0.02em;
  color: var(--nw-text);
}
.nw-prose > :first-child {
  margin-top: 0;
}
.nw-prose p {
  margin: 0 0 1.5em;
}
.nw-prose h2 {
  margin: 2.6em 0 0.9em;
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.03em;
  color: var(--nw-ink);
  text-wrap: pretty;
}
.nw-prose h2::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin-bottom: 18px;
  background: var(--nw-gold);
}
.nw-prose h3 {
  margin: 2em 0 0.5em;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--nw-ink);
}
.nw-prose a:not(.nw-btn) {
  color: var(--nw-gold-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.nw-prose a:not(.nw-btn):hover {
  color: var(--nw-ink);
}
.nw-prose strong {
  font-weight: 700;
  color: var(--nw-ink);
}
.nw-prose ul,
.nw-prose ol {
  margin: 0 0 1.5em;
  padding-left: 1.4em;
}
.nw-prose li {
  margin: 0.35em 0;
}
.nw-prose li::marker {
  color: var(--nw-gold-ink);
}

/* 圖片：跟內文同寬、加寬（超出內文欄）、窄 */
.nw-figure,
.nw-gallery,
.nw-video,
.nw-embed {
  margin: 2.6em 0;
}
.nw-figure img,
.nw-gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}
.nw-figure--narrow {
  max-width: 420px;
  margin-inline: auto;
}
.nw-figure--wide,
.nw-gallery {
  width: min(1040px, 100vw - 40px);
  margin-left: 50%;
  transform: translateX(-50%);
}
.nw-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.nw-gallery figcaption {
  grid-column: 1 / -1;
  margin-top: 0;
}
@media (min-width: 768px) {
  .nw-gallery--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 影片：框的比例照封面圖（--ratio＝寬÷高），直式影片不要比畫面還高 */
.nw-video video {
  display: block;
  width: min(100%, 72vh * var(--ratio, 1.7778), 720px);
  aspect-ratio: var(--ratio, 1.7778);
  height: auto;
  margin-inline: auto;
  border-radius: var(--nw-radius);
  background: #000;
}
.nw-embed {
  aspect-ratio: 16 / 9;
}
.nw-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--nw-radius);
}

/* 引言 */
.nw-quote {
  margin: 2.4em 0;
  padding: 0 1em;
  text-align: center;
}
.nw-quote::before,
.nw-quote::after {
  content: "";
  display: block;
  width: 1px;
  height: 28px;
  margin: 0 auto;
  background: var(--nw-gold);
}
.nw-quote p {
  margin: 18px 0 !important;
  font-size: clamp(19px, 2.2vw, 23px);
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: 0.06em;
  color: var(--nw-gold-ink);
}

/* 資訊卡（活動時間、地點…） */
.nw-facts {
  margin: 2em 0 2.4em;
  padding: 8px 28px;
  border: 1px solid var(--nw-line);
  border-radius: 10px;
  background: var(--nw-paper);
}
.nw-facts__title {
  margin: 0 !important;
  padding: 18px 0 6px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--nw-ink);
}
.nw-facts dl {
  margin: 0;
}
.nw-facts dl > div {
  display: grid;
  grid-template-columns: 6.5em minmax(0, 1fr);
  gap: 16px;
  padding: 15px 0;
  font-size: 15.5px;
  line-height: 1.75;
}
.nw-facts dl > div + div {
  border-top: 1px dashed var(--nw-line);
}
.nw-facts dt {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--nw-muted);
}
.nw-facts dd {
  margin: 0;
  color: var(--nw-ink);
}
@media (max-width: 479px) {
  .nw-facts {
    padding: 4px 20px;
  }
  .nw-facts dl > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

/* 按鈕（連結按鈕、諮詢按鈕、Instagram） */
.nw-btnrow {
  margin: 2.4em 0 !important;
  text-align: center;
}
.nw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 12px 30px;
  border: 1px solid var(--nw-ink);
  border-radius: 999px;
  background: var(--nw-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.05em;
  color: #fff !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.nw-btn:hover {
  background: #4a4239;
  border-color: #4a4239;
}
.nw-btn svg {
  transition: transform 0.3s var(--nw-ease);
}
.nw-btn:hover svg {
  transform: translateX(3px);
}
.nw-btn--ghost {
  background: none;
  color: var(--nw-ink) !important;
}
.nw-btn--ghost:hover {
  background: var(--nw-ink);
  color: #fff !important;
}

/* 提醒框 */
.nw-note {
  margin: 2em 0;
  padding: 18px 22px;
  border-left: 3px solid var(--nw-gold);
  background: var(--nw-paper);
  font-size: 15.5px;
  line-height: 1.85;
}
.nw-note__title {
  margin: 0 0 6px !important;
  font-weight: 700;
  color: var(--nw-ink);
}
.nw-note p:last-child {
  margin-bottom: 0;
}

/* 文末：相關療程、分享 */
.nw-treatment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 20px;
  margin-top: 56px;
  padding: 22px 26px;
  border: 1px solid var(--nw-line);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.nw-treatment:hover {
  border-color: var(--nw-gold);
  background: var(--nw-paper);
}
.nw-treatment__label {
  grid-column: 1;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--nw-muted);
}
.nw-treatment__name {
  grid-column: 1;
  font-size: 18px;
  font-weight: 700;
  color: var(--nw-ink);
}
.nw-treatment__go {
  grid-column: 2;
  grid-row: 1 / 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--nw-gold-ink);
}
.nw-treatment:hover .nw-treatment__go svg {
  transform: translateX(3px);
}
.nw-treatment__go svg {
  transition: transform 0.3s var(--nw-ease);
}

.nw-endbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--nw-line);
}
.nw-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--nw-text);
  text-decoration: none;
}
.nw-back:hover {
  color: var(--nw-gold-ink);
}
.nw-share {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nw-share__label {
  margin-right: 4px;
  font-size: 13px;
  color: var(--nw-muted);
}
.nw-share__btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--nw-line);
  border-radius: 50%;
  background: #fff;
  color: var(--nw-text);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.nw-share__btn:hover {
  border-color: var(--nw-ink);
  color: var(--nw-ink);
}
/* 複製連結要 JS，沒有 JS 就不顯示 */
.nw-share__copy {
  display: none;
}
.js .nw-share__copy {
  display: inline-grid;
}
.nw-share__done:not(:empty) {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--nw-ink);
  font-size: 12px;
  white-space: nowrap;
  color: #fff;
}

/* 上下則 */
.nw-pager {
  display: grid;
  margin-top: 72px;
  border-top: 1px solid var(--nw-line);
  border-bottom: 1px solid var(--nw-line);
}
.nw-pager__item {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 28px 0;
  color: inherit;
  text-decoration: none;
}
.nw-pager__item.is-empty {
  display: none;
}
.nw-pager__item + .nw-pager__item {
  border-top: 1px solid var(--nw-line);
}
.nw-pager__dir {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--nw-muted);
}
.nw-pager__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--nw-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}
.nw-pager__item:hover .nw-pager__title {
  color: var(--nw-gold-ink);
}
.nw-pager time {
  font-family: var(--nw-latin);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--nw-muted);
}
@media (min-width: 768px) {
  .nw-pager {
    grid-template-columns: 1fr 1fr;
  }
  .nw-pager__item.is-empty {
    display: block;
  }
  .nw-pager__item {
    padding: 32px 40px 32px 0;
  }
  .nw-pager__item + .nw-pager__item {
    border-top: 0;
    border-left: 1px solid var(--nw-line);
    padding: 32px 0 32px 40px;
    text-align: right;
    justify-items: end;
  }
}

/* 更多消息 */
.nw-related {
  margin-top: 80px;
  padding: 64px 0 88px;
  background: var(--nw-paper);
}
.nw-related .nw-card__media {
  background: #efe9df;
}

@media (prefers-reduced-motion: reduce) {
  .nw-page *,
  .nw-page *::before,
  .nw-page *::after {
    transition: none !important;
  }
}
