* {
  margin: 0; padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-drag: none;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #1a1a2e;
  font-family: 'Segoe UI', sans-serif;
  color: #e0e0e0;
}

#launcherScreen {
  position: fixed; inset: 0;
  background: radial-gradient(circle at 50% 40%, #1a1a2e 0%, #05050a 100%);
  display: flex; align-items: center; justify-content: center;
}

#launcherLangWrap {
  position: absolute; top: 20px; right: 24px;
  z-index: 9000;   /* 회원가입/내용보기 오버레이(8000) 위 — 팝업 중에도 언어 변경 가능 */
}

/* ── 로그인(C1) — 좌상단, 런처 톤과 동일한 반투명 pill ── */
#launcherAuthWrap {
  position: absolute; top: 20px; left: 24px;
  z-index: 60;
}
.launcher-auth-btn {
  display: flex; align-items: center; gap: 8px;
  width: 170px;   /* 로그인 버튼 너비 통일(언어별 라벨 길이 무관) */
  box-sizing: border-box;
  padding: 8px 14px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(160,196,255,0.3);
  border-radius: 20px; color: #a0c4ff; font-size: 13px; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.launcher-auth-btn:hover { border-color: #e94560; color: #fff; }
#launcherAuthWrap { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.launcher-auth-s {
  width: 18px; height: 18px; line-height: 18px; text-align: center;
  border-radius: 50%; background: #e94560; color: #fff;
  font-weight: 800; font-size: 12px; flex: 0 0 auto;
}

/* ── 회원 가입/내용보기 팝업 — 언어 버튼(#launcherLangWrap)은 오버레이 위(z 9000)라 항상 사용 가능 ── */
.launcher-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.launcher-modal {
  background: #0a1e3a; border: 1px solid #335580; border-radius: 10px;
  width: 480px; max-width: 92vw; max-height: 86vh; overflow: auto;
  padding: 20px; display: flex; flex-direction: column; gap: 12px;
  color: #cce0ff; box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.launcher-modal-doc { width: 660px; height: 72vh; }
.launcher-modal-title { font-size: 15px; font-weight: 800; color: #a0c4ff; }
.signup-consent-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(15,52,96,0.4); border: 1px solid #1a3a5c; border-radius: 6px;
  padding: 9px 12px; font-size: 13px;
  cursor: pointer;   /* 행 어디를 눌러도 체크 토글(2026-07-29) */
}
.signup-consent-row label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.signup-view-btn {
  flex: none; padding: 4px 12px; border-radius: 12px; font-size: 11px; cursor: pointer;
  background: transparent; border: 1px solid #335580; color: #a0c4ff;
  transition: border-color 0.15s, color 0.15s;
}
.signup-view-btn:hover { border-color: #e94560; color: #e94560; }
.signup-login-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.signup-login-row .launcher-auth-btn:disabled { opacity: 0.35; cursor: default; }
.signup-login-row .launcher-auth-btn:disabled:hover { border-color: rgba(160,196,255,0.3); color: #a0c4ff; }
/* 로그인 창 소셜 버튼 — 에디터 로그인 창과 동일(브랜드색 배경 + 공식 로고, 세로 70% 중앙) */
.login-social-row { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.login-social-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 70%; margin: 0 auto; padding: 11px 14px; box-sizing: border-box;
  border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer;
  border: 1px solid rgba(0,0,0,0.15);
}
.login-social-btn img { width: 18px; height: 18px; object-fit: contain; flex: none; }
.login-social-google { background: #ffffff; color: #3c4043; }
.login-social-line { background: #06C755; color: #ffffff; }
.login-social-naver { background: #03C75A; color: #ffffff; }
.login-social-kakao { background: #FEE500; color: #391B1B; }
.login-social-apple { background: #000000; color: #ffffff; }
.launcher-modal-btns { display: flex; justify-content: flex-end; margin-top: 4px; }
.launcher-modal-close {
  width: 100px; padding: 6px 0; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer;
  background: transparent; border: 1px solid #4a90d9; color: #a0c4ff;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.launcher-modal-close:hover { border-color: #a0c4ff; color: #fff; background: rgba(74,144,217,0.2); }
.legal-body {
  flex: 1; min-height: 0; overflow: auto; word-break: break-word;
  font-size: 12px; line-height: 1.7; color: #cce0ff;
  background: rgba(15,52,96,0.3); border: 1px solid #1a3a5c; border-radius: 6px; padding: 5px;
}
/* 약관 HTML 문서 렌더 — 제목·표·목록·인용 서식 */
.legal-body > :first-child { margin-top: 0; }
.legal-body > :last-child { margin-bottom: 0; }
.legal-body h1 { font-size: 17px; color: #cce0ff; margin: 0 0 8px; }
.legal-body h2 { font-size: 15px; color: #a0c4ff; margin: 14px 0 6px; }
.legal-body h3 { font-size: 13px; color: #a0c4ff; margin: 10px 0 4px; }
.legal-body p { margin: 6px 0; }
.legal-body ul, .legal-body ol { margin: 6px 0; padding-left: 20px; }
.legal-body li { margin: 2px 0; }
.legal-body blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid #335580; color: #a0c4ff; }
.legal-body a { color: #a0c4ff; }
.legal-body table { border-collapse: collapse; width: 100%; margin: 8px 0; }
.legal-body th, .legal-body td { border: 1px solid #335580; padding: 5px 8px; text-align: left; vertical-align: top; }
.legal-body th { background: rgba(160,196,255,0.12); color: #a0c4ff; }
.legal-body hr { border: none; border-top: 1px solid #335580; margin: 10px 0; }
/* 로그인 창 — 에디터 로그인 창과 동일 폭(380px) */
#loginOverlay .launcher-modal { width: 380px; }
.legal-body::-webkit-scrollbar { width: 4px; }
.legal-body::-webkit-scrollbar-track { background: transparent; }
.legal-body::-webkit-scrollbar-thumb { background: #335580; border-radius: 2px; }
.legal-body::-webkit-scrollbar-thumb:hover { background: #e94560; }
.launcher-auth-g {
  width: 18px; height: 18px; line-height: 18px; text-align: center;
  border-radius: 50%; background: #fff; color: #4285f4;
  font-weight: 800; font-size: 12px; flex: 0 0 auto;
}
.launcher-auth-l {
  width: 18px; height: 18px; line-height: 18px; text-align: center;
  border-radius: 50%; background: #06C755; color: #fff;
  font-weight: 800; font-size: 12px; flex: 0 0 auto;
}
.launcher-auth-n {
  width: 18px; height: 18px; line-height: 18px; text-align: center;
  border-radius: 50%; background: #03C75A; color: #fff;
  font-weight: 800; font-size: 12px; flex: 0 0 auto;
}
.launcher-auth-k {
  width: 18px; height: 18px; line-height: 18px; text-align: center;
  border-radius: 50%; background: #FEE500; color: #191919;
  font-weight: 800; font-size: 12px; flex: 0 0 auto;
}
.launcher-auth-a {
  width: 18px; height: 18px; border-radius: 50%; background: #000;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.launcher-auth-a img { width: 11px; height: 11px; }
.launcher-profile {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(160,196,255,0.3);
  border-radius: 20px;
}
.launcher-avatar { width: 22px; height: 22px; border-radius: 50%; }
.launcher-user-name {
  color: #a0c4ff; font-size: 12px; font-weight: 600;
  max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.launcher-logout-btn {
  padding: 3px 10px; background: transparent;
  border: 1px solid rgba(160,196,255,0.3); border-radius: 12px;
  color: #607b96; font-size: 11px; cursor: pointer;
}
.launcher-logout-btn:hover { border-color: #e94560; color: #e94560; }
.launcher-lang-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(160,196,255,0.3);
  border-radius: 20px; color: #a0c4ff; font-size: 13px; cursor: pointer;
  backdrop-filter: blur(4px);
}
.launcher-lang-btn:hover { background: rgba(255,255,255,0.12); }
.launcher-lang-btn .vp-icon { width: 16px; height: 16px; }
#launcherLangDropdown {
  position: absolute; top: 40px; right: 0;
  background: rgba(10,18,35,0.97); border: 1px solid #335580;
  border-radius: 8px; overflow: hidden; min-width: 110px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}
.lang-option {
  display: flex; align-items: center; width: 100%;
  padding: 9px 14px; font-size: 13px; text-align: left;
  background: transparent; border: none; color: #c8daf0; cursor: pointer;
}
.lang-option:hover { background: rgba(233,69,96,0.2); color: #fff; }
.lang-option-active { color: #e94560 !important; font-weight: 700; background: rgba(233,69,96,0.1) !important; }
.lang-option + .lang-option { border-top: 1px solid #1a3a5c; }
.lang-option-flag { width: 18px; height: 18px; object-fit: cover; border-radius: 2px; margin-right: 8px; flex-shrink: 0; }
.launcher-lang-flag-wrap { display: inline-flex; align-items: center; }
.launcher-lang-flag-img { width: 18px; height: 18px; object-fit: cover; border-radius: 2px; display: block; }

#launcherButtons {
  display: flex; gap: 48px;
}
.launcher-tile {
  width: 220px; height: 280px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px;
  background: linear-gradient(160deg, rgba(74,144,217,0.12), rgba(15,20,40,0.6));
  border: 1px solid rgba(160,196,255,0.25);
  border-radius: 18px;
  color: #cce0ff; cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.launcher-tile:hover {
  transform: translateY(-6px);
  border-color: #a0c4ff;
  box-shadow: 0 14px 40px rgba(74,144,217,0.35);
}
.launcher-tile-icon { font-size: 64px; line-height: 1; }
/* 2줄 라벨(2026-07-27): 위 브랜드 'Dasoni Studio'(작고 흐림) + 아래 앱명(기존 17px→15px 축소) */
.launcher-tile-brand { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: #a0c4ff; opacity: 0.85; margin-bottom: -12px; }
.launcher-tile-label { font-size: 15px; font-weight: 700; letter-spacing: 0.04em; }

@media (max-width: 600px) {
  #launcherButtons { flex-direction: column; gap: 24px; }
  .launcher-tile { width: 240px; height: 180px; }
}

#launcherCopyright {
  position: absolute;
  bottom: 20px;
  left: 0; right: 0;
  text-align: center;
  font-size: 12px;
  color: #5a6a8a;
  letter-spacing: 0.02em;
}

/* ── 공지/약관 페이지 (런처와 동일한 톤의 풀페이지) ───────────────────────────── */

#noticePageScreen {
  position: fixed; inset: 0;
  background: radial-gradient(circle at 50% 40%, #1a1a2e 0%, #05050a 100%);
  display: flex; align-items: center; justify-content: center;
}

#noticePopup {
  width: 640px; max-width: 90vw;
  max-height: 80vh;
  display: flex; flex-direction: column;
  background: linear-gradient(160deg, rgba(74,144,217,0.12), rgba(15,20,40,0.85));
  border: 1px solid rgba(160,196,255,0.25);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.5);
  padding: 28px 30px 22px;
  gap: 16px;
}

#noticeTitle {
  font-size: 18px; font-weight: 700; letter-spacing: 0.03em;
  color: #cce0ff; text-align: center;
}

#noticeBody {
  flex: 1;
  overflow-y: auto;
  font-size: 13px; line-height: 1.7;
  color: #c8daf0;
  white-space: pre-wrap;
  user-select: text;
  padding-right: 6px;
}
#noticeBody h1, #noticeBody h2, #noticeBody h3 {
  color: #a0c4ff; margin: 14px 0 6px; font-weight: 700;
}
#noticeBody h1 { font-size: 16px; }
#noticeBody h2 { font-size: 15px; }
#noticeBody h3 { font-size: 14px; }
#noticeBody p  { margin: 0 0 10px; }
#noticeBody ul { margin: 0 0 10px; padding-left: 20px; }
#noticeBody strong { color: #e0eaf8; }
#noticeBody::-webkit-scrollbar { width: 6px; }
#noticeBody::-webkit-scrollbar-thumb { background: rgba(160,196,255,0.3); border-radius: 3px; }

#noticeBtns {
  display: flex; justify-content: center; gap: 12px;
}
#btnNoticeCancel, #btnNoticeConfirm {
  min-width: 120px;
  padding: 10px 20px;
  border-radius: 20px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
#btnNoticeCancel {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(160,196,255,0.18);
  color: #7a9cc0;
}
#btnNoticeCancel:hover {
  background: rgba(255,255,255,0.09); border-color: rgba(160,196,255,0.4); color: #a0c4ff;
}
#btnNoticeConfirm {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(160,196,255,0.3);
  color: #a0c4ff;
}
#btnNoticeConfirm:hover {
  background: rgba(255,255,255,0.12); border-color: #a0c4ff;
}

@media (max-width: 600px) {
  #noticePopup { width: 92vw; padding: 22px 18px 18px; }
}
