/* Result Page - Ink Mirror Design */
/* 彻底重写:使用固定布局避免内容加载时的位置跳动 */

/* === Core Page Layout === */
body.page--result,
body.page--result .spa-app,
body.page--result #app-container {
  overflow-y: auto !important;
  height: auto !important;
  overflow-x: hidden;
}

.page--result-mirror {
  position: relative;
  width: 100%;
  min-height: 100vh;
  height: 100vh;
  overflow-y: scroll;
  overflow-x: hidden;
  background-color: transparent;
  /* 初始禁用 snap scroll */
  scroll-snap-type: none;
  scroll-behavior: smooth;
}

.page--result-mirror.snap-enabled {
  scroll-snap-type: y mandatory;
}

/* Background Watermark */
.page--result-mirror::before {
  content: attr(data-watermark);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(200px, 35vh, 500px);
  font-family: "Bakudai", serif;
  color: rgba(255, 255, 255, 0.08);
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 0.4em;
  line-height: 1;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.page--result-mirror.is-ready::before {
  opacity: 1;
}

/* === Main Container === */
.ink-mirror-container {
  position: relative;
  width: 100%;
  z-index: 2;
  pointer-events: none;
}

/* === Reflection & Background === */
.result-mirror {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: auto;
  --mirror-line: 42%;
}

.result-mirror canvas {
  opacity: 0.8 !important;
  mix-blend-mode: soft-light;
}

.result-mirror__veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(20, 25, 35, 0.2), rgba(5, 5, 8, 0.6));
  z-index: 1;
  pointer-events: none;
}

.result-mirror__reflection {
  display: none;
}

/* === Ink Sections - 使用 Grid 固定布局 === */
.ink-section {
  position: relative;
  pointer-events: auto;

  /* Snap Scroll */
  scroll-snap-align: center;
  scroll-snap-stop: always;

  /* 固定视口尺寸 */
  width: 100%;
  height: 100vh;

  /* 使用 Grid 居中,尺寸固定不受内容影响 */
  display: grid;
  place-items: center;

  /* 初始完全隐藏 */
  visibility: hidden;
}

/* 准备就绪后显示 */
.page--result-mirror.is-ready .ink-section {
  visibility: visible;
}

/* === 内容容器 - 固定尺寸 === */
.ink-content {
  /* 固定尺寸容器,避免内容变化影响布局 */
  width: 80vw;
  max-width: 900px;
  height: 70vh;

  /* 内容在容器内居中 */
  display: grid;
  place-items: center;

  /* 动画:透明度渐变 */
  opacity: 0;
  transition: opacity 1.5s ease;
}

/* 活跃状态:内容淡入 */
.ink-section.is-active .ink-content {
  opacity: 1;
}

/* 已看过状态:内容淡出到低透明度 */
.ink-section.was-active .ink-content {
  opacity: 0.12;
}

/* === 各 Section 文字样式 === */

/* 1. 局眼 (Eye) - 25-50 字 */
.section-eye .ink-content {
  font-family: "Bakudai", serif;
  font-size: clamp(32px, 4.5vw, 56px);
  text-align: center;
  font-weight: 400;
  color: rgba(236, 230, 220, 0.95);
  writing-mode: vertical-rl;
  letter-spacing: 0.2em;
  line-height: 1.8;
}

/* 2. 觀象 (Signs) - 80-150 字 */
.section-signs .ink-content {
  font-family: "Bakudai", serif;
  font-size: clamp(26px, 3.25vw, 42px);
  font-weight: 400;
  color: rgba(236, 230, 220, 0.92);
  writing-mode: vertical-rl;
  line-height: 2.2;
  letter-spacing: 0.15em;
  text-align: justify;
}

/* 3. 斷局 (Judgment) - 80-150 字 */
.section-judgment .ink-content {
  font-family: "Bakudai", serif;
  font-size: clamp(26px, 3.25vw, 42px);
  font-weight: 400;
  color: rgba(236, 230, 220, 0.92);
  writing-mode: vertical-rl;
  line-height: 2.2;
  letter-spacing: 0.15em;
  text-align: justify;
}

/* 4. 行止 (Path) - 100-180 字 */
.section-path .ink-content {
  font-family: "Bakudai", serif;
  font-weight: 400;
  /* 字數最多,字體最小 */
  font-size: clamp(24px, 2.9vw, 36px);
  color: rgba(236, 230, 220, 0.95);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  line-height: 2.4;
  letter-spacing: 0.15em;
  text-align: justify;
}

/* Titles (Hidden) */
.ink-title.hidden {
  display: none;
}

/* === Action Buttons (Fixed Left) === */
.result-actions {
  position: fixed;
  top: 15vh;
  left: 24px;
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s ease;
  z-index: 100;
}

.page--result-mirror.is-ready .result-actions {
  opacity: 1;
  visibility: visible;
}

.result-actions .btn {
  background: rgba(10, 10, 15, 0.4);
  border: 1px solid rgba(210, 195, 165, 0.25);
  color: rgba(235, 228, 215, 0.85);
  padding: 24px 8px;
  border-radius: 999px;
  font-size: 20px;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Bakudai", serif;
  min-width: 40px;
  text-align: center;
  backdrop-filter: blur(4px);
  writing-mode: vertical-rl;
  text-orientation: upright;
}

.result-actions .btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.8);
  color: #fff;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}

/* === Scroll Cue (Ink Lines) === */
.scroll-cue {
  position: fixed;
  left: 50%;
  bottom: 52px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: min(80vw, 320px);
  opacity: 0;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.6s ease;
  z-index: 120;
  mix-blend-mode: normal;
}

.page--result-mirror.is-ready .scroll-cue {
  opacity: 0.78;
}

.page--result-mirror.is-ready .scroll-cue.is-hidden {
  opacity: 0;
}

.scroll-cue__text {
  font-family: "Bakudai", "Noto Serif TC", serif;
  font-size: 36px;
  letter-spacing: 0.5em;
  color: rgba(235, 228, 216, 0.6);
  text-shadow: 0 1px 6px rgba(20, 16, 12, 0.2);
  transform: translateY(0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  pointer-events: auto;
  animation: scrollTextFloat 4.2s ease-in-out infinite;
}

.scroll-cue.is-hidden .scroll-cue__text {
  pointer-events: none;
}

.scroll-cue.is-hidden {
  opacity: 0;
}

.scroll-cue__svg {
  width: 100%;
  height: auto;
  aspect-ratio: 320 / 220;
  overflow: visible;
}

.scroll-cue__stroke path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--dash, 140) 420;
  stroke-dashoffset: 0;
  filter: blur(0.2px);
  animation: scrollStrokeDash var(--duration, 3.6s) linear infinite;
  animation-delay: var(--delay);
}

.scroll-cue__stroke--dark path {
  stroke: url(#cueDark);
  opacity: 0.85;
}

.scroll-cue__stroke--light path {
  stroke: url(#cueLight);
  opacity: 0.75;
}

.scroll-cue__stroke {
  animation: scrollStrokeFlow var(--duration, 3.6s) ease-in-out infinite;
  animation-delay: var(--delay);
  opacity: 0;
  transform: translateY(-6px);
}

@keyframes scrollStrokeFlow {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }

  35% {
    opacity: 0.8;
  }

  70% {
    opacity: 0.5;
  }

  100% {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes scrollStrokeDash {
  0% {
    stroke-dashoffset: 220;
  }

  100% {
    stroke-dashoffset: -260;
  }
}

@keyframes scrollTextFloat {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }

  30% {
    opacity: 0.55;
  }

  70% {
    opacity: 0.35;
  }

  100% {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* === Share Overlay === */
.share-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 10, 0.7);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 220;
}

.share-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.share-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: min(94vw, 760px);
  max-height: min(92vh, 920px);
  overflow-y: auto;
  padding: 24px 24px 22px;
  background: rgba(12, 12, 18, 0.88);
  border: 1px solid rgba(210, 195, 165, 0.2);
  border-radius: 22px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.share-panel__title {
  font-family: "Bakudai", "Noto Serif TC", serif;
  font-size: 16px;
  letter-spacing: 0.35em;
  color: rgba(235, 228, 215, 0.85);
}

.share-preview {
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-platforms {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.share-platform {
  font-family: "Bakudai", "Noto Serif TC", serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  border: 1px solid rgba(205, 190, 160, 0.34);
  border-radius: 12px;
  padding: 8px 6px;
  color: rgba(242, 236, 226, 0.9);
  background: rgba(24, 22, 28, 0.7);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.share-platform:hover {
  transform: translateY(-1px);
  border-color: rgba(240, 204, 128, 0.8);
  background: rgba(52, 40, 28, 0.72);
}

.share-platform--copy {
  background: rgba(58, 44, 24, 0.72);
  border-color: rgba(235, 192, 100, 0.5);
}

.share-panel__actions {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.share-panel__actions .btn {
  font-family: "Bakudai", "Noto Serif TC", serif;
  font-size: 14px;
  letter-spacing: 0.2em;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(210, 195, 165, 0.35);
  background: rgba(15, 15, 20, 0.6);
  color: rgba(235, 228, 215, 0.9);
  cursor: pointer;
  transition: all 0.3s ease;
}

.share-panel__actions .btn:hover {
  background: rgba(212, 175, 55, 0.18);
  border-color: rgba(212, 175, 55, 0.7);
  color: #fff;
}

.share-panel__actions .btn-share-close {
  border-color: rgba(160, 150, 135, 0.3);
  color: rgba(215, 208, 195, 0.8);
}

/* === Share Card === */
.share-card {
  position: relative;
  width: min(80vw, 420px);
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  overflow: hidden;
  background-color: #f5f0e6;
  --share-theme-main: rgba(180, 146, 90, 0.24);
  --share-theme-ink: rgba(52, 40, 26, 0.4);
  --share-theme-glow: rgba(90, 80, 68, 0.2);
  --share-theme-paper: #f5efe3;
  background-image:
    url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%201080%201350%27%3E%0A%3Cpath%20d%3D%27M0%20980%20C%20140%20860%20300%20910%20440%20820%20C%20580%20730%20720%20780%20860%20700%20C%20980%20640%201080%20620%201080%20620%20L1080%201350%20L0%201350%20Z%27%20fill%3D%27%23231f1b%27%20fill-opacity%3D%270.14%27/%3E%0A%3Cpath%20d%3D%27M0%201040%20C%20160%20980%20320%201020%20480%20940%20C%20640%20860%20820%20880%201080%20820%20L1080%201350%20L0%201350%20Z%27%20fill%3D%27%232f2822%27%20fill-opacity%3D%270.1%27/%3E%0A%3Cpath%20d%3D%27M120%20880%20C%20260%20780%20420%20820%20560%20740%20C%20700%20660%20860%20700%20980%20640%27%20fill%3D%27none%27%20stroke%3D%27%23231f1b%27%20stroke-opacity%3D%270.12%27%20stroke-width%3D%2728%27%20stroke-linecap%3D%27round%27/%3E%0A%3Cpath%20d%3D%27M160%20560%20C%20320%20520%20460%20580%20640%20520%20C%20820%20460%20960%20520%27%20fill%3D%27none%27%20stroke%3D%27%232f2a24%27%20stroke-opacity%3D%270.1%27%20stroke-width%3D%2720%27%20stroke-linecap%3D%27round%27/%3E%0A%3Ccircle%20cx%3D%27860%27%20cy%3D%27220%27%20r%3D%2790%27%20fill%3D%27%23ffffff%27%20fill-opacity%3D%270.12%27/%3E%0A%3C/svg%3E"),
    radial-gradient(circle at 18% 20%, var(--share-theme-main), transparent 48%),
    radial-gradient(circle at 82% 70%, var(--share-theme-glow), transparent 58%),
    linear-gradient(140deg, rgba(168, 148, 118, 0.18), rgba(245, 240, 230, 0.38) 55%, rgba(210, 200, 185, 0.22)),
    repeating-linear-gradient(0deg, rgba(110, 100, 88, 0.05) 0px, rgba(110, 100, 88, 0.05) 1px, transparent 1px, transparent 6px);
  background-size: cover;
  background-repeat: no-repeat;
  background-blend-mode: multiply, normal, normal, normal, normal;
  box-shadow: 0 24px 60px rgba(15, 15, 20, 0.35);
  /* Preview Size */
  --share-poem-size: 64px;
  --share-domain-size: 14px;
  --share-brand-size: 12px;
  --share-ink: rgba(28, 22, 16, 0.95);
  --share-wash: rgba(85, 72, 58, 0.14);
  --share-edge: rgba(255, 255, 255, 0.38);
}

.share-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 28% 88%, var(--share-theme-ink), transparent 52%),
    radial-gradient(circle at 70% 28%, rgba(30, 28, 24, 0.12), transparent 52%);
  mix-blend-mode: multiply;
  opacity: 0.7;
  pointer-events: none;
}

.share-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.35), transparent 58%);
  opacity: 0.6;
  pointer-events: none;
}

.share-card__domain,
.share-card__poem,
.share-card__brand {
  position: absolute;
  z-index: 1;
  font-family: "Bakudai", "Noto Serif TC", serif;
}

.share-card__domain {
  top: 38px;
  left: 40px;
  font-size: var(--share-domain-size);
  letter-spacing: 0.35em;
  color: rgba(70, 55, 40, 0.75);
  border: 1px solid rgba(95, 80, 60, 0.45);
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 6px 16px rgba(20, 18, 15, 0.08);
  transform: rotate(-2deg);
  transform-origin: left top;
}

.share-card__poem {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-2deg);
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: var(--share-poem-size);
  line-height: 1.6;
  /* 增加行距,讓兩列對聯分開一點,更具氣勢 */
  letter-spacing: 0.25em;
  /* 增加字距,讓每個字都像獨立的印記 */
  color: var(--share-ink);
  text-align: center;
  white-space: pre-wrap;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow:
    0 2px 8px rgba(18, 14, 10, 0.12),
    0 0 1px rgba(18, 14, 10, 0.2);
  filter: drop-shadow(0 10px 18px rgba(10, 8, 6, 0.08));
  mix-blend-mode: multiply;
}

.share-card__brand {
  bottom: 34px;
  right: 44px;
  font-size: var(--share-brand-size);
  letter-spacing: 0.3em;
  color: rgba(75, 65, 55, 0.6);
  transform: rotate(2deg);
}

.share-card--preview {
  width: min(86vw, 460px);
}

.share-card--capture {
  width: 540px;
  height: 675px;
  aspect-ratio: auto;
  --share-poem-size: 110px;
  /* 極大字號,撐起畫面 */
  --share-domain-size: 20px;
  --share-brand-size: 16px;
}

.share-card--capture.is-capturing {
  width: 640px;
  height: 800px;
  --share-poem-size: 120px;
  --share-domain-size: 24px;
  --share-brand-size: 18px;
}

.share-card[data-share-theme="wealth"] {
  --share-theme-main: rgba(191, 155, 86, 0.34);
  --share-theme-ink: rgba(74, 55, 26, 0.34);
  --share-theme-glow: rgba(138, 117, 78, 0.24);
}

.share-card[data-share-theme="love"] {
  --share-theme-main: rgba(177, 104, 114, 0.32);
  --share-theme-ink: rgba(90, 40, 50, 0.35);
  --share-theme-glow: rgba(176, 124, 134, 0.2);
}

.share-card[data-share-theme="career"] {
  --share-theme-main: rgba(117, 132, 176, 0.3);
  --share-theme-ink: rgba(40, 54, 90, 0.35);
  --share-theme-glow: rgba(118, 135, 165, 0.24);
}

.share-card[data-share-theme="family"] {
  --share-theme-main: rgba(188, 134, 87, 0.3);
  --share-theme-ink: rgba(102, 66, 36, 0.36);
  --share-theme-glow: rgba(174, 128, 86, 0.2);
}

.share-card[data-share-theme="relations"] {
  --share-theme-main: rgba(114, 153, 146, 0.34);
  --share-theme-ink: rgba(40, 90, 80, 0.3);
  --share-theme-glow: rgba(110, 148, 140, 0.24);
}

.share-card[data-share-theme="health"] {
  --share-theme-main: rgba(94, 163, 124, 0.3);
  --share-theme-ink: rgba(34, 92, 58, 0.34);
  --share-theme-glow: rgba(100, 158, 122, 0.24);
}

.share-card[data-share-theme="learning"] {
  --share-theme-main: rgba(84, 132, 182, 0.32);
  --share-theme-ink: rgba(32, 66, 102, 0.34);
  --share-theme-glow: rgba(84, 126, 165, 0.24);
}

.share-card[data-share-theme="fortune"] {
  --share-theme-main: rgba(132, 112, 182, 0.3);
  --share-theme-ink: rgba(62, 50, 96, 0.35);
  --share-theme-glow: rgba(130, 112, 176, 0.24);
}

.share-capture {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}

/* === Responsive (Mobile) === */
@media (max-width: 768px) {
  .ink-content {
    width: 90vw;
    height: 60vh;
  }

  .result-actions {
    top: auto;
    bottom: calc(env(safe-area-inset-bottom) + 92px);
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
    gap: 12px;
  }

  .result-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
    writing-mode: horizontal-tb;
  }

  .share-panel {
    width: min(92vw, 420px);
    padding: 20px;
  }

  .share-platforms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .share-platform {
    min-height: 40px;
    font-size: 12px;
    letter-spacing: 0.08em;
  }

  .share-panel__actions {
    flex-direction: column;
    width: 100%;
  }

  .share-panel__actions .btn {
    width: 100%;
    min-height: 40px;
    text-align: center;
  }
}

/* === Print / Save Canvas Styles === */
.ink-mirror-container[data-capturing="true"] {
  background: #08080a;
}

/* === Full Report Card (Scroll Aesthetic) - Iteration 2 === */
.share-card--report {
  position: relative;
  width: 860px;
  max-width: 860px;
  height: auto;
  min-height: 0;
  padding: 64px 68px 72px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 44px;
  border-radius: 24px;

  background-color: #f5f0e6;
  background-image:
    radial-gradient(circle at 88% 8%, var(--share-theme-main), transparent 35%),
    radial-gradient(circle at 12% 92%, var(--share-theme-glow), transparent 32%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4'/%3E%3CfeColorMatrix values='0 0 0 0 0, 0 0 0 0 0, 0 0 0 0 0, 0 0 0 0.028 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E"),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(115, 105, 90, 0.03) 2px, rgba(115, 105, 90, 0.03) 3px);
  background-blend-mode: normal, normal, multiply, normal;
  box-shadow:
    inset 0 0 120px rgba(20, 18, 15, 0.04),
    inset 0 0 60px rgba(30, 28, 24, 0.06),
    0 8px 32px rgba(15, 12, 10, 0.12);
}

.share-card--report::before {
  content: "";
  position: absolute;
  top: 34px;
  left: 34px;
  right: 34px;
  bottom: 34px;
  border: 1px solid rgba(95, 85, 70, 0.18);
  border-radius: 16px;
  pointer-events: none;
  box-shadow: inset 0 0 32px rgba(255, 255, 255, 0.46);
}

.share-report__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  writing-mode: horizontal-tb;
}

.report-domain {
  font-family: "Bakudai", serif;
  font-size: clamp(42px, 7vw, 64px);
  line-height: 1.1;
  color: rgba(45, 40, 35, 0.95);
  letter-spacing: 0.18em;
  margin: 0;
}

.report-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.report-age {
  font-family: "Bakudai", serif;
  font-size: 24px;
  color: rgba(90, 80, 70, 0.85);
  letter-spacing: 0.12em;
}

.report-date {
  font-family: "Bakudai", "Noto Serif TC", serif;
  font-size: 16px;
  color: rgba(98, 90, 80, 0.72);
  letter-spacing: 0.08em;
}

.share-report__body {
  display: flex;
  flex-direction: column;
  gap: 36px;
  writing-mode: horizontal-tb;
  text-align: left;
}

.report-section {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 28px;
}

.report-section:not(:last-child)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(to right,
      transparent,
      rgba(100, 90, 75, 0.2),
      rgba(100, 90, 75, 0.2),
      transparent);
}

.report-section__title {
  font-family: "Bakudai", serif;
  font-size: 30px;
  font-weight: 400;
  color: rgba(35, 30, 25, 0.95);
  letter-spacing: 0.28em;
  text-align: left;
  margin: 0;
  padding: 0;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.report-section__content {
  font-family: "Bakudai", serif;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 2.12;
  letter-spacing: 0.1em;
  color: rgba(50, 45, 40, 0.9);
  text-align: left;
  text-justify: inter-ideograph;
  margin: 0;
  padding: 0;
  text-indent: 2em;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.share-report__footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  writing-mode: horizontal-tb;
}

.report-poem {
  font-family: "Bakudai", serif;
  font-size: clamp(34px, 4.2vw, 52px);
  font-weight: 400;
  line-height: 1.42;
  letter-spacing: 0.2em;
  color: rgba(30, 25, 20, 0.95);
  white-space: pre-wrap;
  text-align: left;
  padding: 16px 22px;
  border: 1px solid rgba(160, 128, 80, 0.35);
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 18, 15, 0.05);
}

.report-brand {
  font-family: "Bakudai", serif;
  font-size: 14px;
  letter-spacing: 0.35em;
  color: rgba(110, 100, 85, 0.6);
  white-space: nowrap;
}

.share-card--report.is-capturing {
  width: 980px;
  max-width: 980px;
  padding: 72px 88px 84px;
  gap: 48px;
}

.share-card--report.is-capturing .report-section__content {
  font-size: 28px;
  line-height: 2.2;
}

.share-card--report.is-capturing .report-domain {
  font-size: 76px;
}

.share-card--report.is-capturing .report-poem {
  font-size: 58px;
}

/* === Disclaimer === */
.result-disclaimer {
  position: relative;
  width: min(90vw, 720px);
  margin: 15vh auto 15vh;
  padding: 0 20px;
  text-align: center;
  font-family: "Bakudai", "Noto Serif TC", serif;
  font-size: 11px;
  line-height: 1.8;
  color: rgba(236, 230, 220, 0.4);
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
  mix-blend-mode: plus-lighter;
  user-select: none;
}

.page--result-mirror.is-ready .result-disclaimer {
  opacity: 0.6;
}

@media (max-width: 768px) {
  .result-disclaimer {
    width: 90vw;
    margin: 10vh auto 20vh;
    font-size: 10px;
    opacity: 0.5;
  }
}

/* === 小螢幕優化（600px 以下）：改為橫書 === */
@media (max-width: 600px) {
  .ink-content {
    width: 92vw;
    height: auto;
    min-height: 50vh;
    max-height: 75vh;
    padding: 24px 16px;
  }

  /* 所有 Section 改為橫書 */
  .section-eye .ink-content,
  .section-signs .ink-content,
  .section-judgment .ink-content,
  .section-path .ink-content {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    text-align: center;
    line-height: 2;
  }

  .section-eye .ink-content {
    font-size: clamp(24px, 5vw, 36px);
    letter-spacing: 0.1em;
  }

  .section-signs .ink-content,
  .section-judgment .ink-content {
    font-size: clamp(18px, 4vw, 26px);
    text-align: justify;
  }

  .section-path .ink-content {
    font-size: clamp(16px, 3.5vw, 22px);
    text-align: justify;
  }

  /* 背景水印調小 */
  .page--result-mirror::before {
    font-size: clamp(100px, 25vh, 200px);
  }

  /* 操作按鈕 */
  .result-actions {
    bottom: calc(env(safe-area-inset-bottom) + 86px);
    gap: 10px;
  }

  .result-actions .btn {
    padding: 6px 14px;
    font-size: 12px;
  }

  html[lang="zh-TW"] .page--result-mirror .result-actions .btn {
    font-size: 14px;
  }

  /* 捲動提示 */
  .scroll-cue {
    bottom: calc(env(safe-area-inset-bottom) + 148px);
  }

  .scroll-cue__text {
    font-size: 24px;
    letter-spacing: 0.3em;
  }

  /* 分享卡片 */
  .share-card {
    width: min(88vw, 340px);
  }

  .share-card--preview {
    width: min(90vw, 380px);
  }
}

/* === 超小螢幕（375px 以下） === */
@media (max-width: 375px) {
  .ink-content {
    width: 95vw;
    padding: 20px 12px;
  }

  .section-eye .ink-content {
    font-size: clamp(20px, 5.5vw, 28px);
  }

  .section-signs .ink-content,
  .section-judgment .ink-content {
    font-size: clamp(15px, 4vw, 20px);
  }

  .section-path .ink-content {
    font-size: clamp(14px, 3.8vw, 18px);
  }

  .result-actions {
    bottom: calc(env(safe-area-inset-bottom) + 80px);
  }

  .result-actions .btn {
    padding: 5px 12px;
    font-size: 11px;
  }

  html[lang="zh-TW"] .page--result-mirror .section-signs .ink-content,
  html[lang="zh-TW"] .page--result-mirror .section-judgment .ink-content {
    font-size: clamp(16px, 4.2vw, 21px);
  }

  html[lang="zh-TW"] .page--result-mirror .section-path .ink-content {
    font-size: clamp(15px, 4vw, 19px);
  }

  html[lang="zh-TW"] .page--result-mirror .result-actions .btn {
    font-size: 13px;
  }

  .scroll-cue__text {
    font-size: 20px;
    letter-spacing: 0.25em;
  }

  .share-card {
    width: min(92vw, 300px);
  }
}

/* === Touch Device Adaptive Layout (Phone + Tablet) === */
@media (hover: none) and (pointer: coarse) and (max-width: 1366px),
  (max-width: 1024px) and (max-height: 1366px) {
  .ink-content {
    width: min(92vw, 900px);
    height: min(64vh, 680px);
  }

  .result-actions {
    top: auto;
    left: 50%;
    bottom: calc(env(safe-area-inset-bottom) + clamp(96px, 13vh, 136px));
    transform: translateX(-50%);
    flex-direction: row;
    gap: clamp(8px, 2vw, 14px);
    width: min(94vw, 760px);
    justify-content: center;
  }

  .result-actions .btn {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    min-width: 0;
    padding: clamp(7px, 1.2vh, 11px) clamp(11px, 2.8vw, 18px);
    font-size: clamp(12px, 1.8vw, 16px);
    letter-spacing: 0.15em;
  }

  html[lang="zh-TW"] .page--result-mirror .result-actions .btn {
    font-size: clamp(14px, 2vw, 18px);
  }

  .scroll-cue {
    bottom: calc(env(safe-area-inset-bottom) + clamp(176px, 24vh, 240px));
    width: min(86vw, 320px);
  }

  .scroll-cue__text {
    font-size: clamp(22px, 3.2vw, 32px);
    letter-spacing: 0.36em;
  }

  .result-disclaimer {
    margin: 10vh auto calc(28vh + env(safe-area-inset-bottom));
  }
}

/* === Short Touch Landscape === */
@media (hover: none) and (pointer: coarse) and (max-height: 560px),
  (max-height: 560px) and (max-width: 1024px) and (orientation: landscape) {
  .ink-content {
    width: min(94vw, 980px);
    height: auto;
    min-height: min(52vh, 280px);
    max-height: min(68vh, 360px);
    padding: 18px 18px;
  }

  .section-eye .ink-content,
  .section-signs .ink-content,
  .section-judgment .ink-content,
  .section-path .ink-content {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    text-align: center;
    line-height: 1.85;
  }

  .section-eye .ink-content {
    font-size: clamp(22px, 3.2vw, 30px);
    letter-spacing: 0.08em;
  }

  .section-signs .ink-content,
  .section-judgment .ink-content {
    font-size: clamp(16px, 2.3vw, 21px);
    text-align: justify;
  }

  .section-path .ink-content {
    font-size: clamp(15px, 2.1vw, 20px);
    text-align: justify;
  }

  html[lang="zh-TW"] .page--result-mirror .section-signs .ink-content,
  html[lang="zh-TW"] .page--result-mirror .section-judgment .ink-content {
    font-size: clamp(17px, 2.4vw, 22px);
  }

  html[lang="zh-TW"] .page--result-mirror .section-path .ink-content {
    font-size: clamp(16px, 2.3vw, 21px);
  }

  .page--result-mirror::before {
    font-size: clamp(96px, 26vh, 180px);
  }

  .result-actions {
    bottom: calc(env(safe-area-inset-bottom) + 74px);
  }

  .result-actions .btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  html[lang="zh-TW"] .page--result-mirror .result-actions .btn {
    font-size: 14px;
  }

  .scroll-cue {
    bottom: calc(env(safe-area-inset-bottom) + 142px);
    width: min(76vw, 280px);
  }

  .scroll-cue__text {
    font-size: 20px;
    letter-spacing: 0.28em;
  }
}

/* ===== Result stability patch (zh/en desktop + mobile) ===== */
.page--result-mirror {
  overscroll-behavior-y: contain;
  scroll-padding-top: 2vh;
  scroll-padding-bottom: 24vh;
}

.ink-section {
  min-height: 100svh;
  height: 100svh;
}

@supports not (height: 100svh) {
  .ink-section {
    min-height: 100vh;
    height: 100vh;
  }
}

.ink-content {
  word-break: break-word;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .page--result-mirror {
    scroll-padding-bottom: calc(28vh + env(safe-area-inset-bottom));
  }

  .ink-content {
    width: 92vw;
    max-width: 760px;
    min-height: 54svh;
    height: auto;
    padding: 20px 14px 12px;
  }

  .section-eye .ink-content {
    font-size: clamp(26px, 5.6vw, 34px);
    line-height: 1.45;
    letter-spacing: 0.08em;
    text-align: center;
  }

  .section-signs .ink-content,
  .section-judgment .ink-content {
    font-size: clamp(19px, 4.2vw, 26px);
    line-height: 1.8;
    letter-spacing: 0.05em;
    text-align: left;
  }

  .section-path .ink-content {
    font-size: clamp(18px, 4vw, 24px);
    line-height: 1.86;
    letter-spacing: 0.05em;
    text-align: left;
  }

  .result-actions {
    top: auto;
    left: 50%;
    bottom: calc(66px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    flex-direction: row;
    width: min(95vw, 720px);
    justify-content: center;
    gap: 8px;
  }

  .result-actions .btn {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    flex: 1 1 0;
    max-width: 200px;
    min-width: 0;
    min-height: 44px;
    padding: 10px 10px;
    font-size: 12px;
    letter-spacing: 0.08em;
  }

  html[lang="zh-TW"] .page--result-mirror .result-actions .btn {
    font-size: 14px;
  }

  .scroll-cue {
    bottom: calc(130px + env(safe-area-inset-bottom));
    width: min(72vw, 260px);
  }

  .scroll-cue__text {
    font-size: clamp(16px, 3.8vw, 24px);
    letter-spacing: 0.14em;
  }

  html[lang="zh-TW"] .page--result-mirror .scroll-cue__text {
    letter-spacing: 0.2em;
  }

  .result-disclaimer {
    margin: 9vh auto calc(28vh + env(safe-area-inset-bottom));
    width: min(92vw, 700px);
    line-height: 1.7;
  }
}

@media (max-width: 560px) {
  .section-eye .ink-content,
  .section-signs .ink-content,
  .section-judgment .ink-content,
  .section-path .ink-content {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
  }

  .section-eye .ink-content {
    font-size: clamp(24px, 7.2vw, 34px);
    line-height: 1.42;
  }

  .section-signs .ink-content,
  .section-judgment .ink-content {
    font-size: clamp(17px, 4.9vw, 23px);
    line-height: 1.75;
  }

  .section-path .ink-content {
    font-size: clamp(16px, 4.6vw, 21px);
    line-height: 1.82;
  }

  html[lang="zh-TW"] .page--result-mirror .section-eye .ink-content {
    font-size: clamp(30px, 8.6vw, 42px);
  }

  html[lang="zh-TW"] .page--result-mirror .section-signs .ink-content,
  html[lang="zh-TW"] .page--result-mirror .section-judgment .ink-content {
    font-size: clamp(20px, 5.8vw, 26px);
  }

  html[lang="zh-TW"] .page--result-mirror .section-path .ink-content {
    font-size: clamp(18px, 5.2vw, 24px);
  }

  .page--result-mirror::before {
    font-size: clamp(90px, 22vh, 170px);
    opacity: 0.05;
  }

  .result-actions .btn {
    min-height: 44px;
    padding: 9px 8px;
    font-size: 11px;
  }

  html[lang="zh-TW"] .page--result-mirror .result-actions .btn {
    font-size: 13px;
  }

  .scroll-cue {
    bottom: calc(122px + env(safe-area-inset-bottom));
    width: min(76vw, 220px);
  }

  .scroll-cue__text {
    font-size: clamp(14px, 4.4vw, 18px);
    letter-spacing: 0.08em;
  }
}

/* Keep mobile share modal actions visible without extra scrolling */
@media (max-width: 768px) {
  .share-panel {
    max-height: calc(100dvh - 24px);
    padding: 16px 16px 14px;
    gap: 12px;
  }

  .share-card--preview {
    width: min(62vw, 250px);
  }

  .share-platforms {
    gap: 6px;
  }

  .share-panel__actions {
    gap: 8px;
  }
}

@media (max-width: 560px) {
  .share-card--preview {
    width: min(56vw, 220px);
  }
}

@media (max-width: 768px) {
  .scroll-cue__text {
    min-height: 40px;
    padding: 10px 14px;
    line-height: 1.2;
  }
}
