/* 메타버스 한의원 화면 꾸밈. 색은 로빈 색 변수만 써요. */

html,
body {
  height: 100%;
  margin: 0;
  background: var(--rk-paper);
  color: var(--rk-ink);
}

.rk-app.rk-phone {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.rk-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
}

.top-actions {
  display: flex;
  gap: 6px;
}

.top-btn {
  min-height: 44px;
  min-width: 44px;
}

.stage-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
}

.stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#scene {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* 이름표 */
.labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tag {
  position: absolute;
  left: 0;
  top: 0;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  background: var(--rk-paper);
  color: var(--rk-ink);
  border: 1px solid var(--rk-line);
  will-change: transform, opacity;
}

.tag.is-npc {
  border-color: var(--rk-accent);
  color: var(--rk-accent);
  font-weight: 600;
}

.tag.is-room {
  font-size: 14px;
  font-weight: 600;
  padding: 4px 12px;
}

.tag.is-spot {
  font-size: 12px;
  padding: 2px 9px;
  border-style: dashed;
  color: var(--rk-ink);
  background: color-mix(in srgb, var(--rk-paper) 80%, transparent);
}

.tag.is-use {
  border-style: solid;
  border-color: var(--rk-accent);
  background: var(--rk-accent);
  color: var(--rk-paper);
  font-weight: 600;
  white-space: pre;
}

.tag.is-me {
  background: var(--rk-ink);
  color: var(--rk-paper);
  border-color: var(--rk-ink);
}

.bubble {
  position: absolute;
  left: 0;
  top: 0;
  padding: 6px 12px;
  border-radius: 14px;
  background: var(--rk-paper);
  color: var(--rk-ink);
  border: 1.5px solid var(--rk-ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}

.zzz {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--rk-accent);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}

.zzz span {
  display: inline-block;
  animation: zzz-float 2.4s ease-in-out infinite;
  text-shadow: 0 0 3px var(--rk-paper);
}

.zzz span:nth-child(1) { font-size: 14px; animation-delay: 0s; }
.zzz span:nth-child(2) { font-size: 18px; animation-delay: 0.4s; margin-left: 2px; }
.zzz span:nth-child(3) { font-size: 24px; animation-delay: 0.8s; margin-left: 2px; }

@keyframes zzz-float {
  0% { transform: translateY(6px); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(-14px); opacity: 0; }
}

/* 걷기 손잡이 */
.joy {
  position: absolute;
  left: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 124px;
  height: 124px;
  border-radius: 50%;
  border: 2px solid var(--rk-line);
  background: color-mix(in srgb, var(--rk-paper) 55%, transparent);
  touch-action: none;
}

.joy-look {
  left: auto;
  right: 20px;
}

.joy-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: var(--rk-accent);
  opacity: 0.85;
}

.hint {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 12px;
  margin: 0;
  padding: 10px 14px;
  font-size: 14px;
  text-align: center;
  transition: opacity 0.8s ease;
}

.hint.is-gone {
  opacity: 0;
  pointer-events: none;
}

.nogl {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
}

.nogl[hidden] {
  display: none;
}

/* 진료실 의사 자리: 진료명단 */
.queue-panel {
  position: absolute;
  right: 12px;
  top: 64px;
  width: min(260px, calc(100% - 24px));
  padding: 12px;
  z-index: 3;
}

.queue-title {
  margin: 0 0 8px;
  font-size: 16px;
}

.queue-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  max-height: 40vh;
  overflow: auto;
}

.queue-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 2px;
  border-bottom: 1px solid var(--rk-line);
  font-size: 14px;
}

.queue-st {
  font-weight: 600;
  white-space: nowrap;
}

.queue-st.is-wait { color: var(--rk-accent); }
.queue-st.is-away { opacity: 0.6; }
.queue-st.is-called { text-decoration: underline; }

.queue-list .queue-empty {
  justify-content: center;
  opacity: 0.7;
}

.queue-call {
  width: 100%;
  min-height: 44px;
  font-weight: 600;
}

/* 요가 선생 동작 고르기, 참석자 따라하기 */
.pose-ring,
.follow-btn {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.pose-ring {
  width: 0;
  height: 0;
}

.pose-ring.is-on .pose-btn,
.follow-btn.is-on {
  pointer-events: auto;
}

.pose-btn {
  position: absolute;
  min-height: 44px;
  padding: 6px 12px;
  white-space: nowrap;
  font-size: 13px;
  transform: translate(-50%, -50%);
}

.follow-btn {
  min-height: 44px;
  font-weight: 600;
}

/* 알림판 포스터 크게 보기 */
.poster-view {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: color-mix(in srgb, var(--rk-ink) 45%, transparent);
}

.poster-view[hidden] {
  display: none;
}

.poster-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  max-width: 100%;
  max-height: 100%;
}

.poster-canvas {
  display: block;
  width: min(420px, calc(100vw - 56px));
  max-height: calc(100vh - 200px);
  object-fit: contain;
  border-radius: 8px;
}

.poster-scroll {
  overflow-y: auto;
  max-height: calc(100vh - 200px);
}

.poster-view.is-long .poster-canvas {
  max-height: none;
  height: auto;
}

.poster-close {
  min-height: 44px;
  font-weight: 600;
}
