:root {
  --epaper-primary: #1f8583;
  --epaper-accent: #e5b35f;
  --epaper-ink: #333;
  --epaper-line: #d2d2d2;
  --epaper-surface: #f1f1f1;
  --epaper-popular: #a86db4;
}

.epaper-body {
  background: #fff;
  color: var(--epaper-ink);
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  /* 電子報採固定版面；瀏覽器縮放時維持桌面骨架，避免頁首重新折成直欄。 */
  min-width: 1100px;
}

.epaper-header {
  border-top: 5px solid var(--epaper-primary);
  box-shadow: 0 2px 8px rgb(21 48 78 / 8%);
}

.epaper-header-main {
  align-items: center;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  padding-top: 1.25rem;
}

.epaper-brand {
  align-items: center;
  display: flex;
  flex: 0 1 auto;
  gap: 1rem;
}

.epaper-ppp-logo {
  align-items: center;
  display: flex;
  max-height: 50px;
  max-width: 190px;
}

.epaper-title-logo {
  display: block;
  height: 42px;
  max-width: 240px;
}

.epaper-subscription {
	align-items: center;
	display: flex;
	flex: 0 1 490px;
	gap: 0.65rem;
}

.epaper-subscription-title {
	flex: 0 0 auto;
}

.epaper-subscription h1 {
  color: var(--epaper-primary);
  font-size: 0.9rem;
  font-weight: 700;
	margin: 0;
	white-space: nowrap;
}

.epaper-language-switch {
  border: 1px solid var(--epaper-primary);
  border-radius: 0.25rem;
  color: var(--epaper-primary);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.45rem 0.75rem;
  text-decoration: none;
  white-space: nowrap;
}

.epaper-language-switch:hover,
.epaper-language-switch:focus {
  background: var(--epaper-primary);
  color: #fff;
  text-decoration: none;
}

/* 英文文字較長，沿用中文樣式並增加頁首可用寬度。 */
@media (min-width: 768px) {
  .epaper-en .epaper-subscription {
    flex-basis: 700px;
  }

  .epaper-en .epaper-subscription-title h1 {
    font-size: 1rem;
    white-space: nowrap;
  }

  .epaper-en .epaper-topic-nav a {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
    white-space: nowrap;
  }
}

.epaper-subscription-actions {
	display: flex;
	flex: 0 0 auto;
	gap: 0.45rem;
}

.epaper-subscription-actions .epaper-button,
.epaper-language-switch {
	align-items: center;
	display: inline-flex;
	height: 40px;
	justify-content: center;
	width: 110px;
}

.epaper-subscription-entry-dialog .modal-dialog {
  margin: 1.75rem auto;
  max-width: 500px;
}

.epaper-subscription-entry-dialog .modal-content {
  background: #fffde6;
  border: 3px solid #13d6d0;
  border-radius: 24px;
  box-shadow: 0 18px 48px rgb(0 0 0 / 28%);
  overflow: hidden;
}

.epaper-subscription-entry-dialog .modal-header {
  align-items: center;
  background: #2b7ca4;
  border: 0;
  display: flex;
  flex-direction: row;
  flex-shrink: 0;
  justify-content: space-between;
  min-height: 58px;
  padding: 0.85rem 1.35rem;
  width: 100%;
}

.epaper-subscription-entry-dialog .modal-title {
  color: #fff;
  flex: 1 1 auto;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
}

.epaper-subscription-entry-dialog .btn-close {
  flex: 0 0 auto;
  filter: invert(1) grayscale(1) brightness(3);
  height: 1.8rem;
  margin: 0;
  opacity: 0.9;
  padding: 0;
  width: 1.8rem;
}

.epaper-subscription-entry-dialog .modal-body {
  background: #fffde6;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none;
  padding: 1.1rem 1.05rem 1.25rem;
}

.epaper-subscription-entry-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.epaper-subscription-entry-dialog .epaper-button {
  border-radius: 999px;
  font-size: 1.1rem;
  min-width: 92px;
  padding: 0.5rem 1rem;
}

.epaper-subscription-entry-dialog .epaper-button-primary {
  border: 2px solid #28586d;
  background: #28586d;
}

.epaper-subscription-entry-dialog .epaper-button-secondary {
  border: 2px solid #28586d;
  color: #111;
}

.epaper-subscription-field {
  align-items: center;
  display: grid;
  gap: 0.45rem;
  grid-template-columns: 120px minmax(0, 1fr);
  margin: 0 0 0.9rem;
}

.epaper-subscription-field > label {
  color: #111;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.epaper-required {
  color: #e63946;
  margin-right: 0.2rem;
}

.epaper-subscription-field input {
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 10px;
  color: #111;
  min-height: 39px;
  padding: 0.45rem 0.75rem;
}

.epaper-captcha-row {
  align-items: center;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: minmax(0, 1fr) 100px 28px;
}

.epaper-captcha-image {
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 8px;
  cursor: pointer;
  height: 39px;
  object-fit: contain;
  width: 100px;
}

.epaper-captcha-voice {
  background: transparent;
  border: 0;
  color: #111;
  font-size: 1.25rem;
  padding: 0.2rem;
  width: 28px;
}

/* 錯誤訊息置於驗證碼 Grid 外，與輸入框左緣對齊。 */
.epaper-captcha-error {
  min-height: 1.5rem;
  margin: -.25rem 0 .65rem 120px;
}

.epaper-button {
  border: 1px solid transparent;
  border-radius: 0.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
}

.epaper-button-primary {
  background: var(--epaper-primary);
  color: #fff;
}

.epaper-button-secondary {
  background: #fff;
  border-color: var(--epaper-primary);
  color: var(--epaper-primary);
}

/* 電子報訂閱結果彈窗，使用與頁面一致的藍色系與圓角。 */
.epaper-subscription-dialog .modal-dialog {
  margin: 1.75rem auto;
  max-width: 480px;
}

.epaper-subscription-dialog .modal-content {
  background: #fff;
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 18px 48px rgb(21 48 78 / 24%);
  overflow: hidden;
}

.epaper-subscription-dialog .modal-header {
  align-items: center;
  background: #f7fbff;
  display: flex;
  flex-direction: row;
  justify-content: center;
  padding: 1.35rem 1.5rem 0.85rem;
}

.epaper-subscription-dialog .modal-title {
  color: var(--epaper-ink);
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
}

.epaper-subscription-dialog .modal-body {
  background: #fff;
  border: 0;
  color: #4d5968;
  font-size: 1rem;
  line-height: 1.7;
  padding: 0.35rem 1.5rem 1.25rem;
  text-align: center;
}

.epaper-subscription-dialog .modal-footer {
  background: #fff;
  display: flex;
  justify-content: center;
  padding: 0 1.5rem 1.35rem;
}

.epaper-subscription-dialog .btn-primary {
  background: var(--epaper-primary);
  border-color: var(--epaper-primary);
  border-radius: 0.45rem;
  font-weight: 700;
  min-width: 5.5rem;
  padding: 0.5rem 1rem;
}

.epaper-topic-nav {
  border-bottom: 1px solid var(--epaper-line);
  border-top: 1px solid var(--epaper-line);
}

.epaper-topic-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.epaper-topic-nav a {
  color: var(--epaper-ink);
  display: block;
  font-weight: 700;
  padding: 0.9rem 1rem;
  text-decoration: none;
}

.epaper-topic-nav a:hover,
.epaper-topic-nav a:focus {
  background: var(--epaper-surface);
  color: var(--epaper-primary);
  text-decoration: underline;
}

.epaper-topic-nav a.is-active {
  background: var(--epaper-primary);
  color: #fff;
  text-decoration: none;
}

.epaper-home {
  background: #fff;
}

.epaper-home-placeholder {
  background: #fff;
  margin: 1.5rem auto 5rem;
  max-width: 1360px;
  min-height: 560px;
  padding: 4rem 2rem;
  width: calc(100% - 3rem);
}

.epaper-hero {
  background: transparent;
  color: #fff;
  /* Hero 保留比例 fallback，圖片載入後由首頁 JS 依原始比例調整。 */
  aspect-ratio: 16 / 9;
  margin: 1.5rem auto 0;
  max-width: 1100px;
  overflow: hidden;
  position: relative;
  width: calc(100% - 5rem);
}

.epaper-hero-cover {
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  inset: 0;
  position: absolute;
}

.epaper-hero-cover::after {
  /* 不額外覆蓋藍色遮罩，直接呈現電子報封面圖片。 */
  background: transparent;
  content: "";
  inset: 0;
  position: absolute;
}

.epaper-hero-content {
  box-sizing: border-box;
  display: grid;
  gap: 3.5rem;
  height: 100%;
  min-height: 0;
  padding-bottom: 3.5rem;
  padding-top: 4rem;
  position: relative;
  z-index: 1;
}

.epaper-hero-copy {
  max-width: 760px;
  padding-left: 2rem;
}

.epaper-section-kicker {
  align-items: center;
  color: rgb(255 255 255 / 92%);
  display: flex;
  font-size: 1.1rem;
  font-weight: 700;
  gap: 0.65rem;
  margin: 0 0 1.15rem;
  text-shadow: 0 2px 4px rgb(0 0 0 / 65%);
}

.epaper-section-kicker::before,
.epaper-section-title h2::before {
  background: var(--epaper-accent);
  content: "";
  display: inline-block;
  height: 3px;
  width: 34px;
}

.epaper-hero h1 {
  color: rgb(255 255 255 / 96%);
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  text-shadow: 0 3px 6px rgb(0 0 0 / 70%);
}

.epaper-hero-more {
  background: var(--epaper-primary);
  border: 2px solid var(--epaper-primary);
  box-shadow: 0 4px 12px rgb(21 48 78 / 25%);
  color: #fff;
  display: inline-block;
  font-weight: 700;
  margin-top: 1.65rem;
  padding: 0.65rem 1.4rem;
  text-decoration: none;
}

.epaper-hero-more:hover,
.epaper-hero-more:focus {
  background: #176967;
  border-color: #176967;
  color: #fff;
}

.epaper-current-topics {
  background: transparent;
  bottom: 2%;
  box-sizing: border-box;
  height: 42%;
  left: 12%;
  position: absolute;
  right: 12%;
  padding: 1% 3%;
}

.epaper-current-topic-heading {
  align-items: center;
  display: flex;
  margin-bottom: 2%;
}

.epaper-current-topic-heading h2 {
  color: rgb(255 255 255 / 92%);
  font-size: clamp(0.85rem, 1.15vw, 1.15rem);
  margin: 0;
  text-shadow: 0 2px 4px rgb(0 0 0 / 65%);
}

.epaper-scroll-actions {
  align-items: center;
  display: flex;
  justify-content: space-between;
  height: 100%;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 2;
}

.epaper-scroll-button {
  background: transparent;
  border: 0;
  color: #000;
  cursor: pointer;
  font-size: 0;
  height: 20%;
  pointer-events: auto;
  position: relative;
  width: 4%;
}

.epaper-scroll-button::before {
  border-bottom: clamp(2px, 0.2vw, 4px) solid currentColor;
  border-right: clamp(2px, 0.2vw, 4px) solid currentColor;
  content: "";
  display: block;
  height: clamp(18px, 2.5vw, 30px);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(18px, 2.5vw, 30px);
}

.epaper-scroll-button[data-carousel-action="previous"]::before {
  left: 10%;
  transform: translateY(-50%) rotate(135deg);
}

.epaper-scroll-button[data-carousel-action="next"]::before {
  right: 10%;
  transform: translateY(-50%) rotate(-45deg);
}

.epaper-topic-carousel {
  display: flex;
  gap: 2%;
  overflow-x: auto;
  padding-bottom: 0.5%;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.epaper-topic-carousel::-webkit-scrollbar {
  display: none;
}

.epaper-current-topic-card {
  background: rgb(0 0 0 / 58%);
  clip-path: polygon(0 0, 100% 0, 100% 88%, 86% 100%, 0 100%);
  color: #fff;
  flex: 0 0 calc((100% - 4%) / 3);
  height: 78%;
  min-height: 0;
  padding: 2.5% 3.5% 3.5%;
  scroll-snap-align: start;
}

.epaper-current-topic-card p {
  color: #fff;
  font-size: clamp(0.65rem, 0.85vw, 0.8rem);
  font-weight: 700;
  margin: 0 0 4%;
  text-shadow: 0 1px 2px rgb(0 0 0 / 45%);
}

.epaper-current-topic-card h3 {
  color: #fff;
  font-size: clamp(0.75rem, 1vw, 1rem);
  line-height: 1.45;
  margin: 0;
  text-shadow: 0 1px 2px rgb(0 0 0 / 55%);
}

.epaper-current-topic-card a {
  color: #fff;
  display: inline-block;
  font-weight: 700;
  margin-top: 5%;
  text-decoration: none;
}

.epaper-current-topic-card a:hover,
.epaper-current-topic-card a:focus {
  color: var(--epaper-accent);
  text-decoration: underline;
}

.epaper-empty-current {
  padding-bottom: 5rem;
  padding-top: 5rem;
}

.epaper-home-lower {
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(0, 1fr) minmax(245px, 0.32fr);
  padding-bottom: 5rem;
  padding-top: 4.25rem;
}

.epaper-section-title {
  border-bottom: 2px solid var(--epaper-accent);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
}

.epaper-section-title h2 {
  align-items: center;
  color: var(--epaper-ink);
  display: flex;
  font-size: 1.7rem;
  font-weight: 700;
  gap: 0.65rem;
  margin: 0;
}

.epaper-history-search {
  align-items: center;
  background: var(--epaper-surface);
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
}

.epaper-history-search input,
.epaper-history-search select {
  border: 1px solid var(--epaper-line);
  border-radius: 0;
  min-height: 38px;
  padding: 0.35rem 0.55rem;
}

.epaper-history-search input {
  flex: 1 1 220px;
}

.epaper-history-search select {
  width: 105px;
}

.epaper-history-search label {
  font-weight: 700;
  margin: 0;
}

.epaper-history-search .epaper-button {
  text-decoration: none;
}

.epaper-history-results {
  border-top: 1px solid var(--epaper-line);
}

.epaper-history-item {
  border-bottom: 1px solid var(--epaper-line);
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 112px minmax(0, 1fr);
  padding: 1.25rem 0;
}

.epaper-period-badge {
  background: #b5d7d7;
  border: 1px solid #a6bcbc;
  color: var(--epaper-primary);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 112px;
  overflow: hidden;
  position: relative;
  width: 112px;
}

.epaper-period-badge span {
  background: #9c9c9c;
  color: #fff;
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  padding: 0.25rem 0;
  text-align: center;
  width: 100%;
}

.epaper-period-badge strong {
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.45rem 0.6rem;
}

.epaper-period-badge small {
  bottom: 0.35rem;
  color: #333;
  font-size: 0.88rem;
  font-weight: 700;
  position: absolute;
  right: 0.45rem;
}

.epaper-period-badge::before,
.epaper-period-badge::after {
  background: #e8e8e8;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #d1d1d1;
  content: "";
  height: 0.55rem;
  position: absolute;
  top: 0.25rem;
  width: 0.55rem;
  z-index: 1;
}

.epaper-period-badge::before {
  left: 1rem;
}
.epaper-period-badge::after {
  right: 1rem;
}

.epaper-history-title-line {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.epaper-history-title {
  color: var(--epaper-primary);
  flex: 1 1 360px;
  font-size: 1.13rem;
  font-weight: 700;
  line-height: 1.55;
}

.epaper-download-link {
  align-items: center;
  background: transparent;
  border: 1px solid var(--epaper-primary);
  border-radius: 0.25rem;
  color: var(--epaper-primary);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  gap: 0.35rem;
  padding: 0.3rem 0.45rem;
  text-decoration: none;
}

.epaper-download-link:hover,
.epaper-download-link:focus {
  background: var(--epaper-primary);
  border-color: var(--epaper-primary);
  color: #fff;
}

.epaper-download-link:hover .epaper-pdf-icon,
.epaper-download-link:focus .epaper-pdf-icon {
  filter: brightness(0) invert(1);
}

.epaper-download-link .bi {
  font-size: 1rem;
}

.epaper-pdf-icon {
  height: 1.55rem;
  width: 1.55rem;
}

.epaper-release-date {
  color: #566573;
  font-size: 0.9rem;
  margin: 0.65rem 0;
}

.epaper-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.epaper-keywords span {
  background: #edf1f5;
  color: #485766;
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
}

.epaper-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 1.5rem;
}

.epaper-pagination a,
.epaper-pagination button {
  background: #fff;
  border: 1px solid var(--epaper-line);
  color: var(--epaper-ink);
  cursor: pointer;
  padding: 0.45rem 0.75rem;
  text-decoration: none;
}

.epaper-pagination a.is-current,
.epaper-pagination button.is-current {
  background: var(--epaper-primary);
  border-color: var(--epaper-primary);
  color: #fff;
}

.epaper-pagination a.is-disabled,
.epaper-pagination button:disabled {
  pointer-events: none;
  opacity: 0.4;
}

.epaper-loading {
  color: #697886;
  padding: 1rem 0;
}

.epaper-history-total,
.epaper-no-result {
  color: #596675;
  margin-top: 1rem;
}

.epaper-popular-list {
  border-top: 1px solid var(--epaper-line);
  list-style: none;
  margin: 0;
  padding: 0;
}

.epaper-popular-list li {
  border-bottom: 1px solid var(--epaper-line);
  counter-increment: popular-item;
  padding: 1rem 0 1rem 2.5rem;
  position: relative;
}

.epaper-popular-list {
  counter-reset: popular-item;
}

.epaper-popular-list li::before {
  color: #fff;
  background: var(--epaper-popular);
  border-radius: 50%;
  content: counter(popular-item, decimal-leading-zero);
  display: grid;
  font-size: 1.1rem;
  font-weight: 700;
  height: 2.25rem;
  left: 0;
  place-items: center;
  position: absolute;
  top: 0.75rem;
  width: 2.25rem;
}

.epaper-popular-list a {
  color: var(--epaper-ink);
  font-weight: 700;
  line-height: 1.55;
}

.epaper-topic-page {
  background: #fff;
  min-height: 620px;
  padding: 0 0 5rem;
}

.epaper-topic-page > .container {
  margin-inline: auto;
  max-width: 1200px;
}

.epaper-topic-banner {
  background: #486f95 url("../img/epaper/headerbg-d.jpg") center top / cover
    no-repeat;
  color: #fff;
  box-sizing: border-box;
  aspect-ratio: 1920 / 300;
  height: auto;
  margin: 1.5rem auto 0;
  max-width: 1920px;
  width: calc(100% - 3rem);
}

.epaper-topic-banner-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  min-height: 0;
  padding-bottom: 2rem;
  padding-top: 2rem;
}

.epaper-topic-banner nav {
  align-items: center;
  display: flex;
  font-size: 1.05rem;
  gap: 0.8rem;
  margin-bottom: 1.8rem;
}

.epaper-topic-banner nav a,
.epaper-topic-banner nav span {
  color: rgb(255 255 255 / 90%);
  text-decoration: none;
}

.epaper-topic-banner h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 5px rgb(0 0 0 / 55%);
}

.epaper-topic-heading {
  border-bottom: 2px solid var(--epaper-accent);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
}

.epaper-topic-heading h1,
.epaper-topic-detail h1 {
  color: var(--epaper-ink);
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.epaper-topic-search {
  align-items: center;
  background: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
  padding: 1rem;
}

.epaper-topic-search input,
.epaper-topic-search select {
  border: 1px solid var(--epaper-line);
  border-radius: 0.45rem;
  font-size: 1rem;
  min-height: 40px;
  padding: 0.35rem 0.55rem;
}

.epaper-topic-search input[type="search"] {
  flex: 0 1 355px;
}
.epaper-topic-search label {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}
.epaper-topic-search .epaper-button {
  text-decoration: none;
}
.epaper-topic-search .epaper-button-primary {
  background: #111;
  border-color: #111;
  border-radius: 0.45rem;
  font-size: 1rem;
  min-height: 40px;
  padding-left: 1rem;
  padding-right: 1rem;
}

.epaper-topic-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2rem;
  padding: 1rem 0 0;
}

.epaper-topic-item {
  background: #fff;
  border-left: 5px solid #777;
  box-shadow: 0 0.75rem 1.5rem rgb(0 0 0 / 13%);
  display: flex;
  flex-direction: column;
  min-height: 270px;
  padding: 1.25rem 1.5rem 1rem;
}

.epaper-topic-item h2 {
  font-size: clamp(1.25rem, 1.7vw, 1.5rem);
  line-height: 1.45;
  margin: 0 0 0.9rem;
}
.epaper-topic-item h2 a {
  color: var(--epaper-primary);
  text-decoration: none;
}
.epaper-topic-item h2 a:hover {
  text-decoration: underline;
}
.epaper-topic-badge {
  align-self: flex-start;
  background: linear-gradient(90deg, #59649d, #218d8b);
  border-left: 5px solid #f7ba00;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.9rem;
  padding: 0.5rem 1.2rem 0.5rem 0.7rem;
  position: relative;
}

.epaper-topic-badge::after {
  border-bottom: 1.25rem solid transparent;
  border-left: 1.25rem solid #218d8b;
  border-top: 1.25rem solid transparent;
  content: "";
  position: absolute;
  right: -1.25rem;
  top: 0;
}

.epaper-topic-excerpt {
  color: #566573;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.epaper-topic-more {
  align-items: center;
  align-self: flex-end;
  color: #4e4e4e;
  display: inline-flex;
  font-size: 1rem;
  gap: 0.35rem;
  margin-top: auto;
  text-decoration: none;
}

.epaper-topic-more::after {
  align-items: center;
  background: #ffc400;
  border: 2px solid #161616;
  border-radius: 50%;
  color: #161616;
  content: "→";
  display: inline-flex;
  font-size: 1rem;
  font-weight: 700;
  height: 1.5rem;
  justify-content: center;
  width: 1.5rem;
}

.epaper-topic-more:hover {
  color: var(--epaper-primary);
}
.epaper-topic-detail {
  background: #f8fbfd;
  min-height: 620px;
  padding: 4rem 0 5rem;
}
.epaper-topic-detail-card {
  background: #fff;
  box-shadow: 0 8px 24px rgb(21 48 78 / 10%);
  padding: 2.5rem clamp(1.25rem, 4vw, 4rem);
}
.epaper-topic-detail-title {
  color: var(--epaper-primary);
  margin: 0 0 0.75rem;
}
.epaper-topic-preview {
  display: block;
  height: auto;
  margin: 2rem auto 2.5rem;
  max-height: 520px;
  max-width: 100%;
  object-fit: contain;
}
.epaper-topic-content {
  background: #fff;
  line-height: 1.9;
  margin-bottom: 2rem;
  padding: 0;
  white-space: normal;
}
.epaper-topic-content img {
  display: block;
  height: auto;
  margin: 1rem auto;
  max-width: 100%;
}
.epaper-topic-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* 期數內容頁：以規格畫面的 Banner、分類卡片與年度側欄組成主內容。 */
.epaper-content-page {
  background: #f7f8f8;
  min-height: 680px;
  padding-bottom: 4rem;
  text-align: center;
}

.epaper-content-banner {
  background: #486f95 url("../img/epaper/headerbg-d.jpg") center top / cover
    no-repeat;
  box-sizing: border-box;
  color: #fff;
  aspect-ratio: 1920 / 300;
  height: auto;
  margin: 1.5rem auto 2rem;
  max-width: 1920px;
  padding: 2rem 0;
  width: calc(100% - 3rem);
}

.epaper-content-banner-inner nav {
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.epaper-content-banner-inner nav a,
.epaper-content-banner-inner nav span {
  color: #fff;
  margin-right: 0.5rem;
  text-decoration: none;
}

.epaper-content-banner h1 {
  color: #fff;
  font-size: clamp(1.55rem, 3vw, 2.6rem);
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  text-shadow: 0 2px 5px rgb(0 0 0 / 55%);
}

.epaper-content-layout {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr) 220px;
  margin-inline: auto;
  max-width: 1200px;
  width: calc(100% - 2rem);
}

.epaper-content-main {
  background: #fff;
  box-shadow: 0 18px 36px rgb(21 48 78 / 14%);
  min-width: 0;
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 1.25rem;
  text-align: center;
}

.epaper-content-heading {
  border-bottom: 1px solid var(--epaper-line);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

.epaper-content-heading .epaper-section-kicker {
  margin-bottom: 0.25rem;
}

.epaper-content-date {
  color: #657284;
  margin: 0;
}

.epaper-content-section {
  margin-bottom: 3rem;
}

.epaper-content-section h2 {
  color: #273b50;
  display: table;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 800;
  margin: 0 auto 1.35rem;
  padding: 0.45rem 1.4rem;
  position: relative;
  text-align: center;
}

.epaper-content-section h2::after {
  background: var(--epaper-accent);
  content: "";
  height: 3px;
  left: 25%;
  position: absolute;
  right: 25%;
}

.epaper-content-section h2::after {
  bottom: 0;
}
.epaper-content-cards {
  display: flex;
  flex: 1 1 auto;
  gap: 1.25rem;
  margin-inline: auto;
  max-width: 900px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-inline: max(1rem, calc((100% - min(700px, 72vw)) / 2));
  padding-top: 8px;
  /* 預留卡片懸浮陰影的垂直空間，避免被水平輪播容器裁切。 */
  padding-bottom: 56px;
  scroll-padding-inline: max(1rem, calc((100% - min(700px, 72vw)) / 2));
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  width: 100%;
}

.epaper-content-cards::-webkit-scrollbar {
  display: none;
}

.epaper-content-carousel {
  align-items: center;
  display: flex;
  margin: 0 auto;
  max-width: 900px;
  min-width: 0;
  width: 100%;
  position: relative;
}

.epaper-carousel-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #000;
  cursor: pointer;
  display: flex;
  font-size: 5rem;
  font-weight: 400;
  height: 5rem;
  justify-content: center;
  line-height: 0.75;
  position: absolute;
  -webkit-text-stroke: 1px #fff;
  text-shadow:
    0 0 3px #fff,
    0 0 10px rgb(255 255 255 / 95%);
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  z-index: 5;
}

.epaper-carousel-button:hover {
  background: transparent;
  color: #000;
  outline: none;
}

.epaper-carousel-button:focus-visible {
  background: transparent;
  color: #000;
  outline: 2px solid var(--epaper-primary);
  outline-offset: 3px;
}
.epaper-carousel-prev {
  left: -0.35rem;
}
.epaper-carousel-next {
  right: -0.35rem;
}

.epaper-content-card {
  background: #fff;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  flex: 0 0 min(700px, 72vw);
  min-height: 220px;
  overflow: hidden;
  position: relative;
  scroll-snap-align: center;
  box-shadow:
    0 8px 20px rgb(41 61 82 / 8%),
    0 18px 40px rgb(41 61 82 / 12%);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.epaper-content-card:hover {
  box-shadow:
    0 12px 28px rgb(41 61 82 / 10%),
    0 24px 48px rgb(41 61 82 / 16%);
  transform: translateY(-6px);
}

.epaper-content-card-image {
  background: #eef1f4;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.epaper-content-card-image img {
  display: block;
  height: auto;
  width: 100%;
}

.epaper-content-card-body {
  background: #fff;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 22px 24px;
  text-align: center;
}

.epaper-content-card-issue {
  color: #21847e;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.epaper-content-card h3 {
  color: #273b50;
  font-size: 1.1rem;
  line-height: 1.55;
  margin: 0 0 1rem;
  overflow-wrap: anywhere;
}

.epaper-content-card-more {
  background: #fffac8;
  border: 2px solid #e5b35f;
  box-shadow: 0 2px 6px rgb(91 75 37 / 15%);
  color: #5b4b25;
  display: block;
  font-weight: 700;
  margin-top: auto;
  padding: 0.45rem 0.65rem;
  text-align: center;
  text-decoration: none;
}

.epaper-content-card-more:hover,
.epaper-content-card-more:focus {
  background: var(--epaper-accent);
  border-color: #c8953d;
  color: #222;
}

.epaper-issue-years {
  align-self: start;
  background: #fff;
  box-shadow: 0 5px 18px rgb(21 48 78 / 8%);
  padding: 1.25rem 0;
  position: sticky;
  top: 1rem;
}

.epaper-issue-years h2 {
  border-bottom: 3px solid var(--epaper-accent);
  color: #273b50;
  font-size: 1.35rem;
  margin: 0 1rem 0.75rem;
  padding-bottom: 0.6rem;
}

.epaper-issue-year {
  border-bottom: 1px solid #e5e5e5;
}

.epaper-issue-year summary {
  color: #273b50;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  padding: 0.75rem 1rem;
  text-align: center;
}

.epaper-issue-year summary::-webkit-details-marker {
  display: none;
}

.epaper-issue-year summary::before {
  border-bottom: 14px solid transparent;
  border-left: 14px solid #f9b500;
  border-top: 14px solid #f9b500;
  content: "";
  display: inline-block;
  margin: -0.75rem 0.65rem -0.75rem -1rem;
  vertical-align: middle;
}

.epaper-issue-year summary::after {
  content: "+";
  float: right;
  font-size: 1.25rem;
}

.epaper-issue-year[open] summary::after {
  content: "−";
}

.epaper-issue-year summary:hover,
.epaper-issue-year summary:focus-visible {
  background: #f1f7f7;
  color: var(--epaper-primary);
}

.epaper-issue-months {
  background: #f7f8f8;
  padding: 0.35rem 0.75rem;
}

.epaper-issue-months a {
  color: #273b50;
  display: block;
  font-weight: 700;
  padding: 0.55rem;
  text-align: center;
  text-decoration: none;
}

.epaper-issue-months a:hover,
.epaper-issue-months a:focus-visible {
  background: #fff;
  color: var(--epaper-primary);
}

.epaper-content-empty {
  background: #fff;
  margin-bottom: 4rem;
  padding: 4rem 1rem;
  text-align: center;
}

.epaper-footer {
  background: #171717;
  border-top: 1px solid #303030;
  color: #a8a8a8;
  padding: 1.75rem 0;
}

.epaper-footer-content {
  font-size: 0.92rem;
  line-height: 1.7;
  text-align: center;
}

.epaper-footer-content p {
  margin: 0 0 0.4rem;
}

.epaper-footer-content a {
  color: #e8b000;
  font-weight: 700;
  text-decoration: none;
}

.epaper-footer-content a:hover,
.epaper-footer-content a:focus {
  color: #ffd45b;
  text-decoration: underline;
  text-underline-offset: 0.16rem;
}

@media (max-width: 767.98px) {
  .epaper-current-topics {
    bottom: auto;
    left: auto;
    padding-left: 5%;
    padding-right: 5%;
    position: relative;
    right: auto;
  }

  .epaper-hero-content {
    min-height: auto;
  }

  .epaper-current-topic-card {
    flex-basis: 100%;
    min-height: 48vw;
  }

  .epaper-history-item {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .epaper-period-badge {
    min-height: 84px;
    width: 84px;
  }

  .epaper-period-badge strong {
    font-size: 2rem;
  }

  .epaper-period-badge small {
    font-size: 0.78rem;
  }

  .epaper-header-main,
  .epaper-subscription-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .epaper-header-main {
    gap: 1.25rem;
  }

  .epaper-captcha-error {
    margin-left: 0;
  }

  .epaper-brand {
    flex-wrap: wrap;
  }

  .epaper-topic-nav ul {
    justify-content: flex-start;
  }

  .epaper-topic-nav li {
    flex: 1 0 50%;
  }

  .epaper-topic-nav a {
    padding: 0.75rem;
    text-align: center;
  }

  .epaper-hero {
    aspect-ratio: auto;
    margin-top: 1rem;
    min-height: 430px;
    max-height: none;
    width: calc(100% - 5rem);
  }

  .epaper-topic-banner {
    aspect-ratio: auto;
    height: auto;
    margin-top: 1rem;
    min-height: 220px;
    width: calc(100% - 1.5rem);
  }

  .epaper-topic-banner-content {
    min-height: 220px;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .epaper-topic-banner nav {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .epaper-topic-search {
    align-items: stretch;
    flex-direction: column;
  }

  .epaper-topic-search input[type="search"] {
    flex-basis: auto;
    width: 100%;
  }

  .epaper-topic-results {
    grid-template-columns: 1fr;
  }

  .epaper-topic-item {
    min-height: 240px;
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .epaper-home-placeholder {
    margin-top: 1rem;
    width: 100%;
  }

  .epaper-content-layout {
    grid-template-columns: 1fr;
  }

  .epaper-issue-years {
    position: static;
  }

  .epaper-content-cards {
    padding-inline: 1rem;
    padding-top: 8px;
    padding-bottom: 56px;
    scroll-padding-inline: 1rem;
  }

  .epaper-content-card {
    flex-basis: min(700px, 88vw);
  }

  .epaper-content-banner {
    aspect-ratio: auto;
    height: auto;
    min-height: 210px;
  }

  .epaper-hero-content {
    gap: 2.25rem;
    padding-bottom: 2.5rem;
    padding-top: 3rem;
  }

  .epaper-home-lower {
    grid-template-columns: 1fr;
    padding-bottom: 3rem;
    padding-top: 3rem;
  }

  .epaper-history-item {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .epaper-period-badge {
    min-height: 76px;
  }

  .epaper-history-search {
    align-items: stretch;
    flex-direction: column;
  }

  .epaper-history-search select {
    width: 100%;
  }
}

/*
 * 固定版面在小 CSS viewport 下仍維持頁首橫向結構。
 * 瀏覽器縮放會改變 CSS viewport 寬度，若沿用手機版規則，
 * Logo、訂閱表單與導覽列會被拆成多段，造成頁面出現過大的垂直空白。
 */
@media (max-width: 767.98px) {
  .epaper-body {
    min-width: 1100px;
  }

  .epaper-header-main {
    align-items: center;
    flex-direction: row;
    gap: 2rem;
    min-width: 1050px;
  }

  .epaper-brand {
    flex-wrap: nowrap;
  }

  .epaper-subscription-actions {
    align-items: center;
    flex-direction: row;
  }

  .epaper-topic-nav ul {
    flex-wrap: nowrap;
    min-width: 1100px;
  }

  .epaper-topic-nav li {
    flex: 0 0 auto;
  }
}
