/* 입장 화면: 젤리 글자 로고 */
#join-screen { justify-content: center; padding: 20px; }

.join-form {
  width: min(88vw, 380px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.home-top { display: flex; flex-direction: column; align-items: center; margin-bottom: min(30px, 4vh); }

.jelly-title { margin: 0; display: flex; gap: min(10px, 2.4vw); }
.jl {
  --c: var(--jelly-green); --cd: #1f9d62; --glow: rgba(95, 220, 140, 0.5);
  position: relative;
  width: min(66px, 15.5vw, 17vh);
  height: min(66px, 15.5vw, 17vh);
  display: grid; place-items: center;
  font-size: min(46px, 11vw, 12vh);
  font-weight: 700;
  color: #fff;
  line-height: 1;
  border-radius: 48% 52% 46% 54% / 56% 46% 54% 44%;
  background: radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.72), var(--c) 52%, var(--cd) 118%);
  box-shadow: inset 0 -7px 14px rgba(0, 0, 0, 0.2), inset 0 3px 6px rgba(255, 255, 255, 0.35), 0 12px 24px rgba(0, 0, 0, 0.32), 0 0 30px var(--glow);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-34px) scale(0.5);
  animation: jlIn 0.8s cubic-bezier(0.3, 1.9, 0.5, 1) forwards, jlJig 3.4s ease-in-out infinite;
  animation-delay: calc(var(--d) * 120ms + 0.15s), calc(var(--d) * 340ms + 1.1s);
}
.jl::before {
  content: "";
  position: absolute;
  left: 15%; top: 11%;
  width: 36%; height: 19%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  transform: rotate(-28deg);
}
.jl::after {
  content: "";
  position: absolute;
  left: 22%; right: 22%; bottom: 8%;
  height: 11%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.j2 { --c: var(--jelly-teal); --cd: #128f8b; --glow: rgba(53, 208, 198, 0.5); border-radius: 54% 46% 52% 48% / 46% 56% 44% 54%; }
.j3 { --c: var(--jelly-blue); --cd: #2168cf; --glow: rgba(74, 168, 255, 0.5); border-radius: 46% 54% 50% 50% / 52% 48% 56% 44%; }
.j4 { --c: var(--jelly-purple); --cd: #8340d3; --glow: rgba(187, 124, 255, 0.5); border-radius: 52% 48% 56% 44% / 48% 54% 46% 52%; }
.j5 { --c: var(--jelly-pink); --cd: #ce3a80; --glow: rgba(255, 111, 181, 0.5); border-radius: 50% 50% 44% 56% / 54% 46% 54% 46%; }
@keyframes jlIn { to { opacity: 1; transform: none; } }
@keyframes jlJig {
  0%, 100% { scale: 1 1; }
  25% { scale: 1.07 0.93; }
  50% { scale: 0.95 1.06; }
  75% { scale: 1.04 0.96; }
}

/* Lound 아래 말풍선 아이콘 (Chat) */
.chat-bubble {
  width: 78px;
  height: 65px;
  margin-top: 16px;
  opacity: 0;
  transform: translateY(-20px) scale(0.5);
  transform-origin: 50% 90%;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.22)) drop-shadow(0 0 18px rgba(255, 170, 80, 0.35));
  animation: bubbleIn 0.8s cubic-bezier(0.3, 1.9, 0.5, 1) 0.9s forwards, bubbleBob 3.4s ease-in-out 1.8s infinite;
}
.chat-bubble svg { width: 100%; height: 100%; overflow: visible; }
.chat-bubble .dot { transform-box: fill-box; transform-origin: center; animation: dotPulse 1.3s ease-in-out 1.8s infinite; }
.chat-bubble .d2 { animation-delay: 1.95s; }
.chat-bubble .d3 { animation-delay: 2.1s; }
@keyframes bubbleIn { to { opacity: 1; transform: none; } }
@keyframes bubbleBob {
  0%, 100% { transform: translateY(0) rotate(-3deg) scale(1, 1); }
  25% { transform: translateY(-6px) rotate(0deg) scale(0.96, 1.06); }
  50% { transform: translateY(0) rotate(3deg) scale(1.06, 0.94); }
  75% { transform: translateY(-4px) rotate(0deg) scale(0.98, 1.03); }
}
@keyframes dotPulse {
  0%, 55%, 100% { transform: translateY(0) scale(1); }
  28% { transform: translateY(-6px) scale(1.25); }
}

.code-row { display: flex; gap: 12px; width: 100%; align-items: center; }
.code-row .field input { text-transform: uppercase; letter-spacing: 0.2em; }
.code-row .field input::placeholder { letter-spacing: 0.08em; text-transform: none; }

#join-btn { margin-top: 10px; min-width: min(250px, 64vw); height: 84px; }
#join-btn .big-btn-main { font-size: 32px; }

@media (max-height: 700px) {
  #join-btn { height: 68px; }
  .home-top { margin-bottom: 12px; }
}


/* 데모 모드 안내 */
.demo-note {
  position: absolute;
  left: 50%;
  top: calc(max(env(safe-area-inset-top), 14px) + 62px);
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 28px);
  margin: 0;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255, 213, 107, 0.14);
  border: 1px solid rgba(255, 213, 107, 0.4);
  color: #ffd56b;
  font-size: 13px;
  text-align: center;
  line-height: 1.35;
}

/* 구석 바로가기 (Lound World 게임 사이트) */
.world-link {
  position: absolute;
  top: max(env(safe-area-inset-top), 14px);
  right: 14px;
  z-index: 3;
  height: 44px;
  padding: 0 16px 0 12px;
  gap: 8px;
  font-size: 13px;
  text-decoration: none;
}
.world-link svg { width: 20px; height: 20px; }
.world-link span { letter-spacing: 0.1em; }
