html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.app {
  height: 100%;
}

/* 기본은 모바일 우선: 위/아래로 크게(터치 편하게) */
.zones {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.zone {
  flex: 1;
  border: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  touch-action: manipulation; /* 클릭 지연 줄이기 */
  user-select: none;
}

.zone-left {
  background: #f2f7ff;
}

.zone-right {
  background: #fff4f6;
}

.label {
  font-size: clamp(24px, 3.2vw, 48px);
  line-height: 1.1;
  opacity: 0.9;
}


.count {
  font-size: 56px;
  letter-spacing: 1px;
}

/* PC/태블릿 넓은 화면: 좌/우로 반반 */
@media (min-width: 820px) {
  .zones {
    flex-direction: row;
  }
}

/* 상단 중앙 채팅 */
.chat {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 24px));
  max-height: 42vh;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.10);
  overflow: hidden;
  pointer-events: auto;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.chat-title {
  font-weight: 800;
}

.chat-meta {
  margin-left: auto;
  font-size: 12px;
  opacity: 0.75;
}

.chat-toggle {
  border: 0;
  background: rgba(0,0,0,0.06);
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.chat-messages {
  padding: 10px 12px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-msg {
  font-size: 13px;
  line-height: 1.25;
  padding: 8px 10px;
  background: rgba(0,0,0,0.05);
  border-radius: 10px;
  word-break: break-word;
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.chat-form input {
  flex: 1;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}

.chat-form button {
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  background: rgba(0,0,0,0.08);
}

/* 접기 모드 */
.chat.collapsed .chat-messages,
.chat.collapsed .chat-form {
  display: none;
}

/* 토스트 */
.toast {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom) + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.70);
  color: white;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.toast.show {
  opacity: 1;
}

.count {
  display: inline-block; /* transform 애니메이션 위해 필요 */
}

.count.bump {
  animation: bump 120ms ease-out;
}

@keyframes bump {
  0%   { transform: scale(1); }
  50%  { transform: scale(0.92); } /* 눌렸다가 */
  100% { transform: scale(1); }    /* 원래대로 */
}

