/* lingoline — 시안 디자인 토큰 기반 스타일 */
:root {
  --bg: #07090D;
  --screen: #0E1218;
  --card: #141922;
  --card2: #11151C;
  --panel: #1A1F28;
  --line: rgba(255, 255, 255, 0.07);
  --line2: rgba(255, 255, 255, 0.09);
  --text: #EDF0F4;
  --text2: #D2D8E0;
  --sub: #8B94A3;
  --muted: #5C6572;
  --dim: #6E7887;
  --lime: #CBF34A;
  --lime-08: rgba(203, 243, 74, 0.08);
  --lime-12: rgba(203, 243, 74, 0.12);
  --lime-16: rgba(203, 243, 74, 0.16);
  --lime-24: rgba(203, 243, 74, 0.24);
  --lime-35: rgba(203, 243, 74, 0.35);
  --blue: #86A8FF;
  --blue-10: rgba(134, 168, 255, 0.10);
  --blue-14: rgba(134, 168, 255, 0.14);
  --blue-20: rgba(134, 168, 255, 0.20);
  --blue-30: rgba(134, 168, 255, 0.30);
  --red: #FF5A4E;
  --font: Pretendard, 'Hiragino Sans', 'Noto Sans JP', 'Microsoft YaHei', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --px: 26px;   /* 화면 좌우 기본 여백 */
  --px2: 22px;  /* 목록형 화면 좌우 여백 */
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } /* 모바일 브라우저의 자동 글자 확대로 인한 레이아웃 깨짐 방지 */
html, body { margin: 0; padding: 0; background: var(--bg); }
body { font-family: var(--font); color: var(--text); overscroll-behavior: none; }
button { font-family: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
input, textarea { font-family: inherit; }
.mono { font-family: var(--mono); }

@keyframes wv { from { transform: scaleY(0.18); } to { transform: scaleY(1); } }
@keyframes pls { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { 0% { opacity: 0.4; } 50% { opacity: 0.9; } 100% { opacity: 0.4; } }

/* ---------- 폰 프레임 ---------- */
#stage {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
/* 기본: 폰·태블릿 모두 화면을 꽉 채움 */
#phone {
  width: 100%;
  height: 100vh; height: 100dvh;
  background: var(--screen);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
}
/* 세로 태블릿(아이패드·갤럭시탭 세로): 본문을 중앙 정렬된 넓은 컬럼으로 */
@media (min-width: 640px) and (orientation: portrait) {
  #app { max-width: 600px; width: 100%; margin: 0 auto; }
}
/* 가로 태블릿(아이패드·갤럭시탭 가로)·PC: 왼쪽 내비 레일 + 플로팅 카드 본문 전용 레이아웃 */
@media (min-width: 900px) and (orientation: landscape) {
  #phone {
    padding: 0;
    background:
      radial-gradient(1100px 760px at 88% -12%, rgba(203, 243, 74, 0.07), transparent 60%),
      radial-gradient(900px 700px at -8% 112%, rgba(134, 168, 255, 0.06), transparent 55%),
      var(--bg);
  }
  /* 본문 화면 = 둥근 플로팅 카드 (영상 화면만 풀블리드) */
  .screen:not(:has(.vidwrap)) {
    top: 18px; right: 18px; bottom: 18px; left: 18px;
    border: 1px solid var(--line2); border-radius: 30px;
    background: var(--screen);
    box-shadow: 0 34px 70px -30px rgba(0, 0, 0, 0.8);
    padding-top: 10px;
  }
  .screen:not(:has(.vidwrap)) > *:not(.tabs) {
    width: 100%; max-width: 840px;
    margin-left: auto; margin-right: auto;
  }
  /* 탭이 있는 메인 화면은 레일 오른쪽에 배치 */
  .screen:has(.tabs) { left: 176px; animation: none; }
  /* 로고·언어 표시는 레일에 있으므로 본문 상단에서는 숨김 */
  .screen:has(.tabs) .logo { visibility: hidden; }
  .screen:has(.tabs) .langpill { display: none; }
  .tabs {
    position: fixed; left: 0; top: 0; bottom: 0; width: 176px;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 5px;
    margin: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 24px) 12px 18px calc(env(safe-area-inset-left, 0px) + 12px);
    border-top: none;
    background: transparent;
  }
  .tabs::before {
    content: 'poitalk';
    display: block;
    font-size: 20px; font-weight: 800; letter-spacing: -0.03em; color: var(--text);
    padding: 2px 11px 22px;
  }
  .tabs button {
    flex-direction: row; justify-content: flex-start; gap: 11px;
    font-size: 13.5px; font-weight: 700;
    padding: 12px 13px; border-radius: 14px;
    color: var(--sub);
    transition: background 0.15s ease, color 0.15s ease;
  }
  .tabs button:hover { background: rgba(255, 255, 255, 0.05); }
  .tabs button.on { background: var(--lime-12); color: var(--lime); }
  /* 레일 하단 고정: 내 프로필 + 언어 */
  .tabs .railfoot {
    display: flex; align-items: center; gap: 9px;
    margin-top: auto;
    padding: 9px;
    border: 1px solid var(--line); border-radius: 15px;
    background: var(--card2);
  }
  .railfoot .ravatar {
    width: 32px; height: 32px; border-radius: 11px; flex-shrink: 0;
    background: var(--lime-12); color: var(--lime);
    display: flex; align-items: center; justify-content: center;
    font-size: 11.5px; font-weight: 800;
  }
  .railfoot .rinfo { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
  .railfoot .rinfo b { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .railfoot .rinfo span { font-size: 10.5px; color: var(--sub); }
}

/* 실제 폰의 OS 상태바/홈바와 겹치지 않도록 앱 자체 장식 바는 두지 않고 safe-area만 확보 */
#phone {
  padding-top: calc(env(safe-area-inset-top, 0px) + 14px);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
}
#app { flex: 1; display: flex; flex-direction: column; overflow: hidden; position: relative; }

.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: fadeUp 0.22s ease;
}
.screen.noanim { animation: none; }
.screen.noanim ~ .sheetback, .noanim .sheetback { animation: none; }
.pad { padding: 0 var(--px); }
.scroll { overflow-y: auto; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }

/* ---------- 공용 요소 ---------- */
.logo { display: flex; align-items: center; gap: 8px; }
.logo b { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.logo i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }

.h1 { margin: 0; font-size: 25px; line-height: 1.3; font-weight: 700; letter-spacing: -0.02em; text-wrap: pretty; }
.h1.big { font-size: 27px; }
.sub { font-size: 14px; line-height: 1.6; color: var(--sub); text-wrap: pretty; }

.btn {
  height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 700;
  transition: transform 0.06s ease, opacity 0.15s ease;
  user-select: none;
}
.btn:active { transform: scale(0.985); }
.btn.primary { background: var(--lime); color: var(--bg); }
.btn.primary:disabled { opacity: 0.4; }
.btn.ghost { border: 1px solid rgba(255, 255, 255, 0.14); font-weight: 600; font-size: 14.5px; }
.btn.sm { height: 44px; font-size: 13.5px; border-radius: 14px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 11.5px; letter-spacing: 0.08em; color: var(--sub); font-weight: 600; }
.field input {
  height: 52px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line2);
  color: var(--text); font-size: 15px; padding: 0 16px; outline: none;
  width: 100%;
}
.field input:focus { border: 1.5px solid var(--lime); }
.field .hint { font-size: 11.5px; color: var(--dim); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; }

.chip {
  font-size: 12.5px; font-weight: 500; color: var(--sub);
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 999px; padding: 7px 14px;
  white-space: nowrap;
}
.chip.on { font-weight: 600; color: var(--bg); background: var(--lime); border-color: var(--lime); }

.seclabel { font-size: 10.5px; letter-spacing: 0.14em; color: var(--muted); font-weight: 600; }

.avatar {
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05); color: var(--sub);
}
.avatar.accent-blue { background: var(--blue-14); color: var(--blue); }
.avatar.accent-lime { background: var(--lime-16); color: var(--lime); }

.online-dot {
  position: absolute; bottom: -2px; right: -2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--lime); border: 2.5px solid var(--card);
}
.online-dot.off { background: var(--muted); }
.friend:not(.hl) .online-dot { border-color: var(--screen); }

/* 국기 */
.flag {
  border-radius: 50%; background: #F2F4F7; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative;
}
.flag .ko { border-radius: 50%; background: linear-gradient(150deg, #CD2E3A 0 50%, #0047A0 50% 100%); width: 50%; height: 50%; }
.flag .ja { border-radius: 50%; background: #BC002D; width: 45%; height: 45%; }
.flag.zh { background: #DE2910; }
.flag.zh .star { position: absolute; color: #FFDE00; line-height: 1; }
.flag.en { background: repeating-linear-gradient(#B22234 0 14.2%, #F2F4F7 14.2% 28.4%); }
.flag.en .canton { position: absolute; left: 0; top: 0; width: 45%; height: 40%; background: #3C3B6E; }

/* 토글 */
.toggle {
  width: 44px; height: 26px; border-radius: 13px; padding: 3px;
  background: rgba(255, 255, 255, 0.12); display: flex; flex-shrink: 0;
  transition: background 0.15s ease; cursor: pointer;
}
.toggle i { width: 20px; height: 20px; border-radius: 50%; background: var(--sub); transition: transform 0.15s ease, background 0.15s ease; }
.toggle.on { background: var(--lime); }
.toggle.on i { transform: translateX(18px); background: var(--bg); }

/* 체크박스 */
.checkbox {
  width: 19px; height: 19px; border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: transparent; cursor: pointer;
}
.checkbox.on { background: var(--lime); border-color: var(--lime); color: var(--bg); }

/* 파형 */
.wave { display: flex; align-items: center; gap: 3px; height: 26px; }
.wave i { width: 3.5px; border-radius: 2px; background: var(--lime); height: 100%; transform-origin: center; animation: wv 0.5s ease-in-out infinite alternate; }
.wave.blue i { background: var(--blue); }
.wave.idle i { animation-play-state: paused; transform: scaleY(0.18); }
.wave.mini { height: 14px; gap: 2.5px; }
.wave.mini i { width: 2.5px; }

/* 백 버튼 등 아이콘 사각버튼 */
.iconbtn {
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--card); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--text); flex-shrink: 0;
}

/* 언어 pill */
.langpill {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 10px 6px 8px;
  font-size: 12px; font-weight: 600;
}

/* ---------- 홈 대시보드 ---------- */
.qact {
  flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 15px 16px; text-align: left;
}
.qact b { font-size: 13.5px; font-weight: 600; }
.qact .qic { width: 38px; height: 38px; border-radius: 13px; display: flex; align-items: center; justify-content: center; }
.hrow { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.hrow::-webkit-scrollbar { display: none; }
.hfriend { display: flex; flex-direction: column; align-items: center; gap: 7px; flex-shrink: 0; max-width: 64px; }
.hfriend .hname { font-size: 11px; color: var(--text2); font-weight: 600; max-width: 62px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 하단 탭 ---------- */
.tabs {
  margin-top: auto; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px 34px 12px;
}
.tabs button { display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--muted); font-size: 10.5px; font-weight: 600; }
.tabs button.on { color: var(--lime); }
.railfoot { display: none; } /* 가로 태블릿·PC 레일에서만 표시 */

/* ---------- 언어 선택 (00) ---------- */
.langlist { display: flex; flex-direction: column; gap: 10px; }
.langcard {
  display: flex; align-items: center; gap: 14px; text-align: left;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 16px; width: 100%;
}
.langcard.on { background: var(--lime-08); border: 1.5px solid var(--lime); }
.langcard .names { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.langcard .names b { font-size: 16px; font-weight: 600; }
.langcard .names span { font-size: 12px; color: var(--sub); }
.langcard .check {
  width: 22px; height: 22px; border-radius: 50%; background: var(--lime);
  display: flex; align-items: center; justify-content: center; color: var(--bg);
}
.infonote { display: flex; align-items: flex-start; gap: 9px; color: var(--dim); font-size: 12px; line-height: 1.55; }
.infonote svg { margin-top: 2px; flex-shrink: 0; }

/* ---------- 로그인/가입 ---------- */
.progress { flex: 1; display: flex; gap: 5px; }
.progress i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); }
.progress i.on { background: var(--lime); }

.socialbtn {
  height: 50px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 14.5px; font-weight: 600; width: 100%;
}
.divider { display: flex; align-items: center; gap: 12px; }
.divider span { flex: 1; height: 1px; background: rgba(255, 255, 255, 0.08); }
.divider em { font-style: normal; font-size: 11.5px; color: var(--muted); }

.mylang-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 15px 16px; display: flex; align-items: center; gap: 12px;
}
.mylang-card .txt { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.mylang-card .txt b { font-size: 13.5px; font-weight: 600; }
.mylang-card .txt span { font-size: 11.5px; color: var(--dim); }
.mylang-card .chg { font-size: 12.5px; font-weight: 600; color: var(--lime); }

.consent { display: flex; align-items: flex-start; gap: 10px; }
.consent .txt { flex: 1; font-size: 12.5px; line-height: 1.5; color: var(--text2); }
.consent .txt em { font-style: normal; color: var(--dim); }

/* ---------- 권한 (03) ---------- */
.permcard {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px;
}
.permcard.dim2 { background: var(--card2); border-color: rgba(255, 255, 255, 0.05); }
.permcard .ic {
  width: 40px; height: 40px; border-radius: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.permcard .ic.lime { background: var(--lime-12); color: var(--lime); }
.permcard .ic.blue { background: var(--blue-10); color: var(--blue); }
.permcard .ic.gray { background: rgba(255, 255, 255, 0.05); color: var(--sub); }
.permcard .txt { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.permcard .txt b { font-size: 14px; font-weight: 600; }
.permcard .txt span { font-size: 12px; color: var(--dim); line-height: 1.4; }
.badge { font-size: 11px; font-weight: 600; border-radius: 999px; padding: 5px 10px; flex-shrink: 0; }
.badge.req { color: var(--bg); background: var(--lime); }
.badge.opt { color: var(--sub); border: 1px solid rgba(255, 255, 255, 0.12); }

/* ---------- 홈 (04) ---------- */
.searchbar {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 0 14px; color: var(--muted); height: 46px;
  min-width: 0; /* 글자가 커져도 옆 버튼을 밀어내지 않고 스스로 줄어들도록 */
}
.searchbar svg { flex-shrink: 0; }
.searchbar input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 13.5px; height: 100%;
  min-width: 0; width: 100%;
}
.searchbar input::placeholder { color: var(--muted); }
.addbtn {
  width: 46px; height: 46px; border-radius: 16px; flex-shrink: 0;
  background: var(--card); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--lime);
}
.chiprow { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.chiprow::-webkit-scrollbar { display: none; }

.friend {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: 18px; width: 100%; text-align: left;
}
.friend.hl { background: var(--card); border: 1px solid rgba(203, 243, 74, 0.2); }
.friend .info { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.friend .info b { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend .info span { font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.callbtn {
  width: 36px; height: 36px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.callbtn.on { background: var(--lime); color: var(--bg); }
.callbtn.off { border: 1px solid rgba(255, 255, 255, 0.12); color: var(--sub); }

.empty { text-align: center; color: var(--muted); font-size: 13px; line-height: 1.7; padding: 40px 0; }

/* ---------- 통화 연결 (05/06) ---------- */
.callwrap { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 20px var(--px) 0; overflow: hidden; }
.bigavatar { position: relative; width: 132px; height: 132px; display: flex; align-items: center; justify-content: center; }
.bigavatar .ring1 { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--blue-30); animation: pls 2s ease-in-out infinite; }
.bigavatar .ring2 { position: absolute; inset: 14px; border-radius: 50%; border: 1px solid rgba(134, 168, 255, 0.18); }
.bigavatar.lime .ring1 { border-color: var(--lime-35); animation-duration: 1.5s; }
.bigavatar.lime .ring2 { border-color: rgba(203, 243, 74, 0.18); }
.bigavatar .core {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--blue-14); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 27px; font-weight: 700; letter-spacing: -0.02em;
}
.bigavatar.lime .core { background: rgba(203, 243, 74, 0.14); color: var(--lime); }
.bigavatar .flagpos {
  position: absolute; bottom: 6px; right: 12px;
  border: 3px solid var(--screen); border-radius: 50%;
}
.pairpill {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 999px; padding: 8px 16px;
  font-size: 13px; font-weight: 600;
}
.checkitem {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px; padding: 12px 14px; width: 100%;
}
.checkitem .ok {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  background: var(--lime-16); color: var(--lime);
  display: flex; align-items: center; justify-content: center;
}
.checkitem .ok.warn { background: rgba(255, 90, 78, 0.16); color: var(--red); }
.checkitem span { font-size: 13px; color: var(--sub); }
.roundbtn {
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  transition: transform 0.06s ease;
}
.roundbtn:active { transform: scale(0.94); }
.roundbtn.red { background: var(--red); color: var(--screen); }
.roundbtn.lime { background: var(--lime); color: var(--bg); box-shadow: 0 0 0 8px var(--lime-12); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--sub); animation: pls 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: 0.2s; }
.dots i:nth-child(3) { animation-delay: 0.4s; }
.dots.lime i { background: var(--lime); }

/* ---------- 통화중 (07/08) ---------- */
.callhead {
  height: 62px; padding: 0 20px; flex-shrink: 0;
  display: flex; align-items: center; gap: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.callhead.peer-speaking { border-bottom-color: var(--blue-20); background: rgba(134, 168, 255, 0.05); }
.callhead .info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.callhead .info b { font-size: 14.5px; font-weight: 600; }
.callhead .info span { font-size: 11px; color: var(--dim); }
.callhead .info span.blue { color: var(--blue); }
.livedot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: pls 1.2s ease-in-out infinite; }

/* 단체방 참가자 칩 */
.gchips {
  display: flex; gap: 7px; padding: 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto; scrollbar-width: none; flex-shrink: 0;
}
.gchips::-webkit-scrollbar { display: none; }
.gchip {
  display: flex; align-items: center; gap: 7px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 10px 5px 5px; flex-shrink: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gchip.talk { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-20); }
.gchip.pend { opacity: 0.45; border-style: dashed; }
.gchip .gavatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.06); color: var(--sub);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.gchip .gname { font-size: 12px; font-weight: 600; max-width: 84px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chat {
  flex: 1; overflow-y: auto; scrollbar-width: none;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 14px;
}
.chat::-webkit-scrollbar { display: none; }
.msg { display: flex; gap: 9px; align-items: flex-start; animation: fadeUp 0.2s ease; }
.msg.mine { justify-content: flex-end; }
.msg .mavatar {
  width: 26px; height: 26px; border-radius: 9px; flex-shrink: 0; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9.5px; font-weight: 700;
}
.msg .mavatar.peer { background: var(--blue-14); color: var(--blue); }
.msg .mavatar.peer.live { background: var(--blue-20); border: 1.5px solid var(--blue); }
.msg .mavatar.me { background: rgba(203, 243, 74, 0.14); color: var(--lime); }
.msg .stack { max-width: min(262px, 78%); display: flex; flex-direction: column; gap: 6px; }
.msg.mine .stack { align-items: flex-end; }
.bubble {
  border-radius: 16px; padding: 11px 13px;
  display: flex; flex-direction: column; gap: 7px;
}
.bubble .orig { font-size: 12.5px; line-height: 1.5; color: #7E8AA0; }
.bubble .main { font-size: 14.5px; line-height: 1.55; font-weight: 500; text-wrap: pretty; }
.msg:not(.mine) .bubble { background: #172032; border: 1px solid var(--blue-20); border-top-left-radius: 6px; }
.msg:not(.mine) .bubble.live { border: 1.5px solid var(--blue); }
.msg.mine .bubble { background: #1A2113; border: 1px solid var(--lime-24); border-top-right-radius: 6px; }
.msg.mine .bubble .orig { color: #9AA98A; }
.msg.mine .bubble.pending { background: rgba(203, 243, 74, 0.06); border: 1px dashed rgba(203, 243, 74, 0.4); }
.bubble .interp { display: flex; align-items: center; gap: 8px; font-size: 11.5px; }
.bubble .interp.lime { color: #9AA98A; }
.bubble .interp.blue { color: var(--blue); font-weight: 600; }
.bubble .divline { height: 1px; background: rgba(134, 168, 255, 0.25); }
.msgmeta { display: flex; align-items: center; gap: 9px; padding: 0 2px; font-size: 10px; color: var(--muted); }
.msgmeta .conf { display: flex; align-items: center; gap: 4px; }
.msgmeta .conf i { width: 5px; height: 5px; border-radius: 50%; }

.callpanel {
  border-top: 1px solid var(--line); background: var(--card2);
  padding: 16px 20px 20px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.turnguide { display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 13px; font-weight: 600; min-height: 19px; }
.turnguide i { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.turnguide.mine { color: var(--lime); }
.turnguide.mine i { background: var(--lime); }
.turnguide.peer { color: var(--blue); }
.turnguide.peer i { background: var(--blue); animation: pls 1.2s ease-in-out infinite; }
.turnguide.off { color: var(--muted); }
.turnguide.off i { background: var(--muted); }
.bigwave { display: flex; justify-content: center; }
.bigwave .wave { height: 34px; gap: 4px; }
.bigwave .wave i { width: 4px; }
.controls { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.control { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.control span { font-size: 10.5px; color: var(--sub); }
.control .cbtn {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; align-items: center; justify-content: center; color: var(--text);
  transition: transform 0.06s ease;
}
.control .cbtn:active { transform: scale(0.94); }
.control .cbtn.active { background: var(--lime-16); border-color: var(--lime-35); color: var(--lime); }
.control .cbtn.danger { background: var(--red); border: none; color: var(--screen); }
.control .cbtn.warned { background: rgba(255, 90, 78, 0.14); border-color: rgba(255, 90, 78, 0.4); color: var(--red); }
.typerow { display: flex; gap: 8px; }
.typerow input {
  flex: 1; height: 46px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line2);
  color: var(--text); font-size: 14px; padding: 0 14px; outline: none;
  min-width: 0;
}
.typerow button { flex-shrink: 0; }
.typerow input:focus { border-color: var(--lime); }
.typerow button {
  height: 46px; padding: 0 18px; border-radius: 14px;
  background: var(--lime); color: var(--bg); font-size: 13.5px; font-weight: 700;
}
.banner {
  margin: 10px 18px 0; padding: 10px 14px; border-radius: 14px;
  background: rgba(255, 90, 78, 0.1); border: 1px solid rgba(255, 90, 78, 0.3);
  color: #FFB4AE; font-size: 12px; line-height: 1.5; flex-shrink: 0;
}

/* ---------- 요약 (09) ---------- */
.stat3 { display: flex; gap: 8px; }
.stat3 .tile {
  flex: 1; background: var(--card); border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px; padding: 13px; display: flex; flex-direction: column; gap: 5px;
}
.stat3 .tile b { font-family: var(--mono); font-size: 19px; font-weight: 500; }
.stat3 .tile span { font-size: 10.5px; color: var(--dim); }
.sumcard { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.sumcard .cap { display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 0.1em; font-weight: 600; }
.sumcard .cap.lime { color: var(--lime); }
.sumcard .cap.gray { color: var(--sub); }
.sumcard .cap i { width: 5px; height: 5px; border-radius: 50%; background: var(--lime); }
.sumpoint { display: flex; gap: 10px; }
.sumpoint .num { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 2px; }
.sumpoint .txt { flex: 1; font-size: 13.5px; line-height: 1.6; color: var(--text2); text-wrap: pretty; }
.actionitem { display: flex; align-items: flex-start; gap: 11px; }
.actionitem .txt { flex: 1; font-size: 13.5px; line-height: 1.55; color: var(--text2); }
.actionitem.done .txt { color: var(--muted); text-decoration: line-through; }
.pendingline { height: 14px; border-radius: 7px; background: rgba(255, 255, 255, 0.07); animation: shimmer 1.4s ease-in-out infinite; }

/* ---------- 기록 (10/11) ---------- */
.histcard {
  background: var(--card2); border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px; padding: 15px;
  display: flex; flex-direction: column; gap: 11px; width: 100%; text-align: left;
}
.histcard.today0 { background: var(--card); border-color: rgba(203, 243, 74, 0.16); }
.histcard .row { display: flex; align-items: center; gap: 11px; }
.histcard .info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.histcard .info b { font-size: 14.5px; font-weight: 600; }
.histcard .info span { font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.histcard .right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.histcard .right .dur { font-family: var(--mono); font-size: 12.5px; color: var(--lime); }
.histcard .right .dur.missed { color: var(--red); }
.histcard .right .at { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.histcard .topic { font-size: 12.5px; line-height: 1.55; color: var(--sub); text-wrap: pretty; }
.histcard .meta { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); }

.segtabs { display: flex; gap: 6px; background: var(--card2); border-radius: 12px; padding: 4px; }
.segtabs button { flex: 1; text-align: center; font-size: 12.5px; font-weight: 500; color: var(--sub); padding: 7px 0; border-radius: 9px; }
.segtabs button.on { font-weight: 600; color: var(--bg); background: var(--text); }

.transcript { display: flex; flex-direction: column; gap: 18px; }
.tmsg { display: flex; flex-direction: column; gap: 7px; }
.tmsg .head { display: flex; align-items: center; gap: 8px; }
.tmsg .who {
  width: 16px; height: 16px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 8.5px; font-weight: 700;
}
.tmsg .who.peer { background: rgba(134, 168, 255, 0.16); color: var(--blue); }
.tmsg .who.me { background: rgba(203, 243, 74, 0.16); color: var(--lime); }
.tmsg .at { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.tmsg .orig { font-size: 12.5px; color: var(--dim); line-height: 1.6; padding-left: 24px; }
.tmsg .main { font-size: 14px; line-height: 1.6; padding-left: 24px; text-wrap: pretty; }

/* ---------- 설정 (12) ---------- */
.setcard { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 6px 18px; display: flex; flex-direction: column; }
.setrow { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.setrow:last-child { border-bottom: none; }
.setrow .txt { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.setrow .txt b { font-size: 13.5px; font-weight: 600; }
.setrow .txt span { font-size: 11.5px; color: var(--dim); line-height: 1.45; }
.setrow .val { font-size: 13px; color: var(--sub); }
.setcard2 { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 18px; }
.voicebtn {
  height: 46px; border-radius: 14px; width: 100%;
  background: var(--screen); border: 1px solid var(--line2);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; font-size: 13.5px; font-weight: 600; color: var(--text);
}
.voicebtn:active { border-color: var(--lime); }
.seg3 { display: flex; gap: 6px; background: var(--screen); border-radius: 12px; padding: 4px; }
.seg3 button { flex: 1; text-align: center; font-size: 12.5px; font-weight: 500; color: var(--sub); padding: 8px 0; border-radius: 9px; }
.seg3 button.on { font-weight: 600; color: var(--bg); background: var(--lime); }
.slider { position: relative; height: 20px; display: flex; align-items: center; }
.slider input[type=range] { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; margin: 0; z-index: 2; }
.slider .track { width: 100%; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); }
.slider .fill { position: absolute; left: 0; height: 4px; border-radius: 2px; background: var(--lime); }
.slider .knob { position: absolute; width: 20px; height: 20px; border-radius: 50%; background: var(--text); transform: translateX(-10px); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }

/* ---------- 시트/모달 ---------- */
.sheetback {
  position: absolute; inset: 0; z-index: 40;
  background: rgba(0, 0, 0, 0.55);
  display: flex; flex-direction: column; justify-content: flex-end;
  animation: fadeUp 0.15s ease;
}
.sheet {
  background: var(--screen); border-top: 1px solid var(--line2);
  border-radius: 28px 28px 0 0; padding: 22px 22px 34px;
  display: flex; flex-direction: column; gap: 16px;
  max-height: 78%; overflow-y: auto;
}
.sheet h3 { margin: 0; font-size: 17px; font-weight: 700; }

/* ---------- 화상통화 ---------- */
.vidwrap { flex: 1; position: relative; background: #05070A; min-height: 0; overflow: hidden; }
#remotev { width: 100%; height: 100%; object-fit: cover; background: #0B0E13; display: block; }
.pip {
  position: absolute; top: 12px; right: 12px;
  width: 96px; height: 128px; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  background: #0B0E13;
}
.pip video { width: 100%; height: 100%; object-fit: cover; }
.mirror { transform: scaleX(-1); }
.vstatus {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--sub); font-size: 13px; text-align: center; padding: 0 34px; line-height: 1.6;
  background: rgba(7, 9, 13, 0.45);
}
.vcap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 46px 16px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  transition: opacity 0.4s ease; pointer-events: none; opacity: 0;
}
.capline { display: flex; flex-direction: column; gap: 4px; text-align: center; }
.capline .capsub { font-size: 12px; color: rgba(255, 255, 255, 0.68); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); }
.capline b { font-size: 16.5px; line-height: 1.45; color: #fff; font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85); text-wrap: pretty; }
.capline.mine b { color: var(--lime); }
.controls.five .cbtn { width: 48px; height: 48px; }
.controls.six .cbtn { width: 45px; height: 45px; }
.controls.six .control span { font-size: 9.5px; }
.callbtn.vid { background: var(--blue-14); color: var(--blue); }

/* ---------- 목소리 선택 ---------- */
.vlist { display: flex; flex-direction: column; gap: 6px; }
.vrow {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 15px; padding: 9px 12px;
}
.vrow.on { background: var(--lime-08); border: 1.5px solid var(--lime); }
.vavatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.vavatar.vf { background: rgba(242, 160, 232, 0.14); color: #F2A0E8; }
.vavatar.vm { background: var(--blue-14); color: var(--blue); }
.vname { flex: 1; font-size: 13.5px; font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vtag { font-size: 10.5px; color: var(--muted); flex-shrink: 0; }
.vcheck {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  background: var(--lime); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.vplay { color: var(--muted); flex-shrink: 0; display: flex; }

/* ---------- 토스트 ---------- */
#toast {
  position: fixed; left: 50%; bottom: 48px; transform: translateX(-50%);
  background: #1D2430; border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text); font-size: 13px; font-weight: 500;
  padding: 12px 18px; border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  z-index: 100; max-width: 340px; text-align: center; line-height: 1.5;
  animation: fadeUp 0.2s ease;
}

.link { color: var(--lime); font-weight: 700; }
.center { text-align: center; }

.bigdur { font-family: var(--mono); font-size: 36px; font-weight: 500; letter-spacing: -0.02em; line-height: 1; color: var(--lime); }

/* ---------- 좁은 화면 (갤럭시 Z플립, 소형 폰 등) ---------- */
@media (max-width: 390px) {
  :root { --px: 18px; --px2: 15px; }
  .h1 { font-size: 22px; }
  .h1.big { font-size: 24px; }
  .sub { font-size: 13px; }
  .langcard { padding: 13px 14px; gap: 11px; }
  .permcard { padding: 13px 14px; gap: 11px; }
  .control .cbtn { width: 48px; height: 48px; }
  .controls { padding: 0 2px; }
  .controls.six .cbtn { width: 41px; height: 41px; }
  .stat3 { gap: 6px; }
  .stat3 .tile { padding: 11px 10px; }
  .stat3 .tile b { font-size: 17px; }
  .bigdur { font-size: 29px; }
  .bigavatar { width: 112px; height: 112px; }
  .bigavatar .core { width: 76px; height: 76px; font-size: 23px; }
  .tabs { padding: 12px 30px 10px; }
  .chip { padding: 6px 11px; font-size: 12px; }
  .friend { padding: 11px 10px; gap: 10px; }
  .sumcard { padding: 15px 14px; }
  .setcard2 { padding: 15px 14px; }
  .setcard { padding: 4px 14px; }
  .pairpill { padding: 7px 12px; }
}
