/* 11/14 使用者要的三件事：手機讀經要順、經文螢光筆和收藏、隨手筆記。
   這個檔接在 app.css、games.css 後面，同名的設定以這裡為準。 */

/* ───────── 一、手機讀經順暢 ─────────
   手機上一直浮在畫面上的東西（播放列、換章鈕、跳轉鈕）原本用「毛玻璃」（backdrop-filter），
   經文一捲動手機就要每一格畫面重算一次後面的模糊，倍速快、一直換節捲動時就會頓。
   手機改成幾乎不透明的底色，看起來差不多，但不用重算。 */
@media (max-width: 760px) {
  .player { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(14, 21, 38, .97); }
  .ch-dock a { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(16, 24, 42, .97); }
  .jump-fab { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(16, 24, 42, .97); }
}

/* 名畫後面那層：改用預先做好的很小的同一張（放大了本來就糊），不用即時模糊濾鏡 */
.is-painting .art-blur { filter: brightness(.45) saturate(.9); transform: none; }

/* 換節時經文的明暗變化短一點（2 倍速時一秒換好幾節） */
.verse { transition: opacity .25s, background .25s; }

/* ───────── 三、經文螢光筆（收藏）───────── */
/* 長按經文時不要跳出手機自己的選字、放大鏡 */
.listen .verse { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* 畫了顏色的經文：像真的螢光筆劃過字的下半部，一行一行都有 */
.verse.hl .vtx {
  background-image: linear-gradient(transparent 52%, color-mix(in oklab, var(--hl), transparent 52%) 52%, color-mix(in oklab, var(--hl), transparent 52%) 94%, transparent 94%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone; border-radius: 3px; padding: 0 2px;
}
.verses.is-live .verse.hl { opacity: .78; }
.verses.is-live .verse.hl.is-now { opacity: 1; }
/* 工具列開著時選到的節 */
.verse.is-picked { background: color-mix(in oklab, var(--light), transparent 82%); border-left-color: var(--light-hi); opacity: 1 !important; }
.mk-hint { margin: 4px 0 10px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line); font-size: .92rem; color: var(--text-2); }
.mk-hint b { color: var(--light-hi); font-weight: 700; }

.mk-bar {
  position: fixed; z-index: 60; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translate(-50%, 24px); opacity: 0;
  width: min(520px, calc(100% - 20px)); padding: 14px 14px 12px; border-radius: 22px;
  background: #121C31; box-shadow: inset 0 0 0 1px var(--line-strong), 0 30px 70px -20px #000;
  transition: transform .22s var(--ease), opacity .22s;
}
.mk-bar.is-in { transform: translate(-50%, 0); opacity: 1; }
html.is-marking .player, html.is-marking .ch-dock, html.is-marking .jump-fab, html.is-marking .notes-fab { visibility: hidden; }
.mk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 0 4px 10px; }
.mk-ref { display: block; font-family: var(--serif); font-size: 1.08rem; color: var(--light-hi); }
.mk-tip { display: block; font-size: .8rem; color: var(--text-3); }
.mk-x { display: grid; place-items: center; width: 38px; height: 38px; margin: -4px -4px 0 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.mk-colors { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mk-color { display: grid; justify-items: center; gap: 5px; padding: 8px 2px 7px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .04); font-size: .8rem; color: var(--text-2); transition: background .15s, transform .15s; }
.mk-color:active { transform: scale(.94); }
.mk-dot { display: inline-block; width: 26px; height: 26px; border-radius: 50%; background: var(--c); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); }
.mk-color[aria-pressed="true"] { background: color-mix(in oklab, var(--c), transparent 84%); color: var(--text); }
.mk-color[aria-pressed="true"] .mk-dot { box-shadow: 0 0 0 3px #121C31, 0 0 0 5px var(--c); }
.mk-name { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mk-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.mk-act { display: grid; place-items: center; min-height: 44px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .07); font-size: .95rem; color: var(--text); }
.mk-act.is-link { color: var(--light-hi); }

.mk-toast {
  position: fixed; z-index: 70; left: 50%; bottom: calc(112px + env(safe-area-inset-bottom)); transform: translate(-50%, 10px); opacity: 0;
  display: flex; align-items: center; gap: 12px; max-width: calc(100% - 24px); padding: 10px 10px 10px 18px; border-radius: 999px;
  background: #F5F0E6; color: #141B2B; font-size: .93rem; box-shadow: 0 18px 40px -14px #000; transition: transform .22s var(--ease), opacity .22s;
}
.mk-toast > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mk-toast.is-in { transform: translate(-50%, 0); opacity: 1; }
.mk-toast-btn { flex: none; min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: #141B2B; color: #FFE9B8; font-weight: 700; font-size: .88rem; }

/* ───────── 我的收藏、我的筆記：頁面共用 ───────── */
.mine-page { max-width: 46rem; margin-inline: auto; padding-bottom: 120px; }
.mine-head { padding: 26px var(--gutter) 10px; }
.mine-kicker { font-size: .85rem; letter-spacing: .3em; color: var(--light); }
.mine-head h1 { margin-top: 4px; font-family: var(--serif); font-weight: 700; font-size: clamp(1.7rem, 6vw, 2.3rem); letter-spacing: .08em; }
.mine-head p { margin-top: 6px; color: var(--text-2); font-size: .95rem; }

.sv-chips { display: flex; gap: 8px; overflow-x: auto; padding: 8px var(--gutter) 4px; scrollbar-width: none; }
.sv-chips::-webkit-scrollbar { display: none; }
.sv-chip { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px 0 12px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--line); font-size: .93rem; color: var(--text-2); }
.sv-chip .mk-dot { width: 14px; height: 14px; box-shadow: none; }
.sv-chip small { font-size: .78rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.sv-chip[aria-pressed="true"] { background: var(--text); color: #141B2B; box-shadow: none; }
.sv-chip[aria-pressed="true"] small { color: #4A5468; }
.sv-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px var(--gutter) 4px; }
.sv-segs { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.sv-seg { min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: none; font-size: .88rem; color: var(--text-2); }
.sv-seg[aria-pressed="true"] { background: rgba(255, 255, 255, .14); color: var(--text); }
.sv-rename-btn { min-height: 34px; padding: 0 4px; border: 0; background: none; font-size: .88rem; color: var(--light-hi); text-decoration: underline; text-underline-offset: 4px; }
.sv-rename { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; width: 100%; }
.sv-rename label { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.sv-rename .mk-dot { flex: none; width: 18px; height: 18px; }
.sv-rename input { width: 100%; min-width: 0; padding: 6px 4px; border: 0; border-bottom: 1px solid var(--line-strong); background: none; color: var(--text); font-size: 1rem; }
.sv-list { padding: 8px var(--gutter) 0; }
.sv-book { margin-top: 18px; }
.sv-book h3 { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; font-family: var(--serif); font-size: 1.15rem; letter-spacing: .1em; }
.sv-book h3 small { font-family: var(--sans); font-size: .8rem; letter-spacing: 0; color: var(--text-3); }
.sv-cards { display: grid; gap: 10px; }
.sv-card { position: relative; display: flex; border-radius: 16px; background: rgba(255, 255, 255, .045); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.sv-card::before { content: ""; flex: none; width: 5px; background: var(--hl); }
.sv-go { flex: 1; min-width: 0; display: grid; gap: 6px; padding: 14px 8px 14px 16px; }
.sv-ref { display: flex; align-items: baseline; gap: 10px; font-family: var(--serif); font-weight: 700; color: var(--light-hi); }
.sv-ref small { font-family: var(--sans); font-weight: 500; font-size: .75rem; padding: 1px 9px; border-radius: 999px; background: color-mix(in oklab, var(--hl), transparent 78%); color: var(--text); }
.sv-text { font-family: var(--serif); font-size: 1.08rem; line-height: 1.85; color: var(--text); }
.sv-text small { font-size: .7em; color: var(--text-3); }
.sv-del { flex: none; align-self: flex-start; display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: var(--text-3); }
.sv-empty { display: grid; justify-items: center; gap: 12px; padding: 50px 10px 30px; text-align: center; }
.sv-empty-art { display: flex; gap: 8px; margin-bottom: 6px; }
.sv-empty-art i { width: 14px; height: 40px; border-radius: 7px; transform: rotate(18deg); opacity: .85; }
.sv-empty h3 { font-family: var(--serif); font-size: 1.25rem; letter-spacing: .08em; }
.sv-empty p { max-width: 24em; color: var(--text-2); line-height: 1.8; }
.sv-empty p b { color: var(--light-hi); }
.sv-empty .btn { margin-top: 8px; min-height: 48px; }
.mine-backup { margin: 40px var(--gutter) 0; padding: 18px 18px 16px; border-radius: 18px; background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px var(--line); }
.mine-backup h3 { font-size: 1rem; letter-spacing: .1em; }
.mine-backup > p { margin-top: 6px; font-size: .88rem; line-height: 1.7; color: var(--text-3); }
.mine-backup-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.mine-backup-btns .btn { min-height: 42px; padding: 0 18px; font-size: .92rem; gap: 6px; }
.mine-backup-msg { margin-top: 8px; font-size: .88rem; color: var(--ok); }

/* ───────── 二、隨手筆記 ───────── */
/* 右下角「筆記」鈕：在「跳轉」鈕左邊，一樣大 */
.notes-fab {
  position: fixed; z-index: 31; right: calc(82px + env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 58px; height: 58px; border: 0; border-radius: 50%;
  background: rgba(16, 24, 42, .97); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--light), transparent 50%), 0 14px 32px -10px #000; color: var(--light-hi); line-height: 1.1;
  transition: transform .2s var(--ease);
}
.notes-fab:active { transform: scale(.94); }
.notes-fab-lbl { font-size: .66rem; letter-spacing: .1em; color: var(--text-2); }
body[data-view="game"] .notes-fab, body[data-view="pk"] .notes-fab, body[data-view="world"] .notes-fab, body[data-view="hub"] .notes-fab,
body[data-view="notes"] .notes-fab, html.is-full-page .notes-fab, html.is-jumping .notes-fab, html.is-noting .notes-fab, html.is-noting .jump-fab { display: none; }
@media (max-width: 760px) {
  body[data-view="chapter"] .notes-fab { bottom: calc(152px + env(safe-area-inset-bottom)); }
  body:has(.chapter:not(.has-player)) .notes-fab { bottom: calc(68px + env(safe-area-inset-bottom)); }
}

/* 半屏：從下面滑上來，上面還看得到經文；電腦是右邊一欄 */
.nt-sheet {
  position: fixed; z-index: 80; left: 0; right: 0; bottom: 0; height: min(64vh, 640px); display: flex; flex-direction: column;
  border-radius: 22px 22px 0 0; background: #0E1628; box-shadow: 0 -1px 0 var(--line-strong), 0 -30px 60px -20px rgba(0, 0, 0, .7);
  transform: translateY(102%); transition: transform .26s var(--ease);
}
.nt-sheet.is-in { transform: none; }
.nt-grip { flex: none; width: 42px; height: 5px; margin: 8px auto 2px; border-radius: 3px; background: rgba(255, 255, 255, .22); }
.nt-sheet .nt-app { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
html.is-noting .player, html.is-noting .ch-dock { visibility: hidden; }
@media (min-width: 960px) {
  .nt-sheet { left: auto; top: 0; width: 440px; height: auto; border-radius: 22px 0 0 22px; transform: translateX(102%); box-shadow: -1px 0 0 var(--line-strong), -30px 0 60px -20px rgba(0, 0, 0, .7); }
  .nt-grip { display: none; }
}
.nt-sheetbar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px 6px 14px; background: #0E1628; }
.nt-sheetbar-l { min-width: 0; }
.nt-sheetbar-r { display: flex; gap: 6px; }
.nt-sheet-title { font-family: var(--serif); font-size: 1.1rem; letter-spacing: .1em; }
.nt-iconbtn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .07); color: var(--text); }
.nt-back, .nt-topbtn { display: inline-flex; align-items: center; gap: 4px; max-width: 60vw; min-height: 40px; padding: 0 14px 0 8px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--text); font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-topbtn { background: rgba(10, 17, 32, .5); box-shadow: inset 0 0 0 1px var(--line); }

/* 首頁 */
.nt-home-tools { display: grid; gap: 10px; padding: 8px var(--gutter) 6px; }
.nt-sheet .nt-home-tools, .nt-sheet .nt-tree-box, .nt-sheet .nt-results { padding-inline: 16px; }
.nt-search { width: 100%; min-height: 46px; padding: 0 16px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font-size: 1rem; }
.nt-search::placeholder { color: var(--text-3); }
.nt-home-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.nt-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 16px 0 12px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font-size: .93rem; }
.nt-pill.is-main { background: var(--light); color: var(--on-light); font-weight: 700; box-shadow: none; }
.nt-tree-box, .nt-results { padding: 6px var(--gutter) 0; }
.nt-tree { margin: 0; padding: 0; list-style: none; }
.nt-tr { display: flex; align-items: center; gap: 2px; min-height: 48px; padding-left: calc(var(--d) * 18px); border-radius: 12px; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.nt-tr:hover { background: rgba(255, 255, 255, .04); }
.nt-caret { flex: none; display: grid; place-items: center; width: 32px; height: 40px; border: 0; background: none; color: var(--text-3); transition: transform .15s; }
.nt-caret.is-open .icon { transform: rotate(90deg); }
.nt-caret .icon { transition: transform .15s; }
.nt-tr-go { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--text); font-size: 1.02rem; text-align: left; }
.nt-tr-go > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nt-tr-go .icon { flex: none; color: var(--light); }
.nt-tr-go small { flex: none; padding: 0 7px; border-radius: 999px; background: rgba(255, 255, 255, .07); font-size: .75rem; color: var(--text-3); }
.nt-tr-add { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--text-3); opacity: .7; }
.nt-tr.is-dragging { opacity: .4; }
.nt-tr.drop-before { box-shadow: inset 0 3px 0 var(--light); }
.nt-tr.drop-after { box-shadow: inset 0 -3px 0 var(--light); }
.nt-tr.drop-in { background: color-mix(in oklab, var(--light), transparent 80%); box-shadow: inset 0 0 0 2px var(--light); }
.nm-ghost { position: fixed; z-index: 120; left: 0; top: 0; max-width: 220px; padding: 8px 14px; border-radius: 12px; background: var(--light); color: var(--on-light); font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; box-shadow: 0 16px 34px -10px #000; }
.nt-hits { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.nt-hits button { display: grid; gap: 2px; width: 100%; padding: 12px 14px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .05); color: var(--text); text-align: left; }
.nt-hits small { font-size: .78rem; color: var(--text-3); }
.nt-hits span { font-size: .88rem; color: var(--text-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nt-empty, .nt-empty-line { padding: 36px 10px; text-align: center; color: var(--text-2); }
.nt-empty { display: grid; justify-items: center; gap: 10px; }
.nt-empty-art { color: var(--light); opacity: .8; }
.nt-empty h3 { font-family: var(--serif); font-size: 1.2rem; letter-spacing: .08em; color: var(--text); }
.nt-empty p { max-width: 22em; line-height: 1.8; }

/* 一頁 */
.nt-page { padding-bottom: 20px; }
.nt-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; padding: 14px var(--gutter) 0; font-size: .85rem; color: var(--text-3); }
.nt-sheet .nt-crumbs, .nt-sheet .nt-title, .nt-sheet .nt-pagetools, .nt-sheet .nt-doc { padding-inline: 16px; }
.nt-crumbs button { max-width: 12em; padding: 4px 2px; border: 0; background: none; color: var(--text-2); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-title { margin: 4px 0 0; padding: 6px var(--gutter) 4px; font-family: var(--serif); font-weight: 700; font-size: clamp(1.6rem, 6vw, 2.2rem); line-height: 1.35; letter-spacing: .04em; outline: none; word-break: break-word; }
.nt-title:empty::before { content: attr(data-ph); color: var(--text-3); }
.nt-pagetools { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px var(--gutter) 6px; }
.nt-segs { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.nt-seg { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 14px 0 10px; border: 0; border-radius: 999px; background: none; color: var(--text-2); font-size: .88rem; }
.nt-seg[aria-pressed="true"] { background: rgba(255, 255, 255, .14); color: var(--text); }

.nt-doc { position: relative; padding: 4px var(--gutter) 0; }
.nt-blocks { display: grid; gap: 2px; }
.nt-b { position: relative; display: flex; align-items: flex-start; gap: 8px; min-height: 34px; border-radius: 8px; }
.nt-t { flex: 1; min-width: 0; padding: 5px 2px; font-size: 1.06rem; line-height: 1.75; color: var(--text); outline: none; white-space: pre-wrap; word-break: break-word; caret-color: var(--light); }
.nt-b.is-focus .nt-t:empty::before, .nt-blocks > .nt-b:only-child .nt-t:empty::before { content: attr(data-ph); color: var(--text-3); pointer-events: none; }
.nt-b.is-h .nt-t { padding-top: 14px; font-family: var(--serif); font-weight: 700; font-size: 1.3rem; letter-spacing: .04em; color: var(--light-hi); }
.nt-bullet { flex: none; width: 6px; height: 6px; margin: 15px 4px 0 6px; border-radius: 50%; background: var(--light); }
.nt-check { flex: none; display: grid; place-items: center; width: 22px; height: 22px; margin: 8px 2px 0 2px; padding: 0; border: 0; border-radius: 6px; box-shadow: inset 0 0 0 2px var(--text-3); background: none; color: var(--on-light); }
.nt-check.is-done { background: var(--light); box-shadow: none; }
.nt-b.is-done .nt-t { color: var(--text-3); text-decoration: line-through; }
.nt-ref { color: var(--light-hi); text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--light), transparent 40%); text-underline-offset: 4px; }
.nt-b.is-quote blockquote { flex: 1; margin: 6px 0; padding: 10px 14px 10px 16px; border-left: 3px solid var(--light); border-radius: 0 12px 12px 0; background: color-mix(in oklab, var(--light), transparent 92%); }
.nt-q-ref { display: inline-block; margin-bottom: 2px; font-family: var(--serif); font-weight: 700; font-size: .95rem; color: var(--light-hi); text-decoration: none; }
a.nt-q-ref::after { content: " ›"; color: var(--text-3); }
.nt-b.is-quote p { font-family: var(--serif); font-size: 1.05rem; line-height: 1.85; color: var(--text); }
.nt-b.is-quote p small { font-size: .7em; color: var(--text-3); }
.nt-b.is-hr { align-items: center; min-height: 28px; }
.nt-b.is-hr hr { flex: 1; border: 0; border-top: 1px solid var(--line-strong); }
.nt-rm { flex: none; display: grid; place-items: center; width: 34px; height: 34px; margin-top: 6px; border: 0; border-radius: 50%; background: none; color: var(--text-3); opacity: .55; }
.nt-rm:hover, .nt-rm:focus-visible { opacity: 1; background: rgba(255, 255, 255, .07); }
.nt-pagelink { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .05); color: var(--text); font-size: 1rem; text-align: left; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 5px; }
.nt-pagelink .icon { color: var(--light); }
.nt-pagelink small { margin-left: auto; font-size: .78rem; color: var(--text-3); text-decoration: none; }
.nt-b.is-page { margin: 3px 0; }
.nt-b.is-flash { animation: nt-flash 1.4s ease; }
@keyframes nt-flash { 0%, 40% { background: color-mix(in oklab, var(--light), transparent 75%); } 100% { background: transparent; } }
.nt-tail { min-height: 90px; cursor: text; }
.nt-orphans { display: grid; gap: 6px; }
.nt-orphans-h { margin-top: 6px; font-size: .82rem; letter-spacing: .1em; color: var(--text-3); }
.nt-toolbar {
  position: sticky; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 4; display: flex; gap: 6px; margin-top: 14px; padding: 6px; overflow-x: auto;
  border-radius: 16px; background: #16213A; box-shadow: inset 0 0 0 1px var(--line-strong), 0 14px 30px -12px #000; scrollbar-width: none;
}
.nt-toolbar::-webkit-scrollbar { display: none; }
.nt-tool { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 13px; border: 0; border-radius: 11px; background: rgba(255, 255, 255, .06); color: var(--text); font-size: .9rem; white-space: nowrap; }
.nt-tool:active { background: rgba(255, 255, 255, .14); }
.nt-sheet .nt-toolbar { bottom: 6px; }
.nt-refbox { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line); }
.nt-refinput { flex: 1; min-width: 12em; min-height: 42px; padding: 0 12px; border: 0; border-radius: 10px; background: rgba(0, 0, 0, .25); color: var(--text); font-size: 1rem; }
.nt-refmsg { flex-basis: 100%; color: var(--bad); }
.nt-refmsg:empty { display: none; }
.nt-full .nt-pagehead .topbar, .nt-full .nt-home .topbar { padding-inline: var(--gutter); }

/* 「⋯」選單、搬到哪裡 */
.nt-shade { position: fixed; inset: 0; z-index: 90; }
.nt-pop { position: fixed; z-index: 91; display: grid; min-width: 200px; padding: 6px; border-radius: 16px; background: #18243B; box-shadow: inset 0 0 0 1px var(--line-strong), 0 24px 50px -16px #000; }
.nt-pop button { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px; border: 0; border-radius: 10px; background: none; color: var(--text); font-size: .98rem; text-align: left; }
.nt-pop button:hover { background: rgba(255, 255, 255, .07); }
.nt-pop .is-bad { color: var(--bad); }
.nt-modal { position: fixed; inset: 0; z-index: 95; display: grid; align-items: end; justify-items: center; background: rgba(4, 7, 14, .6); }
.nt-modal-panel { width: min(520px, 100%); max-height: 76vh; display: flex; flex-direction: column; border-radius: 22px 22px 0 0; background: #121C31; padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 760px) { .nt-modal { align-items: center; } .nt-modal-panel { border-radius: 22px; } }
.nt-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 8px 20px; }
.nt-pick { overflow-y: auto; padding: 4px 10px 16px; display: grid; gap: 2px; }
.nt-pick button { display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 12px 0 calc(12px + var(--d, 0) * 18px); border: 0; border-radius: 10px; background: none; color: var(--text); font-size: 1rem; text-align: left; }
.nt-pick button:hover { background: rgba(255, 255, 255, .06); }
.nt-pick .icon { color: var(--light); }
.nt-pick .is-top { font-weight: 700; color: var(--light-hi); }

/* 心智圖 */
.nt-mapwrap { display: flex; flex-direction: column; }
.nt-map-tip { padding: 4px var(--gutter) 8px; font-size: .85rem; color: var(--text-3); }
.nt-sheet .nt-map-tip { padding-inline: 16px; }
.nm { position: relative; height: min(70vh, 640px); margin: 0 var(--gutter); border-radius: 20px; overflow: hidden; background: radial-gradient(ellipse at 50% 45%, #15213A, #0A1120 70%); box-shadow: inset 0 0 0 1px var(--line); }
.nt-sheet .nm { height: calc(min(64vh, 640px) - 200px); min-height: 240px; margin: 0 12px; }
@media (min-width: 960px) { .nt-sheet .nm { height: calc(100vh - 210px); } }
.nm-view { position: absolute; inset: 0; touch-action: none; cursor: grab; outline: none; }
.nm-view:active { cursor: grabbing; }
.nm-world { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; }
.nm-lines { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.nm-line { fill: none; stroke: color-mix(in oklab, var(--light), transparent 45%); stroke-width: 2; }
.nm-line.is-head, .nm-line.is-item { stroke: rgba(255, 255, 255, .22); stroke-width: 1.5; }
.nm-node {
  position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 6px; max-width: 164px; min-height: 34px; padding: 0 12px;
  border: 0; border-radius: 999px; background: #1A2742; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--light), transparent 55%); color: var(--text); font-size: .9rem;
  white-space: nowrap; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.nm-node .icon { flex: none; color: var(--light); }
.nm-label { overflow: hidden; text-overflow: ellipsis; }
.nm-node.is-root { max-width: 200px; min-height: 48px; padding: 0 20px; background: var(--light); color: var(--on-light); font-family: var(--serif); font-weight: 700; font-size: 1.08rem; box-shadow: 0 0 0 6px color-mix(in oklab, var(--light), transparent 82%), 0 18px 40px -14px #000; }
.nm-node.is-head { background: #213152; font-weight: 700; color: var(--light-hi); box-shadow: inset 0 0 0 1px var(--line-strong); }
.nm-node.is-item { background: rgba(255, 255, 255, .06); box-shadow: none; color: var(--text-2); font-size: .85rem; min-height: 30px; }
.nm-node.is-picked { box-shadow: 0 0 0 2px var(--light-hi); }
.nm-node.is-drop { box-shadow: 0 0 0 3px var(--ok); background: #1F3B33; }
.nm-node.is-dragging { opacity: .35; }
.nm-more { flex: none; padding: 0 6px; border-radius: 999px; background: color-mix(in oklab, var(--light), transparent 75%); font-size: .72rem; color: var(--light-hi); }
.nm-edit { position: absolute; transform: translate(-50%, -50%); z-index: 3; }
.nm-input { width: 180px; min-height: 38px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--text); color: #141B2B; font-size: .95rem; box-shadow: 0 0 0 3px var(--light); }
.nm-zoom { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.nm-zoom button { min-width: 40px; height: 40px; padding: 0 10px; border: 0; border-radius: 12px; background: rgba(16, 24, 42, .92); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text); font-size: 1.05rem; }
.nm-zoom .is-fit { font-size: .85rem; }
.nm-actions { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 44px 10px 14px; border-radius: 16px; background: #18243B; box-shadow: inset 0 0 0 1px var(--line-strong), 0 16px 30px -12px #000; }
.nm-actions > b { flex-basis: 100%; font-size: .92rem; color: var(--light-hi); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nm-actions > div { display: flex; flex-wrap: wrap; gap: 6px; }
.nm-actions > div button { display: inline-flex; align-items: center; gap: 4px; min-height: 38px; padding: 0 13px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .08); color: var(--text); font-size: .9rem; }
.nm-actions > div .is-open { background: var(--light); color: var(--on-light); font-weight: 700; }
.nm-x { position: absolute; right: 6px; top: 6px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--text-3); }
.nt-mapwrap.is-page { padding-top: 6px; }

/* ───── 手機、電腦同步（js/mine/sync.js）───── */
.mine-sync { margin-top: 28px; }
.mine-sync h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.mine-sync-stat { font-size: .8rem; letter-spacing: .04em; font-weight: 500; color: var(--ok); }
.mine-sync-stat.is-bad { color: #ffb36b; }
.mine-sync-link { display: block; width: 100%; margin-top: 10px; padding: 10px 12px; border: 0; border-radius: 12px; background: rgba(0, 0, 0, .28); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); font: 500 .82rem/1.4 ui-monospace, Menlo, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; }
.mine-sync-tip { margin-top: 10px; font-size: .84rem; line-height: 1.7; color: var(--text-3); }
.mine-sync-tip.is-warn { color: #f3c98b; }
.mine-sync-leave { margin-top: 10px; font-size: .84rem; color: var(--text-3); }
.sync-join .mine-sync { max-width: 620px; }

/* ───── 英文經文（11/17）：html[data-lang] 是 zh／en／both ───── */
.vten { display: block; font-family: Georgia, 'Times New Roman', serif; font-size: .93em; line-height: 1.65; color: var(--text-2); letter-spacing: .005em; }
html[data-lang="both"] .vt.has-en .vten { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
html[data-lang="en"] .vt.has-en .vtx { display: none; }
html[data-lang="en"] .vten { font-size: 1.02em; color: var(--text); }
html[data-lang="zh"] .vten { display: none; }

/* ── 簡體模式（11/17，js/hans.js）：用簡體的字型；網站自帶的思源宋體精簡版只有繁體字，簡體時不用它，免得一句話兩種字型 ── */
html[data-script="hans"] {
  --serif: "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  --num: "Cormorant Garamond", "Noto Serif SC", "Songti SC", serif;
}
/* 首頁右上角：繁體／簡體互換 */
.script-switch {
  position: absolute; z-index: 3; top: max(14px, env(safe-area-inset-top)); right: var(--gutter, 16px);
  min-width: 52px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(10, 17, 32, .45); backdrop-filter: blur(6px); color: var(--text); font: inherit; font-size: .9rem;
  letter-spacing: .08em; cursor: pointer;
}
.script-switch:hover { border-color: var(--light); color: var(--light-hi, var(--light)); }
select.script-switch { appearance: none; -webkit-appearance: none; text-align: center; text-align-last: center; }
select.script-switch option { background: #0A1120; color: var(--text); }
/* 英文版（js/en.js）：英文字母不用那麼寬的字距，大標題小一點才放得下 */
html[data-ui="en"] .hero-title { letter-spacing: .01em; font-size: clamp(2.3rem, 8.6vw, 5.2rem); }
html[data-ui="en"] .wordmark, html[data-ui="en"] .sec-head h2, html[data-ui="en"] .bk-body h1, html[data-ui="en"] .poster-name { letter-spacing: .02em; }
/* 聽故事畫面下面的經文：中英對照時英文放在中文下面（11/17） */
.sv-en { display: block; margin-top: 4px; color: var(--text-2); font-size: .92em; line-height: 1.6; }
