/* 圣经建筑 3D（bible_3d.php）。只管这一页；颜色取自 v2.css 的变量。 */

/* 标题区压矮，画面一打开就在屏幕里 */
.b3d-hero { padding: 64px 20px 8px; }
.b3d-hero::after { display: none; }
.b3d-hero .v2-page-hero-title { font-size: 22px; line-height: 1.3; margin: 0; display: inline; }
.b3d-hero .v2-page-hero-sub { margin: 0 0 0 12px; font-size: 13px; display: inline; }
.b3d-section { padding: 8px 0 64px; }
.b3d-container { max-width: 1180px; }
.b3d-intro { font-size: 17px; line-height: 1.9; color: #333; margin: 18px 0 0; }
@media (max-width: 767px) {
  .b3d-hero { padding: 62px 12px 6px; }
  .b3d-hero .v2-page-hero-title { font-size: 18px; }
  .b3d-hero .v2-page-hero-sub { font-size: 12px; margin-left: 8px; }
  .b3d-section { padding-top: 6px; }
  .b3d-container { padding-left: 8px; padding-right: 8px; }
}

/* ── 3D 画面 ── */
.b3d-wrap { display: flex; flex-direction: column; }
.b3d-wrap[hidden] { display: none; }
.b3d-stage {
  position: relative; width: 100%; height: calc(100vh - 118px); min-height: 380px; max-height: 1200px;
  background: #0d1218; border-radius: var(--v2-radius); overflow: hidden;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
#b3d-canvas { display: block; width: 100%; height: 100%; outline: none; }
@media (max-width: 767px) {
  .b3d-stage { height: calc(100vh - 106px); height: calc(100svh - 106px); border-radius: 6px; }
}
/* 四角略暗 */
.b3d-vig { position: absolute; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at 50% 46%, rgba(0,0,0,0) 52%, rgba(0,0,0,.2) 78%, rgba(0,0,0,.5) 100%); }

/* 全屏：能用浏览器全屏的用浏览器全屏；不能的（如 iPhone）铺满窗口 */
.b3d-wrap.is-fill { position: fixed; inset: 0; z-index: 2147483000; background: #0d1218; }
.b3d-wrap.is-fill .b3d-stage, .b3d-wrap:fullscreen .b3d-stage { flex: 1 1 auto; height: auto; min-height: 0; border-radius: 0; }
.b3d-wrap:fullscreen { background: #0d1218; }
.b3d-wrap.is-fill .b3d-tools, .b3d-wrap:fullscreen .b3d-tools { margin: 0; padding: 8px 10px; background: #0d1218; flex-wrap: nowrap; overflow-x: auto; }
.b3d-wrap.is-fill .b3d-btn--tool, .b3d-wrap:fullscreen .b3d-btn--tool { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.4); white-space: nowrap; flex: 0 0 auto; }
body.b3d-noscroll { overflow: hidden; }

.b3d-btn {
  appearance: none; border: 2px solid rgba(255,255,255,.5); background: rgba(13,22,36,.7); color: #fff;
  font: 600 16px/1.2 var(--v2-font-sans); padding: 11px 16px; min-height: 46px; min-width: 64px;
  border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.b3d-btn:hover { background: rgba(27,58,107,.92); color: #fff; }
.b3d-btn:focus-visible { outline: 3px solid var(--v2-gold-light); outline-offset: 2px; }
.b3d-btn[aria-pressed="true"] { background: var(--v2-gold); border-color: var(--v2-gold); color: #1a1a1a; }
.b3d-btn[hidden] { display: none; }

.b3d-bar { position: absolute; left: 10px; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; z-index: 4; }
.b3d-bar-row { display: flex; flex-wrap: wrap; gap: 8px; }
.b3d-bar-row[hidden] { display: none; }
.b3d-bar-gap { flex: 1 1 auto; }
.b3d-bar .b3d-btn { pointer-events: auto; }
/* 开场时「打开声音」要醒目 */
.b3d-btn--snd.is-ask { border-color: var(--v2-gold-light); box-shadow: 0 0 0 0 rgba(232,199,106,.7); animation: b3d-ask 2.2s ease-out 3; }
@keyframes b3d-ask { 0% { box-shadow: 0 0 0 0 rgba(232,199,106,.7); } 100% { box-shadow: 0 0 0 16px rgba(232,199,106,0); } }

/* 字幕：画面下方一句经文 */
.b3d-sub {
  position: absolute; z-index: 3; left: 50%; bottom: 18px; transform: translateX(-50%);
  width: max-content; max-width: min(820px, calc(100% - 28px));
  display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 20px;
  background: rgba(8,12,18,.62); color: #fff; border-radius: 10px;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: opacity .6s ease; opacity: 1;
}
.b3d-sub[hidden] { display: none; }
.b3d-sub.is-out { opacity: 0; }
.b3d-sub-line { margin: 0; min-width: 0; font: 400 21px/1.6 var(--v2-font-serif); text-shadow: 0 1px 3px rgba(0,0,0,.6); text-wrap: balance; }
/* 一小句不许折行：行只在标点后面断（见 core.js 的 setLine） */
.b3d-ph { display: inline-block; white-space: nowrap; }
.b3d-sub-line cite { font: 500 14px/1 var(--v2-font-sans); font-style: normal; color: var(--v2-gold-light); margin-left: 10px; white-space: nowrap; }
.b3d-sub.is-big { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; bottom: 12%; text-align: center; }
.b3d-sub.is-big .b3d-sub-line { font-size: 34px; line-height: 1.5; text-shadow: 0 2px 14px rgba(0,0,0,.9), 0 0 3px rgba(0,0,0,.9); }
.b3d-sub.is-big .b3d-sub-line cite { display: block; margin: 10px 0 0; font-size: 16px; }
.b3d-sub.is-big .b3d-btn--read { display: none; }
.b3d-stage[data-tone="bright"] .b3d-sub.is-big { background: rgba(8,12,18,.42); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); padding: 14px 24px; }
.b3d-btn--read { flex: 0 0 auto; min-height: 42px; padding: 8px 14px; font-size: 15px; border-color: var(--v2-gold-light); color: var(--v2-gold-light); background: rgba(0,0,0,.25); }
@media (max-width: 767px) {
  .b3d-sub { bottom: 10px; padding: 10px 12px; gap: 6px; flex-direction: column; align-items: stretch; width: auto; left: 10px; right: 10px; transform: none; max-width: none; }
  .b3d-sub.is-big { left: 14px; right: 14px; }
  .b3d-btn--read { align-self: flex-end; }
  .b3d-sub-line { font-size: 17px; line-height: 1.55; }
  .b3d-sub.is-big .b3d-sub-line { font-size: 24px; }
  .b3d-sub.has-stick { bottom: 156px; }          /* 让开左下的摇杆 */
  .b3d-btn--read { min-height: 40px; padding: 6px 10px; font-size: 14px; }
}

/* 走近人时的提示 */
.b3d-btn--person { position: absolute; z-index: 4; left: 0; top: 0; gap: 10px; min-height: 42px; padding: 8px 14px; border-color: var(--v2-gold-light); background: rgba(8,12,18,.72); white-space: nowrap; }
.b3d-btn--person strong { font: 600 17px/1.2 var(--v2-font-serif); color: #fff; }
.b3d-btn--person span { font-size: 14px; color: var(--v2-gold-light); }
.b3d-place--person .b3d-place-title { color: var(--v2-navy-dark); }

/* 经文卡片：点「看全文」才出来，点标题收起 */
.b3d-card {
  position: absolute; z-index: 5; right: 10px; top: 66px; width: 360px; max-height: calc(100% - 76px);
  display: flex; flex-direction: column; background: rgba(250,248,243,.97); color: var(--v2-text);
  border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.45); overflow: hidden;
}
.b3d-card[hidden] { display: none; }
.b3d-card-head {
  appearance: none; border: 0; background: var(--v2-navy); color: #fff; text-align: left; width: 100%;
  font: 600 16px/1.35 var(--v2-font-sans); padding: 10px 44px 10px 14px; min-height: 46px; cursor: pointer; position: relative;
}
.b3d-card-head::before, .b3d-card-head::after { content: ""; position: absolute; right: 16px; top: 50%; width: 16px; height: 2px; background: #fff; }
.b3d-card-head::before { transform: rotate(45deg); }
.b3d-card-head::after { transform: rotate(-45deg); }
.b3d-card-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 14px 12px; touch-action: pan-y; }
.b3d-card .b3d-place-title { font: 600 15px/1.4 var(--v2-font-sans); color: var(--v2-navy); margin: 10px 0 6px; padding-top: 10px; border-top: 1px solid var(--v2-border); }
.b3d-card .b3d-place-title:first-child { display: none; }
.b3d-card .b3d-verse { font-size: 16px; line-height: 1.75; }
.b3d-card .b3d-note { font-size: 14.5px; line-height: 1.7; }
@media (max-width: 767px) {
  .b3d-card { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 62%; }
}

/* 走进去的那一刻：全黑，只出一行经文 */
.b3d-veil { position: absolute; inset: 0; z-index: 8; background: #000; display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; transition: opacity .5s ease; pointer-events: none; }
.b3d-veil[hidden] { display: none; }
.b3d-veil.is-on { opacity: 1; pointer-events: auto; }
.b3d-veil.is-lift { transition-duration: 2.6s; }
.b3d-veil p { margin: 0; max-width: 100%; min-width: 0; text-align: center; color: #f3ead6; font: 400 30px/1.6 var(--v2-font-serif); opacity: 0; transition: opacity .7s ease .25s; }
.b3d-veil.is-on p { opacity: 1; }
.b3d-veil.is-lift p { opacity: 0; transition: opacity .8s ease; }
.b3d-veil cite { display: block; margin-top: 12px; font: 500 16px/1 var(--v2-font-sans); font-style: normal; color: var(--v2-gold-light); }
@media (max-width: 767px) { .b3d-veil p { font-size: 22px; } }
@media (prefers-reduced-motion: reduce) { .b3d-veil, .b3d-veil p, .b3d-sub { transition: none !important; } }

/* 可以横过来看：一个转动的手机图形，没有字，只出现一次 */
.b3d-turn { position: absolute; z-index: 6; left: 50%; top: 42%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: rgba(8,12,18,.55); pointer-events: none; display: flex; align-items: center; justify-content: center; animation: b3d-turn-in 5.2s ease both; }
.b3d-turn[hidden] { display: none; }
.b3d-turn i { display: block; width: 26px; height: 44px; border: 3px solid #fff; border-radius: 6px; animation: b3d-turn 1.7s ease-in-out infinite; }
@keyframes b3d-turn { 0%, 25% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
@keyframes b3d-turn-in { 0% { opacity: 0; } 10%, 85% { opacity: 1; } 100% { opacity: 0; } }

/* 虚拟摇杆（只在触屏、走进去的时候出现） */
.b3d-stick { position: absolute; z-index: 6; left: 16px; bottom: 16px; width: 128px; height: 128px; border-radius: 50%; background: rgba(255,255,255,.14); border: 2px solid rgba(255,255,255,.55); touch-action: none; }
.b3d-stick[hidden] { display: none; }
.b3d-stick-knob { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(255,255,255,.82); box-shadow: 0 2px 8px rgba(0,0,0,.35); }

/* 标注（剖面和外观里的字） */
.b3d-labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.b3d-label { position: absolute; left: 0; top: 0; white-space: nowrap; font: 600 13px/1.2 var(--v2-font-sans); padding: 4px 8px; border-radius: 5px; background: rgba(250,248,243,.94); color: var(--v2-navy-dark); border-left: 4px solid var(--v2-navy); box-shadow: 0 1px 6px rgba(0,0,0,.3); will-change: transform; }
.b3d-label--guess { background: rgba(255,244,214,.96); color: #5a4300; border-left: 4px dashed var(--v2-gold-dark); }
.b3d-label[hidden] { display: none; }

.b3d-fps { position: absolute; z-index: 7; left: 8px; bottom: 8px; font: 12px/1.4 ui-monospace, Menlo, monospace; color: #fff; background: rgba(0,0,0,.6); padding: 4px 8px; border-radius: 4px; white-space: pre; pointer-events: none; }
.b3d-fps[hidden] { display: none; }
.b3d-spin { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 4px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: b3d-spin 1s linear infinite; }
.b3d-spin[hidden] { display: none; }
@keyframes b3d-spin { to { transform: rotate(360deg); } }

/* 画面下面的一排：天气、低画质、摇晃、关于这个模型 */
.b3d-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 10px 0 0; }
.b3d-btn--tool { background: #fff; color: var(--v2-navy); border-color: var(--v2-navy); -webkit-backdrop-filter: none; backdrop-filter: none; }
.b3d-btn--tool:hover { background: var(--v2-navy); color: #fff; }
.b3d-btn--tool[aria-pressed="true"] { background: var(--v2-navy); color: #fff; border-color: var(--v2-navy); }
.b3d-hint { margin: 10px 2px 0; font-size: 15px; color: var(--v2-text-muted); }
.b3d-hint[hidden] { display: none; }
.b3d-no3d { margin: 0 0 8px; padding: 14px 16px; background: #fff; border-left: 4px solid var(--v2-gold); border-radius: 6px; font-size: 16px; line-height: 1.8; }
.b3d-no3d[hidden] { display: none; }

/* ── 文字版 ── */
.b3d-places { margin-top: 30px; display: grid; gap: 18px; }
.b3d-place { background: #fff; border: 1px solid var(--v2-border); border-radius: var(--v2-radius); padding: 20px 22px; scroll-margin-top: 90px; }
.b3d-place-title { font: 600 20px/1.4 var(--v2-font-serif); color: var(--v2-navy); margin: 0 0 12px; }
.b3d-scripture { border-left: 4px solid var(--v2-navy); padding: 2px 0 2px 14px; margin: 0 0 14px; }
.b3d-verse { font-family: var(--v2-font-serif); font-size: 17.5px; line-height: 1.9; color: #1a1a1a; margin: 0; }
.b3d-verse sup { font: 600 11px/1 var(--v2-font-sans); color: var(--v2-navy-light); margin-right: 4px; top: -.6em; }
.b3d-tag { display: inline-block; font: 600 12.5px/1 var(--v2-font-sans); letter-spacing: .04em; padding: 4px 8px; border-radius: 4px; margin: 0 0 6px; }
.b3d-tag--s { background: var(--v2-navy); color: #fff; }
.b3d-tag--n { background: #e9e5db; color: #444; }
.b3d-tag--g { background: #fff1c9; color: #5a4300; border: 1px dashed var(--v2-gold-dark); margin: 0 8px 0 0; vertical-align: 1px; }
.b3d-notes { padding-left: 18px; }
.b3d-note { font-size: 16px; line-height: 1.85; color: #333; margin: 0 0 4px; }
.b3d-note--g { color: #4a3c12; }
.b3d-version { font-size: 14px; color: var(--v2-text-muted); margin: 4px 2px 0; }

.b3d-about { margin-top: 40px; background: #fff; border: 1px solid var(--v2-border); border-radius: var(--v2-radius); padding: 26px 26px 12px; scroll-margin-top: 90px; }
.b3d-about-title { font: 600 24px/1.4 var(--v2-font-serif); color: var(--v2-navy); margin: 0 0 14px; }
.b3d-about-sec { margin: 0 0 20px; }
.b3d-about-sec h3 { font: 600 18px/1.5 var(--v2-font-sans); color: var(--v2-navy-dark); margin: 0 0 8px; }
.b3d-about-sec p, .b3d-about-sec li { font-size: 16.5px; line-height: 1.9; color: #333; }
.b3d-about-sec ul { margin: 0; padding-left: 1.3em; }
.b3d-about-sec--scripture { border-left: 4px solid var(--v2-navy); padding-left: 16px; }
.b3d-about-sec--guess { border-left: 4px dashed var(--v2-gold-dark); padding-left: 16px; }
.b3d-about-sec--nt p { font-family: var(--v2-font-serif); }
/* 比例参考图：只有形状和名字，没有数字（卡卡 2026-11-16） */
.b3d-scale { margin: 14px 0 0; padding: 14px 14px 10px; background: var(--v2-warm-white); border: 1px solid var(--v2-border); border-radius: 8px; }
.b3d-scale svg { display: block; width: 100%; height: auto; }
.b3d-scale-ark { fill: #8a6a47; stroke: #4a3524; stroke-width: .4; }
.b3d-scale-field { stroke: #3d7a4a; stroke-width: .7; }
.b3d-scale-bus { fill: var(--v2-gold-dark); }
.b3d-scale-person { fill: var(--v2-navy); }
.b3d-scale-ground { stroke: #b8b2a4; stroke-width: .25; }
.b3d-scale figcaption { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin-top: 8px; font-size: 14.5px; color: #444; }
.b3d-scale figcaption strong { color: var(--v2-navy-dark); margin-right: 4px; }
.b3d-scale-k { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.b3d-scale-k--person { background: var(--v2-navy); }
.b3d-scale-k--bus { background: var(--v2-gold-dark); }
.b3d-scale-k--field { background: #3d7a4a; height: 4px; vertical-align: 3px; }
.b3d-readon { margin-top: 32px; text-align: center; }
.b3d-readon h2 { font: 600 18px/1.5 var(--v2-font-sans); color: var(--v2-text-muted); margin: 0 0 12px; }

@media (max-width: 767px) {
  .b3d-place { padding: 16px 14px; }
  .b3d-about { padding: 20px 16px 6px; }
  .b3d-btn { font-size: 15px; padding: 9px 11px; min-height: 44px; min-width: 56px; }
  .b3d-bar { left: 8px; right: 8px; top: 8px; gap: 6px; }
  .b3d-bar-row { gap: 6px; }
}
