@font-face {
  font-family: "SeerofficeLuoYan";
  src: url("seeroffice-luoyan-v121.woff?ver=1.2.1") format("woff"),
       url("seeroffice-luoyan-v121.ttf?ver=1.2.1") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* 文末手札：米白紙、淡藍灰格線、左上金色迴紋針 */
.seeroffice-closing {
  --soc-navy: var(--st-navy, #0B2148);
  --soc-gold: var(--mag-gold, #C9A35A);
  --soc-paper: #FAF7F0;
  --soc-rule: rgba(132, 146, 160, 0.28);
  --soc-margin: rgba(201, 163, 90, 0.42);
  --soc-line: 42px;
  box-sizing: border-box;
  width: 100%;
  max-width: 42rem;
  margin: 2.4rem auto 2.6rem;
  padding: 0.4rem 0.1rem 0.35rem;
  clear: both;
}

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

.seeroffice-closing__stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding-top: 1.05rem;
}

/* 金色迴紋針：夾在紙張上緣偏左 */
.seeroffice-closing__clip {
  position: absolute;
  top: 0.1rem;
  left: 1.35rem;
  z-index: 3;
  width: 1.45rem;
  height: 3.05rem;
  pointer-events: none;
  transform: rotate(-8deg);
  transform-origin: 50% 18%;
}

.seeroffice-closing__clip-svg,
.seeroffice-closing__clip svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.seeroffice-closing__paper {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding: 1.05rem 1.1rem 1.05rem 1.4rem;
  background-color: var(--soc-paper);
  background-image:
    linear-gradient(90deg, transparent 1.05rem, var(--soc-margin) 1.05rem, var(--soc-margin) calc(1.05rem + 1px), transparent calc(1.05rem + 1px)),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--soc-line) - 1px),
      var(--soc-rule) calc(var(--soc-line) - 1px),
      var(--soc-rule) var(--soc-line)
    ),
    url("paper-mibai.jpg");
  background-repeat: no-repeat, repeat, repeat;
  background-position: 0 0, 0 14px, 0 0;
  background-size: auto, auto, 256px 256px;
  border: 1px solid rgba(160, 150, 138, 0.22);
  border-radius: 9px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 0 0 1px rgba(11, 33, 72, 0.025),
    0 2px 3px rgba(11, 33, 72, 0.035),
    0 8px 20px rgba(11, 33, 72, 0.055),
    0 22px 44px rgba(11, 33, 72, 0.045);
}

/* 纖維紙紋疊加＋邊緣略柔（原創紋理，非素材圖） */
.seeroffice-closing__paper::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.34;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch' seed='11'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* 紙邊一道極淡的柔邊，讓切邊不要太硬 */
.seeroffice-closing__paper::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    inset 0 18px 28px rgba(255, 255, 255, 0.18),
    inset 0 -16px 22px rgba(80, 72, 60, 0.035);
}

.seeroffice-closing__note {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  font-family: "SeerofficeLuoYan", "Noto Serif TC", "Songti TC", serif;
  font-size: 24px;          /* 手機：24px */
  font-weight: 400;
  line-height: 42px;        /* 與格線間距相同 */
  letter-spacing: 0.02em;
  color: var(--soc-navy);
  text-align: left;
  overflow-wrap: break-word;
  word-break: keep-all;     /* 中文優先在句讀處換行，避免「可／以」切字 */
}

.seeroffice-closing__sig {
  position: relative;
  z-index: 1;
  display: block;
  width: 110px;             /* 手機：110px */
  max-width: 100%;
  height: auto;
  margin: 0.55rem 0 0 auto;
  pointer-events: none;
  user-select: none;
}

@media (min-width: 782px) {
  .seeroffice-closing {
    --soc-line: 52px;
    margin-top: 3rem;
    margin-bottom: 3rem;
    padding: 0.5rem 0.15rem 0.4rem;
  }

  .seeroffice-closing__stage {
    padding-top: 1.15rem;
  }

  .seeroffice-closing__clip {
    left: 1.7rem;
    width: 1.7rem;
    height: 3.55rem;
    top: 0.05rem;
  }

  .seeroffice-closing__paper {
    padding: 1.25rem 1.7rem 1.2rem 1.95rem;
    background-image:
      linear-gradient(90deg, transparent 1.4rem, var(--soc-margin) 1.4rem, var(--soc-margin) calc(1.4rem + 1.25px), transparent calc(1.4rem + 1.25px)),
      repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent calc(var(--soc-line) - 1px),
        var(--soc-rule) calc(var(--soc-line) - 1px),
        var(--soc-rule) var(--soc-line)
      ),
      url("paper-mibai.jpg");
    background-position: 0 0, 0 16px, 0 0;
  }

  .seeroffice-closing__note {
    font-size: 30px;        /* 桌面：30px */
    line-height: 52px;
  }

  .seeroffice-closing__sig {
    width: 135px;           /* 桌面：135px */
    margin-top: 0.65rem;
  }
}

.seeroffice-closing,
.seeroffice-closing__stage,
.seeroffice-closing__paper {
  min-width: 0;
}


/* 隱藏舊的空語音佔位（想用聽的也可以 / 讀完了聽我說一句），不影響真正的 .so-voice 播放器。 */
.mag-audio,
.mag-audio-intro,
.mag-audio-outro,
.wp-block-group[data-audio-slot="intro"],
.wp-block-group[data-audio-slot="outro"],
audio.mag-audio-player:not([src]),
audio.mag-audio-player[src=""],
.mag-audio-inner,
.mag-audio-label,
.mag-audio-title {
  display: none !important;
}
