/* ================================================================
   ProTalk Guest Web View — guest.css
   모바일 우선 반응형 · ProTalk 퍼플 브랜드 테마
   ================================================================ */

/* ── 리셋 & 기본 ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pt-purple:      #7C3AED;
  --pt-purple-dk:   #5B21B6;
  --pt-purple-lt:   #EDE9FE;
  --pt-purple-pale: #F5F3FF;
  --pt-green:       #059669;
  --pt-red:         #DC2626;
  --pt-orange:      #EA580C;
  --pt-gray-50:     #F9FAFB;
  --pt-gray-100:    #F3F4F6;
  --pt-gray-200:    #E5E7EB;
  --pt-gray-400:    #9CA3AF;
  --pt-gray-600:    #6B7280;
  --pt-gray-800:    #1F2937;
  --pt-white:       #FFFFFF;
  --pt-radius:      16px;
  --pt-radius-sm:   10px;
  --safe-top:       env(safe-area-inset-top, 0px);
  --safe-bottom:    env(safe-area-inset-bottom, 0px);
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic',
               -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  color: var(--pt-gray-800);
  background: var(--pt-purple-dk);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ================================================================
   앱 루트
   ================================================================ */
#gv-root {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ================================================================
   SCREEN 전환 시스템
   ================================================================ */
.gv-screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.gv-screen.active { display: flex; }

/* ================================================================
   ① 랜딩 화면 (#gv-landing)
   ================================================================ */
#gv-landing {
  background: linear-gradient(160deg, #4C1D95 0%, #7C3AED 45%, #5B21B6 100%);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.gv-landing-card {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 24px;
  padding: 36px 28px 32px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  animation: gvCardIn 0.4s cubic-bezier(.22,.68,0,1.2) both;
}

@keyframes gvCardIn {
  from { opacity:0; transform:translateY(28px) scale(.97); }
  to   { opacity:1; transform:translateY(0)   scale(1); }
}

/* 로고 */
.gv-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}
.gv-logo-img {
  width: 46px; height: 46px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0,0,0,0.28);
}
.gv-logo-svg {
  width: 46px; height: 46px;
  border-radius: 12px;
  flex-shrink: 0;
}
.gv-logo-name {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
}

.gv-tagline {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 28px;
  letter-spacing: 0.3px;
}

/* 방 정보 배지 */
.gv-room-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 24px;
}
.gv-room-badge i { font-size: 11px; }
.gv-room-id {
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}
.gv-host-name {
  color: rgba(255,255,255,0.7);
  font-size: 11px;
}

/* 구분선 */
.gv-divider {
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 20px 0;
}

/* 닉네임 입력 */
.gv-input-label {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  text-align: left;
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.gv-nick-input {
  width: 100%;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.22);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  color: #fff;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 18px;
}
.gv-nick-input::placeholder { color: rgba(255,255,255,0.38); }
.gv-nick-input:focus {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.18);
}

/* 모드 선택 */
.gv-mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.gv-mode-btn {
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 12px 8px;
  cursor: pointer;
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.gv-mode-btn i { font-size: 20px; }
.gv-mode-btn.selected {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.65);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.12);
}
.gv-mode-btn:hover { background: rgba(255,255,255,0.16); color: #fff; }

/* 진입 버튼 */
.gv-join-btn {
  width: 100%;
  background: #fff;
  color: var(--pt-purple-dk);
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-size: 16px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: -0.2px;
}
.gv-join-btn:hover  { background: #EDE9FE; transform: translateY(-1px); }
.gv-join-btn:active { transform: translateY(0); }
.gv-join-btn:disabled {
  background: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.4);
  cursor: not-allowed;
  transform: none;
}

/* 안내 문구 */
.gv-disclaimer {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: 14px;
  line-height: 1.6;
}

/* ================================================================
   ② 메인 세션 화면 (#gv-session)
   ================================================================ */
#gv-session {
  background: #0F0F1A;
  overflow: hidden;
}

/* 상단 헤더 */
.gv-session-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  padding-top: calc(12px + var(--safe-top));
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  z-index: 10;
}
.gv-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gv-header-logo {
  width: 28px; height: 28px;
  border-radius: 7px;
  object-fit: cover;
}
.gv-header-logo-svg { width: 28px; height: 28px; border-radius: 7px; flex-shrink:0; }
.gv-header-brand { font-size: 15px; font-weight: 800; color: #fff; }
.gv-header-room {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-left: 4px;
}

.gv-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gv-conn-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
}
.gv-conn-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--pt-gray-400);
  transition: background 0.3s;
  flex-shrink: 0;
}
.gv-conn-dot.connecting { background: #F59E0B; animation: gvPulse 1.2s infinite; }
.gv-conn-dot.connected  { background: var(--pt-green); }
.gv-conn-dot.error      { background: var(--pt-red); }
.gv-conn-label          { color: rgba(255,255,255,0.65); }

@keyframes gvPulse {
  0%,100% { opacity:1; }
  50%     { opacity:0.35; }
}

/* 탭 내비 */
.gv-tab-nav {
  display: flex;
  background: rgba(0,0,0,0.45);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.gv-tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  padding: 10px 4px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
  transition: color 0.15s;
}
.gv-tab-btn i { font-size: 16px; }
.gv-tab-btn.active { color: #fff; }
.gv-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 20%; right: 20%;
  height: 2px;
  background: var(--pt-purple);
  border-radius: 2px;
}
.gv-tab-badge {
  position: absolute;
  top: 5px; right: calc(50% - 22px);
  background: var(--pt-red);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* 탭 패널 */
.gv-tab-panel {
  display: none;
  flex: 1;
  overflow: hidden;
  flex-direction: column;
}
.gv-tab-panel.active { display: flex; }

/* ── 통화 탭 ─────────────────────────────────────────────────── */
#gv-panel-call {
  position: relative;
  background: #0F0F1A;
}

/* 원격 비디오 (전체 배경) */
#gv-remote-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  background: #1a1a2e;
}
.gv-remote-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(160deg, #1a1a2e, #16213e);
}
.gv-remote-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pt-purple), var(--pt-purple-dk));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  box-shadow: 0 0 0 8px rgba(124,58,237,0.2);
}
.gv-remote-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.gv-call-status-txt {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  animation: gvPulse 1.5s infinite;
}

/* 로컬 비디오 (PiP) */
.gv-local-pip {
  position: absolute;
  top: 12px; right: 12px;
  width: 90px; height: 120px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  cursor: move;
  z-index: 5;
  background: #111;
}
#gv-local-video {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

/* 통화 타이머 */
.gv-call-timer {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  z-index: 5;
  display: none;
}
.gv-call-timer.visible { display: block; }

/* 통화 컨트롤 바 */
.gv-call-controls {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px 16px calc(16px + var(--safe-bottom));
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
  display: flex;
  justify-content: center;
  gap: 14px;
  z-index: 6;
}
.gv-ctrl-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.15s;
  flex-shrink: 0;
}
.gv-ctrl-btn:active { transform: scale(0.92); }

.gv-ctrl-mic   { background: rgba(255,255,255,0.18); color: #fff; }
.gv-ctrl-cam   { background: rgba(255,255,255,0.18); color: #fff; }
.gv-ctrl-share { background: rgba(255,255,255,0.18); color: #fff; }
.gv-ctrl-end   { background: var(--pt-red);          color: #fff; }
.gv-ctrl-btn.muted   { background: rgba(220,38,38,0.3); color: var(--pt-red); }
.gv-ctrl-btn.cam-off { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.4); }
.gv-ctrl-btn:hover   { filter: brightness(1.15); }

/* 연결 오버레이 */
.gv-connecting-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,15,26,0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 20;
}
.gv-connecting-overlay.hidden { display: none; }
.gv-spinner {
  width: 48px; height: 48px;
  border: 3px solid rgba(124,58,237,0.3);
  border-top-color: var(--pt-purple);
  border-radius: 50%;
  animation: gvSpin 0.8s linear infinite;
}
@keyframes gvSpin { to { transform: rotate(360deg); } }
.gv-connecting-txt { font-size: 14px; color: rgba(255,255,255,0.7); font-weight: 600; }

/* ── 이미지 공유 탭 ──────────────────────────────────────────── */
#gv-panel-image {
  background: #111;
  overflow: hidden;
}

.gv-img-viewer {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: #0a0a14;
}
.gv-img-main {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  display: block;
}
.gv-img-empty {
  text-align: center;
  color: rgba(255,255,255,0.28);
  font-size: 13px;
}
.gv-img-empty i { font-size: 40px; margin-bottom: 10px; display: block; }

/* 마킹 캔버스 오버레이 */
#gv-mark-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* 이미지 인덱스 표시 */
.gv-img-index {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(0,0,0,0.6);
  color: rgba(255,255,255,0.7);
  border-radius: 10px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
}

/* 이미지 리스트 (가로 스크롤 썸네일) */
.gv-img-list-bar {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  overflow-x: auto;
  background: rgba(0,0,0,0.5);
  border-top: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
  scrollbar-width: none;
}
.gv-img-list-bar::-webkit-scrollbar { display: none; }

.gv-img-thumb {
  width: 52px; height: 52px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s;
  background: rgba(255,255,255,0.06);
}
.gv-img-thumb.active { border-color: var(--pt-purple); }

/* ── 현장 마킹 공유 배너 애니메이션 ── */
@keyframes gv-slide-in {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 하자 정보 바 ── */
.gv-defect-bar {
  animation: gv-slide-in 0.25s ease;
}

/* ── 마킹 공유 배너 ── */
.gv-img-share-banner {
  animation: gv-slide-in 0.3s cubic-bezier(.34,1.56,.64,1);
}

/* 투표 패널 */
.gv-vote-panel {
  background: rgba(0,0,0,0.5);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 10px 14px;
  flex-shrink: 0;
  display: none;
}
.gv-vote-panel.visible { display: block; }
.gv-vote-title { font-size: 12px; color: rgba(255,255,255,0.55); margin-bottom: 8px; font-weight: 600; }
.gv-vote-options { display: flex; gap: 8px; flex-wrap: wrap; }

.gv-vote-opt {
  flex: 1; min-width: 80px;
  background: rgba(255,255,255,0.09);
  border: 1.5px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  padding: 10px 8px;
  cursor: pointer;
  font-family: inherit;
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gv-vote-opt:hover  { background: rgba(124,58,237,0.25); border-color: var(--pt-purple); color: #fff; }
.gv-vote-opt.voted  { background: rgba(124,58,237,0.4); border-color: var(--pt-purple); color: #fff; }
.gv-vote-count {
  font-size: 16px;
  font-weight: 900;
  color: var(--pt-purple);
}
.gv-vote-opt.voted .gv-vote-count { color: #c4b5fd; }

/* ── 채팅 탭 ─────────────────────────────────────────────────── */
#gv-panel-chat {
  background: #0F0F1A;
}

.gv-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,58,237,0.3) transparent;
}
.gv-chat-messages::-webkit-scrollbar { width: 4px; }
.gv-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(124,58,237,0.35);
  border-radius: 4px;
}

/* 메시지 버블 */
.gv-msg-wrap {
  display: flex;
  flex-direction: column;
  max-width: 78%;
}
.gv-msg-wrap.me { align-self: flex-end; align-items: flex-end; }
.gv-msg-wrap.them { align-self: flex-start; align-items: flex-start; }

.gv-msg-nick {
  font-size: 11px;
  color: var(--pt-gray-400);
  margin-bottom: 3px;
  font-weight: 600;
}
.gv-msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
}
.gv-msg-wrap.me   .gv-msg-bubble {
  background: var(--pt-purple);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.gv-msg-wrap.them .gv-msg-bubble {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  border-bottom-left-radius: 4px;
}
.gv-msg-time {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  margin-top: 3px;
}

/* 시스템 메시지 */
.gv-msg-system {
  align-self: center;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 4px 14px;
  text-align: center;
}

/* 채팅 입력바 */
.gv-chat-input-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  padding-bottom: calc(10px + var(--safe-bottom));
  background: rgba(0,0,0,0.55);
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.gv-chat-textarea {
  flex: 1;
  background: rgba(255,255,255,0.09);
  border: 1.5px solid rgba(255,255,255,0.14);
  border-radius: 20px;
  padding: 10px 14px;
  font-size: 14px;
  color: #fff;
  font-family: inherit;
  resize: none;
  outline: none;
  max-height: 90px;
  min-height: 40px;
  line-height: 1.4;
  scrollbar-width: none;
  transition: border-color 0.15s;
}
.gv-chat-textarea::placeholder { color: rgba(255,255,255,0.3); }
.gv-chat-textarea:focus  { border-color: rgba(124,58,237,0.6); }

.gv-chat-send-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--pt-purple);
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.gv-chat-send-btn:hover  { background: #6D28D9; }
.gv-chat-send-btn:active { transform: scale(0.93); }
.gv-chat-send-btn:disabled { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.3); cursor:not-allowed; }

/* ================================================================
   모달 / 토스트
   ================================================================ */
/* 토스트 */
.gv-toast {
  position: fixed;
  bottom: calc(80px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(30,20,50,0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(124,58,237,0.4);
  color: #fff;
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  max-width: 85vw;
  text-align: center;
}
.gv-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 확인 모달 */
.gv-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.gv-modal-overlay.open { display: flex; }
.gv-modal-box {
  background: #1E1830;
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 20px;
  padding: 28px 24px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  animation: gvCardIn 0.25s ease both;
}
.gv-modal-icon { font-size: 36px; margin-bottom: 12px; }
.gv-modal-title { font-size: 17px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.gv-modal-body  { font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.6; margin-bottom: 22px; }
.gv-modal-actions { display: flex; gap: 10px; }
.gv-modal-btn {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 13px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.gv-modal-btn.cancel { background: rgba(255,255,255,0.09); color: rgba(255,255,255,0.7); }
.gv-modal-btn.confirm { background: var(--pt-red); color: #fff; }
.gv-modal-btn:hover { filter: brightness(1.1); }

/* ================================================================
   초대 링크 생성 모달 (메인 앱용)
   ================================================================ */
.ptg-invite-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  z-index: 8500;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.ptg-invite-overlay.open { display: flex; }

.ptg-invite-sheet {
  background: linear-gradient(160deg, #2D1B69 0%, #1E1830 100%);
  border: 1px solid rgba(124,58,237,0.35);
  border-radius: 24px 24px 0 0;
  padding: 8px 0 20px;
  width: 100%;
  max-width: 480px;
  animation: gvSlideUp 0.3s cubic-bezier(.22,.68,0,1.2) both;
}
@keyframes gvSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.ptg-invite-handle {
  width: 40px; height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin: 8px auto 20px;
}

.ptg-invite-title {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
  padding: 0 20px;
}
.ptg-invite-sub {
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
  padding: 0 20px;
}

.ptg-invite-url-wrap {
  margin: 0 20px 16px;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(124,58,237,0.35);
  border-radius: 14px;
  padding: 14px 16px;
}
.ptg-invite-url-label {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 5px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.ptg-invite-url-text {
  font-size: 12px;
  color: #c4b5fd;
  word-break: break-all;
  line-height: 1.5;
  font-family: 'Courier New', monospace;
}

.ptg-invite-info {
  display: flex;
  gap: 8px;
  margin: 0 20px 18px;
  flex-wrap: wrap;
}
.ptg-invite-info-chip {
  background: rgba(124,58,237,0.2);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 5px;
}

.ptg-invite-actions {
  display: flex;
  gap: 10px;
  padding: 0 20px;
}
.ptg-invite-btn {
  flex: 1;
  border: none;
  border-radius: 14px;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.15s;
}
.ptg-invite-btn.copy  { background: var(--pt-purple); color: #fff; }
.ptg-invite-btn.share { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8); }
.ptg-invite-btn.close { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.5); }
.ptg-invite-btn:hover { filter: brightness(1.12); }

/* ================================================================
   유틸리티
   ================================================================ */
.gv-hidden { display: none !important; }

/* 스크롤바 */
* { scrollbar-width: thin; scrollbar-color: rgba(124,58,237,0.25) transparent; }
*::-webkit-scrollbar { width: 4px; height: 4px; }
*::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.3); border-radius: 4px; }

/* ================================================================
   PC 반응형 (768px+)
   ================================================================ */
@media (min-width: 768px) {
  #gv-session {
    flex-direction: row;
  }

  /* PC에서 탭 → 사이드 패널 */
  .gv-tab-nav {
    flex-direction: column;
    width: 60px;
    border-bottom: none;
    border-right: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.6);
  }
  .gv-tab-btn {
    padding: 14px 4px;
    font-size: 10px;
  }
  .gv-tab-btn.active::after {
    top: 20%; bottom: 20%;
    right: 0; left: auto;
    width: 2px; height: auto;
    border-radius: 2px;
  }

  .gv-tab-content {
    flex: 1;
    display: flex;
    overflow: hidden;
  }
  .gv-tab-panel { display: flex; }
  .gv-tab-panel#gv-panel-call { flex: 1.4; }
  .gv-tab-panel#gv-panel-image { flex: 1; border-left: 1px solid rgba(255,255,255,0.06); }
  .gv-tab-panel#gv-panel-chat {
    width: 280px;
    flex: none;
    border-left: 1px solid rgba(255,255,255,0.06);
  }

  .gv-local-pip { width: 120px; height: 160px; }

  /* 세션 헤더 full-width */
  .gv-session-header {
    position: absolute;
    top: 0; left: 60px; right: 0;
    z-index: 20;
  }
}

/* ================================================================
   다크 시스템 선호 (이미 다크이지만 안전장치)
   ================================================================ */
@media (prefers-color-scheme: light) {
  #gv-landing { background: linear-gradient(160deg, #4C1D95, #7C3AED 45%, #5B21B6); }
}

/* ================================================================
   ProTalk 앱 내 초대 링크 버튼 스타일
   (index.html gdp/cdp 헤더 영역에 삽입된 버튼)
   ================================================================ */
.ptg-invite-icon-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 7px;
  background: linear-gradient(135deg, #7C3AED, #5B21B6);
  border: none;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  min-width: 40px;
  min-height: 36px;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
}
.ptg-invite-icon-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.15s;
}
.ptg-invite-icon-btn:hover::before,
.ptg-invite-icon-btn:focus-visible::before {
  background: rgba(255,255,255,0.12);
}
.ptg-invite-icon-btn:active {
  transform: scale(0.94);
  box-shadow: 0 1px 4px rgba(124, 58, 237, 0.35);
}
.ptg-invite-icon-btn i {
  font-size: 13px;
  line-height: 1;
}
.ptg-invite-btn-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
}

/* ================================================================
   ★ 영상통화 탭 — 게스트 초대 링크 배너 (guest-invite-banner)
   ================================================================ */
.guest-invite-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 12px 6px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #5B21B6 0%, #7C3AED 60%, #6D28D9 100%);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(124,58,237,0.35);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.guest-invite-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='70' cy='10' r='28' fill='rgba(255,255,255,0.06)'/%3E%3Ccircle cx='10' cy='70' r='20' fill='rgba(255,255,255,0.04)'/%3E%3C/svg%3E") right center / cover no-repeat;
  pointer-events: none;
}
.gib-icon-wrap {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.18);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 17px;
  color: #fff;
}
.gib-text {
  flex: 1;
  min-width: 0;
}
.gib-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 2px;
}
.gib-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gib-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  background: #fff;
  color: #7C3AED;
  border: none;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.gib-btn:hover,
.gib-btn:active {
  background: #EDE9FE;
  transform: scale(0.97);
}
.gib-btn i {
  font-size: 11px;
}

/* ================================================================
   ★ 협의 패널 오버레이 — 호스트 마킹 화면 협의 데이터 실시간 수신
   (guest.html 전용, display:flex/none 방식)
   ================================================================ */
#gv-collab-overlay.gv-collab-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, rgba(15,10,30,0.97) 0%, rgba(10,6,22,0.99) 100%);
  border-top: 2px solid rgba(124,58,237,0.55);
  border-radius: 20px 20px 0 0;
  z-index: 800;
  max-height: 75vh;
  overflow-y: auto;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0);
  animation: gvCollabSlideUp 0.38s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes gvCollabSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* 핸들 바 */
.gv-collab-handle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.gv-collab-live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #EF4444;
  box-shadow: 0 0 6px rgba(239,68,68,0.8);
  animation: gvCollabPulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes gvCollabPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.25); }
}
.gv-collab-handle-title {
  flex: 1;
  font-size: 13px;
  font-weight: 800;
  color: #F1F5F9;
  letter-spacing: -0.2px;
}
.gv-collab-close-btn {
  width: 32px; height: 32px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  border-radius: 9px;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.gv-collab-close-btn:active { background: rgba(255,255,255,0.12); }

/* 이미지 래퍼 */
.gv-collab-img-wrap {
  padding: 12px 14px 8px;
  flex-shrink: 0;
}
.gv-collab-img {
  width: 100%;
  max-height: 200px;
  border-radius: 12px;
  object-fit: contain;
  background: #000;
  display: block;
}
.gv-collab-img-empty {
  width: 100%;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1.5px dashed rgba(255,255,255,0.1);
  border-radius: 12px;
  color: rgba(255,255,255,0.35);
  gap: 4px;
}

/* 정보 그리드 */
.gv-collab-info-grid {
  padding: 0 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gv-collab-section {
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 9px 12px;
}
.gv-collab-section-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.gv-collab-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.gv-collab-value {
  font-size: 13px;
  font-weight: 700;
  color: #F1F5F9;
}

/* 하자 유형 태그 */
.gv-collab-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.gv-collab-tag {
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(124,58,237,0.28);
  border: 1px solid rgba(124,58,237,0.55);
  color: #C4B5FD;
  font-size: 11px;
  font-weight: 700;
}
.gv-collab-tag-empty {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  font-style: italic;
}

/* 처리 상태 배지 */
.gv-collab-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255,255,255,0.08);
  color: #E2E8F0;
}
.gv-collab-status--pending     { background: rgba(99,102,241,0.25); color: #A5B4FC; }
.gv-collab-status--in_progress { background: rgba(245,158,11,0.25); color: #FCD34D; }
.gv-collab-status--review      { background: rgba(16,185,129,0.25); color: #6EE7B7; }
.gv-collab-status--done        { background: rgba(34,197,94,0.3);   color: #86EFAC; }

/* 협의 메모 */
.gv-collab-memo-wrap {
  padding: 0 14px 10px;
}
.gv-collab-memo {
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  word-break: break-word;
}

/* 하단 버튼 */
.gv-collab-footer {
  padding: 0 14px 14px;
  flex-shrink: 0;
}
.gv-collab-save-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #7C3AED 0%, #9333EA 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(124,58,237,0.45);
  transition: all 0.15s;
}
.gv-collab-save-btn:hover  { background: linear-gradient(135deg, #6D28D9 0%, #7C3AED 100%); }
.gv-collab-save-btn:active { transform: scale(0.97); box-shadow: 0 2px 8px rgba(124,58,237,0.35); }
.gv-collab-save-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
