/* 마을 절 함께 있기 패널(#tp-live) — 읽기형 카드 안, 토큰만 사용 */
.tl-status { margin: 0 0 10px; font-weight: 700; line-height: 1.6; }
.tl-me { margin: 0 0 10px; color: var(--pm-sub-text); line-height: 1.6; }
.tl-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; }
.tl-list:empty { display: none; }
.tl-list li { padding: 8px 12px; border: 2px solid var(--pm-line); border-radius: 14px; background: var(--pm-cream); line-height: 1.5; }
.tl-actions { display: flex; flex-direction: column; gap: var(--pm-gap-item); margin: 0 0 14px; }
.tl-actions[hidden], .tl-me[hidden] { display: none; }
.tl-poses { display: flex; flex-wrap: wrap; gap: var(--pm-gap-item); }
.tl-poses .pm-btn[aria-pressed="true"] { border-color: var(--pm-ink); background: var(--pm-soft); }
.tl-note { margin: 0 0 10px; }
.tl-stop { margin: 0; }
.tl .pm-btn:focus-visible { outline: 3px solid var(--pm-focus); outline-offset: 2px; }

/* 법당 HUD 오른쪽 인원 칩(stage.css 의 .tp3d-pill 위에 얹음) */
.tl-chip { position: relative; }
.tl-chip[hidden] { display: none; }
.tl-chip b { font-weight: 700; white-space: nowrap; }


@media (max-width: 480px) { .tl-chip b { font-size: 12px; } }

/* 법당 HUD 첫 줄 왼쪽 방 알약("솔마루 법당 N ▾"). 누르면 방 고르기 창 */
.tl-roompill { flex: 0 1 auto; min-width: 0; gap: 6px; }
.tl-roompill[hidden] { display: none; }
/* 법당에 앉아 있는 동안만 보인다: 제목·입장 연출·염주 위에는 뜨지 않는다 */
#tp3d:not([data-tp3d="live"]) .tl-roompill, .tp3d-hud.is-beads .tl-roompill { visibility: hidden; }
.tl-roompill b { font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-caret { font-size: 15px; line-height: 1; }

/* 창(대화상자): 방 고르기 · 함께 있는 사람. 유리 질감 카드, 법당(.tp3d, z 9990) 위 */
html.tl-modal-on { overflow: hidden; }
.tl-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: flex-start; justify-content: center; padding: calc(64px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom)); background: rgba(10, 7, 5, .46); box-sizing: border-box; font-family: var(--pm-font-body, 'Pretendard Variable', system-ui, sans-serif); }
.tl-modal-card { box-sizing: border-box; display: flex; flex-direction: column; width: 100%; max-width: 520px; max-height: 100%; padding: 20px 20px 16px; border-radius: 28px; color: #2a221b; background: linear-gradient(160deg, rgba(246, 243, 236, .94), rgba(226, 222, 212, .92)); border: 1px solid rgba(255, 255, 255, .6); box-shadow: 0 18px 50px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .7); backdrop-filter: blur(18px) saturate(1.1); -webkit-backdrop-filter: blur(18px) saturate(1.1); overflow: hidden; }
.tl-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.tl-modal-title { margin: 0; font-family: var(--pm-font-head, 'Jua', sans-serif); font-weight: 400; font-size: 24px; line-height: 1.25; color: #2a221b; }
.tl-modal-x { box-sizing: border-box; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(42, 34, 27, .28); background: rgba(255, 255, 255, .45); color: #2a221b; font-size: 26px; line-height: 1; cursor: pointer; }
.tl-modal-lead { margin: 0 0 12px; font-size: 15px; line-height: 1.55; color: #4a3f35; }
.tl-modal-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 4px; font-size: 15px; color: #4a3f35; }
.tl-modal-cur { min-width: 0; font-weight: 700; color: #2a221b; }
.tl-modal-note { margin: 0; font-size: 13px; line-height: 1.55; color: #5b4f43; }
.tl-modal-msg { margin: 6px 0 0; min-height: 0; font-size: 14px; line-height: 1.5; color: #7a3b1e; }
.tl-modal-msg:empty { display: none; }
.tl-modal-link { box-sizing: border-box; min-height: 44px; padding: 8px 12px; border: 0; background: none; color: #3f3226; font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tl-modal-link:disabled { opacity: .5; cursor: default; }
.tl-modal-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin: 8px 0 0; padding-top: 6px; border-top: 1px solid rgba(42, 34, 27, .14); }
.tl-modal button:focus-visible { outline: 3px solid #2d5bd0; outline-offset: 2px; }

.tl-rooms { list-style: none; margin: 10px 0 0; padding: 0 2px 2px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0; flex: 1 1 auto; max-height: 52dvh; }
.tl-rooms-empty { grid-column: 1 / -1; padding: 12px; font-size: 14px; color: #5b4f43; }
.tl-room { box-sizing: border-box; display: flex; flex-direction: column; gap: 4px; width: 100%; min-height: 64px; padding: 12px 14px; text-align: left; border-radius: 20px; border: 1px solid rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .42); color: #2a221b; font: inherit; cursor: pointer; }
.tl-room:hover:not([disabled]) { background: rgba(255, 255, 255, .62); }
.tl-room-name { font-family: var(--pm-font-head, 'Jua', sans-serif); font-size: 17px; line-height: 1.25; }
.tl-room-n { font-size: 14px; color: #4a3f35; }
.tl-room.is-cur { background: rgba(224, 190, 128, .42); border-color: rgba(176, 130, 58, .7); }
.tl-room.is-full { opacity: .62; cursor: not-allowed; background: rgba(120, 112, 100, .16); }

.tl-people { list-style: none; margin: 4px 0 0; padding: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0; flex: 1 1 auto; max-height: 50dvh; }
.tl-people > li { border-bottom: 1px solid rgba(42, 34, 27, .14); }
.tl-people > li:last-child { border-bottom: 0; }
.tl-person { box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 6px 4px; border: 0; background: none; color: #2a221b; font: inherit; font-size: 16px; text-align: left; cursor: pointer; }
li.tl-person { cursor: default; border-bottom: 1px solid rgba(42, 34, 27, .14); }
.tl-person:hover { background: rgba(255, 255, 255, .3); }
.tl-person-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.tl-person-pose, .tl-person-tag { flex: 0 0 auto; font-size: 13px; color: #5b4f43; }
.is-me .tl-person-name { font-weight: 700; }
.tl-avatar { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: #2a221b; background: #e3dccd; background: color-mix(in srgb, var(--tl-tint, #8a6f5a) 38%, #f4f0e6); }
.tl-people-more { padding: 12px 4px; font-size: 14px; color: #5b4f43; }
.tl-people-foot { display: block; border-top: 1px solid rgba(42, 34, 27, .14); }

/* 합장 받은 알림 토스트: 아래쪽 버튼 줄·위쪽 알약과 겹치지 않는 가운데 */
.tl-toast { position: fixed; left: 50%; top: calc(120px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 9995; max-width: min(360px, calc(100vw - 32px)); box-sizing: border-box; padding: 10px 16px; border-radius: 16px; background: rgba(28, 20, 14, .9); color: #fff3dc; font-size: 14px; line-height: 1.5; text-align: center; pointer-events: none; }
.tl-toast[hidden] { display: none; }

.tl-roomline { margin: 0 0 10px; color: var(--pm-sub-text); line-height: 1.6; }
.tl-roomline[hidden], .tl-roombtn[hidden] { display: none; }

@media (max-width: 480px) {
  .tl-modal { padding-left: 10px; padding-right: 10px; }
  .tl-modal-card { padding: 16px 14px 12px; border-radius: 24px; }
  .tl-modal-title { font-size: 22px; }
  .tl-rooms { gap: 8px; }
  .tl-room { padding: 10px 12px; }
  .tl-room-name { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .tl-toast { transition: none; } }
