@page {
  size: 702pt 900pt;
  margin: 0;
}

:root {
  --page-w: 702pt;
  --page-h: 900pt;
  --mag-ink: #1a1a1a;
  --mag-muted: #666666;
  --mag-accent: #8b7355;
  --mag-accent-light: #c4a574;
  --mag-paper: #faf8f5;
  --mag-cover-bg: #2a2622;
  --mag-border: #e5e2dc;
  --mag-serif: Georgia, "Noto Serif TC", "Songti TC", serif;
  --mag-sans: "PingFang TC", "Microsoft JhengHei", sans-serif;
  --mag-body-size: 13pt;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--mag-sans);
  font-size: 13pt;
  line-height: 1.5;
  color: var(--mag-ink);
  background: var(--mag-paper);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

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

.mag-page figure {
  margin: 0;
  padding: 0;
}

.mag-issue {
  width: var(--page-w);
  margin: 0 auto;
}

.mag-page {
  width: var(--page-w);
  height: var(--page-h);
  overflow: hidden;
  break-after: page;
  page-break-after: always;
  display: flex;
  flex-direction: column;
  background: var(--mag-paper);
}

.mag-page:not(.mag-page--cover):not(.mag-page--photo-full):not(.mag-page--split):not(.mag-page--split-reverse) {
  padding: 54pt 54pt 48pt;
}

.mag-page__head {
  display: flex;
  align-items: center;
  gap: 8pt;
  margin-bottom: 14pt;
  flex-shrink: 0;
}

.mag-page__head-brand {
  display: block;
  height: 10pt;
  width: auto;
  flex-shrink: 0;
}

.mag-page__head-line {
  flex: 1;
  height: 1pt;
  background: var(--mag-border);
}

.mag-page__head-section {
  font-size: 7.5pt;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--mag-accent);
  flex-shrink: 0;
}

.mag-page__head-page {
  font-size: 7.5pt;
  font-weight: 500;
  color: var(--mag-muted);
  flex-shrink: 0;
  min-width: 14pt;
  text-align: right;
}

.mag-page__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mag-page__foot {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 8pt;
  border-top: 1pt solid var(--mag-border);
  font-size: 8pt;
  color: var(--mag-muted);
  position: relative;
  z-index: 2;
}

.mag-section-label {
  font-family: var(--mag-serif);
  font-size: 13pt;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 10pt;
  padding-top: 6pt;
  border-top: 2pt solid var(--mag-accent);
  width: fit-content;
  max-width: 100%;
}

.mag-section-label--light {
  color: #ffffff;
  border-top-color: var(--mag-accent-light);
}

.mag-stat {
  margin-bottom: 10pt;
  padding-bottom: 10pt;
  border-bottom: 1pt solid var(--mag-border);
}

.mag-stat__num {
  display: block;
  font-family: var(--mag-serif);
  font-size: 28pt;
  font-weight: 400;
  line-height: 1;
  color: var(--mag-accent);
  margin-bottom: 4pt;
}

.mag-stat__text {
  font-size: 8.5pt;
  line-height: 1.45;
  color: var(--mag-muted);
  margin: 0;
}

.mag-page__body p {
  margin: 0 0 9pt;
}

.mag-page__body p:last-child {
  margin-bottom: 0;
}

.mag-tag {
  display: inline-block;
  font-size: 12pt;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mag-accent);
  border: 1pt solid var(--mag-accent-light);
  padding: 3pt 9pt;
  margin-bottom: 12pt;
}

.mag-lead {
  font-size: 15pt;
  line-height: 1.6;
  color: #333333;
  margin: 0;
}

.mag-pullquote {
  margin: 0;
  padding: 12pt 16pt;
  border-left: 2pt solid var(--mag-accent-light);
  border-right: 2pt solid var(--mag-accent-light);
  text-align: center;
}

.mag-pullquote p {
  font-family: var(--mag-serif);
  font-size: 15pt;
  line-height: 1.4;
  margin: 0 0 6pt;
}

.mag-pullquote cite {
  font-family: var(--mag-sans);
  font-size: 8.5pt;
  font-style: normal;
  color: var(--mag-muted);
}

.mag-page--cover {
  position: relative;
  padding: 0;
}

.mag-cover__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mag-cover__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(42, 38, 34, 0.95) 0%,
      rgba(42, 38, 34, 0.55) 35%,
      transparent 65%);
}

.mag-cover__shade-top {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left,
      rgba(26, 26, 26, 0.72) 0%,
      rgba(26, 26, 26, 0.3) 40%,
      transparent 72%);
  z-index: 1;
  pointer-events: none;
}

.mag-cover__top {
  position: absolute;
  top: 48pt;
  left: 48pt;
  right: 48pt;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  z-index: 2;
}

.mag-cover__logo {
  width: calc(var(--page-w) * 0.6);
  height: auto;
  flex-shrink: 0;
}

.mag-cover__issue {
  font-size: 9pt;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--mag-accent-light);
}

.mag-cover__info {
  position: absolute;
  left: 48pt;
  right: 48pt;
  bottom: 54pt;
  z-index: 2;
}

.mag-cover__rule {
  display: block;
  width: 72pt;
  height: 2pt;
  background: var(--mag-accent-light);
  margin-bottom: 14pt;
}

.mag-cover__tag {
  display: block;
  font-size: 9pt;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mag-accent-light);
  margin-bottom: 12pt;
}

.mag-cover__title {
  font-family: var(--mag-serif);
  font-size: 26pt;
  font-weight: 400;
  line-height: 1.25;
  color: #ffffff;
  margin: 0 0 12pt;
  word-break: keep-all;
}

.mag-cover__date {
  font-size: 10pt;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.mag-page--opener {
  padding-bottom: 14pt;
  background:
    linear-gradient(180deg,
      transparent 0%,
      transparent 45%,
      rgba(42, 38, 34, 0.028) 72%,
      rgba(42, 38, 34, 0.06) 100%),
    var(--mag-paper);
}

.mag-page--opener .mag-page__body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: 0;
}

.mag-opener__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 54pt;
}

.mag-page--opener .mag-tag {
  margin-bottom: 10pt;
}

.mag-opener__col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: fit-content;
  max-width: 92%;
  flex: 1 1 auto;
  min-height: 0;
}

.mag-opener__title {
  font-family: var(--mag-serif);
  font-size: 22pt;
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: 0.02em;
  margin: 0 0 8pt;
  align-self: center;
  width: max-content;
  max-width: 100%;
  text-align: center;
  word-break: keep-all;
}

.mag-opener__date {
  font-size: 12pt;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mag-muted);
  margin: 0 0 12pt;
  text-align: center;
}

.mag-page--opener .mag-lead {
  font-size: 13pt;
  line-height: 1.55;
  margin: 0;
  width: 80%;
  align-self: center;
  text-align: left;
}

.mag-opener__visual {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  min-height: 180pt;
  margin: 20pt 0 0;
  overflow: visible;
}

.mag-opener__visual .mag-photo-watermark {
  display: block;
  width: 80%;
}

.mag-opener__visual .mag-photo-watermark img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  display: block;
}

.mag-opener__logo {
  width: 64%;
  height: auto;
  margin-top: 12pt;
  opacity: 0.72;
}

.mag-opener__caption {
  width: 80%;
  padding: 6pt 0 0;
  font-size: 8pt;
  line-height: 1.45;
  text-align: center;
  color: var(--mag-muted);
  margin: 0;
  background: none;
}

.mag-page--columns .mag-page__body {
  gap: 10pt;
  justify-content: center;
  width: 80%;
  align-self: center;
  overflow: hidden;
  min-height: 0;
}

.mag-page--columns .mag-section-label {
  flex-shrink: 0;
}

.mag-page--columns .mag-columns__grid {
  flex: 0 0 auto;
  min-height: 0;
  overflow: hidden;
}

.mag-columns__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18pt;
  flex: 1;
  min-height: 0;
  align-content: start;
}

.mag-columns__col {
  font-size: var(--mag-body-size);
  line-height: 1.48;
}

.mag-col-figure {
  margin: 0;
  padding: 0;
}

.mag-col-figure img {
  width: 100%;
  background: #e8e4de;
}

/* Modifiers for auto_generate left-page columns with tall images */
.mag-columns__col--media {
  display: flex;
  flex-direction: column;
}

.mag-col-figure--fit {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.mag-col-figure--fit img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  margin-bottom: 8pt;
  /* space for caption */
}

.mag-col-figure figcaption {
  font-size: 7.5pt;
  line-height: 1.4;
  color: var(--mag-muted);
  margin-top: 4pt;
}

.mag-page--text-below .mag-page__body {
  gap: 12pt;
  justify-content: center;
  width: 80%;
  align-self: center;
  overflow: hidden;
}

.mag-text-below__text {
  font-size: var(--mag-body-size);
  line-height: 1.48;
  flex: 0 1 auto;
  min-height: 0;
  overflow: hidden;
}

.mag-text-below__text p {
  margin: 0 0 9pt;
}

.mag-text-below__text p:last-child {
  margin-bottom: 0;
}

.mag-page--text-below .mag-section-label {
  flex: 0 0 auto;
  margin-bottom: 10pt;
}

.mag-landscape-figure {
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
}

.mag-landscape-figure img {
  width: 100%;
  object-fit: cover;
  object-position: center;
  background: #e8e4de;
}

.mag-landscape-figure figcaption {
  font-size: 7.5pt;
  line-height: 1.4;
  color: var(--mag-muted);
  margin-top: 6pt;
  flex-shrink: 0;
}

.mag-page--split-portrait .mag-page__body {
  justify-content: center;
  width: 100%;
  overflow: hidden;
  min-height: 0;
}

.mag-split-portrait__grid {
  display: grid;
  grid-template-columns: 1fr 42%;
  gap: 20pt;
  align-items: center;
  width: 100%;
  flex: 0 0 auto;
  min-height: 0;
  overflow: hidden;
}

.mag-split-portrait__text {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.mag-split-portrait__copy {
  font-size: var(--mag-body-size);
  line-height: 1.48;
}

.mag-split-portrait__copy p {
  margin: 0 0 9pt;
}

.mag-split-portrait__copy p:last-child {
  margin-bottom: 0;
}

.mag-page--split-portrait .mag-split__title {
  margin-bottom: 6pt;
}

.mag-page--split-portrait .mag-split__credit {
  margin-bottom: 12pt;
}

.mag-portrait-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
  width: 100%;
  min-width: 0;
}

.mag-portrait-figure img {
  display: block;
  width: min(100%, calc((var(--page-h) - 210pt) * 3 / 4));
  height: auto;
  max-width: 100%;
  max-height: calc(var(--page-h) - 210pt);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
  background: #e8e4de;
}

.mag-portrait-figure figcaption {
  font-size: 7.5pt;
  line-height: 1.4;
  color: var(--mag-muted);
  margin-top: 6pt;
}

.mag-page--photo-full {
  padding: 0;
  position: relative;
}

.mag-page--photo-full .mag-page__head {
  position: relative;
  z-index: 2;
  margin-bottom: 14pt;
  padding: 54pt 54pt 0;
}

.mag-page--photo-full .mag-page__head-section,
.mag-page--photo-full .mag-page__head-page {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1pt 2pt rgba(0, 0, 0, 0.45);
}

.mag-page--photo-full .mag-page__head-line {
  background: rgba(255, 255, 255, 0.35);
}

.mag-page--photo-full .mag-page__body {
  position: absolute;
  inset: 0;
  z-index: 0;
  gap: 0;
}

.mag-photo-full__frame {
  position: absolute;
  inset: 0;
  margin: 0;
  min-height: 0;
  overflow: hidden;
  background: #e8e4de;
}

.mag-photo-full__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mag-page--photo-full .mag-photo-full__caption {
  position: absolute;
  left: 54pt;
  right: 54pt;
  bottom: 20%;
  z-index: 2;
  font-size: 8.5pt;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1pt 3pt rgba(0, 0, 0, 0.55);
  margin: 0;
  flex-shrink: 0;
}

.mag-page--photo-full .mag-photo-full__caption:not(:last-child) {
  bottom: calc(20% + 24pt);
}

.mag-page--photo-full .mag-photo-full__extra {
  position: absolute;
  left: 54pt;
  right: 54pt;
  bottom: 14%;
  z-index: 2;
  font-size: var(--mag-body-size);
  line-height: 1.48;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1pt 3pt rgba(0, 0, 0, 0.55);
  flex-shrink: 0;
}

.mag-page--photo-full .mag-page__foot {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  margin: 0;
  padding: 10pt 54pt 48pt;
  border-top: none;
  background: linear-gradient(to top, rgba(26, 26, 26, 0.5), transparent);
  color: rgba(255, 255, 255, 0.88);
}

.mag-page--split {
  padding: 0 0 30pt;
  position: relative;
  overflow: hidden;
}

.mag-page--split .mag-page__head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  margin: 0;
  padding: 54pt 54pt 0;
}

.mag-page--split .mag-page__foot {
  padding-left: 54pt;
  padding-right: 54pt;
}

.mag-page--split .mag-page__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 0;
}

.mag-page--split-reverse {
  padding: 0;
  position: relative;
  overflow: hidden;
}

.mag-page--split-reverse .mag-page__head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  margin: 0;
  padding: 54pt 54pt 0;
}

.mag-page--split-reverse .mag-page__foot {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  width: 48%;
  box-sizing: border-box;
  margin-top: auto;
  padding: 8pt 18pt 48pt 54pt;
  background: var(--mag-paper);
}

.mag-page--split-reverse .mag-page__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 0;
}

.mag-page--split-reverse .mag-split__grid {
  display: block;
  position: static;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.mag-page--split-reverse .mag-split__media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 52%;
  max-width: 52%;
  margin: 0;
  z-index: 0;
}

.mag-page--split-reverse .mag-split__text {
  position: relative;
  z-index: 1;
  width: 48%;
  padding: 80pt 18pt 24pt 54pt;
  box-sizing: border-box;
  justify-content: flex-start;
}

.mag-split__hero {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-height: 0;
  overflow: hidden;
  background: #e8e4de;
}

.mag-split__hero img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
}

.mag-split__body {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 16pt 36pt 0;
}

.mag-split__title {
  font-family: var(--mag-serif);
  font-size: 22pt;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin: 0 0 8pt;
}

.mag-split__subtitle {
  font-family: var(--mag-serif);
  font-size: 10pt;
  line-height: 1.52;
  color: #333333;
  margin: 0 0 10pt;
  max-width: 92%;
}

.mag-split__credit {
  font-size: 7.5pt;
  line-height: 1.4;
  color: var(--mag-muted);
  letter-spacing: 0.05em;
  margin: 0 0 16pt;
}

.mag-split__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20pt;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  align-content: start;
}

.mag-split__col {
  font-size: var(--mag-body-size);
  line-height: 1.5;
}

.mag-split__col p {
  margin: 0 0 9pt;
}

.mag-split__col p:last-child {
  margin-bottom: 0;
}

.mag-split__grid {
  display: grid;
  grid-template-columns: 52% 48%;
  gap: 14pt;
  flex: 1;
  min-height: 0;
}

.mag-split__media {
  overflow: hidden;
  background: #e8e4de;
  min-height: 0;
  margin: 0;
}

.mag-split__media img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
}

.mag-split__panel {
  background: var(--mag-cover-bg);
  padding: 20pt 16pt;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.mag-split__text {
  font-size: var(--mag-body-size);
  line-height: 1.48;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  overflow: hidden;
}

.mag-page--quote .mag-page__body {
  justify-content: center;
  gap: 16pt;
  padding-top: 20pt;
  overflow: hidden;
}

.mag-quote__body {
  font-size: var(--mag-body-size);
  line-height: 1.5;
  min-height: 0;
  overflow: hidden;
}

.mag-catalog-note {
  width: var(--page-w);
  margin: 0 auto 16pt;
  padding: 12pt 16pt;
  font-size: 9pt;
  line-height: 1.5;
  color: var(--mag-muted);
  text-align: center;
}

/* ── Auto photo page (auto_generate only) ────────────────────────────── */

.mag-page--photo-auto .mag-page__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20pt;
}

.mag-photo-auto__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
  flex: 1;
  min-height: 0;
  justify-content: center;
}

.mag-photo-auto__figure img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #e8e4de;
}

.mag-photo-auto__caption {
  width: 100%;
  max-width: 80%;
  margin: 0 auto;
}

.mag-photo-auto__caption blockquote {
  margin: 0;
  padding: 6pt 0 6pt 14pt;
  border-left: 2pt solid var(--mag-accent);
  font-size: 13pt;
  line-height: 1.55;
  color: var(--mag-ink);
  font-style: normal;
}

.mag-photo-watermark,
.mag-photo-full__frame,
.mag-split__media,
.mag-portrait-figure,
.mag-landscape-figure,
.mag-col-figure,
.mag-photo-auto__figure,
.mag-split__hero:not(:has(.mag-col-figure)) {
  position: relative;
}

.mag-photo-watermark::after,
.mag-photo-full__frame::after,
.mag-split__media::after,
.mag-portrait-figure::after,
.mag-landscape-figure::after,
.mag-col-figure::after,
.mag-photo-auto__figure::after,
.mag-split__hero:not(:has(.mag-col-figure))::after {
  content: none;
  position: absolute;
  top: 8pt;
  right: 8pt;
  width: 56pt;
  aspect-ratio: 4 / 1;
  background: url("../../materials/the%20EDGE%20logo_bg.png") no-repeat top right / contain;
  opacity: 0.85;
  pointer-events: none;
  z-index: 2;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

@media print {
  body {
    background: var(--mag-paper);
  }

  .mag-issue {
    width: auto;
    margin: 0;
  }

  .mag-catalog-note {
    display: none;
  }
}