:root {
  --bg: #0e1e38;
  --ink: #fde8c0;
  --ink-weak: #e8b888;
  --line: rgba(251, 200, 136, 0.48);
  --line-strong: rgba(252, 212, 152, 0.88);
  --muted: rgba(240, 190, 135, 0.85);
  --accent: #fcd490;
  --gold: #fbc888;
  --gold-bright: #fff8ee;
  --gold-soft: #fbc888;
  --gold-deep: #d89050;
  --gold-main: #fbc888;
  --cream: #fde8c0;
  --glass: rgba(251, 200, 136, 0.08);
  --glass-border: rgba(251, 200, 136, 0.38);
  --serif: "Noto Serif TC", serif;
  --display: "Noto Serif TC", serif;
  --content-pad: 48px;
  --maxw: 720px;
  --sep-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 14'%3E%3Cpath d='M12,0 C12.6,5.2 15.8,6.4 23,7 C15.8,7.6 12.6,8.8 12,14 C11.4,8.8 8.2,7.6 1,7 C8.2,6.4 11.4,5.2 12,0 Z' fill='%23f8ca8c'/%3E%3C/svg%3E");
  --sep-line: linear-gradient(
    to right,
    transparent 0%,
    rgba(198, 160, 96, 0.1) 10%,
    rgba(198, 160, 96, 0.7) calc(50% - 24px),
    transparent calc(50% - 24px),
    transparent calc(50% + 24px),
    rgba(198, 160, 96, 0.7) calc(50% + 24px),
    rgba(198, 160, 96, 0.1) 90%,
    transparent 100%
  );
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  -webkit-font-smoothing: antialiased;
}

/* ════ 1. Royal Blue Argyle × Gold Ornament ════ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* 實心雙色菱格：深海藍底(#070d1c) × 稍亮深藍填充(#102545) × 金色交叉線與頂點光點 */
  background-image:
    radial-gradient(circle at 50% 50%, rgba(40, 65, 120, 0.35), transparent),
    url("data:image/svg+xml,%3Csvg width='60' height='100' viewBox='0 0 60 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0 L60 50 L30 100 L0 50 Z' fill='%23264070' opacity='0.80'/%3E%3Cpath d='M30 0 L60 50 L30 100 L0 50 Z' fill='none' stroke='rgba(251,200,136,0.35)' stroke-width='0.6'/%3E%3Ccircle cx='30' cy='50' r='1.4' fill='rgba(251,200,136,0.70)'/%3E%3Ccircle cx='0' cy='0' r='1.1' fill='rgba(251,200,136,0.55)'/%3E%3Ccircle cx='60' cy='0' r='1.1' fill='rgba(251,200,136,0.55)'/%3E%3Ccircle cx='30' cy='100' r='1.1' fill='rgba(251,200,136,0.55)'/%3E%3C/svg%3E");
  background-repeat: repeat, repeat;
  background-size:
    100% 100%,
    60px 100px;
  background-position:
    center,
    center top;
  opacity: 1;
}

/* ══ FIXED ART DECO OVERLAYS ══ */
.art-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  color: var(--ink);
  opacity: 0.55;
  transition: opacity 0.6s ease;
}
.art-layer.dim {
  opacity: 0.32;
}

.art-layer svg {
  overflow: visible;
}

.art-tl {
  position: absolute;
  top: 0;
  left: 0;
  width: 180px;
  height: 180px;
}

.art-tl svg {
  width: 100%;
  height: 100%;
}

.art-bl {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 220px;
  height: 220px;
}

.art-bl svg {
  width: 100%;
  height: 100%;
}

.art-tr {
  position: absolute;
  top: 0;
  right: 0;
  width: 220px;
  height: 220px;
}

.art-tr svg {
  width: 100%;
  height: 100%;
}

/* ══ APP LAYOUT ══ */
/* ════ 2. 懸浮文字區塊：毛玻璃與發光底板 ════ */
#app {
  width: 88%; /* 刻意縮小寬度，把左右的菱格紋露出來 */
  max-width: var(--maxw);
  margin: 48px auto; /* 讓上下也懸浮，不要貼死螢幕邊緣 */
  padding: 80px 32px 120px;
  position: relative;
  z-index: 10;

  background: linear-gradient(
    135deg,
    rgba(28, 35, 55, 0.82),
    rgba(20, 28, 48, 0.92)
  );
  backdrop-filter: blur(12px);
  border: 1px solid var(--line-strong);
  outline: 4px double var(--line);
  outline-offset: -12px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.8),
    inset 0 0 100px rgba(250, 200, 140, 0.05);

  min-height: calc(100vh - 96px);
}

/* ════ 3. 藝術感邊框外層：四角星芒金屬框 ════ */
#app::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(215, 175, 120, 0.5);
  z-index: 20;
  pointer-events: none;

  /* 四角金色星芒裝飾 */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0 C12 8 16 12 24 12 C16 12 12 16 12 24 C12 16 8 12 0 12 C8 12 12 8 12 0 Z' fill='rgba(248,195,130,0.92)'/%3E%3C/svg%3E")
      top -7px left -7px / 14px 14px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0 C12 8 16 12 24 12 C16 12 12 16 12 24 C12 16 8 12 0 12 C8 12 12 8 12 0 Z' fill='rgba(248,195,130,0.92)'/%3E%3C/svg%3E")
      top -7px right -7px / 14px 14px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0 C12 8 16 12 24 12 C16 12 12 16 12 24 C12 16 8 12 0 12 C8 12 12 8 12 0 Z' fill='rgba(248,195,130,0.92)'/%3E%3C/svg%3E")
      bottom -7px left -7px / 14px 14px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0 C12 8 16 12 24 12 C16 12 12 16 12 24 C12 16 8 12 0 12 C8 12 12 8 12 0 Z' fill='rgba(248,195,130,0.92)'/%3E%3C/svg%3E")
      bottom -7px right -7px / 14px 14px no-repeat;
}

/* ════ 4. 藝術感邊框內層：復古虛線 ════ */
#app::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(200, 168, 110, 0.18);
  z-index: 20;
  pointer-events: none;
}

/* ════ 5. 手機版微調 ════ */
@media (max-width: 768px) {
  #app {
    width: 92%;
    margin: 24px auto;
    padding: 60px 20px 80px;
  }
}

.section {
  position: relative;
  padding: 0 var(--content-pad) 64px;
}

/* ══ TITLE AREA ══ */
.title-wrap {
  position: relative;
  margin-top: 60px;
  margin-bottom: 40px;
  padding: 40px 0;
  display: flex;
  justify-content: center;
}

.h1 {
  font-family: var(--display);
  font-style: normal;
  font-weight: 800;
  letter-spacing: 1px;
  font-size: 56px;
  line-height: 1.1;
  color: var(--gold-bright);
  -webkit-text-stroke: 0.5px var(--gold-bright);
  text-align: left;
  position: relative;
  z-index: 2;
  text-shadow:
    0 0 10px rgba(250, 200, 140, 0.4),
    2px 2px 4px rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
}

.subtitle {
  margin-top: 16px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: 6px;
  text-align: center;
}

.lead {
  margin-top: 32px;
  color: var(--ink-weak);
  line-height: 2.4;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-align: center;
}

.lead strong {
  color: var(--ink);
  font-weight: 700;
}

.lead + .lead {
  margin-top: 20px;
}

.title-deco-left {
  position: absolute;
  left: -20px;
  top: 0;
  width: 80px;
  height: 220px;
  pointer-events: none;
}

.title-deco-right {
  position: absolute;
  right: -80px;
  top: 10px;
  width: 140px;
  height: 200px;
  pointer-events: none;
}

/* ══ BANNER ══ */
.banner-wrap {
  margin: 0 calc(-1 * var(--content-pad));
  position: relative;
  overflow: hidden;
  aspect-ratio: 2400/900;
}

.banner-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.banner-caption {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: var(--display);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 4px;
  color: rgba(210, 190, 155, 0.75);
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  line-height: 1;
}

/* ════ GOLD BANNER (書封式標題橫幅) ════ */
.gold-banner {
  position: relative;
  margin: 20px 0 28px;
  padding: 10px 28px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(251, 200, 136, 0.15) 20%,
    rgba(251, 200, 136, 0.15) 80%,
    transparent
  );
  border-top: 1px solid var(--gold-main);
  border-bottom: 1px solid var(--gold-main);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gold-banner::before,
.gold-banner::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 1px;
  background: rgba(248, 195, 130, 0.22);
  pointer-events: none;
}

.gold-banner::before {
  top: 3px;
}
.gold-banner::after {
  bottom: 3px;
}

.gold-banner-text {
  font-family: var(--display);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold-soft);
  text-shadow: 0 0 12px rgba(245, 190, 130, 0.45);
}

/* ══ DIVIDER ══ */
.rule {
  border: none;
  display: block;
  width: min(100%, 360px);
  height: 14px;
  margin: 32px auto;
  background-image: var(--sep-star), var(--sep-line);
  background-position: center center;
  background-repeat: no-repeat;
  background-size:
    24px 14px,
    100% 1px;
}

.rule::after {
  content: none;
}

/* ══ BUTTONS ══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  padding: 18px 42px;
  font-family: var(--serif);
  letter-spacing: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  user-select: none;
  text-transform: uppercase;
}

.btn:hover {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}

.btn-row {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

.btn.mini {
  padding: 11px 24px;
  font-size: 13px;
  letter-spacing: 3px;
  border-color: var(--line-strong);
  color: var(--ink-weak);
}

.btn.mini:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* ══ SHARE BUTTONS ══ */
.share-divider {
  height: 14px;
  width: min(100%, 360px);
  margin: 44px auto 0;
  background-image: var(--sep-star), var(--sep-line);
  background-position: center;
  background-repeat: no-repeat;
  background-size:
    24px 14px,
    100% 1px;
}

.btn-line-sticker-wrap {
  margin-top: 28px;
  margin-bottom: 0;
}

.share-row {
  gap: 12px !important;
  margin-top: 16px !important;
}

.back-row {
  margin-top: 12px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 12px 18px !important;
  font-size: 13px !important;
  letter-spacing: 2.5px !important;
  border-color: rgba(205, 168, 110, 0.28) !important;
  color: rgba(225, 190, 140, 0.72) !important;
  position: relative;
  transition: all 0.25s ease;
}

.share-btn:hover {
  border-color: rgba(251, 200, 136, 0.6) !important;
  color: rgba(253, 232, 192, 0.95) !important;
  background: rgba(251, 200, 136, 0.06) !important;
}

.share-btn-icon {
  font-size: 13px;
  opacity: 0.6;
}

.back-to-forest {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 40px !important;
  font-size: 13px !important;
  letter-spacing: 4px !important;
  border-color: rgba(205, 168, 110, 0.22) !important;
  color: rgba(210, 185, 145, 0.65) !important;
}

.back-to-forest:hover {
  background: rgba(251, 200, 136, 0.08) !important;
  border-color: rgba(251, 200, 136, 0.55) !important;
  color: var(--gold-bright) !important;
}

/* ══ LINE 貼圖按鈕 ══ */
.btn-line-sticker-wrap {
  width: 100%;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.btn-line-sticker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 40px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 3px;
  text-decoration: none;
  color: rgba(190, 215, 255, 0.85);
  border: 1px solid rgba(6, 199, 85, 0.35);
  background: linear-gradient(
    135deg,
    rgba(6, 199, 85, 0.06) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.btn-line-sticker::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 120%,
    rgba(6, 199, 85, 0.18) 0%,
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-line-sticker:hover {
  border-color: rgba(6, 199, 85, 0.75);
  color: #fff;
  box-shadow:
    0 0 18px rgba(6, 199, 85, 0.18),
    inset 0 0 12px rgba(6, 199, 85, 0.06);
}

.btn-line-sticker:hover::before {
  opacity: 1;
}

.btn-line-sticker:hover .line-sticker-icon {
  transform: rotate(-8deg) scale(1.12);
}

.line-sticker-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.line-sticker-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.line-sticker-title {
  font-size: 13px;
  letter-spacing: 3px;
  color: rgba(6, 199, 85, 0.88);
}

.btn-line-sticker:hover .line-sticker-title {
  color: #fff;
}

.line-sticker-sub {
  font-size: 13px;
  letter-spacing: 2px;
  color: rgba(6, 199, 85, 0.65);
  font-style: italic;
}

/* ══ SKIP BUTTON ══ */

/* ══ QUIZ ══ */
.meta {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-weak);
  font-family: var(--display);
  font-style: italic;
  letter-spacing: 2px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.progress {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.seg {
  flex: 1;
  height: 1px;
  background: transparent;
  border-top: 1px dashed var(--line);
  position: relative;
}

.seg.done {
  border-top-style: solid;
  border-color: var(--gold);
}

.seg.active {
  border-top-style: solid;
  border-color: var(--ink-weak);
}

.qno {
  margin-top: 60px;
  font-family: var(--display);
  font-style: italic;
  letter-spacing: 6px;
  color: var(--ink-weak);
  font-size: 18px;
  text-align: center;
}

@keyframes qAppear {
  0% {
    opacity: 0;
    transform: translateY(36px) scale(0.97);
    filter: blur(12px);
  }
  55% {
    opacity: 1;
    filter: blur(0.5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.qtext {
  margin-top: 20px;
  font-size: 20px;
  line-height: 1.85;
  letter-spacing: 1px;
  font-family: var(--serif);
  text-align: center;
  font-weight: 500;
  min-height: 60px;
  opacity: 0;
}

.qtext.appear {
  animation: qAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.options {
  margin-top: 48px;
}

.opt {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--ink-weak);
  text-align: left;
  padding: 16px 0;
  cursor: pointer;
  transition:
    color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    padding-left 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  opacity: 0;
  position: relative;
  overflow: hidden;
}

.opt.visible {
  animation: optFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.opt:hover {
  background: linear-gradient(
    90deg,
    rgba(195, 110, 45, 0.1),
    rgba(251, 200, 136, 0.05),
    transparent
  );
  color: var(--gold-bright);
  padding-left: 4px;
}

.opt:disabled {
  cursor: default;
  opacity: 0.28 !important;
  pointer-events: none;
}

.opt.selected {
  color: var(--ink);
}

.bullet {
  width: 7px;
  height: 7px;
  border: 1px solid var(--line-strong);
  margin-top: 10px;
  flex: 0 0 auto;
  transform: rotate(45deg);
  transition: all 0.2s ease;
}

.opt:hover .bullet,
.opt.selected .bullet {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  box-shadow: 0 0 12px var(--gold-main);
  transform: rotate(45deg) scale(1.25);
}

.opt .txt {
  line-height: 1.9;
  font-size: 16px;
  letter-spacing: 1px;
}

@keyframes optFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--ink-weak);
  cursor: pointer;
  font-family: var(--display);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 2px;
  padding: 0;
  margin-bottom: 24px;
  transition: color 0.2s ease;
}

.back-btn:hover {
  color: var(--ink);
}

.back-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.back-btn:hover svg {
  transform: translateX(-3px);
}

/* ══ RESULT ══ */
.result-hero {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: center;
  margin-top: 20px;
}

.result-img-wrap {
  border-radius: 0;
  padding: 10px;
  background: #1e2e48;
  flex-shrink: 0;
  aspect-ratio: 1050 / 1586;
  position: relative;
  border: 2px solid var(--gold-main);
  box-shadow: inset 0 0 12px rgba(251, 200, 136, 0.08);
}

.result-img-wrap::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(251, 200, 136, 0.25);
  outline: 1px dashed rgba(251, 200, 136, 0.55);
  outline-offset: -3px;
  pointer-events: none;
  z-index: 2;
}

.result-img-wrap::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(251, 200, 136, 0.2);
  background:
    linear-gradient(135deg, rgba(251, 200, 136, 0.85) 5px, transparent 0) top
      left,
    linear-gradient(225deg, rgba(251, 200, 136, 0.85) 5px, transparent 0) top
      right,
    linear-gradient(315deg, rgba(251, 200, 136, 0.85) 5px, transparent 0) bottom
      right,
    linear-gradient(45deg, rgba(251, 200, 136, 0.85) 5px, transparent 0) bottom
      left;
  background-size: 8px 8px;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 3;
}

.result-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  border: 1px solid #000;
  filter: contrast(1.05) saturate(0.9) sepia(0.05);
  position: relative;
  z-index: 1;
}

.result-hero-info {
  padding-top: 8px;
  padding-left: 20px;
  position: relative;
  border-left: 2px solid rgba(232, 200, 50, 0.32);
}

.r-eyebrow {
  display: block;
  font-family: var(--display);
  font-style: italic;
  letter-spacing: 5px;
  color: var(--gold-soft);
  font-size: 13px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.r-eyebrow::before {
  content: "";
  display: block;
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-main), transparent);
  margin-bottom: 12px;
  opacity: 0.75;
}

.r-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 32px; /* 將靈魂名稱大幅放大 */
  letter-spacing: 8px; /* 拉開字距，更有氣勢 */
  color: var(--gold-soft);
  margin-bottom: 8px;
}

.r-compound {
  font-family: var(--display);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 3px;
  color: var(--gold-soft);
  line-height: 1.6;
  padding-bottom: 36px;
  margin-bottom: 16px;
  position: relative;
}

.r-compound::before {
  content: "";
  position: absolute;
  bottom: 15px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--sep-line);
}

.r-compound::after {
  content: "✦";
  position: absolute;
  bottom: 9px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold-soft);
  font-size: 12px;
  line-height: 1;
  background: var(--bg);
  padding: 0 12px;
  z-index: 2;
}

.r-desc {
  margin-top: 16px;
  line-height: 2.2;
  color: var(--ink-weak);
  font-size: 16px;
  letter-spacing: 1.5px;
  text-align: justify;
}

/* ════════════════════════════════
   塔羅牌陣風格統整 (Tarot Frame)
════════════════════════════════ */
.seals.tarot-frame {
  margin-top: 56px;
  padding: 32px 16px 24px 16px;
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(251, 200, 136, 0.06) 0%,
    transparent 100%
  );
  border: 1px solid var(--line-strong);
  outline: 1px solid var(--line);
  outline-offset: -5px;
  box-shadow: inset 0 0 40px rgba(18, 24, 42, 0.8);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tarot-star {
  position: absolute;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0 C12 8 16 12 24 12 C16 12 12 16 12 24 C12 16 8 12 0 12 C8 12 12 8 12 0 Z' fill='rgba(248,195,130,0.92)'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 2;
}
.ts-tl {
  top: -7px;
  left: -7px;
}
.ts-tr {
  top: -7px;
  right: -7px;
}
.ts-bl {
  bottom: -7px;
  left: -7px;
}
.ts-br {
  bottom: -7px;
  right: -7px;
}

.tarot-pendant {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 40px;
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 2;
}
.top-pendant {
  top: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 40'%3E%3Cline x1='10' y1='0' x2='10' y2='20' stroke='rgba(200,168,110,0.48)' stroke-width='1' stroke-dasharray='2 2'/%3E%3Cpolygon points='10,20 15,30 10,40 5,30' fill='none' stroke='rgba(245,195,140,0.82)' stroke-width='1.5'/%3E%3Ccircle cx='10' cy='30' r='1.5' fill='rgba(252,210,165,0.96)'/%3E%3C/svg%3E");
}
.bottom-pendant {
  bottom: -40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 40'%3E%3Cline x1='10' y1='0' x2='10' y2='15' stroke='rgba(200,168,110,0.48)' stroke-width='1' stroke-dasharray='2 2'/%3E%3Cpolygon points='10,15 15,25 10,35 5,25' fill='none' stroke='rgba(245,195,140,0.82)' stroke-width='1.5'/%3E%3Ccircle cx='10' cy='25' r='1.5' fill='rgba(252,210,165,0.96)'/%3E%3C/svg%3E");
}

/* 專屬徽章容器 */
.tarot-emblem {
  width: 52px;
  height: 52px;
  margin: 36px auto 0;
  color: var(--gold-soft);
  display: flex;
  justify-content: center;
  align-items: center;
  animation: emblemBreath 3.8s ease-in-out infinite;
}

@keyframes emblemBreath {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}
.tarot-emblem svg {
  width: 100%;
  height: 100%;
}

.tarot-title {
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  color: var(--gold-soft);
  font-size: 13px;
  letter-spacing: 5px;
  margin: 16px 0 8px;
  text-shadow: 0 0 8px rgba(245, 190, 130, 0.2);
}
.tarot-title:first-of-type {
  margin-top: 12px;
}

.tarot-divider {
  margin: 18px auto;
  width: min(100%, 360px);
  height: 14px;
  display: block;
  background-image: var(--sep-star), var(--sep-line);
  background-position: center;
  background-repeat: no-repeat;
  background-size:
    24px 14px,
    100% 1px;
}
.tarot-divider svg {
  display: none;
}

.tarot-frame .seal {
  padding: 16px 12px;
}

.seal {
  border-bottom: 1px dashed var(--line);
  display: grid;
  grid-template-columns: max-content 1fr 52px;
  align-items: center;
  gap: 16px;
}

.seal:last-child {
  border-bottom: none;
}

.seal .lab.mbti-type {
  font-family: "Courier New", "Noto Serif TC", monospace;
  font-style: normal;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--gold-soft);
}

.seal .lab {
  font-family: var(--display);
  font-style: italic;
  letter-spacing: 1.5px;
  color: rgba(252, 205, 155, 0.88);
  font-size: 13px;
  white-space: nowrap;
}

.seal-ruler {
  position: relative;
  height: 18px;
  display: flex;
  align-items: center;
  margin: 0 12px;
}

.seal-ruler-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(185, 148, 95, 0.28);
}

.seal-ruler-track::before,
.seal-ruler-track::after {
  content: "";
  position: absolute;
  top: -1.5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: 1.5px solid rgba(215, 175, 120, 0.72);
  background: var(--bg);
}

.seal-ruler-track::before {
  left: -5px;
}

.seal-ruler-track::after {
  right: -5px;
}

.seal-ruler-ticks {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
}

.seal-ruler-ticks span {
  display: block;
  width: 1px;
  height: 4px;
  background: rgba(185, 148, 95, 0.35);
  transform: translateY(-1px);
}

.seal-ruler-ticks span:first-child,
.seal-ruler-ticks span:last-child {
  opacity: 0;
}

.seal-ruler-fill {
  position: absolute;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  transition: width 1.3s cubic-bezier(0.22, 1, 0.36, 1);
  width: 0;
}

.seal-ruler-pointer {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border: none;
  background: transparent;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0 L14 10 L24 12 L14 14 L12 24 L10 14 L0 12 L10 10 Z' fill='%23f0b870'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: left 1.3s cubic-bezier(0.22, 1, 0.36, 1);
  left: 0;
  z-index: 2;
}

#result.capturing .seal-ruler-pointer {
  filter: none !important;
}

.seal .val {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink);
  letter-spacing: 1px;
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}

.concept-epigraph {
  text-align: center;
  font-style: italic;
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 1.5px;
  color: rgba(220, 190, 150, 0.72);
  margin: 32px 0 0;
  padding: 20px 24px;
  position: relative;
}
.concept-epigraph::before,
.concept-epigraph::after {
  content: "";
  display: block;
  width: min(100%, 360px);
  height: 14px;
  margin: 16px auto;
  background-image: var(--sep-star), var(--sep-line);
  background-position: center;
  background-repeat: no-repeat;
  background-size:
    24px 14px,
    100% 1px;
}

.block {
  margin-top: 56px;
  padding: 40px 28px;
  position: relative;
  text-align: center;
  background: transparent;
  border: 1px solid var(--line-strong);
  outline: 1px solid var(--line);
  outline-offset: -5px;
}

.block .lab {
  font-family: var(--display);
  font-style: italic;
  letter-spacing: 4px;
  color: var(--gold-soft);
  font-size: 13px;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: block;
}

.block .txt {
  line-height: 2.4;
  color: var(--ink);
  font-size: 17px;
  letter-spacing: 2px;
  font-weight: 500;
}

.block .txt.muted {
  color: rgba(210, 190, 160, 0.8);
}

#r-quote,
#r-note,
#r-guide {
  width: min(100%, 620px);
  margin-left: auto;
  margin-right: auto;
  padding: 0 6px;
  line-height: 2.15;
}

#r-quote {
  margin-bottom: 28px !important;
  font-style: italic;
  color: rgba(245, 210, 160, 0.9);
  text-shadow: 0 0 10px rgba(245, 190, 130, 0.14);
}

#r-note,
#r-guide {
  color: rgba(220, 195, 160, 0.84);
}

#r-note {
  margin-bottom: 28px !important;
}

#r-guide {
  margin-bottom: 0 !important;
}

.cta {
  margin-top: 16px;
}

.cta a {
  display: flex;
  align-items: stretch;
  background: rgba(60, 45, 15, 0.06);
  border: 1px solid rgba(205, 168, 110, 0.28);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.cta a:hover {
  border-color: rgba(220, 185, 130, 0.62);
  background: rgba(100, 80, 30, 0.12);
}

.cta-cover {
  width: 120px;
  flex-shrink: 0;
  object-fit: contain;
  background: #0d1628;
  padding: 12px;
  border-right: 1px solid rgba(205, 168, 110, 0.15);
  display: block;
  position: relative;
  z-index: 3;
}

.cta-info {
  flex: 1;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  position: relative;
  z-index: 3;
}

.cta-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cta-label {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(235, 185, 130, 0.62);
  font-family: var(--display);
  font-style: italic;
}

.cta-arrow {
  font-size: 14px;
  color: rgba(225, 185, 130, 0.52);
  transition:
    color 0.25s,
    transform 0.25s;
}

.cta a:hover .cta-arrow {
  color: var(--ink);
  transform: translateX(4px);
}

.cta-title-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.cta-title {
  font-size: 18px;
  letter-spacing: 2px;
  font-family: var(--serif);
  font-weight: bold;
  text-shadow: 0 0 10px rgba(245, 190, 130, 0.38);
}

.cta-author {
  font-size: 13px;
  letter-spacing: 2px;
  font-style: italic;
  color: rgba(225, 185, 140, 0.68);
}

.cta-bot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cta-fairy {
  font-size: 13px;
  letter-spacing: 1.5px;
  font-style: italic;
  color: rgba(160, 135, 80, 0.52);
  padding-right: 10px;
  border-right: 1px solid rgba(205, 168, 110, 0.28);
}

.cta-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cta-tag {
  font-size: 13px;
  letter-spacing: 1px;
  border: 1px solid rgba(205, 168, 110, 0.32);
  padding: 3px 8px;
  color: rgba(225, 185, 140, 0.68);
}
/* ════════════════════════════════
   BUY BOOK (實體書購書卡片與 18+ 標記)
════════════════════════════════ */

/* ── 18禁警語 ── */
.adult-warning {
  margin: 0 0 28px;
  padding: 12px 16px 12px 20px;
  border-left: 3px solid rgba(220, 30, 50, 0.65);
  border: 1px solid rgba(220, 30, 50, 0.22);
  border-left-width: 3px;
  border-left-color: rgba(220, 30, 50, 0.7);
  background: rgba(220, 30, 50, 0.05);
  color: rgba(220, 185, 140, 0.9);
  font-size: 13px;
  letter-spacing: 1.5px;
  line-height: 1.9;
  text-align: left;
}

/* ── 18+ 標記：暗紅霓虹脈動效果 ── */
@keyframes agePulse {
  0%,
  100% {
    text-shadow:
      0 0 4px rgba(220, 20, 60, 0.8),
      0 0 10px rgba(220, 20, 60, 0.3);
    opacity: 0.8;
    transform: scale(1);
    border-color: rgba(220, 20, 60, 0.4);
  }
  50% {
    text-shadow:
      0 0 8px rgba(255, 50, 50, 1),
      0 0 15px rgba(220, 20, 60, 0.8),
      0 0 25px rgba(220, 20, 60, 0.5);
    opacity: 1;
    transform: scale(1.12);
    border-color: rgba(255, 50, 50, 0.8);
  }
}

.age-badge {
  display: inline-block;
  font-size: 0.9em;
  letter-spacing: 1px;
  color: #fff;
  font-weight: 800;
  vertical-align: baseline;
  font-style: normal;
  margin-left: 6px;
  padding: 2px 5px;
  border: 1px solid rgba(220, 20, 60, 0.5);
  border-radius: 3px;
  line-height: 1;
  animation: agePulse 1.6s ease-in-out infinite;
  background: linear-gradient(135deg, #ffffff 0%, #ff8888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 卡片內的 18+ 標記微調 */
.cta-label .age-badge,
.bbc-shop .age-badge {
  font-size: 13px;
  margin-top: -2px;
  margin-left: 6px;
}

/* ── 區塊分隔線（結果頁統一樣式） ── */
.book-section-sep {
  border: none;
  height: 14px; /* 與星星高度一致 */
  margin: 48px auto; /* 上下留白 */
  max-width: 80%; /* 控制整條分隔線的總長度 */

  background-image: var(--sep-star), var(--sep-line);

  background-position: center center;
  background-repeat: no-repeat;
  /* 星星尺寸為 24x14px，而線條寬度100%、高度強制維持 1px，保證銳利 */
  background-size:
    24px 14px,
    100% 1px;
}

/* ── 電子書平台 lab 間距 ── */
.buy-book-lab {
  margin-top: 28px;
  margin-bottom: 20px;
}


/* ── 平台卡片 grid ── */
.buy-book-wrap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  text-align: left;
}

.buy-book-card {
  display: flex;
  flex-direction: column;
  padding: 20px 16px 16px;
  background: rgba(60, 45, 15, 0.05);
  border: 1px solid rgba(205, 168, 110, 0.22);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  transition:
    border-color 0.3s,
    background 0.3s,
    transform 0.25s,
    box-shadow 0.3s;
}

.buy-book-card:hover {
  border-color: rgba(220, 185, 130, 0.62);
  background: rgba(100, 80, 30, 0.14);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(120, 90, 30, 0.18);
}

.bbc-shop {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 2px;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(245, 190, 130, 0.35);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.bbc-action {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 2px;
  color: rgba(225, 185, 130, 0.52);
  transition:
    color 0.3s,
    transform 0.3s;
  margin-top: auto;
  padding-top: 12px;
}

.buy-book-card:hover .bbc-action {
  color: rgba(253, 232, 192, 0.9);
  transform: translateX(4px);
}

@media (max-width: 580px) {
  .buy-book-wrap {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .buy-book-card {
    padding: 14px 12px 12px;
  }

  .bbc-shop {
    font-size: 13px;
  }
}

.stats {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px dotted var(--line-strong);
  color: rgba(230, 200, 160, 0.82);
  line-height: 2;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-align: center;
}

.stats strong {
  color: var(--ink);
  font-weight: 700;
}

/* ── 世界關係區塊 ── */
.world-relations {
  min-height: 0;
}

.world-relations:empty {
  display: none;
}

.relation-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 6px;
  font-family: var(--serif);
}

.relation-label {
  font-family: var(--display);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 2px;
  color: rgba(215, 185, 130, 0.68);
  white-space: nowrap;
  min-width: 52px;
}

.relation-conflict .relation-label {
  color: rgba(170, 100, 90, 0.68);
}

.relation-worlds {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px;
}

.relation-world {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--ink);
}

.relation-sep {
  font-size: 13px;
  color: rgba(195, 160, 105, 0.42);
  margin: 0 2px;
}

.relation-note {
  font-size: 13px;
  letter-spacing: 1px;
  color: rgba(205, 178, 130, 0.5);
  margin-top: 2px;
  margin-bottom: 16px;
  padding-left: 66px;
}

/* ── 甜甜圈圖表 ── */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.donut-wrap svg {
  flex-shrink: 0;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 120px;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-family: var(--serif);
  letter-spacing: 1px;
  line-height: 1;
}

.donut-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.donut-legend-name {
  flex: 1;
}

.donut-legend-pct {
  font-size: 13px;
  opacity: 0.65;
  min-width: 36px;
  text-align: right;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.in {
  animation: fadeUp 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hidden {
  display: none !important;
}

@media (max-width: 560px) {
  .result-hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .result-img-wrap {
    width: 72%;
    margin: 0 auto;
    border-radius: 0;
    padding: 8px;
    aspect-ratio: 1050 / 1586;
  }

  .result-img {
    object-fit: cover;
    object-position: top center;
  }
  .r-name,
  .r-eyebrow,
  .r-desc {
    text-align: center;
    display: block;
  }

  .r-mbti {
    justify-content: center;
  }

  .result-hero-info {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid rgba(232, 200, 50, 0.28);
    padding-top: 20px;
  }

  .r-eyebrow::before {
    display: none;
  }

  .r-compound {
    text-align: center;
    border-bottom: none;
    margin-bottom: 16px;
    padding-bottom: 36px;
  }

  .r-desc {
    font-size: 16px;
  }
  .buy-book-btn {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    letter-spacing: 2px;
  }

  #r-quote,
  #r-note,
  #r-guide {
    width: 100%;
    padding: 0 2px;
    line-height: 2.05;
  }

  .book-section-sep {
    width: min(100%, 320px);
    margin: 22px auto 24px;
  }
}

/* ══ 手機版微調：修正 Banner 英文副標題壓字 ══ */
@media (max-width: 768px) {
  .banner-caption {
    bottom: 5px;
    letter-spacing: 2px;
  }
}

#audio-btn {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 220;
  pointer-events: auto;
  background: transparent;
  border: none;
  width: 36px;
  height: 36px;
  padding: 0;
  cursor: pointer;
  color: var(--ink);
  visibility: hidden;
}

.audio-icon-wrap {
  position: relative;
  width: 26px;
  height: 26px;
}

#audio-btn svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  display: block;
  transition: opacity 0.15s ease;
}

.icon-bars {
  opacity: 1;
}

.icon-note {
  opacity: 0;
}

#audio-btn.muted .icon-bars {
  opacity: 0;
}

#audio-btn.muted .icon-note {
  opacity: 1;
}

#audio-btn:not(.muted) .bar1 {
  animation: barPulse 1.1s ease-in-out infinite;
}

#audio-btn:not(.muted) .bar2 {
  animation: barPulse 1.1s ease-in-out 0.18s infinite;
}

#audio-btn:not(.muted) .bar3 {
  animation: barPulse 1.1s ease-in-out 0.36s infinite;
}

@keyframes barPulse {
  0%,
  100% {
    transform: scaleY(1);
  }

  50% {
    transform: scaleY(1.8);
  }
}

#audio-btn.nudge {
  animation: nudgeGlow 1.6s ease 1;
}

@keyframes nudgeGlow {
  0%,
  100% {
    filter: none;
    color: var(--ink);
  }

  40% {
    filter: drop-shadow(0 0 8px rgba(245, 190, 130, 0.9));
    color: var(--gold-bright);
  }
}

#audio-hint {
  position: fixed;
  z-index: 260;
  pointer-events: none;
  font-family: var(--display);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--ink);
  background: rgba(5, 10, 25, 0.88);
  padding: 7px 14px;
  text-shadow:
    0 0 8px rgba(245, 190, 130, 1),
    0 0 18px rgba(245, 190, 130, 0.65);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}

#audio-hint.show {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 768px) {
  :root {
    --content-pad: 22px;
  }

  .h1 {
    font-size: clamp(26px, 8.5vw, 38px);
    text-align: center;
  }

  .title-deco-left {
    left: 0;
    width: 44px;
    height: 150px;
  }

  .title-deco-right {
    right: 0;
    width: 44px;
    height: 130px;
  }

  .title-wrap {
    padding: 20px 0;
  }

  .btn-row {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .seal {
    grid-template-columns: min-content 1fr 40px;
    gap: 8px;
    padding: 13px 12px;
  }

  .seal .lab {
    font-family: var(--display);
    font-style: italic;
    letter-spacing: 1.5px;
    color: rgba(252, 210, 158, 0.92);
    font-size: 13px;
    white-space: nowrap;
  }

  .seal .val {
    font-family: var(--display);
    font-style: italic;
    color: var(--ink);
    letter-spacing: 1px;
    font-size: 14px;
    text-align: right;
    white-space: nowrap;
    font-weight: bold;
  }

  .art-tr {
    width: 160px;
    height: 160px;
  }

  .art-bl {
    width: 160px;
    height: 160px;
  }

  .meta {
    font-size: 13px;
    letter-spacing: 1px;
  }

  #result.capturing,
  #result.capturing .r-eyebrow,
  #result.capturing .r-compound,
  #result.capturing .r-name,
  #result.capturing .r-desc,
  #result.capturing .block .txt,
  #result.capturing .block .txt.muted,
  #result.capturing .block .lab,
  #result.capturing .seal .lab,
  #result.capturing .stats,
  #result.capturing .stats strong,
  #result.capturing .relation-label,
  #result.capturing .relation-world,
  #result.capturing .cta a,
  #result.capturing .val,
  #result.capturing #pop-line,
  #result.capturing #pop-line span {
    color: #ffffff !important;
    opacity: 1 !important;
  }

  #result.capturing .block .txt.muted {
    color: rgba(255, 255, 255, 0.85) !important;
  }

  #result.capturing .r-desc {
    color: rgba(255, 255, 255, 0.92) !important;
  }

  #result.capturing .seal-ruler-track {
    background: rgba(170, 200, 255, 0.22) !important;
  }

  #result.capturing .seal-ruler-fill {
    background: rgba(200, 225, 255, 0.92) !important;
  }
}
/* ══ AUDIO ATTRIBUTION ══ */
.music-attribution {
  position: fixed;
  bottom: 12px;
  right: 12px;
  font-size: 13px;
  color: rgba(210, 185, 140, 0.3); /* 透明度調低，極度不起眼 */
  font-family: var(--serif);
  letter-spacing: 1px;
  pointer-events: none; /* 避免擋住點擊 */
  z-index: 50;
  transition: opacity 0.5s ease;
}

/* 讓他在產生長圖時自動消失 (配合 ui.js 的設定) */
.capturing-global .music-attribution {
  display: none !important;
}

/* ══ SITE FOOTER LINKS ══ */
.site-footer-links {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid rgba(251, 200, 136, 0.12);
  padding-bottom: 8px;
}

.footer-heading {
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  color: #c8a878;
  margin-bottom: 16px;
  font-family: var(--serif);
}

.footer-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.footer-cards-2 {
  grid-template-columns: repeat(2, 1fr);
}

.footer-group + .footer-group {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(232, 200, 50, 0.18);
}

/* ── 製作與貢獻 ── */
.footer-members-wrap {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(232, 200, 50, 0.18);
}

.footer-members {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.footer-member-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  padding: 6px 4px 8px;
  width: calc((100% - 30px) / 6);
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #ebc894;
  text-decoration: none;
  transition:
    border-color 0.25s,
    color 0.25s,
    background 0.25s;
}

.footer-member-card:hover {
  border-color: rgba(251, 200, 136, 0.28);
  color: rgba(253, 232, 192, 0.9);
  background: rgba(251, 200, 136, 0.04);
}

.footer-member-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  display: block;
  opacity: 0.85;
  transition: opacity 0.25s;
  margin-bottom: 4px;
}

.footer-member-card:hover .footer-member-img {
  opacity: 1;
}

.footer-member-name {
  display: block;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.footer-member-role {
  display: block;
  font-size: 13px;
  color: #8a7a68;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* ── 鳴謝標題間距微調 ── */
.footer-heading--collab {
  margin-top: 14px;
  margin-bottom: 8px;
}

/* ── 特別協力（獨立置中） ── */
.footer-collab {
  display: flex;
  justify-content: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(232, 200, 50, 0.12);
}

.footer-collab .footer-member-card {
  width: calc((100% - 30px) / 6);
}

.footer-copyright {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 2px;
  color: #8a7a68;
  font-family: var(--serif);
}

.footer-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 18px 10px;
  border: 1px solid rgba(251, 200, 136, 0.13);
  border-radius: 6px;
  background: rgba(251, 200, 136, 0.02);
  color: #ebc894;
  text-decoration: none;
  transition:
    border-color 0.3s,
    color 0.3s,
    background 0.3s,
    transform 0.25s;
}

.footer-card:hover {
  border-color: rgba(251, 200, 136, 0.36);
  color: rgba(253, 232, 192, 0.9);
  background: rgba(251, 200, 136, 0.06);
  transform: translateY(-3px);
}

.footer-card-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  opacity: 0.82;
  transition:
    opacity 0.3s,
    filter 0.3s;
}

.footer-card:hover .footer-card-icon {
  opacity: 1;
  filter: brightness(1.1);
}

.footer-card-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.footer-card-title {
  display: block;
  font-family: var(--serif);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

.footer-card-desc {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.footer-card-prizes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-top: 7px;
}

.prize-tag {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: rgba(251, 200, 136, 0.75);
  border: 1px solid rgba(251, 200, 136, 0.3);
  border-radius: 2px;
  padding: 2px 7px;
  white-space: nowrap;
  transition:
    color 0.3s,
    border-color 0.3s;
}

.footer-card:hover .prize-tag {
  color: rgba(253, 232, 192, 0.92);
  border-color: rgba(251, 200, 136, 0.55);
}

@media (max-width: 580px) {
  .footer-cards {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .footer-cards-2 {
    grid-template-columns: 1fr;
  }

  .footer-card {
    flex-direction: row;
    text-align: left;
    align-items: center;
    padding: 13px 16px;
    gap: 14px;
  }

  .footer-card-icon {
    width: 100px;
    aspect-ratio: 1;
    flex-shrink: 0;
  }

  .footer-members {
    gap: 4px;
  }
  .footer-member-card {
    width: calc((100% - 16px) / 5);
    padding: 5px 2px 7px;
  }
  .footer-collab .footer-member-card {
    width: calc((100% - 16px) / 5);
  }
}

/* ════════════════════════════════
   RESULT REVEAL ANIMATIONS
════════════════════════════════ */

@keyframes revealEyebrow {
  from {
    opacity: 0;
    letter-spacing: 1px;
  }
  to {
    opacity: 1;
    letter-spacing: 6px;
  }
}

@keyframes revealCompound {
  from {
    opacity: 0;
    letter-spacing: 0px;
  }
  to {
    opacity: 1;
    letter-spacing: 3px;
  }
}

@keyframes revealName {
  0% {
    opacity: 0;
    letter-spacing: 2px;
    filter: blur(2px);
  }
  55% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 1;
    letter-spacing: 8px;
    filter: blur(0);
  }
}

.r-eyebrow.r-reveal {
  animation: revealEyebrow 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.1s;
}

.r-compound.r-reveal {
  animation: revealCompound 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.22s;
}

.r-name.r-reveal {
  animation: revealName 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.38s;
}

/* 截圖時停用動畫，確保畫面穩定 */
#result.capturing .r-eyebrow,
#result.capturing .r-compound,
#result.capturing .r-name {
  animation: none !important;
  opacity: 1 !important;
  letter-spacing: inherit !important;
  filter: none !important;
}

/* ════════════════════════════════
   QUIZ OPTION HOVER GOLD BAR
════════════════════════════════ */

.opt::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12%;
  height: 76%;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(251, 200, 136, 0.72),
    transparent
  );
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 1px;
}

.opt:hover::before {
  transform: scaleY(1);
  box-shadow:
    0 0 8px rgba(251, 200, 136, 0.75),
    0 0 18px rgba(251, 200, 136, 0.32);
}
