/* 念佛世界 — 典雅：宣紙般的暖白帶一點杏橘、墨色字、朱紅與金線點綴；留白、細線、不用厚重陰影與大色塊。
   手機優先、長輩友善（大字、少按鈕） */
@font-face { font-family: 'PLB Serif'; src: url('fonts/plb-serif.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
:root {
  --paper: #faf4ea; --paper2: #f6ebdc; --apricot: #f3dcc0;
  --ink: #33241b; --dim: #8d7662; --line: #dcc6a4; --gold: #b08d57; --gold2: #cdb07c;
  --red: #a4231d; --red2: #86190f;
  --serif: 'PLB Serif', 'Noto Serif TC', 'Songti TC', 'PMingLiU', serif;
  --sans: 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { background: var(--paper); color: var(--ink); font: 18px/1.7 var(--sans); overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
[hidden] { display: none !important; }
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--paper); }

/* 按鈕：細線、方正、字距寬 */
.btn { display: flex; align-items: center; justify-content: center; gap: .6em; min-height: 52px; padding: 0 1.2em; border-radius: 2px; font-family: var(--serif); font-weight: 700; letter-spacing: .18em; text-indent: .18em; transition: opacity .15s, background .15s; }
.btn:active { opacity: .82; }
.btn:disabled { opacity: .45; }
.btn.big { min-height: 64px; font-size: 1.2rem; width: 100%; }
.btn.primary { color: #fbf3e4; background: var(--red); outline: 1px solid rgba(205,176,124,.75); outline-offset: -5px; }
.btn.ghost, .btn.dark { border: 1px solid var(--line); color: var(--ink); background: transparent; font-size: 1rem; min-height: 54px; flex: 1; }
.chip { font-size: .8rem; color: var(--red); border: 1px solid var(--line); border-radius: 99px; padding: .1em .8em; white-space: nowrap; background: var(--paper); }

/* 首頁 */
#home { overflow-y: auto; background:
  radial-gradient(60% 34% at 50% 15%, rgba(243,220,192,.75) 0%, rgba(243,220,192,0) 100%),
  linear-gradient(var(--paper), var(--paper2)); }
.home-inner { position: relative; width: min(100%, 420px); margin: 0 auto; padding: calc(30px + var(--safe-t)) 30px calc(26px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 100%; }
.home-inner::before { content: ''; position: absolute; top: calc(8px + var(--safe-t)); left: 50%; width: 268px; height: 268px; margin-left: -134px; border-radius: 50%; border: 1px solid rgba(176,141,87,.38); box-shadow: 0 0 0 9px rgba(176,141,87,.07); pointer-events: none; }
.logo { position: relative; width: 104px; height: auto; margin-top: 16px; }
h1 { position: relative; margin: 6px 0 0; font: 700 2.5rem/1.2 var(--serif); letter-spacing: .42em; text-indent: .42em; color: var(--ink); }
.motto { position: relative; margin: 0; color: var(--gold); font-family: var(--serif); letter-spacing: .6em; text-indent: .6em; font-size: .86rem; }
.online { margin: 44px 0 0; min-height: 1.6em; font-size: .88rem; color: var(--dim); letter-spacing: .12em; }
.online b { font: 700 1.2rem var(--serif); margin: 0 .25em; color: var(--red); }
.places { list-style: none; padding: 0; margin: 6px 0 0; width: 100%; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.places li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.places button { width: 100%; min-height: 86px; text-align: center; padding: 12px 8px; display: grid; gap: 2px; align-content: center; position: relative; }
.places button:active { background: rgba(243,220,192,.5); }
.places b { font: 700 1.16rem var(--serif); color: var(--ink); letter-spacing: .22em; text-indent: .22em; }
.places span { font-size: .74rem; color: var(--dim); letter-spacing: .06em; }
.places em { font: normal .72rem var(--sans); color: var(--red); min-height: 1em; }
.places em:empty { display: none; }
.places .soon b { color: #b3a08c; }
.places i { font: normal .68rem var(--sans); color: var(--gold); letter-spacing: .2em; }
.row3 { display: flex; gap: 12px; width: 100%; margin-top: 4px; }
footer { margin-top: auto; padding-top: 26px; font: .78rem var(--serif); letter-spacing: .5em; text-indent: .5em; color: var(--gold); }

/* 頂列 */
.bar { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; min-height: calc(58px + var(--safe-t)); padding: var(--safe-t) 12px 0 0; background: var(--paper); border-bottom: 1px solid var(--line); flex: none; }
.bar h2 { margin: 0; font: 700 1.16rem var(--serif); letter-spacing: .36em; color: var(--ink); }
.bar > span:empty { width: 44px; }
.back { width: 56px; height: 56px; font-size: 1.8rem; line-height: 1; color: var(--gold); font-family: var(--serif); }

/* 建立人物 */
.create-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: 0 24px calc(26px + var(--safe-b)); }
.preview { position: sticky; top: 0; z-index: 2; width: 100%; display: flex; flex-direction: column; align-items: center; padding: 14px 0 8px; background: linear-gradient(var(--paper) 84%, rgba(250,244,234,0)); }
.preview canvas { width: 140px; height: 196px; border-radius: 70px 70px 2px 2px; background: radial-gradient(circle at 50% 38%, #fffaf1, var(--apricot)); border: 1px solid var(--line); cursor: pointer; }
.pname { margin: 8px 0 0; min-height: 1.6em; max-width: 92%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: .92rem var(--serif); letter-spacing: .1em; color: var(--red); border-bottom: 1px solid var(--gold2); padding: 0 .6em; }
.pname:empty { visibility: hidden; }
#meForm { width: min(100%, 440px); display: grid; gap: 20px; }
#meDone { margin-top: 4px; }
.field { display: grid; gap: 8px; }
.field > span { font: .86rem var(--serif); color: var(--gold); letter-spacing: .14em; }
.field input, .field select { height: 56px; border-radius: 2px; border: 1px solid var(--line); background: #fffdf8; color: var(--ink); font: 1.1rem var(--sans); padding: 0 14px; outline: none; width: 100%; }
.field input:focus, .field select:focus { border-color: var(--red); }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button { flex: 1; min-height: 52px; min-width: 88px; border-radius: 2px; border: 1px solid var(--line); color: var(--ink); background: transparent; }
.seg button.on, .grid button.on { border-color: var(--red); color: var(--red); background: rgba(164,35,29,.06); font-weight: 700; box-shadow: 0 0 0 1px var(--red) inset; }
.seg button .dot { display: inline-block; width: 15px; height: 15px; border-radius: 50%; vertical-align: -2px; margin-right: .45em; border: 1px solid rgba(0,0,0,.25); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.grid button { border-radius: 2px; border: 1px solid var(--line); background: transparent; padding: 8px 2px; display: grid; justify-items: center; font-size: .84rem; color: var(--ink); }
.grid canvas { width: 60px; height: 60px; border-radius: 50%; background: var(--apricot); margin-bottom: 4px; }

/* 遊戲人間 */
.games-body { flex: 1; overflow-y: auto; padding: 22px 24px calc(24px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; }
.games-lead { margin: 0 0 8px; color: var(--dim); font: .9rem var(--serif); letter-spacing: .14em; text-align: center; }
.game-list { list-style: none; margin: 0; padding: 0; width: min(100%, 460px); }
.game-list li { border-bottom: 1px solid var(--line); }
.game-list a { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 16px; padding: 22px 4px; color: inherit; text-decoration: none; }
.game-list a:active { background: rgba(243,220,192,.5); }
.game-list .no { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font: 700 1.4rem var(--serif); color: var(--red); border: 1px solid var(--red); box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--gold2); }
.game-list b { display: block; font: 700 1.2rem var(--serif); color: var(--ink); letter-spacing: .1em; }
.game-list small { color: var(--dim); font-size: .86rem; letter-spacing: .06em; }
.game-list .go { font: 700 .9rem var(--serif); letter-spacing: .2em; color: var(--red); border-bottom: 1px solid var(--red); padding: 0 .1em .1em .3em; white-space: nowrap; }

/* 場景 */
#hall { background: #060403; }
#hallCanvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.hud { position: absolute; left: 0; right: 0; z-index: 3; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud.top { top: 0; display: flex; align-items: center; gap: 4px; padding: var(--safe-t) 12px 18px 0; background: linear-gradient(rgba(10,7,5,.78), rgba(10,7,5,0)); }
.hud.top .back { color: var(--gold2); }
.where { flex: 1; min-width: 0; display: grid; }
.where b { font: 700 1.16rem var(--serif); letter-spacing: .3em; color: #f3e6cc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.where span { font-size: .8rem; color: #d8c8ac; white-space: nowrap; letter-spacing: .08em; }
.where span em { font-style: normal; color: #f0d9a6; font-weight: 700; }
.hud.top .chip { background: rgba(10,7,5,.6); color: #f0d9a6; border-color: rgba(205,176,124,.5); }
.hall-acts { position: absolute; z-index: 3; top: calc(66px + var(--safe-t)); left: 16px; right: 16px; display: flex; gap: 10px; pointer-events: none; }
.hall-acts button { pointer-events: auto; min-height: 40px; padding: 0 1.1em; border-radius: 2px; font: 700 .9rem var(--serif); letter-spacing: .2em; text-indent: .2em; color: #f3e6cc; background: rgba(16,11,8,.62); border: 1px solid rgba(205,176,124,.6); backdrop-filter: blur(4px); }
.hall-acts button.main { background: rgba(164,35,29,.88); border-color: rgba(205,176,124,.8); }
.hud.bottom { bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 30px 6px calc(8px + var(--safe-b)); background: linear-gradient(rgba(10,7,5,0), rgba(10,7,5,.88) 42%); }
.hud.bottom button { display: grid; justify-items: center; gap: 4px; min-height: 60px; padding: 6px 0; font: .82rem var(--serif); letter-spacing: .14em; color: #eadcc2; border-left: 1px solid rgba(205,176,124,.22); }
.hud.bottom button:first-child { border-left: 0; }
.hud.bottom button:active { background: rgba(205,176,124,.18); }
.ic { width: 24px; height: 24px; display: block; background: var(--gold2); -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; }
.ic.heshi { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2c2.2 3.4 3 6.6 3 10.2V20l-3 2-3-2v-7.8C9 8.6 9.8 5.4 12 2zm0 3.6V20M5 13l4 3M19 13l-4 3' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ic.sit { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='5' r='2.4'/%3E%3Cpath d='M12 8.6c-2.4 0-3.8 1.9-3.8 4.6V16h7.6v-2.8c0-2.7-1.4-4.6-3.8-4.6zM3.6 19.6c0-1.6 3.8-2.8 8.4-2.8s8.4 1.2 8.4 2.8-3.8 2.2-8.4 2.2-8.4-.6-8.4-2.2z'/%3E%3C/svg%3E"); }
.ic.seal { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linejoin='round'%3E%3Cpath d='M9.5 3h5v3.6c0 1.1-.5 1.9-1 2.8-.5.8-.4 2 .3 2.6H18.500v3.500H5.500V12H10.200c.7-.6.8-1.800.3-2.600-.5-.9-1-1.700-1-2.800zM5 20.500h14'/%3E%3C/svg%3E"); }
.ic.info { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.2'/%3E%3Cpath d='M12 11v6M12 7.4v.2'/%3E%3C/svg%3E"); }
.ic.book { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linejoin='round'%3E%3Cpath d='M12 6.2C10 4.6 7 4.2 3.500 4.600v13.800c3.500-.4 6.500 0 8.500 1.600 2-1.600 5-2 8.500-1.600V4.600C17 4.200 14 4.600 12 6.200zM12 6.200V20'/%3E%3C/svg%3E"); }
.hint { position: absolute; z-index: 3; left: 50%; bottom: calc(112px + var(--safe-b)); transform: translateX(-50%); margin: 0; white-space: nowrap; font: .8rem var(--serif); letter-spacing: .12em; color: #eadcc2; background: rgba(16,11,8,.6); border: 1px solid rgba(205,176,124,.35); border-radius: 2px; padding: .35em 1.1em; pointer-events: none; transition: opacity 1s; }
.hint.out { opacity: 0; }

/* 過場 */
#veil { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: var(--paper); animation: veilIn .45s both; }
#veil.out { animation: veilOut .7s both; }
.veil-inner { display: grid; justify-items: center; gap: 22px; }
.veil-inner img { width: 84px; height: auto; animation: breathe 1.8s ease-in-out infinite; }
.veil-inner p { margin: 0; font: 700 1.1rem var(--serif); letter-spacing: .5em; text-indent: .5em; color: var(--ink); }
@keyframes veilIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes veilOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes breathe { 50% { opacity: .55; } }

/* 彈出視窗 */
.sheet { position: fixed; inset: 0; z-index: 20; display: grid; place-items: end center; background: rgba(30,20,12,.5); animation: veilIn .25s both; }
.sheet-card { position: relative; width: min(100%, 520px); max-height: 90vh; overflow-y: auto; background: var(--paper); color: var(--ink); border-top: 2px solid var(--gold2); padding: 30px 26px calc(28px + var(--safe-b)); animation: up .32s cubic-bezier(.2,.8,.2,1) both; }
@media (min-width: 560px) { .sheet { place-items: center; } .sheet-card { border: 1px solid var(--gold2); } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; font-size: 1.5rem; line-height: 1; color: var(--gold); z-index: 2; background: rgba(250,244,234,.85); border-radius: 50%; }
.sheet h3 { margin: 0 0 6px; font: 700 1.4rem var(--serif); letter-spacing: .3em; color: var(--ink); }
.sheet .lead { margin: 0 0 14px; font-size: .86rem; color: var(--dim); letter-spacing: .06em; }
.sheet dl { margin: 16px 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 18px; font-size: 1rem; }
.sheet dt { color: var(--gold); white-space: nowrap; font-family: var(--serif); letter-spacing: .2em; }
.sheet dd { margin: 0; }
.sheet small { color: var(--dim); font-size: .8rem; }
.sheet a { color: var(--red); }
.sheet .btn.primary { margin-top: 16px; }
.sheet .btn.dark { width: 100%; min-height: 54px; margin-top: 12px; flex: none; }
.center { text-align: center; }
.stamp, .stamp-img { width: 100%; height: auto; display: block; }
.stamp-stage { width: 200px; margin: 6px auto 4px; }
.stamp-stage.small { width: 150px; min-height: 0; margin: 10px auto 0; }
.stamp-stage.small:empty { display: none; }
.stamp-stage .stamp { transform: rotate(-6deg); }
.stamp-stage.hit .stamp { animation: hit .55s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes hit { 0% { transform: scale(2.2) rotate(-14deg); opacity: 0; } 60% { transform: scale(.94) rotate(-6deg); opacity: 1; } 100% { transform: scale(1) rotate(-6deg); } }
.pass-cover { border-top: 1px solid var(--gold2); border-bottom: 1px solid var(--gold2); padding: 14px 4px; margin-top: 10px; display: flex; align-items: baseline; justify-content: space-between; font-family: var(--serif); letter-spacing: .12em; }
.pass-cover b { font-size: 1.5rem; color: var(--red); }
.pass-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 10px; margin: 6px 0 10px; }
@media (min-width: 420px) { .pass-grid { grid-template-columns: repeat(3, 1fr); } }
.pass-grid figure { margin: 0; text-align: center; cursor: pointer; }
.pass-grid .stamp { width: 78%; margin: 0 auto; }
.pass-grid figure:nth-child(odd) .stamp:not(.faded) { transform: rotate(-5deg); }
.pass-grid figure:nth-child(even) .stamp:not(.faded) { transform: rotate(4deg); }
.pass-grid figcaption { font: .86rem var(--serif); letter-spacing: .14em; margin-top: 4px; }
.pass-grid figcaption small { display: block; font-family: var(--sans); letter-spacing: 0; }
/* 法寶庫 */
.read-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.read-list li { border-bottom: 1px solid var(--line); }
.read-list button { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 16px 4px; text-align: left; }
.read-list button:active { background: rgba(243,220,192,.5); }
.read-list b { display: block; font: 700 1.12rem var(--serif); letter-spacing: .2em; }
.read-list i { font: normal .82rem var(--serif); letter-spacing: .2em; color: var(--gold); border: 1px solid var(--line); padding: .2em .7em; }
.read-list i.done { color: var(--red); border-color: var(--red); }
.reading { text-align: center; }
.reading h3 { margin-bottom: 18px; }
.reading blockquote { margin: 0; padding: 22px 6px; border-top: 1px solid var(--gold2); border-bottom: 1px solid var(--gold2); font: 500 1.34rem/2.15 var(--serif); letter-spacing: .1em; text-align: justify; color: var(--ink); }
.reading .cite { margin: 12px 0 0; font-size: .8rem; color: var(--dim); text-align: right; }
.master-photo { display: block; width: calc(100% + 52px); margin: -30px -26px 20px; aspect-ratio: 1400 / 1081; object-fit: cover; }
.nianfo { font: 700 1.4rem var(--serif); letter-spacing: .4em; text-indent: .4em; color: var(--red); margin: 14px 0 6px; }

.toast { position: fixed; z-index: 40; left: 50%; top: calc(72px + var(--safe-t)); transform: translateX(-50%); max-width: 86vw; text-align: center; background: rgba(40,28,20,.92); color: #f3e6cc; border: 1px solid rgba(205,176,124,.6); border-radius: 2px; padding: .5em 1.3em; font: .9rem var(--serif); letter-spacing: .12em; animation: veilIn .25s both; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01s !important; transition-duration: .01s !important; } }

/* 道場上方的小按鈕（佛號、資訊） */
.top-btn { flex: none; min-height: 36px; padding: 0 .8em; margin-left: 6px; border-radius: 2px; font: .78rem var(--serif); letter-spacing: .14em; color: #f0d9a6; background: rgba(16,11,8,.55); border: 1px solid rgba(205,176,124,.5); white-space: nowrap; }
.ic.mala { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5'%3E%3Ccircle cx='12' cy='4' r='1.9'/%3E%3Ccircle cx='17.7' cy='6.3' r='1.9'/%3E%3Ccircle cx='20' cy='12' r='1.9'/%3E%3Ccircle cx='17.7' cy='17.7' r='1.9'/%3E%3Ccircle cx='12' cy='20' r='1.9'/%3E%3Ccircle cx='6.3' cy='17.7' r='1.9'/%3E%3Ccircle cx='4' cy='12' r='1.9'/%3E%3Ccircle cx='6.3' cy='6.3' r='1.9'/%3E%3C/svg%3E"); }
/* 念佛：撥念珠、計數、計時 */
.nf-panel { position: absolute; z-index: 4; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translateX(-50%); width: min(92%, 330px); padding: 10px 14px 12px; background: rgba(16,11,8,.78); border: 1px solid rgba(205,176,124,.55); backdrop-filter: blur(6px); color: #eadcc2; display: grid; justify-items: center; gap: 6px; }
.nf-head, .nf-stats { width: 100%; display: flex; align-items: center; justify-content: space-between; font: .82rem var(--serif); letter-spacing: .12em; }
.nf-head b, .nf-stats b { color: #f2d277; font-size: 1.02rem; margin: 0 .15em; }
.nf-panel button { color: #f0d9a6; }
.nf-head button, .nf-stats button { min-height: 34px; padding: 0 .8em; border: 1px solid rgba(205,176,124,.45); font: .78rem var(--serif); letter-spacing: .14em; }
.mala-btn { position: relative; width: 196px; height: 196px; border-radius: 50%; }
.mala-btn:active { transform: scale(.985); }
.mala-btn svg { width: 100%; height: 100%; display: block; }
.nf-now { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; pointer-events: none; }
.nf-now b { font: 700 3rem/1 var(--serif); color: #fff3c9; }
.nf-now small { margin-top: 8px; font: .74rem var(--serif); letter-spacing: .3em; text-indent: .3em; color: #cdb07c; }
/* 法寶庫 */
.sheet h4 { margin: 24px 0 2px; font: 700 1.1rem var(--serif); letter-spacing: .3em; color: var(--ink); }
.daily { border-top: 1px solid var(--gold2); border-bottom: 1px solid var(--gold2); padding: 12px 2px 10px; margin-top: 10px; }
.daily small { font: .76rem var(--serif); letter-spacing: .3em; color: var(--gold); }
.daily blockquote { margin: 6px 0 0; font: 500 1.05rem/1.9 var(--serif); letter-spacing: .06em; }
.daily .cite { margin: 6px 0 0; font-size: .74rem; color: var(--dim); text-align: right; }
.read-list small { display: block; font-size: .74rem; color: var(--gold); letter-spacing: .14em; }
.read-list b { font-size: 1.02rem; letter-spacing: .08em; }
.reading a.btn { text-decoration: none; }
.sheet a.btn.primary { color: #fbf3e4; text-decoration: none; }

/* 首頁：念佛世界的星球（夜空） */
#home { overflow: hidden; background: radial-gradient(120% 80% at 50% 78%, #3a3560 0%, #1c1d3a 45%, #0d0f22 100%); color: #f3e6cc; }
#worldCanvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.home-top { position: absolute; top: calc(18px + var(--safe-t)); left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 14px; pointer-events: none; }
.home-top .logo { width: 74px; height: auto; margin: 0; background: rgba(250,244,234,.94); border-radius: 50%; padding: 7px 6px 5px; }
.home-top h1 { margin: 0; font: 700 2.1rem/1.2 var(--serif); letter-spacing: .34em; color: #fbf1dc; text-indent: 0; }
.home-top .motto { margin: 2px 0 0; color: #cdb07c; letter-spacing: .5em; text-indent: 0; font-size: .8rem; }
#home .online { position: absolute; top: calc(104px + var(--safe-t)); left: 0; right: 0; margin: 0; text-align: center; color: #d8c8ac; pointer-events: none; }
#home .online b { color: #f2d277; }
.home-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px calc(14px + var(--safe-b)); display: grid; gap: 10px; justify-items: center; background: linear-gradient(rgba(13,15,34,0), rgba(13,15,34,.9) 38%); }
.home-tip { margin: 0; font: .8rem var(--serif); letter-spacing: .3em; color: #cdb07c; }
.site-row { width: min(100%, 440px); display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid rgba(205,176,124,.55); }
.site-row button { min-height: 56px; font: 700 .98rem var(--serif); letter-spacing: .1em; color: #fbf1dc; border-left: 1px solid rgba(205,176,124,.4); background: rgba(16,14,30,.5); }
.site-row button:first-child { border-left: 0; background: rgba(164,35,29,.85); }
.site-row button:active { background: rgba(205,176,124,.3); }
#home .row3 { width: min(100%, 440px); margin: 0; }
#home .btn.ghost { color: #eadcc2; border-color: rgba(205,176,124,.45); min-height: 48px; }
/* 念佛：選方式、計時 */
.nf-view, .nf-choose { width: 100%; display: grid; justify-items: center; gap: 8px; }
.nf-choose p { margin: 4px 0; font: 700 1.05rem var(--serif); letter-spacing: .2em; color: #fbf1dc; }
.nf-choose > div { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nf-choose button { min-height: 96px; display: grid; align-content: center; gap: 4px; border: 1px solid rgba(205,176,124,.6); background: rgba(205,176,124,.08); }
.nf-choose button b { font: 700 1.5rem var(--serif); letter-spacing: .3em; text-indent: .3em; color: #f2d277; }
.nf-choose small { font-size: .76rem; color: #cdb07c; letter-spacing: .08em; }
.nf-clock { font: 700 4rem/1.2 var(--serif); color: #fff3c9; letter-spacing: .06em; }
.nf-set { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.nf-set button { min-height: 42px; border: 1px solid rgba(205,176,124,.45); font: .9rem var(--serif); }
.nf-set button.on { background: rgba(205,176,124,.9); color: #2a1c06; font-weight: 700; }
#nfStart { min-width: 96px; min-height: 42px; background: rgba(164,35,29,.9); color: #fbf1dc; border-color: rgba(205,176,124,.8); font-size: .95rem; }
.game-video { display: block; width: min(100%, 250px); aspect-ratio: 9 / 16; margin: 6px auto 12px; background: #000; border: 1px solid var(--gold2); }

/* 進本山的門口 */
#entry { position: fixed; inset: 0; z-index: 25; background: #dceff7; }
#entry canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#entry p { position: absolute; left: 0; right: 0; top: calc(26px + var(--safe-t)); margin: 0; text-align: center; font: 700 1.3rem var(--serif); letter-spacing: .5em; text-indent: .5em; color: #fbf1dc; text-shadow: 0 1px 8px rgba(0,0,0,.55); }
#entry .btn { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(30px + var(--safe-b)); flex: none; padding: 0 2em; color: #fbf1dc; border-color: rgba(255,255,255,.7); background: rgba(0,0,0,.28); }

/* v0.7：首頁是白天的道場全景，字改成墨色 */
#home { background: #f6efe2; color: var(--ink); }
.home-top h1 { color: var(--ink); text-shadow: 0 1px 0 rgba(255,255,255,.7); }
.home-top .motto { color: var(--gold); }
.home-top .logo { background: none; padding: 0; width: 72px; }
#home .online { color: var(--dim); }
#home .online b { color: var(--red); }
.home-bottom { background: linear-gradient(rgba(250,244,234,0), rgba(250,244,234,.94) 36%); }
.home-tip { color: var(--gold); }
.site-row { border-color: var(--gold2); background: rgba(250,244,234,.9); }
.site-row button { color: var(--ink); background: none; border-left-color: var(--line); }
.site-row button:first-child { color: #fbf3e4; background: var(--red); }
#home .btn.ghost { color: var(--ink); border-color: var(--line); background: rgba(250,244,234,.85); }
/* 念珠、計時輸入、佛號音量 */
.mala-btn { width: 200px; height: 238px; border-radius: 0; }
.nf-now { inset: 0 0 38px 0; }
.nf-set { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; font: .9rem var(--serif); letter-spacing: .1em; color: #eadcc2; grid-template-columns: none; }
.nf-set input { width: 108px; height: 48px; text-align: center; font: 700 1.4rem var(--serif); color: #2a1c06; background: #fbf1dc; border: 1px solid rgba(205,176,124,.9); border-radius: 2px; outline: none; }
.sound-pop { position: absolute; z-index: 5; top: calc(58px + var(--safe-t)); right: 12px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(16,11,8,.86); border: 1px solid rgba(205,176,124,.6); color: #eadcc2; font: .82rem var(--serif); letter-spacing: .12em; }
.sound-pop input { width: 150px; accent-color: #cdb07c; }
.sound-pop b { min-width: 2em; text-align: right; color: #f2d277; }

/* v0.8：首頁是夜色的道場全景，字改回暖白與金 */
#home { background: #0a0e1f; color: #f3e6cc; }
.home-top h1 { color: #f6e9c8; text-shadow: 0 2px 14px rgba(0,0,0,.5); }
.home-top .motto { color: #cdb07c; }
#home .online { color: #cfc4b0; }
#home .online b { color: #f2d277; }
.home-bottom { background: linear-gradient(rgba(10,14,31,0), rgba(10,14,31,.92) 38%); }
.home-tip { color: #cdb07c; }
.site-row { border-color: rgba(205,176,124,.6); background: rgba(14,16,32,.55); }
.site-row button { color: #f3e6cc; border-left-color: rgba(205,176,124,.35); }
.site-row button:first-child { color: #fbf3e4; background: rgba(142,29,20,.92); }
#home .btn.ghost { color: #eadcc2; border-color: rgba(205,176,124,.45); background: rgba(14,16,32,.5); }
/* 道場下方六顆按鈕；拜佛圖示；安座計時 */
.hud.bottom { grid-template-columns: repeat(6, 1fr); padding-left: 2px; padding-right: 2px; }
.hud.bottom button { font-size: .76rem; letter-spacing: .06em; }
.ic.bai { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6.2' cy='15.4' r='2'/%3E%3Cpath d='M8.2 16.4c2.6-2.2 5.6-3 8.4-2.4 2 .5 3.2 1.8 3.6 3.6M3.4 19.6h17.4M8.4 17.4l3.2 2.2'/%3E%3C/svg%3E"); }
.sit-chip { position: absolute; z-index: 3; left: 50%; top: calc(116px + var(--safe-t)); transform: translateX(-50%); margin: 0; padding: .3em 1.2em; white-space: nowrap; font: .9rem var(--serif); letter-spacing: .2em; color: #eadcc2; background: rgba(16,11,8,.66); border: 1px solid rgba(205,176,124,.55); }
.sit-chip b { color: #f2d277; font-size: 1.15rem; letter-spacing: .06em; }

/* v0.9：宗徽不再被裁成圓形（先前留下的圓角把圖切掉一圈，看起來像變形） */
.home-top .logo { border-radius: 0; width: 78px; height: auto; object-fit: contain; }
/* 全球道場地圖 */
.worldmap { display: block; width: 100%; height: auto; background: #1a1f33; border: 1px solid var(--gold2); }
.worldmap .land path { fill: #6f5c36; stroke: #a58a52; stroke-width: .25; }
.wm-mk { cursor: pointer; }
.wm-mk circle { fill: #e9cf86; stroke: #2a1c06; stroke-width: .6; }
.wm-mk .halo { fill: rgba(233,207,134,.28); stroke: none; }
.wm-mk.on circle { fill: #d6381f; }
.wm-mk.on .halo { fill: rgba(214,56,31,.3); }
.wm-mk text { font: 700 5.4px var(--sans); text-anchor: middle; fill: #2a1c06; pointer-events: none; }
.wm-mk.on text { fill: #fff; }
.wm-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.wm-tabs button { min-height: 40px; padding: 0 .8em; border: 1px solid var(--line); font: .86rem var(--serif); letter-spacing: .06em; color: var(--ink); }
.wm-tabs button.on { border-color: var(--red); background: var(--red); color: #fbf3e4; }

/* 各地念佛會的清單 */
.near-list { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid var(--line); }
.near-list li { padding: 14px 2px; border-bottom: 1px solid var(--line); }
.near-list h5 { margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font: 700 1.1rem var(--serif); letter-spacing: .1em; color: var(--ink); }
.near-list h5 small { font: .76rem var(--sans); letter-spacing: .08em; color: var(--gold); white-space: nowrap; }
.near-list dl { margin: 8px 0 0; font-size: .92rem; gap: 6px 14px; }
.near-list dd { word-break: break-word; }

/* 法寶庫的書架與封面 */
.shelf { margin: 12px -8px 6px; padding: 14px 10px 4px; background: linear-gradient(#4a3220, #3a2619); border: 1px solid #2a1b12; box-shadow: inset 0 0 22px rgba(0,0,0,.45); }
.shelf-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; padding: 0 6px 0; margin-bottom: 16px; border-bottom: 12px solid #6b4a2e; box-shadow: 0 7px 8px -3px rgba(0,0,0,.55); }
.cover { position: relative; aspect-ratio: 3 / 4.25; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; padding: 8px 4px 6px; color: #f0d9a0; background: linear-gradient(90deg, rgba(0,0,0,.34) 0, rgba(255,255,255,.07) 7%, rgba(0,0,0,0) 13%), var(--c); border-radius: 1px 3px 3px 1px; box-shadow: 2px 0 0 #e9dfc8, 4px 1px 5px rgba(0,0,0,.5); outline: 1px solid rgba(233,207,134,.55); outline-offset: -5px; }
.cover:active { transform: translateY(-3px); }
.cover i { font: normal .52rem var(--serif); letter-spacing: .18em; color: #cdb07c; }
.cover b { writing-mode: vertical-rl; align-self: center; font: 700 1.02rem/1.25 var(--serif); letter-spacing: .12em; max-height: 100%; overflow: hidden; }
.cover b.m { font-size: .86rem; }
.cover b.s { font-size: .72rem; letter-spacing: .04em; }
.cover em { font: normal 700 .68rem var(--serif); color: #cdb07c; }
.cover .read { position: absolute; right: 5px; bottom: 5px; font: 700 .58rem var(--serif); color: #fff; background: #c3271c; padding: .1em .35em; transform: rotate(-8deg); }
.shelf.one { background: none; border: 0; box-shadow: none; margin: 4px auto 14px; padding: 0; width: 132px; }
.shelf.one .shelf-row { grid-template-columns: 1fr; border: 0; box-shadow: none; margin: 0; padding: 0; }

/* v1.2：首頁三處；書封用官網的圖 */
.site-row { grid-template-columns: repeat(3, 1fr); }
.cover.img { padding: 0; outline: 0; background: #2a1b12; overflow: hidden; }
.cover.img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* v1.3：書單的分類（依官網） */
.cats { display: flex; gap: 8px; overflow-x: auto; margin: 14px -4px 4px; padding: 2px 4px 8px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button { flex: none; padding: .5em .9em; font: 600 .86rem var(--serif); color: #5a4a36; background: #f3ecdf; border: 1px solid #d9cbb0; border-radius: 2px; white-space: nowrap; }
.cats button small { margin-left: .4em; font-size: .72em; opacity: .65; }
.cats button.on { color: #fff; background: #a3271c; border-color: #a3271c; }
span.cover.img { display: block; }

/* v1.5：虛空念佛堂（祈願燈） */
.lampbtn { border-color: #c9a24a !important; color: #ffe2a0 !important; }
.lamps { list-style: none; margin: 8px 0 14px; padding: 0; display: grid; gap: 10px; }
.lamp { padding: 12px 14px; background: #fbf6ea; border: 1px solid #e2d6bd; border-left: 3px solid #c9a24a; }
.lamp.hidden { opacity: .7; border-left-color: #999; }
.lamp.completed { border-left-color: #8a6a3a; }
.lamp p { margin: 0; }
.lamp-cat { display: flex; gap: .6em; font: 600 .78rem var(--serif); color: #8a6a3a; letter-spacing: .08em; }
.lamp-cat b { color: #a3271c; }
.lamp-cat span { margin-left: auto; font-weight: 400; color: #8c8172; }
.lamp-line { margin: 6px 0 !important; font: 600 1rem/1.6 var(--serif); color: #2a211a; }
.lamp-line.bad { color: #a3271c; font-weight: 400; }
.lamp-n { font-size: .86rem; color: #5a4a36; }
.lamp-n b { font: 700 1.05rem var(--serif); color: #a3271c; }
.lamp-n em { font-style: normal; color: #8c8172; }
.lamp-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px !important; }
.lamp-acts button { padding: .45em 1em; font: 600 .86rem var(--serif); color: #5a4a36; background: #fff; border: 1px solid #cdbf9f; border-radius: 2px; }
.lamp-acts button.on { color: #fff; background: #a3271c; border-color: #a3271c; }
.lamp-acts button.quiet { margin-left: auto; border-color: transparent; background: none; color: #a09482; font-weight: 400; }
.fld { display: block; margin: 14px 0; font: 600 .86rem var(--serif); color: #5a4a36; }
.fld select, .fld input:not([type=checkbox]):not([type=radio]), .login-mail input { display: block; width: 100%; margin-top: 6px; padding: .7em .8em; font: 1rem var(--serif); color: #2a211a; background: #fff; border: 1px solid #cdbf9f; border-radius: 2px; box-sizing: border-box; }
.fld.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chips input { position: absolute; opacity: 0; }
.chips i { display: block; padding: .5em .9em; font: normal 600 .9rem var(--serif); color: #5a4a36; background: #fff; border: 1px solid #cdbf9f; border-radius: 2px; }
.chips input:checked + i { color: #fff; background: #a3271c; border-color: #a3271c; }
.fld.check { display: flex; align-items: center; gap: .6em; }
.fld.check i { font-style: normal; }
.logins { display: grid; gap: 10px; margin: 16px 0; }
.btn.login { display: block; text-align: center; padding: .9em; font: 700 1rem var(--serif); color: #2a211a; background: #fff; border: 1px solid #cdbf9f; text-decoration: none; }
.btn.login.line { color: #fff; background: #06c755; border-color: #06c755; }
.btn.login.off { opacity: .45; pointer-events: none; }
.login-mail { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.login-mail input { margin: 0; }
.lead.small { font-size: .78rem; }

/* v1.7：牌位（畫法與願恩寺相同） */
@font-face { font-family: 'PLB Tablet'; src: url('fonts/plb-tablet.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
.lamp.tab { display: grid; grid-template-columns: 66px 1fr; gap: 14px; align-items: center; }
.lamp.tab canvas { width: 66px; height: auto; display: block; cursor: pointer; }
.lamp.one { background: none; border: 0; padding: 0; }
.tablet-big { display: block; width: 168px; height: auto; margin: 6px auto 16px; filter: drop-shadow(0 8px 12px rgba(60,30,10,.35)); }
.kind-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 14px; }
.kind-tabs button { padding: .7em .4em; font: 700 1rem var(--serif); border: 1px solid #cdbf9f; border-radius: 2px; background: #fff; color: #5a4a36; }
.kind-tabs small { display: block; margin-top: 3px; font-size: .68rem; font-weight: 400; opacity: .8; }
.kind-tabs [aria-selected=true].xiaozai { background: linear-gradient(#a81e19, #7c110d); color: #f6dd96; border-color: #d9a845; }
.kind-tabs [aria-selected=true].chaojian { background: linear-gradient(#f2d47c, #d8ab45); color: #2a1306; border-color: #8c2f16; }

/* v1.9：首頁四處 */
.site-row { grid-template-columns: repeat(4, 1fr); }
.site-row button { font-size: .95rem; padding-left: 0; padding-right: 0; letter-spacing: .04em; }
#hallActs { flex-wrap: wrap; }

/* v2.1：有聲書 */
.au-head { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; }
.au-head img { width: 84px; border: 1px solid #d9cbb0; box-shadow: 0 4px 10px rgba(60,30,10,.25); }
.au-head h3 { margin: 2px 0 6px; }
.au-now { margin: 0; font: 700 1rem var(--serif); color: #a3271c; }
#auSeek { width: 100%; margin: 16px 0 2px; accent-color: #a3271c; }
.au-time { margin: 0; text-align: right; font-size: .8rem; color: #8c8172; }
.au-ctl { display: grid; grid-template-columns: 1fr 1fr 1.4fr 1fr 1fr; gap: 6px; margin: 12px 0 14px; }
.au-ctl button, .au-opt button { padding: .7em .2em; font: 600 .84rem var(--serif); color: #5a4a36; background: #fff; border: 1px solid #cdbf9f; border-radius: 2px; }
.au-ctl .main { font-size: 1.05rem; color: #fff; background: #a3271c; border-color: #a3271c; }
.au-opt { display: flex; align-items: center; gap: 6px; margin: 8px 0; }
.au-opt span { flex: none; width: 4.6em; font: 600 .82rem var(--serif); color: #8a6a3a; }
.au-opt button { flex: 1; padding: .5em 0; }
.au-opt button.on { color: #fff; background: #8a6a3a; border-color: #8a6a3a; }
.au-list { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid #e2d6bd; }
.au-list li button { display: flex; gap: .8em; align-items: baseline; width: 100%; padding: .85em .2em; text-align: left; font: 600 .98rem var(--serif); color: #2a211a; background: none; border: 0; border-bottom: 1px solid #e2d6bd; }
.au-list li i { flex: none; width: 4.4em; font: normal .76rem var(--serif); color: #8c8172; }
.au-list li.on button { color: #a3271c; }
.au-list li.on i { color: #a3271c; }
#audioBar { position: fixed; left: 10px; right: 10px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 40; display: grid; grid-template-columns: 1fr auto auto; align-items: stretch; background: rgba(28,20,14,.94); border: 1px solid #c9a24a; overflow: hidden; }
#audioBar[hidden] { display: none; }
#audioBar > i { position: absolute; left: 0; bottom: 0; height: 2px; background: #e9cf86; }
#audioBar button { padding: .6em .9em; font: 600 .86rem var(--serif); color: #f3e3b6; background: none; border: 0; border-left: 1px solid rgba(201,162,74,.4); }
#auBarOpen { display: grid; gap: 1px; text-align: left; border-left: 0 !important; min-width: 0; }
#auBarOpen small { font-size: .66rem; color: #cdb07c; letter-spacing: .2em; }
#auBarOpen b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cover .aud { position: absolute; left: 4px; top: 4px; padding: .12em .4em; font: 700 .6rem var(--serif); color: #fff; background: #a3271c; }
.cover.img { position: relative; }

/* v2.3：有聲書的文字 */
.au-tabs { display: flex; gap: 6px; align-items: center; margin: 16px 0 0; border-bottom: 1px solid #e2d6bd; }
.au-tabs span { flex: 1; }
.au-tabs button { padding: .6em 1.1em; font: 700 .92rem var(--serif); color: #8c8172; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.au-tabs button.on { color: #a3271c; border-bottom-color: #a3271c; }
.au-tabs #auBig { font-weight: 600; font-size: .82rem; color: #5a4a36; border: 1px solid #cdbf9f; border-radius: 2px; padding: .35em .7em; margin-bottom: 6px; }
.au-text { max-height: 46vh; overflow-y: auto; padding: 14px 4px 20px; -webkit-overflow-scrolling: touch; }
.au-text h4 { margin: 0 0 12px; font: 700 1.1rem var(--serif); color: #a3271c; }
.au-text p { margin: 0 0 1em; font: 400 1.06rem/1.95 var(--serif); color: #2a211a; text-align: justify; }
.au-text[data-size="2"] p { font-size: 1.24rem; }
.au-text[data-size="3"] p { font-size: 1.44rem; }
.au-list { margin-top: 0 !important; border-top: 0 !important; max-height: 46vh; overflow-y: auto; }
/* 內文字很多，網站的精簡字型不含全部的字：內文改用裝置內建的字型，字形才一致 */
.au-text p { font-family: 'Noto Serif TC', 'Songti TC', 'PingFang TC', 'Microsoft JhengHei', 'PMingLiU', serif; }

/* v2.4：有聲書念到的那一段 */
.au-text { position: relative; }
.au-text p { padding: .25em .5em; margin-left: -.5em; margin-right: -.5em; border-left: 3px solid transparent; color: #7d7163; transition: color .3s, background .3s; }
.au-text p.now { color: #1f1711; background: #f6ecd6; border-left-color: #a3271c; }

/* v2.6：牌位號碼、地基主地址、念佛面板的迴向對象、本山與助念堂的統計 */
.no-card { margin: 14px 0 10px; padding: 12px 10px 10px; text-align: center; background: #fbf6ea; border: 1px solid #c9a24a; outline: 1px solid #e2d6bd; outline-offset: 3px; }
.no-card small { font: 600 .8rem var(--serif); letter-spacing: .3em; color: #8a6a3a; }
.no-card p { margin: 2px 0 0; }
.no-card b { font: 700 2.6rem/1.1 var(--serif); letter-spacing: .08em; color: #a3271c; }
.no-card i { margin-left: .3em; font: normal 600 1rem var(--serif); color: #5a4a36; }
.no-card.big b { font-size: 3.6rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet .row2 .btn { width: auto; min-height: 50px; margin-top: 0; padding: 0 .4em; font-size: .9rem; letter-spacing: .06em; text-indent: 0; text-decoration: none; }
.sheet a.btn.dark { text-decoration: none; }
.sheet .btn.line { color: #fff; background: #06c755; border: 1px solid #06c755; text-decoration: none; }
.sheet .btn.line.big { margin-top: 14px; }
.sheet .btn.all { min-height: 44px; margin: 0 0 4px; font-size: .92rem; }
.sheet .btn.on { color: #fff; background: #a3271c; border-color: #a3271c; }
.bigno { display: block; width: 100%; margin: 18px 0 4px; padding: .3em 0; text-align: center; font: 700 2.6rem var(--serif); letter-spacing: .12em; color: #a3271c; background: #fff; border: 1px solid #c9a24a; border-radius: 2px; box-sizing: border-box; }
.fld.five { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.fld.five label { font-size: .76rem; }
.fld.five input { padding: .6em .2em !important; text-align: center; }
.fld[hidden], #fAddr[hidden], #fAddrTw[hidden], #fAddrEx[hidden] { display: none; }
.nf-extra { width: 100%; display: grid; gap: 6px; padding-top: 6px; border-top: 1px solid rgba(205,176,124,.3); font: .8rem var(--serif); letter-spacing: .08em; }
.nf-extra[hidden] { display: none; }
.nf-extra p { margin: 0; color: #f2d277; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.nf-extra div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nf-extra button { min-height: 36px; border: 1px solid rgba(205,176,124,.45); font: .84rem var(--serif); letter-spacing: .14em; }
.nf-extra button.on { background: rgba(205,176,124,.9); color: #2a1c06; font-weight: 700; }
.nf-extra label { display: flex; align-items: center; justify-content: center; gap: .5em; color: #d8c8ac; }
.nf-extra label[hidden] { display: none; }
.hall-info { position: absolute; z-index: 3; top: calc(112px + var(--safe-t)); left: 16px; right: 16px; display: grid; gap: 5px; justify-items: start; pointer-events: none; }
.hall-info[hidden] { display: none; }
.hall-info p { margin: 0; padding: .25em .8em; font: .78rem var(--serif); letter-spacing: .08em; color: #eadcc2; background: rgba(16,11,8,.55); border: 1px solid rgba(205,176,124,.35); }
.hall-info p:empty { display: none; }
.hall-info em { font-style: normal; font-weight: 700; color: #f2d277; }
.zhu-line { width: min(100%, 420px); padding: 5px 8px 3px; background: rgba(16,11,8,.55); border: 1px solid rgba(205,176,124,.35); }
.zhu-line[hidden] { display: none; }
.zhu-line div { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; }
.zhu-line i { height: 10px; background: rgba(205,176,124,.16); }
.zhu-line i.now { outline: 1px solid #fff3c9; }
.zhu-line small { display: flex; justify-content: space-between; margin-top: 2px; font: .62rem var(--serif); color: #cdb07c; letter-spacing: .06em; }
.sit-chip { top: calc(176px + var(--safe-t)); }
.pray-btn { width: min(100%, 440px); min-height: 58px; display: grid; align-content: center; gap: 1px; font: 700 1.12rem var(--serif); letter-spacing: .24em; text-indent: .24em; color: #fbf3e4; background: rgba(142,29,20,.92); border: 1px solid rgba(205,176,124,.8); outline: 1px solid rgba(205,176,124,.5); outline-offset: -5px; }
.pray-btn small { font: 400 .68rem var(--serif); letter-spacing: .3em; text-indent: .3em; opacity: .85; }
.zhu-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; text-align: center; }
.zhu-stats div { padding: 10px 4px; background: #fbf6ea; border: 1px solid #e2d6bd; }
.zhu-stats b { display: block; font: 700 1.5rem var(--serif); color: #a3271c; }
.zhu-stats small { font-size: .72rem; color: #8a6a3a; letter-spacing: .06em; }
.sheet .zhu-line { width: 100%; box-sizing: border-box; background: #2a211a; }
.pin-text { margin: 10px 0; padding: 10px 12px; white-space: pre-wrap; font: .84rem/1.7 var(--serif); color: #5a4a36; background: #f3ecdf; border: 1px dashed #cdbf9f; user-select: all; }
@media (max-width: 480px) {
  .hall-acts { gap: 6px; }
  .hall-acts button { padding: 0 .75em; font-size: .86rem; letter-spacing: .08em; text-indent: .08em; }
}
.line-tip { margin: 10px 0 4px; padding: 10px 12px; font: .86rem/1.7 var(--serif); color: #2a211a; background: #eef8f0; border: 1px solid #9fd4ad; border-left: 3px solid #06c755; }
.line-tip.ok { color: #1f6b36; }
.line-link { display: inline-block; margin-top: 6px; padding: .45em 1.1em; font: 700 .9rem var(--serif); color: #fff !important; background: #06c755; border-radius: 2px; text-decoration: none; }
.line-link.off { opacity: .5; pointer-events: none; }
.line-link.dev { background: #8a6a3a; }
.lead .line-link { margin-top: 0; padding: .2em .7em; font-size: .78rem; }
#homeOnline small { display: block; margin-top: 2px; font-size: .78em; letter-spacing: .06em; opacity: .92; }
#homeOnline small b { font-size: 1.05em; }
/* 橫式畫面（電腦）：人數與念佛數字移到右上角，不被「本山道場」的牌子蓋住 */
@media (min-aspect-ratio: 1/1) {
  #home .online { position: absolute; top: calc(18px + var(--safe-t)); right: 20px; left: auto; width: auto; margin: 0; transform: none; text-align: right; z-index: 3; }
}

/* v3.1：永遠是白天——首頁、過場、彈窗、場景上下的遮罩都改成明亮的；線上名單 */
#home { background: #dfeaf0; color: var(--ink); }
.home-top h1 { color: #3a1a10; text-shadow: 0 1px 10px rgba(255,255,255,.9); }
.home-top .motto { color: #7a4a1c; text-shadow: 0 1px 8px rgba(255,255,255,.9); }
#home .online { pointer-events: auto; padding: 0; font: .88rem var(--sans); letter-spacing: .12em; color: #3a2a1c; text-shadow: 0 1px 8px rgba(255,255,255,.95); }
#home .online b { color: var(--red); }
#home .online u, .where u { text-decoration: none; }
#home .online u { border-bottom: 1px solid rgba(163,39,28,.5); }
#homeOnline small { opacity: 1; }
.home-bottom { background: linear-gradient(rgba(250,246,238,0), rgba(250,246,238,.95) 34%); }
.home-tip { color: #7a4a1c; }
.site-row { border-color: var(--gold2); background: rgba(255,252,245,.92); }
.site-row button { color: var(--ink); background: none; border-left-color: var(--line); }
.site-row button:first-child { color: #fbf3e4; background: var(--red); }
#home .btn.ghost { color: var(--ink); border-color: var(--gold2); background: rgba(255,252,245,.85); }
#hall { background: #e6dccb; }
.sheet { background: rgba(250,244,234,.45); }
.sheet-card { box-shadow: 0 6px 40px rgba(90,60,30,.28); }
.hud.top { background: linear-gradient(rgba(250,244,234,.94), rgba(250,244,234,.7) 60%, rgba(250,244,234,0)); }
.hud.top .back { color: #7a4a1c; }
.where b { color: #3a1a10; }
.where span, .where button { padding: 0; text-align: left; font-size: .8rem; color: #4a3a2a; white-space: nowrap; letter-spacing: .08em; }
.where em { font-style: normal; font-weight: 700; color: var(--red); }
.hud.bottom { background: linear-gradient(rgba(250,244,234,0), rgba(250,244,234,.95) 42%); }
.hud.bottom button { color: #3a2a1c; border-left-color: rgba(138,106,58,.3); }
.ic { background: #8e1d14; }
.hint { color: #3a2a1c !important; background: rgba(255,252,245,.9) !important; border-color: rgba(201,162,74,.7) !important; }
.hall-info p { color: #3a2a1c; background: rgba(255,252,245,.88); border-color: rgba(201,162,74,.6); }
.hall-info em { color: var(--red); }
.hall-info .zhu-line { background: rgba(255,252,245,.88); border-color: rgba(201,162,74,.6); }
.hall-info .zhu-line i { background: rgba(138,106,58,.2); }
.hall-info .zhu-line i.now { outline-color: #a3271c; }
.hall-info .zhu-line small { color: #7a4a1c; }
.hall-acts button { color: #3a1a10; background: rgba(255,252,245,.9); border-color: rgba(201,162,74,.8); }
.hall-acts button.main, .hall-acts button.lampbtn { color: #fbf3e4; background: rgba(142,29,20,.92); }
.top-btn { color: #3a1a10 !important; background: rgba(255,252,245,.9) !important; border-color: rgba(201,162,74,.8) !important; }
.on-list { list-style: none; margin: 6px 0 14px; padding: 0; }
.on-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 1em; padding: .6em .2em; border-bottom: 1px solid #e2d6bd; }
.on-list b { font: 700 1.05rem var(--serif); }
.on-list small { color: #8a6a3a; }
/* 念佛面板、佛號音量也用明亮的底色 */
.nf-panel { color: #3a2a1c; background: rgba(255,252,245,.95); border-color: rgba(201,162,74,.8); }
.nf-panel button { color: #7a2a18; }
.nf-head b, .nf-stats b, .nf-extra p { color: var(--red); }
.nf-now b { color: #a3271c; }
.nf-now small { color: #7a4a1c; }
.nf-extra label { color: #4a3a2a; }
.sound-pop { color: #3a2a1c; background: rgba(255,252,245,.95); border-color: rgba(201,162,74,.8); }
.sound-pop b { color: var(--red); }
.sit-chip { color: #3a2a1c; background: rgba(255,252,245,.92); border-color: rgba(201,162,74,.7); }
.sit-chip b { color: var(--red); }
