/* 照妖镜·西游道途 · 双首页：L3入口剧场 + 星斗五行棋盘 */
:root {
  --bg: #0a0618;
  --deep: #12082a;
  --panel: rgba(12, 18, 32, 0.88);
  --line: rgba(0, 212, 255, 0.28);
  --gold: #e8c36a;
  --cyan: #00d4ff;
  --text: #e8f0ff;
  --muted: #8fa0b8;
  --danger: #d95d4e;
  --font-display: "悟道中宋", "方正墨韵体简", "STZhongsong", "STKaiti", "KaiTi", "SimSun", serif;
  --font-ui: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.6;
}
.j81-app { min-height: 100vh; }
[hidden] { display: none !important; }

/* ========== 入口剧场（旧 L3：人在卷轴侧旁） ========== */
.j81-home {
  position: fixed; inset: 0; z-index: 30;
  display: none;
  background: var(--deep);
  overflow: hidden;
}
.j81-home.is-open { display: block; }
.j81-home-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(0, 212, 255, 0.08), transparent 55%),
    radial-gradient(ellipse at 70% 60%, rgba(212, 175, 55, 0.07), transparent 50%),
    url("../assets/img/背景/04_星云八卦图_v76.webp") center / cover no-repeat,
    #0a0618;
  opacity: 0.55;
  filter: saturate(1.05);
}

/* 武器立绘 + 祥云 + 气泡（对齐旧 lt2d：栈宽驱动，脚踩云心） */
.j81-char-wrap {
  position: relative;
  z-index: 6;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  overflow: visible;
  max-width: none;
}
.j81-char-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: min(19.5vw, 45vw);
  animation: j81-float 3.5s ease-in-out infinite;
  overflow: visible;
}
.j81-char-wrap[data-char="tangseng"] .j81-char-stack { width: min(24vw, 52vw); }
.j81-char-wrap[data-char="bailong"] .j81-char-stack { width: min(22.5vw, 50vw); }
@keyframes j81-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.j81-weapon {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
  max-height: 78vh;
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
  opacity: 1;
  filter:
    drop-shadow(0 0 25px rgba(212, 175, 55, 0.45))
    drop-shadow(0 0 50px rgba(0, 212, 255, 0.25));
  user-select: none;
  -webkit-user-drag: none;
  /* 勿用 both：hidden 态播动画会卡在 from{opacity:0} */
  animation: j81-weapon-enter 1.05s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes j81-weapon-enter {
  0% { transform: scale(0.88); opacity: 0; filter: blur(8px); }
  100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 25px rgba(212, 175, 55, 0.45)) drop-shadow(0 0 50px rgba(0, 212, 255, 0.25)); }
}
.j81-starfield .j81-board-char .j81-weapon,
.j81-l3-char .j81-weapon,
.j81-stage-char .j81-weapon {
  opacity: 1 !important;
}
.j81-cloud {
  --cloud-bottom: -40%;
  --cloud-shift-x: 0%;
  --cloud-w: 80%;
  position: absolute;
  left: 50%;
  bottom: var(--cloud-bottom);
  width: var(--cloud-w);
  max-width: none;
  height: auto;
  transform: translateX(calc(-50% + var(--cloud-shift-x)));
  object-fit: contain;
  object-position: center center;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  margin: 0;
  padding: 0;
}
/* 旧 lt2d：脚踩云心 */
.j81-char-wrap[data-char="wukong"] .j81-cloud {
  --cloud-w: 88%; --cloud-bottom: -40%; --cloud-shift-x: 0%;
}
.j81-char-wrap[data-char="bajie"] .j81-cloud {
  --cloud-w: 88%; --cloud-bottom: -40%; --cloud-shift-x: 0%;
}
.j81-char-wrap[data-char="tangseng"] .j81-cloud {
  --cloud-w: 80%; --cloud-bottom: -40%; --cloud-shift-x: 0%;
}
.j81-char-wrap[data-char="bailong"] .j81-cloud {
  --cloud-w: 68%; --cloud-bottom: -40%; --cloud-shift-x: 0%;
}
.j81-char-wrap[data-char="shaseng"] .j81-cloud {
  --cloud-w: 88%; --cloud-bottom: -40%; --cloud-shift-x: 0%;
}
.j81-char-wrap[data-char="wukong"] .j81-badge { right: 4%; bottom: 20%; }
.j81-char-wrap[data-char="bajie"] .j81-badge { right: 0%; bottom: 18%; }
.j81-char-wrap[data-char="tangseng"] .j81-badge { right: 6%; bottom: 22%; }
.j81-char-wrap[data-char="bailong"] .j81-badge { right: 2%; bottom: 24%; }
.j81-char-wrap[data-char="shaseng"] .j81-badge { right: 1%; bottom: 19%; }

.j81-bubble {
  position: absolute;
  left: 42%;
  top: 0;
  transform: translateX(-50%) translateY(calc(-100% - 2px));
  transform-origin: center bottom;
  width: 148px;
  height: 134px;
  aspect-ratio: 384 / 348;
  z-index: 4;
  background: center / 100% 100% no-repeat;
  pointer-events: none;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}
.j81-bubble-text {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  font-family: "悟道中宋", "STZhongsong", "STKaiti", "KaiTi", serif;
  font-size: 42px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.08;
  color: #FFD700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.85);
  white-space: nowrap;
  writing-mode: horizontal-tb;
  max-width: 86%;
  text-align: center;
  text-overflow: clip;
  overflow: visible;
}
.j81-char-wrap[data-char="wukong"] .j81-bubble {
  background-image: url("../assets/img/对话气泡/3.webp");
  left: 30%;
}
.j81-char-wrap[data-char="bajie"] .j81-bubble {
  background-image: url("../assets/img/对话气泡/4.webp");
  left: 78%;
}
.j81-char-wrap[data-char="tangseng"] .j81-bubble {
  background-image: url("../assets/img/对话气泡/1.webp");
}
.j81-char-wrap[data-char="bailong"] .j81-bubble {
  background-image: url("../assets/img/对话气泡/5.webp");
  left: 28%;
}
.j81-char-wrap[data-char="shaseng"] .j81-bubble {
  background-image: url("../assets/img/对话气泡/2.webp");
  left: 72%;
}
.j81-char-wrap[data-char="wukong"] .j81-bubble-text { left: 50%; top: 48%; }
.j81-char-wrap[data-char="bajie"] .j81-bubble-text { left: 50%; top: 48%; }
.j81-char-wrap[data-char="tangseng"] .j81-bubble-text { left: 50%; top: 48%; }
.j81-char-wrap[data-char="bailong"] .j81-bubble-text { left: 50%; top: 48%; }
.j81-char-wrap[data-char="shaseng"] .j81-bubble-text { left: 50%; top: 48%; }
@keyframes j81-scan {
  0% { transform: translateY(-6%); }
  100% { transform: translateY(6%); }
}
.j81-holo-inner { position: relative; z-index: 2; }
.j81-logo {
  display: block;
  width: min(168px, 48%);
  height: auto;
  margin: 0 auto 10px;
  filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.35));
}
.j81-home-lead {
  margin: 0 0 14px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(240, 230, 200, 0.88);
}
.j81-char-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 16px; justify-content: center;
}
.j81-char-tab {
  appearance: none; cursor: pointer;
  padding: 7px 12px;
  border-radius: 2px;
  border: 1px solid rgba(0, 245, 255, 0.28);
  background: rgba(0, 20, 32, 0.45);
  color: #cfefff;
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}
.j81-char-tab.is-on {
  border-color: rgba(255, 215, 120, 0.75);
  color: #fff6d0;
  box-shadow: 0 0 12px rgba(255, 180, 60, 0.28);
}

/* ========== 行程棋盘视图 ========== */
.j81-board-view {
  height: 100vh;
  max-height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0, 212, 255, 0.08), transparent 50%),
    #070510;
}
.j81-brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 1.05rem;
  display: flex; align-items: center; gap: 10px;
  min-width: 0;
}
.j81-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.j81-brand-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.j81-brand small {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  margin-top: 0;
  font-family: var(--font-ui);
}
.j81-back-home {
  appearance: none; cursor: pointer;
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 4px;
  border: 1px solid rgba(0, 245, 255, 0.4);
  background: rgba(0, 30, 48, 0.5);
  color: var(--cyan);
  font-size: 1rem;
}
.j81-hud { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.j81-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 245, 255, 0.28);
  border-radius: 2px;
  background: rgba(0, 20, 32, 0.55);
  font-size: 0.85rem;
  color: var(--muted);
  backdrop-filter: blur(8px);
}
.j81-chip strong { color: var(--gold); font-weight: 700; }

.lotus { display: inline-flex; gap: 3px; }
.lotus .petal {
  width: 11px; height: 11px; border-radius: 50% 50% 40% 40%;
  background: radial-gradient(circle at 30% 30%, #fff4d0, var(--gold) 55%, #5a3a10);
  box-shadow: 0 0 6px rgba(232, 163, 61, 0.45);
}
.lotus.hp2 .petal:nth-child(n+3),
.lotus.hp1 .petal:nth-child(n+2),
.lotus.hp0 .petal { opacity: 0.18; filter: grayscale(1); }

.j81-board-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 0;
  max-width: none;
  width: 100%;
  margin: 0;
  min-height: 0;
}
.j81-starfield {
  position: relative;
  flex: 1;
  min-height: 0;
  border: none;
  border-radius: 0;
  overflow: hidden;
  background: rgba(6, 8, 18, 0.35);
  box-shadow: none;
}
.j81-bagua {
  position: absolute; inset: 0;
  background: url("../assets/img/背景/04_星云八卦图_v76.webp") center / cover no-repeat;
  opacity: 0.52;
  pointer-events: none;
  filter: saturate(1.15) contrast(1.08);
}
.j81-orbit-lines {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.55;
}
.j81-stars {
  position: absolute; inset: 0;
  z-index: 2;
}
.j81-star {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 132px;
  min-height: 132px;
  padding: 10px 6px 12px;
  appearance: none;
  cursor: pointer;
  text-align: center;
  color: #e8f4ff;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.22;
  border: 1px solid rgba(0, 245, 255, 0.35);
  background:
    radial-gradient(circle at 50% 30%, rgba(0, 245, 255, 0.22), transparent 65%),
    rgba(8, 14, 28, 0.82);
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.18);
  transition: transform .15s, box-shadow .15s, border-color .15s;
  z-index: 2;
}
.j81-star:hover:not(:disabled) {
  transform: translate(-50%, -50%) scale(1.06);
  border-color: rgba(0, 245, 255, 0.75);
  box-shadow: 0 0 18px rgba(0, 245, 255, 0.35);
  z-index: 4;
}
.j81-star:disabled {
  opacity: 0.32;
  cursor: not-allowed;
  filter: grayscale(0.55);
}
.j81-star.is-done {
  border-color: rgba(120, 220, 160, 0.65);
  background:
    radial-gradient(circle at 50% 30%, rgba(80, 200, 140, 0.25), transparent 65%),
    rgba(10, 28, 20, 0.85);
}
.j81-star.is-now {
  border-color: rgba(255, 215, 120, 0.95);
  box-shadow: 0 0 0 1px rgba(255, 215, 120, 0.4), 0 0 22px rgba(255, 180, 60, 0.4);
  animation: j81-pulse-star 1.8s ease-in-out infinite;
  z-index: 5;
  left: 52% !important;
  top: 44% !important;
}
.j81-star.is-heart {
  border-color: rgba(180, 140, 255, 0.7);
  background:
    radial-gradient(circle at 50% 30%, rgba(160, 120, 255, 0.28), transparent 65%),
    rgba(24, 14, 36, 0.9);
}
.j81-star.is-pick {
  outline: 2px solid rgba(255, 215, 120, 0.85);
  outline-offset: 3px;
}
@keyframes j81-pulse-star {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}
.j81-star .n { opacity: 0.85; letter-spacing: 0.04em; font-size: 0.85rem; }
.j81-star .t {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-top: 3px;
  color: #fff6d8;
  font-weight: 700;
}
.j81-star .m { color: var(--gold); margin-top: 3px; font-size: 0.82rem; font-weight: 600; }

/* 中央卷轴：默认位置由 data-layout 覆盖；此处只保留基础壳 */
.j81-scroll-panel {
  position: absolute;
  z-index: 3;
  box-sizing: border-box;
  pointer-events: auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  background: transparent;
}
.j81-scroll-panel.gold-holo > .j81-scroll-rod { display: none !important; }
/* 卷轴内底色铺满，顶栏/图例明确在卷内 */
.j81-scroll-panel > .j81-scroll-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  /* 旧 #lt2-detail：内文区透明，透过看星空 + 5% 金箔 gs-panel */
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: clamp(8px, 1.2vh, 14px) clamp(10px, 1.4vw, 18px);
}
.j81-scroll-chrome {
  flex: 0 0 auto;
  width: 100%;
}
.j81-scroll-chrome-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 215, 120, 0.18);
}
.j81-scroll-chrome-bot {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 215, 120, 0.18);
}
.j81-scroll-copy {
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.35em;
  padding-top: clamp(4px, 1vh, 12px);
}
.j81-scroll-panel .j81-scroll-desc {
  max-height: none;
  flex: 0 1 auto;
  overflow: visible;
}
.j81-realm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: inherit;
  padding: 0;
  background: transparent;
}
.j81-scroll-kicker {
  margin: 0;
  font-size: clamp(0.82rem, 1.3vw, 1.0rem);
  letter-spacing: 0.12em;
  color: rgba(120, 220, 255, 0.95);
  font-family: var(--font-ui);
  font-weight: 400;
}
@keyframes j81-gold-glint {
  0%, 100% { background-position: 50% 12%; filter:
    drop-shadow(0 -0.7px 0 rgba(255, 252, 240, 0.72))
    drop-shadow(0.5px 0.5px 0 rgba(38, 38, 38, 0.95))
    drop-shadow(0.9px 1.5px 0 rgba(14, 10, 4, 0.96))
    drop-shadow(1.8px 2.6px 1.4px rgba(0, 0, 0, 0.52))
    brightness(1); }
  50% { background-position: 50% 48%; filter:
    drop-shadow(0 -1px 0 rgba(255, 252, 240, 0.9))
    drop-shadow(0.5px 0.5px 0 rgba(38, 38, 38, 0.95))
    drop-shadow(0.9px 1.5px 0 rgba(14, 10, 4, 0.96))
    drop-shadow(1.8px 2.6px 1.4px rgba(0, 0, 0, 0.52))
    brightness(1.18); }
}
/* 主标题：旧 #lt2-detail .lt3-name-seal = 3.45rem 金石光（字体用悟道中宋） */
.j81-scroll-body h2,
#j81-scroll-title,
.j81-scroll-copy > h1,
.j81-scroll-copy > h2,
#j81-l3-title,
.j81-name-seal {
  position: relative;
  display: block;
  width: 100%;
  margin: 0.08em 0 0.18em;
  font-family: "悟道中宋", "方正墨韵体简", "STZhongsong", "STKaiti", "KaiTi", serif;
  font-size: 3.45rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.1em;
  line-height: 1.12;
  /* 主题字 = 气泡「走起」同款：实金 #FFD700 + 金晕，硬底影出立体质感 */
  -webkit-text-stroke: 0 !important;
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: #FFD700 !important;
  color: #FFD700 !important;
  text-shadow:
    0 1px 0 #2a1800,
    0 2px 0 #1a0e00,
    0 3px 2px rgba(0, 0, 0, 0.65),
    0 0 10px rgba(255, 215, 0, 0.55) !important;
  filter: none !important;
  animation: none !important;
  -webkit-font-smoothing: antialiased;
}


/* 星斗关名再放大一档，避免「太小太小」 */
#j81-scroll-title {
  font-size: clamp(3.45rem, 5.6vw, 4.2rem) !important;
}
.j81-scroll-body h2::before,
#j81-scroll-title::before,
.j81-scroll-copy > h1::before,
.j81-scroll-copy > h2::before,
#j81-l3-title::before,
.j81-scroll-body h2::after,
#j81-scroll-title::after,
.j81-scroll-copy > h1::after,
.j81-scroll-copy > h2::after,
#j81-l3-title::after {
  content: none !important;
  display: none !important;
}
.j81-scroll-meta,
.j81-scroll-copy > .j81-scroll-meta,
.j81-scroll-copy > .j81-intro {
  margin: 0 0 0.35em;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.45;
  color: rgba(180, 230, 255, 0.92);
  font-family: var(--font-ui);
  max-width: none;
}
.j81-scroll-desc,
.j81-scroll-copy > .j81-scroll-desc,
.j81-scroll-copy > .j81-scroll {
  margin: 0 0 0.45em;
  font-size: clamp(1.0rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: rgba(245, 235, 210, 0.94);
  font-family: var(--font-ui);
  max-height: none;
  overflow: visible;
}
.j81-scroll-desc b { color: #fff; }
.j81-scroll-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 0.35em;
}
.j81-scroll-actions button:disabled { opacity: 0.45; cursor: not-allowed; }

.j81-realm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: inherit;
  padding: 0;
  flex: 0 0 auto;
  background: transparent;
  border: none;
}
.j81-legend-pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 26px;
  max-width: 11.5em;
  padding: 0 8px;
  border: 1px solid rgba(0, 245, 255, 0.22);
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1;
  color: var(--muted);
  background: rgba(10, 14, 24, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.j81-legend-pill i {
  width: 8px; height: 8px; border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}
.j81-legend-pill img {
  width: 18px; height: 18px; object-fit: contain;
}

.j81-intro { color: var(--muted); font-size: 1.12rem; margin: 0 0 16px; max-width: 46em; line-height: 1.65; }
.j81-intro b { color: var(--text); }

/* 过招 / 盘方 / 定盘 */
.j81-stage, .j81-gate, .j81-portal {
  position: fixed; inset: 0; z-index: 40; display: none;
  align-items: center; justify-content: center;
  background: rgba(5, 7, 10, 0.84); padding: 12px;
}
.j81-stage.is-open, .j81-gate.is-open, .j81-portal.is-open { display: flex; }
.j81-portrait { z-index: 45; }

.j81-panel {
  width: min(820px, 100%); max-height: 92vh; overflow: auto;
  background: #10151e; border: 1px solid rgba(90, 208, 255, 0.28);
  border-radius: 8px; padding: 22px 24px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5), inset 0 0 0 1px rgba(232,163,61,.12);
}
/* 过招/盘方全息：勿被通用 panel 820 宽与 overflow:auto 压扁 */
#j81-stage-panel.j81-panel,
#j81-gate-panel.j81-panel {
  width: var(--holo-w, 82vw);
  max-width: none;
  height: var(--holo-h, 80vh);
  max-height: none;
  overflow: visible;
  padding: 0;
}

/* 过招/盘方主标题：字号加大；玫瑰金金属立体+电流扫光走共享规则（.j81-scroll-copy>h1 等） */
#j81-stage-title,
#j81-gate-panel > .j81-scroll-copy > h1 {
  font-size: clamp(2.7rem, 4.3vw, 3.5rem) !important;
  letter-spacing: 0.12em !important;
  line-height: 1.12 !important;
  margin: 0 0 0.2em !important;
}
/* 过招/盘方情景正文：各步骤统一；字框贴合场景文字，不留白、不出滚动条 */
#j81-stage-body,
#j81-gate-rx,
#j81-stage-panel .j81-scroll-desc,
#j81-gate-panel .j81-scroll-desc {
  font-family: var(--font-ui) !important;
  color: #fff6cf !important;
  font-weight: 400 !important;
  font-size: clamp(0.92rem, 1.4vw, 1.08rem) !important;
  line-height: 1.55 !important;
  letter-spacing: 0.02em !important;
  flex: 0 0 auto !important;
  align-self: stretch !important;
  width: 100% !important;
  padding: 0.75em 1.1em 0.85em !important;
  margin: 0.45em 0 0.6em !important;
  min-height: 0 !important;
  white-space: pre-wrap;
  hanging-punctuation: allow-end;
  text-align: inherit;
  border: 1px solid rgba(255, 215, 0, 0.28) !important;
  border-radius: 2px !important;
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.06) 0%,
    rgba(12, 14, 20, 0.42) 42%,
    rgba(255, 215, 0, 0.05) 100%
  ) !important;
  box-shadow:
    inset 0 0 18px rgba(255, 215, 0, 0.04),
    0 0 8px rgba(255, 215, 0, 0.06) !important;
  position: relative;
  overflow: visible;
}
/* 场景字框：电流沿边框流动（亮斑绕框一圈） */
#j81-stage-body::before,
#j81-gate-rx::before,
#j81-stage-panel .j81-scroll-desc::before,
#j81-gate-panel .j81-scroll-desc::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 3px;
  padding: 1px;
  background: linear-gradient(90deg,
    rgba(255, 215, 0, 0.22) 0%,
    rgba(255, 215, 0, 0.22) 38%,
    #FFF8DC 46%,
    rgba(0, 245, 255, 0.95) 50%,
    #FFF8DC 54%,
    rgba(255, 215, 0, 0.22) 62%,
    rgba(255, 215, 0, 0.22) 100%);
  background-size: 220% 100%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: j81-box-electric 3.2s linear infinite;
  pointer-events: none;
}
@keyframes j81-box-electric {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}
/* 取消粗金轴头线（只杀 ::before；::after 留给电流边） */
#j81-stage-body.j81-scroll::before,
#j81-gate-rx.j81-scroll::before,
#j81-stage-panel .j81-scroll::before,
#j81-gate-panel .j81-scroll::before {
  display: none !important;
  content: none !important;
  height: 0 !important;
  background: none !important;
  box-shadow: none !important;
}
/* L11 式四边电流（覆盖 .j81-scroll::after 粗轴头） */
#j81-stage-body.j81-scroll::after,
#j81-gate-rx.j81-scroll::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  height: auto !important;
  width: auto !important;
  border-radius: 0 !important;
  pointer-events: none;
  z-index: 2;
  opacity: 0.95;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 250, 200, 0.95) 50%, transparent 100%) 0 0 / 38% 2px no-repeat,
    linear-gradient(180deg, transparent 0%, rgba(255, 250, 200, 0.95) 50%, transparent 100%) 100% 0 / 2px 38% no-repeat,
    linear-gradient(90deg, transparent 0%, rgba(255, 250, 200, 0.95) 50%, transparent 100%) 100% 100% / 38% 2px no-repeat,
    linear-gradient(180deg, transparent 0%, rgba(255, 250, 200, 0.95) 50%, transparent 100%) 0 100% / 2px 38% no-repeat !important;
  box-shadow: none !important;
  animation: j81-box-elec 2.4s linear infinite;
}
@keyframes j81-box-elec {
  0% {
    background-position: -20% 0, 100% -20%, 120% 100%, 0 120%;
  }
  100% {
    background-position: 120% 0, 100% 120%, -20% 100%, 0 -20%;
  }
}
#j81-stage-phase {
  font-family: var(--font-ui) !important;
  color: #E8C75A !important;
  font-size: 1.28rem !important;
  letter-spacing: 0.18em !important;
}
#j81-stage-sub {
  font-family: "悟道中宋", "方正墨韵体简", "STZhongsong", "KaiTi", serif !important;
  color: rgba(232, 199, 90, 0.92) !important;
  font-size: 1.15rem !important;
}
/* 过招输入框：同系字体，勿另起一套 UI 字 */
#j81-stage-panel .j81-input,
#j81-gate-panel .j81-input,
#j81-trial-input {
  font-family: "悟道中宋", "方正墨韵体简", "STZhongsong", "KaiTi", serif !important;
  font-size: 1.15rem !important;
  line-height: 1.55 !important;
}
.j81-holo-panel {
  position: relative;
  border-color: rgba(0, 245, 255, 0.35);
  background: transparent;
  font-family: var(--font-display);
}
/* 金箔全息：壳透明（旧版 95% 透 = 仅 5% 金箔色度） */
#j81-stage-panel.j81-holo-panel,
#j81-gate-panel.j81-holo-panel,
#j81-portrait-panel.j81-holo-panel {
  background: transparent !important;
  border-color: rgba(255, 215, 0, 0.35);
}
#j81-scroll-panel.j81-scroll-panel {
  background: rgba(0, 191, 255, 0.2) !important;
  border-color: rgba(255, 215, 0, 0.35);
}
.j81-holo-panel::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px, rgba(0, 245, 255, 0.025) 3px
  );
  opacity: 0.45;
}
.j81-panel.heart {
  background: linear-gradient(165deg, #2a2218 0%, #1a1612 50%, #12100e 100%);
  border-color: rgba(232, 163, 61, 0.45);
  color: #f3e6c8;
}
.j81-panel h1 {
  margin: 0 0 10px;
  letter-spacing: 0.1em;
  line-height: 1.12;
}
.j81-panel .phase,
.j81-panel .j81-scroll-kicker.phase {
  display: inline-block; margin: 0 0 8px; padding: 0;
  border: none; color: rgba(120, 220, 255, 0.95);
  font-size: clamp(1.05rem, 1.55vw, 1.28rem); letter-spacing: 0.18em; border-radius: 0;
  background: transparent;
}
.j81-panel.heart .phase { border-color: rgba(232,163,61,.45); color: var(--gold); }
.j81-scroll {
  position: relative; margin: 0 0 14px; padding: 18px 18px 20px;
  border: 1px solid rgba(232,163,61,.35);
  background: rgba(20, 16, 12, 0.55);
  white-space: pre-wrap; font-size: 1.12rem; line-height: 1.75;
}
.j81-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.j81-hint { margin-top: 12px; color: var(--gold); font-size: 1.05rem; min-height: 1.3em; }
.j81-cost { color: var(--cyan); font-size: 0.95rem; margin-top: 6px; }
textarea.j81-input {
  width: 100%; min-height: 88px; margin-top: 8px; resize: vertical;
  border-radius: 8px; border: 1px solid rgba(42, 53, 72, 0.9); background: #0a1018;
  color: var(--text); padding: 14px; font: inherit; font-size: 1.08rem;
  scrollbar-width: none;
}
textarea.j81-input::-webkit-scrollbar { display: none; }
#j81-stage-body::-webkit-scrollbar,
#j81-gate-rx::-webkit-scrollbar,
.j81-scroll::-webkit-scrollbar { display: none; }
.j81-trial-box { margin-top: 8px; }
.j81-trial-box .primary {
  margin-top: 8px;
  appearance: none; border: 1px solid rgba(232,163,61,.7);
  background: linear-gradient(180deg, #6b4a1e, #3a2710);
  color: #ffe7b0; border-radius: 8px; padding: 10px 14px;
  cursor: pointer; font: inherit;
}
.j81-trial-box .primary:disabled { opacity: 0.55; cursor: wait; }
.j81-opt {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 8px; padding: 10px 12px;
  border: 1px solid rgba(42, 53, 72, 0.9); border-radius: 8px;
  background: #0d121a; cursor: pointer;
}
.j81-opt:hover { border-color: var(--cyan); }
.j81-opt .letter { flex: 0 0 auto; color: var(--gold); font-weight: 700; min-width: 1.2em; }
.j81-opt .txt { flex: 1; line-height: 1.55; font-size: 1.08rem; }
.j81-heaviest {
  flex: 0 0 auto; appearance: none; cursor: pointer; font: inherit;
  border: 1px solid rgba(232,163,61,.45); background: #1a140c;
  color: var(--gold); border-radius: 6px; padding: 8px 12px; font-size: 0.95rem;
}
.j81-heaviest.is-on {
  background: linear-gradient(180deg, #6b4a1e, #3a2710);
  color: #ffe7b0; border-color: rgba(232,163,61,.8);
}

.j81-portal .ring {
  width: min(320px, 78vw); height: min(320px, 78vw); border-radius: 50%;
  border: 2px solid rgba(90,208,255,.55);
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: radial-gradient(circle, rgba(20,40,60,.75), rgba(0,0,0,.85));
  box-shadow: 0 0 40px rgba(90,208,255,.25);
  animation: pulse 1s ease-in-out infinite;
  padding: 20px; letter-spacing: 0.14em;
}
@keyframes pulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.j81-foot {
  padding: 8px 14px;
  text-align: center;
  color: #5f6a7c;
  font-size: 0.72rem;
  border-top: 1px solid rgba(42, 53, 72, 0.8);
  flex: 0 0 auto;
}
.j81-foot a { color: var(--muted); }

@media (max-width: 900px) {
  .j81-char-wrap {
    max-width: 92vw;
    order: 2;
  }
  .j81-weapon {
    width: 100%;
    height: auto;
    max-height: min(38vh, 360px);
    max-width: none;
  }
  .j81-char-stack { width: min(42vw, 220px); }
  .j81-scroll-panel {
    width: min(94vw, 640px);
    max-height: min(40vh, 320px);
    aspect-ratio: auto;
    top: max(48px, 8vh);
    padding: 14px 16px;
  }
  .j81-star { width: 48px; min-height: 44px; font-size: 0.55rem; }
  .j81-star .t { font-size: 0.6rem; }
}
@media (max-width: 640px) {
  .j81-brand { font-size: 0.9rem; }
  .j81-starfield { min-height: 0; }
}

/* ========== 成品质地加压（第二刀：对齐旧 L3 / 五原味） ========== */
/* ★ 2026-10-28 字体版权置换：原"方正墨韵体/峄山碑篆体/重玺小篆"均为未授权商用字体，
   全部替换为开源字体（SIL OFL 1.1）——显示字体=霞鹜文楷，正文宋体=思源宋体。
   family 名保持"悟道中宋/方正墨韵体简"不变，下游选择器零改动。 */
@font-face {
  font-family: "悟道中宋";
  src: url("../assets/fonts/LXGWWenKai_subset.ttf") format("truetype");
  font-display: block;
}
@font-face {
  font-family: "方正墨韵体简";
  src: url("../assets/fonts/LXGWWenKai_subset.ttf") format("truetype");
  font-display: block;
}
/* 正文书卷宋体（判词卡/卷轴/场景文字），开源思源宋体子集 */
@font-face {
  font-family: "书卷宋体";
  src: url("../assets/fonts/SourceHanSerif_subset.ttf") format("truetype");
  font-display: swap;
}

.j81-home-bg {
  opacity: 0.72;
  background:
    radial-gradient(ellipse at 28% 42%, rgba(0, 212, 255, 0.14), transparent 52%),
    radial-gradient(ellipse at 78% 58%, rgba(212, 175, 55, 0.12), transparent 48%),
    url("../assets/img/背景/04_星云八卦图_v76.webp") center / cover no-repeat,
    url("../assets/img/cyber_bg.webp") center / cover no-repeat,
    #0a0618;
  animation: j81-bg-breathe 12s ease-in-out infinite alternate;
}
@keyframes j81-bg-breathe {
  from { filter: saturate(1.05) brightness(0.92); }
  to { filter: saturate(1.2) brightness(1.05); }
}

/* 气泡：旧 lt2d 同款尺寸 + 金箔果位字 */
.j81-bubble {
  width: 148px;
  height: 134px;
  aspect-ratio: 384 / 348;
  top: 8%;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}
.j81-bubble-text {
  font-family: "悟道中宋", "STZhongsong", "STKaiti", "KaiTi", serif !important;
  font-weight: 600 !important;
  font-size: 42px !important;
  letter-spacing: 0.06em !important;
  line-height: 1.08 !important;
  max-width: 86% !important;
  left: 50% !important;
  top: 48% !important;
  transform: translate(-50%, -50%) !important;
  text-align: center !important;
  color: transparent;
  background-image: linear-gradient(168deg,
    #FFFEF6 0%, #F0E4B8 10%, #D4AF37 26%, #A07A16 44%,
    #3A280C 62%, #120C06 76%, #6B4E12 90%, #C9A227 100%);
  background-size: 100% 140%;
  background-position: 50% 18%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter:
    drop-shadow(0 -0.7px 0 rgba(255, 252, 240, 0.62))
    drop-shadow(0.9px 1.5px 0 rgba(14, 10, 4, 0.96))
    drop-shadow(1.8px 2.6px 1.4px rgba(0, 0, 0, 0.48));
  animation: bubble-text-shine 2.5s ease-in-out infinite;
}
@keyframes bubble-text-shine {
  0%, 100% { filter:
    drop-shadow(0 -0.7px 0 rgba(255, 252, 240, 0.62))
    drop-shadow(0.9px 1.5px 0 rgba(14, 10, 4, 0.96))
    drop-shadow(1.8px 2.6px 1.4px rgba(0, 0, 0, 0.48))
    brightness(1); }
  50% { filter:
    drop-shadow(0 -1px 0 rgba(255, 252, 240, 0.9))
    drop-shadow(0.9px 1.5px 0 rgba(14, 10, 4, 0.96))
    drop-shadow(1.8px 2.6px 1.4px rgba(0, 0, 0, 0.48))
    brightness(1.2); }
}

.j81-badge {
  position: absolute;
  right: -2%;
  bottom: 18%;
  width: clamp(56px, 7vw, 78px);
  height: auto;
  z-index: 5;
  filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.35));
  pointer-events: none;
  animation: j81-float 4.2s ease-in-out infinite;
  animation-delay: 0.4s;
}
.j81-holo-inner {
  max-height: min(78vh, 640px);
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 212, 255, 0.35) transparent;
}
.j81-char-tab {
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.j81-char-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 245, 255, 0.55);
}

/* 棋盘：赛博框 + 更显八卦 + 星点去表单 */
.j81-board-view {
  background:
    radial-gradient(ellipse at 50% 10%, rgba(0, 212, 255, 0.12), transparent 45%),
    radial-gradient(ellipse at 80% 80%, rgba(212, 175, 55, 0.06), transparent 40%),
    #05040c;
}
.j81-board-view::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px, rgba(0, 245, 255, 0.015) 4px
  );
  opacity: 0.55;
}
.j81-starfield {
  border: none;
  box-shadow: none;
}
.j81-starfield::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px, rgba(0, 245, 255, 0.025) 3px
  );
  mix-blend-mode: screen;
  opacity: 0.4;
  animation: j81-scan 5.5s linear infinite;
}
.j81-bagua { opacity: 0.62; filter: saturate(1.25) contrast(1.12) brightness(0.95); }
.j81-orbit-lines { opacity: 0.7; }

.j81-star {
  width: 132px !important;
  min-height: 132px !important;
  padding: 10px 6px 12px !important;
  font-size: 0.78rem !important;
  border-radius: 0;
  clip-path: polygon(50% 0%, 90% 22%, 100% 50%, 90% 78%, 50% 100%, 10% 78%, 0 50%, 10% 22%);
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 240, 180, 0.22), transparent 55%),
    radial-gradient(circle at 50% 20%, rgba(0, 245, 255, 0.2), transparent 70%),
    rgba(6, 10, 22, 0.82);
}
.j81-star .t { font-size: 1.05rem !important; }
.j81-star .m { font-size: 0.82rem !important; }
.j81-star .n { font-size: 0.85rem !important; }
.j81-star.is-lock-lite .t,
.j81-star.is-lock-lite .m { display: none; }
.j81-star.is-lock-lite .n { font-size: 0.7rem; opacity: 0.85; }

.j81-scroll-panel {
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
}
.j81-scroll-rod {
  position: relative;
  height: 16px;
  background: linear-gradient(90deg,
    #2a1a08 0%, #8a6420 18%, #f0d78a 48%, #fff8d6 50%, #f0d78a 52%, #8a6420 82%, #2a1a08 100%);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.35);
}
.j81-scroll-rod::before,
.j81-scroll-rod::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 18px; height: 18px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle at 35% 30%, #fff1b0, #b8862e 55%, #3a2408);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}
.j81-scroll-rod::before { left: -6px; }
.j81-scroll-rod::after { right: -6px; }
.j81-scroll-body {
  background: transparent !important;
  border-left: none !important;
  border-right: none !important;
  box-shadow: none !important;
  color: #f3e6c8;
}

/* 过招文卷轴轴头 */
.j81-scroll {
  margin-top: 14px;
  padding: 18px 18px 20px;
  border-color: rgba(212, 175, 105, 0.45);
  background: linear-gradient(180deg, rgba(40, 28, 14, 0.62), rgba(18, 14, 10, 0.78));
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.35);
}
.j81-scroll::before,
.j81-scroll::after {
  content: "";
  position: absolute;
  left: 6%; right: 6%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #3a2a12, #d4af37, #3a2a12);
  box-shadow: 0 0 10px rgba(212, 175, 105, 0.45);
}
.j81-scroll::before { top: -5px; }
.j81-scroll::after { bottom: -5px; }

.j81-holo-panel {
  overflow: visible;
  box-shadow:
    0 0 0 1px rgba(212, 175, 105, 0.16) inset,
    0 0 28px rgba(255, 215, 0, 0.1),
    0 18px 50px rgba(0, 0, 0, 0.4);
}
.j81-holo-panel.gold-holo::after,
#j81-scroll-panel.gold-holo::after {
  display: none !important;
}
.j81-holo-panel::after {
  content: "";
  position: absolute; inset: -8px;
  pointer-events: none;
  border: 16px solid transparent;
  border-image: url("../assets/img/全息屏/全息面板边框2_glow.webp") 48 fill;
  opacity: 0.55;
  z-index: 0;
}

/* 传送门：裂缝 + 毛刺 */
.j81-portal {
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.18), transparent 42%),
    rgba(2, 4, 10, 0.9);
}
.j81-portal.is-glitch .ring {
  animation: j81-glitch-ring 0.7s steps(2, end) infinite, pulse 1s ease-in-out infinite;
}
.j81-portal .ring {
  border-width: 2px;
  border-color: rgba(0, 245, 255, 0.7);
  box-shadow:
    0 0 40px rgba(90, 208, 255, 0.35),
    0 0 80px rgba(212, 175, 55, 0.15),
    inset 0 0 40px rgba(0, 212, 255, 0.12);
  font-family: var(--font-display);
  letter-spacing: 0.22em;
  color: #e8f7ff;
  text-shadow: 0 0 12px rgba(0, 245, 255, 0.55);
}
.j81-portal .ring::before,
.j81-portal .ring::after {
  content: "";
  position: absolute;
  inset: -10%;
  border-radius: 50%;
  border: 1px solid rgba(255, 80, 120, 0.25);
  pointer-events: none;
  opacity: 0;
}
.j81-portal.is-glitch .ring::before {
  opacity: 1;
  mix-blend-mode: screen;
  animation: j81-rift 0.35s linear infinite;
}
.j81-portal.is-glitch .ring::after {
  opacity: 0.7;
  border-color: rgba(0, 245, 255, 0.35);
  animation: j81-rift 0.28s linear infinite reverse;
}
@keyframes j81-glitch-ring {
  0% { transform: scale(1) translate(0, 0); filter: hue-rotate(0deg); }
  25% { transform: scale(1.03) translate(-3px, 1px); filter: hue-rotate(20deg); }
  50% { transform: scale(0.98) translate(4px, -2px); filter: hue-rotate(-15deg); }
  75% { transform: scale(1.02) translate(-2px, 3px); filter: hue-rotate(8deg); }
  100% { transform: scale(1) translate(0, 0); filter: hue-rotate(0deg); }
}
@keyframes j81-rift {
  0% { clip-path: inset(0 0 70% 0); transform: translateX(-4px); }
  50% { clip-path: inset(40% 0 20% 0); transform: translateX(5px); }
  100% { clip-path: inset(75% 0 0 0); transform: translateX(-3px); }
}

.j81-board-view.is-entering {
  animation: j81-board-enter 0.85s ease both;
}
@keyframes j81-board-enter {
  0% { opacity: 0; filter: blur(8px) saturate(0.4); transform: scale(1.02); }
  40% { opacity: 1; filter: blur(0) saturate(1.2); }
  100% { opacity: 1; filter: none; transform: scale(1); }
}

/* 过招舞台壳：站位交给 j81-layout-badge.css */
.j81-stage {
  align-items: stretch;
  justify-content: center;
  padding: 0;
  background:
    radial-gradient(ellipse at 70% 45%, rgba(0, 212, 255, 0.1), transparent 45%),
    radial-gradient(ellipse at 30% 60%, rgba(212, 175, 55, 0.08), transparent 40%),
    url("../assets/img/背景/04_星云八卦图_v76.webp") center / cover no-repeat,
    rgba(4, 6, 14, 0.92);
  background-blend-mode: normal, normal, soft-light, normal;
}
.j81-stage-layout {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.j81-stage-char {
  position: absolute !important;
  z-index: 8;
  pointer-events: none;
}
.j81-stage-char .j81-weapon {
  width: 100%;
  height: auto;
  max-height: 46vh;
  max-width: none;
  opacity: 1 !important;
  animation: j81-weapon-enter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.j81-stage.is-open .j81-stage-char .j81-char-stack {
  animation: j81-float 3.5s ease-in-out infinite;
}
.j81-gate {
  align-items: stretch;
  justify-content: center;
  padding: 0;
  background:
    radial-gradient(ellipse at 70% 45%, rgba(0, 212, 255, 0.1), transparent 45%),
    url("../assets/img/背景/04_星云八卦图_v76.webp") center / cover no-repeat,
    rgba(4, 6, 14, 0.92);
  background-blend-mode: normal, soft-light, normal;
}
.j81-gate-layout {
  position: absolute;
  inset: 0;
  width: 100%;
}
.j81-star.is-outer {
  width: clamp(36px, 4.6vw, 54px);
  min-height: 36px;
  font-size: 0.52rem;
  padding: 4px 2px 5px;
}
.j81-star.is-outer .t { font-size: 0.55rem; }
.j81-char-tab.is-on {
  background: rgba(40, 28, 8, 0.65);
}

/* ====== 注册建档弹窗 ====== */
.j81-auth-modal { z-index: 50; }
.j81-auth-modal.j81-gate { align-items: center; }
.j81-auth-stage {
  width: min(480px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
}
.j81-auth-panel {
  width: 100% !important;
  max-height: none !important;
  padding: 28px 24px 20px;
}
.j81-auth-panel h1 { font-size: 1.35rem; margin-bottom: 6px; }
.j81-auth-note {
  color: rgba(255,233,176,0.7); font-size: 0.92rem; margin-bottom: 12px;
}

/* 游客主按钮 */
.j81-guest-main {
  text-align: center; margin: 18px 0 14px;
}
.j81-guest-hero-btn {
  display: inline-flex; flex-direction: column; align-items: center;
  padding: 14px 36px 10px !important; min-width: 200px;
  position: relative;
}
.j81-guest-hero-btn .jade-badge-label {
  font-size: 1.08rem;
}
.j81-guest-hero-sub {
  display: block;
  font-size: 0.78rem; color: rgba(255,233,176,0.45);
  margin-top: 2px;
  transition: color 0.25s;
  pointer-events: none;
}
.j81-guest-hero-btn:hover .j81-guest-hero-sub {
  color: rgba(255,233,176,0.85);
}

/* 次级链接 */
.j81-auth-alt-links {
  text-align: center; margin-top: 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.j81-auth-alt {
  color: rgba(255,215,0,0.5); font-size: 0.88rem;
  text-decoration: none; cursor: pointer;
  transition: color 0.2s;
}
.j81-auth-alt:hover { color: rgba(255,215,0,0.9); }
.j81-auth-back { font-size: 0.85rem; }
.j81-auth-body { min-height: 120px; }
.j81-auth-body .j81-input {
  width: 100%; margin-bottom: 10px; padding: 10px 12px;
  border-radius: 6px; border: 1px solid rgba(42,53,72,0.9);
  background: #0a1018; color: var(--text); font: inherit; font-size: 1rem;
  box-sizing: border-box;
}
.j81-auth-body .j81-input:focus {
  outline: none; border-color: rgba(255,215,0,0.5);
}

/* 游客转正按钮（在棋盘页显示） */
.j81-upgrade-banner {
  text-align: center; padding: 10px 0 4px;
}
.j81-upgrade-banner a {
  color: rgba(255,215,0,0.6); font-size: 0.88rem;
  text-decoration: none; cursor: pointer;
}
.j81-upgrade-banner a:hover { color: rgba(255,215,0,0.95); }


/* ===== 过关仪式：礼花 + 一句正向肯定 (释明理 2026-09-26) ===== */
.j81-pass-cel{position:relative;margin:-4px 0 8px;min-height:70px;text-align:center;}
.j81-confetti{position:absolute;left:0;right:0;top:0;height:70px;pointer-events:none;}
.j81-confetti::before,.j81-confetti::after{content:'';position:absolute;left:50%;top:-14px;width:6px;height:6px;border-radius:2px;background:#e8c27a;}
.j81-confetti::before{animation:j81fall 1.5s ease-in infinite;box-shadow:-90px 20px 0 -1px #e8c27a,-40px 60px 0 -1px #f0c98a,20px 15px 0 -1px #d4af37,70px 40px 0 -1px #c9a45c,110px 65px 0 -1px #f3d9a0,150px 25px 0 -1px #b8862f;}
.j81-confetti::after{animation:j81fall 1.8s ease-in .25s infinite;width:5px;height:8px;border-radius:1px;box-shadow:-120px 30px 0 -1px #f3d9a0,-20px 80px 0 -1px #d4af37,40px 55px 0 -1px #e8c27a,100px 20px 0 -1px #c9a45c,140px 70px 0 -1px #f0c98a,180px 45px 0 -1px #b8862f;}
@keyframes j81fall{0%{transform:translateY(0) rotate(0deg);opacity:0;}10%{opacity:.9;}100%{transform:translateY(84px) rotate(200deg);opacity:0;}}
.j81-pass-words{position:relative;z-index:1;display:inline-block;margin-top:16px;padding:6px 18px;color:#f7e7bb;font-size:1.1em;letter-spacing:.5px;text-shadow:0 1px 2px rgba(0,0,0,.45);}

/* ========== 过招·多轮对话（妖往深带，玩家逐轮接） ========== */
.j81-duel-chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 38vh;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 4px 2px;
  margin: 6px 0 10px;
}
.j81-duel-chat::-webkit-scrollbar { display: none; }
.j81-duel-msg {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 12px;
  line-height: 1.65;
  font-size: 0.95em;
  white-space: pre-wrap;
  word-break: break-word;
  animation: j81-duel-in 0.35s ease;
}
@keyframes j81-duel-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.j81-duel-yao {
  align-self: flex-start;
  background: linear-gradient(180deg, rgba(46, 32, 12, 0.82), rgba(24, 16, 7, 0.85));
  border: 1px solid rgba(212, 175, 55, 0.5);
  color: #ffe9b8;
  border-top-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.j81-duel-me {
  align-self: flex-end;
  background: linear-gradient(180deg, rgba(12, 28, 42, 0.82), rgba(8, 18, 28, 0.85));
  border: 1px solid rgba(90, 208, 255, 0.42);
  color: #d8f2ff;
  border-top-right-radius: 4px;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* 过招对话：与上页场景框同字体同字号 */
.j81-duel-msg {
  font-family: var(--font-ui);
  font-size: clamp(0.92rem, 1.4vw, 1.08rem);
  line-height: 1.55;
  padding: 12px 16px;
}

/* 场景（妖话）气泡右对齐，与按钮/标题同右缘线 */
.j81-duel-yao {
  align-self: flex-end;
  text-align: right;
  border-top-left-radius: 12px;
  border-top-right-radius: 4px;
}

/* ========== 画像选项行：选它/最重 合并双态钮 ========== */
.j81-portrait-opts .j81-opt {
  display: flex !important;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.j81-portrait-opts .j81-opt .letter { flex: 0 0 auto; }
.j81-portrait-opts .j81-opt .txt { flex: 1 1 auto; }
.j81-portrait-opts .j81-pick {
  flex: 0 0 auto;
  font-family: var(--font-ui);
  font-size: inherit;
  line-height: 1.2;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.6);
  background: rgba(30, 22, 8, 0.65);
  color: #e8d9a8;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.j81-portrait-opts .j81-pick:hover {
  border-color: rgba(255, 233, 168, 0.9);
  filter: brightness(1.12);
}
.j81-portrait-opts .j81-pick.is-pri {
  background: linear-gradient(180deg, #f0d898, #c9a24b);
  color: #3a2b00;
  border-color: #ffe9a8;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
  font-weight: 700;
}
.j81-portrait-opts .j81-opt.is-pri .txt { color: #fff; }
/* 画像整页显示，无下拉杆 */
#j81-portrait-body {
  max-height: none !important;
  overflow: visible !important;
  scrollbar-width: none !important;
}
#j81-portrait-body::-webkit-scrollbar { display: none !important; }

/* 画像：白色确认「最重」+ 鼠标跟随提示 + 选项区留白 */
.j81-portrait-opts .j81-pick.is-pri {
  background: #fff !important;
  color: #4a3208 !important;
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.55);
  font-weight: 700;
}
#j81-portrait-hint { margin-top: 14px; }
.j81-mouse-tip {
  position: fixed;
  z-index: 999999;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(20, 14, 4, 0.92);
  border: 1px solid rgba(255, 215, 0, 0.6);
  color: #ffe9b8;
  font-size: 0.9rem;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: opacity 0.5s ease;
}
.j81-mouse-tip.fade { opacity: 0; }


/* 画像题干框：6px 粗金边框本体带电流通行（无外细线框） */
#j81-portrait-body .j81-scroll {
  border: 6px solid transparent !important;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(40, 28, 14, 0.85), rgba(18, 14, 10, 0.9)) padding-box,
    linear-gradient(90deg, #3a2a12 0%, #d4af37 22%, #FFF6D8 50%, #d4af37 78%, #3a2a12 100%) border-box !important;
  background-size: 100% 100%, 240% 100% !important;
  background-position: 0 0, 120% 0 !important;
  animation: j81-qbox-flow 3.2s linear infinite;
  box-shadow: 0 0 16px rgba(212, 175, 105, 0.3), inset 0 0 24px rgba(0, 0, 0, 0.35) !important;
}
/* 画像题干字号放大（边框/底色不变），字号在不溢出前提下尽量大 */
#j81-portrait-body .j81-scroll {
  font-size: clamp(3.6rem, 9vw, 7.5rem) !important;
  line-height: 1.5 !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  white-space: pre-wrap;
}
@keyframes j81-qbox-flow {
  0% { background-position: 0 0, 120% 0; }
  100% { background-position: 0 0, -120% 0; }
}
#j81-portrait-body .j81-scroll::before,
#j81-portrait-body .j81-scroll::after {
  display: none !important;
  content: none !important;
}




/* 收尾确认页（q5）：内容长（判断+引文+白话），用正文字号，不用题干大字 */
#j81-portrait-body .j81-scroll.j81-scroll-confirm,
#j81-portrait-body p.j81-scroll-confirm {
  font-size: clamp(1.1rem, 1.55vw, 1.45rem) !important;
  line-height: 1.6 !important;
  font-weight: 600 !important;
  letter-spacing: 0.03em !important;
  padding: 12px 18px 14px !important;
  margin: 6px 0 8px !important;
}
/* 确认页整体收紧：所有内容一页显示完，不遮挡、无下拉 */
#j81-portrait-body:has(.j81-scroll-confirm) .j81-opt { margin-top: 6px !important; padding: 8px 12px !important; }
#j81-portrait-body:has(.j81-scroll-confirm) .j81-opt .txt { line-height: 1.45 !important; }
#j81-portrait-panel:has(.j81-scroll-confirm) > .j81-actions { margin-top: 8px !important; }
#j81-portrait-panel:has(.j81-scroll-confirm) > .j81-hint { margin-top: 6px !important; }

/* 画像顶部说明 · 终版：两端对齐题目框，放大字号 */
#j81-portrait-intro {
  font-family: var(--font-display) !important;
  font-size: var(--guide-size) !important;
  color: #f0d898 !important;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.65) !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
  padding: 0 18px !important;
  text-align: left !important;
  white-space: normal !important;
  letter-spacing: 0.02em;
}
