:root {
  --bg: #16171a;
  --glass: rgba(22, 22, 26, 0.58);
  --glass-strong: rgba(24, 23, 27, 0.92);
  --line: rgba(255, 240, 215, 0.14);
  --ink: #f4ecdf;
  --mute: rgba(244, 236, 223, 0.62);
  --gold: #e9c46a;
  --gold2: #c9973e;
  --red: #9a2f22;
  --room: #5b8def;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --serif: 'Nanum Myeongjo', 'AppleMyungjo', serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; overscroll-behavior: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, textarea { font: inherit; user-select: text; -webkit-user-select: text; }
[hidden] { display: none !important; }
#stage, #stage canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.glass { background: var(--glass); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border: 1px solid var(--line); }

.btn-gold { background: linear-gradient(180deg, #f3d488, var(--gold) 45%, var(--gold2)); color: #2a1d0b; font-weight: 750; border-radius: 14px; padding: 12px 18px;
  box-shadow: 0 6px 22px rgba(233, 196, 106, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5); transition: transform 0.15s, filter 0.15s; }
.btn-gold:active { transform: scale(0.97); }
.btn-gold:disabled { filter: grayscale(0.6) brightness(0.8); }
.btn-gold.big { width: 100%; padding: 16px; font-size: 17px; border-radius: 16px; }
.btn-gold.sm { padding: 9px 14px; font-size: 14px; margin-top: 12px; }
.btn-line { border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px; color: var(--ink); background: rgba(255, 255, 255, 0.05); font-weight: 600; }

/* ───────── 입장 ───────── */
#entry { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: center; align-items: flex-end; overflow-y: auto;
  background: linear-gradient(180deg, rgba(10, 10, 14, 0) 0%, rgba(10, 10, 14, 0.35) 30%, rgba(12, 12, 16, 0.88) 62%, #121216 100%);
  padding: calc(24px + var(--sat)) 16px calc(20px + var(--sab)); transition: opacity 0.8s, transform 0.8s; }
#entry.gone { opacity: 0; transform: translateY(20px); pointer-events: none; }
.entry-card { width: 100%; max-width: 460px; margin-top: 22vh; }
.brand { text-align: center; margin-bottom: 26px; }
.lotus { width: 44px; height: 44px; fill: var(--gold); stroke: var(--gold); filter: drop-shadow(0 0 14px rgba(233, 196, 106, 0.55)); }
.eyebrow { margin: 10px 0 6px; color: var(--gold); font-size: 12px; letter-spacing: 0.22em; font-weight: 600; }
.brand h1 { font-family: var(--serif); font-weight: 800; font-size: 42px; line-height: 1.12; margin: 0; letter-spacing: -0.01em; text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5); }
.brand h1 span { font-size: 22px; font-weight: 700; color: rgba(244, 236, 223, 0.86); letter-spacing: 0.04em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.guide-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 14px; margin: 16px 0 0; font-size: 12.5px; }
.guide-links a { color: var(--mute); text-decoration: underline; text-underline-offset: 3px; }
.lead { color: var(--mute); font-size: 14px; line-height: 1.65; margin: 14px 0 0; }
.q { font-size: 15px; font-weight: 700; margin: 0 0 10px; }
.rooms { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 18px; }
.room { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px 10px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); transition: all 0.2s; }
.room-ico { font-size: 24px; }
.room-name { font-size: 12px; font-weight: 650; white-space: nowrap; }
.room-cnt { font-size: 11px; color: var(--mute); display: flex; align-items: center; gap: 3px; }
.room-cnt i { width: 6px; height: 6px; border-radius: 50%; background: #5fd38a; box-shadow: 0 0 6px #5fd38a; }
.room-cnt em { font-style: normal; color: var(--ink); font-weight: 650; }
.today-prayer { margin: 4px 0 14px; padding: 16px; border-radius: 16px; background: linear-gradient(160deg, rgba(233, 196, 106, 0.16), rgba(255, 255, 255, 0.03)); border: 1px solid rgba(233, 196, 106, 0.35); }
.tp-eyebrow { margin: 0 0 6px; font-size: 12px; color: var(--gold); font-weight: 700; letter-spacing: 0.06em; }
.tp-text { margin: 0 0 12px; font-family: var(--serif); font-size: 16px; line-height: 1.7; white-space: pre-line; }
.tp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.streak { font-size: 13px; color: var(--mute); }
.streak b { color: var(--gold); font-size: 15px; }
.stamps { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
.stamps span { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; font-size: 11px; color: var(--mute); border: 1px dashed rgba(255, 255, 255, 0.18); }
.stamps span.on { border: 0; background: radial-gradient(circle at 35% 30%, #f3d488, #c9973e); color: #2a1d0b; font-weight: 800; }
.bok-h { margin: 6px 0 2px; font-size: 15px; color: var(--gold); }
.bok-free { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 8px 0 4px; }
.bok-free button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 650; }
.bok-free button:active { background: rgba(233, 196, 106, 0.22); }
.bok-free i { font-style: normal; font-size: 24px; }
.bok-acc { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 8px; padding: 16px 18px; border-radius: 18px; background: linear-gradient(135deg, #ffe74a, #f5d400); color: #1d1d1b; }
.bok-acc small { display: block; font-size: 13px; opacity: 0.75; }
.bok-acc b { font-size: 21px; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.bok-acc button { flex: none; padding: 9px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.12); color: #1d1d1b; font-weight: 750; }
.bok-apps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.bok-app { display: block; text-align: center; padding: 12px; border-radius: 14px; font-weight: 750; text-decoration: none; }
.bok-app.toss { background: #0064ff; color: #fff; }
.bok-app.kb { background: #ffe300; color: #1d1d1b; }
.bok-bmc { display: block; margin: 10px 0 8px; padding: 15px; border-radius: 16px; background: #ffdd00; color: #1d1d1b; font-weight: 800; font-size: 16px; text-align: center; text-decoration: none; }
#shareText { white-space: pre-line; word-break: break-all; }
.share-main { width: 100%; margin: 4px 0 14px; }
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.share-grid a, .share-grid button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--ink); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.share-grid i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; font-style: normal; font-weight: 800; font-size: 18px; }
.plus { color: var(--gold); font-weight: 750; font-size: 0.92em; }
.room.sel { background: color-mix(in srgb, var(--c) 22%, transparent); border-color: var(--c); box-shadow: 0 0 0 1px var(--c) inset, 0 8px 24px color-mix(in srgb, var(--c) 30%, transparent); }
#sheet-rooms .rooms { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }

.form-row { margin-bottom: 14px; }
.form-row.two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12px; color: var(--mute); margin-bottom: 7px; font-weight: 600; }
.field input:not([type]), .field input[type='text'], .field textarea, #entryName, #offerName, #setName {
  width: 100%; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; color: var(--ink); outline: none; font-size: 16px; resize: none; }
.field input:focus, .field textarea:focus { border-color: var(--gold); }
.seg { display: flex; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg.wrap { flex-wrap: wrap; }
.seg button { flex: 1; padding: 9px 6px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--mute); white-space: nowrap; }
.seg button.sel { background: rgba(233, 196, 106, 0.18); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(233, 196, 106, 0.5); }
.swatches { display: flex; gap: 7px; padding: 6px 0; flex-wrap: wrap; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.15); }
.swatches button.sel { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(233, 196, 106, 0.25); }
.demo-note { text-align: center; font-size: 12px; color: var(--gold); margin: 10px 0 0; }
.fine { font-size: 11px; color: rgba(244, 236, 223, 0.42); text-align: center; line-height: 1.6; margin: 14px 0 0; }

/* ───────── HUD ───────── */
#hud, #stats, #controls, #feed, #previewBadge, #malaHud, #bowHud { opacity: 0; pointer-events: none; transition: opacity 0.8s 0.3s; }
body.playing #hud, body.playing #stats, body.playing #controls, body.playing #feed, body.playing #previewBadge, body.playing #malaHud, body.playing #bowHud { opacity: 1; pointer-events: auto; }
body.in-closeup #hud, body.in-closeup #stats, body.in-closeup #controls, body.in-closeup #feed { opacity: 0; pointer-events: none; transition-delay: 0s; }
#hud { position: fixed; top: calc(10px + var(--sat)); left: calc(10px + var(--sal)); right: calc(10px + var(--sar)); display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; z-index: 10; }
#roomBadge { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 10px; border-radius: 16px; text-align: left; border-left: 3px solid var(--room); }
#roomIcon { font-size: 22px; }
.rb-txt { white-space: nowrap; }
.rb-txt b { display: block; font-size: 14px; }
.rb-txt small { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--mute); }
.rb-txt em { font-style: normal; color: var(--ink); font-weight: 700; }
#conn { width: 7px; height: 7px; border-radius: 50%; background: #5fd38a; box-shadow: 0 0 8px #5fd38a; }
#conn.off { background: #e05a4a; box-shadow: 0 0 8px #e05a4a; }
.chev { color: var(--mute); font-size: 14px; }
.hud-right { display: flex; gap: 6px; }
.icon { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 15px; font-size: 18px; gap: 1px; }
.icon span { font-size: 9.5px; color: var(--mute); font-weight: 600; }
#btnSound.off { opacity: 0.5; }
#btnSound.off::after { content: ''; position: absolute; width: 26px; height: 2px; background: #e05a4a; transform: rotate(-40deg); }
#btnSound { position: relative; }
#stats { position: fixed; top: calc(70px + var(--sat)); left: calc(10px + var(--sal)); display: flex; gap: 6px; z-index: 9; }
.pill { border-radius: 999px; padding: 6px 12px; font-size: 12px; color: var(--mute); display: flex; align-items: center; gap: 5px; }
.pill b { color: var(--gold); font-size: 13px; }
.pill .sep { width: 1px; height: 10px; background: var(--line); margin: 0 3px; }
#meritPill.bump { animation: bump 0.5s; }
@keyframes bump { 40% { transform: scale(1.1); box-shadow: 0 0 22px rgba(233, 196, 106, 0.5); } }
#previewBadge { position: fixed; top: calc(104px + var(--sat)); left: calc(10px + var(--sal)); z-index: 9; font-size: 11px; }
#feed { position: fixed; top: calc(138px + var(--sat)); left: calc(10px + var(--sal)); z-index: 8; display: flex; flex-direction: column; gap: 5px; pointer-events: none !important; }
.feed-item { font-size: 12px; background: rgba(15, 15, 18, 0.5); padding: 6px 11px; border-radius: 10px; color: rgba(244, 236, 223, 0.88); animation: fin 0.4s; transition: opacity 0.7s, transform 0.7s; max-width: 70vw; }
.feed-item.out { opacity: 0; transform: translateX(-10px); }
@keyframes fin { from { opacity: 0; transform: translateX(-10px); } }

#malaHud { position: fixed; left: 50%; top: calc(120px + var(--sat)); transform: translateX(-50%); z-index: 9; display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; border-radius: 999px; }
#malaHud p, #bowHud p { margin: 0; font-size: 12px; color: var(--mute); }
#bowHud { position: fixed; left: 50%; top: calc(120px + var(--sat)); transform: translateX(-50%); z-index: 9; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 8px; border-radius: 999px; white-space: nowrap; }
#bowStop { padding: 7px 12px; font-size: 12px; }
#bowPick { position: absolute; right: 0; bottom: calc(100% + 8px); width: 236px; padding: 12px; border-radius: 16px; z-index: 12; }
#bowPick p { margin: 0 0 8px; font-size: 13px; font-weight: 700; }
#bowPick small { display: block; font-weight: 400; font-size: 11px; color: var(--mute); }
#bowPick div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
#bowPick button { padding: 10px 0; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.06); color: var(--ink); font-weight: 700; }
#bowPick button:active { background: rgba(233, 196, 106, 0.25); }
#bowRing, #malaRing { --p: 0; width: 46px; height: 46px; border-radius: 50%; display: grid; place-content: center; text-align: center; line-height: 1;
  background: radial-gradient(closest-side, #1b1a1e 78%, transparent 80% 100%), conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255, 255, 255, 0.1) 0); }
#malaCount, #bowDone { font-weight: 800; font-size: 15px; color: var(--gold); }
#bowRing small, #malaRing small { font-size: 9px; color: var(--mute); }

/* ───────── 조작 ───────── */
#controls { position: fixed; inset: auto 0 0 0; z-index: 10; pointer-events: none !important; }
#controls > * { pointer-events: auto; }
#joy { position: fixed; left: calc(22px + var(--sal)); bottom: calc(26px + var(--sab)); width: 124px; height: 124px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)); border: 1px solid var(--line); touch-action: none; }
#joyKnob { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 245, 225, 0.75), rgba(233, 196, 106, 0.45)); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35); transition: transform 0.06s; }
#chatWrap { position: fixed; left: calc(12px + var(--sal)); bottom: calc(166px + var(--sab)); width: min(46vw, 260px); }
#chatLog { max-height: 90px; overflow-y: auto; font-size: 12px; display: flex; flex-direction: column; gap: 3px; margin-bottom: 6px; mask-image: linear-gradient(transparent, #000 30%); -webkit-mask-image: linear-gradient(transparent, #000 30%); }
#chatLog div { background: rgba(10, 10, 12, 0.4); padding: 4px 9px; border-radius: 9px; align-self: flex-start; max-width: 100%; }
#chatLog b { color: var(--gold); font-weight: 650; margin-right: 3px; }
#chatForm { display: flex; border-radius: 14px; overflow: hidden; }
#chatInput { flex: 1; min-width: 0; background: none; border: 0; outline: none; padding: 10px 12px; color: var(--ink); font-size: 14px; }
#chatForm button { width: 38px; color: var(--gold); font-weight: 800; font-size: 16px; }

#prayBar { position: fixed; right: calc(12px + var(--sar)); bottom: calc(18px + var(--sab)); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; width: 184px; }
.pray-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; } /* 6개: 휴대폰 3칸×2줄 · 넓은 화면 한 줄 */
.act { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; border-radius: 14px; font-size: 11px; font-weight: 650; color: var(--ink); transition: transform 0.12s, background 0.2s; }
.act i { font-style: normal; font-size: 20px; line-height: 1.1; }
.act:active { transform: scale(0.94); }
.act.on { background: rgba(233, 196, 106, 0.3); border-color: var(--gold); }
.act.ctx { flex-direction: row; gap: 7px; padding: 11px 16px; font-size: 14px; border-color: rgba(233, 196, 106, 0.55); background: rgba(40, 32, 18, 0.7); animation: pop 0.25s; }
.act.ctx i { font-size: 18px; }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } }
#prayBar:not(.seated) .pray-acts .act { opacity: 0.85; }
.offer { width: 100%; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 13px; font-size: 15px; border-radius: 16px; }
.offer i { font-style: normal; }

@media (pointer: fine) and (min-width: 820px) {
  #joy { display: none; }
  #chatWrap { bottom: calc(20px + var(--sab)); width: 320px; }
  #prayBar { flex-direction: row; align-items: flex-end; width: auto; }
  .pray-acts { width: 420px; grid-template-columns: repeat(6, 1fr); }
  .offer { width: auto; padding: 15px 22px; }
}
#roomBadge small { white-space: nowrap; }
@media (max-width: 380px) { #roomIcon { display: none; } }
@media (max-width: 520px) { .rb-lbl, #roomBadge .chev { display: none; } .icon { width: 35px; height: 40px; border-radius: 12px; font-size: 16px; } .hud-right { gap: 4px !important; } .icon span { display: none; } #btnSound { display: none; } .hud-right { gap: 5px; } #roomIcon { font-size: 19px; } #roomBadge { padding: 7px 10px 7px 8px; gap: 8px; } #stats { top: calc(62px + var(--sat)); } #previewBadge { top: calc(94px + var(--sat)); } #feed { top: calc(126px + var(--sat)); } }
@media (max-width: 370px) { #prayBar { width: 168px; } .icon { width: 36px; height: 38px; } }

/* ───────── 클로즈업 ───────── */
#closeup { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 0 14px calc(18px + var(--sab)); display: flex; justify-content: center; animation: up 0.6s 0.5s both; }
@keyframes up { from { opacity: 0; transform: translateY(30px); } }
.cu-card { width: 100%; max-width: 440px; background: linear-gradient(180deg, rgba(30, 26, 22, 0.86), rgba(18, 16, 15, 0.94)); border: 1px solid rgba(233, 196, 106, 0.35); border-radius: 22px; padding: 18px 18px 16px; text-align: center; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.cu-type { margin: 0; font-size: 12px; color: var(--gold); letter-spacing: 0.12em; font-weight: 650; }
.cu-card h3 { font-family: var(--serif); font-size: 26px; margin: 6px 0 6px; }
.cu-wish { font-family: var(--serif); font-size: 16px; color: rgba(244, 236, 223, 0.92); margin: 0 0 8px; line-height: 1.55; }
.cu-meta { font-size: 12px; color: var(--mute); margin: 0 0 14px; }
.cu-btns { display: flex; gap: 8px; }
.cu-btns > * { flex: 1; }

/* ───────── 시트 ───────── */
#scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.42); z-index: 39; animation: fade 0.25s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-height: 86vh; display: flex; flex-direction: column; margin: 0 auto; max-width: 520px;
  background: var(--glass-strong); border: 1px solid var(--line); border-bottom: 0; border-radius: 24px 24px 0 0; transform: translateY(100%); transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.sheet.open { transform: none; }
.grab { width: 40px; height: 4px; border-radius: 9px; background: rgba(255, 255, 255, 0.2); margin: 8px auto 0; }
.sheet header { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px 6px; }
.sheet h3 { margin: 0; font-family: var(--serif); font-size: 20px; }
.sheet header button { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, 0.07); color: var(--mute); }
.sheet-body { overflow-y: auto; padding: 8px 18px calc(22px + var(--sab)); -webkit-overflow-scrolling: touch; }
.hint { font-size: 12.5px; color: var(--mute); line-height: 1.55; margin: 2px 0 14px; }

.prods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px; }
.prod { display: flex; flex-direction: column; align-items: center; padding: 14px 6px 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); gap: 2px; transition: all 0.2s; }
.prod-ico { font-size: 30px; margin-bottom: 4px; }
.prod-name { font-family: var(--serif); font-weight: 800; font-size: 17px; }
.prod-days { font-size: 11.5px; color: var(--mute); }
.prod-price { font-size: 14px; font-weight: 750; color: var(--gold); margin-top: 4px; }
.prod.sel { background: linear-gradient(180deg, rgba(233, 196, 106, 0.2), rgba(233, 196, 106, 0.05)); border-color: var(--gold); box-shadow: 0 8px 26px rgba(233, 196, 106, 0.16); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--mute); }
.chip.sel { color: var(--ink); background: color-mix(in srgb, var(--c) 25%, transparent); border-color: var(--c); }

.wish-write { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: 16px; padding: 10px; margin-bottom: 14px; }
.wish-write textarea { width: 100%; background: none; border: 0; outline: none; color: var(--ink); font-size: 16px; resize: none; font-family: var(--serif); }
.wish-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mute); }
.check input { accent-color: var(--gold); width: 18px; height: 18px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; align-items: flex-start; gap: 10px; padding: 12px 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.list li.empty { justify-content: center; text-align: center; color: var(--mute); font-size: 13px; padding: 30px 0; display: block; }
.dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; }
.wish p { margin: 0 0 3px; font-family: var(--serif); font-size: 15px; line-height: 1.5; }
.wish small { color: var(--mute); font-size: 11.5px; }
.wish.paid p { color: #ffe2a2; }
.rank-my { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.rank-my > div { background: rgba(233, 196, 106, 0.08); border: 1px solid rgba(233, 196, 106, 0.25); border-radius: 16px; padding: 12px 14px; }
.rank-my small { display: block; font-size: 11.5px; color: var(--mute); }
.rank-my b { font-size: 26px; color: var(--gold); font-weight: 800; }
.rank li { align-items: center; }
.rk { width: 24px; height: 24px; border-radius: 50%; display: grid; place-content: center; font-size: 12px; font-weight: 800; background: rgba(255, 255, 255, 0.07); flex: none; }
.rk1 { background: linear-gradient(#f6dc8f, #c9973e); color: #2a1d0b; }
.rk2 { background: linear-gradient(#e5e5e5, #9b9b9b); color: #222; }
.rk3 { background: linear-gradient(#e6b48a, #9a6a3e); color: #2a1d0b; }
.rank .dot { margin-top: 0; }
.rank b { flex: 1; font-weight: 650; font-size: 14px; }
.rm { font-size: 12px; color: var(--mute); }
.mine li { cursor: pointer; align-items: center; }
.mi { font-size: 26px; }
.mine li div { flex: 1; min-width: 0; }
.mine b { font-size: 14px; }
.mine p { margin: 2px 0; font-family: var(--serif); font-size: 14px; color: rgba(244, 236, 223, 0.85); }
.mine small { font-size: 11px; color: var(--mute); }
.go { font-size: 12px; color: var(--gold); white-space: nowrap; }
.slider { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.slider small { width: 44px; font-size: 12px; color: var(--mute); }
.slider input { flex: 1; accent-color: var(--gold); }
.keys p { font-size: 12.5px; color: var(--mute); line-height: 1.7; margin: 0; }

/* ───────── 모달 · 토스트 · 로딩 ───────── */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(0, 0, 0, 0.55); padding: 20px; animation: fade 0.2s; }
.modal-card { width: 100%; max-width: 360px; background: #1c1b1f; border: 1px solid var(--line); border-radius: 22px; padding: 22px; text-align: center; }
.modal-card h3 { margin: 4px 0 2px; font-family: var(--serif); }
.amt { font-size: 32px; font-weight: 800; color: var(--gold); margin: 6px 0 10px; }
#toast { position: fixed; left: 50%; top: calc(16px + var(--sat)); transform: translate(-50%, -140%); z-index: 70; background: rgba(28, 26, 24, 0.94); border: 1px solid rgba(233, 196, 106, 0.3);
  border-radius: 16px; padding: 11px 18px; text-align: center; transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2); max-width: calc(100vw - 32px); pointer-events: none; }
#toast.show { transform: translate(-50%, 0); }
#toast b { display: block; font-size: 14px; font-weight: 650; }
#toast span { display: block; font-size: 12px; color: var(--mute); margin-top: 2px; }
#loading { position: fixed; inset: 0; z-index: 80; background: #121216; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--mute); font-size: 14px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(233, 196, 106, 0.2); border-top-color: var(--gold); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 420px) {
  .brand h1 { font-size: 36px; }
  .rooms { gap: 6px; }
  .room-name { font-size: 11px; }
  .entry-card { margin-top: 16vh; }
}

.name-box { position: relative; }
.name-box input { padding-right: 64px !important; font-weight: 650; }
#nameTag { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 11px; font-weight: 700; color: var(--gold); background: rgba(233, 196, 106, 0.14); border: 1px solid rgba(233, 196, 106, 0.4); padding: 3px 8px; border-radius: 999px; pointer-events: none; transition: opacity 0.2s; }
#nameTag.mine { color: var(--mute); background: rgba(255, 255, 255, 0.06); border-color: var(--line); }
.name-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.name-actions button { padding: 11px 8px; border-radius: 12px; font-size: 13.5px; font-weight: 650; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--ink); white-space: nowrap; transition: transform 0.12s, background 0.2s; }
.name-actions button:active { transform: scale(0.96); }
#nameDice { background: rgba(233, 196, 106, 0.12); border-color: rgba(233, 196, 106, 0.4); color: var(--gold); }
.name-actions button.on { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); }
@keyframes nameIn { from { opacity: 0.2; transform: translateY(3px); } }
#entryName.roll { animation: nameIn 0.3s; }

/* 1.1.0 — 공지 · 계좌이체 · 승인 대기 · 앱 정보 */
.notice { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(233, 196, 106, 0.12); border: 1px solid rgba(233, 196, 106, 0.35); color: #f3e6c4; font-size: 13px; line-height: 1.5; white-space: pre-line; word-break: keep-all; }
.acc { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, #ffe74a, #f5d400); color: #1d1d1b; text-align: left; }
.acc small { display: block; font-size: 12.5px; opacity: 0.75; }
.acc b { font-size: 20px; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.acc .btn-line { color: #1d1d1b; border-color: rgba(0, 0, 0, 0.35); padding: 8px 12px; flex: none; }
.pend { font-style: normal; color: #f0b35a; font-weight: 700; }
.about { display: grid; gap: 6px; margin: 4px 0 10px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.about div { display: flex; justify-content: space-between; font-size: 13px; color: var(--mute); }
.about b { color: inherit; font-weight: 600; user-select: none; -webkit-user-select: none; }

/* ── 명상 · 수면 ── 명상: 도량이 비치는 어스름 + 숨 고르기 원 / 수면: 거의 까만 화면(3D 그리기 멈춤 · 화면을 누르면 조작이 잠깐 보임) */
#rest { position: fixed; inset: 0; z-index: 35; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: calc(20px + var(--sat)) 16px calc(20px + var(--sab)); background: radial-gradient(circle at 50% 42%, rgba(30, 24, 40, 0.6), rgba(8, 8, 12, 0.9)); animation: restIn 1.2s both; }
#rest.sleep { background: #050508; }
@keyframes restIn { from { opacity: 0; } }
.rest-orb { width: 170px; height: 170px; display: grid; place-items: center; }
.rest-orb span { width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, rgba(255, 240, 210, 0.9), rgba(233, 196, 106, 0.45) 45%, rgba(233, 140, 106, 0.08) 70%, transparent 72%);
  box-shadow: 0 0 60px rgba(233, 196, 106, 0.35); transform: scale(0.55); animation: breathe 10s ease-in-out infinite; }
/* 4초 들이쉬고 · 6초 내쉬기 */
@keyframes breathe { 0% { transform: scale(0.55); } 40% { transform: scale(1); } 100% { transform: scale(0.55); } }
#rest.sleep .rest-orb span { background: radial-gradient(circle at 38% 34%, #fff8e6, #e8d9b0 40%, rgba(232, 217, 176, 0.06) 66%, transparent 70%); box-shadow: 0 0 40px rgba(232, 217, 176, 0.18); transform: scale(0.42); animation: none; }
.rest-guide { font-size: 18px; font-weight: 600; color: var(--ink); letter-spacing: 0.02em; min-height: 1.4em; }
.rest-time { font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; }
.rest-panel { margin-top: 10px; padding: 14px; border-radius: 18px; display: flex; flex-direction: column; gap: 10px; width: min(100%, 340px); transition: opacity 0.8s; }
.rest-title { font-size: 13px; color: var(--mute); text-align: center; }
.rest-panel .btn-gold { padding: 11px; border-radius: 14px; font-size: 14px; }
#rest.sleep.quiet .rest-panel, #rest.sleep.quiet .rest-time { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .rest-orb span { animation: none; transform: scale(0.8); } }
/* 공양 올리기 — 우측 상단 아이콘 줄 아래 · 복전함 궤짝 그림(Meshy GLB 를 tools/glb-icon.mjs 로 찍음) · 하단 바 DOM 그대로 화면 고정 */
#btnOffer.chest { position: fixed; top: calc(66px + var(--sat)); right: calc(8px + var(--sar)); z-index: 9; width: 92px; padding: 0; background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 0; animation: chestBob 3.2s ease-in-out infinite; }
#btnOffer.chest img { width: 92px; height: 92px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 14px rgba(233, 196, 106, 0.45)); transition: transform 0.15s; }
#btnOffer.chest span { margin-top: -10px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #2a1d0b; background: linear-gradient(180deg, #f3d488, var(--gold) 45%, var(--gold2)); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35); white-space: nowrap; }
#btnOffer.chest:active img { transform: scale(0.92); }
@keyframes chestBob { 50% { transform: translateY(-3px); } }
@media (max-width: 520px) { #btnOffer.chest { top: calc(54px + var(--sat)); width: 74px; } #btnOffer.chest img { width: 74px; height: 74px; } #btnOffer.chest span { font-size: 11px; padding: 2px 8px; } }
@media (prefers-reduced-motion: reduce) { #btnOffer.chest { animation: none; } }
/* ── 손으로 돌리는 염주 ── 27알 고리(108알을 네 번 돈다) · 위쪽 표시 자리를 지나는 알이 한 알 */
#malaHud { flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 22px; width: min(92vw, 250px); }
#malaWheel { position: relative; width: 168px; height: 168px; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
#malaBeads { --r: 72px; position: absolute; inset: 0; transition: transform 0.18s ease-out; }
#malaBeads.drag { transition: none; }
#malaBeads b { position: absolute; left: 50%; top: 50%; width: 17px; height: 17px; margin: -8.5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #c98a52, #7a4220 60%, #3e1f0e); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), inset 0 -1px 2px rgba(0, 0, 0, 0.35); }
#malaBeads b.guru { width: 22px; height: 22px; margin: -11px; background: radial-gradient(circle at 35% 30%, #f3d488, #c9973e 55%, #6d4a16); }
.mala-mark { position: absolute; left: 50%; top: -3px; width: 0; height: 0; margin-left: -6px; border: 6px solid transparent; border-top: 8px solid var(--gold); z-index: 2; }
#malaWheel #malaRing { position: absolute; left: 50%; top: 50%; margin: -23px; }
.mala-ctl { display: flex; gap: 8px; width: 100%; }
.mala-ctl .seg { flex: 1; }
.mala-ctl .seg button { padding: 6px 4px; font-size: 12px; }
.mala-ctl .btn-line { padding: 6px 12px; font-size: 12px; border-radius: 10px; }
#malaTip { text-align: center; font-size: 11.5px !important; }
@media (max-width: 520px) { #malaWheel { width: 140px; height: 140px; } #malaBeads { --r: 59px; } #malaBeads b { width: 15px; height: 15px; margin: -7.5px; } }
.wish-pub { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 12.5px; }
.wish-pub small { color: var(--mute); }
.wish-pub a { color: var(--gold); white-space: nowrap; text-decoration: none; }
/* ── 화면 배치 편집 ── 세 영역을 점선·이름표로 보이고 끌어서 옮김(layout.js) */
body.layout-edit::before { content: ''; position: fixed; inset: 0; z-index: 9; background: rgba(6, 6, 10, 0.45); pointer-events: none; }
body.layout-edit #controls { opacity: 1 !important; }
body.layout-edit #joy, body.layout-edit #chatWrap, body.layout-edit #prayBar { outline: 2px dashed var(--gold); outline-offset: 6px; border-radius: 18px; cursor: grab; touch-action: none; animation: layoutPulse 1.6s ease-in-out infinite; }
body.layout-edit #joy { border-radius: 50%; }
body.layout-edit .dragging { cursor: grabbing; animation: none; outline-style: solid; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.15); }
body.layout-edit [data-layout-label]::after { content: attr(data-layout-label); position: absolute; left: 50%; top: -34px; transform: translateX(-50%); padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #2a1d0b; background: var(--gold); white-space: nowrap; pointer-events: none; z-index: 2; }
body.layout-edit #btnOffer { opacity: 0.3; }
@keyframes layoutPulse { 50% { outline-color: rgba(233, 196, 106, 0.45); } }
#layoutBar { position: fixed; left: 50%; top: calc(12px + var(--sat)); transform: translateX(-50%); z-index: 60; width: min(calc(100vw - 32px), 420px); padding: 12px 14px; border-radius: 18px; display: flex; flex-direction: column; gap: 10px; }
#layoutBar p { margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
#layoutBar small { color: var(--mute); font-size: 12px; }
#layoutBar div { display: flex; gap: 8px; }
#layoutBar button { flex: 1; padding: 10px; border-radius: 12px; font-size: 14px; }
body.layout-edit #hud { opacity: 0.25; }
/* ── 기본 배치(2026-11-25 사용자) ── 기도 버튼 6개 = 맨 아래 한 줄 · 조이스틱 = 그 위 · 채팅 = 좌상단(공덕 아래)
   채팅이 올라가며 알림(#feed)은 채팅 아래로, 염주·절 진행 표시는 조이스틱 위로 내렸다 */
#prayBar { left: calc(8px + var(--sal)); right: calc(8px + var(--sar)); bottom: calc(8px + var(--sab)); width: auto; flex-direction: column; align-items: flex-end; }
#prayBar .pray-acts { grid-template-columns: repeat(6, 1fr); width: 100%; gap: 5px; }
#prayBar .pray-acts .act { padding: 6px 0 5px; font-size: 11px; }
#prayBar .pray-acts .act i { font-size: 18px; }
#joy { left: calc(18px + var(--sal)); bottom: calc(80px + var(--sab)); width: 112px; height: 112px; }
#chatWrap { top: calc(98px + var(--sat)); bottom: auto; left: calc(10px + var(--sal)); width: min(64vw, 280px); }
body:has(#previewBadge:not([hidden])) #chatWrap { top: calc(128px + var(--sat)); }
/* 기록은 높이를 고정하고 아래부터 쌓는다 → 글이 늘어도 입력창이 움직이지 않는다 · 3D 화면 끌기를 막지 않게 터치 통과 */
#chatLog { height: 88px; max-height: none; display: flex; flex-direction: column; pointer-events: none; }
#chatLog > :first-child { margin-top: auto; }
#feed { top: calc(244px + var(--sat)); }
body:has(#previewBadge:not([hidden])) #feed { top: calc(274px + var(--sat)); }
#malaHud, #bowHud { top: auto; bottom: calc(206px + var(--sab)); }
@media (pointer: fine) and (min-width: 820px) {
  #prayBar { left: 50%; right: auto; width: 520px; margin-left: -260px; bottom: calc(14px + var(--sab)); }
  #prayBar .pray-acts { width: 100%; }
  #chatWrap { top: calc(104px + var(--sat)); bottom: auto; width: 320px; }
  #malaHud, #bowHud { bottom: calc(100px + var(--sab)); }
}
#setTrack.track { width: 100%; margin: 6px 0 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); color: var(--ink); font: inherit; font-size: 14px; }
#setTrack.track option { background: #1d1d22; color: var(--ink); }
/* ── 채팅 나눔(2026-11-25 사용자) ── 쓴 글 = 좌상단 · 입력창 = 아래(기도 버튼 줄 바로 위) · 조이스틱은 입력창 위
   #chatWrap 은 껍데기만(display: contents) → 두 요소가 따로 화면에 고정되고 배치 편집도 따로 */
#chatWrap { position: static; display: contents; translate: none !important; }
#chatLog { position: fixed; z-index: 10; top: calc(98px + var(--sat)); left: calc(10px + var(--sal)); width: min(64vw, 280px); height: 88px; margin: 0; }
body:has(#previewBadge:not([hidden])) #chatLog { top: calc(128px + var(--sat)); }
#chatForm { position: fixed; z-index: 10; left: calc(8px + var(--sal)); right: calc(8px + var(--sar)); bottom: calc(70px + var(--sab)); }
#joy { bottom: calc(122px + var(--sab)); }
#feed { top: calc(194px + var(--sat)); }
body:has(#previewBadge:not([hidden])) #feed { top: calc(224px + var(--sat)); }
#malaHud, #bowHud { bottom: calc(248px + var(--sab)); }
body.layout-edit #chatLog, body.layout-edit #chatForm { outline: 2px dashed var(--gold); outline-offset: 6px; border-radius: 14px; cursor: grab; touch-action: none; animation: layoutPulse 1.6s ease-in-out infinite; pointer-events: auto; }
body.layout-edit #chatLog { background: rgba(233, 196, 106, 0.08); }
@media (pointer: fine) and (min-width: 820px) {
  #chatLog { top: calc(104px + var(--sat)); width: 320px; }
  #chatForm { left: 50%; right: auto; width: 520px; margin-left: -260px; bottom: calc(78px + var(--sab)); }
  #malaHud, #bowHud { bottom: calc(150px + var(--sab)); }
}
.wish-note { margin: 0; font-size: 12.5px; color: var(--mute); }
/* ── 하단 4개(절·소원·명상·수면) 크게 · 합장·염주는 오른쪽 세로(2026-11-25 사용자) ── */
#prayBar .pray-acts { grid-template-columns: repeat(4, 1fr); gap: 8px; }
#prayBar .pray-acts .act { padding: 9px 0 8px; font-size: 13px; border-radius: 16px; }
#prayBar .pray-acts .act i { font-size: 26px; }
#chatForm { bottom: calc(86px + var(--sab)); }
#joy { bottom: calc(138px + var(--sab)); }
#sideActs { position: fixed; z-index: 10; right: calc(10px + var(--sar)); bottom: calc(146px + var(--sab)); display: flex; flex-direction: column; gap: 10px; }
#sideActs .act { width: 64px; height: 64px; justify-content: center; font-size: 12px; border-radius: 18px; }
#sideActs .act i { font-size: 26px; }
#malaHud, #bowHud { bottom: calc(272px + var(--sab)); }
body.layout-edit #sideActs { outline: 2px dashed var(--gold); outline-offset: 6px; border-radius: 18px; cursor: grab; touch-action: none; animation: layoutPulse 1.6s ease-in-out infinite; }
@media (pointer: fine) and (min-width: 820px) {
  #prayBar { width: 440px; margin-left: -220px; }
  #chatForm { bottom: calc(94px + var(--sab)); }
  #sideActs { bottom: calc(110px + var(--sab)); }
  #malaHud, #bowHud { bottom: calc(160px + var(--sab)); }
}
/* ── 겹침·가림 없애기(2026-11-25 사용자) ──
   절 횟수: 떠 있는 창 → 고르는 동안 하단 줄 자리를 횟수 한 줄로 바꿈 · 앉기/일어서기: 조이스틱과 합장·염주 사이 가운데
   알림: 맨 위(아이콘 가림) → 화면 위쪽 빈 하늘 · 염주 진행 창: 오른쪽 합장·염주 버튼 위로 */
#bowPick { position: static; width: 100%; padding: 8px; border-radius: 18px; }
#bowPick p { margin: 0 4px 6px; font-size: 12.5px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
#bowPick small { display: inline; }
#bowPick div { grid-template-columns: repeat(7, 1fr); gap: 5px; }
#bowPick button { padding: 12px 0; font-size: 13px; }
#bowPick button[data-x] { color: var(--mute); }
#prayBar:has(#bowPick:not([hidden])) .pray-acts { display: none; }
#prayBar .act.ctx { position: fixed; left: 0; right: 0; margin: 0 auto; width: max-content; bottom: calc(146px + var(--sab)); }
#toast { top: calc(23vh + var(--sat)); transform: translate(-50%, 12px); opacity: 0; transition: transform 0.35s ease, opacity 0.35s ease; }
#toast.show { transform: translate(-50%, 0); opacity: 1; }
#malaHud, #bowHud { bottom: calc(300px + var(--sab)); }
@media (pointer: fine) and (min-width: 820px) { #prayBar .act.ctx { bottom: calc(150px + var(--sab)); } #malaHud, #bowHud { bottom: calc(160px + var(--sab)); } }
#restTrack.track { width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); color: var(--ink); font: inherit; font-size: 14px; }
#restTrack.track option { background: #1d1d22; color: var(--ink); }
#btnOffer.chest { top: calc(62px + var(--sat)); }
@media (max-width: 520px) { #btnOffer.chest { top: calc(60px + var(--sat)); } #bowPick p { display: none; } }
.bok-lamp { width: 100%; margin: 10px 0 4px; padding: 12px; border-radius: 14px; font-size: 14px; }
.field-note { margin: 6px 0 0; font-size: 12px; line-height: 1.6; color: var(--mute); }
.field-note a, .about a { color: var(--gold, #d8b56a); }
.bot-note { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,0.05); font-size: 12.5px; line-height: 1.5; color: var(--mute); }
.cu-btns > #cuPrev, .cu-btns > #cuNext { flex: 0 0 48px; font-size: 20px; }
/* 앱(Play) 안: 계좌이체·해외 봉헌은 숨긴다(결제는 구독만) */
.in-app #bokKr, .in-app #bokAbroad, .in-app .web-pay { display: none !important; }
.sub-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 6px; }
.sub-plans[hidden] { display: none; }
/* 채팅 신고·차단 */
#chatLog > div { pointer-events: auto; }
#chatLog > div[data-id] { cursor: pointer; }
.cl-act { display: inline-flex; gap: 6px; margin-left: 6px; }
.cl-act button { font: inherit; font-size: 11px; padding: 2px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.45); color: #fff; }
#chatLog:has(.cl-act) { max-height: none; height: auto; }
/* 앱: 공양 안내(계좌) 링크 숨김 · 입장 화면은 낮은 화면에서 위가 잘리지 않게 · 구독 버튼 한 줄 */
.in-app a[href="/offering"] { display: none !important; }
#entry { align-items: safe flex-end; }
.sub-plans button { white-space: nowrap; font-size: 14px; padding-left: 6px; padding-right: 6px; }
#sheet-sub .fine a { color: var(--gold); }

/* 언어 고르기(1.32.0) — 입장 카드 오른쪽 위 · 설정 맨 위 */
.entry-card { position: relative; }
.lang-pick { position: absolute; top: -46px; right: 0; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.35); backdrop-filter: blur(8px); font-size: 13px; color: var(--ink); }
.lang-pick select { background: transparent; color: inherit; border: 0; font: inherit; outline: none; max-width: 150px; }
.lang-pick select option, #setLang option { color: #222; }
#setLang.track { width: 100%; margin: 6px 0 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); color: var(--ink); font: inherit; font-size: 14px; }
