/*
 * 紀念冊風格：米白紙張、深棕文字、一種暖橘強調色。
 * 全站只用一種黑體字族（與 Facebook／Threads 嵌入框一致），不使用外部字型，也不加動畫。
 */
:root {
  --paper: #faf5ec;
  --sheet: #fffdf8;
  --ink: #3b2a20;
  --ink-soft: #7a665a;
  --rule: #e6d8c5;
  --brand: #d9822b;
  --accent: #a85a14;
  --accent-hover: #8a4a0f;
  --tint: #f4e8d6;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  border-top: 8px solid var(--brand);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

p, li, blockquote { text-wrap: pretty; }

.site-header,
main,
.site-footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==== 頁首 ==== */

.site-header { padding-top: 44px; }

h1 {
  margin: 0;
  font-size: clamp(2rem, 1.3rem + 3.2vw, 3.4rem);
  font-weight: 700;
  line-height: 1.25;
}

.subtitle {
  margin: 12px 0 0;
  color: var(--accent);
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  font-weight: 600;
}

/* ==== 分頁 ==== */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 26px;
  margin-top: 26px;
  border-bottom: 1px solid var(--rule);
}

.tabs [role="tab"] {
  margin-bottom: -1px;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}

.tabs [role="tab"]:hover { color: var(--ink); }

.tabs [role="tab"][aria-selected="true"] {
  border-bottom-color: var(--brand);
  color: var(--ink);
}

.tab-count {
  margin-left: 4px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 400;
}

.tab-count:empty { display: none; }

main > section { padding-top: 28px; }
main > section[hidden] { display: none; }

h2 {
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand);
  font-size: 1.45rem;
  line-height: 1.3;
}

.group-count {
  margin-left: 10px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 400;
}

.intro {
  max-width: 36em;
  margin: 0 0 6px;
  color: var(--ink-soft);
}

.submit-cta a { color: var(--accent); font-weight: 600; }

.summary {
  margin: 0 0 20px;
  font-size: 1.1rem;
  font-weight: 700;
}

.summary:empty { display: none; }

.status {
  margin: 16px 0 0;
  color: var(--ink-soft);
}

.status:empty { display: none; }

/* ==== 對談紀錄 ==== */

.talk-intro {
  max-width: 760px;
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 600;
}

.article-more { color: var(--accent); }

/* 寬螢幕時介紹文字只在標點或空白處換行，避免把「領導力」拆成兩行 */
@media (min-width: 521px) {
  .talk-intro { word-break: keep-all; }
}

.talk-block { margin-top: 40px; }

.keynote-list {
  max-width: 760px;
  margin: 0;
  padding-left: 1.3em;
}

.keynote-list li { margin-bottom: 8px; }
.keynote-list li::marker { color: var(--brand); }

.qa-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  align-items: start;
  gap: 20px;
}

.qa-card {
  scroll-margin-top: 80px;
  padding: 18px 20px 14px;
  border: 1px solid var(--rule);
  border-top: 4px solid var(--brand);
  border-radius: 8px;
  background: var(--sheet);
}

.qa-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.qa-no {
  flex: none;
  color: var(--brand);
  font-size: 1.3rem;
  font-weight: 700;
}

.qa-topic {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.4;
}

.qa-asker {
  margin: 4px 0 8px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.qa-question {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-left: 3px solid var(--brand);
  background: #f3ece2;
  border-radius: 0 6px 6px 0;
  font-size: 0.93rem;
}

.qa-question summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}

.qa-question p { margin: 8px 0 0; }

.qa-answer {
  margin: 12px 0 0;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  background: #f3ece2;
  border-radius: 0 6px 6px 0;
  font-size: 0.93rem;
}

.qa-answer summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}

.qa-answer p { margin: 8px 0 0; line-height: 1.8; }

.qa-points {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.97rem;
  line-height: 1.7;
}

.qa-points li { margin-bottom: 6px; }

.qa-pending {
  margin: 4px 0 0;
  padding: 8px 12px;
  border-radius: 6px;
  background: #ece6dd;
  color: #8a7e74;
  font-size: 0.92rem;
}

.talk-closing {
  margin: 48px 0 56px;
  text-align: center;
}

.talk-closing blockquote {
  max-width: 28em;
  margin: 0 auto 24px;
  padding: 0 8px;
  color: var(--accent);
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.8rem);
  font-weight: 700;
  line-height: 1.6;
}

.closing-photo {
  display: block;
  width: 100%;
  max-width: 900px;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
}

.closing-photo[hidden] { display: none; }

/* ==== 篩選 ==== */

.filter-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}

.filter-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.filter-row:has(.filters[hidden]) { display: none; }

.filter-label {
  flex: none;
  width: 2.5em;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filters[hidden] { display: none; }

.filters button {
  padding: 5px 14px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--sheet);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  cursor: pointer;
}

.filters button:hover { border-color: var(--brand); }

.filters button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.filters button[aria-pressed="true"]:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

/* ==== 心得卡片 ==== */

.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  align-items: start;
  justify-items: center;
  gap: 28px 24px;
  padding: 24px 0 48px;
}

.card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 550px;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--sheet);
}

.card[hidden] { display: none; }

.card-footer {
  padding: 14px 18px 16px;
  border-top: 1px solid var(--rule);
}

.author {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 0;
}

.author-name {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
}

.relation-tag {
  padding: 1px 9px;
  border-radius: 4px;
  background: var(--tint);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.6;
}

.platform {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.note {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.93rem;
  line-height: 1.6;
}

/* 不依賴嵌入框是否成功，原文連結永遠以文字連結呈現 */
.source-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent);
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.source-link:hover { color: var(--accent-hover); }

.embed {
  display: flex;
  justify-content: center;
  padding: 14px 12px;
}

.embed iframe {
  display: block;
  max-width: 100%;
  border: 0;
  background: var(--sheet);
}

.embed iframe.embed-instagram {
  width: 100%;
  max-width: 540px;
  border-radius: 8px;
}

.embed-scaled { overflow: hidden; }
.embed-scaled iframe { transform-origin: top left; }

.embed-threads {
  display: block;
  width: 100%;
}

.embed-threads > * { max-width: 100% !important; }

.embed-placeholder {
  margin: 0;
  padding: 24px 16px;
  width: 100%;
  border: 1px dashed var(--rule);
  border-radius: 6px;
  color: var(--ink-soft);
  text-align: center;
}

/* ==== 媒體報導：像一段剪報 ==== */

.media-group { margin-bottom: 44px; }

.media-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  align-items: stretch;
  gap: 20px;
}

.media-card { display: flex; }

.article-preview {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 20px 20px 18px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--sheet);
  color: var(--ink);
  text-decoration: none;
}

.article-preview.is-video { border-left: 4px solid var(--brand); }

.article-preview:hover { border-color: var(--brand); }

.article-preview:hover .article-title {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-bottom: 6px;
}

.video-tag {
  padding: 0 9px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.article-source {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.article-title {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.5;
}

.article-excerpt {
  display: block;
  margin-top: 12px;
  padding-left: 14px;
  border-left: 3px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.85;
}

.article-more {
  display: inline-block;
  margin-top: auto;
  padding-top: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-preview:hover .article-more { color: var(--accent-hover); }

/* ==== 頁尾 ==== */

.site-footer {
  padding-top: 24px;
  padding-bottom: 48px;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.site-footer p { margin: 0; }

.site-footer .footer-about {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: 0.95rem;
  line-height: 1.75;
}

.footer-about a[href='#about'] { margin-left: 6px; white-space: nowrap; }

/* ==== 關於我們 ==== */

.about-body { max-width: 760px; }
.about-body p { margin: 0 0 14px; }
.about-body .keynote-list { margin: 0 0 14px; }
.about-subhead { margin-top: 40px; }

.proposal-card {
  display: block;
  max-width: 520px;
  margin-top: 6px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  background: var(--sheet);
  color: var(--ink);
  text-decoration: none;
}

.proposal-card img { display: block; width: 100%; height: auto; }
.proposal-text { display: block; padding: 14px 18px 16px; }
.proposal-text strong { display: block; color: var(--accent); font-size: 1.05rem; }
.proposal-text span { color: var(--ink-soft); font-size: 0.9rem; }
.proposal-card:hover strong { color: var(--accent-hover); }
.about-body p a,
.footer-about a { color: var(--accent); }

.volunteer-photo { margin: 0 0 18px; }
.volunteer-photo img { display: block; width: 100%; height: auto; border-radius: 8px; }
.volunteer-photo figcaption { margin-top: 6px; color: var(--ink-soft); font-size: 0.9rem; }

.volunteer-list { margin: 0; }
.volunteer-list > div {
  display: grid;
  grid-template-columns: 6em 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.volunteer-list dt { color: var(--ink-soft); font-weight: 600; }
.volunteer-list dd { margin: 0; }
.about-body .sponsor-thanks { margin-top: 18px; }

.proposal-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ==== 鍵盤焦點 ==== */

.tabs [role="tab"]:focus-visible,
.filters button:focus-visible,
.source-link:focus-visible,
.article-preview:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .site-header { padding-top: 30px; }
  .tabs { gap: 2px 18px; }
  .tabs [role="tab"] { font-size: 1rem; }
  .filter-row { flex-direction: column; gap: 6px; }
}

/* ==== 活動照片 ==== */

.photo-group { margin-bottom: 44px; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.photo-thumb {
  display: block;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--tint);
  overflow: hidden;
  cursor: zoom-in;
}

.photo-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
}

.photo-thumb:focus-visible,
.lightbox-close:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.photo-credit {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.photo-credit a {
  color: var(--accent);
  font-weight: 600;
  text-underline-offset: 3px;
}

.lightbox {
  width: min(96vw, 1200px);
  max-width: 100vw;
  max-height: 96vh;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: var(--sheet);
  color: var(--ink);
}

.lightbox::backdrop { background: rgba(30, 20, 12, 0.8); }

.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: calc(96vh - 110px);
  margin: 0 auto;
  object-fit: contain;
}

.lightbox-caption {
  margin: 8px 0 0;
  font-size: 0.95rem;
  text-align: center;
}

.lightbox-close {
  display: block;
  margin: 0 0 8px auto;
  padding: 6px 16px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--sheet);
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}

/* ==== 精彩片段 ==== */
.clip-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
  gap: 40px 28px;
}
.clip-card { min-width: 0; }
.clip-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  background: #201c19;
  border-radius: 12px;
  overflow: hidden;
}
.clip-frame iframe,
.clip-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.clip-poster { cursor: pointer; }
/* 封面中央的播放鍵 */
.clip-play {
  position: absolute;
  /* 放在圖卡右半的照片上，不遮住左邊的金句 */
  left: 78%;
  top: 50%;
  width: 68px;
  height: 48px;
  margin: -24px 0 0 -34px;
  border-radius: 14px;
  background: rgba(32, 28, 25, 0.82);
}
.clip-play::after {
  content: "";
  position: absolute;
  left: 28px;
  top: 14px;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
}
.clip-poster:hover .clip-play,
.clip-poster:focus-visible .clip-play { background: var(--brand); }
.clip-headline {
  margin: 14px 2px 0;
  font-size: 1.3rem;
  line-height: 1.5;
}
.clip-topic {
  margin: 4px 2px 0;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
}
.clip-duration {
  margin-left: 8px;
  color: var(--ink-soft);
  font-weight: 400;
}
.clip-asker {
  margin: 6px 2px 0;
  color: var(--ink-soft);
  font-size: 0.93rem;
}
.clip-label {
  margin: 14px 2px 4px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
}
.clip-why {
  margin: 0 2px;
  font-size: 0.97rem;
  line-height: 1.8;
}
.clip-points {
  margin: 0 2px;
  padding-left: 1.2em;
  font-size: 0.95rem;
  line-height: 1.7;
}
.clip-points li { margin-bottom: 4px; }
.clip-more {
  display: inline-block;
  margin: 8px 2px 0;
  color: var(--accent);
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.clip-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 14px 2px 0;
}
.clip-share-btn {
  display: inline-block;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
  padding: 7px 14px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}
.clip-share-btn:hover { background: var(--tint); }
.clip-share-btn.is-line {
  border-color: #06c755;
  background: #06c755;
  color: #fff;
  font-weight: 600;
}
.clip-share-btn.is-line:hover { background: #05a647; }
.clip-share-msg { font-size: 0.9em; color: var(--ink-soft); flex-basis: 100%; }
.clip-share-msg:empty { display: none; }
.clip-share-url { user-select: all; white-space: pre-wrap; word-break: break-all; }

/* 頁首一句話 */
.tagline {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* 單支片段分享頁（clips/*.html） */
.site-title {
  margin: 0;
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.3;
}
.site-title a { color: inherit; text-decoration: none; }
.clip-page main { padding-top: 28px; padding-bottom: 48px; }
.clip-single { max-width: 720px; }
.clip-page .clip-headline { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.8rem); }
.clip-back { margin: 32px 0 0; font-weight: 600; }
.clip-back a { color: var(--accent); }
.proposal-video { margin: 20px 0 0; max-width: 640px; }
.proposal-video figcaption { margin-top: 8px; font-size: 0.9em; opacity: 0.8; }
